react-d3-graph
Version:
React component to build interactive and configurable graphs with d3 effortlessly
14 lines • 117 kB
JavaScript
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}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 o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));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=10)}([function(t,e,n){"use strict";t.exports=n(8)},,,,,,,,function(t,e,n){"use strict";
/** @license React v16.13.0
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var r=n(9),o="function"==typeof Symbol&&Symbol.for,i=o?Symbol.for("react.element"):60103,a=o?Symbol.for("react.portal"):60106,u=o?Symbol.for("react.fragment"):60107,s=o?Symbol.for("react.strict_mode"):60108,c=o?Symbol.for("react.profiler"):60114,l=o?Symbol.for("react.provider"):60109,h=o?Symbol.for("react.context"):60110,f=o?Symbol.for("react.forward_ref"):60112,p=o?Symbol.for("react.suspense"):60113,d=o?Symbol.for("react.memo"):60115,y=o?Symbol.for("react.lazy"):60116,g="function"==typeof Symbol&&Symbol.iterator;function v(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_={};function b(t,e,n){this.props=t,this.context=e,this.refs=_,this.updater=n||m}function w(){}function k(t,e,n){this.props=t,this.context=e,this.refs=_,this.updater=n||m}b.prototype.isReactComponent={},b.prototype.setState=function(t,e){if("object"!=typeof t&&"function"!=typeof t&&null!=t)throw Error(v(85));this.updater.enqueueSetState(this,t,e,"setState")},b.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")},w.prototype=b.prototype;var O=k.prototype=new w;O.constructor=k,r(O,b.prototype),O.isPureReactComponent=!0;var x={current:null},S=Object.prototype.hasOwnProperty,M={key:!0,ref:!0,__self:!0,__source:!0};function E(t,e,n){var r,o={},a=null,u=null;if(null!=e)for(r in void 0!==e.ref&&(u=e.ref),void 0!==e.key&&(a=""+e.key),e)S.call(e,r)&&!M.hasOwnProperty(r)&&(o[r]=e[r]);var s=arguments.length-2;if(1===s)o.children=n;else if(1<s){for(var c=Array(s),l=0;l<s;l++)c[l]=arguments[l+2];o.children=c}if(t&&t.defaultProps)for(r in s=t.defaultProps)void 0===o[r]&&(o[r]=s[r]);return{$$typeof:i,type:t,key:a,ref:u,props:o,_owner:x.current}}function C(t){return"object"==typeof t&&null!==t&&t.$$typeof===i}var A=/\/+/g,N=[];function P(t,e,n,r){if(N.length){var o=N.pop();return o.result=t,o.keyPrefix=e,o.func=n,o.context=r,o.count=0,o}return{result:t,keyPrefix:e,func:n,context:r,count:0}}function j(t){t.result=null,t.keyPrefix=null,t.func=null,t.context=null,t.count=0,10>N.length&&N.push(t)}function T(t,e,n){return null==t?0:function t(e,n,r,o){var u=typeof e;"undefined"!==u&&"boolean"!==u||(e=null);var s=!1;if(null===e)s=!0;else switch(u){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case i:case a:s=!0}}if(s)return r(o,e,""===n?"."+D(e,0):n),1;if(s=0,n=""===n?".":n+":",Array.isArray(e))for(var c=0;c<e.length;c++){var l=n+D(u=e[c],c);s+=t(u,l,r,o)}else if(null===e||"object"!=typeof e?l=null:l="function"==typeof(l=g&&e[g]||e["@@iterator"])?l:null,"function"==typeof l)for(e=l.call(e),c=0;!(u=e.next()).done;)s+=t(u=u.value,l=n+D(u,c++),r,o);else if("object"===u)throw r=""+e,Error(v(31,"[object Object]"===r?"object with keys {"+Object.keys(e).join(", ")+"}":r,""));return s}(t,"",e,n)}function D(t,e){return"object"==typeof t&&null!==t&&null!=t.key?function(t){var e={"=":"=0",":":"=2"};return"$"+(""+t).replace(/[=:]/g,(function(t){return e[t]}))}(t.key):e.toString(36)}function L(t,e){t.func.call(t.context,e,t.count++)}function R(t,e,n){var r=t.result,o=t.keyPrefix;t=t.func.call(t.context,e,t.count++),Array.isArray(t)?z(t,r,n,(function(t){return t})):null!=t&&(C(t)&&(t=function(t,e){return{$$typeof:i,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}(t,o+(!t.key||e&&e.key===t.key?"":(""+t.key).replace(A,"$&/")+"/")+n)),r.push(t))}function z(t,e,n,r,o){var i="";null!=n&&(i=(""+n).replace(A,"$&/")+"/"),T(t,R,e=P(e,i,r,o)),j(e)}var I={current:null};function G(){var t=I.current;if(null===t)throw Error(v(321));return t}var q={ReactCurrentDispatcher:I,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:x,IsSomeRendererActing:{current:!1},assign:r};e.Children={map:function(t,e,n){if(null==t)return t;var r=[];return z(t,r,null,e,n),r},forEach:function(t,e,n){if(null==t)return t;T(t,L,e=P(null,null,e,n)),j(e)},count:function(t){return T(t,(function(){return null}),null)},toArray:function(t){var e=[];return z(t,e,null,(function(t){return t})),e},only:function(t){if(!C(t))throw Error(v(143));return t}},e.Component=b,e.Fragment=u,e.Profiler=c,e.PureComponent=k,e.StrictMode=s,e.Suspense=p,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=q,e.cloneElement=function(t,e,n){if(null==t)throw Error(v(267,t));var o=r({},t.props),a=t.key,u=t.ref,s=t._owner;if(null!=e){if(void 0!==e.ref&&(u=e.ref,s=x.current),void 0!==e.key&&(a=""+e.key),t.type&&t.type.defaultProps)var c=t.type.defaultProps;for(l in e)S.call(e,l)&&!M.hasOwnProperty(l)&&(o[l]=void 0===e[l]&&void 0!==c?c[l]:e[l])}var l=arguments.length-2;if(1===l)o.children=n;else if(1<l){c=Array(l);for(var h=0;h<l;h++)c[h]=arguments[h+2];o.children=c}return{$$typeof:i,type:t.type,key:a,ref:u,props:o,_owner:s}},e.createContext=function(t,e){return void 0===e&&(e=null),(t={$$typeof:h,_calculateChangedBits:e,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:l,_context:t},t.Consumer=t},e.createElement=E,e.createFactory=function(t){var e=E.bind(null,t);return e.type=t,e},e.createRef=function(){return{current:null}},e.forwardRef=function(t){return{$$typeof:f,render:t}},e.isValidElement=C,e.lazy=function(t){return{$$typeof:y,_ctor:t,_status:-1,_result:null}},e.memo=function(t,e){return{$$typeof:d,type:t,compare:void 0===e?null:e}},e.useCallback=function(t,e){return G().useCallback(t,e)},e.useContext=function(t,e){return G().useContext(t,e)},e.useDebugValue=function(){},e.useEffect=function(t,e){return G().useEffect(t,e)},e.useImperativeHandle=function(t,e,n){return G().useImperativeHandle(t,e,n)},e.useLayoutEffect=function(t,e){return G().useLayoutEffect(t,e)},e.useMemo=function(t,e){return G().useMemo(t,e)},e.useReducer=function(t,e,n){return G().useReducer(t,e,n)},e.useRef=function(t){return G().useRef(t)},e.useState=function(t){return G().useState(t)},e.version="16.13.0"},function(t,e,n){"use strict";
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(t){r[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,u,s=a(t),c=1;c<arguments.length;c++){for(var l in n=Object(arguments[c]))o.call(n,l)&&(s[l]=n[l]);if(r){u=r(n);for(var h=0;h<u.length;h++)i.call(n,u[h])&&(s[u[h]]=n[u[h]])}}return s}},function(t,e,n){"use strict";n.r(e);var r=n(0),o=n.n(r),i={value:function(){}};function a(){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 u(r)}function u(t){this._=t}function s(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 c(t,e){for(var n,r=0,o=t.length;r<o;++r)if((n=t[r]).name===e)return n.value}function l(t,e,n){for(var r=0,o=t.length;r<o;++r)if(t[r].name===e){t[r]=i,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}u.prototype=a.prototype={constructor:u,on:function(t,e){var n,r=this._,o=s(t+"",r),i=-1,a=o.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++i<a;)if(n=(t=o[i]).type)r[n]=l(r[n],t.name,e);else if(null==e)for(n in r)r[n]=l(r[n],t.name,null);return this}for(;++i<a;)if((n=(t=o[i]).type)&&(n=c(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new u(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,o=new Array(n),i=0;i<n;++i)o[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(i=0,n=(r=this._[t]).length;i<n;++i)r[i].value.apply(e,o)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],o=0,i=r.length;o<i;++o)r[o].value.apply(e,n)}};var h=a,f={},p=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(f={mouseenter:"mouseover",mouseleave:"mouseout"}));function d(t,e,n){return t=y(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function y(t,e,n){return function(r){var o=p;p=r;try{t.call(this,this.__data__,e,n)}finally{p=o}}}function g(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 v(t){return function(){var e=this.__on;if(e){for(var n,r=0,o=-1,i=e.length;r<i;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++o]=n:this.removeEventListener(n.type,n.listener,n.capture);++o?e.length=o:delete this.__on}}}function m(t,e,n){var r=f.hasOwnProperty(t.type)?d:y;return function(o,i,a){var u,s=this.__on,c=r(e,i,a);if(s)for(var l=0,h=s.length;l<h;++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 _(t,e,n,r){var o=p;t.sourceEvent=p,p=t;try{return e.apply(n,r)}finally{p=o}}var b=function(){for(var t,e=p;t=e.sourceEvent;)e=t;return e},w=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 o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]},k=function(t){var e=b();return e.changedTouches&&(e=e.changedTouches[0]),w(t,e)};function O(){}var x=function(t){return null==t?O:function(){return this.querySelector(t)}};function S(){return[]}var M=function(t){return null==t?S:function(){return this.querySelectorAll(t)}},E=function(t){return function(){return this.matches(t)}},C=function(t){return new Array(t.length)};function A(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}A.prototype={constructor:A,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)}};function N(t,e,n,r,o,i){for(var a,u=0,s=e.length,c=i.length;u<c;++u)(a=e[u])?(a.__data__=i[u],r[u]=a):n[u]=new A(t,i[u]);for(;u<s;++u)(a=e[u])&&(o[u]=a)}function P(t,e,n,r,o,i,a){var u,s,c,l={},h=e.length,f=i.length,p=new Array(h);for(u=0;u<h;++u)(s=e[u])&&(p[u]=c="$"+a.call(s,s.__data__,u,e),c in l?o[u]=s:l[c]=s);for(u=0;u<f;++u)(s=l[c="$"+a.call(t,i[u],u,i)])?(r[u]=s,s.__data__=i[u],l[c]=null):n[u]=new A(t,i[u]);for(u=0;u<h;++u)(s=e[u])&&l[p[u]]===s&&(o[u]=s)}function j(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}var T="http://www.w3.org/1999/xhtml",D={svg:"http://www.w3.org/2000/svg",xhtml:T,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},L=function(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),D.hasOwnProperty(e)?{space:D[e],local:t}:t};function R(t){return function(){this.removeAttribute(t)}}function z(t){return function(){this.removeAttributeNS(t.space,t.local)}}function I(t,e){return function(){this.setAttribute(t,e)}}function G(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function q(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function H(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 W=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function B(t){return function(){this.style.removeProperty(t)}}function Y(t,e,n){return function(){this.style.setProperty(t,e,n)}}function U(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function X(t,e){return t.style.getPropertyValue(e)||W(t).getComputedStyle(t,null).getPropertyValue(e)}function $(t){return function(){delete this[t]}}function F(t,e){return function(){this[t]=e}}function Z(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function V(t){return t.trim().split(/^|\s+/)}function K(t){return t.classList||new Q(t)}function Q(t){this._node=t,this._names=V(t.getAttribute("class")||"")}function J(t,e){for(var n=K(t),r=-1,o=e.length;++r<o;)n.add(e[r])}function tt(t,e){for(var n=K(t),r=-1,o=e.length;++r<o;)n.remove(e[r])}function et(t){return function(){J(this,t)}}function nt(t){return function(){tt(this,t)}}function rt(t,e){return function(){(e.apply(this,arguments)?J:tt)(this,t)}}Q.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 ot(){this.textContent=""}function it(t){return function(){this.textContent=t}}function at(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function ut(){this.innerHTML=""}function st(t){return function(){this.innerHTML=t}}function ct(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function lt(){this.nextSibling&&this.parentNode.appendChild(this)}function ht(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ft(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===T&&e.documentElement.namespaceURI===T?e.createElement(t):e.createElementNS(n,t)}}function pt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}var dt=function(t){var e=L(t);return(e.local?pt:ft)(e)};function yt(){return null}function gt(){var t=this.parentNode;t&&t.removeChild(this)}function vt(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function mt(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function _t(t,e,n){var r=W(t),o=r.CustomEvent;"function"==typeof o?o=new o(e,n):(o=r.document.createEvent("Event"),n?(o.initEvent(e,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(e,!1,!1)),t.dispatchEvent(o)}function bt(t,e){return function(){return _t(this,t,e)}}function wt(t,e){return function(){return _t(this,t,e.apply(this,arguments))}}var kt=[null];function Ot(t,e){this._groups=t,this._parents=e}function xt(){return new Ot([[document.documentElement]],kt)}Ot.prototype=xt.prototype={constructor:Ot,select:function(t){"function"!=typeof t&&(t=x(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var i,a,u=e[o],s=u.length,c=r[o]=new Array(s),l=0;l<s;++l)(i=u[l])&&(a=t.call(i,i.__data__,l,u))&&("__data__"in i&&(a.__data__=i.__data__),c[l]=a);return new Ot(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=M(t));for(var e=this._groups,n=e.length,r=[],o=[],i=0;i<n;++i)for(var a,u=e[i],s=u.length,c=0;c<s;++c)(a=u[c])&&(r.push(t.call(a,a.__data__,c,u)),o.push(a));return new Ot(r,o)},filter:function(t){"function"!=typeof t&&(t=E(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var i,a=e[o],u=a.length,s=r[o]=[],c=0;c<u;++c)(i=a[c])&&t.call(i,i.__data__,c,a)&&s.push(i);return new Ot(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?P:N,o=this._parents,i=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var a=i.length,u=new Array(a),s=new Array(a),c=new Array(a),l=0;l<a;++l){var h=o[l],f=i[l],p=f.length,d=t.call(h,h&&h.__data__,l,o),y=d.length,g=s[l]=new Array(y),v=u[l]=new Array(y);r(h,f,g,v,c[l]=new Array(p),d,e);for(var m,_,b=0,w=0;b<y;++b)if(m=g[b]){for(b>=w&&(w=b+1);!(_=v[w])&&++w<y;);m._next=_||null}}return(u=new Ot(u,o))._enter=s,u._exit=c,u},enter:function(){return new Ot(this._enter||this._groups.map(C),this._parents)},exit:function(){return new Ot(this._exit||this._groups.map(C),this._parents)},join:function(t,e,n){var r=this.enter(),o=this,i=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(o=e(o)),null==n?i.remove():n(i),r&&o?r.merge(o).order():o},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,o=n.length,i=Math.min(r,o),a=new Array(r),u=0;u<i;++u)for(var s,c=e[u],l=n[u],h=c.length,f=a[u]=new Array(h),p=0;p<h;++p)(s=c[p]||l[p])&&(f[p]=s);for(;u<r;++u)a[u]=e[u];return new Ot(a,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,o=t[e],i=o.length-1,a=o[i];--i>=0;)(r=o[i])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=j);for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i){for(var a,u=n[i],s=u.length,c=o[i]=new Array(s),l=0;l<s;++l)(a=u[l])&&(c[l]=a);c.sort(e)}return new Ot(o,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],o=0,i=r.length;o<i;++o){var a=r[o];if(a)return a}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 o,i=e[n],a=0,u=i.length;a<u;++a)(o=i[a])&&t.call(o,o.__data__,a,i);return this},attr:function(t,e){var n=L(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?z:R:"function"==typeof e?n.local?H:q:n.local?G:I)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?B:"function"==typeof e?U:Y)(t,e,null==n?"":n)):X(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?$:"function"==typeof e?Z:F)(t,e)):this.node()[t]},classed:function(t,e){var n=V(t+"");if(arguments.length<2){for(var r=K(this.node()),o=-1,i=n.length;++o<i;)if(!r.contains(n[o]))return!1;return!0}return this.each(("function"==typeof e?rt:e?et:nt)(n,e))},text:function(t){return arguments.length?this.each(null==t?ot:("function"==typeof t?at:it)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?ut:("function"==typeof t?ct:st)(t)):this.node().innerHTML},raise:function(){return this.each(lt)},lower:function(){return this.each(ht)},append:function(t){var e="function"==typeof t?t:dt(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:dt(t),r=null==e?yt:"function"==typeof e?e:x(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(gt)},clone:function(t){return this.select(t?mt:vt)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,o,i=g(t+""),a=i.length;if(!(arguments.length<2)){for(u=e?m:v,null==n&&(n=!1),r=0;r<a;++r)this.each(u(i[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<a;++r)if((o=i[r]).type===s.type&&o.name===s.name)return s.value},dispatch:function(t,e){return this.each(("function"==typeof e?wt:bt)(t,e))}};var St=xt,Mt=function(t){return"string"==typeof t?new Ot([[document.querySelector(t)]],[document.documentElement]):new Ot([[t]],kt)},Et=function(t,e,n){arguments.length<3&&(n=e,e=b().changedTouches);for(var r,o=0,i=e?e.length:0;o<i;++o)if((r=e[o]).identifier===n)return w(t,r);return null};function Ct(){p.stopImmediatePropagation()}var At=function(){p.preventDefault(),p.stopImmediatePropagation()},Nt=function(t){var e=t.document.documentElement,n=Mt(t).on("dragstart.drag",At,!0);"onselectstart"in e?n.on("selectstart.drag",At,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")};function Pt(t,e){var n=t.document.documentElement,r=Mt(t).on("dragstart.drag",null);e&&(r.on("click.drag",At,!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 jt=function(t){return function(){return t}};function Tt(t,e,n,r,o,i,a,u,s,c){this.target=t,this.type=e,this.subject=n,this.identifier=r,this.active=o,this.x=i,this.y=a,this.dx=u,this.dy=s,this._=c}function Dt(){return!p.ctrlKey&&!p.button}function Lt(){return this.parentNode}function Rt(t){return null==t?{x:p.x,y:p.y}:t}function zt(){return navigator.maxTouchPoints||"ontouchstart"in this}Tt.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var It=function(t){return function(){return t}},Gt=function(){return 1e-6*(Math.random()-.5)};function qt(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var o,i,a,u,s,c,l,h,f,p=t._root,d={data:r},y=t._x0,g=t._y0,v=t._x1,m=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((c=e>=(i=(y+v)/2))?y=i:v=i,(l=n>=(a=(g+m)/2))?g=a:m=a,o=p,!(p=p[h=l<<1|c]))return o[h]=d,t;if(u=+t._x.call(null,p.data),s=+t._y.call(null,p.data),e===u&&n===s)return d.next=p,o?o[h]=d:t._root=d,t;do{o=o?o[h]=new Array(4):t._root=new Array(4),(c=e>=(i=(y+v)/2))?y=i:v=i,(l=n>=(a=(g+m)/2))?g=a:m=a}while((h=l<<1|c)==(f=(s>=a)<<1|u>=i));return o[f]=p,o[h]=d,t}var Ht=function(t,e,n,r,o){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=o};function Wt(t){return t[0]}function Bt(t){return t[1]}function Yt(t,e,n){var r=new Ut(null==e?Wt:e,null==n?Bt:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function Ut(t,e,n,r,o,i){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=o,this._y1=i,this._root=void 0}function Xt(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var $t=Yt.prototype=Ut.prototype;$t.copy=function(){var t,e,n=new Ut(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=Xt(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var o=0;o<4;++o)(e=r.source[o])&&(e.length?t.push({source:e,target:r.target[o]=new Array(4)}):r.target[o]=Xt(e));return n},$t.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return qt(this.cover(e,n),e,n,t)},$t.addAll=function(t){var e,n,r,o,i=t.length,a=new Array(i),u=new Array(i),s=1/0,c=1/0,l=-1/0,h=-1/0;for(n=0;n<i;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(o=+this._y.call(null,e))||(a[n]=r,u[n]=o,r<s&&(s=r),r>l&&(l=r),o<c&&(c=o),o>h&&(h=o));if(s>l||c>h)return this;for(this.cover(s,c).cover(l,h),n=0;n<i;++n)qt(this,a[n],u[n],t[n]);return this},$t.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,o=this._x1,i=this._y1;if(isNaN(n))o=(n=Math.floor(t))+1,i=(r=Math.floor(e))+1;else{for(var a,u,s=o-n,c=this._root;n>t||t>=o||r>e||e>=i;)switch(u=(e<r)<<1|t<n,(a=new Array(4))[u]=c,c=a,s*=2,u){case 0:o=n+s,i=r+s;break;case 1:n=o-s,i=r+s;break;case 2:o=n+s,r=i-s;break;case 3:n=o-s,r=i-s}this._root&&this._root.length&&(this._root=c)}return this._x0=n,this._y0=r,this._x1=o,this._y1=i,this},$t.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},$t.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},$t.find=function(t,e,n){var r,o,i,a,u,s,c,l=this._x0,h=this._y0,f=this._x1,p=this._y1,d=[],y=this._root;for(y&&d.push(new Ht(y,l,h,f,p)),null==n?n=1/0:(l=t-n,h=e-n,f=t+n,p=e+n,n*=n);s=d.pop();)if(!(!(y=s.node)||(o=s.x0)>f||(i=s.y0)>p||(a=s.x1)<l||(u=s.y1)<h))if(y.length){var g=(o+a)/2,v=(i+u)/2;d.push(new Ht(y[3],g,v,a,u),new Ht(y[2],o,v,g,u),new Ht(y[1],g,i,a,v),new Ht(y[0],o,i,g,v)),(c=(e>=v)<<1|t>=g)&&(s=d[d.length-1],d[d.length-1]=d[d.length-1-c],d[d.length-1-c]=s)}else{var m=t-+this._x.call(null,y.data),_=e-+this._y.call(null,y.data),b=m*m+_*_;if(b<n){var w=Math.sqrt(n=b);l=t-w,h=e-w,f=t+w,p=e+w,r=y.data}}return r},$t.remove=function(t){if(isNaN(i=+this._x.call(null,t))||isNaN(a=+this._y.call(null,t)))return this;var e,n,r,o,i,a,u,s,c,l,h,f,p=this._root,d=this._x0,y=this._y0,g=this._x1,v=this._y1;if(!p)return this;if(p.length)for(;;){if((c=i>=(u=(d+g)/2))?d=u:g=u,(l=a>=(s=(y+v)/2))?y=s:v=s,e=p,!(p=p[h=l<<1|c]))return this;if(!p.length)break;(e[h+1&3]||e[h+2&3]||e[h+3&3])&&(n=e,f=h)}for(;p.data!==t;)if(r=p,!(p=p.next))return this;return(o=p.next)&&delete p.next,r?(o?r.next=o:delete r.next,this):e?(o?e[h]=o:delete e[h],(p=e[0]||e[1]||e[2]||e[3])&&p===(e[3]||e[2]||e[1]||e[0])&&!p.length&&(n?n[f]=p:this._root=p),this):(this._root=o,this)},$t.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},$t.root=function(){return this._root},$t.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},$t.visit=function(t){var e,n,r,o,i,a,u=[],s=this._root;for(s&&u.push(new Ht(s,this._x0,this._y0,this._x1,this._y1));e=u.pop();)if(!t(s=e.node,r=e.x0,o=e.y0,i=e.x1,a=e.y1)&&s.length){var c=(r+i)/2,l=(o+a)/2;(n=s[3])&&u.push(new Ht(n,c,l,i,a)),(n=s[2])&&u.push(new Ht(n,r,l,c,a)),(n=s[1])&&u.push(new Ht(n,c,o,i,l)),(n=s[0])&&u.push(new Ht(n,r,o,c,l))}return this},$t.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new Ht(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var o=e.node;if(o.length){var i,a=e.x0,u=e.y0,s=e.x1,c=e.y1,l=(a+s)/2,h=(u+c)/2;(i=o[0])&&n.push(new Ht(i,a,u,l,h)),(i=o[1])&&n.push(new Ht(i,l,u,s,h)),(i=o[2])&&n.push(new Ht(i,a,h,l,c)),(i=o[3])&&n.push(new Ht(i,l,h,s,c))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},$t.x=function(t){return arguments.length?(this._x=t,this):this._x},$t.y=function(t){return arguments.length?(this._y=t,this):this._y};function Ft(){}function Zt(t,e){var n=new Ft;if(t instanceof Ft)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,o=-1,i=t.length;if(null==e)for(;++o<i;)n.set(o,t[o]);else for(;++o<i;)n.set(e(r=t[o],o,t),r)}else if(t)for(var a in t)n.set(a,t[a]);return n}Ft.prototype=Zt.prototype={constructor:Ft,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 Vt=Zt;function Kt(){}var Qt=Vt.prototype;function Jt(t,e){var n=new Kt;if(t instanceof Kt)t.each((function(t){n.add(t)}));else if(t){var r=-1,o=t.length;if(null==e)for(;++r<o;)n.add(t[r]);else for(;++r<o;)n.add(e(t[r],r,t))}return n}Kt.prototype=Jt.prototype={constructor:Kt,has:Qt.has,add:function(t){return this["$"+(t+="")]=t,this},remove:Qt.remove,clear:Qt.clear,values:Qt.keys,size:Qt.size,empty:Qt.empty,each:Qt.each};function te(t){return t.index}function ee(t,e){var n=t.get(e);if(!n)throw new Error("missing: "+e);return n}var ne,re,oe=0,ie=0,ae=0,ue=0,se=0,ce=0,le="object"==typeof performance&&performance.now?performance:Date,he="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function fe(){return se||(he(pe),se=le.now()+ce)}function pe(){se=0}function de(){this._call=this._time=this._next=null}function ye(t,e,n){var r=new de;return r.restart(t,e,n),r}function ge(){se=(ue=le.now())+ce,oe=ie=0;try{!function(){fe(),++oe;for(var t,e=ne;e;)(t=se-e._time)>=0&&e._call.call(null,t),e=e._next;--oe}()}finally{oe=0,function(){var t,e,n=ne,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:ne=e);re=t,me(r)}(),se=0}}function ve(){var t=le.now(),e=t-ue;e>1e3&&(ce-=e,ue=t)}function me(t){oe||(ie&&(ie=clearTimeout(ie)),t-se>24?(t<1/0&&(ie=setTimeout(ge,t-le.now()-ce)),ae&&(ae=clearInterval(ae))):(ae||(ue=le.now(),ae=setInterval(ve,1e3)),oe=1,he(ge)))}function _e(t){return t.x}function be(t){return t.y}de.prototype=ye.prototype={constructor:de,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?fe():+n)+(null==e?0:+e),this._next||re===this||(re?re._next=this:ne=this,re=this),this._call=t,this._time=n,me()},stop:function(){this._call&&(this._call=null,this._time=1/0,me())}};var we=Math.PI*(3-Math.sqrt(5)),ke=Math.SQRT2;function Oe(t){return((t=Math.exp(t))+1/t)/2}var xe=function(t,e){var n,r,o=t[0],i=t[1],a=t[2],u=e[0],s=e[1],c=e[2],l=u-o,h=s-i,f=l*l+h*h;if(f<1e-12)r=Math.log(c/a)/ke,n=function(t){return[o+t*l,i+t*h,a*Math.exp(ke*t*r)]};else{var p=Math.sqrt(f),d=(c*c-a*a+4*f)/(2*a*2*p),y=(c*c-a*a-4*f)/(2*c*2*p),g=Math.log(Math.sqrt(d*d+1)-d),v=Math.log(Math.sqrt(y*y+1)-y);r=(v-g)/ke,n=function(t){var e,n=t*r,u=Oe(g),s=a/(2*p)*(u*(e=ke*n+g,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(g));return[o+s*l,i+s*h,a*u/Oe(ke*n+g)]}}return n.duration=1e3*r,n},Se=function(t,e,n){var r=new de;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r},Me=h("start","end","cancel","interrupt"),Ee=[],Ce=function(t,e,n,r,o,i){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,o=t.__transition;function i(s){var c,l,h,f;if(1!==n.state)return u();for(c in o)if((f=o[c]).name===n.name){if(3===f.state)return Se(i);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete o[c]):+c<e&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete o[c])}if(Se((function(){3===n.state&&(n.state=4,n.timer.restart(a,n.delay,n.time),a(s))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),c=0,l=-1;c<h;++c)(f=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(r[++l]=f);r.length=l+1}}function a(e){for(var o=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(u),n.state=5,1),i=-1,a=r.length;++i<a;)r[i].call(t,o);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){for(var r in n.state=6,n.timer.stop(),delete o[e],o)return;delete t.__transition}o[e]=n,n.timer=ye((function(t){n.state=1,n.timer.restart(i,n.delay,n.time),n.delay<=t&&i(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:o,on:Me,tween:Ee,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:0})};function Ae(t,e){var n=Pe(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function Ne(t,e){var n=Pe(t,e);if(n.state>3)throw new Error("too late; already running");return n}function Pe(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}var je,Te,De,Le,Re=function(t,e){var n,r,o,i=t.__transition,a=!0;if(i){for(o in e=null==e?null:e+"",i)(n=i[o]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete i[o]):a=!1;a&&delete t.__transition}},ze=function(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}},Ie=180/Math.PI,Ge={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},qe=function(t,e,n,r,o,i){var a,u,s;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(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,a=-a),{translateX:o,translateY:i,rotate:Math.atan2(e,t)*Ie,skewX:Math.atan(s)*Ie,scaleX:a,scaleY:u}};function He(t,e,n,r){function o(t){return t.length?t.pop()+" ":""}return function(i,a){var u=[],s=[];return i=t(i),a=t(a),function(t,r,o,i,a,u){if(t!==o||r!==i){var s=a.push("translate(",null,e,null,n);u.push({i:s-4,x:ze(t,o)},{i:s-2,x:ze(r,i)})}else(o||i)&&a.push("translate("+o+e+i+n)}(i.translateX,i.translateY,a.translateX,a.translateY,u,s),function(t,e,n,i){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),i.push({i:n.push(o(n)+"rotate(",null,r)-2,x:ze(t,e)})):e&&n.push(o(n)+"rotate("+e+r)}(i.rotate,a.rotate,u,s),function(t,e,n,i){t!==e?i.push({i:n.push(o(n)+"skewX(",null,r)-2,x:ze(t,e)}):e&&n.push(o(n)+"skewX("+e+r)}(i.skewX,a.skewX,u,s),function(t,e,n,r,i,a){if(t!==n||e!==r){var u=i.push(o(i)+"scale(",null,",",null,")");a.push({i:u-4,x:ze(t,n)},{i:u-2,x:ze(e,r)})}else 1===n&&1===r||i.push(o(i)+"scale("+n+","+r+")")}(i.scaleX,i.scaleY,a.scaleX,a.scaleY,u,s),i=a=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 We=He((function(t){return"none"===t?Ge:(je||(je=document.createElement("DIV"),Te=document.documentElement,De=document.defaultView),je.style.transform=t,t=De.getComputedStyle(Te.appendChild(je),null).getPropertyValue("transform"),Te.removeChild(je),t=t.slice(7,-1).split(","),qe(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),Be=He((function(t){return null==t?Ge:(Le||(Le=document.createElementNS("http://www.w3.org/2000/svg","g")),Le.setAttribute("transform",t),(t=Le.transform.baseVal.consolidate())?(t=t.matrix,qe(t.a,t.b,t.c,t.d,t.e,t.f)):Ge)}),", ",")",")");function Ye(t,e){var n,r;return function(){var o=Ne(this,t),i=o.tween;if(i!==n)for(var a=0,u=(r=n=i).length;a<u;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}o.tween=r}}function Ue(t,e,n){var r,o;if("function"!=typeof n)throw new Error;return function(){var i=Ne(this,t),a=i.tween;if(a!==r){o=(r=a).slice();for(var u={name:e,value:n},s=0,c=o.length;s<c;++s)if(o[s].name===e){o[s]=u;break}s===c&&o.push(u)}i.tween=o}}function Xe(t,e,n){var r=t._id;return t.each((function(){var t=Ne(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return Pe(t,r).value[e]}}var $e=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function Fe(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Ze(){}var Ve="\\s*([+-]?\\d+)\\s*",Ke="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Qe="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Je=/^#([0-9a-f]{3,8})$/,tn=new RegExp("^rgb\\("+[Ve,Ve,Ve]+"\\)$"),en=new RegExp("^rgb\\("+[Qe,Qe,Qe]+"\\)$"),nn=new RegExp("^rgba\\("+[Ve,Ve,Ve,Ke]+"\\)$"),rn=new RegExp("^rgba\\("+[Qe,Qe,Qe,Ke]+"\\)$"),on=new RegExp("^hsl\\("+[Ke,Qe,Qe]+"\\)$"),an=new RegExp("^hsla\\("+[Ke,Qe,Qe,Ke]+"\\)$"),un={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 sn(){return this.rgb().formatHex()}function cn(){return this.rgb().formatRgb()}function ln(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Je.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?hn(e):3===n?new yn(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new yn(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new yn(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=tn.exec(t))?new yn(e[1],e[2],e[3],1):(e=en.exec(t))?new yn(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=nn.exec(t))?fn(e[1],e[2],e[3],e[4]):(e=rn.exec(t))?fn(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=on.exec(t))?_n(e[1],e[2]/100,e[3]/100,1):(e=an.exec(t))?_n(e[1],e[2]/100,e[3]/100,e[4]):un.hasOwnProperty(t)?hn(un[t]):"transparent"===t?new yn(NaN,NaN,NaN,0):null}function hn(t){return new yn(t>>16&255,t>>8&255,255&t,1)}function fn(t,e,n,r){return r<=0&&(t=e=n=NaN),new yn(t,e,n,r)}function pn(t){return t instanceof Ze||(t=ln(t)),t?new yn((t=t.rgb()).r,t.g,t.b,t.opacity):new yn}function dn(t,e,n,r){return 1===arguments.length?pn(t):new yn(t,e,n,null==r?1:r)}function yn(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function gn(){return"#"+mn(this.r)+mn(this.g)+mn(this.b)}function vn(){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 mn(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function _n(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new wn(t,e,n,r)}function bn(t){if(t instanceof wn)return new wn(t.h,t.s,t.l,t.opacity);if(t instanceof Ze||(t=ln(t)),!t)return new wn;if(t instanceof wn)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,o=Math.min(e,n,r),i=Math.max(e,n,r),a=NaN,u=i-o,s=(i+o)/2;return u?(a=e===i?(n-r)/u+6*(n<r):n===i?(r-e)/u+2:(e-n)/u+4,u/=s<.5?i+o:2-i-o,a*=60):u=s>0&&s<1?0:a,new wn(a,u,s,t.opacity)}function wn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function kn(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 On(t,e,n,r,o){var i=t*t,a=i*t;return((1-3*t+3*i-a)*e+(4-6*i+3*a)*n+(1+3*t+3*i-3*a)*r+a*o)/6}$e(Ze,ln,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:sn,formatHex:sn,formatHsl:function(){return bn(this).formatHsl()},formatRgb:cn,toString:cn}),$e(yn,dn,Fe(Ze,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new yn(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new yn(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:gn,formatHex:gn,formatRgb:vn,toString:vn})),$e(wn,(function(t,e,n,r){return 1===arguments.length?bn(t):new wn(t,e,n,null==r?1:r)}),Fe(Ze,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new wn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new wn(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,o=2*n-r;return new yn(kn(t>=240?t-240:t+120,o,r),kn(t,o,r),kn(t<120?t+240:t-120,o,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 xn=function(t){return function(){return t}};function Sn(t,e){return function(n){return t+n*e}}function Mn(t){return 1==(t=+t)?En: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):xn(isNaN(e)?n:e)}}function En(t,e){var n=e-t;return n?Sn(t,n):xn(isNaN(t)?e:t)}var Cn=function t(e){var n=Mn(e);function r(t,e){var r=n((t=dn(t)).r,(e=dn(e)).r),o=n(t.g,e.g),i=n(t.b,e.b),a=En(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=o(e),t.b=i(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function An(t){return function(e){var n,r,o=e.length,i=new Array(o),a=new Array(o),u=new Array(o);for(n=0;n<o;++n)r=dn(e[n]),i[n]=r.r||0,a[n]=r.g||0,u[n]=r.b||0;return i=t(i),a=t(a),u=t(u),r.opacity=1,function(t){return r.r=i(t),r.g=a(t),r.b=u(t),r+""}}}An((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),o=t[r],i=t[r+1],a=r>0?t[r-1]:2*o-i,u=r<e-1?t[r+2]:2*i-o;return On((n-r/e)*e,a,o,i,u)}})),An((function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),o=t[(r+e-1)%e],i=t[r%e],a=t[(r+1)%e],u=t[(r+2)%e];return On((n-r/e)*e,o,i,a,u)}}));var Nn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Pn=new RegExp(Nn.source,"g");var jn=function(t,e){var n,r,o,i=Nn.lastIndex=Pn.lastIndex=0,a=-1,u=[],s=[];for(t+="",e+="";(n=Nn.exec(t))&&(r=Pn.exec(e));)(o=r.index)>i&&(o=e.slice(i,o),u[a]?u[a]+=o:u[++a]=o),(n=n[0])===(r=r[0])?u[a]?u[a]+=r:u[++a]=r:(u[++a]=null,s.push({i:a,x:ze(n,r)})),i=Pn.lastIndex;return i<e.length&&(o=e.slice(i),u[a]?u[a]+=o:u[++a]=o),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("")})},Tn=function(t,e){var n;return("number"==typeof e?ze:e instanceof ln?Cn:(n=ln(e))?(e=n,Cn):jn)(t,e)};function Dn(t){return function(){this.removeAttribute(t)}}function Ln(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Rn(t,e,n){var r,o,i=n+"";return function(){var a=this.getAttribute(t);return a===i?null:a===r?o:o=e(r=a,n)}}function zn(t,e,n){var r,o,i=n+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===r?o:o=e(r=a,n)}}function In(t,e,n){var r,o,i;return function(){var a,u,s=n(this);if(null!=s)return(a=this.getAttribute(t))===(u=s+"")?null:a===r&&u===o?i:(o=u,i=e(r=a,s));this.removeAttribute(t)}}function Gn(t,e,n){var r,o,i;return function(){var a,u,s=n(this);if(null!=s)return(a=this.getAttributeNS(t.space,t.local))===(u=s+"")?null:a===r&&u===o?i:(o=u,i=e(r=a,s));this.removeAttributeNS(t.space,t.local)}}function qn(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Hn(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Wn(t,e){var n,r;function o(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&Hn(t,o)),n}return o._value=e,o}function Bn(t,e){var n,r;function o(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&qn(t,o)),n}return o._value=e,o}function Yn(t,e){return function(){Ae(this,t).delay=+e.apply(this,arguments)}}function Un(t,e){return e=+e,function(){Ae(this,t).delay=e}}function Xn(t,e){return function(){Ne(this,t).duration=+e.apply(this,arguments)}}function $n(t,e){return e=+e,function(){Ne(this,t).duration=e}}function Fn(t,e){if("function"!=typeof e)throw new Error;return function(){Ne(this,t).ease=e}}function Zn(t,e,n){var r,o,i=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)?Ae:Ne;return function(){var a=i(this,t),u=a.on;u!==r&&(o=(r=u).copy()).on(e,n),a.on=o}}var Vn=St.prototype.constructor;function Kn(t){return function(){this.style.removeProperty(t)}}function Qn(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Jn(t,e,n){var r,o;function i(){var i=e.apply(this,arguments);return i!==o&&(r=(o=i)&&Qn(t,i,n)),r}return i._value=e,i}function tr(t){return function(e){this.textContent=t.call(this,e)}}function er(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&tr(r)),e}return r._value=t,r}var nr=0;function rr(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function or(){return++nr}var ir=St.prototype;rr.prototype=function(t){return St().transition(t)}.prototype={constructor:rr,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=x(t));for(var r=this._groups,o=r.length,i=new Array(o),a=0;a<o;++a)for(var u,s,c=r[a],l=c.length,h=i[a]=new Array(l),f=0;f<l;++f)(u=c[f])&&(s=t.call(u,u.__data__,f,c))&&("__data__"in u&&(s.__data__=u.__data__),h[f]=s,Ce(h[f],e,n,f,h,Pe(u,n)));return new rr(i,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=M(t));for(var r=this._groups,o=r.length,i=[],a=[],u=0;u<o;++u)for(var s,c=r[u],l=c.length,h=0;h<l;++h)if(s=c[h]){for(var f,p=t.call(s,s.__data__,h,c),d=Pe(s,n),y=0,g=p.length;y<g;++y)(f=p[y])&&Ce(f,e,n,y,p,d);i.push(p),a.push(s)}return new rr(i,a,e,n)},filter:function(t){"function"!=typeof t&&(t=E(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var i,a=e[o],u=a.length,s=r[o]=[],c=0;c<u;++c)(i=a[c])&&t.call(i,i.__data__,c,a)&&s.push(i);return new rr(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,o=n.length,i=Math.min(r,o),a=new Array(r),u=0;u<i;++u)for(var s,c=e[u],l=n[u],h=c.length,f=a[u]=new Array(h),p=0;p<h;++p)(s=c[p]||l[p])&&(f[p]=s);for(;u<r;++u)a[u]=e[u];return new rr(a,this._parents,this._name,this._id)},selection:function(){return new Vn(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=or(),r=this._groups,o=r.length,i=0;i<o;++i)for(var a,u=r[i],s=u.length,c=0;c<s;++c)if(a=u[c]){var l=Pe(a,e);Ce(a,t,n,c,u,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new rr(r,this._parents,t,n)},call:ir.call,nodes:ir.nodes,node:ir.node,size:ir.size,empty:ir.empty,each:ir.each,on:function(t,e){var n=this._id;return arguments.length<2?Pe(this.node(),n).on.on(t):this.each(Zn(n,t,e))},attr:function(t,e){var n=L(t),r="transform"===n?Be:Tn;return this.attrTween(t,"function"==typeof e?(n.local?Gn:In)(n,r,Xe(this,"attr."+t,e)):null==e?(n.local?Ln:Dn)(n):(n.local?zn:Rn)(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=L(t);return this.tween(n,(r.local?Wn:Bn)(r,e))},style:function(t,e,n){