45 lines
179 KiB
JavaScript
45 lines
179 KiB
JavaScript
import{i as Nt,r as Y,R as Li,c as Dn,a as jn,b as qi,o as Hi,m as $n,d as Fn,g as Gi,j as H,e as Vi,S as Wi,f as Un,T as Bi}from"./index-BrDDv3Dl.js";function Xi(e,n){let r=0;for(let i of e)(i=+i)&&(r+=i);return r}var Ln=180/Math.PI,en={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Dr(e,n,r,i,o,a){var s,u,f;return(s=Math.sqrt(e*e+n*n))&&(e/=s,n/=s),(f=e*r+n*i)&&(r-=e*f,i-=n*f),(u=Math.sqrt(r*r+i*i))&&(r/=u,i/=u,f/=u),e*i<n*r&&(e=-e,n=-n,f=-f,s=-s),{translateX:o,translateY:a,rotate:Math.atan2(n,e)*Ln,skewX:Math.atan(f)*Ln,scaleX:s,scaleY:u}}var he;function Yi(e){const n=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return n.isIdentity?en:Dr(n.a,n.b,n.c,n.d,n.e,n.f)}function Zi(e){return e==null||(he||(he=document.createElementNS("http://www.w3.org/2000/svg","g")),he.setAttribute("transform",e),!(e=he.transform.baseVal.consolidate()))?en:(e=e.matrix,Dr(e.a,e.b,e.c,e.d,e.e,e.f))}function jr(e,n,r,i){function o(l){return l.length?l.pop()+" ":""}function a(l,d,c,h,g,y){if(l!==c||d!==h){var x=g.push("translate(",null,n,null,r);y.push({i:x-4,x:Nt(l,c)},{i:x-2,x:Nt(d,h)})}else(c||h)&&g.push("translate("+c+n+h+r)}function s(l,d,c,h){l!==d?(l-d>180?d+=360:d-l>180&&(l+=360),h.push({i:c.push(o(c)+"rotate(",null,i)-2,x:Nt(l,d)})):d&&c.push(o(c)+"rotate("+d+i)}function u(l,d,c,h){l!==d?h.push({i:c.push(o(c)+"skewX(",null,i)-2,x:Nt(l,d)}):d&&c.push(o(c)+"skewX("+d+i)}function f(l,d,c,h,g,y){if(l!==c||d!==h){var x=g.push(o(g)+"scale(",null,",",null,")");y.push({i:x-4,x:Nt(l,c)},{i:x-2,x:Nt(d,h)})}else(c!==1||h!==1)&&g.push(o(g)+"scale("+c+","+h+")")}return function(l,d){var c=[],h=[];return l=e(l),d=e(d),a(l.translateX,l.translateY,d.translateX,d.translateY,c,h),s(l.rotate,d.rotate,c,h),u(l.skewX,d.skewX,c,h),f(l.scaleX,l.scaleY,d.scaleX,d.scaleY,c,h),l=d=null,function(g){for(var y=-1,x=h.length,v;++y<x;)c[(v=h[y]).i]=v.x(g);return c.join("")}}}var Ki=jr(Yi,"px, ","px)","deg)"),Qi=jr(Zi,", ",")",")"),Ji=1e-12;function qn(e){return((e=Math.exp(e))+1/e)/2}function to(e){return((e=Math.exp(e))-1/e)/2}function eo(e){return((e=Math.exp(2*e))-1)/(e+1)}const no=(function e(n,r,i){function o(a,s){var u=a[0],f=a[1],l=a[2],d=s[0],c=s[1],h=s[2],g=d-u,y=c-f,x=g*g+y*y,v,p;if(x<Ji)p=Math.log(h/l)/n,v=function(S){return[u+S*g,f+S*y,l*Math.exp(n*S*p)]};else{var _=Math.sqrt(x),k=(h*h-l*l+i*x)/(2*l*r*_),w=(h*h-l*l-i*x)/(2*h*r*_),m=Math.log(Math.sqrt(k*k+1)-k),A=Math.log(Math.sqrt(w*w+1)-w);p=(A-m)/n,v=function(S){var T=S*p,z=qn(m),P=l/(r*_)*(z*eo(n*T+m)-to(m));return[u+P*g,f+P*y,l*z/qn(n*T+m)]}}return v.duration=p*1e3*n/Math.SQRT2,v}return o.rho=function(a){var s=Math.max(.001,+a),u=s*s,f=u*u;return e(s,u,f)},o})(Math.SQRT2,2,4);function ro(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,a,s,u=[],f=!0,l=!1;try{if(a=(r=r.call(e)).next,n===0){if(Object(r)!==r)return;f=!1}else for(;!(f=(i=a.call(r)).done)&&(u.push(i.value),u.length!==n);f=!0);}catch(d){l=!0,o=d}finally{try{if(!f&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(l)throw o}}return u}}function io(e,n,r){return n=ho(n),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function Hn(e,n){return so(e)||ro(e,n)||$r(e,n)||fo()}function oo(e){return ao(e)||uo(e)||$r(e)||lo()}function ao(e){if(Array.isArray(e))return nn(e)}function so(e){if(Array.isArray(e))return e}function uo(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function $r(e,n){if(e){if(typeof e=="string")return nn(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nn(e,n)}}function nn(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=new Array(n);r<n;r++)i[r]=e[r];return i}function lo(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fo(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function co(e,n){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function ho(e){var n=co(e,"string");return typeof n=="symbol"?n:String(n)}var po=function(n,r){var i=new Set(r);return Object.assign.apply(Object,[{}].concat(oo(Object.entries(n).filter(function(o){var a=Hn(o,1),s=a[0];return!i.has(s)}).map(function(o){var a=Hn(o,2),s=a[0],u=a[1];return io({},s,u)}))))};function go(e,{wrapperElementType:n="div",nodeMapper:r=a=>a,methodNames:i=[],initPropNames:o=[]}={}){return Y.forwardRef((a,s)=>{const u=Y.useRef(),f=Y.useMemo(()=>{const c=Object.fromEntries(o.filter(h=>a.hasOwnProperty(h)).map(h=>[h,a[h]]));return e(c)},[]);Gn(()=>{f(r(u.current))},Y.useLayoutEffect),Gn(()=>f._destructor instanceof Function?f._destructor:void 0);const l=Y.useCallback((c,...h)=>f[c]instanceof Function?f[c](...h):void 0,[f]),d=Y.useRef({});return Object.keys(po(a,[...i,...o])).filter(c=>d.current[c]!==a[c]).forEach(c=>l(c,a[c])),d.current=a,Y.useImperativeHandle(s,()=>Object.fromEntries(i.map(c=>[c,(...h)=>l(c,...h)])),[l]),Li.createElement(n,{ref:u})})}function Gn(e,n=Y.useEffect){const r=Y.useRef(),i=Y.useRef(!1),o=Y.useRef(!1),[a,s]=Y.useState(0);i.current&&(o.current=!0),n(()=>(i.current||(r.current=e(),i.current=!0),s(u=>u+1),()=>{o.current&&(r.current&&r.current(),r.current=void 0,i.current=!1,o.current=!1)}),[])}var rn="http://www.w3.org/1999/xhtml";const Vn={svg:"http://www.w3.org/2000/svg",xhtml:rn,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ie(e){var n=e+="",r=n.indexOf(":");return r>=0&&(n=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Vn.hasOwnProperty(n)?{space:Vn[n],local:e}:e}function yo(e){return function(){var n=this.ownerDocument,r=this.namespaceURI;return r===rn&&n.documentElement.namespaceURI===rn?n.createElement(e):n.createElementNS(r,e)}}function _o(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Fr(e){var n=Ie(e);return(n.local?_o:yo)(n)}function vo(){}function mn(e){return e==null?vo:function(){return this.querySelector(e)}}function mo(e){typeof e!="function"&&(e=mn(e));for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o)for(var a=n[o],s=a.length,u=i[o]=new Array(s),f,l,d=0;d<s;++d)(f=a[d])&&(l=e.call(f,f.__data__,d,a))&&("__data__"in f&&(l.__data__=f.__data__),u[d]=l);return new it(i,this._parents)}function bo(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function xo(){return[]}function Ur(e){return e==null?xo:function(){return this.querySelectorAll(e)}}function wo(e){return function(){return bo(e.apply(this,arguments))}}function ko(e){typeof e=="function"?e=wo(e):e=Ur(e);for(var n=this._groups,r=n.length,i=[],o=[],a=0;a<r;++a)for(var s=n[a],u=s.length,f,l=0;l<u;++l)(f=s[l])&&(i.push(e.call(f,f.__data__,l,s)),o.push(f));return new it(i,o)}function Lr(e){return function(){return this.matches(e)}}function qr(e){return function(n){return n.matches(e)}}var Ao=Array.prototype.find;function Co(e){return function(){return Ao.call(this.children,e)}}function So(){return this.firstElementChild}function To(e){return this.select(e==null?So:Co(typeof e=="function"?e:qr(e)))}var Mo=Array.prototype.filter;function Po(){return Array.from(this.children)}function Oo(e){return function(){return Mo.call(this.children,e)}}function Eo(e){return this.selectAll(e==null?Po:Oo(typeof e=="function"?e:qr(e)))}function zo(e){typeof e!="function"&&(e=Lr(e));for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o)for(var a=n[o],s=a.length,u=i[o]=[],f,l=0;l<s;++l)(f=a[l])&&e.call(f,f.__data__,l,a)&&u.push(f);return new it(i,this._parents)}function Hr(e){return new Array(e.length)}function Ro(){return new it(this._enter||this._groups.map(Hr),this._parents)}function ke(e,n){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=n}ke.prototype={constructor:ke,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,n){return this._parent.insertBefore(e,n)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function No(e){return function(){return e}}function Io(e,n,r,i,o,a){for(var s=0,u,f=n.length,l=a.length;s<l;++s)(u=n[s])?(u.__data__=a[s],i[s]=u):r[s]=new ke(e,a[s]);for(;s<f;++s)(u=n[s])&&(o[s]=u)}function Do(e,n,r,i,o,a,s){var u,f,l=new Map,d=n.length,c=a.length,h=new Array(d),g;for(u=0;u<d;++u)(f=n[u])&&(h[u]=g=s.call(f,f.__data__,u,n)+"",l.has(g)?o[u]=f:l.set(g,f));for(u=0;u<c;++u)g=s.call(e,a[u],u,a)+"",(f=l.get(g))?(i[u]=f,f.__data__=a[u],l.delete(g)):r[u]=new ke(e,a[u]);for(u=0;u<d;++u)(f=n[u])&&l.get(h[u])===f&&(o[u]=f)}function jo(e){return e.__data__}function $o(e,n){if(!arguments.length)return Array.from(this,jo);var r=n?Do:Io,i=this._parents,o=this._groups;typeof e!="function"&&(e=No(e));for(var a=o.length,s=new Array(a),u=new Array(a),f=new Array(a),l=0;l<a;++l){var d=i[l],c=o[l],h=c.length,g=Fo(e.call(d,d&&d.__data__,l,i)),y=g.length,x=u[l]=new Array(y),v=s[l]=new Array(y),p=f[l]=new Array(h);r(d,c,x,v,p,g,n);for(var _=0,k=0,w,m;_<y;++_)if(w=x[_]){for(_>=k&&(k=_+1);!(m=v[k])&&++k<y;);w._next=m||null}}return s=new it(s,i),s._enter=u,s._exit=f,s}function Fo(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Uo(){return new it(this._exit||this._groups.map(Hr),this._parents)}function Lo(e,n,r){var i=this.enter(),o=this,a=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),n!=null&&(o=n(o),o&&(o=o.selection())),r==null?a.remove():r(a),i&&o?i.merge(o).order():o}function qo(e){for(var n=e.selection?e.selection():e,r=this._groups,i=n._groups,o=r.length,a=i.length,s=Math.min(o,a),u=new Array(o),f=0;f<s;++f)for(var l=r[f],d=i[f],c=l.length,h=u[f]=new Array(c),g,y=0;y<c;++y)(g=l[y]||d[y])&&(h[y]=g);for(;f<o;++f)u[f]=r[f];return new it(u,this._parents)}function Ho(){for(var e=this._groups,n=-1,r=e.length;++n<r;)for(var i=e[n],o=i.length-1,a=i[o],s;--o>=0;)(s=i[o])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}function Go(e){e||(e=Vo);function n(c,h){return c&&h?e(c.__data__,h.__data__):!c-!h}for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a){for(var s=r[a],u=s.length,f=o[a]=new Array(u),l,d=0;d<u;++d)(l=s[d])&&(f[d]=l);f.sort(n)}return new it(o,this._parents).order()}function Vo(e,n){return e<n?-1:e>n?1:e>=n?0:NaN}function Wo(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Bo(){return Array.from(this)}function Xo(){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length;o<a;++o){var s=i[o];if(s)return s}return null}function Yo(){let e=0;for(const n of this)++e;return e}function Zo(){return!this.node()}function Ko(e){for(var n=this._groups,r=0,i=n.length;r<i;++r)for(var o=n[r],a=0,s=o.length,u;a<s;++a)(u=o[a])&&e.call(u,u.__data__,a,o);return this}function Qo(e){return function(){this.removeAttribute(e)}}function Jo(e){return function(){this.removeAttributeNS(e.space,e.local)}}function ta(e,n){return function(){this.setAttribute(e,n)}}function ea(e,n){return function(){this.setAttributeNS(e.space,e.local,n)}}function na(e,n){return function(){var r=n.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function ra(e,n){return function(){var r=n.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function ia(e,n){var r=Ie(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((n==null?r.local?Jo:Qo:typeof n=="function"?r.local?ra:na:r.local?ea:ta)(r,n))}function Gr(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function oa(e){return function(){this.style.removeProperty(e)}}function aa(e,n,r){return function(){this.style.setProperty(e,n,r)}}function sa(e,n,r){return function(){var i=n.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function ua(e,n,r){return arguments.length>1?this.each((n==null?oa:typeof n=="function"?sa:aa)(e,n,r??"")):Ut(this.node(),e)}function Ut(e,n){return e.style.getPropertyValue(n)||Gr(e).getComputedStyle(e,null).getPropertyValue(n)}function la(e){return function(){delete this[e]}}function fa(e,n){return function(){this[e]=n}}function ca(e,n){return function(){var r=n.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function ha(e,n){return arguments.length>1?this.each((n==null?la:typeof n=="function"?ca:fa)(e,n)):this.node()[e]}function Vr(e){return e.trim().split(/^|\s+/)}function bn(e){return e.classList||new Wr(e)}function Wr(e){this._node=e,this._names=Vr(e.getAttribute("class")||"")}Wr.prototype={add:function(e){var n=this._names.indexOf(e);n<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var n=this._names.indexOf(e);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Br(e,n){for(var r=bn(e),i=-1,o=n.length;++i<o;)r.add(n[i])}function Xr(e,n){for(var r=bn(e),i=-1,o=n.length;++i<o;)r.remove(n[i])}function da(e){return function(){Br(this,e)}}function pa(e){return function(){Xr(this,e)}}function ga(e,n){return function(){(n.apply(this,arguments)?Br:Xr)(this,e)}}function ya(e,n){var r=Vr(e+"");if(arguments.length<2){for(var i=bn(this.node()),o=-1,a=r.length;++o<a;)if(!i.contains(r[o]))return!1;return!0}return this.each((typeof n=="function"?ga:n?da:pa)(r,n))}function _a(){this.textContent=""}function va(e){return function(){this.textContent=e}}function ma(e){return function(){var n=e.apply(this,arguments);this.textContent=n??""}}function ba(e){return arguments.length?this.each(e==null?_a:(typeof e=="function"?ma:va)(e)):this.node().textContent}function xa(){this.innerHTML=""}function wa(e){return function(){this.innerHTML=e}}function ka(e){return function(){var n=e.apply(this,arguments);this.innerHTML=n??""}}function Aa(e){return arguments.length?this.each(e==null?xa:(typeof e=="function"?ka:wa)(e)):this.node().innerHTML}function Ca(){this.nextSibling&&this.parentNode.appendChild(this)}function Sa(){return this.each(Ca)}function Ta(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ma(){return this.each(Ta)}function Pa(e){var n=typeof e=="function"?e:Fr(e);return this.select(function(){return this.appendChild(n.apply(this,arguments))})}function Oa(){return null}function Ea(e,n){var r=typeof e=="function"?e:Fr(e),i=n==null?Oa:typeof n=="function"?n:mn(n);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function za(){var e=this.parentNode;e&&e.removeChild(this)}function Ra(){return this.each(za)}function Na(){var e=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(e,this.nextSibling):e}function Ia(){var e=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(e,this.nextSibling):e}function Da(e){return this.select(e?Ia:Na)}function ja(e){return arguments.length?this.property("__data__",e):this.node().__data__}function $a(e){return function(n){e.call(this,n,this.__data__)}}function Fa(e){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");return i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),{type:n,name:r}})}function Ua(e){return function(){var n=this.__on;if(n){for(var r=0,i=-1,o=n.length,a;r<o;++r)a=n[r],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):n[++i]=a;++i?n.length=i:delete this.__on}}}function La(e,n,r){return function(){var i=this.__on,o,a=$a(n);if(i){for(var s=0,u=i.length;s<u;++s)if((o=i[s]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=a,o.options=r),o.value=n;return}}this.addEventListener(e.type,a,r),o={type:e.type,name:e.name,value:n,listener:a,options:r},i?i.push(o):this.__on=[o]}}function qa(e,n,r){var i=Fa(e+""),o,a=i.length,s;if(arguments.length<2){var u=this.node().__on;if(u){for(var f=0,l=u.length,d;f<l;++f)for(o=0,d=u[f];o<a;++o)if((s=i[o]).type===d.type&&s.name===d.name)return d.value}return}for(u=n?La:Ua,o=0;o<a;++o)this.each(u(i[o],n,r));return this}function Yr(e,n,r){var i=Gr(e),o=i.CustomEvent;typeof o=="function"?o=new o(n,r):(o=i.document.createEvent("Event"),r?(o.initEvent(n,r.bubbles,r.cancelable),o.detail=r.detail):o.initEvent(n,!1,!1)),e.dispatchEvent(o)}function Ha(e,n){return function(){return Yr(this,e,n)}}function Ga(e,n){return function(){return Yr(this,e,n.apply(this,arguments))}}function Va(e,n){return this.each((typeof n=="function"?Ga:Ha)(e,n))}function*Wa(){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&(yield s)}var Zr=[null];function it(e,n){this._groups=e,this._parents=n}function le(){return new it([[document.documentElement]],Zr)}function Ba(){return this}it.prototype=le.prototype={constructor:it,select:mo,selectAll:ko,selectChild:To,selectChildren:Eo,filter:zo,data:$o,enter:Ro,exit:Uo,join:Lo,merge:qo,selection:Ba,order:Ho,sort:Go,call:Wo,nodes:Bo,node:Xo,size:Yo,empty:Zo,each:Ko,attr:ia,style:ua,property:ha,classed:ya,text:ba,html:Aa,raise:Sa,lower:Ma,append:Pa,insert:Ea,remove:Ra,clone:Da,datum:ja,on:qa,dispatch:Va,[Symbol.iterator]:Wa};function st(e){return typeof e=="string"?new it([[document.querySelector(e)]],[document.documentElement]):new it([[e]],Zr)}function Xa(e){let n;for(;n=e.sourceEvent;)e=n;return e}function gt(e,n){if(e=Xa(e),n===void 0&&(n=e.currentTarget),n){var r=n.ownerSVGElement||n;if(r.createSVGPoint){var i=r.createSVGPoint();return i.x=e.clientX,i.y=e.clientY,i=i.matrixTransform(n.getScreenCTM().inverse()),[i.x,i.y]}if(n.getBoundingClientRect){var o=n.getBoundingClientRect();return[e.clientX-o.left-n.clientLeft,e.clientY-o.top-n.clientTop]}}return[e.pageX,e.pageY]}var Ya={value:()=>{}};function fe(){for(var e=0,n=arguments.length,r={},i;e<n;++e){if(!(i=arguments[e]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new _e(r)}function _e(e){this._=e}function Za(e,n){return e.trim().split(/^|\s+/).map(function(r){var i="",o=r.indexOf(".");if(o>=0&&(i=r.slice(o+1),r=r.slice(0,o)),r&&!n.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}_e.prototype=fe.prototype={constructor:_e,on:function(e,n){var r=this._,i=Za(e+"",r),o,a=-1,s=i.length;if(arguments.length<2){for(;++a<s;)if((o=(e=i[a]).type)&&(o=Ka(r[o],e.name)))return o;return}if(n!=null&&typeof n!="function")throw new Error("invalid callback: "+n);for(;++a<s;)if(o=(e=i[a]).type)r[o]=Wn(r[o],e.name,n);else if(n==null)for(o in r)r[o]=Wn(r[o],e.name,null);return this},copy:function(){var e={},n=this._;for(var r in n)e[r]=n[r].slice();return new _e(e)},call:function(e,n){if((o=arguments.length-2)>0)for(var r=new Array(o),i=0,o,a;i<o;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],i=0,o=a.length;i<o;++i)a[i].value.apply(n,r)},apply:function(e,n,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],o=0,a=i.length;o<a;++o)i[o].value.apply(n,r)}};function Ka(e,n){for(var r=0,i=e.length,o;r<i;++r)if((o=e[r]).name===n)return o.value}function Wn(e,n,r){for(var i=0,o=e.length;i<o;++i)if(e[i].name===n){e[i]=Ya,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:n,value:r}),e}const Qa={passive:!1},ae={capture:!0,passive:!1};function He(e){e.stopImmediatePropagation()}function Ft(e){e.preventDefault(),e.stopImmediatePropagation()}function Kr(e){var n=e.document.documentElement,r=st(e).on("dragstart.drag",Ft,ae);"onselectstart"in n?r.on("selectstart.drag",Ft,ae):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}function Qr(e,n){var r=e.document.documentElement,i=st(e).on("dragstart.drag",null);n&&(i.on("click.drag",Ft,ae),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in r?i.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}const de=e=>()=>e;function on(e,{sourceEvent:n,subject:r,target:i,identifier:o,active:a,x:s,y:u,dx:f,dy:l,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:u,enumerable:!0,configurable:!0},dx:{value:f,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:d}})}on.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Ja(e){return!e.ctrlKey&&!e.button}function ts(){return this.parentNode}function es(e,n){return n??{x:e.x,y:e.y}}function ns(){return navigator.maxTouchPoints||"ontouchstart"in this}function rs(){var e=Ja,n=ts,r=es,i=ns,o={},a=fe("start","drag","end"),s=0,u,f,l,d,c=0;function h(w){w.on("mousedown.drag",g).filter(i).on("touchstart.drag",v).on("touchmove.drag",p,Qa).on("touchend.drag touchcancel.drag",_).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(w,m){if(!(d||!e.call(this,w,m))){var A=k(this,n.call(this,w,m),w,m,"mouse");A&&(st(w.view).on("mousemove.drag",y,ae).on("mouseup.drag",x,ae),Kr(w.view),He(w),l=!1,u=w.clientX,f=w.clientY,A("start",w))}}function y(w){if(Ft(w),!l){var m=w.clientX-u,A=w.clientY-f;l=m*m+A*A>c}o.mouse("drag",w)}function x(w){st(w.view).on("mousemove.drag mouseup.drag",null),Qr(w.view,l),Ft(w),o.mouse("end",w)}function v(w,m){if(e.call(this,w,m)){var A=w.changedTouches,S=n.call(this,w,m),T=A.length,z,P;for(z=0;z<T;++z)(P=k(this,S,w,m,A[z].identifier,A[z]))&&(He(w),P("start",w,A[z]))}}function p(w){var m=w.changedTouches,A=m.length,S,T;for(S=0;S<A;++S)(T=o[m[S].identifier])&&(Ft(w),T("drag",w,m[S]))}function _(w){var m=w.changedTouches,A=m.length,S,T;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),S=0;S<A;++S)(T=o[m[S].identifier])&&(He(w),T("end",w,m[S]))}function k(w,m,A,S,T,z){var P=a.copy(),N=gt(z||A,m),I,U,C;if((C=r.call(w,new on("beforestart",{sourceEvent:A,target:h,identifier:T,active:s,x:N[0],y:N[1],dx:0,dy:0,dispatch:P}),S))!=null)return I=C.x-N[0]||0,U=C.y-N[1]||0,function E(M,R,D){var $=N,F;switch(M){case"start":o[T]=E,F=s++;break;case"end":delete o[T],--s;case"drag":N=gt(D||R,m),F=s;break}P.call(M,w,new on(M,{sourceEvent:R,subject:C,target:h,identifier:T,active:F,x:N[0]+I,y:N[1]+U,dx:N[0]-$[0],dy:N[1]-$[1],dispatch:P}),S)}}return h.filter=function(w){return arguments.length?(e=typeof w=="function"?w:de(!!w),h):e},h.container=function(w){return arguments.length?(n=typeof w=="function"?w:de(w),h):n},h.subject=function(w){return arguments.length?(r=typeof w=="function"?w:de(w),h):r},h.touchable=function(w){return arguments.length?(i=typeof w=="function"?w:de(!!w),h):i},h.on=function(){var w=a.on.apply(a,arguments);return w===a?h:w},h.clickDistance=function(w){return arguments.length?(c=(w=+w)*w,h):Math.sqrt(c)},h}var Lt=0,Qt=0,Ht=0,Jr=1e3,Ae,Jt,Ce=0,Dt=0,De=0,se=typeof performance=="object"&&performance.now?performance:Date,ti=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function xn(){return Dt||(ti(is),Dt=se.now()+De)}function is(){Dt=0}function Se(){this._call=this._time=this._next=null}Se.prototype=wn.prototype={constructor:Se,restart:function(e,n,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?xn():+r)+(n==null?0:+n),!this._next&&Jt!==this&&(Jt?Jt._next=this:Ae=this,Jt=this),this._call=e,this._time=r,an()},stop:function(){this._call&&(this._call=null,this._time=1/0,an())}};function wn(e,n,r){var i=new Se;return i.restart(e,n,r),i}function os(){xn(),++Lt;for(var e=Ae,n;e;)(n=Dt-e._time)>=0&&e._call.call(void 0,n),e=e._next;--Lt}function Bn(){Dt=(Ce=se.now())+De,Lt=Qt=0;try{os()}finally{Lt=0,ss(),Dt=0}}function as(){var e=se.now(),n=e-Ce;n>Jr&&(De-=n,Ce=e)}function ss(){for(var e,n=Ae,r,i=1/0;n;)n._call?(i>n._time&&(i=n._time),e=n,n=n._next):(r=n._next,n._next=null,n=e?e._next=r:Ae=r);Jt=e,an(i)}function an(e){if(!Lt){Qt&&(Qt=clearTimeout(Qt));var n=e-Dt;n>24?(e<1/0&&(Qt=setTimeout(Bn,e-se.now()-De)),Ht&&(Ht=clearInterval(Ht))):(Ht||(Ce=se.now(),Ht=setInterval(as,Jr)),Lt=1,ti(Bn))}}function Xn(e,n,r){var i=new Se;return n=n==null?0:+n,i.restart(o=>{i.stop(),e(o+n)},n,r),i}var us=fe("start","end","cancel","interrupt"),ls=[],ei=0,Yn=1,sn=2,ve=3,Zn=4,un=5,me=6;function je(e,n,r,i,o,a){var s=e.__transition;if(!s)e.__transition={};else if(r in s)return;fs(e,r,{name:n,index:i,group:o,on:us,tween:ls,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:ei})}function kn(e,n){var r=dt(e,n);if(r.state>ei)throw new Error("too late; already scheduled");return r}function vt(e,n){var r=dt(e,n);if(r.state>ve)throw new Error("too late; already running");return r}function dt(e,n){var r=e.__transition;if(!r||!(r=r[n]))throw new Error("transition not found");return r}function fs(e,n,r){var i=e.__transition,o;i[n]=r,r.timer=wn(a,0,r.time);function a(l){r.state=Yn,r.timer.restart(s,r.delay,r.time),r.delay<=l&&s(l-r.delay)}function s(l){var d,c,h,g;if(r.state!==Yn)return f();for(d in i)if(g=i[d],g.name===r.name){if(g.state===ve)return Xn(s);g.state===Zn?(g.state=me,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete i[d]):+d<n&&(g.state=me,g.timer.stop(),g.on.call("cancel",e,e.__data__,g.index,g.group),delete i[d])}if(Xn(function(){r.state===ve&&(r.state=Zn,r.timer.restart(u,r.delay,r.time),u(l))}),r.state=sn,r.on.call("start",e,e.__data__,r.index,r.group),r.state===sn){for(r.state=ve,o=new Array(h=r.tween.length),d=0,c=-1;d<h;++d)(g=r.tween[d].value.call(e,e.__data__,r.index,r.group))&&(o[++c]=g);o.length=c+1}}function u(l){for(var d=l<r.duration?r.ease.call(null,l/r.duration):(r.timer.restart(f),r.state=un,1),c=-1,h=o.length;++c<h;)o[c].call(e,d);r.state===un&&(r.on.call("end",e,e.__data__,r.index,r.group),f())}function f(){r.state=me,r.timer.stop(),delete i[n];for(var l in i)return;delete e.__transition}}function be(e,n){var r=e.__transition,i,o,a=!0,s;if(r){n=n==null?null:n+"";for(s in r){if((i=r[s]).name!==n){a=!1;continue}o=i.state>sn&&i.state<un,i.state=me,i.timer.stop(),i.on.call(o?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[s]}a&&delete e.__transition}}function cs(e){return this.each(function(){be(this,e)})}function hs(e,n){var r,i;return function(){var o=vt(this,e),a=o.tween;if(a!==r){i=r=a;for(var s=0,u=i.length;s<u;++s)if(i[s].name===n){i=i.slice(),i.splice(s,1);break}}o.tween=i}}function ds(e,n,r){var i,o;if(typeof r!="function")throw new Error;return function(){var a=vt(this,e),s=a.tween;if(s!==i){o=(i=s).slice();for(var u={name:n,value:r},f=0,l=o.length;f<l;++f)if(o[f].name===n){o[f]=u;break}f===l&&o.push(u)}a.tween=o}}function ps(e,n){var r=this._id;if(e+="",arguments.length<2){for(var i=dt(this.node(),r).tween,o=0,a=i.length,s;o<a;++o)if((s=i[o]).name===e)return s.value;return null}return this.each((n==null?hs:ds)(r,e,n))}function An(e,n,r){var i=e._id;return e.each(function(){var o=vt(this,i);(o.value||(o.value={}))[n]=r.apply(this,arguments)}),function(o){return dt(o,i).value[n]}}function ni(e,n){var r;return(typeof n=="number"?Nt:n instanceof Dn?jn:(r=Dn(n))?(n=r,jn):qi)(e,n)}function gs(e){return function(){this.removeAttribute(e)}}function ys(e){return function(){this.removeAttributeNS(e.space,e.local)}}function _s(e,n,r){var i,o=r+"",a;return function(){var s=this.getAttribute(e);return s===o?null:s===i?a:a=n(i=s,r)}}function vs(e,n,r){var i,o=r+"",a;return function(){var s=this.getAttributeNS(e.space,e.local);return s===o?null:s===i?a:a=n(i=s,r)}}function ms(e,n,r){var i,o,a;return function(){var s,u=r(this),f;return u==null?void this.removeAttribute(e):(s=this.getAttribute(e),f=u+"",s===f?null:s===i&&f===o?a:(o=f,a=n(i=s,u)))}}function bs(e,n,r){var i,o,a;return function(){var s,u=r(this),f;return u==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),f=u+"",s===f?null:s===i&&f===o?a:(o=f,a=n(i=s,u)))}}function xs(e,n){var r=Ie(e),i=r==="transform"?Qi:ni;return this.attrTween(e,typeof n=="function"?(r.local?bs:ms)(r,i,An(this,"attr."+e,n)):n==null?(r.local?ys:gs)(r):(r.local?vs:_s)(r,i,n))}function ws(e,n){return function(r){this.setAttribute(e,n.call(this,r))}}function ks(e,n){return function(r){this.setAttributeNS(e.space,e.local,n.call(this,r))}}function As(e,n){var r,i;function o(){var a=n.apply(this,arguments);return a!==i&&(r=(i=a)&&ks(e,a)),r}return o._value=n,o}function Cs(e,n){var r,i;function o(){var a=n.apply(this,arguments);return a!==i&&(r=(i=a)&&ws(e,a)),r}return o._value=n,o}function Ss(e,n){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(n==null)return this.tween(r,null);if(typeof n!="function")throw new Error;var i=Ie(e);return this.tween(r,(i.local?As:Cs)(i,n))}function Ts(e,n){return function(){kn(this,e).delay=+n.apply(this,arguments)}}function Ms(e,n){return n=+n,function(){kn(this,e).delay=n}}function Ps(e){var n=this._id;return arguments.length?this.each((typeof e=="function"?Ts:Ms)(n,e)):dt(this.node(),n).delay}function Os(e,n){return function(){vt(this,e).duration=+n.apply(this,arguments)}}function Es(e,n){return n=+n,function(){vt(this,e).duration=n}}function zs(e){var n=this._id;return arguments.length?this.each((typeof e=="function"?Os:Es)(n,e)):dt(this.node(),n).duration}function Rs(e,n){if(typeof n!="function")throw new Error;return function(){vt(this,e).ease=n}}function Ns(e){var n=this._id;return arguments.length?this.each(Rs(n,e)):dt(this.node(),n).ease}function Is(e,n){return function(){var r=n.apply(this,arguments);if(typeof r!="function")throw new Error;vt(this,e).ease=r}}function Ds(e){if(typeof e!="function")throw new Error;return this.each(Is(this._id,e))}function js(e){typeof e!="function"&&(e=Lr(e));for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o)for(var a=n[o],s=a.length,u=i[o]=[],f,l=0;l<s;++l)(f=a[l])&&e.call(f,f.__data__,l,a)&&u.push(f);return new Pt(i,this._parents,this._name,this._id)}function $s(e){if(e._id!==this._id)throw new Error;for(var n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),u=0;u<a;++u)for(var f=n[u],l=r[u],d=f.length,c=s[u]=new Array(d),h,g=0;g<d;++g)(h=f[g]||l[g])&&(c[g]=h);for(;u<i;++u)s[u]=n[u];return new Pt(s,this._parents,this._name,this._id)}function Fs(e){return(e+"").trim().split(/^|\s+/).every(function(n){var r=n.indexOf(".");return r>=0&&(n=n.slice(0,r)),!n||n==="start"})}function Us(e,n,r){var i,o,a=Fs(n)?kn:vt;return function(){var s=a(this,e),u=s.on;u!==i&&(o=(i=u).copy()).on(n,r),s.on=o}}function Ls(e,n){var r=this._id;return arguments.length<2?dt(this.node(),r).on.on(e):this.each(Us(r,e,n))}function qs(e){return function(){var n=this.parentNode;for(var r in this.__transition)if(+r!==e)return;n&&n.removeChild(this)}}function Hs(){return this.on("end.remove",qs(this._id))}function Gs(e){var n=this._name,r=this._id;typeof e!="function"&&(e=mn(e));for(var i=this._groups,o=i.length,a=new Array(o),s=0;s<o;++s)for(var u=i[s],f=u.length,l=a[s]=new Array(f),d,c,h=0;h<f;++h)(d=u[h])&&(c=e.call(d,d.__data__,h,u))&&("__data__"in d&&(c.__data__=d.__data__),l[h]=c,je(l[h],n,r,h,l,dt(d,r)));return new Pt(a,this._parents,n,r)}function Vs(e){var n=this._name,r=this._id;typeof e!="function"&&(e=Ur(e));for(var i=this._groups,o=i.length,a=[],s=[],u=0;u<o;++u)for(var f=i[u],l=f.length,d,c=0;c<l;++c)if(d=f[c]){for(var h=e.call(d,d.__data__,c,f),g,y=dt(d,r),x=0,v=h.length;x<v;++x)(g=h[x])&&je(g,n,r,x,h,y);a.push(h),s.push(d)}return new Pt(a,s,n,r)}var Ws=le.prototype.constructor;function Bs(){return new Ws(this._groups,this._parents)}function Xs(e,n){var r,i,o;return function(){var a=Ut(this,e),s=(this.style.removeProperty(e),Ut(this,e));return a===s?null:a===r&&s===i?o:o=n(r=a,i=s)}}function ri(e){return function(){this.style.removeProperty(e)}}function Ys(e,n,r){var i,o=r+"",a;return function(){var s=Ut(this,e);return s===o?null:s===i?a:a=n(i=s,r)}}function Zs(e,n,r){var i,o,a;return function(){var s=Ut(this,e),u=r(this),f=u+"";return u==null&&(f=u=(this.style.removeProperty(e),Ut(this,e))),s===f?null:s===i&&f===o?a:(o=f,a=n(i=s,u))}}function Ks(e,n){var r,i,o,a="style."+n,s="end."+a,u;return function(){var f=vt(this,e),l=f.on,d=f.value[a]==null?u||(u=ri(n)):void 0;(l!==r||o!==d)&&(i=(r=l).copy()).on(s,o=d),f.on=i}}function Qs(e,n,r){var i=(e+="")=="transform"?Ki:ni;return n==null?this.styleTween(e,Xs(e,i)).on("end.style."+e,ri(e)):typeof n=="function"?this.styleTween(e,Zs(e,i,An(this,"style."+e,n))).each(Ks(this._id,e)):this.styleTween(e,Ys(e,i,n),r).on("end.style."+e,null)}function Js(e,n,r){return function(i){this.style.setProperty(e,n.call(this,i),r)}}function tu(e,n,r){var i,o;function a(){var s=n.apply(this,arguments);return s!==o&&(i=(o=s)&&Js(e,s,r)),i}return a._value=n,a}function eu(e,n,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(n==null)return this.tween(i,null);if(typeof n!="function")throw new Error;return this.tween(i,tu(e,n,r??""))}function nu(e){return function(){this.textContent=e}}function ru(e){return function(){var n=e(this);this.textContent=n??""}}function iu(e){return this.tween("text",typeof e=="function"?ru(An(this,"text",e)):nu(e==null?"":e+""))}function ou(e){return function(n){this.textContent=e.call(this,n)}}function au(e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&ou(o)),n}return i._value=e,i}function su(e){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;return this.tween(n,au(e))}function uu(){for(var e=this._name,n=this._id,r=ii(),i=this._groups,o=i.length,a=0;a<o;++a)for(var s=i[a],u=s.length,f,l=0;l<u;++l)if(f=s[l]){var d=dt(f,n);je(f,e,r,l,s,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new Pt(i,this._parents,e,r)}function lu(){var e,n,r=this,i=r._id,o=r.size();return new Promise(function(a,s){var u={value:s},f={value:function(){--o===0&&a()}};r.each(function(){var l=vt(this,i),d=l.on;d!==e&&(n=(e=d).copy(),n._.cancel.push(u),n._.interrupt.push(u),n._.end.push(f)),l.on=n}),o===0&&a()})}var fu=0;function Pt(e,n,r,i){this._groups=e,this._parents=n,this._name=r,this._id=i}function ii(){return++fu}var xt=le.prototype;Pt.prototype={constructor:Pt,select:Gs,selectAll:Vs,selectChild:xt.selectChild,selectChildren:xt.selectChildren,filter:js,merge:$s,selection:Bs,transition:uu,call:xt.call,nodes:xt.nodes,node:xt.node,size:xt.size,empty:xt.empty,each:xt.each,on:Ls,attr:xs,attrTween:Ss,style:Qs,styleTween:eu,text:iu,textTween:su,remove:Hs,tween:ps,delay:Ps,duration:zs,ease:Ns,easeVarying:Ds,end:lu,[Symbol.iterator]:xt[Symbol.iterator]};function cu(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var hu={time:null,delay:0,duration:250,ease:cu};function du(e,n){for(var r;!(r=e.__transition)||!(r=r[n]);)if(!(e=e.parentNode))throw new Error(`transition ${n} not found`);return r}function pu(e){var n,r;e instanceof Pt?(n=e._id,e=e._name):(n=ii(),(r=hu).time=xn(),e=e==null?null:e+"");for(var i=this._groups,o=i.length,a=0;a<o;++a)for(var s=i[a],u=s.length,f,l=0;l<u;++l)(f=s[l])&&je(f,e,n,l,s,r||du(f,n));return new Pt(i,this._parents,e,n)}le.prototype.interrupt=cs;le.prototype.transition=pu;const pe=e=>()=>e;function gu(e,{sourceEvent:n,target:r,transform:i,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function St(e,n,r){this.k=e,this.x=n,this.y=r}St.prototype={constructor:St,scale:function(e){return e===1?this:new St(this.k*e,this.x,this.y)},translate:function(e,n){return e===0&n===0?this:new St(this.k,this.x+this.k*e,this.y+this.k*n)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Cn=new St(1,0,0);pt.prototype=St.prototype;function pt(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Cn;return e.__zoom}function Ge(e){e.stopImmediatePropagation()}function Gt(e){e.preventDefault(),e.stopImmediatePropagation()}function yu(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function _u(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function Kn(){return this.__zoom||Cn}function vu(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function mu(){return navigator.maxTouchPoints||"ontouchstart"in this}function bu(e,n,r){var i=e.invertX(n[0][0])-r[0][0],o=e.invertX(n[1][0])-r[1][0],a=e.invertY(n[0][1])-r[0][1],s=e.invertY(n[1][1])-r[1][1];return e.translate(o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o),s>a?(a+s)/2:Math.min(0,a)||Math.max(0,s))}function xu(){var e=yu,n=_u,r=bu,i=vu,o=mu,a=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],u=250,f=no,l=fe("start","zoom","end"),d,c,h,g=500,y=150,x=0,v=10;function p(C){C.property("__zoom",Kn).on("wheel.zoom",T,{passive:!1}).on("mousedown.zoom",z).on("dblclick.zoom",P).filter(o).on("touchstart.zoom",N).on("touchmove.zoom",I).on("touchend.zoom touchcancel.zoom",U).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}p.transform=function(C,E,M,R){var D=C.selection?C.selection():C;D.property("__zoom",Kn),C!==D?m(C,E,M,R):D.interrupt().each(function(){A(this,arguments).event(R).start().zoom(null,typeof E=="function"?E.apply(this,arguments):E).end()})},p.scaleBy=function(C,E,M,R){p.scaleTo(C,function(){var D=this.__zoom.k,$=typeof E=="function"?E.apply(this,arguments):E;return D*$},M,R)},p.scaleTo=function(C,E,M,R){p.transform(C,function(){var D=n.apply(this,arguments),$=this.__zoom,F=M==null?w(D):typeof M=="function"?M.apply(this,arguments):M,L=$.invert(F),q=typeof E=="function"?E.apply(this,arguments):E;return r(k(_($,q),F,L),D,s)},M,R)},p.translateBy=function(C,E,M,R){p.transform(C,function(){return r(this.__zoom.translate(typeof E=="function"?E.apply(this,arguments):E,typeof M=="function"?M.apply(this,arguments):M),n.apply(this,arguments),s)},null,R)},p.translateTo=function(C,E,M,R,D){p.transform(C,function(){var $=n.apply(this,arguments),F=this.__zoom,L=R==null?w($):typeof R=="function"?R.apply(this,arguments):R;return r(Cn.translate(L[0],L[1]).scale(F.k).translate(typeof E=="function"?-E.apply(this,arguments):-E,typeof M=="function"?-M.apply(this,arguments):-M),$,s)},R,D)};function _(C,E){return E=Math.max(a[0],Math.min(a[1],E)),E===C.k?C:new St(E,C.x,C.y)}function k(C,E,M){var R=E[0]-M[0]*C.k,D=E[1]-M[1]*C.k;return R===C.x&&D===C.y?C:new St(C.k,R,D)}function w(C){return[(+C[0][0]+ +C[1][0])/2,(+C[0][1]+ +C[1][1])/2]}function m(C,E,M,R){C.on("start.zoom",function(){A(this,arguments).event(R).start()}).on("interrupt.zoom end.zoom",function(){A(this,arguments).event(R).end()}).tween("zoom",function(){var D=this,$=arguments,F=A(D,$).event(R),L=n.apply(D,$),q=M==null?w(L):typeof M=="function"?M.apply(D,$):M,K=Math.max(L[1][0]-L[0][0],L[1][1]-L[0][1]),Z=D.__zoom,lt=typeof E=="function"?E.apply(D,$):E,mt=f(Z.invert(q).concat(K/Z.k),lt.invert(q).concat(K/lt.k));return function(ft){if(ft===1)ft=lt;else{var bt=mt(ft),qe=K/bt[2];ft=new St(qe,q[0]-bt[0]*qe,q[1]-bt[1]*qe)}F.zoom(null,ft)}})}function A(C,E,M){return!M&&C.__zooming||new S(C,E)}function S(C,E){this.that=C,this.args=E,this.active=0,this.sourceEvent=null,this.extent=n.apply(C,E),this.taps=0}S.prototype={event:function(C){return C&&(this.sourceEvent=C),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(C,E){return this.mouse&&C!=="mouse"&&(this.mouse[1]=E.invert(this.mouse[0])),this.touch0&&C!=="touch"&&(this.touch0[1]=E.invert(this.touch0[0])),this.touch1&&C!=="touch"&&(this.touch1[1]=E.invert(this.touch1[0])),this.that.__zoom=E,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(C){var E=st(this.that).datum();l.call(C,this.that,new gu(C,{sourceEvent:this.sourceEvent,target:p,transform:this.that.__zoom,dispatch:l}),E)}};function T(C,...E){if(!e.apply(this,arguments))return;var M=A(this,E).event(C),R=this.__zoom,D=Math.max(a[0],Math.min(a[1],R.k*Math.pow(2,i.apply(this,arguments)))),$=gt(C);if(M.wheel)(M.mouse[0][0]!==$[0]||M.mouse[0][1]!==$[1])&&(M.mouse[1]=R.invert(M.mouse[0]=$)),clearTimeout(M.wheel);else{if(R.k===D)return;M.mouse=[$,R.invert($)],be(this),M.start()}Gt(C),M.wheel=setTimeout(F,y),M.zoom("mouse",r(k(_(R,D),M.mouse[0],M.mouse[1]),M.extent,s));function F(){M.wheel=null,M.end()}}function z(C,...E){if(h||!e.apply(this,arguments))return;var M=C.currentTarget,R=A(this,E,!0).event(C),D=st(C.view).on("mousemove.zoom",q,!0).on("mouseup.zoom",K,!0),$=gt(C,M),F=C.clientX,L=C.clientY;Kr(C.view),Ge(C),R.mouse=[$,this.__zoom.invert($)],be(this),R.start();function q(Z){if(Gt(Z),!R.moved){var lt=Z.clientX-F,mt=Z.clientY-L;R.moved=lt*lt+mt*mt>x}R.event(Z).zoom("mouse",r(k(R.that.__zoom,R.mouse[0]=gt(Z,M),R.mouse[1]),R.extent,s))}function K(Z){D.on("mousemove.zoom mouseup.zoom",null),Qr(Z.view,R.moved),Gt(Z),R.event(Z).end()}}function P(C,...E){if(e.apply(this,arguments)){var M=this.__zoom,R=gt(C.changedTouches?C.changedTouches[0]:C,this),D=M.invert(R),$=M.k*(C.shiftKey?.5:2),F=r(k(_(M,$),R,D),n.apply(this,E),s);Gt(C),u>0?st(this).transition().duration(u).call(m,F,R,C):st(this).call(p.transform,F,R,C)}}function N(C,...E){if(e.apply(this,arguments)){var M=C.touches,R=M.length,D=A(this,E,C.changedTouches.length===R).event(C),$,F,L,q;for(Ge(C),F=0;F<R;++F)L=M[F],q=gt(L,this),q=[q,this.__zoom.invert(q),L.identifier],D.touch0?!D.touch1&&D.touch0[2]!==q[2]&&(D.touch1=q,D.taps=0):(D.touch0=q,$=!0,D.taps=1+!!d);d&&(d=clearTimeout(d)),$&&(D.taps<2&&(c=q[0],d=setTimeout(function(){d=null},g)),be(this),D.start())}}function I(C,...E){if(this.__zooming){var M=A(this,E).event(C),R=C.changedTouches,D=R.length,$,F,L,q;for(Gt(C),$=0;$<D;++$)F=R[$],L=gt(F,this),M.touch0&&M.touch0[2]===F.identifier?M.touch0[0]=L:M.touch1&&M.touch1[2]===F.identifier&&(M.touch1[0]=L);if(F=M.that.__zoom,M.touch1){var K=M.touch0[0],Z=M.touch0[1],lt=M.touch1[0],mt=M.touch1[1],ft=(ft=lt[0]-K[0])*ft+(ft=lt[1]-K[1])*ft,bt=(bt=mt[0]-Z[0])*bt+(bt=mt[1]-Z[1])*bt;F=_(F,Math.sqrt(ft/bt)),L=[(K[0]+lt[0])/2,(K[1]+lt[1])/2],q=[(Z[0]+mt[0])/2,(Z[1]+mt[1])/2]}else if(M.touch0)L=M.touch0[0],q=M.touch0[1];else return;M.zoom("touch",r(k(F,L,q),M.extent,s))}}function U(C,...E){if(this.__zooming){var M=A(this,E).event(C),R=C.changedTouches,D=R.length,$,F;for(Ge(C),h&&clearTimeout(h),h=setTimeout(function(){h=null},g),$=0;$<D;++$)F=R[$],M.touch0&&M.touch0[2]===F.identifier?delete M.touch0:M.touch1&&M.touch1[2]===F.identifier&&delete M.touch1;if(M.touch1&&!M.touch0&&(M.touch0=M.touch1,delete M.touch1),M.touch0)M.touch0[1]=this.__zoom.invert(M.touch0[0]);else if(M.end(),M.taps===2&&(F=gt(F,this),Math.hypot(c[0]-F[0],c[1]-F[1])<v)){var L=st(this).on("dblclick.zoom");L&&L.apply(this,arguments)}}}return p.wheelDelta=function(C){return arguments.length?(i=typeof C=="function"?C:pe(+C),p):i},p.filter=function(C){return arguments.length?(e=typeof C=="function"?C:pe(!!C),p):e},p.touchable=function(C){return arguments.length?(o=typeof C=="function"?C:pe(!!C),p):o},p.extent=function(C){return arguments.length?(n=typeof C=="function"?C:pe([[+C[0][0],+C[0][1]],[+C[1][0],+C[1][1]]]),p):n},p.scaleExtent=function(C){return arguments.length?(a[0]=+C[0],a[1]=+C[1],p):[a[0],a[1]]},p.translateExtent=function(C){return arguments.length?(s[0][0]=+C[0][0],s[1][0]=+C[1][0],s[0][1]=+C[0][1],s[1][1]=+C[1][1],p):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},p.constrain=function(C){return arguments.length?(r=C,p):r},p.duration=function(C){return arguments.length?(u=+C,p):u},p.interpolate=function(C){return arguments.length?(f=C,p):f},p.on=function(){var C=l.on.apply(l,arguments);return C===l?p:C},p.clickDistance=function(C){return arguments.length?(x=(C=+C)*C,p):Math.sqrt(x)},p.tapDistance=function(C){return arguments.length?(v=+C,p):v},p}var wu=typeof global=="object"&&global&&global.Object===Object&&global,ku=typeof self=="object"&&self&&self.Object===Object&&self,oi=wu||ku||Function("return this")(),Te=oi.Symbol,ai=Object.prototype,Au=ai.hasOwnProperty,Cu=ai.toString,Vt=Te?Te.toStringTag:void 0;function Su(e){var n=Au.call(e,Vt),r=e[Vt];try{e[Vt]=void 0;var i=!0}catch{}var o=Cu.call(e);return i&&(n?e[Vt]=r:delete e[Vt]),o}var Tu=Object.prototype,Mu=Tu.toString;function Pu(e){return Mu.call(e)}var Ou="[object Null]",Eu="[object Undefined]",Qn=Te?Te.toStringTag:void 0;function zu(e){return e==null?e===void 0?Eu:Ou:Qn&&Qn in Object(e)?Su(e):Pu(e)}function Ru(e){return e!=null&&typeof e=="object"}var Nu="[object Symbol]";function Iu(e){return typeof e=="symbol"||Ru(e)&&zu(e)==Nu}var Du=/\s/;function ju(e){for(var n=e.length;n--&&Du.test(e.charAt(n)););return n}var $u=/^\s+/;function Fu(e){return e&&e.slice(0,ju(e)+1).replace($u,"")}function Me(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}var Jn=NaN,Uu=/^[-+]0x[0-9a-f]+$/i,Lu=/^0b[01]+$/i,qu=/^0o[0-7]+$/i,Hu=parseInt;function tr(e){if(typeof e=="number")return e;if(Iu(e))return Jn;if(Me(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=Me(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=Fu(e);var r=Lu.test(e);return r||qu.test(e)?Hu(e.slice(2),r?2:8):Uu.test(e)?Jn:+e}var Ve=function(){return oi.Date.now()},Gu="Expected a function",Vu=Math.max,Wu=Math.min;function si(e,n,r){var i,o,a,s,u,f,l=0,d=!1,c=!1,h=!0;if(typeof e!="function")throw new TypeError(Gu);n=tr(n)||0,Me(r)&&(d=!!r.leading,c="maxWait"in r,a=c?Vu(tr(r.maxWait)||0,n):a,h="trailing"in r?!!r.trailing:h);function g(A){var S=i,T=o;return i=o=void 0,l=A,s=e.apply(T,S),s}function y(A){return l=A,u=setTimeout(p,n),d?g(A):s}function x(A){var S=A-f,T=A-l,z=n-S;return c?Wu(z,a-T):z}function v(A){var S=A-f,T=A-l;return f===void 0||S>=n||S<0||c&&T>=a}function p(){var A=Ve();if(v(A))return _(A);u=setTimeout(p,x(A))}function _(A){return u=void 0,h&&i?g(A):(i=o=void 0,s)}function k(){u!==void 0&&clearTimeout(u),l=0,i=f=o=u=void 0}function w(){return u===void 0?s:_(Ve())}function m(){var A=Ve(),S=v(A);if(i=arguments,o=this,f=A,S){if(u===void 0)return y(f);if(c)return clearTimeout(u),u=setTimeout(p,n),g(f)}return u===void 0&&(u=setTimeout(p,n)),s}return m.cancel=k,m.flush=w,m}var Bu="Expected a function";function Xu(e,n,r){var i=!0,o=!0;if(typeof e!="function")throw new TypeError(Bu);return Me(r)&&(i="leading"in r?!!r.leading:i,o="trailing"in r?!!r.trailing:o),si(e,n,{leading:i,maxWait:n,trailing:o})}var It=Object.freeze({Linear:Object.freeze({None:function(e){return e},In:function(e){return e},Out:function(e){return e},InOut:function(e){return e}}),Quadratic:Object.freeze({In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}}),Cubic:Object.freeze({In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}}),Quartic:Object.freeze({In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}}),Quintic:Object.freeze({In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}}),Sinusoidal:Object.freeze({In:function(e){return 1-Math.sin((1-e)*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return .5*(1-Math.sin(Math.PI*(.5-e)))}}),Exponential:Object.freeze({In:function(e){return e===0?0:Math.pow(1024,e-1)},Out:function(e){return e===1?1:1-Math.pow(2,-10*e)},InOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)}}),Circular:Object.freeze({In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}}),Elastic:Object.freeze({In:function(e){return e===0?0:e===1?1:-Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI)},Out:function(e){return e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e-.1)*5*Math.PI)+1},InOut:function(e){return e===0?0:e===1?1:(e*=2,e<1?-.5*Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin((e-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(e){var n=1.70158;return e===1?1:e*e*((n+1)*e-n)},Out:function(e){var n=1.70158;return e===0?0:--e*e*((n+1)*e+n)+1},InOut:function(e){var n=2.5949095;return(e*=2)<1?.5*(e*e*((n+1)*e-n)):.5*((e-=2)*e*((n+1)*e+n)+2)}}),Bounce:Object.freeze({In:function(e){return 1-It.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?It.Bounce.In(e*2)*.5:It.Bounce.Out(e*2-1)*.5+.5}}),generatePow:function(e){return e===void 0&&(e=4),e=e<Number.EPSILON?Number.EPSILON:e,e=e>1e4?1e4:e,{In:function(n){return Math.pow(n,e)},Out:function(n){return 1-Math.pow(1-n,e)},InOut:function(n){return n<.5?Math.pow(n*2,e)/2:(1-Math.pow(2-n*2,e))/2+.5}}}}),te=function(){return performance.now()},ui=(function(){function e(){this._tweens={},this._tweensAddedDuringUpdate={}}return e.prototype.getAll=function(){var n=this;return Object.keys(this._tweens).map(function(r){return n._tweens[r]})},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(n){this._tweens[n.getId()]=n,this._tweensAddedDuringUpdate[n.getId()]=n},e.prototype.remove=function(n){delete this._tweens[n.getId()],delete this._tweensAddedDuringUpdate[n.getId()]},e.prototype.update=function(n,r){n===void 0&&(n=te()),r===void 0&&(r=!1);var i=Object.keys(this._tweens);if(i.length===0)return!1;for(;i.length>0;){this._tweensAddedDuringUpdate={};for(var o=0;o<i.length;o++){var a=this._tweens[i[o]],s=!r;a&&a.update(n,s)===!1&&!r&&delete this._tweens[i[o]]}i=Object.keys(this._tweensAddedDuringUpdate)}return!0},e})(),ln={Linear:function(e,n){var r=e.length-1,i=r*n,o=Math.floor(i),a=ln.Utils.Linear;return n<0?a(e[0],e[1],i):n>1?a(e[r],e[r-1],r-i):a(e[o],e[o+1>r?r:o+1],i-o)},Utils:{Linear:function(e,n,r){return(n-e)*r+e}}},li=(function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e})(),fn=new ui,er=(function(){function e(n,r){r===void 0&&(r=fn),this._object=n,this._group=r,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=It.Linear.None,this._interpolationFunction=ln.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=li.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1}return e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.getDuration=function(){return this._duration},e.prototype.to=function(n,r){if(r===void 0&&(r=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=n,this._propertiesAreSetUp=!1,this._duration=r<0?0:r,this},e.prototype.duration=function(n){return n===void 0&&(n=1e3),this._duration=n<0?0:n,this},e.prototype.dynamic=function(n){return n===void 0&&(n=!1),this._isDynamic=n,this},e.prototype.start=function(n,r){if(n===void 0&&(n=te()),r===void 0&&(r=!1),this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var i in this._valuesStartRepeat)this._swapEndStartRepeatValues(i),this._valuesStart[i]=this._valuesStartRepeat[i]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=n,this._startTime+=this._delayTime,!this._propertiesAreSetUp||r){if(this._propertiesAreSetUp=!0,!this._isDynamic){var o={};for(var a in this._valuesEnd)o[a]=this._valuesEnd[a];this._valuesEnd=o}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,r)}return this},e.prototype.startFromCurrentValues=function(n){return this.start(n,!0)},e.prototype._setupProperties=function(n,r,i,o,a){for(var s in i){var u=n[s],f=Array.isArray(u),l=f?"array":typeof u,d=!f&&Array.isArray(i[s]);if(!(l==="undefined"||l==="function")){if(d){var c=i[s];if(c.length===0)continue;for(var h=[u],g=0,y=c.length;g<y;g+=1){var x=this._handleRelativeValue(u,c[g]);if(isNaN(x)){d=!1,console.warn("Found invalid interpolation list. Skipping.");break}h.push(x)}d&&(i[s]=h)}if((l==="object"||f)&&u&&!d){r[s]=f?[]:{};var v=u;for(var p in v)r[s][p]=v[p];o[s]=f?[]:{};var c=i[s];if(!this._isDynamic){var _={};for(var p in c)_[p]=c[p];i[s]=c=_}this._setupProperties(v,r[s],c,o[s],a)}else(typeof r[s]>"u"||a)&&(r[s]=u),f||(r[s]*=1),d?o[s]=i[s].slice().reverse():o[s]=r[s]||0}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},e.prototype.pause=function(n){return n===void 0&&(n=te()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=n,this._group&&this._group.remove(this),this)},e.prototype.resume=function(n){return n===void 0&&(n=te()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=n-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this)},e.prototype.stopChainedTweens=function(){for(var n=0,r=this._chainedTweens.length;n<r;n++)this._chainedTweens[n].stop();return this},e.prototype.group=function(n){return n===void 0&&(n=fn),this._group=n,this},e.prototype.delay=function(n){return n===void 0&&(n=0),this._delayTime=n,this},e.prototype.repeat=function(n){return n===void 0&&(n=0),this._initialRepeat=n,this._repeat=n,this},e.prototype.repeatDelay=function(n){return this._repeatDelayTime=n,this},e.prototype.yoyo=function(n){return n===void 0&&(n=!1),this._yoyo=n,this},e.prototype.easing=function(n){return n===void 0&&(n=It.Linear.None),this._easingFunction=n,this},e.prototype.interpolation=function(n){return n===void 0&&(n=ln.Linear),this._interpolationFunction=n,this},e.prototype.chain=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return this._chainedTweens=n,this},e.prototype.onStart=function(n){return this._onStartCallback=n,this},e.prototype.onEveryStart=function(n){return this._onEveryStartCallback=n,this},e.prototype.onUpdate=function(n){return this._onUpdateCallback=n,this},e.prototype.onRepeat=function(n){return this._onRepeatCallback=n,this},e.prototype.onComplete=function(n){return this._onCompleteCallback=n,this},e.prototype.onStop=function(n){return this._onStopCallback=n,this},e.prototype.update=function(n,r){var i=this,o;if(n===void 0&&(n=te()),r===void 0&&(r=!0),this._isPaused)return!0;var a,s=this._startTime+this._duration;if(!this._goToEnd&&!this._isPlaying){if(n>s)return!1;r&&this.start(n,!0)}if(this._goToEnd=!1,n<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var u=n-this._startTime,f=this._duration+((o=this._repeatDelayTime)!==null&&o!==void 0?o:this._delayTime),l=this._duration+this._repeat*f,d=function(){if(i._duration===0||u>l)return 1;var v=Math.trunc(u/f),p=u-v*f,_=Math.min(p/i._duration,1);return _===0&&u===i._duration?1:_},c=d(),h=this._easingFunction(c);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,h),this._onUpdateCallback&&this._onUpdateCallback(this._object,c),this._duration===0||u>=this._duration)if(this._repeat>0){var g=Math.min(Math.trunc((u-this._duration)/f)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=g);for(a in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[a]=="string"&&(this._valuesStartRepeat[a]=this._valuesStartRepeat[a]+parseFloat(this._valuesEnd[a])),this._yoyo&&this._swapEndStartRepeatValues(a),this._valuesStart[a]=this._valuesStartRepeat[a];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=f*g,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var y=0,x=this._chainedTweens.length;y<x;y++)this._chainedTweens[y].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(n,r,i,o){for(var a in i)if(r[a]!==void 0){var s=r[a]||0,u=i[a],f=Array.isArray(n[a]),l=Array.isArray(u),d=!f&&l;d?n[a]=this._interpolationFunction(u,o):typeof u=="object"&&u?this._updateProperties(n[a],s,u,o):(u=this._handleRelativeValue(s,u),typeof u=="number"&&(n[a]=s+(u-s)*o))}},e.prototype._handleRelativeValue=function(n,r){return typeof r!="string"?r:r.charAt(0)==="+"||r.charAt(0)==="-"?n+parseFloat(r):parseFloat(r)},e.prototype._swapEndStartRepeatValues=function(n){var r=this._valuesStartRepeat[n],i=this._valuesEnd[n];typeof i=="string"?this._valuesStartRepeat[n]=this._valuesStartRepeat[n]+parseFloat(i):this._valuesStartRepeat[n]=this._valuesEnd[n],this._valuesEnd[n]=r},e})();li.nextId;var _t=fn;_t.getAll.bind(_t);_t.removeAll.bind(_t);_t.add.bind(_t);_t.remove.bind(_t);_t.update.bind(_t);function nr(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function Yu(e){if(Array.isArray(e))return e}function Zu(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Ku(e,n,r){return Object.defineProperty(e,"prototype",{writable:!1}),e}function Qu(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,a,s,u=[],f=!0,l=!1;try{if(a=(r=r.call(e)).next,n!==0)for(;!(f=(i=a.call(r)).done)&&(u.push(i.value),u.length!==n);f=!0);}catch(d){l=!0,o=d}finally{try{if(!f&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(l)throw o}}return u}}function Ju(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tl(e,n){return Yu(e)||Qu(e,n)||el(e,n)||Ju()}function el(e,n){if(e){if(typeof e=="string")return nr(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?nr(e,n):void 0}}var nl=Ku(function e(n,r){var i=r.default,o=i===void 0?null:i,a=r.triggerUpdate,s=a===void 0?!0:a,u=r.onChange,f=u===void 0?function(l,d){}:u;Zu(this,e),this.name=n,this.defaultVal=o,this.triggerUpdate=s,this.onChange=f});function Sn(e){var n=e.stateInit,r=n===void 0?function(){return{}}:n,i=e.props,o=i===void 0?{}:i,a=e.methods,s=a===void 0?{}:a,u=e.aliases,f=u===void 0?{}:u,l=e.init,d=l===void 0?function(){}:l,c=e.update,h=c===void 0?function(){}:c,g=Object.keys(o).map(function(y){return new nl(y,o[y])});return function y(){for(var x=arguments.length,v=new Array(x),p=0;p<x;p++)v[p]=arguments[p];var _=!!(this instanceof y&&this.constructor),k=_?v.shift():void 0,w=v[0],m=w===void 0?{}:w,A=Object.assign({},r instanceof Function?r(m):r,{initialised:!1}),S={};function T(N){return z(N,m),P(),T}var z=function(I,U){d.call(T,I,A,U),A.initialised=!0},P=si(function(){A.initialised&&(h.call(T,A,S),S={})},1);return g.forEach(function(N){T[N.name]=I(N);function I(U){var C=U.name,E=U.triggerUpdate,M=E===void 0?!1:E,R=U.onChange,D=R===void 0?function(L,q){}:R,$=U.defaultVal,F=$===void 0?null:$;return function(L){var q=A[C];if(!arguments.length)return q;var K=L===void 0?F:L;return A[C]=K,D.call(T,K,A,q),!S.hasOwnProperty(C)&&(S[C]=q),M&&P(),T}}}),Object.keys(s).forEach(function(N){T[N]=function(){for(var I,U=arguments.length,C=new Array(U),E=0;E<U;E++)C[E]=arguments[E];return(I=s[N]).call.apply(I,[T,A].concat(C))}}),Object.entries(f).forEach(function(N){var I=tl(N,2),U=I[0],C=I[1];return T[U]=T[C]}),T.resetProps=function(){return g.forEach(function(N){T[N.name](N.defaultVal)}),T},T.resetProps(),A._rerender=P,_&&k&&T(k),T}}var G=(function(e){return typeof e=="function"?e:typeof e=="string"?function(n){return n[e]}:function(n){return e}});function Pe(e){"@babel/helpers - typeof";return Pe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Pe(e)}var rl=/^\s+/,il=/\s+$/;function j(e,n){if(e=e||"",n=n||{},e instanceof j)return e;if(!(this instanceof j))return new j(e,n);var r=ol(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=n.format||r.format,this._gradientType=n.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}j.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 n=this.toRgb();return(n.r*299+n.g*587+n.b*114)/1e3},getLuminance:function(){var n=this.toRgb(),r,i,o,a,s,u;return r=n.r/255,i=n.g/255,o=n.b/255,r<=.03928?a=r/12.92:a=Math.pow((r+.055)/1.055,2.4),i<=.03928?s=i/12.92:s=Math.pow((i+.055)/1.055,2.4),o<=.03928?u=o/12.92:u=Math.pow((o+.055)/1.055,2.4),.2126*a+.7152*s+.0722*u},setAlpha:function(n){return this._a=fi(n),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var n=ir(this._r,this._g,this._b);return{h:n.h*360,s:n.s,v:n.v,a:this._a}},toHsvString:function(){var n=ir(this._r,this._g,this._b),r=Math.round(n.h*360),i=Math.round(n.s*100),o=Math.round(n.v*100);return this._a==1?"hsv("+r+", "+i+"%, "+o+"%)":"hsva("+r+", "+i+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var n=rr(this._r,this._g,this._b);return{h:n.h*360,s:n.s,l:n.l,a:this._a}},toHslString:function(){var n=rr(this._r,this._g,this._b),r=Math.round(n.h*360),i=Math.round(n.s*100),o=Math.round(n.l*100);return this._a==1?"hsl("+r+", "+i+"%, "+o+"%)":"hsla("+r+", "+i+"%, "+o+"%, "+this._roundA+")"},toHex:function(n){return or(this._r,this._g,this._b,n)},toHexString:function(n){return"#"+this.toHex(n)},toHex8:function(n){return ll(this._r,this._g,this._b,this._a,n)},toHex8String:function(n){return"#"+this.toHex8(n)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(B(this._r,255)*100)+"%",g:Math.round(B(this._g,255)*100)+"%",b:Math.round(B(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(B(this._r,255)*100)+"%, "+Math.round(B(this._g,255)*100)+"%, "+Math.round(B(this._b,255)*100)+"%)":"rgba("+Math.round(B(this._r,255)*100)+"%, "+Math.round(B(this._g,255)*100)+"%, "+Math.round(B(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:xl[or(this._r,this._g,this._b,!0)]||!1},toFilter:function(n){var r="#"+ar(this._r,this._g,this._b,this._a),i=r,o=this._gradientType?"GradientType = 1, ":"";if(n){var a=j(n);i="#"+ar(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+r+",endColorstr="+i+")"},toString:function(n){var r=!!n;n=n||this._format;var i=!1,o=this._a<1&&this._a>=0,a=!r&&o&&(n==="hex"||n==="hex6"||n==="hex3"||n==="hex4"||n==="hex8"||n==="name");return a?n==="name"&&this._a===0?this.toName():this.toRgbString():(n==="rgb"&&(i=this.toRgbString()),n==="prgb"&&(i=this.toPercentageRgbString()),(n==="hex"||n==="hex6")&&(i=this.toHexString()),n==="hex3"&&(i=this.toHexString(!0)),n==="hex4"&&(i=this.toHex8String(!0)),n==="hex8"&&(i=this.toHex8String()),n==="name"&&(i=this.toName()),n==="hsl"&&(i=this.toHslString()),n==="hsv"&&(i=this.toHsvString()),i||this.toHexString())},clone:function(){return j(this.toString())},_applyModification:function(n,r){var i=n.apply(null,[this].concat([].slice.call(r)));return this._r=i._r,this._g=i._g,this._b=i._b,this.setAlpha(i._a),this},lighten:function(){return this._applyModification(dl,arguments)},brighten:function(){return this._applyModification(pl,arguments)},darken:function(){return this._applyModification(gl,arguments)},desaturate:function(){return this._applyModification(fl,arguments)},saturate:function(){return this._applyModification(cl,arguments)},greyscale:function(){return this._applyModification(hl,arguments)},spin:function(){return this._applyModification(yl,arguments)},_applyCombination:function(n,r){return n.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(ml,arguments)},complement:function(){return this._applyCombination(_l,arguments)},monochromatic:function(){return this._applyCombination(bl,arguments)},splitcomplement:function(){return this._applyCombination(vl,arguments)},triad:function(){return this._applyCombination(sr,[3])},tetrad:function(){return this._applyCombination(sr,[4])}};j.fromRatio=function(e,n){if(Pe(e)=="object"){var r={};for(var i in e)e.hasOwnProperty(i)&&(i==="a"?r[i]=e[i]:r[i]=ee(e[i]));e=r}return j(e,n)};function ol(e){var n={r:0,g:0,b:0},r=1,i=null,o=null,a=null,s=!1,u=!1;return typeof e=="string"&&(e=Cl(e)),Pe(e)=="object"&&(wt(e.r)&&wt(e.g)&&wt(e.b)?(n=al(e.r,e.g,e.b),s=!0,u=String(e.r).substr(-1)==="%"?"prgb":"rgb"):wt(e.h)&&wt(e.s)&&wt(e.v)?(i=ee(e.s),o=ee(e.v),n=ul(e.h,i,o),s=!0,u="hsv"):wt(e.h)&&wt(e.s)&&wt(e.l)&&(i=ee(e.s),a=ee(e.l),n=sl(e.h,i,a),s=!0,u="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=fi(r),{ok:s,format:e.format||u,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:r}}function al(e,n,r){return{r:B(e,255)*255,g:B(n,255)*255,b:B(r,255)*255}}function rr(e,n,r){e=B(e,255),n=B(n,255),r=B(r,255);var i=Math.max(e,n,r),o=Math.min(e,n,r),a,s,u=(i+o)/2;if(i==o)a=s=0;else{var f=i-o;switch(s=u>.5?f/(2-i-o):f/(i+o),i){case e:a=(n-r)/f+(n<r?6:0);break;case n:a=(r-e)/f+2;break;case r:a=(e-n)/f+4;break}a/=6}return{h:a,s,l:u}}function sl(e,n,r){var i,o,a;e=B(e,360),n=B(n,100),r=B(r,100);function s(l,d,c){return c<0&&(c+=1),c>1&&(c-=1),c<1/6?l+(d-l)*6*c:c<1/2?d:c<2/3?l+(d-l)*(2/3-c)*6:l}if(n===0)i=o=a=r;else{var u=r<.5?r*(1+n):r+n-r*n,f=2*r-u;i=s(f,u,e+1/3),o=s(f,u,e),a=s(f,u,e-1/3)}return{r:i*255,g:o*255,b:a*255}}function ir(e,n,r){e=B(e,255),n=B(n,255),r=B(r,255);var i=Math.max(e,n,r),o=Math.min(e,n,r),a,s,u=i,f=i-o;if(s=i===0?0:f/i,i==o)a=0;else{switch(i){case e:a=(n-r)/f+(n<r?6:0);break;case n:a=(r-e)/f+2;break;case r:a=(e-n)/f+4;break}a/=6}return{h:a,s,v:u}}function ul(e,n,r){e=B(e,360)*6,n=B(n,100),r=B(r,100);var i=Math.floor(e),o=e-i,a=r*(1-n),s=r*(1-o*n),u=r*(1-(1-o)*n),f=i%6,l=[r,s,a,a,u,r][f],d=[u,r,r,s,a,a][f],c=[a,a,u,r,r,s][f];return{r:l*255,g:d*255,b:c*255}}function or(e,n,r,i){var o=[ht(Math.round(e).toString(16)),ht(Math.round(n).toString(16)),ht(Math.round(r).toString(16))];return i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function ll(e,n,r,i,o){var a=[ht(Math.round(e).toString(16)),ht(Math.round(n).toString(16)),ht(Math.round(r).toString(16)),ht(ci(i))];return o&&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)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function ar(e,n,r,i){var o=[ht(ci(i)),ht(Math.round(e).toString(16)),ht(Math.round(n).toString(16)),ht(Math.round(r).toString(16))];return o.join("")}j.equals=function(e,n){return!e||!n?!1:j(e).toRgbString()==j(n).toRgbString()};j.random=function(){return j.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function fl(e,n){n=n===0?0:n||10;var r=j(e).toHsl();return r.s-=n/100,r.s=$e(r.s),j(r)}function cl(e,n){n=n===0?0:n||10;var r=j(e).toHsl();return r.s+=n/100,r.s=$e(r.s),j(r)}function hl(e){return j(e).desaturate(100)}function dl(e,n){n=n===0?0:n||10;var r=j(e).toHsl();return r.l+=n/100,r.l=$e(r.l),j(r)}function pl(e,n){n=n===0?0:n||10;var r=j(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(n/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(n/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(n/100)))),j(r)}function gl(e,n){n=n===0?0:n||10;var r=j(e).toHsl();return r.l-=n/100,r.l=$e(r.l),j(r)}function yl(e,n){var r=j(e).toHsl(),i=(r.h+n)%360;return r.h=i<0?360+i:i,j(r)}function _l(e){var n=j(e).toHsl();return n.h=(n.h+180)%360,j(n)}function sr(e,n){if(isNaN(n)||n<=0)throw new Error("Argument to polyad must be a positive number");for(var r=j(e).toHsl(),i=[j(e)],o=360/n,a=1;a<n;a++)i.push(j({h:(r.h+a*o)%360,s:r.s,l:r.l}));return i}function vl(e){var n=j(e).toHsl(),r=n.h;return[j(e),j({h:(r+72)%360,s:n.s,l:n.l}),j({h:(r+216)%360,s:n.s,l:n.l})]}function ml(e,n,r){n=n||6,r=r||30;var i=j(e).toHsl(),o=360/r,a=[j(e)];for(i.h=(i.h-(o*n>>1)+720)%360;--n;)i.h=(i.h+o)%360,a.push(j(i));return a}function bl(e,n){n=n||6;for(var r=j(e).toHsv(),i=r.h,o=r.s,a=r.v,s=[],u=1/n;n--;)s.push(j({h:i,s:o,v:a})),a=(a+u)%1;return s}j.mix=function(e,n,r){r=r===0?0:r||50;var i=j(e).toRgb(),o=j(n).toRgb(),a=r/100,s={r:(o.r-i.r)*a+i.r,g:(o.g-i.g)*a+i.g,b:(o.b-i.b)*a+i.b,a:(o.a-i.a)*a+i.a};return j(s)};j.readability=function(e,n){var r=j(e),i=j(n);return(Math.max(r.getLuminance(),i.getLuminance())+.05)/(Math.min(r.getLuminance(),i.getLuminance())+.05)};j.isReadable=function(e,n,r){var i=j.readability(e,n),o,a;switch(a=!1,o=Sl(r),o.level+o.size){case"AAsmall":case"AAAlarge":a=i>=4.5;break;case"AAlarge":a=i>=3;break;case"AAAsmall":a=i>=7;break}return a};j.mostReadable=function(e,n,r){var i=null,o=0,a,s,u,f;r=r||{},s=r.includeFallbackColors,u=r.level,f=r.size;for(var l=0;l<n.length;l++)a=j.readability(e,n[l]),a>o&&(o=a,i=j(n[l]));return j.isReadable(e,i,{level:u,size:f})||!s?i:(r.includeFallbackColors=!1,j.mostReadable(e,["#fff","#000"],r))};var cn=j.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"},xl=j.hexNames=wl(cn);function wl(e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[e[r]]=r);return n}function fi(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function B(e,n){kl(e)&&(e="100%");var r=Al(e);return e=Math.min(n,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*n,10)/100),Math.abs(e-n)<1e-6?1:e%n/parseFloat(n)}function $e(e){return Math.min(1,Math.max(0,e))}function rt(e){return parseInt(e,16)}function kl(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function Al(e){return typeof e=="string"&&e.indexOf("%")!=-1}function ht(e){return e.length==1?"0"+e:""+e}function ee(e){return e<=1&&(e=e*100+"%"),e}function ci(e){return Math.round(parseFloat(e)*255).toString(16)}function ur(e){return rt(e)/255}var ct=(function(){var e="[-\\+]?\\d+%?",n="[-\\+]?\\d*\\.\\d+%?",r="(?:"+n+")|(?:"+e+")",i="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",o="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+i),rgba:new RegExp("rgba"+o),hsl:new RegExp("hsl"+i),hsla:new RegExp("hsla"+o),hsv:new RegExp("hsv"+i),hsva:new RegExp("hsva"+o),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 wt(e){return!!ct.CSS_UNIT.exec(e)}function Cl(e){e=e.replace(rl,"").replace(il,"").toLowerCase();var n=!1;if(cn[e])e=cn[e],n=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=ct.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=ct.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=ct.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=ct.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=ct.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=ct.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=ct.hex8.exec(e))?{r:rt(r[1]),g:rt(r[2]),b:rt(r[3]),a:ur(r[4]),format:n?"name":"hex8"}:(r=ct.hex6.exec(e))?{r:rt(r[1]),g:rt(r[2]),b:rt(r[3]),format:n?"name":"hex"}:(r=ct.hex4.exec(e))?{r:rt(r[1]+""+r[1]),g:rt(r[2]+""+r[2]),b:rt(r[3]+""+r[3]),a:ur(r[4]+""+r[4]),format:n?"name":"hex8"}:(r=ct.hex3.exec(e))?{r:rt(r[1]+""+r[1]),g:rt(r[2]+""+r[2]),b:rt(r[3]+""+r[3]),format:n?"name":"hex"}:!1}function Sl(e){var n,r;return e=e||{level:"AA",size:"small"},n=(e.level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),n!=="AA"&&n!=="AAA"&&(n="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:n,size:r}}function hn(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function Tl(e){if(Array.isArray(e))return hn(e)}function hi(e,n,r){if(typeof e=="function"?e===n:e.has(n))return arguments.length<3?n:r;throw new TypeError("Private element is not present on this object")}function Ml(e,n){if(n.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Pl(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function ot(e,n){return e.get(hi(e,n))}function lr(e,n,r){Ml(e,n),n.set(e,r)}function fr(e,n,r){return e.set(hi(e,n),r),r}function Ol(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,Dl(i.key),i)}}function El(e,n,r){return n&&Ol(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function zl(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Rl(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nl(e){return Tl(e)||zl(e)||jl(e)||Rl()}function Il(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Dl(e){var n=Il(e,"string");return typeof n=="symbol"?n:n+""}function jl(e,n){if(e){if(typeof e=="string")return hn(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?hn(e,n):void 0}}var $l=123,Fl=function(n){return"#".concat(Math.min(n,Math.pow(2,24)).toString(16).padStart(6,"0"))},di=function(n,r,i){return(n<<16)+(r<<8)+i},Ul=function(n){var r=j(n).toRgb(),i=r.r,o=r.g,a=r.b;return di(i,o,a)},cr=function(n,r){return n*$l%Math.pow(2,r)},Rt=new WeakMap,kt=new WeakMap,Ll=(function(){function e(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:6;Pl(this,e),lr(this,Rt,void 0),lr(this,kt,void 0),fr(kt,this,n),this.reset()}return El(e,[{key:"reset",value:function(){fr(Rt,this,["__reserved for background__"])}},{key:"register",value:function(r){if(ot(Rt,this).length>=Math.pow(2,24-ot(kt,this)))return null;var i=ot(Rt,this).length,o=cr(i,ot(kt,this)),a=Fl(i+(o<<24-ot(kt,this)));return ot(Rt,this).push(r),a}},{key:"lookup",value:function(r){if(!r)return null;var i=typeof r=="string"?Ul(r):di.apply(void 0,Nl(r));if(!i)return null;var o=i&Math.pow(2,24-ot(kt,this))-1,a=i>>24-ot(kt,this)&Math.pow(2,ot(kt,this))-1;return cr(o,ot(kt,this))!==a||o>=ot(Rt,this).length?null:ot(Rt,this)[o]}}])})(),ce,X,pi,gi,zt,hr,yi,_i,We,xe,ne,vi,Tn,dn,pn,Oe={},Ee=[],ql=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Fe=Array.isArray;function yt(e,n){for(var r in n)e[r]=n[r];return e}function Mn(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Hl(e,n,r){var i,o,a,s={};for(a in n)a=="key"?i=n[a]:a=="ref"?o=n[a]:s[a]=n[a];if(arguments.length>2&&(s.children=arguments.length>3?ce.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)s[a]===void 0&&(s[a]=e.defaultProps[a]);return re(e,s,i,o,null)}function re(e,n,r,i,o){var a={type:e,props:n,key:r,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++pi,__i:-1,__u:0};return o==null&&X.vnode!=null&&X.vnode(a),a}function Ue(e){return e.children}function we(e,n){this.props=e,this.context=n}function qt(e,n){if(n==null)return e.__?qt(e.__,e.__i+1):null;for(var r;n<e.__k.length;n++)if((r=e.__k[n])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?qt(e):null}function Gl(e){if(e.__P&&e.__d){var n=e.__v,r=n.__e,i=[],o=[],a=yt({},n);a.__v=n.__v+1,X.vnode&&X.vnode(a),Pn(e.__P,a,n,e.__n,e.__P.namespaceURI,32&n.__u?[r]:null,i,r??qt(n),!!(32&n.__u),o),a.__v=n.__v,a.__.__k[a.__i]=a,ki(i,a,o),n.__e=n.__=null,a.__e!=r&&mi(a)}}function mi(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(n){if(n!=null&&n.__e!=null)return e.__e=e.__c.base=n.__e}),mi(e)}function dr(e){(!e.__d&&(e.__d=!0)&&zt.push(e)&&!ze.__r++||hr!=X.debounceRendering)&&((hr=X.debounceRendering)||yi)(ze)}function ze(){try{for(var e,n=1;zt.length;)zt.length>n&&zt.sort(_i),e=zt.shift(),n=zt.length,Gl(e)}finally{zt.length=ze.__r=0}}function bi(e,n,r,i,o,a,s,u,f,l,d){var c,h,g,y,x,v,p,_=i&&i.__k||Ee,k=n.length;for(f=Vl(r,n,_,f,k),c=0;c<k;c++)(g=r.__k[c])!=null&&(h=g.__i!=-1&&_[g.__i]||Oe,g.__i=c,v=Pn(e,g,h,o,a,s,u,f,l,d),y=g.__e,g.ref&&h.ref!=g.ref&&(h.ref&&On(h.ref,null,g),d.push(g.ref,g.__c||y,g)),x==null&&y!=null&&(x=y),(p=!!(4&g.__u))||h.__k===g.__k?(f=xi(g,f,e,p),p&&h.__e&&(h.__e=null)):typeof g.type=="function"&&v!==void 0?f=v:y&&(f=y.nextSibling),g.__u&=-7);return r.__e=x,f}function Vl(e,n,r,i,o){var a,s,u,f,l,d=r.length,c=d,h=0;for(e.__k=new Array(o),a=0;a<o;a++)(s=n[a])!=null&&typeof s!="boolean"&&typeof s!="function"?(typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?s=e.__k[a]=re(null,s,null,null,null):Fe(s)?s=e.__k[a]=re(Ue,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=e.__k[a]=re(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[a]=s,f=a+h,s.__=e,s.__b=e.__b+1,u=null,(l=s.__i=Wl(s,r,f,c))!=-1&&(c--,(u=r[l])&&(u.__u|=2)),u==null||u.__v==null?(l==-1&&(o>d?h--:o<d&&h++),typeof s.type!="function"&&(s.__u|=4)):l!=f&&(l==f-1?h--:l==f+1?h++:(l>f?h--:h++,s.__u|=4))):e.__k[a]=null;if(c)for(a=0;a<d;a++)(u=r[a])!=null&&(2&u.__u)==0&&(u.__e==i&&(i=qt(u)),Ci(u,u));return i}function xi(e,n,r,i){var o,a;if(typeof e.type=="function"){for(o=e.__k,a=0;o&&a<o.length;a++)o[a]&&(o[a].__=e,n=xi(o[a],n,r,i));return n}e.__e!=n&&(i&&(n&&e.type&&!n.parentNode&&(n=qt(e)),r.insertBefore(e.__e,n||null)),n=e.__e);do n=n&&n.nextSibling;while(n!=null&&n.nodeType==8);return n}function Wl(e,n,r,i){var o,a,s,u=e.key,f=e.type,l=n[r],d=l!=null&&(2&l.__u)==0;if(l===null&&u==null||d&&u==l.key&&f==l.type)return r;if(i>(d?1:0)){for(o=r-1,a=r+1;o>=0||a<n.length;)if((l=n[s=o>=0?o--:a++])!=null&&(2&l.__u)==0&&u==l.key&&f==l.type)return s}return-1}function pr(e,n,r){n[0]=="-"?e.setProperty(n,r??""):e[n]=r==null?"":typeof r!="number"||ql.test(n)?r:r+"px"}function ge(e,n,r,i,o){var a,s;t:if(n=="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof i=="string"&&(e.style.cssText=i=""),i)for(n in i)r&&n in r||pr(e.style,n,"");if(r)for(n in r)i&&r[n]==i[n]||pr(e.style,n,r[n])}else if(n[0]=="o"&&n[1]=="n")a=n!=(n=n.replace(vi,"$1")),s=n.toLowerCase(),n=s in e||n=="onFocusOut"||n=="onFocusIn"?s.slice(2):n.slice(2),e.l||(e.l={}),e.l[n+a]=r,r?i?r[ne]=i[ne]:(r[ne]=Tn,e.addEventListener(n,a?pn:dn,a)):e.removeEventListener(n,a?pn:dn,a);else{if(o=="http://www.w3.org/2000/svg")n=n.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(n!="width"&&n!="height"&&n!="href"&&n!="list"&&n!="form"&&n!="tabIndex"&&n!="download"&&n!="rowSpan"&&n!="colSpan"&&n!="role"&&n!="popover"&&n in e)try{e[n]=r??"";break t}catch{}typeof r=="function"||(r==null||r===!1&&n[4]!="-"?e.removeAttribute(n):e.setAttribute(n,n=="popover"&&r==1?"":r))}}function gr(e){return function(n){if(this.l){var r=this.l[n.type+e];if(n[xe]==null)n[xe]=Tn++;else if(n[xe]<r[ne])return;return r(X.event?X.event(n):n)}}}function Pn(e,n,r,i,o,a,s,u,f,l){var d,c,h,g,y,x,v,p,_,k,w,m,A,S,T,z,P=n.type;if(n.constructor!==void 0)return null;128&r.__u&&(f=!!(32&r.__u),a=[u=n.__e=r.__e]),(d=X.__b)&&d(n);t:if(typeof P=="function"){c=s.length;try{if(_=n.props,k=P.prototype&&P.prototype.render,w=(d=P.contextType)&&i[d.__c],m=d?w?w.props.value:d.__:i,r.__c?p=(h=n.__c=r.__c).__=h.__E:(k?n.__c=h=new P(_,m):(n.__c=h=new we(_,m),h.constructor=P,h.render=Xl),w&&w.sub(h),h.state||(h.state={}),h.__n=i,g=h.__d=!0,h.__h=[],h._sb=[]),k&&h.__s==null&&(h.__s=h.state),k&&P.getDerivedStateFromProps!=null&&(h.__s==h.state&&(h.__s=yt({},h.__s)),yt(h.__s,P.getDerivedStateFromProps(_,h.__s))),y=h.props,x=h.state,h.__v=n,g)k&&P.getDerivedStateFromProps==null&&h.componentWillMount!=null&&h.componentWillMount(),k&&h.componentDidMount!=null&&h.__h.push(h.componentDidMount);else{if(k&&P.getDerivedStateFromProps==null&&_!==y&&h.componentWillReceiveProps!=null&&h.componentWillReceiveProps(_,m),n.__v==r.__v||!h.__e&&h.shouldComponentUpdate!=null&&h.shouldComponentUpdate(_,h.__s,m)===!1){n.__v!=r.__v&&(h.props=_,h.state=h.__s,h.__d=!1),n.__e=r.__e,n.__k=r.__k,n.__k.some(function(N){N&&(N.__=n)}),Ee.push.apply(h.__h,h._sb),h._sb=[],h.__h.length&&s.push(h);break t}h.componentWillUpdate!=null&&h.componentWillUpdate(_,h.__s,m),k&&h.componentDidUpdate!=null&&h.__h.push(function(){h.componentDidUpdate(y,x,v)})}if(h.context=m,h.props=_,h.__P=e,h.__e=!1,A=X.__r,S=0,k)h.state=h.__s,h.__d=!1,A&&A(n),d=h.render(h.props,h.state,h.context),Ee.push.apply(h.__h,h._sb),h._sb=[];else do h.__d=!1,A&&A(n),d=h.render(h.props,h.state,h.context),h.state=h.__s;while(h.__d&&++S<25);h.state=h.__s,h.getChildContext!=null&&(i=yt(yt({},i),h.getChildContext())),k&&!g&&h.getSnapshotBeforeUpdate!=null&&(v=h.getSnapshotBeforeUpdate(y,x)),T=d!=null&&d.type===Ue&&d.key==null?Ai(d.props.children):d,u=bi(e,Fe(T)?T:[T],n,r,i,o,a,s,u,f,l),h.base=n.__e,n.__u&=-161,h.__h.length&&s.push(h),p&&(h.__E=h.__=null)}catch(N){if(s.length=c,n.__v=null,f||a!=null){if(N.then){for(n.__u|=f?160:128;u&&u.nodeType==8&&u.nextSibling;)u=u.nextSibling;a!=null&&(a[a.indexOf(u)]=null),n.__e=u}else if(a!=null)for(z=a.length;z--;)Mn(a[z])}else n.__e=r.__e;n.__k==null&&(n.__k=r.__k||[]),N.then||wi(n),X.__e(N,n,r)}}else a==null&&n.__v==r.__v?(n.__k=r.__k,n.__e=r.__e):u=n.__e=Bl(r.__e,n,r,i,o,a,s,f,l);return(d=X.diffed)&&d(n),128&n.__u?void 0:u}function wi(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(wi))}function ki(e,n,r){for(var i=0;i<r.length;i++)On(r[i],r[++i],r[++i]);X.__c&&X.__c(n,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(a){a.call(o)})}catch(a){X.__e(a,o.__v)}})}function Ai(e){return typeof e!="object"||e==null||e.__b>0?e:Fe(e)?e.map(Ai):e.constructor!==void 0?null:yt({},e)}function Bl(e,n,r,i,o,a,s,u,f){var l,d,c,h,g,y,x,v=r.props||Oe,p=n.props,_=n.type;if(_=="svg"?o="http://www.w3.org/2000/svg":_=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),a!=null){for(l=0;l<a.length;l++)if((g=a[l])&&"setAttribute"in g==!!_&&(_?g.localName==_:g.nodeType==3)){e=g,a[l]=null;break}}if(e==null){if(_==null)return document.createTextNode(p);e=document.createElementNS(o,_,p.is&&p),u&&(X.__m&&X.__m(n,a),u=!1),a=null}if(_==null)v===p||u&&e.data==p||(e.data=p);else{if(a=_=="textarea"&&p.defaultValue!=null?null:a&&ce.call(e.childNodes),!u&&a!=null)for(v={},l=0;l<e.attributes.length;l++)v[(g=e.attributes[l]).name]=g.value;for(l in v)g=v[l],l=="dangerouslySetInnerHTML"?c=g:l=="children"||l in p||l=="value"&&"defaultValue"in p||l=="checked"&&"defaultChecked"in p||ge(e,l,null,g,o);for(l in p)g=p[l],l=="children"?h=g:l=="dangerouslySetInnerHTML"?d=g:l=="value"?y=g:l=="checked"?x=g:u&&typeof g!="function"||v[l]===g||ge(e,l,g,v[l],o);if(d)u||c&&(d.__html==c.__html||d.__html==e.innerHTML)||(e.innerHTML=d.__html),n.__k=[];else if(c&&(e.innerHTML=""),bi(n.type=="template"?e.content:e,Fe(h)?h:[h],n,r,i,_=="foreignObject"?"http://www.w3.org/1999/xhtml":o,a,s,a?a[0]:r.__k&&qt(r,0),u,f),a!=null)for(l=a.length;l--;)Mn(a[l]);u&&_!="textarea"||(l="value",_=="progress"&&y==null?e.removeAttribute("value"):y!=null&&(y!==e[l]||_=="progress"&&!y||_=="option"&&y!=v[l])&&ge(e,l,y,v[l],o),l="checked",x!=null&&x!=e[l]&&ge(e,l,x,v[l],o))}return e}function On(e,n,r){try{if(typeof e=="function"){var i=typeof e.__u=="function";i&&e.__u(),i&&n==null||(e.__u=e(n))}else e.current=n}catch(o){X.__e(o,r)}}function Ci(e,n,r){var i,o;if(X.unmount&&X.unmount(e),(i=e.ref)&&(i.current&&i.current!=e.__e||On(i,null,n)),(i=e.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(a){X.__e(a,n)}i.base=i.__P=i.__n=null}if(i=e.__k)for(o=0;o<i.length;o++)i[o]&&Ci(i[o],n,r||typeof e.type!="function");r||Mn(e.__e),e.__c=e.__=e.__e=void 0}function Xl(e,n,r){return this.constructor(e,r)}function Yl(e,n,r){var i,o,a,s;n==document&&(n=document.documentElement),X.__&&X.__(e,n),o=(i=!1)?null:n.__k,a=[],s=[],Pn(n,e=n.__k=Hl(Ue,null,[e]),o||Oe,Oe,n.namespaceURI,o?null:n.firstChild?ce.call(n.childNodes):null,a,o?o.__e:n.firstChild,i,s),ki(a,e,s),e.props.children=null}function Si(e,n,r){var i,o,a,s,u=yt({},e.props);for(a in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),n)a=="key"?i=n[a]:a=="ref"?o=n[a]:u[a]=n[a]===void 0&&s!=null?s[a]:n[a];return arguments.length>2&&(u.children=arguments.length>3?ce.call(arguments,2):r),re(e.type,u,i||e.key,o||e.ref,null)}ce=Ee.slice,X={__e:function(e,n,r,i){for(var o,a,s;n=n.__;)if((o=n.__c)&&!o.__)try{if((a=o.constructor)&&a.getDerivedStateFromError!=null&&(o.setState(a.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,i||{}),s=o.__d),s)return o.__E=o}catch(u){e=u}throw e}},pi=0,gi=function(e){return e!=null&&e.constructor===void 0},we.prototype.setState=function(e,n){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=yt({},this.state),typeof e=="function"&&(e=e(yt({},r),this.props)),e&&yt(r,e),e!=null&&this.__v&&(n&&this._sb.push(n),dr(this))},we.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),dr(this))},we.prototype.render=Ue,zt=[],yi=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,_i=function(e,n){return e.__v.__b-n.__v.__b},ze.__r=0,We=Math.random().toString(8),xe="__d"+We,ne="__a"+We,vi=/(PointerCapture)$|Capture$/i,Tn=0,dn=gr(!1),pn=gr(!0);function yr(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function Zl(e){if(Array.isArray(e))return e}function Kl(e,n,r){return(n=rf(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function Ql(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,a,s,u=[],f=!0,l=!1;try{if(a=(r=r.call(e)).next,n!==0)for(;!(f=(i=a.call(r)).done)&&(u.push(i.value),u.length!==n);f=!0);}catch(d){l=!0,o=d}finally{try{if(!f&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(l)throw o}}return u}}function Jl(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _r(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function tf(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?_r(Object(r),!0).forEach(function(i){Kl(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_r(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function ef(e,n){return Zl(e)||Ql(e,n)||of(e,n)||Jl()}function nf(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function rf(e){var n=nf(e,"string");return typeof n=="symbol"?n:n+""}function Re(e){"@babel/helpers - typeof";return Re=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Re(e)}function of(e,n){if(e){if(typeof e=="string")return yr(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?yr(e,n):void 0}}var gn=function(n){if(Re(n)!=="object")return n;var r=Si(n);if(r.props){var i;r.props=tf({},r.props),r!=null&&(i=r.props)!==null&&i!==void 0&&i.children&&(r.props.children=Array.isArray(r.props.children)?r.props.children.map(gn):gn(r.props.children))}return r},af=function(n){return gi(Si(n))},sf=function(n,r){delete r.__k,Yl(gn(n),r)};function uf(e,n){n===void 0&&(n={});var r=n.insertAt;if(!(typeof document>"u")){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",r==="top"&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}var lf=`.float-tooltip-kap {
|
|
position: absolute;
|
|
width: max-content; /* prevent shrinking near right edge */
|
|
max-width: max(50%, 150px);
|
|
padding: 3px 5px;
|
|
border-radius: 3px;
|
|
font: 12px sans-serif;
|
|
color: #eee;
|
|
background: rgba(0,0,0,0.6);
|
|
pointer-events: none;
|
|
}
|
|
`;uf(lf);var ff=Sn({props:{content:{default:!1},offsetX:{triggerUpdate:!1},offsetY:{triggerUpdate:!1}},init:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.style,a=o===void 0?{}:o,s=!!n&&Re(n)==="object"&&!!n.node&&typeof n.node=="function",u=st(s?n.node():n);u.style("position")==="static"&&u.style("position","relative"),r.tooltipEl=u.append("div").attr("class","float-tooltip-kap"),Object.entries(a).forEach(function(l){var d=ef(l,2),c=d[0],h=d[1];return r.tooltipEl.style(c,h)}),r.tooltipEl.style("left","-10000px").style("display","none");var f="tooltip-".concat(Math.round(Math.random()*1e12));r.mouseInside=!1,u.on("mousemove.".concat(f),function(l){r.mouseInside=!0;var d=gt(l),c=u.node(),h=c.offsetWidth,g=c.offsetHeight,y=[r.offsetX===null||r.offsetX===void 0?"-".concat(d[0]/h*100,"%"):typeof r.offsetX=="number"?"calc(-50% + ".concat(r.offsetX,"px)"):r.offsetX,r.offsetY===null||r.offsetY===void 0?g>130&&g-d[1]<100?"calc(-100% - 6px)":"21px":typeof r.offsetY=="number"?r.offsetY<0?"calc(-100% - ".concat(Math.abs(r.offsetY),"px)"):"".concat(r.offsetY,"px"):r.offsetY];r.tooltipEl.style("left",d[0]+"px").style("top",d[1]+"px").style("transform","translate(".concat(y.join(","),")")),r.content&&r.tooltipEl.style("display","inline")}),u.on("mouseover.".concat(f),function(){r.mouseInside=!0,r.content&&r.tooltipEl.style("display","inline")}),u.on("mouseout.".concat(f),function(){r.mouseInside=!1,r.tooltipEl.style("display","none")})},update:function(n){n.tooltipEl.style("display",n.content&&n.mouseInside?"inline":"none"),n.content?n.content instanceof HTMLElement?(n.tooltipEl.text(""),n.tooltipEl.append(function(){return n.content})):typeof n.content=="string"?n.tooltipEl.html(n.content):af(n.content)?(n.tooltipEl.text(""),sf(n.content,n.tooltipEl.node())):(n.tooltipEl.style("display","none"),console.warn("Tooltip content is invalid, skipping.",n.content,n.content.toString())):n.tooltipEl.text("")}});function cf(e,n,r){var i,o=1;e==null&&(e=0),n==null&&(n=0),r==null&&(r=0);function a(){var s,u=i.length,f,l=0,d=0,c=0;for(s=0;s<u;++s)f=i[s],l+=f.x||0,d+=f.y||0,c+=f.z||0;for(l=(l/u-e)*o,d=(d/u-n)*o,c=(c/u-r)*o,s=0;s<u;++s)f=i[s],l&&(f.x-=l),d&&(f.y-=d),c&&(f.z-=c)}return a.initialize=function(s){i=s},a.x=function(s){return arguments.length?(e=+s,a):e},a.y=function(s){return arguments.length?(n=+s,a):n},a.z=function(s){return arguments.length?(r=+s,a):r},a.strength=function(s){return arguments.length?(o=+s,a):o},a}function hf(e){const n=+this._x.call(null,e);return Ti(this.cover(n),n,e)}function Ti(e,n,r){if(isNaN(n))return e;var i,o=e._root,a={data:r},s=e._x0,u=e._x1,f,l,d,c,h;if(!o)return e._root=a,e;for(;o.length;)if((d=n>=(f=(s+u)/2))?s=f:u=f,i=o,!(o=o[c=+d]))return i[c]=a,e;if(l=+e._x.call(null,o.data),n===l)return a.next=o,i?i[c]=a:e._root=a,e;do i=i?i[c]=new Array(2):e._root=new Array(2),(d=n>=(f=(s+u)/2))?s=f:u=f;while((c=+d)==(h=+(l>=f)));return i[h]=o,i[c]=a,e}function df(e){Array.isArray(e)||(e=Array.from(e));const n=e.length,r=new Float64Array(n);let i=1/0,o=-1/0;for(let a=0,s;a<n;++a)isNaN(s=+this._x.call(null,e[a]))||(r[a]=s,s<i&&(i=s),s>o&&(o=s));if(i>o)return this;this.cover(i).cover(o);for(let a=0;a<n;++a)Ti(this,r[a],e[a]);return this}function pf(e){if(isNaN(e=+e))return this;var n=this._x0,r=this._x1;if(isNaN(n))r=(n=Math.floor(e))+1;else{for(var i=r-n||1,o=this._root,a,s;n>e||e>=r;)switch(s=+(e<n),a=new Array(2),a[s]=o,o=a,i*=2,s){case 0:r=n+i;break;case 1:n=r-i;break}this._root&&this._root.length&&(this._root=o)}return this._x0=n,this._x1=r,this}function gf(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function yf(e){return arguments.length?this.cover(+e[0][0]).cover(+e[1][0]):isNaN(this._x0)?void 0:[[this._x0],[this._x1]]}function Mt(e,n,r){this.node=e,this.x0=n,this.x1=r}function _f(e,n){var r,i=this._x0,o,a,s=this._x1,u=[],f=this._root,l,d;for(f&&u.push(new Mt(f,i,s)),n==null?n=1/0:(i=e-n,s=e+n);l=u.pop();)if(!(!(f=l.node)||(o=l.x0)>s||(a=l.x1)<i))if(f.length){var c=(o+a)/2;u.push(new Mt(f[1],c,a),new Mt(f[0],o,c)),(d=+(e>=c))&&(l=u[u.length-1],u[u.length-1]=u[u.length-1-d],u[u.length-1-d]=l)}else{var h=Math.abs(e-+this._x.call(null,f.data));h<n&&(n=h,i=e-h,s=e+h,r=f.data)}return r}function vf(e){if(isNaN(f=+this._x.call(null,e)))return this;var n,r=this._root,i,o,a,s=this._x0,u=this._x1,f,l,d,c,h;if(!r)return this;if(r.length)for(;;){if((d=f>=(l=(s+u)/2))?s=l:u=l,n=r,!(r=r[c=+d]))return this;if(!r.length)break;n[c+1&1]&&(i=n,h=c)}for(;r.data!==e;)if(o=r,!(r=r.next))return this;return(a=r.next)&&delete r.next,o?(a?o.next=a:delete o.next,this):n?(a?n[c]=a:delete n[c],(r=n[0]||n[1])&&r===(n[1]||n[0])&&!r.length&&(i?i[h]=r:this._root=r),this):(this._root=a,this)}function mf(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function bf(){return this._root}function xf(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function wf(e){var n=[],r,i=this._root,o,a,s;for(i&&n.push(new Mt(i,this._x0,this._x1));r=n.pop();)if(!e(i=r.node,a=r.x0,s=r.x1)&&i.length){var u=(a+s)/2;(o=i[1])&&n.push(new Mt(o,u,s)),(o=i[0])&&n.push(new Mt(o,a,u))}return this}function kf(e){var n=[],r=[],i;for(this._root&&n.push(new Mt(this._root,this._x0,this._x1));i=n.pop();){var o=i.node;if(o.length){var a,s=i.x0,u=i.x1,f=(s+u)/2;(a=o[0])&&n.push(new Mt(a,s,f)),(a=o[1])&&n.push(new Mt(a,f,u))}r.push(i)}for(;i=r.pop();)e(i.node,i.x0,i.x1);return this}function Af(e){return e[0]}function Cf(e){return arguments.length?(this._x=e,this):this._x}function Mi(e,n){var r=new En(n??Af,NaN,NaN);return e==null?r:r.addAll(e)}function En(e,n,r){this._x=e,this._x0=n,this._x1=r,this._root=void 0}function vr(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var nt=Mi.prototype=En.prototype;nt.copy=function(){var e=new En(this._x,this._x0,this._x1),n=this._root,r,i;if(!n)return e;if(!n.length)return e._root=vr(n),e;for(r=[{source:n,target:e._root=new Array(2)}];n=r.pop();)for(var o=0;o<2;++o)(i=n.source[o])&&(i.length?r.push({source:i,target:n.target[o]=new Array(2)}):n.target[o]=vr(i));return e};nt.add=hf;nt.addAll=df;nt.cover=pf;nt.data=gf;nt.extent=yf;nt.find=_f;nt.remove=vf;nt.removeAll=mf;nt.root=bf;nt.size=xf;nt.visit=wf;nt.visitAfter=kf;nt.x=Cf;function Sf(e){const n=+this._x.call(null,e),r=+this._y.call(null,e);return Pi(this.cover(n,r),n,r,e)}function Pi(e,n,r,i){if(isNaN(n)||isNaN(r))return e;var o,a=e._root,s={data:i},u=e._x0,f=e._y0,l=e._x1,d=e._y1,c,h,g,y,x,v,p,_;if(!a)return e._root=s,e;for(;a.length;)if((x=n>=(c=(u+l)/2))?u=c:l=c,(v=r>=(h=(f+d)/2))?f=h:d=h,o=a,!(a=a[p=v<<1|x]))return o[p]=s,e;if(g=+e._x.call(null,a.data),y=+e._y.call(null,a.data),n===g&&r===y)return s.next=a,o?o[p]=s:e._root=s,e;do o=o?o[p]=new Array(4):e._root=new Array(4),(x=n>=(c=(u+l)/2))?u=c:l=c,(v=r>=(h=(f+d)/2))?f=h:d=h;while((p=v<<1|x)===(_=(y>=h)<<1|g>=c));return o[_]=a,o[p]=s,e}function Tf(e){var n,r,i=e.length,o,a,s=new Array(i),u=new Array(i),f=1/0,l=1/0,d=-1/0,c=-1/0;for(r=0;r<i;++r)isNaN(o=+this._x.call(null,n=e[r]))||isNaN(a=+this._y.call(null,n))||(s[r]=o,u[r]=a,o<f&&(f=o),o>d&&(d=o),a<l&&(l=a),a>c&&(c=a));if(f>d||l>c)return this;for(this.cover(f,l).cover(d,c),r=0;r<i;++r)Pi(this,s[r],u[r],e[r]);return this}function Mf(e,n){if(isNaN(e=+e)||isNaN(n=+n))return this;var r=this._x0,i=this._y0,o=this._x1,a=this._y1;if(isNaN(r))o=(r=Math.floor(e))+1,a=(i=Math.floor(n))+1;else{for(var s=o-r||1,u=this._root,f,l;r>e||e>=o||i>n||n>=a;)switch(l=(n<i)<<1|e<r,f=new Array(4),f[l]=u,u=f,s*=2,l){case 0:o=r+s,a=i+s;break;case 1:r=o-s,a=i+s;break;case 2:o=r+s,i=a-s;break;case 3:r=o-s,i=a-s;break}this._root&&this._root.length&&(this._root=u)}return this._x0=r,this._y0=i,this._x1=o,this._y1=a,this}function Pf(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function Of(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function tt(e,n,r,i,o){this.node=e,this.x0=n,this.y0=r,this.x1=i,this.y1=o}function Ef(e,n,r){var i,o=this._x0,a=this._y0,s,u,f,l,d=this._x1,c=this._y1,h=[],g=this._root,y,x;for(g&&h.push(new tt(g,o,a,d,c)),r==null?r=1/0:(o=e-r,a=n-r,d=e+r,c=n+r,r*=r);y=h.pop();)if(!(!(g=y.node)||(s=y.x0)>d||(u=y.y0)>c||(f=y.x1)<o||(l=y.y1)<a))if(g.length){var v=(s+f)/2,p=(u+l)/2;h.push(new tt(g[3],v,p,f,l),new tt(g[2],s,p,v,l),new tt(g[1],v,u,f,p),new tt(g[0],s,u,v,p)),(x=(n>=p)<<1|e>=v)&&(y=h[h.length-1],h[h.length-1]=h[h.length-1-x],h[h.length-1-x]=y)}else{var _=e-+this._x.call(null,g.data),k=n-+this._y.call(null,g.data),w=_*_+k*k;if(w<r){var m=Math.sqrt(r=w);o=e-m,a=n-m,d=e+m,c=n+m,i=g.data}}return i}function zf(e){if(isNaN(d=+this._x.call(null,e))||isNaN(c=+this._y.call(null,e)))return this;var n,r=this._root,i,o,a,s=this._x0,u=this._y0,f=this._x1,l=this._y1,d,c,h,g,y,x,v,p;if(!r)return this;if(r.length)for(;;){if((y=d>=(h=(s+f)/2))?s=h:f=h,(x=c>=(g=(u+l)/2))?u=g:l=g,n=r,!(r=r[v=x<<1|y]))return this;if(!r.length)break;(n[v+1&3]||n[v+2&3]||n[v+3&3])&&(i=n,p=v)}for(;r.data!==e;)if(o=r,!(r=r.next))return this;return(a=r.next)&&delete r.next,o?(a?o.next=a:delete o.next,this):n?(a?n[v]=a:delete n[v],(r=n[0]||n[1]||n[2]||n[3])&&r===(n[3]||n[2]||n[1]||n[0])&&!r.length&&(i?i[p]=r:this._root=r),this):(this._root=a,this)}function Rf(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function Nf(){return this._root}function If(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function Df(e){var n=[],r,i=this._root,o,a,s,u,f;for(i&&n.push(new tt(i,this._x0,this._y0,this._x1,this._y1));r=n.pop();)if(!e(i=r.node,a=r.x0,s=r.y0,u=r.x1,f=r.y1)&&i.length){var l=(a+u)/2,d=(s+f)/2;(o=i[3])&&n.push(new tt(o,l,d,u,f)),(o=i[2])&&n.push(new tt(o,a,d,l,f)),(o=i[1])&&n.push(new tt(o,l,s,u,d)),(o=i[0])&&n.push(new tt(o,a,s,l,d))}return this}function jf(e){var n=[],r=[],i;for(this._root&&n.push(new tt(this._root,this._x0,this._y0,this._x1,this._y1));i=n.pop();){var o=i.node;if(o.length){var a,s=i.x0,u=i.y0,f=i.x1,l=i.y1,d=(s+f)/2,c=(u+l)/2;(a=o[0])&&n.push(new tt(a,s,u,d,c)),(a=o[1])&&n.push(new tt(a,d,u,f,c)),(a=o[2])&&n.push(new tt(a,s,c,d,l)),(a=o[3])&&n.push(new tt(a,d,c,f,l))}r.push(i)}for(;i=r.pop();)e(i.node,i.x0,i.y0,i.x1,i.y1);return this}function $f(e){return e[0]}function Ff(e){return arguments.length?(this._x=e,this):this._x}function Uf(e){return e[1]}function Lf(e){return arguments.length?(this._y=e,this):this._y}function Oi(e,n,r){var i=new zn(n??$f,r??Uf,NaN,NaN,NaN,NaN);return e==null?i:i.addAll(e)}function zn(e,n,r,i,o,a){this._x=e,this._y=n,this._x0=r,this._y0=i,this._x1=o,this._y1=a,this._root=void 0}function mr(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var et=Oi.prototype=zn.prototype;et.copy=function(){var e=new zn(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root,r,i;if(!n)return e;if(!n.length)return e._root=mr(n),e;for(r=[{source:n,target:e._root=new Array(4)}];n=r.pop();)for(var o=0;o<4;++o)(i=n.source[o])&&(i.length?r.push({source:i,target:n.target[o]=new Array(4)}):n.target[o]=mr(i));return e};et.add=Sf;et.addAll=Tf;et.cover=Mf;et.data=Pf;et.extent=Of;et.find=Ef;et.remove=zf;et.removeAll=Rf;et.root=Nf;et.size=If;et.visit=Df;et.visitAfter=jf;et.x=Ff;et.y=Lf;function qf(e){const n=+this._x.call(null,e),r=+this._y.call(null,e),i=+this._z.call(null,e);return Ei(this.cover(n,r,i),n,r,i,e)}function Ei(e,n,r,i,o){if(isNaN(n)||isNaN(r)||isNaN(i))return e;var a,s=e._root,u={data:o},f=e._x0,l=e._y0,d=e._z0,c=e._x1,h=e._y1,g=e._z1,y,x,v,p,_,k,w,m,A,S,T;if(!s)return e._root=u,e;for(;s.length;)if((w=n>=(y=(f+c)/2))?f=y:c=y,(m=r>=(x=(l+h)/2))?l=x:h=x,(A=i>=(v=(d+g)/2))?d=v:g=v,a=s,!(s=s[S=A<<2|m<<1|w]))return a[S]=u,e;if(p=+e._x.call(null,s.data),_=+e._y.call(null,s.data),k=+e._z.call(null,s.data),n===p&&r===_&&i===k)return u.next=s,a?a[S]=u:e._root=u,e;do a=a?a[S]=new Array(8):e._root=new Array(8),(w=n>=(y=(f+c)/2))?f=y:c=y,(m=r>=(x=(l+h)/2))?l=x:h=x,(A=i>=(v=(d+g)/2))?d=v:g=v;while((S=A<<2|m<<1|w)===(T=(k>=v)<<2|(_>=x)<<1|p>=y));return a[T]=s,a[S]=u,e}function Hf(e){Array.isArray(e)||(e=Array.from(e));const n=e.length,r=new Float64Array(n),i=new Float64Array(n),o=new Float64Array(n);let a=1/0,s=1/0,u=1/0,f=-1/0,l=-1/0,d=-1/0;for(let c=0,h,g,y,x;c<n;++c)isNaN(g=+this._x.call(null,h=e[c]))||isNaN(y=+this._y.call(null,h))||isNaN(x=+this._z.call(null,h))||(r[c]=g,i[c]=y,o[c]=x,g<a&&(a=g),g>f&&(f=g),y<s&&(s=y),y>l&&(l=y),x<u&&(u=x),x>d&&(d=x));if(a>f||s>l||u>d)return this;this.cover(a,s,u).cover(f,l,d);for(let c=0;c<n;++c)Ei(this,r[c],i[c],o[c],e[c]);return this}function Gf(e,n,r){if(isNaN(e=+e)||isNaN(n=+n)||isNaN(r=+r))return this;var i=this._x0,o=this._y0,a=this._z0,s=this._x1,u=this._y1,f=this._z1;if(isNaN(i))s=(i=Math.floor(e))+1,u=(o=Math.floor(n))+1,f=(a=Math.floor(r))+1;else{for(var l=s-i||1,d=this._root,c,h;i>e||e>=s||o>n||n>=u||a>r||r>=f;)switch(h=(r<a)<<2|(n<o)<<1|e<i,c=new Array(8),c[h]=d,d=c,l*=2,h){case 0:s=i+l,u=o+l,f=a+l;break;case 1:i=s-l,u=o+l,f=a+l;break;case 2:s=i+l,o=u-l,f=a+l;break;case 3:i=s-l,o=u-l,f=a+l;break;case 4:s=i+l,u=o+l,a=f-l;break;case 5:i=s-l,u=o+l,a=f-l;break;case 6:s=i+l,o=u-l,a=f-l;break;case 7:i=s-l,o=u-l,a=f-l;break}this._root&&this._root.length&&(this._root=d)}return this._x0=i,this._y0=o,this._z0=a,this._x1=s,this._y1=u,this._z1=f,this}function Vf(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function Wf(e){return arguments.length?this.cover(+e[0][0],+e[0][1],+e[0][2]).cover(+e[1][0],+e[1][1],+e[1][2]):isNaN(this._x0)?void 0:[[this._x0,this._y0,this._z0],[this._x1,this._y1,this._z1]]}function V(e,n,r,i,o,a,s){this.node=e,this.x0=n,this.y0=r,this.z0=i,this.x1=o,this.y1=a,this.z1=s}function Bf(e,n,r,i){var o,a=this._x0,s=this._y0,u=this._z0,f,l,d,c,h,g,y=this._x1,x=this._y1,v=this._z1,p=[],_=this._root,k,w;for(_&&p.push(new V(_,a,s,u,y,x,v)),i==null?i=1/0:(a=e-i,s=n-i,u=r-i,y=e+i,x=n+i,v=r+i,i*=i);k=p.pop();)if(!(!(_=k.node)||(f=k.x0)>y||(l=k.y0)>x||(d=k.z0)>v||(c=k.x1)<a||(h=k.y1)<s||(g=k.z1)<u))if(_.length){var m=(f+c)/2,A=(l+h)/2,S=(d+g)/2;p.push(new V(_[7],m,A,S,c,h,g),new V(_[6],f,A,S,m,h,g),new V(_[5],m,l,S,c,A,g),new V(_[4],f,l,S,m,A,g),new V(_[3],m,A,d,c,h,S),new V(_[2],f,A,d,m,h,S),new V(_[1],m,l,d,c,A,S),new V(_[0],f,l,d,m,A,S)),(w=(r>=S)<<2|(n>=A)<<1|e>=m)&&(k=p[p.length-1],p[p.length-1]=p[p.length-1-w],p[p.length-1-w]=k)}else{var T=e-+this._x.call(null,_.data),z=n-+this._y.call(null,_.data),P=r-+this._z.call(null,_.data),N=T*T+z*z+P*P;if(N<i){var I=Math.sqrt(i=N);a=e-I,s=n-I,u=r-I,y=e+I,x=n+I,v=r+I,o=_.data}}return o}const Xf=(e,n,r,i,o,a)=>Math.sqrt((e-i)**2+(n-o)**2+(r-a)**2);function Yf(e,n,r,i){const o=[],a=e-i,s=n-i,u=r-i,f=e+i,l=n+i,d=r+i;return this.visit((c,h,g,y,x,v,p)=>{if(!c.length)do{const _=c.data;Xf(e,n,r,this._x(_),this._y(_),this._z(_))<=i&&o.push(_)}while(c=c.next);return h>f||g>l||y>d||x<a||v<s||p<u}),o}function Zf(e){if(isNaN(h=+this._x.call(null,e))||isNaN(g=+this._y.call(null,e))||isNaN(y=+this._z.call(null,e)))return this;var n,r=this._root,i,o,a,s=this._x0,u=this._y0,f=this._z0,l=this._x1,d=this._y1,c=this._z1,h,g,y,x,v,p,_,k,w,m,A;if(!r)return this;if(r.length)for(;;){if((_=h>=(x=(s+l)/2))?s=x:l=x,(k=g>=(v=(u+d)/2))?u=v:d=v,(w=y>=(p=(f+c)/2))?f=p:c=p,n=r,!(r=r[m=w<<2|k<<1|_]))return this;if(!r.length)break;(n[m+1&7]||n[m+2&7]||n[m+3&7]||n[m+4&7]||n[m+5&7]||n[m+6&7]||n[m+7&7])&&(i=n,A=m)}for(;r.data!==e;)if(o=r,!(r=r.next))return this;return(a=r.next)&&delete r.next,o?(a?o.next=a:delete o.next,this):n?(a?n[m]=a:delete n[m],(r=n[0]||n[1]||n[2]||n[3]||n[4]||n[5]||n[6]||n[7])&&r===(n[7]||n[6]||n[5]||n[4]||n[3]||n[2]||n[1]||n[0])&&!r.length&&(i?i[A]=r:this._root=r),this):(this._root=a,this)}function Kf(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function Qf(){return this._root}function Jf(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function tc(e){var n=[],r,i=this._root,o,a,s,u,f,l,d;for(i&&n.push(new V(i,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));r=n.pop();)if(!e(i=r.node,a=r.x0,s=r.y0,u=r.z0,f=r.x1,l=r.y1,d=r.z1)&&i.length){var c=(a+f)/2,h=(s+l)/2,g=(u+d)/2;(o=i[7])&&n.push(new V(o,c,h,g,f,l,d)),(o=i[6])&&n.push(new V(o,a,h,g,c,l,d)),(o=i[5])&&n.push(new V(o,c,s,g,f,h,d)),(o=i[4])&&n.push(new V(o,a,s,g,c,h,d)),(o=i[3])&&n.push(new V(o,c,h,u,f,l,g)),(o=i[2])&&n.push(new V(o,a,h,u,c,l,g)),(o=i[1])&&n.push(new V(o,c,s,u,f,h,g)),(o=i[0])&&n.push(new V(o,a,s,u,c,h,g))}return this}function ec(e){var n=[],r=[],i;for(this._root&&n.push(new V(this._root,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));i=n.pop();){var o=i.node;if(o.length){var a,s=i.x0,u=i.y0,f=i.z0,l=i.x1,d=i.y1,c=i.z1,h=(s+l)/2,g=(u+d)/2,y=(f+c)/2;(a=o[0])&&n.push(new V(a,s,u,f,h,g,y)),(a=o[1])&&n.push(new V(a,h,u,f,l,g,y)),(a=o[2])&&n.push(new V(a,s,g,f,h,d,y)),(a=o[3])&&n.push(new V(a,h,g,f,l,d,y)),(a=o[4])&&n.push(new V(a,s,u,y,h,g,c)),(a=o[5])&&n.push(new V(a,h,u,y,l,g,c)),(a=o[6])&&n.push(new V(a,s,g,y,h,d,c)),(a=o[7])&&n.push(new V(a,h,g,y,l,d,c))}r.push(i)}for(;i=r.pop();)e(i.node,i.x0,i.y0,i.z0,i.x1,i.y1,i.z1);return this}function nc(e){return e[0]}function rc(e){return arguments.length?(this._x=e,this):this._x}function ic(e){return e[1]}function oc(e){return arguments.length?(this._y=e,this):this._y}function ac(e){return e[2]}function sc(e){return arguments.length?(this._z=e,this):this._z}function zi(e,n,r,i){var o=new Rn(n??nc,r??ic,i??ac,NaN,NaN,NaN,NaN,NaN,NaN);return e==null?o:o.addAll(e)}function Rn(e,n,r,i,o,a,s,u,f){this._x=e,this._y=n,this._z=r,this._x0=i,this._y0=o,this._z0=a,this._x1=s,this._y1=u,this._z1=f,this._root=void 0}function br(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var Q=zi.prototype=Rn.prototype;Q.copy=function(){var e=new Rn(this._x,this._y,this._z,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1),n=this._root,r,i;if(!n)return e;if(!n.length)return e._root=br(n),e;for(r=[{source:n,target:e._root=new Array(8)}];n=r.pop();)for(var o=0;o<8;++o)(i=n.source[o])&&(i.length?r.push({source:i,target:n.target[o]=new Array(8)}):n.target[o]=br(i));return e};Q.add=qf;Q.addAll=Hf;Q.cover=Gf;Q.data=Vf;Q.extent=Wf;Q.find=Bf;Q.findAllWithinRadius=Yf;Q.remove=Zf;Q.removeAll=Kf;Q.root=Qf;Q.size=Jf;Q.visit=tc;Q.visitAfter=ec;Q.x=rc;Q.y=oc;Q.z=sc;function Tt(e){return function(){return e}}function Ct(e){return(e()-.5)*1e-6}function uc(e){return e.index}function xr(e,n){var r=e.get(n);if(!r)throw new Error("node not found: "+n);return r}function lc(e){var n=uc,r=h,i,o=Tt(30),a,s,u,f,l,d,c=1;e==null&&(e=[]);function h(p){return 1/Math.min(f[p.source.index],f[p.target.index])}function g(p){for(var _=0,k=e.length;_<c;++_)for(var w=0,m,A,S,T=0,z=0,P=0,N,I;w<k;++w)m=e[w],A=m.source,S=m.target,T=S.x+S.vx-A.x-A.vx||Ct(d),u>1&&(z=S.y+S.vy-A.y-A.vy||Ct(d)),u>2&&(P=S.z+S.vz-A.z-A.vz||Ct(d)),N=Math.sqrt(T*T+z*z+P*P),N=(N-a[w])/N*p*i[w],T*=N,z*=N,P*=N,S.vx-=T*(I=l[w]),u>1&&(S.vy-=z*I),u>2&&(S.vz-=P*I),A.vx+=T*(I=1-I),u>1&&(A.vy+=z*I),u>2&&(A.vz+=P*I)}function y(){if(s){var p,_=s.length,k=e.length,w=new Map(s.map((A,S)=>[n(A,S,s),A])),m;for(p=0,f=new Array(_);p<k;++p)m=e[p],m.index=p,typeof m.source!="object"&&(m.source=xr(w,m.source)),typeof m.target!="object"&&(m.target=xr(w,m.target)),f[m.source.index]=(f[m.source.index]||0)+1,f[m.target.index]=(f[m.target.index]||0)+1;for(p=0,l=new Array(k);p<k;++p)m=e[p],l[p]=f[m.source.index]/(f[m.source.index]+f[m.target.index]);i=new Array(k),x(),a=new Array(k),v()}}function x(){if(s)for(var p=0,_=e.length;p<_;++p)i[p]=+r(e[p],p,e)}function v(){if(s)for(var p=0,_=e.length;p<_;++p)a[p]=+o(e[p],p,e)}return g.initialize=function(p,..._){s=p,d=_.find(k=>typeof k=="function")||Math.random,u=_.find(k=>[1,2,3].includes(k))||2,y()},g.links=function(p){return arguments.length?(e=p,y(),g):e},g.id=function(p){return arguments.length?(n=p,g):n},g.iterations=function(p){return arguments.length?(c=+p,g):c},g.strength=function(p){return arguments.length?(r=typeof p=="function"?p:Tt(+p),x(),g):r},g.distance=function(p){return arguments.length?(o=typeof p=="function"?p:Tt(+p),v(),g):o},g}const fc=1664525,cc=1013904223,wr=4294967296;function hc(){let e=1;return()=>(e=(fc*e+cc)%wr)/wr}var kr=3;function Be(e){return e.x}function Ar(e){return e.y}function dc(e){return e.z}var pc=10,gc=Math.PI*(3-Math.sqrt(5)),yc=Math.PI*20/(9+Math.sqrt(221));function _c(e,n){n=n||2;var r=Math.min(kr,Math.max(1,Math.round(n))),i,o=1,a=.001,s=1-Math.pow(a,1/300),u=0,f=.6,l=new Map,d=wn(g),c=fe("tick","end"),h=hc();e==null&&(e=[]);function g(){y(),c.call("tick",i),o<a&&(d.stop(),c.call("end",i))}function y(p){var _,k=e.length,w;p===void 0&&(p=1);for(var m=0;m<p;++m)for(o+=(u-o)*s,l.forEach(function(A){A(o)}),_=0;_<k;++_)w=e[_],w.fx==null?w.x+=w.vx*=f:(w.x=w.fx,w.vx=0),r>1&&(w.fy==null?w.y+=w.vy*=f:(w.y=w.fy,w.vy=0)),r>2&&(w.fz==null?w.z+=w.vz*=f:(w.z=w.fz,w.vz=0));return i}function x(){for(var p=0,_=e.length,k;p<_;++p){if(k=e[p],k.index=p,k.fx!=null&&(k.x=k.fx),k.fy!=null&&(k.y=k.fy),k.fz!=null&&(k.z=k.fz),isNaN(k.x)||r>1&&isNaN(k.y)||r>2&&isNaN(k.z)){var w=pc*(r>2?Math.cbrt(.5+p):r>1?Math.sqrt(.5+p):p),m=p*gc,A=p*yc;r===1?k.x=w:r===2?(k.x=w*Math.cos(m),k.y=w*Math.sin(m)):(k.x=w*Math.sin(m)*Math.cos(A),k.y=w*Math.cos(m),k.z=w*Math.sin(m)*Math.sin(A))}(isNaN(k.vx)||r>1&&isNaN(k.vy)||r>2&&isNaN(k.vz))&&(k.vx=0,r>1&&(k.vy=0),r>2&&(k.vz=0))}}function v(p){return p.initialize&&p.initialize(e,h,r),p}return x(),i={tick:y,restart:function(){return d.restart(g),i},stop:function(){return d.stop(),i},numDimensions:function(p){return arguments.length?(r=Math.min(kr,Math.max(1,Math.round(p))),l.forEach(v),i):r},nodes:function(p){return arguments.length?(e=p,x(),l.forEach(v),i):e},alpha:function(p){return arguments.length?(o=+p,i):o},alphaMin:function(p){return arguments.length?(a=+p,i):a},alphaDecay:function(p){return arguments.length?(s=+p,i):+s},alphaTarget:function(p){return arguments.length?(u=+p,i):u},velocityDecay:function(p){return arguments.length?(f=1-p,i):1-f},randomSource:function(p){return arguments.length?(h=p,l.forEach(v),i):h},force:function(p,_){return arguments.length>1?(_==null?l.delete(p):l.set(p,v(_)),i):l.get(p)},find:function(){var p=Array.prototype.slice.call(arguments),_=p.shift()||0,k=(r>1?p.shift():null)||0,w=(r>2?p.shift():null)||0,m=p.shift()||1/0,A=0,S=e.length,T,z,P,N,I,U;for(m*=m,A=0;A<S;++A)I=e[A],T=_-I.x,z=k-(I.y||0),P=w-(I.z||0),N=T*T+z*z+P*P,N<m&&(U=I,m=N);return U},on:function(p,_){return arguments.length>1?(c.on(p,_),i):c.on(p)}}}function vc(){var e,n,r,i,o,a=Tt(-30),s,u=1,f=1/0,l=.81;function d(y){var x,v=e.length,p=(n===1?Mi(e,Be):n===2?Oi(e,Be,Ar):n===3?zi(e,Be,Ar,dc):null).visitAfter(h);for(o=y,x=0;x<v;++x)r=e[x],p.visit(g)}function c(){if(e){var y,x=e.length,v;for(s=new Array(x),y=0;y<x;++y)v=e[y],s[v.index]=+a(v,y,e)}}function h(y){var x=0,v,p,_=0,k,w,m,A,S=y.length;if(S){for(k=w=m=A=0;A<S;++A)(v=y[A])&&(p=Math.abs(v.value))&&(x+=v.value,_+=p,k+=p*(v.x||0),w+=p*(v.y||0),m+=p*(v.z||0));x*=Math.sqrt(4/S),y.x=k/_,n>1&&(y.y=w/_),n>2&&(y.z=m/_)}else{v=y,v.x=v.data.x,n>1&&(v.y=v.data.y),n>2&&(v.z=v.data.z);do x+=s[v.data.index];while(v=v.next)}y.value=x}function g(y,x,v,p,_){if(!y.value)return!0;var k=[v,p,_][n-1],w=y.x-r.x,m=n>1?y.y-r.y:0,A=n>2?y.z-r.z:0,S=k-x,T=w*w+m*m+A*A;if(S*S/l<T)return T<f&&(w===0&&(w=Ct(i),T+=w*w),n>1&&m===0&&(m=Ct(i),T+=m*m),n>2&&A===0&&(A=Ct(i),T+=A*A),T<u&&(T=Math.sqrt(u*T)),r.vx+=w*y.value*o/T,n>1&&(r.vy+=m*y.value*o/T),n>2&&(r.vz+=A*y.value*o/T)),!0;if(y.length||T>=f)return;(y.data!==r||y.next)&&(w===0&&(w=Ct(i),T+=w*w),n>1&&m===0&&(m=Ct(i),T+=m*m),n>2&&A===0&&(A=Ct(i),T+=A*A),T<u&&(T=Math.sqrt(u*T)));do y.data!==r&&(S=s[y.data.index]*o/T,r.vx+=w*S,n>1&&(r.vy+=m*S),n>2&&(r.vz+=A*S));while(y=y.next)}return d.initialize=function(y,...x){e=y,i=x.find(v=>typeof v=="function")||Math.random,n=x.find(v=>[1,2,3].includes(v))||2,c()},d.strength=function(y){return arguments.length?(a=typeof y=="function"?y:Tt(+y),c(),d):a},d.distanceMin=function(y){return arguments.length?(u=y*y,d):Math.sqrt(u)},d.distanceMax=function(y){return arguments.length?(f=y*y,d):Math.sqrt(f)},d.theta=function(y){return arguments.length?(l=y*y,d):Math.sqrt(l)},d}function mc(e,n,r,i){var o,a,s=Tt(.1),u,f;typeof e!="function"&&(e=Tt(+e)),n==null&&(n=0),r==null&&(r=0),i==null&&(i=0);function l(c){for(var h=0,g=o.length;h<g;++h){var y=o[h],x=y.x-n||1e-6,v=(y.y||0)-r||1e-6,p=(y.z||0)-i||1e-6,_=Math.sqrt(x*x+v*v+p*p),k=(f[h]-_)*u[h]*c/_;y.vx+=x*k,a>1&&(y.vy+=v*k),a>2&&(y.vz+=p*k)}}function d(){if(o){var c,h=o.length;for(u=new Array(h),f=new Array(h),c=0;c<h;++c)f[c]=+e(o[c],c,o),u[c]=isNaN(f[c])?0:+s(o[c],c,o)}}return l.initialize=function(c,...h){o=c,a=h.find(g=>[1,2,3].includes(g))||2,d()},l.strength=function(c){return arguments.length?(s=typeof c=="function"?c:Tt(+c),d(),l):s},l.radius=function(c){return arguments.length?(e=typeof c=="function"?c:Tt(+c),d(),l):e},l.x=function(c){return arguments.length?(n=+c,l):n},l.y=function(c){return arguments.length?(r=+c,l):r},l.z=function(c){return arguments.length?(i=+c,l):i},l}const{abs:Wt,cos:At,sin:jt,acos:bc,atan2:Bt,sqrt:Ot,pow:at}=Math;function Xt(e){return e<0?-at(-e,1/3):at(e,1/3)}const Ri=Math.PI,ye=2*Ri,Et=Ri/2,xc=1e-6,Xe=Number.MAX_SAFE_INTEGER||9007199254740991,Ye=Number.MIN_SAFE_INTEGER||-9007199254740991,wc={x:0,y:0,z:0},O={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(e,n){const r=n(e);let i=r.x*r.x+r.y*r.y;return typeof r.z<"u"&&(i+=r.z*r.z),Ot(i)},compute:function(e,n,r){if(e===0)return n[0].t=0,n[0];const i=n.length-1;if(e===1)return n[i].t=1,n[i];const o=1-e;let a=n;if(i===0)return n[0].t=e,n[0];if(i===1){const u={x:o*a[0].x+e*a[1].x,y:o*a[0].y+e*a[1].y,t:e};return r&&(u.z=o*a[0].z+e*a[1].z),u}if(i<4){let u=o*o,f=e*e,l,d,c,h=0;i===2?(a=[a[0],a[1],a[2],wc],l=u,d=o*e*2,c=f):i===3&&(l=u*o,d=u*e*3,c=o*f*3,h=e*f);const g={x:l*a[0].x+d*a[1].x+c*a[2].x+h*a[3].x,y:l*a[0].y+d*a[1].y+c*a[2].y+h*a[3].y,t:e};return r&&(g.z=l*a[0].z+d*a[1].z+c*a[2].z+h*a[3].z),g}const s=JSON.parse(JSON.stringify(n));for(;s.length>1;){for(let u=0;u<s.length-1;u++)s[u]={x:s[u].x+(s[u+1].x-s[u].x)*e,y:s[u].y+(s[u+1].y-s[u].y)*e},typeof s[u].z<"u"&&(s[u].z=s[u].z+(s[u+1].z-s[u].z)*e);s.splice(s.length-1,1)}return s[0].t=e,s[0]},computeWithRatios:function(e,n,r,i){const o=1-e,a=r,s=n;let u=a[0],f=a[1],l=a[2],d=a[3],c;if(u*=o,f*=e,s.length===2)return c=u+f,{x:(u*s[0].x+f*s[1].x)/c,y:(u*s[0].y+f*s[1].y)/c,z:i?(u*s[0].z+f*s[1].z)/c:!1,t:e};if(u*=o,f*=2*o,l*=e*e,s.length===3)return c=u+f+l,{x:(u*s[0].x+f*s[1].x+l*s[2].x)/c,y:(u*s[0].y+f*s[1].y+l*s[2].y)/c,z:i?(u*s[0].z+f*s[1].z+l*s[2].z)/c:!1,t:e};if(u*=o,f*=1.5*o,l*=3*o,d*=e*e*e,s.length===4)return c=u+f+l+d,{x:(u*s[0].x+f*s[1].x+l*s[2].x+d*s[3].x)/c,y:(u*s[0].y+f*s[1].y+l*s[2].y+d*s[3].y)/c,z:i?(u*s[0].z+f*s[1].z+l*s[2].z+d*s[3].z)/c:!1,t:e}},derive:function(e,n){const r=[];for(let i=e,o=i.length,a=o-1;o>1;o--,a--){const s=[];for(let u=0,f;u<a;u++)f={x:a*(i[u+1].x-i[u].x),y:a*(i[u+1].y-i[u].y)},n&&(f.z=a*(i[u+1].z-i[u].z)),s.push(f);r.push(s),i=s}return r},between:function(e,n,r){return n<=e&&e<=r||O.approximately(e,n)||O.approximately(e,r)},approximately:function(e,n,r){return Wt(e-n)<=(r||xc)},length:function(e){const r=O.Tvalues.length;let i=0;for(let o=0,a;o<r;o++)a=.5*O.Tvalues[o]+.5,i+=O.Cvalues[o]*O.arcfn(a,e);return .5*i},map:function(e,n,r,i,o){const a=r-n,s=o-i,u=e-n,f=u/a;return i+s*f},lerp:function(e,n,r){const i={x:n.x+e*(r.x-n.x),y:n.y+e*(r.y-n.y)};return n.z!==void 0&&r.z!==void 0&&(i.z=n.z+e*(r.z-n.z)),i},pointToString:function(e){let n=e.x+"/"+e.y;return typeof e.z<"u"&&(n+="/"+e.z),n},pointsToString:function(e){return"["+e.map(O.pointToString).join(", ")+"]"},copy:function(e){return JSON.parse(JSON.stringify(e))},angle:function(e,n,r){const i=n.x-e.x,o=n.y-e.y,a=r.x-e.x,s=r.y-e.y,u=i*s-o*a,f=i*a+o*s;return Bt(u,f)},round:function(e,n){const r=""+e,i=r.indexOf(".");return parseFloat(r.substring(0,i+1+n))},dist:function(e,n){const r=e.x-n.x,i=e.y-n.y;return Ot(r*r+i*i)},closest:function(e,n){let r=at(2,63),i,o;return e.forEach(function(a,s){o=O.dist(n,a),o<r&&(r=o,i=s)}),{mdist:r,mpos:i}},abcratio:function(e,n){if(n!==2&&n!==3)return!1;if(typeof e>"u")e=.5;else if(e===0||e===1)return e;const r=at(e,n)+at(1-e,n),i=r-1;return Wt(i/r)},projectionratio:function(e,n){if(n!==2&&n!==3)return!1;if(typeof e>"u")e=.5;else if(e===0||e===1)return e;const r=at(1-e,n),i=at(e,n)+r;return r/i},lli8:function(e,n,r,i,o,a,s,u){const f=(e*i-n*r)*(o-s)-(e-r)*(o*u-a*s),l=(e*i-n*r)*(a-u)-(n-i)*(o*u-a*s),d=(e-r)*(a-u)-(n-i)*(o-s);return d==0?!1:{x:f/d,y:l/d}},lli4:function(e,n,r,i){const o=e.x,a=e.y,s=n.x,u=n.y,f=r.x,l=r.y,d=i.x,c=i.y;return O.lli8(o,a,s,u,f,l,d,c)},lli:function(e,n){return O.lli4(e,e.c,n,n.c)},makeline:function(e,n){return new W(e.x,e.y,(e.x+n.x)/2,(e.y+n.y)/2,n.x,n.y)},findbbox:function(e){let n=Xe,r=Xe,i=Ye,o=Ye;return e.forEach(function(a){const s=a.bbox();n>s.x.min&&(n=s.x.min),r>s.y.min&&(r=s.y.min),i<s.x.max&&(i=s.x.max),o<s.y.max&&(o=s.y.max)}),{x:{min:n,mid:(n+i)/2,max:i,size:i-n},y:{min:r,mid:(r+o)/2,max:o,size:o-r}}},shapeintersections:function(e,n,r,i,o){if(!O.bboxoverlap(n,i))return[];const a=[],s=[e.startcap,e.forward,e.back,e.endcap],u=[r.startcap,r.forward,r.back,r.endcap];return s.forEach(function(f){f.virtual||u.forEach(function(l){if(l.virtual)return;const d=f.intersects(l,o);d.length>0&&(d.c1=f,d.c2=l,d.s1=e,d.s2=r,a.push(d))})}),a},makeshape:function(e,n,r){const i=n.points.length,o=e.points.length,a=O.makeline(n.points[i-1],e.points[0]),s=O.makeline(e.points[o-1],n.points[0]),u={startcap:a,forward:e,back:n,endcap:s,bbox:O.findbbox([a,e,n,s])};return u.intersections=function(f){return O.shapeintersections(u,u.bbox,f,f.bbox,r)},u},getminmax:function(e,n,r){if(!r)return{min:0,max:0};let i=Xe,o=Ye,a,s;r.indexOf(0)===-1&&(r=[0].concat(r)),r.indexOf(1)===-1&&r.push(1);for(let u=0,f=r.length;u<f;u++)a=r[u],s=e.get(a),s[n]<i&&(i=s[n]),s[n]>o&&(o=s[n]);return{min:i,mid:(i+o)/2,max:o,size:o-i}},align:function(e,n){const r=n.p1.x,i=n.p1.y,o=-Bt(n.p2.y-i,n.p2.x-r),a=function(s){return{x:(s.x-r)*At(o)-(s.y-i)*jt(o),y:(s.x-r)*jt(o)+(s.y-i)*At(o)}};return e.map(a)},roots:function(e,n){n=n||{p1:{x:0,y:0},p2:{x:1,y:0}};const r=e.length-1,i=O.align(e,n),o=function(S){return 0<=S&&S<=1};if(r===2){const S=i[0].y,T=i[1].y,z=i[2].y,P=S-2*T+z;if(P!==0){const N=-Ot(T*T-S*z),I=-S+T,U=-(N+I)/P,C=-(-N+I)/P;return[U,C].filter(o)}else if(T!==z&&P===0)return[(2*T-z)/(2*T-2*z)].filter(o);return[]}const a=i[0].y,s=i[1].y,u=i[2].y,f=i[3].y;let l=-a+3*s-3*u+f,d=3*a-6*s+3*u,c=-3*a+3*s,h=a;if(O.approximately(l,0)){if(O.approximately(d,0))return O.approximately(c,0)?[]:[-h/c].filter(o);const S=Ot(c*c-4*d*h),T=2*d;return[(S-c)/T,(-c-S)/T].filter(o)}d/=l,c/=l,h/=l;const g=(3*c-d*d)/3,y=g/3,x=(2*d*d*d-9*d*c+27*h)/27,v=x/2,p=v*v+y*y*y;let _,k,w,m,A;if(p<0){const S=-g/3,T=S*S*S,z=Ot(T),P=-x/(2*z),N=P<-1?-1:P>1?1:P,I=bc(N),U=Xt(z),C=2*U;return w=C*At(I/3)-d/3,m=C*At((I+ye)/3)-d/3,A=C*At((I+2*ye)/3)-d/3,[w,m,A].filter(o)}else{if(p===0)return _=v<0?Xt(-v):-Xt(v),w=2*_-d/3,m=-_-d/3,[w,m].filter(o);{const S=Ot(p);return _=Xt(-v+S),k=Xt(v+S),[_-k-d/3].filter(o)}}},droots:function(e){if(e.length===3){const n=e[0],r=e[1],i=e[2],o=n-2*r+i;if(o!==0){const a=-Ot(r*r-n*i),s=-n+r,u=-(a+s)/o,f=-(-a+s)/o;return[u,f]}else if(r!==i&&o===0)return[(2*r-i)/(2*(r-i))];return[]}if(e.length===2){const n=e[0],r=e[1];return n!==r?[n/(n-r)]:[]}return[]},curvature:function(e,n,r,i,o){let a,s,u,f,l=0,d=0;const c=O.compute(e,n),h=O.compute(e,r),g=c.x*c.x+c.y*c.y;if(i?(a=Ot(at(c.y*h.z-h.y*c.z,2)+at(c.z*h.x-h.z*c.x,2)+at(c.x*h.y-h.x*c.y,2)),s=at(g+c.z*c.z,3/2)):(a=c.x*h.y-c.y*h.x,s=at(g,3/2)),a===0||s===0)return{k:0,r:0};if(l=a/s,d=s/a,!o){const y=O.curvature(e-.001,n,r,i,!0).k,x=O.curvature(e+.001,n,r,i,!0).k;f=(x-l+(l-y))/2,u=(Wt(x-l)+Wt(l-y))/2}return{k:l,r:d,dk:f,adk:u}},inflections:function(e){if(e.length<4)return[];const n=O.align(e,{p1:e[0],p2:e.slice(-1)[0]}),r=n[2].x*n[1].y,i=n[3].x*n[1].y,o=n[1].x*n[2].y,a=n[3].x*n[2].y,s=18*(-3*r+2*i+3*o-a),u=18*(3*r-i-3*o),f=18*(o-r);if(O.approximately(s,0)){if(!O.approximately(u,0)){let h=-f/u;if(0<=h&&h<=1)return[h]}return[]}const l=2*s;if(O.approximately(l,0))return[];const d=u*u-4*s*f;if(d<0)return[];const c=Math.sqrt(d);return[(c-u)/l,-(u+c)/l].filter(function(h){return 0<=h&&h<=1})},bboxoverlap:function(e,n){const r=["x","y"],i=r.length;for(let o=0,a,s,u,f;o<i;o++)if(a=r[o],s=e[a].mid,u=n[a].mid,f=(e[a].size+n[a].size)/2,Wt(s-u)>=f)return!1;return!0},expandbox:function(e,n){n.x.min<e.x.min&&(e.x.min=n.x.min),n.y.min<e.y.min&&(e.y.min=n.y.min),n.z&&n.z.min<e.z.min&&(e.z.min=n.z.min),n.x.max>e.x.max&&(e.x.max=n.x.max),n.y.max>e.y.max&&(e.y.max=n.y.max),n.z&&n.z.max>e.z.max&&(e.z.max=n.z.max),e.x.mid=(e.x.min+e.x.max)/2,e.y.mid=(e.y.min+e.y.max)/2,e.z&&(e.z.mid=(e.z.min+e.z.max)/2),e.x.size=e.x.max-e.x.min,e.y.size=e.y.max-e.y.min,e.z&&(e.z.size=e.z.max-e.z.min)},pairiteration:function(e,n,r){const i=e.bbox(),o=n.bbox(),a=1e5,s=r||.5;if(i.x.size+i.y.size<s&&o.x.size+o.y.size<s)return[(a*(e._t1+e._t2)/2|0)/a+"/"+(a*(n._t1+n._t2)/2|0)/a];let u=e.split(.5),f=n.split(.5),l=[{left:u.left,right:f.left},{left:u.left,right:f.right},{left:u.right,right:f.right},{left:u.right,right:f.left}];l=l.filter(function(c){return O.bboxoverlap(c.left.bbox(),c.right.bbox())});let d=[];return l.length===0||(l.forEach(function(c){d=d.concat(O.pairiteration(c.left,c.right,s))}),d=d.filter(function(c,h){return d.indexOf(c)===h})),d},getccenter:function(e,n,r){const i=n.x-e.x,o=n.y-e.y,a=r.x-n.x,s=r.y-n.y,u=i*At(Et)-o*jt(Et),f=i*jt(Et)+o*At(Et),l=a*At(Et)-s*jt(Et),d=a*jt(Et)+s*At(Et),c=(e.x+n.x)/2,h=(e.y+n.y)/2,g=(n.x+r.x)/2,y=(n.y+r.y)/2,x=c+u,v=h+f,p=g+l,_=y+d,k=O.lli8(c,h,x,v,g,y,p,_),w=O.dist(k,e);let m=Bt(e.y-k.y,e.x-k.x),A=Bt(n.y-k.y,n.x-k.x),S=Bt(r.y-k.y,r.x-k.x),T;return m<S?((m>A||A>S)&&(m+=ye),m>S&&(T=S,S=m,m=T)):S<A&&A<m?(T=S,S=m,m=T):S+=ye,k.s=m,k.e=S,k.r=w,k},numberSort:function(e,n){return e-n}};class ie{constructor(n){this.curves=[],this._3d=!1,n&&(this.curves=n,this._3d=this.curves[0]._3d)}valueOf(){return this.toString()}toString(){return"["+this.curves.map(function(n){return O.pointsToString(n.points)}).join(", ")+"]"}addCurve(n){this.curves.push(n),this._3d=this._3d||n._3d}length(){return this.curves.map(function(n){return n.length()}).reduce(function(n,r){return n+r})}curve(n){return this.curves[n]}bbox(){const n=this.curves;for(var r=n[0].bbox(),i=1;i<n.length;i++)O.expandbox(r,n[i].bbox());return r}offset(n){const r=[];return this.curves.forEach(function(i){r.push(...i.offset(n))}),new ie(r)}}const{abs:Yt,min:Cr,max:Sr,cos:kc,sin:Ac,acos:Cc,sqrt:Zt}=Math,Sc=Math.PI;class W{constructor(n){let r=n&&n.forEach?n:Array.from(arguments).slice(),i=!1;if(typeof r[0]=="object"){i=r.length;const g=[];r.forEach(function(y){["x","y","z"].forEach(function(x){typeof y[x]<"u"&&g.push(y[x])})}),r=g}let o=!1;const a=r.length;if(i){if(i>4){if(arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");o=!0}}else if(a!==6&&a!==8&&a!==9&&a!==12&&arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");const s=this._3d=!o&&(a===9||a===12)||n&&n[0]&&typeof n[0].z<"u",u=this.points=[];for(let g=0,y=s?3:2;g<a;g+=y){var f={x:r[g],y:r[g+1]};s&&(f.z=r[g+2]),u.push(f)}const l=this.order=u.length-1,d=this.dims=["x","y"];s&&d.push("z"),this.dimlen=d.length;const c=O.align(u,{p1:u[0],p2:u[l]}),h=O.dist(u[0],u[l]);this._linear=c.reduce((g,y)=>g+Yt(y.y),0)<h/50,this._lut=[],this._t1=0,this._t2=1,this.update()}static quadraticFromPoints(n,r,i,o){if(typeof o>"u"&&(o=.5),o===0)return new W(r,r,i);if(o===1)return new W(n,r,r);const a=W.getABC(2,n,r,i,o);return new W(n,a.A,i)}static cubicFromPoints(n,r,i,o,a){typeof o>"u"&&(o=.5);const s=W.getABC(3,n,r,i,o);typeof a>"u"&&(a=O.dist(r,s.C));const u=a*(1-o)/o,f=O.dist(n,i),l=(i.x-n.x)/f,d=(i.y-n.y)/f,c=a*l,h=a*d,g=u*l,y=u*d,x={x:r.x-c,y:r.y-h},v={x:r.x+g,y:r.y+y},p=s.A,_={x:p.x+(x.x-p.x)/(1-o),y:p.y+(x.y-p.y)/(1-o)},k={x:p.x+(v.x-p.x)/o,y:p.y+(v.y-p.y)/o},w={x:n.x+(_.x-n.x)/o,y:n.y+(_.y-n.y)/o},m={x:i.x+(k.x-i.x)/(1-o),y:i.y+(k.y-i.y)/(1-o)};return new W(n,w,m,i)}static getUtils(){return O}getUtils(){return W.getUtils()}static get PolyBezier(){return ie}valueOf(){return this.toString()}toString(){return O.pointsToString(this.points)}toSVG(){if(this._3d)return!1;const n=this.points,r=n[0].x,i=n[0].y,o=["M",r,i,this.order===2?"Q":"C"];for(let a=1,s=n.length;a<s;a++)o.push(n[a].x),o.push(n[a].y);return o.join(" ")}setRatios(n){if(n.length!==this.points.length)throw new Error("incorrect number of ratio values");this.ratios=n,this._lut=[]}verify(){const n=this.coordDigest();n!==this._print&&(this._print=n,this.update())}coordDigest(){return this.points.map(function(n,r){return""+r+n.x+n.y+(n.z?n.z:0)}).join("")}update(){this._lut=[],this.dpoints=O.derive(this.points,this._3d),this.computedirection()}computedirection(){const n=this.points,r=O.angle(n[0],n[this.order],n[1]);this.clockwise=r>0}length(){return O.length(this.derivative.bind(this))}static getABC(n=2,r,i,o,a=.5){const s=O.projectionratio(a,n),u=1-s,f={x:s*r.x+u*o.x,y:s*r.y+u*o.y},l=O.abcratio(a,n);return{A:{x:i.x+(i.x-f.x)/l,y:i.y+(i.y-f.y)/l},B:i,C:f,S:r,E:o}}getABC(n,r){r=r||this.get(n);let i=this.points[0],o=this.points[this.order];return W.getABC(this.order,i,r,o,n)}getLUT(n){if(this.verify(),n=n||100,this._lut.length===n+1)return this._lut;this._lut=[],n++,this._lut=[];for(let r=0,i,o;r<n;r++)o=r/(n-1),i=this.compute(o),i.t=o,this._lut.push(i);return this._lut}on(n,r){r=r||5;const i=this.getLUT(),o=[];for(let a=0,s,u=0;a<i.length;a++)s=i[a],O.dist(s,n)<r&&(o.push(s),u+=a/i.length);return o.length?t/=o.length:!1}project(n){const r=this.getLUT(),i=r.length-1,o=O.closest(r,n),a=o.mpos,s=(a-1)/i,u=(a+1)/i,f=.1/i;let l=o.mdist,d=s,c=d,h;l+=1;for(let g;d<u+f;d+=f)h=this.compute(d),g=O.dist(n,h),g<l&&(l=g,c=d);return c=c<0?0:c>1?1:c,h=this.compute(c),h.t=c,h.d=l,h}get(n){return this.compute(n)}point(n){return this.points[n]}compute(n){return this.ratios?O.computeWithRatios(n,this.points,this.ratios,this._3d):O.compute(n,this.points,this._3d,this.ratios)}raise(){const n=this.points,r=[n[0]],i=n.length;for(let o=1,a,s;o<i;o++)a=n[o],s=n[o-1],r[o]={x:(i-o)/i*a.x+o/i*s.x,y:(i-o)/i*a.y+o/i*s.y};return r[i]=n[i-1],new W(r)}derivative(n){return O.compute(n,this.dpoints[0],this._3d)}dderivative(n){return O.compute(n,this.dpoints[1],this._3d)}align(){let n=this.points;return new W(O.align(n,{p1:n[0],p2:n[n.length-1]}))}curvature(n){return O.curvature(n,this.dpoints[0],this.dpoints[1],this._3d)}inflections(){return O.inflections(this.points)}normal(n){return this._3d?this.__normal3(n):this.__normal2(n)}__normal2(n){const r=this.derivative(n),i=Zt(r.x*r.x+r.y*r.y);return{t:n,x:-r.y/i,y:r.x/i}}__normal3(n){const r=this.derivative(n),i=this.derivative(n+.01),o=Zt(r.x*r.x+r.y*r.y+r.z*r.z),a=Zt(i.x*i.x+i.y*i.y+i.z*i.z);r.x/=o,r.y/=o,r.z/=o,i.x/=a,i.y/=a,i.z/=a;const s={x:i.y*r.z-i.z*r.y,y:i.z*r.x-i.x*r.z,z:i.x*r.y-i.y*r.x},u=Zt(s.x*s.x+s.y*s.y+s.z*s.z);s.x/=u,s.y/=u,s.z/=u;const f=[s.x*s.x,s.x*s.y-s.z,s.x*s.z+s.y,s.x*s.y+s.z,s.y*s.y,s.y*s.z-s.x,s.x*s.z-s.y,s.y*s.z+s.x,s.z*s.z];return{t:n,x:f[0]*r.x+f[1]*r.y+f[2]*r.z,y:f[3]*r.x+f[4]*r.y+f[5]*r.z,z:f[6]*r.x+f[7]*r.y+f[8]*r.z}}hull(n){let r=this.points,i=[],o=[],a=0;for(o[a++]=r[0],o[a++]=r[1],o[a++]=r[2],this.order===3&&(o[a++]=r[3]);r.length>1;){i=[];for(let s=0,u,f=r.length-1;s<f;s++)u=O.lerp(n,r[s],r[s+1]),o[a++]=u,i.push(u);r=i}return o}split(n,r){if(n===0&&r)return this.split(r).left;if(r===1)return this.split(n).right;const i=this.hull(n),o={left:this.order===2?new W([i[0],i[3],i[5]]):new W([i[0],i[4],i[7],i[9]]),right:this.order===2?new W([i[5],i[4],i[2]]):new W([i[9],i[8],i[6],i[3]]),span:i};return o.left._t1=O.map(0,0,1,this._t1,this._t2),o.left._t2=O.map(n,0,1,this._t1,this._t2),o.right._t1=O.map(n,0,1,this._t1,this._t2),o.right._t2=O.map(1,0,1,this._t1,this._t2),r?(r=O.map(r,n,1,0,1),o.right.split(r).left):o}extrema(){const n={};let r=[];return this.dims.forEach((function(i){let o=function(s){return s[i]},a=this.dpoints[0].map(o);n[i]=O.droots(a),this.order===3&&(a=this.dpoints[1].map(o),n[i]=n[i].concat(O.droots(a))),n[i]=n[i].filter(function(s){return s>=0&&s<=1}),r=r.concat(n[i].sort(O.numberSort))}).bind(this)),n.values=r.sort(O.numberSort).filter(function(i,o){return r.indexOf(i)===o}),n}bbox(){const n=this.extrema(),r={};return this.dims.forEach((function(i){r[i]=O.getminmax(this,i,n[i])}).bind(this)),r}overlaps(n){const r=this.bbox(),i=n.bbox();return O.bboxoverlap(r,i)}offset(n,r){if(typeof r<"u"){const i=this.get(n),o=this.normal(n),a={c:i,n:o,x:i.x+o.x*r,y:i.y+o.y*r};return this._3d&&(a.z=i.z+o.z*r),a}if(this._linear){const i=this.normal(0),o=this.points.map(function(a){const s={x:a.x+n*i.x,y:a.y+n*i.y};return a.z&&i.z&&(s.z=a.z+n*i.z),s});return[new W(o)]}return this.reduce().map(function(i){return i._linear?i.offset(n)[0]:i.scale(n)})}simple(){if(this.order===3){const o=O.angle(this.points[0],this.points[3],this.points[1]),a=O.angle(this.points[0],this.points[3],this.points[2]);if(o>0&&a<0||o<0&&a>0)return!1}const n=this.normal(0),r=this.normal(1);let i=n.x*r.x+n.y*r.y;return this._3d&&(i+=n.z*r.z),Yt(Cc(i))<Sc/3}reduce(){let n,r=0,i=0,o=.01,a,s=[],u=[],f=this.extrema().values;for(f.indexOf(0)===-1&&(f=[0].concat(f)),f.indexOf(1)===-1&&f.push(1),r=f[0],n=1;n<f.length;n++)i=f[n],a=this.split(r,i),a._t1=r,a._t2=i,s.push(a),r=i;return s.forEach(function(l){for(r=0,i=0;i<=1;)for(i=r+o;i<=1+o;i+=o)if(a=l.split(r,i),!a.simple()){if(i-=o,Yt(r-i)<o)return[];a=l.split(r,i),a._t1=O.map(r,0,1,l._t1,l._t2),a._t2=O.map(i,0,1,l._t1,l._t2),u.push(a),r=i;break}r<1&&(a=l.split(r,1),a._t1=O.map(r,0,1,l._t1,l._t2),a._t2=l._t2,u.push(a))}),u}translate(n,r,i){i=typeof i=="number"?i:r;const o=this.order;let a=this.points.map((s,u)=>(1-u/o)*r+u/o*i);return new W(this.points.map((s,u)=>({x:s.x+n.x*a[u],y:s.y+n.y*a[u]})))}scale(n){const r=this.order;let i=!1;if(typeof n=="function"&&(i=n),i&&r===2)return this.raise().scale(i);const o=this.clockwise,a=this.points;if(this._linear)return this.translate(this.normal(0),i?i(0):n,i?i(1):n);const s=i?i(0):n,u=i?i(1):n,f=[this.offset(0,10),this.offset(1,10)],l=[],d=O.lli4(f[0],f[0].c,f[1],f[1].c);if(!d)throw new Error("cannot scale this curve. Try reducing it first.");return[0,1].forEach(function(c){const h=l[c*r]=O.copy(a[c*r]);h.x+=(c?u:s)*f[c].n.x,h.y+=(c?u:s)*f[c].n.y}),i?([0,1].forEach(function(c){if(!(r===2&&c)){var h=a[c+1],g={x:h.x-d.x,y:h.y-d.y},y=i?i((c+1)/r):n;i&&!o&&(y=-y);var x=Zt(g.x*g.x+g.y*g.y);g.x/=x,g.y/=x,l[c+1]={x:h.x+y*g.x,y:h.y+y*g.y}}}),new W(l)):([0,1].forEach(c=>{if(r===2&&c)return;const h=l[c*r],g=this.derivative(c),y={x:h.x+g.x,y:h.y+g.y};l[c+1]=O.lli4(h,y,d,a[c+1])}),new W(l))}outline(n,r,i,o){if(r=r===void 0?n:r,this._linear){const m=this.normal(0),A=this.points[0],S=this.points[this.points.length-1];let T,z,P;i===void 0&&(i=n,o=r),T={x:A.x+m.x*n,y:A.y+m.y*n},P={x:S.x+m.x*i,y:S.y+m.y*i},z={x:(T.x+P.x)/2,y:(T.y+P.y)/2};const N=[T,z,P];T={x:A.x-m.x*r,y:A.y-m.y*r},P={x:S.x-m.x*o,y:S.y-m.y*o},z={x:(T.x+P.x)/2,y:(T.y+P.y)/2};const I=[P,z,T],U=O.makeline(I[2],N[0]),C=O.makeline(N[2],I[0]),E=[U,new W(N),C,new W(I)];return new ie(E)}const a=this.reduce(),s=a.length,u=[];let f=[],l,d=0,c=this.length();const h=typeof i<"u"&&typeof o<"u";function g(m,A,S,T,z){return function(P){const N=T/S,I=(T+z)/S,U=A-m;return O.map(P,0,1,m+N*U,m+I*U)}}a.forEach(function(m){const A=m.length();h?(u.push(m.scale(g(n,i,c,d,A))),f.push(m.scale(g(-r,-o,c,d,A)))):(u.push(m.scale(n)),f.push(m.scale(-r))),d+=A}),f=f.map(function(m){return l=m.points,l[3]?m.points=[l[3],l[2],l[1],l[0]]:m.points=[l[2],l[1],l[0]],m}).reverse();const y=u[0].points[0],x=u[s-1].points[u[s-1].points.length-1],v=f[s-1].points[f[s-1].points.length-1],p=f[0].points[0],_=O.makeline(v,y),k=O.makeline(x,p),w=[_].concat(u).concat([k]).concat(f);return new ie(w)}outlineshapes(n,r,i){r=r||n;const o=this.outline(n,r).curves,a=[];for(let s=1,u=o.length;s<u/2;s++){const f=O.makeshape(o[s],o[u-s],i);f.startcap.virtual=s>1,f.endcap.virtual=s<u/2-1,a.push(f)}return a}intersects(n,r){return n?n.p1&&n.p2?this.lineIntersects(n):(n instanceof W&&(n=n.reduce()),this.curveintersects(this.reduce(),n,r)):this.selfintersects(r)}lineIntersects(n){const r=Cr(n.p1.x,n.p2.x),i=Cr(n.p1.y,n.p2.y),o=Sr(n.p1.x,n.p2.x),a=Sr(n.p1.y,n.p2.y);return O.roots(this.points,n).filter(s=>{var u=this.get(s);return O.between(u.x,r,o)&&O.between(u.y,i,a)})}selfintersects(n){const r=this.reduce(),i=r.length-2,o=[];for(let a=0,s,u,f;a<i;a++)u=r.slice(a,a+1),f=r.slice(a+2),s=this.curveintersects(u,f,n),o.push(...s);return o}curveintersects(n,r,i){const o=[];n.forEach(function(s){r.forEach(function(u){s.overlaps(u)&&o.push({left:s,right:u})})});let a=[];return o.forEach(function(s){const u=O.pairiteration(s.left,s.right,i);u.length>0&&(a=a.concat(u))}),a}arcs(n){return n=n||.5,this._iterate(n,[])}_error(n,r,i,o){const a=(o-i)/4,s=this.get(i+a),u=this.get(o-a),f=O.dist(n,r),l=O.dist(n,s),d=O.dist(n,u);return Yt(l-f)+Yt(d-f)}_iterate(n,r){let i=0,o=1,a;do{a=0,o=1;let s=this.get(i),u,f,l,d,c=!1,h=!1,g,y=o,x=1;do if(h=c,d=l,y=(i+o)/2,u=this.get(y),f=this.get(o),l=O.getccenter(s,u,f),l.interval={start:i,end:o},c=this._error(l,s,i,o)<=n,g=h&&!c,g||(x=o),c){if(o>=1){if(l.interval.end=x=1,d=l,o>1){let p={x:l.x+l.r*kc(l.e),y:l.y+l.r*Ac(l.e)};l.e+=O.angle({x:l.x,y:l.y},p,this.get(1))}break}o=o+(o-i)/2}else o=y;while(!g&&a++<100);if(a>=100)break;d=d||l,r.push(d),i=x}while(o<1);return r}}function yn(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function Tc(e){if(Array.isArray(e))return e}function Mc(e){if(Array.isArray(e))return yn(e)}function Pc(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Oc(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,a,s,u=[],f=!0,l=!1;try{if(a=(r=r.call(e)).next,n!==0)for(;!(f=(i=a.call(r)).done)&&(u.push(i.value),u.length!==n);f=!0);}catch(d){l=!0,o=d}finally{try{if(!f&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(l)throw o}}return u}}function Ec(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zc(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Rc(e,n){if(e==null)return{};var r,i,o=Nc(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],n.includes(r)||{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Nc(e,n){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(n.includes(i))continue;r[i]=e[i]}return r}function Ic(e,n){return Tc(e)||Oc(e,n)||Ni(e,n)||Ec()}function Dc(e){return Mc(e)||Pc(e)||Ni(e)||zc()}function jc(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function $c(e){var n=jc(e,"string");return typeof n=="symbol"?n:n+""}function Ni(e,n){if(e){if(typeof e=="string")return yn(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?yn(e,n):void 0}}var Fc=(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,o=(n instanceof Array?n.length?n:[void 0]:[n]).map(function(u){return{keyAccessor:u,isProp:!(u instanceof Function)}}),a=e.reduce(function(u,f){var l=u,d=f;return o.forEach(function(c,h){var g=c.keyAccessor,y=c.isProp,x;if(y){var v=d,p=v[g],_=Rc(v,[g].map($c));x=p,d=_}else x=g(d,h);h+1<o.length?(l.hasOwnProperty(x)||(l[x]={}),l=l[x]):r?(l.hasOwnProperty(x)||(l[x]=[]),l[x].push(d)):l[x]=d}),u},{});r instanceof Function&&(function u(f){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;l===o.length?Object.keys(f).forEach(function(d){return f[d]=r(f[d])}):Object.values(f).forEach(function(d){return u(d,l+1)})})(a);var s=a;return i&&(s=[],(function u(f){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];l.length===o.length?s.push({keys:l,vals:f}):Object.entries(f).forEach(function(d){var c=Ic(d,2),h=c[0],g=c[1];return u(g,[].concat(Dc(l),[h]))})})(a),n instanceof Array&&n.length===0&&s.length===1&&(s[0].keys=[])),s});function Uc(e){for(var n=e.length/6|0,r=new Array(n),i=0;i<n;)r[i]="#"+e.slice(i*6,++i*6);return r}const Lc=Uc("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");function qc(e,n){n===void 0&&(n={});var r=n.insertAt;if(!(typeof document>"u")){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",r==="top"&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}var Hc=`.force-graph-container canvas {
|
|
display: block;
|
|
user-select: none;
|
|
outline: none;
|
|
-webkit-tap-highlight-color: transparent;
|
|
}
|
|
|
|
.force-graph-container .clickable {
|
|
cursor: pointer;
|
|
}
|
|
|
|
.force-graph-container .grabbable {
|
|
cursor: move;
|
|
cursor: grab;
|
|
cursor: -moz-grab;
|
|
cursor: -webkit-grab;
|
|
}
|
|
|
|
.force-graph-container .grabbable:active {
|
|
cursor: grabbing;
|
|
cursor: -moz-grabbing;
|
|
cursor: -webkit-grabbing;
|
|
}
|
|
`;qc(Hc);function _n(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function Gc(e){if(Array.isArray(e))return e}function Vc(e){if(Array.isArray(e))return _n(e)}function Tr(e,n,r){if(Ii())return Reflect.construct.apply(null,arguments);var i=[null];i.push.apply(i,n);var o=new(e.bind.apply(e,i));return o}function ue(e,n,r){return(n=Kc(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function Ii(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ii=function(){return!!e})()}function Wc(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Bc(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,a,s,u=[],f=!0,l=!1;try{if(a=(r=r.call(e)).next,n!==0)for(;!(f=(i=a.call(r)).done)&&(u.push(i.value),u.length!==n);f=!0);}catch(d){l=!0,o=d}finally{try{if(!f&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(l)throw o}}return u}}function Xc(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Yc(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mr(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function $t(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?Mr(Object(r),!0).forEach(function(i){ue(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mr(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function oe(e,n){return Gc(e)||Bc(e,n)||Di(e,n)||Xc()}function ut(e){return Vc(e)||Wc(e)||Di(e)||Yc()}function Zc(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function Kc(e){var n=Zc(e,"string");return typeof n=="symbol"?n:n+""}function vn(e){"@babel/helpers - typeof";return vn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},vn(e)}function Di(e,n){if(e){if(typeof e=="string")return _n(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_n(e,n):void 0}}var Qc=Hi(Lc);function Pr(e,n,r){!n||typeof r!="string"||e.filter(function(i){return!i[r]}).forEach(function(i){i[r]=Qc(n(i))})}function Jc(e,n){var r=e.nodes,i=e.links,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=o.nodeFilter,s=a===void 0?function(){return!0}:a,u=o.onLoopError,f=u===void 0?function(g){throw"Invalid DAG structure! Found cycle in node path: ".concat(g.join(" -> "),".")}:u,l={};r.forEach(function(g){return l[n(g)]={data:g,out:[],depth:-1,skip:!s(g)}}),i.forEach(function(g){var y=g.source,x=g.target,v=w(y),p=w(x);if(!l.hasOwnProperty(v))throw"Missing source node with id: ".concat(v);if(!l.hasOwnProperty(p))throw"Missing target node with id: ".concat(p);var _=l[v],k=l[p];_.out.push(k);function w(m){return vn(m)==="object"?n(m):m}});var d=[];h(Object.values(l));var c=Object.assign.apply(Object,[{}].concat(ut(Object.entries(l).filter(function(g){var y=oe(g,2),x=y[1];return!x.skip}).map(function(g){var y=oe(g,2),x=y[0],v=y[1];return ue({},x,v.depth)}))));return c;function h(g){for(var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,v=function(){var w=g[p];if(y.indexOf(w)!==-1){var m=[].concat(ut(y.slice(y.indexOf(w))),[w]).map(function(A){return n(A.data)});return d.some(function(A){return A.length===m.length&&A.every(function(S,T){return S===m[T]})})||(d.push(m),f(m)),1}x>w.depth&&(w.depth=x,h(w.out,[].concat(ut(y),[w]),x+(w.skip?0:1)))},p=0,_=g.length;p<_;p++)v()}}var th=2,J=function(n,r){return r.onNeedsRedraw&&r.onNeedsRedraw()},Or=function(n,r){if(!r.isShadow){var i=G(r.linkDirectionalParticles);r.graphData.links.forEach(function(o){var a=Math.round(Math.abs(i(o)));a?o.__photons=ut(Array(a)).map(function(){return{}}):delete o.__photons})}},Ne=Sn({props:{graphData:{default:{nodes:[],links:[]},onChange:function(n,r){r.engineRunning=!1,Or(n,r)}},dagMode:{onChange:function(n,r){!n&&(r.graphData.nodes||[]).forEach(function(i){return i.fx=i.fy=void 0})}},dagLevelDistance:{},dagNodeFilter:{default:function(n){return!0}},onDagError:{triggerUpdate:!1},nodeRelSize:{default:4,triggerUpdate:!1,onChange:J},nodeId:{default:"id"},nodeVal:{default:"val",triggerUpdate:!1,onChange:J},nodeColor:{default:"color",triggerUpdate:!1,onChange:J},nodeAutoColorBy:{},nodeCanvasObject:{triggerUpdate:!1,onChange:J},nodeCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:J},nodeVisibility:{default:!0,triggerUpdate:!1,onChange:J},linkSource:{default:"source"},linkTarget:{default:"target"},linkVisibility:{default:!0,triggerUpdate:!1,onChange:J},linkColor:{default:"color",triggerUpdate:!1,onChange:J},linkAutoColorBy:{},linkLineDash:{triggerUpdate:!1,onChange:J},linkWidth:{default:1,triggerUpdate:!1,onChange:J},linkCurvature:{default:0,triggerUpdate:!1,onChange:J},linkCanvasObject:{triggerUpdate:!1,onChange:J},linkCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:J},linkDirectionalArrowLength:{default:0,triggerUpdate:!1,onChange:J},linkDirectionalArrowColor:{triggerUpdate:!1,onChange:J},linkDirectionalArrowRelPos:{default:.5,triggerUpdate:!1,onChange:J},linkDirectionalParticles:{default:0,triggerUpdate:!1,onChange:Or},linkDirectionalParticleSpeed:{default:.01,triggerUpdate:!1},linkDirectionalParticleOffset:{default:0,triggerUpdate:!1},linkDirectionalParticleWidth:{default:4,triggerUpdate:!1},linkDirectionalParticleColor:{triggerUpdate:!1},linkDirectionalParticleCanvasObject:{triggerUpdate:!1},globalScale:{default:1,triggerUpdate:!1},d3AlphaMin:{default:0,triggerUpdate:!1},d3AlphaDecay:{default:.0228,triggerUpdate:!1,onChange:function(n,r){r.forceLayout.alphaDecay(n)}},d3AlphaTarget:{default:0,triggerUpdate:!1,onChange:function(n,r){r.forceLayout.alphaTarget(n)}},d3VelocityDecay:{default:.4,triggerUpdate:!1,onChange:function(n,r){r.forceLayout.velocityDecay(n)}},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},onNeedsRedraw:{triggerUpdate:!1},isShadow:{default:!1,triggerUpdate:!1}},methods:{d3Force:function(n,r,i){return i===void 0?n.forceLayout.force(r):(n.forceLayout.force(r,i),this)},d3ReheatSimulation:function(n){return n.forceLayout.alpha(1),this.resetCountdown(),this},resetCountdown:function(n){return n.cntTicks=0,n.startTickTime=new Date,n.engineRunning=!0,this},isEngineRunning:function(n){return!!n.engineRunning},tickFrame:function(n){return!n.isShadow&&r(),o(),!n.isShadow&&a(),!n.isShadow&&s(),i(),this;function r(){n.engineRunning&&(++n.cntTicks>n.cooldownTicks||new Date-n.startTickTime>n.cooldownTime||n.d3AlphaMin>0&&n.forceLayout.alpha()<n.d3AlphaMin?(n.engineRunning=!1,n.onEngineStop()):(n.forceLayout.tick(),n.onEngineTick()))}function i(){var u=G(n.nodeVisibility),f=G(n.nodeVal),l=G(n.nodeColor),d=G(n.nodeCanvasObjectMode),c=n.ctx,h=n.isShadow/n.globalScale,g=n.graphData.nodes.filter(u);c.save(),g.forEach(function(y){var x=d(y);if(n.nodeCanvasObject&&(x==="before"||x==="replace")&&(n.nodeCanvasObject(y,c,n.globalScale),x==="replace")){c.restore();return}var v=Math.sqrt(Math.max(0,f(y)||1))*n.nodeRelSize+h;c.beginPath(),c.arc(y.x,y.y,v,0,2*Math.PI,!1),c.fillStyle=l(y)||"rgba(31, 120, 180, 0.92)",c.fill(),n.nodeCanvasObject&&x==="after"&&n.nodeCanvasObject(y,n.ctx,n.globalScale)}),c.restore()}function o(){var u=G(n.linkVisibility),f=G(n.linkColor),l=G(n.linkWidth),d=G(n.linkLineDash),c=G(n.linkCurvature),h=G(n.linkCanvasObjectMode),g=n.ctx,y=n.isShadow*2,x=n.graphData.links.filter(u);x.forEach(A);var v=[],p=[],_=x;if(n.linkCanvasObject){var k=[],w=[];x.forEach(function(S){return({before:v,after:p,replace:k}[h(S)]||w).push(S)}),_=[].concat(ut(v),p,w),v=v.concat(k)}g.save(),v.forEach(function(S){return n.linkCanvasObject(S,g,n.globalScale)}),g.restore();var m=Fc(_,[f,l,d]);g.save(),Object.entries(m).forEach(function(S){var T=oe(S,2),z=T[0],P=T[1],N=!z||z==="undefined"?"rgba(0,0,0,0.15)":z;Object.entries(P).forEach(function(I){var U=oe(I,2),C=U[0],E=U[1],M=(C||1)/n.globalScale+y;Object.entries(E).forEach(function(R){var D=oe(R,2);D[0];var $=D[1],F=d($[0]);g.beginPath(),$.forEach(function(L){var q=L.source,K=L.target;if(!(!q||!K||!q.hasOwnProperty("x")||!K.hasOwnProperty("x"))){g.moveTo(q.x,q.y);var Z=L.__controlPoints;Z?g[Z.length===2?"quadraticCurveTo":"bezierCurveTo"].apply(g,ut(Z).concat([K.x,K.y])):g.lineTo(K.x,K.y)}}),g.strokeStyle=N,g.lineWidth=M,g.setLineDash(F||[]),g.stroke()})})}),g.restore(),g.save(),p.forEach(function(S){return n.linkCanvasObject(S,g,n.globalScale)}),g.restore();function A(S){var T=c(S);if(!T){S.__controlPoints=null;return}var z=S.source,P=S.target;if(!(!z||!P||!z.hasOwnProperty("x")||!P.hasOwnProperty("x"))){var N=Math.sqrt(Math.pow(P.x-z.x,2)+Math.pow(P.y-z.y,2));if(N>0){var I=Math.atan2(P.y-z.y,P.x-z.x),U=N*T,C={x:(z.x+P.x)/2+U*Math.cos(I-Math.PI/2),y:(z.y+P.y)/2+U*Math.sin(I-Math.PI/2)};S.__controlPoints=[C.x,C.y]}else{var E=T*70;S.__controlPoints=[P.x,P.y-E,P.x+E,P.y]}}}}function a(){var u=1.6,f=.2,l=G(n.linkDirectionalArrowLength),d=G(n.linkDirectionalArrowRelPos),c=G(n.linkVisibility),h=G(n.linkDirectionalArrowColor||n.linkColor),g=G(n.nodeVal),y=n.ctx;y.save(),n.graphData.links.filter(c).forEach(function(x){var v=l(x);if(!(!v||v<0)){var p=x.source,_=x.target;if(!(!p||!_||!p.hasOwnProperty("x")||!_.hasOwnProperty("x"))){var k=Math.sqrt(Math.max(0,g(p)||1))*n.nodeRelSize,w=Math.sqrt(Math.max(0,g(_)||1))*n.nodeRelSize,m=Math.min(1,Math.max(0,d(x))),A=h(x)||"rgba(0,0,0,0.28)",S=v/u/2,T=x.__controlPoints&&Tr(W,[p.x,p.y].concat(ut(x.__controlPoints),[_.x,_.y])),z=T?function(M){return T.get(M)}:function(M){return{x:p.x+(_.x-p.x)*M||0,y:p.y+(_.y-p.y)*M||0}},P=T?T.length():Math.sqrt(Math.pow(_.x-p.x,2)+Math.pow(_.y-p.y,2)),N=k+v+(P-k-w-v)*m,I=z(N/P),U=z((N-v)/P),C=z((N-v*(1-f))/P),E=Math.atan2(I.y-U.y,I.x-U.x)-Math.PI/2;y.beginPath(),y.moveTo(I.x,I.y),y.lineTo(U.x+S*Math.cos(E),U.y+S*Math.sin(E)),y.lineTo(C.x,C.y),y.lineTo(U.x-S*Math.cos(E),U.y-S*Math.sin(E)),y.fillStyle=A,y.fill()}}}),y.restore()}function s(){var u=G(n.linkDirectionalParticles),f=G(n.linkDirectionalParticleSpeed),l=G(n.linkDirectionalParticleOffset),d=G(n.linkDirectionalParticleWidth),c=G(n.linkVisibility),h=G(n.linkDirectionalParticleColor||n.linkColor),g=n.ctx;g.save(),n.graphData.links.filter(c).forEach(function(y){var x=u(y);if(!(!y.hasOwnProperty("__photons")||!y.__photons.length)){var v=y.source,p=y.target;if(!(!v||!p||!v.hasOwnProperty("x")||!p.hasOwnProperty("x"))){var _=f(y),k=Math.abs(l(y)),w=y.__photons||[],m=Math.max(0,d(y)/2)/Math.sqrt(n.globalScale),A=h(y)||"rgba(0,0,0,0.28)";g.fillStyle=A;var S=y.__controlPoints?Tr(W,[v.x,v.y].concat(ut(y.__controlPoints),[p.x,p.y])):null,T=0,z=!1;w.forEach(function(P){var N=!!P.__singleHop;if(P.hasOwnProperty("__progressRatio")||(P.__progressRatio=N?_<0?1:0:(T+k)/x),!N&&T++,P.__progressRatio+=_,P.__progressRatio>=1||P.__progressRatio<0)if(!N)P.__progressRatio=P.__progressRatio%1,P.__progressRatio<0&&P.__progressRatio++;else{z=!0;return}var I=P.__progressRatio,U=S?S.get(I):{x:v.x+(p.x-v.x)*I||0,y:v.y+(p.y-v.y)*I||0};n.linkDirectionalParticleCanvasObject?n.linkDirectionalParticleCanvasObject(U.x,U.y,y,g,n.globalScale):(g.beginPath(),g.arc(U.x,U.y,m,0,2*Math.PI,!1),g.fill())}),z&&(y.__photons=y.__photons.filter(function(P){return!P.__singleHop||P.__progressRatio<=1&&P.__progressRatio>=0}))}}}),g.restore()}},emitParticle:function(n,r){return r&&(!r.__photons&&(r.__photons=[]),r.__photons.push({__singleHop:!0})),this}},stateInit:function(){return{forceLayout:_c().force("link",lc()).force("charge",vc()).force("center",cf()).force("dagRadial",null).stop(),engineRunning:!1}},init:function(n,r){r.ctx=n},update:function(n,r){n.engineRunning=!1,n.onUpdate(),n.nodeAutoColorBy!==null&&Pr(n.graphData.nodes,G(n.nodeAutoColorBy),n.nodeColor),n.linkAutoColorBy!==null&&Pr(n.graphData.links,G(n.linkAutoColorBy),n.linkColor),n.graphData.links.forEach(function(h){h.source=h[n.linkSource],h.target=h[n.linkTarget]}),n.forceLayout.stop().alpha(1).nodes(n.graphData.nodes);var i=n.forceLayout.force("link");i&&i.id(function(h){return h[n.nodeId]}).links(n.graphData.links);var o=n.dagMode&&Jc(n.graphData,function(h){return h[n.nodeId]},{nodeFilter:n.dagNodeFilter,onLoopError:n.onDagError||void 0}),a=Math.max.apply(Math,ut(Object.values(o||[]))),s=n.dagLevelDistance||n.graphData.nodes.length/(a||1)*th*(["radialin","radialout"].indexOf(n.dagMode)!==-1?.7:1);if(["lr","rl","td","bu"].includes(r.dagMode)){var u=["lr","rl"].includes(r.dagMode)?"fx":"fy";n.graphData.nodes.filter(n.dagNodeFilter).forEach(function(h){return delete h[u]})}if(["lr","rl","td","bu"].includes(n.dagMode)){var f=["rl","bu"].includes(n.dagMode),l=function(g){return(o[g[n.nodeId]]-a/2)*s*(f?-1:1)},d=["lr","rl"].includes(n.dagMode)?"fx":"fy";n.graphData.nodes.filter(n.dagNodeFilter).forEach(function(h){return h[d]=l(h)})}n.forceLayout.force("dagRadial",["radialin","radialout"].indexOf(n.dagMode)!==-1?mc(function(h){var g=o[h[n.nodeId]]||-1;return(n.dagMode==="radialin"?a-g:g)*s}).strength(function(h){return n.dagNodeFilter(h)?1:0}):null);for(var c=0;c<n.warmupTicks&&!(n.d3AlphaMin>0&&n.forceLayout.alpha()<n.d3AlphaMin);c++)n.forceLayout.tick();this.resetCountdown(),n.onFinishUpdate()}});function ji(e,n){var r=e instanceof Array?e:[e],i=new n;return i._destructor&&i._destructor(),{linkProp:function(a){return{default:i[a](),onChange:function(u,f){r.forEach(function(l){return f[l][a](u)})},triggerUpdate:!1}},linkMethod:function(a){return function(s){for(var u=arguments.length,f=new Array(u>1?u-1:0),l=1;l<u;l++)f[l-1]=arguments[l];var d=[];return r.forEach(function(c){var h=s[c],g=h[a].apply(h,f);g!==h&&d.push(g)}),d.length?d[0]:this}}}}var eh=800,nh=4,rh=5,$i=ji("forceGraph",Ne),ih=ji(["forceGraph","shadowGraph"],Ne),oh=Object.assign.apply(Object,ut(["nodeColor","nodeAutoColorBy","nodeCanvasObject","nodeCanvasObjectMode","linkColor","linkAutoColorBy","linkLineDash","linkWidth","linkCanvasObject","linkCanvasObjectMode","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowRelPos","linkDirectionalParticles","linkDirectionalParticleSpeed","linkDirectionalParticleOffset","linkDirectionalParticleWidth","linkDirectionalParticleColor","linkDirectionalParticleCanvasObject","dagMode","dagLevelDistance","dagNodeFilter","onDagError","d3AlphaMin","d3AlphaDecay","d3VelocityDecay","warmupTicks","cooldownTicks","cooldownTime","onEngineTick","onEngineStop"].map(function(e){return ue({},e,$i.linkProp(e))})).concat(ut(["nodeRelSize","nodeId","nodeVal","nodeVisibility","linkSource","linkTarget","linkVisibility","linkCurvature"].map(function(e){return ue({},e,ih.linkProp(e))})))),ah=Object.assign.apply(Object,ut(["d3Force","d3ReheatSimulation","emitParticle"].map(function(e){return ue({},e,$i.linkMethod(e))})));function Ze(e){if(e.canvas){var n=e.canvas.width,r=e.canvas.height;n===300&&r===150&&(n=r=0);var i=window.devicePixelRatio;n/=i,r/=i,[e.canvas,e.shadowCanvas].forEach(function(a){a.style.width="".concat(e.width,"px"),a.style.height="".concat(e.height,"px"),a.width=e.width*i,a.height=e.height*i,!n&&!r&&a.getContext("2d").scale(i,i)});var o=pt(e.canvas).k;e.zoom.translateBy(e.zoom.__baseElem,(e.width-n)/2/o,(e.height-r)/2/o),e.needsRedraw=!0}}function Fi(e){var n=window.devicePixelRatio;e.setTransform(n,0,0,n,0,0)}function Er(e,n,r){e.save(),Fi(e),e.clearRect(0,0,n,r),e.restore()}var sh=Sn({props:$t({width:{default:window.innerWidth,onChange:function(n,r){return Ze(r)},triggerUpdate:!1},height:{default:window.innerHeight,onChange:function(n,r){return Ze(r)},triggerUpdate:!1},graphData:{default:{nodes:[],links:[]},onChange:function(n,r){[n.nodes,n.links].every(function(o){return(o||[]).every(function(a){return!a.hasOwnProperty("__indexColor")})})&&r.colorTracker.reset(),[{type:"Node",objs:n.nodes},{type:"Link",objs:n.links}].forEach(i),r.forceGraph.graphData(n),r.shadowGraph.graphData(n);function i(o){var a=o.type,s=o.objs;s.filter(function(u){if(!u.hasOwnProperty("__indexColor"))return!0;var f=r.colorTracker.lookup(u.__indexColor);return!f||!f.hasOwnProperty("d")||f.d!==u}).forEach(function(u){u.__indexColor=r.colorTracker.register({type:a,d:u})})}},triggerUpdate:!1},backgroundColor:{onChange:function(n,r){r.canvas&&n&&(r.canvas.style.background=n)},triggerUpdate:!1},nodeLabel:{default:"name",triggerUpdate:!1},nodePointerAreaPaint:{onChange:function(n,r){r.shadowGraph.nodeCanvasObject(n?function(i,o,a){return n(i,i.__indexColor,o,a)}:null),r.flushShadowCanvas&&r.flushShadowCanvas()},triggerUpdate:!1},linkPointerAreaPaint:{onChange:function(n,r){r.shadowGraph.linkCanvasObject(n?function(i,o,a){return n(i,i.__indexColor,o,a)}:null),r.flushShadowCanvas&&r.flushShadowCanvas()},triggerUpdate:!1},linkLabel:{default:"name",triggerUpdate:!1},linkHoverPrecision:{default:4,triggerUpdate:!1},minZoom:{default:.01,onChange:function(n,r){r.zoom.scaleExtent([n,r.zoom.scaleExtent()[1]])},triggerUpdate:!1},maxZoom:{default:1e3,onChange:function(n,r){r.zoom.scaleExtent([r.zoom.scaleExtent()[0],n])},triggerUpdate:!1},enableNodeDrag:{default:!0,triggerUpdate:!1},enableZoomInteraction:{default:!0,triggerUpdate:!1},enablePanInteraction:{default:!0,triggerUpdate:!1},enableZoomPanInteraction:{default:!0,triggerUpdate:!1},enablePointerInteraction:{default:!0,onChange:function(n,r){r.hoverObj=null},triggerUpdate:!1},autoPauseRedraw:{default:!0,triggerUpdate:!1},onNodeDrag:{default:function(){},triggerUpdate:!1},onNodeDragEnd:{default:function(){},triggerUpdate:!1},onNodeClick:{triggerUpdate:!1},onNodeRightClick:{triggerUpdate:!1},onNodeHover:{triggerUpdate:!1},onLinkClick:{triggerUpdate:!1},onLinkRightClick:{triggerUpdate:!1},onLinkHover:{triggerUpdate:!1},onBackgroundClick:{triggerUpdate:!1},onBackgroundRightClick:{triggerUpdate:!1},showPointerCursor:{default:!0,triggerUpdate:!1},onZoom:{triggerUpdate:!1},onZoomEnd:{triggerUpdate:!1},onRenderFramePre:{triggerUpdate:!1},onRenderFramePost:{triggerUpdate:!1}},oh),aliases:{stopAnimation:"pauseAnimation"},methods:$t({graph2ScreenCoords:function(n,r,i){var o=pt(n.canvas);return{x:r*o.k+o.x,y:i*o.k+o.y}},screen2GraphCoords:function(n,r,i){var o=pt(n.canvas);return{x:(r-o.x)/o.k,y:(i-o.y)/o.k}},centerAt:function(n,r,i,o){if(!n.canvas)return null;if(r!==void 0||i!==void 0){var a=Object.assign({},r!==void 0?{x:r}:{},i!==void 0?{y:i}:{});return o?n.tweenGroup.add(new er(s()).to(a,o).easing(It.Quadratic.Out).onUpdate(u).onComplete(function(){n.tweenGroup.remove(this)}).start()):u(a),this}return s();function s(){var f=pt(n.canvas);return{x:(n.width/2-f.x)/f.k,y:(n.height/2-f.y)/f.k}}function u(f){var l=f.x,d=f.y;n.zoom.translateTo(n.zoom.__baseElem,l===void 0?s().x:l,d===void 0?s().y:d),n.needsRedraw=!0}},zoom:function(n,r,i){if(!n.canvas)return null;if(r!==void 0)return i?n.tweenGroup.add(new er({k:o()}).to({k:r},i).easing(It.Quadratic.Out).onUpdate(function(s){var u=s.k;return a(u)}).onComplete(function(){n.tweenGroup.remove(this)}).start()):a(r),this;return o();function o(){return pt(n.canvas).k}function a(s){n.zoom.scaleTo(n.zoom.__baseElem,s),n.needsRedraw=!0}},zoomToFit:function(n){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:10,o=arguments.length,a=new Array(o>3?o-3:0),s=3;s<o;s++)a[s-3]=arguments[s];var u=this.getGraphBbox.apply(this,a);if(u){var f={x:(u.x[0]+u.x[1])/2,y:(u.y[0]+u.y[1])/2},l=Math.max(1e-12,Math.min(1e12,(n.width-i*2)/(u.x[1]-u.x[0]),(n.height-i*2)/(u.y[1]-u.y[0])));this.centerAt(f.x,f.y,r),this.zoom(l,r)}return this},getGraphBbox:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){return!0},i=G(n.nodeVal),o=function(u){return Math.sqrt(Math.max(0,i(u)||1))*n.nodeRelSize},a=n.graphData.nodes.filter(r).map(function(s){return{x:s.x,y:s.y,r:o(s)}});return a.length?{x:[$n(a,function(s){return s.x-s.r}),Fn(a,function(s){return s.x+s.r})],y:[$n(a,function(s){return s.y-s.r}),Fn(a,function(s){return s.y+s.r})]}:null},pauseAnimation:function(n){return n.animationFrameRequestId&&(cancelAnimationFrame(n.animationFrameRequestId),n.animationFrameRequestId=null),this},resumeAnimation:function(n){return n.animationFrameRequestId||this._animationCycle(),this},_destructor:function(){this.pauseAnimation(),this.graphData({nodes:[],links:[]})}},ah),stateInit:function(){return{lastSetZoom:1,zoom:xu(),forceGraph:new Ne,shadowGraph:new Ne().cooldownTicks(0).nodeColor("__indexColor").linkColor("__indexColor").isShadow(!0),colorTracker:new Ll,tweenGroup:new ui}},init:function(n,r){var i=this;n.innerHTML="";var o=document.createElement("div");o.classList.add("force-graph-container"),o.style.position="relative",n.appendChild(o),r.canvas=document.createElement("canvas"),r.backgroundColor&&(r.canvas.style.background=r.backgroundColor),o.appendChild(r.canvas),r.shadowCanvas=document.createElement("canvas");var a=r.canvas.getContext("2d"),s=r.shadowCanvas.getContext("2d",{willReadFrequently:!0}),u={x:-1e12,y:-1e12},f=function(){var c=null,h=window.devicePixelRatio,g=u.x>0&&u.y>0?s.getImageData(u.x*h,u.y*h,1,1):null;return g&&(c=r.colorTracker.lookup(g.data)),c};st(r.canvas).call(rs().subject(function(){if(!r.enableNodeDrag)return null;var d=f();return d&&d.type==="Node"?d.d:null}).on("start",function(d){var c=d.subject;c.__initialDragPos={x:c.x,y:c.y,fx:c.fx,fy:c.fy},d.active||(c.fx=c.x,c.fy=c.y),r.canvas.classList.add("grabbable")}).on("drag",function(d){var c=d.subject,h=c.__initialDragPos,g=d,y=pt(r.canvas).k,x={x:h.x+(g.x-h.x)/y-c.x,y:h.y+(g.y-h.y)/y-c.y};["x","y"].forEach(function(v){return c["f".concat(v)]=c[v]=h[v]+(g[v]-h[v])/y}),!(!c.__dragged&&rh>=Math.sqrt(Xi(["x","y"].map(function(v){return Math.pow(d[v]-h[v],2)}))))&&(r.forceGraph.d3AlphaTarget(.3).resetCountdown(),r.isPointerDragging=!0,c.__dragged=!0,r.onNodeDrag(c,x))}).on("end",function(d){var c=d.subject,h=c.__initialDragPos,g={x:c.x-h.x,y:c.y-h.y};h.fx===void 0&&(c.fx=void 0),h.fy===void 0&&(c.fy=void 0),delete c.__initialDragPos,r.forceGraph.d3AlphaTarget()&&r.forceGraph.d3AlphaTarget(0).resetCountdown(),r.canvas.classList.remove("grabbable"),r.isPointerDragging=!1,c.__dragged&&(delete c.__dragged,r.onNodeDragEnd(c,g))})),r.zoom(r.zoom.__baseElem=st(r.canvas)),r.zoom.__baseElem.on("dblclick.zoom",null),r.zoom.filter(function(d){return!d.button&&r.enableZoomPanInteraction&&(d.type!=="wheel"||G(r.enableZoomInteraction)(d))&&(d.type==="wheel"||G(r.enablePanInteraction)(d))}).on("zoom",function(d){var c=d.transform;[a,s].forEach(function(h){Fi(h),h.translate(c.x,c.y),h.scale(c.k,c.k)}),r.isPointerDragging=!0,r.onZoom&&r.onZoom($t($t({},c),i.centerAt())),r.needsRedraw=!0}).on("end",function(d){r.isPointerDragging=!1,r.onZoomEnd&&r.onZoomEnd($t($t({},d.transform),i.centerAt()))}),Ze(r),r.forceGraph.onNeedsRedraw(function(){return r.needsRedraw=!0}).onFinishUpdate(function(){pt(r.canvas).k===r.lastSetZoom&&r.graphData.nodes.length&&(r.zoom.scaleTo(r.zoom.__baseElem,r.lastSetZoom=nh/Math.cbrt(r.graphData.nodes.length)),r.needsRedraw=!0)}),r.tooltip=new ff(o),["pointermove","pointerdown"].forEach(function(d){return o.addEventListener(d,function(c){d==="pointerdown"&&(r.isPointerPressed=!0,r.pointerDownEvent=c),!r.isPointerDragging&&c.type==="pointermove"&&r.onBackgroundClick&&(c.pressure>0||r.isPointerPressed)&&(c.pointerType==="mouse"||c.movementX===void 0||[c.movementX,c.movementY].some(function(y){return Math.abs(y)>1}))&&(r.isPointerDragging=!0);var h=g(o);u.x=c.pageX-h.left,u.y=c.pageY-h.top;function g(y){var x=y.getBoundingClientRect(),v=window.pageXOffset||document.documentElement.scrollLeft,p=window.pageYOffset||document.documentElement.scrollTop;return{top:x.top+p,left:x.left+v}}},{passive:!0})}),o.addEventListener("pointerup",function(d){if(r.isPointerPressed){if(r.isPointerPressed=!1,r.isPointerDragging){r.isPointerDragging=!1;return}var c=[d,r.pointerDownEvent];requestAnimationFrame(function(){if(d.button===0)if(r.hoverObj){var h=r["on".concat(r.hoverObj.type,"Click")];h&&h.apply(void 0,[r.hoverObj.d].concat(c))}else r.onBackgroundClick&&r.onBackgroundClick.apply(r,c);if(d.button===2)if(r.hoverObj){var g=r["on".concat(r.hoverObj.type,"RightClick")];g&&g.apply(void 0,[r.hoverObj.d].concat(c))}else r.onBackgroundRightClick&&r.onBackgroundRightClick.apply(r,c)})}},{passive:!0}),o.addEventListener("contextmenu",function(d){return!r.onBackgroundRightClick&&!r.onNodeRightClick&&!r.onLinkRightClick?!0:(d.preventDefault(),!1)}),r.forceGraph(a),r.shadowGraph(s);var l=Xu(function(){Er(s,r.width,r.height),r.shadowGraph.linkWidth(function(c){return G(r.linkWidth)(c)+r.linkHoverPrecision});var d=pt(r.canvas);r.shadowGraph.globalScale(d.k).tickFrame()},eh);r.flushShadowCanvas=l.flush,(this._animationCycle=function d(){var c=!r.autoPauseRedraw||!!r.needsRedraw||r.forceGraph.isEngineRunning()||r.graphData.links.some(function(k){return k.__photons&&k.__photons.length});if(r.needsRedraw=!1,r.enablePointerInteraction){var h=r.isPointerDragging?null:f();if(h!==r.hoverObj){var g=r.hoverObj,y=g?g.type:null,x=h?h.type:null;if(y&&y!==x){var v=r["on".concat(y,"Hover")];v&&v(null,g.d)}if(x){var p=r["on".concat(x,"Hover")];p&&p(h.d,y===x?g.d:null)}r.tooltip.content(h&&G(r["".concat(h.type.toLowerCase(),"Label")])(h.d)||null),r.canvas.classList[(h&&r["on".concat(x,"Click")]||!h&&r.onBackgroundClick)&&G(r.showPointerCursor)(h==null?void 0:h.d)?"add":"remove"]("clickable"),r.hoverObj=h}c&&l()}if(c){Er(a,r.width,r.height);var _=pt(r.canvas).k;r.onRenderFramePre&&r.onRenderFramePre(a,_),r.forceGraph.globalScale(_).tickFrame(),r.onRenderFramePost&&r.onRenderFramePost(a,_)}r.tweenGroup.update(),r.animationFrameRequestId=requestAnimationFrame(d)})()},update:function(n){}}),Ke={exports:{}},Qe,zr;function uh(){if(zr)return Qe;zr=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Qe=e,Qe}var Je,Rr;function lh(){if(Rr)return Je;Rr=1;var e=uh();function n(){}function r(){}return r.resetWarningCache=n,Je=function(){function i(s,u,f,l,d,c){if(c!==e){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}}i.isRequired=i;function o(){return i}var a={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:o,element:i,elementType:i,instanceOf:o,node:i,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:n};return a.PropTypes=a,a},Je}var Nr;function fh(){return Nr||(Nr=1,Ke.exports=lh()()),Ke.exports}var ch=fh();const b=Gi(ch),Le={width:b.number,height:b.number,graphData:b.shape({nodes:b.arrayOf(b.object).isRequired,links:b.arrayOf(b.object).isRequired}),backgroundColor:b.string,nodeRelSize:b.number,nodeId:b.string,nodeLabel:b.oneOfType([b.string,b.func]),nodeVal:b.oneOfType([b.number,b.string,b.func]),nodeVisibility:b.oneOfType([b.bool,b.string,b.func]),nodeColor:b.oneOfType([b.string,b.func]),nodeAutoColorBy:b.oneOfType([b.string,b.func]),onNodeHover:b.func,onNodeClick:b.func,linkSource:b.string,linkTarget:b.string,linkLabel:b.oneOfType([b.string,b.func]),linkVisibility:b.oneOfType([b.bool,b.string,b.func]),linkColor:b.oneOfType([b.string,b.func]),linkAutoColorBy:b.oneOfType([b.string,b.func]),linkWidth:b.oneOfType([b.number,b.string,b.func]),linkCurvature:b.oneOfType([b.number,b.string,b.func]),linkDirectionalArrowLength:b.oneOfType([b.number,b.string,b.func]),linkDirectionalArrowColor:b.oneOfType([b.string,b.func]),linkDirectionalArrowRelPos:b.oneOfType([b.number,b.string,b.func]),linkDirectionalParticles:b.oneOfType([b.number,b.string,b.func]),linkDirectionalParticleSpeed:b.oneOfType([b.number,b.string,b.func]),linkDirectionalParticleOffset:b.oneOfType([b.number,b.string,b.func]),linkDirectionalParticleWidth:b.oneOfType([b.number,b.string,b.func]),linkDirectionalParticleColor:b.oneOfType([b.string,b.func]),onLinkHover:b.func,onLinkClick:b.func,dagMode:b.oneOf(["td","bu","lr","rl","zin","zout","radialin","radialout"]),dagLevelDistance:b.number,dagNodeFilter:b.func,onDagError:b.func,d3AlphaMin:b.number,d3AlphaDecay:b.number,d3VelocityDecay:b.number,warmupTicks:b.number,cooldownTicks:b.number,cooldownTime:b.number,onEngineTick:b.func,onEngineStop:b.func,getGraphBbox:b.func},Ui={zoomToFit:b.func,onNodeRightClick:b.func,onNodeDrag:b.func,onNodeDragEnd:b.func,onLinkRightClick:b.func,linkHoverPrecision:b.number,onBackgroundClick:b.func,onBackgroundRightClick:b.func,showPointerCursor:b.oneOfType([b.bool,b.func]),enablePointerInteraction:b.bool,enableNodeDrag:b.bool},Nn={showNavInfo:b.bool,nodeOpacity:b.number,nodeResolution:b.number,nodeThreeObject:b.oneOfType([b.object,b.string,b.func]),nodeThreeObjectExtend:b.oneOfType([b.bool,b.string,b.func]),nodePositionUpdate:b.func,linkOpacity:b.number,linkResolution:b.number,linkCurveRotation:b.oneOfType([b.number,b.string,b.func]),linkMaterial:b.oneOfType([b.object,b.string,b.func]),linkThreeObject:b.oneOfType([b.object,b.string,b.func]),linkThreeObjectExtend:b.oneOfType([b.bool,b.string,b.func]),linkPositionUpdate:b.func,linkDirectionalArrowResolution:b.number,linkDirectionalParticleResolution:b.number,linkDirectionalParticleThreeObject:b.oneOfType([b.object,b.string,b.func]),forceEngine:b.oneOf(["d3","ngraph"]),ngraphPhysics:b.object,numDimensions:b.oneOf([1,2,3])},hh=Object.assign({},Le,Ui,{linkLineDash:b.oneOfType([b.arrayOf(b.number),b.string,b.func]),nodeCanvasObjectMode:b.oneOfType([b.string,b.func]),nodeCanvasObject:b.func,nodePointerAreaPaint:b.func,linkCanvasObjectMode:b.oneOfType([b.string,b.func]),linkCanvasObject:b.func,linkPointerAreaPaint:b.func,linkDirectionalParticleCanvasObject:b.func,autoPauseRedraw:b.bool,minZoom:b.number,maxZoom:b.number,enableZoomInteraction:b.oneOfType([b.bool,b.func]),enablePanInteraction:b.oneOfType([b.bool,b.func]),onZoom:b.func,onZoomEnd:b.func,onRenderFramePre:b.func,onRenderFramePost:b.func});Object.assign({},Le,Ui,Nn,{enableNavigationControls:b.bool,controlType:b.oneOf(["trackball","orbit","fly"]),rendererConfig:b.object,extraRenderers:b.arrayOf(b.shape({render:b.func.isRequired}))});Object.assign({},Le,Nn,{nodeDesc:b.oneOfType([b.string,b.func]),linkDesc:b.oneOfType([b.string,b.func])});Object.assign({},Le,Nn,{markerAttrs:b.object,yOffset:b.number,glScale:b.number});const In=go(sh,{methodNames:["emitParticle","d3Force","d3ReheatSimulation","stopAnimation","pauseAnimation","resumeAnimation","centerAt","zoom","zoomToFit","getGraphBbox","screen2GraphCoords","graph2ScreenCoords"]});In.displayName="ForceGraph2D";In.propTypes=hh;const Kt={identity:"#00f5ff",knowledge:"#3b82f6",rules:"#d946ef",events:"#fbbf24"},Ir={identity:"Identität",knowledge:"Wissen",rules:"Regeln",events:"Ereignisse"},tn=new Set(["auto","agent","hermes"]),dh="rgba(15, 23, 42, 0.01)",ph="rgba(255, 255, 255, 0.05)",gh="rgba(99, 102, 241, 0.85)";function _h({data:e,onDelete:n}){const[r,i]=Y.useState(null),[o,a]=Y.useState(null),s=Y.useRef(null),u=Y.useRef(null),[f,l]=Y.useState({width:500,height:560});Y.useEffect(()=>{if(!s.current)return;const p=new ResizeObserver(_=>{for(let k of _)k.contentRect.width>0&&k.contentRect.height>0&&l({width:Math.floor(k.contentRect.width),height:Math.floor(k.contentRect.height)})});return p.observe(s.current),()=>p.disconnect()},[]);const d=Y.useMemo(()=>({nodes:e.nodes.map(p=>({...p})),links:e.edges.map(p=>({source:p.source,target:p.target,weight:p.weight||0}))}),[e]),c=Y.useMemo(()=>{const p={};return e.edges.forEach(_=>{p[_.source]=(p[_.source]||0)+1,p[_.target]=(p[_.target]||0)+1}),p},[e]);Y.useEffect(()=>{const p=u.current;if(!p)return;const _=p.d3Force("charge");_&&_.strength(-140);const k=p.d3Force("link");k&&k.distance(60)},[d]);const h=o||r,g=()=>{u.current&&u.current.zoomToFit(400,40)},y=r?e.nodes.find(p=>p.id===r)??null:null,x=Y.useMemo(()=>{if(!r)return[];const p=new Set;return e.edges.forEach(_=>{_.source===r&&p.add(_.target),_.target===r&&p.add(_.source)}),e.nodes.filter(_=>p.has(_.id))},[r,e]),v=Y.useMemo(()=>{if(!h)return new Set;const p=new Set;return e.edges.forEach(_=>{_.source===h&&p.add(_.target),_.target===h&&p.add(_.source)}),p},[h,e]);return e.nodes.length?H.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[1fr_300px] gap-3",children:[H.jsxs("div",{className:"relative h-[calc(100vh-13rem)] min-h-[560px] rounded-2xl border border-border/60 overflow-hidden",ref:s,style:{background:"radial-gradient(circle at center, rgba(59, 130, 246, 0.08) 0%, #030712 100%)"},children:[H.jsx(In,{ref:u,width:f.width,height:f.height,graphData:d,backgroundColor:"rgba(0,0,0,0)",nodeRelSize:4,cooldownTicks:100,onNodeClick:p=>i(p.id),onBackgroundClick:()=>i(null),onNodeHover:p=>{a(p?p.id:null),s.current&&(s.current.style.cursor=p?"pointer":"default")},linkColor:p=>{const _=typeof p.source=="object"?p.source.id:p.source,k=typeof p.target=="object"?p.target.id:p.target;return h===_||h===k?gh:h?dh:ph},linkWidth:p=>{const _=typeof p.source=="object"?p.source.id:p.source,k=typeof p.target=="object"?p.target.id:p.target;return h===_||h===k?2.2:.8},linkDirectionalParticles:p=>{const _=typeof p.source=="object"?p.source.id:p.source,k=typeof p.target=="object"?p.target.id:p.target;return h===_||h===k?4:0},linkDirectionalParticleWidth:2.2,linkDirectionalParticleSpeed:.006,nodeCanvasObject:(p,_,k)=>{const w=p.x??0,m=p.y??0,A=5.5+Math.min(c[p.id]||0,12)*.9,S=Kt[p.category]||"#64748b",T=p.id===o,z=p.id===r,P=h&&p.id!==h&&!v.has(p.id),N=P?"#1e293b":S;P||(_.shadowColor=S,_.shadowBlur=T||z?12:6),_.beginPath(),_.arc(w,m,A,0,2*Math.PI,!1),_.fillStyle=N,_.fill(),_.shadowBlur=0,(T||z)&&(_.beginPath(),_.arc(w,m,A+2,0,2*Math.PI,!1),_.strokeStyle=z?"#ffffff":"rgba(255, 255, 255, 0.7)",_.lineWidth=1.5,_.stroke());const I=p.content.length>30?p.content.slice(0,29)+"…":p.content,C=(T||z?10:9)/Math.max(.6,k);_.font=`${T||z?"bold":"500"} ${C}px "Space Grotesk", sans-serif`;const E=_.measureText(I).width,M=4/Math.max(.6,k);_.fillStyle=P?"rgba(10, 15, 25, 0.45)":"rgba(8, 12, 20, 0.85)",_.beginPath();const R=w-E/2-M,D=m+A+5/Math.max(.6,k),$=E+M*2,F=C+M*1.5,L=4/Math.max(.6,k);_.beginPath(),_.moveTo(R+L,D),_.lineTo(R+$-L,D),_.quadraticCurveTo(R+$,D,R+$,D+L),_.lineTo(R+$,D+F-L),_.quadraticCurveTo(R+$,D+F,R+$-L,D+F),_.lineTo(R+L,D+F),_.quadraticCurveTo(R,D+F,R,D+F-L),_.lineTo(R,D+L),_.quadraticCurveTo(R,D,R+L,D),_.closePath(),_.fill(),_.strokeStyle=T||z?"rgba(255, 255, 255, 0.15)":"rgba(255, 255, 255, 0.05)",_.lineWidth=.5/Math.max(.6,k),_.stroke(),_.textAlign="center",_.textBaseline="top",_.fillStyle=P?"#475569":T||z?"#ffffff":"#cbd5e1",_.fillText(I,w,m+A+6/Math.max(.6,k))}}),H.jsxs("button",{onClick:g,title:"Knoten neu anordnen",className:"absolute right-3 top-3 z-10 flex items-center gap-1.5 rounded-lg border border-border/60 bg-background/50 px-2.5 py-1.5 text-[11px] text-muted-foreground hover:text-foreground backdrop-blur-sm transition-colors cursor-pointer",children:[H.jsx(Vi,{className:"h-3.5 w-3.5"})," Zentrieren"]}),H.jsx("div",{className:"absolute left-3 bottom-3 flex flex-wrap gap-2 rounded-lg bg-background/40 px-2.5 py-1.5 backdrop-blur-sm",children:Object.entries(Ir).map(([p,_])=>H.jsxs("span",{className:"flex items-center gap-1 text-[10px] text-muted-foreground",children:[H.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:Kt[p]}}),_]},p))})]}),H.jsx("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-4 h-[calc(100vh-13rem)] min-h-[560px] overflow-y-auto scrollbar-thin",children:y?H.jsxs(H.Fragment,{children:[H.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[H.jsx("span",{className:"w-3 h-3 rounded-full",style:{background:Kt[y.category],boxShadow:`0 0 0 2px ${tn.has(y.source)?"#34d399":"#475569"}`}}),H.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",style:{color:Kt[y.category]},children:Ir[y.category]||y.category}),H.jsxs("span",{className:`ml-auto text-[10px] font-mono flex items-center gap-1 ${tn.has(y.source)?"text-emerald-400":"text-muted-foreground/70"}`,children:[tn.has(y.source)&&H.jsx(Wi,{className:"h-2.5 w-2.5"}),y.source]})]}),H.jsx("div",{className:"text-sm text-foreground leading-relaxed mb-4 break-words",children:y.content}),H.jsxs("div",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground/70 mb-2 flex items-center gap-1",children:[H.jsx(Un,{className:"h-3 w-3"})," verwandte Fakten"]}),H.jsx("div",{className:"flex flex-col gap-1.5 mb-4",children:x.length?x.map(p=>H.jsxs("button",{onClick:()=>i(p.id),className:"flex items-center gap-2 text-[11px] text-muted-foreground hover:text-foreground text-left transition-colors cursor-pointer",children:[H.jsx("span",{className:"w-1.5 h-1.5 rounded-full shrink-0",style:{background:Kt[p.category]}}),H.jsx("span",{className:"truncate",children:p.content})]},p.id)):H.jsx("span",{className:"text-[11px] text-muted-foreground/60",children:"—"})}),H.jsxs("button",{onClick:()=>{n(y.id),i(null)},className:"flex items-center gap-1.5 text-[11px] text-red-400 border border-red-500/20 rounded-lg px-2.5 py-1.5 hover:bg-red-500/5 transition-all cursor-pointer",children:[H.jsx(Bi,{className:"h-3.5 w-3.5"})," vergessen"]})]}):H.jsxs("div",{className:"h-full flex flex-col items-center justify-center text-center text-muted-foreground/70 gap-2 pt-24",children:[H.jsx(Un,{className:"h-6 w-6"}),H.jsx("div",{className:"text-xs max-w-[180px] leading-relaxed",children:"Auf einen Knoten klicken, um den Fakt und seine semantischen Nachbarn zu sehen. Hover hebt das Netz hervor."})]})})]}):H.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center",children:"Noch keine Fakten — der Graph füllt sich, sobald Hermes lernt oder du Einträge anlegst."})}export{_h as GraphView};
|