UNPKG

cal-heatmap

Version:

Cal-Heatmap is a javascript module to create calendar heatmap to visualize time series data

2 lines (1 loc) 38.6 kB
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).CalendarLabel=e()}(this,(function(){"use strict";function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=r.key,i=void 0,"symbol"==typeof(i=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"))?i:String(i)),r)}var o,i}var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=function(t){try{return!!t()}catch(t){return!0}},r=!n((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),o=!n((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),i=o,u=Function.prototype,c=u.call,a=i&&u.bind.bind(c,c),f=i?a:function(t){return function(){return c.apply(t,arguments)}},s=function(t){return null==t},l=s,p=TypeError,h=function(t){if(l(t))throw new p("Can't call method on "+t);return t},d=h,v=Object,y=function(t){return v(d(t))},g=y,b=f({}.hasOwnProperty),m=Object.hasOwn||function(t,e){return b(g(t),e)},w=r,O=m,S=Function.prototype,j=w&&Object.getOwnPropertyDescriptor,T=O(S,"name"),E={EXISTS:T,PROPER:T&&"something"===function(){}.name,CONFIGURABLE:T&&(!w||w&&j(S,"name").configurable)},P={exports:{}},x="object"==typeof document&&document.all,A={all:x,IS_HTMLDDA:void 0===x&&void 0!==x},L=A.all,R=A.IS_HTMLDDA?function(t){return"function"==typeof t||t===L}:function(t){return"function"==typeof t},C=function(t){return t&&t.Math===Math&&t},I=C("object"==typeof globalThis&&globalThis)||C("object"==typeof window&&window)||C("object"==typeof self&&self)||C("object"==typeof e&&e)||C("object"==typeof e&&e)||function(){return this}()||Function("return this")(),k=I,_=Object.defineProperty,N=function(t,e){try{_(k,t,{value:e,configurable:!0,writable:!0})}catch(n){k[t]=e}return e},D=N,F="__core-js_shared__",M=I[F]||D(F,{}),G=R,B=M,U=f(Function.toString);G(B.inspectSource)||(B.inspectSource=function(t){return U(t)});var W,z,H=B.inspectSource,V=R,K=I.WeakMap,q=V(K)&&/native code/.test(String(K)),X=R,Y=A.all,J=A.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:X(t)||t===Y}:function(t){return"object"==typeof t?null!==t:X(t)},$={},Q=J,Z=I.document,tt=Q(Z)&&Q(Z.createElement),et=function(t){return tt?Z.createElement(t):{}},nt=et,rt=!r&&!n((function(){return 7!==Object.defineProperty(nt("div"),"a",{get:function(){return 7}}).a})),ot=r&&n((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),it=J,ut=String,ct=TypeError,at=function(t){if(it(t))return t;throw new ct(ut(t)+" is not an object")},ft=o,st=Function.prototype.call,lt=ft?st.bind(st):function(){return st.apply(st,arguments)},pt=I,ht=R,dt=function(t,e){return arguments.length<2?(n=pt[t],ht(n)?n:void 0):pt[t]&&pt[t][e];var n},vt=f({}.isPrototypeOf),yt="undefined"!=typeof navigator&&String(navigator.userAgent)||"",gt=I,bt=yt,mt=gt.process,wt=gt.Deno,Ot=mt&&mt.versions||wt&&wt.version,St=Ot&&Ot.v8;St&&(z=(W=St.split("."))[0]>0&&W[0]<4?1:+(W[0]+W[1])),!z&&bt&&(!(W=bt.match(/Edge\/(\d+)/))||W[1]>=74)&&(W=bt.match(/Chrome\/(\d+)/))&&(z=+W[1]);var jt=z,Tt=jt,Et=n,Pt=I.String,xt=!!Object.getOwnPropertySymbols&&!Et((function(){var t=Symbol("symbol detection");return!Pt(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Tt&&Tt<41})),At=xt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Lt=dt,Rt=R,Ct=vt,It=Object,kt=At?function(t){return"symbol"==typeof t}:function(t){var e=Lt("Symbol");return Rt(e)&&Ct(e.prototype,It(t))},_t=String,Nt=function(t){try{return _t(t)}catch(t){return"Object"}},Dt=R,Ft=Nt,Mt=TypeError,Gt=function(t){if(Dt(t))return t;throw new Mt(Ft(t)+" is not a function")},Bt=Gt,Ut=s,Wt=function(t,e){var n=t[e];return Ut(n)?void 0:Bt(n)},zt=lt,Ht=R,Vt=J,Kt=TypeError,qt={exports:{}},Xt=M;(qt.exports=function(t,e){return Xt[t]||(Xt[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.34.0",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.34.0/LICENSE",source:"https://github.com/zloirock/core-js"});var Yt=qt.exports,Jt=f,$t=0,Qt=Math.random(),Zt=Jt(1..toString),te=function(t){return"Symbol("+(void 0===t?"":t)+")_"+Zt(++$t+Qt,36)},ee=Yt,ne=m,re=te,oe=xt,ie=At,ue=I.Symbol,ce=ee("wks"),ae=ie?ue.for||ue:ue&&ue.withoutSetter||re,fe=function(t){return ne(ce,t)||(ce[t]=oe&&ne(ue,t)?ue[t]:ae("Symbol."+t)),ce[t]},se=lt,le=J,pe=kt,he=Wt,de=function(t,e){var n,r;if("string"===e&&Ht(n=t.toString)&&!Vt(r=zt(n,t)))return r;if(Ht(n=t.valueOf)&&!Vt(r=zt(n,t)))return r;if("string"!==e&&Ht(n=t.toString)&&!Vt(r=zt(n,t)))return r;throw new Kt("Can't convert object to primitive value")},ve=TypeError,ye=fe("toPrimitive"),ge=function(t,e){if(!le(t)||pe(t))return t;var n,r=he(t,ye);if(r){if(void 0===e&&(e="default"),n=se(r,t,e),!le(n)||pe(n))return n;throw new ve("Can't convert object to primitive value")}return void 0===e&&(e="number"),de(t,e)},be=kt,me=function(t){var e=ge(t,"string");return be(e)?e:e+""},we=r,Oe=rt,Se=ot,je=at,Te=me,Ee=TypeError,Pe=Object.defineProperty,xe=Object.getOwnPropertyDescriptor,Ae="enumerable",Le="configurable",Re="writable";$.f=we?Se?function(t,e,n){if(je(t),e=Te(e),je(n),"function"==typeof t&&"prototype"===e&&"value"in n&&Re in n&&!n[Re]){var r=xe(t,e);r&&r[Re]&&(t[e]=n.value,n={configurable:Le in n?n[Le]:r[Le],enumerable:Ae in n?n[Ae]:r[Ae],writable:!1})}return Pe(t,e,n)}:Pe:function(t,e,n){if(je(t),e=Te(e),je(n),Oe)try{return Pe(t,e,n)}catch(t){}if("get"in n||"set"in n)throw new Ee("Accessors not supported");return"value"in n&&(t[e]=n.value),t};var Ce,Ie,ke,_e=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},Ne=$,De=_e,Fe=r?function(t,e,n){return Ne.f(t,e,De(1,n))}:function(t,e,n){return t[e]=n,t},Me=te,Ge=Yt("keys"),Be=function(t){return Ge[t]||(Ge[t]=Me(t))},Ue={},We=q,ze=I,He=J,Ve=Fe,Ke=m,qe=M,Xe=Be,Ye=Ue,Je="Object already initialized",$e=ze.TypeError,Qe=ze.WeakMap;if(We||qe.state){var Ze=qe.state||(qe.state=new Qe);Ze.get=Ze.get,Ze.has=Ze.has,Ze.set=Ze.set,Ce=function(t,e){if(Ze.has(t))throw new $e(Je);return e.facade=t,Ze.set(t,e),e},Ie=function(t){return Ze.get(t)||{}},ke=function(t){return Ze.has(t)}}else{var tn=Xe("state");Ye[tn]=!0,Ce=function(t,e){if(Ke(t,tn))throw new $e(Je);return e.facade=t,Ve(t,tn,e),e},Ie=function(t){return Ke(t,tn)?t[tn]:{}},ke=function(t){return Ke(t,tn)}}var en={set:Ce,get:Ie,has:ke,enforce:function(t){return ke(t)?Ie(t):Ce(t,{})},getterFor:function(t){return function(e){var n;if(!He(e)||(n=Ie(e)).type!==t)throw new $e("Incompatible receiver, "+t+" required");return n}}},nn=f,rn=n,on=R,un=m,cn=r,an=E.CONFIGURABLE,fn=H,sn=en.enforce,ln=en.get,pn=String,hn=Object.defineProperty,dn=nn("".slice),vn=nn("".replace),yn=nn([].join),gn=cn&&!rn((function(){return 8!==hn((function(){}),"length",{value:8}).length})),bn=String(String).split("String"),mn=P.exports=function(t,e,n){"Symbol("===dn(pn(e),0,7)&&(e="["+vn(pn(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!un(t,"name")||an&&t.name!==e)&&(cn?hn(t,"name",{value:e,configurable:!0}):t.name=e),gn&&n&&un(n,"arity")&&t.length!==n.arity&&hn(t,"length",{value:n.arity});try{n&&un(n,"constructor")&&n.constructor?cn&&hn(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var r=sn(t);return un(r,"source")||(r.source=yn(bn,"string"==typeof e?e:"")),t};Function.prototype.toString=mn((function(){return on(this)&&ln(this).source||fn(this)}),"toString");var wn=P.exports,On=wn,Sn=$,jn=function(t,e,n){return n.get&&On(n.get,e,{getter:!0}),n.set&&On(n.set,e,{setter:!0}),Sn.f(t,e,n)},Tn=r,En=E.EXISTS,Pn=f,xn=jn,An=Function.prototype,Ln=Pn(An.toString),Rn=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Cn=Pn(Rn.exec);Tn&&!En&&xn(An,"name",{configurable:!0,get:function(){try{return Cn(Rn,Ln(this))[1]}catch(t){return""}}});var In={},kn={},_n={}.propertyIsEnumerable,Nn=Object.getOwnPropertyDescriptor,Dn=Nn&&!_n.call({1:2},1);kn.f=Dn?function(t){var e=Nn(this,t);return!!e&&e.enumerable}:_n;var Fn=f,Mn=Fn({}.toString),Gn=Fn("".slice),Bn=function(t){return Gn(Mn(t),8,-1)},Un=n,Wn=Bn,zn=Object,Hn=f("".split),Vn=Un((function(){return!zn("z").propertyIsEnumerable(0)}))?function(t){return"String"===Wn(t)?Hn(t,""):zn(t)}:zn,Kn=Vn,qn=h,Xn=function(t){return Kn(qn(t))},Yn=r,Jn=lt,$n=kn,Qn=_e,Zn=Xn,tr=me,er=m,nr=rt,rr=Object.getOwnPropertyDescriptor;In.f=Yn?rr:function(t,e){if(t=Zn(t),e=tr(e),nr)try{return rr(t,e)}catch(t){}if(er(t,e))return Qn(!Jn($n.f,t,e),t[e])};var or=R,ir=$,ur=wn,cr=N,ar=function(t,e,n,r){r||(r={});var o=r.enumerable,i=void 0!==r.name?r.name:e;if(or(n)&&ur(n,i,r),r.global)o?t[e]=n:cr(e,n);else{try{r.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=n:ir.f(t,e,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return t},fr={},sr=Math.ceil,lr=Math.floor,pr=Math.trunc||function(t){var e=+t;return(e>0?lr:sr)(e)},hr=function(t){var e=+t;return e!=e||0===e?0:pr(e)},dr=hr,vr=Math.max,yr=Math.min,gr=function(t,e){var n=dr(t);return n<0?vr(n+e,0):yr(n,e)},br=hr,mr=Math.min,wr=function(t){return t>0?mr(br(t),9007199254740991):0},Or=function(t){return wr(t.length)},Sr=Xn,jr=gr,Tr=Or,Er=function(t){return function(e,n,r){var o,i=Sr(e),u=Tr(i),c=jr(r,u);if(t&&n!=n){for(;u>c;)if((o=i[c++])!=o)return!0}else for(;u>c;c++)if((t||c in i)&&i[c]===n)return t||c||0;return!t&&-1}},Pr={includes:Er(!0),indexOf:Er(!1)},xr=m,Ar=Xn,Lr=Pr.indexOf,Rr=Ue,Cr=f([].push),Ir=function(t,e){var n,r=Ar(t),o=0,i=[];for(n in r)!xr(Rr,n)&&xr(r,n)&&Cr(i,n);for(;e.length>o;)xr(r,n=e[o++])&&(~Lr(i,n)||Cr(i,n));return i},kr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],_r=Ir,Nr=kr.concat("length","prototype");fr.f=Object.getOwnPropertyNames||function(t){return _r(t,Nr)};var Dr={};Dr.f=Object.getOwnPropertySymbols;var Fr=dt,Mr=fr,Gr=Dr,Br=at,Ur=f([].concat),Wr=Fr("Reflect","ownKeys")||function(t){var e=Mr.f(Br(t)),n=Gr.f;return n?Ur(e,n(t)):e},zr=m,Hr=Wr,Vr=In,Kr=$,qr=n,Xr=R,Yr=/#|\.prototype\./,Jr=function(t,e){var n=Qr[$r(t)];return n===to||n!==Zr&&(Xr(e)?qr(e):!!e)},$r=Jr.normalize=function(t){return String(t).replace(Yr,".").toLowerCase()},Qr=Jr.data={},Zr=Jr.NATIVE="N",to=Jr.POLYFILL="P",eo=Jr,no=I,ro=In.f,oo=Fe,io=ar,uo=N,co=function(t,e,n){for(var r=Hr(e),o=Kr.f,i=Vr.f,u=0;u<r.length;u++){var c=r[u];zr(t,c)||n&&zr(n,c)||o(t,c,i(e,c))}},ao=eo,fo=function(t,e){var n,r,o,i,u,c=t.target,a=t.global,f=t.stat;if(n=a?no:f?no[c]||uo(c,{}):(no[c]||{}).prototype)for(r in e){if(i=e[r],o=t.dontCallGetSet?(u=ro(n,r))&&u.value:n[r],!ao(a?r:c+(f?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;co(i,o)}(t.sham||o&&o.sham)&&oo(i,"sham",!0),io(n,r,i,t)}},so=Ir,lo=kr,po=Object.keys||function(t){return so(t,lo)},ho=r,vo=f,yo=lt,go=n,bo=po,mo=Dr,wo=kn,Oo=y,So=Vn,jo=Object.assign,To=Object.defineProperty,Eo=vo([].concat),Po=!jo||go((function(){if(ho&&1!==jo({b:1},jo(To({},"a",{enumerable:!0,get:function(){To(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol("assign detection"),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!==jo({},t)[n]||bo(jo({},e)).join("")!==r}))?function(t,e){for(var n=Oo(t),r=arguments.length,o=1,i=mo.f,u=wo.f;r>o;)for(var c,a=So(arguments[o++]),f=i?Eo(bo(a),i(a)):bo(a),s=f.length,l=0;s>l;)c=f[l++],ho&&!yo(u,a,c)||(n[c]=a[c]);return n}:jo,xo=Po;fo({target:"Object",stat:!0,arity:2,forced:Object.assign!==xo},{assign:xo});var Ao={};Ao[fe("toStringTag")]="z";var Lo="[object z]"===String(Ao),Ro=Lo,Co=R,Io=Bn,ko=fe("toStringTag"),_o=Object,No="Arguments"===Io(function(){return arguments}()),Do=Ro?Io:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=_o(t),ko))?n:No?Io(e):"Object"===(r=Io(e))&&Co(e.callee)?"Arguments":r},Fo=Do,Mo=Lo?{}.toString:function(){return"[object "+Fo(this)+"]"};Lo||ar(Object.prototype,"toString",Mo,{unsafe:!0});var Go="process"===Bn(I.process),Bo=f,Uo=Gt,Wo=R,zo=String,Ho=TypeError,Vo=function(t,e,n){try{return Bo(Uo(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(t){}},Ko=at,qo=function(t){if("object"==typeof t||Wo(t))return t;throw new Ho("Can't set "+zo(t)+" as a prototype")},Xo=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Vo(Object.prototype,"__proto__","set"))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return Ko(n),qo(r),e?t(n,r):n.__proto__=r,n}}():void 0),Yo=$.f,Jo=m,$o=fe("toStringTag"),Qo=function(t,e,n){t&&!n&&(t=t.prototype),t&&!Jo(t,$o)&&Yo(t,$o,{configurable:!0,value:e})},Zo=dt,ti=jn,ei=r,ni=fe("species"),ri=vt,oi=TypeError,ii=function(t,e){if(ri(e,t))return t;throw new oi("Incorrect invocation")},ui=f,ci=n,ai=R,fi=Do,si=H,li=function(){},pi=[],hi=dt("Reflect","construct"),di=/^\s*(?:class|function)\b/,vi=ui(di.exec),yi=!di.test(li),gi=function(t){if(!ai(t))return!1;try{return hi(li,pi,t),!0}catch(t){return!1}},bi=function(t){if(!ai(t))return!1;switch(fi(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return yi||!!vi(di,si(t))}catch(t){return!0}};bi.sham=!0;var mi,wi,Oi,Si,ji=!hi||ci((function(){var t;return gi(gi.call)||!gi(Object)||!gi((function(){t=!0}))||t}))?bi:gi,Ti=ji,Ei=Nt,Pi=TypeError,xi=at,Ai=function(t){if(Ti(t))return t;throw new Pi(Ei(t)+" is not a constructor")},Li=s,Ri=fe("species"),Ci=o,Ii=Function.prototype,ki=Ii.apply,_i=Ii.call,Ni="object"==typeof Reflect&&Reflect.apply||(Ci?_i.bind(ki):function(){return _i.apply(ki,arguments)}),Di=Bn,Fi=f,Mi=function(t){if("Function"===Di(t))return Fi(t)},Gi=Gt,Bi=o,Ui=Mi(Mi.bind),Wi=function(t,e){return Gi(t),void 0===e?t:Bi?Ui(t,e):function(){return t.apply(e,arguments)}},zi=dt("document","documentElement"),Hi=f([].slice),Vi=TypeError,Ki=/(?:ipad|iphone|ipod).*applewebkit/i.test(yt),qi=I,Xi=Ni,Yi=Wi,Ji=R,$i=m,Qi=n,Zi=zi,tu=Hi,eu=et,nu=function(t,e){if(t<e)throw new Vi("Not enough arguments");return t},ru=Ki,ou=Go,iu=qi.setImmediate,uu=qi.clearImmediate,cu=qi.process,au=qi.Dispatch,fu=qi.Function,su=qi.MessageChannel,lu=qi.String,pu=0,hu={},du="onreadystatechange";Qi((function(){mi=qi.location}));var vu=function(t){if($i(hu,t)){var e=hu[t];delete hu[t],e()}},yu=function(t){return function(){vu(t)}},gu=function(t){vu(t.data)},bu=function(t){qi.postMessage(lu(t),mi.protocol+"//"+mi.host)};iu&&uu||(iu=function(t){nu(arguments.length,1);var e=Ji(t)?t:fu(t),n=tu(arguments,1);return hu[++pu]=function(){Xi(e,void 0,n)},wi(pu),pu},uu=function(t){delete hu[t]},ou?wi=function(t){cu.nextTick(yu(t))}:au&&au.now?wi=function(t){au.now(yu(t))}:su&&!ru?(Si=(Oi=new su).port2,Oi.port1.onmessage=gu,wi=Yi(Si.postMessage,Si)):qi.addEventListener&&Ji(qi.postMessage)&&!qi.importScripts&&mi&&"file:"!==mi.protocol&&!Qi(bu)?(wi=bu,qi.addEventListener("message",gu,!1)):wi=du in eu("script")?function(t){Zi.appendChild(eu("script"))[du]=function(){Zi.removeChild(this),vu(t)}}:function(t){setTimeout(yu(t),0)});var mu={set:iu,clear:uu},wu=function(){this.head=null,this.tail=null};wu.prototype={add:function(t){var e={item:t,next:null},n=this.tail;n?n.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}};var Ou,Su,ju,Tu,Eu,Pu=wu,xu=/ipad|iphone|ipod/i.test(yt)&&"undefined"!=typeof Pebble,Au=/web0s(?!.*chrome)/i.test(yt),Lu=I,Ru=Wi,Cu=In.f,Iu=mu.set,ku=Pu,_u=Ki,Nu=xu,Du=Au,Fu=Go,Mu=Lu.MutationObserver||Lu.WebKitMutationObserver,Gu=Lu.document,Bu=Lu.process,Uu=Lu.Promise,Wu=Cu(Lu,"queueMicrotask"),zu=Wu&&Wu.value;if(!zu){var Hu=new ku,Vu=function(){var t,e;for(Fu&&(t=Bu.domain)&&t.exit();e=Hu.get();)try{e()}catch(t){throw Hu.head&&Ou(),t}t&&t.enter()};_u||Fu||Du||!Mu||!Gu?!Nu&&Uu&&Uu.resolve?((Tu=Uu.resolve(void 0)).constructor=Uu,Eu=Ru(Tu.then,Tu),Ou=function(){Eu(Vu)}):Fu?Ou=function(){Bu.nextTick(Vu)}:(Iu=Ru(Iu,Lu),Ou=function(){Iu(Vu)}):(Su=!0,ju=Gu.createTextNode(""),new Mu(Vu).observe(ju,{characterData:!0}),Ou=function(){ju.data=Su=!Su}),zu=function(t){Hu.head||Ou(),Hu.add(t)}}var Ku=zu,qu=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},Xu=I.Promise,Yu="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Ju=!Yu&&!Go&&"object"==typeof window&&"object"==typeof document,$u=I,Qu=Xu,Zu=R,tc=eo,ec=H,nc=fe,rc=Ju,oc=Yu,ic=jt;Qu&&Qu.prototype;var uc=nc("species"),cc=!1,ac=Zu($u.PromiseRejectionEvent),fc=tc("Promise",(function(){var t=ec(Qu),e=t!==String(Qu);if(!e&&66===ic)return!0;if(!ic||ic<51||!/native code/.test(t)){var n=new Qu((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};if((n.constructor={})[uc]=r,!(cc=n.then((function(){}))instanceof r))return!0}return!e&&(rc||oc)&&!ac})),sc={CONSTRUCTOR:fc,REJECTION_EVENT:ac,SUBCLASSING:cc},lc={},pc=Gt,hc=TypeError,dc=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw new hc("Bad Promise constructor");e=t,n=r})),this.resolve=pc(e),this.reject=pc(n)};lc.f=function(t){return new dc(t)};var vc,yc,gc,bc=fo,mc=Go,wc=I,Oc=lt,Sc=ar,jc=Xo,Tc=Qo,Ec=function(t){var e=Zo(t);ei&&e&&!e[ni]&&ti(e,ni,{configurable:!0,get:function(){return this}})},Pc=Gt,xc=R,Ac=J,Lc=ii,Rc=function(t,e){var n,r=xi(t).constructor;return void 0===r||Li(n=xi(r)[Ri])?e:Ai(n)},Cc=mu.set,Ic=Ku,kc=function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(t){}},_c=qu,Nc=Pu,Dc=en,Fc=Xu,Mc=lc,Gc="Promise",Bc=sc.CONSTRUCTOR,Uc=sc.REJECTION_EVENT,Wc=sc.SUBCLASSING,zc=Dc.getterFor(Gc),Hc=Dc.set,Vc=Fc&&Fc.prototype,Kc=Fc,qc=Vc,Xc=wc.TypeError,Yc=wc.document,Jc=wc.process,$c=Mc.f,Qc=$c,Zc=!!(Yc&&Yc.createEvent&&wc.dispatchEvent),ta="unhandledrejection",ea=function(t){var e;return!(!Ac(t)||!xc(e=t.then))&&e},na=function(t,e){var n,r,o,i=e.value,u=1===e.state,c=u?t.ok:t.fail,a=t.resolve,f=t.reject,s=t.domain;try{c?(u||(2===e.rejection&&ca(e),e.rejection=1),!0===c?n=i:(s&&s.enter(),n=c(i),s&&(s.exit(),o=!0)),n===t.promise?f(new Xc("Promise-chain cycle")):(r=ea(n))?Oc(r,n,a,f):a(n)):f(i)}catch(t){s&&!o&&s.exit(),f(t)}},ra=function(t,e){t.notified||(t.notified=!0,Ic((function(){for(var n,r=t.reactions;n=r.get();)na(n,t);t.notified=!1,e&&!t.rejection&&ia(t)})))},oa=function(t,e,n){var r,o;Zc?((r=Yc.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),wc.dispatchEvent(r)):r={promise:e,reason:n},!Uc&&(o=wc["on"+t])?o(r):t===ta&&kc("Unhandled promise rejection",n)},ia=function(t){Oc(Cc,wc,(function(){var e,n=t.facade,r=t.value;if(ua(t)&&(e=_c((function(){mc?Jc.emit("unhandledRejection",r,n):oa(ta,n,r)})),t.rejection=mc||ua(t)?2:1,e.error))throw e.value}))},ua=function(t){return 1!==t.rejection&&!t.parent},ca=function(t){Oc(Cc,wc,(function(){var e=t.facade;mc?Jc.emit("rejectionHandled",e):oa("rejectionhandled",e,t.value)}))},aa=function(t,e,n){return function(r){t(e,r,n)}},fa=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,ra(t,!0))},sa=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw new Xc("Promise can't be resolved itself");var r=ea(e);r?Ic((function(){var n={done:!1};try{Oc(r,e,aa(sa,n,t),aa(fa,n,t))}catch(e){fa(n,e,t)}})):(t.value=e,t.state=1,ra(t,!1))}catch(e){fa({done:!1},e,t)}}};if(Bc&&(qc=(Kc=function(t){Lc(this,qc),Pc(t),Oc(vc,this);var e=zc(this);try{t(aa(sa,e),aa(fa,e))}catch(t){fa(e,t)}}).prototype,(vc=function(t){Hc(this,{type:Gc,done:!1,notified:!1,parent:!1,reactions:new Nc,rejection:!1,state:0,value:void 0})}).prototype=Sc(qc,"then",(function(t,e){var n=zc(this),r=$c(Rc(this,Kc));return n.parent=!0,r.ok=!xc(t)||t,r.fail=xc(e)&&e,r.domain=mc?Jc.domain:void 0,0===n.state?n.reactions.add(r):Ic((function(){na(r,n)})),r.promise})),yc=function(){var t=new vc,e=zc(t);this.promise=t,this.resolve=aa(sa,e),this.reject=aa(fa,e)},Mc.f=$c=function(t){return t===Kc||undefined===t?new yc(t):Qc(t)},xc(Fc)&&Vc!==Object.prototype)){gc=Vc.then,Wc||Sc(Vc,"then",(function(t,e){var n=this;return new Kc((function(t,e){Oc(gc,n,t,e)})).then(t,e)}),{unsafe:!0});try{delete Vc.constructor}catch(t){}jc&&jc(Vc,qc)}bc({global:!0,constructor:!0,wrap:!0,forced:Bc},{Promise:Kc}),Tc(Kc,Gc,!1),Ec(Gc);var la={},pa=la,ha=fe("iterator"),da=Array.prototype,va=Do,ya=Wt,ga=s,ba=la,ma=fe("iterator"),wa=function(t){if(!ga(t))return ya(t,ma)||ya(t,"@@iterator")||ba[va(t)]},Oa=lt,Sa=Gt,ja=at,Ta=Nt,Ea=wa,Pa=TypeError,xa=lt,Aa=at,La=Wt,Ra=Wi,Ca=lt,Ia=at,ka=Nt,_a=function(t){return void 0!==t&&(pa.Array===t||da[ha]===t)},Na=Or,Da=vt,Fa=function(t,e){var n=arguments.length<2?Ea(t):e;if(Sa(n))return ja(Oa(n,t));throw new Pa(Ta(t)+" is not iterable")},Ma=wa,Ga=function(t,e,n){var r,o;Aa(t);try{if(!(r=La(t,"return"))){if("throw"===e)throw n;return n}r=xa(r,t)}catch(t){o=!0,r=t}if("throw"===e)throw n;if(o)throw r;return Aa(r),n},Ba=TypeError,Ua=function(t,e){this.stopped=t,this.result=e},Wa=Ua.prototype,za=function(t,e,n){var r,o,i,u,c,a,f,s=n&&n.that,l=!(!n||!n.AS_ENTRIES),p=!(!n||!n.IS_RECORD),h=!(!n||!n.IS_ITERATOR),d=!(!n||!n.INTERRUPTED),v=Ra(e,s),y=function(t){return r&&Ga(r,"normal",t),new Ua(!0,t)},g=function(t){return l?(Ia(t),d?v(t[0],t[1],y):v(t[0],t[1])):d?v(t,y):v(t)};if(p)r=t.iterator;else if(h)r=t;else{if(!(o=Ma(t)))throw new Ba(ka(t)+" is not iterable");if(_a(o)){for(i=0,u=Na(t);u>i;i++)if((c=g(t[i]))&&Da(Wa,c))return c;return new Ua(!1)}r=Fa(t,o)}for(a=p?t.next:r.next;!(f=Ca(a,r)).done;){try{c=g(f.value)}catch(t){Ga(r,"throw",t)}if("object"==typeof c&&c&&Da(Wa,c))return c}return new Ua(!1)},Ha=fe("iterator"),Va=!1;try{var Ka=0,qa={next:function(){return{done:!!Ka++}},return:function(){Va=!0}};qa[Ha]=function(){return this},Array.from(qa,(function(){throw 2}))}catch(t){}var Xa=function(t,e){try{if(!e&&!Va)return!1}catch(t){return!1}var n=!1;try{var r={};r[Ha]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n},Ya=Xu,Ja=sc.CONSTRUCTOR||!Xa((function(t){Ya.all(t).then(void 0,(function(){}))})),$a=lt,Qa=Gt,Za=lc,tf=qu,ef=za;fo({target:"Promise",stat:!0,forced:Ja},{all:function(t){var e=this,n=Za.f(e),r=n.resolve,o=n.reject,i=tf((function(){var n=Qa(e.resolve),i=[],u=0,c=1;ef(t,(function(t){var a=u++,f=!1;c++,$a(n,e,t).then((function(t){f||(f=!0,i[a]=t,--c||r(i))}),o)})),--c||r(i)}));return i.error&&o(i.value),n.promise}});var nf=fo,rf=sc.CONSTRUCTOR,of=Xu,uf=dt,cf=R,af=ar,ff=of&&of.prototype;if(nf({target:"Promise",proto:!0,forced:rf,real:!0},{catch:function(t){return this.then(void 0,t)}}),cf(of)){var sf=uf("Promise").prototype.catch;ff.catch!==sf&&af(ff,"catch",sf,{unsafe:!0})}var lf=lt,pf=Gt,hf=lc,df=qu,vf=za;fo({target:"Promise",stat:!0,forced:Ja},{race:function(t){var e=this,n=hf.f(e),r=n.reject,o=df((function(){var o=pf(e.resolve);vf(t,(function(t){lf(o,e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}});var yf=lt,gf=lc;fo({target:"Promise",stat:!0,forced:sc.CONSTRUCTOR},{reject:function(t){var e=gf.f(this);return yf(e.reject,void 0,t),e.promise}});var bf=at,mf=J,wf=lc,Of=fo,Sf=sc.CONSTRUCTOR,jf=function(t,e){if(bf(t),mf(e)&&e.constructor===t)return e;var n=wf.f(t);return(0,n.resolve)(e),n.promise};dt("Promise"),Of({target:"Promise",stat:!0,forced:Sf},{resolve:function(t){return jf(this,t)}});var Tf=n,Ef=function(t,e){var n=[][t];return!!n&&Tf((function(){n.call(null,e||function(){return 1},1)}))},Pf=fo,xf=Vn,Af=Xn,Lf=Ef,Rf=f([].join);Pf({target:"Array",proto:!0,forced:xf!==Object||!Lf("join",",")},{join:function(t){return Rf(Af(this),void 0===t?",":t)}});var Cf={},If=r,kf=ot,_f=$,Nf=at,Df=Xn,Ff=po;Cf.f=If&&!kf?Object.defineProperties:function(t,e){Nf(t);for(var n,r=Df(e),o=Ff(e),i=o.length,u=0;i>u;)_f.f(t,n=o[u++],r[n]);return t};var Mf,Gf=at,Bf=Cf,Uf=kr,Wf=Ue,zf=zi,Hf=et,Vf="prototype",Kf="script",qf=Be("IE_PROTO"),Xf=function(){},Yf=function(t){return"<"+Kf+">"+t+"</"+Kf+">"},Jf=function(t){t.write(Yf("")),t.close();var e=t.parentWindow.Object;return t=null,e},$f=function(){try{Mf=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;$f="undefined"!=typeof document?document.domain&&Mf?Jf(Mf):(e=Hf("iframe"),n="java"+Kf+":",e.style.display="none",zf.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(Yf("document.F=Object")),t.close(),t.F):Jf(Mf);for(var r=Uf.length;r--;)delete $f[Vf][Uf[r]];return $f()};Wf[qf]=!0;var Qf=Object.create||function(t,e){var n;return null!==t?(Xf[Vf]=Gf(t),n=new Xf,Xf[Vf]=null,n[qf]=t):n=$f(),void 0===e?n:Bf.f(n,e)},Zf=fe,ts=Qf,es=$.f,ns=Zf("unscopables"),rs=Array.prototype;void 0===rs[ns]&&es(rs,ns,{configurable:!0,value:ts(null)});var os,is,us,cs=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),as=m,fs=R,ss=y,ls=cs,ps=Be("IE_PROTO"),hs=Object,ds=hs.prototype,vs=ls?hs.getPrototypeOf:function(t){var e=ss(t);if(as(e,ps))return e[ps];var n=e.constructor;return fs(n)&&e instanceof n?n.prototype:e instanceof hs?ds:null},ys=n,gs=R,bs=J,ms=vs,ws=ar,Os=fe("iterator"),Ss=!1;[].keys&&("next"in(us=[].keys())?(is=ms(ms(us)))!==Object.prototype&&(os=is):Ss=!0);var js=!bs(os)||ys((function(){var t={};return os[Os].call(t)!==t}));js&&(os={}),gs(os[Os])||ws(os,Os,(function(){return this}));var Ts={IteratorPrototype:os,BUGGY_SAFARI_ITERATORS:Ss},Es=Ts.IteratorPrototype,Ps=Qf,xs=_e,As=Qo,Ls=la,Rs=function(){return this},Cs=fo,Is=lt,ks=R,_s=function(t,e,n,r){var o=e+" Iterator";return t.prototype=Ps(Es,{next:xs(+!r,n)}),As(t,o,!1),Ls[o]=Rs,t},Ns=vs,Ds=Xo,Fs=Qo,Ms=Fe,Gs=ar,Bs=la,Us=E.PROPER,Ws=E.CONFIGURABLE,zs=Ts.IteratorPrototype,Hs=Ts.BUGGY_SAFARI_ITERATORS,Vs=fe("iterator"),Ks="keys",qs="values",Xs="entries",Ys=function(){return this},Js=function(t,e,n,r,o,i,u){_s(n,e,r);var c,a,f,s=function(t){if(t===o&&v)return v;if(!Hs&&t&&t in h)return h[t];switch(t){case Ks:case qs:case Xs:return function(){return new n(this,t)}}return function(){return new n(this)}},l=e+" Iterator",p=!1,h=t.prototype,d=h[Vs]||h["@@iterator"]||o&&h[o],v=!Hs&&d||s(o),y="Array"===e&&h.entries||d;if(y&&(c=Ns(y.call(new t)))!==Object.prototype&&c.next&&(Ns(c)!==zs&&(Ds?Ds(c,zs):ks(c[Vs])||Gs(c,Vs,Ys)),Fs(c,l,!0)),Us&&o===qs&&d&&d.name!==qs&&(Ws?Ms(h,"name",qs):(p=!0,v=function(){return Is(d,this)})),o)if(a={values:s(qs),keys:i?v:s(Ks),entries:s(Xs)},u)for(f in a)(Hs||p||!(f in h))&&Gs(h,f,a[f]);else Cs({target:e,proto:!0,forced:Hs||p},a);return h[Vs]!==v&&Gs(h,Vs,v,{name:o}),Bs[e]=v,a},$s=function(t,e){return{value:t,done:e}},Qs=Xn,Zs=function(t){rs[ns][t]=!0},tl=la,el=en,nl=$.f,rl=Js,ol=$s,il=r,ul="Array Iterator",cl=el.set,al=el.getterFor(ul),fl=rl(Array,"Array",(function(t,e){cl(this,{type:ul,target:Qs(t),index:0,kind:e})}),(function(){var t=al(this),e=t.target,n=t.index++;if(!e||n>=e.length)return t.target=void 0,ol(void 0,!0);switch(t.kind){case"keys":return ol(n,!1);case"values":return ol(e[n],!1)}return ol([n,e[n]],!1)}),"values"),sl=tl.Arguments=tl.Array;if(Zs("keys"),Zs("values"),Zs("entries"),il&&"values"!==sl.name)try{nl(sl,"name",{value:"values"})}catch(t){}var ll=Do,pl=String,hl=function(t){if("Symbol"===ll(t))throw new TypeError("Cannot convert a Symbol value to a string");return pl(t)},dl=f,vl=hr,yl=hl,gl=h,bl=dl("".charAt),ml=dl("".charCodeAt),wl=dl("".slice),Ol=function(t){return function(e,n){var r,o,i=yl(gl(e)),u=vl(n),c=i.length;return u<0||u>=c?t?"":void 0:(r=ml(i,u))<55296||r>56319||u+1===c||(o=ml(i,u+1))<56320||o>57343?t?bl(i,u):r:t?wl(i,u,u+2):o-56320+(r-55296<<10)+65536}},Sl={codeAt:Ol(!1),charAt:Ol(!0)}.charAt,jl=hl,Tl=en,El=Js,Pl=$s,xl="String Iterator",Al=Tl.set,Ll=Tl.getterFor(xl);El(String,"String",(function(t){Al(this,{type:xl,string:jl(t),index:0})}),(function(){var t,e=Ll(this),n=e.string,r=e.index;return r>=n.length?Pl(void 0,!0):(t=Sl(n,r),e.index+=t.length,Pl(t,!1))}));var Rl={exports:{}},Cl={},Il=me,kl=$,_l=_e,Nl=gr,Dl=Or,Fl=function(t,e,n){var r=Il(e);r in t?kl.f(t,r,_l(0,n)):t[r]=n},Ml=Array,Gl=Math.max,Bl=Bn,Ul=Xn,Wl=fr.f,zl=function(t,e,n){for(var r=Dl(t),o=Nl(e,r),i=Nl(void 0===n?r:n,r),u=Ml(Gl(i-o,0)),c=0;o<i;o++,c++)Fl(u,c,t[o]);return u.length=c,u},Hl="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Cl.f=function(t){return Hl&&"Window"===Bl(t)?function(t){try{return Wl(t)}catch(t){return zl(Hl)}}(t):Wl(Ul(t))};var Vl=n((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),Kl=n,ql=J,Xl=Bn,Yl=Vl,Jl=Object.isExtensible,$l=Kl((function(){Jl(1)}))||Yl?function(t){return!!ql(t)&&((!Yl||"ArrayBuffer"!==Xl(t))&&(!Jl||Jl(t)))}:Jl,Ql=!n((function(){return Object.isExtensible(Object.preventExtensions({}))})),Zl=fo,tp=f,ep=Ue,np=J,rp=m,op=$.f,ip=fr,up=Cl,cp=$l,ap=Ql,fp=!1,sp=te("meta"),lp=0,pp=function(t){op(t,sp,{value:{objectID:"O"+lp++,weakData:{}}})},hp=Rl.exports={enable:function(){hp.enable=function(){},fp=!0;var t=ip.f,e=tp([].splice),n={};n[sp]=1,t(n).length&&(ip.f=function(n){for(var r=t(n),o=0,i=r.length;o<i;o++)if(r[o]===sp){e(r,o,1);break}return r},Zl({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:up.f}))},fastKey:function(t,e){if(!np(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!rp(t,sp)){if(!cp(t))return"F";if(!e)return"E";pp(t)}return t[sp].objectID},getWeakData:function(t,e){if(!rp(t,sp)){if(!cp(t))return!0;if(!e)return!1;pp(t)}return t[sp].weakData},onFreeze:function(t){return ap&&fp&&cp(t)&&!rp(t,sp)&&pp(t),t}};ep[sp]=!0;var dp=Rl.exports,vp=R,yp=J,gp=Xo,bp=fo,mp=I,wp=f,Op=eo,Sp=ar,jp=dp,Tp=za,Ep=ii,Pp=R,xp=s,Ap=J,Lp=n,Rp=Xa,Cp=Qo,Ip=function(t,e,n){var r,o;return gp&&vp(r=e.constructor)&&r!==n&&yp(o=r.prototype)&&o!==n.prototype&&gp(t,o),t},kp=ar,_p=Bn,Np=Array.isArray||function(t){return"Array"===_p(t)},Dp=ji,Fp=J,Mp=fe("species"),Gp=Array,Bp=function(t){var e;return Np(t)&&(e=t.constructor,(Dp(e)&&(e===Gp||Np(e.prototype))||Fp(e)&&null===(e=e[Mp]))&&(e=void 0)),void 0===e?Gp:e},Up=Wi,Wp=Vn,zp=y,Hp=Or,Vp=function(t,e){return new(Bp(t))(0===e?0:e)},Kp=f([].push),qp=function(t){var e=1===t,n=2===t,r=3===t,o=4===t,i=6===t,u=7===t,c=5===t||i;return function(a,f,s,l){for(var p,h,d=zp(a),v=Wp(d),y=Hp(v),g=Up(f,s),b=0,m=l||Vp,w=e?m(a,y):n||u?m(a,0):void 0;y>b;b++)if((c||b in v)&&(h=g(p=v[b],b,d),t))if(e)w[b]=h;else if(h)switch(t){case 3:return!0;case 5:return p;case 6:return b;case 2:Kp(w,p)}else switch(t){case 4:return!1;case 7:Kp(w,p)}return i?-1:r||o?o:w}},Xp={forEach:qp(0),map:qp(1),filter:qp(2),some:qp(3),every:qp(4),find:qp(5),findIndex:qp(6),filterReject:qp(7)},Yp=f,Jp=function(t,e,n){for(var r in e)kp(t,r,e[r],n);return t},$p=dp.getWeakData,Qp=ii,Zp=at,th=s,eh=J,nh=za,rh=m,oh=en.set,ih=en.getterFor,uh=Xp.find,ch=Xp.findIndex,ah=Yp([].splice),fh=0,sh=function(t){return t.frozen||(t.frozen=new lh)},lh=function(){this.entries=[]},ph=function(t,e){return uh(t.entries,(function(t){return t[0]===e}))};lh.prototype={get:function(t){var e=ph(this,t);if(e)return e[1]},has:function(t){return!!ph(this,t)},set:function(t,e){var n=ph(this,t);n?n[1]=e:this.entries.push([t,e])},delete:function(t){var e=ch(this.entries,(function(e){return e[0]===t}));return~e&&ah(this.entries,e,1),!!~e}};var hh={getConstructor:function(t,e,n,r){var o=t((function(t,o){Qp(t,i),oh(t,{type:e,id:fh++,frozen:void 0}),th(o)||nh(o,t[r],{that:t,AS_ENTRIES:n})})),i=o.prototype,u=ih(e),c=function(t,e,n){var r=u(t),o=$p(Zp(e),!0);return!0===o?sh(r).set(e,n):o[r.id]=n,t};return Jp(i,{delete:function(t){var e=u(this);if(!eh(t))return!1;var n=$p(t);return!0===n?sh(e).delete(t):n&&rh(n,e.id)&&delete n[e.id]},has:function(t){var e=u(this);if(!eh(t))return!1;var n=$p(t);return!0===n?sh(e).has(t):n&&rh(n,e.id)}}),Jp(i,n?{get:function(t){var e=u(this);if(eh(t)){var n=$p(t);return!0===n?sh(e).get(t):n?n[e.id]:void 0}},set:function(t,e){return c(this,t,e)}}:{add:function(t){return c(this,t,!0)}}),o}};(function(t,e,n){var r=-1!==t.indexOf("Map"),o=-1!==t.indexOf("Weak"),i=r?"set":"add",u=mp[t],c=u&&u.prototype,a=u,f={},s=function(t){var e=wp(c[t]);Sp(c,t,"add"===t?function(t){return e(this,0===t?0:t),this}:"delete"===t?function(t){return!(o&&!Ap(t))&&e(this,0===t?0:t)}:"get"===t?function(t){return o&&!Ap(t)?void 0:e(this,0===t?0:t)}:"has"===t?function(t){return!(o&&!Ap(t))&&e(this,0===t?0:t)}:function(t,n){return e(this,0===t?0:t,n),this})};if(Op(t,!Pp(u)||!(o||c.forEach&&!Lp((function(){(new u).entries().next()})))))a=n.getConstructor(e,t,r,i),jp.enable();else if(Op(t,!0)){var l=new a,p=l[i](o?{}:-0,1)!==l,h=Lp((function(){l.has(1)})),d=Rp((function(t){new u(t)})),v=!o&&Lp((function(){for(var t=new u,e=5;e--;)t[i](e,e);return!t.has(-0)}));d||((a=e((function(t,e){Ep(t,c);var n=Ip(new u,t,a);return xp(e)||Tp(e,n[i],{that:n,AS_ENTRIES:r}),n}))).prototype=c,c.constructor=a),(h||v)&&(s("delete"),s("has"),r&&s("get")),(v||p)&&s(i),o&&c.clear&&delete c.clear}f[t]=a,bp({global:!0,constructor:!0,forced:a!==u},f),Cp(a,t),o||n.setStrong(a,t,r)})("WeakSet",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),hh);var dh={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},vh=et("span").classList,yh=vh&&vh.constructor&&vh.constructor.prototype,gh=yh===Object.prototype?void 0:yh,bh=I,mh=dh,wh=gh,Oh=fl,Sh=Fe,jh=Qo,Th=fe("iterator"),Eh=Oh.values,Ph=function(t,e){if(t){if(t[Th]!==Eh)try{Sh(t,Th,Eh)}catch(e){t[Th]=Eh}if(jh(t,e,!0),mh[e])for(var n in Oh)if(t[n]!==Oh[n])try{Sh(t,n,Oh[n])}catch(e){t[n]=Oh[n]}}};for(var xh in mh)Ph(bh[xh]&&bh[xh].prototype,xh);Ph(wh,"DOMTokenList");var Ah=Xp.forEach,Lh=Ef("forEach")?[].forEach:function(t){return Ah(this,t,arguments.length>1?arguments[1]:void 0)},Rh=I,Ch=dh,Ih=gh,kh=Lh,_h=Fe,Nh=function(t){if(t&&t.forEach!==kh)try{_h(t,"forEach",kh)}catch(e){t.forEach=kh}};for(var Dh in Ch)Ch[Dh]&&Nh(Rh[Dh]&&Rh[Dh].prototype);Nh(Ih);var Fh,Mh,Gh,Bh,Uh,Wh,zh,Hh,Vh,Kh,qh=y,Xh=po;function Yh(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)}function Jh(t){return"top"===t||"bottom"===t}function $h(t){return t[Mh.LEFT]+t[Mh.RIGHT]}function Qh(t){return t[Mh.TOP]+t[Mh.BOTTOM]}fo({target:"Object",stat:!0,forced:n((function(){Xh(1)}))},{keys:function(t){return Xh(qh(t))}}),function(t){t[t.SCROLL_NONE=0]="SCROLL_NONE",t[t.SCROLL_BACKWARD=1]="SCROLL_BACKWARD",t[t.SCROLL_FORWARD=2]="SCROLL_FORWARD"}(Fh||(Fh={})),function(t){t[t.TOP=0]="TOP",t[t.RIGHT=1]="RIGHT",t[t.BOTTOM=2]="BOTTOM",t[t.LEFT=3]="LEFT"}(Mh||(Mh={}));var Zh=".ch-plugin-calendar-label",td={enabled:!0,dimensions:{width:0,height:0},position:"left",text:function(){return[]},padding:[0,0,0,0]},ed=function(){function e(t){var n,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Gh.add(this),this.name="CalendarLabel";var o=null===(r=null===(n=null==t?void 0:t.options)||void 0===n?void 0:n.options)||void 0===r?void 0:r.subDomain;this.calendar=t,this.root=null,this.shown=!1,this.options=td,this.computedOptions={radius:null==o?void 0:o.radius,width:null==o?void 0:o.width,height:null==o?void 0:o.height,gutter:null==o?void 0:o.gutter,textAlign:"start"}}var n,r,o;return n=e,(r=[{key:"setup",value:function(t){this.options=Object.assign(Object.assign({},td),t)}},{key:"paint",value:function(){if(!this.options.enabled)return this.destroy();this.shown=!0;var t=this.calendar.calendarPainter.root;return this.root||(this.root=t.append("svg").attr("class",Zh.slice(1)).attr("data-key",this.options.key).attr("x",0).attr("y",0)),this.build(),Promise.resolve()}},{key:"destroy",value:function(){return null!==this.root&&(this.root.remove(),this.root=null),Promise.resolve()}},{key:"build",value:function(){var t=this;return Yh(this,Gh,"m",Bh).call(this),Yh(this,Gh,"m",Uh).call(this),this.root.selectAll("g").data(this.options.text).join((function(e){return e.append("g").call((function(e){return e.append("rect").attr("class","".concat(Zh.slice(1),"-bg")).attr("style","fill: transparent").call((function(e){return Yh(t,Gh,"m",Wh).call(t,e)}))})).call((function(e){return e.append("text").attr("class","".concat(Zh.slice(1),"-text")).attr("dominant-baseline","central").attr("text-anchor","middle").attr("style","fill: currentColor; font-size: 10px").call((function(e){return Yh(t,Gh,"m",zh).call(t,e)}))}))})),Promise.resolve()}}])&&t(n.prototype,r),o&&t(n,o),Object.defineProperty(n,"prototype",{writable:!1}),e}();return Gh=new WeakSet,Bh=function(){var t=this;Object.keys(this.computedOptions).forEach((function(e){void 0!==t.options[e]&&(t.computedOptions[e]=t.options[e])}))},Uh=function(){var t=this.computedOptions,e=t.width,n=t.height,r=t.gutter,o=this.options,i=o.text,u=o.padding,c=o.position,a=i().length;this.options.dimensions={width:e+$h(u),height:n+Qh(u)},Jh(c)?this.options.dimensions.width+=(e+r)*(a-1):this.options.dimensions.height+=(n+r)*(a-1)},Wh=function(t){var e=this,n=this.computedOptions,r=n.width,o=n.height,i=n.radius;t.attr("width",r).attr("height",o).attr("rx",i&&i>0?i:null).attr("ry",i&&i>0?i:null).attr("x",(function(t,n){return Yh(e,Gh,"m",Vh).call(e,n)})).attr("y",(function(t,n){return Yh(e,Gh,"m",Kh).call(e,n)}))},zh=function(t){var e=this,n=this.computedOptions,r=n.height,o=n.textAlign;t.attr("text-anchor",o).attr("x",(function(t,n){return Yh(e,Gh,"m",Hh).call(e)+Yh(e,Gh,"m",Vh).call(e,n)})).attr("y",(function(t,n){return Yh(e,Gh,"m",Kh).call(e,n)+r/2})).text((function(t){return t}))},Hh=function(){var t=this.computedOptions,e=t.width;switch(t.textAlign){case"start":default:return 0;case"middle":return e/2;case"end":return e}},Vh=function(t){var e=this.options,n=e.position,r=e.padding,o=this.computedOptions,i=o.width,u=o.gutter;return function(t){return"left"===t||"right"===t}(n)?r[Mh.LEFT]:r[Mh.LEFT]+(i+u)*t},Kh=function(t){var e=this.options,n=e.position,r=e.padding,o=this.computedOptions,i=o.height,u=o.gutter;return Jh(n)?r[Mh.TOP]:r[Mh.TOP]+(i+u)*t},ed}));//# sourceMappingURL=CalendarLabel.min.js.map