@query-key-gen/used-viewer
Version:
A visual debug tool for inspecting where your `globalQueryKeys` are used in the app. Works alongside [`@query-key-gen/used-generator`](https://www.npmjs.com/package/@query-key-gen/used-generator).
1 lines • 178 kB
JavaScript
(function(pe,S){typeof exports=="object"&&typeof module<"u"?S(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],S):(pe=typeof globalThis<"u"?globalThis:pe||self,S(pe.named={},pe.jsxRuntime,pe.require$$0,pe.reactDom))})(this,function(pe,S,I,as){"use strict";function oe(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,o;n<e.length;n++)(o=oe(e[n]))!==""&&(t+=(t&&" ")+o);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var cs={value:()=>{}};function wt(){for(var e=0,t=arguments.length,n={},o;e<t;++e){if(!(o=arguments[e]+"")||o in n||/[\s.]/.test(o))throw new Error("illegal type: "+o);n[o]=[]}return new xt(n)}function xt(e){this._=e}function ls(e,t){return e.trim().split(/^|\s+/).map(function(n){var o="",r=n.indexOf(".");if(r>=0&&(o=n.slice(r+1),n=n.slice(0,r)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}xt.prototype=wt.prototype={constructor:xt,on:function(e,t){var n=this._,o=ls(e+"",n),r,i=-1,s=o.length;if(arguments.length<2){for(;++i<s;)if((r=(e=o[i]).type)&&(r=us(n[r],e.name)))return r;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++i<s;)if(r=(e=o[i]).type)n[r]=no(n[r],e.name,t);else if(t==null)for(r in n)n[r]=no(n[r],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new xt(e)},call:function(e,t){if((r=arguments.length-2)>0)for(var n=new Array(r),o=0,r,i;o<r;++o)n[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],o=0,r=i.length;o<r;++o)i[o].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var o=this._[e],r=0,i=o.length;r<i;++r)o[r].value.apply(t,n)}};function us(e,t){for(var n=0,o=e.length,r;n<o;++n)if((r=e[n]).name===t)return r.value}function no(e,t,n){for(var o=0,r=e.length;o<r;++o)if(e[o].name===t){e[o]=cs,e=e.slice(0,o).concat(e.slice(o+1));break}return n!=null&&e.push({name:t,value:n}),e}var sn="http://www.w3.org/1999/xhtml";const oo={svg:"http://www.w3.org/2000/svg",xhtml:sn,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function vt(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),oo.hasOwnProperty(t)?{space:oo[t],local:e}:e}function ds(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===sn&&t.documentElement.namespaceURI===sn?t.createElement(e):t.createElementNS(n,e)}}function fs(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function ro(e){var t=vt(e);return(t.local?fs:ds)(t)}function hs(){}function an(e){return e==null?hs:function(){return this.querySelector(e)}}function gs(e){typeof e!="function"&&(e=an(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var i=t[r],s=i.length,a=o[r]=new Array(s),c,l,d=0;d<s;++d)(c=i[d])&&(l=e.call(c,c.__data__,d,i))&&("__data__"in c&&(l.__data__=c.__data__),a[d]=l);return new se(o,this._parents)}function ps(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function ms(){return[]}function io(e){return e==null?ms:function(){return this.querySelectorAll(e)}}function ys(e){return function(){return ps(e.apply(this,arguments))}}function ws(e){typeof e=="function"?e=ys(e):e=io(e);for(var t=this._groups,n=t.length,o=[],r=[],i=0;i<n;++i)for(var s=t[i],a=s.length,c,l=0;l<a;++l)(c=s[l])&&(o.push(e.call(c,c.__data__,l,s)),r.push(c));return new se(o,r)}function so(e){return function(){return this.matches(e)}}function ao(e){return function(t){return t.matches(e)}}var xs=Array.prototype.find;function vs(e){return function(){return xs.call(this.children,e)}}function bs(){return this.firstElementChild}function _s(e){return this.select(e==null?bs:vs(typeof e=="function"?e:ao(e)))}var Ss=Array.prototype.filter;function Es(){return Array.from(this.children)}function Cs(e){return function(){return Ss.call(this.children,e)}}function Ns(e){return this.selectAll(e==null?Es:Cs(typeof e=="function"?e:ao(e)))}function Ms(e){typeof e!="function"&&(e=so(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var i=t[r],s=i.length,a=o[r]=[],c,l=0;l<s;++l)(c=i[l])&&e.call(c,c.__data__,l,i)&&a.push(c);return new se(o,this._parents)}function co(e){return new Array(e.length)}function ks(){return new se(this._enter||this._groups.map(co),this._parents)}function bt(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}bt.prototype={constructor:bt,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Is(e){return function(){return e}}function Ps(e,t,n,o,r,i){for(var s=0,a,c=t.length,l=i.length;s<l;++s)(a=t[s])?(a.__data__=i[s],o[s]=a):n[s]=new bt(e,i[s]);for(;s<c;++s)(a=t[s])&&(r[s]=a)}function As(e,t,n,o,r,i,s){var a,c,l=new Map,d=t.length,h=i.length,u=new Array(d),f;for(a=0;a<d;++a)(c=t[a])&&(u[a]=f=s.call(c,c.__data__,a,t)+"",l.has(f)?r[a]=c:l.set(f,c));for(a=0;a<h;++a)f=s.call(e,i[a],a,i)+"",(c=l.get(f))?(o[a]=c,c.__data__=i[a],l.delete(f)):n[a]=new bt(e,i[a]);for(a=0;a<d;++a)(c=t[a])&&l.get(u[a])===c&&(r[a]=c)}function Ds(e){return e.__data__}function Ts(e,t){if(!arguments.length)return Array.from(this,Ds);var n=t?As:Ps,o=this._parents,r=this._groups;typeof e!="function"&&(e=Is(e));for(var i=r.length,s=new Array(i),a=new Array(i),c=new Array(i),l=0;l<i;++l){var d=o[l],h=r[l],u=h.length,f=Os(e.call(d,d&&d.__data__,l,o)),g=f.length,m=a[l]=new Array(g),v=s[l]=new Array(g),x=c[l]=new Array(u);n(d,h,m,v,x,f,t);for(var b=0,p=0,w,M;b<g;++b)if(w=m[b]){for(b>=p&&(p=b+1);!(M=v[p])&&++p<g;);w._next=M||null}}return s=new se(s,o),s._enter=a,s._exit=c,s}function Os(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function zs(){return new se(this._exit||this._groups.map(co),this._parents)}function Hs(e,t,n){var o=this.enter(),r=this,i=this.exit();return typeof e=="function"?(o=e(o),o&&(o=o.selection())):o=o.append(e+""),t!=null&&(r=t(r),r&&(r=r.selection())),n==null?i.remove():n(i),o&&r?o.merge(r).order():r}function Ls(e){for(var t=e.selection?e.selection():e,n=this._groups,o=t._groups,r=n.length,i=o.length,s=Math.min(r,i),a=new Array(r),c=0;c<s;++c)for(var l=n[c],d=o[c],h=l.length,u=a[c]=new Array(h),f,g=0;g<h;++g)(f=l[g]||d[g])&&(u[g]=f);for(;c<r;++c)a[c]=n[c];return new se(a,this._parents)}function Bs(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var o=e[t],r=o.length-1,i=o[r],s;--r>=0;)(s=o[r])&&(i&&s.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(s,i),i=s);return this}function Vs(e){e||(e=Fs);function t(h,u){return h&&u?e(h.__data__,u.__data__):!h-!u}for(var n=this._groups,o=n.length,r=new Array(o),i=0;i<o;++i){for(var s=n[i],a=s.length,c=r[i]=new Array(a),l,d=0;d<a;++d)(l=s[d])&&(c[d]=l);c.sort(t)}return new se(r,this._parents).order()}function Fs(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Rs(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Ys(){return Array.from(this)}function Xs(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],r=0,i=o.length;r<i;++r){var s=o[r];if(s)return s}return null}function Ws(){let e=0;for(const t of this)++e;return e}function Ks(){return!this.node()}function Zs(e){for(var t=this._groups,n=0,o=t.length;n<o;++n)for(var r=t[n],i=0,s=r.length,a;i<s;++i)(a=r[i])&&e.call(a,a.__data__,i,r);return this}function Gs(e){return function(){this.removeAttribute(e)}}function Us(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Qs(e,t){return function(){this.setAttribute(e,t)}}function $s(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Js(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function js(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function qs(e,t){var n=vt(e);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((t==null?n.local?Us:Gs:typeof t=="function"?n.local?js:Js:n.local?$s:Qs)(n,t))}function lo(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function ea(e){return function(){this.style.removeProperty(e)}}function ta(e,t,n){return function(){this.style.setProperty(e,t,n)}}function na(e,t,n){return function(){var o=t.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function oa(e,t,n){return arguments.length>1?this.each((t==null?ea:typeof t=="function"?na:ta)(e,t,n??"")):Oe(this.node(),e)}function Oe(e,t){return e.style.getPropertyValue(t)||lo(e).getComputedStyle(e,null).getPropertyValue(t)}function ra(e){return function(){delete this[e]}}function ia(e,t){return function(){this[e]=t}}function sa(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function aa(e,t){return arguments.length>1?this.each((t==null?ra:typeof t=="function"?sa:ia)(e,t)):this.node()[e]}function uo(e){return e.trim().split(/^|\s+/)}function cn(e){return e.classList||new fo(e)}function fo(e){this._node=e,this._names=uo(e.getAttribute("class")||"")}fo.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function ho(e,t){for(var n=cn(e),o=-1,r=t.length;++o<r;)n.add(t[o])}function go(e,t){for(var n=cn(e),o=-1,r=t.length;++o<r;)n.remove(t[o])}function ca(e){return function(){ho(this,e)}}function la(e){return function(){go(this,e)}}function ua(e,t){return function(){(t.apply(this,arguments)?ho:go)(this,e)}}function da(e,t){var n=uo(e+"");if(arguments.length<2){for(var o=cn(this.node()),r=-1,i=n.length;++r<i;)if(!o.contains(n[r]))return!1;return!0}return this.each((typeof t=="function"?ua:t?ca:la)(n,t))}function fa(){this.textContent=""}function ha(e){return function(){this.textContent=e}}function ga(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function pa(e){return arguments.length?this.each(e==null?fa:(typeof e=="function"?ga:ha)(e)):this.node().textContent}function ma(){this.innerHTML=""}function ya(e){return function(){this.innerHTML=e}}function wa(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function xa(e){return arguments.length?this.each(e==null?ma:(typeof e=="function"?wa:ya)(e)):this.node().innerHTML}function va(){this.nextSibling&&this.parentNode.appendChild(this)}function ba(){return this.each(va)}function _a(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Sa(){return this.each(_a)}function Ea(e){var t=typeof e=="function"?e:ro(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Ca(){return null}function Na(e,t){var n=typeof e=="function"?e:ro(e),o=t==null?Ca:typeof t=="function"?t:an(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function Ma(){var e=this.parentNode;e&&e.removeChild(this)}function ka(){return this.each(Ma)}function Ia(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Pa(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Aa(e){return this.select(e?Pa:Ia)}function Da(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Ta(e){return function(t){e.call(this,t,this.__data__)}}function Oa(e){return e.trim().split(/^|\s+/).map(function(t){var n="",o=t.indexOf(".");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{type:t,name:n}})}function za(e){return function(){var t=this.__on;if(t){for(var n=0,o=-1,r=t.length,i;n<r;++n)i=t[n],(!e.type||i.type===e.type)&&i.name===e.name?this.removeEventListener(i.type,i.listener,i.options):t[++o]=i;++o?t.length=o:delete this.__on}}}function Ha(e,t,n){return function(){var o=this.__on,r,i=Ta(t);if(o){for(var s=0,a=o.length;s<a;++s)if((r=o[s]).type===e.type&&r.name===e.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=i,r.options=n),r.value=t;return}}this.addEventListener(e.type,i,n),r={type:e.type,name:e.name,value:t,listener:i,options:n},o?o.push(r):this.__on=[r]}}function La(e,t,n){var o=Oa(e+""),r,i=o.length,s;if(arguments.length<2){var a=this.node().__on;if(a){for(var c=0,l=a.length,d;c<l;++c)for(r=0,d=a[c];r<i;++r)if((s=o[r]).type===d.type&&s.name===d.name)return d.value}return}for(a=t?Ha:za,r=0;r<i;++r)this.each(a(o[r],t,n));return this}function po(e,t,n){var o=lo(e),r=o.CustomEvent;typeof r=="function"?r=new r(t,n):(r=o.document.createEvent("Event"),n?(r.initEvent(t,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(t,!1,!1)),e.dispatchEvent(r)}function Ba(e,t){return function(){return po(this,e,t)}}function Va(e,t){return function(){return po(this,e,t.apply(this,arguments))}}function Fa(e,t){return this.each((typeof t=="function"?Va:Ba)(e,t))}function*Ra(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],r=0,i=o.length,s;r<i;++r)(s=o[r])&&(yield s)}var mo=[null];function se(e,t){this._groups=e,this._parents=t}function Ze(){return new se([[document.documentElement]],mo)}function Ya(){return this}se.prototype=Ze.prototype={constructor:se,select:gs,selectAll:ws,selectChild:_s,selectChildren:Ns,filter:Ms,data:Ts,enter:ks,exit:zs,join:Hs,merge:Ls,selection:Ya,order:Bs,sort:Vs,call:Rs,nodes:Ys,node:Xs,size:Ws,empty:Ks,each:Zs,attr:qs,style:oa,property:aa,classed:da,text:pa,html:xa,raise:ba,lower:Sa,append:Ea,insert:Na,remove:ka,clone:Aa,datum:Da,on:La,dispatch:Fa,[Symbol.iterator]:Ra};function ae(e){return typeof e=="string"?new se([[document.querySelector(e)]],[document.documentElement]):new se([[e]],mo)}function Xa(e){let t;for(;t=e.sourceEvent;)e=t;return e}function le(e,t){if(e=Xa(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var o=n.createSVGPoint();return o.x=e.clientX,o.y=e.clientY,o=o.matrixTransform(t.getScreenCTM().inverse()),[o.x,o.y]}if(t.getBoundingClientRect){var r=t.getBoundingClientRect();return[e.clientX-r.left-t.clientLeft,e.clientY-r.top-t.clientTop]}}return[e.pageX,e.pageY]}const Wa={passive:!1},Ge={capture:!0,passive:!1};function ln(e){e.stopImmediatePropagation()}function ze(e){e.preventDefault(),e.stopImmediatePropagation()}function yo(e){var t=e.document.documentElement,n=ae(e).on("dragstart.drag",ze,Ge);"onselectstart"in t?n.on("selectstart.drag",ze,Ge):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function wo(e,t){var n=e.document.documentElement,o=ae(e).on("dragstart.drag",null);t&&(o.on("click.drag",ze,Ge),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in n?o.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const _t=e=>()=>e;function un(e,{sourceEvent:t,subject:n,target:o,identifier:r,active:i,x:s,y:a,dx:c,dy:l,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:r,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:a,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:d}})}un.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Ka(e){return!e.ctrlKey&&!e.button}function Za(){return this.parentNode}function Ga(e,t){return t??{x:e.x,y:e.y}}function Ua(){return navigator.maxTouchPoints||"ontouchstart"in this}function xo(){var e=Ka,t=Za,n=Ga,o=Ua,r={},i=wt("start","drag","end"),s=0,a,c,l,d,h=0;function u(w){w.on("mousedown.drag",f).filter(o).on("touchstart.drag",v).on("touchmove.drag",x,Wa).on("touchend.drag touchcancel.drag",b).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(w,M){if(!(d||!e.call(this,w,M))){var k=p(this,t.call(this,w,M),w,M,"mouse");k&&(ae(w.view).on("mousemove.drag",g,Ge).on("mouseup.drag",m,Ge),yo(w.view),ln(w),l=!1,a=w.clientX,c=w.clientY,k("start",w))}}function g(w){if(ze(w),!l){var M=w.clientX-a,k=w.clientY-c;l=M*M+k*k>h}r.mouse("drag",w)}function m(w){ae(w.view).on("mousemove.drag mouseup.drag",null),wo(w.view,l),ze(w),r.mouse("end",w)}function v(w,M){if(e.call(this,w,M)){var k=w.changedTouches,N=t.call(this,w,M),D=k.length,T,O;for(T=0;T<D;++T)(O=p(this,N,w,M,k[T].identifier,k[T]))&&(ln(w),O("start",w,k[T]))}}function x(w){var M=w.changedTouches,k=M.length,N,D;for(N=0;N<k;++N)(D=r[M[N].identifier])&&(ze(w),D("drag",w,M[N]))}function b(w){var M=w.changedTouches,k=M.length,N,D;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),N=0;N<k;++N)(D=r[M[N].identifier])&&(ln(w),D("end",w,M[N]))}function p(w,M,k,N,D,T){var O=i.copy(),B=le(T||k,M),H,L,y;if((y=n.call(w,new un("beforestart",{sourceEvent:k,target:u,identifier:D,active:s,x:B[0],y:B[1],dx:0,dy:0,dispatch:O}),N))!=null)return H=y.x-B[0]||0,L=y.y-B[1]||0,function E(_,C,A){var P=B,z;switch(_){case"start":r[D]=E,z=s++;break;case"end":delete r[D],--s;case"drag":B=le(A||C,M),z=s;break}O.call(_,w,new un(_,{sourceEvent:C,subject:y,target:u,identifier:D,active:z,x:B[0]+H,y:B[1]+L,dx:B[0]-P[0],dy:B[1]-P[1],dispatch:O}),N)}}return u.filter=function(w){return arguments.length?(e=typeof w=="function"?w:_t(!!w),u):e},u.container=function(w){return arguments.length?(t=typeof w=="function"?w:_t(w),u):t},u.subject=function(w){return arguments.length?(n=typeof w=="function"?w:_t(w),u):n},u.touchable=function(w){return arguments.length?(o=typeof w=="function"?w:_t(!!w),u):o},u.on=function(){var w=i.on.apply(i,arguments);return w===i?u:w},u.clickDistance=function(w){return arguments.length?(h=(w=+w)*w,u):Math.sqrt(h)},u}function dn(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function vo(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function Ue(){}var Qe=.7,St=1/Qe,He="\\s*([+-]?\\d+)\\s*",$e="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",he="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Qa=/^#([0-9a-f]{3,8})$/,$a=new RegExp(`^rgb\\(${He},${He},${He}\\)$`),Ja=new RegExp(`^rgb\\(${he},${he},${he}\\)$`),ja=new RegExp(`^rgba\\(${He},${He},${He},${$e}\\)$`),qa=new RegExp(`^rgba\\(${he},${he},${he},${$e}\\)$`),ec=new RegExp(`^hsl\\(${$e},${he},${he}\\)$`),tc=new RegExp(`^hsla\\(${$e},${he},${he},${$e}\\)$`),bo={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};dn(Ue,Je,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:_o,formatHex:_o,formatHex8:nc,formatHsl:oc,formatRgb:So,toString:So});function _o(){return this.rgb().formatHex()}function nc(){return this.rgb().formatHex8()}function oc(){return ko(this).formatHsl()}function So(){return this.rgb().formatRgb()}function Je(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Qa.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Eo(t):n===3?new ie(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Et(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Et(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=$a.exec(e))?new ie(t[1],t[2],t[3],1):(t=Ja.exec(e))?new ie(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=ja.exec(e))?Et(t[1],t[2],t[3],t[4]):(t=qa.exec(e))?Et(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=ec.exec(e))?Mo(t[1],t[2]/100,t[3]/100,1):(t=tc.exec(e))?Mo(t[1],t[2]/100,t[3]/100,t[4]):bo.hasOwnProperty(e)?Eo(bo[e]):e==="transparent"?new ie(NaN,NaN,NaN,0):null}function Eo(e){return new ie(e>>16&255,e>>8&255,e&255,1)}function Et(e,t,n,o){return o<=0&&(e=t=n=NaN),new ie(e,t,n,o)}function rc(e){return e instanceof Ue||(e=Je(e)),e?(e=e.rgb(),new ie(e.r,e.g,e.b,e.opacity)):new ie}function fn(e,t,n,o){return arguments.length===1?rc(e):new ie(e,t,n,o??1)}function ie(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}dn(ie,fn,vo(Ue,{brighter(e){return e=e==null?St:Math.pow(St,e),new ie(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Qe:Math.pow(Qe,e),new ie(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ie(Me(this.r),Me(this.g),Me(this.b),Ct(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Co,formatHex:Co,formatHex8:ic,formatRgb:No,toString:No}));function Co(){return`#${ke(this.r)}${ke(this.g)}${ke(this.b)}`}function ic(){return`#${ke(this.r)}${ke(this.g)}${ke(this.b)}${ke((isNaN(this.opacity)?1:this.opacity)*255)}`}function No(){const e=Ct(this.opacity);return`${e===1?"rgb(":"rgba("}${Me(this.r)}, ${Me(this.g)}, ${Me(this.b)}${e===1?")":`, ${e})`}`}function Ct(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Me(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ke(e){return e=Me(e),(e<16?"0":"")+e.toString(16)}function Mo(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ue(e,t,n,o)}function ko(e){if(e instanceof ue)return new ue(e.h,e.s,e.l,e.opacity);if(e instanceof Ue||(e=Je(e)),!e)return new ue;if(e instanceof ue)return e;e=e.rgb();var t=e.r/255,n=e.g/255,o=e.b/255,r=Math.min(t,n,o),i=Math.max(t,n,o),s=NaN,a=i-r,c=(i+r)/2;return a?(t===i?s=(n-o)/a+(n<o)*6:n===i?s=(o-t)/a+2:s=(t-n)/a+4,a/=c<.5?i+r:2-i-r,s*=60):a=c>0&&c<1?0:s,new ue(s,a,c,e.opacity)}function sc(e,t,n,o){return arguments.length===1?ko(e):new ue(e,t,n,o??1)}function ue(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}dn(ue,sc,vo(Ue,{brighter(e){return e=e==null?St:Math.pow(St,e),new ue(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Qe:Math.pow(Qe,e),new ue(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,o=n+(n<.5?n:1-n)*t,r=2*n-o;return new ie(hn(e>=240?e-240:e+120,r,o),hn(e,r,o),hn(e<120?e+240:e-120,r,o),this.opacity)},clamp(){return new ue(Io(this.h),Nt(this.s),Nt(this.l),Ct(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Ct(this.opacity);return`${e===1?"hsl(":"hsla("}${Io(this.h)}, ${Nt(this.s)*100}%, ${Nt(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Io(e){return e=(e||0)%360,e<0?e+360:e}function Nt(e){return Math.max(0,Math.min(1,e||0))}function hn(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Po=e=>()=>e;function ac(e,t){return function(n){return e+n*t}}function cc(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(o){return Math.pow(e+o*t,n)}}function lc(e){return(e=+e)==1?Ao:function(t,n){return n-t?cc(t,n,e):Po(isNaN(t)?n:t)}}function Ao(e,t){var n=t-e;return n?ac(e,n):Po(isNaN(e)?t:e)}const Do=function e(t){var n=lc(t);function o(r,i){var s=n((r=fn(r)).r,(i=fn(i)).r),a=n(r.g,i.g),c=n(r.b,i.b),l=Ao(r.opacity,i.opacity);return function(d){return r.r=s(d),r.g=a(d),r.b=c(d),r.opacity=l(d),r+""}}return o.gamma=e,o}(1);function be(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var gn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,pn=new RegExp(gn.source,"g");function uc(e){return function(){return e}}function dc(e){return function(t){return e(t)+""}}function fc(e,t){var n=gn.lastIndex=pn.lastIndex=0,o,r,i,s=-1,a=[],c=[];for(e=e+"",t=t+"";(o=gn.exec(e))&&(r=pn.exec(t));)(i=r.index)>n&&(i=t.slice(n,i),a[s]?a[s]+=i:a[++s]=i),(o=o[0])===(r=r[0])?a[s]?a[s]+=r:a[++s]=r:(a[++s]=null,c.push({i:s,x:be(o,r)})),n=pn.lastIndex;return n<t.length&&(i=t.slice(n),a[s]?a[s]+=i:a[++s]=i),a.length<2?c[0]?dc(c[0].x):uc(t):(t=c.length,function(l){for(var d=0,h;d<t;++d)a[(h=c[d]).i]=h.x(l);return a.join("")})}var To=180/Math.PI,mn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Oo(e,t,n,o,r,i){var s,a,c;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(c=e*n+t*o)&&(n-=e*c,o-=t*c),(a=Math.sqrt(n*n+o*o))&&(n/=a,o/=a,c/=a),e*o<t*n&&(e=-e,t=-t,c=-c,s=-s),{translateX:r,translateY:i,rotate:Math.atan2(t,e)*To,skewX:Math.atan(c)*To,scaleX:s,scaleY:a}}var Mt;function hc(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?mn:Oo(t.a,t.b,t.c,t.d,t.e,t.f)}function gc(e){return e==null||(Mt||(Mt=document.createElementNS("http://www.w3.org/2000/svg","g")),Mt.setAttribute("transform",e),!(e=Mt.transform.baseVal.consolidate()))?mn:(e=e.matrix,Oo(e.a,e.b,e.c,e.d,e.e,e.f))}function zo(e,t,n,o){function r(l){return l.length?l.pop()+" ":""}function i(l,d,h,u,f,g){if(l!==h||d!==u){var m=f.push("translate(",null,t,null,n);g.push({i:m-4,x:be(l,h)},{i:m-2,x:be(d,u)})}else(h||u)&&f.push("translate("+h+t+u+n)}function s(l,d,h,u){l!==d?(l-d>180?d+=360:d-l>180&&(l+=360),u.push({i:h.push(r(h)+"rotate(",null,o)-2,x:be(l,d)})):d&&h.push(r(h)+"rotate("+d+o)}function a(l,d,h,u){l!==d?u.push({i:h.push(r(h)+"skewX(",null,o)-2,x:be(l,d)}):d&&h.push(r(h)+"skewX("+d+o)}function c(l,d,h,u,f,g){if(l!==h||d!==u){var m=f.push(r(f)+"scale(",null,",",null,")");g.push({i:m-4,x:be(l,h)},{i:m-2,x:be(d,u)})}else(h!==1||u!==1)&&f.push(r(f)+"scale("+h+","+u+")")}return function(l,d){var h=[],u=[];return l=e(l),d=e(d),i(l.translateX,l.translateY,d.translateX,d.translateY,h,u),s(l.rotate,d.rotate,h,u),a(l.skewX,d.skewX,h,u),c(l.scaleX,l.scaleY,d.scaleX,d.scaleY,h,u),l=d=null,function(f){for(var g=-1,m=u.length,v;++g<m;)h[(v=u[g]).i]=v.x(f);return h.join("")}}}var pc=zo(hc,"px, ","px)","deg)"),mc=zo(gc,", ",")",")"),yc=1e-12;function Ho(e){return((e=Math.exp(e))+1/e)/2}function wc(e){return((e=Math.exp(e))-1/e)/2}function xc(e){return((e=Math.exp(2*e))-1)/(e+1)}const vc=function e(t,n,o){function r(i,s){var a=i[0],c=i[1],l=i[2],d=s[0],h=s[1],u=s[2],f=d-a,g=h-c,m=f*f+g*g,v,x;if(m<yc)x=Math.log(u/l)/t,v=function(N){return[a+N*f,c+N*g,l*Math.exp(t*N*x)]};else{var b=Math.sqrt(m),p=(u*u-l*l+o*m)/(2*l*n*b),w=(u*u-l*l-o*m)/(2*u*n*b),M=Math.log(Math.sqrt(p*p+1)-p),k=Math.log(Math.sqrt(w*w+1)-w);x=(k-M)/t,v=function(N){var D=N*x,T=Ho(M),O=l/(n*b)*(T*xc(t*D+M)-wc(M));return[a+O*f,c+O*g,l*T/Ho(t*D+M)]}}return v.duration=x*1e3*t/Math.SQRT2,v}return r.rho=function(i){var s=Math.max(.001,+i),a=s*s,c=a*a;return e(s,a,c)},r}(Math.SQRT2,2,4);var Le=0,je=0,qe=0,Lo=1e3,kt,et,It=0,Ie=0,Pt=0,tt=typeof performance=="object"&&performance.now?performance:Date,Bo=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function yn(){return Ie||(Bo(bc),Ie=tt.now()+Pt)}function bc(){Ie=0}function At(){this._call=this._time=this._next=null}At.prototype=Vo.prototype={constructor:At,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?yn():+n)+(t==null?0:+t),!this._next&&et!==this&&(et?et._next=this:kt=this,et=this),this._call=e,this._time=n,wn()},stop:function(){this._call&&(this._call=null,this._time=1/0,wn())}};function Vo(e,t,n){var o=new At;return o.restart(e,t,n),o}function _c(){yn(),++Le;for(var e=kt,t;e;)(t=Ie-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Le}function Fo(){Ie=(It=tt.now())+Pt,Le=je=0;try{_c()}finally{Le=0,Ec(),Ie=0}}function Sc(){var e=tt.now(),t=e-It;t>Lo&&(Pt-=t,It=e)}function Ec(){for(var e,t=kt,n,o=1/0;t;)t._call?(o>t._time&&(o=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:kt=n);et=e,wn(o)}function wn(e){if(!Le){je&&(je=clearTimeout(je));var t=e-Ie;t>24?(e<1/0&&(je=setTimeout(Fo,e-tt.now()-Pt)),qe&&(qe=clearInterval(qe))):(qe||(It=tt.now(),qe=setInterval(Sc,Lo)),Le=1,Bo(Fo))}}function Ro(e,t,n){var o=new At;return t=t==null?0:+t,o.restart(r=>{o.stop(),e(r+t)},t,n),o}var Cc=wt("start","end","cancel","interrupt"),Nc=[],Yo=0,Xo=1,xn=2,Dt=3,Wo=4,vn=5,Tt=6;function Ot(e,t,n,o,r,i){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;Mc(e,n,{name:t,index:o,group:r,on:Cc,tween:Nc,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:Yo})}function bn(e,t){var n=de(e,t);if(n.state>Yo)throw new Error("too late; already scheduled");return n}function ge(e,t){var n=de(e,t);if(n.state>Dt)throw new Error("too late; already running");return n}function de(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Mc(e,t,n){var o=e.__transition,r;o[t]=n,n.timer=Vo(i,0,n.time);function i(l){n.state=Xo,n.timer.restart(s,n.delay,n.time),n.delay<=l&&s(l-n.delay)}function s(l){var d,h,u,f;if(n.state!==Xo)return c();for(d in o)if(f=o[d],f.name===n.name){if(f.state===Dt)return Ro(s);f.state===Wo?(f.state=Tt,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete o[d]):+d<t&&(f.state=Tt,f.timer.stop(),f.on.call("cancel",e,e.__data__,f.index,f.group),delete o[d])}if(Ro(function(){n.state===Dt&&(n.state=Wo,n.timer.restart(a,n.delay,n.time),a(l))}),n.state=xn,n.on.call("start",e,e.__data__,n.index,n.group),n.state===xn){for(n.state=Dt,r=new Array(u=n.tween.length),d=0,h=-1;d<u;++d)(f=n.tween[d].value.call(e,e.__data__,n.index,n.group))&&(r[++h]=f);r.length=h+1}}function a(l){for(var d=l<n.duration?n.ease.call(null,l/n.duration):(n.timer.restart(c),n.state=vn,1),h=-1,u=r.length;++h<u;)r[h].call(e,d);n.state===vn&&(n.on.call("end",e,e.__data__,n.index,n.group),c())}function c(){n.state=Tt,n.timer.stop(),delete o[t];for(var l in o)return;delete e.__transition}}function zt(e,t){var n=e.__transition,o,r,i=!0,s;if(n){t=t==null?null:t+"";for(s in n){if((o=n[s]).name!==t){i=!1;continue}r=o.state>xn&&o.state<vn,o.state=Tt,o.timer.stop(),o.on.call(r?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete n[s]}i&&delete e.__transition}}function kc(e){return this.each(function(){zt(this,e)})}function Ic(e,t){var n,o;return function(){var r=ge(this,e),i=r.tween;if(i!==n){o=n=i;for(var s=0,a=o.length;s<a;++s)if(o[s].name===t){o=o.slice(),o.splice(s,1);break}}r.tween=o}}function Pc(e,t,n){var o,r;if(typeof n!="function")throw new Error;return function(){var i=ge(this,e),s=i.tween;if(s!==o){r=(o=s).slice();for(var a={name:t,value:n},c=0,l=r.length;c<l;++c)if(r[c].name===t){r[c]=a;break}c===l&&r.push(a)}i.tween=r}}function Ac(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o=de(this.node(),n).tween,r=0,i=o.length,s;r<i;++r)if((s=o[r]).name===e)return s.value;return null}return this.each((t==null?Ic:Pc)(n,e,t))}function _n(e,t,n){var o=e._id;return e.each(function(){var r=ge(this,o);(r.value||(r.value={}))[t]=n.apply(this,arguments)}),function(r){return de(r,o).value[t]}}function Ko(e,t){var n;return(typeof t=="number"?be:t instanceof Je?Do:(n=Je(t))?(t=n,Do):fc)(e,t)}function Dc(e){return function(){this.removeAttribute(e)}}function Tc(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Oc(e,t,n){var o,r=n+"",i;return function(){var s=this.getAttribute(e);return s===r?null:s===o?i:i=t(o=s,n)}}function zc(e,t,n){var o,r=n+"",i;return function(){var s=this.getAttributeNS(e.space,e.local);return s===r?null:s===o?i:i=t(o=s,n)}}function Hc(e,t,n){var o,r,i;return function(){var s,a=n(this),c;return a==null?void this.removeAttribute(e):(s=this.getAttribute(e),c=a+"",s===c?null:s===o&&c===r?i:(r=c,i=t(o=s,a)))}}function Lc(e,t,n){var o,r,i;return function(){var s,a=n(this),c;return a==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),c=a+"",s===c?null:s===o&&c===r?i:(r=c,i=t(o=s,a)))}}function Bc(e,t){var n=vt(e),o=n==="transform"?mc:Ko;return this.attrTween(e,typeof t=="function"?(n.local?Lc:Hc)(n,o,_n(this,"attr."+e,t)):t==null?(n.local?Tc:Dc)(n):(n.local?zc:Oc)(n,o,t))}function Vc(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Fc(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Rc(e,t){var n,o;function r(){var i=t.apply(this,arguments);return i!==o&&(n=(o=i)&&Fc(e,i)),n}return r._value=t,r}function Yc(e,t){var n,o;function r(){var i=t.apply(this,arguments);return i!==o&&(n=(o=i)&&Vc(e,i)),n}return r._value=t,r}function Xc(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var o=vt(e);return this.tween(n,(o.local?Rc:Yc)(o,t))}function Wc(e,t){return function(){bn(this,e).delay=+t.apply(this,arguments)}}function Kc(e,t){return t=+t,function(){bn(this,e).delay=t}}function Zc(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Wc:Kc)(t,e)):de(this.node(),t).delay}function Gc(e,t){return function(){ge(this,e).duration=+t.apply(this,arguments)}}function Uc(e,t){return t=+t,function(){ge(this,e).duration=t}}function Qc(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Gc:Uc)(t,e)):de(this.node(),t).duration}function $c(e,t){if(typeof t!="function")throw new Error;return function(){ge(this,e).ease=t}}function Jc(e){var t=this._id;return arguments.length?this.each($c(t,e)):de(this.node(),t).ease}function jc(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;ge(this,e).ease=n}}function qc(e){if(typeof e!="function")throw new Error;return this.each(jc(this._id,e))}function el(e){typeof e!="function"&&(e=so(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var i=t[r],s=i.length,a=o[r]=[],c,l=0;l<s;++l)(c=i[l])&&e.call(c,c.__data__,l,i)&&a.push(c);return new me(o,this._parents,this._name,this._id)}function tl(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,o=t.length,r=n.length,i=Math.min(o,r),s=new Array(o),a=0;a<i;++a)for(var c=t[a],l=n[a],d=c.length,h=s[a]=new Array(d),u,f=0;f<d;++f)(u=c[f]||l[f])&&(h[f]=u);for(;a<o;++a)s[a]=t[a];return new me(s,this._parents,this._name,this._id)}function nl(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function ol(e,t,n){var o,r,i=nl(t)?bn:ge;return function(){var s=i(this,e),a=s.on;a!==o&&(r=(o=a).copy()).on(t,n),s.on=r}}function rl(e,t){var n=this._id;return arguments.length<2?de(this.node(),n).on.on(e):this.each(ol(n,e,t))}function il(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function sl(){return this.on("end.remove",il(this._id))}function al(e){var t=this._name,n=this._id;typeof e!="function"&&(e=an(e));for(var o=this._groups,r=o.length,i=new Array(r),s=0;s<r;++s)for(var a=o[s],c=a.length,l=i[s]=new Array(c),d,h,u=0;u<c;++u)(d=a[u])&&(h=e.call(d,d.__data__,u,a))&&("__data__"in d&&(h.__data__=d.__data__),l[u]=h,Ot(l[u],t,n,u,l,de(d,n)));return new me(i,this._parents,t,n)}function cl(e){var t=this._name,n=this._id;typeof e!="function"&&(e=io(e));for(var o=this._groups,r=o.length,i=[],s=[],a=0;a<r;++a)for(var c=o[a],l=c.length,d,h=0;h<l;++h)if(d=c[h]){for(var u=e.call(d,d.__data__,h,c),f,g=de(d,n),m=0,v=u.length;m<v;++m)(f=u[m])&&Ot(f,t,n,m,u,g);i.push(u),s.push(d)}return new me(i,s,t,n)}var ll=Ze.prototype.constructor;function ul(){return new ll(this._groups,this._parents)}function dl(e,t){var n,o,r;return function(){var i=Oe(this,e),s=(this.style.removeProperty(e),Oe(this,e));return i===s?null:i===n&&s===o?r:r=t(n=i,o=s)}}function Zo(e){return function(){this.style.removeProperty(e)}}function fl(e,t,n){var o,r=n+"",i;return function(){var s=Oe(this,e);return s===r?null:s===o?i:i=t(o=s,n)}}function hl(e,t,n){var o,r,i;return function(){var s=Oe(this,e),a=n(this),c=a+"";return a==null&&(c=a=(this.style.removeProperty(e),Oe(this,e))),s===c?null:s===o&&c===r?i:(r=c,i=t(o=s,a))}}function gl(e,t){var n,o,r,i="style."+t,s="end."+i,a;return function(){var c=ge(this,e),l=c.on,d=c.value[i]==null?a||(a=Zo(t)):void 0;(l!==n||r!==d)&&(o=(n=l).copy()).on(s,r=d),c.on=o}}function pl(e,t,n){var o=(e+="")=="transform"?pc:Ko;return t==null?this.styleTween(e,dl(e,o)).on("end.style."+e,Zo(e)):typeof t=="function"?this.styleTween(e,hl(e,o,_n(this,"style."+e,t))).each(gl(this._id,e)):this.styleTween(e,fl(e,o,t),n).on("end.style."+e,null)}function ml(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function yl(e,t,n){var o,r;function i(){var s=t.apply(this,arguments);return s!==r&&(o=(r=s)&&ml(e,s,n)),o}return i._value=t,i}function wl(e,t,n){var o="style."+(e+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(t==null)return this.tween(o,null);if(typeof t!="function")throw new Error;return this.tween(o,yl(e,t,n??""))}function xl(e){return function(){this.textContent=e}}function vl(e){return function(){var t=e(this);this.textContent=t??""}}function bl(e){return this.tween("text",typeof e=="function"?vl(_n(this,"text",e)):xl(e==null?"":e+""))}function _l(e){return function(t){this.textContent=e.call(this,t)}}function Sl(e){var t,n;function o(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&_l(r)),t}return o._value=e,o}function El(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,Sl(e))}function Cl(){for(var e=this._name,t=this._id,n=Go(),o=this._groups,r=o.length,i=0;i<r;++i)for(var s=o[i],a=s.length,c,l=0;l<a;++l)if(c=s[l]){var d=de(c,t);Ot(c,e,n,l,s,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new me(o,this._parents,e,n)}function Nl(){var e,t,n=this,o=n._id,r=n.size();return new Promise(function(i,s){var a={value:s},c={value:function(){--r===0&&i()}};n.each(function(){var l=ge(this,o),d=l.on;d!==e&&(t=(e=d).copy(),t._.cancel.push(a),t._.interrupt.push(a),t._.end.push(c)),l.on=t}),r===0&&i()})}var Ml=0;function me(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function Go(){return++Ml}var ye=Ze.prototype;me.prototype={constructor:me,select:al,selectAll:cl,selectChild:ye.selectChild,selectChildren:ye.selectChildren,filter:el,merge:tl,selection:ul,transition:Cl,call:ye.call,nodes:ye.nodes,node:ye.node,size:ye.size,empty:ye.empty,each:ye.each,on:rl,attr:Bc,attrTween:Xc,style:pl,styleTween:wl,text:bl,textTween:El,remove:sl,tween:Ac,delay:Zc,duration:Qc,ease:Jc,easeVarying:qc,end:Nl,[Symbol.iterator]:ye[Symbol.iterator]};function kl(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Il={time:null,delay:0,duration:250,ease:kl};function Pl(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function Al(e){var t,n;e instanceof me?(t=e._id,e=e._name):(t=Go(),(n=Il).time=yn(),e=e==null?null:e+"");for(var o=this._groups,r=o.length,i=0;i<r;++i)for(var s=o[i],a=s.length,c,l=0;l<a;++l)(c=s[l])&&Ot(c,e,t,l,s,n||Pl(c,t));return new me(o,this._parents,e,t)}Ze.prototype.interrupt=kc,Ze.prototype.transition=Al;const Ht=e=>()=>e;function Dl(e,{sourceEvent:t,target:n,transform:o,dispatch:r}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:r}})}function we(e,t,n){this.k=e,this.x=t,this.y=n}we.prototype={constructor:we,scale:function(e){return e===1?this:new we(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new we(this.k,this.x+this.k*e,this.y+this.k*t)},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 Lt=new we(1,0,0);Uo.prototype=we.prototype;function Uo(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Lt;return e.__zoom}function Sn(e){e.stopImmediatePropagation()}function nt(e){e.preventDefault(),e.stopImmediatePropagation()}function Tl(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Ol(){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 Qo(){return this.__zoom||Lt}function zl(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Hl(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ll(e,t,n){var o=e.invertX(t[0][0])-n[0][0],r=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1];return e.translate(r>o?(o+r)/2:Math.min(0,o)||Math.max(0,r),s>i?(i+s)/2:Math.min(0,i)||Math.max(0,s))}function $o(){var e=Tl,t=Ol,n=Ll,o=zl,r=Hl,i=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],a=250,c=vc,l=wt("start","zoom","end"),d,h,u,f=500,g=150,m=0,v=10;function x(y){y.property("__zoom",Qo).on("wheel.zoom",D,{passive:!1}).on("mousedown.zoom",T).on("dblclick.zoom",O).filter(r).on("touchstart.zoom",B).on("touchmove.zoom",H).on("touchend.zoom touchcancel.zoom",L).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}x.transform=function(y,E,_,C){var A=y.selection?y.selection():y;A.property("__zoom",Qo),y!==A?M(y,E,_,C):A.interrupt().each(function(){k(this,arguments).event(C).start().zoom(null,typeof E=="function"?E.apply(this,arguments):E).end()})},x.scaleBy=function(y,E,_,C){x.scaleTo(y,function(){var A=this.__zoom.k,P=typeof E=="function"?E.apply(this,arguments):E;return A*P},_,C)},x.scaleTo=function(y,E,_,C){x.transform(y,function(){var A=t.apply(this,arguments),P=this.__zoom,z=_==null?w(A):typeof _=="function"?_.apply(this,arguments):_,V=P.invert(z),F=typeof E=="function"?E.apply(this,arguments):E;return n(p(b(P,F),z,V),A,s)},_,C)},x.translateBy=function(y,E,_,C){x.transform(y,function(){return n(this.__zoom.translate(typeof E=="function"?E.apply(this,arguments):E,typeof _=="function"?_.apply(this,arguments):_),t.apply(this,arguments),s)},null,C)},x.translateTo=function(y,E,_,C,A){x.transform(y,function(){var P=t.apply(this,arguments),z=this.__zoom,V=C==null?w(P):typeof C=="function"?C.apply(this,arguments):C;return n(Lt.translate(V[0],V[1]).scale(z.k).translate(typeof E=="function"?-E.apply(this,arguments):-E,typeof _=="function"?-_.apply(this,arguments):-_),P,s)},C,A)};function b(y,E){return E=Math.max(i[0],Math.min(i[1],E)),E===y.k?y:new we(E,y.x,y.y)}function p(y,E,_){var C=E[0]-_[0]*y.k,A=E[1]-_[1]*y.k;return C===y.x&&A===y.y?y:new we(y.k,C,A)}function w(y){return[(+y[0][0]+ +y[1][0])/2,(+y[0][1]+ +y[1][1])/2]}function M(y,E,_,C){y.on("start.zoom",function(){k(this,arguments).event(C).start()}).on("interrupt.zoom end.zoom",function(){k(this,arguments).event(C).end()}).tween("zoom",function(){var A=this,P=arguments,z=k(A,P).event(C),V=t.apply(A,P),F=_==null?w(V):typeof _=="function"?_.apply(A,P):_,W=Math.max(V[1][0]-V[0][0],V[1][1]-V[0][1]),X=A.__zoom,K=typeof E=="function"?E.apply(A,P):E,Z=c(X.invert(F).concat(W/X.k),K.invert(F).concat(W/K.k));return function(R){if(R===1)R=K;else{var G=Z(R),Q=W/G[2];R=new we(Q,F[0]-G[0]*Q,F[1]-G[1]*Q)}z.zoom(null,R)}})}function k(y,E,_){return!_&&y.__zooming||new N(y,E)}function N(y,E){this.that=y,this.args=E,this.active=0,this.sourceEvent=null,this.extent=t.apply(y,E),this.taps=0}N.prototype={event:function(y){return y&&(this.sourceEvent=y),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(y,E){return this.mouse&&y!=="mouse"&&(this.mouse[1]=E.invert(this.mouse[0])),this.touch0&&y!=="touch"&&(this.touch0[1]=E.invert(this.touch0[0])),this.touch1&&y!=="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(y){var E=ae(this.that).datum();l.call(y,this.that,new Dl(y,{sourceEvent:this.sourceEvent,target:x,transform:this.that.__zoom,dispatch:l}),E)}};function D(y,...E){if(!e.apply(this,arguments))return;var _=k(this,E).event(y),C=this.__zoom,A=Math.max(i[0],Math.min(i[1],C.k*Math.pow(2,o.apply(this,arguments)))),P=le(y);if(_.wheel)(_.mouse[0][0]!==P[0]||_.mouse[0][1]!==P[1])&&(_.mouse[1]=C.invert(_.mouse[0]=P)),clearTimeout(_.wheel);else{if(C.k===A)return;_.mouse=[P,C.invert(P)],zt(this),_.start()}nt(y),_.wheel=setTimeout(z,g),_.zoom("mouse",n(p(b(C,A),_.mouse[0],_.mouse[1]),_.extent,s));function z(){_.wheel=null,_.end()}}function T(y,...E){if(u||!e.apply(this,arguments))return;var _=y.currentTarget,C=k(this,E,!0).event(y),A=ae(y.view).on("mousemove.zoom",F,!0).on("mouseup.zoom",W,!0),P=le(y,_),z=y.clientX,V=y.clientY;yo(y.view),Sn(y),C.mouse=[P,this.__zoom.invert(P)],zt(this),C.start();function F(X){if(nt(X),!C.moved){var K=X.clientX-z,Z=X.clientY-V;C.moved=K*K+Z*Z>m}C.event(X).zoom("mouse",n(p(C.that.__zoom,C.mouse[0]=le(X,_),C.mouse[1]),C.extent,s))}function W(X){A.on("mousemove.zoom mouseup.zoom",null),wo(X.view,C.moved),nt(X),C.event(X).end()}}function O(y,...E){if(e.apply(this,arguments)){var _=this.__zoom,C=le(y.changedTouches?y.changedTouches[0]:y,this),A=_.invert(C),P=_.k*(y.shiftKey?.5:2),z=n(p(b(_,P),C,A),t.apply(this,E),s);nt(y),a>0?ae(this).transition().duration(a).call(M,z,C,y):ae(this).call(x.transform,z,C,y)}}function B(y,...E){if(e.apply(this,arguments)){var _=y.touches,C=_.length,A=k(this,E,y.changedTouches.length===C).event(y),P,z,V,F;for(Sn(y),z=0;z<C;++z)V=_[z],F=le(V,this),F=[F,this.__zoom.invert(F),V.identifier],A.touch0?!A.touch1&&A.touch0[2]!==F[2]&&(A.touch1=F,A.taps=0):(A.touch0=F,P=!0,A.taps=1+!!d);d&&(d=clearTimeout(d)),P&&(A.taps<2&&(h=F[0],d=setTimeout(function(){d=null},f)),zt(this),A.start())}}function H(y,...E){if(this.__zooming){var _=k(this,E).event(y),C=y.changedTouches,A=C.length,P,z,V,F;for(nt(y),P=0;P<A;++P)z=C[P],V=le(z,this),_.touch0&&_.touch0[2]===z.identifier?_.touch0[0]=V:_.touch1&&_.touch1[2]===z.identifier&&(_.touch1[0]=V);if(z=_.that.__zoom,_.touch1){var W=_.touch0[0],X=_.touch0[1],K=_.touch1[0],Z=_.touch1[1],R=(R=K[0]-W[0])*R+(R=K[1]-W[1])*R,G=(G=Z[0]-X[0])*G+(G=Z[1]-X[1])*G;z=b(z,Math.sqrt(R/G)),V=[(W[0]+K[0])/2,(W[1]+K[1])/2],F=[(X[0]+Z[0])/2,(X[1]+Z[1])/2]}else if(_.touch0)V=_.touch0[0],F=_.touch0[1];else return;_.zoom("touch",n(p(z,V,F),_.extent,s))}}function L(y,...E){if(this.__zooming){var _=k(this,E).event(y),C=y.changedTouches,A=C.length,P,z;for(Sn(y),u&&clearTimeout(u),u=setTimeout(function(){u=null},f),P=0;P<A;++P)z=C[P],_.touch0&&_.touch0[2]===z.identifier?delete _.touch0:_.touch1&&_.touch1[2]===z.identifier&&delete _.touch1;if(_.touch1&&!_.touch0&&(_.touch0=_.touch1,delete _.touch1),_.touch0)_.touch0[1]=this.__zoom.invert(_.touch0[0]);else if(_.end(),_.taps===2&&(z=le(z,this),Math.hypot(h[0]-z[0],h[1]-z[1])<v)){var V=ae(this).on("dblcli