mermaid
Version:
Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.
1 lines • 120 kB
JavaScript
import{a as r,b as fu,e as lu}from"./chunk-GTKDMUJJ.mjs";var Bo=fu((fr,lr)=>{"use strict";(function(t,e){typeof fr=="object"&&typeof lr<"u"?lr.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e()})(fr,function(){"use strict";var t=1e3,e=6e4,n=36e5,i="millisecond",o="second",a="minute",s="hour",u="day",l="week",f="month",h="quarter",p="year",c="date",m="Invalid Date",_=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,M=/\[([^\]]+)]|Y{1,4}|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,T={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:r(function(v){var d=["th","st","nd","rd"],x=v%100;return"["+v+(d[(x-20)%10]||d[x]||d[0])+"]"},"ordinal")},k=r(function(v,d,x){var S=String(v);return!S||S.length>=d?v:""+Array(d+1-S.length).join(x)+v},"m"),I={s:k,z:r(function(v){var d=-v.utcOffset(),x=Math.abs(d),S=Math.floor(x/60),y=x%60;return(d<=0?"+":"-")+k(S,2,"0")+":"+k(y,2,"0")},"z"),m:r(function v(d,x){if(d.date()<x.date())return-v(x,d);var S=12*(x.year()-d.year())+(x.month()-d.month()),y=d.clone().add(S,f),D=x-y<0,$=d.clone().add(S+(D?-1:1),f);return+(-(S+(x-y)/(D?y-$:$-y))||0)},"t"),a:r(function(v){return v<0?Math.ceil(v)||0:Math.floor(v)},"a"),p:r(function(v){return{M:f,y:p,w:l,d:u,D:c,h:s,m:a,s:o,ms:i,Q:h}[v]||String(v||"").toLowerCase().replace(/s$/,"")},"p"),u:r(function(v){return v===void 0},"u")},C="en",A={};A[C]=T;var O="$isDayjsObject",w=r(function(v){return v instanceof B||!(!v||!v[O])},"S"),Y=r(function v(d,x,S){var y;if(!d)return C;if(typeof d=="string"){var D=d.toLowerCase();A[D]&&(y=D),x&&(A[D]=x,y=D);var $=d.split("-");if(!y&&$.length>1)return v($[0])}else{var P=d.name;A[P]=d,y=P}return!S&&y&&(C=y),y||!S&&C},"t"),U=r(function(v,d){if(w(v))return v.clone();var x=typeof d=="object"?d:{};return x.date=v,x.args=arguments,new B(x)},"O"),E=I;E.l=Y,E.i=w,E.w=function(v,d){return U(v,{locale:d.$L,utc:d.$u,x:d.$x,$offset:d.$offset})};var B=function(){function v(x){this.$L=Y(x.locale,null,!0),this.parse(x),this.$x=this.$x||x.x||{},this[O]=!0}r(v,"M");var d=v.prototype;return d.parse=function(x){this.$d=function(S){var y=S.date,D=S.utc;if(y===null)return new Date(NaN);if(E.u(y))return new Date;if(y instanceof Date)return new Date(y);if(typeof y=="string"&&!/Z$/i.test(y)){var $=y.match(_);if($){var P=$[2]-1||0,z=($[7]||"0").substring(0,3);return D?new Date(Date.UTC($[1],P,$[3]||1,$[4]||0,$[5]||0,$[6]||0,z)):new Date($[1],P,$[3]||1,$[4]||0,$[5]||0,$[6]||0,z)}}return new Date(y)}(x),this.init()},d.init=function(){var x=this.$d;this.$y=x.getFullYear(),this.$M=x.getMonth(),this.$D=x.getDate(),this.$W=x.getDay(),this.$H=x.getHours(),this.$m=x.getMinutes(),this.$s=x.getSeconds(),this.$ms=x.getMilliseconds()},d.$utils=function(){return E},d.isValid=function(){return this.$d.toString()!==m},d.isSame=function(x,S){var y=U(x);return this.startOf(S)<=y&&y<=this.endOf(S)},d.isAfter=function(x,S){return U(x)<this.startOf(S)},d.isBefore=function(x,S){return this.endOf(S)<U(x)},d.$g=function(x,S,y){return E.u(x)?this[S]:this.set(y,x)},d.unix=function(){return Math.floor(this.valueOf()/1e3)},d.valueOf=function(){return this.$d.getTime()},d.startOf=function(x,S){var y=this,D=!!E.u(S)||S,$=E.p(x),P=r(function(st,Z){var b=E.w(y.$u?Date.UTC(y.$y,Z,st):new Date(y.$y,Z,st),y);return D?b:b.endOf(u)},"l"),z=r(function(st,Z){return E.w(y.toDate()[st].apply(y.toDate("s"),(D?[0,0,0,0]:[23,59,59,999]).slice(Z)),y)},"$"),W=this.$W,X=this.$M,J=this.$D,ht="set"+(this.$u?"UTC":"");switch($){case p:return D?P(1,0):P(31,11);case f:return D?P(1,X):P(0,X+1);case l:var Q=this.$locale().weekStart||0,dt=(W<Q?W+7:W)-Q;return P(D?J-dt:J+(6-dt),X);case u:case c:return z(ht+"Hours",0);case s:return z(ht+"Minutes",1);case a:return z(ht+"Seconds",2);case o:return z(ht+"Milliseconds",3);default:return this.clone()}},d.endOf=function(x){return this.startOf(x,!1)},d.$set=function(x,S){var y,D=E.p(x),$="set"+(this.$u?"UTC":""),P=(y={},y[u]=$+"Date",y[c]=$+"Date",y[f]=$+"Month",y[p]=$+"FullYear",y[s]=$+"Hours",y[a]=$+"Minutes",y[o]=$+"Seconds",y[i]=$+"Milliseconds",y)[D],z=D===u?this.$D+(S-this.$W):S;if(D===f||D===p){var W=this.clone().set(c,1);W.$d[P](z),W.init(),this.$d=W.set(c,Math.min(this.$D,W.daysInMonth())).$d}else P&&this.$d[P](z);return this.init(),this},d.set=function(x,S){return this.clone().$set(x,S)},d.get=function(x){return this[E.p(x)]()},d.add=function(x,S){var y,D=this;x=Number(x);var $=E.p(S),P=r(function(X){var J=U(D);return E.w(J.date(J.date()+Math.round(X*x)),D)},"y");if($===f)return this.set(f,this.$M+x);if($===p)return this.set(p,this.$y+x);if($===u)return P(1);if($===l)return P(7);var z=(y={},y[a]=e,y[s]=n,y[o]=t,y)[$]||1,W=this.$d.getTime()+x*z;return E.w(W,this)},d.subtract=function(x,S){return this.add(-1*x,S)},d.format=function(x){var S=this,y=this.$locale();if(!this.isValid())return y.invalidDate||m;var D=x||"YYYY-MM-DDTHH:mm:ssZ",$=E.z(this),P=this.$H,z=this.$m,W=this.$M,X=y.weekdays,J=y.months,ht=y.meridiem,Q=r(function(Z,b,R,F){return Z&&(Z[b]||Z(S,D))||R[b].slice(0,F)},"h"),dt=r(function(Z){return E.s(P%12||12,Z,"0")},"d"),st=ht||function(Z,b,R){var F=Z<12?"AM":"PM";return R?F.toLowerCase():F};return D.replace(M,function(Z,b){return b||function(R){switch(R){case"YY":return String(S.$y).slice(-2);case"YYYY":return E.s(S.$y,4,"0");case"M":return W+1;case"MM":return E.s(W+1,2,"0");case"MMM":return Q(y.monthsShort,W,J,3);case"MMMM":return Q(J,W);case"D":return S.$D;case"DD":return E.s(S.$D,2,"0");case"d":return String(S.$W);case"dd":return Q(y.weekdaysMin,S.$W,X,2);case"ddd":return Q(y.weekdaysShort,S.$W,X,3);case"dddd":return X[S.$W];case"H":return String(P);case"HH":return E.s(P,2,"0");case"h":return dt(1);case"hh":return dt(2);case"a":return st(P,z,!0);case"A":return st(P,z,!1);case"m":return String(z);case"mm":return E.s(z,2,"0");case"s":return String(S.$s);case"ss":return E.s(S.$s,2,"0");case"SSS":return E.s(S.$ms,3,"0");case"Z":return $}return null}(Z)||$.replace(":","")})},d.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},d.diff=function(x,S,y){var D,$=this,P=E.p(S),z=U(x),W=(z.utcOffset()-this.utcOffset())*e,X=this-z,J=r(function(){return E.m($,z)},"D");switch(P){case p:D=J()/12;break;case f:D=J();break;case h:D=J()/3;break;case l:D=(X-W)/6048e5;break;case u:D=(X-W)/864e5;break;case s:D=X/n;break;case a:D=X/e;break;case o:D=X/t;break;default:D=X}return y?D:E.a(D)},d.daysInMonth=function(){return this.endOf(f).$D},d.$locale=function(){return A[this.$L]},d.locale=function(x,S){if(!x)return this.$L;var y=this.clone(),D=Y(x,S,!0);return D&&(y.$L=D),y},d.clone=function(){return E.w(this.$d,this)},d.toDate=function(){return new Date(this.valueOf())},d.toJSON=function(){return this.isValid()?this.toISOString():null},d.toISOString=function(){return this.$d.toISOString()},d.toString=function(){return this.$d.toUTCString()},v}(),N=B.prototype;return U.prototype=N,[["$ms",i],["$s",o],["$m",a],["$H",s],["$W",u],["$M",f],["$y",p],["$D",c]].forEach(function(v){N[v[1]]=function(d){return this.$g(d,v[0],v[1])}}),U.extend=function(v,d){return v.$i||(v(d,B,U),v.$i=!0),U},U.locale=Y,U.isDayjs=w,U.unix=function(v){return U(1e3*v)},U.en=A[C],U.Ls=A,U.p={},U})});var qo=lu(Bo(),1);var St={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},pt={trace:r((...t)=>{},"trace"),debug:r((...t)=>{},"debug"),info:r((...t)=>{},"info"),warn:r((...t)=>{},"warn"),error:r((...t)=>{},"error"),fatal:r((...t)=>{},"fatal")},Wh=r(function(t="fatal"){let e=St.fatal;typeof t=="string"?t.toLowerCase()in St&&(e=St[t]):typeof t=="number"&&(e=t),pt.trace=()=>{},pt.debug=()=>{},pt.info=()=>{},pt.warn=()=>{},pt.error=()=>{},pt.fatal=()=>{},e<=St.fatal&&(pt.fatal=console.error?console.error.bind(console,mt("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",mt("FATAL"))),e<=St.error&&(pt.error=console.error?console.error.bind(console,mt("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",mt("ERROR"))),e<=St.warn&&(pt.warn=console.warn?console.warn.bind(console,mt("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",mt("WARN"))),e<=St.info&&(pt.info=console.info?console.info.bind(console,mt("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",mt("INFO"))),e<=St.debug&&(pt.debug=console.debug?console.debug.bind(console,mt("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",mt("DEBUG"))),e<=St.trace&&(pt.trace=console.debug?console.debug.bind(console,mt("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",mt("TRACE")))},"setLogLevel"),mt=r(t=>`%c${(0,qo.default)().format("ss.SSS")} : ${t} : `,"format");function Wo(t,e){let n;if(e===void 0)for(let i of t)i!=null&&(n<i||n===void 0&&i>=i)&&(n=i);else{let i=-1;for(let o of t)(o=e(o,++i,t))!=null&&(n<o||n===void 0&&o>=o)&&(n=o)}return n}r(Wo,"max");function Vo(t,e){let n;if(e===void 0)for(let i of t)i!=null&&(n>i||n===void 0&&i>=i)&&(n=i);else{let i=-1;for(let o of t)(o=e(o,++i,t))!=null&&(n>o||n===void 0&&o>=o)&&(n=o)}return n}r(Vo,"min");function Vt(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}r(Vt,"ascending");function cr(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}r(cr,"descending");function Xt(t){let e,n,i;t.length!==2?(e=Vt,n=r((u,l)=>Vt(t(u),l),"compare2"),i=r((u,l)=>t(u)-l,"delta")):(e=t===Vt||t===cr?t:cu,n=t,i=t);function o(u,l,f=0,h=u.length){if(f<h){if(e(l,l)!==0)return h;do{let p=f+h>>>1;n(u[p],l)<0?f=p+1:h=p}while(f<h)}return f}r(o,"left");function a(u,l,f=0,h=u.length){if(f<h){if(e(l,l)!==0)return h;do{let p=f+h>>>1;n(u[p],l)<=0?f=p+1:h=p}while(f<h)}return f}r(a,"right");function s(u,l,f=0,h=u.length){let p=o(u,l,f,h-1);return p>f&&i(u[p-1],l)>-i(u[p],l)?p-1:p}return r(s,"center"),{left:o,center:s,right:a}}r(Xt,"bisector");function cu(){return 0}r(cu,"zero");function hr(t){return t===null?NaN:+t}r(hr,"number");var Xo=Xt(Vt),Go=Xo.right,hu=Xo.left,pu=Xt(hr).center,pr=Go;var fe=class extends Map{static{r(this,"InternMap")}constructor(e,n=xu){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(let[i,o]of e)this.set(i,o)}get(e){return super.get(Zo(this,e))}has(e){return super.has(Zo(this,e))}set(e,n){return super.set(mu(this,e),n)}delete(e){return super.delete(du(this,e))}};function Zo({_intern:t,_key:e},n){let i=e(n);return t.has(i)?t.get(i):n}r(Zo,"intern_get");function mu({_intern:t,_key:e},n){let i=e(n);return t.has(i)?t.get(i):(t.set(i,n),n)}r(mu,"intern_set");function du({_intern:t,_key:e},n){let i=e(n);return t.has(i)&&(n=t.get(i),t.delete(i)),n}r(du,"intern_delete");function xu(t){return t!==null&&typeof t=="object"?t.valueOf():t}r(xu,"keyof");var _u=Math.sqrt(50),gu=Math.sqrt(10),yu=Math.sqrt(2);function cn(t,e,n){let i=(e-t)/Math.max(0,n),o=Math.floor(Math.log10(i)),a=i/Math.pow(10,o),s=a>=_u?10:a>=gu?5:a>=yu?2:1,u,l,f;return o<0?(f=Math.pow(10,-o)/s,u=Math.round(t*f),l=Math.round(e*f),u/f<t&&++u,l/f>e&&--l,f=-f):(f=Math.pow(10,o)*s,u=Math.round(t/f),l=Math.round(e/f),u*f<t&&++u,l*f>e&&--l),l<u&&.5<=n&&n<2?cn(t,e,n*2):[u,l,f]}r(cn,"tickSpec");function hn(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];let i=e<t,[o,a,s]=i?cn(e,t,n):cn(t,e,n);if(!(a>=o))return[];let u=a-o+1,l=new Array(u);if(i)if(s<0)for(let f=0;f<u;++f)l[f]=(a-f)/-s;else for(let f=0;f<u;++f)l[f]=(a-f)*s;else if(s<0)for(let f=0;f<u;++f)l[f]=(o+f)/-s;else for(let f=0;f<u;++f)l[f]=(o+f)*s;return l}r(hn,"ticks");function Ee(t,e,n){return e=+e,t=+t,n=+n,cn(t,e,n)[2]}r(Ee,"tickIncrement");function le(t,e,n){e=+e,t=+t,n=+n;let i=e<t,o=i?Ee(e,t,n):Ee(t,e,n);return(i?-1:1)*(o<0?1/-o:o)}r(le,"tickStep");function pn(t,e,n){t=+t,e=+e,n=(o=arguments.length)<2?(e=t,t=0,1):o<3?1:+n;for(var i=-1,o=Math.max(0,Math.ceil((e-t)/n))|0,a=new Array(o);++i<o;)a[i]=t+i*n;return a}r(pn,"range");function mr(t){return t}r(mr,"default");var dn=1,dr=2,xr=3,mn=4,Qo=1e-6;function vu(t){return"translate("+t+",0)"}r(vu,"translateX");function wu(t){return"translate(0,"+t+")"}r(wu,"translateY");function bu(t){return e=>+t(e)}r(bu,"number");function Mu(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}r(Mu,"center");function Tu(){return!this.__axis}r(Tu,"entering");function Ko(t,e){var n=[],i=null,o=null,a=6,s=6,u=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,f=t===dn||t===mn?-1:1,h=t===mn||t===dr?"x":"y",p=t===dn||t===xr?vu:wu;function c(m){var _=i??(e.ticks?e.ticks.apply(e,n):e.domain()),M=o??(e.tickFormat?e.tickFormat.apply(e,n):mr),T=Math.max(a,0)+u,k=e.range(),I=+k[0]+l,C=+k[k.length-1]+l,A=(e.bandwidth?Mu:bu)(e.copy(),l),O=m.selection?m.selection():m,w=O.selectAll(".domain").data([null]),Y=O.selectAll(".tick").data(_,e).order(),U=Y.exit(),E=Y.enter().append("g").attr("class","tick"),B=Y.select("line"),N=Y.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),Y=Y.merge(E),B=B.merge(E.append("line").attr("stroke","currentColor").attr(h+"2",f*a)),N=N.merge(E.append("text").attr("fill","currentColor").attr(h,f*T).attr("dy",t===dn?"0em":t===xr?"0.71em":"0.32em")),m!==O&&(w=w.transition(m),Y=Y.transition(m),B=B.transition(m),N=N.transition(m),U=U.transition(m).attr("opacity",Qo).attr("transform",function(v){return isFinite(v=A(v))?p(v+l):this.getAttribute("transform")}),E.attr("opacity",Qo).attr("transform",function(v){var d=this.parentNode.__axis;return p((d&&isFinite(d=d(v))?d:A(v))+l)})),U.remove(),w.attr("d",t===mn||t===dr?s?"M"+f*s+","+I+"H"+l+"V"+C+"H"+f*s:"M"+l+","+I+"V"+C:s?"M"+I+","+f*s+"V"+l+"H"+C+"V"+f*s:"M"+I+","+l+"H"+C),Y.attr("opacity",1).attr("transform",function(v){return p(A(v)+l)}),B.attr(h+"2",f*a),N.attr(h,f*T).text(M),O.filter(Tu).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===dr?"start":t===mn?"end":"middle"),O.each(function(){this.__axis=A})}return r(c,"axis"),c.scale=function(m){return arguments.length?(e=m,c):e},c.ticks=function(){return n=Array.from(arguments),c},c.tickArguments=function(m){return arguments.length?(n=m==null?[]:Array.from(m),c):n.slice()},c.tickValues=function(m){return arguments.length?(i=m==null?null:Array.from(m),c):i&&i.slice()},c.tickFormat=function(m){return arguments.length?(o=m,c):o},c.tickSize=function(m){return arguments.length?(a=s=+m,c):a},c.tickSizeInner=function(m){return arguments.length?(a=+m,c):a},c.tickSizeOuter=function(m){return arguments.length?(s=+m,c):s},c.tickPadding=function(m){return arguments.length?(u=+m,c):u},c.offset=function(m){return arguments.length?(l=+m,c):l},c}r(Ko,"axis");function ku(t){return Ko(dn,t)}r(ku,"axisTop");function Su(t){return Ko(xr,t)}r(Su,"axisBottom");function Cu(){}r(Cu,"none");function It(t){return t==null?Cu:function(){return this.querySelector(t)}}r(It,"default");function _r(t){typeof t!="function"&&(t=It(t));for(var e=this._groups,n=e.length,i=new Array(n),o=0;o<n;++o)for(var a=e[o],s=a.length,u=i[o]=new Array(s),l,f,h=0;h<s;++h)(l=a[h])&&(f=t.call(l,l.__data__,h,a))&&("__data__"in l&&(f.__data__=l.__data__),u[h]=f);return new G(i,this._parents)}r(_r,"default");function gr(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}r(gr,"array");function Nu(){return[]}r(Nu,"empty");function ce(t){return t==null?Nu:function(){return this.querySelectorAll(t)}}r(ce,"default");function Au(t){return function(){return gr(t.apply(this,arguments))}}r(Au,"arrayAll");function yr(t){typeof t=="function"?t=Au(t):t=ce(t);for(var e=this._groups,n=e.length,i=[],o=[],a=0;a<n;++a)for(var s=e[a],u=s.length,l,f=0;f<u;++f)(l=s[f])&&(i.push(t.call(l,l.__data__,f,s)),o.push(l));return new G(i,o)}r(yr,"default");function he(t){return function(){return this.matches(t)}}r(he,"default");function xn(t){return function(e){return e.matches(t)}}r(xn,"childMatcher");var Du=Array.prototype.find;function $u(t){return function(){return Du.call(this.children,t)}}r($u,"childFind");function Ou(){return this.firstElementChild}r(Ou,"childFirst");function vr(t){return this.select(t==null?Ou:$u(typeof t=="function"?t:xn(t)))}r(vr,"default");var Eu=Array.prototype.filter;function Iu(){return Array.from(this.children)}r(Iu,"children");function Ru(t){return function(){return Eu.call(this.children,t)}}r(Ru,"childrenFilter");function wr(t){return this.selectAll(t==null?Iu:Ru(typeof t=="function"?t:xn(t)))}r(wr,"default");function br(t){typeof t!="function"&&(t=he(t));for(var e=this._groups,n=e.length,i=new Array(n),o=0;o<n;++o)for(var a=e[o],s=a.length,u=i[o]=[],l,f=0;f<s;++f)(l=a[f])&&t.call(l,l.__data__,f,a)&&u.push(l);return new G(i,this._parents)}r(br,"default");function Ie(t){return new Array(t.length)}r(Ie,"default");function Mr(){return new G(this._enter||this._groups.map(Ie),this._parents)}r(Mr,"default");function Re(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}r(Re,"EnterNode");Re.prototype={constructor:Re,appendChild:r(function(t){return this._parent.insertBefore(t,this._next)},"appendChild"),insertBefore:r(function(t,e){return this._parent.insertBefore(t,e)},"insertBefore"),querySelector:r(function(t){return this._parent.querySelector(t)},"querySelector"),querySelectorAll:r(function(t){return this._parent.querySelectorAll(t)},"querySelectorAll")};function Tr(t){return function(){return t}}r(Tr,"default");function Pu(t,e,n,i,o,a){for(var s=0,u,l=e.length,f=a.length;s<f;++s)(u=e[s])?(u.__data__=a[s],i[s]=u):n[s]=new Re(t,a[s]);for(;s<l;++s)(u=e[s])&&(o[s]=u)}r(Pu,"bindIndex");function Yu(t,e,n,i,o,a,s){var u,l,f=new Map,h=e.length,p=a.length,c=new Array(h),m;for(u=0;u<h;++u)(l=e[u])&&(c[u]=m=s.call(l,l.__data__,u,e)+"",f.has(m)?o[u]=l:f.set(m,l));for(u=0;u<p;++u)m=s.call(t,a[u],u,a)+"",(l=f.get(m))?(i[u]=l,l.__data__=a[u],f.delete(m)):n[u]=new Re(t,a[u]);for(u=0;u<h;++u)(l=e[u])&&f.get(c[u])===l&&(o[u]=l)}r(Yu,"bindKey");function Fu(t){return t.__data__}r(Fu,"datum");function kr(t,e){if(!arguments.length)return Array.from(this,Fu);var n=e?Yu:Pu,i=this._parents,o=this._groups;typeof t!="function"&&(t=Tr(t));for(var a=o.length,s=new Array(a),u=new Array(a),l=new Array(a),f=0;f<a;++f){var h=i[f],p=o[f],c=p.length,m=Uu(t.call(h,h&&h.__data__,f,i)),_=m.length,M=u[f]=new Array(_),T=s[f]=new Array(_),k=l[f]=new Array(c);n(h,p,M,T,k,m,e);for(var I=0,C=0,A,O;I<_;++I)if(A=M[I]){for(I>=C&&(C=I+1);!(O=T[C])&&++C<_;);A._next=O||null}}return s=new G(s,i),s._enter=u,s._exit=l,s}r(kr,"default");function Uu(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}r(Uu,"arraylike");function Sr(){return new G(this._exit||this._groups.map(Ie),this._parents)}r(Sr,"default");function Cr(t,e,n){var i=this.enter(),o=this,a=this.exit();return typeof t=="function"?(i=t(i),i&&(i=i.selection())):i=i.append(t+""),e!=null&&(o=e(o),o&&(o=o.selection())),n==null?a.remove():n(a),i&&o?i.merge(o).order():o}r(Cr,"default");function Nr(t){for(var e=t.selection?t.selection():t,n=this._groups,i=e._groups,o=n.length,a=i.length,s=Math.min(o,a),u=new Array(o),l=0;l<s;++l)for(var f=n[l],h=i[l],p=f.length,c=u[l]=new Array(p),m,_=0;_<p;++_)(m=f[_]||h[_])&&(c[_]=m);for(;l<o;++l)u[l]=n[l];return new G(u,this._parents)}r(Nr,"default");function Ar(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var i=t[e],o=i.length-1,a=i[o],s;--o>=0;)(s=i[o])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}r(Ar,"default");function Dr(t){t||(t=Lu);function e(p,c){return p&&c?t(p.__data__,c.__data__):!p-!c}r(e,"compareNode");for(var n=this._groups,i=n.length,o=new Array(i),a=0;a<i;++a){for(var s=n[a],u=s.length,l=o[a]=new Array(u),f,h=0;h<u;++h)(f=s[h])&&(l[h]=f);l.sort(e)}return new G(o,this._parents).order()}r(Dr,"default");function Lu(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}r(Lu,"ascending");function $r(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}r($r,"default");function Or(){return Array.from(this)}r(Or,"default");function Er(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],o=0,a=i.length;o<a;++o){var s=i[o];if(s)return s}return null}r(Er,"default");function Ir(){let t=0;for(let e of this)++t;return t}r(Ir,"default");function Rr(){return!this.node()}r(Rr,"default");function Pr(t){for(var e=this._groups,n=0,i=e.length;n<i;++n)for(var o=e[n],a=0,s=o.length,u;a<s;++a)(u=o[a])&&t.call(u,u.__data__,a,o);return this}r(Pr,"default");var _n="http://www.w3.org/1999/xhtml",Yr={svg:"http://www.w3.org/2000/svg",xhtml:_n,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function wt(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Yr.hasOwnProperty(e)?{space:Yr[e],local:t}:t}r(wt,"default");function zu(t){return function(){this.removeAttribute(t)}}r(zu,"attrRemove");function Hu(t){return function(){this.removeAttributeNS(t.space,t.local)}}r(Hu,"attrRemoveNS");function Bu(t,e){return function(){this.setAttribute(t,e)}}r(Bu,"attrConstant");function qu(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}r(qu,"attrConstantNS");function Wu(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}r(Wu,"attrFunction");function Vu(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}r(Vu,"attrFunctionNS");function Fr(t,e){var n=wt(t);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((e==null?n.local?Hu:zu:typeof e=="function"?n.local?Vu:Wu:n.local?qu:Bu)(n,e))}r(Fr,"default");function Pe(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}r(Pe,"default");function Xu(t){return function(){this.style.removeProperty(t)}}r(Xu,"styleRemove");function Gu(t,e,n){return function(){this.style.setProperty(t,e,n)}}r(Gu,"styleConstant");function Zu(t,e,n){return function(){var i=e.apply(this,arguments);i==null?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}r(Zu,"styleFunction");function Ur(t,e,n){return arguments.length>1?this.each((e==null?Xu:typeof e=="function"?Zu:Gu)(t,e,n??"")):Rt(this.node(),t)}r(Ur,"default");function Rt(t,e){return t.style.getPropertyValue(e)||Pe(t).getComputedStyle(t,null).getPropertyValue(e)}r(Rt,"styleValue");function Qu(t){return function(){delete this[t]}}r(Qu,"propertyRemove");function Ku(t,e){return function(){this[t]=e}}r(Ku,"propertyConstant");function Ju(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}r(Ju,"propertyFunction");function Lr(t,e){return arguments.length>1?this.each((e==null?Qu:typeof e=="function"?Ju:Ku)(t,e)):this.node()[t]}r(Lr,"default");function Jo(t){return t.trim().split(/^|\s+/)}r(Jo,"classArray");function zr(t){return t.classList||new jo(t)}r(zr,"classList");function jo(t){this._node=t,this._names=Jo(t.getAttribute("class")||"")}r(jo,"ClassList");jo.prototype={add:r(function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},"add"),remove:r(function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},"remove"),contains:r(function(t){return this._names.indexOf(t)>=0},"contains")};function ta(t,e){for(var n=zr(t),i=-1,o=e.length;++i<o;)n.add(e[i])}r(ta,"classedAdd");function ea(t,e){for(var n=zr(t),i=-1,o=e.length;++i<o;)n.remove(e[i])}r(ea,"classedRemove");function ju(t){return function(){ta(this,t)}}r(ju,"classedTrue");function tf(t){return function(){ea(this,t)}}r(tf,"classedFalse");function ef(t,e){return function(){(e.apply(this,arguments)?ta:ea)(this,t)}}r(ef,"classedFunction");function Hr(t,e){var n=Jo(t+"");if(arguments.length<2){for(var i=zr(this.node()),o=-1,a=n.length;++o<a;)if(!i.contains(n[o]))return!1;return!0}return this.each((typeof e=="function"?ef:e?ju:tf)(n,e))}r(Hr,"default");function nf(){this.textContent=""}r(nf,"textRemove");function rf(t){return function(){this.textContent=t}}r(rf,"textConstant");function of(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}r(of,"textFunction");function Br(t){return arguments.length?this.each(t==null?nf:(typeof t=="function"?of:rf)(t)):this.node().textContent}r(Br,"default");function af(){this.innerHTML=""}r(af,"htmlRemove");function sf(t){return function(){this.innerHTML=t}}r(sf,"htmlConstant");function uf(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}r(uf,"htmlFunction");function qr(t){return arguments.length?this.each(t==null?af:(typeof t=="function"?uf:sf)(t)):this.node().innerHTML}r(qr,"default");function ff(){this.nextSibling&&this.parentNode.appendChild(this)}r(ff,"raise");function Wr(){return this.each(ff)}r(Wr,"default");function lf(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}r(lf,"lower");function Vr(){return this.each(lf)}r(Vr,"default");function cf(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===_n&&e.documentElement.namespaceURI===_n?e.createElement(t):e.createElementNS(n,t)}}r(cf,"creatorInherit");function hf(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}r(hf,"creatorFixed");function Ye(t){var e=wt(t);return(e.local?hf:cf)(e)}r(Ye,"default");function Xr(t){var e=typeof t=="function"?t:Ye(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}r(Xr,"default");function pf(){return null}r(pf,"constantNull");function Gr(t,e){var n=typeof t=="function"?t:Ye(t),i=e==null?pf:typeof e=="function"?e:It(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})}r(Gr,"default");function mf(){var t=this.parentNode;t&&t.removeChild(this)}r(mf,"remove");function Zr(){return this.each(mf)}r(Zr,"default");function df(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}r(df,"selection_cloneShallow");function xf(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}r(xf,"selection_cloneDeep");function Qr(t){return this.select(t?xf:df)}r(Qr,"default");function Kr(t){return arguments.length?this.property("__data__",t):this.node().__data__}r(Kr,"default");function _f(t){return function(e){t.call(this,e,this.__data__)}}r(_f,"contextListener");function gf(t){return t.trim().split(/^|\s+/).map(function(e){var n="",i=e.indexOf(".");return i>=0&&(n=e.slice(i+1),e=e.slice(0,i)),{type:e,name:n}})}r(gf,"parseTypenames");function yf(t){return function(){var e=this.__on;if(e){for(var n=0,i=-1,o=e.length,a;n<o;++n)a=e[n],(!t.type||a.type===t.type)&&a.name===t.name?this.removeEventListener(a.type,a.listener,a.options):e[++i]=a;++i?e.length=i:delete this.__on}}}r(yf,"onRemove");function vf(t,e,n){return function(){var i=this.__on,o,a=_f(e);if(i){for(var s=0,u=i.length;s<u;++s)if((o=i[s]).type===t.type&&o.name===t.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=a,o.options=n),o.value=e;return}}this.addEventListener(t.type,a,n),o={type:t.type,name:t.name,value:e,listener:a,options:n},i?i.push(o):this.__on=[o]}}r(vf,"onAdd");function Jr(t,e,n){var i=gf(t+""),o,a=i.length,s;if(arguments.length<2){var u=this.node().__on;if(u){for(var l=0,f=u.length,h;l<f;++l)for(o=0,h=u[l];o<a;++o)if((s=i[o]).type===h.type&&s.name===h.name)return h.value}return}for(u=e?vf:yf,o=0;o<a;++o)this.each(u(i[o],e,n));return this}r(Jr,"default");function na(t,e,n){var i=Pe(t),o=i.CustomEvent;typeof o=="function"?o=new o(e,n):(o=i.document.createEvent("Event"),n?(o.initEvent(e,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(e,!1,!1)),t.dispatchEvent(o)}r(na,"dispatchEvent");function wf(t,e){return function(){return na(this,t,e)}}r(wf,"dispatchConstant");function bf(t,e){return function(){return na(this,t,e.apply(this,arguments))}}r(bf,"dispatchFunction");function jr(t,e){return this.each((typeof e=="function"?bf:wf)(t,e))}r(jr,"default");function*ti(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],o=0,a=i.length,s;o<a;++o)(s=i[o])&&(yield s)}r(ti,"default");var ei=[null];function G(t,e){this._groups=t,this._parents=e}r(G,"Selection");function ra(){return new G([[document.documentElement]],ei)}r(ra,"selection");function Mf(){return this}r(Mf,"selection_selection");G.prototype=ra.prototype={constructor:G,select:_r,selectAll:yr,selectChild:vr,selectChildren:wr,filter:br,data:kr,enter:Mr,exit:Sr,join:Cr,merge:Nr,selection:Mf,order:Ar,sort:Dr,call:$r,nodes:Or,node:Er,size:Ir,empty:Rr,each:Pr,attr:Fr,style:Ur,property:Lr,classed:Hr,text:Br,html:qr,raise:Wr,lower:Vr,append:Xr,insert:Gr,remove:Zr,clone:Qr,datum:Kr,on:Jr,dispatch:jr,[Symbol.iterator]:ti};var Ct=ra;function ia(t){return typeof t=="string"?new G([[document.querySelector(t)]],[document.documentElement]):new G([[t]],ei)}r(ia,"default");function Pt(t,e,n){t.prototype=e.prototype=n,n.constructor=t}r(Pt,"default");function pe(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}r(pe,"extend");function Yt(){}r(Yt,"Color");var Fe=.7,vn=1/Fe,me="\\s*([+-]?\\d+)\\s*",Ue="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",bt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Tf=/^#([0-9a-f]{3,8})$/,kf=new RegExp(`^rgb\\(${me},${me},${me}\\)$`),Sf=new RegExp(`^rgb\\(${bt},${bt},${bt}\\)$`),Cf=new RegExp(`^rgba\\(${me},${me},${me},${Ue}\\)$`),Nf=new RegExp(`^rgba\\(${bt},${bt},${bt},${Ue}\\)$`),Af=new RegExp(`^hsl\\(${Ue},${bt},${bt}\\)$`),Df=new RegExp(`^hsla\\(${Ue},${bt},${bt},${Ue}\\)$`),oa={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};Pt(Yt,_t,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:aa,formatHex:aa,formatHex8:$f,formatHsl:Of,formatRgb:sa,toString:sa});function aa(){return this.rgb().formatHex()}r(aa,"color_formatHex");function $f(){return this.rgb().formatHex8()}r($f,"color_formatHex8");function Of(){return pa(this).formatHsl()}r(Of,"color_formatHsl");function sa(){return this.rgb().formatRgb()}r(sa,"color_formatRgb");function _t(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Tf.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?ua(e):n===3?new nt(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?gn(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?gn(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=kf.exec(t))?new nt(e[1],e[2],e[3],1):(e=Sf.exec(t))?new nt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Cf.exec(t))?gn(e[1],e[2],e[3],e[4]):(e=Nf.exec(t))?gn(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Af.exec(t))?ca(e[1],e[2]/100,e[3]/100,1):(e=Df.exec(t))?ca(e[1],e[2]/100,e[3]/100,e[4]):oa.hasOwnProperty(t)?ua(oa[t]):t==="transparent"?new nt(NaN,NaN,NaN,0):null}r(_t,"color");function ua(t){return new nt(t>>16&255,t>>8&255,t&255,1)}r(ua,"rgbn");function gn(t,e,n,i){return i<=0&&(t=e=n=NaN),new nt(t,e,n,i)}r(gn,"rgba");function ri(t){return t instanceof Yt||(t=_t(t)),t?(t=t.rgb(),new nt(t.r,t.g,t.b,t.opacity)):new nt}r(ri,"rgbConvert");function de(t,e,n,i){return arguments.length===1?ri(t):new nt(t,e,n,i??1)}r(de,"rgb");function nt(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}r(nt,"Rgb");Pt(nt,de,pe(Yt,{brighter(t){return t=t==null?vn:Math.pow(vn,t),new nt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Fe:Math.pow(Fe,t),new nt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new nt(Zt(this.r),Zt(this.g),Zt(this.b),wn(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:fa,formatHex:fa,formatHex8:Ef,formatRgb:la,toString:la}));function fa(){return`#${Gt(this.r)}${Gt(this.g)}${Gt(this.b)}`}r(fa,"rgb_formatHex");function Ef(){return`#${Gt(this.r)}${Gt(this.g)}${Gt(this.b)}${Gt((isNaN(this.opacity)?1:this.opacity)*255)}`}r(Ef,"rgb_formatHex8");function la(){let t=wn(this.opacity);return`${t===1?"rgb(":"rgba("}${Zt(this.r)}, ${Zt(this.g)}, ${Zt(this.b)}${t===1?")":`, ${t})`}`}r(la,"rgb_formatRgb");function wn(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}r(wn,"clampa");function Zt(t){return Math.max(0,Math.min(255,Math.round(t)||0))}r(Zt,"clampi");function Gt(t){return t=Zt(t),(t<16?"0":"")+t.toString(16)}r(Gt,"hex");function ca(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new xt(t,e,n,i)}r(ca,"hsla");function pa(t){if(t instanceof xt)return new xt(t.h,t.s,t.l,t.opacity);if(t instanceof Yt||(t=_t(t)),!t)return new xt;if(t instanceof xt)return t;t=t.rgb();var e=t.r/255,n=t.g/255,i=t.b/255,o=Math.min(e,n,i),a=Math.max(e,n,i),s=NaN,u=a-o,l=(a+o)/2;return u?(e===a?s=(n-i)/u+(n<i)*6:n===a?s=(i-e)/u+2:s=(e-n)/u+4,u/=l<.5?a+o:2-a-o,s*=60):u=l>0&&l<1?0:s,new xt(s,u,l,t.opacity)}r(pa,"hslConvert");function ma(t,e,n,i){return arguments.length===1?pa(t):new xt(t,e,n,i??1)}r(ma,"hsl");function xt(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}r(xt,"Hsl");Pt(xt,ma,pe(Yt,{brighter(t){return t=t==null?vn:Math.pow(vn,t),new xt(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Fe:Math.pow(Fe,t),new xt(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,o=2*n-i;return new nt(ni(t>=240?t-240:t+120,o,i),ni(t,o,i),ni(t<120?t+240:t-120,o,i),this.opacity)},clamp(){return new xt(ha(this.h),yn(this.s),yn(this.l),wn(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(){let t=wn(this.opacity);return`${t===1?"hsl(":"hsla("}${ha(this.h)}, ${yn(this.s)*100}%, ${yn(this.l)*100}%${t===1?")":`, ${t})`}`}}));function ha(t){return t=(t||0)%360,t<0?t+360:t}r(ha,"clamph");function yn(t){return Math.max(0,Math.min(1,t||0))}r(yn,"clampt");function ni(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}r(ni,"hsl2rgb");var da=Math.PI/180,xa=180/Math.PI;var bn=18,_a=.96422,ga=1,ya=.82521,va=4/29,xe=6/29,wa=3*xe*xe,If=xe*xe*xe;function ba(t){if(t instanceof Mt)return new Mt(t.l,t.a,t.b,t.opacity);if(t instanceof Nt)return Ma(t);t instanceof nt||(t=ri(t));var e=si(t.r),n=si(t.g),i=si(t.b),o=ii((.2225045*e+.7168786*n+.0606169*i)/ga),a,s;return e===n&&n===i?a=s=o:(a=ii((.4360747*e+.3850649*n+.1430804*i)/_a),s=ii((.0139322*e+.0971045*n+.7141733*i)/ya)),new Mt(116*o-16,500*(a-o),200*(o-s),t.opacity)}r(ba,"labConvert");function ui(t,e,n,i){return arguments.length===1?ba(t):new Mt(t,e,n,i??1)}r(ui,"lab");function Mt(t,e,n,i){this.l=+t,this.a=+e,this.b=+n,this.opacity=+i}r(Mt,"Lab");Pt(Mt,ui,pe(Yt,{brighter(t){return new Mt(this.l+bn*(t??1),this.a,this.b,this.opacity)},darker(t){return new Mt(this.l-bn*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=_a*oi(e),t=ga*oi(t),n=ya*oi(n),new nt(ai(3.1338561*e-1.6168667*t-.4906146*n),ai(-.9787684*e+1.9161415*t+.033454*n),ai(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function ii(t){return t>If?Math.pow(t,1/3):t/wa+va}r(ii,"xyz2lab");function oi(t){return t>xe?t*t*t:wa*(t-va)}r(oi,"lab2xyz");function ai(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}r(ai,"lrgb2rgb");function si(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}r(si,"rgb2lrgb");function Rf(t){if(t instanceof Nt)return new Nt(t.h,t.c,t.l,t.opacity);if(t instanceof Mt||(t=ba(t)),t.a===0&&t.b===0)return new Nt(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*xa;return new Nt(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}r(Rf,"hclConvert");function Le(t,e,n,i){return arguments.length===1?Rf(t):new Nt(t,e,n,i??1)}r(Le,"hcl");function Nt(t,e,n,i){this.h=+t,this.c=+e,this.l=+n,this.opacity=+i}r(Nt,"Hcl");function Ma(t){if(isNaN(t.h))return new Mt(t.l,0,0,t.opacity);var e=t.h*da;return new Mt(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}r(Ma,"hcl2lab");Pt(Nt,Le,pe(Yt,{brighter(t){return new Nt(this.h,this.c,this.l+bn*(t??1),this.opacity)},darker(t){return new Nt(this.h,this.c,this.l-bn*(t??1),this.opacity)},rgb(){return Ma(this).rgb()}}));var _e=r(t=>()=>t,"default");function Ta(t,e){return function(n){return t+n*e}}r(Ta,"linear");function Pf(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}r(Pf,"exponential");function ka(t,e){var n=e-t;return n?Ta(t,n>180||n<-180?n-360*Math.round(n/360):n):_e(isNaN(t)?e:t)}r(ka,"hue");function Sa(t){return(t=+t)==1?At:function(e,n){return n-e?Pf(e,n,t):_e(isNaN(e)?n:e)}}r(Sa,"gamma");function At(t,e){var n=e-t;return n?Ta(t,n):_e(isNaN(t)?e:t)}r(At,"nogamma");function Ca(t){return function(e,n){var i=t((e=Le(e)).h,(n=Le(n)).h),o=At(e.c,n.c),a=At(e.l,n.l),s=At(e.opacity,n.opacity);return function(u){return e.h=i(u),e.c=o(u),e.l=a(u),e.opacity=s(u),e+""}}}r(Ca,"hcl");var Yf=Ca(ka),Ff=Ca(At);function fi(t,e,n,i,o){var a=t*t,s=a*t;return((1-3*t+3*a-s)*e+(4-6*a+3*s)*n+(1+3*t+3*a-3*s)*i+s*o)/6}r(fi,"basis");function li(t){var e=t.length-1;return function(n){var i=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),o=t[i],a=t[i+1],s=i>0?t[i-1]:2*o-a,u=i<e-1?t[i+2]:2*a-o;return fi((n-i/e)*e,s,o,a,u)}}r(li,"default");function ci(t){var e=t.length;return function(n){var i=Math.floor(((n%=1)<0?++n:n)*e),o=t[(i+e-1)%e],a=t[i%e],s=t[(i+1)%e],u=t[(i+2)%e];return fi((n-i/e)*e,o,a,s,u)}}r(ci,"default");var Qt=r(function t(e){var n=Sa(e);function i(o,a){var s=n((o=de(o)).r,(a=de(a)).r),u=n(o.g,a.g),l=n(o.b,a.b),f=At(o.opacity,a.opacity);return function(h){return o.r=s(h),o.g=u(h),o.b=l(h),o.opacity=f(h),o+""}}return r(i,"rgb"),i.gamma=t,i},"rgbGamma")(1);function Na(t){return function(e){var n=e.length,i=new Array(n),o=new Array(n),a=new Array(n),s,u;for(s=0;s<n;++s)u=de(e[s]),i[s]=u.r||0,o[s]=u.g||0,a[s]=u.b||0;return i=t(i),o=t(o),a=t(a),u.opacity=1,function(l){return u.r=i(l),u.g=o(l),u.b=a(l),u+""}}}r(Na,"rgbSpline");var Uf=Na(li),Lf=Na(ci);function hi(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,i=e.slice(),o;return function(a){for(o=0;o<n;++o)i[o]=t[o]*(1-a)+e[o]*a;return i}}r(hi,"default");function Aa(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}r(Aa,"isNumberArray");function Da(t,e){var n=e?e.length:0,i=t?Math.min(n,t.length):0,o=new Array(i),a=new Array(n),s;for(s=0;s<i;++s)o[s]=Ft(t[s],e[s]);for(;s<n;++s)a[s]=e[s];return function(u){for(s=0;s<i;++s)a[s]=o[s](u);return a}}r(Da,"genericArray");function pi(t,e){var n=new Date;return t=+t,e=+e,function(i){return n.setTime(t*(1-i)+e*i),n}}r(pi,"default");function j(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}r(j,"default");function mi(t,e){var n={},i={},o;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(o in e)o in t?n[o]=Ft(t[o],e[o]):i[o]=e[o];return function(a){for(o in n)i[o]=n[o](a);return i}}r(mi,"default");var xi=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,di=new RegExp(xi.source,"g");function zf(t){return function(){return t}}r(zf,"zero");function Hf(t){return function(e){return t(e)+""}}r(Hf,"one");function ge(t,e){var n=xi.lastIndex=di.lastIndex=0,i,o,a,s=-1,u=[],l=[];for(t=t+"",e=e+"";(i=xi.exec(t))&&(o=di.exec(e));)(a=o.index)>n&&(a=e.slice(n,a),u[s]?u[s]+=a:u[++s]=a),(i=i[0])===(o=o[0])?u[s]?u[s]+=o:u[++s]=o:(u[++s]=null,l.push({i:s,x:j(i,o)})),n=di.lastIndex;return n<e.length&&(a=e.slice(n),u[s]?u[s]+=a:u[++s]=a),u.length<2?l[0]?Hf(l[0].x):zf(e):(e=l.length,function(f){for(var h=0,p;h<e;++h)u[(p=l[h]).i]=p.x(f);return u.join("")})}r(ge,"default");function Ft(t,e){var n=typeof e,i;return e==null||n==="boolean"?_e(e):(n==="number"?j:n==="string"?(i=_t(e))?(e=i,Qt):ge:e instanceof _t?Qt:e instanceof Date?pi:Aa(e)?hi:Array.isArray(e)?Da:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?mi:j)(t,e)}r(Ft,"default");function Mn(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}r(Mn,"default");var $a=180/Math.PI,Tn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function kn(t,e,n,i,o,a){var s,u,l;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(l=t*n+e*i)&&(n-=t*l,i-=e*l),(u=Math.sqrt(n*n+i*i))&&(n/=u,i/=u,l/=u),t*i<e*n&&(t=-t,e=-e,l=-l,s=-s),{translateX:o,translateY:a,rotate:Math.atan2(e,t)*$a,skewX:Math.atan(l)*$a,scaleX:s,scaleY:u}}r(kn,"default");var Sn;function Oa(t){let e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Tn:kn(e.a,e.b,e.c,e.d,e.e,e.f)}r(Oa,"parseCss");function Ea(t){return t==null?Tn:(Sn||(Sn=document.createElementNS("http://www.w3.org/2000/svg","g")),Sn.setAttribute("transform",t),(t=Sn.transform.baseVal.consolidate())?(t=t.matrix,kn(t.a,t.b,t.c,t.d,t.e,t.f)):Tn)}r(Ea,"parseSvg");function Ia(t,e,n,i){function o(f){return f.length?f.pop()+" ":""}r(o,"pop");function a(f,h,p,c,m,_){if(f!==p||h!==c){var M=m.push("translate(",null,e,null,n);_.push({i:M-4,x:j(f,p)},{i:M-2,x:j(h,c)})}else(p||c)&&m.push("translate("+p+e+c+n)}r(a,"translate");function s(f,h,p,c){f!==h?(f-h>180?h+=360:h-f>180&&(f+=360),c.push({i:p.push(o(p)+"rotate(",null,i)-2,x:j(f,h)})):h&&p.push(o(p)+"rotate("+h+i)}r(s,"rotate");function u(f,h,p,c){f!==h?c.push({i:p.push(o(p)+"skewX(",null,i)-2,x:j(f,h)}):h&&p.push(o(p)+"skewX("+h+i)}r(u,"skewX");function l(f,h,p,c,m,_){if(f!==p||h!==c){var M=m.push(o(m)+"scale(",null,",",null,")");_.push({i:M-4,x:j(f,p)},{i:M-2,x:j(h,c)})}else(p!==1||c!==1)&&m.push(o(m)+"scale("+p+","+c+")")}return r(l,"scale"),function(f,h){var p=[],c=[];return f=t(f),h=t(h),a(f.translateX,f.translateY,h.translateX,h.translateY,p,c),s(f.rotate,h.rotate,p,c),u(f.skewX,h.skewX,p,c),l(f.scaleX,f.scaleY,h.scaleX,h.scaleY,p,c),f=h=null,function(m){for(var _=-1,M=c.length,T;++_<M;)p[(T=c[_]).i]=T.x(m);return p.join("")}}}r(Ia,"interpolateTransform");var _i=Ia(Oa,"px, ","px)","deg)"),gi=Ia(Ea,", ",")",")");function yi(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}r(yi,"default");function Kt(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,i=t.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+t.slice(n+1)]}r(Kt,"formatDecimalParts");function gt(t){return t=Kt(Math.abs(t)),t?t[1]:NaN}r(gt,"default");function vi(t,e){return function(n,i){for(var o=n.length,a=[],s=0,u=t[0],l=0;o>0&&u>0&&(l+u+1>i&&(u=Math.max(1,i-l)),a.push(n.substring(o-=u,o+u)),!((l+=u+1)>i));)u=t[s=(s+1)%t.length];return a.reverse().join(e)}}r(vi,"default");function wi(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}r(wi,"default");var Bf=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ut(t){if(!(e=Bf.exec(t)))throw new Error("invalid format: "+t);var e;return new Cn({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}r(Ut,"formatSpecifier");Ut.prototype=Cn.prototype;function Cn(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}r(Cn,"FormatSpecifier");Cn.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function bi(t){t:for(var e=t.length,n=1,i=-1,o;n<e;++n)switch(t[n]){case".":i=o=n;break;case"0":i===0&&(i=n),o=n;break;default:if(!+t[n])break t;i>0&&(i=0);break}return i>0?t.slice(0,i)+t.slice(o+1):t}r(bi,"default");var Mi;function Ti(t,e){var n=Kt(t,e);if(!n)return t+"";var i=n[0],o=n[1],a=o-(Mi=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,s=i.length;return a===s?i:a>s?i+new Array(a-s+1).join("0"):a>0?i.slice(0,a)+"."+i.slice(a):"0."+new Array(1-a).join("0")+Kt(t,Math.max(0,e+a-1))[0]}r(Ti,"default");function Nn(t,e){var n=Kt(t,e);if(!n)return t+"";var i=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+i:i.length>o+1?i.slice(0,o+1)+"."+i.slice(o+1):i+new Array(o-i.length+2).join("0")}r(Nn,"default");var ki={"%":r((t,e)=>(t*100).toFixed(e),"%"),b:r(t=>Math.round(t).toString(2),"b"),c:r(t=>t+"","c"),d:yi,e:r((t,e)=>t.toExponential(e),"e"),f:r((t,e)=>t.toFixed(e),"f"),g:r((t,e)=>t.toPrecision(e),"g"),o:r(t=>Math.round(t).toString(8),"o"),p:r((t,e)=>Nn(t*100,e),"p"),r:Nn,s:Ti,X:r(t=>Math.round(t).toString(16).toUpperCase(),"X"),x:r(t=>Math.round(t).toString(16),"x")};function An(t){return t}r(An,"default");var Ra=Array.prototype.map,Pa=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function Si(t){var e=t.grouping===void 0||t.thousands===void 0?An:vi(Ra.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",i=t.currency===void 0?"":t.currency[1]+"",o=t.decimal===void 0?".":t.decimal+"",a=t.numerals===void 0?An:wi(Ra.call(t.numerals,String)),s=t.percent===void 0?"%":t.percent+"",u=t.minus===void 0?"\u2212":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function f(p){p=Ut(p);var c=p.fill,m=p.align,_=p.sign,M=p.symbol,T=p.zero,k=p.width,I=p.comma,C=p.precision,A=p.trim,O=p.type;O==="n"?(I=!0,O="g"):ki[O]||(C===void 0&&(C=12),A=!0,O="g"),(T||c==="0"&&m==="=")&&(T=!0,c="0",m="=");var w=M==="$"?n:M==="#"&&/[boxX]/.test(O)?"0"+O.toLowerCase():"",Y=M==="$"?i:/[%p]/.test(O)?s:"",U=ki[O],E=/[defgprs%]/.test(O);C=C===void 0?6:/[gprs]/.test(O)?Math.max(1,Math.min(21,C)):Math.max(0,Math.min(20,C));function B(N){var v=w,d=Y,x,S,y;if(O==="c")d=U(N)+d,N="";else{N=+N;var D=N<0||1/N<0;if(N=isNaN(N)?l:U(Math.abs(N),C),A&&(N=bi(N)),D&&+N==0&&_!=="+"&&(D=!1),v=(D?_==="("?_:u:_==="-"||_==="("?"":_)+v,d=(O==="s"?Pa[8+Mi/3]:"")+d+(D&&_==="("?")":""),E){for(x=-1,S=N.length;++x<S;)if(y=N.charCodeAt(x),48>y||y>57){d=(y===46?o+N.slice(x+1):N.slice(x))+d,N=N.slice(0,x);break}}}I&&!T&&(N=e(N,1/0));var $=v.length+N.length+d.length,P=$<k?new Array(k-$+1).join(c):"";switch(I&&T&&(N=e(P+N,P.length?k-d.length:1/0),P=""),m){case"<":N=v+N+d+P;break;case"=":N=v+P+N+d;break;case"^":N=P.slice(0,$=P.length>>1)+v+N+d+P.slice($);break;default:N=P+v+N+d;break}return a(N)}return r(B,"format"),B.toString=function(){return p+""},B}r(f,"newFormat");function h(p,c){var m=f((p=Ut(p),p.type="f",p)),_=Math.max(-8,Math.min(8,Math.floor(gt(c)/3)))*3,M=Math.pow(10,-_),T=Pa[8+_/3];return function(k){return m(M*k)+T}}return r(h,"formatPrefix"),{format:f,formatPrefix:h}}r(Si,"default");var Dn,$n,On;Ci({thousands:",",grouping:[3],currency:["$",""]});function Ci(t){return Dn=Si(t),$n=Dn.format,On=Dn.formatPrefix,Dn}r(Ci,"defaultLocale");function En(t){return Math.max(0,-gt(Math.abs(t)))}r(En,"default");function In(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(gt(e)/3)))*3-gt(Math.abs(t)))}r(In,"default");function Rn(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,gt(e)-gt(t))+1}r(Rn,"default");function qf(t){var e=0,n=t.children,i=n&&n.length;if(!i)e=1;else for(;--i>=0;)e+=n[i].value;t.value=e}r(qf,"count");function Ni(){return this.eachAfter(qf)}r(Ni,"default");function Ai(t,e){let n=-1;for(let i of this)t.call(e,i,++n,this);return this}r(Ai,"default");function Di(t,e){for(var n=this,i=[n],o,a,