ranui
Version:
A framework-agnostic Web Components UI library built on native custom elements, with TypeScript types, light/dark theming, SSR and PWA support.
2 lines (1 loc) • 48.8 kB
JavaScript
const gn=require("./rolldown-runtime-CAnuVJ4g.cjs"),z=require("./chunk-Y2CYZVJY-DPaYLFFP.cjs");var yn=gn.__commonJSMin(((t,n)=>{(function(e,r){typeof t=="object"&&typeof n<"u"?n.exports=r():typeof define=="function"&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=r()})(t,(function(){"use strict";var e=1e3,r=6e4,i=36e5,o="millisecond",u="second",a="minute",s="hour",l="day",c="week",f="month",g="quarter",_="year",b="date",S="Invalid Date",Y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,U=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,j={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(v){var p=["th","st","nd","rd"],h=v%100;return"["+v+(p[(h-20)%10]||p[h]||p[0])+"]"}},tt=function(v,p,h){var y=String(v);return!y||y.length>=p?v:""+Array(p+1-y.length).join(h)+v},vt={s:tt,z:function(v){var p=-v.utcOffset(),h=Math.abs(p),y=Math.floor(h/60),d=h%60;return(p<=0?"+":"-")+tt(y,2,"0")+":"+tt(d,2,"0")},m:function v(p,h){if(p.date()<h.date())return-v(h,p);var y=12*(h.year()-p.year())+(h.month()-p.month()),d=p.clone().add(y,f),w=h-d<0,m=p.clone().add(y+(w?-1:1),f);return+(-(y+(h-d)/(w?d-m:m-d))||0)},a:function(v){return v<0?Math.ceil(v)||0:Math.floor(v)},p:function(v){return{M:f,y:_,w:c,d:l,D:b,h:s,m:a,s:u,ms:o,Q:g}[v]||String(v||"").toLowerCase().replace(/s$/,"")},u:function(v){return v===void 0}},lt="en",W={};W[lt]=j;var jt="$isDayjsObject",Pt=function(v){return v instanceof mt||!(!v||!v[jt])},wt=function v(p,h,y){var d;if(!p)return lt;if(typeof p=="string"){var w=p.toLowerCase();W[w]&&(d=w),h&&(W[w]=h,d=w);var m=p.split("-");if(!d&&m.length>1)return v(m[0])}else{var x=p.name;W[x]=p,d=x}return!y&&d&&(lt=d),d||!y&<},N=function(v,p){if(Pt(v))return v.clone();var h=typeof p=="object"?p:{};return h.date=v,h.args=arguments,new mt(h)},$=vt;$.l=wt,$.i=Pt,$.w=function(v,p){return N(v,{locale:p.$L,utc:p.$u,x:p.$x,$offset:p.$offset})};var mt=(function(){function v(h){this.$L=wt(h.locale,null,!0),this.parse(h),this.$x=this.$x||h.x||{},this[jt]=!0}var p=v.prototype;return p.parse=function(h){this.$d=(function(y){var d=y.date,w=y.utc;if(d===null)return new Date(NaN);if($.u(d))return new Date;if(d instanceof Date)return new Date(d);if(typeof d=="string"&&!/Z$/i.test(d)){var m=d.match(Y);if(m){var x=m[2]-1||0,A=(m[7]||"0").substring(0,3);return w?new Date(Date.UTC(m[1],x,m[3]||1,m[4]||0,m[5]||0,m[6]||0,A)):new Date(m[1],x,m[3]||1,m[4]||0,m[5]||0,m[6]||0,A)}}return new Date(d)})(h),this.init()},p.init=function(){var h=this.$d;this.$y=h.getFullYear(),this.$M=h.getMonth(),this.$D=h.getDate(),this.$W=h.getDay(),this.$H=h.getHours(),this.$m=h.getMinutes(),this.$s=h.getSeconds(),this.$ms=h.getMilliseconds()},p.$utils=function(){return $},p.isValid=function(){return this.$d.toString()!==S},p.isSame=function(h,y){var d=N(h);return this.startOf(y)<=d&&d<=this.endOf(y)},p.isAfter=function(h,y){return N(h)<this.startOf(y)},p.isBefore=function(h,y){return this.endOf(y)<N(h)},p.$g=function(h,y,d){return $.u(h)?this[y]:this.set(d,h)},p.unix=function(){return Math.floor(this.valueOf()/1e3)},p.valueOf=function(){return this.$d.getTime()},p.startOf=function(h,y){var d=this,w=!!$.u(y)||y,m=$.p(h),x=function(Z,C){var V=$.w(d.$u?Date.UTC(d.$y,C,Z):new Date(d.$y,C,Z),d);return w?V:V.endOf(l)},A=function(Z,C){return $.w(d.toDate()[Z].apply(d.toDate("s"),(w?[0,0,0,0]:[23,59,59,999]).slice(C)),d)},M=this.$W,k=this.$M,T=this.$D,nt="set"+(this.$u?"UTC":"");switch(m){case _:return w?x(1,0):x(31,11);case f:return w?x(1,k):x(0,k+1);case c:var J=this.$locale().weekStart||0,ct=(M<J?M+7:M)-J;return x(w?T-ct:T+(6-ct),k);case l:case b:return A(nt+"Hours",0);case s:return A(nt+"Minutes",1);case a:return A(nt+"Seconds",2);case u:return A(nt+"Milliseconds",3);default:return this.clone()}},p.endOf=function(h){return this.startOf(h,!1)},p.$set=function(h,y){var d,w=$.p(h),m="set"+(this.$u?"UTC":""),x=(d={},d[l]=m+"Date",d[b]=m+"Date",d[f]=m+"Month",d[_]=m+"FullYear",d[s]=m+"Hours",d[a]=m+"Minutes",d[u]=m+"Seconds",d[o]=m+"Milliseconds",d)[w],A=w===l?this.$D+(y-this.$W):y;if(w===f||w===_){var M=this.clone().set(b,1);M.$d[x](A),M.init(),this.$d=M.set(b,Math.min(this.$D,M.daysInMonth())).$d}else x&&this.$d[x](A);return this.init(),this},p.set=function(h,y){return this.clone().$set(h,y)},p.get=function(h){return this[$.p(h)]()},p.add=function(h,y){var d,w=this;h=Number(h);var m=$.p(y),x=function(k){var T=N(w);return $.w(T.date(T.date()+Math.round(k*h)),w)};if(m===f)return this.set(f,this.$M+h);if(m===_)return this.set(_,this.$y+h);if(m===l)return x(1);if(m===c)return x(7);var A=(d={},d[a]=r,d[s]=i,d[u]=e,d)[m]||1,M=this.$d.getTime()+h*A;return $.w(M,this)},p.subtract=function(h,y){return this.add(-1*h,y)},p.format=function(h){var y=this,d=this.$locale();if(!this.isValid())return d.invalidDate||S;var w=h||"YYYY-MM-DDTHH:mm:ssZ",m=$.z(this),x=this.$H,A=this.$m,M=this.$M,k=d.weekdays,T=d.months,nt=d.meridiem,J=function(C,V,ft,$t){return C&&(C[V]||C(y,w))||ft[V].slice(0,$t)},ct=function(C){return $.s(x%12||12,C,"0")},Z=nt||function(C,V,ft){var $t=C<12?"AM":"PM";return ft?$t.toLowerCase():$t};return w.replace(U,(function(C,V){return V||(function(ft){switch(ft){case"YY":return String(y.$y).slice(-2);case"YYYY":return $.s(y.$y,4,"0");case"M":return M+1;case"MM":return $.s(M+1,2,"0");case"MMM":return J(d.monthsShort,M,T,3);case"MMMM":return J(T,M);case"D":return y.$D;case"DD":return $.s(y.$D,2,"0");case"d":return String(y.$W);case"dd":return J(d.weekdaysMin,y.$W,k,2);case"ddd":return J(d.weekdaysShort,y.$W,k,3);case"dddd":return k[y.$W];case"H":return String(x);case"HH":return $.s(x,2,"0");case"h":return ct(1);case"hh":return ct(2);case"a":return Z(x,A,!0);case"A":return Z(x,A,!1);case"m":return String(A);case"mm":return $.s(A,2,"0");case"s":return String(y.$s);case"ss":return $.s(y.$s,2,"0");case"SSS":return $.s(y.$ms,3,"0");case"Z":return m}return null})(C)||m.replace(":","")}))},p.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},p.diff=function(h,y,d){var w,m=this,x=$.p(y),A=N(h),M=(A.utcOffset()-this.utcOffset())*r,k=this-A,T=function(){return $.m(m,A)};switch(x){case _:w=T()/12;break;case f:w=T();break;case g:w=T()/3;break;case c:w=(k-M)/6048e5;break;case l:w=(k-M)/864e5;break;case s:w=k/i;break;case a:w=k/r;break;case u:w=k/e;break;default:w=k}return d?w:$.a(w)},p.daysInMonth=function(){return this.endOf(f).$D},p.$locale=function(){return W[this.$L]},p.locale=function(h,y){if(!h)return this.$L;var d=this.clone(),w=wt(h,y,!0);return w&&(d.$L=w),d},p.clone=function(){return $.w(this.$d,this)},p.toDate=function(){return new Date(this.valueOf())},p.toJSON=function(){return this.isValid()?this.toISOString():null},p.toISOString=function(){return this.$d.toISOString()},p.toString=function(){return this.$d.toUTCString()},v})(),tn=mt.prototype;return N.prototype=tn,[["$ms",o],["$s",u],["$m",a],["$H",s],["$W",l],["$M",f],["$y",_],["$D",b]].forEach((function(v){tn[v[1]]=function(p){return this.$g(p,v[0],v[1])}})),N.extend=function(v,p){return v.$i||(v(p,mt,N),v.$i=!0),N},N.locale=wt,N.isDayjs=Pt,N.unix=function(v){return N(1e3*v)},N.en=W[lt],N.Ls=W,N.p={},N}))})),zn=gn.__toESM(yn(),1),F={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},O={trace:z.__name((...t)=>{},"trace"),debug:z.__name((...t)=>{},"debug"),info:z.__name((...t)=>{},"info"),warn:z.__name((...t)=>{},"warn"),error:z.__name((...t)=>{},"error"),fatal:z.__name((...t)=>{},"fatal")},Un=z.__name(function(t="fatal"){let n=F.fatal;typeof t=="string"?t.toLowerCase()in F&&(n=F[t]):typeof t=="number"&&(n=t),O.trace=()=>{},O.debug=()=>{},O.info=()=>{},O.warn=()=>{},O.error=()=>{},O.fatal=()=>{},n<=F.fatal&&(O.fatal=console.error?console.error.bind(console,R("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",R("FATAL"))),n<=F.error&&(O.error=console.error?console.error.bind(console,R("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",R("ERROR"))),n<=F.warn&&(O.warn=console.warn?console.warn.bind(console,R("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",R("WARN"))),n<=F.info&&(O.info=console.info?console.info.bind(console,R("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",R("INFO"))),n<=F.debug&&(O.debug=console.debug?console.debug.bind(console,R("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",R("DEBUG"))),n<=F.trace&&(O.trace=console.debug?console.debug.bind(console,R("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",R("TRACE")))},"setLogLevel"),R=z.__name(t=>`%c${(0,zn.default)().format("ss.SSS")} : ${t} : `,"format"),Wn={value:()=>{}};function vn(){for(var t=0,n=arguments.length,e={},r;t<n;++t){if(!(r=arguments[t]+"")||r in e||/[\s.]/.test(r))throw new Error("illegal type: "+r);e[r]=[]}return new St(e)}function St(t){this._=t}function Jn(t,n){return t.trim().split(/^|\s+/).map(function(e){var r="",i=e.indexOf(".");if(i>=0&&(r=e.slice(i+1),e=e.slice(0,i)),e&&!n.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:r}})}St.prototype=vn.prototype={constructor:St,on:function(t,n){var e=this._,r=Jn(t+"",e),i,o=-1,u=r.length;if(arguments.length<2){for(;++o<u;)if((i=(t=r[o]).type)&&(i=Zn(e[i],t.name)))return i;return}if(n!=null&&typeof n!="function")throw new Error("invalid callback: "+n);for(;++o<u;)if(i=(t=r[o]).type)e[i]=nn(e[i],t.name,n);else if(n==null)for(i in e)e[i]=nn(e[i],t.name,null);return this},copy:function(){var t={},n=this._;for(var e in n)t[e]=n[e].slice();return new St(t)},call:function(t,n){if((i=arguments.length-2)>0)for(var e=new Array(i),r=0,i,o;r<i;++r)e[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(n,e)},apply:function(t,n,e){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(n,e)}};function Zn(t,n){for(var e=0,r=t.length,i;e<r;++e)if((i=t[e]).name===n)return i.value}function nn(t,n,e){for(var r=0,i=t.length;r<i;++r)if(t[r].name===n){t[r]=Wn,t=t.slice(0,r).concat(t.slice(r+1));break}return e!=null&&t.push({name:n,value:e}),t}var Gn="http://www.w3.org/1999/xhtml",en={svg:"http://www.w3.org/2000/svg",xhtml:Gn,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Tt(t){var n=t+="",e=n.indexOf(":");return e>=0&&(n=t.slice(0,e))!=="xmlns"&&(t=t.slice(e+1)),en.hasOwnProperty(n)?{space:en[n],local:t}:t}function Kn(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e==="http://www.w3.org/1999/xhtml"&&n.documentElement.namespaceURI==="http://www.w3.org/1999/xhtml"?n.createElement(t):n.createElementNS(e,t)}}function Qn(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function wn(t){var n=Tt(t);return(n.local?Qn:Kn)(n)}function jn(){}function zt(t){return t==null?jn:function(){return this.querySelector(t)}}function te(t){typeof t!="function"&&(t=zt(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o=n[i],u=o.length,a=r[i]=new Array(u),s,l,c=0;c<u;++c)(s=o[c])&&(l=t.call(s,s.__data__,c,o))&&("__data__"in s&&(l.__data__=s.__data__),a[c]=l);return new D(r,this._parents)}function ne(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function ee(){return[]}function mn(t){return t==null?ee:function(){return this.querySelectorAll(t)}}function re(t){return function(){return ne(t.apply(this,arguments))}}function ie(t){typeof t=="function"?t=re(t):t=mn(t);for(var n=this._groups,e=n.length,r=[],i=[],o=0;o<e;++o)for(var u=n[o],a=u.length,s,l=0;l<a;++l)(s=u[l])&&(r.push(t.call(s,s.__data__,l,u)),i.push(s));return new D(r,i)}function $n(t){return function(){return this.matches(t)}}function bn(t){return function(n){return n.matches(t)}}var oe=Array.prototype.find;function ue(t){return function(){return oe.call(this.children,t)}}function ae(){return this.firstElementChild}function se(t){return this.select(t==null?ae:ue(typeof t=="function"?t:bn(t)))}var le=Array.prototype.filter;function ce(){return Array.from(this.children)}function fe(t){return function(){return le.call(this.children,t)}}function he(t){return this.selectAll(t==null?ce:fe(typeof t=="function"?t:bn(t)))}function de(t){typeof t!="function"&&(t=$n(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o=n[i],u=o.length,a=r[i]=[],s,l=0;l<u;++l)(s=o[l])&&t.call(s,s.__data__,l,o)&&a.push(s);return new D(r,this._parents)}function xn(t){return new Array(t.length)}function pe(){return new D(this._enter||this._groups.map(xn),this._parents)}function Nt(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}Nt.prototype={constructor:Nt,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function _e(t){return function(){return t}}function ge(t,n,e,r,i,o){for(var u=0,a,s=n.length,l=o.length;u<l;++u)(a=n[u])?(a.__data__=o[u],r[u]=a):e[u]=new Nt(t,o[u]);for(;u<s;++u)(a=n[u])&&(i[u]=a)}function ye(t,n,e,r,i,o,u){var a,s,l=new Map,c=n.length,f=o.length,g=new Array(c),_;for(a=0;a<c;++a)(s=n[a])&&(g[a]=_=u.call(s,s.__data__,a,n)+"",l.has(_)?i[a]=s:l.set(_,s));for(a=0;a<f;++a)_=u.call(t,o[a],a,o)+"",(s=l.get(_))?(r[a]=s,s.__data__=o[a],l.delete(_)):e[a]=new Nt(t,o[a]);for(a=0;a<c;++a)(s=n[a])&&l.get(g[a])===s&&(i[a]=s)}function ve(t){return t.__data__}function we(t,n){if(!arguments.length)return Array.from(this,ve);var e=n?ye:ge,r=this._parents,i=this._groups;typeof t!="function"&&(t=_e(t));for(var o=i.length,u=new Array(o),a=new Array(o),s=new Array(o),l=0;l<o;++l){var c=r[l],f=i[l],g=f.length,_=me(t.call(c,c&&c.__data__,l,r)),b=_.length,S=a[l]=new Array(b),Y=u[l]=new Array(b);e(c,f,S,Y,s[l]=new Array(g),_,n);for(var U=0,j=0,tt,vt;U<b;++U)if(tt=S[U]){for(U>=j&&(j=U+1);!(vt=Y[j])&&++j<b;);tt._next=vt||null}}return u=new D(u,r),u._enter=a,u._exit=s,u}function me(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function $e(){return new D(this._exit||this._groups.map(xn),this._parents)}function be(t,n,e){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),n!=null&&(i=n(i),i&&(i=i.selection())),e==null?o.remove():e(o),r&&i?r.merge(i).order():i}function xe(t){for(var n=t.selection?t.selection():t,e=this._groups,r=n._groups,i=e.length,o=r.length,u=Math.min(i,o),a=new Array(i),s=0;s<u;++s)for(var l=e[s],c=r[s],f=l.length,g=a[s]=new Array(f),_,b=0;b<f;++b)(_=l[b]||c[b])&&(g[b]=_);for(;s<i;++s)a[s]=e[s];return new D(a,this._parents)}function Ae(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r=t[n],i=r.length-1,o=r[i],u;--i>=0;)(u=r[i])&&(o&&u.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(u,o),o=u);return this}function Se(t){t||(t=Ne);function n(f,g){return f&&g?t(f.__data__,g.__data__):!f-!g}for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o){for(var u=e[o],a=u.length,s=i[o]=new Array(a),l,c=0;c<a;++c)(l=u[c])&&(s[c]=l);s.sort(n)}return new D(i,this._parents).order()}function Ne(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function Me(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function ke(){return Array.from(this)}function Ee(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length;i<o;++i){var u=r[i];if(u)return u}return null}function Ce(){let t=0;for(const n of this)++t;return t}function Oe(){return!this.node()}function De(t){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var i=n[e],o=0,u=i.length,a;o<u;++o)(a=i[o])&&t.call(a,a.__data__,o,i);return this}function Te(t){return function(){this.removeAttribute(t)}}function Re(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Le(t,n){return function(){this.setAttribute(t,n)}}function Ie(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function He(t,n){return function(){var e=n.apply(this,arguments);e==null?this.removeAttribute(t):this.setAttribute(t,e)}}function Pe(t,n){return function(){var e=n.apply(this,arguments);e==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function Ye(t,n){var e=Tt(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((n==null?e.local?Re:Te:typeof n=="function"?e.local?Pe:He:e.local?Ie:Le)(e,n))}function An(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Fe(t){return function(){this.style.removeProperty(t)}}function qe(t,n,e){return function(){this.style.setProperty(t,n,e)}}function Xe(t,n,e){return function(){var r=n.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function Be(t,n,e){return arguments.length>1?this.each((n==null?Fe:typeof n=="function"?Xe:qe)(t,n,e??"")):it(this.node(),t)}function it(t,n){return t.style.getPropertyValue(n)||An(t).getComputedStyle(t,null).getPropertyValue(n)}function Ve(t){return function(){delete this[t]}}function ze(t,n){return function(){this[t]=n}}function Ue(t,n){return function(){var e=n.apply(this,arguments);e==null?delete this[t]:this[t]=e}}function We(t,n){return arguments.length>1?this.each((n==null?Ve:typeof n=="function"?Ue:ze)(t,n)):this.node()[t]}function Sn(t){return t.trim().split(/^|\s+/)}function Ut(t){return t.classList||new Nn(t)}function Nn(t){this._node=t,this._names=Sn(t.getAttribute("class")||"")}Nn.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Mn(t,n){for(var e=Ut(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function kn(t,n){for(var e=Ut(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function Je(t){return function(){Mn(this,t)}}function Ze(t){return function(){kn(this,t)}}function Ge(t,n){return function(){(n.apply(this,arguments)?Mn:kn)(this,t)}}function Ke(t,n){var e=Sn(t+"");if(arguments.length<2){for(var r=Ut(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each((typeof n=="function"?Ge:n?Je:Ze)(e,n))}function Qe(){this.textContent=""}function je(t){return function(){this.textContent=t}}function tr(t){return function(){var n=t.apply(this,arguments);this.textContent=n??""}}function nr(t){return arguments.length?this.each(t==null?Qe:(typeof t=="function"?tr:je)(t)):this.node().textContent}function er(){this.innerHTML=""}function rr(t){return function(){this.innerHTML=t}}function ir(t){return function(){var n=t.apply(this,arguments);this.innerHTML=n??""}}function or(t){return arguments.length?this.each(t==null?er:(typeof t=="function"?ir:rr)(t)):this.node().innerHTML}function ur(){this.nextSibling&&this.parentNode.appendChild(this)}function ar(){return this.each(ur)}function sr(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function lr(){return this.each(sr)}function cr(t){var n=typeof t=="function"?t:wn(t);return this.select(function(){return this.appendChild(n.apply(this,arguments))})}function fr(){return null}function hr(t,n){var e=typeof t=="function"?t:wn(t),r=n==null?fr:typeof n=="function"?n:zt(n);return this.select(function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)})}function dr(){var t=this.parentNode;t&&t.removeChild(this)}function pr(){return this.each(dr)}function _r(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function gr(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function yr(t){return this.select(t?gr:_r)}function vr(t){return arguments.length?this.property("__data__",t):this.node().__data__}function wr(t){return function(n){t.call(this,n,this.__data__)}}function mr(t){return t.trim().split(/^|\s+/).map(function(n){var e="",r=n.indexOf(".");return r>=0&&(e=n.slice(r+1),n=n.slice(0,r)),{type:n,name:e}})}function $r(t){return function(){var n=this.__on;if(n){for(var e=0,r=-1,i=n.length,o;e<i;++e)o=n[e],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):n[++r]=o;++r?n.length=r:delete this.__on}}}function br(t,n,e){return function(){var r=this.__on,i,o=wr(n);if(r){for(var u=0,a=r.length;u<a;++u)if((i=r[u]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=e),i.value=n;return}}this.addEventListener(t.type,o,e),i={type:t.type,name:t.name,value:n,listener:o,options:e},r?r.push(i):this.__on=[i]}}function xr(t,n,e){var r=mr(t+""),i,o=r.length,u;if(arguments.length<2){var a=this.node().__on;if(a){for(var s=0,l=a.length,c;s<l;++s)for(i=0,c=a[s];i<o;++i)if((u=r[i]).type===c.type&&u.name===c.name)return c.value}return}for(a=n?br:$r,i=0;i<o;++i)this.each(a(r[i],n,e));return this}function En(t,n,e){var r=An(t),i=r.CustomEvent;typeof i=="function"?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function Ar(t,n){return function(){return En(this,t,n)}}function Sr(t,n){return function(){return En(this,t,n.apply(this,arguments))}}function Nr(t,n){return this.each((typeof n=="function"?Sr:Ar)(t,n))}function*Mr(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length,u;i<o;++i)(u=r[i])&&(yield u)}var Cn=[null];function D(t,n){this._groups=t,this._parents=n}function at(){return new D([[document.documentElement]],Cn)}function kr(){return this}D.prototype=at.prototype={constructor:D,select:te,selectAll:ie,selectChild:se,selectChildren:he,filter:de,data:we,enter:pe,exit:$e,join:be,merge:xe,selection:kr,order:Ae,sort:Se,call:Me,nodes:ke,node:Ee,size:Ce,empty:Oe,each:De,attr:Ye,style:Be,property:We,classed:Ke,text:nr,html:or,raise:ar,lower:lr,append:cr,insert:hr,remove:pr,clone:yr,datum:vr,on:xr,dispatch:Nr,[Symbol.iterator]:Mr};function Er(t){return typeof t=="string"?new D([[document.querySelector(t)]],[document.documentElement]):new D([[t]],Cn)}function Rt(t,n,e){t.prototype=n.prototype=e,e.constructor=t}function Wt(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function st(){}var _t=.7,Mt=1/_t,rt="\\s*([+-]?\\d+)\\s*",gt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",H="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Cr=/^#([0-9a-f]{3,8})$/,Or=new RegExp(`^rgb\\(${rt},${rt},${rt}\\)$`),Dr=new RegExp(`^rgb\\(${H},${H},${H}\\)$`),Tr=new RegExp(`^rgba\\(${rt},${rt},${rt},${gt}\\)$`),Rr=new RegExp(`^rgba\\(${H},${H},${H},${gt}\\)$`),Lr=new RegExp(`^hsl\\(${gt},${H},${H}\\)$`),Ir=new RegExp(`^hsla\\(${gt},${H},${H},${gt}\\)$`),rn={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};Rt(st,ot,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:on,formatHex:on,formatHex8:Hr,formatHsl:Pr,formatRgb:un,toString:un});function on(){return this.rgb().formatHex()}function Hr(){return this.rgb().formatHex8()}function Pr(){return Dn(this).formatHsl()}function un(){return this.rgb().formatRgb()}function ot(t){var n,e;return t=(t+"").trim().toLowerCase(),(n=Cr.exec(t))?(e=n[1].length,n=parseInt(n[1],16),e===6?an(n):e===3?new E(n>>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):e===8?bt(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):e===4?bt(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=Or.exec(t))?new E(n[1],n[2],n[3],1):(n=Dr.exec(t))?new E(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=Tr.exec(t))?bt(n[1],n[2],n[3],n[4]):(n=Rr.exec(t))?bt(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=Lr.exec(t))?cn(n[1],n[2]/100,n[3]/100,1):(n=Ir.exec(t))?cn(n[1],n[2]/100,n[3]/100,n[4]):rn.hasOwnProperty(t)?an(rn[t]):t==="transparent"?new E(NaN,NaN,NaN,0):null}function an(t){return new E(t>>16&255,t>>8&255,t&255,1)}function bt(t,n,e,r){return r<=0&&(t=n=e=NaN),new E(t,n,e,r)}function On(t){return t instanceof st||(t=ot(t)),t?(t=t.rgb(),new E(t.r,t.g,t.b,t.opacity)):new E}function kt(t,n,e,r){return arguments.length===1?On(t):new E(t,n,e,r??1)}function E(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}Rt(E,kt,Wt(st,{brighter(t){return t=t==null?Mt:Math.pow(Mt,t),new E(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?_t:Math.pow(_t,t),new E(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new E(K(this.r),K(this.g),K(this.b),Et(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:sn,formatHex:sn,formatHex8:Yr,formatRgb:ln,toString:ln}));function sn(){return`#${G(this.r)}${G(this.g)}${G(this.b)}`}function Yr(){return`#${G(this.r)}${G(this.g)}${G(this.b)}${G((isNaN(this.opacity)?1:this.opacity)*255)}`}function ln(){const t=Et(this.opacity);return`${t===1?"rgb(":"rgba("}${K(this.r)}, ${K(this.g)}, ${K(this.b)}${t===1?")":`, ${t})`}`}function Et(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function K(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function G(t){return t=K(t),(t<16?"0":"")+t.toString(16)}function cn(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new L(t,n,e,r)}function Dn(t){if(t instanceof L)return new L(t.h,t.s,t.l,t.opacity);if(t instanceof st||(t=ot(t)),!t)return new L;if(t instanceof L)return t;t=t.rgb();var n=t.r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),o=Math.max(n,e,r),u=NaN,a=o-i,s=(o+i)/2;return a?(n===o?u=(e-r)/a+(e<r)*6:e===o?u=(r-n)/a+2:u=(n-e)/a+4,a/=s<.5?o+i:2-o-i,u*=60):a=s>0&&s<1?0:u,new L(u,a,s,t.opacity)}function Fr(t,n,e,r){return arguments.length===1?Dn(t):new L(t,n,e,r??1)}function L(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}Rt(L,Fr,Wt(st,{brighter(t){return t=t==null?Mt:Math.pow(Mt,t),new L(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?_t:Math.pow(_t,t),new L(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new E(Yt(t>=240?t-240:t+120,i,r),Yt(t,i,r),Yt(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new L(fn(this.h),xt(this.s),xt(this.l),Et(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 t=Et(this.opacity);return`${t===1?"hsl(":"hsla("}${fn(this.h)}, ${xt(this.s)*100}%, ${xt(this.l)*100}%${t===1?")":`, ${t})`}`}}));function fn(t){return t=(t||0)%360,t<0?t+360:t}function xt(t){return Math.max(0,Math.min(1,t||0))}function Yt(t,n,e){return(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)*255}function Tn(t,n,e,r,i){var o=t*t,u=o*t;return((1-3*t+3*o-u)*n+(4-6*o+3*u)*e+(1+3*t+3*o-3*u)*r+u*i)/6}function qr(t){var n=t.length-1;return function(e){var r=e<=0?e=0:e>=1?(e=1,n-1):Math.floor(e*n),i=t[r],o=t[r+1],u=r>0?t[r-1]:2*i-o,a=r<n-1?t[r+2]:2*o-i;return Tn((e-r/n)*n,u,i,o,a)}}function Xr(t){var n=t.length;return function(e){var r=Math.floor(((e%=1)<0?++e:e)*n),i=t[(r+n-1)%n],o=t[r%n],u=t[(r+1)%n],a=t[(r+2)%n];return Tn((e-r/n)*n,i,o,u,a)}}var Lt=t=>()=>t;function Rn(t,n){return function(e){return t+e*n}}function Br(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}function Vr(t,n){var e=n-t;return e?Rn(t,e>180||e<-180?e-360*Math.round(e/360):e):Lt(isNaN(t)?n:t)}function zr(t){return(t=+t)==1?Jt:function(n,e){return e-n?Br(n,e,t):Lt(isNaN(n)?e:n)}}function Jt(t,n){var e=n-t;return e?Rn(t,e):Lt(isNaN(t)?n:t)}var qt=(function t(n){var e=zr(n);function r(i,o){var u=e((i=kt(i)).r,(o=kt(o)).r),a=e(i.g,o.g),s=e(i.b,o.b),l=Jt(i.opacity,o.opacity);return function(c){return i.r=u(c),i.g=a(c),i.b=s(c),i.opacity=l(c),i+""}}return r.gamma=t,r})(1);function Ln(t){return function(n){var e=n.length,r=new Array(e),i=new Array(e),o=new Array(e),u,a;for(u=0;u<e;++u)a=kt(n[u]),r[u]=a.r||0,i[u]=a.g||0,o[u]=a.b||0;return r=t(r),i=t(i),o=t(o),a.opacity=1,function(s){return a.r=r(s),a.g=i(s),a.b=o(s),a+""}}}var _o=Ln(qr),go=Ln(Xr);function X(t,n){return t=+t,n=+n,function(e){return t*(1-e)+n*e}}var Xt=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ft=new RegExp(Xt.source,"g");function Ur(t){return function(){return t}}function Wr(t){return function(n){return t(n)+""}}function In(t,n){var e=Xt.lastIndex=Ft.lastIndex=0,r,i,o,u=-1,a=[],s=[];for(t=t+"",n=n+"";(r=Xt.exec(t))&&(i=Ft.exec(n));)(o=i.index)>e&&(o=n.slice(e,o),a[u]?a[u]+=o:a[++u]=o),(r=r[0])===(i=i[0])?a[u]?a[u]+=i:a[++u]=i:(a[++u]=null,s.push({i:u,x:X(r,i)})),e=Ft.lastIndex;return e<n.length&&(o=n.slice(e),a[u]?a[u]+=o:a[++u]=o),a.length<2?s[0]?Wr(s[0].x):Ur(n):(n=s.length,function(l){for(var c=0,f;c<n;++c)a[(f=s[c]).i]=f.x(l);return a.join("")})}var hn=180/Math.PI,Bt={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Hn(t,n,e,r,i,o){var u,a,s;return(u=Math.sqrt(t*t+n*n))&&(t/=u,n/=u),(s=t*e+n*r)&&(e-=t*s,r-=n*s),(a=Math.sqrt(e*e+r*r))&&(e/=a,r/=a,s/=a),t*r<n*e&&(t=-t,n=-n,s=-s,u=-u),{translateX:i,translateY:o,rotate:Math.atan2(n,t)*hn,skewX:Math.atan(s)*hn,scaleX:u,scaleY:a}}var At;function Jr(t){const n=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return n.isIdentity?Bt:Hn(n.a,n.b,n.c,n.d,n.e,n.f)}function Zr(t){return t==null||(At||(At=document.createElementNS("http://www.w3.org/2000/svg","g")),At.setAttribute("transform",t),!(t=At.transform.baseVal.consolidate()))?Bt:(t=t.matrix,Hn(t.a,t.b,t.c,t.d,t.e,t.f))}function Pn(t,n,e,r){function i(l){return l.length?l.pop()+" ":""}function o(l,c,f,g,_,b){if(l!==f||c!==g){var S=_.push("translate(",null,n,null,e);b.push({i:S-4,x:X(l,f)},{i:S-2,x:X(c,g)})}else(f||g)&&_.push("translate("+f+n+g+e)}function u(l,c,f,g){l!==c?(l-c>180?c+=360:c-l>180&&(l+=360),g.push({i:f.push(i(f)+"rotate(",null,r)-2,x:X(l,c)})):c&&f.push(i(f)+"rotate("+c+r)}function a(l,c,f,g){l!==c?g.push({i:f.push(i(f)+"skewX(",null,r)-2,x:X(l,c)}):c&&f.push(i(f)+"skewX("+c+r)}function s(l,c,f,g,_,b){if(l!==f||c!==g){var S=_.push(i(_)+"scale(",null,",",null,")");b.push({i:S-4,x:X(l,f)},{i:S-2,x:X(c,g)})}else(f!==1||g!==1)&&_.push(i(_)+"scale("+f+","+g+")")}return function(l,c){var f=[],g=[];return l=t(l),c=t(c),o(l.translateX,l.translateY,c.translateX,c.translateY,f,g),u(l.rotate,c.rotate,f,g),a(l.skewX,c.skewX,f,g),s(l.scaleX,l.scaleY,c.scaleX,c.scaleY,f,g),l=c=null,function(_){for(var b=-1,S=g.length,Y;++b<S;)f[(Y=g[b]).i]=Y.x(_);return f.join("")}}}var Gr=Pn(Jr,"px, ","px)","deg)"),Kr=Pn(Zr,", ",")",")"),ut=0,dt=0,ht=0,Yn=1e3,Ct,pt,Ot=0,Q=0,It=0,yt=typeof performance=="object"&&performance.now?performance:Date,Fn=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Zt(){return Q||(Fn(Qr),Q=yt.now()+It)}function Qr(){Q=0}function Dt(){this._call=this._time=this._next=null}Dt.prototype=qn.prototype={constructor:Dt,restart:function(t,n,e){if(typeof t!="function")throw new TypeError("callback is not a function");e=(e==null?Zt():+e)+(n==null?0:+n),!this._next&&pt!==this&&(pt?pt._next=this:Ct=this,pt=this),this._call=t,this._time=e,Vt()},stop:function(){this._call&&(this._call=null,this._time=1/0,Vt())}};function qn(t,n,e){var r=new Dt;return r.restart(t,n,e),r}function jr(){Zt(),++ut;for(var t=Ct,n;t;)(n=Q-t._time)>=0&&t._call.call(void 0,n),t=t._next;--ut}function dn(){Q=(Ot=yt.now())+It,ut=dt=0;try{jr()}finally{ut=0,ni(),Q=0}}function ti(){var t=yt.now(),n=t-Ot;n>Yn&&(It-=n,Ot=t)}function ni(){for(var t,n=Ct,e,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Ct=e);pt=t,Vt(r)}function Vt(t){ut||(dt&&(dt=clearTimeout(dt)),t-Q>24?(t<1/0&&(dt=setTimeout(dn,t-yt.now()-It)),ht&&(ht=clearInterval(ht))):(ht||(Ot=yt.now(),ht=setInterval(ti,Yn)),ut=1,Fn(dn)))}function pn(t,n,e){var r=new Dt;return n=n==null?0:+n,r.restart(i=>{r.stop(),t(i+n)},n,e),r}var ei=vn("start","end","cancel","interrupt"),ri=[];function Ht(t,n,e,r,i,o){var u=t.__transition;if(!u)t.__transition={};else if(e in u)return;ii(t,e,{name:n,index:r,group:i,on:ei,tween:ri,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function Gt(t,n){var e=I(t,n);if(e.state>0)throw new Error("too late; already scheduled");return e}function P(t,n){var e=I(t,n);if(e.state>3)throw new Error("too late; already running");return e}function I(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}function ii(t,n,e){var r=t.__transition,i;r[n]=e,e.timer=qn(o,0,e.time);function o(l){e.state=1,e.timer.restart(u,e.delay,e.time),e.delay<=l&&u(l-e.delay)}function u(l){var c,f,g,_;if(e.state!==1)return s();for(c in r)if(_=r[c],_.name===e.name){if(_.state===3)return pn(u);_.state===4?(_.state=6,_.timer.stop(),_.on.call("interrupt",t,t.__data__,_.index,_.group),delete r[c]):+c<n&&(_.state=6,_.timer.stop(),_.on.call("cancel",t,t.__data__,_.index,_.group),delete r[c])}if(pn(function(){e.state===3&&(e.state=4,e.timer.restart(a,e.delay,e.time),a(l))}),e.state=2,e.on.call("start",t,t.__data__,e.index,e.group),e.state===2){for(e.state=3,i=new Array(g=e.tween.length),c=0,f=-1;c<g;++c)(_=e.tween[c].value.call(t,t.__data__,e.index,e.group))&&(i[++f]=_);i.length=f+1}}function a(l){for(var c=l<e.duration?e.ease.call(null,l/e.duration):(e.timer.restart(s),e.state=5,1),f=-1,g=i.length;++f<g;)i[f].call(t,c);e.state===5&&(e.on.call("end",t,t.__data__,e.index,e.group),s())}function s(){e.state=6,e.timer.stop(),delete r[n];for(var l in r)return;delete t.__transition}}function oi(t,n){var e=t.__transition,r,i,o=!0,u;if(e){n=n==null?null:n+"";for(u in e){if((r=e[u]).name!==n){o=!1;continue}i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete e[u]}o&&delete t.__transition}}function ui(t){return this.each(function(){oi(this,t)})}function ai(t,n){var e,r;return function(){var i=P(this,t),o=i.tween;if(o!==e){r=e=o;for(var u=0,a=r.length;u<a;++u)if(r[u].name===n){r=r.slice(),r.splice(u,1);break}}i.tween=r}}function si(t,n,e){var r,i;if(typeof e!="function")throw new Error;return function(){var o=P(this,t),u=o.tween;if(u!==r){i=(r=u).slice();for(var a={name:n,value:e},s=0,l=i.length;s<l;++s)if(i[s].name===n){i[s]=a;break}s===l&&i.push(a)}o.tween=i}}function li(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r=I(this.node(),e).tween,i=0,o=r.length,u;i<o;++i)if((u=r[i]).name===t)return u.value;return null}return this.each((n==null?ai:si)(e,t,n))}function Kt(t,n,e){var r=t._id;return t.each(function(){var i=P(this,r);(i.value||(i.value={}))[n]=e.apply(this,arguments)}),function(i){return I(i,r).value[n]}}function Xn(t,n){var e;return(typeof n=="number"?X:n instanceof ot?qt:(e=ot(n))?(n=e,qt):In)(t,n)}function ci(t){return function(){this.removeAttribute(t)}}function fi(t){return function(){this.removeAttributeNS(t.space,t.local)}}function hi(t,n,e){var r,i=e+"",o;return function(){var u=this.getAttribute(t);return u===i?null:u===r?o:o=n(r=u,e)}}function di(t,n,e){var r,i=e+"",o;return function(){var u=this.getAttributeNS(t.space,t.local);return u===i?null:u===r?o:o=n(r=u,e)}}function pi(t,n,e){var r,i,o;return function(){var u,a=e(this),s;return a==null?void this.removeAttribute(t):(u=this.getAttribute(t),s=a+"",u===s?null:u===r&&s===i?o:(i=s,o=n(r=u,a)))}}function _i(t,n,e){var r,i,o;return function(){var u,a=e(this),s;return a==null?void this.removeAttributeNS(t.space,t.local):(u=this.getAttributeNS(t.space,t.local),s=a+"",u===s?null:u===r&&s===i?o:(i=s,o=n(r=u,a)))}}function gi(t,n){var e=Tt(t),r=e==="transform"?Kr:Xn;return this.attrTween(t,typeof n=="function"?(e.local?_i:pi)(e,r,Kt(this,"attr."+t,n)):n==null?(e.local?fi:ci)(e):(e.local?di:hi)(e,r,n))}function yi(t,n){return function(e){this.setAttribute(t,n.call(this,e))}}function vi(t,n){return function(e){this.setAttributeNS(t.space,t.local,n.call(this,e))}}function wi(t,n){var e,r;function i(){var o=n.apply(this,arguments);return o!==r&&(e=(r=o)&&vi(t,o)),e}return i._value=n,i}function mi(t,n){var e,r;function i(){var o=n.apply(this,arguments);return o!==r&&(e=(r=o)&&yi(t,o)),e}return i._value=n,i}function $i(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(n==null)return this.tween(e,null);if(typeof n!="function")throw new Error;var r=Tt(t);return this.tween(e,(r.local?wi:mi)(r,n))}function bi(t,n){return function(){Gt(this,t).delay=+n.apply(this,arguments)}}function xi(t,n){return n=+n,function(){Gt(this,t).delay=n}}function Ai(t){var n=this._id;return arguments.length?this.each((typeof t=="function"?bi:xi)(n,t)):I(this.node(),n).delay}function Si(t,n){return function(){P(this,t).duration=+n.apply(this,arguments)}}function Ni(t,n){return n=+n,function(){P(this,t).duration=n}}function Mi(t){var n=this._id;return arguments.length?this.each((typeof t=="function"?Si:Ni)(n,t)):I(this.node(),n).duration}function ki(t,n){if(typeof n!="function")throw new Error;return function(){P(this,t).ease=n}}function Ei(t){var n=this._id;return arguments.length?this.each(ki(n,t)):I(this.node(),n).ease}function Ci(t,n){return function(){var e=n.apply(this,arguments);if(typeof e!="function")throw new Error;P(this,t).ease=e}}function Oi(t){if(typeof t!="function")throw new Error;return this.each(Ci(this._id,t))}function Di(t){typeof t!="function"&&(t=$n(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o=n[i],u=o.length,a=r[i]=[],s,l=0;l<u;++l)(s=o[l])&&t.call(s,s.__data__,l,o)&&a.push(s);return new B(r,this._parents,this._name,this._id)}function Ti(t){if(t._id!==this._id)throw new Error;for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),u=new Array(r),a=0;a<o;++a)for(var s=n[a],l=e[a],c=s.length,f=u[a]=new Array(c),g,_=0;_<c;++_)(g=s[_]||l[_])&&(f[_]=g);for(;a<r;++a)u[a]=n[a];return new B(u,this._parents,this._name,this._id)}function Ri(t){return(t+"").trim().split(/^|\s+/).every(function(n){var e=n.indexOf(".");return e>=0&&(n=n.slice(0,e)),!n||n==="start"})}function Li(t,n,e){var r,i,o=Ri(n)?Gt:P;return function(){var u=o(this,t),a=u.on;a!==r&&(i=(r=a).copy()).on(n,e),u.on=i}}function Ii(t,n){var e=this._id;return arguments.length<2?I(this.node(),e).on.on(t):this.each(Li(e,t,n))}function Hi(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}function Pi(){return this.on("end.remove",Hi(this._id))}function Yi(t){var n=this._name,e=this._id;typeof t!="function"&&(t=zt(t));for(var r=this._groups,i=r.length,o=new Array(i),u=0;u<i;++u)for(var a=r[u],s=a.length,l=o[u]=new Array(s),c,f,g=0;g<s;++g)(c=a[g])&&(f=t.call(c,c.__data__,g,a))&&("__data__"in c&&(f.__data__=c.__data__),l[g]=f,Ht(l[g],n,e,g,l,I(c,e)));return new B(o,this._parents,n,e)}function Fi(t){var n=this._name,e=this._id;typeof t!="function"&&(t=mn(t));for(var r=this._groups,i=r.length,o=[],u=[],a=0;a<i;++a)for(var s=r[a],l=s.length,c,f=0;f<l;++f)if(c=s[f]){for(var g=t.call(c,c.__data__,f,s),_,b=I(c,e),S=0,Y=g.length;S<Y;++S)(_=g[S])&&Ht(_,n,e,S,g,b);o.push(g),u.push(c)}return new B(o,u,n,e)}var qi=at.prototype.constructor;function Xi(){return new qi(this._groups,this._parents)}function Bi(t,n){var e,r,i;return function(){var o=it(this,t),u=(this.style.removeProperty(t),it(this,t));return o===u?null:o===e&&u===r?i:i=n(e=o,r=u)}}function Bn(t){return function(){this.style.removeProperty(t)}}function Vi(t,n,e){var r,i=e+"",o;return function(){var u=it(this,t);return u===i?null:u===r?o:o=n(r=u,e)}}function zi(t,n,e){var r,i,o;return function(){var u=it(this,t),a=e(this),s=a+"";return a==null&&(s=a=(this.style.removeProperty(t),it(this,t))),u===s?null:u===r&&s===i?o:(i=s,o=n(r=u,a))}}function Ui(t,n){var e,r,i,o="style."+n,u="end."+o,a;return function(){var s=P(this,t),l=s.on,c=s.value[o]==null?a||(a=Bn(n)):void 0;(l!==e||i!==c)&&(r=(e=l).copy()).on(u,i=c),s.on=r}}function Wi(t,n,e){var r=(t+="")=="transform"?Gr:Xn;return n==null?this.styleTween(t,Bi(t,r)).on("end.style."+t,Bn(t)):typeof n=="function"?this.styleTween(t,zi(t,r,Kt(this,"style."+t,n))).each(Ui(this._id,t)):this.styleTween(t,Vi(t,r,n),e).on("end.style."+t,null)}function Ji(t,n,e){return function(r){this.style.setProperty(t,n.call(this,r),e)}}function Zi(t,n,e){var r,i;function o(){var u=n.apply(this,arguments);return u!==i&&(r=(i=u)&&Ji(t,u,e)),r}return o._value=n,o}function Gi(t,n,e){var r="style."+(t+="");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;return this.tween(r,Zi(t,n,e??""))}function Ki(t){return function(){this.textContent=t}}function Qi(t){return function(){var n=t(this);this.textContent=n??""}}function ji(t){return this.tween("text",typeof t=="function"?Qi(Kt(this,"text",t)):Ki(t==null?"":t+""))}function to(t){return function(n){this.textContent=t.call(this,n)}}function no(t){var n,e;function r(){var i=t.apply(this,arguments);return i!==e&&(n=(e=i)&&to(i)),n}return r._value=t,r}function eo(t){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;return this.tween(n,no(t))}function ro(){for(var t=this._name,n=this._id,e=Vn(),r=this._groups,i=r.length,o=0;o<i;++o)for(var u=r[o],a=u.length,s,l=0;l<a;++l)if(s=u[l]){var c=I(s,n);Ht(s,t,e,l,u,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new B(r,this._parents,t,e)}function io(){var t,n,e=this,r=e._id,i=e.size();return new Promise(function(o,u){var a={value:u},s={value:function(){--i===0&&o()}};e.each(function(){var l=P(this,r),c=l.on;c!==t&&(n=(t=c).copy(),n._.cancel.push(a),n._.interrupt.push(a),n._.end.push(s)),l.on=n}),i===0&&o()})}var oo=0;function B(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function uo(t){return at().transition(t)}function Vn(){return++oo}var q=at.prototype;B.prototype=uo.prototype={constructor:B,select:Yi,selectAll:Fi,selectChild:q.selectChild,selectChildren:q.selectChildren,filter:Di,merge:Ti,selection:Xi,transition:ro,call:q.call,nodes:q.nodes,node:q.node,size:q.size,empty:q.empty,each:q.each,on:Ii,attr:gi,attrTween:$i,style:Wi,styleTween:Gi,text:ji,textTween:eo,remove:Pi,tween:li,delay:Ai,duration:Mi,ease:Ei,easeVarying:Oi,end:io,[Symbol.iterator]:q[Symbol.iterator]};function ao(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var so={time:null,delay:0,duration:250,ease:ao};function lo(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))throw new Error(`transition ${n} not found`);return e}function co(t){var n,e;t instanceof B?(n=t._id,t=t._name):(n=Vn(),(e=so).time=Zt(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var u=r[o],a=u.length,s,l=0;l<a;++l)(s=u[l])&&Ht(s,t,n,l,u,e||lo(s,n));return new B(r,this._parents,t,n)}at.prototype.interrupt=ui;at.prototype.transition=co;var{abs:yo,max:vo,min:wo}=Math;function _n(t){return[+t[0],+t[1]]}function fo(t){return[_n(t[0]),_n(t[1])]}var mo={name:"x",handles:["w","e"].map(Qt),input:function(t,n){return t==null?null:[[+t[0],n[0][1]],[+t[1],n[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},$o={name:"y",handles:["n","s"].map(Qt),input:function(t,n){return t==null?null:[[n[0][0],+t[0]],[n[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},bo={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Qt),input:function(t){return t==null?null:fo(t)},output:function(t){return t}};function Qt(t){return{type:t}}function et(t,n,e){this.k=t,this.x=n,this.y=e}et.prototype={constructor:et,scale:function(t){return t===1?this:new et(this.k*t,this.x,this.y)},translate:function(t,n){return t===0&n===0?this:new et(this.k,this.x+this.k*t,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var ho=new et(1,0,0);po.prototype=et.prototype;function po(t){for(;!t.__zoom;)if(!(t=t.parentNode))return ho;return t.__zoom}Object.defineProperty(exports,"Color",{enumerable:!0,get:function(){return st}});Object.defineProperty(exports,"Rgb",{enumerable:!0,get:function(){return E}});Object.defineProperty(exports,"color",{enumerable:!0,get:function(){return ot}});Object.defineProperty(exports,"constant_default",{enumerable:!0,get:function(){return Lt}});Object.defineProperty(exports,"define_default",{enumerable:!0,get:function(){return Rt}});Object.defineProperty(exports,"extend",{enumerable:!0,get:function(){return Wt}});Object.defineProperty(exports,"hue",{enumerable:!0,get:function(){return Vr}});Object.defineProperty(exports,"log",{enumerable:!0,get:function(){return O}});Object.defineProperty(exports,"nogamma",{enumerable:!0,get:function(){return Jt}});Object.defineProperty(exports,"number_default",{enumerable:!0,get:function(){return X}});Object.defineProperty(exports,"require_dayjs_min",{enumerable:!0,get:function(){return yn}});Object.defineProperty(exports,"rgbConvert",{enumerable:!0,get:function(){return On}});Object.defineProperty(exports,"rgb_default",{enumerable:!0,get:function(){return qt}});Object.defineProperty(exports,"select_default",{enumerable:!0,get:function(){return Er}});Object.defineProperty(exports,"setLogLevel",{enumerable:!0,get:function(){return Un}});Object.defineProperty(exports,"string_default",{enumerable:!0,get:function(){return In}});