network-stories/docs/static/js/react-force-graph.min.js

6 lines
167 KiB
JavaScript

// Version 1.36.2 react-force-graph - https://github.com/vasturiano/react-force-graph
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],n):n((t=t||self).ForceGraph={},t.React)}(this,(function(t,n){"use strict";var e="default"in n?n.default:n;function r(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){if(!(Symbol.iterator in Object(t))&&"[object Arguments]"!==Object.prototype.toString.call(t))return;var e=[],r=!0,i=!1,o=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done)&&(e.push(a.value),!n||e.length!==n);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return e}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function i(t){return function(t){if(Array.isArray(t)){for(var n=0,e=new Array(t.length);n<t.length;n++)e[n]=t[n];return e}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var o=function(t,n){var e=new Set(n);return Object.assign.apply(Object,[{}].concat(i(Object.entries(t).filter((function(t){var n=r(t,1)[0];return!e.has(n)})).map((function(t){var n=r(t,2);return function(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}({},n[0],n[1])})))))},a=function(t){return[...t].reduce((t,[n,e])=>(t[n]=e,t),{})};function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var e=[],r=!0,i=!1,o=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done)&&(e.push(a.value),!n||e.length!==n);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return e}(t,n)||l(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t){return function(t){if(Array.isArray(t))return f(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||l(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t,n){if(t){if("string"==typeof t)return f(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?f(t,n):void 0}}function f(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}var h="http://www.w3.org/1999/xhtml",p={svg:"http://www.w3.org/2000/svg",xhtml:h,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function d(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),p.hasOwnProperty(n)?{space:p[n],local:t}:t}function y(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===h&&n.documentElement.namespaceURI===h?n.createElement(t):n.createElementNS(e,t)}}function g(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function v(t){var n=d(t);return(n.local?g:y)(n)}function m(){}function _(t){return null==t?m:function(){return this.querySelector(t)}}function b(){return[]}function x(t){return null==t?b:function(){return this.querySelectorAll(t)}}function w(t){return function(){return this.matches(t)}}function k(t){return new Array(t.length)}function z(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}z.prototype={constructor:z,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function A(t,n,e,r,i,o){for(var a,u=0,s=n.length,c=o.length;u<c;++u)(a=n[u])?(a.__data__=o[u],r[u]=a):e[u]=new z(t,o[u]);for(;u<s;++u)(a=n[u])&&(i[u]=a)}function O(t,n,e,r,i,o,a){var u,s,c,l={},f=n.length,h=o.length,p=new Array(f);for(u=0;u<f;++u)(s=n[u])&&(p[u]=c="$"+a.call(s,s.__data__,u,n),c in l?i[u]=s:l[c]=s);for(u=0;u<h;++u)(s=l[c="$"+a.call(t,o[u],u,o)])?(r[u]=s,s.__data__=o[u],l[c]=null):e[u]=new z(t,o[u]);for(u=0;u<f;++u)(s=n[u])&&l[p[u]]===s&&(i[u]=s)}function S(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function M(t){return function(){this.removeAttribute(t)}}function E(t){return function(){this.removeAttributeNS(t.space,t.local)}}function C(t,n){return function(){this.setAttribute(t,n)}}function T(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function j(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function N(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function P(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function R(t){return function(){this.style.removeProperty(t)}}function I(t,n,e){return function(){this.style.setProperty(t,n,e)}}function D(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function U(t,n){return t.style.getPropertyValue(n)||P(t).getComputedStyle(t,null).getPropertyValue(n)}function F(t){return function(){delete this[t]}}function L(t,n){return function(){this[t]=n}}function q(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function B(t){return t.trim().split(/^|\s+/)}function H(t){return t.classList||new V(t)}function V(t){this._node=t,this._names=B(t.getAttribute("class")||"")}function $(t,n){for(var e=H(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function G(t,n){for(var e=H(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function X(t){return function(){$(this,t)}}function Y(t){return function(){G(this,t)}}function W(t,n){return function(){(n.apply(this,arguments)?$:G)(this,t)}}function Z(){this.textContent=""}function Q(t){return function(){this.textContent=t}}function J(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function K(){this.innerHTML=""}function tt(t){return function(){this.innerHTML=t}}function nt(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function et(){this.nextSibling&&this.parentNode.appendChild(this)}function rt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function it(){return null}function ot(){var t=this.parentNode;t&&t.removeChild(this)}function at(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function ut(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):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 n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var st={},ct=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(st={mouseenter:"mouseover",mouseleave:"mouseout"}));function lt(t,n,e){return t=ft(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function ft(t,n,e){return function(r){var i=ct;ct=r;try{t.call(this,this.__data__,n,e)}finally{ct=i}}}function ht(t){return t.trim().split(/^|\s+/).map((function(t){var n="",e=t.indexOf(".");return e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}}))}function pt(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r<o;++r)e=n[r],t.type&&e.type!==t.type||e.name!==t.name?n[++i]=e:this.removeEventListener(e.type,e.listener,e.capture);++i?n.length=i:delete this.__on}}}function dt(t,n,e){var r=st.hasOwnProperty(t.type)?lt:ft;return function(i,o,a){var u,s=this.__on,c=r(n,o,a);if(s)for(var l=0,f=s.length;l<f;++l)if((u=s[l]).type===t.type&&u.name===t.name)return this.removeEventListener(u.type,u.listener,u.capture),this.addEventListener(u.type,u.listener=c,u.capture=e),void(u.value=n);this.addEventListener(t.type,c,e),u={type:t.type,name:t.name,value:n,listener:c,capture:e},s?s.push(u):this.__on=[u]}}function yt(t,n,e,r){var i=ct;t.sourceEvent=ct,ct=t;try{return n.apply(e,r)}finally{ct=i}}function gt(t,n,e){var r=P(t),i=r.CustomEvent;"function"==typeof i?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function vt(t,n){return function(){return gt(this,t,n)}}function mt(t,n){return function(){return gt(this,t,n.apply(this,arguments))}}var _t=[null];function bt(t,n){this._groups=t,this._parents=n}function xt(){return new bt([[document.documentElement]],_t)}function wt(t){return"string"==typeof t?new bt([[document.querySelector(t)]],[document.documentElement]):new bt([[t]],_t)}function kt(){for(var t,n=ct;t=n.sourceEvent;)n=t;return n}function zt(t,n){var e=t.ownerSVGElement||t;if(e.createSVGPoint){var r=e.createSVGPoint();return r.x=n.clientX,r.y=n.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[n.clientX-i.left-t.clientLeft,n.clientY-i.top-t.clientTop]}function At(t){var n=kt();return n.changedTouches&&(n=n.changedTouches[0]),zt(t,n)}function Ot(t,n,e){arguments.length<3&&(e=n,n=kt().changedTouches);for(var r,i=0,o=n?n.length:0;i<o;++i)if((r=n[i]).identifier===e)return zt(t,r);return null}bt.prototype=xt.prototype={constructor:bt,select:function(t){"function"!=typeof t&&(t=_(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,a,u=n[i],s=u.length,c=r[i]=new Array(s),l=0;l<s;++l)(o=u[l])&&(a=t.call(o,o.__data__,l,u))&&("__data__"in o&&(a.__data__=o.__data__),c[l]=a);return new bt(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=x(t));for(var n=this._groups,e=n.length,r=[],i=[],o=0;o<e;++o)for(var a,u=n[o],s=u.length,c=0;c<s;++c)(a=u[c])&&(r.push(t.call(a,a.__data__,c,u)),i.push(a));return new bt(r,i)},filter:function(t){"function"!=typeof t&&(t=w(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,a=n[i],u=a.length,s=r[i]=[],c=0;c<u;++c)(o=a[c])&&t.call(o,o.__data__,c,a)&&s.push(o);return new bt(r,this._parents)},data:function(t,n){if(!t)return p=new Array(this.size()),c=-1,this.each((function(t){p[++c]=t})),p;var e=n?O:A,r=this._parents,i=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var o=i.length,a=new Array(o),u=new Array(o),s=new Array(o),c=0;c<o;++c){var l=r[c],f=i[c],h=f.length,p=t.call(l,l&&l.__data__,c,r),d=p.length,y=u[c]=new Array(d),g=a[c]=new Array(d);e(l,f,y,g,s[c]=new Array(h),p,n);for(var v,m,_=0,b=0;_<d;++_)if(v=y[_]){for(_>=b&&(b=_+1);!(m=g[b])&&++b<d;);v._next=m||null}}return(a=new bt(a,r))._enter=u,a._exit=s,a},enter:function(){return new bt(this._enter||this._groups.map(k),this._parents)},exit:function(){return new bt(this._exit||this._groups.map(k),this._parents)},join:function(t,n,e){var r=this.enter(),i=this,o=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=n&&(i=n(i)),null==e?o.remove():e(o),r&&i?r.merge(i).order():i},merge:function(t){for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),a=new Array(r),u=0;u<o;++u)for(var s,c=n[u],l=e[u],f=c.length,h=a[u]=new Array(f),p=0;p<f;++p)(s=c[p]||l[p])&&(h[p]=s);for(;u<r;++u)a[u]=n[u];return new bt(a,this._parents)},order:function(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r,i=t[n],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=S);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o){for(var a,u=e[o],s=u.length,c=i[o]=new Array(s),l=0;l<s;++l)(a=u[l])&&(c[l]=a);c.sort(n)}return new bt(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),n=-1;return this.each((function(){t[++n]=this})),t},node:function(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length;i<o;++i){var a=r[i];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 n=this._groups,e=0,r=n.length;e<r;++e)for(var i,o=n[e],a=0,u=o.length;a<u;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,n){var e=d(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((null==n?e.local?E:M:"function"==typeof n?e.local?N:j:e.local?T:C)(e,n))},style:function(t,n,e){return arguments.length>1?this.each((null==n?R:"function"==typeof n?D:I)(t,n,null==e?"":e)):U(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?F:"function"==typeof n?q:L)(t,n)):this.node()[t]},classed:function(t,n){var e=B(t+"");if(arguments.length<2){for(var r=H(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each(("function"==typeof n?W:n?X:Y)(e,n))},text:function(t){return arguments.length?this.each(null==t?Z:("function"==typeof t?J:Q)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?K:("function"==typeof t?nt:tt)(t)):this.node().innerHTML},raise:function(){return this.each(et)},lower:function(){return this.each(rt)},append:function(t){var n="function"==typeof t?t:v(t);return this.select((function(){return this.appendChild(n.apply(this,arguments))}))},insert:function(t,n){var e="function"==typeof t?t:v(t),r=null==n?it:"function"==typeof n?n:_(n);return this.select((function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(ot)},clone:function(t){return this.select(t?ut:at)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,n,e){var r,i,o=ht(t+""),a=o.length;if(!(arguments.length<2)){for(u=n?dt:pt,null==e&&(e=!1),r=0;r<a;++r)this.each(u(o[r],n,e));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((i=o[r]).type===s.type&&i.name===s.name)return s.value},dispatch:function(t,n){return this.each(("function"==typeof n?mt:vt)(t,n))}};var St={value:function(){}};function Mt(){for(var t,n=0,e=arguments.length,r={};n<e;++n){if(!(t=arguments[n]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new Et(r)}function Et(t){this._=t}function Ct(t,n){return t.trim().split(/^|\s+/).map((function(t){var e="",r=t.indexOf(".");if(r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))}function Tt(t,n){for(var e,r=0,i=t.length;r<i;++r)if((e=t[r]).name===n)return e.value}function jt(t,n,e){for(var r=0,i=t.length;r<i;++r)if(t[r].name===n){t[r]=St,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=e&&t.push({name:n,value:e}),t}function Nt(){ct.stopImmediatePropagation()}function Pt(){ct.preventDefault(),ct.stopImmediatePropagation()}function Rt(t){var n=t.document.documentElement,e=wt(t).on("dragstart.drag",Pt,!0);"onselectstart"in n?e.on("selectstart.drag",Pt,!0):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}function It(t,n){var e=t.document.documentElement,r=wt(t).on("dragstart.drag",null);n&&(r.on("click.drag",Pt,!0),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in e?r.on("selectstart.drag",null):(e.style.MozUserSelect=e.__noselect,delete e.__noselect)}function Dt(t){return function(){return t}}function Ut(t,n,e,r,i,o,a,u,s,c){this.target=t,this.type=n,this.subject=e,this.identifier=r,this.active=i,this.x=o,this.y=a,this.dx=u,this.dy=s,this._=c}function Ft(){return!ct.ctrlKey&&!ct.button}function Lt(){return this.parentNode}function qt(t){return null==t?{x:ct.x,y:ct.y}:t}function Bt(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ht(t,n,e){t.prototype=n.prototype=e,e.constructor=t}function Vt(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function $t(){}Et.prototype=Mt.prototype={constructor:Et,on:function(t,n){var e,r=this._,i=Ct(t+"",r),o=-1,a=i.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++o<a;)if(e=(t=i[o]).type)r[e]=jt(r[e],t.name,n);else if(null==n)for(e in r)r[e]=jt(r[e],t.name,null);return this}for(;++o<a;)if((e=(t=i[o]).type)&&(e=Tt(r[e],t.name)))return e},copy:function(){var t={},n=this._;for(var e in n)t[e]=n[e].slice();return new Et(t)},call:function(t,n){if((e=arguments.length-2)>0)for(var e,r,i=new Array(e),o=0;o<e;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,e=(r=this._[t]).length;o<e;++o)r[o].value.apply(n,i)},apply:function(t,n,e){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(n,e)}},Ut.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var Gt="\\s*([+-]?\\d+)\\s*",Xt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Yt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Wt=/^#([0-9a-f]{3,8})$/,Zt=new RegExp("^rgb\\("+[Gt,Gt,Gt]+"\\)$"),Qt=new RegExp("^rgb\\("+[Yt,Yt,Yt]+"\\)$"),Jt=new RegExp("^rgba\\("+[Gt,Gt,Gt,Xt]+"\\)$"),Kt=new RegExp("^rgba\\("+[Yt,Yt,Yt,Xt]+"\\)$"),tn=new RegExp("^hsl\\("+[Xt,Yt,Yt]+"\\)$"),nn=new RegExp("^hsla\\("+[Xt,Yt,Yt,Xt]+"\\)$"),en={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 rn(){return this.rgb().formatHex()}function on(){return this.rgb().formatRgb()}function an(t){var n,e;return t=(t+"").trim().toLowerCase(),(n=Wt.exec(t))?(e=n[1].length,n=parseInt(n[1],16),6===e?un(n):3===e?new fn(n>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?sn(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?sn(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=Zt.exec(t))?new fn(n[1],n[2],n[3],1):(n=Qt.exec(t))?new fn(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=Jt.exec(t))?sn(n[1],n[2],n[3],n[4]):(n=Kt.exec(t))?sn(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=tn.exec(t))?yn(n[1],n[2]/100,n[3]/100,1):(n=nn.exec(t))?yn(n[1],n[2]/100,n[3]/100,n[4]):en.hasOwnProperty(t)?un(en[t]):"transparent"===t?new fn(NaN,NaN,NaN,0):null}function un(t){return new fn(t>>16&255,t>>8&255,255&t,1)}function sn(t,n,e,r){return r<=0&&(t=n=e=NaN),new fn(t,n,e,r)}function cn(t){return t instanceof $t||(t=an(t)),t?new fn((t=t.rgb()).r,t.g,t.b,t.opacity):new fn}function ln(t,n,e,r){return 1===arguments.length?cn(t):new fn(t,n,e,null==r?1:r)}function fn(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function hn(){return"#"+dn(this.r)+dn(this.g)+dn(this.b)}function pn(){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 dn(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function yn(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new vn(t,n,e,r)}function gn(t){if(t instanceof vn)return new vn(t.h,t.s,t.l,t.opacity);if(t instanceof $t||(t=an(t)),!t)return new vn;if(t instanceof vn)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),o=Math.max(n,e,r),a=NaN,u=o-i,s=(o+i)/2;return u?(a=n===o?(e-r)/u+6*(e<r):e===o?(r-n)/u+2:(n-e)/u+4,u/=s<.5?o+i:2-o-i,a*=60):u=s>0&&s<1?0:a,new vn(a,u,s,t.opacity)}function vn(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function mn(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}function _n(t){return function(){return t}}function bn(t){return 1==(t=+t)?xn:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}(n,e,t):_n(isNaN(n)?e:n)}}function xn(t,n){var e=n-t;return e?function(t,n){return function(e){return t+e*n}}(t,e):_n(isNaN(t)?n:t)}Ht($t,an,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:rn,formatHex:rn,formatHsl:function(){return gn(this).formatHsl()},formatRgb:on,toString:on}),Ht(fn,ln,Vt($t,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new fn(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new fn(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:hn,formatHex:hn,formatRgb:pn,toString:pn})),Ht(vn,(function(t,n,e,r){return 1===arguments.length?gn(t):new vn(t,n,e,null==r?1:r)}),Vt($t,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new vn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new vn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new fn(mn(t>=240?t-240:t+120,i,r),mn(t,i,r),mn(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 wn=function t(n){var e=bn(n);function r(t,n){var r=e((t=ln(t)).r,(n=ln(n)).r),i=e(t.g,n.g),o=e(t.b,n.b),a=xn(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=i(n),t.b=o(n),t.opacity=a(n),t+""}}return r.gamma=t,r}(1);function kn(t,n){return t=+t,n=+n,function(e){return t*(1-e)+n*e}}var zn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,An=new RegExp(zn.source,"g");function On(t,n){var e,r,i,o=zn.lastIndex=An.lastIndex=0,a=-1,u=[],s=[];for(t+="",n+="";(e=zn.exec(t))&&(r=An.exec(n));)(i=r.index)>o&&(i=n.slice(o,i),u[a]?u[a]+=i:u[++a]=i),(e=e[0])===(r=r[0])?u[a]?u[a]+=r:u[++a]=r:(u[++a]=null,s.push({i:a,x:kn(e,r)})),o=An.lastIndex;return o<n.length&&(i=n.slice(o),u[a]?u[a]+=i:u[++a]=i),u.length<2?s[0]?function(t){return function(n){return t(n)+""}}(s[0].x):function(t){return function(){return t}}(n):(n=s.length,function(t){for(var e,r=0;r<n;++r)u[(e=s[r]).i]=e.x(t);return u.join("")})}var Sn,Mn,En,Cn,Tn=180/Math.PI,jn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Nn(t,n,e,r,i,o){var a,u,s;return(a=Math.sqrt(t*t+n*n))&&(t/=a,n/=a),(s=t*e+n*r)&&(e-=t*s,r-=n*s),(u=Math.sqrt(e*e+r*r))&&(e/=u,r/=u,s/=u),t*r<n*e&&(t=-t,n=-n,s=-s,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(n,t)*Tn,skewX:Math.atan(s)*Tn,scaleX:a,scaleY:u}}function Pn(t,n,e,r){function i(t){return t.length?t.pop()+" ":""}return function(o,a){var u=[],s=[];return o=t(o),a=t(a),function(t,r,i,o,a,u){if(t!==i||r!==o){var s=a.push("translate(",null,n,null,e);u.push({i:s-4,x:kn(t,i)},{i:s-2,x:kn(r,o)})}else(i||o)&&a.push("translate("+i+n+o+e)}(o.translateX,o.translateY,a.translateX,a.translateY,u,s),function(t,n,e,o){t!==n?(t-n>180?n+=360:n-t>180&&(t+=360),o.push({i:e.push(i(e)+"rotate(",null,r)-2,x:kn(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}(o.rotate,a.rotate,u,s),function(t,n,e,o){t!==n?o.push({i:e.push(i(e)+"skewX(",null,r)-2,x:kn(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}(o.skewX,a.skewX,u,s),function(t,n,e,r,o,a){if(t!==e||n!==r){var u=o.push(i(o)+"scale(",null,",",null,")");a.push({i:u-4,x:kn(t,e)},{i:u-2,x:kn(n,r)})}else 1===e&&1===r||o.push(i(o)+"scale("+e+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,u,s),o=a=null,function(t){for(var n,e=-1,r=s.length;++e<r;)u[(n=s[e]).i]=n.x(t);return u.join("")}}}var Rn=Pn((function(t){return"none"===t?jn:(Sn||(Sn=document.createElement("DIV"),Mn=document.documentElement,En=document.defaultView),Sn.style.transform=t,t=En.getComputedStyle(Mn.appendChild(Sn),null).getPropertyValue("transform"),Mn.removeChild(Sn),Nn(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),In=Pn((function(t){return null==t?jn:(Cn||(Cn=document.createElementNS("http://www.w3.org/2000/svg","g")),Cn.setAttribute("transform",t),(t=Cn.transform.baseVal.consolidate())?Nn((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):jn)}),", ",")",")"),Dn=Math.SQRT2;function Un(t){return((t=Math.exp(t))+1/t)/2}function Fn(t,n){var e,r,i=t[0],o=t[1],a=t[2],u=n[0],s=n[1],c=n[2],l=u-i,f=s-o,h=l*l+f*f;if(h<1e-12)r=Math.log(c/a)/Dn,e=function(t){return[i+t*l,o+t*f,a*Math.exp(Dn*t*r)]};else{var p=Math.sqrt(h),d=(c*c-a*a+4*h)/(2*a*2*p),y=(c*c-a*a-4*h)/(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)/Dn,e=function(t){var n=t*r,e=Un(g),u=a/(2*p)*(e*function(t){return((t=Math.exp(2*t))-1)/(t+1)}(Dn*n+g)-function(t){return((t=Math.exp(t))-1/t)/2}(g));return[i+u*l,o+u*f,a*e/Un(Dn*n+g)]}}return e.duration=1e3*r,e}var Ln,qn,Bn=0,Hn=0,Vn=0,$n=0,Gn=0,Xn=0,Yn="object"==typeof performance&&performance.now?performance:Date,Wn="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Zn(){return Gn||(Wn(Qn),Gn=Yn.now()+Xn)}function Qn(){Gn=0}function Jn(){this._call=this._time=this._next=null}function Kn(t,n,e){var r=new Jn;return r.restart(t,n,e),r}function te(){Gn=($n=Yn.now())+Xn,Bn=Hn=0;try{!function(){Zn(),++Bn;for(var t,n=Ln;n;)(t=Gn-n._time)>=0&&n._call.call(null,t),n=n._next;--Bn}()}finally{Bn=0,function(){var t,n,e=Ln,r=1/0;for(;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Ln=n);qn=t,ee(r)}(),Gn=0}}function ne(){var t=Yn.now(),n=t-$n;n>1e3&&(Xn-=n,$n=t)}function ee(t){Bn||(Hn&&(Hn=clearTimeout(Hn)),t-Gn>24?(t<1/0&&(Hn=setTimeout(te,t-Yn.now()-Xn)),Vn&&(Vn=clearInterval(Vn))):(Vn||($n=Yn.now(),Vn=setInterval(ne,1e3)),Bn=1,Wn(te)))}function re(t,n,e){var r=new Jn;return n=null==n?0:+n,r.restart((function(e){r.stop(),t(e+n)}),n,e),r}Jn.prototype=Kn.prototype={constructor:Jn,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?Zn():+e)+(null==n?0:+n),this._next||qn===this||(qn?qn._next=this:Ln=this,qn=this),this._call=t,this._time=e,ee()},stop:function(){this._call&&(this._call=null,this._time=1/0,ee())}};var ie=Mt("start","end","cancel","interrupt"),oe=[];function ae(t,n,e,r,i,o){var a=t.__transition;if(a){if(e in a)return}else t.__transition={};!function(t,n,e){var r,i=t.__transition;function o(s){var c,l,f,h;if(1!==e.state)return u();for(c in i)if((h=i[c]).name===e.name){if(3===h.state)return re(o);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[c]):+c<n&&(h.state=6,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete i[c])}if(re((function(){3===e.state&&(e.state=4,e.timer.restart(a,e.delay,e.time),a(s))})),e.state=2,e.on.call("start",t,t.__data__,e.index,e.group),2===e.state){for(e.state=3,r=new Array(f=e.tween.length),c=0,l=-1;c<f;++c)(h=e.tween[c].value.call(t,t.__data__,e.index,e.group))&&(r[++l]=h);r.length=l+1}}function a(n){for(var i=n<e.duration?e.ease.call(null,n/e.duration):(e.timer.restart(u),e.state=5,1),o=-1,a=r.length;++o<a;)r[o].call(t,i);5===e.state&&(e.on.call("end",t,t.__data__,e.index,e.group),u())}function u(){for(var r in e.state=6,e.timer.stop(),delete i[n],i)return;delete t.__transition}i[n]=e,e.timer=Kn((function(t){e.state=1,e.timer.restart(o,e.delay,e.time),e.delay<=t&&o(t-e.delay)}),0,e.time)}(t,e,{name:n,index:r,group:i,on:ie,tween:oe,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function ue(t,n){var e=ce(t,n);if(e.state>0)throw new Error("too late; already scheduled");return e}function se(t,n){var e=ce(t,n);if(e.state>3)throw new Error("too late; already running");return e}function ce(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}function le(t,n){var e,r,i,o=t.__transition,a=!0;if(o){for(i in n=null==n?null:n+"",o)(e=o[i]).name===n?(r=e.state>2&&e.state<5,e.state=6,e.timer.stop(),e.on.call(r?"interrupt":"cancel",t,t.__data__,e.index,e.group),delete o[i]):a=!1;a&&delete t.__transition}}function fe(t,n){var e,r;return function(){var i=se(this,t),o=i.tween;if(o!==e)for(var a=0,u=(r=e=o).length;a<u;++a)if(r[a].name===n){(r=r.slice()).splice(a,1);break}i.tween=r}}function he(t,n,e){var r,i;if("function"!=typeof e)throw new Error;return function(){var o=se(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var u={name:n,value:e},s=0,c=i.length;s<c;++s)if(i[s].name===n){i[s]=u;break}s===c&&i.push(u)}o.tween=i}}function pe(t,n,e){var r=t._id;return t.each((function(){var t=se(this,r);(t.value||(t.value={}))[n]=e.apply(this,arguments)})),function(t){return ce(t,r).value[n]}}function de(t,n){var e;return("number"==typeof n?kn:n instanceof an?wn:(e=an(n))?(n=e,wn):On)(t,n)}function ye(t){return function(){this.removeAttribute(t)}}function ge(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ve(t,n,e){var r,i,o=e+"";return function(){var a=this.getAttribute(t);return a===o?null:a===r?i:i=n(r=a,e)}}function me(t,n,e){var r,i,o=e+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===r?i:i=n(r=a,e)}}function _e(t,n,e){var r,i,o;return function(){var a,u,s=e(this);if(null!=s)return(a=this.getAttribute(t))===(u=s+"")?null:a===r&&u===i?o:(i=u,o=n(r=a,s));this.removeAttribute(t)}}function be(t,n,e){var r,i,o;return function(){var a,u,s=e(this);if(null!=s)return(a=this.getAttributeNS(t.space,t.local))===(u=s+"")?null:a===r&&u===i?o:(i=u,o=n(r=a,s));this.removeAttributeNS(t.space,t.local)}}function xe(t,n){return function(e){this.setAttribute(t,n.call(this,e))}}function we(t,n){return function(e){this.setAttributeNS(t.space,t.local,n.call(this,e))}}function ke(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&we(t,i)),e}return i._value=n,i}function ze(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&xe(t,i)),e}return i._value=n,i}function Ae(t,n){return function(){ue(this,t).delay=+n.apply(this,arguments)}}function Oe(t,n){return n=+n,function(){ue(this,t).delay=n}}function Se(t,n){return function(){se(this,t).duration=+n.apply(this,arguments)}}function Me(t,n){return n=+n,function(){se(this,t).duration=n}}function Ee(t,n){if("function"!=typeof n)throw new Error;return function(){se(this,t).ease=n}}function Ce(t,n,e){var r,i,o=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||"start"===t}))}(n)?ue:se;return function(){var a=o(this,t),u=a.on;u!==r&&(i=(r=u).copy()).on(n,e),a.on=i}}var Te=xt.prototype.constructor;function je(t){return function(){this.style.removeProperty(t)}}function Ne(t,n,e){return function(r){this.style.setProperty(t,n.call(this,r),e)}}function Pe(t,n,e){var r,i;function o(){var o=n.apply(this,arguments);return o!==i&&(r=(i=o)&&Ne(t,o,e)),r}return o._value=n,o}function Re(t){return function(n){this.textContent=t.call(this,n)}}function Ie(t){var n,e;function r(){var r=t.apply(this,arguments);return r!==e&&(n=(e=r)&&Re(r)),n}return r._value=t,r}var De=0;function Ue(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function Fe(){return++De}var Le=xt.prototype;Ue.prototype=function(t){return xt().transition(t)}.prototype={constructor:Ue,select:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=_(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var u,s,c=r[a],l=c.length,f=o[a]=new Array(l),h=0;h<l;++h)(u=c[h])&&(s=t.call(u,u.__data__,h,c))&&("__data__"in u&&(s.__data__=u.__data__),f[h]=s,ae(f[h],n,e,h,f,ce(u,e)));return new Ue(o,this._parents,n,e)},selectAll:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=x(t));for(var r=this._groups,i=r.length,o=[],a=[],u=0;u<i;++u)for(var s,c=r[u],l=c.length,f=0;f<l;++f)if(s=c[f]){for(var h,p=t.call(s,s.__data__,f,c),d=ce(s,e),y=0,g=p.length;y<g;++y)(h=p[y])&&ae(h,n,e,y,p,d);o.push(p),a.push(s)}return new Ue(o,a,n,e)},filter:function(t){"function"!=typeof t&&(t=w(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,a=n[i],u=a.length,s=r[i]=[],c=0;c<u;++c)(o=a[c])&&t.call(o,o.__data__,c,a)&&s.push(o);return new Ue(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),a=new Array(r),u=0;u<o;++u)for(var s,c=n[u],l=e[u],f=c.length,h=a[u]=new Array(f),p=0;p<f;++p)(s=c[p]||l[p])&&(h[p]=s);for(;u<r;++u)a[u]=n[u];return new Ue(a,this._parents,this._name,this._id)},selection:function(){return new Te(this._groups,this._parents)},transition:function(){for(var t=this._name,n=this._id,e=Fe(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,u=r[o],s=u.length,c=0;c<s;++c)if(a=u[c]){var l=ce(a,n);ae(a,t,e,c,u,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new Ue(r,this._parents,t,e)},call:Le.call,nodes:Le.nodes,node:Le.node,size:Le.size,empty:Le.empty,each:Le.each,on:function(t,n){var e=this._id;return arguments.length<2?ce(this.node(),e).on.on(t):this.each(Ce(e,t,n))},attr:function(t,n){var e=d(t),r="transform"===e?In:de;return this.attrTween(t,"function"==typeof n?(e.local?be:_e)(e,r,pe(this,"attr."+t,n)):null==n?(e.local?ge:ye)(e):(e.local?me:ve)(e,r,n))},attrTween:function(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if("function"!=typeof n)throw new Error;var r=d(t);return this.tween(e,(r.local?ke:ze)(r,n))},style:function(t,n,e){var r="transform"==(t+="")?Rn:de;return null==n?this.styleTween(t,function(t,n){var e,r,i;return function(){var o=U(this,t),a=(this.style.removeProperty(t),U(this,t));return o===a?null:o===e&&a===r?i:i=n(e=o,r=a)}}(t,r)).on("end.style."+t,je(t)):"function"==typeof n?this.styleTween(t,function(t,n,e){var r,i,o;return function(){var a=U(this,t),u=e(this),s=u+"";return null==u&&(this.style.removeProperty(t),s=u=U(this,t)),a===s?null:a===r&&s===i?o:(i=s,o=n(r=a,u))}}(t,r,pe(this,"style."+t,n))).each(function(t,n){var e,r,i,o,a="style."+n,u="end."+a;return function(){var s=se(this,t),c=s.on,l=null==s.value[a]?o||(o=je(n)):void 0;c===e&&i===l||(r=(e=c).copy()).on(u,i=l),s.on=r}}(this._id,t)):this.styleTween(t,function(t,n,e){var r,i,o=e+"";return function(){var a=U(this,t);return a===o?null:a===r?i:i=n(r=a,e)}}(t,r,n),e).on("end.style."+t,null)},styleTween:function(t,n,e){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==n)return this.tween(r,null);if("function"!=typeof n)throw new Error;return this.tween(r,Pe(t,n,null==e?"":e))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var n=t(this);this.textContent=null==n?"":n}}(pe(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;return this.tween(n,Ie(t))},remove:function(){return this.on("end.remove",function(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}(this._id))},tween:function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=ce(this.node(),e).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==n?fe:he)(e,t,n))},delay:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?Ae:Oe)(n,t)):ce(this.node(),n).delay},duration:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?Se:Me)(n,t)):ce(this.node(),n).duration},ease:function(t){var n=this._id;return arguments.length?this.each(Ee(n,t)):ce(this.node(),n).ease},end:function(){var t,n,e=this,r=e._id,i=e.size();return new Promise((function(o,a){var u={value:a},s={value:function(){0==--i&&o()}};e.each((function(){var e=se(this,r),i=e.on;i!==t&&((n=(t=i).copy())._.cancel.push(u),n._.interrupt.push(u),n._.end.push(s)),e.on=n}))}))}};var qe={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Be(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))return qe.time=Zn(),qe;return e}function He(t){return function(){return t}}function Ve(t,n,e){this.target=t,this.type=n,this.transform=e}function $e(t,n,e){this.k=t,this.x=n,this.y=e}xt.prototype.interrupt=function(t){return this.each((function(){le(this,t)}))},xt.prototype.transition=function(t){var n,e;t instanceof Ue?(n=t._id,t=t._name):(n=Fe(),(e=qe).time=Zn(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,u=r[o],s=u.length,c=0;c<s;++c)(a=u[c])&&ae(a,t,n,c,u,e||Be(a,n));return new Ue(r,this._parents,t,n)},$e.prototype={constructor:$e,scale:function(t){return 1===t?this:new $e(this.k*t,this.x,this.y)},translate:function(t,n){return 0===t&0===n?this:new $e(this.k,this.x+this.k*t,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Ge=new $e(1,0,0);function Xe(t){for(;!t.__zoom;)if(!(t=t.parentNode))return Ge;return t.__zoom}function Ye(){ct.stopImmediatePropagation()}function We(){ct.preventDefault(),ct.stopImmediatePropagation()}function Ze(){return!ct.ctrlKey&&!ct.button}function Qe(){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 Je(){return this.__zoom||Ge}function Ke(){return-ct.deltaY*(1===ct.deltaMode?.05:ct.deltaMode?1:.002)}function tr(){return navigator.maxTouchPoints||"ontouchstart"in this}function nr(t,n,e){var r=t.invertX(n[0][0])-e[0][0],i=t.invertX(n[1][0])-e[1][0],o=t.invertY(n[0][1])-e[0][1],a=t.invertY(n[1][1])-e[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function er(t,n){let e;if(void 0===n)for(const n of t)null!=n&&(e<n||void 0===e&&n>=n)&&(e=n);else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&(e<i||void 0===e&&i>=i)&&(e=i)}return e}function rr(t,n){let e;if(void 0===n)for(const n of t)null!=n&&(e>n||void 0===e&&n>=n)&&(e=n);else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&(e>i||void 0===e&&i>=i)&&(e=i)}return e}Xe.prototype=$e.prototype;var ir="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function or(t,n,e){return t(e={path:n,exports:{},require:function(t,n){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==n&&e.path)}},e.exports),e.exports}var ar=/^\s+|\s+$/g,ur=/^[-+]0x[0-9a-f]+$/i,sr=/^0b[01]+$/i,cr=/^0o[0-7]+$/i,lr=parseInt,fr="object"==typeof ir&&ir&&ir.Object===Object&&ir,hr="object"==typeof self&&self&&self.Object===Object&&self,pr=fr||hr||Function("return this")(),dr=Object.prototype.toString,yr=Math.max,gr=Math.min,vr=function(){return pr.Date.now()};function mr(t,n,e){var r,i,o,a,u,s,c=0,l=!1,f=!1,h=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function p(n){var e=r,o=i;return r=i=void 0,c=n,a=t.apply(o,e)}function d(t){return c=t,u=setTimeout(g,n),l?p(t):a}function y(t){var e=t-s;return void 0===s||e>=n||e<0||f&&t-c>=o}function g(){var t=vr();if(y(t))return v(t);u=setTimeout(g,function(t){var e=n-(t-s);return f?gr(e,o-(t-c)):e}(t))}function v(t){return u=void 0,h&&r?p(t):(r=i=void 0,a)}function m(){var t=vr(),e=y(t);if(r=arguments,i=this,s=t,e){if(void 0===u)return d(s);if(f)return u=setTimeout(g,n),p(s)}return void 0===u&&(u=setTimeout(g,n)),a}return n=br(n)||0,_r(e)&&(l=!!e.leading,o=(f="maxWait"in e)?yr(br(e.maxWait)||0,n):o,h="trailing"in e?!!e.trailing:h),m.cancel=function(){void 0!==u&&clearTimeout(u),c=0,r=s=i=u=void 0},m.flush=function(){return void 0===u?a:v(vr())},m}function _r(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function br(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==dr.call(t)}(t))return NaN;if(_r(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=_r(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(ar,"");var e=sr.test(t);return e||cr.test(t)?lr(t.slice(2),e?2:8):ur.test(t)?NaN:+t}var xr,wr,kr=function(t,n,e){var r=!0,i=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return _r(e)&&(r="leading"in e?!!e.leading:r,i="trailing"in e?!!e.trailing:i),mr(t,n,{leading:r,maxWait:n,trailing:i})},zr="undefined"==typeof self&&"undefined"!=typeof process&&process.hrtime?function(){var t=process.hrtime();return 1e3*t[0]+t[1]/1e6}:"undefined"!=typeof self&&void 0!==self.performance&&void 0!==self.performance.now?self.performance.now.bind(self.performance):void 0!==Date.now?Date.now:function(){return(new Date).getTime()},Ar=function(){function t(){this._tweens={},this._tweensAddedDuringUpdate={}}return t.prototype.getAll=function(){var t=this;return Object.keys(this._tweens).map((function(n){return t._tweens[n]}))},t.prototype.removeAll=function(){this._tweens={}},t.prototype.add=function(t){this._tweens[t.getId()]=t,this._tweensAddedDuringUpdate[t.getId()]=t},t.prototype.remove=function(t){delete this._tweens[t.getId()],delete this._tweensAddedDuringUpdate[t.getId()]},t.prototype.update=function(t,n){var e=Object.keys(this._tweens);if(0===e.length)return!1;for(t=void 0!==t?t:zr();e.length>0;){this._tweensAddedDuringUpdate={};for(var r=0;r<e.length;r++){var i=this._tweens[e[r]];i&&!1===i.update(t)&&!n&&delete this._tweens[e[r]]}e=Object.keys(this._tweensAddedDuringUpdate)}return!0},t}(),Or={Linear:{None:function(t){return t}},Quadratic:{In:function(t){return t*t},Out:function(t){return t*(2-t)},InOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},Cubic:{In:function(t){return t*t*t},Out:function(t){return--t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},Quartic:{In:function(t){return t*t*t*t},Out:function(t){return 1- --t*t*t*t},InOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},Quintic:{In:function(t){return t*t*t*t*t},Out:function(t){return--t*t*t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},Sinusoidal:{In:function(t){return 1-Math.cos(t*Math.PI/2)},Out:function(t){return Math.sin(t*Math.PI/2)},InOut:function(t){return.5*(1-Math.cos(Math.PI*t))}},Exponential:{In:function(t){return 0===t?0:Math.pow(1024,t-1)},Out:function(t){return 1===t?1:1-Math.pow(2,-10*t)},InOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))}},Circular:{In:function(t){return 1-Math.sqrt(1-t*t)},Out:function(t){return Math.sqrt(1- --t*t)},InOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},Elastic:{In:function(t){return 0===t?0:1===t?1:-Math.pow(2,10*(t-1))*Math.sin(5*(t-1.1)*Math.PI)},Out:function(t){return 0===t?0:1===t?1:Math.pow(2,-10*t)*Math.sin(5*(t-.1)*Math.PI)+1},InOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?-.5*Math.pow(2,10*(t-1))*Math.sin(5*(t-1.1)*Math.PI):.5*Math.pow(2,-10*(t-1))*Math.sin(5*(t-1.1)*Math.PI)+1}},Back:{In:function(t){var n=1.70158;return t*t*((n+1)*t-n)},Out:function(t){var n=1.70158;return--t*t*((n+1)*t+n)+1},InOut:function(t){var n=2.5949095;return(t*=2)<1?t*t*((n+1)*t-n)*.5:.5*((t-=2)*t*((n+1)*t+n)+2)}},Bounce:{In:function(t){return 1-Or.Bounce.Out(1-t)},Out:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},InOut:function(t){return t<.5?.5*Or.Bounce.In(2*t):.5*Or.Bounce.Out(2*t-1)+.5}}},Sr={Linear:function(t,n){var e=t.length-1,r=e*n,i=Math.floor(r),o=Sr.Utils.Linear;return n<0?o(t[0],t[1],r):n>1?o(t[e],t[e-1],e-r):o(t[i],t[i+1>e?e:i+1],r-i)},Bezier:function(t,n){for(var e=0,r=t.length-1,i=Math.pow,o=Sr.Utils.Bernstein,a=0;a<=r;a++)e+=i(1-n,r-a)*i(n,a)*t[a]*o(r,a);return e},CatmullRom:function(t,n){var e=t.length-1,r=e*n,i=Math.floor(r),o=Sr.Utils.CatmullRom;return t[0]===t[e]?(n<0&&(i=Math.floor(r=e*(1+n))),o(t[(i-1+e)%e],t[i],t[(i+1)%e],t[(i+2)%e],r-i)):n<0?t[0]-(o(t[0],t[0],t[1],t[1],-r)-t[0]):n>1?t[e]-(o(t[e],t[e],t[e-1],t[e-1],r-e)-t[e]):o(t[i?i-1:0],t[i],t[e<i+1?e:i+1],t[e<i+2?e:i+2],r-i)},Utils:{Linear:function(t,n,e){return(n-t)*e+t},Bernstein:function(t,n){var e=Sr.Utils.Factorial;return e(t)/e(n)/e(t-n)},Factorial:(xr=[1],function(t){var n=1;if(xr[t])return xr[t];for(var e=t;e>1;e--)n*=e;return xr[t]=n,n}),CatmullRom:function(t,n,e,r,i){var o=.5*(e-t),a=.5*(r-n),u=i*i;return(2*n-2*e+o+a)*(i*u)+(-3*n+3*e-2*o-a)*u+o*i+n}}},Mr=function(){function t(){}return t.nextId=function(){return t._nextId++},t._nextId=0,t}(),Er=function(){function t(t,n){void 0===n&&(n=Tr),this._object=t,this._group=n,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=Tr.Easing.Linear.None,this._interpolationFunction=Tr.Interpolation.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._id=Tr.nextId(),this._isChainStopped=!1}return t.prototype.getId=function(){return this._id},t.prototype.isPlaying=function(){return this._isPlaying},t.prototype.isPaused=function(){return this._isPaused},t.prototype.to=function(t,n){for(var e in t)this._valuesEnd[e]=t[e];return void 0!==n&&(this._duration=n),this},t.prototype.duration=function(t){return this._duration=t,this},t.prototype.start=function(t){if(this._isPlaying)return this;if(this._group.add(this),this._repeat=this._initialRepeat,this._reversed)for(var n in this._reversed=!1,this._valuesStartRepeat)this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n];return this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=void 0!==t?"string"==typeof t?Tr.now()+parseFloat(t):t:Tr.now(),this._startTime+=this._delayTime,this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat),this},t.prototype._setupProperties=function(t,n,e,r){for(var i in e){var o=t[i],a=Array.isArray(o),u=a?"array":typeof o,s=!a&&Array.isArray(e[i]);if("undefined"!==u&&"function"!==u){if(s){var c=e[i];if(0===c.length)continue;c=c.map(this._handleRelativeValue.bind(this,o)),e[i]=[o].concat(c)}if("object"!==u&&!a||!o||s)void 0===n[i]&&(n[i]=o),a||(n[i]*=1),r[i]=s?e[i].slice().reverse():n[i]||0;else{for(var l in n[i]=a?[]:{},o)n[i][l]=o[l];r[i]=a?[]:{},this._setupProperties(o,n[i],e[i],r[i])}}}},t.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},t.prototype.end=function(){return this.update(1/0),this},t.prototype.pause=function(t){return this._isPaused||!this._isPlaying||(this._isPaused=!0,this._pauseStart=void 0===t?Tr.now():t,this._group.remove(this)),this},t.prototype.resume=function(t){return this._isPaused&&this._isPlaying?(this._isPaused=!1,this._startTime+=(void 0===t?Tr.now():t)-this._pauseStart,this._pauseStart=0,this._group.add(this),this):this},t.prototype.stopChainedTweens=function(){for(var t=0,n=this._chainedTweens.length;t<n;t++)this._chainedTweens[t].stop();return this},t.prototype.group=function(t){return this._group=t,this},t.prototype.delay=function(t){return this._delayTime=t,this},t.prototype.repeat=function(t){return this._initialRepeat=t,this._repeat=t,this},t.prototype.repeatDelay=function(t){return this._repeatDelayTime=t,this},t.prototype.yoyo=function(t){return this._yoyo=t,this},t.prototype.easing=function(t){return this._easingFunction=t,this},t.prototype.interpolation=function(t){return this._interpolationFunction=t,this},t.prototype.chain=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return this._chainedTweens=t,this},t.prototype.onStart=function(t){return this._onStartCallback=t,this},t.prototype.onUpdate=function(t){return this._onUpdateCallback=t,this},t.prototype.onRepeat=function(t){return this._onRepeatCallback=t,this},t.prototype.onComplete=function(t){return this._onCompleteCallback=t,this},t.prototype.onStop=function(t){return this._onStopCallback=t,this},t.prototype.update=function(t){var n,e;if(t>this._startTime+this._duration&&!this._isPlaying)return!1;if(this.isPlaying||this.start(t),t<this._startTime)return!0;!1===this._onStartCallbackFired&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),e=(t-this._startTime)/this._duration,e=0===this._duration||e>1?1:e;var r=this._easingFunction(e);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,r),this._onUpdateCallback&&this._onUpdateCallback(this._object,e),1===e){if(this._repeat>0){for(n in isFinite(this._repeat)&&this._repeat--,this._valuesStartRepeat)this._yoyo||"string"!=typeof this._valuesEnd[n]||(this._valuesStartRepeat[n]=this._valuesStartRepeat[n]+parseFloat(this._valuesEnd[n])),this._yoyo&&this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n];return this._yoyo&&(this._reversed=!this._reversed),void 0!==this._repeatDelayTime?this._startTime=t+this._repeatDelayTime:this._startTime=t+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),!0}this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var i=0,o=this._chainedTweens.length;i<o;i++)this._chainedTweens[i].start(this._startTime+this._duration);return this._isPlaying=!1,!1}return!0},t.prototype._updateProperties=function(t,n,e,r){for(var i in e)if(void 0!==n[i]){var o=n[i]||0,a=e[i],u=Array.isArray(t[i]),s=Array.isArray(a);!u&&s?t[i]=this._interpolationFunction(a,r):"object"==typeof a&&a?this._updateProperties(t[i],o,a,r):"number"==typeof(a=this._handleRelativeValue(o,a))&&(t[i]=o+(a-o)*r)}},t.prototype._handleRelativeValue=function(t,n){return"string"!=typeof n?n:"+"===n.charAt(0)||"-"===n.charAt(0)?t+parseFloat(n):parseFloat(n)},t.prototype._swapEndStartRepeatValues=function(t){var n=this._valuesStartRepeat[t];"string"==typeof this._valuesEnd[t]?this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(this._valuesEnd[t]):this._valuesStartRepeat[t]=this._valuesEnd[t],this._valuesEnd[t]=n},t}(),Cr=(wr=function(t,n){return(wr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)n.hasOwnProperty(e)&&(t[e]=n[e])})(t,n)},function(t,n){function e(){this.constructor=t}wr(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}),Tr=new(function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.version="18.6.0",n.now=zr,n.Group=Ar,n.Easing=Or,n.Interpolation=Sr,n.nextId=Mr.nextId,n.Tween=Er,n}return Cr(n,t),n}(Ar));function jr(t,n,e){var r,i,o,a,u;function s(){var c=Date.now()-a;c<n&&c>=0?r=setTimeout(s,n-c):(r=null,e||(u=t.apply(o,i),o=i=null))}null==n&&(n=100);var c=function(){o=this,i=arguments,a=Date.now();var c=e&&!r;return r||(r=setTimeout(s,n)),c&&(u=t.apply(o,i),o=i=null),u};return c.clear=function(){r&&(clearTimeout(r),r=null)},c.flush=function(){r&&(u=t.apply(o,i),o=i=null,clearTimeout(r),r=null)},c}jr.debounce=jr;var Nr=jr;function Pr(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){if(!(Symbol.iterator in Object(t))&&"[object Arguments]"!==Object.prototype.toString.call(t))return;var e=[],r=!0,i=!1,o=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done)&&(e.push(a.value),!n||e.length!==n);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return e}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var Rr=function t(n,e){var r=e.default,i=void 0===r?null:r,o=e.triggerUpdate,a=void 0===o||o,u=e.onChange,s=void 0===u?function(t,n){}:u;!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),this.name=n,this.defaultVal=i,this.triggerUpdate=a,this.onChange=s};function Ir(t){var n=t.stateInit,e=void 0===n?function(){return{}}:n,r=t.props,i=void 0===r?{}:r,o=t.methods,a=void 0===o?{}:o,u=t.aliases,s=void 0===u?{}:u,c=t.init,l=void 0===c?function(){}:c,f=t.update,h=void 0===f?function(){}:f,p=Object.keys(i).map((function(t){return new Rr(t,i[t])}));return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=Object.assign({},e instanceof Function?e(t):e,{initialised:!1}),r={};function i(n){return o(n,t),u(),i}var o=function(t,e){l.call(i,t,n,e),n.initialised=!0},u=Nr((function(){n.initialised&&(h.call(i,n,r),r={})}),1);return p.forEach((function(t){i[t.name]=function(t){var e=t.name,o=t.triggerUpdate,a=void 0!==o&&o,s=t.onChange,c=void 0===s?function(t,n){}:s,l=t.defaultVal,f=void 0===l?null:l;return function(t){var o=n[e];if(!arguments.length)return o;var s=void 0===t?f:t;return n[e]=s,c.call(i,s,n,o),!r.hasOwnProperty(e)&&(r[e]=o),a&&u(),i}}(t)})),Object.keys(a).forEach((function(t){i[t]=function(){for(var e,r=arguments.length,o=new Array(r),u=0;u<r;u++)o[u]=arguments[u];return(e=a[t]).call.apply(e,[i,n].concat(o))}})),Object.entries(s).forEach((function(t){var n=Pr(t,2),e=n[0],r=n[1];return i[e]=i[r]})),i.resetProps=function(){return p.forEach((function(t){i[t.name](t.defaultVal)})),i},i.resetProps(),n._rerender=u,i}}var Dr=function(t){return t instanceof Function?t:"string"==typeof t?function(n){return n[t]}:function(n){return t}},Ur=or((function(t){!function(n){var e=/^\s+/,r=/\s+$/,i=0,o=n.round,a=n.min,u=n.max,s=n.random;function c(t,s){if(s=s||{},(t=t||"")instanceof c)return t;if(!(this instanceof c))return new c(t,s);var l=function(t){var i={r:0,g:0,b:0},o=1,s=null,c=null,l=null,f=!1,h=!1;"string"==typeof t&&(t=function(t){t=t.replace(e,"").replace(r,"").toLowerCase();var n,i=!1;if(S[t])t=S[t],i=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};if(n=L.rgb.exec(t))return{r:n[1],g:n[2],b:n[3]};if(n=L.rgba.exec(t))return{r:n[1],g:n[2],b:n[3],a:n[4]};if(n=L.hsl.exec(t))return{h:n[1],s:n[2],l:n[3]};if(n=L.hsla.exec(t))return{h:n[1],s:n[2],l:n[3],a:n[4]};if(n=L.hsv.exec(t))return{h:n[1],s:n[2],v:n[3]};if(n=L.hsva.exec(t))return{h:n[1],s:n[2],v:n[3],a:n[4]};if(n=L.hex8.exec(t))return{r:j(n[1]),g:j(n[2]),b:j(n[3]),a:I(n[4]),format:i?"name":"hex8"};if(n=L.hex6.exec(t))return{r:j(n[1]),g:j(n[2]),b:j(n[3]),format:i?"name":"hex"};if(n=L.hex4.exec(t))return{r:j(n[1]+""+n[1]),g:j(n[2]+""+n[2]),b:j(n[3]+""+n[3]),a:I(n[4]+""+n[4]),format:i?"name":"hex8"};if(n=L.hex3.exec(t))return{r:j(n[1]+""+n[1]),g:j(n[2]+""+n[2]),b:j(n[3]+""+n[3]),format:i?"name":"hex"};return!1}(t));"object"==typeof t&&(q(t.r)&&q(t.g)&&q(t.b)?(p=t.r,d=t.g,y=t.b,i={r:255*C(p,255),g:255*C(d,255),b:255*C(y,255)},f=!0,h="%"===String(t.r).substr(-1)?"prgb":"rgb"):q(t.h)&&q(t.s)&&q(t.v)?(s=P(t.s),c=P(t.v),i=function(t,e,r){t=6*C(t,360),e=C(e,100),r=C(r,100);var i=n.floor(t),o=t-i,a=r*(1-e),u=r*(1-o*e),s=r*(1-(1-o)*e),c=i%6;return{r:255*[r,u,a,a,s,r][c],g:255*[s,r,r,u,a,a][c],b:255*[a,a,s,r,r,u][c]}}(t.h,s,c),f=!0,h="hsv"):q(t.h)&&q(t.s)&&q(t.l)&&(s=P(t.s),l=P(t.l),i=function(t,n,e){var r,i,o;function a(t,n,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?t+6*(n-t)*e:e<.5?n:e<2/3?t+(n-t)*(2/3-e)*6:t}if(t=C(t,360),n=C(n,100),e=C(e,100),0===n)r=i=o=e;else{var u=e<.5?e*(1+n):e+n-e*n,s=2*e-u;r=a(s,u,t+1/3),i=a(s,u,t),o=a(s,u,t-1/3)}return{r:255*r,g:255*i,b:255*o}}(t.h,s,l),f=!0,h="hsl"),t.hasOwnProperty("a")&&(o=t.a));var p,d,y;return o=E(o),{ok:f,format:t.format||h,r:a(255,u(i.r,0)),g:a(255,u(i.g,0)),b:a(255,u(i.b,0)),a:o}}(t);this._originalInput=t,this._r=l.r,this._g=l.g,this._b=l.b,this._a=l.a,this._roundA=o(100*this._a)/100,this._format=s.format||l.format,this._gradientType=s.gradientType,this._r<1&&(this._r=o(this._r)),this._g<1&&(this._g=o(this._g)),this._b<1&&(this._b=o(this._b)),this._ok=l.ok,this._tc_id=i++}function l(t,n,e){t=C(t,255),n=C(n,255),e=C(e,255);var r,i,o=u(t,n,e),s=a(t,n,e),c=(o+s)/2;if(o==s)r=i=0;else{var l=o-s;switch(i=c>.5?l/(2-o-s):l/(o+s),o){case t:r=(n-e)/l+(n<e?6:0);break;case n:r=(e-t)/l+2;break;case e:r=(t-n)/l+4}r/=6}return{h:r,s:i,l:c}}function f(t,n,e){t=C(t,255),n=C(n,255),e=C(e,255);var r,i,o=u(t,n,e),s=a(t,n,e),c=o,l=o-s;if(i=0===o?0:l/o,o==s)r=0;else{switch(o){case t:r=(n-e)/l+(n<e?6:0);break;case n:r=(e-t)/l+2;break;case e:r=(t-n)/l+4}r/=6}return{h:r,s:i,v:c}}function h(t,n,e,r){var i=[N(o(t).toString(16)),N(o(n).toString(16)),N(o(e).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function p(t,n,e,r){return[N(R(r)),N(o(t).toString(16)),N(o(n).toString(16)),N(o(e).toString(16))].join("")}function d(t,n){n=0===n?0:n||10;var e=c(t).toHsl();return e.s-=n/100,e.s=T(e.s),c(e)}function y(t,n){n=0===n?0:n||10;var e=c(t).toHsl();return e.s+=n/100,e.s=T(e.s),c(e)}function g(t){return c(t).desaturate(100)}function v(t,n){n=0===n?0:n||10;var e=c(t).toHsl();return e.l+=n/100,e.l=T(e.l),c(e)}function m(t,n){n=0===n?0:n||10;var e=c(t).toRgb();return e.r=u(0,a(255,e.r-o(-n/100*255))),e.g=u(0,a(255,e.g-o(-n/100*255))),e.b=u(0,a(255,e.b-o(-n/100*255))),c(e)}function _(t,n){n=0===n?0:n||10;var e=c(t).toHsl();return e.l-=n/100,e.l=T(e.l),c(e)}function b(t,n){var e=c(t).toHsl(),r=(e.h+n)%360;return e.h=r<0?360+r:r,c(e)}function x(t){var n=c(t).toHsl();return n.h=(n.h+180)%360,c(n)}function w(t){var n=c(t).toHsl(),e=n.h;return[c(t),c({h:(e+120)%360,s:n.s,l:n.l}),c({h:(e+240)%360,s:n.s,l:n.l})]}function k(t){var n=c(t).toHsl(),e=n.h;return[c(t),c({h:(e+90)%360,s:n.s,l:n.l}),c({h:(e+180)%360,s:n.s,l:n.l}),c({h:(e+270)%360,s:n.s,l:n.l})]}function z(t){var n=c(t).toHsl(),e=n.h;return[c(t),c({h:(e+72)%360,s:n.s,l:n.l}),c({h:(e+216)%360,s:n.s,l:n.l})]}function A(t,n,e){n=n||6,e=e||30;var r=c(t).toHsl(),i=360/e,o=[c(t)];for(r.h=(r.h-(i*n>>1)+720)%360;--n;)r.h=(r.h+i)%360,o.push(c(r));return o}function O(t,n){n=n||6;for(var e=c(t).toHsv(),r=e.h,i=e.s,o=e.v,a=[],u=1/n;n--;)a.push(c({h:r,s:i,v:o})),o=(o+u)%1;return a}c.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,e,r,i=this.toRgb();return t=i.r/255,e=i.g/255,r=i.b/255,.2126*(t<=.03928?t/12.92:n.pow((t+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:n.pow((e+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:n.pow((r+.055)/1.055,2.4))},setAlpha:function(t){return this._a=E(t),this._roundA=o(100*this._a)/100,this},toHsv:function(){var t=f(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=f(this._r,this._g,this._b),n=o(360*t.h),e=o(100*t.s),r=o(100*t.v);return 1==this._a?"hsv("+n+", "+e+"%, "+r+"%)":"hsva("+n+", "+e+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var t=l(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=l(this._r,this._g,this._b),n=o(360*t.h),e=o(100*t.s),r=o(100*t.l);return 1==this._a?"hsl("+n+", "+e+"%, "+r+"%)":"hsla("+n+", "+e+"%, "+r+"%, "+this._roundA+")"},toHex:function(t){return h(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,n,e,r,i){var a=[N(o(t).toString(16)),N(o(n).toString(16)),N(o(e).toString(16)),N(R(r))];if(i&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1))return a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0);return a.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:o(this._r),g:o(this._g),b:o(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+o(this._r)+", "+o(this._g)+", "+o(this._b)+")":"rgba("+o(this._r)+", "+o(this._g)+", "+o(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:o(100*C(this._r,255))+"%",g:o(100*C(this._g,255))+"%",b:o(100*C(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+o(100*C(this._r,255))+"%, "+o(100*C(this._g,255))+"%, "+o(100*C(this._b,255))+"%)":"rgba("+o(100*C(this._r,255))+"%, "+o(100*C(this._g,255))+"%, "+o(100*C(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(M[h(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var n="#"+p(this._r,this._g,this._b,this._a),e=n,r=this._gradientType?"GradientType = 1, ":"";if(t){var i=c(t);e="#"+p(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+n+",endColorstr="+e+")"},toString:function(t){var n=!!t;t=t||this._format;var e=!1,r=this._a<1&&this._a>=0;return n||!r||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(e=this.toRgbString()),"prgb"===t&&(e=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(e=this.toHexString()),"hex3"===t&&(e=this.toHexString(!0)),"hex4"===t&&(e=this.toHex8String(!0)),"hex8"===t&&(e=this.toHex8String()),"name"===t&&(e=this.toName()),"hsl"===t&&(e=this.toHslString()),"hsv"===t&&(e=this.toHsvString()),e||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return c(this.toString())},_applyModification:function(t,n){var e=t.apply(null,[this].concat([].slice.call(n)));return this._r=e._r,this._g=e._g,this._b=e._b,this.setAlpha(e._a),this},lighten:function(){return this._applyModification(v,arguments)},brighten:function(){return this._applyModification(m,arguments)},darken:function(){return this._applyModification(_,arguments)},desaturate:function(){return this._applyModification(d,arguments)},saturate:function(){return this._applyModification(y,arguments)},greyscale:function(){return this._applyModification(g,arguments)},spin:function(){return this._applyModification(b,arguments)},_applyCombination:function(t,n){return t.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(A,arguments)},complement:function(){return this._applyCombination(x,arguments)},monochromatic:function(){return this._applyCombination(O,arguments)},splitcomplement:function(){return this._applyCombination(z,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},c.fromRatio=function(t,n){if("object"==typeof t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[r]="a"===r?t[r]:P(t[r]));t=e}return c(t,n)},c.equals=function(t,n){return!(!t||!n)&&c(t).toRgbString()==c(n).toRgbString()},c.random=function(){return c.fromRatio({r:s(),g:s(),b:s()})},c.mix=function(t,n,e){e=0===e?0:e||50;var r=c(t).toRgb(),i=c(n).toRgb(),o=e/100;return c({r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a})},
// <http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef (WCAG Version 2)
// Analyze the 2 colors and returns the color contrast defined by (WCAG Version 2)
c.readability=function(t,e){var r=c(t),i=c(e);return(n.max(r.getLuminance(),i.getLuminance())+.05)/(n.min(r.getLuminance(),i.getLuminance())+.05)},c.isReadable=function(t,n,e){var r,i,o=c.readability(t,n);switch(i=!1,(r=function(t){var n,e;n=((t=t||{level:"AA",size:"small"}).level||"AA").toUpperCase(),e=(t.size||"small").toLowerCase(),"AA"!==n&&"AAA"!==n&&(n="AA");"small"!==e&&"large"!==e&&(e="small");return{level:n,size:e}}(e)).level+r.size){case"AAsmall":case"AAAlarge":i=o>=4.5;break;case"AAlarge":i=o>=3;break;case"AAAsmall":i=o>=7}return i},c.mostReadable=function(t,n,e){var r,i,o,a,u=null,s=0;i=(e=e||{}).includeFallbackColors,o=e.level,a=e.size;for(var l=0;l<n.length;l++)(r=c.readability(t,n[l]))>s&&(s=r,u=c(n[l]));return c.isReadable(t,u,{level:o,size:a})||!i?u:(e.includeFallbackColors=!1,c.mostReadable(t,["#fff","#000"],e))};var S=c.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},M=c.hexNames=function(t){var n={};for(var e in t)t.hasOwnProperty(e)&&(n[t[e]]=e);return n}(S);function E(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function C(t,e){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var r=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=a(e,u(0,parseFloat(t))),r&&(t=parseInt(t*e,10)/100),n.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function T(t){return a(1,u(0,t))}function j(t){return parseInt(t,16)}function N(t){return 1==t.length?"0"+t:""+t}function P(t){return t<=1&&(t=100*t+"%"),t}function R(t){return n.round(255*parseFloat(t)).toString(16)}function I(t){return j(t)/255}var D,U,F,L=(U="[\\s|\\(]+("+(D="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+D+")[,|\\s]+("+D+")\\s*\\)?",F="[\\s|\\(]+("+D+")[,|\\s]+("+D+")[,|\\s]+("+D+")[,|\\s]+("+D+")\\s*\\)?",{CSS_UNIT:new RegExp(D),rgb:new RegExp("rgb"+U),rgba:new RegExp("rgba"+F),hsl:new RegExp("hsl"+U),hsla:new RegExp("hsla"+F),hsv:new RegExp("hsv"+U),hsva:new RegExp("hsva"+F),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function q(t){return!!L.CSS_UNIT.exec(t)}t.exports?t.exports=c:window.tinycolor=c}(Math)}));function Fr(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function Lr(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function qr(t){return function(t){if(Array.isArray(t)){for(var n=0,e=new Array(t.length);n<t.length;n++)e[n]=t[n];return e}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var Br=function(t,n,e){return(t<<16)+(n<<8)+e},Hr=function(t,n){return 123*t%Math.pow(2,n)},Vr=function(){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:6;Fr(this,t),this.csBits=n,this.registry=["__reserved for background__"]}var n,e,r;return n=t,(e=[{key:"register",value:function(t){if(this.registry.length>=Math.pow(2,24-this.csBits))return null;var n,e=this.registry.length,r=Hr(e,this.csBits),i=(n=e+(r<<24-this.csBits),"#".concat(Math.min(n,Math.pow(2,24)).toString(16).padStart(6,"0")));return this.registry.push(t),i}},{key:"lookup",value:function(t){var n,e,r,i,o="string"==typeof t?(n=Ur(t).toRgb(),e=n.r,r=n.g,i=n.b,Br(e,r,i)):Br.apply(void 0,qr(t));if(!o)return null;var a=o&Math.pow(2,24-this.csBits)-1,u=o>>24-this.csBits&Math.pow(2,this.csBits)-1;return Hr(a,this.csBits)!==u||a>=this.registry.length?null:this.registry[a]}}])&&Lr(n.prototype,e),r&&Lr(n,r),t}();function $r(t,n,e){var r;function i(){var i,o,a=r.length,u=0,s=0,c=0;for(i=0;i<a;++i)u+=(o=r[i]).x||0,s+=o.y||0,c+=o.z||0;for(u=u/a-t,s=s/a-n,c=c/a-e,i=0;i<a;++i)o=r[i],u&&(o.x-=u),s&&(o.y-=s),c&&(o.z-=c)}return null==t&&(t=0),null==n&&(n=0),null==e&&(e=0),i.initialize=function(t){r=t},i.x=function(n){return arguments.length?(t=+n,i):t},i.y=function(t){return arguments.length?(n=+t,i):n},i.z=function(t){return arguments.length?(e=+t,i):e},i}function Gr(t,n,e){if(isNaN(n))return t;var r,i,o,a,u,s,c=t._root,l={data:e},f=t._x0,h=t._x1;if(!c)return t._root=l,t;for(;c.length;)if((a=n>=(i=(f+h)/2))?f=i:h=i,r=c,!(c=c[u=+a]))return r[u]=l,t;if(n===(o=+t._x.call(null,c.data)))return l.next=c,r?r[u]=l:t._root=l,t;do{r=r?r[u]=new Array(2):t._root=new Array(2),(a=n>=(i=(f+h)/2))?f=i:h=i}while((u=+a)==(s=+(o>=i)));return r[s]=c,r[u]=l,t}function Xr(t,n,e){this.node=t,this.x0=n,this.x1=e}function Yr(t){return t[0]}function Wr(t,n){var e=new Zr(null==n?Yr:n,NaN,NaN);return null==t?e:e.addAll(t)}function Zr(t,n,e){this._x=t,this._x0=n,this._x1=e,this._root=void 0}function Qr(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}var Jr=Wr.prototype=Zr.prototype;function Kr(t,n,e,r){if(isNaN(n)||isNaN(e))return t;var i,o,a,u,s,c,l,f,h,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=n>=(o=(y+v)/2))?y=o:v=o,(l=e>=(a=(g+m)/2))?g=a:m=a,i=p,!(p=p[f=l<<1|c]))return i[f]=d,t;if(u=+t._x.call(null,p.data),s=+t._y.call(null,p.data),n===u&&e===s)return d.next=p,i?i[f]=d:t._root=d,t;do{i=i?i[f]=new Array(4):t._root=new Array(4),(c=n>=(o=(y+v)/2))?y=o:v=o,(l=e>=(a=(g+m)/2))?g=a:m=a}while((f=l<<1|c)==(h=(s>=a)<<1|u>=o));return i[h]=p,i[f]=d,t}function ti(t,n,e,r,i){this.node=t,this.x0=n,this.y0=e,this.x1=r,this.y1=i}function ni(t){return t[0]}function ei(t){return t[1]}function ri(t,n,e){var r=new ii(null==n?ni:n,null==e?ei:e,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function ii(t,n,e,r,i,o){this._x=t,this._y=n,this._x0=e,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function oi(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}Jr.copy=function(){var t,n,e=new Zr(this._x,this._x0,this._x1),r=this._root;if(!r)return e;if(!r.length)return e._root=Qr(r),e;for(t=[{source:r,target:e._root=new Array(2)}];r=t.pop();)for(var i=0;i<2;++i)(n=r.source[i])&&(n.length?t.push({source:n,target:r.target[i]=new Array(2)}):r.target[i]=Qr(n));return e},Jr.add=function(t){var n=+this._x.call(null,t);return Gr(this.cover(n),n,t)},Jr.addAll=function(t){var n,e,r=t.length,i=new Array(r),o=1/0,a=-1/0;for(n=0;n<r;++n)isNaN(e=+this._x.call(null,t[n]))||(i[n]=e,e<o&&(o=e),e>a&&(a=e));for(a<o&&(o=this._x0,a=this._x1),this.cover(o).cover(a),n=0;n<r;++n)Gr(this,i[n],t[n]);return this},Jr.cover=function(t){if(isNaN(t=+t))return this;var n=this._x0,e=this._x1;if(isNaN(n))e=(n=Math.floor(t))+1;else{if(!(n>t||t>e))return this;var r,i,o=e-n,a=this._root;switch(i=+(t<(n+e)/2)){case 0:do{(r=new Array(2))[i]=a,a=r}while(t>(e=n+(o*=2)));break;case 1:do{(r=new Array(2))[i]=a,a=r}while((n=e-(o*=2))>t)}this._root&&this._root.length&&(this._root=a)}return this._x0=n,this._x1=e,this},Jr.data=function(){var t=[];return this.visit((function(n){if(!n.length)do{t.push(n.data)}while(n=n.next)})),t},Jr.extent=function(t){return arguments.length?this.cover(+t[0][0]).cover(+t[1][0]):isNaN(this._x0)?void 0:[[this._x0],[this._x1]]},Jr.find=function(t,n){var e,r,i,o,a,u=this._x0,s=this._x1,c=[],l=this._root;for(l&&c.push(new Xr(l,u,s)),null==n?n=1/0:(u=t-n,s=t+n);o=c.pop();)if(!(!(l=o.node)||(r=o.x0)>s||(i=o.x1)<u))if(l.length){var f=(r+i)/2;c.push(new Xr(l[1],f,i),new Xr(l[0],r,f)),(a=+(t>=f))&&(o=c[c.length-1],c[c.length-1]=c[c.length-1-a],c[c.length-1-a]=o)}else{var h=Math.abs(t-+this._x.call(null,l.data));h<n&&(n=h,u=t-h,s=t+h,e=l.data)}return e},Jr.remove=function(t){if(isNaN(o=+this._x.call(null,t)))return this;var n,e,r,i,o,a,u,s,c,l=this._root,f=this._x0,h=this._x1;if(!l)return this;if(l.length)for(;;){if((u=o>=(a=(f+h)/2))?f=a:h=a,n=l,!(l=l[s=+u]))return this;if(!l.length)break;n[s+1&1]&&(e=n,c=s)}for(;l.data!==t;)if(r=l,!(l=l.next))return this;return(i=l.next)&&delete l.next,r?(i?r.next=i:delete r.next,this):n?(i?n[s]=i:delete n[s],(l=n[0]||n[1])&&l===(n[1]||n[0])&&!l.length&&(e?e[c]=l:this._root=l),this):(this._root=i,this)},Jr.removeAll=function(t){for(var n=0,e=t.length;n<e;++n)this.remove(t[n]);return this},Jr.root=function(){return this._root},Jr.size=function(){var t=0;return this.visit((function(n){if(!n.length)do{++t}while(n=n.next)})),t},Jr.visit=function(t){var n,e,r,i,o=[],a=this._root;for(a&&o.push(new Xr(a,this._x0,this._x1));n=o.pop();)if(!t(a=n.node,r=n.x0,i=n.x1)&&a.length){var u=(r+i)/2;(e=a[1])&&o.push(new Xr(e,u,i)),(e=a[0])&&o.push(new Xr(e,r,u))}return this},Jr.visitAfter=function(t){var n,e=[],r=[];for(this._root&&e.push(new Xr(this._root,this._x0,this._x1));n=e.pop();){var i=n.node;if(i.length){var o,a=n.x0,u=n.x1,s=(a+u)/2;(o=i[0])&&e.push(new Xr(o,a,s)),(o=i[1])&&e.push(new Xr(o,s,u))}r.push(n)}for(;n=r.pop();)t(n.node,n.x0,n.x1);return this},Jr.x=function(t){return arguments.length?(this._x=t,this):this._x};var ai=ri.prototype=ii.prototype;function ui(t,n,e,r,i){if(isNaN(n)||isNaN(e)||isNaN(r))return t;var o,a,u,s,c,l,f,h,p,d,y,g,v=t._root,m={data:i},_=t._x0,b=t._y0,x=t._z0,w=t._x1,k=t._y1,z=t._z1;if(!v)return t._root=m,t;for(;v.length;)if((h=n>=(a=(_+w)/2))?_=a:w=a,(p=e>=(u=(b+k)/2))?b=u:k=u,(d=r>=(s=(x+z)/2))?x=s:z=s,o=v,!(v=v[y=d<<2|p<<1|h]))return o[y]=m,t;if(c=+t._x.call(null,v.data),l=+t._y.call(null,v.data),f=+t._z.call(null,v.data),n===c&&e===l&&r===f)return m.next=v,o?o[y]=m:t._root=m,t;do{o=o?o[y]=new Array(8):t._root=new Array(8),(h=n>=(a=(_+w)/2))?_=a:w=a,(p=e>=(u=(b+k)/2))?b=u:k=u,(d=r>=(s=(x+z)/2))?x=s:z=s}while((y=d<<2|p<<1|h)==(g=(f>=s)<<2|(l>=u)<<1|c>=a));return o[g]=v,o[y]=m,t}function si(t,n,e,r,i,o,a){this.node=t,this.x0=n,this.y0=e,this.z0=r,this.x1=i,this.y1=o,this.z1=a}function ci(t){return t[0]}function li(t){return t[1]}function fi(t){return t[2]}function hi(t,n,e,r){var i=new pi(null==n?ci:n,null==e?li:e,null==r?fi:r,NaN,NaN,NaN,NaN,NaN,NaN);return null==t?i:i.addAll(t)}function pi(t,n,e,r,i,o,a,u,s){this._x=t,this._y=n,this._z=e,this._x0=r,this._y0=i,this._z0=o,this._x1=a,this._y1=u,this._z1=s,this._root=void 0}function di(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}ai.copy=function(){var t,n,e=new ii(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return e;if(!r.length)return e._root=oi(r),e;for(t=[{source:r,target:e._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(n=r.source[i])&&(n.length?t.push({source:n,target:r.target[i]=new Array(4)}):r.target[i]=oi(n));return e},ai.add=function(t){var n=+this._x.call(null,t),e=+this._y.call(null,t);return Kr(this.cover(n,e),n,e,t)},ai.addAll=function(t){var n,e,r,i,o=t.length,a=new Array(o),u=new Array(o),s=1/0,c=1/0,l=-1/0,f=-1/0;for(e=0;e<o;++e)isNaN(r=+this._x.call(null,n=t[e]))||isNaN(i=+this._y.call(null,n))||(a[e]=r,u[e]=i,r<s&&(s=r),r>l&&(l=r),i<c&&(c=i),i>f&&(f=i));if(s>l||c>f)return this;for(this.cover(s,c).cover(l,f),e=0;e<o;++e)Kr(this,a[e],u[e],t[e]);return this},ai.cover=function(t,n){if(isNaN(t=+t)||isNaN(n=+n))return this;var e=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(e))i=(e=Math.floor(t))+1,o=(r=Math.floor(n))+1;else{for(var a,u,s=i-e,c=this._root;e>t||t>=i||r>n||n>=o;)switch(u=(n<r)<<1|t<e,(a=new Array(4))[u]=c,c=a,s*=2,u){case 0:i=e+s,o=r+s;break;case 1:e=i-s,o=r+s;break;case 2:i=e+s,r=o-s;break;case 3:e=i-s,r=o-s}this._root&&this._root.length&&(this._root=c)}return this._x0=e,this._y0=r,this._x1=i,this._y1=o,this},ai.data=function(){var t=[];return this.visit((function(n){if(!n.length)do{t.push(n.data)}while(n=n.next)})),t},ai.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]]},ai.find=function(t,n,e){var r,i,o,a,u,s,c,l=this._x0,f=this._y0,h=this._x1,p=this._y1,d=[],y=this._root;for(y&&d.push(new ti(y,l,f,h,p)),null==e?e=1/0:(l=t-e,f=n-e,h=t+e,p=n+e,e*=e);s=d.pop();)if(!(!(y=s.node)||(i=s.x0)>h||(o=s.y0)>p||(a=s.x1)<l||(u=s.y1)<f))if(y.length){var g=(i+a)/2,v=(o+u)/2;d.push(new ti(y[3],g,v,a,u),new ti(y[2],i,v,g,u),new ti(y[1],g,o,a,v),new ti(y[0],i,o,g,v)),(c=(n>=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),_=n-+this._y.call(null,y.data),b=m*m+_*_;if(b<e){var x=Math.sqrt(e=b);l=t-x,f=n-x,h=t+x,p=n+x,r=y.data}}return r},ai.remove=function(t){if(isNaN(o=+this._x.call(null,t))||isNaN(a=+this._y.call(null,t)))return this;var n,e,r,i,o,a,u,s,c,l,f,h,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=o>=(u=(d+g)/2))?d=u:g=u,(l=a>=(s=(y+v)/2))?y=s:v=s,n=p,!(p=p[f=l<<1|c]))return this;if(!p.length)break;(n[f+1&3]||n[f+2&3]||n[f+3&3])&&(e=n,h=f)}for(;p.data!==t;)if(r=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,r?(i?r.next=i:delete r.next,this):n?(i?n[f]=i:delete n[f],(p=n[0]||n[1]||n[2]||n[3])&&p===(n[3]||n[2]||n[1]||n[0])&&!p.length&&(e?e[h]=p:this._root=p),this):(this._root=i,this)},ai.removeAll=function(t){for(var n=0,e=t.length;n<e;++n)this.remove(t[n]);return this},ai.root=function(){return this._root},ai.size=function(){var t=0;return this.visit((function(n){if(!n.length)do{++t}while(n=n.next)})),t},ai.visit=function(t){var n,e,r,i,o,a,u=[],s=this._root;for(s&&u.push(new ti(s,this._x0,this._y0,this._x1,this._y1));n=u.pop();)if(!t(s=n.node,r=n.x0,i=n.y0,o=n.x1,a=n.y1)&&s.length){var c=(r+o)/2,l=(i+a)/2;(e=s[3])&&u.push(new ti(e,c,l,o,a)),(e=s[2])&&u.push(new ti(e,r,l,c,a)),(e=s[1])&&u.push(new ti(e,c,i,o,l)),(e=s[0])&&u.push(new ti(e,r,i,c,l))}return this},ai.visitAfter=function(t){var n,e=[],r=[];for(this._root&&e.push(new ti(this._root,this._x0,this._y0,this._x1,this._y1));n=e.pop();){var i=n.node;if(i.length){var o,a=n.x0,u=n.y0,s=n.x1,c=n.y1,l=(a+s)/2,f=(u+c)/2;(o=i[0])&&e.push(new ti(o,a,u,l,f)),(o=i[1])&&e.push(new ti(o,l,u,s,f)),(o=i[2])&&e.push(new ti(o,a,f,l,c)),(o=i[3])&&e.push(new ti(o,l,f,s,c))}r.push(n)}for(;n=r.pop();)t(n.node,n.x0,n.y0,n.x1,n.y1);return this},ai.x=function(t){return arguments.length?(this._x=t,this):this._x},ai.y=function(t){return arguments.length?(this._y=t,this):this._y};var yi=hi.prototype=pi.prototype;function gi(t){return function(){return t}}function vi(){return 1e-6*(Math.random()-.5)}function mi(t){return t.index}function _i(t,n){var e=t.get(n);if(!e)throw new Error("node not found: "+n);return e}function bi(t){var n,e,r,i,o,a,u=mi,s=function(t){return 1/Math.min(o[t.source.index],o[t.target.index])},c=gi(30),l=1;function f(r){for(var o=0,u=t.length;o<l;++o)for(var s,c,f,h,p,d=0,y=0,g=0,v=0;d<u;++d)c=(s=t[d]).source,y=(f=s.target).x+f.vx-c.x-c.vx||vi(),i>1&&(g=f.y+f.vy-c.y-c.vy||vi()),i>2&&(v=f.z+f.vz-c.z-c.vz||vi()),y*=h=((h=Math.sqrt(y*y+g*g+v*v))-e[d])/h*r*n[d],g*=h,v*=h,f.vx-=y*(p=a[d]),i>1&&(f.vy-=g*p),i>2&&(f.vz-=v*p),c.vx+=y*(p=1-p),i>1&&(c.vy+=g*p),i>2&&(c.vz+=v*p)}function h(){if(r){var i,s,c=r.length,l=t.length,f=new Map(r.map((t,n)=>[u(t,n,r),t]));for(i=0,o=new Array(c);i<l;++i)(s=t[i]).index=i,"object"!=typeof s.source&&(s.source=_i(f,s.source)),"object"!=typeof s.target&&(s.target=_i(f,s.target)),o[s.source.index]=(o[s.source.index]||0)+1,o[s.target.index]=(o[s.target.index]||0)+1;for(i=0,a=new Array(l);i<l;++i)s=t[i],a[i]=o[s.source.index]/(o[s.source.index]+o[s.target.index]);n=new Array(l),p(),e=new Array(l),d()}}function p(){if(r)for(var e=0,i=t.length;e<i;++e)n[e]=+s(t[e],e,t)}function d(){if(r)for(var n=0,i=t.length;n<i;++n)e[n]=+c(t[n],n,t)}return null==t&&(t=[]),f.initialize=function(t,n){r=t,i=n,h()},f.links=function(n){return arguments.length?(t=n,h(),f):t},f.id=function(t){return arguments.length?(u=t,f):u},f.iterations=function(t){return arguments.length?(l=+t,f):l},f.strength=function(t){return arguments.length?(s="function"==typeof t?t:gi(+t),p(),f):s},f.distance=function(t){return arguments.length?(c="function"==typeof t?t:gi(+t),d(),f):c},f}yi.copy=function(){var t,n,e=new pi(this._x,this._y,this._z,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1),r=this._root;if(!r)return e;if(!r.length)return e._root=di(r),e;for(t=[{source:r,target:e._root=new Array(8)}];r=t.pop();)for(var i=0;i<8;++i)(n=r.source[i])&&(n.length?t.push({source:n,target:r.target[i]=new Array(8)}):r.target[i]=di(n));return e},yi.add=function(t){var n=+this._x.call(null,t),e=+this._y.call(null,t),r=+this._z.call(null,t);return ui(this.cover(n,e,r),n,e,r,t)},yi.addAll=function(t){var n,e,r,i,o,a=t.length,u=new Array(a),s=new Array(a),c=new Array(a),l=1/0,f=1/0,h=1/0,p=-1/0,d=-1/0,y=-1/0;for(e=0;e<a;++e)isNaN(r=+this._x.call(null,n=t[e]))||isNaN(i=+this._y.call(null,n))||isNaN(o=+this._z.call(null,n))||(u[e]=r,s[e]=i,c[e]=o,r<l&&(l=r),r>p&&(p=r),i<f&&(f=i),i>d&&(d=i),o<h&&(h=o),o>y&&(y=o));for(p<l&&(l=this._x0,p=this._x1),d<f&&(f=this._y0,d=this._y1),y<h&&(h=this._z0,y=this._z1),this.cover(l,f,h).cover(p,d,y),e=0;e<a;++e)ui(this,u[e],s[e],c[e],t[e]);return this},yi.cover=function(t,n,e){if(isNaN(t=+t)||isNaN(n=+n)||isNaN(e=+e))return this;var r=this._x0,i=this._y0,o=this._z0,a=this._x1,u=this._y1,s=this._z1;if(isNaN(r))a=(r=Math.floor(t))+1,u=(i=Math.floor(n))+1,s=(o=Math.floor(e))+1;else{if(!(r>t||t>a||i>n||n>u||o>e||e>s))return this;var c,l,f=a-r,h=this._root;switch(l=(e<(o+s)/2)<<2|(n<(i+u)/2)<<1|t<(r+a)/2){case 0:do{(c=new Array(8))[l]=h,h=c}while(u=i+(f*=2),s=o+f,t>(a=r+f)||n>u||e>s);break;case 1:do{(c=new Array(8))[l]=h,h=c}while(u=i+(f*=2),s=o+f,(r=a-f)>t||n>u||e>s);break;case 2:do{(c=new Array(8))[l]=h,h=c}while(i=u-(f*=2),s=o+f,t>(a=r+f)||i>n||e>s);break;case 3:do{(c=new Array(8))[l]=h,h=c}while(i=u-(f*=2),s=o+f,(r=a-f)>t||i>n||e>s);break;case 4:do{(c=new Array(8))[l]=h,h=c}while(u=i+(f*=2),o=s-f,t>(a=r+f)||n>u||o>e);break;case 5:do{(c=new Array(8))[l]=h,h=c}while(u=i+(f*=2),o=s-f,(r=a-f)>t||n>u||o>e);break;case 6:do{(c=new Array(8))[l]=h,h=c}while(i=u-(f*=2),o=s-f,t>(a=r+f)||i>n||o>e);break;case 7:do{(c=new Array(8))[l]=h,h=c}while(i=u-(f*=2),o=s-f,(r=a-f)>t||i>n||o>e)}this._root&&this._root.length&&(this._root=h)}return this._x0=r,this._y0=i,this._z0=o,this._x1=a,this._y1=u,this._z1=s,this},yi.data=function(){var t=[];return this.visit((function(n){if(!n.length)do{t.push(n.data)}while(n=n.next)})),t},yi.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1],+t[0][2]).cover(+t[1][0],+t[1][1],+t[1][2]):isNaN(this._x0)?void 0:[[this._x0,this._y0,this._z0],[this._x1,this._y1,this._z1]]},yi.find=function(t,n,e,r){var i,o,a,u,s,c,l,f,h,p=this._x0,d=this._y0,y=this._z0,g=this._x1,v=this._y1,m=this._z1,_=[],b=this._root;for(b&&_.push(new si(b,p,d,y,g,v,m)),null==r?r=1/0:(p=t-r,d=n-r,y=e-r,g=t+r,v=n+r,m=e+r,r*=r);f=_.pop();)if(!(!(b=f.node)||(o=f.x0)>g||(a=f.y0)>v||(u=f.z0)>m||(s=f.x1)<p||(c=f.y1)<d||(l=f.z1)<y))if(b.length){var x=(o+s)/2,w=(a+c)/2,k=(u+l)/2;_.push(new si(b[7],x,w,k,s,c,l),new si(b[6],o,w,k,x,c,l),new si(b[5],x,a,k,s,w,l),new si(b[4],o,a,k,x,w,l),new si(b[3],x,w,u,s,c,k),new si(b[2],o,w,u,x,c,k),new si(b[1],x,a,u,s,w,k),new si(b[0],o,a,u,x,w,k)),(h=(e>=k)<<2|(n>=w)<<1|t>=x)&&(f=_[_.length-1],_[_.length-1]=_[_.length-1-h],_[_.length-1-h]=f)}else{var z=t-+this._x.call(null,b.data),A=n-+this._y.call(null,b.data),O=e-+this._z.call(null,b.data),S=z*z+A*A+O*O;if(S<r){var M=Math.sqrt(r=S);p=t-M,d=n-M,y=e-M,g=t+M,v=n+M,m=e+M,i=b.data}}return i},yi.remove=function(t){if(isNaN(o=+this._x.call(null,t))||isNaN(a=+this._y.call(null,t))||isNaN(u=+this._z.call(null,t)))return this;var n,e,r,i,o,a,u,s,c,l,f,h,p,d,y,g=this._root,v=this._x0,m=this._y0,_=this._z0,b=this._x1,x=this._y1,w=this._z1;if(!g)return this;if(g.length)for(;;){if((f=o>=(s=(v+b)/2))?v=s:b=s,(h=a>=(c=(m+x)/2))?m=c:x=c,(p=u>=(l=(_+w)/2))?_=l:w=l,n=g,!(g=g[d=p<<2|h<<1|f]))return this;if(!g.length)break;(n[d+1&7]||n[d+2&7]||n[d+3&7]||n[d+4&7]||n[d+5&7]||n[d+6&7]||n[d+7&7])&&(e=n,y=d)}for(;g.data!==t;)if(r=g,!(g=g.next))return this;return(i=g.next)&&delete g.next,r?(i?r.next=i:delete r.next,this):n?(i?n[d]=i:delete n[d],(g=n[0]||n[1]||n[2]||n[3]||n[4]||n[5]||n[6]||n[7])&&g===(n[7]||n[6]||n[5]||n[4]||n[3]||n[2]||n[1]||n[0])&&!g.length&&(e?e[y]=g:this._root=g),this):(this._root=i,this)},yi.removeAll=function(t){for(var n=0,e=t.length;n<e;++n)this.remove(t[n]);return this},yi.root=function(){return this._root},yi.size=function(){var t=0;return this.visit((function(n){if(!n.length)do{++t}while(n=n.next)})),t},yi.visit=function(t){var n,e,r,i,o,a,u,s,c=[],l=this._root;for(l&&c.push(new si(l,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));n=c.pop();)if(!t(l=n.node,r=n.x0,i=n.y0,o=n.z0,a=n.x1,u=n.y1,s=n.z1)&&l.length){var f=(r+a)/2,h=(i+u)/2,p=(o+s)/2;(e=l[7])&&c.push(new si(e,f,h,p,a,u,s)),(e=l[6])&&c.push(new si(e,r,h,p,f,u,s)),(e=l[5])&&c.push(new si(e,f,i,p,a,h,s)),(e=l[4])&&c.push(new si(e,r,i,p,f,h,s)),(e=l[3])&&c.push(new si(e,f,h,o,a,u,p)),(e=l[2])&&c.push(new si(e,r,h,o,f,u,p)),(e=l[1])&&c.push(new si(e,f,i,o,a,h,p)),(e=l[0])&&c.push(new si(e,r,i,o,f,h,p))}return this},yi.visitAfter=function(t){var n,e=[],r=[];for(this._root&&e.push(new si(this._root,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));n=e.pop();){var i=n.node;if(i.length){var o,a=n.x0,u=n.y0,s=n.z0,c=n.x1,l=n.y1,f=n.z1,h=(a+c)/2,p=(u+l)/2,d=(s+f)/2;(o=i[0])&&e.push(new si(o,a,u,s,h,p,d)),(o=i[1])&&e.push(new si(o,h,u,s,c,p,d)),(o=i[2])&&e.push(new si(o,a,p,s,h,l,d)),(o=i[3])&&e.push(new si(o,h,p,s,c,l,d)),(o=i[4])&&e.push(new si(o,a,u,d,h,p,f)),(o=i[5])&&e.push(new si(o,h,u,d,c,p,f)),(o=i[6])&&e.push(new si(o,a,p,d,h,l,f)),(o=i[7])&&e.push(new si(o,h,p,d,c,l,f))}r.push(n)}for(;n=r.pop();)t(n.node,n.x0,n.y0,n.z0,n.x1,n.y1,n.z1);return this},yi.x=function(t){return arguments.length?(this._x=t,this):this._x},yi.y=function(t){return arguments.length?(this._y=t,this):this._y},yi.z=function(t){return arguments.length?(this._z=t,this):this._z};function xi(t){return t.x}function wi(t){return t.y}function ki(t){return t.z}var zi=Math.PI*(3-Math.sqrt(5)),Ai=20*Math.PI/(9+Math.sqrt(221));function Oi(t,n){n=n||2;var e,r=Math.min(3,Math.max(1,Math.round(n))),i=1,o=.001,a=1-Math.pow(o,1/300),u=0,s=.6,c=new Map,l=Kn(h),f=Mt("tick","end");function h(){p(),f.call("tick",e),i<o&&(l.stop(),f.call("end",e))}function p(n){var o,l,f=t.length;void 0===n&&(n=1);for(var h=0;h<n;++h)for(i+=(u-i)*a,c.forEach((function(t){t(i)})),o=0;o<f;++o)null==(l=t[o]).fx?l.x+=l.vx*=s:(l.x=l.fx,l.vx=0),r>1&&(null==l.fy?l.y+=l.vy*=s:(l.y=l.fy,l.vy=0)),r>2&&(null==l.fz?l.z+=l.vz*=s:(l.z=l.fz,l.vz=0));return e}function d(){for(var n,e=0,i=t.length;e<i;++e){if((n=t[e]).index=e,null!=n.fx&&(n.x=n.fx),null!=n.fy&&(n.y=n.fy),null!=n.fz&&(n.z=n.fz),isNaN(n.x)||r>1&&isNaN(n.y)||r>2&&isNaN(n.z)){var o=10*(r>2?Math.cbrt(e):r>1?Math.sqrt(e):e),a=e*zi,u=e*Ai;1===r?n.x=o:2===r?(n.x=o*Math.cos(a),n.y=o*Math.sin(a)):(n.x=o*Math.sin(a)*Math.cos(u),n.y=o*Math.cos(a),n.z=o*Math.sin(a)*Math.sin(u))}(isNaN(n.vx)||r>1&&isNaN(n.vy)||r>2&&isNaN(n.vz))&&(n.vx=0,r>1&&(n.vy=0),r>2&&(n.vz=0))}}function y(n){return n.initialize&&n.initialize(t,r),n}return null==t&&(t=[]),d(),e={tick:p,restart:function(){return l.restart(h),e},stop:function(){return l.stop(),e},numDimensions:function(t){return arguments.length?(r=Math.min(3,Math.max(1,Math.round(t))),c.forEach(y),e):r},nodes:function(n){return arguments.length?(t=n,d(),c.forEach(y),e):t},alpha:function(t){return arguments.length?(i=+t,e):i},alphaMin:function(t){return arguments.length?(o=+t,e):o},alphaDecay:function(t){return arguments.length?(a=+t,e):+a},alphaTarget:function(t){return arguments.length?(u=+t,e):u},velocityDecay:function(t){return arguments.length?(s=1-t,e):1-s},force:function(t,n){return arguments.length>1?(null==n?c.delete(t):c.set(t,y(n)),e):c.get(t)},find:function(){var n,e,i,o,a,u,s=Array.prototype.slice.call(arguments),c=s.shift()||0,l=(r>1?s.shift():null)||0,f=(r>2?s.shift():null)||0,h=s.shift()||1/0,p=0,d=t.length;for(h*=h,p=0;p<d;++p)(o=(n=c-(a=t[p]).x)*n+(e=l-(a.y||0))*e+(i=f-(a.z||0))*i)<h&&(u=a,h=o);return u},on:function(t,n){return arguments.length>1?(f.on(t,n),e):f.on(t)}}}function Si(){var t,n,e,r,i,o=gi(-30),a=1,u=1/0,s=.81;function c(i){var o,a=t.length,u=(1===n?Wr(t,xi):2===n?ri(t,xi,wi):3===n?hi(t,xi,wi,ki):null).visitAfter(f);for(r=i,o=0;o<a;++o)e=t[o],u.visit(h)}function l(){if(t){var n,e,r=t.length;for(i=new Array(r),n=0;n<r;++n)e=t[n],i[e.index]=+o(e,n,t)}}function f(t){var e,r,o,a,u,s,c=0,l=0,f=t.length;if(f){for(o=a=u=s=0;s<f;++s)(e=t[s])&&(r=Math.abs(e.value))&&(c+=e.value,l+=r,o+=r*(e.x||0),a+=r*(e.y||0),u+=r*(e.z||0));c*=Math.sqrt(4/f),t.x=o/l,n>1&&(t.y=a/l),n>2&&(t.z=u/l)}else{(e=t).x=e.data.x,n>1&&(e.y=e.data.y),n>2&&(e.z=e.data.z);do{c+=i[e.data.index]}while(e=e.next)}t.value=c}function h(t,o,c,l,f){if(!t.value)return!0;var h=[c,l,f][n-1],p=t.x-e.x,d=n>1?t.y-e.y:0,y=n>2?t.z-e.z:0,g=h-o,v=p*p+d*d+y*y;if(g*g/s<v)return v<u&&(0===p&&(v+=(p=vi())*p),n>1&&0===d&&(v+=(d=vi())*d),n>2&&0===y&&(v+=(y=vi())*y),v<a&&(v=Math.sqrt(a*v)),e.vx+=p*t.value*r/v,n>1&&(e.vy+=d*t.value*r/v),n>2&&(e.vz+=y*t.value*r/v)),!0;if(!(t.length||v>=u)){(t.data!==e||t.next)&&(0===p&&(v+=(p=vi())*p),n>1&&0===d&&(v+=(d=vi())*d),n>2&&0===y&&(v+=(y=vi())*y),v<a&&(v=Math.sqrt(a*v)));do{t.data!==e&&(g=i[t.data.index]*r/v,e.vx+=p*g,n>1&&(e.vy+=d*g),n>2&&(e.vz+=y*g))}while(t=t.next)}}return c.initialize=function(e,r){t=e,n=r,l()},c.strength=function(t){return arguments.length?(o="function"==typeof t?t:gi(+t),l(),c):o},c.distanceMin=function(t){return arguments.length?(a=t*t,c):Math.sqrt(a)},c.distanceMax=function(t){return arguments.length?(u=t*t,c):Math.sqrt(u)},c.theta=function(t){return arguments.length?(s=t*t,c):Math.sqrt(s)},c}var Mi=or((function(t){!function(){var n=Math.abs,e=Math.cos,r=Math.sin,i=Math.acos,o=Math.atan2,a=Math.sqrt,u=Math.pow,s=function(t){return t<0?-u(-t,1/3):u(t,1/3)},c=Math.PI,l=2*c,f=c/2,h=Number.MAX_SAFE_INTEGER||9007199254740991,p=Number.MIN_SAFE_INTEGER||-9007199254740991,d={x:0,y:0,z:0},y={Tvalues:[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213],Cvalues:[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872],arcfn:function(t,n){var e=n(t),r=e.x*e.x+e.y*e.y;return void 0!==e.z&&(r+=e.z*e.z),a(r)},compute:function(t,n,e){if(0===t)return n[0];var r=n.length-1;if(1===t)return n[r];var i=n,o=1-t;if(0===r)return n[0];if(1===r)return h={x:o*i[0].x+t*i[1].x,y:o*i[0].y+t*i[1].y},e&&(h.z=o*i[0].z+t*i[1].z),h;if(r<4){var a,u,s,c=o*o,l=t*t,f=0;2===r?(i=[i[0],i[1],i[2],d],a=c,u=o*t*2,s=l):3===r&&(a=c*o,u=c*t*3,s=o*l*3,f=t*l);var h={x:a*i[0].x+u*i[1].x+s*i[2].x+f*i[3].x,y:a*i[0].y+u*i[1].y+s*i[2].y+f*i[3].y};return e&&(h.z=a*i[0].z+u*i[1].z+s*i[2].z+f*i[3].z),h}for(var p=JSON.parse(JSON.stringify(n));p.length>1;){for(var y=0;y<p.length-1;y++)p[y]={x:p[y].x+(p[y+1].x-p[y].x)*t,y:p[y].y+(p[y+1].y-p[y].y)*t},void 0!==p[y].z&&(p[y]=p[y].z+(p[y+1].z-p[y].z)*t);p.splice(p.length-1,1)}return p[0]},computeWithRatios:function(t,n,e,r){var i,o=1-t,a=e,u=n,s=a[0],c=a[1],l=a[2],f=a[3];return s*=o,c*=t,2===u.length?(i=s+c,{x:(s*u[0].x+c*u[1].x)/i,y:(s*u[0].y+c*u[1].y)/i,z:!!r&&(s*u[0].z+c*u[1].z)/i}):(s*=o,c*=2*o,l*=t*t,3===u.length?(i=s+c+l,{x:(s*u[0].x+c*u[1].x+l*u[2].x)/i,y:(s*u[0].y+c*u[1].y+l*u[2].y)/i,z:!!r&&(s*u[0].z+c*u[1].z+l*u[2].z)/i}):(s*=o,c*=1.5*o,l*=3*o,f*=t*t*t,4===u.length?(i=s+c+l+f,{x:(s*u[0].x+c*u[1].x+l*u[2].x+f*u[3].x)/i,y:(s*u[0].y+c*u[1].y+l*u[2].y+f*u[3].y)/i,z:!!r&&(s*u[0].z+c*u[1].z+l*u[2].z+f*u[3].z)/i}):void 0))},derive:function(t,n){for(var e=[],r=t,i=r.length,o=i-1;i>1;i--,o--){for(var a,u=[],s=0;s<o;s++)a={x:o*(r[s+1].x-r[s].x),y:o*(r[s+1].y-r[s].y)},n&&(a.z=o*(r[s+1].z-r[s].z)),u.push(a);e.push(u),r=u}return e},between:function(t,n,e){return n<=t&&t<=e||y.approximately(t,n)||y.approximately(t,e)},approximately:function(t,e,r){return n(t-e)<=(r||1e-6)},length:function(t){var n,e,r=0,i=y.Tvalues.length;for(n=0;n<i;n++)e=.5*y.Tvalues[n]+.5,r+=y.Cvalues[n]*y.arcfn(e,t);return.5*r},map:function(t,n,e,r,i){return r+(i-r)*((t-n)/(e-n))},lerp:function(t,n,e){var r={x:n.x+t*(e.x-n.x),y:n.y+t*(e.y-n.y)};return n.z&&e.z&&(r.z=n.z+t*(e.z-n.z)),r},pointToString:function(t){var n=t.x+"/"+t.y;return void 0!==t.z&&(n+="/"+t.z),n},pointsToString:function(t){return"["+t.map(y.pointToString).join(", ")+"]"},copy:function(t){return JSON.parse(JSON.stringify(t))},angle:function(t,n,e){var r=n.x-t.x,i=n.y-t.y,a=e.x-t.x,u=e.y-t.y;return o(r*u-i*a,r*a+i*u)},round:function(t,n){var e=""+t,r=e.indexOf(".");return parseFloat(e.substring(0,r+1+n))},dist:function(t,n){var e=t.x-n.x,r=t.y-n.y;return a(e*e+r*r)},closest:function(t,n){var e,r,i=u(2,63);return t.forEach((function(t,o){(r=y.dist(n,t))<i&&(i=r,e=o)})),{mdist:i,mpos:e}},abcratio:function(t,e){if(2!==e&&3!==e)return!1;if(void 0===t)t=.5;else if(0===t||1===t)return t;var r=u(t,e)+u(1-t,e);return n((r-1)/r)},projectionratio:function(t,n){if(2!==n&&3!==n)return!1;if(void 0===t)t=.5;else if(0===t||1===t)return t;var e=u(1-t,n);return e/(u(t,n)+e)},lli8:function(t,n,e,r,i,o,a,u){var s=(t-e)*(o-u)-(n-r)*(i-a);return 0!=s&&{x:((t*r-n*e)*(i-a)-(t-e)*(i*u-o*a))/s,y:((t*r-n*e)*(o-u)-(n-r)*(i*u-o*a))/s}},lli4:function(t,n,e,r){var i=t.x,o=t.y,a=n.x,u=n.y,s=e.x,c=e.y,l=r.x,f=r.y;return y.lli8(i,o,a,u,s,c,l,f)},lli:function(t,n){return y.lli4(t,t.c,n,n.c)},makeline:function(t,n){var e=Pi,r=t.x,i=t.y,o=n.x,a=n.y,u=(o-r)/3,s=(a-i)/3;return new e(r,i,r+u,i+s,r+2*u,i+2*s,o,a)},findbbox:function(t){var n=h,e=h,r=p,i=p;return t.forEach((function(t){var o=t.bbox();n>o.x.min&&(n=o.x.min),e>o.y.min&&(e=o.y.min),r<o.x.max&&(r=o.x.max),i<o.y.max&&(i=o.y.max)})),{x:{min:n,mid:(n+r)/2,max:r,size:r-n},y:{min:e,mid:(e+i)/2,max:i,size:i-e}}},shapeintersections:function(t,n,e,r,i){if(!y.bboxoverlap(n,r))return[];var o=[],a=[t.startcap,t.forward,t.back,t.endcap],u=[e.startcap,e.forward,e.back,e.endcap];return a.forEach((function(n){n.virtual||u.forEach((function(r){if(!r.virtual){var a=n.intersects(r,i);a.length>0&&(a.c1=n,a.c2=r,a.s1=t,a.s2=e,o.push(a))}}))})),o},makeshape:function(t,n,e){var r=n.points.length,i=t.points.length,o=y.makeline(n.points[r-1],t.points[0]),a=y.makeline(t.points[i-1],n.points[0]),u={startcap:o,forward:t,back:n,endcap:a,bbox:y.findbbox([o,t,n,a])},s=y;return u.intersections=function(t){return s.shapeintersections(u,u.bbox,t,t.bbox,e)},u},getminmax:function(t,n,e){if(!e)return{min:0,max:0};var r,i,o=h,a=p;-1===e.indexOf(0)&&(e=[0].concat(e)),-1===e.indexOf(1)&&e.push(1);for(var u=0,s=e.length;u<s;u++)r=e[u],(i=t.get(r))[n]<o&&(o=i[n]),i[n]>a&&(a=i[n]);return{min:o,mid:(o+a)/2,max:a,size:a-o}},align:function(t,n){var i=n.p1.x,a=n.p1.y,u=-o(n.p2.y-a,n.p2.x-i);return t.map((function(t){return{x:(t.x-i)*e(u)-(t.y-a)*r(u),y:(t.x-i)*r(u)+(t.y-a)*e(u)}}))},roots:function(t,n){n=n||{p1:{x:0,y:0},p2:{x:1,y:0}};var r=t.length-1,o=y.align(t,n),u=function(t){return 0<=t&&t<=1};if(2===r){if(0!==(g=(v=o[0].y)-2*(m=o[1].y)+(_=o[2].y))){var c=-a(m*m-v*_),f=-v+m;return[-(c+f)/g,-(-c+f)/g].filter(u)}return m!==_&&0===g?[(2*m-_)/(2*m-2*_)].filter(u):[]}var h=o[0].y,p=o[1].y,d=o[2].y,g=3*p-h-3*d+o[3].y,v=3*h-6*p+3*d,m=-3*h+3*p,_=h;if(y.approximately(g,0)){if(y.approximately(v,0))return y.approximately(m,0)?[]:[-_/m].filter(u);var b=2*v;return[((x=a(m*m-4*v*_))-m)/b,(-m-x)/b].filter(u)}var x,w,k=(o=(3*(m/=g)-(v/=g)*v)/3)/3,z=(x=(2*v*v*v-9*v*m+27*(_/=g))/27)/2,A=z*z+k*k*k;if(A<0){var O=-o/3,S=a(O*O*O),M=-x/(2*S),E=i(M<-1?-1:M>1?1:M),C=2*s(S);return[C*e(E/3)-v/3,C*e((E+l)/3)-v/3,C*e((E+2*l)/3)-v/3].filter(u)}if(0===A)return[2*(w=z<0?s(-z):-s(z))-v/3,-w-v/3].filter(u);var T=a(A);return[(w=s(-z+T))-s(z+T)-v/3].filter(u)},droots:function(t){if(3===t.length){var n=t[0],e=t[1],r=t[2],i=n-2*e+r;if(0!==i){var o=-a(e*e-n*r),u=-n+e;return[-(o+u)/i,-(-o+u)/i]}return e!==r&&0===i?[(2*e-r)/(2*(e-r))]:[]}if(2===t.length)return(n=t[0])!==(e=t[1])?[n/(n-e)]:[]},curvature:function(t,e,r,i){var o,s,c,l,f,h,p=y.derive(e),d=p[0],g=p[1],v=y.compute(t,d),m=y.compute(t,g),_=v.x*v.x+v.y*v.y;if(r?(o=a(u(v.y*m.z-m.y*v.z,2)+u(v.z*m.x-m.z*v.x,2)+u(v.x*m.y-m.x*v.y,2)),s=u(_+v.z*v.z,1.5)):(o=v.x*m.y-v.y*m.x,s=u(_,1.5)),0===o||0===s)return{k:0,r:0};if(f=o/s,h=s/o,!i){var b=y.curvature(t-.001,e,r,!0).k,x=y.curvature(t+.001,e,r,!0).k;l=(x-f+(f-b))/2,c=(n(x-f)+n(f-b))/2}return{k:f,r:h,dk:l,adk:c}},inflections:function(t){if(t.length<4)return[];var n=y.align(t,{p1:t[0],p2:t.slice(-1)[0]}),e=n[2].x*n[1].y,r=n[3].x*n[1].y,i=n[1].x*n[2].y,o=18*(-3*e+2*r+3*i-(f=n[3].x*n[2].y)),a=18*(3*e-r-3*i),u=18*(i-e);if(y.approximately(o,0)){if(!y.approximately(a,0)){var s=-u/a;if(0<=s&&s<=1)return[s]}return[]}var c=a*a-4*o*u,l=Math.sqrt(c),f=2*o;return y.approximately(f,0)?[]:[(l-a)/f,-(a+l)/f].filter((function(t){return 0<=t&&t<=1}))},bboxoverlap:function(t,e){var r,i,o,a,u,s=["x","y"],c=s.length;for(r=0;r<c;r++)if(o=t[i=s[r]].mid,a=e[i].mid,u=(t[i].size+e[i].size)/2,n(o-a)>=u)return!1;return!0},expandbox:function(t,n){n.x.min<t.x.min&&(t.x.min=n.x.min),n.y.min<t.y.min&&(t.y.min=n.y.min),n.z&&n.z.min<t.z.min&&(t.z.min=n.z.min),n.x.max>t.x.max&&(t.x.max=n.x.max),n.y.max>t.y.max&&(t.y.max=n.y.max),n.z&&n.z.max>t.z.max&&(t.z.max=n.z.max),t.x.mid=(t.x.min+t.x.max)/2,t.y.mid=(t.y.min+t.y.max)/2,t.z&&(t.z.mid=(t.z.min+t.z.max)/2),t.x.size=t.x.max-t.x.min,t.y.size=t.y.max-t.y.min,t.z&&(t.z.size=t.z.max-t.z.min)},pairiteration:function(t,n,e){var r=t.bbox(),i=n.bbox(),o=1e5,a=e||.5;if(r.x.size+r.y.size<a&&i.x.size+i.y.size<a)return[(o*(t._t1+t._t2)/2|0)/o+"/"+(o*(n._t1+n._t2)/2|0)/o];var u=t.split(.5),s=n.split(.5),c=[{left:u.left,right:s.left},{left:u.left,right:s.right},{left:u.right,right:s.right},{left:u.right,right:s.left}];c=c.filter((function(t){return y.bboxoverlap(t.left.bbox(),t.right.bbox())}));var l=[];return 0===c.length?l:(c.forEach((function(t){l=l.concat(y.pairiteration(t.left,t.right,a))})),l=l.filter((function(t,n){return l.indexOf(t)===n})))},getccenter:function(t,n,i){var a,u=n.x-t.x,s=n.y-t.y,c=i.x-n.x,h=i.y-n.y,p=u*e(f)-s*r(f),d=u*r(f)+s*e(f),g=c*e(f)-h*r(f),v=c*r(f)+h*e(f),m=(t.x+n.x)/2,_=(t.y+n.y)/2,b=(n.x+i.x)/2,x=(n.y+i.y)/2,w=m+p,k=_+d,z=b+g,A=x+v,O=y.lli8(m,_,w,k,b,x,z,A),S=y.dist(O,t),M=o(t.y-O.y,t.x-O.x),E=o(n.y-O.y,n.x-O.x),C=o(i.y-O.y,i.x-O.x);return M<C?((M>E||E>C)&&(M+=l),M>C&&(a=C,C=M,M=a)):C<E&&E<M?(a=C,C=M,M=a):C+=l,O.s=M,O.e=C,O.r=S,O},numberSort:function(t,n){return t-n}};t.exports=y}()})),Ei=or((function(t){var n,e;n=Mi,(e=function(t){this.curves=[],this._3d=!1,t&&(this.curves=t,this._3d=this.curves[0]._3d)}).prototype={valueOf:function(){return this.toString()},toString:function(){return"["+this.curves.map((function(t){return n.pointsToString(t.points)})).join(", ")+"]"},addCurve:function(t){this.curves.push(t),this._3d=this._3d||t._3d},length:function(){return this.curves.map((function(t){return t.length()})).reduce((function(t,n){return t+n}))},curve:function(t){return this.curves[t]},bbox:function(){for(var t=this.curves,e=t[0].bbox(),r=1;r<t.length;r++)n.expandbox(e,t[r].bbox());return e},offset:function(t){var n=[];return this.curves.forEach((function(e){n=n.concat(e.offset(t))})),new e(n)}},t.exports=e}));var Ci=function(t){var n,e,r,i,o,a,u=(t=t.replace(/,/g," ").replace(/-/g," - ").replace(/-\s+/g,"-").replace(/([a-zA-Z])/g," $1 ")).replace(/([a-zA-Z])\s?/g,"|$1").split("|"),s=u.length,c=[],l=0,f=0,h=0,p=0,d=0,y=0,g=0,v=0,m="";for(n=1;n<s;n++)if(i=(r=(e=u[n]).substring(0,1)).toLowerCase(),o=(c=(c=e.replace(r,"").trim().split(" ")).filter((function(t){return""!==t})).map(parseFloat)).length,"m"===i){if(m+="M ","m"===r?(h+=c[0],p+=c[1]):(h=c[0],p=c[1]),l=h,f=p,m+=h+" "+p+" ",o>2)for(a=0;a<o;a+=2)"m"===r?(h+=c[a],p+=c[a+1]):(h=c[a],p=c[a+1]),m+=["L",h,p,""].join(" ")}else if("l"===i)for(a=0;a<o;a+=2)"l"===r?(h+=c[a],p+=c[a+1]):(h=c[a],p=c[a+1]),m+=["L",h,p,""].join(" ");else if("h"===i)for(a=0;a<o;a++)"h"===r?h+=c[a]:h=c[a],m+=["L",h,p,""].join(" ");else if("v"===i)for(a=0;a<o;a++)"v"===r?p+=c[a]:p=c[a],m+=["L",h,p,""].join(" ");else if("q"===i)for(a=0;a<o;a+=4)"q"===r?(d=h+c[a],y=p+c[a+1],h+=c[a+2],p+=c[a+3]):(d=c[a],y=c[a+1],h=c[a+2],p=c[a+3]),m+=["Q",d,y,h,p,""].join(" ");else if("t"===i)for(a=0;a<o;a+=2)d=h+(h-d),y=p+(p-y),"t"===r?(h+=c[a],p+=c[a+1]):(h=c[a],p=c[a+1]),m+=["Q",d,y,h,p,""].join(" ");else if("c"===i)for(a=0;a<o;a+=6)"c"===r?(d=h+c[a],y=p+c[a+1],g=h+c[a+2],v=p+c[a+3],h+=c[a+4],p+=c[a+5]):(d=c[a],y=c[a+1],g=c[a+2],v=c[a+3],h=c[a+4],p=c[a+5]),m+=["C",d,y,g,v,h,p,""].join(" ");else if("s"===i)for(a=0;a<o;a+=4)d=h+(h-g),y=p+(p-v),"s"===r?(g=h+c[a],v=p+c[a+1],h+=c[a+2],p+=c[a+3]):(g=c[a],v=c[a+1],h=c[a+2],p=c[a+3]),m+=["C",d,y,g,v,h,p,""].join(" ");else"z"===i&&(m+="Z ",h=l,p=f);return m.trim()},Ti={x:!1,y:!1};function ji(t,n,e){if("Z"!==n){if("M"!==n){var r=[!1,Ti.x,Ti.y].concat(e),i=new(t.bind.apply(t,r)),o=e.slice(-2);return Ti={x:o[0],y:o[1]},i}Ti={x:e[0],y:e[1]}}}var Ni=function(t,n){for(var e,r,i=Ci(n).split(" "),o=new RegExp("[MLCQZ]",""),a=[],u={C:6,Q:4,L:2,M:2};i.length;)e=i.splice(0,1)[0],o.test(e)&&(r=ji(t,e,i.splice(0,u[e]).map(parseFloat)))&&a.push(r);return new t.PolyBezier(a)},Pi=or((function(t){!function(){var n=Math.abs,e=Math.min,r=Math.max,i=Math.cos,o=Math.sin,a=Math.acos,u=Math.sqrt,s=Math.PI,c={x:0,y:0,z:0},l=Mi,f=Ei,h=function(t){var e=t&&t.forEach?t:[].slice.call(arguments),r=!1;if("object"==typeof e[0]){r=e.length;var i=[];e.forEach((function(t){["x","y","z"].forEach((function(n){void 0!==t[n]&&i.push(t[n])}))})),e=i}var o=!1,a=e.length;if(r){if(r>4){if(1!==arguments.length)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");o=!0}}else if(6!==a&&8!==a&&9!==a&&12!==a&&1!==arguments.length)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");var u=!o&&(9===a||12===a)||t&&t[0]&&void 0!==t[0].z;this._3d=u;for(var s=[],c=0,f=u?3:2;c<a;c+=f){var h={x:e[c],y:e[c+1]};u&&(h.z=e[c+2]),s.push(h)}this.order=s.length-1,this.points=s;var p=["x","y"];u&&p.push("z"),this.dims=p,this.dimlen=p.length,function(t){for(var e=t.order,r=t.points,i=l.align(r,{p1:r[0],p2:r[e]}),o=0;o<i.length;o++)if(n(i[o].y)>1e-4)return void(t._linear=!1);t._linear=!0}(this),this._t1=0,this._t2=1,this.update()},p=Ni;function d(t,n,e,r,i){void 0===i&&(i=.5);var o=l.projectionratio(i,t),a=1-o,u={x:o*n.x+a*r.x,y:o*n.y+a*r.y},s=l.abcratio(i,t);return{A:{x:e.x+(e.x-u.x)/s,y:e.y+(e.y-u.y)/s},B:e,C:u}}h.SVGtoBeziers=function(t){return p(h,t)},h.quadraticFromPoints=function(t,n,e,r){if(void 0===r&&(r=.5),0===r)return new h(n,n,e);if(1===r)return new h(t,n,n);var i=d(2,t,n,e,r);return new h(t,i.A,e)},h.cubicFromPoints=function(t,n,e,r,i){void 0===r&&(r=.5);var o=d(3,t,n,e,r);void 0===i&&(i=l.dist(n,o.C));var a=i*(1-r)/r,u=l.dist(t,e),s=(e.x-t.x)/u,c=(e.y-t.y)/u,f=i*s,p=i*c,y=a*s,g=a*c,v=n.x-f,m=n.y-p,_=n.x+y,b=n.y+g,x=o.A,w=x.x+(v-x.x)/(1-r),k=x.y+(m-x.y)/(1-r),z=x.x+(_-x.x)/r,A=x.y+(b-x.y)/r,O={x:t.x+(w-t.x)/r,y:t.y+(k-t.y)/r},S={x:e.x+(z-e.x)/(1-r),y:e.y+(A-e.y)/(1-r)};return new h(t,O,S,e)};var y=function(){return l};h.getUtils=y,h.PolyBezier=f,h.prototype={getUtils:y,valueOf:function(){return this.toString()},toString:function(){return l.pointsToString(this.points)},toSVG:function(t){if(this._3d)return!1;for(var n=this.points,e=["M",n[0].x,n[0].y,2===this.order?"Q":"C"],r=1,i=n.length;r<i;r++)e.push(n[r].x),e.push(n[r].y);return e.join(" ")},setRatios:function(t){if(t.length!==this.points.length)throw new Error("incorrect number of ratio values");this.ratios=t,this._lut=[]},verify:function(){var t=this.coordDigest();t!==this._print&&(this._print=t,this.update())},coordDigest:function(){return this.points.map((function(t,n){return""+n+t.x+t.y+(t.z?t.z:0)})).join("")},update:function(t){this._lut=[],this.dpoints=l.derive(this.points,this._3d),this.computedirection()},computedirection:function(){var t=this.points,n=l.angle(t[0],t[this.order],t[1]);this.clockwise=n>0},length:function(){return l.length(this.derivative.bind(this))},_lut:[],getLUT:function(t){if(this.verify(),t=t||100,this._lut.length===t)return this._lut;this._lut=[],t--;for(var n=0;n<=t;n++)this._lut.push(this.compute(n/t));return this._lut},on:function(t,n){n=n||5;for(var e,r=this.getLUT(),i=[],o=0,a=0;a<r.length;a++)e=r[a],l.dist(e,t)<n&&(i.push(e),o+=a/r.length);return!!i.length&&o/i.length},project:function(t){var n,e,r,i,o=this.getLUT(),a=o.length-1,u=l.closest(o,t),s=u.mdist,c=u.mpos,f=(c+1)/a,h=.1/a;for(s+=1,n=e=(c-1)/a;e<f+h;e+=h)r=this.compute(e),(i=l.dist(t,r))<s&&(s=i,n=e);return(r=this.compute(n)).t=n,r.d=s,r},get:function(t){return this.compute(t)},point:function(t){return this.points[t]},compute:function(t){return this.ratios?l.computeWithRatios(t,this.points,this.ratios,this._3d):l.compute(t,this.points,this._3d,this.ratios)},raise:function(){for(var t,n,e=this.points,r=[e[0]],i=e.length,o=1;o<i;o++)t=e[o],n=e[o-1],r[o]={x:(i-o)/i*t.x+o/i*n.x,y:(i-o)/i*t.y+o/i*n.y};return r[i]=e[i-1],new h(r)},derivative:function(t){var n,e,r=1-t,i=0,o=this.dpoints[0];2===this.order&&(o=[o[0],o[1],c],n=r,e=t),3===this.order&&(n=r*r,e=r*t*2,i=t*t);var a={x:n*o[0].x+e*o[1].x+i*o[2].x,y:n*o[0].y+e*o[1].y+i*o[2].y};return this._3d&&(a.z=n*o[0].z+e*o[1].z+i*o[2].z),a},curvature:function(t){return l.curvature(t,this.points,this._3d)},inflections:function(){return l.inflections(this.points)},normal:function(t){return this._3d?this.__normal3(t):this.__normal2(t)},__normal2:function(t){var n=this.derivative(t),e=u(n.x*n.x+n.y*n.y);return{x:-n.y/e,y:n.x/e}},__normal3:function(t){var n=this.derivative(t),e=this.derivative(t+.01),r=u(n.x*n.x+n.y*n.y+n.z*n.z),i=u(e.x*e.x+e.y*e.y+e.z*e.z);n.x/=r,n.y/=r,n.z/=r,e.x/=i,e.y/=i,e.z/=i;var o={x:e.y*n.z-e.z*n.y,y:e.z*n.x-e.x*n.z,z:e.x*n.y-e.y*n.x},a=u(o.x*o.x+o.y*o.y+o.z*o.z);o.x/=a,o.y/=a,o.z/=a;var s=[o.x*o.x,o.x*o.y-o.z,o.x*o.z+o.y,o.x*o.y+o.z,o.y*o.y,o.y*o.z-o.x,o.x*o.z-o.y,o.y*o.z+o.x,o.z*o.z];return{x:s[0]*n.x+s[1]*n.y+s[2]*n.z,y:s[3]*n.x+s[4]*n.y+s[5]*n.z,z:s[6]*n.x+s[7]*n.y+s[8]*n.z}},hull:function(t){var n,e=this.points,r=[],i=[],o=0,a=0,u=0;for(i[o++]=e[0],i[o++]=e[1],i[o++]=e[2],3===this.order&&(i[o++]=e[3]);e.length>1;){for(r=[],a=0,u=e.length-1;a<u;a++)n=l.lerp(t,e[a],e[a+1]),i[o++]=n,r.push(n);e=r}return i},split:function(t,n){if(0===t&&n)return this.split(n).left;if(1===n)return this.split(t).right;var e=this.hull(t),r={left:2===this.order?new h([e[0],e[3],e[5]]):new h([e[0],e[4],e[7],e[9]]),right:2===this.order?new h([e[5],e[4],e[2]]):new h([e[9],e[8],e[6],e[3]]),span:e};return r.left._t1=l.map(0,0,1,this._t1,this._t2),r.left._t2=l.map(t,0,1,this._t1,this._t2),r.right._t1=l.map(t,0,1,this._t1,this._t2),r.right._t2=l.map(1,0,1,this._t1,this._t2),n?(n=l.map(n,t,1,0,1),r.right.split(n).left):r},extrema:function(){var t,n,e=this.dims,r={},i=[];return e.forEach(function(e){n=function(t){return t[e]},t=this.dpoints[0].map(n),r[e]=l.droots(t),3===this.order&&(t=this.dpoints[1].map(n),r[e]=r[e].concat(l.droots(t))),r[e]=r[e].filter((function(t){return t>=0&&t<=1})),i=i.concat(r[e].sort(l.numberSort))}.bind(this)),i=i.sort(l.numberSort).filter((function(t,n){return i.indexOf(t)===n})),r.values=i,r},bbox:function(){var t=this.extrema(),n={};return this.dims.forEach(function(e){n[e]=l.getminmax(this,e,t[e])}.bind(this)),n},overlaps:function(t){var n=this.bbox(),e=t.bbox();return l.bboxoverlap(n,e)},offset:function(t,n){if(void 0!==n){var e=this.get(t),r=this.normal(t),i={c:e,n:r,x:e.x+r.x*n,y:e.y+r.y*n};return this._3d&&(i.z=e.z+r.z*n),i}if(this._linear){var o=this.normal(0),a=this.points.map((function(n){var e={x:n.x+t*o.x,y:n.y+t*o.y};return n.z&&r.z&&(e.z=n.z+t*o.z),e}));return[new h(a)]}return this.reduce().map((function(n){return n._linear?n.offset(t)[0]:n.scale(t)}))},simple:function(){if(3===this.order){var t=l.angle(this.points[0],this.points[3],this.points[1]),e=l.angle(this.points[0],this.points[3],this.points[2]);if(t>0&&e<0||t<0&&e>0)return!1}var r=this.normal(0),i=this.normal(1),o=r.x*i.x+r.y*i.y;return this._3d&&(o+=r.z*i.z),n(a(o))<s/3},reduce:function(){var t,e,r=0,i=0,o=[],a=[],u=this.extrema().values;for(-1===u.indexOf(0)&&(u=[0].concat(u)),-1===u.indexOf(1)&&u.push(1),r=u[0],t=1;t<u.length;t++)i=u[t],(e=this.split(r,i))._t1=r,e._t2=i,o.push(e),r=i;return o.forEach((function(t){for(r=0,i=0;i<=1;)for(i=r+.01;i<=1.01;i+=.01)if(!(e=t.split(r,i)).simple()){if(n(r-(i-=.01))<.01)return[];(e=t.split(r,i))._t1=l.map(r,0,1,t._t1,t._t2),e._t2=l.map(i,0,1,t._t1,t._t2),a.push(e),r=i;break}r<1&&((e=t.split(r,1))._t1=l.map(r,0,1,t._t1,t._t2),e._t2=t._t2,a.push(e))})),a},scale:function(t){var n=this.order,e=!1;if("function"==typeof t&&(e=t),e&&2===n)return this.raise().scale(e);var r=this.clockwise,i=e?e(0):t,o=e?e(1):t,a=[this.offset(0,10),this.offset(1,10)],s=l.lli4(a[0],a[0].c,a[1],a[1].c);if(!s)throw new Error("cannot scale this curve. Try reducing it first.");var c=this.points,f=[];return[0,1].forEach(function(t){var e=f[t*n]=l.copy(c[t*n]);e.x+=(t?o:i)*a[t].n.x,e.y+=(t?o:i)*a[t].n.y}.bind(this)),e?([0,1].forEach(function(i){if(2!==this.order||!i){var o=c[i+1],a={x:o.x-s.x,y:o.y-s.y},l=e?e((i+1)/n):t;e&&!r&&(l=-l);var h=u(a.x*a.x+a.y*a.y);a.x/=h,a.y/=h,f[i+1]={x:o.x+l*a.x,y:o.y+l*a.y}}}.bind(this)),new h(f)):([0,1].forEach(function(t){if(2!==this.order||!t){var e=f[t*n],r=this.derivative(t),i={x:e.x+r.x,y:e.y+r.y};f[t+1]=l.lli4(e,i,s,c[t+1])}}.bind(this)),new h(f))},outline:function(t,n,e,r){n=void 0===n?t:n;var i,o=this.reduce(),a=o.length,u=[],s=[],c=0,h=this.length(),p=void 0!==e&&void 0!==r;function d(t,n,e,r,i){return function(o){var a=r/e,u=(r+i)/e,s=n-t;return l.map(o,0,1,t+a*s,t+u*s)}}o.forEach((function(i){w=i.length(),p?(u.push(i.scale(d(t,e,h,c,w))),s.push(i.scale(d(-n,-r,h,c,w)))):(u.push(i.scale(t)),s.push(i.scale(-n))),c+=w})),s=s.map((function(t){return(i=t.points)[3]?t.points=[i[3],i[2],i[1],i[0]]:t.points=[i[2],i[1],i[0]],t})).reverse();var y=u[0].points[0],g=u[a-1].points[u[a-1].points.length-1],v=s[a-1].points[s[a-1].points.length-1],m=s[0].points[0],_=l.makeline(v,y),b=l.makeline(g,m),x=[_].concat(u).concat([b]).concat(s),w=x.length;return new f(x)},outlineshapes:function(t,n,e){n=n||t;for(var r=this.outline(t,n).curves,i=[],o=1,a=r.length;o<a/2;o++){var u=l.makeshape(r[o],r[a-o],e);u.startcap.virtual=o>1,u.endcap.virtual=o<a/2-1,i.push(u)}return i},intersects:function(t,n){return t?t.p1&&t.p2?this.lineIntersects(t):(t instanceof h&&(t=t.reduce()),this.curveintersects(this.reduce(),t,n)):this.selfintersects(n)},lineIntersects:function(t){var n=e(t.p1.x,t.p2.x),i=e(t.p1.y,t.p2.y),o=r(t.p1.x,t.p2.x),a=r(t.p1.y,t.p2.y),u=this;return l.roots(this.points,t).filter((function(t){var e=u.get(t);return l.between(e.x,n,o)&&l.between(e.y,i,a)}))},selfintersects:function(t){var n,e,r,i,o=this.reduce(),a=o.length-2,u=[];for(n=0;n<a;n++)r=o.slice(n,n+1),i=o.slice(n+2),e=this.curveintersects(r,i,t),u=u.concat(e);return u},curveintersects:function(t,n,e){var r=[];t.forEach((function(t){n.forEach((function(n){t.overlaps(n)&&r.push({left:t,right:n})}))}));var i=[];return r.forEach((function(t){var n=l.pairiteration(t.left,t.right,e);n.length>0&&(i=i.concat(n))})),i},arcs:function(t){t=t||.5;return this._iterate(t,[])},_error:function(t,e,r,i){var o=(i-r)/4,a=this.get(r+o),u=this.get(i-o),s=l.dist(t,e),c=l.dist(t,a),f=l.dist(t,u);return n(c-s)+n(f-s)},_iterate:function(t,n){var e,r=0,a=1;do{e=0,a=1;var u,s,c,f,h,p=this.get(r),d=!1,y=!1,g=a,v=1;do{if(y=d,f=c,g=(r+a)/2,u=this.get(g),s=this.get(a),(c=l.getccenter(p,u,s)).interval={start:r,end:a},d=this._error(c,p,r,a)<=t,(h=y&&!d)||(v=a),d){if(a>=1){if(c.interval.end=v=1,f=c,a>1){var m={x:c.x+c.r*i(c.e),y:c.y+c.r*o(c.e)};c.e+=l.angle({x:c.x,y:c.y},m,this.get(1))}break}a+=(a-r)/2}else a=g}while(!h&&e++<100);if(e>=100)break;f=f||c,n.push(f),r=v}while(a<1);return n}},t.exports=h}()})),Ri=Pi;function Ii(t,n){if(null==t)return{};var e,r,i=function(t,n){if(null==t)return{};var e,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)e=o[r],n.indexOf(e)>=0||(i[e]=t[e]);return i}(t,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)e=o[r],n.indexOf(e)>=0||Object.prototype.propertyIsEnumerable.call(t,e)&&(i[e]=t[e])}return i}function Di(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){if(!(Symbol.iterator in Object(t))&&"[object Arguments]"!==Object.prototype.toString.call(t))return;var e=[],r=!0,i=!1,o=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done)&&(e.push(a.value),!n||e.length!==n);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return e}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Ui(t){return function(t){if(Array.isArray(t)){for(var n=0,e=new Array(t.length);n<t.length;n++)e[n]=t[n];return e}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function Fi(t){var n=function(t,n){if("object"!=typeof t||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,n||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"==typeof n?n:String(n)}function Li(t,n){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(n).domain(t)}return this}const qi=Symbol("implicit");var Bi=function(t){for(var n=t.length/6|0,e=new Array(n),r=0;r<n;)e[r]="#"+t.slice(6*r,6*++r);return e}("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");function Hi(t){return(Hi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Vi(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function $i(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function Gi(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?$i(Object(e),!0).forEach((function(n){Vi(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):$i(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}function Xi(t,n){return(Xi=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function Yi(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function Wi(t,n,e){return(Wi=Yi()?Reflect.construct:function(t,n,e){var r=[null];r.push.apply(r,n);var i=new(Function.bind.apply(t,r));return e&&Xi(i,e.prototype),i}).apply(null,arguments)}function Zi(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var e=[],r=!0,i=!1,o=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done)&&(e.push(a.value),!n||e.length!==n);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return e}(t,n)||Ji(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qi(t){return function(t){if(Array.isArray(t))return Ki(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||Ji(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ji(t,n){if(t){if("string"==typeof t)return Ki(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Ki(t,n):void 0}}function Ki(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}!function(t,n){void 0===n&&(n={});var e=n.insertAt;if(t&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===e&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t))}}("canvas {\n user-select: none;\n outline: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.graph-tooltip {\n position: absolute;\n transform: translate(-50%, 25px);\n font-family: sans-serif;\n font-size: 16px;\n padding: 4px;\n border-radius: 3px;\n color: #eee;\n background: rgba(0,0,0,0.65);\n visibility: hidden; /* by default */\n}\n\n.grabbable {\n cursor: move;\n cursor: grab;\n cursor: -moz-grab;\n cursor: -webkit-grab;\n}\n\n.grabbable:active {\n cursor: grabbing;\n cursor: -moz-grabbing;\n cursor: -webkit-grabbing;\n}\n");var to=function t(){var n=new Map,e=[],r=[],i=qi;function o(t){var o=t+"",a=n.get(o);if(!a){if(i!==qi)return i;n.set(o,a=e.push(t))}return r[(a-1)%r.length]}return o.domain=function(t){if(!arguments.length)return e.slice();e=[],n=new Map;for(const r of t){const t=r+"";n.has(t)||n.set(t,e.push(r))}return o},o.range=function(t){return arguments.length?(r=Array.from(t),o):r.slice()},o.unknown=function(t){return arguments.length?(i=t,o):i},o.copy=function(){return t(e,r).unknown(i)},Li.apply(o,arguments),o}(Bi);function no(t,n,e){n&&"string"==typeof e&&t.filter((function(t){return!t[e]})).forEach((function(t){t[e]=to(n(t))}))}var eo=Ir({props:{graphData:{default:{nodes:[],links:[]},onChange:function(t,n){n.engineRunning=!1}},dagMode:{onChange:function(t,n){!t&&(n.graphData.nodes||[]).forEach((function(t){return t.fx=t.fy=void 0}))}},dagLevelDistance:{},dagNodeFilter:{default:function(t){return!0}},onDagError:{triggerUpdate:!1},nodeRelSize:{default:4,triggerUpdate:!1},nodeId:{default:"id"},nodeVal:{default:"val",triggerUpdate:!1},nodeColor:{default:"color",triggerUpdate:!1},nodeAutoColorBy:{},nodeCanvasObject:{triggerUpdate:!1},nodeCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1},nodeVisibility:{default:!0,triggerUpdate:!1},linkSource:{default:"source"},linkTarget:{default:"target"},linkVisibility:{default:!0,triggerUpdate:!1},linkColor:{default:"color",triggerUpdate:!1},linkAutoColorBy:{},linkLineDash:{triggerUpdate:!1},linkWidth:{default:1,triggerUpdate:!1},linkCurvature:{default:0,triggerUpdate:!1},linkCanvasObject:{triggerUpdate:!1},linkCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1},linkDirectionalArrowLength:{default:0,triggerUpdate:!1},linkDirectionalArrowColor:{triggerUpdate:!1},linkDirectionalArrowRelPos:{default:.5,triggerUpdate:!1},linkDirectionalParticles:{default:0},linkDirectionalParticleSpeed:{default:.01,triggerUpdate:!1},linkDirectionalParticleWidth:{default:4,triggerUpdate:!1},linkDirectionalParticleColor:{triggerUpdate:!1},globalScale:{default:1,triggerUpdate:!1},d3AlphaMin:{default:0,triggerUpdate:!1},d3AlphaDecay:{default:.0228,triggerUpdate:!1,onChange:function(t,n){n.forceLayout.alphaDecay(t)}},d3AlphaTarget:{default:0,triggerUpdate:!1,onChange:function(t,n){n.forceLayout.alphaTarget(t)}},d3VelocityDecay:{default:.4,triggerUpdate:!1,onChange:function(t,n){n.forceLayout.velocityDecay(t)}},warmupTicks:{default:0,triggerUpdate:!1},cooldownTicks:{default:1/0,triggerUpdate:!1},cooldownTime:{default:15e3,triggerUpdate:!1},onUpdate:{default:function(){},triggerUpdate:!1},onFinishUpdate:{default:function(){},triggerUpdate:!1},onEngineTick:{default:function(){},triggerUpdate:!1},onEngineStop:{default:function(){},triggerUpdate:!1},isShadow:{default:!1,triggerUpdate:!1}},methods:{d3Force:function(t,n,e){return void 0===e?t.forceLayout.force(n):(t.forceLayout.force(n,e),this)},d3ReheatSimulation:function(t){return t.forceLayout.alpha(1),this.resetCountdown(),this},resetCountdown:function(t){return t.cntTicks=0,t.startTickTime=new Date,t.engineRunning=!0,this},tickFrame:function(t){var n,e,r,i,o,a;return!t.isShadow&&t.engineRunning&&(++t.cntTicks>t.cooldownTicks||new Date-t.startTickTime>t.cooldownTime||t.d3AlphaMin>0&&t.forceLayout.alpha()<t.d3AlphaMin?(t.engineRunning=!1,t.onEngineStop()):(t.forceLayout.tick(),t.onEngineTick())),function(){var n=Dr(t.linkVisibility),e=Dr(t.linkColor),r=Dr(t.linkWidth),i=Dr(t.linkLineDash),o=Dr(t.linkCurvature),a=Dr(t.linkCanvasObjectMode),u=t.ctx,s=2*t.isShadow,c=t.graphData.links.filter(n);c.forEach((function(t){var n=o(t);if(!n)return void(t.__controlPoints=null);var e=t.source,r=t.target;if(!(e&&r&&e.hasOwnProperty("x")&&r.hasOwnProperty("x")))return;var i=Math.sqrt(Math.pow(r.x-e.x,2)+Math.pow(r.y-e.y,2));if(i>0){var a=Math.atan2(r.y-e.y,r.x-e.x),u=i*n,s={x:(e.x+r.x)/2+u*Math.cos(a-Math.PI/2),y:(e.y+r.y)/2+u*Math.sin(a-Math.PI/2)};t.__controlPoints=[s.x,s.y]}else{var c=70*n;t.__controlPoints=[r.x,r.y-c,r.x+c,r.y]}}));var l=[],f=[],h=c;if(t.linkCanvasObject){var p=[],d=[];c.forEach((function(t){return({before:l,after:f,replace:p}[a(t)]||d).push(t)})),h=[].concat(Qi(l),f,d),l=l.concat(p)}u.save(),l.forEach((function(n){return t.linkCanvasObject(n,u,t.globalScale)})),u.restore();var y=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],e=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=(n instanceof Array?n.length?n:[void 0]:[n]).map((function(t){return{keyAccessor:t,isProp:!(t instanceof Function)}})),o=t.reduce((function(t,n){var r=t,o=n;return i.forEach((function(t,n){var a,u=t.keyAccessor;if(t.isProp){var s=o,c=s[u],l=Ii(s,[u].map(Fi));a=c,o=l}else a=u(o,n);n+1<i.length?(r.hasOwnProperty(a)||(r[a]={}),r=r[a]):e?(r.hasOwnProperty(a)||(r[a]=[]),r[a].push(o)):r[a]=o})),t}),{});e instanceof Function&&function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;r===i.length?Object.keys(n).forEach((function(t){return n[t]=e(n[t])})):Object.values(n).forEach((function(n){return t(n,r+1)}))}(o);var a=o;return r&&(a=[],function t(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];e.length===i.length?a.push({keys:e,vals:n}):Object.entries(n).forEach((function(n){var r=Di(n,2),i=r[0],o=r[1];return t(o,[].concat(Ui(e),[i]))}))}(o),n instanceof Array&&0===n.length&&1===a.length&&(a[0].keys=[])),a}(h,[e,r,i]);u.save(),Object.entries(y).forEach((function(n){var e=Zi(n,2),r=e[0],o=e[1],a=r&&"undefined"!==r?r:"rgba(0,0,0,0.15)";Object.entries(o).forEach((function(n){var e=Zi(n,2),r=e[0],o=e[1],c=(r||1)/t.globalScale+s;Object.entries(o).forEach((function(t){var n=Zi(t,2),e=(n[0],n[1]),r=i(e[0]);u.beginPath(),e.forEach((function(t){var n=t.source,e=t.target;if(n&&e&&n.hasOwnProperty("x")&&e.hasOwnProperty("x")){u.moveTo(n.x,n.y);var r=t.__controlPoints;r?u[2===r.length?"quadraticCurveTo":"bezierCurveTo"].apply(u,Qi(r).concat([e.x,e.y])):u.lineTo(e.x,e.y)}})),u.strokeStyle=a,u.lineWidth=c,u.setLineDash(r||[]),u.stroke()}))}))})),u.restore(),u.save(),f.forEach((function(n){return t.linkCanvasObject(n,u,t.globalScale)})),u.restore()}(),!t.isShadow&&(n=Dr(t.linkDirectionalArrowLength),e=Dr(t.linkDirectionalArrowRelPos),r=Dr(t.linkVisibility),i=Dr(t.linkDirectionalArrowColor||t.linkColor),o=Dr(t.nodeVal),(a=t.ctx).save(),t.graphData.links.filter(r).forEach((function(r){var u=n(r);if(u&&!(u<0)){var s=r.source,c=r.target;if(s&&c&&s.hasOwnProperty("x")&&c.hasOwnProperty("x")){var l=Math.sqrt(Math.max(0,o(s)||1))*t.nodeRelSize,f=Math.sqrt(Math.max(0,o(c)||1))*t.nodeRelSize,h=Math.min(1,Math.max(0,e(r))),p=i(r)||"rgba(0,0,0,0.28)",d=u/1.6/2,y=r.__controlPoints&&Wi(Ri,[s.x,s.y].concat(Qi(r.__controlPoints),[c.x,c.y])),g=y?function(t){return y.get(t)}:function(t){return{x:s.x+(c.x-s.x)*t||0,y:s.y+(c.y-s.y)*t||0}},v=y?y.length():Math.sqrt(Math.pow(c.x-s.x,2)+Math.pow(c.y-s.y,2)),m=l+u+(v-l-f-u)*h,_=g(m/v),b=g((m-u)/v),x=g((m-.8*u)/v),w=Math.atan2(_.y-b.y,_.x-b.x)-Math.PI/2;a.beginPath(),a.moveTo(_.x,_.y),a.lineTo(b.x+d*Math.cos(w),b.y+d*Math.sin(w)),a.lineTo(x.x,x.y),a.lineTo(b.x-d*Math.cos(w),b.y-d*Math.sin(w)),a.fillStyle=p,a.fill()}}})),a.restore()),!t.isShadow&&function(){var n=Dr(t.linkDirectionalParticles),e=Dr(t.linkDirectionalParticleSpeed),r=Dr(t.linkDirectionalParticleWidth),i=Dr(t.linkVisibility),o=Dr(t.linkDirectionalParticleColor||t.linkColor),a=t.ctx;a.save(),t.graphData.links.filter(i).forEach((function(i){var u=n(i);if(i.hasOwnProperty("__photons")&&i.__photons.length){var s=i.source,c=i.target;if(s&&c&&s.hasOwnProperty("x")&&c.hasOwnProperty("x")){var l=e(i),f=i.__photons||[],h=Math.max(0,r(i)/2)/Math.sqrt(t.globalScale),p=o(i)||"rgba(0,0,0,0.28)";a.fillStyle=p;var d=i.__controlPoints?Wi(Ri,[s.x,s.y].concat(Qi(i.__controlPoints),[c.x,c.y])):null,y=0,g=!1;f.forEach((function(t){var n=!!t.__singleHop;if(t.hasOwnProperty("__progressRatio")||(t.__progressRatio=n?0:y/u),!n&&y++,t.__progressRatio+=l,t.__progressRatio>=1){if(n)return void(g=!0);t.__progressRatio=t.__progressRatio%1}var e=t.__progressRatio,r=d?d.get(e):{x:s.x+(c.x-s.x)*e||0,y:s.y+(c.y-s.y)*e||0};a.beginPath(),a.arc(r.x,r.y,h,0,2*Math.PI,!1),a.fill()})),g&&(i.__photons=i.__photons.filter((function(t){return!t.__singleHop||t.__progressRatio<=1})))}}})),a.restore()}(),function(){var n=Dr(t.nodeVisibility),e=Dr(t.nodeVal),r=Dr(t.nodeColor),i=Dr(t.nodeCanvasObjectMode),o=t.ctx,a=t.isShadow/t.globalScale,u=t.graphData.nodes.filter(n);o.save(),u.forEach((function(n){var u=i(n);if(!t.nodeCanvasObject||"before"!==u&&"replace"!==u||(t.nodeCanvasObject(n,o,t.globalScale,t.isShadow),"replace"!==u)){var s=Math.sqrt(Math.max(0,e(n)||1))*t.nodeRelSize+a;o.beginPath(),o.arc(n.x,n.y,s,0,2*Math.PI,!1),o.fillStyle=r(n)||"rgba(31, 120, 180, 0.92)",o.fill(),t.nodeCanvasObject&&"after"===u&&t.nodeCanvasObject(n,t.ctx,t.globalScale)}else o.restore()})),o.restore()}(),this},emitParticle:function(t,n){return n&&(!n.__photons&&(n.__photons=[]),n.__photons.push({__singleHop:!0})),this}},stateInit:function(){return{forceLayout:Oi().force("link",bi()).force("charge",Si()).force("center",$r()).force("dagRadial",null).stop(),engineRunning:!1}},init:function(t,n){n.ctx=t},update:function(t){if(t.engineRunning=!1,t.onUpdate(),null!==t.nodeAutoColorBy&&no(t.graphData.nodes,Dr(t.nodeAutoColorBy),t.nodeColor),null!==t.linkAutoColorBy&&no(t.graphData.links,Dr(t.linkAutoColorBy),t.linkColor),t.graphData.links.forEach((function(n){n.source=n[t.linkSource],n.target=n[t.linkTarget]})),!t.isShadow){var n=Dr(t.linkDirectionalParticles);t.graphData.links.forEach((function(t){var e=Math.round(Math.abs(n(t)));e?t.__photons=Qi(Array(e)).map((function(){return{}})):delete t.__photons}))}t.forceLayout.stop().alpha(1).nodes(t.graphData.nodes);var e=t.forceLayout.force("link");e&&e.id((function(n){return n[t.nodeId]})).links(t.graphData.links);var r=t.dagMode&&function(t,n){var e=t.nodes,r=t.links,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=i.nodeFilter,a=void 0===o?function(){return!0}:o,u=i.onLoopError,s=void 0===u?function(t){throw"Invalid DAG structure! Found cycle in node path: ".concat(t.join(" -> "),".")}:u,c={};e.forEach((function(t){return c[n(t)]={data:t,out:[],depth:-1,skip:!a(t)}})),r.forEach((function(t){var e=t.source,r=t.target,i=s(e),o=s(r);if(!c.hasOwnProperty(i))throw"Missing source node with id: ".concat(i);if(!c.hasOwnProperty(o))throw"Missing target node with id: ".concat(o);var a=c[i],u=c[o];function s(t){return"object"===Hi(t)?n(t):t}a.out.push(u)}));var l=[];h(Object.values(c));var f=Object.assign.apply(Object,[{}].concat(Qi(Object.entries(c).filter((function(t){return!Zi(t,2)[1].skip})).map((function(t){var n=Zi(t,2);return Vi({},n[0],n[1].depth)})))));return f;function h(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=0,o=t.length;i<o;i++){var a=t[i];if(-1!==e.indexOf(a)){var u=function(){var t=[].concat(Qi(e.slice(e.indexOf(a))),[a]).map((function(t){return n(t.data)}));return l.some((function(n){return n.length===t.length&&n.every((function(n,e){return n===t[e]}))}))||(l.push(t),s(t)),"continue"}();if("continue"===u)continue}r>a.depth&&(a.depth=r,h(a.out,[].concat(Qi(e),[a]),r+(a.skip?0:1)))}}}(t.graphData,(function(n){return n[t.nodeId]}),{nodeFilter:t.dagNodeFilter,onLoopError:t.onDagError||void 0}),i=Math.max.apply(Math,Qi(Object.values(r||[]))),o=t.dagLevelDistance||t.graphData.nodes.length/(i||1)*2*(-1!==["radialin","radialout"].indexOf(t.dagMode)?.7:1);if(t.dagMode){var a=function(n,e){return function(a){return n?(r[a[t.nodeId]]-i/2)*o*(e?-1:1):void 0}},u=a(-1!==["lr","rl"].indexOf(t.dagMode),"rl"===t.dagMode),s=a(-1!==["td","bu"].indexOf(t.dagMode),"bu"===t.dagMode);t.graphData.nodes.filter(t.dagNodeFilter).forEach((function(t){t.fx=u(t),t.fy=s(t)}))}t.forceLayout.force("dagRadial",-1!==["radialin","radialout"].indexOf(t.dagMode)?function(t,n,e,r){var i,o,a,u,s=gi(.1);function c(t){for(var s=0,c=i.length;s<c;++s){var l=i[s],f=l.x-n||1e-6,h=(l.y||0)-e||1e-6,p=(l.z||0)-r||1e-6,d=Math.sqrt(f*f+h*h+p*p),y=(u[s]-d)*a[s]*t/d;l.vx+=f*y,o>1&&(l.vy+=h*y),o>2&&(l.vz+=p*y)}}function l(){if(i){var n,e=i.length;for(a=new Array(e),u=new Array(e),n=0;n<e;++n)u[n]=+t(i[n],n,i),a[n]=isNaN(u[n])?0:+s(i[n],n,i)}}return"function"!=typeof t&&(t=gi(+t)),null==n&&(n=0),null==e&&(e=0),null==r&&(r=0),c.initialize=function(t,n){i=t,o=n,l()},c.strength=function(t){return arguments.length?(s="function"==typeof t?t:gi(+t),l(),c):s},c.radius=function(n){return arguments.length?(t="function"==typeof n?n:gi(+n),l(),c):t},c.x=function(t){return arguments.length?(n=+t,c):n},c.y=function(t){return arguments.length?(e=+t,c):e},c.z=function(t){return arguments.length?(r=+t,c):r},c}((function(n){var e=r[n[t.nodeId]]||-1;return("radialin"===t.dagMode?i-e:e)*o})).strength((function(n){return t.dagNodeFilter(n)?1:0})):null);for(var c=0;c<t.warmupTicks&&!(t.d3AlphaMin>0&&t.forceLayout.alpha()<t.d3AlphaMin);c++)t.forceLayout.tick();this.resetCountdown(),t.onFinishUpdate()}});function ro(t,n){var e=t instanceof Array?t:[t],r=new n;return{linkProp:function(t){return{default:r[t](),onChange:function(n,r){e.forEach((function(e){return r[e][t](n)}))},triggerUpdate:!1}},linkMethod:function(t){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];var a=[];return e.forEach((function(e){var r=n[e],o=r[t].apply(r,i);o!==r&&a.push(o)})),a.length?a[0]:this}}}}var io=ro("forceGraph",eo),oo=ro(["forceGraph","shadowGraph"],eo),ao=Object.assign.apply(Object,Qi(["nodeColor","nodeAutoColorBy","nodeCanvasObject","nodeCanvasObjectMode","linkColor","linkAutoColorBy","linkLineDash","linkWidth","linkCanvasObject","linkCanvasObjectMode","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowRelPos","linkDirectionalParticles","linkDirectionalParticleSpeed","linkDirectionalParticleWidth","linkDirectionalParticleColor","dagMode","dagLevelDistance","dagNodeFilter","onDagError","d3AlphaMin","d3AlphaDecay","d3VelocityDecay","warmupTicks","cooldownTicks","cooldownTime","onEngineTick","onEngineStop"].map((function(t){return Vi({},t,io.linkProp(t))}))).concat(Qi(["nodeRelSize","nodeId","nodeVal","nodeVisibility","linkSource","linkTarget","linkVisibility","linkCurvature"].map((function(t){return Vi({},t,oo.linkProp(t))}))))),uo=Object.assign.apply(Object,Qi(["d3Force","d3ReheatSimulation","emitParticle"].map((function(t){return Vi({},t,io.linkMethod(t))}))));function so(t){if(t.canvas){var n=t.canvas.width,e=t.canvas.height;300===n&&150===e&&(n=e=0);var r=window.devicePixelRatio;n/=r,e/=r,[t.canvas,t.shadowCanvas].forEach((function(i){i.style.width="".concat(t.width,"px"),i.style.height="".concat(t.height,"px"),i.width=t.width*r,i.height=t.height*r,n||e||i.getContext("2d").scale(r,r)}));var i=Xe(t.canvas).k;t.zoom.translateBy(t.zoom.__baseElem,(t.width-n)/2/i,(t.height-e)/2/i)}}function co(t){var n=window.devicePixelRatio;t.setTransform(n,0,0,n,0,0)}function lo(t,n,e){t.save(),co(t),t.clearRect(0,0,n,e),t.restore()}var fo=Ir({props:Gi({width:{default:window.innerWidth,onChange:function(t,n){return so(n)},triggerUpdate:!1},height:{default:window.innerHeight,onChange:function(t,n){return so(n)},triggerUpdate:!1},graphData:{default:{nodes:[],links:[]},onChange:function(t,n){(t.nodes.length||t.links.length)&&console.info("force-graph loading",t.nodes.length+" nodes",t.links.length+" links"),[{type:"Node",objs:t.nodes},{type:"Link",objs:t.links}].forEach((function(t){var e=t.type;t.objs.filter((function(t){if(!t.hasOwnProperty("__indexColor"))return!0;var e=n.colorTracker.lookup(t.__indexColor);return!e||!e.hasOwnProperty("d")||e.d!==t})).forEach((function(t){t.__indexColor=n.colorTracker.register({type:e,d:t})}))})),n.forceGraph.graphData(t),n.shadowGraph.graphData(t)},triggerUpdate:!1},backgroundColor:{onChange:function(t,n){n.canvas&&t&&(n.canvas.style.background=t)},triggerUpdate:!1},nodeLabel:{default:"name",triggerUpdate:!1},linkLabel:{default:"name",triggerUpdate:!1},linkHoverPrecision:{default:4,triggerUpdate:!1},enableNodeDrag:{default:!0,triggerUpdate:!1},enableZoomPanInteraction:{default:!0,triggerUpdate:!1},enablePointerInteraction:{default:!0,onChange:function(t,n){n.hoverObj=null},triggerUpdate:!1},onNodeDrag:{default:function(){},triggerUpdate:!1},onNodeDragEnd:{default:function(){},triggerUpdate:!1},onNodeClick:{default:function(){},triggerUpdate:!1},onNodeRightClick:{triggerUpdate:!1},onNodeHover:{default:function(){},triggerUpdate:!1},onLinkClick:{default:function(){},triggerUpdate:!1},onLinkRightClick:{triggerUpdate:!1},onLinkHover:{default:function(){},triggerUpdate:!1},onBackgroundClick:{default:function(){},triggerUpdate:!1},onBackgroundRightClick:{triggerUpdate:!1},onZoom:{default:function(){},triggerUpdate:!1},onZoomEnd:{default:function(){},triggerUpdate:!1}},ao),aliases:{stopAnimation:"pauseAnimation"},methods:Gi({graph2ScreenCoords:function(t,n,e){var r=Xe(t.canvas);return{x:n*r.k+r.x,y:e*r.k+r.y}},screen2GraphCoords:function(t,n,e){var r=Xe(t.canvas);return{x:(n-r.x)/r.k,y:(e-r.y)/r.k}},centerAt:function(t,n,e,r){if(!t.canvas)return null;if(void 0!==n||void 0!==e){var i=Object.assign({},void 0!==n?{x:n}:{},void 0!==e?{y:e}:{});return r?new Tr.Tween(o()).to(i,r).easing(Tr.Easing.Quadratic.Out).onUpdate(a).start():a(i),this}return o();function o(){var n=Xe(t.canvas);return{x:(t.width/2-n.x)/n.k,y:(t.height/2-n.y)/n.k}}function a(n){var e=n.x,r=n.y;t.zoom.translateTo(t.zoom.__baseElem,void 0===e?o().x:e,void 0===r?o().y:r)}},zoom:function(t,n,e){return t.canvas?void 0!==n?(e?new Tr.Tween({k:r()}).to({k:n},e).easing(Tr.Easing.Quadratic.Out).onUpdate((function(t){return i(t.k)})).start():i(n),this):r():null;function r(){return Xe(t.canvas).k}function i(n){t.zoom.scaleTo(t.zoom.__baseElem,n)}},zoomToFit:function(t){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,r=arguments.length,i=new Array(r>3?r-3:0),o=3;o<r;o++)i[o-3]=arguments[o];var a=this.getGraphBbox.apply(this,i);if(a){var u={x:(a.x[0]+a.x[1])/2,y:(a.y[0]+a.y[1])/2},s=Math.max(1e-12,Math.min(1e12,(t.width-2*e)/(a.x[1]-a.x[0]),(t.height-2*e)/(a.y[1]-a.y[0])));this.centerAt(u.x,u.y,n),this.zoom(s,n)}return this},getGraphBbox:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0},e=Dr(t.nodeVal),r=function(n){return Math.sqrt(Math.max(0,e(n)||1))*t.nodeRelSize},i=t.graphData.nodes.filter(n).map((function(t){return{x:t.x,y:t.y,r:r(t)}}));return i.length?{x:[rr(i,(function(t){return t.x-t.r})),er(i,(function(t){return t.x+t.r}))],y:[rr(i,(function(t){return t.y-t.r})),er(i,(function(t){return t.y+t.r}))]}:null},pauseAnimation:function(t){return t.animationFrameRequestId&&(cancelAnimationFrame(t.animationFrameRequestId),t.animationFrameRequestId=null),this},resumeAnimation:function(t){return t.animationFrameRequestId||this._animationCycle(),this},_destructor:function(){this.pauseAnimation(),this.graphData({nodes:[],links:[]})}},uo),stateInit:function(){return{lastSetZoom:1,forceGraph:new eo,shadowGraph:(new eo).cooldownTicks(0).nodeColor("__indexColor").linkColor("__indexColor").isShadow(!0),colorTracker:new Vr}},init:function(t,n){t.innerHTML="";var e=document.createElement("div");e.style.position="relative",t.appendChild(e),n.canvas=document.createElement("canvas"),n.backgroundColor&&(n.canvas.style.background=n.backgroundColor),e.appendChild(n.canvas),n.shadowCanvas=document.createElement("canvas");var r=n.canvas.getContext("2d"),i=n.shadowCanvas.getContext("2d");wt(n.canvas).call(function(){var t,n,e,r,i=Ft,o=Lt,a=qt,u=Bt,s={},c=Mt("start","drag","end"),l=0,f=0;function h(t){t.on("mousedown.drag",p).filter(u).on("touchstart.drag",g).on("touchmove.drag",v).on("touchend.drag touchcancel.drag",m).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(){if(!r&&i.apply(this,arguments)){var a=_("mouse",o.apply(this,arguments),At,this,arguments);a&&(wt(ct.view).on("mousemove.drag",d,!0).on("mouseup.drag",y,!0),Rt(ct.view),Nt(),e=!1,t=ct.clientX,n=ct.clientY,a("start"))}}function d(){if(Pt(),!e){var r=ct.clientX-t,i=ct.clientY-n;e=r*r+i*i>f}s.mouse("drag")}function y(){wt(ct.view).on("mousemove.drag mouseup.drag",null),It(ct.view,e),Pt(),s.mouse("end")}function g(){if(i.apply(this,arguments)){var t,n,e=ct.changedTouches,r=o.apply(this,arguments),a=e.length;for(t=0;t<a;++t)(n=_(e[t].identifier,r,Ot,this,arguments))&&(Nt(),n("start"))}}function v(){var t,n,e=ct.changedTouches,r=e.length;for(t=0;t<r;++t)(n=s[e[t].identifier])&&(Pt(),n("drag"))}function m(){var t,n,e=ct.changedTouches,i=e.length;for(r&&clearTimeout(r),r=setTimeout((function(){r=null}),500),t=0;t<i;++t)(n=s[e[t].identifier])&&(Nt(),n("end"))}function _(t,n,e,r,i){var o,u,f,p=e(n,t),d=c.copy();if(yt(new Ut(h,"beforestart",o,t,l,p[0],p[1],0,0,d),(function(){return null!=(ct.subject=o=a.apply(r,i))&&(u=o.x-p[0]||0,f=o.y-p[1]||0,!0)})))return function a(c){var y,g=p;switch(c){case"start":s[t]=a,y=l++;break;case"end":delete s[t],--l;case"drag":p=e(n,t),y=l}yt(new Ut(h,c,o,t,y,p[0]+u,p[1]+f,p[0]-g[0],p[1]-g[1],d),d.apply,d,[c,r,i])}}return h.filter=function(t){return arguments.length?(i="function"==typeof t?t:Dt(!!t),h):i},h.container=function(t){return arguments.length?(o="function"==typeof t?t:Dt(t),h):o},h.subject=function(t){return arguments.length?(a="function"==typeof t?t:Dt(t),h):a},h.touchable=function(t){return arguments.length?(u="function"==typeof t?t:Dt(!!t),h):u},h.on=function(){var t=c.on.apply(c,arguments);return t===c?h:t},h.clickDistance=function(t){return arguments.length?(f=(t=+t)*t,h):Math.sqrt(f)},h}().subject((function(){if(!n.enableNodeDrag)return null;var t=n.hoverObj;return t&&"Node"===t.type?t.d:null})).on("start",(function(){var t=ct.subject;t.__initialDragPos={x:t.x,y:t.y,fx:t.fx,fy:t.fy},ct.active||(t.fx=t.x,t.fy=t.y),n.canvas.classList.add("grabbable")})).on("drag",(function(){var t=ct.subject,e=t.__initialDragPos,r=ct,i=Xe(n.canvas).k,o={x:e.x+(r.x-e.x)/i-t.x,y:e.y+(r.y-e.y)/i-t.y};["x","y"].forEach((function(n){return t["f".concat(n)]=t[n]=e[n]+(r[n]-e[n])/i})),n.forceGraph.d3AlphaTarget(.3).resetCountdown(),n.ignoreOneClick=!0,t.__dragged=!0,n.onNodeDrag(t,o)})).on("end",(function(){var t=ct.subject,e=t.__initialDragPos,r={x:t.x-e.x,y:t.y-e.y};void 0===e.fx&&(t.fx=void 0),void 0===e.fy&&(t.fy=void 0),delete t.__initialDragPos,n.forceGraph.d3AlphaTarget(0).resetCountdown(),n.canvas.classList.remove("grabbable"),t.__dragged&&(delete t.__dragged,n.onNodeDragEnd(t,r))}))),n.zoom=function(){var t,n,e=Ze,r=Qe,i=nr,o=Ke,a=tr,u=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],c=250,l=Fn,f=Mt("start","zoom","end"),h=0;function p(t){t.property("__zoom",Je).on("wheel.zoom",b).on("mousedown.zoom",x).on("dblclick.zoom",w).filter(a).on("touchstart.zoom",k).on("touchmove.zoom",z).on("touchend.zoom touchcancel.zoom",A).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function d(t,n){return(n=Math.max(u[0],Math.min(u[1],n)))===t.k?t:new $e(n,t.x,t.y)}function y(t,n,e){var r=n[0]-e[0]*t.k,i=n[1]-e[1]*t.k;return r===t.x&&i===t.y?t:new $e(t.k,r,i)}function g(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function v(t,n,e){t.on("start.zoom",(function(){m(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){m(this,arguments).end()})).tween("zoom",(function(){var t=this,i=arguments,o=m(t,i),a=r.apply(t,i),u=null==e?g(a):"function"==typeof e?e.apply(t,i):e,s=Math.max(a[1][0]-a[0][0],a[1][1]-a[0][1]),c=t.__zoom,f="function"==typeof n?n.apply(t,i):n,h=l(c.invert(u).concat(s/c.k),f.invert(u).concat(s/f.k));return function(t){if(1===t)t=f;else{var n=h(t),e=s/n[2];t=new $e(e,u[0]-n[0]*e,u[1]-n[1]*e)}o.zoom(null,t)}}))}function m(t,n,e){return!e&&t.__zooming||new _(t,n)}function _(t,n){this.that=t,this.args=n,this.active=0,this.extent=r.apply(t,n),this.taps=0}function b(){if(e.apply(this,arguments)){var t=m(this,arguments),n=this.__zoom,r=Math.max(u[0],Math.min(u[1],n.k*Math.pow(2,o.apply(this,arguments)))),a=At(this);if(t.wheel)t.mouse[0][0]===a[0]&&t.mouse[0][1]===a[1]||(t.mouse[1]=n.invert(t.mouse[0]=a)),clearTimeout(t.wheel);else{if(n.k===r)return;t.mouse=[a,n.invert(a)],le(this),t.start()}We(),t.wheel=setTimeout(c,150),t.zoom("mouse",i(y(d(n,r),t.mouse[0],t.mouse[1]),t.extent,s))}function c(){t.wheel=null,t.end()}}function x(){if(!n&&e.apply(this,arguments)){var t=m(this,arguments,!0),r=wt(ct.view).on("mousemove.zoom",c,!0).on("mouseup.zoom",l,!0),o=At(this),a=ct.clientX,u=ct.clientY;Rt(ct.view),Ye(),t.mouse=[o,this.__zoom.invert(o)],le(this),t.start()}function c(){if(We(),!t.moved){var n=ct.clientX-a,e=ct.clientY-u;t.moved=n*n+e*e>h}t.zoom("mouse",i(y(t.that.__zoom,t.mouse[0]=At(t.that),t.mouse[1]),t.extent,s))}function l(){r.on("mousemove.zoom mouseup.zoom",null),It(ct.view,t.moved),We(),t.end()}}function w(){if(e.apply(this,arguments)){var t=this.__zoom,n=At(this),o=t.invert(n),a=t.k*(ct.shiftKey?.5:2),u=i(y(d(t,a),n,o),r.apply(this,arguments),s);We(),c>0?wt(this).transition().duration(c).call(v,u,n):wt(this).call(p.transform,u)}}function k(){if(e.apply(this,arguments)){var n,r,i,o,a=ct.touches,u=a.length,s=m(this,arguments,ct.changedTouches.length===u);for(Ye(),r=0;r<u;++r)o=[o=Ot(this,a,(i=a[r]).identifier),this.__zoom.invert(o),i.identifier],s.touch0?s.touch1||s.touch0[2]===o[2]||(s.touch1=o,s.taps=0):(s.touch0=o,n=!0,s.taps=1+!!t);t&&(t=clearTimeout(t)),n&&(s.taps<2&&(t=setTimeout((function(){t=null}),500)),le(this),s.start())}}function z(){if(this.__zooming){var n,e,r,o,a=m(this,arguments),u=ct.changedTouches,c=u.length;for(We(),t&&(t=clearTimeout(t)),a.taps=0,n=0;n<c;++n)r=Ot(this,u,(e=u[n]).identifier),a.touch0&&a.touch0[2]===e.identifier?a.touch0[0]=r:a.touch1&&a.touch1[2]===e.identifier&&(a.touch1[0]=r);if(e=a.that.__zoom,a.touch1){var l=a.touch0[0],f=a.touch0[1],h=a.touch1[0],p=a.touch1[1],g=(g=h[0]-l[0])*g+(g=h[1]-l[1])*g,v=(v=p[0]-f[0])*v+(v=p[1]-f[1])*v;e=d(e,Math.sqrt(g/v)),r=[(l[0]+h[0])/2,(l[1]+h[1])/2],o=[(f[0]+p[0])/2,(f[1]+p[1])/2]}else{if(!a.touch0)return;r=a.touch0[0],o=a.touch0[1]}a.zoom("touch",i(y(e,r,o),a.extent,s))}}function A(){if(this.__zooming){var t,e,r=m(this,arguments),i=ct.changedTouches,o=i.length;for(Ye(),n&&clearTimeout(n),n=setTimeout((function(){n=null}),500),t=0;t<o;++t)e=i[t],r.touch0&&r.touch0[2]===e.identifier?delete r.touch0:r.touch1&&r.touch1[2]===e.identifier&&delete r.touch1;if(r.touch1&&!r.touch0&&(r.touch0=r.touch1,delete r.touch1),r.touch0)r.touch0[1]=this.__zoom.invert(r.touch0[0]);else if(r.end(),2===r.taps){var a=wt(this).on("dblclick.zoom");a&&a.apply(this,arguments)}}}return p.transform=function(t,n,e){var r=t.selection?t.selection():t;r.property("__zoom",Je),t!==r?v(t,n,e):r.interrupt().each((function(){m(this,arguments).start().zoom(null,"function"==typeof n?n.apply(this,arguments):n).end()}))},p.scaleBy=function(t,n,e){p.scaleTo(t,(function(){var t=this.__zoom.k,e="function"==typeof n?n.apply(this,arguments):n;return t*e}),e)},p.scaleTo=function(t,n,e){p.transform(t,(function(){var t=r.apply(this,arguments),o=this.__zoom,a=null==e?g(t):"function"==typeof e?e.apply(this,arguments):e,u=o.invert(a),c="function"==typeof n?n.apply(this,arguments):n;return i(y(d(o,c),a,u),t,s)}),e)},p.translateBy=function(t,n,e){p.transform(t,(function(){return i(this.__zoom.translate("function"==typeof n?n.apply(this,arguments):n,"function"==typeof e?e.apply(this,arguments):e),r.apply(this,arguments),s)}))},p.translateTo=function(t,n,e,o){p.transform(t,(function(){var t=r.apply(this,arguments),a=this.__zoom,u=null==o?g(t):"function"==typeof o?o.apply(this,arguments):o;return i(Ge.translate(u[0],u[1]).scale(a.k).translate("function"==typeof n?-n.apply(this,arguments):-n,"function"==typeof e?-e.apply(this,arguments):-e),t,s)}),o)},_.prototype={start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,n){return this.mouse&&"mouse"!==t&&(this.mouse[1]=n.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=n.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=n.invert(this.touch1[0])),this.that.__zoom=n,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){yt(new Ve(p,t,this.that.__zoom),f.apply,f,[t,this.that,this.args])}},p.wheelDelta=function(t){return arguments.length?(o="function"==typeof t?t:He(+t),p):o},p.filter=function(t){return arguments.length?(e="function"==typeof t?t:He(!!t),p):e},p.touchable=function(t){return arguments.length?(a="function"==typeof t?t:He(!!t),p):a},p.extent=function(t){return arguments.length?(r="function"==typeof t?t:He([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),p):r},p.scaleExtent=function(t){return arguments.length?(u[0]=+t[0],u[1]=+t[1],p):[u[0],u[1]]},p.translateExtent=function(t){return arguments.length?(s[0][0]=+t[0][0],s[1][0]=+t[1][0],s[0][1]=+t[0][1],s[1][1]=+t[1][1],p):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},p.constrain=function(t){return arguments.length?(i=t,p):i},p.duration=function(t){return arguments.length?(c=+t,p):c},p.interpolate=function(t){return arguments.length?(l=t,p):l},p.on=function(){var t=f.on.apply(f,arguments);return t===f?p:t},p.clickDistance=function(t){return arguments.length?(h=(t=+t)*t,p):Math.sqrt(h)},p}(),n.zoom(n.zoom.__baseElem=wt(n.canvas)),n.zoom.__baseElem.on("dblclick.zoom",null),n.zoom.filter((function(){return!!n.enableZoomPanInteraction&&!ct.button})).scaleExtent([.01,1e3]).on("zoom",(function(){var t=Xe(this);[r,i].forEach((function(n){co(n),n.translate(t.x,t.y),n.scale(t.k,t.k)})),n.onZoom(Gi({},t))})).on("end",(function(){var t=Xe(this);n.onZoomEnd(Gi({},t))})),so(n),n.forceGraph.onFinishUpdate((function(){Xe(n.canvas).k===n.lastSetZoom&&n.graphData.nodes.length&&n.zoom.scaleTo(n.zoom.__baseElem,n.lastSetZoom=4/Math.cbrt(n.graphData.nodes.length))}));var o=document.createElement("div");o.classList.add("graph-tooltip"),e.appendChild(o);var a={x:-1e12,y:-1e12};["pointermove","pointerdown"].forEach((function(t){return e.addEventListener(t,(function(t){var n,r,i,u=(n=e.getBoundingClientRect(),r=window.pageXOffset||document.documentElement.scrollLeft,i=window.pageYOffset||document.documentElement.scrollTop,{top:n.top+i,left:n.left+r});a.x=t.pageX-u.left,a.y=t.pageY-u.top,o.style.top="".concat(a.y,"px"),o.style.left="".concat(a.x,"px")}),!1)})),e.addEventListener("pointerup",(function(t){if(n.ignoreOneClick)n.ignoreOneClick=!1;else if(0===t.button&&(n.hoverObj?n["on".concat(n.hoverObj.type,"Click")](n.hoverObj.d,t):n.onBackgroundClick(t)),2===t.button)if(n.hoverObj){var e=n["on".concat(n.hoverObj.type,"RightClick")];e&&e(n.hoverObj.d,t)}else n.onBackgroundRightClick&&n.onBackgroundRightClick(t)}),!1),e.addEventListener("contextmenu",(function(t){return!(n.onBackgroundRightClick||n.onNodeRightClick||n.onLinkRightClick)||(t.preventDefault(),!1)}),!1),n.forceGraph(r),n.shadowGraph(i);var u=kr((function(){lo(i,n.width,n.height),n.shadowGraph.linkWidth((function(t){return Dr(n.linkWidth)(t)+n.linkHoverPrecision}));var t=Xe(n.canvas);n.shadowGraph.globalScale(t.k).tickFrame()}),800);(this._animationCycle=function t(){if(n.enablePointerInteraction){var e=window.devicePixelRatio,s=a.x>0&&a.y>0?i.getImageData(a.x*e,a.y*e,1,1):null,c=s?n.colorTracker.lookup(s.data):null;if(c!==n.hoverObj){var l=n.hoverObj,f=l?l.type:null,h=c?c.type:null;f&&f!==h&&n["on".concat(f,"Hover")](null,l.d),h&&n["on".concat(h,"Hover")](c.d,f===h?l.d:null);var p=c&&Dr(n["".concat(c.type.toLowerCase(),"Label")])(c.d)||"";o.style.visibility=p?"visible":"hidden",o.innerHTML=p,n.hoverObj=c}u()}lo(r,n.width,n.height);var d=Xe(n.canvas);n.forceGraph.globalScale(d.k).tickFrame(),Tr.update(),n.animationFrameRequestId=requestAnimationFrame(t)})()},update:function(t){}}),ho=or((function(t,n){!function(){var t="function"==typeof Symbol&&Symbol.for,e=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,i=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,a=t?Symbol.for("react.profiler"):60114,u=t?Symbol.for("react.provider"):60109,s=t?Symbol.for("react.context"):60110,c=t?Symbol.for("react.async_mode"):60111,l=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,h=t?Symbol.for("react.suspense"):60113,p=t?Symbol.for("react.suspense_list"):60120,d=t?Symbol.for("react.memo"):60115,y=t?Symbol.for("react.lazy"):60116,g=t?Symbol.for("react.block"):60121,v=t?Symbol.for("react.fundamental"):60117,m=t?Symbol.for("react.responder"):60118,_=t?Symbol.for("react.scope"):60119;function b(t){if("object"==typeof t&&null!==t){var n=t.$$typeof;switch(n){case e:var p=t.type;switch(p){case c:case l:case i:case a:case o:case h:return p;default:var g=p&&p.$$typeof;switch(g){case s:case f:case y:case d:case u:return g;default:return n}}case r:return n}}}var x=c,w=l,k=s,z=u,A=e,O=f,S=i,M=y,E=d,C=r,T=a,j=o,N=h,P=!1;function R(t){return b(t)===l}n.AsyncMode=x,n.ConcurrentMode=w,n.ContextConsumer=k,n.ContextProvider=z,n.Element=A,n.ForwardRef=O,n.Fragment=S,n.Lazy=M,n.Memo=E,n.Portal=C,n.Profiler=T,n.StrictMode=j,n.Suspense=N,n.isAsyncMode=function(t){return P||(P=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),R(t)||b(t)===c},n.isConcurrentMode=R,n.isContextConsumer=function(t){return b(t)===s},n.isContextProvider=function(t){return b(t)===u},n.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},n.isForwardRef=function(t){return b(t)===f},n.isFragment=function(t){return b(t)===i},n.isLazy=function(t){return b(t)===y},n.isMemo=function(t){return b(t)===d},n.isPortal=function(t){return b(t)===r},n.isProfiler=function(t){return b(t)===a},n.isStrictMode=function(t){return b(t)===o},n.isSuspense=function(t){return b(t)===h},n.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===i||t===l||t===a||t===o||t===h||t===p||"object"==typeof t&&null!==t&&(t.$$typeof===y||t.$$typeof===d||t.$$typeof===u||t.$$typeof===s||t.$$typeof===f||t.$$typeof===v||t.$$typeof===m||t.$$typeof===_||t.$$typeof===g)},n.typeOf=b}()})),po=or((function(t){t.exports=ho})),yo=Object.getOwnPropertySymbols,go=Object.prototype.hasOwnProperty,vo=Object.prototype.propertyIsEnumerable;function mo(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}var _o,bo=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 n={},e=0;e<10;e++)n["_"+String.fromCharCode(e)]=e;if("0123456789"!==Object.getOwnPropertyNames(n).map((function(t){return n[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,n){for(var e,r,i=mo(t),o=1;o<arguments.length;o++){for(var a in e=Object(arguments[o]))go.call(e,a)&&(i[a]=e[a]);if(yo){r=yo(e);for(var u=0;u<r.length;u++)vo.call(e,r[u])&&(i[r[u]]=e[r[u]])}}return i},xo="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",wo={},ko=Function.call.bind(Object.prototype.hasOwnProperty);function zo(t,n,e,r,i){for(var o in t)if(ko(t,o)){var a;try{if("function"!=typeof t[o]){var u=Error((r||"React class")+": "+e+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof t[o]+"`.");throw u.name="Invariant Violation",u}a=t[o](n,o,r,e,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(t){a=t}if(!a||a instanceof Error||_o((r||"React class")+": type specification of "+e+" `"+o+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof a+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),a instanceof Error&&!(a.message in wo)){wo[a.message]=!0;var s=i?i():"";_o("Failed "+e+" type: "+a.message+(null!=s?s:""))}}}_o=function(t){var n="Warning: "+t;"undefined"!=typeof console&&console.error(n);try{throw new Error(n)}catch(t){}},zo.resetWarningCache=function(){wo={}};var Ao,Oo=zo,So=Function.call.bind(Object.prototype.hasOwnProperty);function Mo(){return null}Ao=function(t){var n="Warning: "+t;"undefined"!=typeof console&&console.error(n);try{throw new Error(n)}catch(t){}};var Eo=function(t,n){var e="function"==typeof Symbol&&Symbol.iterator;var r={array:u("array"),bool:u("boolean"),func:u("function"),number:u("number"),object:u("object"),string:u("string"),symbol:u("symbol"),any:a(Mo),arrayOf:function(t){return a((function(n,e,r,i,a){if("function"!=typeof t)return new o("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var u=n[e];if(!Array.isArray(u))return new o("Invalid "+i+" `"+a+"` of type `"+c(u)+"` supplied to `"+r+"`, expected an array.");for(var s=0;s<u.length;s++){var l=t(u,s,r,i,a+"["+s+"]",xo);if(l instanceof Error)return l}return null}))},element:a((function(n,e,r,i,a){var u=n[e];return t(u)?null:new o("Invalid "+i+" `"+a+"` of type `"+c(u)+"` supplied to `"+r+"`, expected a single ReactElement.")})),elementType:a((function(t,n,e,r,i){var a=t[n];return po.isValidElementType(a)?null:new o("Invalid "+r+" `"+i+"` of type `"+c(a)+"` supplied to `"+e+"`, expected a single ReactElement type.")})),instanceOf:function(t){return a((function(n,e,r,i,a){if(!(n[e]instanceof t)){var u=t.name||"<<anonymous>>";return new o("Invalid "+i+" `"+a+"` of type `"+function(t){if(!t.constructor||!t.constructor.name)return"<<anonymous>>";return t.constructor.name}(n[e])+"` supplied to `"+r+"`, expected instance of `"+u+"`.")}return null}))},node:a((function(t,n,e,r,i){return s(t[n])?null:new o("Invalid "+r+" `"+i+"` supplied to `"+e+"`, expected a ReactNode.")})),objectOf:function(t){return a((function(n,e,r,i,a){if("function"!=typeof t)return new o("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var u=n[e],s=c(u);if("object"!==s)return new o("Invalid "+i+" `"+a+"` of type `"+s+"` supplied to `"+r+"`, expected an object.");for(var l in u)if(So(u,l)){var f=t(u,l,r,i,a+"."+l,xo);if(f instanceof Error)return f}return null}))},oneOf:function(t){if(!Array.isArray(t))return Ao(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),Mo;function n(n,e,r,a,u){for(var s=n[e],c=0;c<t.length;c++)if(i(s,t[c]))return null;var f=JSON.stringify(t,(function(t,n){return"symbol"===l(n)?String(n):n}));return new o("Invalid "+a+" `"+u+"` of value `"+String(s)+"` supplied to `"+r+"`, expected one of "+f+".")}return a(n)},oneOfType:function(t){if(!Array.isArray(t))return Ao("Invalid argument supplied to oneOfType, expected an instance of array."),Mo;for(var n=0;n<t.length;n++){var e=t[n];if("function"!=typeof e)return Ao("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+f(e)+" at index "+n+"."),Mo}return a((function(n,e,r,i,a){for(var u=0;u<t.length;u++){if(null==(0,t[u])(n,e,r,i,a,xo))return null}return new o("Invalid "+i+" `"+a+"` supplied to `"+r+"`.")}))},shape:function(t){return a((function(n,e,r,i,a){var u=n[e],s=c(u);if("object"!==s)return new o("Invalid "+i+" `"+a+"` of type `"+s+"` supplied to `"+r+"`, expected `object`.");for(var l in t){var f=t[l];if(f){var h=f(u,l,r,i,a+"."+l,xo);if(h)return h}}return null}))},exact:function(t){return a((function(n,e,r,i,a){var u=n[e],s=c(u);if("object"!==s)return new o("Invalid "+i+" `"+a+"` of type `"+s+"` supplied to `"+r+"`, expected `object`.");var l=bo({},n[e],t);for(var f in l){var h=t[f];if(!h)return new o("Invalid "+i+" `"+a+"` key `"+f+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(n[e],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(t),null," "));var p=h(u,f,r,i,a+"."+f,xo);if(p)return p}return null}))}};function i(t,n){return t===n?0!==t||1/t==1/n:t!=t&&n!=n}function o(t){this.message=t,this.stack=""}function a(t){var e={},r=0;function i(i,a,u,s,c,l,f){if(s=s||"<<anonymous>>",l=l||u,f!==xo){if(n){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}if("undefined"!=typeof console){var p=s+":"+u;!e[p]&&r<3&&(Ao("You are manually calling a React.PropTypes validation function for the `"+l+"` prop on `"+s+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),e[p]=!0,r++)}}return null==a[u]?i?null===a[u]?new o("The "+c+" `"+l+"` is marked as required in `"+s+"`, but its value is `null`."):new o("The "+c+" `"+l+"` is marked as required in `"+s+"`, but its value is `undefined`."):null:t(a,u,s,c,l)}var a=i.bind(null,!1);return a.isRequired=i.bind(null,!0),a}function u(t){return a((function(n,e,r,i,a,u){var s=n[e];return c(s)!==t?new o("Invalid "+i+" `"+a+"` of type `"+l(s)+"` supplied to `"+r+"`, expected `"+t+"`."):null}))}function s(n){switch(typeof n){case"number":case"string":case"undefined":return!0;case"boolean":return!n;case"object":if(Array.isArray(n))return n.every(s);if(null===n||t(n))return!0;var r=function(t){var n=t&&(e&&t[e]||t["@@iterator"]);if("function"==typeof n)return n}(n);if(!r)return!1;var i,o=r.call(n);if(r!==n.entries){for(;!(i=o.next()).done;)if(!s(i.value))return!1}else for(;!(i=o.next()).done;){var a=i.value;if(a&&!s(a[1]))return!1}return!0;default:return!1}}function c(t){var n=typeof t;return Array.isArray(t)?"array":t instanceof RegExp?"object":function(t,n){return"symbol"===t||!!n&&("Symbol"===n["@@toStringTag"]||"function"==typeof Symbol&&n instanceof Symbol)}(n,t)?"symbol":n}function l(t){if(null==t)return""+t;var n=c(t);if("object"===n){if(t instanceof Date)return"date";if(t instanceof RegExp)return"regexp"}return n}function f(t){var n=l(t);switch(n){case"array":case"object":return"an "+n;case"boolean":case"date":case"regexp":return"a "+n;default:return n}}return o.prototype=Error.prototype,r.checkPropTypes=Oo,r.resetWarningCache=Oo.resetWarningCache,r.PropTypes=r,r},Co=or((function(t){var n=po;t.exports=Eo(n.isElement,!0)})),To={width:Co.number,height:Co.number,graphData:Co.shape({nodes:Co.arrayOf(Co.object).isRequired,links:Co.arrayOf(Co.object).isRequired}),backgroundColor:Co.string,nodeRelSize:Co.number,nodeId:Co.string,nodeLabel:Co.oneOfType([Co.string,Co.func]),nodeVal:Co.oneOfType([Co.number,Co.string,Co.func]),nodeVisibility:Co.oneOfType([Co.bool,Co.string,Co.func]),nodeColor:Co.oneOfType([Co.string,Co.func]),nodeAutoColorBy:Co.oneOfType([Co.string,Co.func]),linkSource:Co.string,linkTarget:Co.string,linkLabel:Co.oneOfType([Co.string,Co.func]),linkVisibility:Co.oneOfType([Co.bool,Co.string,Co.func]),linkHoverPrecision:Co.number,linkColor:Co.oneOfType([Co.string,Co.func]),linkAutoColorBy:Co.oneOfType([Co.string,Co.func]),linkWidth:Co.oneOfType([Co.number,Co.string,Co.func]),linkCurvature:Co.oneOfType([Co.number,Co.string,Co.func]),linkDirectionalArrowLength:Co.oneOfType([Co.number,Co.string,Co.func]),linkDirectionalArrowColor:Co.oneOfType([Co.string,Co.func]),linkDirectionalArrowRelPos:Co.oneOfType([Co.number,Co.string,Co.func]),linkDirectionalParticles:Co.oneOfType([Co.number,Co.string,Co.func]),linkDirectionalParticleSpeed:Co.oneOfType([Co.number,Co.string,Co.func]),linkDirectionalParticleWidth:Co.oneOfType([Co.number,Co.string,Co.func]),linkDirectionalParticleColor:Co.oneOfType([Co.string,Co.func]),dagMode:Co.oneOf(["td","bu","lr","rl","zin","zout","radialin","radialout"]),dagLevelDistance:Co.number,dagNodeFilter:Co.func,onDagError:Co.func,d3AlphaMin:Co.number,d3AlphaDecay:Co.number,d3VelocityDecay:Co.number,warmupTicks:Co.number,cooldownTicks:Co.number,cooldownTime:Co.number,onEngineTick:Co.func,onEngineStop:Co.func,getGraphBbox:Co.func},jo={zoomToFit:Co.func,onNodeClick:Co.func,onNodeRightClick:Co.func,onNodeHover:Co.func,onNodeDrag:Co.func,onNodeDragEnd:Co.func,onLinkClick:Co.func,onLinkRightClick:Co.func,onLinkHover:Co.func,onBackgroundClick:Co.func,onBackgroundRightClick:Co.func,enablePointerInteraction:Co.bool,enableNodeDrag:Co.bool},No=(Co.bool,Co.number,Co.number,Co.oneOfType([Co.object,Co.string,Co.func]),Co.oneOfType([Co.bool,Co.string,Co.func]),Co.number,Co.number,Co.oneOfType([Co.number,Co.string,Co.func]),Co.oneOfType([Co.object,Co.string,Co.func]),Co.oneOfType([Co.object,Co.string,Co.func]),Co.oneOfType([Co.bool,Co.string,Co.func]),Co.func,Co.number,Co.number,Co.oneOf(["d3","ngraph"]),Co.object,Co.oneOf([1,2,3]),Object.assign({},To,jo,{linkLineDash:Co.oneOfType([Co.arrayOf(Co.number),Co.string,Co.func]),nodeCanvasObject:Co.func,nodeCanvasObjectMode:Co.oneOfType([Co.string,Co.func]),linkCanvasObject:Co.func,linkCanvasObjectMode:Co.oneOfType([Co.string,Co.func]),enableZoomPanInteraction:Co.bool,onZoom:Co.func,onZoomEnd:Co.func}));const Po=function(t,r){var i="object"===u(r)?r:{wrapperElementType:r,methodNames:(arguments.length<=2?void 0:arguments[2])||void 0,initPropNames:(arguments.length<=3?void 0:arguments[3])||void 0},l=i.wrapperElementType,f=void 0===l?"div":l,h=i.methodNames,p=void 0===h?[]:h,d=i.initPropNames,y=void 0===d?[]:d;return n.forwardRef((function(r,i){var u=n.useRef(),l=s(n.useState({}),2),h=l[0],d=l[1];n.useEffect((function(){return d(r)}));var g=n.useMemo((function(){var n=a(y.filter((function(t){return r.hasOwnProperty(t)})).map((function(t){return[t,r[t]]})));return t(n)}),[]);n.useLayoutEffect((function(){g(u.current)}),[]),n.useEffect((function(){return g._destructor instanceof Function?g._destructor:void 0}),[]);var v=n.useCallback((function(t){for(var n=arguments.length,e=new Array(n>1?n-1:0),r=1;r<n;r++)e[r-1]=arguments[r];return g[t]instanceof Function?g[t].apply(g,e):void 0}),[g]),m=o(r,[].concat(c(p),c(y)));return Object.keys(m).filter((function(t){return h[t]!==r[t]})).forEach((function(t){return v(t,r[t])})),n.useImperativeHandle(i,(function(){return a(p.map((function(t){return[t,function(){for(var n=arguments.length,e=new Array(n),r=0;r<n;r++)e[r]=arguments[r];return v.apply(void 0,[t].concat(e))}]})))})),e.createElement(f,{ref:u})}))}(fo,{methodNames:["emitParticle","d3Force","d3ReheatSimulation","stopAnimation","pauseAnimation","resumeAnimation","centerAt","zoom","zoomToFit","getGraphBbox","screen2GraphCoords","graph2ScreenCoords"]});Po.displayName="ForceGraph2D",Po.propTypes=No,t.ForceGraph2D=Po,Object.defineProperty(t,"__esModule",{value:!0})}));