UNPKG

librephotos-react-d3-graph

Version:

React component to build interactive and configurable graphs with d3 effortlessly

14 lines 110 kB
!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}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=34)}({0:function(t,e,n){"use strict";t.exports=n(32)},32: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(33),i="function"==typeof Symbol&&Symbol.for,o=i?Symbol.for("react.element"):60103,s=i?Symbol.for("react.portal"):60106,a=i?Symbol.for("react.fragment"):60107,u=i?Symbol.for("react.strict_mode"):60108,l=i?Symbol.for("react.profiler"):60114,c=i?Symbol.for("react.provider"):60109,h=i?Symbol.for("react.context"):60110,f=i?Symbol.for("react.forward_ref"):60112,p=i?Symbol.for("react.suspense"):60113,d=i?Symbol.for("react.memo"):60115,g=i?Symbol.for("react.lazy"):60116,y="function"==typeof Symbol&&Symbol.iterator;function m(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 v={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||v}function w(){}function k(t,e,n){this.props=t,this.context=e,this.refs=_,this.updater=n||v}b.prototype.isReactComponent={},b.prototype.setState=function(t,e){if("object"!=typeof t&&"function"!=typeof t&&null!=t)throw Error(m(85));this.updater.enqueueSetState(this,t,e,"setState")},b.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")},w.prototype=b.prototype;var x=k.prototype=new w;x.constructor=k,r(x,b.prototype),x.isPureReactComponent=!0;var O={current:null},M=Object.prototype.hasOwnProperty,E={key:!0,ref:!0,__self:!0,__source:!0};function C(t,e,n){var r,i={},s=null,a=null;if(null!=e)for(r in void 0!==e.ref&&(a=e.ref),void 0!==e.key&&(s=""+e.key),e)M.call(e,r)&&!E.hasOwnProperty(r)&&(i[r]=e[r]);var u=arguments.length-2;if(1===u)i.children=n;else if(1<u){for(var l=Array(u),c=0;c<u;c++)l[c]=arguments[c+2];i.children=l}if(t&&t.defaultProps)for(r in u=t.defaultProps)void 0===i[r]&&(i[r]=u[r]);return{$$typeof:o,type:t,key:s,ref:a,props:i,_owner:O.current}}function S(t){return"object"==typeof t&&null!==t&&t.$$typeof===o}var N=/\/+/g,A=[];function P(t,e,n,r){if(A.length){var i=A.pop();return i.result=t,i.keyPrefix=e,i.func=n,i.context=r,i.count=0,i}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>A.length&&A.push(t)}function T(t,e,n){return null==t?0:function t(e,n,r,i){var a=typeof e;"undefined"!==a&&"boolean"!==a||(e=null);var u=!1;if(null===e)u=!0;else switch(a){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case o:case s:u=!0}}if(u)return r(i,e,""===n?"."+D(e,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(e))for(var l=0;l<e.length;l++){var c=n+D(a=e[l],l);u+=t(a,c,r,i)}else if(null===e||"object"!=typeof e?c=null:c="function"==typeof(c=y&&e[y]||e["@@iterator"])?c:null,"function"==typeof c)for(e=c.call(e),l=0;!(a=e.next()).done;)u+=t(a=a.value,c=n+D(a,l++),r,i);else if("object"===a)throw r=""+e,Error(m(31,"[object Object]"===r?"object with keys {"+Object.keys(e).join(", ")+"}":r,""));return u}(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,i=t.keyPrefix;t=t.func.call(t.context,e,t.count++),Array.isArray(t)?$(t,r,n,(function(t){return t})):null!=t&&(S(t)&&(t=function(t,e){return{$$typeof:o,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}(t,i+(!t.key||e&&e.key===t.key?"":(""+t.key).replace(N,"$&/")+"/")+n)),r.push(t))}function $(t,e,n,r,i){var o="";null!=n&&(o=(""+n).replace(N,"$&/")+"/"),T(t,R,e=P(e,o,r,i)),j(e)}var z={current:null};function I(){var t=z.current;if(null===t)throw Error(m(321));return t}var G={ReactCurrentDispatcher:z,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:O,IsSomeRendererActing:{current:!1},assign:r};e.Children={map:function(t,e,n){if(null==t)return t;var r=[];return $(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 $(t,e,null,(function(t){return t})),e},only:function(t){if(!S(t))throw Error(m(143));return t}},e.Component=b,e.Fragment=a,e.Profiler=l,e.PureComponent=k,e.StrictMode=u,e.Suspense=p,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=G,e.cloneElement=function(t,e,n){if(null==t)throw Error(m(267,t));var i=r({},t.props),s=t.key,a=t.ref,u=t._owner;if(null!=e){if(void 0!==e.ref&&(a=e.ref,u=O.current),void 0!==e.key&&(s=""+e.key),t.type&&t.type.defaultProps)var l=t.type.defaultProps;for(c in e)M.call(e,c)&&!E.hasOwnProperty(c)&&(i[c]=void 0===e[c]&&void 0!==l?l[c]:e[c])}var c=arguments.length-2;if(1===c)i.children=n;else if(1<c){l=Array(c);for(var h=0;h<c;h++)l[h]=arguments[h+2];i.children=l}return{$$typeof:o,type:t.type,key:s,ref:a,props:i,_owner:u}},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:c,_context:t},t.Consumer=t},e.createElement=C,e.createFactory=function(t){var e=C.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=S,e.lazy=function(t){return{$$typeof:g,_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 I().useCallback(t,e)},e.useContext=function(t,e){return I().useContext(t,e)},e.useDebugValue=function(){},e.useEffect=function(t,e){return I().useEffect(t,e)},e.useImperativeHandle=function(t,e,n){return I().useImperativeHandle(t,e,n)},e.useLayoutEffect=function(t,e){return I().useLayoutEffect(t,e)},e.useMemo=function(t,e){return I().useMemo(t,e)},e.useReducer=function(t,e,n){return I().useReducer(t,e,n)},e.useRef=function(t){return I().useRef(t)},e.useState=function(t){return I().useState(t)},e.version="16.13.0"},33:function(t,e,n){"use strict"; /* object-assign (c) Sindre Sorhus @license MIT */var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function s(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,a,u=s(t),l=1;l<arguments.length;l++){for(var c in n=Object(arguments[l]))i.call(n,c)&&(u[c]=n[c]);if(r){a=r(n);for(var h=0;h<a.length;h++)o.call(n,a[h])&&(u[a[h]]=n[a[h]])}}return u}},34:function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o={value:()=>{}};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 a(r)}function a(t){this._=t}function u(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 l(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function c(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=o,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}a.prototype=s.prototype={constructor:a,on:function(t,e){var n,r=this._,i=u(t+"",r),o=-1,s=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<s;)if(n=(t=i[o]).type)r[n]=c(r[n],t.name,e);else if(null==e)for(n in r)r[n]=c(r[n],t.name,null);return this}for(;++o<s;)if((n=(t=i[o]).type)&&(n=l(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new a(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(r=this._[t]).length;o<n;++o)r[o].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,o=r.length;i<o;++i)r[i].value.apply(e,n)}};var h=s;function f(){}var p=function(t){return null==t?f:function(){return this.querySelector(t)}};function d(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function g(){return[]}var y=function(t){return null==t?g:function(){return this.querySelectorAll(t)}};var m=function(t){return function(){return this.matches(t)}};function v(t){return function(e){return e.matches(t)}}var _=Array.prototype.find;function b(){return this.firstElementChild}var w=Array.prototype.filter;function k(){return Array.from(this.children)}var x=function(t){return new Array(t.length)};function O(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}O.prototype={constructor:O,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 M=function(t){return function(){return t}};function E(t,e,n,r,i,o){for(var s,a=0,u=e.length,l=o.length;a<l;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new O(t,o[a]);for(;a<u;++a)(s=e[a])&&(i[a]=s)}function C(t,e,n,r,i,o,s){var a,u,l,c=new Map,h=e.length,f=o.length,p=new Array(h);for(a=0;a<h;++a)(u=e[a])&&(p[a]=l=s.call(u,u.__data__,a,e)+"",c.has(l)?i[a]=u:c.set(l,u));for(a=0;a<f;++a)l=s.call(t,o[a],a,o)+"",(u=c.get(l))?(r[a]=u,u.__data__=o[a],c.delete(l)):n[a]=new O(t,o[a]);for(a=0;a<h;++a)(u=e[a])&&c.get(p[a])===u&&(i[a]=u)}function S(t){return t.__data__}function N(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function A(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}var P="http://www.w3.org/1999/xhtml",j={svg:"http://www.w3.org/2000/svg",xhtml:P,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},T=function(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),j.hasOwnProperty(e)?{space:j[e],local:t}:t};function D(t){return function(){this.removeAttribute(t)}}function L(t){return function(){this.removeAttributeNS(t.space,t.local)}}function R(t,e){return function(){this.setAttribute(t,e)}}function $(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function z(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function I(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 G=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function q(t){return function(){this.style.removeProperty(t)}}function H(t,e,n){return function(){this.style.setProperty(t,e,n)}}function B(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function W(t,e){return t.style.getPropertyValue(e)||G(t).getComputedStyle(t,null).getPropertyValue(e)}function Y(t){return function(){delete this[t]}}function U(t,e){return function(){this[t]=e}}function X(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function F(t){return t.trim().split(/^|\s+/)}function Z(t){return t.classList||new V(t)}function V(t){this._node=t,this._names=F(t.getAttribute("class")||"")}function K(t,e){for(var n=Z(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Q(t,e){for(var n=Z(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function J(t){return function(){K(this,t)}}function tt(t){return function(){Q(this,t)}}function et(t,e){return function(){(e.apply(this,arguments)?K:Q)(this,t)}}V.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 nt(){this.textContent=""}function rt(t){return function(){this.textContent=t}}function it(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function ot(){this.innerHTML=""}function st(t){return function(){this.innerHTML=t}}function at(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function ut(){this.nextSibling&&this.parentNode.appendChild(this)}function lt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ct(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===P&&e.documentElement.namespaceURI===P?e.createElement(t):e.createElementNS(n,t)}}function ht(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}var ft=function(t){var e=T(t);return(e.local?ht:ct)(e)};function pt(){return null}function dt(){var t=this.parentNode;t&&t.removeChild(this)}function gt(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function yt(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function mt(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,o=e.length;r<o;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?e.length=i:delete this.__on}}}function _t(t,e,n){return function(){var r,i=this.__on,o=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(i)for(var s=0,a=i.length;s<a;++s)if((r=i[s]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=n),void(r.value=e);this.addEventListener(t.type,o,n),r={type:t.type,name:t.name,value:e,listener:o,options:n},i?i.push(r):this.__on=[r]}}function bt(t,e,n){var r=G(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 wt(t,e){return function(){return bt(this,t,e)}}function kt(t,e){return function(){return bt(this,t,e.apply(this,arguments))}}var xt=[null];function Ot(t,e){this._groups=t,this._parents=e}function Mt(){return new Ot([[document.documentElement]],xt)}Ot.prototype=Mt.prototype={constructor:Ot,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 o,s,a=e[i],u=a.length,l=r[i]=new Array(u),c=0;c<u;++c)(o=a[c])&&(s=t.call(o,o.__data__,c,a))&&("__data__"in o&&(s.__data__=o.__data__),l[c]=s);return new Ot(r,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return d(t.apply(this,arguments))}}(t):y(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var s,a=e[o],u=a.length,l=0;l<u;++l)(s=a[l])&&(r.push(t.call(s,s.__data__,l,a)),i.push(s));return new Ot(r,i)},selectChild:function(t){return this.select(null==t?b:function(t){return function(){return _.call(this.children,t)}}("function"==typeof t?t:v(t)))},selectChildren:function(t){return this.selectAll(null==t?k:function(t){return function(){return w.call(this.children,t)}}("function"==typeof t?t:v(t)))},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 o,s=e[i],a=s.length,u=r[i]=[],l=0;l<a;++l)(o=s[l])&&t.call(o,o.__data__,l,s)&&u.push(o);return new Ot(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,S);var n=e?C:E,r=this._parents,i=this._groups;"function"!=typeof t&&(t=M(t));for(var o=i.length,s=new Array(o),a=new Array(o),u=new Array(o),l=0;l<o;++l){var c=r[l],h=i[l],f=h.length,p=N(t.call(c,c&&c.__data__,l,r)),d=p.length,g=a[l]=new Array(d),y=s[l]=new Array(d),m=u[l]=new Array(f);n(c,h,g,y,m,p,e);for(var v,_,b=0,w=0;b<d;++b)if(v=g[b]){for(b>=w&&(w=b+1);!(_=y[w])&&++w<d;);v._next=_||null}}return(s=new Ot(s,r))._enter=a,s._exit=u,s},enter:function(){return new Ot(this._enter||this._groups.map(x),this._parents)},exit:function(){return new Ot(this._exit||this._groups.map(x),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,o=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(i=e(i))&&(i=i.selection()),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,s=Math.min(i,o),a=new Array(i),u=0;u<s;++u)for(var l,c=n[u],h=r[u],f=c.length,p=a[u]=new Array(f),d=0;d<f;++d)(l=c[d]||h[d])&&(p[d]=l);for(;u<i;++u)a[u]=n[u];return new Ot(a,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],o=i.length-1,s=i[o];--o>=0;)(r=i[o])&&(s&&4^r.compareDocumentPosition(s)&&s.parentNode.insertBefore(r,s),s=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=A);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var s,a=n[o],u=a.length,l=i[o]=new Array(u),c=0;c<u;++c)(s=a[c])&&(l[c]=s);l.sort(e)}return new Ot(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var s=r[i];if(s)return s}return null},size:function(){let t=0;for(const e of this)++t;return 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,o=e[n],s=0,a=o.length;s<a;++s)(i=o[s])&&t.call(i,i.__data__,s,o);return this},attr:function(t,e){var n=T(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?L:D:"function"==typeof e?n.local?I:z:n.local?$:R)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?q:"function"==typeof e?B:H)(t,e,null==n?"":n)):W(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Y:"function"==typeof e?X:U)(t,e)):this.node()[t]},classed:function(t,e){var n=F(t+"");if(arguments.length<2){for(var r=Z(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?et:e?J:tt)(n,e))},text:function(t){return arguments.length?this.each(null==t?nt:("function"==typeof t?it:rt)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?ot:("function"==typeof t?at:st)(t)):this.node().innerHTML},raise:function(){return this.each(ut)},lower:function(){return this.each(lt)},append:function(t){var e="function"==typeof t?t:ft(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:ft(t),r=null==e?pt:"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(dt)},clone:function(t){return this.select(t?yt:gt)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=mt(t+""),s=o.length;if(!(arguments.length<2)){for(a=e?_t:vt,r=0;r<s;++r)this.each(a(o[r],e,n));return this}var a=this.node().__on;if(a)for(var u,l=0,c=a.length;l<c;++l)for(r=0,u=a[l];r<s;++r)if((i=o[r]).type===u.type&&i.name===u.name)return u.value},dispatch:function(t,e){return this.each(("function"==typeof e?kt:wt)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,i=t[e],o=0,s=i.length;o<s;++o)(r=i[o])&&(yield r)}};var Et=Mt,Ct=function(t){return"string"==typeof t?new Ot([[document.querySelector(t)]],[document.documentElement]):new Ot([[t]],xt)};const St={passive:!1},Nt={capture:!0,passive:!1};function At(t){t.stopImmediatePropagation()}var Pt=function(t){t.preventDefault(),t.stopImmediatePropagation()},jt=function(t){var e=t.document.documentElement,n=Ct(t).on("dragstart.drag",Pt,Nt);"onselectstart"in e?n.on("selectstart.drag",Pt,Nt):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")};function Tt(t,e){var n=t.document.documentElement,r=Ct(t).on("dragstart.drag",null);e&&(r.on("click.drag",Pt,Nt),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 Lt(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Rt(){}var $t="\\s*([+-]?\\d+)\\s*",zt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",It="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Gt=/^#([0-9a-f]{3,8})$/,qt=new RegExp("^rgb\\("+[$t,$t,$t]+"\\)$"),Ht=new RegExp("^rgb\\("+[It,It,It]+"\\)$"),Bt=new RegExp("^rgba\\("+[$t,$t,$t,zt]+"\\)$"),Wt=new RegExp("^rgba\\("+[It,It,It,zt]+"\\)$"),Yt=new RegExp("^hsl\\("+[zt,It,It]+"\\)$"),Ut=new RegExp("^hsla\\("+[zt,It,It,zt]+"\\)$"),Xt={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 Ft(){return this.rgb().formatHex()}function Zt(){return this.rgb().formatRgb()}function Vt(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Gt.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Kt(e):3===n?new ee(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Qt(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Qt(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 ee(e[1],e[2],e[3],1):(e=Ht.exec(t))?new ee(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Bt.exec(t))?Qt(e[1],e[2],e[3],e[4]):(e=Wt.exec(t))?Qt(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Yt.exec(t))?oe(e[1],e[2]/100,e[3]/100,1):(e=Ut.exec(t))?oe(e[1],e[2]/100,e[3]/100,e[4]):Xt.hasOwnProperty(t)?Kt(Xt[t]):"transparent"===t?new ee(NaN,NaN,NaN,0):null}function Kt(t){return new ee(t>>16&255,t>>8&255,255&t,1)}function Qt(t,e,n,r){return r<=0&&(t=e=n=NaN),new ee(t,e,n,r)}function Jt(t){return t instanceof Rt||(t=Vt(t)),t?new ee((t=t.rgb()).r,t.g,t.b,t.opacity):new ee}function te(t,e,n,r){return 1===arguments.length?Jt(t):new ee(t,e,n,null==r?1:r)}function ee(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function ne(){return"#"+ie(this.r)+ie(this.g)+ie(this.b)}function re(){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 ie(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function oe(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new ae(t,e,n,r)}function se(t){if(t instanceof ae)return new ae(t.h,t.s,t.l,t.opacity);if(t instanceof Rt||(t=Vt(t)),!t)return new ae;if(t instanceof ae)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),s=NaN,a=o-i,u=(o+i)/2;return a?(s=e===o?(n-r)/a+6*(n<r):n===o?(r-e)/a+2:(e-n)/a+4,a/=u<.5?o+i:2-o-i,s*=60):a=u>0&&u<1?0:s,new ae(s,a,u,t.opacity)}function ae(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function ue(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 le(t,e,n,r,i){var o=t*t,s=o*t;return((1-3*t+3*o-s)*e+(4-6*o+3*s)*n+(1+3*t+3*o-3*s)*r+s*i)/6}Dt(Rt,Vt,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Ft,formatHex:Ft,formatHsl:function(){return se(this).formatHsl()},formatRgb:Zt,toString:Zt}),Dt(ee,te,Lt(Rt,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new ee(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new ee(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:ne,formatHex:ne,formatRgb:re,toString:re})),Dt(ae,(function(t,e,n,r){return 1===arguments.length?se(t):new ae(t,e,n,null==r?1:r)}),Lt(Rt,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new ae(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new ae(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 ee(ue(t>=240?t-240:t+120,i,r),ue(t,i,r),ue(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 ce=t=>()=>t;function he(t,e){return function(n){return t+n*e}}function fe(t){return 1==(t=+t)?pe: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):ce(isNaN(e)?n:e)}}function pe(t,e){var n=e-t;return n?he(t,n):ce(isNaN(t)?e:t)}var de=function t(e){var n=fe(e);function r(t,e){var r=n((t=te(t)).r,(e=te(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),s=pe(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=s(e),t+""}}return r.gamma=t,r}(1);function ge(t){return function(e){var n,r,i=e.length,o=new Array(i),s=new Array(i),a=new Array(i);for(n=0;n<i;++n)r=te(e[n]),o[n]=r.r||0,s[n]=r.g||0,a[n]=r.b||0;return o=t(o),s=t(s),a=t(a),r.opacity=1,function(t){return r.r=o(t),r.g=s(t),r.b=a(t),r+""}}}ge((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],o=t[r+1],s=r>0?t[r-1]:2*i-o,a=r<e-1?t[r+2]:2*o-i;return le((n-r/e)*e,s,i,o,a)}})),ge((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],o=t[r%e],s=t[(r+1)%e],a=t[(r+2)%e];return le((n-r/e)*e,i,o,s,a)}}));var ye=function(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}},me=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ve=new RegExp(me.source,"g");var _e,be,we=function(t,e){var n,r,i,o=me.lastIndex=ve.lastIndex=0,s=-1,a=[],u=[];for(t+="",e+="";(n=me.exec(t))&&(r=ve.exec(e));)(i=r.index)>o&&(i=e.slice(o,i),a[s]?a[s]+=i:a[++s]=i),(n=n[0])===(r=r[0])?a[s]?a[s]+=r:a[++s]=r:(a[++s]=null,u.push({i:s,x:ye(n,r)})),o=ve.lastIndex;return o<e.length&&(i=e.slice(o),a[s]?a[s]+=i:a[++s]=i),a.length<2?u[0]?function(t){return function(e){return t(e)+""}}(u[0].x):function(t){return function(){return t}}(e):(e=u.length,function(t){for(var n,r=0;r<e;++r)a[(n=u[r]).i]=n.x(t);return a.join("")})},ke=function(t,e){if(t=function(t){let e;for(;e=t.sourceEvent;)t=e;return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]},xe=0,Oe=0,Me=0,Ee=0,Ce=0,Se=0,Ne="object"==typeof performance&&performance.now?performance:Date,Ae="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Pe(){return Ce||(Ae(je),Ce=Ne.now()+Se)}function je(){Ce=0}function Te(){this._call=this._time=this._next=null}function De(t,e,n){var r=new Te;return r.restart(t,e,n),r}function Le(){Ce=(Ee=Ne.now())+Se,xe=Oe=0;try{!function(){Pe(),++xe;for(var t,e=_e;e;)(t=Ce-e._time)>=0&&e._call.call(void 0,t),e=e._next;--xe}()}finally{xe=0,function(){var t,e,n=_e,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:_e=e);be=t,$e(r)}(),Ce=0}}function Re(){var t=Ne.now(),e=t-Ee;e>1e3&&(Se-=e,Ee=t)}function $e(t){xe||(Oe&&(Oe=clearTimeout(Oe)),t-Ce>24?(t<1/0&&(Oe=setTimeout(Le,t-Ne.now()-Se)),Me&&(Me=clearInterval(Me))):(Me||(Ee=Ne.now(),Me=setInterval(Re,1e3)),xe=1,Ae(Le)))}Te.prototype=De.prototype={constructor:Te,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Pe():+n)+(null==e?0:+e),this._next||be===this||(be?be._next=this:_e=this,be=this),this._call=t,this._time=n,$e()},stop:function(){this._call&&(this._call=null,this._time=1/0,$e())}};var ze=function(t,e,n){var r=new Te;return e=null==e?0:+e,r.restart(n=>{r.stop(),t(n+e)},e,n),r},Ie=h("start","end","cancel","interrupt"),Ge=[],qe=function(t,e,n,r,i,o){var s=t.__transition;if(s){if(n in s)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function o(u){var l,c,h,f;if(1!==n.state)return a();for(l in i)if((f=i[l]).name===n.name){if(3===f.state)return ze(o);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[l]):+l<e&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[l])}if(ze((function(){3===n.state&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(u))})),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),l=0,c=-1;l<h;++l)(f=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(r[++c]=f);r.length=c+1}}function s(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(a),n.state=5,1),o=-1,s=r.length;++o<s;)r[o].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),a())}function a(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=De((function(t){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:Ie,tween:Ge,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})};function He(t,e){var n=We(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function Be(t,e){var n=We(t,e);if(n.state>3)throw new Error("too late; already running");return n}function We(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}var Ye,Ue=function(t,e){var n,r,i,o=t.__transition,s=!0;if(o){for(i in e=null==e?null:e+"",o)(n=o[i]).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 o[i]):s=!1;s&&delete t.__transition}},Xe=180/Math.PI,Fe={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},Ze=function(t,e,n,r,i,o){var s,a,u;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(a=Math.sqrt(n*n+r*r))&&(n/=a,r/=a,u/=a),t*r<e*n&&(t=-t,e=-e,u=-u,s=-s),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*Xe,skewX:Math.atan(u)*Xe,scaleX:s,scaleY:a}};function Ve(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(o,s){var a=[],u=[];return o=t(o),s=t(s),function(t,r,i,o,s,a){if(t!==i||r!==o){var u=s.push("translate(",null,e,null,n);a.push({i:u-4,x:ye(t,i)},{i:u-2,x:ye(r,o)})}else(i||o)&&s.push("translate("+i+e+o+n)}(o.translateX,o.translateY,s.translateX,s.translateY,a,u),function(t,e,n,o){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:ye(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(o.rotate,s.rotate,a,u),function(t,e,n,o){t!==e?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:ye(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(o.skewX,s.skewX,a,u),function(t,e,n,r,o,s){if(t!==n||e!==r){var a=o.push(i(o)+"scale(",null,",",null,")");s.push({i:a-4,x:ye(t,n)},{i:a-2,x:ye(e,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,s.scaleX,s.scaleY,a,u),o=s=null,function(t){for(var e,n=-1,r=u.length;++n<r;)a[(e=u[n]).i]=e.x(t);return a.join("")}}}var Ke=Ve((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Fe:Ze(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),Qe=Ve((function(t){return null==t?Fe:(Ye||(Ye=document.createElementNS("http://www.w3.org/2000/svg","g")),Ye.setAttribute("transform",t),(t=Ye.transform.baseVal.consolidate())?(t=t.matrix,Ze(t.a,t.b,t.c,t.d,t.e,t.f)):Fe)}),", ",")",")");function Je(t,e){var n,r;return function(){var i=Be(this,t),o=i.tween;if(o!==n)for(var s=0,a=(r=n=o).length;s<a;++s)if(r[s].name===e){(r=r.slice()).splice(s,1);break}i.tween=r}}function tn(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=Be(this,t),s=o.tween;if(s!==r){i=(r=s).slice();for(var a={name:e,value:n},u=0,l=i.length;u<l;++u)if(i[u].name===e){i[u]=a;break}u===l&&i.push(a)}o.tween=i}}function en(t,e,n){var r=t._id;return t.each((function(){var t=Be(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return We(t,r).value[e]}}var nn=function(t,e){var n;return("number"==typeof e?ye:e instanceof Vt?de:(n=Vt(e))?(e=n,de):we)(t,e)};function rn(t){return function(){this.removeAttribute(t)}}function on(t){return function(){this.removeAttributeNS(t.space,t.local)}}function sn(t,e,n){var r,i,o=n+"";return function(){var s=this.getAttribute(t);return s===o?null:s===r?i:i=e(r=s,n)}}function an(t,e,n){var r,i,o=n+"";return function(){var s=this.getAttributeNS(t.space,t.local);return s===o?null:s===r?i:i=e(r=s,n)}}function un(t,e,n){var r,i,o;return function(){var s,a,u=n(this);if(null!=u)return(s=this.getAttribute(t))===(a=u+"")?null:s===r&&a===i?o:(i=a,o=e(r=s,u));this.removeAttribute(t)}}function ln(t,e,n){var r,i,o;return function(){var s,a,u=n(this);if(null!=u)return(s=this.getAttributeNS(t.space,t.local))===(a=u+"")?null:s===r&&a===i?o:(i=a,o=e(r=s,u));this.removeAttributeNS(t.space,t.local)}}function cn(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 fn(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&hn(t,i)),n}return i._value=e,i}function pn(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&cn(t,i)),n}return i._value=e,i}function dn(t,e){return function(){He(this,t).delay=+e.apply(this,arguments)}}function gn(t,e){return e=+e,function(){He(this,t).delay=e}}function yn(t,e){return function(){Be(this,t).duration=+e.apply(this,arguments)}}function mn(t,e){return e=+e,function(){Be(this,t).duration=e}}function vn(t,e){if("function"!=typeof e)throw new Error;return function(){Be(this,t).ease=e}}function _n(t,e,n){var r,i,o=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)?He:Be;return function(){var s=o(this,t),a=s.on;a!==r&&(i=(r=a).copy()).on(e,n),s.on=i}}var bn=Et.prototype.constructor;function wn(t){return function(){this.style.removeProperty(t)}}function kn(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function xn(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&kn(t,o,n)),r}return o._value=e,o}function On(t){return function(e){this.textContent=t.call(this,e)}}function Mn(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&On(r)),e}return r._value=t,r}var En=0;function Cn(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Sn(){return++En}var Nn=Et.prototype;Cn.prototype=function(t){return Et().transition(t)}.prototype={constructor:Cn,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=p(t));for(var r=this._groups,i=r.length,o=new Array(i),s=0;s<i;++s)for(var a,u,l=r[s],c=l.length,h=o[s]=new Array(c),f=0;f<c;++f)(a=l[f])&&(u=t.call(a,a.__data__,f,l))&&("__data__"in a&&(u.__data__=a.__data__),h[f]=u,qe(h[f],e,n,f,h,We(a,n)));return new Cn(o,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,o=[],s=[],a=0;a<i;++a)for(var u,l=r[a],c=l.length,h=0;h<c;++h)if(u=l[h]){for(var f,p=t.call(u,u.__data__,h,l),d=We(u,n),g=0,m=p.length;g<m;++g)(f=p[g])&&qe(f,e,n,g,p,d);o.push(p),s.push(u)}return new Cn(o,s,e,n)},selectChild:Nn.selectChild,selectChildren:Nn.selectChildren,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 o,s=e[i],a=s.length,u=r[i]=[],l=0;l<a;++l)(o=s[l])&&t.call(o,o.__data__,l,s)&&u.push(o);return new Cn(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,o=Math.min(r,i),s=new Array(r),a=0;a<o;++a)for(var u,l=e[a],c=n[a],h=l.length,f=s[a]=new Array(h),p=0;p<h;++p)(u=l[p]||c[p])&&(f[p]=u);for(;a<r;++a)s[a]=e[a];return new Cn(s,this._parents,this._name,this._id)},selection:function(){return new bn(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Sn(),r=this._groups,i=r.length,o=0;o<i;++o)for(var s,a=r[o],u=a.length,l=0;l<u;++l)if(s=a[l]){var c=We(s,e);qe(s,t,n,l,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Cn(r,this._parents,t,n)},call:Nn.call,nodes:Nn.nodes,node:Nn.node,size:Nn.size,empty:Nn.empty,each:Nn.each,on:function(t,e){var n=this._id;return arguments.length<2?We(this.node(),n).on.on(t):this.each(_n(n,t,e))},attr:function(t,e){var n=T(t),r="transform"===n?Qe:nn;return this.attrTween(t,"function"==typeof e?(n.local?ln:un)(n,r,en(this,"attr."+t,e)):null==e?(n.local?on:rn)(n):(n.local?an:sn)(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=T(t);return this.tween(n,(r.local?fn:pn)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Ke:nn;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=W(this,t),s=(this.style.removeProperty(t),W(this,t));return o===s?null:o===n&&s===r?i:i=e(n=o,r=s)}}(t,r)).on("end.style."+t,wn(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,o;return function(){var s=W(this,t),a=n(this),u=a+"";return null==a&&(this.style.removeProperty(t),u=a=W(this,t)),s===u?null:s===r&&u===i?o:(i=u,o=e(r=s,a))}}(t,r,en(this,"style."+t,e))).each(function(t,e){var n,r,i,o,s="style."+e,a="end."+s;return function(){var u=Be(this,t),l=u.on,c=null==u.value[s]?o||(o=wn(e)):void 0;l===n&&i===c||(r=(n=l).copy()).on(a,i=c),u.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,o=n+"";return function(){var s=W(this,t);return s===o?null:s===r?i:i=e(r=s,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,xn(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}}(en(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,Mn(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=We(this.node(),n).tween,o=0,s=i.length;o<s;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==e?Je:tn)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?dn:gn)(e,t)):We(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?yn:mn)(e,t)):We(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(vn(e,t)):We(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;Be(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(o,s){var a={value:s},u={value:function(){0==--i&&o()}};n.each((function(){var n=Be(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(a),e._.interrupt.push(a),e._.end.push(u)),n.on=e})),0===i&&o()}))},[Symbol.iterator]:Nn[Symbol.iterator]};var An={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Pn(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}Et.prototype.interrupt=function(t){return this.each((function(){Ue(this,t)}))},Et.prototype.transition=function(t){var e,n;t instanceof Cn?(e=t._id,t=t._name):(e=Sn(),(n=An).time=Pe(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var s,a=r[o],u=a.length,l=0;l<u;++l)(s=a[l])&&qe(s,t,e,l,a,n||Pn(s,e));return new Cn(r,this._parents,t,e)};const{abs:jn,max:Tn,min:Dn}=Math;function Ln(t){return[+t[0],+t[1]]}function Rn(t){return[Ln(t[0]),Ln(t[1])]}["w","e"].map($n),["n","s"].map($n),["n","w","e","s","nw","ne","sw","se"].map($n);function $n(t){return{type:t}}var zn=t=>()=>t;function In(t,{sourceEvent:e,subject:n,target:r,identifier:i,active:o,x:s,y:a,dx:u,dy:l,dispatch:c}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:a,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:c}})}function Gn(t){return!t.ctrlKey&&!t.button}function qn(){return this.parentNode}function Hn(t,e){return null==e?{x:t.x,y:t.y}:e}function Bn(){return navigator.maxTouchPoints||"ontouchstart"in this}In.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var Wn=function(t){return function(){return t}},Yn=function(t){return 1e-6*(t()-.5)};function Un(t){return t.index}function Xn(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function Fn(t){return((t=Math.exp(t))+1/t)/2}var Zn=function t(e,n,r){function i(t,i){var o,s,a=t[0],u=t[1],l=t[2],c=i[0],h=i[1],f=i[2],p=c-a,d=h-u,g=p*p+d*d;if(g<1e-12)s=Math.log(f/l)/e,o=function(t){return[a+t*p,u+t*d,l*Math.exp(e*t*s)]};else{var y=Math.sqrt(g),m=(f*f-l*l+r*g)/(2*l*n*y),v=(f*f-l*l-r*g)/(2*f*n*y),_=Math.log(Math.sqrt(m*m+1)-m),b=Math.log(Math.sqrt(v*v+1)-v);s=(b-_)/e,o=function(t){var r,i=t*s,o=Fn(_),c=l/(n*y)*(o*(r=e*i+_,((r=Math.exp(2*r))-1)/(r+1))-function(t){return((t=Math.exp(t))-1/t)/2}(_));return[a+c*p,u+c*d,l*o/Fn(e*i+_)]}}return o.duration=1e3*s*e/Math.SQRT2,o}return i.rho=function(e){var n=Math.max(.001,+e),r=n*n;return t(n,r,r*r)},i}(Math.SQRT2,2,4),Vn=t=>()=>t;function Kn(t,{sourceEvent:e,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function Qn(t,e,n){this.k=t,this.x=e,this.y=n}Qn.prototype={constructor:Qn,scale:function(t){return 1===t?this:new Qn(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Qn(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Jn=new Qn(1,0,0);function tr(t){t.stopImmediatePropagation()}Qn.prototype;var er=function(t){t.preventDefault(),t.stopImmediatePropagation()};function nr(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function rr(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function ir(){return this.__zoom||Jn}function or(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function sr(){return navigator.maxTouchPoints||"ontouchstart"in this}function ar(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],s=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s))}var ur=function(){var t,e,n,r=nr,i=rr,o=ar,s=or,a=sr,u=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],c=250,f=Zn,p=h("start","zoom","end")