@design.estate/dees-domtools 3.0.2 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,85 +1,85 @@
1
- var WC=Object.create;var wc=Object.defineProperty;var HC=Object.getOwnPropertyDescriptor;var UC=Object.getOwnPropertyNames;var qC=Object.getPrototypeOf,YC=Object.prototype.hasOwnProperty;var o=(t,e)=>wc(t,"name",{value:e,configurable:!0});var or=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}},se=(t,e)=>{for(var r in e)wc(t,r,{get:e[r],enumerable:!0})},VC=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of UC(e))!YC.call(t,i)&&i!==r&&wc(t,i,{get:()=>e[i],enumerable:!(n=HC(e,i))||n.enumerable});return t};var zr=(t,e,r)=>(r=t!=null?WC(qC(t)):{},VC(e||!t||!t.__esModule?wc(r,"default",{value:t,enumerable:!0}):r,t));var mm=or(Ec=>{"use strict";Object.defineProperty(Ec,"__esModule",{value:!0}),Ec.uni=void 0;var nO=o((t="uni")=>`${t}_${"xxxxxxxxxxxxxxxxxxxxxxxx".replace(/[xy]/g,e=>{let r=Math.random()*16|0;return(e==="x"?r:r&3|8).toString(16)})}`,"uni");Ec.uni=nO});var hv=or((Jm,Qm)=>{(function(t,e){typeof Jm=="object"&&typeof Qm<"u"?Qm.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e()})(Jm,(function(){"use strict";var t=1e3,e=6e4,r=36e5,n="millisecond",i="second",s="minute",a="hour",l="day",c="week",u="month",f="quarter",p="year",h="date",m="Invalid Date",d=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|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,y={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:o(function(j){var N=["th","st","nd","rd"],R=j%100;return"["+j+(N[(R-20)%10]||N[R]||N[0])+"]"},"ordinal")},x=o(function(j,N,R){var z=String(j);return!z||z.length>=N?j:""+Array(N+1-z.length).join(R)+j},"m"),T={s:x,z:o(function(j){var N=-j.utcOffset(),R=Math.abs(N),z=Math.floor(R/60),U=R%60;return(N<=0?"+":"-")+x(z,2,"0")+":"+x(U,2,"0")},"z"),m:o(function j(N,R){if(N.date()<R.date())return-j(R,N);var z=12*(R.year()-N.year())+(R.month()-N.month()),U=N.clone().add(z,u),K=R-U<0,X=N.clone().add(z+(K?-1:1),u);return+(-(z+(R-U)/(K?U-X:X-U))||0)},"t"),a:o(function(j){return j<0?Math.ceil(j)||0:Math.floor(j)},"a"),p:o(function(j){return{M:u,y:p,w:c,d:l,D:h,h:a,m:s,s:i,ms:n,Q:f}[j]||String(j||"").toLowerCase().replace(/s$/,"")},"p"),u:o(function(j){return j===void 0},"u")},E="en",_={};_[E]=y;var P="$isDayjsObject",D=o(function(j){return j instanceof C||!(!j||!j[P])},"S"),F=o(function j(N,R,z){var U;if(!N)return E;if(typeof N=="string"){var K=N.toLowerCase();_[K]&&(U=K),R&&(_[K]=R,U=K);var X=N.split("-");if(!U&&X.length>1)return j(X[0])}else{var ue=N.name;_[ue]=N,U=ue}return!z&&U&&(E=U),U||!z&&E},"t"),A=o(function(j,N){if(D(j))return j.clone();var R=typeof N=="object"?N:{};return R.date=j,R.args=arguments,new C(R)},"O"),W=T;W.l=F,W.i=D,W.w=function(j,N){return A(j,{locale:N.$L,utc:N.$u,x:N.$x,$offset:N.$offset})};var C=(function(){function j(R){this.$L=F(R.locale,null,!0),this.parse(R),this.$x=this.$x||R.x||{},this[P]=!0}o(j,"M");var N=j.prototype;return N.parse=function(R){this.$d=(function(z){var U=z.date,K=z.utc;if(U===null)return new Date(NaN);if(W.u(U))return new Date;if(U instanceof Date)return new Date(U);if(typeof U=="string"&&!/Z$/i.test(U)){var X=U.match(d);if(X){var ue=X[2]-1||0,w=(X[7]||"0").substring(0,3);return K?new Date(Date.UTC(X[1],ue,X[3]||1,X[4]||0,X[5]||0,X[6]||0,w)):new Date(X[1],ue,X[3]||1,X[4]||0,X[5]||0,X[6]||0,w)}}return new Date(U)})(R),this.init()},N.init=function(){var R=this.$d;this.$y=R.getFullYear(),this.$M=R.getMonth(),this.$D=R.getDate(),this.$W=R.getDay(),this.$H=R.getHours(),this.$m=R.getMinutes(),this.$s=R.getSeconds(),this.$ms=R.getMilliseconds()},N.$utils=function(){return W},N.isValid=function(){return this.$d.toString()!==m},N.isSame=function(R,z){var U=A(R);return this.startOf(z)<=U&&U<=this.endOf(z)},N.isAfter=function(R,z){return A(R)<this.startOf(z)},N.isBefore=function(R,z){return this.endOf(z)<A(R)},N.$g=function(R,z,U){return W.u(R)?this[z]:this.set(U,R)},N.unix=function(){return Math.floor(this.valueOf()/1e3)},N.valueOf=function(){return this.$d.getTime()},N.startOf=function(R,z){var U=this,K=!!W.u(z)||z,X=W.p(R),ue=o(function(O,v){var M=W.w(U.$u?Date.UTC(U.$y,v,O):new Date(U.$y,v,O),U);return K?M:M.endOf(l)},"l"),w=o(function(O,v){return W.w(U.toDate()[O].apply(U.toDate("s"),(K?[0,0,0,0]:[23,59,59,999]).slice(v)),U)},"$"),xe=this.$W,Te=this.$M,k=this.$D,Ae="set"+(this.$u?"UTC":"");switch(X){case p:return K?ue(1,0):ue(31,11);case u:return K?ue(1,Te):ue(0,Te+1);case c:var Ye=this.$locale().weekStart||0,Yt=(xe<Ye?xe+7:xe)-Ye;return ue(K?k-Yt:k+(6-Yt),Te);case l:case h:return w(Ae+"Hours",0);case a:return w(Ae+"Minutes",1);case s:return w(Ae+"Seconds",2);case i:return w(Ae+"Milliseconds",3);default:return this.clone()}},N.endOf=function(R){return this.startOf(R,!1)},N.$set=function(R,z){var U,K=W.p(R),X="set"+(this.$u?"UTC":""),ue=(U={},U[l]=X+"Date",U[h]=X+"Date",U[u]=X+"Month",U[p]=X+"FullYear",U[a]=X+"Hours",U[s]=X+"Minutes",U[i]=X+"Seconds",U[n]=X+"Milliseconds",U)[K],w=K===l?this.$D+(z-this.$W):z;if(K===u||K===p){var xe=this.clone().set(h,1);xe.$d[ue](w),xe.init(),this.$d=xe.set(h,Math.min(this.$D,xe.daysInMonth())).$d}else ue&&this.$d[ue](w);return this.init(),this},N.set=function(R,z){return this.clone().$set(R,z)},N.get=function(R){return this[W.p(R)]()},N.add=function(R,z){var U,K=this;R=Number(R);var X=W.p(z),ue=o(function(Te){var k=A(K);return W.w(k.date(k.date()+Math.round(Te*R)),K)},"y");if(X===u)return this.set(u,this.$M+R);if(X===p)return this.set(p,this.$y+R);if(X===l)return ue(1);if(X===c)return ue(7);var w=(U={},U[s]=e,U[a]=r,U[i]=t,U)[X]||1,xe=this.$d.getTime()+R*w;return W.w(xe,this)},N.subtract=function(R,z){return this.add(-1*R,z)},N.format=function(R){var z=this,U=this.$locale();if(!this.isValid())return U.invalidDate||m;var K=R||"YYYY-MM-DDTHH:mm:ssZ",X=W.z(this),ue=this.$H,w=this.$m,xe=this.$M,Te=U.weekdays,k=U.months,Ae=U.meridiem,Ye=o(function(v,M,I,B){return v&&(v[M]||v(z,K))||I[M].slice(0,B)},"h"),Yt=o(function(v){return W.s(ue%12||12,v,"0")},"d"),O=Ae||function(v,M,I){var B=v<12?"AM":"PM";return I?B.toLowerCase():B};return K.replace(g,(function(v,M){return M||(function(I){switch(I){case"YY":return String(z.$y).slice(-2);case"YYYY":return W.s(z.$y,4,"0");case"M":return xe+1;case"MM":return W.s(xe+1,2,"0");case"MMM":return Ye(U.monthsShort,xe,k,3);case"MMMM":return Ye(k,xe);case"D":return z.$D;case"DD":return W.s(z.$D,2,"0");case"d":return String(z.$W);case"dd":return Ye(U.weekdaysMin,z.$W,Te,2);case"ddd":return Ye(U.weekdaysShort,z.$W,Te,3);case"dddd":return Te[z.$W];case"H":return String(ue);case"HH":return W.s(ue,2,"0");case"h":return Yt(1);case"hh":return Yt(2);case"a":return O(ue,w,!0);case"A":return O(ue,w,!1);case"m":return String(w);case"mm":return W.s(w,2,"0");case"s":return String(z.$s);case"ss":return W.s(z.$s,2,"0");case"SSS":return W.s(z.$ms,3,"0");case"Z":return X}return null})(v)||X.replace(":","")}))},N.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},N.diff=function(R,z,U){var K,X=this,ue=W.p(z),w=A(R),xe=(w.utcOffset()-this.utcOffset())*e,Te=this-w,k=o(function(){return W.m(X,w)},"D");switch(ue){case p:K=k()/12;break;case u:K=k();break;case f:K=k()/3;break;case c:K=(Te-xe)/6048e5;break;case l:K=(Te-xe)/864e5;break;case a:K=Te/r;break;case s:K=Te/e;break;case i:K=Te/t;break;default:K=Te}return U?K:W.a(K)},N.daysInMonth=function(){return this.endOf(u).$D},N.$locale=function(){return _[this.$L]},N.locale=function(R,z){if(!R)return this.$L;var U=this.clone(),K=F(R,z,!0);return K&&(U.$L=K),U},N.clone=function(){return W.w(this.$d,this)},N.toDate=function(){return new Date(this.valueOf())},N.toJSON=function(){return this.isValid()?this.toISOString():null},N.toISOString=function(){return this.$d.toISOString()},N.toString=function(){return this.$d.toUTCString()},j})(),le=C.prototype;return A.prototype=le,[["$ms",n],["$s",i],["$m",s],["$H",a],["$W",l],["$M",u],["$y",p],["$D",h]].forEach((function(j){le[j[1]]=function(N){return this.$g(N,j[0],j[1])}})),A.extend=function(j,N){return j.$i||(j(N,C,A),j.$i=!0),A},A.locale=F,A.isDayjs=D,A.unix=function(j){return A(1e3*j)},A.en=_[E],A.Ls=_,A.p={},A}))});var mv=or((Xm,Zm)=>{(function(t,e){typeof Xm=="object"&&typeof Zm<"u"?Zm.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_isToday=e()})(Xm,(function(){"use strict";return function(t,e,r){e.prototype.isToday=function(){var n="YYYY-MM-DD",i=r();return this.format(n)===i.format(n)}}}))});var xv=or((tTe,yv)=>{"use strict";yv.exports=class{static{o(this,"SymbolTreeNode")}constructor(){this.parent=null,this.previousSibling=null,this.nextSibling=null,this.firstChild=null,this.lastChild=null,this.childrenVersion=0,this.childIndexCachedUpTo=null,this.cachedIndex=-1,this.cachedIndexVersion=NaN}get isAttached(){return!!(this.parent||this.previousSibling||this.nextSibling)}get hasChildren(){return!!this.firstChild}childrenChanged(){this.childrenVersion=this.childrenVersion+1&4294967295,this.childIndexCachedUpTo=null}getCachedIndex(e){return this.cachedIndexVersion!==e.childrenVersion?(this.cachedIndexVersion=NaN,-1):this.cachedIndex}setCachedIndex(e,r){this.cachedIndexVersion=e.childrenVersion,this.cachedIndex=r}}});var wv=or((nTe,bv)=>{"use strict";bv.exports=Object.freeze({DISCONNECTED:1,PRECEDING:2,FOLLOWING:4,CONTAINS:8,CONTAINED_BY:16})});var Ev=or((iTe,Tv)=>{"use strict";var Sv=Symbol(),vv=Symbol(),Qn=Symbol(),kv=Symbol(),kr=class{static{o(this,"TreeIterator")}constructor(e,r,n,i){this[Sv]=e,this[vv]=r,this[Qn]=n,this[kv]=i}next(){let e=this[Sv],r=this[kv],n=this[vv];if(!this[Qn])return{done:!0,value:n};let i=this[Qn];return r===1?this[Qn]=e._node(i).previousSibling:r===2?this[Qn]=e._node(i).nextSibling:r===3?this[Qn]=e._node(i).parent:r===4?this[Qn]=e.preceding(i,{root:n}):this[Qn]=e.following(i,{root:n}),{done:!1,value:i}}};Object.defineProperty(kr.prototype,Symbol.iterator,{value:o(function(){return this},"value"),writable:!1}),kr.PREV=1,kr.NEXT=2,kr.PARENT=3,kr.PRECEDING=4,kr.FOLLOWING=5,Object.freeze(kr),Object.freeze(kr.prototype),Tv.exports=kr});var Cv=or((sTe,Dv)=>{"use strict";var SP=xv(),Xn=wv(),cr=Ev();function ad(){return!0}o(ad,"returnTrue");function ms(t,e){return t[t.length-1-e]}o(ms,"reverseArrayIndex");var jf=class{static{o(this,"SymbolTree")}constructor(e){this.symbol=Symbol(e||"SymbolTree data")}initialize(e){return this._node(e),e}_node(e){if(!e)return null;let r=e[this.symbol];return r||(e[this.symbol]=new SP)}hasChildren(e){return this._node(e).hasChildren}firstChild(e){return this._node(e).firstChild}lastChild(e){return this._node(e).lastChild}previousSibling(e){return this._node(e).previousSibling}nextSibling(e){return this._node(e).nextSibling}parent(e){return this._node(e).parent}lastInclusiveDescendant(e){let r,n=e;for(;r=this._node(n).lastChild;)n=r;return n}preceding(e,r){let n=r&&r.root;if(e===n)return null;let i=this._node(e).previousSibling;return i?this.lastInclusiveDescendant(i):this._node(e).parent}following(e,r){let n=r&&r.root,s=!(r&&r.skipChildren)&&this._node(e).firstChild;if(s)return s;let a=e;do{if(a===n)return null;let l=this._node(a).nextSibling;if(l)return l;a=this._node(a).parent}while(a);return null}childrenToArray(e,r){let n=r&&r.array||[],i=r&&r.filter||ad,s=r&&r.thisArg||void 0,a=this._node(e),l=a.firstChild,c=0;for(;l;){let u=this._node(l);u.setCachedIndex(a,c),i.call(s,l)&&n.push(l),l=u.nextSibling,++c}return n}ancestorsToArray(e,r){let n=r&&r.array||[],i=r&&r.filter||ad,s=r&&r.thisArg||void 0,a=e;for(;a;)i.call(s,a)&&n.push(a),a=this._node(a).parent;return n}treeToArray(e,r){let n=r&&r.array||[],i=r&&r.filter||ad,s=r&&r.thisArg||void 0,a=e;for(;a;)i.call(s,a)&&n.push(a),a=this.following(a,{root:e});return n}childrenIterator(e,r){let n=r&&r.reverse,i=this._node(e);return new cr(this,e,n?i.lastChild:i.firstChild,n?cr.PREV:cr.NEXT)}previousSiblingsIterator(e){return new cr(this,e,this._node(e).previousSibling,cr.PREV)}nextSiblingsIterator(e){return new cr(this,e,this._node(e).nextSibling,cr.NEXT)}ancestorsIterator(e){return new cr(this,e,e,cr.PARENT)}treeIterator(e,r){let n=r&&r.reverse;return new cr(this,e,n?this.lastInclusiveDescendant(e):e,n?cr.PRECEDING:cr.FOLLOWING)}index(e){let r=this._node(e),n=this._node(r.parent);if(!n)return-1;let i=r.getCachedIndex(n);if(i>=0)return i;i=0;let s=n.firstChild;if(n.childIndexCachedUpTo){let a=this._node(n.childIndexCachedUpTo);s=a.nextSibling,i=a.getCachedIndex(n)+1}for(;s;){let a=this._node(s);if(a.setCachedIndex(n,i),s===e)break;++i,s=a.nextSibling}return n.childIndexCachedUpTo=e,i}childrenCount(e){let r=this._node(e);return r.lastChild?this.index(r.lastChild)+1:0}compareTreePosition(e,r){if(e===r)return 0;let n=[];{let f=e;for(;f;){if(f===r)return Xn.CONTAINS|Xn.PRECEDING;n.push(f),f=this.parent(f)}}let i=[];{let f=r;for(;f;){if(f===e)return Xn.CONTAINED_BY|Xn.FOLLOWING;i.push(f),f=this.parent(f)}}let s=ms(n,0);if(!s||s!==ms(i,0))return Xn.DISCONNECTED;let a=0,l=Math.min(n.length,i.length);for(let f=0;f<l;++f){let p=ms(n,f),h=ms(i,f);if(p!==h)break;a=f}let c=this.index(ms(n,a+1));return this.index(ms(i,a+1))<c?Xn.PRECEDING:Xn.FOLLOWING}remove(e){let r=this._node(e),n=this._node(r.parent),i=this._node(r.previousSibling),s=this._node(r.nextSibling);return n&&(n.firstChild===e&&(n.firstChild=r.nextSibling),n.lastChild===e&&(n.lastChild=r.previousSibling)),i&&(i.nextSibling=r.nextSibling),s&&(s.previousSibling=r.previousSibling),r.parent=null,r.previousSibling=null,r.nextSibling=null,r.cachedIndex=-1,r.cachedIndexVersion=NaN,n&&n.childrenChanged(),e}insertBefore(e,r){let n=this._node(e),i=this._node(n.previousSibling),s=this._node(r),a=this._node(n.parent);if(s.isAttached)throw Error("Given object is already present in this SymbolTree, remove it first");return s.parent=n.parent,s.previousSibling=n.previousSibling,s.nextSibling=e,n.previousSibling=r,i&&(i.nextSibling=r),a&&a.firstChild===e&&(a.firstChild=r),a&&a.childrenChanged(),r}insertAfter(e,r){let n=this._node(e),i=this._node(n.nextSibling),s=this._node(r),a=this._node(n.parent);if(s.isAttached)throw Error("Given object is already present in this SymbolTree, remove it first");return s.parent=n.parent,s.previousSibling=e,s.nextSibling=n.nextSibling,n.nextSibling=r,i&&(i.previousSibling=r),a&&a.lastChild===e&&(a.lastChild=r),a&&a.childrenChanged(),r}prependChild(e,r){let n=this._node(e),i=this._node(r);if(i.isAttached)throw Error("Given object is already present in this SymbolTree, remove it first");return n.hasChildren?this.insertBefore(n.firstChild,r):(i.parent=e,n.firstChild=r,n.lastChild=r,n.childrenChanged()),r}appendChild(e,r){let n=this._node(e),i=this._node(r);if(i.isAttached)throw Error("Given object is already present in this SymbolTree, remove it first");return n.hasChildren?this.insertAfter(n.lastChild,r):(i.parent=e,n.firstChild=r,n.lastChild=r,n.childrenChanged()),r}};Dv.exports=jf,jf.TreePosition=Xn});var Vv=or((qEe,Yv)=>{"use strict";Yv.exports=function(t,e){e||(e={}),typeof e=="function"&&(e={cmp:e});var r=typeof e.cycles=="boolean"?e.cycles:!1,n=e.cmp&&(function(s){return function(a){return function(l,c){var u={key:l,value:a[l]},f={key:c,value:a[c]};return s(u,f)}}})(e.cmp),i=[];return o((function s(a){if(a&&a.toJSON&&typeof a.toJSON=="function"&&(a=a.toJSON()),a!==void 0){if(typeof a=="number")return isFinite(a)?""+a:"null";if(typeof a!="object")return JSON.stringify(a);var l,c;if(Array.isArray(a)){for(c="[",l=0;l<a.length;l++)l&&(c+=","),c+=s(a[l])||"null";return c+"]"}if(a===null)return"null";if(i.indexOf(a)!==-1){if(r)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var u=i.push(a)-1,f=Object.keys(a).sort(n&&n(a));for(c="",l=0;l<f.length;l++){var p=f[l],h=s(a[p]);h&&(c&&(c+=","),c+=JSON.stringify(p)+":"+h)}return i.splice(u,1),"{"+c+"}"}}),"stringify")(t)}});var GE=or((QHe,KE)=>{"use strict";var Ih=Object.prototype.hasOwnProperty,zE=Object.prototype.toString,WE=Object.defineProperty,HE=Object.getOwnPropertyDescriptor,UE=o(function(e){return typeof Array.isArray=="function"?Array.isArray(e):zE.call(e)==="[object Array]"},"isArray"),qE=o(function(e){if(!e||zE.call(e)!=="[object Object]")return!1;var r=Ih.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&Ih.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;var i;for(i in e);return typeof i>"u"||Ih.call(e,i)},"isPlainObject"),YE=o(function(e,r){WE&&r.name==="__proto__"?WE(e,r.name,{enumerable:!0,configurable:!0,value:r.newValue,writable:!0}):e[r.name]=r.newValue},"setProperty"),VE=o(function(e,r){if(r==="__proto__")if(Ih.call(e,r)){if(HE)return HE(e,r).value}else return;return e[r]},"getProperty");KE.exports=o(function t(){var e,r,n,i,s,a,l=arguments[0],c=1,u=arguments.length,f=!1;for(typeof l=="boolean"&&(f=l,l=arguments[1]||{},c=2),(l==null||typeof l!="object"&&typeof l!="function")&&(l={});c<u;++c)if(e=arguments[c],e!=null)for(r in e)n=VE(l,r),i=VE(e,r),l!==i&&(f&&i&&(qE(i)||(s=UE(i)))?(s?(s=!1,a=n&&UE(n)?n:[]):a=n&&qE(n)?n:{},YE(l,{name:r,newValue:t(f,a,i)})):typeof i<"u"&&YE(l,{name:r,newValue:i}));return l},"extend")});var YD=or((v9e,Ix)=>{(function(){var t;typeof Ix<"u"?t=Ix.exports=n:t=(function(){return this||(0,eval)("this")})(),t.format=n,t.vsprintf=r,typeof console<"u"&&typeof console.log=="function"&&(t.printf=e);function e(){console.log(n.apply(null,arguments))}o(e,"printf");function r(i,s){return n.apply(null,[i].concat(s))}o(r,"vsprintf");function n(i){for(var s=1,a=[].slice.call(arguments),l=0,c=i.length,u="",f,p=!1,h,m,d=!1,g,y=o(function(){return a[s++]},"nextArg"),x=o(function(){for(var T="";/\d/.test(i[l]);)T+=i[l++],f=i[l];return T.length>0?parseInt(T):null},"slurpNumber");l<c;++l)if(f=i[l],p)switch(p=!1,f=="."?(d=!1,f=i[++l]):f=="0"&&i[l+1]=="."?(d=!0,l+=2,f=i[l]):d=!0,g=x(),f){case"b":u+=parseInt(y(),10).toString(2);break;case"c":h=y(),typeof h=="string"||h instanceof String?u+=h:u+=String.fromCharCode(parseInt(h,10));break;case"d":u+=parseInt(y(),10);break;case"f":m=String(parseFloat(y()).toFixed(g||6)),u+=d?m:m.replace(/^0/,"");break;case"j":u+=JSON.stringify(y());break;case"o":u+="0"+parseInt(y(),10).toString(8);break;case"s":u+=y();break;case"x":u+="0x"+parseInt(y(),10).toString(16);break;case"X":u+="0x"+parseInt(y(),10).toString(16).toUpperCase();break;default:u+=f;break}else f==="%"?p=!0:u+=f;return u}o(n,"format")})()});var iC=or(Lr=>{"use strict";Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.PathError=Lr.TokenData=void 0,Lr.parse=jx,Lr.compile=ij,Lr.match=sj,Lr.pathToRegexp=eC,Lr.stringify=lj;var $x="/",Bx=o(t=>t,"NOOP_VALUE"),ej=/^[$_\p{ID_Start}]$/u,XD=/^[$\u200c\u200d\p{ID_Continue}]$/u,tj=/^[$_\p{ID_Start}][$\u200c\u200d\p{ID_Continue}]*$/u,rj="{}()[]+?!";function nj(t){return t.replace(/[{}()\[\]+?!:*\\]/g,"\\$&")}o(nj,"escapeText");function wi(t){return t.replace(/[.+*?^${}()[\]|/\\]/g,"\\$&")}o(wi,"escape");var Kh=class{static{o(this,"TokenData")}constructor(e,r){this.tokens=e,this.originalPath=r}};Lr.TokenData=Kh;var Si=class extends TypeError{static{o(this,"PathError")}constructor(e,r){let n=e;r&&(n+=`: ${r}`),n+="; visit https://git.new/pathToRegexpError for info",super(n),this.originalPath=r}};Lr.PathError=Si;function jx(t,e={}){let{encodePath:r=Bx}=e,n=[...t],i=[],s=0,a=0;function l(){let u="";if(ej.test(n[s]))do u+=n[s++];while(XD.test(n[s]));else if(n[s]==='"'){let f=s;for(;s<n.length;){if(n[++s]==='"'){s++,f=0;break}n[s]==="\\"&&s++,u+=n[s]}if(f)throw new Si(`Unterminated quote at index ${f}`,t)}if(!u)throw new Si(`Missing parameter name at index ${s}`,t);return u}for(o(l,"name");s<n.length;){let u=n[s++];rj.includes(u)?i.push({type:u,index:s,value:u}):u==="\\"?i.push({type:"escape",index:s,value:n[s++]}):u===":"?i.push({type:"param",index:s,value:l()}):u==="*"?i.push({type:"wildcard",index:s,value:l()}):i.push({type:"char",index:s,value:u})}i.push({type:"end",index:s,value:""});function c(u){let f=[];for(;;){let p=i[a++];if(p.type===u)break;if(p.type==="char"||p.type==="escape"){let h=p.value,m=i[a];for(;m.type==="char"||m.type==="escape";)h+=m.value,m=i[++a];f.push({type:"text",value:r(h)});continue}if(p.type==="param"||p.type==="wildcard"){f.push({type:p.type,name:p.value});continue}if(p.type==="{"){f.push({type:"group",tokens:c("}")});continue}throw new Si(`Unexpected ${p.type} at index ${p.index}, expected ${u}`,t)}return f}return o(c,"consumeUntil"),new Kh(c("end"),t)}o(jx,"parse");function ij(t,e={}){let{encode:r=encodeURIComponent,delimiter:n=$x}=e,i=typeof t=="object"?t:jx(t,e),s=ZD(i.tokens,n,r);return o(function(l={}){let[c,...u]=s(l);if(u.length)throw new TypeError(`Missing parameters: ${u.join(", ")}`);return c},"path")}o(ij,"compile");function ZD(t,e,r){let n=t.map(i=>oj(i,e,r));return i=>{let s=[""];for(let a of n){let[l,...c]=a(i);s[0]+=l,s.push(...c)}return s}}o(ZD,"tokensToFunction");function oj(t,e,r){if(t.type==="text")return()=>[t.value];if(t.type==="group"){let i=ZD(t.tokens,e,r);return s=>{let[a,...l]=i(s);return l.length?[""]:[a]}}let n=r||Bx;return t.type==="wildcard"&&r!==!1?i=>{let s=i[t.name];if(s==null)return["",t.name];if(!Array.isArray(s)||s.length===0)throw new TypeError(`Expected "${t.name}" to be a non-empty array`);return[s.map((a,l)=>{if(typeof a!="string")throw new TypeError(`Expected "${t.name}/${l}" to be a string`);return n(a)}).join(e)]}:i=>{let s=i[t.name];if(s==null)return["",t.name];if(typeof s!="string")throw new TypeError(`Expected "${t.name}" to be a string`);return[n(s)]}}o(oj,"tokenToFunction");function sj(t,e={}){let{decode:r=decodeURIComponent,delimiter:n=$x}=e,{regexp:i,keys:s}=eC(t,e),a=s.map(l=>r===!1?Bx:l.type==="param"?r:c=>c.split(n).map(r));return o(function(c){let u=i.exec(c);if(!u)return!1;let f=u[0],p=Object.create(null);for(let h=1;h<u.length;h++){if(u[h]===void 0)continue;let m=s[h-1],d=a[h-1];p[m.name]=d(u[h])}return{path:f,params:p}},"match")}o(sj,"match");function eC(t,e={}){let{delimiter:r=$x,end:n=!0,sensitive:i=!1,trailing:s=!0}=e,a=new zx("^"),l=[t],c=0;for(;l.length;){let p=l.shift();if(Array.isArray(p)){l.push(...p);continue}let h=typeof p=="object"?p:jx(p,e);Wx(h.tokens,0,[],m=>{if(c++>=256)throw new Si("Too many path combinations",h.originalPath);let d=a;for(let g of aj(m,r,h.originalPath))d=d.add(g.source,g.key);d.add("")})}let u=[],f=tC(a,u);return s&&(f+="(?:"+wi(r)+"$)?"),f+=n?"$":"(?="+wi(r)+"|$)",{regexp:new RegExp(f,i?"":"i"),keys:u}}o(eC,"pathToRegexp");function tC(t,e){t.key&&e.push(t.key);let r=Object.keys(t.children),n=r.map(i=>tC(t.children[i],e)).join("|");return t.source+(r.length<2?n:`(?:${n})`)}o(tC,"toRegExp");var zx=class t{static{o(this,"SourceNode")}constructor(e,r){this.source=e,this.key=r,this.children=Object.create(null)}add(e,r){var n;let i=e+":"+(r?r.name:"");return(n=this.children)[i]||(n[i]=new t(e,r))}};function Wx(t,e,r,n){for(;e<t.length;){let i=t[e++];if(i.type==="group"){Wx(i.tokens,0,r.slice(),s=>Wx(t,e,s,n));continue}r.push(i)}n(r)}o(Wx,"flatten");function aj(t,e,r){let n=[],i="",s="",a=0,l=0,c=0;function u(p,h){for(;p<t.length;){let m=t[p++];if(m.type===h)return!0;if(m.type==="text"&&m.value.includes(e))break}return!1}o(u,"hasInSegment");function f(p){let h="";for(;p<t.length;){let m=t[p++];if(m.type!=="text")break;h+=m.value}return h}for(o(f,"peekText");c<t.length;){let p=t[c++];if(p.type==="text"){n.push({source:wi(p.value)}),i+=p.value,a===2&&(s+=p.value),p.value.includes(e)&&(l=0);continue}if(p.type==="param"||p.type==="wildcard"){if(a&&!i)throw new Si(`Missing text before "${p.name}" ${p.type}`,r);p.type==="param"?(n.push({source:l?`(${vi(e,i)}+?)`:u(c,"wildcard")?`(${vi(e,f(c))}+?)`:`(${vi(e,"")}+?)`,key:p}),l|=a=1):(n.push({source:l&2?`(${vi(i,"")}+?)`:l&1?`(${vi(s,"")}+?)`:s?`(${vi(s,"")}+?|${vi(e,"")}+?)`:"([^]+?)",key:p}),s="",l|=a=2),i="";continue}throw new TypeError(`Unknown token type: ${p.type}`)}return n}o(aj,"toRegExpSource");function vi(t,e){return e.length>t.length?vi(e,t):(t===e&&(e=""),e.length>1?`(?:(?!${wi(t)}|${wi(e)})[^])`:t.length>1?`(?:(?!${wi(t)})[^${wi(e)}])`:`[^${wi(t+e)}]`)}o(vi,"negate");function rC(t,e){let r="";for(;e<t.length;){let n=t[e++];if(n.type==="text"){r+=nj(n.value);continue}if(n.type==="group"){r+="{"+rC(n.tokens,0)+"}";continue}if(n.type==="param"){r+=":"+nC(n.name,t[e]);continue}if(n.type==="wildcard"){r+="*"+nC(n.name,t[e]);continue}throw new TypeError(`Unknown token type: ${n.type}`)}return r}o(rC,"stringifyTokens");function lj(t){return rC(t.tokens,0)}o(lj,"stringify");function nC(t,e){return!tj.test(t)||e?.type==="text"&&XD.test(e.value[0])?JSON.stringify(t):t}o(nC,"stringifyName")});var hC=or((fb,pb)=>{(function(t,e){typeof fb=="object"&&typeof pb<"u"?pb.exports=e():typeof define=="function"&&define.amd?define(e):(t=t||self,t.SweetScroll=e())})(fb,function(){"use strict";var t=o(function(){return t=Object.assign||o(function(v){for(var M,I=1,B=arguments.length;I<B;I++){M=arguments[I];for(var re in M)Object.prototype.hasOwnProperty.call(M,re)&&(v[re]=M[re])}return v},"__assign"),t.apply(this,arguments)},"__assign"),e=!!(typeof window<"u"&&window.document&&window.document.createElement),r=e?window.history&&"pushState"in window.history&&window.location.protocol!=="file:":!1,n=(function(){var O=!1;if(!e)return O;try{var v=window,M=Object.defineProperty({},"passive",{get:o(function(){O=!0},"get")});v.addEventListener("test",null,M),v.removeEventListener("test",null,M)}catch{}return O})(),i=o(function(O){return typeof O=="string"},"isString"),s=o(function(O){return typeof O=="function"},"isFunction"),a=o(function(O){return Array.isArray(O)},"isArray"),l=o(function(O){return!a(O)&&O-parseFloat(O)+1>=0},"isNumeric"),c=o(function(O,v){return O&&O.hasOwnProperty(v)},"hasProp"),u=e?window.requestAnimationFrame.bind(window):null,f=e?window.cancelAnimationFrame.bind(window):null,p=Math.cos,h=Math.sin,m=Math.pow,d=Math.sqrt,g=Math.PI,y={linear:o(function(O){return O},"linear"),easeInQuad:o(function(O,v,M,I,B){return I*(v/=B)*v+M},"easeInQuad"),easeOutQuad:o(function(O,v,M,I,B){return-I*(v/=B)*(v-2)+M},"easeOutQuad"),easeInOutQuad:o(function(O,v,M,I,B){return(v/=B/2)<1?I/2*v*v+M:-I/2*(--v*(v-2)-1)+M},"easeInOutQuad"),easeInCubic:o(function(O,v,M,I,B){return I*(v/=B)*v*v+M},"easeInCubic"),easeOutCubic:o(function(O,v,M,I,B){return I*((v=v/B-1)*v*v+1)+M},"easeOutCubic"),easeInOutCubic:o(function(O,v,M,I,B){return(v/=B/2)<1?I/2*v*v*v+M:I/2*((v-=2)*v*v+2)+M},"easeInOutCubic"),easeInQuart:o(function(O,v,M,I,B){return I*(v/=B)*v*v*v+M},"easeInQuart"),easeOutQuart:o(function(O,v,M,I,B){return-I*((v=v/B-1)*v*v*v-1)+M},"easeOutQuart"),easeInOutQuart:o(function(O,v,M,I,B){return(v/=B/2)<1?I/2*v*v*v*v+M:-I/2*((v-=2)*v*v*v-2)+M},"easeInOutQuart"),easeInQuint:o(function(O,v,M,I,B){return I*(v/=B)*v*v*v*v+M},"easeInQuint"),easeOutQuint:o(function(O,v,M,I,B){return I*((v=v/B-1)*v*v*v*v+1)+M},"easeOutQuint"),easeInOutQuint:o(function(O,v,M,I,B){return(v/=B/2)<1?I/2*v*v*v*v*v+M:I/2*((v-=2)*v*v*v*v+2)+M},"easeInOutQuint"),easeInSine:o(function(O,v,M,I,B){return-I*p(v/B*(g/2))+I+M},"easeInSine"),easeOutSine:o(function(O,v,M,I,B){return I*h(v/B*(g/2))+M},"easeOutSine"),easeInOutSine:o(function(O,v,M,I,B){return-I/2*(p(g*v/B)-1)+M},"easeInOutSine"),easeInExpo:o(function(O,v,M,I,B){return v===0?M:I*m(2,10*(v/B-1))+M},"easeInExpo"),easeOutExpo:o(function(O,v,M,I,B){return v===B?M+I:I*(-m(2,-10*v/B)+1)+M},"easeOutExpo"),easeInOutExpo:o(function(O,v,M,I,B){return v===0?M:v===B?M+I:(v/=B/2)<1?I/2*m(2,10*(v-1))+M:I/2*(-m(2,-10*--v)+2)+M},"easeInOutExpo"),easeInCirc:o(function(O,v,M,I,B){return-I*(d(1-(v/=B)*v)-1)+M},"easeInCirc"),easeOutCirc:o(function(O,v,M,I,B){return I*d(1-(v=v/B-1)*v)+M},"easeOutCirc"),easeInOutCirc:o(function(O,v,M,I,B){return(v/=B/2)<1?-I/2*(d(1-v*v)-1)+M:I/2*(d(1-(v-=2)*v)+1)+M},"easeInOutCirc")},x=o(function(O){return Array.prototype.slice.call(O?document.querySelectorAll(O):[])},"$$"),T=o(function(O){return x(O).shift()||null},"$"),E=o(function(O){return O instanceof Element},"isElement"),_=o(function(O){return O===window},"isWindow"),P=o(function(O){return O===document.documentElement||O===document.body},"isRootContainer"),D=o(function(O,v){if(E(v))return O===v;for(var M=x(v),I=M.length;--I>=0&&M[I]!==O;);return I>-1},"matches"),F=o(function(O){return Math.max(O.scrollHeight,O.clientHeight,O.offsetHeight)},"getHeight"),A=o(function(O){return Math.max(O.scrollWidth,O.clientWidth,O.offsetWidth)},"getWidth"),W=o(function(O){return{width:A(O),height:F(O)}},"getSize"),C=o(function(O){var v=_(O)||P(O);return{viewport:{width:v?Math.min(window.innerWidth,document.documentElement.clientWidth):O.clientWidth,height:v?window.innerHeight:O.clientHeight},size:v?{width:Math.max(A(document.body),A(document.documentElement)),height:Math.max(F(document.body),F(document.documentElement))}:W(O)}},"getViewportAndElementSizes"),le={y:"scrollTop",x:"scrollLeft"},j={y:"pageYOffset",x:"pageXOffset"},N=o(function(O,v){return _(O)?O[j[v]]:O[le[v]]},"getScroll"),R=o(function(O,v,M){if(_(O)){var I=M==="y";O.scrollTo(I?O.pageXOffset:v,I?v:O.pageYOffset)}else O[le[M]]=v},"setScroll"),z=o(function(O,v){var M=O.getBoundingClientRect();if(M.width||M.height){var I={top:0,left:0},B=void 0;if(_(v)||P(v))B=document.documentElement,I.top=window[j.y],I.left=window[j.x];else{B=v;var re=B.getBoundingClientRect();I.top=re.top*-1+B[le.y],I.left=re.left*-1+B[le.x]}return{top:M.top+I.top-B.clientTop,left:M.left+I.left-B.clientLeft}}return M},"getOffset"),U=(function(){return e?"onwheel"in document?"wheel":"mousewheel":"wheel"})(),K=o(function(O){return O==="wheel"?U:O},"eventName"),X=o(function(O,v,M,I,B){M.split(" ").forEach(function(re){O[v](K(re),I,n?{passive:B}:!1)})},"apply"),ue=o(function(O,v,M,I){return X(O,"addEventListener",v,M,I)},"addEvent"),w=o(function(O,v,M,I){return X(O,"removeEventListener",v,M,I)},"removeEvent"),xe=/^(\+|-)=(\d+(?:\.\d+)?)$/,Te=o(function(O,v){var M={top:0,left:0,relative:!1};if(c(O,"top")||c(O,"left"))M=t({},M,O);else if(a(O))if(O.length>1)M.top=O[0],M.left=O[1];else if(O.length===1)M.top=v?O[0]:0,M.left=v?0:O[0];else return null;else if(l(O))v?M.top=O:M.left=O;else if(i(O)){var I=O.trim().match(xe);if(!I)return null;var B=I[1],re=parseInt(I[2],10);B==="+"?(M.top=v?re:0,M.left=v?0:re):(M.top=v?-re:0,M.left=v?0:-re),M.relative=!0}else return null;return M},"parseCoordinate"),k={trigger:"[data-scroll]",header:"[data-scroll-header]",duration:1e3,easing:"easeOutQuint",offset:0,vertical:!0,horizontal:!1,cancellable:!0,updateURL:!1,preventDefault:!0,stopPropagation:!0,before:null,after:null,cancel:null,complete:null,step:null},Ae="click",Ye="wheel touchstart touchmove",Yt=(function(){function O(v,M){var I=this;this.$el=null,this.ctx={$trigger:null,opts:null,progress:!1,pos:null,startPos:null,easing:null,start:0,id:0,cancel:!1,hash:null},this.loop=function(re){var Re=I,_e=Re.$el,Ee=Re.ctx;if(Ee.start||(Ee.start=re),!Ee.progress||!_e){I.stop();return}var Pt=Ee.opts,ot=Ee.pos,Ct=Ee.start,br=Ee.startPos,Ar=Ee.easing,Vt=Pt.duration,nr={top:"y",left:"x"},_t=re-Ct,ze=Math.min(1,Math.max(_t/Vt,0));Object.keys(ot).forEach(function(Fr){var L=ot[Fr],q=br[Fr],oe=L-q;if(oe!==0){var fe=Ar(ze,Vt*ze,0,1,Vt);R(_e,Math.round(q+oe*fe),nr[Fr])}}),_t<=Vt?(I.hook(Pt,"step",ze),Ee.id=O.raf(I.loop)):I.stop(!0)},this.handleClick=function(re){for(var Re=I.opts,_e=re.target;_e&&_e!==document;_e=_e.parentNode)if(D(_e,Re.trigger)){var Ee=JSON.parse(_e.getAttribute("data-scroll-options")||"{}"),Pt=_e.getAttribute("data-scroll"),ot=Pt||_e.getAttribute("href"),Ct=t({},Re,Ee),br=Ct.preventDefault,Ar=Ct.stopPropagation,Vt=Ct.vertical,nr=Ct.horizontal;br&&re.preventDefault(),Ar&&re.stopPropagation(),I.ctx.$trigger=_e,nr&&Vt?I.to(ot,Ct):Vt?I.toTop(ot,Ct):nr&&I.toLeft(ot,Ct);break}},this.handleStop=function(re){var Re=I.ctx,_e=Re.opts;_e&&_e.cancellable?(Re.cancel=!0,I.stop()):re.preventDefault()},this.opts=t({},k,v||{});var B=null;e&&(typeof M=="string"?B=T(M):M!=null?B=M:B=window),this.$el=B,B&&this.bind(!0,!1)}return o(O,"SweetScroll"),O.create=function(v,M){return new O(v,M)},O.prototype.to=function(v,M){if(e){var I=this,B=I.$el,re=I.ctx,Re=I.opts,_e=re.$trigger,Ee=t({},Re,M||{}),Pt=Ee.offset,ot=Ee.vertical,Ct=Ee.horizontal,br=E(Ee.header)?Ee.header:T(Ee.header),Ar=/^#/,Vt=i(v)&&Ar.test(v)?v:null;if(re.opts=Ee,re.cancel=!1,re.hash=Vt,this.stop(),!!B){var nr=Te(Pt,ot),_t=Te(v,ot),ze={top:0,left:0};if(_t)if(_t.relative){var Fr=N(B,ot?"y":"x");ze.top=ot?Fr+_t.top:_t.top,ze.left=ot?_t.left:Fr+_t.left}else ze=_t;else if(i(v)&&v!=="#"){var L=T(v);if(!L)return;ze=z(L,B)}nr&&(ze.top+=nr.top,ze.left+=nr.left),br&&(ze.top=Math.max(0,ze.top-W(br).height));var q=C(B),oe=q.viewport,fe=q.size;if(ze.top=ot?Math.max(0,Math.min(fe.height-oe.height,ze.top)):N(B,"y"),ze.left=Ct?Math.max(0,Math.min(fe.width-oe.width,ze.left)):N(B,"x"),this.hook(Ee,"before",ze,_e)===!1){re.opts=null;return}re.pos=ze,this.start(Ee),this.bind(!1,!0)}}},O.prototype.toTop=function(v,M){this.to(v,t({},M||{},{vertical:!0,horizontal:!1}))},O.prototype.toLeft=function(v,M){this.to(v,t({},M||{},{vertical:!1,horizontal:!0}))},O.prototype.toElement=function(v,M){var I=this.$el;!e||!I||this.to(z(v,I),M||{})},O.prototype.stop=function(v){v===void 0&&(v=!1);var M=this,I=M.$el,B=M.ctx,re=B.pos;!I||!B.progress||(O.caf(B.id),B.progress=!1,B.start=0,B.id=0,v&&re&&(R(I,re.left,"x"),R(I,re.top,"y")),this.complete())},O.prototype.update=function(v){if(this.$el){var M=t({},this.opts,v);this.stop(),this.unbind(!0,!0),this.opts=M,this.bind(!0,!1)}},O.prototype.destroy=function(){this.$el&&(this.stop(),this.unbind(!0,!0),this.$el=null)},O.prototype.onBefore=function(v,M){return!0},O.prototype.onStep=function(v){},O.prototype.onAfter=function(v,M){},O.prototype.onCancel=function(){},O.prototype.onComplete=function(v){},O.prototype.start=function(v){var M=this.ctx;M.opts=v,M.progress=!0,M.easing=s(v.easing)?v.easing:y[v.easing];var I=this.$el,B={top:N(I,"y"),left:N(I,"x")};M.startPos=B,M.id=O.raf(this.loop)},O.prototype.complete=function(){var v=this,M=v.$el,I=v.ctx,B=I.hash,re=I.cancel,Re=I.opts,_e=I.pos,Ee=I.$trigger;if(!(!M||!Re)){if(B!=null&&B!==window.location.hash){var Pt=Re.updateURL;e&&r&&Pt!==!1&&window.history[Pt==="replace"?"replaceState":"pushState"](null,"",B)}this.unbind(!1,!0),I.opts=null,I.$trigger=null,re?this.hook(Re,"cancel"):this.hook(Re,"after",_e,Ee),this.hook(Re,"complete",re)}},O.prototype.hook=function(v,M){for(var I=[],B=2;B<arguments.length;B++)I[B-2]=arguments[B];var re,Re=v[M],_e,Ee;return s(Re)&&(_e=Re.apply(this,I.concat([this]))),Ee=(re=this)["on"+(M[0].toUpperCase()+M.slice(1))].apply(re,I),_e!==void 0?_e:Ee},O.prototype.bind=function(v,M){var I=this,B=I.$el,re=I.ctx.opts;B&&(v&&ue(B,Ae,this.handleClick,!1),M&&ue(B,Ye,this.handleStop,re?re.cancellable:!0))},O.prototype.unbind=function(v,M){var I=this,B=I.$el,re=I.ctx.opts;B&&(v&&w(B,Ae,this.handleClick,!1),M&&w(B,Ye,this.handleStop,re?re.cancellable:!0))},O.raf=u,O.caf=f,O})();return Yt})});var Eb={};se(Eb,{setup:()=>lz,staticStyles:()=>sz,styles:()=>az});var sl={};se(sl,{DeesComms:()=>Kd});var be={};se(be,{Timeout:()=>kc,delayFor:()=>_b,delayForRandom:()=>tO});var te={};se(te,{CumulativeDeferred:()=>vc,Deferred:()=>Sc,cumulativeDefer:()=>KC,defer:()=>An,fromCallback:()=>eO,getFirstTrueOrFalse:()=>ZC,map:()=>QC,rejectedPromise:()=>JC,resolvedPromise:()=>GC,timeoutAndContinue:()=>XC,timeoutWrap:()=>Pb});var Sc=class{static{o(this,"Deferred")}claim(){if(this.claimed)throw new Error("Deferred already claimed");this.claimed=!0}get duration(){return this.stoppedAt?this.stoppedAt-this.startedAt:Date.now()-this.startedAt}constructor(){this.claimed=!1,this.promise=new Promise((e,r)=>{this.resolve=n=>{this.status="fulfilled",this.stoppedAt=Date.now(),e(n)},this.reject=n=>{this.status="rejected",this.stoppedAt=Date.now(),r(n)},this.startedAt=Date.now(),this.status="pending"})}},An=o(()=>new Sc,"defer");var vc=class{static{o(this,"CumulativeDeferred")}constructor(){this.accumulatedPromises=[],this.deferred=An(),this.promise=this.deferred.promise,setTimeout(async()=>{for(;this.accumulatedPromises.length>0;)await this.accumulatedPromises.shift();this.deferred.resolve()},0)}subDefer(){let e=An();return this.addPromise(e.promise),e}addPromise(e){this.accumulatedPromises.push(e)}},KC=o(()=>new vc,"cumulativeDefer");function GC(t){return Promise.resolve(t)}o(GC,"resolvedPromise");var JC=o(t=>Promise.reject(t),"rejectedPromise"),QC=o(async(t,e)=>Promise.all(t.map(e)),"map"),Pb=o(async(t,e,r=!0)=>new Promise((n,i)=>{let s,a=o(()=>{s!==void 0&&(clearTimeout(s),s=void 0)},"releaseTimeout");s=setTimeout(()=>{s=void 0,r?i(new Error("timeout")):n(null)},e),t.then(l=>{a(),n(l)},l=>{a(),i(l)})}),"timeoutWrap"),XC=o(async(t,e=6e4)=>Pb(t,e,!1),"timeoutAndContinue"),ZC=o(async t=>{let e=An();for(let r of t)r.then(n=>{n===!0&&e.resolve(!0)});return Promise.all(t).then(()=>{e.resolve(!1)}),e.promise},"getFirstTrueOrFalse"),eO=o(t=>new Promise((e,r)=>{t((n,i)=>{n?r(n):e(i)})}),"fromCallback");var _b=o(async(t,e,r=!1)=>(await new kc(t,null,r).promise,e),"delayFor"),tO=o(async(t,e,r,n=!1)=>(await _b(Math.random()*(e-t)+t,null,n),r),"delayForRandom"),rO=2147483647,kc=class t{static{o(this,"Timeout")}constructor(e,r,n=!1){this._cancelled=!1,this._unrefed=!1,this.timeoutInMillis=e,this._passOn=r,this._deferred=An(),this.promise=this._deferred.promise,this._timeout=this.startChunk(e),this.started=Date.now(),n&&this.makeUnrefed()}startChunk(e){let r=Math.min(e,rO),n=setTimeout(()=>{if(this._cancelled)return;let i=e-r;i>0?this._timeout=this.startChunk(i):this._deferred.resolve(this._passOn)},r);return this._unrefed&&t.unrefTimer(n),n}static unrefTimer(e){e.unref?.()}makeUnrefed(){this._unrefed=!0,t.unrefTimer(this._timeout)}cancel(){this._cancelled=!0,clearTimeout(this._timeout)}getTimeLeft(){let e=this.started+this.timeoutInMillis-Date.now();return e>0?e:0}};var Tc={};var $t={};se($t,{TYPED_REQUEST_REDACTED_PAYLOAD:()=>Ts,TypedHandler:()=>Bd,TypedRequest:()=>bp,TypedRequestRetryLimitError:()=>xp,TypedRequestTimeoutError:()=>yp,TypedResponseError:()=>ur,TypedRouter:()=>jd,TypedTarget:()=>zd,VirtualStream:()=>Dr,VirtualStreamActivationScope:()=>bn,VirtualStreamClosedError:()=>Vi,VirtualStreamLifecycleContractError:()=>lp,VirtualStreamOpenTimeoutError:()=>Ki,getTypedRequestResponseInterestKey:()=>mp});var vt={};se(vt,{AsyncExecutionStack:()=>ld,BackpressuredArray:()=>cd,FastMap:()=>Hi,Interest:()=>Ua,InterestMap:()=>ud,LimitedArray:()=>fd,LoopTracker:()=>pd,ObjectMap:()=>xn,Stringmap:()=>qa,TimedAggregator:()=>Ya,TimedAggregtor:()=>Ya,Tree:()=>hd,uni:()=>Ov});var wa={};se(wa,{SmartMatch:()=>gm});var ba={};se(ba,{isMatch:()=>sO,matcher:()=>oO});function Oi(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}o(Oi,"escapeStringRegexp");var dm=new Map,Lb=o((t,e)=>{if(!Array.isArray(t))switch(typeof t){case"string":t=[t];break;case"undefined":t=[];break;default:throw new TypeError(`Expected '${e}' to be a string or an array, but got a type of '${typeof t}'`)}return t.filter(r=>{if(typeof r!="string"){if(typeof r>"u")return!1;throw new TypeError(`Expected '${e}' to be an array of strings, but found a type of '${typeof r}' in the array`)}return!0})},"sanitizeArray"),iO=o((t,e)=>{e={caseSensitive:!1,...e};let r=t+JSON.stringify(e);if(dm.has(r))return dm.get(r);let n=t[0]==="!";n&&(t=t.slice(1)),t=Oi(t).replace(/\\\*/g,"[\\s\\S]*");let i=new RegExp(`^${t}$`,e.caseSensitive?"":"i");return i.negated=n,dm.set(r,i),i},"makeRegexp"),Rb=o((t,e,r,n)=>{if(t=Lb(t,"inputs"),e=Lb(e,"patterns"),e.length===0)return[];e=e.map(a=>iO(a,r));let{allPatterns:i}=r||{},s=[];for(let a of t){let l,c=[...e].fill(!1);for(let[u,f]of e.entries())if(f.test(a)&&(c[u]=!0,l=!f.negated,!l))break;if(!(l===!1||l===void 0&&e.some(u=>!u.negated)||i&&c.some((u,f)=>!u&&!e[f].negated))&&(s.push(a),n))break}return s},"baseMatcher");function oO(t,e,r){return Rb(t,e,r,!1)}o(oO,"matcher");function sO(t,e,r){return Rb(t,e,r,!0).length>0}o(sO,"isMatch");var gm=class{static{o(this,"SmartMatch")}constructor(e){this.wildcard=e}match(e){return ba.isMatch(e,this.wildcard)}};var Pe={};se(Pe,{ObservableIntake:()=>zm,Observablemap:()=>jm,fromStreamWithBackpressure:()=>WI,rxjs:()=>Ho});var Ho={};se(Ho,{Observable:()=>Se,ReplaySubject:()=>Fo,Subject:()=>At,Subscription:()=>Rt,from:()=>Yr,fromEvent:()=>_i,of:()=>Da,ops:()=>zI});var ym=o(function(t,e){return ym=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},ym(t,e)},"extendStatics");function Xe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");ym(t,e);function r(){this.constructor=t}o(r,"__"),t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}o(Xe,"__extends");var xm=o(function(){return xm=Object.assign||o(function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},"__assign"),xm.apply(this,arguments)},"__assign");function cO(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}o(cO,"__rest");function uO(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(a=t[l])&&(s=(i<3?a(s):i>3?a(e,r,s):a(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s}o(uO,"__decorate");function fO(t,e){return function(r,n){e(r,n,t)}}o(fO,"__param");function pO(t,e,r,n,i,s){function a(x){if(x!==void 0&&typeof x!="function")throw new TypeError("Function expected");return x}o(a,"accept");for(var l=n.kind,c=l==="getter"?"get":l==="setter"?"set":"value",u=!e&&t?n.static?t:t.prototype:null,f=e||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),p,h=!1,m=r.length-1;m>=0;m--){var d={};for(var g in n)d[g]=g==="access"?{}:n[g];for(var g in n.access)d.access[g]=n.access[g];d.addInitializer=function(x){if(h)throw new TypeError("Cannot add initializers after decoration has completed");s.push(a(x||null))};var y=(0,r[m])(l==="accessor"?{get:f.get,set:f.set}:f[c],d);if(l==="accessor"){if(y===void 0)continue;if(y===null||typeof y!="object")throw new TypeError("Object expected");(p=a(y.get))&&(f.get=p),(p=a(y.set))&&(f.set=p),(p=a(y.init))&&i.unshift(p)}else(p=a(y))&&(l==="field"?i.unshift(p):f[c]=p)}u&&Object.defineProperty(u,n.name,f),h=!0}o(pO,"__esDecorate");function hO(t,e,r){for(var n=arguments.length>2,i=0;i<e.length;i++)r=n?e[i].call(t,r):e[i].call(t);return n?r:void 0}o(hO,"__runInitializers");function mO(t){return typeof t=="symbol"?t:"".concat(t)}o(mO,"__propKey");function dO(t,e,r){return typeof e=="symbol"&&(e=e.description?"[".concat(e.description,"]"):""),Object.defineProperty(t,"name",{configurable:!0,value:r?"".concat(r," ",e):e})}o(dO,"__setFunctionName");function gO(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}o(gO,"__metadata");function Sm(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return o(i,"adopt"),new(r||(r=Promise))(function(s,a){function l(f){try{u(n.next(f))}catch(p){a(p)}}o(l,"fulfilled");function c(f){try{u(n.throw(f))}catch(p){a(p)}}o(c,"rejected");function u(f){f.done?s(f.value):i(f.value).then(l,c)}o(u,"step"),u((n=n.apply(t,e||[])).next())})}o(Sm,"__awaiter");function Sa(t,e){var r={label:0,sent:o(function(){if(s[0]&1)throw s[1];return s[1]},"sent"),trys:[],ops:[]},n,i,s,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=l(0),a.throw=l(1),a.return=l(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(u){return function(f){return c([u,f])}}function c(u){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(r=0)),r;)try{if(n=1,i&&(s=u[0]&2?i.return:u[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,u[1])).done)return s;switch(i=0,s&&(u=[u[0]&2,s.value]),u[0]){case 0:case 1:s=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){r.label=u[1];break}if(u[0]===6&&r.label<s[1]){r.label=s[1],s=u;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(u);break}s[2]&&r.ops.pop(),r.trys.pop();continue}u=e.call(t,r)}catch(f){u=[6,f],i=0}finally{n=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}o(Sa,"__generator");var bm=Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]});function yO(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&bm(e,t,r)}o(yO,"__exportStar");function gt(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:o(function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}},"next")};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}o(gt,"__values");function ft(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){a={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return s}o(ft,"__read");function xO(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(ft(arguments[e]));return t}o(xO,"__spread");function bO(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;for(var n=Array(t),i=0,e=0;e<r;e++)for(var s=arguments[e],a=0,l=s.length;a<l;a++,i++)n[i]=s[a];return n}o(bO,"__spreadArrays");function Lt(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,s;n<i;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return t.concat(s||Array.prototype.slice.call(e))}o(Lt,"__spreadArray");function yn(t){return this instanceof yn?(this.v=t,this):new yn(t)}o(yn,"__await");function vm(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),i,s=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),l("next"),l("throw"),l("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(m){return function(d){return Promise.resolve(d).then(m,p)}}function l(m,d){n[m]&&(i[m]=function(g){return new Promise(function(y,x){s.push([m,g,y,x])>1||c(m,g)})},d&&(i[m]=d(i[m])))}function c(m,d){try{u(n[m](d))}catch(g){h(s[0][3],g)}}function u(m){m.value instanceof yn?Promise.resolve(m.value.v).then(f,p):h(s[0][2],m)}function f(m){c("next",m)}function p(m){c("throw",m)}function h(m,d){m(d),s.shift(),s.length&&c(s[0][0],s[0][1])}}o(vm,"__asyncGenerator");function wO(t){var e,r;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,s){e[i]=t[i]?function(a){return(r=!r)?{value:yn(t[i](a)),done:!1}:s?s(a):a}:s}}o(wO,"__asyncDelegator");function km(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof gt=="function"?gt(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=t[s]&&function(a){return new Promise(function(l,c){a=t[s](a),i(l,c,a.done,a.value)})}}function i(s,a,l,c){Promise.resolve(c).then(function(u){s({value:u,done:l})},a)}}o(km,"__asyncValues");function SO(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}o(SO,"__makeTemplateObject");var vO=Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e},wm=o(function(t){return wm=Object.getOwnPropertyNames||function(e){var r=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[r.length]=n);return r},wm(t)},"ownKeys");function kO(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r=wm(t),n=0;n<r.length;n++)r[n]!=="default"&&bm(e,t,r[n]);return vO(e,t),e}o(kO,"__importStar");function TO(t){return t&&t.__esModule?t:{default:t}}o(TO,"__importDefault");function EO(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)}o(EO,"__classPrivateFieldGet");function DO(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r}o(DO,"__classPrivateFieldSet");function CO(t,e){if(e===null||typeof e!="object"&&typeof e!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof t=="function"?e===t:t.has(e)}o(CO,"__classPrivateFieldIn");function OO(t,e,r){if(e!=null){if(typeof e!="object"&&typeof e!="function")throw new TypeError("Object expected.");var n,i;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=e[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=e[Symbol.dispose],r&&(i=n)}if(typeof n!="function")throw new TypeError("Object not disposable.");i&&(n=o(function(){try{i.call(this)}catch(s){return Promise.reject(s)}},"dispose")),t.stack.push({value:e,dispose:n,async:r})}else r&&t.stack.push({async:!0});return e}o(OO,"__addDisposableResource");var MO=typeof SuppressedError=="function"?SuppressedError:function(t,e,r){var n=new Error(r);return n.name="SuppressedError",n.error=t,n.suppressed=e,n};function IO(t){function e(s){t.error=t.hasError?new MO(s,t.error,"An error was suppressed during disposal."):s,t.hasError=!0}o(e,"fail");var r,n=0;function i(){for(;r=t.stack.pop();)try{if(!r.async&&n===1)return n=0,t.stack.push(r),Promise.resolve().then(i);if(r.dispose){var s=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(s).then(i,function(a){return e(a),i()})}else n|=1}catch(a){e(a)}if(n===1)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}return o(i,"next"),i()}o(IO,"__disposeResources");function NO(t,e){return typeof t=="string"&&/^\.\.?\//.test(t)?t.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(r,n,i,s,a){return n?e?".jsx":".js":i&&(!s||!a)?r:i+s+"."+a.toLowerCase()+"js"}):t}o(NO,"__rewriteRelativeImportExtension");var Nz={__extends:Xe,__assign:xm,__rest:cO,__decorate:uO,__param:fO,__esDecorate:pO,__runInitializers:hO,__propKey:mO,__setFunctionName:dO,__metadata:gO,__awaiter:Sm,__generator:Sa,__createBinding:bm,__exportStar:yO,__values:gt,__read:ft,__spread:xO,__spreadArrays:bO,__spreadArray:Lt,__await:yn,__asyncGenerator:vm,__asyncDelegator:wO,__asyncValues:km,__makeTemplateObject:SO,__importStar:kO,__importDefault:TO,__classPrivateFieldGet:EO,__classPrivateFieldSet:DO,__classPrivateFieldIn:CO,__addDisposableResource:OO,__disposeResources:IO,__rewriteRelativeImportExtension:NO};function pe(t){return typeof t=="function"}o(pe,"isFunction");function Dc(t){var e=o(function(n){Error.call(n),n.stack=new Error().stack},"_super"),r=t(e);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}o(Dc,"createErrorClass");var va=Dc(function(t){return o(function(r){t(this),this.message=r?r.length+` errors occurred during unsubscription:
1
+ var JC=Object.create;var kc=Object.defineProperty;var QC=Object.getOwnPropertyDescriptor;var XC=Object.getOwnPropertyNames;var ZC=Object.getPrototypeOf,eO=Object.prototype.hasOwnProperty;var o=(t,e)=>kc(t,"name",{value:e,configurable:!0});var or=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}},se=(t,e)=>{for(var r in e)kc(t,r,{get:e[r],enumerable:!0})},tO=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of XC(e))!eO.call(t,i)&&i!==r&&kc(t,i,{get:()=>e[i],enumerable:!(n=QC(e,i))||n.enumerable});return t};var zr=(t,e,r)=>(r=t!=null?JC(ZC(t)):{},tO(e||!t||!t.__esModule?kc(r,"default",{value:t,enumerable:!0}):r,t));var bm=or(Oc=>{"use strict";Object.defineProperty(Oc,"__esModule",{value:!0}),Oc.uni=void 0;var hO=o((t="uni")=>`${t}_${"xxxxxxxxxxxxxxxxxxxxxxxx".replace(/[xy]/g,e=>{let r=Math.random()*16|0;return(e==="x"?r:r&3|8).toString(16)})}`,"uni");Oc.uni=hO});var wS=or((td,rd)=>{(function(t,e){typeof td=="object"&&typeof rd<"u"?rd.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e()})(td,(function(){"use strict";var t=1e3,e=6e4,r=36e5,n="millisecond",i="second",s="minute",a="hour",l="day",c="week",u="month",f="quarter",p="year",h="date",m="Invalid Date",d=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|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,y={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:o(function(j){var N=["th","st","nd","rd"],R=j%100;return"["+j+(N[(R-20)%10]||N[R]||N[0])+"]"},"ordinal")},x=o(function(j,N,R){var z=String(j);return!z||z.length>=N?j:""+Array(N+1-z.length).join(R)+j},"m"),T={s:x,z:o(function(j){var N=-j.utcOffset(),R=Math.abs(N),z=Math.floor(R/60),U=R%60;return(N<=0?"+":"-")+x(z,2,"0")+":"+x(U,2,"0")},"z"),m:o(function j(N,R){if(N.date()<R.date())return-j(R,N);var z=12*(R.year()-N.year())+(R.month()-N.month()),U=N.clone().add(z,u),K=R-U<0,X=N.clone().add(z+(K?-1:1),u);return+(-(z+(R-U)/(K?U-X:X-U))||0)},"t"),a:o(function(j){return j<0?Math.ceil(j)||0:Math.floor(j)},"a"),p:o(function(j){return{M:u,y:p,w:c,d:l,D:h,h:a,m:s,s:i,ms:n,Q:f}[j]||String(j||"").toLowerCase().replace(/s$/,"")},"p"),u:o(function(j){return j===void 0},"u")},E="en",L={};L[E]=y;var P="$isDayjsObject",D=o(function(j){return j instanceof C||!(!j||!j[P])},"S"),F=o(function j(N,R,z){var U;if(!N)return E;if(typeof N=="string"){var K=N.toLowerCase();L[K]&&(U=K),R&&(L[K]=R,U=K);var X=N.split("-");if(!U&&X.length>1)return j(X[0])}else{var ue=N.name;L[ue]=N,U=ue}return!z&&U&&(E=U),U||!z&&E},"t"),A=o(function(j,N){if(D(j))return j.clone();var R=typeof N=="object"?N:{};return R.date=j,R.args=arguments,new C(R)},"O"),W=T;W.l=F,W.i=D,W.w=function(j,N){return A(j,{locale:N.$L,utc:N.$u,x:N.$x,$offset:N.$offset})};var C=(function(){function j(R){this.$L=F(R.locale,null,!0),this.parse(R),this.$x=this.$x||R.x||{},this[P]=!0}o(j,"M");var N=j.prototype;return N.parse=function(R){this.$d=(function(z){var U=z.date,K=z.utc;if(U===null)return new Date(NaN);if(W.u(U))return new Date;if(U instanceof Date)return new Date(U);if(typeof U=="string"&&!/Z$/i.test(U)){var X=U.match(d);if(X){var ue=X[2]-1||0,w=(X[7]||"0").substring(0,3);return K?new Date(Date.UTC(X[1],ue,X[3]||1,X[4]||0,X[5]||0,X[6]||0,w)):new Date(X[1],ue,X[3]||1,X[4]||0,X[5]||0,X[6]||0,w)}}return new Date(U)})(R),this.init()},N.init=function(){var R=this.$d;this.$y=R.getFullYear(),this.$M=R.getMonth(),this.$D=R.getDate(),this.$W=R.getDay(),this.$H=R.getHours(),this.$m=R.getMinutes(),this.$s=R.getSeconds(),this.$ms=R.getMilliseconds()},N.$utils=function(){return W},N.isValid=function(){return this.$d.toString()!==m},N.isSame=function(R,z){var U=A(R);return this.startOf(z)<=U&&U<=this.endOf(z)},N.isAfter=function(R,z){return A(R)<this.startOf(z)},N.isBefore=function(R,z){return this.endOf(z)<A(R)},N.$g=function(R,z,U){return W.u(R)?this[z]:this.set(U,R)},N.unix=function(){return Math.floor(this.valueOf()/1e3)},N.valueOf=function(){return this.$d.getTime()},N.startOf=function(R,z){var U=this,K=!!W.u(z)||z,X=W.p(R),ue=o(function(O,S){var M=W.w(U.$u?Date.UTC(U.$y,S,O):new Date(U.$y,S,O),U);return K?M:M.endOf(l)},"l"),w=o(function(O,S){return W.w(U.toDate()[O].apply(U.toDate("s"),(K?[0,0,0,0]:[23,59,59,999]).slice(S)),U)},"$"),xe=this.$W,ke=this.$M,k=this.$D,Ae="set"+(this.$u?"UTC":"");switch(X){case p:return K?ue(1,0):ue(31,11);case u:return K?ue(1,ke):ue(0,ke+1);case c:var Ye=this.$locale().weekStart||0,Yt=(xe<Ye?xe+7:xe)-Ye;return ue(K?k-Yt:k+(6-Yt),ke);case l:case h:return w(Ae+"Hours",0);case a:return w(Ae+"Minutes",1);case s:return w(Ae+"Seconds",2);case i:return w(Ae+"Milliseconds",3);default:return this.clone()}},N.endOf=function(R){return this.startOf(R,!1)},N.$set=function(R,z){var U,K=W.p(R),X="set"+(this.$u?"UTC":""),ue=(U={},U[l]=X+"Date",U[h]=X+"Date",U[u]=X+"Month",U[p]=X+"FullYear",U[a]=X+"Hours",U[s]=X+"Minutes",U[i]=X+"Seconds",U[n]=X+"Milliseconds",U)[K],w=K===l?this.$D+(z-this.$W):z;if(K===u||K===p){var xe=this.clone().set(h,1);xe.$d[ue](w),xe.init(),this.$d=xe.set(h,Math.min(this.$D,xe.daysInMonth())).$d}else ue&&this.$d[ue](w);return this.init(),this},N.set=function(R,z){return this.clone().$set(R,z)},N.get=function(R){return this[W.p(R)]()},N.add=function(R,z){var U,K=this;R=Number(R);var X=W.p(z),ue=o(function(ke){var k=A(K);return W.w(k.date(k.date()+Math.round(ke*R)),K)},"y");if(X===u)return this.set(u,this.$M+R);if(X===p)return this.set(p,this.$y+R);if(X===l)return ue(1);if(X===c)return ue(7);var w=(U={},U[s]=e,U[a]=r,U[i]=t,U)[X]||1,xe=this.$d.getTime()+R*w;return W.w(xe,this)},N.subtract=function(R,z){return this.add(-1*R,z)},N.format=function(R){var z=this,U=this.$locale();if(!this.isValid())return U.invalidDate||m;var K=R||"YYYY-MM-DDTHH:mm:ssZ",X=W.z(this),ue=this.$H,w=this.$m,xe=this.$M,ke=U.weekdays,k=U.months,Ae=U.meridiem,Ye=o(function(S,M,I,B){return S&&(S[M]||S(z,K))||I[M].slice(0,B)},"h"),Yt=o(function(S){return W.s(ue%12||12,S,"0")},"d"),O=Ae||function(S,M,I){var B=S<12?"AM":"PM";return I?B.toLowerCase():B};return K.replace(g,(function(S,M){return M||(function(I){switch(I){case"YY":return String(z.$y).slice(-2);case"YYYY":return W.s(z.$y,4,"0");case"M":return xe+1;case"MM":return W.s(xe+1,2,"0");case"MMM":return Ye(U.monthsShort,xe,k,3);case"MMMM":return Ye(k,xe);case"D":return z.$D;case"DD":return W.s(z.$D,2,"0");case"d":return String(z.$W);case"dd":return Ye(U.weekdaysMin,z.$W,ke,2);case"ddd":return Ye(U.weekdaysShort,z.$W,ke,3);case"dddd":return ke[z.$W];case"H":return String(ue);case"HH":return W.s(ue,2,"0");case"h":return Yt(1);case"hh":return Yt(2);case"a":return O(ue,w,!0);case"A":return O(ue,w,!1);case"m":return String(w);case"mm":return W.s(w,2,"0");case"s":return String(z.$s);case"ss":return W.s(z.$s,2,"0");case"SSS":return W.s(z.$ms,3,"0");case"Z":return X}return null})(S)||X.replace(":","")}))},N.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},N.diff=function(R,z,U){var K,X=this,ue=W.p(z),w=A(R),xe=(w.utcOffset()-this.utcOffset())*e,ke=this-w,k=o(function(){return W.m(X,w)},"D");switch(ue){case p:K=k()/12;break;case u:K=k();break;case f:K=k()/3;break;case c:K=(ke-xe)/6048e5;break;case l:K=(ke-xe)/864e5;break;case a:K=ke/r;break;case s:K=ke/e;break;case i:K=ke/t;break;default:K=ke}return U?K:W.a(K)},N.daysInMonth=function(){return this.endOf(u).$D},N.$locale=function(){return L[this.$L]},N.locale=function(R,z){if(!R)return this.$L;var U=this.clone(),K=F(R,z,!0);return K&&(U.$L=K),U},N.clone=function(){return W.w(this.$d,this)},N.toDate=function(){return new Date(this.valueOf())},N.toJSON=function(){return this.isValid()?this.toISOString():null},N.toISOString=function(){return this.$d.toISOString()},N.toString=function(){return this.$d.toUTCString()},j})(),le=C.prototype;return A.prototype=le,[["$ms",n],["$s",i],["$m",s],["$H",a],["$W",l],["$M",u],["$y",p],["$D",h]].forEach((function(j){le[j[1]]=function(N){return this.$g(N,j[0],j[1])}})),A.extend=function(j,N){return j.$i||(j(N,C,A),j.$i=!0),A},A.locale=F,A.isDayjs=D,A.unix=function(j){return A(1e3*j)},A.en=L[E],A.Ls=L,A.p={},A}))});var vS=or((nd,id)=>{(function(t,e){typeof nd=="object"&&typeof id<"u"?id.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_isToday=e()})(nd,(function(){"use strict";return function(t,e,r){e.prototype.isToday=function(){var n="YYYY-MM-DD",i=r();return this.format(n)===i.format(n)}}}))});var ES=or((kTe,TS)=>{"use strict";TS.exports=class{static{o(this,"SymbolTreeNode")}constructor(){this.parent=null,this.previousSibling=null,this.nextSibling=null,this.firstChild=null,this.lastChild=null,this.childrenVersion=0,this.childIndexCachedUpTo=null,this.cachedIndex=-1,this.cachedIndexVersion=NaN}get isAttached(){return!!(this.parent||this.previousSibling||this.nextSibling)}get hasChildren(){return!!this.firstChild}childrenChanged(){this.childrenVersion=this.childrenVersion+1&4294967295,this.childIndexCachedUpTo=null}getCachedIndex(e){return this.cachedIndexVersion!==e.childrenVersion?(this.cachedIndexVersion=NaN,-1):this.cachedIndex}setCachedIndex(e,r){this.cachedIndexVersion=e.childrenVersion,this.cachedIndex=r}}});var CS=or((ETe,DS)=>{"use strict";DS.exports=Object.freeze({DISCONNECTED:1,PRECEDING:2,FOLLOWING:4,CONTAINS:8,CONTAINED_BY:16})});var PS=or((DTe,NS)=>{"use strict";var OS=Symbol(),MS=Symbol(),Qn=Symbol(),IS=Symbol(),kr=class{static{o(this,"TreeIterator")}constructor(e,r,n,i){this[OS]=e,this[MS]=r,this[Qn]=n,this[IS]=i}next(){let e=this[OS],r=this[IS],n=this[MS];if(!this[Qn])return{done:!0,value:n};let i=this[Qn];return r===1?this[Qn]=e._node(i).previousSibling:r===2?this[Qn]=e._node(i).nextSibling:r===3?this[Qn]=e._node(i).parent:r===4?this[Qn]=e.preceding(i,{root:n}):this[Qn]=e.following(i,{root:n}),{done:!1,value:i}}};Object.defineProperty(kr.prototype,Symbol.iterator,{value:o(function(){return this},"value"),writable:!1}),kr.PREV=1,kr.NEXT=2,kr.PARENT=3,kr.PRECEDING=4,kr.FOLLOWING=5,Object.freeze(kr),Object.freeze(kr.prototype),NS.exports=kr});var _S=or((OTe,LS)=>{"use strict";var NP=ES(),Xn=CS(),cr=PS();function pd(){return!0}o(pd,"returnTrue");function hs(t,e){return t[t.length-1-e]}o(hs,"reverseArrayIndex");var Hf=class{static{o(this,"SymbolTree")}constructor(e){this.symbol=Symbol(e||"SymbolTree data")}initialize(e){return this._node(e),e}_node(e){if(!e)return null;let r=e[this.symbol];return r||(e[this.symbol]=new NP)}hasChildren(e){return this._node(e).hasChildren}firstChild(e){return this._node(e).firstChild}lastChild(e){return this._node(e).lastChild}previousSibling(e){return this._node(e).previousSibling}nextSibling(e){return this._node(e).nextSibling}parent(e){return this._node(e).parent}lastInclusiveDescendant(e){let r,n=e;for(;r=this._node(n).lastChild;)n=r;return n}preceding(e,r){let n=r&&r.root;if(e===n)return null;let i=this._node(e).previousSibling;return i?this.lastInclusiveDescendant(i):this._node(e).parent}following(e,r){let n=r&&r.root,s=!(r&&r.skipChildren)&&this._node(e).firstChild;if(s)return s;let a=e;do{if(a===n)return null;let l=this._node(a).nextSibling;if(l)return l;a=this._node(a).parent}while(a);return null}childrenToArray(e,r){let n=r&&r.array||[],i=r&&r.filter||pd,s=r&&r.thisArg||void 0,a=this._node(e),l=a.firstChild,c=0;for(;l;){let u=this._node(l);u.setCachedIndex(a,c),i.call(s,l)&&n.push(l),l=u.nextSibling,++c}return n}ancestorsToArray(e,r){let n=r&&r.array||[],i=r&&r.filter||pd,s=r&&r.thisArg||void 0,a=e;for(;a;)i.call(s,a)&&n.push(a),a=this._node(a).parent;return n}treeToArray(e,r){let n=r&&r.array||[],i=r&&r.filter||pd,s=r&&r.thisArg||void 0,a=e;for(;a;)i.call(s,a)&&n.push(a),a=this.following(a,{root:e});return n}childrenIterator(e,r){let n=r&&r.reverse,i=this._node(e);return new cr(this,e,n?i.lastChild:i.firstChild,n?cr.PREV:cr.NEXT)}previousSiblingsIterator(e){return new cr(this,e,this._node(e).previousSibling,cr.PREV)}nextSiblingsIterator(e){return new cr(this,e,this._node(e).nextSibling,cr.NEXT)}ancestorsIterator(e){return new cr(this,e,e,cr.PARENT)}treeIterator(e,r){let n=r&&r.reverse;return new cr(this,e,n?this.lastInclusiveDescendant(e):e,n?cr.PRECEDING:cr.FOLLOWING)}index(e){let r=this._node(e),n=this._node(r.parent);if(!n)return-1;let i=r.getCachedIndex(n);if(i>=0)return i;i=0;let s=n.firstChild;if(n.childIndexCachedUpTo){let a=this._node(n.childIndexCachedUpTo);s=a.nextSibling,i=a.getCachedIndex(n)+1}for(;s;){let a=this._node(s);if(a.setCachedIndex(n,i),s===e)break;++i,s=a.nextSibling}return n.childIndexCachedUpTo=e,i}childrenCount(e){let r=this._node(e);return r.lastChild?this.index(r.lastChild)+1:0}compareTreePosition(e,r){if(e===r)return 0;let n=[];{let f=e;for(;f;){if(f===r)return Xn.CONTAINS|Xn.PRECEDING;n.push(f),f=this.parent(f)}}let i=[];{let f=r;for(;f;){if(f===e)return Xn.CONTAINED_BY|Xn.FOLLOWING;i.push(f),f=this.parent(f)}}let s=hs(n,0);if(!s||s!==hs(i,0))return Xn.DISCONNECTED;let a=0,l=Math.min(n.length,i.length);for(let f=0;f<l;++f){let p=hs(n,f),h=hs(i,f);if(p!==h)break;a=f}let c=this.index(hs(n,a+1));return this.index(hs(i,a+1))<c?Xn.PRECEDING:Xn.FOLLOWING}remove(e){let r=this._node(e),n=this._node(r.parent),i=this._node(r.previousSibling),s=this._node(r.nextSibling);return n&&(n.firstChild===e&&(n.firstChild=r.nextSibling),n.lastChild===e&&(n.lastChild=r.previousSibling)),i&&(i.nextSibling=r.nextSibling),s&&(s.previousSibling=r.previousSibling),r.parent=null,r.previousSibling=null,r.nextSibling=null,r.cachedIndex=-1,r.cachedIndexVersion=NaN,n&&n.childrenChanged(),e}insertBefore(e,r){let n=this._node(e),i=this._node(n.previousSibling),s=this._node(r),a=this._node(n.parent);if(s.isAttached)throw Error("Given object is already present in this SymbolTree, remove it first");return s.parent=n.parent,s.previousSibling=n.previousSibling,s.nextSibling=e,n.previousSibling=r,i&&(i.nextSibling=r),a&&a.firstChild===e&&(a.firstChild=r),a&&a.childrenChanged(),r}insertAfter(e,r){let n=this._node(e),i=this._node(n.nextSibling),s=this._node(r),a=this._node(n.parent);if(s.isAttached)throw Error("Given object is already present in this SymbolTree, remove it first");return s.parent=n.parent,s.previousSibling=e,s.nextSibling=n.nextSibling,n.nextSibling=r,i&&(i.previousSibling=r),a&&a.lastChild===e&&(a.lastChild=r),a&&a.childrenChanged(),r}prependChild(e,r){let n=this._node(e),i=this._node(r);if(i.isAttached)throw Error("Given object is already present in this SymbolTree, remove it first");return n.hasChildren?this.insertBefore(n.firstChild,r):(i.parent=e,n.firstChild=r,n.lastChild=r,n.childrenChanged()),r}appendChild(e,r){let n=this._node(e),i=this._node(r);if(i.isAttached)throw Error("Given object is already present in this SymbolTree, remove it first");return n.hasChildren?this.insertAfter(n.lastChild,r):(i.parent=e,n.firstChild=r,n.lastChild=r,n.childrenChanged()),r}};LS.exports=Hf,Hf.TreePosition=Xn});var tk=or((SDe,ek)=>{"use strict";ek.exports=function(t,e){e||(e={}),typeof e=="function"&&(e={cmp:e});var r=typeof e.cycles=="boolean"?e.cycles:!1,n=e.cmp&&(function(s){return function(a){return function(l,c){var u={key:l,value:a[l]},f={key:c,value:a[c]};return s(u,f)}}})(e.cmp),i=[];return o((function s(a){if(a&&a.toJSON&&typeof a.toJSON=="function"&&(a=a.toJSON()),a!==void 0){if(typeof a=="number")return isFinite(a)?""+a:"null";if(typeof a!="object")return JSON.stringify(a);var l,c;if(Array.isArray(a)){for(c="[",l=0;l<a.length;l++)l&&(c+=","),c+=s(a[l])||"null";return c+"]"}if(a===null)return"null";if(i.indexOf(a)!==-1){if(r)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var u=i.push(a)-1,f=Object.keys(a).sort(n&&n(a));for(c="",l=0;l<f.length;l++){var p=f[l],h=s(a[p]);h&&(c&&(c+=","),c+=JSON.stringify(p)+":"+h)}return i.splice(u,1),"{"+c+"}"}}),"stringify")(t)}});var nD=or((OUe,rD)=>{"use strict";var Rh=Object.prototype.hasOwnProperty,GE=Object.prototype.toString,JE=Object.defineProperty,QE=Object.getOwnPropertyDescriptor,XE=o(function(e){return typeof Array.isArray=="function"?Array.isArray(e):GE.call(e)==="[object Array]"},"isArray"),ZE=o(function(e){if(!e||GE.call(e)!=="[object Object]")return!1;var r=Rh.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&Rh.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;var i;for(i in e);return typeof i>"u"||Rh.call(e,i)},"isPlainObject"),eD=o(function(e,r){JE&&r.name==="__proto__"?JE(e,r.name,{enumerable:!0,configurable:!0,value:r.newValue,writable:!0}):e[r.name]=r.newValue},"setProperty"),tD=o(function(e,r){if(r==="__proto__")if(Rh.call(e,r)){if(QE)return QE(e,r).value}else return;return e[r]},"getProperty");rD.exports=o(function t(){var e,r,n,i,s,a,l=arguments[0],c=1,u=arguments.length,f=!1;for(typeof l=="boolean"&&(f=l,l=arguments[1]||{},c=2),(l==null||typeof l!="object"&&typeof l!="function")&&(l={});c<u;++c)if(e=arguments[c],e!=null)for(r in e)n=tD(l,r),i=tD(e,r),l!==i&&(f&&i&&(ZE(i)||(s=XE(i)))?(s?(s=!1,a=n&&XE(n)?n:[]):a=n&&ZE(n)?n:{},eD(l,{name:r,newValue:t(f,a,i)})):typeof i<"u"&&eD(l,{name:r,newValue:i}));return l},"extend")});var eC=or((Z9e,Rx)=>{(function(){var t;typeof Rx<"u"?t=Rx.exports=n:t=(function(){return this||(0,eval)("this")})(),t.format=n,t.vsprintf=r,typeof console<"u"&&typeof console.log=="function"&&(t.printf=e);function e(){console.log(n.apply(null,arguments))}o(e,"printf");function r(i,s){return n.apply(null,[i].concat(s))}o(r,"vsprintf");function n(i){for(var s=1,a=[].slice.call(arguments),l=0,c=i.length,u="",f,p=!1,h,m,d=!1,g,y=o(function(){return a[s++]},"nextArg"),x=o(function(){for(var T="";/\d/.test(i[l]);)T+=i[l++],f=i[l];return T.length>0?parseInt(T):null},"slurpNumber");l<c;++l)if(f=i[l],p)switch(p=!1,f=="."?(d=!1,f=i[++l]):f=="0"&&i[l+1]=="."?(d=!0,l+=2,f=i[l]):d=!0,g=x(),f){case"b":u+=parseInt(y(),10).toString(2);break;case"c":h=y(),typeof h=="string"||h instanceof String?u+=h:u+=String.fromCharCode(parseInt(h,10));break;case"d":u+=parseInt(y(),10);break;case"f":m=String(parseFloat(y()).toFixed(g||6)),u+=d?m:m.replace(/^0/,"");break;case"j":u+=JSON.stringify(y());break;case"o":u+="0"+parseInt(y(),10).toString(8);break;case"s":u+=y();break;case"x":u+="0x"+parseInt(y(),10).toString(16);break;case"X":u+="0x"+parseInt(y(),10).toString(16).toUpperCase();break;default:u+=f;break}else f==="%"?p=!0:u+=f;return u}o(n,"format")})()});var pC=or(_r=>{"use strict";Object.defineProperty(_r,"__esModule",{value:!0}),_r.PathError=_r.TokenData=void 0,_r.parse=qx,_r.compile=vj,_r.match=kj,_r.pathToRegexp=lC,_r.stringify=Ej;var Hx="/",Ux=o(t=>t,"NOOP_VALUE"),yj=/^[$_\p{ID_Start}]$/u,sC=/^[$\u200c\u200d\p{ID_Continue}]$/u,xj=/^[$_\p{ID_Start}][$\u200c\u200d\p{ID_Continue}]*$/u,bj="{}()[]+?!";function wj(t){return t.replace(/[{}()\[\]+?!:*\\]/g,"\\$&")}o(wj,"escapeText");function bi(t){return t.replace(/[.+*?^${}()[\]|/\\]/g,"\\$&")}o(bi,"escape");var Zh=class{static{o(this,"TokenData")}constructor(e,r){this.tokens=e,this.originalPath=r}};_r.TokenData=Zh;var wi=class extends TypeError{static{o(this,"PathError")}constructor(e,r){let n=e;r&&(n+=`: ${r}`),n+="; visit https://git.new/pathToRegexpError for info",super(n),this.originalPath=r}};_r.PathError=wi;function qx(t,e={}){let{encodePath:r=Ux}=e,n=[...t],i=[],s=0,a=0;function l(){let u="";if(yj.test(n[s]))do u+=n[s++];while(sC.test(n[s]));else if(n[s]==='"'){let f=s;for(;s<n.length;){if(n[++s]==='"'){s++,f=0;break}n[s]==="\\"&&s++,u+=n[s]}if(f)throw new wi(`Unterminated quote at index ${f}`,t)}if(!u)throw new wi(`Missing parameter name at index ${s}`,t);return u}for(o(l,"name");s<n.length;){let u=n[s++];bj.includes(u)?i.push({type:u,index:s,value:u}):u==="\\"?i.push({type:"escape",index:s,value:n[s++]}):u===":"?i.push({type:"param",index:s,value:l()}):u==="*"?i.push({type:"wildcard",index:s,value:l()}):i.push({type:"char",index:s,value:u})}i.push({type:"end",index:s,value:""});function c(u){let f=[];for(;;){let p=i[a++];if(p.type===u)break;if(p.type==="char"||p.type==="escape"){let h=p.value,m=i[a];for(;m.type==="char"||m.type==="escape";)h+=m.value,m=i[++a];f.push({type:"text",value:r(h)});continue}if(p.type==="param"||p.type==="wildcard"){f.push({type:p.type,name:p.value});continue}if(p.type==="{"){f.push({type:"group",tokens:c("}")});continue}throw new wi(`Unexpected ${p.type} at index ${p.index}, expected ${u}`,t)}return f}return o(c,"consumeUntil"),new Zh(c("end"),t)}o(qx,"parse");function vj(t,e={}){let{encode:r=encodeURIComponent,delimiter:n=Hx}=e,i=typeof t=="object"?t:qx(t,e),s=aC(i.tokens,n,r);return o(function(l={}){let[c,...u]=s(l);if(u.length)throw new TypeError(`Missing parameters: ${u.join(", ")}`);return c},"path")}o(vj,"compile");function aC(t,e,r){let n=t.map(i=>Sj(i,e,r));return i=>{let s=[""];for(let a of n){let[l,...c]=a(i);s[0]+=l,s.push(...c)}return s}}o(aC,"tokensToFunction");function Sj(t,e,r){if(t.type==="text")return()=>[t.value];if(t.type==="group"){let i=aC(t.tokens,e,r);return s=>{let[a,...l]=i(s);return l.length?[""]:[a]}}let n=r||Ux;return t.type==="wildcard"&&r!==!1?i=>{let s=i[t.name];if(s==null)return["",t.name];if(!Array.isArray(s)||s.length===0)throw new TypeError(`Expected "${t.name}" to be a non-empty array`);return[s.map((a,l)=>{if(typeof a!="string")throw new TypeError(`Expected "${t.name}/${l}" to be a string`);return n(a)}).join(e)]}:i=>{let s=i[t.name];if(s==null)return["",t.name];if(typeof s!="string")throw new TypeError(`Expected "${t.name}" to be a string`);return[n(s)]}}o(Sj,"tokenToFunction");function kj(t,e={}){let{decode:r=decodeURIComponent,delimiter:n=Hx}=e,{regexp:i,keys:s}=lC(t,e),a=s.map(l=>r===!1?Ux:l.type==="param"?r:c=>c.split(n).map(r));return o(function(c){let u=i.exec(c);if(!u)return!1;let f=u[0],p=Object.create(null);for(let h=1;h<u.length;h++){if(u[h]===void 0)continue;let m=s[h-1],d=a[h-1];p[m.name]=d(u[h])}return{path:f,params:p}},"match")}o(kj,"match");function lC(t,e={}){let{delimiter:r=Hx,end:n=!0,sensitive:i=!1,trailing:s=!0}=e,a=new Yx("^"),l=[t],c=0;for(;l.length;){let p=l.shift();if(Array.isArray(p)){l.push(...p);continue}let h=typeof p=="object"?p:qx(p,e);Vx(h.tokens,0,[],m=>{if(c++>=256)throw new wi("Too many path combinations",h.originalPath);let d=a;for(let g of Tj(m,r,h.originalPath))d=d.add(g.source,g.key);d.add("")})}let u=[],f=cC(a,u);return s&&(f+="(?:"+bi(r)+"$)?"),f+=n?"$":"(?="+bi(r)+"|$)",{regexp:new RegExp(f,i?"":"i"),keys:u}}o(lC,"pathToRegexp");function cC(t,e){t.key&&e.push(t.key);let r=Object.keys(t.children),n=r.map(i=>cC(t.children[i],e)).join("|");return t.source+(r.length<2?n:`(?:${n})`)}o(cC,"toRegExp");var Yx=class t{static{o(this,"SourceNode")}constructor(e,r){this.source=e,this.key=r,this.children=Object.create(null)}add(e,r){var n;let i=e+":"+(r?r.name:"");return(n=this.children)[i]||(n[i]=new t(e,r))}};function Vx(t,e,r,n){for(;e<t.length;){let i=t[e++];if(i.type==="group"){Vx(i.tokens,0,r.slice(),s=>Vx(t,e,s,n));continue}r.push(i)}n(r)}o(Vx,"flatten");function Tj(t,e,r){let n=[],i="",s="",a=0,l=0,c=0;function u(p,h){for(;p<t.length;){let m=t[p++];if(m.type===h)return!0;if(m.type==="text"&&m.value.includes(e))break}return!1}o(u,"hasInSegment");function f(p){let h="";for(;p<t.length;){let m=t[p++];if(m.type!=="text")break;h+=m.value}return h}for(o(f,"peekText");c<t.length;){let p=t[c++];if(p.type==="text"){n.push({source:bi(p.value)}),i+=p.value,a===2&&(s+=p.value),p.value.includes(e)&&(l=0);continue}if(p.type==="param"||p.type==="wildcard"){if(a&&!i)throw new wi(`Missing text before "${p.name}" ${p.type}`,r);p.type==="param"?(n.push({source:l?`(${vi(e,i)}+?)`:u(c,"wildcard")?`(${vi(e,f(c))}+?)`:`(${vi(e,"")}+?)`,key:p}),l|=a=1):(n.push({source:l&2?`(${vi(i,"")}+?)`:l&1?`(${vi(s,"")}+?)`:s?`(${vi(s,"")}+?|${vi(e,"")}+?)`:"([^]+?)",key:p}),s="",l|=a=2),i="";continue}throw new TypeError(`Unknown token type: ${p.type}`)}return n}o(Tj,"toRegExpSource");function vi(t,e){return e.length>t.length?vi(e,t):(t===e&&(e=""),e.length>1?`(?:(?!${bi(t)}|${bi(e)})[^])`:t.length>1?`(?:(?!${bi(t)})[^${bi(e)}])`:`[^${bi(t+e)}]`)}o(vi,"negate");function uC(t,e){let r="";for(;e<t.length;){let n=t[e++];if(n.type==="text"){r+=wj(n.value);continue}if(n.type==="group"){r+="{"+uC(n.tokens,0)+"}";continue}if(n.type==="param"){r+=":"+fC(n.name,t[e]);continue}if(n.type==="wildcard"){r+="*"+fC(n.name,t[e]);continue}throw new TypeError(`Unknown token type: ${n.type}`)}return r}o(uC,"stringifyTokens");function Ej(t){return uC(t.tokens,0)}o(Ej,"stringify");function fC(t,e){return!xj.test(t)||e?.type==="text"&&sC.test(e.value[0])?JSON.stringify(t):t}o(fC,"stringifyName")});var vC=or((gb,yb)=>{(function(t,e){typeof gb=="object"&&typeof yb<"u"?yb.exports=e():typeof define=="function"&&define.amd?define(e):(t=t||self,t.SweetScroll=e())})(gb,function(){"use strict";var t=o(function(){return t=Object.assign||o(function(S){for(var M,I=1,B=arguments.length;I<B;I++){M=arguments[I];for(var te in M)Object.prototype.hasOwnProperty.call(M,te)&&(S[te]=M[te])}return S},"__assign"),t.apply(this,arguments)},"__assign"),e=!!(typeof window<"u"&&window.document&&window.document.createElement),r=e?window.history&&"pushState"in window.history&&window.location.protocol!=="file:":!1,n=(function(){var O=!1;if(!e)return O;try{var S=window,M=Object.defineProperty({},"passive",{get:o(function(){O=!0},"get")});S.addEventListener("test",null,M),S.removeEventListener("test",null,M)}catch{}return O})(),i=o(function(O){return typeof O=="string"},"isString"),s=o(function(O){return typeof O=="function"},"isFunction"),a=o(function(O){return Array.isArray(O)},"isArray"),l=o(function(O){return!a(O)&&O-parseFloat(O)+1>=0},"isNumeric"),c=o(function(O,S){return O&&O.hasOwnProperty(S)},"hasProp"),u=e?window.requestAnimationFrame.bind(window):null,f=e?window.cancelAnimationFrame.bind(window):null,p=Math.cos,h=Math.sin,m=Math.pow,d=Math.sqrt,g=Math.PI,y={linear:o(function(O){return O},"linear"),easeInQuad:o(function(O,S,M,I,B){return I*(S/=B)*S+M},"easeInQuad"),easeOutQuad:o(function(O,S,M,I,B){return-I*(S/=B)*(S-2)+M},"easeOutQuad"),easeInOutQuad:o(function(O,S,M,I,B){return(S/=B/2)<1?I/2*S*S+M:-I/2*(--S*(S-2)-1)+M},"easeInOutQuad"),easeInCubic:o(function(O,S,M,I,B){return I*(S/=B)*S*S+M},"easeInCubic"),easeOutCubic:o(function(O,S,M,I,B){return I*((S=S/B-1)*S*S+1)+M},"easeOutCubic"),easeInOutCubic:o(function(O,S,M,I,B){return(S/=B/2)<1?I/2*S*S*S+M:I/2*((S-=2)*S*S+2)+M},"easeInOutCubic"),easeInQuart:o(function(O,S,M,I,B){return I*(S/=B)*S*S*S+M},"easeInQuart"),easeOutQuart:o(function(O,S,M,I,B){return-I*((S=S/B-1)*S*S*S-1)+M},"easeOutQuart"),easeInOutQuart:o(function(O,S,M,I,B){return(S/=B/2)<1?I/2*S*S*S*S+M:-I/2*((S-=2)*S*S*S-2)+M},"easeInOutQuart"),easeInQuint:o(function(O,S,M,I,B){return I*(S/=B)*S*S*S*S+M},"easeInQuint"),easeOutQuint:o(function(O,S,M,I,B){return I*((S=S/B-1)*S*S*S*S+1)+M},"easeOutQuint"),easeInOutQuint:o(function(O,S,M,I,B){return(S/=B/2)<1?I/2*S*S*S*S*S+M:I/2*((S-=2)*S*S*S*S+2)+M},"easeInOutQuint"),easeInSine:o(function(O,S,M,I,B){return-I*p(S/B*(g/2))+I+M},"easeInSine"),easeOutSine:o(function(O,S,M,I,B){return I*h(S/B*(g/2))+M},"easeOutSine"),easeInOutSine:o(function(O,S,M,I,B){return-I/2*(p(g*S/B)-1)+M},"easeInOutSine"),easeInExpo:o(function(O,S,M,I,B){return S===0?M:I*m(2,10*(S/B-1))+M},"easeInExpo"),easeOutExpo:o(function(O,S,M,I,B){return S===B?M+I:I*(-m(2,-10*S/B)+1)+M},"easeOutExpo"),easeInOutExpo:o(function(O,S,M,I,B){return S===0?M:S===B?M+I:(S/=B/2)<1?I/2*m(2,10*(S-1))+M:I/2*(-m(2,-10*--S)+2)+M},"easeInOutExpo"),easeInCirc:o(function(O,S,M,I,B){return-I*(d(1-(S/=B)*S)-1)+M},"easeInCirc"),easeOutCirc:o(function(O,S,M,I,B){return I*d(1-(S=S/B-1)*S)+M},"easeOutCirc"),easeInOutCirc:o(function(O,S,M,I,B){return(S/=B/2)<1?-I/2*(d(1-S*S)-1)+M:I/2*(d(1-(S-=2)*S)+1)+M},"easeInOutCirc")},x=o(function(O){return Array.prototype.slice.call(O?document.querySelectorAll(O):[])},"$$"),T=o(function(O){return x(O).shift()||null},"$"),E=o(function(O){return O instanceof Element},"isElement"),L=o(function(O){return O===window},"isWindow"),P=o(function(O){return O===document.documentElement||O===document.body},"isRootContainer"),D=o(function(O,S){if(E(S))return O===S;for(var M=x(S),I=M.length;--I>=0&&M[I]!==O;);return I>-1},"matches"),F=o(function(O){return Math.max(O.scrollHeight,O.clientHeight,O.offsetHeight)},"getHeight"),A=o(function(O){return Math.max(O.scrollWidth,O.clientWidth,O.offsetWidth)},"getWidth"),W=o(function(O){return{width:A(O),height:F(O)}},"getSize"),C=o(function(O){var S=L(O)||P(O);return{viewport:{width:S?Math.min(window.innerWidth,document.documentElement.clientWidth):O.clientWidth,height:S?window.innerHeight:O.clientHeight},size:S?{width:Math.max(A(document.body),A(document.documentElement)),height:Math.max(F(document.body),F(document.documentElement))}:W(O)}},"getViewportAndElementSizes"),le={y:"scrollTop",x:"scrollLeft"},j={y:"pageYOffset",x:"pageXOffset"},N=o(function(O,S){return L(O)?O[j[S]]:O[le[S]]},"getScroll"),R=o(function(O,S,M){if(L(O)){var I=M==="y";O.scrollTo(I?O.pageXOffset:S,I?S:O.pageYOffset)}else O[le[M]]=S},"setScroll"),z=o(function(O,S){var M=O.getBoundingClientRect();if(M.width||M.height){var I={top:0,left:0},B=void 0;if(L(S)||P(S))B=document.documentElement,I.top=window[j.y],I.left=window[j.x];else{B=S;var te=B.getBoundingClientRect();I.top=te.top*-1+B[le.y],I.left=te.left*-1+B[le.x]}return{top:M.top+I.top-B.clientTop,left:M.left+I.left-B.clientLeft}}return M},"getOffset"),U=(function(){return e?"onwheel"in document?"wheel":"mousewheel":"wheel"})(),K=o(function(O){return O==="wheel"?U:O},"eventName"),X=o(function(O,S,M,I,B){M.split(" ").forEach(function(te){O[S](K(te),I,n?{passive:B}:!1)})},"apply"),ue=o(function(O,S,M,I){return X(O,"addEventListener",S,M,I)},"addEvent"),w=o(function(O,S,M,I){return X(O,"removeEventListener",S,M,I)},"removeEvent"),xe=/^(\+|-)=(\d+(?:\.\d+)?)$/,ke=o(function(O,S){var M={top:0,left:0,relative:!1};if(c(O,"top")||c(O,"left"))M=t({},M,O);else if(a(O))if(O.length>1)M.top=O[0],M.left=O[1];else if(O.length===1)M.top=S?O[0]:0,M.left=S?0:O[0];else return null;else if(l(O))S?M.top=O:M.left=O;else if(i(O)){var I=O.trim().match(xe);if(!I)return null;var B=I[1],te=parseInt(I[2],10);B==="+"?(M.top=S?te:0,M.left=S?0:te):(M.top=S?-te:0,M.left=S?0:-te),M.relative=!0}else return null;return M},"parseCoordinate"),k={trigger:"[data-scroll]",header:"[data-scroll-header]",duration:1e3,easing:"easeOutQuint",offset:0,vertical:!0,horizontal:!1,cancellable:!0,updateURL:!1,preventDefault:!0,stopPropagation:!0,before:null,after:null,cancel:null,complete:null,step:null},Ae="click",Ye="wheel touchstart touchmove",Yt=(function(){function O(S,M){var I=this;this.$el=null,this.ctx={$trigger:null,opts:null,progress:!1,pos:null,startPos:null,easing:null,start:0,id:0,cancel:!1,hash:null},this.loop=function(te){var Re=I,Pe=Re.$el,Te=Re.ctx;if(Te.start||(Te.start=te),!Te.progress||!Pe){I.stop();return}var Pt=Te.opts,ot=Te.pos,Ct=Te.start,br=Te.startPos,Ar=Te.easing,Vt=Pt.duration,nr={top:"y",left:"x"},Lt=te-Ct,ze=Math.min(1,Math.max(Lt/Vt,0));Object.keys(ot).forEach(function(Fr){var _=ot[Fr],q=br[Fr],oe=_-q;if(oe!==0){var fe=Ar(ze,Vt*ze,0,1,Vt);R(Pe,Math.round(q+oe*fe),nr[Fr])}}),Lt<=Vt?(I.hook(Pt,"step",ze),Te.id=O.raf(I.loop)):I.stop(!0)},this.handleClick=function(te){for(var Re=I.opts,Pe=te.target;Pe&&Pe!==document;Pe=Pe.parentNode)if(D(Pe,Re.trigger)){var Te=JSON.parse(Pe.getAttribute("data-scroll-options")||"{}"),Pt=Pe.getAttribute("data-scroll"),ot=Pt||Pe.getAttribute("href"),Ct=t({},Re,Te),br=Ct.preventDefault,Ar=Ct.stopPropagation,Vt=Ct.vertical,nr=Ct.horizontal;br&&te.preventDefault(),Ar&&te.stopPropagation(),I.ctx.$trigger=Pe,nr&&Vt?I.to(ot,Ct):Vt?I.toTop(ot,Ct):nr&&I.toLeft(ot,Ct);break}},this.handleStop=function(te){var Re=I.ctx,Pe=Re.opts;Pe&&Pe.cancellable?(Re.cancel=!0,I.stop()):te.preventDefault()},this.opts=t({},k,S||{});var B=null;e&&(typeof M=="string"?B=T(M):M!=null?B=M:B=window),this.$el=B,B&&this.bind(!0,!1)}return o(O,"SweetScroll"),O.create=function(S,M){return new O(S,M)},O.prototype.to=function(S,M){if(e){var I=this,B=I.$el,te=I.ctx,Re=I.opts,Pe=te.$trigger,Te=t({},Re,M||{}),Pt=Te.offset,ot=Te.vertical,Ct=Te.horizontal,br=E(Te.header)?Te.header:T(Te.header),Ar=/^#/,Vt=i(S)&&Ar.test(S)?S:null;if(te.opts=Te,te.cancel=!1,te.hash=Vt,this.stop(),!!B){var nr=ke(Pt,ot),Lt=ke(S,ot),ze={top:0,left:0};if(Lt)if(Lt.relative){var Fr=N(B,ot?"y":"x");ze.top=ot?Fr+Lt.top:Lt.top,ze.left=ot?Lt.left:Fr+Lt.left}else ze=Lt;else if(i(S)&&S!=="#"){var _=T(S);if(!_)return;ze=z(_,B)}nr&&(ze.top+=nr.top,ze.left+=nr.left),br&&(ze.top=Math.max(0,ze.top-W(br).height));var q=C(B),oe=q.viewport,fe=q.size;if(ze.top=ot?Math.max(0,Math.min(fe.height-oe.height,ze.top)):N(B,"y"),ze.left=Ct?Math.max(0,Math.min(fe.width-oe.width,ze.left)):N(B,"x"),this.hook(Te,"before",ze,Pe)===!1){te.opts=null;return}te.pos=ze,this.start(Te),this.bind(!1,!0)}}},O.prototype.toTop=function(S,M){this.to(S,t({},M||{},{vertical:!0,horizontal:!1}))},O.prototype.toLeft=function(S,M){this.to(S,t({},M||{},{vertical:!1,horizontal:!0}))},O.prototype.toElement=function(S,M){var I=this.$el;!e||!I||this.to(z(S,I),M||{})},O.prototype.stop=function(S){S===void 0&&(S=!1);var M=this,I=M.$el,B=M.ctx,te=B.pos;!I||!B.progress||(O.caf(B.id),B.progress=!1,B.start=0,B.id=0,S&&te&&(R(I,te.left,"x"),R(I,te.top,"y")),this.complete())},O.prototype.update=function(S){if(this.$el){var M=t({},this.opts,S);this.stop(),this.unbind(!0,!0),this.opts=M,this.bind(!0,!1)}},O.prototype.destroy=function(){this.$el&&(this.stop(),this.unbind(!0,!0),this.$el=null)},O.prototype.onBefore=function(S,M){return!0},O.prototype.onStep=function(S){},O.prototype.onAfter=function(S,M){},O.prototype.onCancel=function(){},O.prototype.onComplete=function(S){},O.prototype.start=function(S){var M=this.ctx;M.opts=S,M.progress=!0,M.easing=s(S.easing)?S.easing:y[S.easing];var I=this.$el,B={top:N(I,"y"),left:N(I,"x")};M.startPos=B,M.id=O.raf(this.loop)},O.prototype.complete=function(){var S=this,M=S.$el,I=S.ctx,B=I.hash,te=I.cancel,Re=I.opts,Pe=I.pos,Te=I.$trigger;if(!(!M||!Re)){if(B!=null&&B!==window.location.hash){var Pt=Re.updateURL;e&&r&&Pt!==!1&&window.history[Pt==="replace"?"replaceState":"pushState"](null,"",B)}this.unbind(!1,!0),I.opts=null,I.$trigger=null,te?this.hook(Re,"cancel"):this.hook(Re,"after",Pe,Te),this.hook(Re,"complete",te)}},O.prototype.hook=function(S,M){for(var I=[],B=2;B<arguments.length;B++)I[B-2]=arguments[B];var te,Re=S[M],Pe,Te;return s(Re)&&(Pe=Re.apply(this,I.concat([this]))),Te=(te=this)["on"+(M[0].toUpperCase()+M.slice(1))].apply(te,I),Pe!==void 0?Pe:Te},O.prototype.bind=function(S,M){var I=this,B=I.$el,te=I.ctx.opts;B&&(S&&ue(B,Ae,this.handleClick,!1),M&&ue(B,Ye,this.handleStop,te?te.cancellable:!0))},O.prototype.unbind=function(S,M){var I=this,B=I.$el,te=I.ctx.opts;B&&(S&&w(B,Ae,this.handleClick,!1),M&&w(B,Ye,this.handleStop,te?te.cancellable:!0))},O.raf=u,O.caf=f,O})();return Yt})});var Ib={};se(Ib,{setup:()=>Ez,staticStyles:()=>kz,styles:()=>Tz});var cl={};se(cl,{DeesComms:()=>Zd});var Le={};se(Le,{Timeout:()=>Dc,delayFor:()=>jb,delayForRandom:()=>fO});var ie={};se(ie,{CumulativeDeferred:()=>Ec,Deferred:()=>Tc,Timeout:()=>wa,cumulativeDefer:()=>nO,defer:()=>Wr,delayFor:()=>Bb,delayForRandom:()=>lO,fromCallback:()=>uO,getFirstTrueOrFalse:()=>cO,map:()=>sO,rejectedPromise:()=>oO,resolvedPromise:()=>iO,timeoutAndContinue:()=>aO,timeoutWrap:()=>$b});var Tc=class{static{o(this,"Deferred")}claim(){if(this.claimed)throw new Error("Deferred already claimed");this.claimed=!0}get duration(){return this.stoppedAt?this.stoppedAt-this.startedAt:Date.now()-this.startedAt}constructor(){this.claimed=!1,this.promise=new Promise((e,r)=>{this.resolve=n=>{this.status="fulfilled",this.stoppedAt=Date.now(),e(n)},this.reject=n=>{this.status="rejected",this.stoppedAt=Date.now(),r(n)},this.startedAt=Date.now(),this.status="pending"})}},Wr=o(()=>new Tc,"defer");var rO=2147483647,Fb=o(t=>{t.unref?.()},"unrefTimer"),wa=class{static{o(this,"Timeout")}constructor(e,r,n=!1){this.unrefed=!1,this.state="running",this.timeLeftAtCancel=0,this.passOn=r,this.deferred=Wr(),this.promise=this.deferred.promise,this.deadline=performance.now()+e,this.timer=this.startChunk(e),n&&this.makeUnrefed()}startChunk(e){let r=Math.min(e,rO),n=setTimeout(()=>{if(this.state!=="running")return;let i=e-r;i>0?this.timer=this.startChunk(i):(this.state="completed",this.deferred.resolve(this.passOn))},r);return this.unrefed&&Fb(n),n}makeUnrefed(){this.unrefed=!0,Fb(this.timer)}cancel(){this.state==="running"&&(this.timeLeftAtCancel=this.getTimeLeft(),this.state="cancelled",clearTimeout(this.timer))}getTimeLeft(){if(this.state==="completed")return 0;if(this.state==="cancelled")return this.timeLeftAtCancel;let e=Math.ceil(this.deadline-performance.now());return e>0?e:0}};var Ec=class{static{o(this,"CumulativeDeferred")}constructor(){this.accumulatedPromises=[],this.deferred=Wr(),this.promise=this.deferred.promise,setTimeout(async()=>{for(;this.accumulatedPromises.length>0;)await this.accumulatedPromises.shift();this.deferred.resolve()},0)}subDefer(){let e=Wr();return this.addPromise(e.promise),e}addPromise(e){this.accumulatedPromises.push(e)}},nO=o(()=>new Ec,"cumulativeDefer");function iO(t){return Promise.resolve(t)}o(iO,"resolvedPromise");var oO=o(t=>Promise.reject(t),"rejectedPromise"),sO=o(async(t,e)=>Promise.all(t.map(e)),"map"),$b=o(async(t,e,r=!0)=>new Promise((n,i)=>{let s,a=o(()=>{s!==void 0&&(clearTimeout(s),s=void 0)},"releaseTimeout");s=setTimeout(()=>{s=void 0,r?i(new Error("timeout")):n(null)},e),t.then(l=>{a(),n(l)},l=>{a(),i(l)})}),"timeoutWrap"),aO=o(async(t,e=6e4)=>$b(t,e,!1),"timeoutAndContinue"),Bb=o(async(t,e,r=!1)=>(await new wa(t,void 0,r).promise,e),"delayFor"),lO=o(async(t,e,r,n=!1)=>(await Bb(Math.random()*(e-t)+t,void 0,n),r),"delayForRandom"),cO=o(async t=>{let e=Wr();for(let r of t)r.then(n=>{n===!0&&e.resolve(!0)});return Promise.all(t).then(()=>{e.resolve(!1)}),e.promise},"getFirstTrueOrFalse"),uO=o(t=>new Promise((e,r)=>{t((n,i)=>{n?r(n):e(i)})}),"fromCallback");var jb=o(async(t,e,r=!1)=>(await new Dc(t,null,r).promise,e),"delayFor"),fO=o(async(t,e,r,n=!1)=>(await jb(Math.random()*(e-t)+t,null,n),r),"delayForRandom"),pO=2147483647,Dc=class t{static{o(this,"Timeout")}constructor(e,r,n=!1){this._cancelled=!1,this._unrefed=!1,this.timeoutInMillis=e,this._passOn=r,this._deferred=Wr(),this.promise=this._deferred.promise,this._timeout=this.startChunk(e),this.started=Date.now(),n&&this.makeUnrefed()}startChunk(e){let r=Math.min(e,pO),n=setTimeout(()=>{if(this._cancelled)return;let i=e-r;i>0?this._timeout=this.startChunk(i):this._deferred.resolve(this._passOn)},r);return this._unrefed&&t.unrefTimer(n),n}static unrefTimer(e){e.unref?.()}makeUnrefed(){this._unrefed=!0,t.unrefTimer(this._timeout)}cancel(){this._cancelled=!0,clearTimeout(this._timeout)}getTimeLeft(){let e=this.started+this.timeoutInMillis-Date.now();return e>0?e:0}};var Cc={};var $t={};se($t,{TYPED_REQUEST_REDACTED_PAYLOAD:()=>Es,TypedHandler:()=>Ud,TypedRequest:()=>Tp,TypedRequestRetryLimitError:()=>kp,TypedRequestTimeoutError:()=>Sp,TypedResponseError:()=>ur,TypedRouter:()=>qd,TypedTarget:()=>Yd,VirtualStream:()=>Dr,VirtualStreamActivationScope:()=>wn,VirtualStreamClosedError:()=>Yi,VirtualStreamLifecycleContractError:()=>hp,VirtualStreamOpenTimeoutError:()=>Vi,getTypedRequestResponseInterestKey:()=>bp});var St={};se(St,{AsyncExecutionStack:()=>hd,BackpressuredArray:()=>md,FastMap:()=>Wi,Interest:()=>Ya,InterestMap:()=>dd,LimitedArray:()=>gd,LoopTracker:()=>yd,ObjectMap:()=>bn,Stringmap:()=>Va,TimedAggregator:()=>Ka,TimedAggregtor:()=>Ka,Tree:()=>xd,uni:()=>RS});var Sa={};se(Sa,{SmartMatch:()=>vm});var va={};se(va,{isMatch:()=>gO,matcher:()=>dO});function Ci(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}o(Ci,"escapeStringRegexp");var wm=new Map,zb=o((t,e)=>{if(!Array.isArray(t))switch(typeof t){case"string":t=[t];break;case"undefined":t=[];break;default:throw new TypeError(`Expected '${e}' to be a string or an array, but got a type of '${typeof t}'`)}return t.filter(r=>{if(typeof r!="string"){if(typeof r>"u")return!1;throw new TypeError(`Expected '${e}' to be an array of strings, but found a type of '${typeof r}' in the array`)}return!0})},"sanitizeArray"),mO=o((t,e)=>{e={caseSensitive:!1,...e};let r=t+JSON.stringify(e);if(wm.has(r))return wm.get(r);let n=t[0]==="!";n&&(t=t.slice(1)),t=Ci(t).replace(/\\\*/g,"[\\s\\S]*");let i=new RegExp(`^${t}$`,e.caseSensitive?"":"i");return i.negated=n,wm.set(r,i),i},"makeRegexp"),Wb=o((t,e,r,n)=>{if(t=zb(t,"inputs"),e=zb(e,"patterns"),e.length===0)return[];e=e.map(a=>mO(a,r));let{allPatterns:i}=r||{},s=[];for(let a of t){let l,c=[...e].fill(!1);for(let[u,f]of e.entries())if(f.test(a)&&(c[u]=!0,l=!f.negated,!l))break;if(!(l===!1||l===void 0&&e.some(u=>!u.negated)||i&&c.some((u,f)=>!u&&!e[f].negated))&&(s.push(a),n))break}return s},"baseMatcher");function dO(t,e,r){return Wb(t,e,r,!1)}o(dO,"matcher");function gO(t,e,r){return Wb(t,e,r,!0).length>0}o(gO,"isMatch");var vm=class{static{o(this,"SmartMatch")}constructor(e){this.wildcard=e}match(e){return va.isMatch(e,this.wildcard)}};var Ne={};se(Ne,{ObservableIntake:()=>Ym,Observablemap:()=>qm,fromStreamWithBackpressure:()=>XI,rxjs:()=>Wo});var Wo={};se(Wo,{Observable:()=>we,ReplaySubject:()=>Ao,Subject:()=>At,Subscription:()=>Rt,from:()=>Vr,fromEvent:()=>Pi,of:()=>Oa,ops:()=>QI});var Sm=o(function(t,e){return Sm=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Sm(t,e)},"extendStatics");function Xe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Sm(t,e);function r(){this.constructor=t}o(r,"__"),t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}o(Xe,"__extends");var km=o(function(){return km=Object.assign||o(function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},"__assign"),km.apply(this,arguments)},"__assign");function bO(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}o(bO,"__rest");function wO(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(a=t[l])&&(s=(i<3?a(s):i>3?a(e,r,s):a(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s}o(wO,"__decorate");function vO(t,e){return function(r,n){e(r,n,t)}}o(vO,"__param");function SO(t,e,r,n,i,s){function a(x){if(x!==void 0&&typeof x!="function")throw new TypeError("Function expected");return x}o(a,"accept");for(var l=n.kind,c=l==="getter"?"get":l==="setter"?"set":"value",u=!e&&t?n.static?t:t.prototype:null,f=e||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),p,h=!1,m=r.length-1;m>=0;m--){var d={};for(var g in n)d[g]=g==="access"?{}:n[g];for(var g in n.access)d.access[g]=n.access[g];d.addInitializer=function(x){if(h)throw new TypeError("Cannot add initializers after decoration has completed");s.push(a(x||null))};var y=(0,r[m])(l==="accessor"?{get:f.get,set:f.set}:f[c],d);if(l==="accessor"){if(y===void 0)continue;if(y===null||typeof y!="object")throw new TypeError("Object expected");(p=a(y.get))&&(f.get=p),(p=a(y.set))&&(f.set=p),(p=a(y.init))&&i.unshift(p)}else(p=a(y))&&(l==="field"?i.unshift(p):f[c]=p)}u&&Object.defineProperty(u,n.name,f),h=!0}o(SO,"__esDecorate");function kO(t,e,r){for(var n=arguments.length>2,i=0;i<e.length;i++)r=n?e[i].call(t,r):e[i].call(t);return n?r:void 0}o(kO,"__runInitializers");function TO(t){return typeof t=="symbol"?t:"".concat(t)}o(TO,"__propKey");function EO(t,e,r){return typeof e=="symbol"&&(e=e.description?"[".concat(e.description,"]"):""),Object.defineProperty(t,"name",{configurable:!0,value:r?"".concat(r," ",e):e})}o(EO,"__setFunctionName");function DO(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}o(DO,"__metadata");function Dm(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return o(i,"adopt"),new(r||(r=Promise))(function(s,a){function l(f){try{u(n.next(f))}catch(p){a(p)}}o(l,"fulfilled");function c(f){try{u(n.throw(f))}catch(p){a(p)}}o(c,"rejected");function u(f){f.done?s(f.value):i(f.value).then(l,c)}o(u,"step"),u((n=n.apply(t,e||[])).next())})}o(Dm,"__awaiter");function ka(t,e){var r={label:0,sent:o(function(){if(s[0]&1)throw s[1];return s[1]},"sent"),trys:[],ops:[]},n,i,s,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=l(0),a.throw=l(1),a.return=l(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(u){return function(f){return c([u,f])}}function c(u){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(r=0)),r;)try{if(n=1,i&&(s=u[0]&2?i.return:u[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,u[1])).done)return s;switch(i=0,s&&(u=[u[0]&2,s.value]),u[0]){case 0:case 1:s=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){r.label=u[1];break}if(u[0]===6&&r.label<s[1]){r.label=s[1],s=u;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(u);break}s[2]&&r.ops.pop(),r.trys.pop();continue}u=e.call(t,r)}catch(f){u=[6,f],i=0}finally{n=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}o(ka,"__generator");var Tm=Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]});function CO(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Tm(e,t,r)}o(CO,"__exportStar");function gt(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:o(function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}},"next")};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}o(gt,"__values");function ft(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){a={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return s}o(ft,"__read");function OO(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(ft(arguments[e]));return t}o(OO,"__spread");function MO(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;for(var n=Array(t),i=0,e=0;e<r;e++)for(var s=arguments[e],a=0,l=s.length;a<l;a++,i++)n[i]=s[a];return n}o(MO,"__spreadArrays");function _t(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,s;n<i;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return t.concat(s||Array.prototype.slice.call(e))}o(_t,"__spreadArray");function xn(t){return this instanceof xn?(this.v=t,this):new xn(t)}o(xn,"__await");function Cm(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),i,s=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),l("next"),l("throw"),l("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(m){return function(d){return Promise.resolve(d).then(m,p)}}function l(m,d){n[m]&&(i[m]=function(g){return new Promise(function(y,x){s.push([m,g,y,x])>1||c(m,g)})},d&&(i[m]=d(i[m])))}function c(m,d){try{u(n[m](d))}catch(g){h(s[0][3],g)}}function u(m){m.value instanceof xn?Promise.resolve(m.value.v).then(f,p):h(s[0][2],m)}function f(m){c("next",m)}function p(m){c("throw",m)}function h(m,d){m(d),s.shift(),s.length&&c(s[0][0],s[0][1])}}o(Cm,"__asyncGenerator");function IO(t){var e,r;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,s){e[i]=t[i]?function(a){return(r=!r)?{value:xn(t[i](a)),done:!1}:s?s(a):a}:s}}o(IO,"__asyncDelegator");function Om(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof gt=="function"?gt(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=t[s]&&function(a){return new Promise(function(l,c){a=t[s](a),i(l,c,a.done,a.value)})}}function i(s,a,l,c){Promise.resolve(c).then(function(u){s({value:u,done:l})},a)}}o(Om,"__asyncValues");function NO(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}o(NO,"__makeTemplateObject");var PO=Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e},Em=o(function(t){return Em=Object.getOwnPropertyNames||function(e){var r=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[r.length]=n);return r},Em(t)},"ownKeys");function LO(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r=Em(t),n=0;n<r.length;n++)r[n]!=="default"&&Tm(e,t,r[n]);return PO(e,t),e}o(LO,"__importStar");function _O(t){return t&&t.__esModule?t:{default:t}}o(_O,"__importDefault");function RO(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)}o(RO,"__classPrivateFieldGet");function AO(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r}o(AO,"__classPrivateFieldSet");function FO(t,e){if(e===null||typeof e!="object"&&typeof e!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof t=="function"?e===t:t.has(e)}o(FO,"__classPrivateFieldIn");function $O(t,e,r){if(e!=null){if(typeof e!="object"&&typeof e!="function")throw new TypeError("Object expected.");var n,i;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=e[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=e[Symbol.dispose],r&&(i=n)}if(typeof n!="function")throw new TypeError("Object not disposable.");i&&(n=o(function(){try{i.call(this)}catch(s){return Promise.reject(s)}},"dispose")),t.stack.push({value:e,dispose:n,async:r})}else r&&t.stack.push({async:!0});return e}o($O,"__addDisposableResource");var BO=typeof SuppressedError=="function"?SuppressedError:function(t,e,r){var n=new Error(r);return n.name="SuppressedError",n.error=t,n.suppressed=e,n};function jO(t){function e(s){t.error=t.hasError?new BO(s,t.error,"An error was suppressed during disposal."):s,t.hasError=!0}o(e,"fail");var r,n=0;function i(){for(;r=t.stack.pop();)try{if(!r.async&&n===1)return n=0,t.stack.push(r),Promise.resolve().then(i);if(r.dispose){var s=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(s).then(i,function(a){return e(a),i()})}else n|=1}catch(a){e(a)}if(n===1)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}return o(i,"next"),i()}o(jO,"__disposeResources");function zO(t,e){return typeof t=="string"&&/^\.\.?\//.test(t)?t.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(r,n,i,s,a){return n?e?".jsx":".js":i&&(!s||!a)?r:i+s+"."+a.toLowerCase()+"js"}):t}o(zO,"__rewriteRelativeImportExtension");var Zz={__extends:Xe,__assign:km,__rest:bO,__decorate:wO,__param:vO,__esDecorate:SO,__runInitializers:kO,__propKey:TO,__setFunctionName:EO,__metadata:DO,__awaiter:Dm,__generator:ka,__createBinding:Tm,__exportStar:CO,__values:gt,__read:ft,__spread:OO,__spreadArrays:MO,__spreadArray:_t,__await:xn,__asyncGenerator:Cm,__asyncDelegator:IO,__asyncValues:Om,__makeTemplateObject:NO,__importStar:LO,__importDefault:_O,__classPrivateFieldGet:RO,__classPrivateFieldSet:AO,__classPrivateFieldIn:FO,__addDisposableResource:$O,__disposeResources:jO,__rewriteRelativeImportExtension:zO};function pe(t){return typeof t=="function"}o(pe,"isFunction");function Mc(t){var e=o(function(n){Error.call(n),n.stack=new Error().stack},"_super"),r=t(e);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}o(Mc,"createErrorClass");var Ta=Mc(function(t){return o(function(r){t(this),this.message=r?r.length+` errors occurred during unsubscription:
2
2
  `+r.map(function(n,i){return i+1+") "+n.toString()}).join(`
3
- `):"",this.name="UnsubscriptionError",this.errors=r},"UnsubscriptionErrorImpl")});function vr(t,e){if(t){var r=t.indexOf(e);0<=r&&t.splice(r,1)}}o(vr,"arrRemove");var Rt=(function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return o(t,"Subscription"),t.prototype.unsubscribe=function(){var e,r,n,i,s;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var l=gt(a),c=l.next();!c.done;c=l.next()){var u=c.value;u.remove(this)}}catch(g){e={error:g}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(e)throw e.error}}else a.remove(this);var f=this.initialTeardown;if(pe(f))try{f()}catch(g){s=g instanceof va?g.errors:[g]}var p=this._finalizers;if(p){this._finalizers=null;try{for(var h=gt(p),m=h.next();!m.done;m=h.next()){var d=m.value;try{Ab(d)}catch(g){s=s??[],g instanceof va?s=Lt(Lt([],ft(s)),ft(g.errors)):s.push(g)}}}catch(g){n={error:g}}finally{try{m&&!m.done&&(i=h.return)&&i.call(h)}finally{if(n)throw n.error}}}if(s)throw new va(s)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)Ab(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(e)}},t.prototype._hasParent=function(e){var r=this._parentage;return r===e||Array.isArray(r)&&r.includes(e)},t.prototype._addParent=function(e){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(e),r):r?[r,e]:e},t.prototype._removeParent=function(e){var r=this._parentage;r===e?this._parentage=null:Array.isArray(r)&&vr(r,e)},t.prototype.remove=function(e){var r=this._finalizers;r&&vr(r,e),e instanceof t&&e._removeParent(this)},t.EMPTY=(function(){var e=new t;return e.closed=!0,e})(),t})(),Tm=Rt.EMPTY;function Cc(t){return t instanceof Rt||t&&"closed"in t&&pe(t.remove)&&pe(t.add)&&pe(t.unsubscribe)}o(Cc,"isSubscription");function Ab(t){pe(t)?t():t.unsubscribe()}o(Ab,"execFinalizer");var sr={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var Lo={setTimeout:o(function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=Lo.delegate;return i?.setTimeout?i.setTimeout.apply(i,Lt([t,e],ft(r))):setTimeout.apply(void 0,Lt([t,e],ft(r)))},"setTimeout"),clearTimeout:o(function(t){var e=Lo.delegate;return(e?.clearTimeout||clearTimeout)(t)},"clearTimeout"),delegate:void 0};function Oc(t){Lo.setTimeout(function(){var e=sr.onUnhandledError;if(e)e(t);else throw t})}o(Oc,"reportUnhandledError");function Wr(){}o(Wr,"noop");var Fb=(function(){return Em("C",void 0,void 0)})();function $b(t){return Em("E",void 0,t)}o($b,"errorNotification");function Bb(t){return Em("N",t,void 0)}o(Bb,"nextNotification");function Em(t,e,r){return{kind:t,value:e,error:r}}o(Em,"createNotification");var Mi=null;function Ro(t){if(sr.useDeprecatedSynchronousErrorHandling){var e=!Mi;if(e&&(Mi={errorThrown:!1,error:null}),t(),e){var r=Mi,n=r.errorThrown,i=r.error;if(Mi=null,n)throw i}}else t()}o(Ro,"errorContext");function jb(t){sr.useDeprecatedSynchronousErrorHandling&&Mi&&(Mi.errorThrown=!0,Mi.error=t)}o(jb,"captureError");var Ii=(function(t){Xe(e,t);function e(r){var n=t.call(this)||this;return n.isStopped=!1,r?(n.destination=r,Cc(r)&&r.add(n)):n.destination=RO,n}return o(e,"Subscriber"),e.create=function(r,n,i){return new Fn(r,n,i)},e.prototype.next=function(r){this.isStopped?Cm(Bb(r),this):this._next(r)},e.prototype.error=function(r){this.isStopped?Cm($b(r),this):(this.isStopped=!0,this._error(r))},e.prototype.complete=function(){this.isStopped?Cm(Fb,this):(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(r){this.destination.next(r)},e.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e})(Rt),PO=Function.prototype.bind;function Dm(t,e){return PO.call(t,e)}o(Dm,"bind");var _O=(function(){function t(e){this.partialObserver=e}return o(t,"ConsumerObserver"),t.prototype.next=function(e){var r=this.partialObserver;if(r.next)try{r.next(e)}catch(n){Mc(n)}},t.prototype.error=function(e){var r=this.partialObserver;if(r.error)try{r.error(e)}catch(n){Mc(n)}else Mc(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(r){Mc(r)}},t})(),Fn=(function(t){Xe(e,t);function e(r,n,i){var s=t.call(this)||this,a;if(pe(r)||!r)a={next:r??void 0,error:n??void 0,complete:i??void 0};else{var l;s&&sr.useDeprecatedNextContext?(l=Object.create(r),l.unsubscribe=function(){return s.unsubscribe()},a={next:r.next&&Dm(r.next,l),error:r.error&&Dm(r.error,l),complete:r.complete&&Dm(r.complete,l)}):a=r}return s.destination=new _O(a),s}return o(e,"SafeSubscriber"),e})(Ii);function Mc(t){sr.useDeprecatedSynchronousErrorHandling?jb(t):Oc(t)}o(Mc,"handleUnhandledError");function LO(t){throw t}o(LO,"defaultErrorHandler");function Cm(t,e){var r=sr.onStoppedNotification;r&&Lo.setTimeout(function(){return r(t,e)})}o(Cm,"handleStoppedNotification");var RO={closed:!0,next:Wr,error:LO,complete:Wr};var Ni=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function Hr(t){return t}o(Hr,"identity");function AO(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Om(t)}o(AO,"pipe");function Om(t){return t.length===0?Hr:t.length===1?t[0]:o(function(r){return t.reduce(function(n,i){return i(n)},r)},"piped")}o(Om,"pipeFromArray");var Se=(function(){function t(e){e&&(this._subscribe=e)}return o(t,"Observable"),t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(e,r,n){var i=this,s=$O(e)?e:new Fn(e,r,n);return Ro(function(){var a=i,l=a.operator,c=a.source;s.add(l?l.call(s,c):c?i._subscribe(s):i._trySubscribe(s))}),s},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(r){e.error(r)}},t.prototype.forEach=function(e,r){var n=this;return r=zb(r),new r(function(i,s){var a=new Fn({next:o(function(l){try{e(l)}catch(c){s(c),a.unsubscribe()}},"next"),error:s,complete:i});n.subscribe(a)})},t.prototype._subscribe=function(e){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(e)},t.prototype[Ni]=function(){return this},t.prototype.pipe=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return Om(e)(this)},t.prototype.toPromise=function(e){var r=this;return e=zb(e),new e(function(n,i){var s;r.subscribe(function(a){return s=a},function(a){return i(a)},function(){return n(s)})})},t.create=function(e){return new t(e)},t})();function zb(t){var e;return(e=t??sr.Promise)!==null&&e!==void 0?e:Promise}o(zb,"getPromiseCtor");function FO(t){return t&&pe(t.next)&&pe(t.error)&&pe(t.complete)}o(FO,"isObserver");function $O(t){return t&&t instanceof Ii||FO(t)&&Cc(t)}o($O,"isSubscriber");function BO(t){return pe(t?.lift)}o(BO,"hasLift");function Ce(t){return function(e){if(BO(e))return e.lift(function(r){try{return t(r,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}o(Ce,"operate");function Oe(t,e,r,n,i){return new Wb(t,e,r,n,i)}o(Oe,"createOperatorSubscriber");var Wb=(function(t){Xe(e,t);function e(r,n,i,s,a,l){var c=t.call(this,r)||this;return c.onFinalize=a,c.shouldUnsubscribe=l,c._next=n?function(u){try{n(u)}catch(f){r.error(f)}}:t.prototype._next,c._error=s?function(u){try{s(u)}catch(f){r.error(f)}finally{this.unsubscribe()}}:t.prototype._error,c._complete=i?function(){try{i()}catch(u){r.error(u)}finally{this.unsubscribe()}}:t.prototype._complete,c}return o(e,"OperatorSubscriber"),e.prototype.unsubscribe=function(){var r;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;t.prototype.unsubscribe.call(this),!n&&((r=this.onFinalize)===null||r===void 0||r.call(this))}},e})(Ii);var Mm=Dc(function(t){return o(function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"},"ObjectUnsubscribedErrorImpl")});var At=(function(t){Xe(e,t);function e(){var r=t.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return o(e,"Subject"),e.prototype.lift=function(r){var n=new Im(this,this);return n.operator=r,n},e.prototype._throwIfClosed=function(){if(this.closed)throw new Mm},e.prototype.next=function(r){var n=this;Ro(function(){var i,s;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var a=gt(n.currentObservers),l=a.next();!l.done;l=a.next()){var c=l.value;c.next(r)}}catch(u){i={error:u}}finally{try{l&&!l.done&&(s=a.return)&&s.call(a)}finally{if(i)throw i.error}}}})},e.prototype.error=function(r){var n=this;Ro(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=r;for(var i=n.observers;i.length;)i.shift().error(r)}})},e.prototype.complete=function(){var r=this;Ro(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var n=r.observers;n.length;)n.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:o(function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},"get"),enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(r){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,r)},e.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},e.prototype._innerSubscribe=function(r){var n=this,i=this,s=i.hasError,a=i.isStopped,l=i.observers;return s||a?Tm:(this.currentObservers=null,l.push(r),new Rt(function(){n.currentObservers=null,vr(l,r)}))},e.prototype._checkFinalizedStatuses=function(r){var n=this,i=n.hasError,s=n.thrownError,a=n.isStopped;i?r.error(s):a&&r.complete()},e.prototype.asObservable=function(){var r=new Se;return r.source=this,r},e.create=function(r,n){return new Im(r,n)},e})(Se),Im=(function(t){Xe(e,t);function e(r,n){var i=t.call(this)||this;return i.destination=r,i.source=n,i}return o(e,"AnonymousSubject"),e.prototype.next=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.next)===null||i===void 0||i.call(n,r)},e.prototype.error=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.error)===null||i===void 0||i.call(n,r)},e.prototype.complete=function(){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||n===void 0||n.call(r)},e.prototype._subscribe=function(r){var n,i;return(i=(n=this.source)===null||n===void 0?void 0:n.subscribe(r))!==null&&i!==void 0?i:Tm},e})(At);var Ao=(function(t){Xe(e,t);function e(r){var n=t.call(this)||this;return n._value=r,n}return o(e,"BehaviorSubject"),Object.defineProperty(e.prototype,"value",{get:o(function(){return this.getValue()},"get"),enumerable:!1,configurable:!0}),e.prototype._subscribe=function(r){var n=t.prototype._subscribe.call(this,r);return!n.closed&&r.next(this._value),n},e.prototype.getValue=function(){var r=this,n=r.hasError,i=r.thrownError,s=r._value;if(n)throw i;return this._throwIfClosed(),s},e.prototype.next=function(r){t.prototype.next.call(this,this._value=r)},e})(At);var ka={now:o(function(){return(ka.delegate||Date).now()},"now"),delegate:void 0};var Fo=(function(t){Xe(e,t);function e(r,n,i){r===void 0&&(r=1/0),n===void 0&&(n=1/0),i===void 0&&(i=ka);var s=t.call(this)||this;return s._bufferSize=r,s._windowTime=n,s._timestampProvider=i,s._buffer=[],s._infiniteTimeWindow=!0,s._infiniteTimeWindow=n===1/0,s._bufferSize=Math.max(1,r),s._windowTime=Math.max(1,n),s}return o(e,"ReplaySubject"),e.prototype.next=function(r){var n=this,i=n.isStopped,s=n._buffer,a=n._infiniteTimeWindow,l=n._timestampProvider,c=n._windowTime;i||(s.push(r),!a&&s.push(l.now()+c)),this._trimBuffer(),t.prototype.next.call(this,r)},e.prototype._subscribe=function(r){this._throwIfClosed(),this._trimBuffer();for(var n=this._innerSubscribe(r),i=this,s=i._infiniteTimeWindow,a=i._buffer,l=a.slice(),c=0;c<l.length&&!r.closed;c+=s?1:2)r.next(l[c]);return this._checkFinalizedStatuses(r),n},e.prototype._trimBuffer=function(){var r=this,n=r._bufferSize,i=r._timestampProvider,s=r._buffer,a=r._infiniteTimeWindow,l=(a?1:2)*n;if(n<1/0&&l<s.length&&s.splice(0,s.length-l),!a){for(var c=i.now(),u=0,f=1;f<s.length&&s[f]<=c;f+=2)u=f;u&&s.splice(0,u+1)}},e})(At);var Nm=(function(t){Xe(e,t);function e(r,n){return t.call(this)||this}return o(e,"Action"),e.prototype.schedule=function(r,n){return n===void 0&&(n=0),this},e})(Rt);var Ta={setInterval:o(function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=Ta.delegate;return i?.setInterval?i.setInterval.apply(i,Lt([t,e],ft(r))):setInterval.apply(void 0,Lt([t,e],ft(r)))},"setInterval"),clearInterval:o(function(t){var e=Ta.delegate;return(e?.clearInterval||clearInterval)(t)},"clearInterval"),delegate:void 0};var Pm=(function(t){Xe(e,t);function e(r,n){var i=t.call(this,r,n)||this;return i.scheduler=r,i.work=n,i.pending=!1,i}return o(e,"AsyncAction"),e.prototype.schedule=function(r,n){var i;if(n===void 0&&(n=0),this.closed)return this;this.state=r;var s=this.id,a=this.scheduler;return s!=null&&(this.id=this.recycleAsyncId(a,s,n)),this.pending=!0,this.delay=n,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(a,this.id,n),this},e.prototype.requestAsyncId=function(r,n,i){return i===void 0&&(i=0),Ta.setInterval(r.flush.bind(r,this),i)},e.prototype.recycleAsyncId=function(r,n,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return n;n!=null&&Ta.clearInterval(n)},e.prototype.execute=function(r,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(r,n);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(r,n){var i=!1,s;try{this.work(r)}catch(a){i=!0,s=a||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),s},e.prototype.unsubscribe=function(){if(!this.closed){var r=this,n=r.id,i=r.scheduler,s=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,vr(s,this),n!=null&&(this.id=this.recycleAsyncId(i,n,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e})(Nm);var Ea=(function(){function t(e,r){r===void 0&&(r=t.now),this.schedulerActionCtor=e,this.now=r}return o(t,"Scheduler"),t.prototype.schedule=function(e,r,n){return r===void 0&&(r=0),new this.schedulerActionCtor(this,e).schedule(n,r)},t.now=ka.now,t})();var _m=(function(t){Xe(e,t);function e(r,n){n===void 0&&(n=Ea.now);var i=t.call(this,r,n)||this;return i.actions=[],i._active=!1,i}return o(e,"AsyncScheduler"),e.prototype.flush=function(r){var n=this.actions;if(this._active){n.push(r);return}var i;this._active=!0;do if(i=r.execute(r.state,r.delay))break;while(r=n.shift());if(this._active=!1,i){for(;r=n.shift();)r.unsubscribe();throw i}},e})(Ea);var Ur=new _m(Pm),Lm=Ur;function Ic(t){return t&&pe(t.schedule)}o(Ic,"isScheduler");function Rm(t){return t[t.length-1]}o(Rm,"last");function Hb(t){return pe(Rm(t))?t.pop():void 0}o(Hb,"popResultSelector");function qr(t){return Ic(Rm(t))?t.pop():void 0}o(qr,"popScheduler");function BH(t,e){return typeof Rm(t)=="number"?t.pop():e}o(BH,"popNumber");var $o=o((function(t){return t&&typeof t.length=="number"&&typeof t!="function"}),"isArrayLike");function Nc(t){return pe(t?.then)}o(Nc,"isPromise");function Pc(t){return pe(t[Ni])}o(Pc,"isInteropObservable");function _c(t){return Symbol.asyncIterator&&pe(t?.[Symbol.asyncIterator])}o(_c,"isAsyncIterable");function Lc(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}o(Lc,"createInvalidObservableTypeError");function jO(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}o(jO,"getSymbolIterator");var Rc=jO();function Ac(t){return pe(t?.[Rc])}o(Ac,"isIterable");function Fc(t){return vm(this,arguments,o(function(){var r,n,i,s;return Sa(this,function(a){switch(a.label){case 0:r=t.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,yn(r.read())];case 3:return n=a.sent(),i=n.value,s=n.done,s?[4,yn(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,yn(i)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}})},"readableStreamLikeToAsyncGenerator_1"))}o(Fc,"readableStreamLikeToAsyncGenerator");function $c(t){return pe(t?.getReader)}o($c,"isReadableStreamLike");function je(t){if(t instanceof Se)return t;if(t!=null){if(Pc(t))return zO(t);if($o(t))return WO(t);if(Nc(t))return HO(t);if(_c(t))return Ub(t);if(Ac(t))return UO(t);if($c(t))return qO(t)}throw Lc(t)}o(je,"innerFrom");function zO(t){return new Se(function(e){var r=t[Ni]();if(pe(r.subscribe))return r.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}o(zO,"fromInteropObservable");function WO(t){return new Se(function(e){for(var r=0;r<t.length&&!e.closed;r++)e.next(t[r]);e.complete()})}o(WO,"fromArrayLike");function HO(t){return new Se(function(e){t.then(function(r){e.closed||(e.next(r),e.complete())},function(r){return e.error(r)}).then(null,Oc)})}o(HO,"fromPromise");function UO(t){return new Se(function(e){var r,n;try{for(var i=gt(t),s=i.next();!s.done;s=i.next()){var a=s.value;if(e.next(a),e.closed)return}}catch(l){r={error:l}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}e.complete()})}o(UO,"fromIterable");function Ub(t){return new Se(function(e){YO(t,e).catch(function(r){return e.error(r)})})}o(Ub,"fromAsyncIterable");function qO(t){return Ub(Fc(t))}o(qO,"fromReadableStreamLike");function YO(t,e){var r,n,i,s;return Sm(this,void 0,void 0,function(){var a,l;return Sa(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),r=km(t),c.label=1;case 1:return[4,r.next()];case 2:if(n=c.sent(),!!n.done)return[3,4];if(a=n.value,e.next(a),e.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return l=c.sent(),i={error:l},[3,11];case 6:return c.trys.push([6,,9,10]),n&&!n.done&&(s=r.return)?[4,s.call(r)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}o(YO,"process");function pt(t,e,r,n,i){n===void 0&&(n=0),i===void 0&&(i=!1);var s=e.schedule(function(){r(),i?t.add(this.schedule(null,n)):this.unsubscribe()},n);if(t.add(s),!i)return s}o(pt,"executeSchedule");function Bo(t,e){return e===void 0&&(e=0),Ce(function(r,n){r.subscribe(Oe(n,function(i){return pt(n,t,function(){return n.next(i)},e)},function(){return pt(n,t,function(){return n.complete()},e)},function(i){return pt(n,t,function(){return n.error(i)},e)}))})}o(Bo,"observeOn");function jo(t,e){return e===void 0&&(e=0),Ce(function(r,n){n.add(t.schedule(function(){return r.subscribe(n)},e))})}o(jo,"subscribeOn");function qb(t,e){return je(t).pipe(jo(e),Bo(e))}o(qb,"scheduleObservable");function Yb(t,e){return je(t).pipe(jo(e),Bo(e))}o(Yb,"schedulePromise");function Vb(t,e){return new Se(function(r){var n=0;return e.schedule(function(){n===t.length?r.complete():(r.next(t[n++]),r.closed||this.schedule())})})}o(Vb,"scheduleArray");function Kb(t,e){return new Se(function(r){var n;return pt(r,e,function(){n=t[Rc](),pt(r,e,function(){var i,s,a;try{i=n.next(),s=i.value,a=i.done}catch(l){r.error(l);return}a?r.complete():r.next(s)},0,!0)}),function(){return pe(n?.return)&&n.return()}})}o(Kb,"scheduleIterable");function Bc(t,e){if(!t)throw new Error("Iterable cannot be null");return new Se(function(r){pt(r,e,function(){var n=t[Symbol.asyncIterator]();pt(r,e,function(){n.next().then(function(i){i.done?r.complete():r.next(i.value)})},0,!0)})})}o(Bc,"scheduleAsyncIterable");function Gb(t,e){return Bc(Fc(t),e)}o(Gb,"scheduleReadableStreamLike");function Am(t,e){if(t!=null){if(Pc(t))return qb(t,e);if($o(t))return Vb(t,e);if(Nc(t))return Yb(t,e);if(_c(t))return Bc(t,e);if(Ac(t))return Kb(t,e);if($c(t))return Gb(t,e)}throw Lc(t)}o(Am,"scheduled");function Yr(t,e){return e?Am(t,e):je(t)}o(Yr,"from");function Da(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=qr(t);return Yr(t,r)}o(Da,"of");function Jb(t){return t instanceof Date&&!isNaN(t)}o(Jb,"isValidDate");function Vr(t,e){return Ce(function(r,n){var i=0;r.subscribe(Oe(n,function(s){n.next(t.call(e,s,i++))}))})}o(Vr,"map");var VO=Array.isArray;function KO(t,e){return VO(e)?t.apply(void 0,Lt([],ft(e))):t(e)}o(KO,"callOrApply");function jc(t){return Vr(function(e){return KO(t,e)})}o(jc,"mapOneOrManyArgs");var GO=Array.isArray,JO=Object.getPrototypeOf,QO=Object.prototype,XO=Object.keys;function Qb(t){if(t.length===1){var e=t[0];if(GO(e))return{args:e,keys:null};if(ZO(e)){var r=XO(e);return{args:r.map(function(n){return e[n]}),keys:r}}}return{args:t,keys:null}}o(Qb,"argsArgArrayOrObject");function ZO(t){return t&&typeof t=="object"&&JO(t)===QO}o(ZO,"isPOJO");function Xb(t,e){return t.reduce(function(r,n,i){return r[n]=e[i],r},{})}o(Xb,"createObject");function Fm(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=qr(t),n=Hb(t),i=Qb(t),s=i.args,a=i.keys;if(s.length===0)return Yr([],r);var l=new Se(eM(s,r,a?function(c){return Xb(a,c)}:Hr));return n?l.pipe(jc(n)):l}o(Fm,"combineLatest");function eM(t,e,r){return r===void 0&&(r=Hr),function(n){Zb(e,function(){for(var i=t.length,s=new Array(i),a=i,l=i,c=o(function(f){Zb(e,function(){var p=Yr(t[f],e),h=!1;p.subscribe(Oe(n,function(m){s[f]=m,h||(h=!0,l--),l||n.next(r(s.slice()))},function(){--a||n.complete()}))},n)},"_loop_1"),u=0;u<i;u++)c(u)},n)}}o(eM,"combineLatestInit");function Zb(t,e,r){t?pt(r,t,e):e()}o(Zb,"maybeSchedule");function ew(t,e,r,n,i,s,a,l){var c=[],u=0,f=0,p=!1,h=o(function(){p&&!c.length&&!u&&e.complete()},"checkComplete"),m=o(function(g){return u<n?d(g):c.push(g)},"outerNext"),d=o(function(g){s&&e.next(g),u++;var y=!1;je(r(g,f++)).subscribe(Oe(e,function(x){i?.(x),s?m(x):e.next(x)},function(){y=!0},void 0,function(){if(y)try{u--;for(var x=o(function(){var T=c.shift();a?pt(e,a,function(){return d(T)}):d(T)},"_loop_1");c.length&&u<n;)x();h()}catch(T){e.error(T)}}))},"doInnerSub");return t.subscribe(Oe(e,m,function(){p=!0,h()})),function(){l?.()}}o(ew,"mergeInternals");function Pi(t,e,r){return r===void 0&&(r=1/0),pe(e)?Pi(function(n,i){return Vr(function(s,a){return e(n,s,i,a)})(je(t(n,i)))},r):(typeof e=="number"&&(r=e),Ce(function(n,i){return ew(n,i,t,r)}))}o(Pi,"mergeMap");function zc(t){return t===void 0&&(t=1/0),Pi(Hr,t)}o(zc,"mergeAll");function Wc(){return zc(1)}o(Wc,"concatAll");function Hc(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Wc()(Yr(t,qr(t)))}o(Hc,"concat");var tM=["addListener","removeListener"],rM=["addEventListener","removeEventListener"],nM=["on","off"];function _i(t,e,r,n){if(pe(r)&&(n=r,r=void 0),n)return _i(t,e,r).pipe(jc(n));var i=ft(sM(t)?rM.map(function(l){return function(c){return t[l](e,c,r)}}):iM(t)?tM.map(tw(t,e)):oM(t)?nM.map(tw(t,e)):[],2),s=i[0],a=i[1];if(!s&&$o(t))return Pi(function(l){return _i(l,e,r)})(je(t));if(!s)throw new TypeError("Invalid event target");return new Se(function(l){var c=o(function(){for(var u=[],f=0;f<arguments.length;f++)u[f]=arguments[f];return l.next(1<u.length?u:u[0])},"handler");return s(c),function(){return a(c)}})}o(_i,"fromEvent");function tw(t,e){return function(r){return function(n){return t[r](e,n)}}}o(tw,"toCommonHandlerRegistry");function iM(t){return pe(t.addListener)&&pe(t.removeListener)}o(iM,"isNodeStyleEventEmitter");function oM(t){return pe(t.on)&&pe(t.off)}o(oM,"isJQueryStyleEventEmitter");function sM(t){return pe(t.addEventListener)&&pe(t.removeEventListener)}o(sM,"isEventTarget");function Ca(t,e,r){t===void 0&&(t=0),r===void 0&&(r=Lm);var n=-1;return e!=null&&(Ic(e)?r=e:n=e),new Se(function(i){var s=Jb(t)?+t-r.now():t;s<0&&(s=0);var a=0;return r.schedule(function(){i.closed||(i.next(a++),0<=n?this.schedule(void 0,n):i.complete())},s)})}o(Ca,"timer");function $m(t,e){return t===void 0&&(t=0),e===void 0&&(e=Ur),t<0&&(t=0),Ca(t,t,e)}o($m,"interval");function Uc(t,e){return Ce(function(r,n){var i=0;r.subscribe(Oe(n,function(s){return t.call(e,s,i++)&&n.next(s)}))})}o(Uc,"filter");function qc(t){return Ce(function(e,r){var n=[];return e.subscribe(Oe(r,function(i){return n.push(i)},function(){r.next(n),r.complete()})),je(t).subscribe(Oe(r,function(){var i=n;n=[],r.next(i)},Wr)),function(){n=null}})}o(qc,"buffer");function Yc(t,e){return e===void 0&&(e=null),e=e??t,Ce(function(r,n){var i=[],s=0;r.subscribe(Oe(n,function(a){var l,c,u,f,p=null;s++%e===0&&i.push([]);try{for(var h=gt(i),m=h.next();!m.done;m=h.next()){var d=m.value;d.push(a),t<=d.length&&(p=p??[],p.push(d))}}catch(x){l={error:x}}finally{try{m&&!m.done&&(c=h.return)&&c.call(h)}finally{if(l)throw l.error}}if(p)try{for(var g=gt(p),y=g.next();!y.done;y=g.next()){var d=y.value;vr(i,d),n.next(d)}}catch(x){u={error:x}}finally{try{y&&!y.done&&(f=g.return)&&f.call(g)}finally{if(u)throw u.error}}},function(){var a,l;try{for(var c=gt(i),u=c.next();!u.done;u=c.next()){var f=u.value;n.next(f)}}catch(p){a={error:p}}finally{try{u&&!u.done&&(l=c.return)&&l.call(c)}finally{if(a)throw a.error}}n.complete()},void 0,function(){i=null}))})}o(Yc,"bufferCount");function Vc(t){for(var e,r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var s=(e=qr(n))!==null&&e!==void 0?e:Ur,a=(r=n[0])!==null&&r!==void 0?r:null,l=n[1]||1/0;return Ce(function(c,u){var f=[],p=!1,h=o(function(g){var y=g.buffer,x=g.subs;x.unsubscribe(),vr(f,g),u.next(y),p&&m()},"emit"),m=o(function(){if(f){var g=new Rt;u.add(g);var y=[],x={buffer:y,subs:g};f.push(x),pt(g,s,function(){return h(x)},t)}},"startBuffer");a!==null&&a>=0?pt(u,s,m,a,!0):p=!0,m();var d=Oe(u,function(g){var y,x,T=f.slice();try{for(var E=gt(T),_=E.next();!_.done;_=E.next()){var P=_.value,D=P.buffer;D.push(g),l<=D.length&&h(P)}}catch(F){y={error:F}}finally{try{_&&!_.done&&(x=E.return)&&x.call(E)}finally{if(y)throw y.error}}},function(){for(;f?.length;)u.next(f.shift().buffer);d?.unsubscribe(),u.complete(),u.unsubscribe()},void 0,function(){return f=null});c.subscribe(d)})}o(Vc,"bufferTime");function Kc(t){return Ce(function(e,r){var n=!1,i=null,s=null,a=o(function(){if(s?.unsubscribe(),s=null,n){n=!1;var l=i;i=null,r.next(l)}},"emit");e.subscribe(Oe(r,function(l){s?.unsubscribe(),n=!0,i=l,s=Oe(r,a,Wr),je(t(l)).subscribe(s)},function(){a(),r.complete()},void 0,function(){i=s=null}))})}o(Kc,"debounce");function Gc(t,e){return e===void 0&&(e=Ur),Ce(function(r,n){var i=null,s=null,a=null,l=o(function(){if(i){i.unsubscribe(),i=null;var u=s;s=null,n.next(u)}},"emit");function c(){var u=a+t,f=e.now();if(f<u){i=this.schedule(void 0,u-f),n.add(i);return}l()}o(c,"emitWhenIdle"),r.subscribe(Oe(n,function(u){s=u,a=e.now(),i||(i=e.schedule(c,t),n.add(i))},function(){l(),n.complete()},void 0,function(){s=i=null}))})}o(Gc,"debounceTime");function zo(t,e){return e===void 0&&(e=Hr),t=t??aM,Ce(function(r,n){var i,s=!0;r.subscribe(Oe(n,function(a){var l=e(a);(s||!t(i,l))&&(s=!1,i=l,n.next(a))}))})}o(zo,"distinctUntilChanged");function aM(t,e){return t===e}o(aM,"defaultCompare");function Jc(t){t===void 0&&(t={});var e=t.connector,r=e===void 0?function(){return new At}:e,n=t.resetOnError,i=n===void 0?!0:n,s=t.resetOnComplete,a=s===void 0?!0:s,l=t.resetOnRefCountZero,c=l===void 0?!0:l;return function(u){var f,p,h,m=0,d=!1,g=!1,y=o(function(){p?.unsubscribe(),p=void 0},"cancelReset"),x=o(function(){y(),f=h=void 0,d=g=!1},"reset"),T=o(function(){var E=f;x(),E?.unsubscribe()},"resetAndUnsubscribe");return Ce(function(E,_){m++,!g&&!d&&y();var P=h=h??r();_.add(function(){m--,m===0&&!g&&!d&&(p=Bm(T,c))}),P.subscribe(_),!f&&m>0&&(f=new Fn({next:o(function(D){return P.next(D)},"next"),error:o(function(D){g=!0,y(),p=Bm(x,i,D),P.error(D)},"error"),complete:o(function(){d=!0,y(),p=Bm(x,a),P.complete()},"complete")}),je(E).subscribe(f))})(u)}}o(Jc,"share");function Bm(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];if(e===!0){t();return}if(e!==!1){var i=new Fn({next:o(function(){i.unsubscribe(),t()},"next")});return je(e.apply(void 0,Lt([],ft(r)))).subscribe(i)}}o(Bm,"handleReset");function Qc(t,e,r){var n,i,s,a,l=!1;return t&&typeof t=="object"?(n=t.bufferSize,a=n===void 0?1/0:n,i=t.windowTime,e=i===void 0?1/0:i,s=t.refCount,l=s===void 0?!1:s,r=t.scheduler):a=t??1/0,Jc({connector:o(function(){return new Fo(a,e,r)},"connector"),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:l})}o(Qc,"shareReplay");function Xc(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=qr(t);return Ce(function(n,i){(r?Hc(t,n,r):Hc(t,n)).subscribe(i)})}o(Xc,"startWith");function Wo(t){return Ce(function(e,r){je(t).subscribe(Oe(r,function(){return r.complete()},Wr)),!r.closed&&e.subscribe(r)})}o(Wo,"takeUntil");function Zc(t,e){return Ce(function(r,n){var i=e??{},s=i.leading,a=s===void 0?!0:s,l=i.trailing,c=l===void 0?!1:l,u=!1,f=null,p=null,h=!1,m=o(function(){p?.unsubscribe(),p=null,c&&(y(),h&&n.complete())},"endThrottling"),d=o(function(){p=null,h&&n.complete()},"cleanupThrottling"),g=o(function(x){return p=je(t(x)).subscribe(Oe(n,m,d))},"startThrottle"),y=o(function(){if(u){u=!1;var x=f;f=null,n.next(x),!h&&g(x)}},"send");r.subscribe(Oe(n,function(x){u=!0,f=x,!(p&&!p.closed)&&(a?y():g(x))},function(){h=!0,!(c&&u&&p&&!p.closed)&&n.complete()}))})}o(Zc,"throttle");function eu(t,e,r){e===void 0&&(e=Ur);var n=Ca(t,e);return Zc(function(){return n},r)}o(eu,"throttleTime");var zI={buffer:qc,bufferCount:Yc,bufferTime:Vc,debounce:Kc,debounceTime:Gc,filter:Uc,map:Vr,startWith:Xc,takeUntil:Wo,throttleTime:eu};var jm=class{static{o(this,"Observablemap")}constructor(){this.observableEventEmitterBundleArray=new Array,this.observableEventTargetBundleArray=new Array}getSubjectForEmitterEvent(e,r){let n=this.observableEventEmitterBundleArray.find(i=>i.eventRef===e&&i.event===r);if(n)return n.subject;{let i=_i(e,r),s=new At;i.subscribe(s);let a={subject:s,eventRef:e,event:r};return this.observableEventEmitterBundleArray.push(a),a.subject}}getSubjectForEventTarget(e,r){let n=this.observableEventTargetBundleArray.find(i=>i.eventRef===e&&i.event===r);if(n)return n.subject;{let s={subject:new At,eventRef:e,event:r};return this.observableEventTargetBundleArray.push(s),s.subject}}};var zm=class{static{o(this,"ObservableIntake")}constructor(){this.observableFunctions={next:o(e=>{},"next"),complete:o(e=>{},"complete")},this.buffered=!1,this.payloadBuffer=[],this.observable=new Se(e=>{this.observableFunctions.next=r=>e.next(r),this.observableFunctions.complete=()=>(this.completedDeffered.resolve(),e.complete())}),this.completedDeffered=te.defer(),this.completed=this.completedDeffered.promise}setObservable(e){this.observable=e}push(e){this.buffered?this.payloadBuffer.push(e):this.internalPush(e)}pushMany(e){for(let r of e)this.push(r)}setGenerator(e){this.generator=e}makeBuffered(){this.buffered=!0}subscribe(...e){return this.observable.subscribe(...e)}request(e){if(e!==0)for(let r=0;r!==e;r++)if(this.payloadBuffer.length>0)this.internalPush(this.payloadBuffer.shift());else{if(!this.generator)throw new Error("Cannot request an unbuffered value before setting a generator");let n=this.generator.next();this.internalPush(n.value)}}signalComplete(){this.observableFunctions.complete()}internalPush(e){this.observableFunctions.next(e)}};function WI(t){return new Se(e=>{let r=o(()=>t.pause(),"pauseStream"),n=o(()=>process.nextTick(()=>t.resume()),"resumeStream"),i=o(s=>{r(),e.next(s),n()},"onData");return t.on("data",i),t.on("error",s=>e.error(s)),t.on("end",()=>e.complete()),t.on("close",()=>e.complete()),()=>{t.removeListener("data",i),t.removeListener("error",e.error),t.removeListener("end",e.complete),t.removeListener("close",e.complete)}})}o(WI,"fromStreamWithBackpressure");var Wi={};se(Wi,{CronJob:()=>Ha,CronManager:()=>td,ExtendedDate:()=>nd,HrtMeasurement:()=>id,Interval:()=>od,TimeStamp:()=>hs,Timer:()=>sd,getMilliSecondsAsHumanReadableAgoTime:()=>bP,getMilliSecondsAsHumanReadableString:()=>xP,getMilliSecondsFromUnits:()=>rd,units:()=>Jn});var Na={};se(Na,{Cron:()=>aw,CronDate:()=>Ze,CronPattern:()=>tu,scheduledJobs:()=>Uo});function Oa(t){return Date.UTC(t.y,t.m-1,t.d,t.h,t.i,t.s)}o(Oa,"T");function Wm(t,e){return t.y===e.y&&t.m===e.m&&t.d===e.d&&t.h===e.h&&t.i===e.i&&t.s===e.s}o(Wm,"D");function HI(t,e){let r=new Date(Date.parse(t));if(isNaN(r))throw new Error("Invalid ISO8601 passed to timezone parser.");let n=t.substring(9);return n.includes("Z")||n.includes("+")||n.includes("-")?Hm(r.getUTCFullYear(),r.getUTCMonth()+1,r.getUTCDate(),r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),"Etc/UTC"):Hm(r.getFullYear(),r.getMonth()+1,r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),e)}o(HI,"A");function rw(t,e,r){return nw(HI(t,e),r)}o(rw,"v");function nw(t,e){let r=new Date(Oa(t)),n=Ma(r,t.tz),i=Oa(t),s=Oa(n),a=i-s,l=new Date(r.getTime()+a),c=Ma(l,t.tz);if(Wm(c,t)){let p=new Date(l.getTime()-36e5),h=Ma(p,t.tz);return Wm(h,t)?p:l}let u=new Date(l.getTime()+Oa(t)-Oa(c)),f=Ma(u,t.tz);if(Wm(f,t))return u;if(e)throw new Error("Invalid date passed to fromTZ()");return l.getTime()>u.getTime()?l:u}o(nw,"k");function Ma(t,e){let r,n;try{r=new Intl.DateTimeFormat("en-US",{timeZone:e,year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1}),n=r.formatToParts(t)}catch(s){let a=s instanceof Error?s.message:String(s);throw new RangeError(`toTZ: Invalid timezone '${e}' or date. Please provide a valid IANA timezone (e.g., 'America/New_York', 'Europe/Stockholm'). Original error: ${a}`)}let i={year:0,month:0,day:0,hour:0,minute:0,second:0};for(let s of n)(s.type==="year"||s.type==="month"||s.type==="day"||s.type==="hour"||s.type==="minute"||s.type==="second")&&(i[s.type]=parseInt(s.value,10));if(isNaN(i.year)||isNaN(i.month)||isNaN(i.day)||isNaN(i.hour)||isNaN(i.minute)||isNaN(i.second))throw new Error(`toTZ: Failed to parse all date components from timezone '${e}'. This may indicate an invalid date or timezone configuration. Parsed components: ${JSON.stringify(i)}`);return i.hour===24&&(i.hour=0),{y:i.year,m:i.month,d:i.day,h:i.hour,i:i.minute,s:i.second,tz:e}}o(Ma,"g");function Hm(t,e,r,n,i,s,a){return{y:t,m:e,d:r,h:n,i,s,tz:a}}o(Hm,"b");var iw=[1,2,4,8,16],tu=class{static{o(this,"C")}pattern;timezone;mode;alternativeWeekdays;sloppyRanges;second;minute;hour;day;month;dayOfWeek;year;lastDayOfMonth;lastWeekday;nearestWeekdays;starDOM;starDOW;starYear;useAndLogic;constructor(t,e,r){this.pattern=t,this.timezone=e,this.mode=r?.mode??"auto",this.alternativeWeekdays=r?.alternativeWeekdays??!1,this.sloppyRanges=r?.sloppyRanges??!1,this.second=Array(60).fill(0),this.minute=Array(60).fill(0),this.hour=Array(24).fill(0),this.day=Array(31).fill(0),this.month=Array(12).fill(0),this.dayOfWeek=Array(7).fill(0),this.year=Array(1e4).fill(0),this.lastDayOfMonth=!1,this.lastWeekday=!1,this.nearestWeekdays=Array(31).fill(0),this.starDOM=!1,this.starDOW=!1,this.starYear=!1,this.useAndLogic=!1,this.parse()}parse(){if(!(typeof this.pattern=="string"||this.pattern instanceof String))throw new TypeError("CronPattern: Pattern has to be of type string.");this.pattern.indexOf("@")>=0&&(this.pattern=this.handleNicknames(this.pattern).trim());let t=this.pattern.match(/\S+/g)||[""],e=t.length;if(t.length<5||t.length>7)throw new TypeError("CronPattern: invalid configuration format ('"+this.pattern+"'), exactly five, six, or seven space separated parts are required.");if(this.mode!=="auto"){let n;switch(this.mode){case"5-part":n=5;break;case"6-part":n=6;break;case"7-part":n=7;break;case"5-or-6-parts":n=[5,6];break;case"6-or-7-parts":n=[6,7];break;default:n=0}if(!(Array.isArray(n)?n.includes(e):e===n)){let i=Array.isArray(n)?n.join(" or "):n.toString();throw new TypeError(`CronPattern: mode '${this.mode}' requires exactly ${i} parts, but pattern '${this.pattern}' has ${e} parts.`)}}if(t.length===5&&t.unshift("0"),t.length===6&&t.push("*"),t[3].toUpperCase()==="LW"?(this.lastWeekday=!0,t[3]=""):t[3].toUpperCase().indexOf("L")>=0&&(t[3]=t[3].replace(/L/gi,""),this.lastDayOfMonth=!0),t[3]=="*"&&(this.starDOM=!0),t[6]=="*"&&(this.starYear=!0),t[4].length>=3&&(t[4]=this.replaceAlphaMonths(t[4])),t[5].length>=3&&(t[5]=this.alternativeWeekdays?this.replaceAlphaDaysQuartz(t[5]):this.replaceAlphaDays(t[5])),t[5].startsWith("+")&&(this.useAndLogic=!0,t[5]=t[5].substring(1),t[5]===""))throw new TypeError("CronPattern: Day-of-week field cannot be empty after '+' modifier.");switch(t[5]=="*"&&(this.starDOW=!0),this.pattern.indexOf("?")>=0&&(t[0]=t[0].replace(/\?/g,"*"),t[1]=t[1].replace(/\?/g,"*"),t[2]=t[2].replace(/\?/g,"*"),t[3]=t[3].replace(/\?/g,"*"),t[4]=t[4].replace(/\?/g,"*"),t[5]=t[5].replace(/\?/g,"*"),t[6]&&(t[6]=t[6].replace(/\?/g,"*"))),this.mode){case"5-part":t[0]="0",t[6]="*";break;case"6-part":t[6]="*";break;case"5-or-6-parts":t[6]="*";break;case"6-or-7-parts":break;case"7-part":case"auto":break}this.throwAtIllegalCharacters(t),this.partToArray("second",t[0],0,1),this.partToArray("minute",t[1],0,1),this.partToArray("hour",t[2],0,1),this.partToArray("day",t[3],-1,1),this.partToArray("month",t[4],-1,1);let r=this.alternativeWeekdays?-1:0;this.partToArray("dayOfWeek",t[5],r,63),this.partToArray("year",t[6],0,1),!this.alternativeWeekdays&&this.dayOfWeek[7]&&(this.dayOfWeek[0]=this.dayOfWeek[7])}partToArray(t,e,r,n){let i=this[t],s=t==="day"&&this.lastDayOfMonth,a=t==="day"&&this.lastWeekday;if(e===""&&!s&&!a)throw new TypeError("CronPattern: configuration entry "+t+" ("+e+") is empty, check for trailing spaces.");if(e==="*")return i.fill(n);let l=e.split(",");if(l.length>1)for(let c=0;c<l.length;c++)this.partToArray(t,l[c],r,n);else e.indexOf("-")!==-1&&e.indexOf("/")!==-1?this.handleRangeWithStepping(e,t,r,n):e.indexOf("-")!==-1?this.handleRange(e,t,r,n):e.indexOf("/")!==-1?this.handleStepping(e,t,r,n):e!==""&&this.handleNumber(e,t,r,n)}throwAtIllegalCharacters(t){for(let e=0;e<t.length;e++)if((e===3?/[^/*0-9,\-WwLl]+/:e===5?/[^/*0-9,\-#Ll]+/:/[^/*0-9,\-]+/).test(t[e]))throw new TypeError("CronPattern: configuration entry "+e+" ("+t[e]+") contains illegal characters.")}handleNumber(t,e,r,n){let i=this.extractNth(t,e),s=t.toUpperCase().includes("W");if(e!=="day"&&s)throw new TypeError("CronPattern: Nearest weekday modifier (W) only allowed in day-of-month.");s&&(e="nearestWeekdays");let a=parseInt(i[0],10)+r;if(isNaN(a))throw new TypeError("CronPattern: "+e+" is not a number: '"+t+"'");this.setPart(e,a,i[1]||n)}setPart(t,e,r){if(!Object.prototype.hasOwnProperty.call(this,t))throw new TypeError("CronPattern: Invalid part specified: "+t);if(t==="dayOfWeek"){if(e===7&&(e=0),e<0||e>6)throw new RangeError("CronPattern: Invalid value for dayOfWeek: "+e);this.setNthWeekdayOfMonth(e,r);return}if(t==="second"||t==="minute"){if(e<0||e>=60)throw new RangeError("CronPattern: Invalid value for "+t+": "+e)}else if(t==="hour"){if(e<0||e>=24)throw new RangeError("CronPattern: Invalid value for "+t+": "+e)}else if(t==="day"||t==="nearestWeekdays"){if(e<0||e>=31)throw new RangeError("CronPattern: Invalid value for "+t+": "+e)}else if(t==="month"){if(e<0||e>=12)throw new RangeError("CronPattern: Invalid value for "+t+": "+e)}else if(t==="year"&&(e<1||e>=1e4))throw new RangeError("CronPattern: Invalid value for "+t+": "+e+" (supported range: 1-9999)");this[t][e]=r}validateNotNaN(t,e){if(isNaN(t))throw new TypeError(e)}validateRange(t,e,r,n,i){if(t>e)throw new TypeError("CronPattern: From value is larger than to value: '"+i+"'");if(r!==void 0){if(r===0)throw new TypeError("CronPattern: Syntax error, illegal stepping: 0");if(r>this[n].length)throw new TypeError("CronPattern: Syntax error, steps cannot be greater than maximum value of part ("+this[n].length+")")}}handleRangeWithStepping(t,e,r,n){if(t.toUpperCase().includes("W"))throw new TypeError("CronPattern: Syntax error, W is not allowed in ranges with stepping.");let i=this.extractNth(t,e),s=i[0].match(/^(\d+)-(\d+)\/(\d+)$/);if(s===null)throw new TypeError("CronPattern: Syntax error, illegal range with stepping: '"+t+"'");let[,a,l,c]=s,u=parseInt(a,10)+r,f=parseInt(l,10)+r,p=parseInt(c,10);this.validateNotNaN(u,"CronPattern: Syntax error, illegal lower range (NaN)"),this.validateNotNaN(f,"CronPattern: Syntax error, illegal upper range (NaN)"),this.validateNotNaN(p,"CronPattern: Syntax error, illegal stepping: (NaN)"),this.validateRange(u,f,p,e,t);for(let h=u;h<=f;h+=p)this.setPart(e,h,i[1]||n)}extractNth(t,e){let r=t,n;if(r.includes("#")){if(e!=="dayOfWeek")throw new Error("CronPattern: nth (#) only allowed in day-of-week field");n=r.split("#")[1],r=r.split("#")[0]}else if(r.toUpperCase().endsWith("L")){if(e!=="dayOfWeek")throw new Error("CronPattern: L modifier only allowed in day-of-week field (use L alone for day-of-month)");n="L",r=r.slice(0,-1)}return[r,n]}handleRange(t,e,r,n){if(t.toUpperCase().includes("W"))throw new TypeError("CronPattern: Syntax error, W is not allowed in a range.");let i=this.extractNth(t,e),s=i[0].split("-");if(s.length!==2)throw new TypeError("CronPattern: Syntax error, illegal range: '"+t+"'");let a=parseInt(s[0],10)+r,l=parseInt(s[1],10)+r;this.validateNotNaN(a,"CronPattern: Syntax error, illegal lower range (NaN)"),this.validateNotNaN(l,"CronPattern: Syntax error, illegal upper range (NaN)"),this.validateRange(a,l,void 0,e,t);for(let c=a;c<=l;c++)this.setPart(e,c,i[1]||n)}handleStepping(t,e,r,n){if(t.toUpperCase().includes("W"))throw new TypeError("CronPattern: Syntax error, W is not allowed in parts with stepping.");let i=this.extractNth(t,e),s=i[0].split("/");if(s.length!==2)throw new TypeError("CronPattern: Syntax error, illegal stepping: '"+t+"'");if(this.sloppyRanges)s[0]===""&&(s[0]="*");else{if(s[0]==="")throw new TypeError("CronPattern: Syntax error, stepping with missing prefix ('"+t+"') is not allowed. Use wildcard (*/step) or range (min-max/step) instead.");if(s[0]!=="*")throw new TypeError("CronPattern: Syntax error, stepping with numeric prefix ('"+t+"') is not allowed. Use wildcard (*/step) or range (min-max/step) instead.")}let a=0;s[0]!=="*"&&(a=parseInt(s[0],10)+r);let l=parseInt(s[1],10);this.validateNotNaN(l,"CronPattern: Syntax error, illegal stepping: (NaN)"),this.validateRange(0,this[e].length-1,l,e,t);for(let c=a;c<this[e].length;c+=l)this.setPart(e,c,i[1]||n)}replaceAlphaDays(t){return t.replace(/-sun/gi,"-7").replace(/sun/gi,"0").replace(/mon/gi,"1").replace(/tue/gi,"2").replace(/wed/gi,"3").replace(/thu/gi,"4").replace(/fri/gi,"5").replace(/sat/gi,"6")}replaceAlphaDaysQuartz(t){return t.replace(/sun/gi,"1").replace(/mon/gi,"2").replace(/tue/gi,"3").replace(/wed/gi,"4").replace(/thu/gi,"5").replace(/fri/gi,"6").replace(/sat/gi,"7")}replaceAlphaMonths(t){return t.replace(/jan/gi,"1").replace(/feb/gi,"2").replace(/mar/gi,"3").replace(/apr/gi,"4").replace(/may/gi,"5").replace(/jun/gi,"6").replace(/jul/gi,"7").replace(/aug/gi,"8").replace(/sep/gi,"9").replace(/oct/gi,"10").replace(/nov/gi,"11").replace(/dec/gi,"12")}handleNicknames(t){let e=t.trim().toLowerCase();if(e==="@yearly"||e==="@annually")return"0 0 1 1 *";if(e==="@monthly")return"0 0 1 * *";if(e==="@weekly")return"0 0 * * 0";if(e==="@daily"||e==="@midnight")return"0 0 * * *";if(e==="@hourly")return"0 * * * *";if(e==="@reboot")throw new TypeError("CronPattern: @reboot is not supported in this environment. This is an event-based trigger that requires system startup detection.");return t}setNthWeekdayOfMonth(t,e){if(typeof e!="number"&&e.toUpperCase()==="L")this.dayOfWeek[t]=this.dayOfWeek[t]|32;else if(e===63)this.dayOfWeek[t]=63;else if(e<6&&e>0)this.dayOfWeek[t]=this.dayOfWeek[t]|iw[e-1];else throw new TypeError(`CronPattern: nth weekday out of range, should be 1-5 or L. Value: ${e}, Type: ${typeof e}`)}},Um=[31,28,31,30,31,30,31,31,30,31,30,31],Fe=[["month","year",0],["day","month",-1],["hour","day",0],["minute","hour",0],["second","minute",0]],Ze=class sw{static{o(this,"s")}tz;ms;second;minute;hour;day;month;year;constructor(e,r){if(this.tz=r,e&&e instanceof Date)if(!isNaN(e))this.fromDate(e);else throw new TypeError("CronDate: Invalid date passed to CronDate constructor");else if(e==null)this.fromDate(new Date);else if(e&&typeof e=="string")this.fromString(e);else if(e instanceof sw)this.fromCronDate(e);else throw new TypeError("CronDate: Invalid type ("+typeof e+") passed to CronDate constructor")}getLastDayOfMonth(e,r){return r!==1?Um[r]:new Date(Date.UTC(e,r+1,0)).getUTCDate()}getLastWeekday(e,r){let n=this.getLastDayOfMonth(e,r),i=new Date(Date.UTC(e,r,n)).getUTCDay();return i===0?n-2:i===6?n-1:n}getNearestWeekday(e,r,n){let i=this.getLastDayOfMonth(e,r);if(n>i)return-1;let s=new Date(Date.UTC(e,r,n)).getUTCDay();return s===0?n===i?n-2:n+1:s===6?n===1?n+2:n-1:n}isNthWeekdayOfMonth(e,r,n,i){let s=new Date(Date.UTC(e,r,n)).getUTCDay(),a=0;for(let l=1;l<=n;l++)new Date(Date.UTC(e,r,l)).getUTCDay()===s&&a++;if(i&63&&iw[a-1]&i)return!0;if(i&32){let l=this.getLastDayOfMonth(e,r);for(let c=n+1;c<=l;c++)if(new Date(Date.UTC(e,r,c)).getUTCDay()===s)return!1;return!0}return!1}fromDate(e){if(this.tz!==void 0)if(typeof this.tz=="number")this.ms=e.getUTCMilliseconds(),this.second=e.getUTCSeconds(),this.minute=e.getUTCMinutes()+this.tz,this.hour=e.getUTCHours(),this.day=e.getUTCDate(),this.month=e.getUTCMonth(),this.year=e.getUTCFullYear(),this.apply();else try{let r=Ma(e,this.tz);this.ms=e.getMilliseconds(),this.second=r.s,this.minute=r.i,this.hour=r.h,this.day=r.d,this.month=r.m-1,this.year=r.y}catch(r){let n=r instanceof Error?r.message:String(r);throw new TypeError(`CronDate: Failed to convert date to timezone '${this.tz}'. This may happen with invalid timezone names or dates. Original error: ${n}`)}else this.ms=e.getMilliseconds(),this.second=e.getSeconds(),this.minute=e.getMinutes(),this.hour=e.getHours(),this.day=e.getDate(),this.month=e.getMonth(),this.year=e.getFullYear()}fromCronDate(e){this.tz=e.tz,this.year=e.year,this.month=e.month,this.day=e.day,this.hour=e.hour,this.minute=e.minute,this.second=e.second,this.ms=e.ms}apply(){if(this.month>11||this.month<0||this.day>Um[this.month]||this.day<1||this.hour>59||this.minute>59||this.second>59||this.hour<0||this.minute<0||this.second<0){let e=new Date(Date.UTC(this.year,this.month,this.day,this.hour,this.minute,this.second,this.ms));return this.ms=e.getUTCMilliseconds(),this.second=e.getUTCSeconds(),this.minute=e.getUTCMinutes(),this.hour=e.getUTCHours(),this.day=e.getUTCDate(),this.month=e.getUTCMonth(),this.year=e.getUTCFullYear(),!0}else return!1}fromString(e){if(typeof this.tz=="number"){let r=rw(e);this.ms=r.getUTCMilliseconds(),this.second=r.getUTCSeconds(),this.minute=r.getUTCMinutes(),this.hour=r.getUTCHours(),this.day=r.getUTCDate(),this.month=r.getUTCMonth(),this.year=r.getUTCFullYear(),this.apply()}else return this.fromDate(rw(e,this.tz))}findNext(e,r,n,i){return this._findMatch(e,r,n,i,1)}_findMatch(e,r,n,i,s){let a=this[r],l;n.lastDayOfMonth&&(l=this.getLastDayOfMonth(this.year,this.month));let c=!n.starDOW&&r=="day"?new Date(Date.UTC(this.year,this.month,1,0,0,0,0)).getUTCDay():void 0,u=this[r]+i,f=s===1?p=>p<n[r].length:p=>p>=0;for(let p=u;f(p);p+=s){let h=n[r][p];if(r==="day"&&!h){for(let m=0;m<n.nearestWeekdays.length;m++)if(n.nearestWeekdays[m]){let d=this.getNearestWeekday(this.year,this.month,m-i);if(d===-1)continue;if(d===p-i){h=1;break}}}if(r==="day"&&n.lastWeekday){let m=this.getLastWeekday(this.year,this.month);p-i===m&&(h=1)}if(r==="day"&&n.lastDayOfMonth&&p-i==l&&(h=1),r==="day"&&!n.starDOW){let m=n.dayOfWeek[(c+(p-i-1))%7];if(m&&m&63)m=this.isNthWeekdayOfMonth(this.year,this.month,p-i,m)?1:0;else if(m)throw new Error(`CronDate: Invalid value for dayOfWeek encountered. ${m}`);n.useAndLogic?h=h&&m:!e.domAndDow&&!n.starDOM?h=h||m:h=h&&m}if(h)return this[r]=p-i,a!==this[r]?2:1}return 3}recurse(e,r,n){if(n===0&&!e.starYear){if(this.year>=0&&this.year<e.year.length&&e.year[this.year]===0){let s=-1;for(let a=this.year+1;a<e.year.length&&a<1e4;a++)if(e.year[a]===1){s=a;break}if(s===-1)return null;this.year=s,this.month=0,this.day=1,this.hour=0,this.minute=0,this.second=0,this.ms=0}if(this.year>=1e4)return null}let i=this.findNext(r,Fe[n][0],e,Fe[n][2]);if(i>1){let s=n+1;for(;s<Fe.length;)this[Fe[s][0]]=-Fe[s][2],s++;if(i===3){if(this[Fe[n][1]]++,this[Fe[n][0]]=-Fe[n][2],this.apply(),n===0&&!e.starYear){for(;this.year>=0&&this.year<e.year.length&&e.year[this.year]===0&&this.year<1e4;)this.year++;if(this.year>=1e4||this.year>=e.year.length)return null}return this.recurse(e,r,0)}else if(this.apply())return this.recurse(e,r,n-1)}return n+=1,n>=Fe.length?this:(e.starYear?this.year>=3e3:this.year>=1e4)?null:this.recurse(e,r,n)}increment(e,r,n){return this.second+=r.interval!==void 0&&r.interval>1&&n?r.interval:1,this.ms=0,this.apply(),this.recurse(e,r,0)}decrement(e,r){return this.second-=r.interval!==void 0&&r.interval>1?r.interval:1,this.ms=0,this.apply(),this.recurseBackward(e,r,0,0)}recurseBackward(e,r,n,i=0){if(i>1e4)return null;if(n===0&&!e.starYear){if(this.year>=0&&this.year<e.year.length&&e.year[this.year]===0){let a=-1;for(let l=this.year-1;l>=0;l--)if(e.year[l]===1){a=l;break}if(a===-1)return null;this.year=a,this.month=11,this.day=31,this.hour=23,this.minute=59,this.second=59,this.ms=0}if(this.year<0)return null}let s=this.findPrevious(r,Fe[n][0],e,Fe[n][2]);if(s>1){let a=n+1;for(;a<Fe.length;){let l=Fe[a][0],c=Fe[a][2],u=this.getMaxPatternValue(l,e,c);this[l]=u,a++}if(s===3){if(this[Fe[n][1]]--,n===0){let f=this.getLastDayOfMonth(this.year,this.month);this.day>f&&(this.day=f)}if(n===1)if(this.day<=0)this.day=1;else{let f=this.year,p=this.month;for(;p<0;)p+=12,f--;for(;p>11;)p-=12,f++;let h=p!==1?Um[p]:new Date(Date.UTC(f,p+1,0)).getUTCDate();this.day>h&&(this.day=h)}this.apply();let l=Fe[n][0],c=Fe[n][2],u=this.getMaxPatternValue(l,e,c);if(l==="day"){let f=this.getLastDayOfMonth(this.year,this.month);this[l]=Math.min(u,f)}else this[l]=u;if(this.apply(),n===0){let f=Fe[1][2],p=this.getMaxPatternValue("day",e,f),h=this.getLastDayOfMonth(this.year,this.month),m=Math.min(p,h);m!==this.day&&(this.day=m,this.hour=this.getMaxPatternValue("hour",e,Fe[2][2]),this.minute=this.getMaxPatternValue("minute",e,Fe[3][2]),this.second=this.getMaxPatternValue("second",e,Fe[4][2]))}if(n===0&&!e.starYear){for(;this.year>=0&&this.year<e.year.length&&e.year[this.year]===0;)this.year--;if(this.year<0)return null}return this.recurseBackward(e,r,0,i+1)}else if(this.apply())return this.recurseBackward(e,r,n-1,i+1)}return n+=1,n>=Fe.length?this:this.year<0?null:this.recurseBackward(e,r,n,i+1)}getMaxPatternValue(e,r,n){if(e==="day"&&r.lastDayOfMonth)return this.getLastDayOfMonth(this.year,this.month);if(e==="day"&&!r.starDOW)return this.getLastDayOfMonth(this.year,this.month);for(let i=r[e].length-1;i>=0;i--)if(r[e][i])return i-n;return r[e].length-1-n}findPrevious(e,r,n,i){return this._findMatch(e,r,n,i,-1)}getDate(e){return e||this.tz===void 0?new Date(this.year,this.month,this.day,this.hour,this.minute,this.second,this.ms):typeof this.tz=="number"?new Date(Date.UTC(this.year,this.month,this.day,this.hour,this.minute-this.tz,this.second,this.ms)):nw(Hm(this.year,this.month+1,this.day,this.hour,this.minute,this.second,this.tz),!1)}getTime(){return this.getDate(!1).getTime()}match(e,r){if(!e.starYear&&(this.year<0||this.year>=e.year.length||e.year[this.year]===0))return!1;for(let n=0;n<Fe.length;n++){let i=Fe[n][0],s=Fe[n][2],a=this[i];if(a+s<0||a+s>=e[i].length)return!1;let l=e[i][a+s];if(i==="day"){if(!l){for(let c=0;c<e.nearestWeekdays.length;c++)if(e.nearestWeekdays[c]){let u=this.getNearestWeekday(this.year,this.month,c-s);if(u!==-1&&u===a){l=1;break}}}if(e.lastWeekday){let c=this.getLastWeekday(this.year,this.month);a===c&&(l=1)}if(e.lastDayOfMonth){let c=this.getLastDayOfMonth(this.year,this.month);a===c&&(l=1)}if(!e.starDOW){let c=new Date(Date.UTC(this.year,this.month,1,0,0,0,0)).getUTCDay(),u=e.dayOfWeek[(c+(a-1))%7];u&&u&63&&(u=this.isNthWeekdayOfMonth(this.year,this.month,a,u)?1:0),e.useAndLogic?l=l&&u:!r.domAndDow&&!e.starDOM?l=l||u:l=l&&u}}if(!l)return!1}return!0}};function UI(t){if(t===void 0&&(t={}),delete t.name,t.legacyMode!==void 0&&t.domAndDow===void 0?t.domAndDow=!t.legacyMode:t.domAndDow===void 0&&(t.domAndDow=!1),t.legacyMode=!t.domAndDow,t.paused=t.paused===void 0?!1:t.paused,t.maxRuns=t.maxRuns===void 0?1/0:t.maxRuns,t.catch=t.catch===void 0?!1:t.catch,t.interval=t.interval===void 0?0:parseInt(t.interval.toString(),10),t.utcOffset=t.utcOffset===void 0?void 0:parseInt(t.utcOffset.toString(),10),t.dayOffset=t.dayOffset===void 0?0:parseInt(t.dayOffset.toString(),10),t.unref=t.unref===void 0?!1:t.unref,t.mode=t.mode===void 0?"auto":t.mode,t.alternativeWeekdays=t.alternativeWeekdays===void 0?!1:t.alternativeWeekdays,t.sloppyRanges=t.sloppyRanges===void 0?!1:t.sloppyRanges,!["auto","5-part","6-part","7-part","5-or-6-parts","6-or-7-parts"].includes(t.mode))throw new Error("CronOptions: mode must be one of 'auto', '5-part', '6-part', '7-part', '5-or-6-parts', or '6-or-7-parts'.");if(t.startAt&&(t.startAt=new Ze(t.startAt,t.timezone)),t.stopAt&&(t.stopAt=new Ze(t.stopAt,t.timezone)),t.interval!==null){if(isNaN(t.interval))throw new Error("CronOptions: Supplied value for interval is not a number");if(t.interval<0)throw new Error("CronOptions: Supplied value for interval can not be negative")}if(t.utcOffset!==void 0){if(isNaN(t.utcOffset))throw new Error("CronOptions: Invalid value passed for utcOffset, should be number representing minutes offset from UTC.");if(t.utcOffset<-870||t.utcOffset>870)throw new Error("CronOptions: utcOffset out of bounds.");if(t.utcOffset!==void 0&&t.timezone)throw new Error("CronOptions: Combining 'utcOffset' with 'timezone' is not allowed.")}if(t.unref!==!0&&t.unref!==!1)throw new Error("CronOptions: Unref should be either true, false or undefined(false).");if(t.dayOffset!==void 0&&t.dayOffset!==0&&isNaN(t.dayOffset))throw new Error("CronOptions: Invalid value passed for dayOffset, should be a number representing days to offset.");return t}o(UI,"R");function Ia(t){return Object.prototype.toString.call(t)==="[object Function]"||typeof t=="function"||t instanceof Function}o(Ia,"p");function qI(t){return Ia(t)}o(qI,"_");function YI(t){typeof Deno<"u"&&typeof Deno.unrefTimer<"u"?Deno.unrefTimer(t):t&&typeof t.unref<"u"&&t.unref()}o(YI,"x");var ow=30*1e3,Uo=[],aw=class{static{o(this,"E")}name;options;_states;fn;getTz(){return this.options.timezone||this.options.utcOffset}applyDayOffset(t){if(this.options.dayOffset!==void 0&&this.options.dayOffset!==0){let e=this.options.dayOffset*24*60*60*1e3;return new Date(t.getTime()+e)}return t}constructor(t,e,r){let n,i;if(Ia(e))i=e;else if(typeof e=="object")n=e;else if(e!==void 0)throw new Error("Cron: Invalid argument passed for optionsIn. Should be one of function, or object (options).");if(Ia(r))i=r;else if(typeof r=="object")n=r;else if(r!==void 0)throw new Error("Cron: Invalid argument passed for funcIn. Should be one of function, or object (options).");if(this.name=n?.name,this.options=UI(n),this._states={kill:!1,blocking:!1,previousRun:void 0,currentRun:void 0,once:void 0,currentTimeout:void 0,maxRuns:n?n.maxRuns:void 0,paused:n?n.paused:!1,pattern:new tu("* * * * *",void 0,{mode:"auto"})},t&&(t instanceof Date||typeof t=="string"&&t.indexOf(":")>0)?this._states.once=new Ze(t,this.getTz()):this._states.pattern=new tu(t,this.options.timezone,{mode:this.options.mode,alternativeWeekdays:this.options.alternativeWeekdays,sloppyRanges:this.options.sloppyRanges}),this.name){if(Uo.find(s=>s.name===this.name))throw new Error("Cron: Tried to initialize new named job '"+this.name+"', but name already taken.");Uo.push(this)}return i!==void 0&&qI(i)&&(this.fn=i,this.schedule()),this}nextRun(t){let e=this._next(t);return e?this.applyDayOffset(e.getDate(!1)):null}nextRuns(t,e){this._states.maxRuns!==void 0&&t>this._states.maxRuns&&(t=this._states.maxRuns);let r=e||this._states.currentRun||void 0;return this._enumerateRuns(t,r,"next")}previousRuns(t,e){return this._enumerateRuns(t,e||void 0,"previous")}_enumerateRuns(t,e,r){let n=[],i=e?new Ze(e,this.getTz()):null,s=r==="next"?this._next:this._previous;for(;t--;){let a=s.call(this,i);if(!a)break;let l=a.getDate(!1);n.push(this.applyDayOffset(l)),i=a}return n}match(t){if(this._states.once){let r=new Ze(t,this.getTz());r.ms=0;let n=new Ze(this._states.once,this.getTz());return n.ms=0,r.getTime()===n.getTime()}let e=new Ze(t,this.getTz());return e.ms=0,e.match(this._states.pattern,this.options)}getPattern(){if(!this._states.once)return this._states.pattern?this._states.pattern.pattern:void 0}getOnce(){return this._states.once?this._states.once.getDate():null}isRunning(){let t=this.nextRun(this._states.currentRun),e=!this._states.paused,r=this.fn!==void 0,n=!this._states.kill;return e&&r&&n&&t!==null}isStopped(){return this._states.kill}isBusy(){return this._states.blocking}currentRun(){return this._states.currentRun?this._states.currentRun.getDate():null}previousRun(){return this._states.previousRun?this._states.previousRun.getDate():null}msToNext(t){let e=this._next(t);return e?t instanceof Ze||t instanceof Date?e.getTime()-t.getTime():e.getTime()-new Ze(t).getTime():null}stop(){this._states.kill=!0,this._states.currentTimeout&&clearTimeout(this._states.currentTimeout);let t=Uo.indexOf(this);t>=0&&Uo.splice(t,1)}pause(){return this._states.paused=!0,!this._states.kill}resume(){return this._states.paused=!1,!this._states.kill}schedule(t){if(t&&this.fn)throw new Error("Cron: It is not allowed to schedule two functions using the same Croner instance.");t&&(this.fn=t);let e=this.msToNext(),r=this.nextRun(this._states.currentRun);return e==null||isNaN(e)||r===null?this:(e>ow&&(e=ow),this._states.currentTimeout=setTimeout(()=>this._checkTrigger(r),e),this._states.currentTimeout&&this.options.unref&&YI(this._states.currentTimeout),this)}async _trigger(t){this._states.blocking=!0,this._states.currentRun=new Ze(void 0,this.getTz());try{if(this.options.catch)try{this.fn!==void 0&&await this.fn(this,this.options.context)}catch(e){if(Ia(this.options.catch))try{this.options.catch(e,this)}catch{}}else this.fn!==void 0&&await this.fn(this,this.options.context)}finally{this._states.previousRun=new Ze(t,this.getTz()),this._states.blocking=!1}}async trigger(){await this._trigger()}runsLeft(){return this._states.maxRuns}_checkTrigger(t){let e=new Date,r=!this._states.paused&&e.getTime()>=t.getTime(),n=this._states.blocking&&this.options.protect;r&&!n?(this._states.maxRuns!==void 0&&this._states.maxRuns--,this._trigger()):r&&n&&Ia(this.options.protect)&&setTimeout(()=>this.options.protect(this),0),this.schedule()}_next(t){let e=!!(t||this._states.currentRun),r=!1;!t&&this.options.startAt&&this.options.interval&&([t,e]=this._calculatePreviousRun(t,e),r=!t),t=new Ze(t,this.getTz()),this.options.startAt&&t&&t.getTime()<this.options.startAt.getTime()&&(t=this.options.startAt);let n=this._states.once||new Ze(t,this.getTz());return!r&&n!==this._states.once&&(n=n.increment(this._states.pattern,this.options,e)),this._states.once&&this._states.once.getTime()<=t.getTime()||n===null||this._states.maxRuns!==void 0&&this._states.maxRuns<=0||this._states.kill||this.options.stopAt&&n.getTime()>=this.options.stopAt.getTime()?null:n}_previous(t){let e=new Ze(t,this.getTz());this.options.stopAt&&e.getTime()>this.options.stopAt.getTime()&&(e=this.options.stopAt);let r=new Ze(e,this.getTz());return this._states.once?this._states.once.getTime()<e.getTime()?this._states.once:null:(r=r.decrement(this._states.pattern,this.options),r===null||this.options.startAt&&r.getTime()<this.options.startAt.getTime()?null:r)}_calculatePreviousRun(t,e){let r=new Ze(void 0,this.getTz()),n=t;if(this.options.startAt.getTime()<=r.getTime()){n=this.options.startAt;let i=n.getTime()+this.options.interval*1e3;for(;i<=r.getTime();)n=new Ze(n,this.getTz()).increment(this._states.pattern,this.options,!0),i=n.getTime()+this.options.interval*1e3;e=!0}return n===null&&(n=void 0),[n,e]}};var za={};se(za,{add:()=>Bn,addBusinessDays:()=>fu,addDays:()=>et,addHours:()=>pu,addISOWeekYears:()=>mu,addMilliseconds:()=>jn,addMinutes:()=>Ko,addMonths:()=>Gr,addQuarters:()=>Go,addSeconds:()=>du,addWeeks:()=>zn,addYears:()=>gu,areIntervalsOverlapping:()=>pw,clamp:()=>hw,closestIndexTo:()=>bu,closestTo:()=>mw,compareAsc:()=>xt,compareDesc:()=>dw,constructFrom:()=>$,constructNow:()=>de,daysToWeeks:()=>gw,differenceInBusinessDays:()=>yw,differenceInCalendarDays:()=>st,differenceInCalendarISOWeekYears:()=>Su,differenceInCalendarISOWeeks:()=>xw,differenceInCalendarMonths:()=>Ri,differenceInCalendarQuarters:()=>Jo,differenceInCalendarWeeks:()=>Ai,differenceInCalendarYears:()=>Wn,differenceInDays:()=>Qo,differenceInHours:()=>Fi,differenceInISOWeekYears:()=>ww,differenceInMilliseconds:()=>Xo,differenceInMinutes:()=>$i,differenceInMonths:()=>Hn,differenceInQuarters:()=>Sw,differenceInSeconds:()=>Zr,differenceInWeeks:()=>vw,differenceInYears:()=>Tu,eachDayOfInterval:()=>Eu,eachHourOfInterval:()=>kw,eachMinuteOfInterval:()=>Tw,eachMonthOfInterval:()=>Ew,eachQuarterOfInterval:()=>Dw,eachWeekOfInterval:()=>Cw,eachWeekendOfInterval:()=>ts,eachWeekendOfMonth:()=>Ow,eachWeekendOfYear:()=>Mw,eachYearOfInterval:()=>Iw,endOfDay:()=>Zo,endOfDecade:()=>Nw,endOfHour:()=>Pw,endOfISOWeek:()=>_w,endOfISOWeekYear:()=>Lw,endOfMinute:()=>Rw,endOfMonth:()=>es,endOfQuarter:()=>Aw,endOfSecond:()=>Fw,endOfToday:()=>$w,endOfTomorrow:()=>Bw,endOfWeek:()=>Cu,endOfYear:()=>Du,endOfYesterday:()=>jw,format:()=>Aa,formatDate:()=>Aa,formatDistance:()=>Pu,formatDistanceStrict:()=>_u,formatDistanceToNow:()=>Qw,formatDistanceToNowStrict:()=>Xw,formatDuration:()=>Zw,formatISO:()=>e0,formatISO9075:()=>t0,formatISODuration:()=>r0,formatRFC3339:()=>n0,formatRFC7231:()=>i0,formatRelative:()=>o0,formatters:()=>La,fromUnixTime:()=>s0,getDate:()=>Lu,getDay:()=>Vn,getDayOfYear:()=>Mu,getDaysInMonth:()=>Ru,getDaysInYear:()=>a0,getDecade:()=>l0,getDefaultOptions:()=>Fu,getHours:()=>c0,getISODay:()=>$u,getISOWeek:()=>os,getISOWeekYear:()=>Mt,getISOWeeksInYear:()=>u0,getMilliseconds:()=>f0,getMinutes:()=>p0,getMonth:()=>h0,getOverlappingDaysInIntervals:()=>m0,getQuarter:()=>_a,getSeconds:()=>d0,getTime:()=>g0,getUnixTime:()=>y0,getWeek:()=>ss,getWeekOfMonth:()=>x0,getWeekYear:()=>qn,getWeeksInMonth:()=>b0,getYear:()=>w0,hoursToMilliseconds:()=>S0,hoursToMinutes:()=>v0,hoursToSeconds:()=>k0,interval:()=>T0,intervalToDuration:()=>E0,intlFormat:()=>D0,intlFormatDistance:()=>C0,isAfter:()=>O0,isBefore:()=>M0,isDate:()=>wu,isEqual:()=>I0,isExists:()=>N0,isFirstDayOfMonth:()=>P0,isFriday:()=>_0,isFuture:()=>L0,isLastDayOfMonth:()=>ku,isLeapYear:()=>Au,isMatch:()=>R0,isMonday:()=>A0,isPast:()=>F0,isSameDay:()=>Xr,isSameHour:()=>If,isSameISOWeek:()=>Nf,isSameISOWeekYear:()=>$0,isSameMinute:()=>Pf,isSameMonth:()=>_f,isSameQuarter:()=>Lf,isSameSecond:()=>Rf,isSameWeek:()=>us,isSameYear:()=>Af,isSaturday:()=>cu,isSunday:()=>uu,isThisHour:()=>B0,isThisISOWeek:()=>j0,isThisMinute:()=>z0,isThisMonth:()=>W0,isThisQuarter:()=>H0,isThisSecond:()=>U0,isThisWeek:()=>q0,isThisYear:()=>Y0,isThursday:()=>V0,isToday:()=>K0,isTomorrow:()=>G0,isTuesday:()=>J0,isValid:()=>ht,isWednesday:()=>Q0,isWeekend:()=>Jr,isWithinInterval:()=>X0,isYesterday:()=>Z0,lastDayOfDecade:()=>eS,lastDayOfISOWeek:()=>tS,lastDayOfISOWeekYear:()=>rS,lastDayOfMonth:()=>Bu,lastDayOfQuarter:()=>nS,lastDayOfWeek:()=>Ff,lastDayOfYear:()=>iS,lightFormat:()=>oS,lightFormatters:()=>Qt,longFormatters:()=>Yn,max:()=>yu,milliseconds:()=>sS,millisecondsToHours:()=>aS,millisecondsToMinutes:()=>lS,millisecondsToSeconds:()=>cS,min:()=>xu,minutesToHours:()=>uS,minutesToMilliseconds:()=>fS,minutesToSeconds:()=>pS,monthsToQuarters:()=>hS,monthsToYears:()=>mS,nextDay:()=>wt,nextFriday:()=>dS,nextMonday:()=>gS,nextSaturday:()=>yS,nextSunday:()=>xS,nextThursday:()=>bS,nextTuesday:()=>wS,nextWednesday:()=>SS,parse:()=>Mf,parseISO:()=>kS,parseJSON:()=>TS,parsers:()=>Of,previousDay:()=>St,previousFriday:()=>ES,previousMonday:()=>DS,previousSaturday:()=>CS,previousSunday:()=>OS,previousThursday:()=>MS,previousTuesday:()=>IS,previousWednesday:()=>NS,quartersToMonths:()=>PS,quartersToYears:()=>_S,roundToNearestHours:()=>LS,roundToNearestMinutes:()=>RS,secondsToHours:()=>AS,secondsToMilliseconds:()=>FS,secondsToMinutes:()=>$S,set:()=>BS,setDate:()=>jS,setDay:()=>Kn,setDayOfYear:()=>zS,setDefaultOptions:()=>WS,setHours:()=>HS,setISODay:()=>pf,setISOWeek:()=>of,setISOWeekYear:()=>hu,setMilliseconds:()=>US,setMinutes:()=>qS,setMonth:()=>fs,setQuarter:()=>YS,setSeconds:()=>VS,setWeek:()=>rf,setWeekYear:()=>KS,setYear:()=>GS,startOfDay:()=>Qr,startOfDecade:()=>JS,startOfHour:()=>Fa,startOfISOWeek:()=>Ge,startOfISOWeekYear:()=>Jt,startOfMinute:()=>$a,startOfMonth:()=>Un,startOfQuarter:()=>en,startOfSecond:()=>Ba,startOfToday:()=>QS,startOfTomorrow:()=>XS,startOfWeek:()=>Le,startOfWeekYear:()=>Bi,startOfYear:()=>rs,startOfYesterday:()=>ZS,sub:()=>ev,subBusinessDays:()=>tv,subDays:()=>Gn,subHours:()=>rv,subISOWeekYears:()=>vu,subMilliseconds:()=>nv,subMinutes:()=>iv,subMonths:()=>Bf,subQuarters:()=>ov,subSeconds:()=>sv,subWeeks:()=>av,subYears:()=>lv,toDate:()=>b,transpose:()=>ju,weeksToDays:()=>cv,yearsToDays:()=>uv,yearsToMonths:()=>fv,yearsToQuarters:()=>pv});var nu=7,Pa=365.2425,VI=Math.pow(10,8)*24*60*60*1e3,$K=-VI,Kr=6048e5,iu=864e5,yt=6e4,Gt=36e5,qo=1e3,qm=525600,$n=43200,Yo=1440,ou=60,su=3,au=12,lu=4,Li=3600,Vo=60,ru=Li*24,lw=ru*7,Ym=ru*365.2425,Vm=Ym/12,cw=Vm*3,Km=Symbol.for("constructDateFrom");function $(t,e){return typeof t=="function"?t(e):t&&typeof t=="object"&&Km in t?t[Km](e):t instanceof Date?new t.constructor(e):new Date(e)}o($,"constructFrom");var zK=$;function b(t,e){return $(e||t,t)}o(b,"toDate");var qK=b;function et(t,e,r){let n=b(t,r?.in);return isNaN(e)?$(r?.in||t,NaN):(e&&n.setDate(n.getDate()+e),n)}o(et,"addDays");var JK=et;function Gr(t,e,r){let n=b(t,r?.in);if(isNaN(e))return $(r?.in||t,NaN);if(!e)return n;let i=n.getDate(),s=$(r?.in||t,n.getTime());s.setMonth(n.getMonth()+e+1,0);let a=s.getDate();return i>=a?s:(n.setFullYear(s.getFullYear(),s.getMonth(),i),n)}o(Gr,"addMonths");var t7=Gr;function Bn(t,e,r){let{years:n=0,months:i=0,weeks:s=0,days:a=0,hours:l=0,minutes:c=0,seconds:u=0}=e,f=b(t,r?.in),p=i||n?Gr(f,i+n*12):f,h=a||s?et(p,a+s*7):p,m=c+l*60,g=(u+m*60)*1e3;return $(r?.in||t,+h+g)}o(Bn,"add");var l7=Bn;function cu(t,e){return b(t,e?.in).getDay()===6}o(cu,"isSaturday");var p7=cu;function uu(t,e){return b(t,e?.in).getDay()===0}o(uu,"isSunday");var g7=uu;function Jr(t,e){let r=b(t,e?.in).getDay();return r===0||r===6}o(Jr,"isWeekend");var w7=Jr;function fu(t,e,r){let n=b(t,r?.in),i=Jr(n,r);if(isNaN(e))return $(r?.in,NaN);let s=n.getHours(),a=e<0?-1:1,l=Math.trunc(e/5);n.setDate(n.getDate()+l*7);let c=Math.abs(e%5);for(;c>0;)n.setDate(n.getDate()+a),Jr(n,r)||(c-=1);return i&&Jr(n,r)&&e!==0&&(cu(n,r)&&n.setDate(n.getDate()+(a<0?2:-1)),uu(n,r)&&n.setDate(n.getDate()+(a<0?1:-2))),n.setHours(s),n}o(fu,"addBusinessDays");var O7=fu;function jn(t,e,r){return $(r?.in||t,+b(t)+e)}o(jn,"addMilliseconds");var _7=jn;function pu(t,e,r){return jn(t,e*Gt,r)}o(pu,"addHours");var $7=pu;var uw={};function Me(){return uw}o(Me,"getDefaultOptions");function fw(t){uw=t}o(fw,"setDefaultOptions");function Le(t,e){let r=Me(),n=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=b(t,e?.in),s=i.getDay(),a=(s<n?7:0)+s-n;return i.setDate(i.getDate()-a),i.setHours(0,0,0,0),i}o(Le,"startOfWeek");var q7=Le;function Ge(t,e){return Le(t,{...e,weekStartsOn:1})}o(Ge,"startOfISOWeek");var G7=Ge;function Mt(t,e){let r=b(t,e?.in),n=r.getFullYear(),i=$(r,0);i.setFullYear(n+1,0,4),i.setHours(0,0,0,0);let s=Ge(i),a=$(r,0);a.setFullYear(n,0,4),a.setHours(0,0,0,0);let l=Ge(a);return r.getTime()>=s.getTime()?n+1:r.getTime()>=l.getTime()?n:n-1}o(Mt,"getISOWeekYear");var tG=Mt;function We(t){let e=b(t),r=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return r.setUTCFullYear(e.getFullYear()),+t-+r}o(We,"getTimezoneOffsetInMilliseconds");function ee(t,...e){let r=$.bind(null,t||e.find(n=>typeof n=="object"));return e.map(r)}o(ee,"normalizeDates");function Qr(t,e){let r=b(t,e?.in);return r.setHours(0,0,0,0),r}o(Qr,"startOfDay");var fG=Qr;function st(t,e,r){let[n,i]=ee(r?.in,t,e),s=Qr(n),a=Qr(i),l=+s-We(s),c=+a-We(a);return Math.round((l-c)/iu)}o(st,"differenceInCalendarDays");var xG=st;function Jt(t,e){let r=Mt(t,e),n=$(e?.in||t,0);return n.setFullYear(r,0,4),n.setHours(0,0,0,0),Ge(n)}o(Jt,"startOfISOWeekYear");var TG=Jt;function hu(t,e,r){let n=b(t,r?.in),i=st(n,Jt(n,r)),s=$(r?.in||t,0);return s.setFullYear(e,0,4),s.setHours(0,0,0,0),n=Jt(s),n.setDate(n.getDate()+i),n}o(hu,"setISOWeekYear");var NG=hu;function mu(t,e,r){return hu(t,Mt(t,r)+e,r)}o(mu,"addISOWeekYears");var AG=mu;function Ko(t,e,r){let n=b(t,r?.in);return n.setTime(n.getTime()+e*yt),n}o(Ko,"addMinutes");var zG=Ko;function Go(t,e,r){return Gr(t,e*3,r)}o(Go,"addQuarters");var qG=Go;function du(t,e,r){return jn(t,e*1e3,r)}o(du,"addSeconds");var GG=du;function zn(t,e,r){return et(t,e*7,r)}o(zn,"addWeeks");var ZG=zn;function gu(t,e,r){return Gr(t,e*12,r)}o(gu,"addYears");var nJ=gu;function pw(t,e,r){let[n,i]=[+b(t.start,r?.in),+b(t.end,r?.in)].sort((l,c)=>l-c),[s,a]=[+b(e.start,r?.in),+b(e.end,r?.in)].sort((l,c)=>l-c);return r?.inclusive?n<=a&&s<=i:n<a&&s<i}o(pw,"areIntervalsOverlapping");var aJ=pw;function yu(t,e){let r,n=e?.in;return t.forEach(i=>{!n&&typeof i=="object"&&(n=$.bind(null,i));let s=b(i,n);(!r||r<s||isNaN(+s))&&(r=s)}),$(n,r||NaN)}o(yu,"max");var pJ=yu;function xu(t,e){let r,n=e?.in;return t.forEach(i=>{!n&&typeof i=="object"&&(n=$.bind(null,i));let s=b(i,n);(!r||r>s||isNaN(+s))&&(r=s)}),$(n,r||NaN)}o(xu,"min");var yJ=xu;function hw(t,e,r){let[n,i,s]=ee(r?.in,t,e.start,e.end);return xu([yu([n,i],r),s],r)}o(hw,"clamp");var kJ=hw;function bu(t,e){let r=+b(t);if(isNaN(r))return NaN;let n,i;return e.forEach((s,a)=>{let l=b(s);if(isNaN(+l)){n=NaN,i=NaN;return}let c=Math.abs(r-+l);(n==null||c<i)&&(n=a,i=c)}),n}o(bu,"closestIndexTo");var CJ=bu;function mw(t,e,r){let[n,...i]=ee(r?.in,t,...e),s=bu(n,i);if(typeof s=="number"&&isNaN(s))return $(n,NaN);if(s!==void 0)return i[s]}o(mw,"closestTo");var _J=mw;function xt(t,e){let r=+b(t)-+b(e);return r<0?-1:r>0?1:r}o(xt,"compareAsc");var FJ=xt;function dw(t,e){let r=+b(t)-+b(e);return r>0?-1:r<0?1:r}o(dw,"compareDesc");var zJ=dw;function de(t){return $(t,Date.now())}o(de,"constructNow");var qJ=de;function gw(t){let e=Math.trunc(t/7);return e===0?0:e}o(gw,"daysToWeeks");var GJ=gw;function Xr(t,e,r){let[n,i]=ee(r?.in,t,e);return+Qr(n)==+Qr(i)}o(Xr,"isSameDay");var eQ=Xr;function wu(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}o(wu,"isDate");var nQ=wu;function ht(t){return!(!wu(t)&&typeof t!="number"||isNaN(+b(t)))}o(ht,"isValid");var lQ=ht;function yw(t,e,r){let[n,i]=ee(r?.in,t,e);if(!ht(n)||!ht(i))return NaN;let s=st(n,i),a=s<0?-1:1,l=Math.trunc(s/7),c=l*5,u=et(i,l*7);for(;!Xr(n,u);)c+=Jr(u,r)?0:a,u=et(u,a);return c===0?0:c}o(yw,"differenceInBusinessDays");var yQ=yw;function Su(t,e,r){let[n,i]=ee(r?.in,t,e);return Mt(n,r)-Mt(i,r)}o(Su,"differenceInCalendarISOWeekYears");var vQ=Su;function xw(t,e,r){let[n,i]=ee(r?.in,t,e),s=Ge(n),a=Ge(i),l=+s-We(s),c=+a-We(a);return Math.round((l-c)/Kr)}o(xw,"differenceInCalendarISOWeeks");var MQ=xw;function Ri(t,e,r){let[n,i]=ee(r?.in,t,e),s=n.getFullYear()-i.getFullYear(),a=n.getMonth()-i.getMonth();return s*12+a}o(Ri,"differenceInCalendarMonths");var _Q=Ri;function _a(t,e){let r=b(t,e?.in);return Math.trunc(r.getMonth()/3)+1}o(_a,"getQuarter");var FQ=_a;function Jo(t,e,r){let[n,i]=ee(r?.in,t,e),s=n.getFullYear()-i.getFullYear(),a=_a(n)-_a(i);return s*4+a}o(Jo,"differenceInCalendarQuarters");var WQ=Jo;function Ai(t,e,r){let[n,i]=ee(r?.in,t,e),s=Le(n,r),a=Le(i,r),l=+s-We(s),c=+a-We(a);return Math.round((l-c)/Kr)}o(Ai,"differenceInCalendarWeeks");var GQ=Ai;function Wn(t,e,r){let[n,i]=ee(r?.in,t,e);return n.getFullYear()-i.getFullYear()}o(Wn,"differenceInCalendarYears");var ZQ=Wn;function Qo(t,e,r){let[n,i]=ee(r?.in,t,e),s=bw(n,i),a=Math.abs(st(n,i));n.setDate(n.getDate()-s*a);let l=+(bw(n,i)===-s),c=s*(a-l);return c===0?0:c}o(Qo,"differenceInDays");function bw(t,e){let r=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds();return r<0?-1:r>0?1:r}o(bw,"compareLocalAsc");var iX=Qo;function bt(t){return e=>{let n=(t?Math[t]:Math.trunc)(e);return n===0?0:n}}o(bt,"getRoundingMethod");function Fi(t,e,r){let[n,i]=ee(r?.in,t,e),s=(+n-+i)/Gt;return bt(r?.roundingMethod)(s)}o(Fi,"differenceInHours");var pX=Fi;function vu(t,e,r){return mu(t,-e,r)}o(vu,"subISOWeekYears");var gX=vu;function ww(t,e,r){let[n,i]=ee(r?.in,t,e),s=xt(n,i),a=Math.abs(Su(n,i,r)),l=vu(n,s*a,r),c=+(xt(l,i)===-s),u=s*(a-c);return u===0?0:u}o(ww,"differenceInISOWeekYears");var kX=ww;function Xo(t,e){return+b(t)-+b(e)}o(Xo,"differenceInMilliseconds");var CX=Xo;function $i(t,e,r){let n=Xo(t,e)/yt;return bt(r?.roundingMethod)(n)}o($i,"differenceInMinutes");var _X=$i;function Zo(t,e){let r=b(t,e?.in);return r.setHours(23,59,59,999),r}o(Zo,"endOfDay");var FX=Zo;function es(t,e){let r=b(t,e?.in),n=r.getMonth();return r.setFullYear(r.getFullYear(),n+1,0),r.setHours(23,59,59,999),r}o(es,"endOfMonth");var zX=es;function ku(t,e){let r=b(t,e?.in);return+Zo(r,e)==+es(r,e)}o(ku,"isLastDayOfMonth");var VX=ku;function Hn(t,e,r){let[n,i,s]=ee(r?.in,t,t,e),a=xt(i,s),l=Math.abs(Ri(i,s));if(l<1)return 0;i.getMonth()===1&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-a*l);let c=xt(i,s)===-a;ku(n)&&l===1&&xt(n,s)===1&&(c=!1);let u=a*(l-+c);return u===0?0:u}o(Hn,"differenceInMonths");var eZ=Hn;function Sw(t,e,r){let n=Hn(t,e,r)/3;return bt(r?.roundingMethod)(n)}o(Sw,"differenceInQuarters");var oZ=Sw;function Zr(t,e,r){let n=Xo(t,e)/1e3;return bt(r?.roundingMethod)(n)}o(Zr,"differenceInSeconds");var uZ=Zr;function vw(t,e,r){let n=Qo(t,e,r)/7;return bt(r?.roundingMethod)(n)}o(vw,"differenceInWeeks");var dZ=vw;function Tu(t,e,r){let[n,i]=ee(r?.in,t,e),s=xt(n,i),a=Math.abs(Wn(n,i));n.setFullYear(1584),i.setFullYear(1584);let l=xt(n,i)===-s,c=s*(a-+l);return c===0?0:c}o(Tu,"differenceInYears");var SZ=Tu;function at(t,e){let[r,n]=ee(t,e.start,e.end);return{start:r,end:n}}o(at,"normalizeInterval");function Eu(t,e){let{start:r,end:n}=at(e?.in,t),i=+r>+n,s=i?+r:+n,a=i?n:r;a.setHours(0,0,0,0);let l=e?.step??1;if(!l)return[];l<0&&(l=-l,i=!i);let c=[];for(;+a<=s;)c.push($(r,a)),a.setDate(a.getDate()+l),a.setHours(0,0,0,0);return i?c.reverse():c}o(Eu,"eachDayOfInterval");var MZ=Eu;function kw(t,e){let{start:r,end:n}=at(e?.in,t),i=+r>+n,s=i?+r:+n,a=i?n:r;a.setMinutes(0,0,0);let l=e?.step??1;if(!l)return[];l<0&&(l=-l,i=!i);let c=[];for(;+a<=s;)c.push($(r,a)),a.setHours(a.getHours()+l);return i?c.reverse():c}o(kw,"eachHourOfInterval");var LZ=kw;function Tw(t,e){let{start:r,end:n}=at(e?.in,t);r.setSeconds(0,0);let i=+r>+n,s=i?+r:+n,a=i?n:r,l=e?.step??1;if(!l)return[];l<0&&(l=-l,i=!i);let c=[];for(;+a<=s;)c.push($(r,a)),a=Ko(a,l);return i?c.reverse():c}o(Tw,"eachMinuteOfInterval");var jZ=Tw;function Ew(t,e){let{start:r,end:n}=at(e?.in,t),i=+r>+n,s=i?+r:+n,a=i?n:r;a.setHours(0,0,0,0),a.setDate(1);let l=e?.step??1;if(!l)return[];l<0&&(l=-l,i=!i);let c=[];for(;+a<=s;)c.push($(r,a)),a.setMonth(a.getMonth()+l);return i?c.reverse():c}o(Ew,"eachMonthOfInterval");var qZ=Ew;function en(t,e){let r=b(t,e?.in),n=r.getMonth(),i=n-n%3;return r.setMonth(i,1),r.setHours(0,0,0,0),r}o(en,"startOfQuarter");var GZ=en;function Dw(t,e){let{start:r,end:n}=at(e?.in,t),i=+r>+n,s=i?+en(r):+en(n),a=i?en(n):en(r),l=e?.step??1;if(!l)return[];l<0&&(l=-l,i=!i);let c=[];for(;+a<=s;)c.push($(r,a)),a=Go(a,l);return i?c.reverse():c}o(Dw,"eachQuarterOfInterval");var ree=Dw;function Cw(t,e){let{start:r,end:n}=at(e?.in,t),i=+r>+n,s=i?Le(n,e):Le(r,e),a=i?Le(r,e):Le(n,e);s.setHours(15),a.setHours(15);let l=+a.getTime(),c=s,u=e?.step??1;if(!u)return[];u<0&&(u=-u,i=!i);let f=[];for(;+c<=l;)c.setHours(0),f.push($(r,c)),c=zn(c,u),c.setHours(15);return i?f.reverse():f}o(Cw,"eachWeekOfInterval");var cee=Cw;function ts(t,e){let{start:r,end:n}=at(e?.in,t),i=Eu({start:r,end:n},e),s=[],a=0;for(;a<i.length;){let l=i[a++];Jr(l)&&s.push($(r,l))}return s}o(ts,"eachWeekendOfInterval");var gee=ts;function Un(t,e){let r=b(t,e?.in);return r.setDate(1),r.setHours(0,0,0,0),r}o(Un,"startOfMonth");var wee=Un;function Ow(t,e){let r=Un(t,e),n=es(t,e);return ts({start:r,end:n},e)}o(Ow,"eachWeekendOfMonth");var Dee=Ow;function Du(t,e){let r=b(t,e?.in),n=r.getFullYear();return r.setFullYear(n+1,0,0),r.setHours(23,59,59,999),r}o(Du,"endOfYear");var Iee=Du;function rs(t,e){let r=b(t,e?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}o(rs,"startOfYear");var Lee=rs;function Mw(t,e){let r=rs(t,e),n=Du(t,e);return ts({start:r,end:n},e)}o(Mw,"eachWeekendOfYear");var jee=Mw;function Iw(t,e){let{start:r,end:n}=at(e?.in,t),i=+r>+n,s=i?+r:+n,a=i?n:r;a.setHours(0,0,0,0),a.setMonth(0,1);let l=e?.step??1;if(!l)return[];l<0&&(l=-l,i=!i);let c=[];for(;+a<=s;)c.push($(r,a)),a.setFullYear(a.getFullYear()+l);return i?c.reverse():c}o(Iw,"eachYearOfInterval");var qee=Iw;function Nw(t,e){let r=b(t,e?.in),n=r.getFullYear(),i=9+Math.floor(n/10)*10;return r.setFullYear(i,11,31),r.setHours(23,59,59,999),r}o(Nw,"endOfDecade");var Gee=Nw;function Pw(t,e){let r=b(t,e?.in);return r.setMinutes(59,59,999),r}o(Pw,"endOfHour");var Zee=Pw;function Cu(t,e){let r=Me(),n=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=b(t,e?.in),s=i.getDay(),a=(s<n?-7:0)+6-(s-n);return i.setDate(i.getDate()+a),i.setHours(23,59,59,999),i}o(Cu,"endOfWeek");var ite=Cu;function _w(t,e){return Cu(t,{...e,weekStartsOn:1})}o(_w,"endOfISOWeek");var lte=_w;function Lw(t,e){let r=Mt(t,e),n=$(e?.in||t,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);let i=Ge(n,e);return i.setMilliseconds(i.getMilliseconds()-1),i}o(Lw,"endOfISOWeekYear");var mte=Lw;function Rw(t,e){let r=b(t,e?.in);return r.setSeconds(59,999),r}o(Rw,"endOfMinute");var xte=Rw;function Aw(t,e){let r=b(t,e?.in),n=r.getMonth(),i=n-n%3+3;return r.setMonth(i,0),r.setHours(23,59,59,999),r}o(Aw,"endOfQuarter");var vte=Aw;function Fw(t,e){let r=b(t,e?.in);return r.setMilliseconds(999),r}o(Fw,"endOfSecond");var Dte=Fw;function $w(t){return Zo(Date.now(),t)}o($w,"endOfToday");var Ite=$w;function Bw(t){let e=de(t?.in),r=e.getFullYear(),n=e.getMonth(),i=e.getDate(),s=de(t?.in);return s.setFullYear(r,n,i+1),s.setHours(23,59,59,999),t?.in?t.in(s):s}o(Bw,"endOfTomorrow");var Lte=Bw;function jw(t){let e=de(t?.in),r=$(t?.in,0);return r.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()-1),r.setHours(23,59,59,999),r}o(jw,"endOfYesterday");var Bte=jw;var KI={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},zw=o((t,e,r)=>{let n,i=KI[t];return typeof i=="string"?n=i:e===1?n=i.one:n=i.other.replace("{{count}}",e.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n},"formatDistance");function Ou(t){return(e={})=>{let r=e.width?String(e.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}}o(Ou,"buildFormatLongFn");var GI={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},JI={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},QI={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Ww={date:Ou({formats:GI,defaultWidth:"full"}),time:Ou({formats:JI,defaultWidth:"full"}),dateTime:Ou({formats:QI,defaultWidth:"full"})};var XI={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Hw=o((t,e,r,n)=>XI[t],"formatRelative");function ns(t){return(e,r)=>{let n=r?.context?String(r.context):"standalone",i;if(n==="formatting"&&t.formattingValues){let a=t.defaultFormattingWidth||t.defaultWidth,l=r?.width?String(r.width):a;i=t.formattingValues[l]||t.formattingValues[a]}else{let a=t.defaultWidth,l=r?.width?String(r.width):t.defaultWidth;i=t.values[l]||t.values[a]}let s=t.argumentCallback?t.argumentCallback(e):e;return i[s]}}o(ns,"buildLocalizeFn");var ZI={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},eN={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},tN={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},rN={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},nN={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},iN={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},oN=o((t,e)=>{let r=Number(t),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},"ordinalNumber"),Uw={ordinalNumber:oN,era:ns({values:ZI,defaultWidth:"wide"}),quarter:ns({values:eN,defaultWidth:"wide",argumentCallback:o(t=>t-1,"argumentCallback")}),month:ns({values:tN,defaultWidth:"wide"}),day:ns({values:rN,defaultWidth:"wide"}),dayPeriod:ns({values:nN,defaultWidth:"wide",formattingValues:iN,defaultFormattingWidth:"wide"})};function is(t){return(e,r={})=>{let n=r.width,i=n&&t.matchPatterns[n]||t.matchPatterns[t.defaultMatchWidth],s=e.match(i);if(!s)return null;let a=s[0],l=n&&t.parsePatterns[n]||t.parsePatterns[t.defaultParseWidth],c=Array.isArray(l)?aN(l,p=>p.test(a)):sN(l,p=>p.test(a)),u;u=t.valueCallback?t.valueCallback(c):c,u=r.valueCallback?r.valueCallback(u):u;let f=e.slice(a.length);return{value:u,rest:f}}}o(is,"buildMatchFn");function sN(t,e){for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&e(t[r]))return r}o(sN,"findKey");function aN(t,e){for(let r=0;r<t.length;r++)if(e(t[r]))return r}o(aN,"findIndex");function qw(t){return(e,r={})=>{let n=e.match(t.matchPattern);if(!n)return null;let i=n[0],s=e.match(t.parsePattern);if(!s)return null;let a=t.valueCallback?t.valueCallback(s[0]):s[0];a=r.valueCallback?r.valueCallback(a):a;let l=e.slice(i.length);return{value:a,rest:l}}}o(qw,"buildMatchPatternFn");var lN=/^(\d+)(th|st|nd|rd)?/i,cN=/\d+/i,uN={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},fN={any:[/^b/i,/^(a|c)/i]},pN={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},hN={any:[/1/i,/2/i,/3/i,/4/i]},mN={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},dN={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},gN={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},yN={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},xN={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},bN={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Yw={ordinalNumber:qw({matchPattern:lN,parsePattern:cN,valueCallback:o(t=>parseInt(t,10),"valueCallback")}),era:is({matchPatterns:uN,defaultMatchWidth:"wide",parsePatterns:fN,defaultParseWidth:"any"}),quarter:is({matchPatterns:pN,defaultMatchWidth:"wide",parsePatterns:hN,defaultParseWidth:"any",valueCallback:o(t=>t+1,"valueCallback")}),month:is({matchPatterns:mN,defaultMatchWidth:"wide",parsePatterns:dN,defaultParseWidth:"any"}),day:is({matchPatterns:gN,defaultMatchWidth:"wide",parsePatterns:yN,defaultParseWidth:"any"}),dayPeriod:is({matchPatterns:xN,defaultMatchWidth:"any",parsePatterns:bN,defaultParseWidth:"any"})};var Ft={code:"en-US",formatDistance:zw,formatLong:Ww,formatRelative:Hw,localize:Uw,match:Yw,options:{weekStartsOn:0,firstWeekContainsDate:1}},mre=Ft;function Mu(t,e){let r=b(t,e?.in);return st(r,rs(r))+1}o(Mu,"getDayOfYear");var Sre=Mu;function os(t,e){let r=b(t,e?.in),n=+Ge(r)-+Jt(r);return Math.round(n/Kr)+1}o(os,"getISOWeek");var Ore=os;function qn(t,e){let r=b(t,e?.in),n=r.getFullYear(),i=Me(),s=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,a=$(e?.in||t,0);a.setFullYear(n+1,0,s),a.setHours(0,0,0,0);let l=Le(a,e),c=$(e?.in||t,0);c.setFullYear(n,0,s),c.setHours(0,0,0,0);let u=Le(c,e);return+r>=+l?n+1:+r>=+u?n:n-1}o(qn,"getWeekYear");var Rre=qn;function Bi(t,e){let r=Me(),n=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=qn(t,e),s=$(e?.in||t,0);return s.setFullYear(i,0,n),s.setHours(0,0,0,0),Le(s,e)}o(Bi,"startOfWeekYear");var Wre=Bi;function ss(t,e){let r=b(t,e?.in),n=+Le(r,e)-+Bi(r,e);return Math.round(n/Kr)+1}o(ss,"getWeek");var Gre=ss;function Q(t,e){let r=t<0?"-":"",n=Math.abs(t).toString().padStart(e,"0");return r+n}o(Q,"addLeadingZeros");var Qt={y(t,e){let r=t.getFullYear(),n=r>0?r:1-r;return Q(e==="yy"?n%100:n,e.length)},M(t,e){let r=t.getMonth();return e==="M"?String(r+1):Q(r+1,2)},d(t,e){return Q(t.getDate(),e.length)},a(t,e){let r=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return r==="am"?"a.m.":"p.m."}},h(t,e){return Q(t.getHours()%12||12,e.length)},H(t,e){return Q(t.getHours(),e.length)},m(t,e){return Q(t.getMinutes(),e.length)},s(t,e){return Q(t.getSeconds(),e.length)},S(t,e){let r=e.length,n=t.getMilliseconds(),i=Math.trunc(n*Math.pow(10,r-3));return Q(i,e.length)}};var as={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},La={G:o(function(t,e,r){let n=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});default:return r.era(n,{width:"wide"})}},"G"),y:o(function(t,e,r){if(e==="yo"){let n=t.getFullYear(),i=n>0?n:1-n;return r.ordinalNumber(i,{unit:"year"})}return Qt.y(t,e)},"y"),Y:o(function(t,e,r,n){let i=qn(t,n),s=i>0?i:1-i;if(e==="YY"){let a=s%100;return Q(a,2)}return e==="Yo"?r.ordinalNumber(s,{unit:"year"}):Q(s,e.length)},"Y"),R:o(function(t,e){let r=Mt(t);return Q(r,e.length)},"R"),u:o(function(t,e){let r=t.getFullYear();return Q(r,e.length)},"u"),Q:o(function(t,e,r){let n=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(n);case"QQ":return Q(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});default:return r.quarter(n,{width:"wide",context:"formatting"})}},"Q"),q:o(function(t,e,r){let n=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(n);case"qq":return Q(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});default:return r.quarter(n,{width:"wide",context:"standalone"})}},"q"),M:o(function(t,e,r){let n=t.getMonth();switch(e){case"M":case"MM":return Qt.M(t,e);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});default:return r.month(n,{width:"wide",context:"formatting"})}},"M"),L:o(function(t,e,r){let n=t.getMonth();switch(e){case"L":return String(n+1);case"LL":return Q(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});default:return r.month(n,{width:"wide",context:"standalone"})}},"L"),w:o(function(t,e,r,n){let i=ss(t,n);return e==="wo"?r.ordinalNumber(i,{unit:"week"}):Q(i,e.length)},"w"),I:o(function(t,e,r){let n=os(t);return e==="Io"?r.ordinalNumber(n,{unit:"week"}):Q(n,e.length)},"I"),d:o(function(t,e,r){return e==="do"?r.ordinalNumber(t.getDate(),{unit:"date"}):Qt.d(t,e)},"d"),D:o(function(t,e,r){let n=Mu(t);return e==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):Q(n,e.length)},"D"),E:o(function(t,e,r){let n=t.getDay();switch(e){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},"E"),e:o(function(t,e,r,n){let i=t.getDay(),s=(i-n.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return Q(s,2);case"eo":return r.ordinalNumber(s,{unit:"day"});case"eee":return r.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(i,{width:"short",context:"formatting"});default:return r.day(i,{width:"wide",context:"formatting"})}},"e"),c:o(function(t,e,r,n){let i=t.getDay(),s=(i-n.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return Q(s,e.length);case"co":return r.ordinalNumber(s,{unit:"day"});case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});case"cccccc":return r.day(i,{width:"short",context:"standalone"});default:return r.day(i,{width:"wide",context:"standalone"})}},"c"),i:o(function(t,e,r){let n=t.getDay(),i=n===0?7:n;switch(e){case"i":return String(i);case"ii":return Q(i,e.length);case"io":return r.ordinalNumber(i,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},"i"),a:o(function(t,e,r){let i=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(i,{width:"narrow",context:"formatting"});default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},"a"),b:o(function(t,e,r){let n=t.getHours(),i;switch(n===12?i=as.noon:n===0?i=as.midnight:i=n/12>=1?"pm":"am",e){case"b":case"bb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(i,{width:"narrow",context:"formatting"});default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},"b"),B:o(function(t,e,r){let n=t.getHours(),i;switch(n>=17?i=as.evening:n>=12?i=as.afternoon:n>=4?i=as.morning:i=as.night,e){case"B":case"BB":case"BBB":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(i,{width:"narrow",context:"formatting"});default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},"B"),h:o(function(t,e,r){if(e==="ho"){let n=t.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return Qt.h(t,e)},"h"),H:o(function(t,e,r){return e==="Ho"?r.ordinalNumber(t.getHours(),{unit:"hour"}):Qt.H(t,e)},"H"),K:o(function(t,e,r){let n=t.getHours()%12;return e==="Ko"?r.ordinalNumber(n,{unit:"hour"}):Q(n,e.length)},"K"),k:o(function(t,e,r){let n=t.getHours();return n===0&&(n=24),e==="ko"?r.ordinalNumber(n,{unit:"hour"}):Q(n,e.length)},"k"),m:o(function(t,e,r){return e==="mo"?r.ordinalNumber(t.getMinutes(),{unit:"minute"}):Qt.m(t,e)},"m"),s:o(function(t,e,r){return e==="so"?r.ordinalNumber(t.getSeconds(),{unit:"second"}):Qt.s(t,e)},"s"),S:o(function(t,e){return Qt.S(t,e)},"S"),X:o(function(t,e,r){let n=t.getTimezoneOffset();if(n===0)return"Z";switch(e){case"X":return Kw(n);case"XXXX":case"XX":return ji(n);default:return ji(n,":")}},"X"),x:o(function(t,e,r){let n=t.getTimezoneOffset();switch(e){case"x":return Kw(n);case"xxxx":case"xx":return ji(n);default:return ji(n,":")}},"x"),O:o(function(t,e,r){let n=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Vw(n,":");default:return"GMT"+ji(n,":")}},"O"),z:o(function(t,e,r){let n=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Vw(n,":");default:return"GMT"+ji(n,":")}},"z"),t:o(function(t,e,r){let n=Math.trunc(+t/1e3);return Q(n,e.length)},"t"),T:o(function(t,e,r){return Q(+t,e.length)},"T")};function Vw(t,e=""){let r=t>0?"-":"+",n=Math.abs(t),i=Math.trunc(n/60),s=n%60;return s===0?r+String(i):r+String(i)+e+Q(s,2)}o(Vw,"formatTimezoneShort");function Kw(t,e){return t%60===0?(t>0?"-":"+")+Q(Math.abs(t)/60,2):ji(t,e)}o(Kw,"formatTimezoneWithOptionalMinutes");function ji(t,e=""){let r=t>0?"-":"+",n=Math.abs(t),i=Q(Math.trunc(n/60),2),s=Q(n%60,2);return r+i+e+s}o(ji,"formatTimezone");var Gw=o((t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},"dateLongFormatter"),Jw=o((t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},"timeLongFormatter"),wN=o((t,e)=>{let r=t.match(/(P+)(p+)?/)||[],n=r[1],i=r[2];if(!i)return Gw(t,e);let s;switch(n){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;default:s=e.dateTime({width:"full"});break}return s.replace("{{date}}",Gw(n,e)).replace("{{time}}",Jw(i,e))},"dateTimeLongFormatter"),Yn={p:Jw,P:wN};var SN=/^D+$/,vN=/^Y+$/,kN=["D","DD","YY","YYYY"];function Iu(t){return SN.test(t)}o(Iu,"isProtectedDayOfYearToken");function Nu(t){return vN.test(t)}o(Nu,"isProtectedWeekYearToken");function Ra(t,e,r){let n=TN(t,e,r);if(console.warn(n),kN.includes(t))throw new RangeError(n)}o(Ra,"warnOrThrowProtectedError");function TN(t,e,r){let n=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}o(TN,"message");var EN=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,DN=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,CN=/^'([^]*?)'?$/,ON=/''/g,MN=/[a-zA-Z]/;function Aa(t,e,r){let n=Me(),i=r?.locale??n.locale??Ft,s=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,a=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,l=b(t,r?.in);if(!ht(l))throw new RangeError("Invalid time value");let c=e.match(DN).map(f=>{let p=f[0];if(p==="p"||p==="P"){let h=Yn[p];return h(f,i.formatLong)}return f}).join("").match(EN).map(f=>{if(f==="''")return{isToken:!1,value:"'"};let p=f[0];if(p==="'")return{isToken:!1,value:IN(f)};if(La[p])return{isToken:!0,value:f};if(p.match(MN))throw new RangeError("Format string contains an unescaped latin alphabet character `"+p+"`");return{isToken:!1,value:f}});i.localize.preprocessor&&(c=i.localize.preprocessor(l,c));let u={firstWeekContainsDate:s,weekStartsOn:a,locale:i};return c.map(f=>{if(!f.isToken)return f.value;let p=f.value;(!r?.useAdditionalWeekYearTokens&&Nu(p)||!r?.useAdditionalDayOfYearTokens&&Iu(p))&&Ra(p,e,String(t));let h=La[p[0]];return h(l,p,i.localize,u)}).join("")}o(Aa,"format");function IN(t){let e=t.match(CN);return e?e[1].replace(ON,"'"):t}o(IN,"cleanEscapedString");var vne=Aa;function Pu(t,e,r){let n=Me(),i=r?.locale??n.locale??Ft,s=2520,a=xt(t,e);if(isNaN(a))throw new RangeError("Invalid time value");let l=Object.assign({},r,{addSuffix:r?.addSuffix,comparison:a}),[c,u]=ee(r?.in,...a>0?[e,t]:[t,e]),f=Zr(u,c),p=(We(u)-We(c))/1e3,h=Math.round((f-p)/60),m;if(h<2)return r?.includeSeconds?f<5?i.formatDistance("lessThanXSeconds",5,l):f<10?i.formatDistance("lessThanXSeconds",10,l):f<20?i.formatDistance("lessThanXSeconds",20,l):f<40?i.formatDistance("halfAMinute",0,l):f<60?i.formatDistance("lessThanXMinutes",1,l):i.formatDistance("xMinutes",1,l):h===0?i.formatDistance("lessThanXMinutes",1,l):i.formatDistance("xMinutes",h,l);if(h<45)return i.formatDistance("xMinutes",h,l);if(h<90)return i.formatDistance("aboutXHours",1,l);if(h<Yo){let d=Math.round(h/60);return i.formatDistance("aboutXHours",d,l)}else{if(h<s)return i.formatDistance("xDays",1,l);if(h<$n){let d=Math.round(h/Yo);return i.formatDistance("xDays",d,l)}else if(h<$n*2)return m=Math.round(h/$n),i.formatDistance("aboutXMonths",m,l)}if(m=Hn(u,c),m<12){let d=Math.round(h/$n);return i.formatDistance("xMonths",d,l)}else{let d=m%12,g=Math.trunc(m/12);return d<3?i.formatDistance("aboutXYears",g,l):d<9?i.formatDistance("overXYears",g,l):i.formatDistance("almostXYears",g+1,l)}}o(Pu,"formatDistance");var _ne=Pu;function _u(t,e,r){let n=Me(),i=r?.locale??n.locale??Ft,s=xt(t,e);if(isNaN(s))throw new RangeError("Invalid time value");let a=Object.assign({},r,{addSuffix:r?.addSuffix,comparison:s}),[l,c]=ee(r?.in,...s>0?[e,t]:[t,e]),u=bt(r?.roundingMethod??"round"),f=c.getTime()-l.getTime(),p=f/yt,h=We(c)-We(l),m=(f-h)/yt,d=r?.unit,g;if(d?g=d:p<1?g="second":p<60?g="minute":p<Yo?g="hour":m<$n?g="day":m<qm?g="month":g="year",g==="second"){let y=u(f/1e3);return i.formatDistance("xSeconds",y,a)}else if(g==="minute"){let y=u(p);return i.formatDistance("xMinutes",y,a)}else if(g==="hour"){let y=u(p/60);return i.formatDistance("xHours",y,a)}else if(g==="day"){let y=u(m/Yo);return i.formatDistance("xDays",y,a)}else if(g==="month"){let y=u(m/$n);return y===12&&d!=="month"?i.formatDistance("xYears",1,a):i.formatDistance("xMonths",y,a)}else{let y=u(m/qm);return i.formatDistance("xYears",y,a)}}o(_u,"formatDistanceStrict");var Hne=_u;function Qw(t,e){return Pu(t,de(t),e)}o(Qw,"formatDistanceToNow");var Kne=Qw;function Xw(t,e){return _u(t,de(t),e)}o(Xw,"formatDistanceToNowStrict");var Zne=Xw;var NN=["years","months","weeks","days","hours","minutes","seconds"];function Zw(t,e){let r=Me(),n=e?.locale??r.locale??Ft,i=e?.format??NN,s=e?.zero??!1,a=e?.delimiter??" ";return n.formatDistance?i.reduce((c,u)=>{let f=`x${u.replace(/(^.)/,h=>h.toUpperCase())}`,p=t[u];return p!==void 0&&(s||t[u])?c.concat(n.formatDistance(f,p)):c},[]).join(a):""}o(Zw,"formatDuration");var iie=Zw;function e0(t,e){let r=b(t,e?.in);if(isNaN(+r))throw new RangeError("Invalid time value");let n=e?.format??"extended",i=e?.representation??"complete",s="",a="",l=n==="extended"?"-":"",c=n==="extended"?":":"";if(i!=="time"){let u=Q(r.getDate(),2),f=Q(r.getMonth()+1,2);s=`${Q(r.getFullYear(),4)}${l}${f}${l}${u}`}if(i!=="date"){let u=r.getTimezoneOffset();if(u!==0){let g=Math.abs(u),y=Q(Math.trunc(g/60),2),x=Q(g%60,2);a=`${u<0?"+":"-"}${y}:${x}`}else a="Z";let f=Q(r.getHours(),2),p=Q(r.getMinutes(),2),h=Q(r.getSeconds(),2),m=s===""?"":"T",d=[f,p,h].join(c);s=`${s}${m}${d}${a}`}return s}o(e0,"formatISO");var cie=e0;function t0(t,e){let r=b(t,e?.in);if(!ht(r))throw new RangeError("Invalid time value");let n=e?.format??"extended",i=e?.representation??"complete",s="",a=n==="extended"?"-":"",l=n==="extended"?":":"";if(i!=="time"){let c=Q(r.getDate(),2),u=Q(r.getMonth()+1,2);s=`${Q(r.getFullYear(),4)}${a}${u}${a}${c}`}if(i!=="date"){let c=Q(r.getHours(),2),u=Q(r.getMinutes(),2),f=Q(r.getSeconds(),2);s=`${s}${s===""?"":" "}${c}${l}${u}${l}${f}`}return s}o(t0,"formatISO9075");var die=t0;function r0(t){let{years:e=0,months:r=0,days:n=0,hours:i=0,minutes:s=0,seconds:a=0}=t;return`P${e}Y${r}M${n}DT${i}H${s}M${a}S`}o(r0,"formatISODuration");var xie=r0;function n0(t,e){let r=b(t,e?.in);if(!ht(r))throw new RangeError("Invalid time value");let n=e?.fractionDigits??0,i=Q(r.getDate(),2),s=Q(r.getMonth()+1,2),a=r.getFullYear(),l=Q(r.getHours(),2),c=Q(r.getMinutes(),2),u=Q(r.getSeconds(),2),f="";if(n>0){let m=r.getMilliseconds(),d=Math.trunc(m*Math.pow(10,n-3));f="."+Q(d,n)}let p="",h=r.getTimezoneOffset();if(h!==0){let m=Math.abs(h),d=Q(Math.trunc(m/60),2),g=Q(m%60,2);p=`${h<0?"+":"-"}${d}:${g}`}else p="Z";return`${a}-${s}-${i}T${l}:${c}:${u}${f}${p}`}o(n0,"formatRFC3339");var Tie=n0;var PN=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],_N=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function i0(t){let e=b(t);if(!ht(e))throw new RangeError("Invalid time value");let r=PN[e.getUTCDay()],n=Q(e.getUTCDate(),2),i=_N[e.getUTCMonth()],s=e.getUTCFullYear(),a=Q(e.getUTCHours(),2),l=Q(e.getUTCMinutes(),2),c=Q(e.getUTCSeconds(),2);return`${r}, ${n} ${i} ${s} ${a}:${l}:${c} GMT`}o(i0,"formatRFC7231");var Iie=i0;function o0(t,e,r){let[n,i]=ee(r?.in,t,e),s=Me(),a=r?.locale??s.locale??Ft,l=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??s.weekStartsOn??s.locale?.options?.weekStartsOn??0,c=st(n,i);if(isNaN(c))throw new RangeError("Invalid time value");let u;c<-6?u="other":c<-1?u="lastWeek":c<0?u="yesterday":c<1?u="today":c<2?u="tomorrow":c<7?u="nextWeek":u="other";let f=a.formatRelative(u,n,i,{locale:a,weekStartsOn:l});return Aa(n,f,{locale:a,weekStartsOn:l})}o(o0,"formatRelative");var $ie=o0;function s0(t,e){return b(t*1e3,e?.in)}o(s0,"fromUnixTime");var Wie=s0;function Lu(t,e){return b(t,e?.in).getDate()}o(Lu,"getDate");var Yie=Lu;function Vn(t,e){return b(t,e?.in).getDay()}o(Vn,"getDay");var Jie=Vn;function Ru(t,e){let r=b(t,e?.in),n=r.getFullYear(),i=r.getMonth(),s=$(r,0);return s.setFullYear(n,i+1,0),s.setHours(0,0,0,0),s.getDate()}o(Ru,"getDaysInMonth");var toe=Ru;function Au(t,e){let n=b(t,e?.in).getFullYear();return n%400===0||n%4===0&&n%100!==0}o(Au,"isLeapYear");var ooe=Au;function a0(t,e){let r=b(t,e?.in);return Number.isNaN(+r)?NaN:Au(r)?366:365}o(a0,"getDaysInYear");var uoe=a0;function l0(t,e){let n=b(t,e?.in).getFullYear();return Math.floor(n/10)*10}o(l0,"getDecade");var moe=l0;function Fu(){return Object.assign({},Me())}o(Fu,"getDefaultOptions");var xoe=Fu;function c0(t,e){return b(t,e?.in).getHours()}o(c0,"getHours");var voe=c0;function $u(t,e){let r=b(t,e?.in).getDay();return r===0?7:r}o($u,"getISODay");var Doe=$u;function u0(t,e){let r=Jt(t,e),i=+Jt(zn(r,60))-+r;return Math.round(i/Kr)}o(u0,"getISOWeeksInYear");var Poe=u0;function f0(t){return b(t).getMilliseconds()}o(f0,"getMilliseconds");var Aoe=f0;function p0(t,e){return b(t,e?.in).getMinutes()}o(p0,"getMinutes");var joe=p0;function h0(t,e){return b(t,e?.in).getMonth()}o(h0,"getMonth");var Uoe=h0;function m0(t,e){let[r,n]=[+b(t.start),+b(t.end)].sort((p,h)=>p-h),[i,s]=[+b(e.start),+b(e.end)].sort((p,h)=>p-h);if(!(r<s&&i<n))return 0;let l=i<r?r:i,c=l-We(l),u=s>n?n:s,f=u-We(u);return Math.ceil((f-c)/iu)}o(m0,"getOverlappingDaysInIntervals");var Joe=m0;function d0(t){return b(t).getSeconds()}o(d0,"getSeconds");var ese=d0;function g0(t){return+b(t)}o(g0,"getTime");var ise=g0;function y0(t){return Math.trunc(+b(t)/1e3)}o(y0,"getUnixTime");var lse=y0;function x0(t,e){let r=Me(),n=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=Lu(b(t,e?.in));if(isNaN(i))return NaN;let s=Vn(Un(t,e)),a=n-s;a<=0&&(a+=7);let l=i-a;return Math.ceil(l/7)+1}o(x0,"getWeekOfMonth");var gse=x0;function Bu(t,e){let r=b(t,e?.in),n=r.getMonth();return r.setFullYear(r.getFullYear(),n+1,0),r.setHours(0,0,0,0),b(r,e?.in)}o(Bu,"lastDayOfMonth");var wse=Bu;function b0(t,e){let r=b(t,e?.in);return Ai(Bu(r,e),Un(r,e),e)+1}o(b0,"getWeeksInMonth");var Cse=b0;function w0(t,e){return b(t,e?.in).getFullYear()}o(w0,"getYear");var Nse=w0;function S0(t){return Math.trunc(t*Gt)}o(S0,"hoursToMilliseconds");var Rse=S0;function v0(t){return Math.trunc(t*ou)}o(v0,"hoursToMinutes");var Bse=v0;function k0(t){return Math.trunc(t*Li)}o(k0,"hoursToSeconds");var Hse=k0;function T0(t,e,r){let[n,i]=ee(r?.in,t,e);if(isNaN(+n))throw new TypeError("Start date is invalid");if(isNaN(+i))throw new TypeError("End date is invalid");if(r?.assertPositive&&+n>+i)throw new TypeError("End date must be after start date");return{start:n,end:i}}o(T0,"interval");var Vse=T0;function E0(t,e){let{start:r,end:n}=at(e?.in,t),i={},s=Tu(n,r);s&&(i.years=s);let a=Bn(r,{years:i.years}),l=Hn(n,a);l&&(i.months=l);let c=Bn(a,{months:i.months}),u=Qo(n,c);u&&(i.days=u);let f=Bn(c,{days:i.days}),p=Fi(n,f);p&&(i.hours=p);let h=Bn(f,{hours:i.hours}),m=$i(n,h);m&&(i.minutes=m);let d=Bn(h,{minutes:i.minutes}),g=Zr(n,d);return g&&(i.seconds=g),i}o(E0,"intervalToDuration");var iae=E0;function D0(t,e,r){let n;return LN(e)?n=e:r=e,new Intl.DateTimeFormat(r?.locale,n).format(b(t))}o(D0,"intlFormat");function LN(t){return t!==void 0&&!("locale"in t)}o(LN,"isFormatOptions");var lae=D0;function C0(t,e,r){let n=0,i,[s,a]=ee(r?.in,t,e);if(r?.unit)i=r?.unit,i==="second"?n=Zr(s,a):i==="minute"?n=$i(s,a):i==="hour"?n=Fi(s,a):i==="day"?n=st(s,a):i==="week"?n=Ai(s,a):i==="month"?n=Ri(s,a):i==="quarter"?n=Jo(s,a):i==="year"&&(n=Wn(s,a));else{let c=Zr(s,a);Math.abs(c)<Vo?(n=Zr(s,a),i="second"):Math.abs(c)<Li?(n=$i(s,a),i="minute"):Math.abs(c)<ru&&Math.abs(st(s,a))<1?(n=Fi(s,a),i="hour"):Math.abs(c)<lw&&(n=st(s,a))&&Math.abs(n)<7?i="day":Math.abs(c)<Vm?(n=Ai(s,a),i="week"):Math.abs(c)<cw?(n=Ri(s,a),i="month"):Math.abs(c)<Ym?Jo(s,a)<4?(n=Jo(s,a),i="quarter"):(n=Wn(s,a),i="year"):(n=Wn(s,a),i="year")}return new Intl.RelativeTimeFormat(r?.locale,{numeric:"auto",...r}).format(n,i)}o(C0,"intlFormatDistance");var Sae=C0;function O0(t,e){return+b(t)>+b(e)}o(O0,"isAfter");var Eae=O0;function M0(t,e){return+b(t)<+b(e)}o(M0,"isBefore");var Mae=M0;function I0(t,e){return+b(t)==+b(e)}o(I0,"isEqual");var _ae=I0;function N0(t,e,r){let n=new Date(t,e,r);return n.getFullYear()===t&&n.getMonth()===e&&n.getDate()===r}o(N0,"isExists");var Aae=N0;function P0(t,e){return b(t,e?.in).getDate()===1}o(P0,"isFirstDayOfMonth");var jae=P0;function _0(t,e){return b(t,e?.in).getDay()===5}o(_0,"isFriday");var Uae=_0;function L0(t){return+b(t)>Date.now()}o(L0,"isFuture");var Kae=L0;function ju(t,e){let r=RN(e)?new e(0):$(e,0);return r.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),r.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),r}o(ju,"transpose");function RN(t){return typeof t=="function"&&t.prototype?.constructor===t}o(RN,"isConstructor");var Xae=ju;var AN=10,zu=class{static{o(this,"Setter")}subPriority=0;validate(e,r){return!0}},Wu=class extends zu{static{o(this,"ValueSetter")}constructor(e,r,n,i,s){super(),this.value=e,this.validateValue=r,this.setValue=n,this.priority=i,s&&(this.subPriority=s)}validate(e,r){return this.validateValue(e,this.value,r)}set(e,r,n){return this.setValue(e,r,this.value,n)}},Hu=class extends zu{static{o(this,"DateTimezoneSetter")}priority=AN;subPriority=-1;constructor(e,r){super(),this.context=e||(n=>$(r,n))}set(e,r){return r.timestampIsSet?e:$(e,ju(e,this.context))}};var J=class{static{o(this,"Parser")}run(e,r,n,i){let s=this.parse(e,r,n,i);return s?{setter:new Wu(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}validate(e,r,n){return!0}};var Uu=class extends J{static{o(this,"EraParser")}priority=140;parse(e,r,n){switch(r){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}}set(e,r,n){return r.era=n,e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["R","u","t","T"]};var ve={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},ar={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Ie(t,e){return t&&{value:e(t.value),rest:t.rest}}o(Ie,"mapValue");function we(t,e){let r=e.match(t);return r?{value:parseInt(r[0],10),rest:e.slice(r[0].length)}:null}o(we,"parseNumericPattern");function lr(t,e){let r=e.match(t);if(!r)return null;if(r[0]==="Z")return{value:0,rest:e.slice(1)};let n=r[1]==="+"?1:-1,i=r[2]?parseInt(r[2],10):0,s=r[3]?parseInt(r[3],10):0,a=r[5]?parseInt(r[5],10):0;return{value:n*(i*Gt+s*yt+a*qo),rest:e.slice(r[0].length)}}o(lr,"parseTimezonePattern");function qu(t){return we(ve.anyDigitsSigned,t)}o(qu,"parseAnyDigitsSigned");function he(t,e){switch(t){case 1:return we(ve.singleDigit,e);case 2:return we(ve.twoDigits,e);case 3:return we(ve.threeDigits,e);case 4:return we(ve.fourDigits,e);default:return we(new RegExp("^\\d{1,"+t+"}"),e)}}o(he,"parseNDigits");function ls(t,e){switch(t){case 1:return we(ve.singleDigitSigned,e);case 2:return we(ve.twoDigitsSigned,e);case 3:return we(ve.threeDigitsSigned,e);case 4:return we(ve.fourDigitsSigned,e);default:return we(new RegExp("^-?\\d{1,"+t+"}"),e)}}o(ls,"parseNDigitsSigned");function cs(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}o(cs,"dayPeriodEnumToHours");function Yu(t,e){let r=e>0,n=r?e:1-e,i;if(n<=50)i=t||100;else{let s=n+50,a=Math.trunc(s/100)*100,l=t>=s%100;i=t+a-(l?100:0)}return r?i:1-i}o(Yu,"normalizeTwoDigitYear");function Vu(t){return t%400===0||t%4===0&&t%100!==0}o(Vu,"isLeapYearIndex");var Ku=class extends J{static{o(this,"YearParser")}priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(e,r,n){let i=o(s=>({year:s,isTwoDigitYear:r==="yy"}),"valueCallback");switch(r){case"y":return Ie(he(4,e),i);case"yo":return Ie(n.ordinalNumber(e,{unit:"year"}),i);default:return Ie(he(r.length,e),i)}}validate(e,r){return r.isTwoDigitYear||r.year>0}set(e,r,n){let i=e.getFullYear();if(n.isTwoDigitYear){let a=Yu(n.year,i);return e.setFullYear(a,0,1),e.setHours(0,0,0,0),e}let s=!("era"in r)||r.era===1?n.year:1-n.year;return e.setFullYear(s,0,1),e.setHours(0,0,0,0),e}};var Gu=class extends J{static{o(this,"LocalWeekYearParser")}priority=130;parse(e,r,n){let i=o(s=>({year:s,isTwoDigitYear:r==="YY"}),"valueCallback");switch(r){case"Y":return Ie(he(4,e),i);case"Yo":return Ie(n.ordinalNumber(e,{unit:"year"}),i);default:return Ie(he(r.length,e),i)}}validate(e,r){return r.isTwoDigitYear||r.year>0}set(e,r,n,i){let s=qn(e,i);if(n.isTwoDigitYear){let l=Yu(n.year,s);return e.setFullYear(l,0,i.firstWeekContainsDate),e.setHours(0,0,0,0),Le(e,i)}let a=!("era"in r)||r.era===1?n.year:1-n.year;return e.setFullYear(a,0,i.firstWeekContainsDate),e.setHours(0,0,0,0),Le(e,i)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]};var Ju=class extends J{static{o(this,"ISOWeekYearParser")}priority=130;parse(e,r){return r==="R"?ls(4,e):ls(r.length,e)}set(e,r,n){let i=$(e,0);return i.setFullYear(n,0,4),i.setHours(0,0,0,0),Ge(i)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]};var Qu=class extends J{static{o(this,"ExtendedYearParser")}priority=130;parse(e,r){return r==="u"?ls(4,e):ls(r.length,e)}set(e,r,n){return e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]};var Xu=class extends J{static{o(this,"QuarterParser")}priority=120;parse(e,r,n){switch(r){case"Q":case"QQ":return he(r.length,e);case"Qo":return n.ordinalNumber(e,{unit:"quarter"});case"QQQ":return n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(e,{width:"narrow",context:"formatting"});default:return n.quarter(e,{width:"wide",context:"formatting"})||n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,r){return r>=1&&r<=4}set(e,r,n){return e.setMonth((n-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]};var Zu=class extends J{static{o(this,"StandAloneQuarterParser")}priority=120;parse(e,r,n){switch(r){case"q":case"qq":return he(r.length,e);case"qo":return n.ordinalNumber(e,{unit:"quarter"});case"qqq":return n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(e,{width:"narrow",context:"standalone"});default:return n.quarter(e,{width:"wide",context:"standalone"})||n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,r){return r>=1&&r<=4}set(e,r,n){return e.setMonth((n-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]};var ef=class extends J{static{o(this,"MonthParser")}incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(e,r,n){let i=o(s=>s-1,"valueCallback");switch(r){case"M":return Ie(we(ve.month,e),i);case"MM":return Ie(he(2,e),i);case"Mo":return Ie(n.ordinalNumber(e,{unit:"month"}),i);case"MMM":return n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(e,{width:"narrow",context:"formatting"});default:return n.month(e,{width:"wide",context:"formatting"})||n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"})}}validate(e,r){return r>=0&&r<=11}set(e,r,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}};var tf=class extends J{static{o(this,"StandAloneMonthParser")}priority=110;parse(e,r,n){let i=o(s=>s-1,"valueCallback");switch(r){case"L":return Ie(we(ve.month,e),i);case"LL":return Ie(he(2,e),i);case"Lo":return Ie(n.ordinalNumber(e,{unit:"month"}),i);case"LLL":return n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(e,{width:"narrow",context:"standalone"});default:return n.month(e,{width:"wide",context:"standalone"})||n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"})}}validate(e,r){return r>=0&&r<=11}set(e,r,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]};function rf(t,e,r){let n=b(t,r?.in),i=ss(n,r)-e;return n.setDate(n.getDate()-i*7),b(n,r?.in)}o(rf,"setWeek");var rce=rf;var nf=class extends J{static{o(this,"LocalWeekParser")}priority=100;parse(e,r,n){switch(r){case"w":return we(ve.week,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return he(r.length,e)}}validate(e,r){return r>=1&&r<=53}set(e,r,n,i){return Le(rf(e,n,i),i)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]};function of(t,e,r){let n=b(t,r?.in),i=os(n,r)-e;return n.setDate(n.getDate()-i*7),n}o(of,"setISOWeek");var mce=of;var sf=class extends J{static{o(this,"ISOWeekParser")}priority=100;parse(e,r,n){switch(r){case"I":return we(ve.week,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return he(r.length,e)}}validate(e,r){return r>=1&&r<=53}set(e,r,n){return Ge(of(e,n))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]};var FN=[31,28,31,30,31,30,31,31,30,31,30,31],$N=[31,29,31,30,31,30,31,31,30,31,30,31],af=class extends J{static{o(this,"DateParser")}priority=90;subPriority=1;parse(e,r,n){switch(r){case"d":return we(ve.date,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return he(r.length,e)}}validate(e,r){let n=e.getFullYear(),i=Vu(n),s=e.getMonth();return i?r>=1&&r<=$N[s]:r>=1&&r<=FN[s]}set(e,r,n){return e.setDate(n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]};var lf=class extends J{static{o(this,"DayOfYearParser")}priority=90;subpriority=1;parse(e,r,n){switch(r){case"D":case"DD":return we(ve.dayOfYear,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return he(r.length,e)}}validate(e,r){let n=e.getFullYear();return Vu(n)?r>=1&&r<=366:r>=1&&r<=365}set(e,r,n){return e.setMonth(0,n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]};function Kn(t,e,r){let n=Me(),i=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,s=b(t,r?.in),a=s.getDay(),c=(e%7+7)%7,u=7-i,f=e<0||e>6?e-(a+u)%7:(c+u)%7-(a+u)%7;return et(s,f,r)}o(Kn,"setDay");var Fce=Kn;var cf=class extends J{static{o(this,"DayParser")}priority=90;parse(e,r,n){switch(r){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,r){return r>=0&&r<=6}set(e,r,n,i){return e=Kn(e,n,i),e.setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]};var uf=class extends J{static{o(this,"LocalDayParser")}priority=90;parse(e,r,n,i){let s=o(a=>{let l=Math.floor((a-1)/7)*7;return(a+i.weekStartsOn+6)%7+l},"valueCallback");switch(r){case"e":case"ee":return Ie(he(r.length,e),s);case"eo":return Ie(n.ordinalNumber(e,{unit:"day"}),s);case"eee":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeeee":return n.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,r){return r>=0&&r<=6}set(e,r,n,i){return e=Kn(e,n,i),e.setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]};var ff=class extends J{static{o(this,"StandAloneLocalDayParser")}priority=90;parse(e,r,n,i){let s=o(a=>{let l=Math.floor((a-1)/7)*7;return(a+i.weekStartsOn+6)%7+l},"valueCallback");switch(r){case"c":case"cc":return Ie(he(r.length,e),s);case"co":return Ie(n.ordinalNumber(e,{unit:"day"}),s);case"ccc":return n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"ccccc":return n.day(e,{width:"narrow",context:"standalone"});case"cccccc":return n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});default:return n.day(e,{width:"wide",context:"standalone"})||n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"})}}validate(e,r){return r>=0&&r<=6}set(e,r,n,i){return e=Kn(e,n,i),e.setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]};function pf(t,e,r){let n=b(t,r?.in),i=$u(n,r),s=e-i;return et(n,s,r)}o(pf,"setISODay");var nue=pf;var hf=class extends J{static{o(this,"ISODayParser")}priority=90;parse(e,r,n){let i=o(s=>s===0?7:s,"valueCallback");switch(r){case"i":case"ii":return he(r.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return Ie(n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),i);case"iiiii":return Ie(n.day(e,{width:"narrow",context:"formatting"}),i);case"iiiiii":return Ie(n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),i);default:return Ie(n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),i)}}validate(e,r){return r>=1&&r<=7}set(e,r,n){return e=pf(e,n),e.setHours(0,0,0,0),e}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]};var mf=class extends J{static{o(this,"AMPMParser")}priority=80;parse(e,r,n){switch(r){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,r,n){return e.setHours(cs(n),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]};var df=class extends J{static{o(this,"AMPMMidnightParser")}priority=80;parse(e,r,n){switch(r){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,r,n){return e.setHours(cs(n),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]};var gf=class extends J{static{o(this,"DayPeriodParser")}priority=80;parse(e,r,n){switch(r){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,r,n){return e.setHours(cs(n),0,0,0),e}incompatibleTokens=["a","b","t","T"]};var yf=class extends J{static{o(this,"Hour1to12Parser")}priority=70;parse(e,r,n){switch(r){case"h":return we(ve.hour12h,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return he(r.length,e)}}validate(e,r){return r>=1&&r<=12}set(e,r,n){let i=e.getHours()>=12;return i&&n<12?e.setHours(n+12,0,0,0):!i&&n===12?e.setHours(0,0,0,0):e.setHours(n,0,0,0),e}incompatibleTokens=["H","K","k","t","T"]};var xf=class extends J{static{o(this,"Hour0to23Parser")}priority=70;parse(e,r,n){switch(r){case"H":return we(ve.hour23h,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return he(r.length,e)}}validate(e,r){return r>=0&&r<=23}set(e,r,n){return e.setHours(n,0,0,0),e}incompatibleTokens=["a","b","h","K","k","t","T"]};var bf=class extends J{static{o(this,"Hour0To11Parser")}priority=70;parse(e,r,n){switch(r){case"K":return we(ve.hour11h,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return he(r.length,e)}}validate(e,r){return r>=0&&r<=11}set(e,r,n){return e.getHours()>=12&&n<12?e.setHours(n+12,0,0,0):e.setHours(n,0,0,0),e}incompatibleTokens=["h","H","k","t","T"]};var wf=class extends J{static{o(this,"Hour1To24Parser")}priority=70;parse(e,r,n){switch(r){case"k":return we(ve.hour24h,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return he(r.length,e)}}validate(e,r){return r>=1&&r<=24}set(e,r,n){let i=n<=24?n%24:n;return e.setHours(i,0,0,0),e}incompatibleTokens=["a","b","h","H","K","t","T"]};var Sf=class extends J{static{o(this,"MinuteParser")}priority=60;parse(e,r,n){switch(r){case"m":return we(ve.minute,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return he(r.length,e)}}validate(e,r){return r>=0&&r<=59}set(e,r,n){return e.setMinutes(n,0,0),e}incompatibleTokens=["t","T"]};var vf=class extends J{static{o(this,"SecondParser")}priority=50;parse(e,r,n){switch(r){case"s":return we(ve.second,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return he(r.length,e)}}validate(e,r){return r>=0&&r<=59}set(e,r,n){return e.setSeconds(n,0),e}incompatibleTokens=["t","T"]};var kf=class extends J{static{o(this,"FractionOfSecondParser")}priority=30;parse(e,r){let n=o(i=>Math.trunc(i*Math.pow(10,-r.length+3)),"valueCallback");return Ie(he(r.length,e),n)}set(e,r,n){return e.setMilliseconds(n),e}incompatibleTokens=["t","T"]};var Tf=class extends J{static{o(this,"ISOTimezoneWithZParser")}priority=10;parse(e,r){switch(r){case"X":return lr(ar.basicOptionalMinutes,e);case"XX":return lr(ar.basic,e);case"XXXX":return lr(ar.basicOptionalSeconds,e);case"XXXXX":return lr(ar.extendedOptionalSeconds,e);default:return lr(ar.extended,e)}}set(e,r,n){return r.timestampIsSet?e:$(e,e.getTime()-We(e)-n)}incompatibleTokens=["t","T","x"]};var Ef=class extends J{static{o(this,"ISOTimezoneParser")}priority=10;parse(e,r){switch(r){case"x":return lr(ar.basicOptionalMinutes,e);case"xx":return lr(ar.basic,e);case"xxxx":return lr(ar.basicOptionalSeconds,e);case"xxxxx":return lr(ar.extendedOptionalSeconds,e);default:return lr(ar.extended,e)}}set(e,r,n){return r.timestampIsSet?e:$(e,e.getTime()-We(e)-n)}incompatibleTokens=["t","T","X"]};var Df=class extends J{static{o(this,"TimestampSecondsParser")}priority=40;parse(e){return qu(e)}set(e,r,n){return[$(e,n*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"};var Cf=class extends J{static{o(this,"TimestampMillisecondsParser")}priority=20;parse(e){return qu(e)}set(e,r,n){return[$(e,n),{timestampIsSet:!0}]}incompatibleTokens="*"};var Of={G:new Uu,y:new Ku,Y:new Gu,R:new Ju,u:new Qu,Q:new Xu,q:new Zu,M:new ef,L:new tf,w:new nf,I:new sf,d:new af,D:new lf,E:new cf,e:new uf,c:new ff,i:new hf,a:new mf,b:new df,B:new gf,h:new yf,H:new xf,K:new bf,k:new wf,m:new Sf,s:new vf,S:new kf,X:new Tf,x:new Ef,t:new Df,T:new Cf};var BN=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,jN=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,zN=/^'([^]*?)'?$/,WN=/''/g,HN=/\S/,UN=/[a-zA-Z]/;function Mf(t,e,r,n){let i=o(()=>$(n?.in||r,NaN),"invalidDate"),s=Fu(),a=n?.locale??s.locale??Ft,l=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,c=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??s.weekStartsOn??s.locale?.options?.weekStartsOn??0;if(!e)return t?i():b(r,n?.in);let u={firstWeekContainsDate:l,weekStartsOn:c,locale:a},f=[new Hu(n?.in,r)],p=e.match(jN).map(y=>{let x=y[0];if(x in Yn){let T=Yn[x];return T(y,a.formatLong)}return y}).join("").match(BN),h=[];for(let y of p){!n?.useAdditionalWeekYearTokens&&Nu(y)&&Ra(y,e,t),!n?.useAdditionalDayOfYearTokens&&Iu(y)&&Ra(y,e,t);let x=y[0],T=Of[x];if(T){let{incompatibleTokens:E}=T;if(Array.isArray(E)){let P=h.find(D=>E.includes(D.token)||D.token===x);if(P)throw new RangeError(`The format string mustn't contain \`${P.fullToken}\` and \`${y}\` at the same time`)}else if(T.incompatibleTokens==="*"&&h.length>0)throw new RangeError(`The format string mustn't contain \`${y}\` and any other token at the same time`);h.push({token:x,fullToken:y});let _=T.run(t,y,a.match,u);if(!_)return i();f.push(_.setter),t=_.rest}else{if(x.match(UN))throw new RangeError("Format string contains an unescaped latin alphabet character `"+x+"`");if(y==="''"?y="'":x==="'"&&(y=qN(y)),t.indexOf(y)===0)t=t.slice(y.length);else return i()}}if(t.length>0&&HN.test(t))return i();let m=f.map(y=>y.priority).sort((y,x)=>x-y).filter((y,x,T)=>T.indexOf(y)===x).map(y=>f.filter(x=>x.priority===y).sort((x,T)=>T.subPriority-x.subPriority)).map(y=>y[0]),d=b(r,n?.in);if(isNaN(+d))return i();let g={};for(let y of m){if(!y.validate(d,u))return i();let x=y.set(d,g,u);Array.isArray(x)?(d=x[0],Object.assign(g,x[1])):d=x}return d}o(Mf,"parse");function qN(t){return t.match(zN)[1].replace(WN,"'")}o(qN,"cleanEscapedString");var hpe=Mf;function R0(t,e,r){return ht(Mf(t,e,new Date,r))}o(R0,"isMatch");var xpe=R0;function A0(t,e){return b(t,e?.in).getDay()===1}o(A0,"isMonday");var vpe=A0;function F0(t){return+b(t)<Date.now()}o(F0,"isPast");var Dpe=F0;function Fa(t,e){let r=b(t,e?.in);return r.setMinutes(0,0,0),r}o(Fa,"startOfHour");var Ipe=Fa;function If(t,e,r){let[n,i]=ee(r?.in,t,e);return+Fa(n)==+Fa(i)}o(If,"isSameHour");var Rpe=If;function us(t,e,r){let[n,i]=ee(r?.in,t,e);return+Le(n,r)==+Le(i,r)}o(us,"isSameWeek");var jpe=us;function Nf(t,e,r){return us(t,e,{...r,weekStartsOn:1})}o(Nf,"isSameISOWeek");var Upe=Nf;function $0(t,e,r){let[n,i]=ee(r?.in,t,e);return+Jt(n)==+Jt(i)}o($0,"isSameISOWeekYear");var Gpe=$0;function $a(t,e){let r=b(t,e?.in);return r.setSeconds(0,0),r}o($a,"startOfMinute");var Zpe=$a;function Pf(t,e){return+$a(t)==+$a(e)}o(Pf,"isSameMinute");var nhe=Pf;function _f(t,e,r){let[n,i]=ee(r?.in,t,e);return n.getFullYear()===i.getFullYear()&&n.getMonth()===i.getMonth()}o(_f,"isSameMonth");var ahe=_f;function Lf(t,e,r){let[n,i]=ee(r?.in,t,e);return+en(n)==+en(i)}o(Lf,"isSameQuarter");var phe=Lf;function Ba(t,e){let r=b(t,e?.in);return r.setMilliseconds(0),r}o(Ba,"startOfSecond");var ghe=Ba;function Rf(t,e){return+Ba(t)==+Ba(e)}o(Rf,"isSameSecond");var whe=Rf;function Af(t,e,r){let[n,i]=ee(r?.in,t,e);return n.getFullYear()===i.getFullYear()}o(Af,"isSameYear");var The=Af;function B0(t,e){return If(b(t,e?.in),de(e?.in||t))}o(B0,"isThisHour");var Ihe=B0;function j0(t,e){return Nf($(e?.in||t,t),de(e?.in||t))}o(j0,"isThisISOWeek");var Ahe=j0;function z0(t){return Pf(t,de(t))}o(z0,"isThisMinute");var zhe=z0;function W0(t,e){return _f($(e?.in||t,t),de(e?.in||t))}o(W0,"isThisMonth");var Vhe=W0;function H0(t,e){return Lf($(e?.in||t,t),de(e?.in||t))}o(H0,"isThisQuarter");var Zhe=H0;function U0(t){return Rf(t,de(t))}o(U0,"isThisSecond");var ime=U0;function q0(t,e){return us($(e?.in||t,t),de(e?.in||t),e)}o(q0,"isThisWeek");var ume=q0;function Y0(t,e){return Af($(e?.in||t,t),de(e?.in||t))}o(Y0,"isThisYear");var gme=Y0;function V0(t,e){return b(t,e?.in).getDay()===4}o(V0,"isThursday");var wme=V0;function K0(t,e){return Xr($(e?.in||t,t),de(e?.in||t))}o(K0,"isToday");var Dme=K0;function G0(t,e){return Xr(t,et(de(e?.in||t),1),e)}o(G0,"isTomorrow");var Pme=G0;function J0(t,e){return b(t,e?.in).getDay()===2}o(J0,"isTuesday");var Ame=J0;function Q0(t,e){return b(t,e?.in).getDay()===3}o(Q0,"isWednesday");var jme=Q0;function X0(t,e,r){let n=+b(t,r?.in),[i,s]=[+b(e.start,r?.in),+b(e.end,r?.in)].sort((a,l)=>a-l);return n>=i&&n<=s}o(X0,"isWithinInterval");var Ume=X0;function Gn(t,e,r){return et(t,-e,r)}o(Gn,"subDays");var Kme=Gn;function Z0(t,e){return Xr($(e?.in||t,t),Gn(de(e?.in||t),1))}o(Z0,"isYesterday");var tde=Z0;function eS(t,e){let r=b(t,e?.in),n=r.getFullYear(),i=9+Math.floor(n/10)*10;return r.setFullYear(i+1,0,0),r.setHours(0,0,0,0),b(r,e?.in)}o(eS,"lastDayOfDecade");var ode=eS;function Ff(t,e){let r=Me(),n=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=b(t,e?.in),s=i.getDay(),a=(s<n?-7:0)+6-(s-n);return i.setHours(0,0,0,0),i.setDate(i.getDate()+a),i}o(Ff,"lastDayOfWeek");var ude=Ff;function tS(t,e){return Ff(t,{...e,weekStartsOn:1})}o(tS,"lastDayOfISOWeek");var mde=tS;function rS(t,e){let r=Mt(t,e),n=$(e?.in||t,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);let i=Ge(n,e);return i.setDate(i.getDate()-1),i}o(rS,"lastDayOfISOWeekYear");var wde=rS;function nS(t,e){let r=b(t,e?.in),n=r.getMonth(),i=n-n%3+3;return r.setMonth(i,0),r.setHours(0,0,0,0),r}o(nS,"lastDayOfQuarter");var Tde=nS;function iS(t,e){let r=b(t,e?.in),n=r.getFullYear();return r.setFullYear(n+1,0,0),r.setHours(0,0,0,0),r}o(iS,"lastDayOfYear");var Ode=iS;var YN=/(\w)\1*|''|'(''|[^'])+('|$)|./g,VN=/^'([^]*?)'?$/,KN=/''/g,GN=/[a-zA-Z]/;function oS(t,e){let r=b(t);if(!ht(r))throw new RangeError("Invalid time value");let n=e.match(YN);return n?n.map(s=>{if(s==="''")return"'";let a=s[0];if(a==="'")return JN(s);let l=Qt[a];if(l)return l(r,s);if(a.match(GN))throw new RangeError("Format string contains an unescaped latin alphabet character `"+a+"`");return s}).join(""):""}o(oS,"lightFormat");function JN(t){let e=t.match(VN);return e?e[1].replace(KN,"'"):t}o(JN,"cleanEscapedString");var Lde=oS;function sS({years:t,months:e,weeks:r,days:n,hours:i,minutes:s,seconds:a}){let l=0;t&&(l+=t*365.2425),e&&(l+=e*(365.2425/12)),r&&(l+=r*7),n&&(l+=n);let c=l*24*60*60;return i&&(c+=i*60*60),s&&(c+=s*60),a&&(c+=a),Math.trunc(c*1e3)}o(sS,"milliseconds");var $de=sS;function aS(t){let e=t/Gt;return Math.trunc(e)}o(aS,"millisecondsToHours");var Wde=aS;function lS(t){let e=t/yt;return Math.trunc(e)}o(lS,"millisecondsToMinutes");var Yde=lS;function cS(t){let e=t/qo;return Math.trunc(e)}o(cS,"millisecondsToSeconds");var Jde=cS;function uS(t){let e=t/ou;return Math.trunc(e)}o(uS,"minutesToHours");var ege=uS;function fS(t){return Math.trunc(t*yt)}o(fS,"minutesToMilliseconds");var ige=fS;function pS(t){return Math.trunc(t*Vo)}o(pS,"minutesToSeconds");var lge=pS;function hS(t){let e=t/su;return Math.trunc(e)}o(hS,"monthsToQuarters");var pge=hS;function mS(t){let e=t/au;return Math.trunc(e)}o(mS,"monthsToYears");var gge=mS;function wt(t,e,r){let n=e-Vn(t,r);return n<=0&&(n+=7),et(t,n,r)}o(wt,"nextDay");var Sge=wt;function dS(t,e){return wt(t,5,e)}o(dS,"nextFriday");var Ege=dS;function gS(t,e){return wt(t,1,e)}o(gS,"nextMonday");var Mge=gS;function yS(t,e){return wt(t,6,e)}o(yS,"nextSaturday");var _ge=yS;function xS(t,e){return wt(t,0,e)}o(xS,"nextSunday");var Fge=xS;function bS(t,e){return wt(t,4,e)}o(bS,"nextThursday");var zge=bS;function wS(t,e){return wt(t,2,e)}o(wS,"nextTuesday");var qge=wS;function SS(t,e){return wt(t,3,e)}o(SS,"nextWednesday");var Gge=SS;function kS(t,e){let r=o(()=>$(e?.in,NaN),"invalidDate"),n=e?.additionalDigits??2,i=eP(t),s;if(i.date){let u=tP(i.date,n);s=rP(u.restDateString,u.year)}if(!s||isNaN(+s))return r();let a=+s,l=0,c;if(i.time&&(l=nP(i.time),isNaN(l)))return r();if(i.timezone){if(c=iP(i.timezone),isNaN(c))return r()}else{let u=new Date(a+l),f=b(0,e?.in);return f.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),f.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),f}return b(a+l+c,e?.in)}o(kS,"parseISO");var $f={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},QN=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,XN=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,ZN=/^([+-])(\d{2})(?::?(\d{2}))?$/;function eP(t){let e={},r=t.split($f.dateTimeDelimiter),n;if(r.length>2)return e;if(/:/.test(r[0])?n=r[0]:(e.date=r[0],n=r[1],$f.timeZoneDelimiter.test(e.date)&&(e.date=t.split($f.timeZoneDelimiter)[0],n=t.substr(e.date.length,t.length))),n){let i=$f.timezone.exec(n);i?(e.time=n.replace(i[1],""),e.timezone=i[1]):e.time=n}return e}o(eP,"splitDateString");function tP(t,e){let r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),n=t.match(r);if(!n)return{year:NaN,restDateString:""};let i=n[1]?parseInt(n[1]):null,s=n[2]?parseInt(n[2]):null;return{year:s===null?i:s*100,restDateString:t.slice((n[1]||n[2]).length)}}o(tP,"parseYear");function rP(t,e){if(e===null)return new Date(NaN);let r=t.match(QN);if(!r)return new Date(NaN);let n=!!r[4],i=ja(r[1]),s=ja(r[2])-1,a=ja(r[3]),l=ja(r[4]),c=ja(r[5])-1;if(n)return cP(e,l,c)?oP(e,l,c):new Date(NaN);{let u=new Date(0);return!aP(e,s,a)||!lP(e,i)?new Date(NaN):(u.setUTCFullYear(e,s,Math.max(i,a)),u)}}o(rP,"parseDate");function ja(t){return t?parseInt(t):1}o(ja,"parseDateUnit");function nP(t){let e=t.match(XN);if(!e)return NaN;let r=Gm(e[1]),n=Gm(e[2]),i=Gm(e[3]);return uP(r,n,i)?r*Gt+n*yt+i*1e3:NaN}o(nP,"parseTime");function Gm(t){return t&&parseFloat(t.replace(",","."))||0}o(Gm,"parseTimeUnit");function iP(t){if(t==="Z")return 0;let e=t.match(ZN);if(!e)return 0;let r=e[1]==="+"?-1:1,n=parseInt(e[2]),i=e[3]&&parseInt(e[3])||0;return fP(n,i)?r*(n*Gt+i*yt):NaN}o(iP,"parseTimezone");function oP(t,e,r){let n=new Date(0);n.setUTCFullYear(t,0,4);let i=n.getUTCDay()||7,s=(e-1)*7+r+1-i;return n.setUTCDate(n.getUTCDate()+s),n}o(oP,"dayOfISOWeekYear");var sP=[31,null,31,30,31,30,31,31,30,31,30,31];function vS(t){return t%400===0||t%4===0&&t%100!==0}o(vS,"isLeapYearIndex");function aP(t,e,r){return e>=0&&e<=11&&r>=1&&r<=(sP[e]||(vS(t)?29:28))}o(aP,"validateDate");function lP(t,e){return e>=1&&e<=(vS(t)?366:365)}o(lP,"validateDayOfYearDate");function cP(t,e,r){return e>=1&&e<=53&&r>=0&&r<=6}o(cP,"validateWeekDate");function uP(t,e,r){return t===24?e===0&&r===0:r>=0&&r<60&&e>=0&&e<60&&t>=0&&t<25}o(uP,"validateTime");function fP(t,e){return e>=0&&e<=59}o(fP,"validateTimezone");var tye=kS;function TS(t,e){let r=t.match(/(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2}):(\d{2})(?:\.(\d{0,7}))?(?:Z|(.)(\d{2}):?(\d{2})?)?/);return r?b(Date.UTC(+r[1],+r[2]-1,+r[3],+r[4]-(+r[9]||0)*(r[8]=="-"?-1:1),+r[5]-(+r[10]||0)*(r[8]=="-"?-1:1),+r[6],+((r[7]||"0")+"00").substring(0,3)),e?.in):b(NaN,e?.in)}o(TS,"parseJSON");var oye=TS;function St(t,e,r){let n=Vn(t,r)-e;return n<=0&&(n+=7),Gn(t,n,r)}o(St,"previousDay");var uye=St;function ES(t,e){return St(t,5,e)}o(ES,"previousFriday");var mye=ES;function DS(t,e){return St(t,1,e)}o(DS,"previousMonday");var xye=DS;function CS(t,e){return St(t,6,e)}o(CS,"previousSaturday");var vye=CS;function OS(t,e){return St(t,0,e)}o(OS,"previousSunday");var Dye=OS;function MS(t,e){return St(t,4,e)}o(MS,"previousThursday");var Iye=MS;function IS(t,e){return St(t,2,e)}o(IS,"previousTuesday");var Lye=IS;function NS(t,e){return St(t,3,e)}o(NS,"previousWednesday");var $ye=NS;function PS(t){return Math.trunc(t*su)}o(PS,"quartersToMonths");var Wye=PS;function _S(t){let e=t/lu;return Math.trunc(e)}o(_S,"quartersToYears");var Yye=_S;function LS(t,e){let r=e?.nearestTo??1;if(r<1||r>12)return $(e?.in||t,NaN);let n=b(t,e?.in),i=n.getMinutes()/60,s=n.getSeconds()/60/60,a=n.getMilliseconds()/1e3/60/60,l=n.getHours()+i+s+a,c=e?.roundingMethod??"round",f=bt(c)(l/r)*r;return n.setHours(f,0,0,0),n}o(LS,"roundToNearestHours");var Xye=LS;function RS(t,e){let r=e?.nearestTo??1;if(r<1||r>30)return $(t,NaN);let n=b(t,e?.in),i=n.getSeconds()/60,s=n.getMilliseconds()/1e3/60,a=n.getMinutes()+i+s,l=e?.roundingMethod??"round",u=bt(l)(a/r)*r;return n.setMinutes(u,0,0),n}o(RS,"roundToNearestMinutes");var ixe=RS;function AS(t){let e=t/Li;return Math.trunc(e)}o(AS,"secondsToHours");var lxe=AS;function FS(t){return t*qo}o(FS,"secondsToMilliseconds");var pxe=FS;function $S(t){let e=t/Vo;return Math.trunc(e)}o($S,"secondsToMinutes");var gxe=$S;function fs(t,e,r){let n=b(t,r?.in),i=n.getFullYear(),s=n.getDate(),a=$(r?.in||t,0);a.setFullYear(i,e,15),a.setHours(0,0,0,0);let l=Ru(a);return n.setMonth(e,Math.min(s,l)),n}o(fs,"setMonth");var vxe=fs;function BS(t,e,r){let n=b(t,r?.in);return isNaN(+n)?$(r?.in||t,NaN):(e.year!=null&&n.setFullYear(e.year),e.month!=null&&(n=fs(n,e.month)),e.date!=null&&n.setDate(e.date),e.hours!=null&&n.setHours(e.hours),e.minutes!=null&&n.setMinutes(e.minutes),e.seconds!=null&&n.setSeconds(e.seconds),e.milliseconds!=null&&n.setMilliseconds(e.milliseconds),n)}o(BS,"set");var Oxe=BS;function jS(t,e,r){let n=b(t,r?.in);return n.setDate(e),n}o(jS,"setDate");var Pxe=jS;function zS(t,e,r){let n=b(t,r?.in);return n.setMonth(0),n.setDate(e),n}o(zS,"setDayOfYear");var Axe=zS;function WS(t){let e={},r=Me();for(let n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(t[n]===void 0?delete e[n]:e[n]=t[n]);fw(e)}o(WS,"setDefaultOptions");var jxe=WS;function HS(t,e,r){let n=b(t,r?.in);return n.setHours(e),n}o(HS,"setHours");var Uxe=HS;function US(t,e,r){let n=b(t,r?.in);return n.setMilliseconds(e),n}o(US,"setMilliseconds");var Kxe=US;function qS(t,e,r){let n=b(t,r?.in);return n.setMinutes(e),n}o(qS,"setMinutes");var Xxe=qS;function YS(t,e,r){let n=b(t,r?.in),i=Math.trunc(n.getMonth()/3)+1,s=e-i;return fs(n,n.getMonth()+s*3)}o(YS,"setQuarter");var nbe=YS;function VS(t,e,r){let n=b(t,r?.in);return n.setSeconds(e),n}o(VS,"setSeconds");var abe=VS;function KS(t,e,r){let n=Me(),i=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=st(b(t,r?.in),Bi(t,r),r),a=$(r?.in||t,0);a.setFullYear(e,0,i),a.setHours(0,0,0,0);let l=Bi(a,r);return l.setDate(l.getDate()+s),l}o(KS,"setWeekYear");var dbe=KS;function GS(t,e,r){let n=b(t,r?.in);return isNaN(+n)?$(r?.in||t,NaN):(n.setFullYear(e),n)}o(GS,"setYear");var wbe=GS;function JS(t,e){let r=b(t,e?.in),n=r.getFullYear(),i=Math.floor(n/10)*10;return r.setFullYear(i,0,1),r.setHours(0,0,0,0),r}o(JS,"startOfDecade");var Tbe=JS;function QS(t){return Qr(Date.now(),t)}o(QS,"startOfToday");var Obe=QS;function XS(t){let e=de(t?.in),r=e.getFullYear(),n=e.getMonth(),i=e.getDate(),s=$(t?.in,0);return s.setFullYear(r,n,i+1),s.setHours(0,0,0,0),s}o(XS,"startOfTomorrow");var _be=XS;function ZS(t){let e=de(t?.in),r=e.getFullYear(),n=e.getMonth(),i=e.getDate(),s=de(t?.in);return s.setFullYear(r,n,i-1),s.setHours(0,0,0,0),s}o(ZS,"startOfYesterday");var Fbe=ZS;function Bf(t,e,r){return Gr(t,-e,r)}o(Bf,"subMonths");var zbe=Bf;function ev(t,e,r){let{years:n=0,months:i=0,weeks:s=0,days:a=0,hours:l=0,minutes:c=0,seconds:u=0}=e,f=Bf(t,i+n*12,r),p=Gn(f,a+s*7,r),h=c+l*60,d=(u+h*60)*1e3;return $(r?.in||t,+p-d)}o(ev,"sub");var Vbe=ev;function tv(t,e,r){return fu(t,-e,r)}o(tv,"subBusinessDays");var Qbe=tv;function rv(t,e,r){return pu(t,-e,r)}o(rv,"subHours");var twe=rv;function nv(t,e,r){return jn(t,-e,r)}o(nv,"subMilliseconds");var owe=nv;function iv(t,e,r){return Ko(t,-e,r)}o(iv,"subMinutes");var cwe=iv;function ov(t,e,r){return Go(t,-e,r)}o(ov,"subQuarters");var hwe=ov;function sv(t,e,r){return du(t,-e,r)}o(sv,"subSeconds");var ywe=sv;function av(t,e,r){return zn(t,-e,r)}o(av,"subWeeks");var Swe=av;function lv(t,e,r){return gu(t,-e,r)}o(lv,"subYears");var Ewe=lv;function cv(t){return Math.trunc(t*7)}o(cv,"weeksToDays");var Mwe=cv;function uv(t){return Math.trunc(t*365.2425)}o(uv,"yearsToDays");var _we=uv;function fv(t){return Math.trunc(t*au)}o(fv,"yearsToMonths");var Fwe=fv;function pv(t){return Math.trunc(t*lu)}o(pv,"yearsToQuarters");var zwe=pv;var dv=o(t=>Number.isFinite(t)?t:0,"toZeroIfInfinity");function pP(t){return{days:Math.trunc(t/864e5),hours:Math.trunc(t/36e5%24),minutes:Math.trunc(t/6e4%60),seconds:Math.trunc(t/1e3%60),milliseconds:Math.trunc(t%1e3),microseconds:Math.trunc(dv(t*1e3)%1e3),nanoseconds:Math.trunc(dv(t*1e6)%1e3)}}o(pP,"parseNumber");function hP(t){return{days:t/86400000n,hours:t/3600000n%24n,minutes:t/60000n%60n,seconds:t/1000n%60n,milliseconds:t%1000n,microseconds:0n,nanoseconds:0n}}o(hP,"parseBigint");function ed(t){switch(typeof t){case"number":{if(Number.isFinite(t))return pP(t);break}case"bigint":return hP(t)}throw new TypeError("Expected a finite number or bigint")}o(ed,"parseMilliseconds");var mP=o(t=>t===0||t===0n,"isZero"),dP=o((t,e)=>e===1||e===1n?t:`${t}s`,"pluralize"),gP=1e-7,yP=24n*60n*60n*1000n;function Wa(t,e){let r=typeof t=="bigint";if(!r&&!Number.isFinite(t))throw new TypeError("Expected a finite number or bigint");e={...e};let n=t<0?"-":"";t=t<0?-t:t,e.colonNotation&&(e.compact=!1,e.formatSubMilliseconds=!1,e.separateMilliseconds=!1,e.verbose=!1),e.compact&&(e.unitCount=1,e.secondsDecimalDigits=0,e.millisecondsDecimalDigits=0);let i=[],s=o((f,p)=>{let h=Math.floor(f*10**p+gP);return(Math.round(h)/10**p).toFixed(p)},"floorDecimals"),a=o((f,p,h,m)=>{if(!((i.length===0||!e.colonNotation)&&mP(f)&&!(e.colonNotation&&h==="m"))){if(m??=String(f),e.colonNotation){let d=m.includes(".")?m.split(".")[0].length:m.length,g=i.length>0?2:1;m="0".repeat(Math.max(0,g-d))+m}else m+=e.verbose?" "+dP(p,f):h;i.push(m)}},"add"),l=ed(t),c=BigInt(l.days);if(e.hideYearAndDays?a(BigInt(c)*24n+BigInt(l.hours),"hour","h"):(e.hideYear?a(c,"day","d"):(a(c/365n,"year","y"),a(c%365n,"day","d")),a(Number(l.hours),"hour","h")),a(Number(l.minutes),"minute","m"),!e.hideSeconds)if(e.separateMilliseconds||e.formatSubMilliseconds||!e.colonNotation&&t<1e3&&!e.subSecondsAsDecimals){let f=Number(l.seconds),p=Number(l.milliseconds),h=Number(l.microseconds),m=Number(l.nanoseconds);if(a(f,"second","s"),e.formatSubMilliseconds)a(p,"millisecond","ms"),a(h,"microsecond","\xB5s"),a(m,"nanosecond","ns");else{let d=p+h/1e3+m/1e6,g=typeof e.millisecondsDecimalDigits=="number"?e.millisecondsDecimalDigits:0,y=d>=1?Math.round(d):Math.ceil(d),x=g?d.toFixed(g):y;a(Number.parseFloat(x),"millisecond","ms",x)}}else{let f=(r?Number(t%yP):t)/1e3%60,p=typeof e.secondsDecimalDigits=="number"?e.secondsDecimalDigits:1,h=s(f,p),m=e.keepDecimalsOnWholeSeconds?h:h.replace(/\.0+$/,"");a(Number.parseFloat(m),"second","s",m)}if(i.length===0)return n+"0"+(e.verbose?" milliseconds":"ms");let u=e.colonNotation?":":" ";return typeof e.unitCount=="number"&&(i=i.slice(0,Math.max(e.unitCount,1))),n+i.join(u)}o(Wa,"prettyMilliseconds");var zi=zr(hv(),1),gv=zr(mv(),1);zi.default.extend(gv.default);var Ha=class{static{o(this,"CronJob")}constructor(e,r,n){this.status="initial",this.nextExecutionUnix=0,this.cronExpression=r,this.jobFunction=n,this.cronParser=new Na.Cron(r)}checkExecution(){if(this.status==="stopped")return this.nextExecutionUnix;if(this.nextExecutionUnix===0&&this.getNextExecutionTime(),Date.now()>this.nextExecutionUnix){let e=this.jobFunction(this.nextExecutionUnix);e instanceof Promise&&e.catch(r=>console.log(r)),this.nextExecutionUnix=this.getNextExecutionTime()}return this.nextExecutionUnix}getNextExecutionTime(){return this.nextExecutionUnix=Date.now()+this.getTimeToNextExecution()}getTimeToNextExecution(){return this.cronParser.msToNext()}start(){this.status="started"}stop(){this.status="stopped"}};var td=class{static{o(this,"CronManager")}constructor(){this.status="stopped",this.cronjobs=new vt.ObjectMap,this.cycleWakeDeferred=null}wakeCycle(){this.cycleWakeDeferred&&this.cycleWakeDeferred.status==="pending"&&this.cycleWakeDeferred.resolve()}addCronjob(e,r){let n=new Ha(this,e,r);return this.cronjobs.add(n),this.status==="started"&&(n.start(),this.wakeCycle()),n}removeCronjob(e){e.stop(),this.cronjobs.remove(e),this.status==="started"&&this.wakeCycle()}start(){if(this.status!=="started"){this.status="started";for(let e of this.cronjobs.getArray())e.start();this.runCronCycle()}}async runCronCycle(){for(;this.status==="started";){this.cycleWakeDeferred=new te.Deferred;let e=1/0;for(let r of this.cronjobs.getArray()){r.checkExecution();let n=r.getTimeToNextExecution();n<e&&(e=n)}if(e<1/0&&e>0)this.executionTimeout=new be.Timeout(e),await Promise.race([this.executionTimeout.promise,this.cycleWakeDeferred.promise]),this.executionTimeout.cancel();else{if(e<=0)continue;await this.cycleWakeDeferred.promise}}this.cycleWakeDeferred=null}stop(){this.status==="started"&&(this.status="stopped",this.executionTimeout&&this.executionTimeout.cancel(),this.wakeCycle());for(let e of this.cronjobs.getArray())e.stop()}};var Jn={years:o((t=1)=>t*3154e7,"years"),months:o((t=1)=>t*2628e6,"months"),weeks:o((t=1)=>t*6048e5,"weeks"),days:o((t=1)=>t*864e5,"days"),hours:o((t=1)=>t*36e5,"hours"),minutes:o((t=1)=>t*6e4,"minutes"),seconds:o((t=1)=>t*1e3,"seconds")},rd=o(t=>{let e=0,r=o(n=>{e=e+n},"addMilliSeconds");return t.years&&r(Jn.years(t.years)),t.months&&r(Jn.months(t.months)),t.weeks&&r(Jn.weeks(t.weeks)),t.days&&r(Jn.days(t.days)),t.hours&&r(Jn.hours(t.hours)),t.minutes&&r(Jn.minutes(t.minutes)),t.seconds&&r(Jn.seconds(t.seconds)),e},"getMilliSecondsFromUnits"),xP=o(t=>Wa(t),"getMilliSecondsAsHumanReadableString"),bP=o(t=>za.formatDistanceToNow(new Date(t)),"getMilliSecondsAsHumanReadableAgoTime");var nd=class t extends Date{static{o(this,"ExtendedDate")}static fromMillis(e){return new t(e)}static fromDate(e){return new t(e.getTime())}static fromEuropeanDate(e){let r=/(.*)\.(.*)\.(.*)/.exec(e),i=new Date(parseFloat(r[3]),parseFloat(r[2])-1,parseFloat(r[1])).getTime();return new t(i)}static fromHyphedDate(e){let r=new Date(e).getTime();return new t(r)}static fromEuropeanDateAndTime(e,r="12:00:00",n="Europe/Berlin"){let i=/(.*)\.(.*)\.(.*)/.exec(e),s=o(u=>`0${u}`.slice(-2),"sliceDate"),a=`${i[3]}-${s(i[2])}-${s(i[1])}T${r}`,c=zi.default(a).toDate().getTime();return new t(c)}constructor(e=Date.now()){super(e)}exportToEuropeanDate(){let e=this.exportToUnits();return`${e.dayString}.${e.monthString}.${e.yearString}`}exportToHyphedSortableDate(){let e=this.exportToUnits();return`${e.yearString}-${e.monthString}-${e.dayString}`}exportToUnits(){let e=["January","February","March","April","May","June","July","August","September","October","November","December"],r=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"];return{year:this.getFullYear(),yearString:`${this.getFullYear()}`,month:this.getMonth()+1,monthString:("0"+(this.getMonth()+1)).slice(-2),monthName:e[this.getMonth()],day:this.getDate(),dayString:("0"+this.getDate()).slice(-2),dayOfTheWeek:this.getDay(),dayOfTheWeekName:r[this.getDay()]}}format(e){return zi.default(this.getTime()).format(e)}isToday(){return zi.default(this.getTime()).isToday()}lessTimePassedToNow(e){let r=rd(e);return Date.now()-this.getTime()<r}moreTimePassedToNow(e){return!this.lessTimePassedToNow(e)}};var id=class{static{o(this,"HrtMeasurement")}constructor(){this.nanoSeconds=null,this.milliSeconds=null,this._milliStart=null,this._milliDiff=null,this._started=!1}start(){this._started=!0,this._milliStart=Date.now()}stop(){if(this._started===!1){console.log("Hasn't started yet");return}return this._milliDiff=Date.now()-this._milliStart,this.nanoSeconds=this._milliDiff*1e3,this.milliSeconds=this._milliDiff,this}reset(){this.nanoSeconds=null,this.milliSeconds=null,this._milliStart=null,this._milliDiff=null,this._started=!1}};var od=class{static{o(this,"Interval")}constructor(e){this.status="initial",this.statusAuthorization=null,this.intervalJobs=[],this.intervalMilliseconds=e}start(){this.status="started";let e=new Date;this.statusAuthorization=e,o(async()=>{for(;this.status==="started"&&this.statusAuthorization===e;)await be.delayFor(this.intervalMilliseconds),this.executeIntervalJobs()},"runInterval")()}stop(){this.status="stopped",this.statusAuthorization=null}addIntervalJob(e){this.intervalJobs.push(e)}executeIntervalJobs(){for(let e of this.intervalJobs)e()}};var hs=class t{static{o(this,"TimeStamp")}static fromMilliSeconds(e){return new t(e)}static fromTimeStamp(e){let r=new t;return r.change=r.milliSeconds-e.milliSeconds,r}constructor(e){this.change=null,e?typeof e=="number"&&(this.date=new Date(e)):this.date=new Date,this.milliSeconds=this.date.getTime(),this.epochtime=Math.floor(this.milliSeconds/1e3)}isOlderThanOtherTimeStamp(e,r=0){return this.milliSeconds<e.milliSeconds-r}isOlderThan(e,r=0){return this.milliSeconds+r<e.milliSeconds}isYoungerThanOtherTimeStamp(e,r=0){return this.milliSeconds>e.milliSeconds+r}isYoungerThanMilliSeconds(e){let n=new t().epochtime-e,i=new t(n);return this.isYoungerThanOtherTimeStamp(i)}};var sd=class{static{o(this,"Timer")}get timeLeft(){return this.timeInMilliseconds-this.pausedAt.change}constructor(e){this.state="initiated",this.completedDeferred=te.defer(),this.timeInMilliseconds=e,this.completed=this.completedDeferred.promise}start(){if(!this.startedAt)this.currentTimeout=setTimeout(()=>{this.completedDeferred.resolve()},this.timeInMilliseconds),this.startedAt=new hs;else throw new Error("timer has been started before. Please use resume instead")}pause(){this.startedAt&&(clearTimeout(this.currentTimeout),this.currentTimeout=null,this.pausedAt=hs.fromTimeStamp(this.startedAt))}resume(){if(this.startedAt)this.currentTimeout=setTimeout(()=>{this.completedDeferred.resolve()},this.timeLeft);else throw new Error("timer has NOT been started before. Please use .start() instead")}reset(){this.pause(),this.startedAt=null,this.pausedAt=null}};var zf=zr(Cv(),1);var ld=class{static{o(this,"AsyncExecutionStack")}executionSlots=[];isProcessing=!1;nonExclusiveMaxConcurrency=1/0;nonExclusiveCurrentCount=0;nonExclusivePendingQueue=[];async getExclusiveExecutionSlot(e,r){let n=te.defer(),i={funcToExecute:e,executionDeferred:n,timeout:r,mode:"exclusive"};return this.executionSlots.push(i),this.processExecutionSlots(),n.promise}async getNonExclusiveExecutionSlot(e,r){let n=te.defer(),i={funcToExecute:e,executionDeferred:n,timeout:r,mode:"nonexclusive"};return this.executionSlots.push(i),this.processExecutionSlots(),n.promise}setNonExclusiveMaxConcurrency(e){if(!Number.isFinite(e)||e<1)throw new Error("nonExclusiveMaxConcurrency must be a finite number >= 1");this.nonExclusiveMaxConcurrency=e}getNonExclusiveMaxConcurrency(){return this.nonExclusiveMaxConcurrency}getActiveNonExclusiveCount(){return this.nonExclusiveCurrentCount}getPendingNonExclusiveCount(){return this.nonExclusivePendingQueue.length}async processExecutionSlots(){if(!this.isProcessing){for(this.isProcessing=!0;this.executionSlots.length>0;){let e=this.executionSlots[0];if(e.mode==="exclusive")await this.executeExclusiveSlot(e),this.executionSlots.shift();else{let r=[];for(;this.executionSlots.length>0&&this.executionSlots[0].mode==="nonexclusive";)r.push(this.executionSlots.shift());await this.executeNonExclusiveSlots(r)}}this.isProcessing=!1}}async executeExclusiveSlot(e){try{if(e.timeout){let r=new be.Timeout(e.timeout);try{let n=await Promise.race([e.funcToExecute(),r.promise.then(()=>{throw new Error("Timeout reached")})]);r.cancel(),e.executionDeferred.resolve(n)}catch(n){throw r.cancel(),n}}else{let r=await e.funcToExecute();e.executionDeferred.resolve(r)}}catch(r){e.executionDeferred.reject(r)}}async executeNonExclusiveSlots(e){let r=e.map(async n=>{await this.waitForNonExclusiveSlot();try{if(n.timeout){let i=new be.Timeout(n.timeout);try{let s=await Promise.race([n.funcToExecute(),i.promise.then(()=>{throw new Error("Timeout reached")})]);i.cancel(),n.executionDeferred.resolve(s)}catch(s){throw i.cancel(),s}}else{let i=await n.funcToExecute();n.executionDeferred.resolve(i)}}catch(i){n.executionDeferred.reject(i)}finally{this.releaseNonExclusiveSlot()}});await Promise.all(r)}waitForNonExclusiveSlot(){return this.nonExclusiveCurrentCount<this.nonExclusiveMaxConcurrency?(this.nonExclusiveCurrentCount++,Promise.resolve()):new Promise(e=>{this.nonExclusivePendingQueue.push(()=>{this.nonExclusiveCurrentCount++,e()})})}releaseNonExclusiveSlot(){this.nonExclusiveCurrentCount--;let e=this.nonExclusivePendingQueue.shift();e&&e()}};var cd=class{static{o(this,"BackpressuredArray")}data;highWaterMark;hasSpace=new Pe.rxjs.Subject;itemsAvailable=new Pe.rxjs.Subject;isDestroyed=!1;constructor(e=16){this.data=[],this.highWaterMark=e}get length(){return this.data.length}push(e){this.data.push(e),this.itemsAvailable.next("itemsAvailable");let r=this.checkSpaceAvailable();return r&&this.hasSpace.next("hasSpace"),r}pushMany(e){for(let r of e)this.push(r);return this.checkSpaceAvailable()}shift(){let e=this.data.shift();return this.checkSpaceAvailable()&&this.hasSpace.next("hasSpace"),e}peek(){return this.data[0]}checkSpaceAvailable(){return this.data.length<this.highWaterMark}checkHasItems(){return this.data.length>0}waitForSpace(){return new Promise(e=>{if(this.checkSpaceAvailable()||this.isDestroyed)e();else{let r=this.hasSpace.subscribe({next:o(()=>{r.unsubscribe(),e()},"next"),complete:o(()=>{e()},"complete")})}})}waitForItems(){return new Promise(e=>{if(this.data.length>0||this.isDestroyed)e();else{let r=this.itemsAvailable.subscribe({next:o(()=>{r.unsubscribe(),e()},"next"),complete:o(()=>{e()},"complete")})}})}[Symbol.iterator](){return this.data[Symbol.iterator]()}destroy(){this.isDestroyed=!0,this.hasSpace.complete(),this.itemsAvailable.complete()}};var Hi=class t{static{o(this,"FastMap")}mapObject=new Map;isUniqueKey(e){return!this.mapObject.has(e)}has(e){return this.mapObject.has(e)}get size(){return this.mapObject.size}addToMap(e,r,n){return this.isUniqueKey(e)||n&&n.force?(this.mapObject.set(e,r),!0):!1}getByKey(e){return this.mapObject.get(e)}removeFromMap(e){let r=this.mapObject.get(e);return this.mapObject.delete(e),r}getKeys(){return Array.from(this.mapObject.keys())}values(){return Array.from(this.mapObject.values())}entries(){return Array.from(this.mapObject.entries())}clean(){this.mapObject.clear()}concat(e){let r=new t;for(let n of this.getKeys())r.addToMap(n,this.getByKey(n));for(let n of e.getKeys())r.addToMap(n,e.getByKey(n),{force:!0});return r}addAllFromOther(e){for(let r of e.getKeys())this.addToMap(r,e.getByKey(r),{force:!0})}async find(e){for(let r of this.getKeys()){let n=this.getByKey(r);if(await e(n))return n}}[Symbol.iterator](){return this.mapObject.entries()}};var Ov=o((t="uni")=>`${t}xxxxxxxxxxx`.replace(/[xy]/g,e=>{let r=Math.random()*16|0;return(e==="x"?r:r&3|8).toString(16)}),"uni"),xn=class t{static{o(this,"ObjectMap")}fastMap=new Hi;reverseMap=new Map;eventSubject=new Pe.rxjs.Subject;constructor(){}get length(){return this.fastMap.size}addMappedUnique(e,r){this.fastMap.addToMap(e,r),this.reverseMap.set(r,e)}getMappedUnique(e){return this.fastMap.getByKey(e)}removeMappedUnique(e){let r=this.fastMap.removeFromMap(e);return r!==void 0&&(this.reverseMap.delete(r),this.eventSubject.next({operation:"remove",payload:r})),r}add(e){let r=this.reverseMap.get(e);if(r!==void 0)return r;let n=Ov("key");return this.addMappedUnique(n,e),this.eventSubject.next({operation:"add",payload:e}),n}addArray(e){for(let r of e)this.add(r)}checkForObject(e){return this.reverseMap.has(e)}getKeyForObject(e){return this.reverseMap.get(e)??null}async find(e){return this.fastMap.find(e)}findSync(e){for(let r of this.fastMap.getKeys())if(e(this.fastMap.getByKey(r)))return this.getMappedUnique(r)}async findOneAndRemove(e){let r=await this.find(e);return r&&this.remove(r),r}findOneAndRemoveSync(e){let r=this.findSync(e);return r&&this.remove(r),r}async forEach(e){for(let r of this.fastMap.getKeys())await e(this.fastMap.getByKey(r))}getOneAndRemove(){let e=this.fastMap.getKeys();if(e.length===0)return null;{let r=e[0],n=this.fastMap.removeFromMap(r);return this.reverseMap.delete(n),this.eventSubject.next({operation:"remove",payload:n}),n}}getArray(){return this.fastMap.values()}isEmpty(){return this.fastMap.size===0}remove(e){let r=this.reverseMap.get(e);if(r!==void 0){let n=this.fastMap.removeFromMap(r);return this.reverseMap.delete(n),this.eventSubject.next({operation:"remove",payload:n}),n}return null}wipe(){let e=this.fastMap.getKeys();for(let r of e){let n=this.fastMap.removeFromMap(r);this.reverseMap.delete(n),this.eventSubject.next({operation:"remove",payload:n})}}concat(e){let r=new t;r.fastMap.addAllFromOther(this.fastMap),r.fastMap.addAllFromOther(e.fastMap);for(let n of r.fastMap.getKeys())r.reverseMap.set(r.fastMap.getByKey(n),n);return r}addAllFromOther(e){this.fastMap.addAllFromOther(e.fastMap);for(let r of e.fastMap.getKeys())this.reverseMap.set(e.fastMap.getByKey(r),r)}map(e){return this.getArray().map(e)}filter(e){return this.getArray().filter(e)}reduce(e,r){return this.getArray().reduce(e,r)}[Symbol.iterator](){return this.getArray()[Symbol.iterator]()}destroy(){this.wipe(),this.reverseMap.clear(),this.eventSubject.complete()}};var Ua=class{static{o(this,"Interest")}options;interestMapRef;originalInterest;comparisonFunc;destructionTimer=new Wi.Timer(1e4);isFullfilled=!1;isDestroyed=!1;fullfillmentStore=[];markLostTimeout=null;get comparisonString(){return this.comparisonFunc(this.originalInterest)}interestDeferred=new te.Deferred;interestFullfilled=this.interestDeferred.promise;fullfillInterest(e){this.isFullfilled=!0,this.fullfillmentStore=[],this.interestDeferred.resolve(e),this.destroy()}constructor(e,r,n,i){this.interestMapRef=e,this.originalInterest=r,this.comparisonFunc=n,this.options=i,this.destructionTimer.completed.then(()=>{this.isDestroyed||this.destroy()}),this.options?.markLostAfterDefault&&(this.markLostTimeout=new be.Timeout(this.options.markLostAfterDefault),this.markLostTimeout.promise.then(()=>{this.isDestroyed||this.markLost()}))}destroy(){this.isDestroyed||(this.isDestroyed=!0,this.destructionTimer.reset(),this.markLostTimeout&&(this.markLostTimeout.cancel(),this.markLostTimeout=null),this.fullfillmentStore=[],this.interestMapRef.removeInterest(this),!this.isFullfilled&&this.options?.defaultFullfillment&&(this.isFullfilled=!0,this.interestDeferred.resolve(this.options.defaultFullfillment)))}markLost(){this.destructionTimer.start()}renew(){this.destructionTimer.reset()}};var ud=class{static{o(this,"InterestMap")}options;interestObjectMap=new xn;interestsByComparisonString=new Map;comparisonStringsByInterest=new WeakMap;comparisonFunc;constructor(e,r={}){this.comparisonFunc=e,this.options=r}async addInterest(e,r){let n=this.comparisonFunc(e),i,s=this.interestsByComparisonString.get(n);return s?(i=s,i.renew()):(i=new Ua(this,e,this.comparisonFunc,{markLostAfterDefault:this.options.markLostAfterDefault,defaultFullfillment:r}),this.interestObjectMap.add(i),this.comparisonStringsByInterest.set(i,n),this.interestsByComparisonString.set(n,i)),this.interestObservable.push(i),i}interestObservable=new Pe.ObservableIntake;removeInterest(e){if(!this.comparisonStringsByInterest.has(e))return;let r=this.comparisonStringsByInterest.get(e);this.interestObjectMap.remove(e),this.comparisonStringsByInterest.delete(e),this.interestsByComparisonString.get(r)===e&&this.interestsByComparisonString.delete(r)}checkInterest(e){let r=this.comparisonFunc(e);return this.checkInterestByString(r)}checkInterestByString(e){return this.interestsByComparisonString.has(e)}informLostInterest(e){let r=this.findInterest(e);r&&r.markLost()}findInterest(e){let r=this.comparisonFunc(e);return this.interestsByComparisonString.get(r)??null}destroy(){let e=this.interestObjectMap.getArray();for(let r of e)r.destroy();this.interestObjectMap.wipe(),this.interestsByComparisonString.clear(),this.interestObservable.signalComplete()}};var fd=class{static{o(this,"LimitedArray")}array=[];arrayLimit;constructor(e){this.arrayLimit=e}get length(){return this.array.length}addOne(e){this.array.unshift(e),this.array.length>this.arrayLimit&&(this.array.length=this.arrayLimit)}addMany(e){for(let r of e)this.addOne(r)}setLimit(e){this.arrayLimit=e,this.array.length>this.arrayLimit&&(this.array.length=this.arrayLimit)}getAverage(){if(this.array.length===0)return 0;if(typeof this.array[0]=="number"){let e=0;for(let r of this.array)e=e+r;return e/this.array.length}else return null}remove(e){let r=this.array.indexOf(e);return r!==-1?(this.array.splice(r,1),!0):!1}clear(){this.array.length=0}getArray(){return[...this.array]}[Symbol.iterator](){return this.array[Symbol.iterator]()}};var pd=class{static{o(this,"LoopTracker")}referenceObjectMap=new xn;constructor(){}checkAndTrack(e){return this.referenceObjectMap.checkForObject(e)?!1:(this.referenceObjectMap.add(e),!0)}reset(){this.referenceObjectMap.wipe()}destroy(){this.referenceObjectMap.destroy()}};var qa=class{static{o(this,"Stringmap")}_stringArray=[];_triggerUntilTrueFunctionArray=[];constructor(){}addString(e){this._stringArray.push(e),this.notifyTrigger()}addStringArray(e){for(let r of e)this.addString(r)}removeString(e){this._stringArray=this._stringArray.filter(r=>r!==e),this.notifyTrigger()}wipe(){this._stringArray=[],this.notifyTrigger()}checkString(e){return this._stringArray.indexOf(e)!==-1}checkMinimatch(e){let r=new wa.SmartMatch(e),n=!1;for(let i of this._stringArray)r.match(i)&&(n=!0);return n}checkIsEmpty(){return this._stringArray.length===0}getStringArray(){let e=[];for(let r of this._stringArray)e.push(r);return e}registerUntilTrue(e,r){let n=te.defer();return this._triggerUntilTrueFunctionArray.push(()=>{let i=e(this.getStringArray());return i===!0&&(r&&r(),n.resolve()),i}),this.notifyTrigger(),n.promise}notifyTrigger(){let e=this._triggerUntilTrueFunctionArray.filter(r=>!r());this._triggerUntilTrueFunctionArray=e}destroy(){this._stringArray=[],this._triggerUntilTrueFunctionArray=[]}};var Ya=class{static{o(this,"TimedAggregtor")}options;storageArray=[];isStopped=!1;constructor(e){this.options=e}aggregationTimer;checkAggregationStatus(){if(this.isStopped)return;let e=o(()=>{this.aggregationTimer=new Wi.Timer(this.options.aggregationIntervalInMillis),this.aggregationTimer.completed.then(()=>{if(this.isStopped){this.aggregationTimer=null;return}let r=this.storageArray;if(r.length===0){this.aggregationTimer=null;return}this.storageArray=[],e(),this.options.functionForAggregation(r)}),this.aggregationTimer.start()},"addAggregationTimer");this.aggregationTimer||e()}add(e){this.isStopped||(this.storageArray.push(e),this.checkAggregationStatus())}stop(e=!1){if(this.isStopped=!0,this.aggregationTimer&&(this.aggregationTimer.reset(),this.aggregationTimer=null),e&&this.storageArray.length>0){let r=this.storageArray;this.storageArray=[],this.options.functionForAggregation(r)}else this.storageArray=[]}restart(){this.isStopped=!1}};var hd=class{static{o(this,"Tree")}symbolTree;constructor(){this.symbolTree=new zf.default}initialize(e){return this.symbolTree.initialize(e)}hasChildren(e){return this.symbolTree.hasChildren(e)}firstChild(e){return this.symbolTree.firstChild(e)}lastChild(e){return this.symbolTree.lastChild(e)}previousSibling(e){return this.symbolTree.previousSibling(e)}nextSibling(e){return this.symbolTree.nextSibling(e)}parent(e){return this.symbolTree.parent(e)}lastInclusiveDescendant(e){return this.symbolTree.lastInclusiveDescendant(e)}preceding(e,r){return this.symbolTree.preceding(e,r)}following(e,r){return this.symbolTree.following(e,r)}childrenToArray(e,r){return this.symbolTree.childrenToArray(e,r)}ancestorsToArray(e,r){return this.symbolTree.ancestorsToArray(e,r)}treeToArray(e,r){return this.symbolTree.treeToArray(e,r)}childrenIterator(e,r){return this.symbolTree.childrenIterator(e,r)}previousSiblingsIterator(e){return this.symbolTree.previousSiblingsIterator(e)}nextSiblingsIterator(e){return this.symbolTree.nextSiblingsIterator(e)}ancestorsIterator(e){return this.symbolTree.ancestorsIterator(e)}treeIterator(e,r){return this.symbolTree.treeIterator(e,r)}index(e){return this.symbolTree.index(e)}childrenCount(e){return this.symbolTree.childrenCount(e)}compareTreePosition(e,r){return this.symbolTree.compareTreePosition(e,r)}remove(e){return this.symbolTree.remove(e)}insertBefore(e,r){return this.symbolTree.insertBefore(e,r)}insertAfter(e,r){return this.symbolTree.insertAfter(e,r)}prependChild(e,r){return this.symbolTree.prependChild(e,r)}appendChild(e,r){return this.symbolTree.appendChild(e,r)}toJsonWithHierachy(e){let r=o(n=>{let i=[];if(this.hasChildren(n)){let s=this.childrenToArray(n,{});for(let a of s)i.push(r(a))}return{data:n,children:i}},"buildNode");return r(e)}fromJsonWithHierachy(e,r){let n=o((i,s)=>{let a=r?r(i.data):i.data;this.initialize(a),s&&this.appendChild(s,a);for(let l of i.children)n(l,a);return a},"buildTree");return n(e)}};var Ui={};se(Ui,{base64ToUint8Array:()=>UP,ensurePureUint8Array:()=>VP,isBufferLike:()=>YP,isUint8Array:()=>qP,uInt8ArrayExtras:()=>WP,uInt8ArrayToBase64:()=>HP});var ti={};se(ti,{areUint8ArraysEqual:()=>MP,assertUint8Array:()=>ei,assertUint8ArrayOrArrayBuffer:()=>_v,base64ToString:()=>RP,base64ToUint8Array:()=>Fv,compareUint8Arrays:()=>IP,concatUint8Arrays:()=>OP,getUintBE:()=>BP,hexToUint8Array:()=>$P,includes:()=>jP,indexOf:()=>$v,isUint8Array:()=>md,stringToBase64:()=>LP,stringToUint8Array:()=>Rv,toUint8Array:()=>CP,uint8ArrayToBase64:()=>Av,uint8ArrayToHex:()=>FP,uint8ArrayToString:()=>Lv});var vP=Object.prototype.toString,kP="[object Uint8Array]",TP="[object ArrayBuffer]";function Mv(t,e,r){return t?t.constructor===e?!0:vP.call(t)===r:!1}o(Mv,"isType");function md(t){return Mv(t,Uint8Array,kP)}o(md,"isUint8Array");function EP(t){return Mv(t,ArrayBuffer,TP)}o(EP,"isArrayBuffer");function DP(t){return md(t)||EP(t)}o(DP,"isUint8ArrayOrArrayBuffer");function ei(t){if(!md(t))throw new TypeError(`Expected \`Uint8Array\`, got \`${typeof t}\``)}o(ei,"assertUint8Array");function _v(t){if(!DP(t))throw new TypeError(`Expected \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof t}\``)}o(_v,"assertUint8ArrayOrArrayBuffer");function CP(t){if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new TypeError(`Unsupported value, got \`${typeof t}\`.`)}o(CP,"toUint8Array");function OP(t,e){if(t.length===0)return new Uint8Array(0);e??=t.reduce((i,s)=>i+s.length,0);let r=new Uint8Array(e),n=0;for(let i of t)ei(i),r.set(i,n),n+=i.length;return r}o(OP,"concatUint8Arrays");function MP(t,e){if(ei(t),ei(e),t===e)return!0;if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}o(MP,"areUint8ArraysEqual");function IP(t,e){ei(t),ei(e);let r=Math.min(t.length,e.length);for(let n=0;n<r;n++){let i=t[n]-e[n];if(i!==0)return Math.sign(i)}return Math.sign(t.length-e.length)}o(IP,"compareUint8Arrays");var Iv={utf8:new globalThis.TextDecoder("utf8")};function Lv(t,e="utf8"){return _v(t),Iv[e]??=new globalThis.TextDecoder(e),Iv[e].decode(t)}o(Lv,"uint8ArrayToString");function Va(t){if(typeof t!="string")throw new TypeError(`Expected \`string\`, got \`${typeof t}\``)}o(Va,"assertString");var NP=new globalThis.TextEncoder;function Rv(t){return Va(t),NP.encode(t)}o(Rv,"stringToUint8Array");function PP(t){return t.replaceAll("+","-").replaceAll("/","_").replace(/=+$/,"")}o(PP,"base64ToBase64Url");function _P(t){let e=t.replaceAll("-","+").replaceAll("_","/"),r=(4-e.length%4)%4;return e+"=".repeat(r)}o(_P,"base64UrlToBase64");var Nv=65535;function Av(t,{urlSafe:e=!1}={}){ei(t);let r="";for(let n=0;n<t.length;n+=Nv){let i=t.subarray(n,n+Nv);r+=globalThis.btoa(String.fromCodePoint.apply(void 0,i))}return e?PP(r):r}o(Av,"uint8ArrayToBase64");function Fv(t){return Va(t),Uint8Array.from(globalThis.atob(_P(t)),e=>e.codePointAt(0))}o(Fv,"base64ToUint8Array");function LP(t,{urlSafe:e=!1}={}){return Va(t),Av(Rv(t),{urlSafe:e})}o(LP,"stringToBase64");function RP(t){return Va(t),Lv(Fv(t))}o(RP,"base64ToString");var AP=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function FP(t){ei(t);let e="";for(let r=0;r<t.length;r++)e+=AP[t[r]];return e}o(FP,"uint8ArrayToHex");var Pv={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,b:11,c:12,d:13,e:14,f:15,A:10,B:11,C:12,D:13,E:14,F:15};function $P(t){if(Va(t),t.length%2!==0)throw new Error("Invalid Hex string length.");let e=t.length/2,r=new Uint8Array(e);for(let n=0;n<e;n++){let i=Pv[t[n*2]],s=Pv[t[n*2+1]];if(i===void 0||s===void 0)throw new Error(`Invalid Hex character encountered at position ${n*2}`);r[n]=i<<4|s}return r}o($P,"hexToUint8Array");function BP(t){let{byteLength:e}=t;if(e===6)return t.getUint16(0)*2**32+t.getUint32(2);if(e===5)return t.getUint8(0)*2**32+t.getUint32(1);if(e===4)return t.getUint32(0);if(e===3)return t.getUint8(0)*2**16+t.getUint16(1);if(e===2)return t.getUint16(0);if(e===1)return t.getUint8(0)}o(BP,"getUintBE");function $v(t,e){let r=t.length,n=e.length;if(n===0||n>r)return-1;let i=r-n;for(let s=0;s<=i;s++){let a=!0;for(let l=0;l<n;l++)if(t[s+l]!==e[l]){a=!1;break}if(a)return s}return-1}o($v,"indexOf");function jP(t,e){return $v(t,e)!==-1}o(jP,"includes");var WP=ti;function HP(t){return ti.uint8ArrayToBase64(t)}o(HP,"uInt8ArrayToBase64");function UP(t){return ti.base64ToUint8Array(t)}o(UP,"base64ToUint8Array");var qP=o(t=>ti.isUint8Array(t),"isUint8Array");function YP(t){return t&&typeof t.byteLength=="number"?!0:typeof Buffer<"u"&&Buffer.isBuffer?Buffer.isBuffer(t):!1}o(YP,"isBufferLike");function VP(t){let e=new Uint8Array(t.length);return e.set(t),e}o(VP,"ensurePureUint8Array");var Qa={};se(Qa,{Guard:()=>Ka,GuardError:()=>Ga,GuardSet:()=>Ja,passGuardsOrReject:()=>KP});var Ka=class{static{o(this,"Guard")}constructor(e,r){this.guardFunction=e,this.options=r||{}}async exec(e){return await this.guardFunction(e)}async getFailedHint(e){return await this.exec(e)?null:this.options.failedHint||null}};var Ga=class extends Error{static{o(this,"GuardError")}constructor(e){super(e),this.name="GuardError"}};var Ja=class extends Ka{static{o(this,"GuardSet")}constructor(e=[]){super(async r=>this.allGuardsPass(r)),this.guards=e}async execAllWithData(e,r={mode:"parallel",stopOnFail:!1}){let n=[];for(let s of this.guards){let a=s.exec(e);if(r.mode==="serial"&&await a,n.push(a),r.stopOnFail&&!await a)return await Promise.all(n)}return await Promise.all(n)}async allGuardsPass(e,r={mode:"parallel",stopOnFail:!1}){return(await this.execAllWithData(e,r)).every(i=>i)}async anyGuardsPass(e){return(await this.execAllWithData(e,{mode:"parallel",stopOnFail:!1})).some(n=>n)}async getFailedHint(e){for(let r of this.guards){let n=await r.getFailedHint(e);if(n)return n}return null}};var KP=o(async(t,e)=>{let r=new Ja(e);if(!await r.allGuardsPass(t)){let i=await r.getFailedHint(t);throw new Ga(`Guards failed:
3
+ `):"",this.name="UnsubscriptionError",this.errors=r},"UnsubscriptionErrorImpl")});function Sr(t,e){if(t){var r=t.indexOf(e);0<=r&&t.splice(r,1)}}o(Sr,"arrRemove");var Rt=(function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return o(t,"Subscription"),t.prototype.unsubscribe=function(){var e,r,n,i,s;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var l=gt(a),c=l.next();!c.done;c=l.next()){var u=c.value;u.remove(this)}}catch(g){e={error:g}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(e)throw e.error}}else a.remove(this);var f=this.initialTeardown;if(pe(f))try{f()}catch(g){s=g instanceof Ta?g.errors:[g]}var p=this._finalizers;if(p){this._finalizers=null;try{for(var h=gt(p),m=h.next();!m.done;m=h.next()){var d=m.value;try{Hb(d)}catch(g){s=s??[],g instanceof Ta?s=_t(_t([],ft(s)),ft(g.errors)):s.push(g)}}}catch(g){n={error:g}}finally{try{m&&!m.done&&(i=h.return)&&i.call(h)}finally{if(n)throw n.error}}}if(s)throw new Ta(s)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)Hb(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(e)}},t.prototype._hasParent=function(e){var r=this._parentage;return r===e||Array.isArray(r)&&r.includes(e)},t.prototype._addParent=function(e){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(e),r):r?[r,e]:e},t.prototype._removeParent=function(e){var r=this._parentage;r===e?this._parentage=null:Array.isArray(r)&&Sr(r,e)},t.prototype.remove=function(e){var r=this._finalizers;r&&Sr(r,e),e instanceof t&&e._removeParent(this)},t.EMPTY=(function(){var e=new t;return e.closed=!0,e})(),t})(),Mm=Rt.EMPTY;function Ic(t){return t instanceof Rt||t&&"closed"in t&&pe(t.remove)&&pe(t.add)&&pe(t.unsubscribe)}o(Ic,"isSubscription");function Hb(t){pe(t)?t():t.unsubscribe()}o(Hb,"execFinalizer");var sr={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var Lo={setTimeout:o(function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=Lo.delegate;return i?.setTimeout?i.setTimeout.apply(i,_t([t,e],ft(r))):setTimeout.apply(void 0,_t([t,e],ft(r)))},"setTimeout"),clearTimeout:o(function(t){var e=Lo.delegate;return(e?.clearTimeout||clearTimeout)(t)},"clearTimeout"),delegate:void 0};function Nc(t){Lo.setTimeout(function(){var e=sr.onUnhandledError;if(e)e(t);else throw t})}o(Nc,"reportUnhandledError");function Hr(){}o(Hr,"noop");var Ub=(function(){return Im("C",void 0,void 0)})();function qb(t){return Im("E",void 0,t)}o(qb,"errorNotification");function Yb(t){return Im("N",t,void 0)}o(Yb,"nextNotification");function Im(t,e,r){return{kind:t,value:e,error:r}}o(Im,"createNotification");var Oi=null;function _o(t){if(sr.useDeprecatedSynchronousErrorHandling){var e=!Oi;if(e&&(Oi={errorThrown:!1,error:null}),t(),e){var r=Oi,n=r.errorThrown,i=r.error;if(Oi=null,n)throw i}}else t()}o(_o,"errorContext");function Vb(t){sr.useDeprecatedSynchronousErrorHandling&&Oi&&(Oi.errorThrown=!0,Oi.error=t)}o(Vb,"captureError");var Mi=(function(t){Xe(e,t);function e(r){var n=t.call(this)||this;return n.isStopped=!1,r?(n.destination=r,Ic(r)&&r.add(n)):n.destination=qO,n}return o(e,"Subscriber"),e.create=function(r,n,i){return new Fn(r,n,i)},e.prototype.next=function(r){this.isStopped?Pm(Yb(r),this):this._next(r)},e.prototype.error=function(r){this.isStopped?Pm(qb(r),this):(this.isStopped=!0,this._error(r))},e.prototype.complete=function(){this.isStopped?Pm(Ub,this):(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(r){this.destination.next(r)},e.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e})(Rt),WO=Function.prototype.bind;function Nm(t,e){return WO.call(t,e)}o(Nm,"bind");var HO=(function(){function t(e){this.partialObserver=e}return o(t,"ConsumerObserver"),t.prototype.next=function(e){var r=this.partialObserver;if(r.next)try{r.next(e)}catch(n){Pc(n)}},t.prototype.error=function(e){var r=this.partialObserver;if(r.error)try{r.error(e)}catch(n){Pc(n)}else Pc(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(r){Pc(r)}},t})(),Fn=(function(t){Xe(e,t);function e(r,n,i){var s=t.call(this)||this,a;if(pe(r)||!r)a={next:r??void 0,error:n??void 0,complete:i??void 0};else{var l;s&&sr.useDeprecatedNextContext?(l=Object.create(r),l.unsubscribe=function(){return s.unsubscribe()},a={next:r.next&&Nm(r.next,l),error:r.error&&Nm(r.error,l),complete:r.complete&&Nm(r.complete,l)}):a=r}return s.destination=new HO(a),s}return o(e,"SafeSubscriber"),e})(Mi);function Pc(t){sr.useDeprecatedSynchronousErrorHandling?Vb(t):Nc(t)}o(Pc,"handleUnhandledError");function UO(t){throw t}o(UO,"defaultErrorHandler");function Pm(t,e){var r=sr.onStoppedNotification;r&&Lo.setTimeout(function(){return r(t,e)})}o(Pm,"handleStoppedNotification");var qO={closed:!0,next:Hr,error:UO,complete:Hr};var Ii=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function Ur(t){return t}o(Ur,"identity");function YO(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Lm(t)}o(YO,"pipe");function Lm(t){return t.length===0?Ur:t.length===1?t[0]:o(function(r){return t.reduce(function(n,i){return i(n)},r)},"piped")}o(Lm,"pipeFromArray");var we=(function(){function t(e){e&&(this._subscribe=e)}return o(t,"Observable"),t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(e,r,n){var i=this,s=KO(e)?e:new Fn(e,r,n);return _o(function(){var a=i,l=a.operator,c=a.source;s.add(l?l.call(s,c):c?i._subscribe(s):i._trySubscribe(s))}),s},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(r){e.error(r)}},t.prototype.forEach=function(e,r){var n=this;return r=Kb(r),new r(function(i,s){var a=new Fn({next:o(function(l){try{e(l)}catch(c){s(c),a.unsubscribe()}},"next"),error:s,complete:i});n.subscribe(a)})},t.prototype._subscribe=function(e){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(e)},t.prototype[Ii]=function(){return this},t.prototype.pipe=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return Lm(e)(this)},t.prototype.toPromise=function(e){var r=this;return e=Kb(e),new e(function(n,i){var s;r.subscribe(function(a){return s=a},function(a){return i(a)},function(){return n(s)})})},t.create=function(e){return new t(e)},t})();function Kb(t){var e;return(e=t??sr.Promise)!==null&&e!==void 0?e:Promise}o(Kb,"getPromiseCtor");function VO(t){return t&&pe(t.next)&&pe(t.error)&&pe(t.complete)}o(VO,"isObserver");function KO(t){return t&&t instanceof Mi||VO(t)&&Ic(t)}o(KO,"isSubscriber");function GO(t){return pe(t?.lift)}o(GO,"hasLift");function De(t){return function(e){if(GO(e))return e.lift(function(r){try{return t(r,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}o(De,"operate");function Ce(t,e,r,n,i){return new Gb(t,e,r,n,i)}o(Ce,"createOperatorSubscriber");var Gb=(function(t){Xe(e,t);function e(r,n,i,s,a,l){var c=t.call(this,r)||this;return c.onFinalize=a,c.shouldUnsubscribe=l,c._next=n?function(u){try{n(u)}catch(f){r.error(f)}}:t.prototype._next,c._error=s?function(u){try{s(u)}catch(f){r.error(f)}finally{this.unsubscribe()}}:t.prototype._error,c._complete=i?function(){try{i()}catch(u){r.error(u)}finally{this.unsubscribe()}}:t.prototype._complete,c}return o(e,"OperatorSubscriber"),e.prototype.unsubscribe=function(){var r;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;t.prototype.unsubscribe.call(this),!n&&((r=this.onFinalize)===null||r===void 0||r.call(this))}},e})(Mi);var _m=Mc(function(t){return o(function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"},"ObjectUnsubscribedErrorImpl")});var At=(function(t){Xe(e,t);function e(){var r=t.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return o(e,"Subject"),e.prototype.lift=function(r){var n=new Rm(this,this);return n.operator=r,n},e.prototype._throwIfClosed=function(){if(this.closed)throw new _m},e.prototype.next=function(r){var n=this;_o(function(){var i,s;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var a=gt(n.currentObservers),l=a.next();!l.done;l=a.next()){var c=l.value;c.next(r)}}catch(u){i={error:u}}finally{try{l&&!l.done&&(s=a.return)&&s.call(a)}finally{if(i)throw i.error}}}})},e.prototype.error=function(r){var n=this;_o(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=r;for(var i=n.observers;i.length;)i.shift().error(r)}})},e.prototype.complete=function(){var r=this;_o(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var n=r.observers;n.length;)n.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:o(function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},"get"),enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(r){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,r)},e.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},e.prototype._innerSubscribe=function(r){var n=this,i=this,s=i.hasError,a=i.isStopped,l=i.observers;return s||a?Mm:(this.currentObservers=null,l.push(r),new Rt(function(){n.currentObservers=null,Sr(l,r)}))},e.prototype._checkFinalizedStatuses=function(r){var n=this,i=n.hasError,s=n.thrownError,a=n.isStopped;i?r.error(s):a&&r.complete()},e.prototype.asObservable=function(){var r=new we;return r.source=this,r},e.create=function(r,n){return new Rm(r,n)},e})(we),Rm=(function(t){Xe(e,t);function e(r,n){var i=t.call(this)||this;return i.destination=r,i.source=n,i}return o(e,"AnonymousSubject"),e.prototype.next=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.next)===null||i===void 0||i.call(n,r)},e.prototype.error=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.error)===null||i===void 0||i.call(n,r)},e.prototype.complete=function(){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||n===void 0||n.call(r)},e.prototype._subscribe=function(r){var n,i;return(i=(n=this.source)===null||n===void 0?void 0:n.subscribe(r))!==null&&i!==void 0?i:Mm},e})(At);var Ro=(function(t){Xe(e,t);function e(r){var n=t.call(this)||this;return n._value=r,n}return o(e,"BehaviorSubject"),Object.defineProperty(e.prototype,"value",{get:o(function(){return this.getValue()},"get"),enumerable:!1,configurable:!0}),e.prototype._subscribe=function(r){var n=t.prototype._subscribe.call(this,r);return!n.closed&&r.next(this._value),n},e.prototype.getValue=function(){var r=this,n=r.hasError,i=r.thrownError,s=r._value;if(n)throw i;return this._throwIfClosed(),s},e.prototype.next=function(r){t.prototype.next.call(this,this._value=r)},e})(At);var Ea={now:o(function(){return(Ea.delegate||Date).now()},"now"),delegate:void 0};var Ao=(function(t){Xe(e,t);function e(r,n,i){r===void 0&&(r=1/0),n===void 0&&(n=1/0),i===void 0&&(i=Ea);var s=t.call(this)||this;return s._bufferSize=r,s._windowTime=n,s._timestampProvider=i,s._buffer=[],s._infiniteTimeWindow=!0,s._infiniteTimeWindow=n===1/0,s._bufferSize=Math.max(1,r),s._windowTime=Math.max(1,n),s}return o(e,"ReplaySubject"),e.prototype.next=function(r){var n=this,i=n.isStopped,s=n._buffer,a=n._infiniteTimeWindow,l=n._timestampProvider,c=n._windowTime;i||(s.push(r),!a&&s.push(l.now()+c)),this._trimBuffer(),t.prototype.next.call(this,r)},e.prototype._subscribe=function(r){this._throwIfClosed(),this._trimBuffer();for(var n=this._innerSubscribe(r),i=this,s=i._infiniteTimeWindow,a=i._buffer,l=a.slice(),c=0;c<l.length&&!r.closed;c+=s?1:2)r.next(l[c]);return this._checkFinalizedStatuses(r),n},e.prototype._trimBuffer=function(){var r=this,n=r._bufferSize,i=r._timestampProvider,s=r._buffer,a=r._infiniteTimeWindow,l=(a?1:2)*n;if(n<1/0&&l<s.length&&s.splice(0,s.length-l),!a){for(var c=i.now(),u=0,f=1;f<s.length&&s[f]<=c;f+=2)u=f;u&&s.splice(0,u+1)}},e})(At);var Am=(function(t){Xe(e,t);function e(r,n){return t.call(this)||this}return o(e,"Action"),e.prototype.schedule=function(r,n){return n===void 0&&(n=0),this},e})(Rt);var Da={setInterval:o(function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=Da.delegate;return i?.setInterval?i.setInterval.apply(i,_t([t,e],ft(r))):setInterval.apply(void 0,_t([t,e],ft(r)))},"setInterval"),clearInterval:o(function(t){var e=Da.delegate;return(e?.clearInterval||clearInterval)(t)},"clearInterval"),delegate:void 0};var Fm=(function(t){Xe(e,t);function e(r,n){var i=t.call(this,r,n)||this;return i.scheduler=r,i.work=n,i.pending=!1,i}return o(e,"AsyncAction"),e.prototype.schedule=function(r,n){var i;if(n===void 0&&(n=0),this.closed)return this;this.state=r;var s=this.id,a=this.scheduler;return s!=null&&(this.id=this.recycleAsyncId(a,s,n)),this.pending=!0,this.delay=n,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(a,this.id,n),this},e.prototype.requestAsyncId=function(r,n,i){return i===void 0&&(i=0),Da.setInterval(r.flush.bind(r,this),i)},e.prototype.recycleAsyncId=function(r,n,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return n;n!=null&&Da.clearInterval(n)},e.prototype.execute=function(r,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(r,n);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(r,n){var i=!1,s;try{this.work(r)}catch(a){i=!0,s=a||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),s},e.prototype.unsubscribe=function(){if(!this.closed){var r=this,n=r.id,i=r.scheduler,s=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,Sr(s,this),n!=null&&(this.id=this.recycleAsyncId(i,n,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e})(Am);var Ca=(function(){function t(e,r){r===void 0&&(r=t.now),this.schedulerActionCtor=e,this.now=r}return o(t,"Scheduler"),t.prototype.schedule=function(e,r,n){return r===void 0&&(r=0),new this.schedulerActionCtor(this,e).schedule(n,r)},t.now=Ea.now,t})();var $m=(function(t){Xe(e,t);function e(r,n){n===void 0&&(n=Ca.now);var i=t.call(this,r,n)||this;return i.actions=[],i._active=!1,i}return o(e,"AsyncScheduler"),e.prototype.flush=function(r){var n=this.actions;if(this._active){n.push(r);return}var i;this._active=!0;do if(i=r.execute(r.state,r.delay))break;while(r=n.shift());if(this._active=!1,i){for(;r=n.shift();)r.unsubscribe();throw i}},e})(Ca);var qr=new $m(Fm),Bm=qr;function Lc(t){return t&&pe(t.schedule)}o(Lc,"isScheduler");function jm(t){return t[t.length-1]}o(jm,"last");function Jb(t){return pe(jm(t))?t.pop():void 0}o(Jb,"popResultSelector");function Yr(t){return Lc(jm(t))?t.pop():void 0}o(Yr,"popScheduler");function aU(t,e){return typeof jm(t)=="number"?t.pop():e}o(aU,"popNumber");var Fo=o((function(t){return t&&typeof t.length=="number"&&typeof t!="function"}),"isArrayLike");function _c(t){return pe(t?.then)}o(_c,"isPromise");function Rc(t){return pe(t[Ii])}o(Rc,"isInteropObservable");function Ac(t){return Symbol.asyncIterator&&pe(t?.[Symbol.asyncIterator])}o(Ac,"isAsyncIterable");function Fc(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}o(Fc,"createInvalidObservableTypeError");function JO(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}o(JO,"getSymbolIterator");var $c=JO();function Bc(t){return pe(t?.[$c])}o(Bc,"isIterable");function jc(t){return Cm(this,arguments,o(function(){var r,n,i,s;return ka(this,function(a){switch(a.label){case 0:r=t.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,xn(r.read())];case 3:return n=a.sent(),i=n.value,s=n.done,s?[4,xn(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,xn(i)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}})},"readableStreamLikeToAsyncGenerator_1"))}o(jc,"readableStreamLikeToAsyncGenerator");function zc(t){return pe(t?.getReader)}o(zc,"isReadableStreamLike");function je(t){if(t instanceof we)return t;if(t!=null){if(Rc(t))return QO(t);if(Fo(t))return XO(t);if(_c(t))return ZO(t);if(Ac(t))return Qb(t);if(Bc(t))return eM(t);if(zc(t))return tM(t)}throw Fc(t)}o(je,"innerFrom");function QO(t){return new we(function(e){var r=t[Ii]();if(pe(r.subscribe))return r.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}o(QO,"fromInteropObservable");function XO(t){return new we(function(e){for(var r=0;r<t.length&&!e.closed;r++)e.next(t[r]);e.complete()})}o(XO,"fromArrayLike");function ZO(t){return new we(function(e){t.then(function(r){e.closed||(e.next(r),e.complete())},function(r){return e.error(r)}).then(null,Nc)})}o(ZO,"fromPromise");function eM(t){return new we(function(e){var r,n;try{for(var i=gt(t),s=i.next();!s.done;s=i.next()){var a=s.value;if(e.next(a),e.closed)return}}catch(l){r={error:l}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}e.complete()})}o(eM,"fromIterable");function Qb(t){return new we(function(e){rM(t,e).catch(function(r){return e.error(r)})})}o(Qb,"fromAsyncIterable");function tM(t){return Qb(jc(t))}o(tM,"fromReadableStreamLike");function rM(t,e){var r,n,i,s;return Dm(this,void 0,void 0,function(){var a,l;return ka(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),r=Om(t),c.label=1;case 1:return[4,r.next()];case 2:if(n=c.sent(),!!n.done)return[3,4];if(a=n.value,e.next(a),e.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return l=c.sent(),i={error:l},[3,11];case 6:return c.trys.push([6,,9,10]),n&&!n.done&&(s=r.return)?[4,s.call(r)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}o(rM,"process");function pt(t,e,r,n,i){n===void 0&&(n=0),i===void 0&&(i=!1);var s=e.schedule(function(){r(),i?t.add(this.schedule(null,n)):this.unsubscribe()},n);if(t.add(s),!i)return s}o(pt,"executeSchedule");function $o(t,e){return e===void 0&&(e=0),De(function(r,n){r.subscribe(Ce(n,function(i){return pt(n,t,function(){return n.next(i)},e)},function(){return pt(n,t,function(){return n.complete()},e)},function(i){return pt(n,t,function(){return n.error(i)},e)}))})}o($o,"observeOn");function Bo(t,e){return e===void 0&&(e=0),De(function(r,n){n.add(t.schedule(function(){return r.subscribe(n)},e))})}o(Bo,"subscribeOn");function Xb(t,e){return je(t).pipe(Bo(e),$o(e))}o(Xb,"scheduleObservable");function Zb(t,e){return je(t).pipe(Bo(e),$o(e))}o(Zb,"schedulePromise");function ew(t,e){return new we(function(r){var n=0;return e.schedule(function(){n===t.length?r.complete():(r.next(t[n++]),r.closed||this.schedule())})})}o(ew,"scheduleArray");function tw(t,e){return new we(function(r){var n;return pt(r,e,function(){n=t[$c](),pt(r,e,function(){var i,s,a;try{i=n.next(),s=i.value,a=i.done}catch(l){r.error(l);return}a?r.complete():r.next(s)},0,!0)}),function(){return pe(n?.return)&&n.return()}})}o(tw,"scheduleIterable");function Wc(t,e){if(!t)throw new Error("Iterable cannot be null");return new we(function(r){pt(r,e,function(){var n=t[Symbol.asyncIterator]();pt(r,e,function(){n.next().then(function(i){i.done?r.complete():r.next(i.value)})},0,!0)})})}o(Wc,"scheduleAsyncIterable");function rw(t,e){return Wc(jc(t),e)}o(rw,"scheduleReadableStreamLike");function zm(t,e){if(t!=null){if(Rc(t))return Xb(t,e);if(Fo(t))return ew(t,e);if(_c(t))return Zb(t,e);if(Ac(t))return Wc(t,e);if(Bc(t))return tw(t,e);if(zc(t))return rw(t,e)}throw Fc(t)}o(zm,"scheduled");function Vr(t,e){return e?zm(t,e):je(t)}o(Vr,"from");function Oa(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=Yr(t);return Vr(t,r)}o(Oa,"of");function nw(t){return t instanceof Date&&!isNaN(t)}o(nw,"isValidDate");function Kr(t,e){return De(function(r,n){var i=0;r.subscribe(Ce(n,function(s){n.next(t.call(e,s,i++))}))})}o(Kr,"map");var nM=Array.isArray;function iM(t,e){return nM(e)?t.apply(void 0,_t([],ft(e))):t(e)}o(iM,"callOrApply");function Hc(t){return Kr(function(e){return iM(t,e)})}o(Hc,"mapOneOrManyArgs");var oM=Array.isArray,sM=Object.getPrototypeOf,aM=Object.prototype,lM=Object.keys;function iw(t){if(t.length===1){var e=t[0];if(oM(e))return{args:e,keys:null};if(cM(e)){var r=lM(e);return{args:r.map(function(n){return e[n]}),keys:r}}}return{args:t,keys:null}}o(iw,"argsArgArrayOrObject");function cM(t){return t&&typeof t=="object"&&sM(t)===aM}o(cM,"isPOJO");function ow(t,e){return t.reduce(function(r,n,i){return r[n]=e[i],r},{})}o(ow,"createObject");function Wm(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=Yr(t),n=Jb(t),i=iw(t),s=i.args,a=i.keys;if(s.length===0)return Vr([],r);var l=new we(uM(s,r,a?function(c){return ow(a,c)}:Ur));return n?l.pipe(Hc(n)):l}o(Wm,"combineLatest");function uM(t,e,r){return r===void 0&&(r=Ur),function(n){sw(e,function(){for(var i=t.length,s=new Array(i),a=i,l=i,c=o(function(f){sw(e,function(){var p=Vr(t[f],e),h=!1;p.subscribe(Ce(n,function(m){s[f]=m,h||(h=!0,l--),l||n.next(r(s.slice()))},function(){--a||n.complete()}))},n)},"_loop_1"),u=0;u<i;u++)c(u)},n)}}o(uM,"combineLatestInit");function sw(t,e,r){t?pt(r,t,e):e()}o(sw,"maybeSchedule");function aw(t,e,r,n,i,s,a,l){var c=[],u=0,f=0,p=!1,h=o(function(){p&&!c.length&&!u&&e.complete()},"checkComplete"),m=o(function(g){return u<n?d(g):c.push(g)},"outerNext"),d=o(function(g){s&&e.next(g),u++;var y=!1;je(r(g,f++)).subscribe(Ce(e,function(x){i?.(x),s?m(x):e.next(x)},function(){y=!0},void 0,function(){if(y)try{u--;for(var x=o(function(){var T=c.shift();a?pt(e,a,function(){return d(T)}):d(T)},"_loop_1");c.length&&u<n;)x();h()}catch(T){e.error(T)}}))},"doInnerSub");return t.subscribe(Ce(e,m,function(){p=!0,h()})),function(){l?.()}}o(aw,"mergeInternals");function Ni(t,e,r){return r===void 0&&(r=1/0),pe(e)?Ni(function(n,i){return Kr(function(s,a){return e(n,s,i,a)})(je(t(n,i)))},r):(typeof e=="number"&&(r=e),De(function(n,i){return aw(n,i,t,r)}))}o(Ni,"mergeMap");function Uc(t){return t===void 0&&(t=1/0),Ni(Ur,t)}o(Uc,"mergeAll");function qc(){return Uc(1)}o(qc,"concatAll");function Yc(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return qc()(Vr(t,Yr(t)))}o(Yc,"concat");var fM=["addListener","removeListener"],pM=["addEventListener","removeEventListener"],hM=["on","off"];function Pi(t,e,r,n){if(pe(r)&&(n=r,r=void 0),n)return Pi(t,e,r).pipe(Hc(n));var i=ft(gM(t)?pM.map(function(l){return function(c){return t[l](e,c,r)}}):mM(t)?fM.map(lw(t,e)):dM(t)?hM.map(lw(t,e)):[],2),s=i[0],a=i[1];if(!s&&Fo(t))return Ni(function(l){return Pi(l,e,r)})(je(t));if(!s)throw new TypeError("Invalid event target");return new we(function(l){var c=o(function(){for(var u=[],f=0;f<arguments.length;f++)u[f]=arguments[f];return l.next(1<u.length?u:u[0])},"handler");return s(c),function(){return a(c)}})}o(Pi,"fromEvent");function lw(t,e){return function(r){return function(n){return t[r](e,n)}}}o(lw,"toCommonHandlerRegistry");function mM(t){return pe(t.addListener)&&pe(t.removeListener)}o(mM,"isNodeStyleEventEmitter");function dM(t){return pe(t.on)&&pe(t.off)}o(dM,"isJQueryStyleEventEmitter");function gM(t){return pe(t.addEventListener)&&pe(t.removeEventListener)}o(gM,"isEventTarget");function Ma(t,e,r){t===void 0&&(t=0),r===void 0&&(r=Bm);var n=-1;return e!=null&&(Lc(e)?r=e:n=e),new we(function(i){var s=nw(t)?+t-r.now():t;s<0&&(s=0);var a=0;return r.schedule(function(){i.closed||(i.next(a++),0<=n?this.schedule(void 0,n):i.complete())},s)})}o(Ma,"timer");function Hm(t,e){return t===void 0&&(t=0),e===void 0&&(e=qr),t<0&&(t=0),Ma(t,t,e)}o(Hm,"interval");function Vc(t,e){return De(function(r,n){var i=0;r.subscribe(Ce(n,function(s){return t.call(e,s,i++)&&n.next(s)}))})}o(Vc,"filter");function Kc(t){return De(function(e,r){var n=[];return e.subscribe(Ce(r,function(i){return n.push(i)},function(){r.next(n),r.complete()})),je(t).subscribe(Ce(r,function(){var i=n;n=[],r.next(i)},Hr)),function(){n=null}})}o(Kc,"buffer");function Gc(t,e){return e===void 0&&(e=null),e=e??t,De(function(r,n){var i=[],s=0;r.subscribe(Ce(n,function(a){var l,c,u,f,p=null;s++%e===0&&i.push([]);try{for(var h=gt(i),m=h.next();!m.done;m=h.next()){var d=m.value;d.push(a),t<=d.length&&(p=p??[],p.push(d))}}catch(x){l={error:x}}finally{try{m&&!m.done&&(c=h.return)&&c.call(h)}finally{if(l)throw l.error}}if(p)try{for(var g=gt(p),y=g.next();!y.done;y=g.next()){var d=y.value;Sr(i,d),n.next(d)}}catch(x){u={error:x}}finally{try{y&&!y.done&&(f=g.return)&&f.call(g)}finally{if(u)throw u.error}}},function(){var a,l;try{for(var c=gt(i),u=c.next();!u.done;u=c.next()){var f=u.value;n.next(f)}}catch(p){a={error:p}}finally{try{u&&!u.done&&(l=c.return)&&l.call(c)}finally{if(a)throw a.error}}n.complete()},void 0,function(){i=null}))})}o(Gc,"bufferCount");function Jc(t){for(var e,r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var s=(e=Yr(n))!==null&&e!==void 0?e:qr,a=(r=n[0])!==null&&r!==void 0?r:null,l=n[1]||1/0;return De(function(c,u){var f=[],p=!1,h=o(function(g){var y=g.buffer,x=g.subs;x.unsubscribe(),Sr(f,g),u.next(y),p&&m()},"emit"),m=o(function(){if(f){var g=new Rt;u.add(g);var y=[],x={buffer:y,subs:g};f.push(x),pt(g,s,function(){return h(x)},t)}},"startBuffer");a!==null&&a>=0?pt(u,s,m,a,!0):p=!0,m();var d=Ce(u,function(g){var y,x,T=f.slice();try{for(var E=gt(T),L=E.next();!L.done;L=E.next()){var P=L.value,D=P.buffer;D.push(g),l<=D.length&&h(P)}}catch(F){y={error:F}}finally{try{L&&!L.done&&(x=E.return)&&x.call(E)}finally{if(y)throw y.error}}},function(){for(;f?.length;)u.next(f.shift().buffer);d?.unsubscribe(),u.complete(),u.unsubscribe()},void 0,function(){return f=null});c.subscribe(d)})}o(Jc,"bufferTime");function Qc(t){return De(function(e,r){var n=!1,i=null,s=null,a=o(function(){if(s?.unsubscribe(),s=null,n){n=!1;var l=i;i=null,r.next(l)}},"emit");e.subscribe(Ce(r,function(l){s?.unsubscribe(),n=!0,i=l,s=Ce(r,a,Hr),je(t(l)).subscribe(s)},function(){a(),r.complete()},void 0,function(){i=s=null}))})}o(Qc,"debounce");function Xc(t,e){return e===void 0&&(e=qr),De(function(r,n){var i=null,s=null,a=null,l=o(function(){if(i){i.unsubscribe(),i=null;var u=s;s=null,n.next(u)}},"emit");function c(){var u=a+t,f=e.now();if(f<u){i=this.schedule(void 0,u-f),n.add(i);return}l()}o(c,"emitWhenIdle"),r.subscribe(Ce(n,function(u){s=u,a=e.now(),i||(i=e.schedule(c,t),n.add(i))},function(){l(),n.complete()},void 0,function(){s=i=null}))})}o(Xc,"debounceTime");function jo(t,e){return e===void 0&&(e=Ur),t=t??yM,De(function(r,n){var i,s=!0;r.subscribe(Ce(n,function(a){var l=e(a);(s||!t(i,l))&&(s=!1,i=l,n.next(a))}))})}o(jo,"distinctUntilChanged");function yM(t,e){return t===e}o(yM,"defaultCompare");function Zc(t){t===void 0&&(t={});var e=t.connector,r=e===void 0?function(){return new At}:e,n=t.resetOnError,i=n===void 0?!0:n,s=t.resetOnComplete,a=s===void 0?!0:s,l=t.resetOnRefCountZero,c=l===void 0?!0:l;return function(u){var f,p,h,m=0,d=!1,g=!1,y=o(function(){p?.unsubscribe(),p=void 0},"cancelReset"),x=o(function(){y(),f=h=void 0,d=g=!1},"reset"),T=o(function(){var E=f;x(),E?.unsubscribe()},"resetAndUnsubscribe");return De(function(E,L){m++,!g&&!d&&y();var P=h=h??r();L.add(function(){m--,m===0&&!g&&!d&&(p=Um(T,c))}),P.subscribe(L),!f&&m>0&&(f=new Fn({next:o(function(D){return P.next(D)},"next"),error:o(function(D){g=!0,y(),p=Um(x,i,D),P.error(D)},"error"),complete:o(function(){d=!0,y(),p=Um(x,a),P.complete()},"complete")}),je(E).subscribe(f))})(u)}}o(Zc,"share");function Um(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];if(e===!0){t();return}if(e!==!1){var i=new Fn({next:o(function(){i.unsubscribe(),t()},"next")});return je(e.apply(void 0,_t([],ft(r)))).subscribe(i)}}o(Um,"handleReset");function eu(t,e,r){var n,i,s,a,l=!1;return t&&typeof t=="object"?(n=t.bufferSize,a=n===void 0?1/0:n,i=t.windowTime,e=i===void 0?1/0:i,s=t.refCount,l=s===void 0?!1:s,r=t.scheduler):a=t??1/0,Zc({connector:o(function(){return new Ao(a,e,r)},"connector"),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:l})}o(eu,"shareReplay");function tu(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=Yr(t);return De(function(n,i){(r?Yc(t,n,r):Yc(t,n)).subscribe(i)})}o(tu,"startWith");function zo(t){return De(function(e,r){je(t).subscribe(Ce(r,function(){return r.complete()},Hr)),!r.closed&&e.subscribe(r)})}o(zo,"takeUntil");function ru(t,e){return De(function(r,n){var i=e??{},s=i.leading,a=s===void 0?!0:s,l=i.trailing,c=l===void 0?!1:l,u=!1,f=null,p=null,h=!1,m=o(function(){p?.unsubscribe(),p=null,c&&(y(),h&&n.complete())},"endThrottling"),d=o(function(){p=null,h&&n.complete()},"cleanupThrottling"),g=o(function(x){return p=je(t(x)).subscribe(Ce(n,m,d))},"startThrottle"),y=o(function(){if(u){u=!1;var x=f;f=null,n.next(x),!h&&g(x)}},"send");r.subscribe(Ce(n,function(x){u=!0,f=x,!(p&&!p.closed)&&(a?y():g(x))},function(){h=!0,!(c&&u&&p&&!p.closed)&&n.complete()}))})}o(ru,"throttle");function nu(t,e,r){e===void 0&&(e=qr);var n=Ma(t,e);return ru(function(){return n},r)}o(nu,"throttleTime");var QI={buffer:Kc,bufferCount:Gc,bufferTime:Jc,debounce:Qc,debounceTime:Xc,filter:Vc,map:Kr,startWith:tu,takeUntil:zo,throttleTime:nu};var qm=class{static{o(this,"Observablemap")}constructor(){this.observableEventEmitterBundleArray=new Array,this.observableEventTargetBundleArray=new Array}getSubjectForEmitterEvent(e,r){let n=this.observableEventEmitterBundleArray.find(i=>i.eventRef===e&&i.event===r);if(n)return n.subject;{let i=Pi(e,r),s=new At;i.subscribe(s);let a={subject:s,eventRef:e,event:r};return this.observableEventEmitterBundleArray.push(a),a.subject}}getSubjectForEventTarget(e,r){let n=this.observableEventTargetBundleArray.find(i=>i.eventRef===e&&i.event===r);if(n)return n.subject;{let s={subject:new At,eventRef:e,event:r};return this.observableEventTargetBundleArray.push(s),s.subject}}};var Ym=class{static{o(this,"ObservableIntake")}constructor(){this.observableFunctions={next:o(e=>{},"next"),complete:o(e=>{},"complete")},this.buffered=!1,this.payloadBuffer=[],this.observable=new we(e=>{this.observableFunctions.next=r=>e.next(r),this.observableFunctions.complete=()=>(this.completedDeffered.resolve(),e.complete())}),this.completedDeffered=ie.defer(),this.completed=this.completedDeffered.promise}setObservable(e){this.observable=e}push(e){this.buffered?this.payloadBuffer.push(e):this.internalPush(e)}pushMany(e){for(let r of e)this.push(r)}setGenerator(e){this.generator=e}makeBuffered(){this.buffered=!0}subscribe(...e){return this.observable.subscribe(...e)}request(e){if(e!==0)for(let r=0;r!==e;r++)if(this.payloadBuffer.length>0)this.internalPush(this.payloadBuffer.shift());else{if(!this.generator)throw new Error("Cannot request an unbuffered value before setting a generator");let n=this.generator.next();this.internalPush(n.value)}}signalComplete(){this.observableFunctions.complete()}internalPush(e){this.observableFunctions.next(e)}};function XI(t){return new we(e=>{let r=o(()=>t.pause(),"pauseStream"),n=o(()=>process.nextTick(()=>t.resume()),"resumeStream"),i=o(s=>{r(),e.next(s),n()},"onData");return t.on("data",i),t.on("error",s=>e.error(s)),t.on("end",()=>e.complete()),t.on("close",()=>e.complete()),()=>{t.removeListener("data",i),t.removeListener("error",e.error),t.removeListener("end",e.complete),t.removeListener("close",e.complete)}})}o(XI,"fromStreamWithBackpressure");var zi={};se(zi,{CronJob:()=>qa,CronManager:()=>sd,ExtendedDate:()=>ld,HrtMeasurement:()=>cd,Interval:()=>ud,TimeStamp:()=>ps,Timer:()=>fd,getMilliSecondsAsHumanReadableAgoTime:()=>MP,getMilliSecondsAsHumanReadableString:()=>OP,getMilliSecondsFromUnits:()=>ad,units:()=>Jn});var La={};se(La,{Cron:()=>mw,CronDate:()=>Ze,CronPattern:()=>iu,scheduledJobs:()=>Ho});function Ia(t){return Date.UTC(t.y,t.m-1,t.d,t.h,t.i,t.s)}o(Ia,"T");function Vm(t,e){return t.y===e.y&&t.m===e.m&&t.d===e.d&&t.h===e.h&&t.i===e.i&&t.s===e.s}o(Vm,"D");function ZI(t,e){let r=new Date(Date.parse(t));if(isNaN(r))throw new Error("Invalid ISO8601 passed to timezone parser.");let n=t.substring(9);return n.includes("Z")||n.includes("+")||n.includes("-")?Km(r.getUTCFullYear(),r.getUTCMonth()+1,r.getUTCDate(),r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),"Etc/UTC"):Km(r.getFullYear(),r.getMonth()+1,r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),e)}o(ZI,"A");function cw(t,e,r){return uw(ZI(t,e),r)}o(cw,"v");function uw(t,e){let r=new Date(Ia(t)),n=Na(r,t.tz),i=Ia(t),s=Ia(n),a=i-s,l=new Date(r.getTime()+a),c=Na(l,t.tz);if(Vm(c,t)){let p=new Date(l.getTime()-36e5),h=Na(p,t.tz);return Vm(h,t)?p:l}let u=new Date(l.getTime()+Ia(t)-Ia(c)),f=Na(u,t.tz);if(Vm(f,t))return u;if(e)throw new Error("Invalid date passed to fromTZ()");return l.getTime()>u.getTime()?l:u}o(uw,"k");function Na(t,e){let r,n;try{r=new Intl.DateTimeFormat("en-US",{timeZone:e,year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1}),n=r.formatToParts(t)}catch(s){let a=s instanceof Error?s.message:String(s);throw new RangeError(`toTZ: Invalid timezone '${e}' or date. Please provide a valid IANA timezone (e.g., 'America/New_York', 'Europe/Stockholm'). Original error: ${a}`)}let i={year:0,month:0,day:0,hour:0,minute:0,second:0};for(let s of n)(s.type==="year"||s.type==="month"||s.type==="day"||s.type==="hour"||s.type==="minute"||s.type==="second")&&(i[s.type]=parseInt(s.value,10));if(isNaN(i.year)||isNaN(i.month)||isNaN(i.day)||isNaN(i.hour)||isNaN(i.minute)||isNaN(i.second))throw new Error(`toTZ: Failed to parse all date components from timezone '${e}'. This may indicate an invalid date or timezone configuration. Parsed components: ${JSON.stringify(i)}`);return i.hour===24&&(i.hour=0),{y:i.year,m:i.month,d:i.day,h:i.hour,i:i.minute,s:i.second,tz:e}}o(Na,"g");function Km(t,e,r,n,i,s,a){return{y:t,m:e,d:r,h:n,i,s,tz:a}}o(Km,"b");var fw=[1,2,4,8,16],iu=class{static{o(this,"C")}pattern;timezone;mode;alternativeWeekdays;sloppyRanges;second;minute;hour;day;month;dayOfWeek;year;lastDayOfMonth;lastWeekday;nearestWeekdays;starDOM;starDOW;starYear;useAndLogic;constructor(t,e,r){this.pattern=t,this.timezone=e,this.mode=r?.mode??"auto",this.alternativeWeekdays=r?.alternativeWeekdays??!1,this.sloppyRanges=r?.sloppyRanges??!1,this.second=Array(60).fill(0),this.minute=Array(60).fill(0),this.hour=Array(24).fill(0),this.day=Array(31).fill(0),this.month=Array(12).fill(0),this.dayOfWeek=Array(7).fill(0),this.year=Array(1e4).fill(0),this.lastDayOfMonth=!1,this.lastWeekday=!1,this.nearestWeekdays=Array(31).fill(0),this.starDOM=!1,this.starDOW=!1,this.starYear=!1,this.useAndLogic=!1,this.parse()}parse(){if(!(typeof this.pattern=="string"||this.pattern instanceof String))throw new TypeError("CronPattern: Pattern has to be of type string.");this.pattern.indexOf("@")>=0&&(this.pattern=this.handleNicknames(this.pattern).trim());let t=this.pattern.match(/\S+/g)||[""],e=t.length;if(t.length<5||t.length>7)throw new TypeError("CronPattern: invalid configuration format ('"+this.pattern+"'), exactly five, six, or seven space separated parts are required.");if(this.mode!=="auto"){let n;switch(this.mode){case"5-part":n=5;break;case"6-part":n=6;break;case"7-part":n=7;break;case"5-or-6-parts":n=[5,6];break;case"6-or-7-parts":n=[6,7];break;default:n=0}if(!(Array.isArray(n)?n.includes(e):e===n)){let i=Array.isArray(n)?n.join(" or "):n.toString();throw new TypeError(`CronPattern: mode '${this.mode}' requires exactly ${i} parts, but pattern '${this.pattern}' has ${e} parts.`)}}if(t.length===5&&t.unshift("0"),t.length===6&&t.push("*"),t[3].toUpperCase()==="LW"?(this.lastWeekday=!0,t[3]=""):t[3].toUpperCase().indexOf("L")>=0&&(t[3]=t[3].replace(/L/gi,""),this.lastDayOfMonth=!0),t[3]=="*"&&(this.starDOM=!0),t[6]=="*"&&(this.starYear=!0),t[4].length>=3&&(t[4]=this.replaceAlphaMonths(t[4])),t[5].length>=3&&(t[5]=this.alternativeWeekdays?this.replaceAlphaDaysQuartz(t[5]):this.replaceAlphaDays(t[5])),t[5].startsWith("+")&&(this.useAndLogic=!0,t[5]=t[5].substring(1),t[5]===""))throw new TypeError("CronPattern: Day-of-week field cannot be empty after '+' modifier.");switch(t[5]=="*"&&(this.starDOW=!0),this.pattern.indexOf("?")>=0&&(t[0]=t[0].replace(/\?/g,"*"),t[1]=t[1].replace(/\?/g,"*"),t[2]=t[2].replace(/\?/g,"*"),t[3]=t[3].replace(/\?/g,"*"),t[4]=t[4].replace(/\?/g,"*"),t[5]=t[5].replace(/\?/g,"*"),t[6]&&(t[6]=t[6].replace(/\?/g,"*"))),this.mode){case"5-part":t[0]="0",t[6]="*";break;case"6-part":t[6]="*";break;case"5-or-6-parts":t[6]="*";break;case"6-or-7-parts":break;case"7-part":case"auto":break}this.throwAtIllegalCharacters(t),this.partToArray("second",t[0],0,1),this.partToArray("minute",t[1],0,1),this.partToArray("hour",t[2],0,1),this.partToArray("day",t[3],-1,1),this.partToArray("month",t[4],-1,1);let r=this.alternativeWeekdays?-1:0;this.partToArray("dayOfWeek",t[5],r,63),this.partToArray("year",t[6],0,1),!this.alternativeWeekdays&&this.dayOfWeek[7]&&(this.dayOfWeek[0]=this.dayOfWeek[7])}partToArray(t,e,r,n){let i=this[t],s=t==="day"&&this.lastDayOfMonth,a=t==="day"&&this.lastWeekday;if(e===""&&!s&&!a)throw new TypeError("CronPattern: configuration entry "+t+" ("+e+") is empty, check for trailing spaces.");if(e==="*")return i.fill(n);let l=e.split(",");if(l.length>1)for(let c=0;c<l.length;c++)this.partToArray(t,l[c],r,n);else e.indexOf("-")!==-1&&e.indexOf("/")!==-1?this.handleRangeWithStepping(e,t,r,n):e.indexOf("-")!==-1?this.handleRange(e,t,r,n):e.indexOf("/")!==-1?this.handleStepping(e,t,r,n):e!==""&&this.handleNumber(e,t,r,n)}throwAtIllegalCharacters(t){for(let e=0;e<t.length;e++)if((e===3?/[^/*0-9,\-WwLl]+/:e===5?/[^/*0-9,\-#Ll]+/:/[^/*0-9,\-]+/).test(t[e]))throw new TypeError("CronPattern: configuration entry "+e+" ("+t[e]+") contains illegal characters.")}handleNumber(t,e,r,n){let i=this.extractNth(t,e),s=t.toUpperCase().includes("W");if(e!=="day"&&s)throw new TypeError("CronPattern: Nearest weekday modifier (W) only allowed in day-of-month.");s&&(e="nearestWeekdays");let a=parseInt(i[0],10)+r;if(isNaN(a))throw new TypeError("CronPattern: "+e+" is not a number: '"+t+"'");this.setPart(e,a,i[1]||n)}setPart(t,e,r){if(!Object.prototype.hasOwnProperty.call(this,t))throw new TypeError("CronPattern: Invalid part specified: "+t);if(t==="dayOfWeek"){if(e===7&&(e=0),e<0||e>6)throw new RangeError("CronPattern: Invalid value for dayOfWeek: "+e);this.setNthWeekdayOfMonth(e,r);return}if(t==="second"||t==="minute"){if(e<0||e>=60)throw new RangeError("CronPattern: Invalid value for "+t+": "+e)}else if(t==="hour"){if(e<0||e>=24)throw new RangeError("CronPattern: Invalid value for "+t+": "+e)}else if(t==="day"||t==="nearestWeekdays"){if(e<0||e>=31)throw new RangeError("CronPattern: Invalid value for "+t+": "+e)}else if(t==="month"){if(e<0||e>=12)throw new RangeError("CronPattern: Invalid value for "+t+": "+e)}else if(t==="year"&&(e<1||e>=1e4))throw new RangeError("CronPattern: Invalid value for "+t+": "+e+" (supported range: 1-9999)");this[t][e]=r}validateNotNaN(t,e){if(isNaN(t))throw new TypeError(e)}validateRange(t,e,r,n,i){if(t>e)throw new TypeError("CronPattern: From value is larger than to value: '"+i+"'");if(r!==void 0){if(r===0)throw new TypeError("CronPattern: Syntax error, illegal stepping: 0");if(r>this[n].length)throw new TypeError("CronPattern: Syntax error, steps cannot be greater than maximum value of part ("+this[n].length+")")}}handleRangeWithStepping(t,e,r,n){if(t.toUpperCase().includes("W"))throw new TypeError("CronPattern: Syntax error, W is not allowed in ranges with stepping.");let i=this.extractNth(t,e),s=i[0].match(/^(\d+)-(\d+)\/(\d+)$/);if(s===null)throw new TypeError("CronPattern: Syntax error, illegal range with stepping: '"+t+"'");let[,a,l,c]=s,u=parseInt(a,10)+r,f=parseInt(l,10)+r,p=parseInt(c,10);this.validateNotNaN(u,"CronPattern: Syntax error, illegal lower range (NaN)"),this.validateNotNaN(f,"CronPattern: Syntax error, illegal upper range (NaN)"),this.validateNotNaN(p,"CronPattern: Syntax error, illegal stepping: (NaN)"),this.validateRange(u,f,p,e,t);for(let h=u;h<=f;h+=p)this.setPart(e,h,i[1]||n)}extractNth(t,e){let r=t,n;if(r.includes("#")){if(e!=="dayOfWeek")throw new Error("CronPattern: nth (#) only allowed in day-of-week field");n=r.split("#")[1],r=r.split("#")[0]}else if(r.toUpperCase().endsWith("L")){if(e!=="dayOfWeek")throw new Error("CronPattern: L modifier only allowed in day-of-week field (use L alone for day-of-month)");n="L",r=r.slice(0,-1)}return[r,n]}handleRange(t,e,r,n){if(t.toUpperCase().includes("W"))throw new TypeError("CronPattern: Syntax error, W is not allowed in a range.");let i=this.extractNth(t,e),s=i[0].split("-");if(s.length!==2)throw new TypeError("CronPattern: Syntax error, illegal range: '"+t+"'");let a=parseInt(s[0],10)+r,l=parseInt(s[1],10)+r;this.validateNotNaN(a,"CronPattern: Syntax error, illegal lower range (NaN)"),this.validateNotNaN(l,"CronPattern: Syntax error, illegal upper range (NaN)"),this.validateRange(a,l,void 0,e,t);for(let c=a;c<=l;c++)this.setPart(e,c,i[1]||n)}handleStepping(t,e,r,n){if(t.toUpperCase().includes("W"))throw new TypeError("CronPattern: Syntax error, W is not allowed in parts with stepping.");let i=this.extractNth(t,e),s=i[0].split("/");if(s.length!==2)throw new TypeError("CronPattern: Syntax error, illegal stepping: '"+t+"'");if(this.sloppyRanges)s[0]===""&&(s[0]="*");else{if(s[0]==="")throw new TypeError("CronPattern: Syntax error, stepping with missing prefix ('"+t+"') is not allowed. Use wildcard (*/step) or range (min-max/step) instead.");if(s[0]!=="*")throw new TypeError("CronPattern: Syntax error, stepping with numeric prefix ('"+t+"') is not allowed. Use wildcard (*/step) or range (min-max/step) instead.")}let a=0;s[0]!=="*"&&(a=parseInt(s[0],10)+r);let l=parseInt(s[1],10);this.validateNotNaN(l,"CronPattern: Syntax error, illegal stepping: (NaN)"),this.validateRange(0,this[e].length-1,l,e,t);for(let c=a;c<this[e].length;c+=l)this.setPart(e,c,i[1]||n)}replaceAlphaDays(t){return t.replace(/-sun/gi,"-7").replace(/sun/gi,"0").replace(/mon/gi,"1").replace(/tue/gi,"2").replace(/wed/gi,"3").replace(/thu/gi,"4").replace(/fri/gi,"5").replace(/sat/gi,"6")}replaceAlphaDaysQuartz(t){return t.replace(/sun/gi,"1").replace(/mon/gi,"2").replace(/tue/gi,"3").replace(/wed/gi,"4").replace(/thu/gi,"5").replace(/fri/gi,"6").replace(/sat/gi,"7")}replaceAlphaMonths(t){return t.replace(/jan/gi,"1").replace(/feb/gi,"2").replace(/mar/gi,"3").replace(/apr/gi,"4").replace(/may/gi,"5").replace(/jun/gi,"6").replace(/jul/gi,"7").replace(/aug/gi,"8").replace(/sep/gi,"9").replace(/oct/gi,"10").replace(/nov/gi,"11").replace(/dec/gi,"12")}handleNicknames(t){let e=t.trim().toLowerCase();if(e==="@yearly"||e==="@annually")return"0 0 1 1 *";if(e==="@monthly")return"0 0 1 * *";if(e==="@weekly")return"0 0 * * 0";if(e==="@daily"||e==="@midnight")return"0 0 * * *";if(e==="@hourly")return"0 * * * *";if(e==="@reboot")throw new TypeError("CronPattern: @reboot is not supported in this environment. This is an event-based trigger that requires system startup detection.");return t}setNthWeekdayOfMonth(t,e){if(typeof e!="number"&&e.toUpperCase()==="L")this.dayOfWeek[t]=this.dayOfWeek[t]|32;else if(e===63)this.dayOfWeek[t]=63;else if(e<6&&e>0)this.dayOfWeek[t]=this.dayOfWeek[t]|fw[e-1];else throw new TypeError(`CronPattern: nth weekday out of range, should be 1-5 or L. Value: ${e}, Type: ${typeof e}`)}},Gm=[31,28,31,30,31,30,31,31,30,31,30,31],Fe=[["month","year",0],["day","month",-1],["hour","day",0],["minute","hour",0],["second","minute",0]],Ze=class hw{static{o(this,"s")}tz;ms;second;minute;hour;day;month;year;constructor(e,r){if(this.tz=r,e&&e instanceof Date)if(!isNaN(e))this.fromDate(e);else throw new TypeError("CronDate: Invalid date passed to CronDate constructor");else if(e==null)this.fromDate(new Date);else if(e&&typeof e=="string")this.fromString(e);else if(e instanceof hw)this.fromCronDate(e);else throw new TypeError("CronDate: Invalid type ("+typeof e+") passed to CronDate constructor")}getLastDayOfMonth(e,r){return r!==1?Gm[r]:new Date(Date.UTC(e,r+1,0)).getUTCDate()}getLastWeekday(e,r){let n=this.getLastDayOfMonth(e,r),i=new Date(Date.UTC(e,r,n)).getUTCDay();return i===0?n-2:i===6?n-1:n}getNearestWeekday(e,r,n){let i=this.getLastDayOfMonth(e,r);if(n>i)return-1;let s=new Date(Date.UTC(e,r,n)).getUTCDay();return s===0?n===i?n-2:n+1:s===6?n===1?n+2:n-1:n}isNthWeekdayOfMonth(e,r,n,i){let s=new Date(Date.UTC(e,r,n)).getUTCDay(),a=0;for(let l=1;l<=n;l++)new Date(Date.UTC(e,r,l)).getUTCDay()===s&&a++;if(i&63&&fw[a-1]&i)return!0;if(i&32){let l=this.getLastDayOfMonth(e,r);for(let c=n+1;c<=l;c++)if(new Date(Date.UTC(e,r,c)).getUTCDay()===s)return!1;return!0}return!1}fromDate(e){if(this.tz!==void 0)if(typeof this.tz=="number")this.ms=e.getUTCMilliseconds(),this.second=e.getUTCSeconds(),this.minute=e.getUTCMinutes()+this.tz,this.hour=e.getUTCHours(),this.day=e.getUTCDate(),this.month=e.getUTCMonth(),this.year=e.getUTCFullYear(),this.apply();else try{let r=Na(e,this.tz);this.ms=e.getMilliseconds(),this.second=r.s,this.minute=r.i,this.hour=r.h,this.day=r.d,this.month=r.m-1,this.year=r.y}catch(r){let n=r instanceof Error?r.message:String(r);throw new TypeError(`CronDate: Failed to convert date to timezone '${this.tz}'. This may happen with invalid timezone names or dates. Original error: ${n}`)}else this.ms=e.getMilliseconds(),this.second=e.getSeconds(),this.minute=e.getMinutes(),this.hour=e.getHours(),this.day=e.getDate(),this.month=e.getMonth(),this.year=e.getFullYear()}fromCronDate(e){this.tz=e.tz,this.year=e.year,this.month=e.month,this.day=e.day,this.hour=e.hour,this.minute=e.minute,this.second=e.second,this.ms=e.ms}apply(){if(this.month>11||this.month<0||this.day>Gm[this.month]||this.day<1||this.hour>59||this.minute>59||this.second>59||this.hour<0||this.minute<0||this.second<0){let e=new Date(Date.UTC(this.year,this.month,this.day,this.hour,this.minute,this.second,this.ms));return this.ms=e.getUTCMilliseconds(),this.second=e.getUTCSeconds(),this.minute=e.getUTCMinutes(),this.hour=e.getUTCHours(),this.day=e.getUTCDate(),this.month=e.getUTCMonth(),this.year=e.getUTCFullYear(),!0}else return!1}fromString(e){if(typeof this.tz=="number"){let r=cw(e);this.ms=r.getUTCMilliseconds(),this.second=r.getUTCSeconds(),this.minute=r.getUTCMinutes(),this.hour=r.getUTCHours(),this.day=r.getUTCDate(),this.month=r.getUTCMonth(),this.year=r.getUTCFullYear(),this.apply()}else return this.fromDate(cw(e,this.tz))}findNext(e,r,n,i){return this._findMatch(e,r,n,i,1)}_findMatch(e,r,n,i,s){let a=this[r],l;n.lastDayOfMonth&&(l=this.getLastDayOfMonth(this.year,this.month));let c=!n.starDOW&&r=="day"?new Date(Date.UTC(this.year,this.month,1,0,0,0,0)).getUTCDay():void 0,u=this[r]+i,f=s===1?p=>p<n[r].length:p=>p>=0;for(let p=u;f(p);p+=s){let h=n[r][p];if(r==="day"&&!h){for(let m=0;m<n.nearestWeekdays.length;m++)if(n.nearestWeekdays[m]){let d=this.getNearestWeekday(this.year,this.month,m-i);if(d===-1)continue;if(d===p-i){h=1;break}}}if(r==="day"&&n.lastWeekday){let m=this.getLastWeekday(this.year,this.month);p-i===m&&(h=1)}if(r==="day"&&n.lastDayOfMonth&&p-i==l&&(h=1),r==="day"&&!n.starDOW){let m=n.dayOfWeek[(c+(p-i-1))%7];if(m&&m&63)m=this.isNthWeekdayOfMonth(this.year,this.month,p-i,m)?1:0;else if(m)throw new Error(`CronDate: Invalid value for dayOfWeek encountered. ${m}`);n.useAndLogic?h=h&&m:!e.domAndDow&&!n.starDOM?h=h||m:h=h&&m}if(h)return this[r]=p-i,a!==this[r]?2:1}return 3}recurse(e,r,n){if(n===0&&!e.starYear){if(this.year>=0&&this.year<e.year.length&&e.year[this.year]===0){let s=-1;for(let a=this.year+1;a<e.year.length&&a<1e4;a++)if(e.year[a]===1){s=a;break}if(s===-1)return null;this.year=s,this.month=0,this.day=1,this.hour=0,this.minute=0,this.second=0,this.ms=0}if(this.year>=1e4)return null}let i=this.findNext(r,Fe[n][0],e,Fe[n][2]);if(i>1){let s=n+1;for(;s<Fe.length;)this[Fe[s][0]]=-Fe[s][2],s++;if(i===3){if(this[Fe[n][1]]++,this[Fe[n][0]]=-Fe[n][2],this.apply(),n===0&&!e.starYear){for(;this.year>=0&&this.year<e.year.length&&e.year[this.year]===0&&this.year<1e4;)this.year++;if(this.year>=1e4||this.year>=e.year.length)return null}return this.recurse(e,r,0)}else if(this.apply())return this.recurse(e,r,n-1)}return n+=1,n>=Fe.length?this:(e.starYear?this.year>=3e3:this.year>=1e4)?null:this.recurse(e,r,n)}increment(e,r,n){return this.second+=r.interval!==void 0&&r.interval>1&&n?r.interval:1,this.ms=0,this.apply(),this.recurse(e,r,0)}decrement(e,r){return this.second-=r.interval!==void 0&&r.interval>1?r.interval:1,this.ms=0,this.apply(),this.recurseBackward(e,r,0,0)}recurseBackward(e,r,n,i=0){if(i>1e4)return null;if(n===0&&!e.starYear){if(this.year>=0&&this.year<e.year.length&&e.year[this.year]===0){let a=-1;for(let l=this.year-1;l>=0;l--)if(e.year[l]===1){a=l;break}if(a===-1)return null;this.year=a,this.month=11,this.day=31,this.hour=23,this.minute=59,this.second=59,this.ms=0}if(this.year<0)return null}let s=this.findPrevious(r,Fe[n][0],e,Fe[n][2]);if(s>1){let a=n+1;for(;a<Fe.length;){let l=Fe[a][0],c=Fe[a][2],u=this.getMaxPatternValue(l,e,c);this[l]=u,a++}if(s===3){if(this[Fe[n][1]]--,n===0){let f=this.getLastDayOfMonth(this.year,this.month);this.day>f&&(this.day=f)}if(n===1)if(this.day<=0)this.day=1;else{let f=this.year,p=this.month;for(;p<0;)p+=12,f--;for(;p>11;)p-=12,f++;let h=p!==1?Gm[p]:new Date(Date.UTC(f,p+1,0)).getUTCDate();this.day>h&&(this.day=h)}this.apply();let l=Fe[n][0],c=Fe[n][2],u=this.getMaxPatternValue(l,e,c);if(l==="day"){let f=this.getLastDayOfMonth(this.year,this.month);this[l]=Math.min(u,f)}else this[l]=u;if(this.apply(),n===0){let f=Fe[1][2],p=this.getMaxPatternValue("day",e,f),h=this.getLastDayOfMonth(this.year,this.month),m=Math.min(p,h);m!==this.day&&(this.day=m,this.hour=this.getMaxPatternValue("hour",e,Fe[2][2]),this.minute=this.getMaxPatternValue("minute",e,Fe[3][2]),this.second=this.getMaxPatternValue("second",e,Fe[4][2]))}if(n===0&&!e.starYear){for(;this.year>=0&&this.year<e.year.length&&e.year[this.year]===0;)this.year--;if(this.year<0)return null}return this.recurseBackward(e,r,0,i+1)}else if(this.apply())return this.recurseBackward(e,r,n-1,i+1)}return n+=1,n>=Fe.length?this:this.year<0?null:this.recurseBackward(e,r,n,i+1)}getMaxPatternValue(e,r,n){if(e==="day"&&r.lastDayOfMonth)return this.getLastDayOfMonth(this.year,this.month);if(e==="day"&&!r.starDOW)return this.getLastDayOfMonth(this.year,this.month);for(let i=r[e].length-1;i>=0;i--)if(r[e][i])return i-n;return r[e].length-1-n}findPrevious(e,r,n,i){return this._findMatch(e,r,n,i,-1)}getDate(e){return e||this.tz===void 0?new Date(this.year,this.month,this.day,this.hour,this.minute,this.second,this.ms):typeof this.tz=="number"?new Date(Date.UTC(this.year,this.month,this.day,this.hour,this.minute-this.tz,this.second,this.ms)):uw(Km(this.year,this.month+1,this.day,this.hour,this.minute,this.second,this.tz),!1)}getTime(){return this.getDate(!1).getTime()}match(e,r){if(!e.starYear&&(this.year<0||this.year>=e.year.length||e.year[this.year]===0))return!1;for(let n=0;n<Fe.length;n++){let i=Fe[n][0],s=Fe[n][2],a=this[i];if(a+s<0||a+s>=e[i].length)return!1;let l=e[i][a+s];if(i==="day"){if(!l){for(let c=0;c<e.nearestWeekdays.length;c++)if(e.nearestWeekdays[c]){let u=this.getNearestWeekday(this.year,this.month,c-s);if(u!==-1&&u===a){l=1;break}}}if(e.lastWeekday){let c=this.getLastWeekday(this.year,this.month);a===c&&(l=1)}if(e.lastDayOfMonth){let c=this.getLastDayOfMonth(this.year,this.month);a===c&&(l=1)}if(!e.starDOW){let c=new Date(Date.UTC(this.year,this.month,1,0,0,0,0)).getUTCDay(),u=e.dayOfWeek[(c+(a-1))%7];u&&u&63&&(u=this.isNthWeekdayOfMonth(this.year,this.month,a,u)?1:0),e.useAndLogic?l=l&&u:!r.domAndDow&&!e.starDOM?l=l||u:l=l&&u}}if(!l)return!1}return!0}};function eN(t){if(t===void 0&&(t={}),delete t.name,t.legacyMode!==void 0&&t.domAndDow===void 0?t.domAndDow=!t.legacyMode:t.domAndDow===void 0&&(t.domAndDow=!1),t.legacyMode=!t.domAndDow,t.paused=t.paused===void 0?!1:t.paused,t.maxRuns=t.maxRuns===void 0?1/0:t.maxRuns,t.catch=t.catch===void 0?!1:t.catch,t.interval=t.interval===void 0?0:parseInt(t.interval.toString(),10),t.utcOffset=t.utcOffset===void 0?void 0:parseInt(t.utcOffset.toString(),10),t.dayOffset=t.dayOffset===void 0?0:parseInt(t.dayOffset.toString(),10),t.unref=t.unref===void 0?!1:t.unref,t.mode=t.mode===void 0?"auto":t.mode,t.alternativeWeekdays=t.alternativeWeekdays===void 0?!1:t.alternativeWeekdays,t.sloppyRanges=t.sloppyRanges===void 0?!1:t.sloppyRanges,!["auto","5-part","6-part","7-part","5-or-6-parts","6-or-7-parts"].includes(t.mode))throw new Error("CronOptions: mode must be one of 'auto', '5-part', '6-part', '7-part', '5-or-6-parts', or '6-or-7-parts'.");if(t.startAt&&(t.startAt=new Ze(t.startAt,t.timezone)),t.stopAt&&(t.stopAt=new Ze(t.stopAt,t.timezone)),t.interval!==null){if(isNaN(t.interval))throw new Error("CronOptions: Supplied value for interval is not a number");if(t.interval<0)throw new Error("CronOptions: Supplied value for interval can not be negative")}if(t.utcOffset!==void 0){if(isNaN(t.utcOffset))throw new Error("CronOptions: Invalid value passed for utcOffset, should be number representing minutes offset from UTC.");if(t.utcOffset<-870||t.utcOffset>870)throw new Error("CronOptions: utcOffset out of bounds.");if(t.utcOffset!==void 0&&t.timezone)throw new Error("CronOptions: Combining 'utcOffset' with 'timezone' is not allowed.")}if(t.unref!==!0&&t.unref!==!1)throw new Error("CronOptions: Unref should be either true, false or undefined(false).");if(t.dayOffset!==void 0&&t.dayOffset!==0&&isNaN(t.dayOffset))throw new Error("CronOptions: Invalid value passed for dayOffset, should be a number representing days to offset.");return t}o(eN,"R");function Pa(t){return Object.prototype.toString.call(t)==="[object Function]"||typeof t=="function"||t instanceof Function}o(Pa,"p");function tN(t){return Pa(t)}o(tN,"_");function rN(t){typeof Deno<"u"&&typeof Deno.unrefTimer<"u"?Deno.unrefTimer(t):t&&typeof t.unref<"u"&&t.unref()}o(rN,"x");var pw=30*1e3,Ho=[],mw=class{static{o(this,"E")}name;options;_states;fn;getTz(){return this.options.timezone||this.options.utcOffset}applyDayOffset(t){if(this.options.dayOffset!==void 0&&this.options.dayOffset!==0){let e=this.options.dayOffset*24*60*60*1e3;return new Date(t.getTime()+e)}return t}constructor(t,e,r){let n,i;if(Pa(e))i=e;else if(typeof e=="object")n=e;else if(e!==void 0)throw new Error("Cron: Invalid argument passed for optionsIn. Should be one of function, or object (options).");if(Pa(r))i=r;else if(typeof r=="object")n=r;else if(r!==void 0)throw new Error("Cron: Invalid argument passed for funcIn. Should be one of function, or object (options).");if(this.name=n?.name,this.options=eN(n),this._states={kill:!1,blocking:!1,previousRun:void 0,currentRun:void 0,once:void 0,currentTimeout:void 0,maxRuns:n?n.maxRuns:void 0,paused:n?n.paused:!1,pattern:new iu("* * * * *",void 0,{mode:"auto"})},t&&(t instanceof Date||typeof t=="string"&&t.indexOf(":")>0)?this._states.once=new Ze(t,this.getTz()):this._states.pattern=new iu(t,this.options.timezone,{mode:this.options.mode,alternativeWeekdays:this.options.alternativeWeekdays,sloppyRanges:this.options.sloppyRanges}),this.name){if(Ho.find(s=>s.name===this.name))throw new Error("Cron: Tried to initialize new named job '"+this.name+"', but name already taken.");Ho.push(this)}return i!==void 0&&tN(i)&&(this.fn=i,this.schedule()),this}nextRun(t){let e=this._next(t);return e?this.applyDayOffset(e.getDate(!1)):null}nextRuns(t,e){this._states.maxRuns!==void 0&&t>this._states.maxRuns&&(t=this._states.maxRuns);let r=e||this._states.currentRun||void 0;return this._enumerateRuns(t,r,"next")}previousRuns(t,e){return this._enumerateRuns(t,e||void 0,"previous")}_enumerateRuns(t,e,r){let n=[],i=e?new Ze(e,this.getTz()):null,s=r==="next"?this._next:this._previous;for(;t--;){let a=s.call(this,i);if(!a)break;let l=a.getDate(!1);n.push(this.applyDayOffset(l)),i=a}return n}match(t){if(this._states.once){let r=new Ze(t,this.getTz());r.ms=0;let n=new Ze(this._states.once,this.getTz());return n.ms=0,r.getTime()===n.getTime()}let e=new Ze(t,this.getTz());return e.ms=0,e.match(this._states.pattern,this.options)}getPattern(){if(!this._states.once)return this._states.pattern?this._states.pattern.pattern:void 0}getOnce(){return this._states.once?this._states.once.getDate():null}isRunning(){let t=this.nextRun(this._states.currentRun),e=!this._states.paused,r=this.fn!==void 0,n=!this._states.kill;return e&&r&&n&&t!==null}isStopped(){return this._states.kill}isBusy(){return this._states.blocking}currentRun(){return this._states.currentRun?this._states.currentRun.getDate():null}previousRun(){return this._states.previousRun?this._states.previousRun.getDate():null}msToNext(t){let e=this._next(t);return e?t instanceof Ze||t instanceof Date?e.getTime()-t.getTime():e.getTime()-new Ze(t).getTime():null}stop(){this._states.kill=!0,this._states.currentTimeout&&clearTimeout(this._states.currentTimeout);let t=Ho.indexOf(this);t>=0&&Ho.splice(t,1)}pause(){return this._states.paused=!0,!this._states.kill}resume(){return this._states.paused=!1,!this._states.kill}schedule(t){if(t&&this.fn)throw new Error("Cron: It is not allowed to schedule two functions using the same Croner instance.");t&&(this.fn=t);let e=this.msToNext(),r=this.nextRun(this._states.currentRun);return e==null||isNaN(e)||r===null?this:(e>pw&&(e=pw),this._states.currentTimeout=setTimeout(()=>this._checkTrigger(r),e),this._states.currentTimeout&&this.options.unref&&rN(this._states.currentTimeout),this)}async _trigger(t){this._states.blocking=!0,this._states.currentRun=new Ze(void 0,this.getTz());try{if(this.options.catch)try{this.fn!==void 0&&await this.fn(this,this.options.context)}catch(e){if(Pa(this.options.catch))try{this.options.catch(e,this)}catch{}}else this.fn!==void 0&&await this.fn(this,this.options.context)}finally{this._states.previousRun=new Ze(t,this.getTz()),this._states.blocking=!1}}async trigger(){await this._trigger()}runsLeft(){return this._states.maxRuns}_checkTrigger(t){let e=new Date,r=!this._states.paused&&e.getTime()>=t.getTime(),n=this._states.blocking&&this.options.protect;r&&!n?(this._states.maxRuns!==void 0&&this._states.maxRuns--,this._trigger()):r&&n&&Pa(this.options.protect)&&setTimeout(()=>this.options.protect(this),0),this.schedule()}_next(t){let e=!!(t||this._states.currentRun),r=!1;!t&&this.options.startAt&&this.options.interval&&([t,e]=this._calculatePreviousRun(t,e),r=!t),t=new Ze(t,this.getTz()),this.options.startAt&&t&&t.getTime()<this.options.startAt.getTime()&&(t=this.options.startAt);let n=this._states.once||new Ze(t,this.getTz());return!r&&n!==this._states.once&&(n=n.increment(this._states.pattern,this.options,e)),this._states.once&&this._states.once.getTime()<=t.getTime()||n===null||this._states.maxRuns!==void 0&&this._states.maxRuns<=0||this._states.kill||this.options.stopAt&&n.getTime()>=this.options.stopAt.getTime()?null:n}_previous(t){let e=new Ze(t,this.getTz());this.options.stopAt&&e.getTime()>this.options.stopAt.getTime()&&(e=this.options.stopAt);let r=new Ze(e,this.getTz());return this._states.once?this._states.once.getTime()<e.getTime()?this._states.once:null:(r=r.decrement(this._states.pattern,this.options),r===null||this.options.startAt&&r.getTime()<this.options.startAt.getTime()?null:r)}_calculatePreviousRun(t,e){let r=new Ze(void 0,this.getTz()),n=t;if(this.options.startAt.getTime()<=r.getTime()){n=this.options.startAt;let i=n.getTime()+this.options.interval*1e3;for(;i<=r.getTime();)n=new Ze(n,this.getTz()).increment(this._states.pattern,this.options,!0),i=n.getTime()+this.options.interval*1e3;e=!0}return n===null&&(n=void 0),[n,e]}};var Ha={};se(Ha,{add:()=>Bn,addBusinessDays:()=>mu,addDays:()=>et,addHours:()=>du,addISOWeekYears:()=>yu,addMilliseconds:()=>jn,addMinutes:()=>Vo,addMonths:()=>Jr,addQuarters:()=>Ko,addSeconds:()=>xu,addWeeks:()=>zn,addYears:()=>bu,areIntervalsOverlapping:()=>bw,clamp:()=>ww,closestIndexTo:()=>Su,closestTo:()=>vw,compareAsc:()=>xt,compareDesc:()=>Sw,constructFrom:()=>$,constructNow:()=>de,daysToWeeks:()=>kw,differenceInBusinessDays:()=>Tw,differenceInCalendarDays:()=>st,differenceInCalendarISOWeekYears:()=>Tu,differenceInCalendarISOWeeks:()=>Ew,differenceInCalendarMonths:()=>_i,differenceInCalendarQuarters:()=>Go,differenceInCalendarWeeks:()=>Ri,differenceInCalendarYears:()=>Wn,differenceInDays:()=>Jo,differenceInHours:()=>Ai,differenceInISOWeekYears:()=>Cw,differenceInMilliseconds:()=>Qo,differenceInMinutes:()=>Fi,differenceInMonths:()=>Hn,differenceInQuarters:()=>Ow,differenceInSeconds:()=>en,differenceInWeeks:()=>Mw,differenceInYears:()=>Cu,eachDayOfInterval:()=>Ou,eachHourOfInterval:()=>Iw,eachMinuteOfInterval:()=>Nw,eachMonthOfInterval:()=>Pw,eachQuarterOfInterval:()=>Lw,eachWeekOfInterval:()=>_w,eachWeekendOfInterval:()=>es,eachWeekendOfMonth:()=>Rw,eachWeekendOfYear:()=>Aw,eachYearOfInterval:()=>Fw,endOfDay:()=>Xo,endOfDecade:()=>$w,endOfHour:()=>Bw,endOfISOWeek:()=>jw,endOfISOWeekYear:()=>zw,endOfMinute:()=>Ww,endOfMonth:()=>Zo,endOfQuarter:()=>Hw,endOfSecond:()=>Uw,endOfToday:()=>qw,endOfTomorrow:()=>Yw,endOfWeek:()=>Iu,endOfYear:()=>Mu,endOfYesterday:()=>Vw,format:()=>$a,formatDate:()=>$a,formatDistance:()=>Ru,formatDistanceStrict:()=>Au,formatDistanceToNow:()=>i0,formatDistanceToNowStrict:()=>o0,formatDuration:()=>s0,formatISO:()=>a0,formatISO9075:()=>l0,formatISODuration:()=>c0,formatRFC3339:()=>u0,formatRFC7231:()=>f0,formatRelative:()=>p0,formatters:()=>Aa,fromUnixTime:()=>h0,getDate:()=>Fu,getDay:()=>Vn,getDayOfYear:()=>Pu,getDaysInMonth:()=>$u,getDaysInYear:()=>m0,getDecade:()=>d0,getDefaultOptions:()=>ju,getHours:()=>g0,getISODay:()=>zu,getISOWeek:()=>is,getISOWeekYear:()=>Mt,getISOWeeksInYear:()=>y0,getMilliseconds:()=>x0,getMinutes:()=>b0,getMonth:()=>w0,getOverlappingDaysInIntervals:()=>v0,getQuarter:()=>Ra,getSeconds:()=>S0,getTime:()=>k0,getUnixTime:()=>T0,getWeek:()=>os,getWeekOfMonth:()=>E0,getWeekYear:()=>qn,getWeeksInMonth:()=>D0,getYear:()=>C0,hoursToMilliseconds:()=>O0,hoursToMinutes:()=>M0,hoursToSeconds:()=>I0,interval:()=>N0,intervalToDuration:()=>P0,intlFormat:()=>L0,intlFormatDistance:()=>_0,isAfter:()=>R0,isBefore:()=>A0,isDate:()=>ku,isEqual:()=>F0,isExists:()=>$0,isFirstDayOfMonth:()=>B0,isFriday:()=>j0,isFuture:()=>z0,isLastDayOfMonth:()=>Du,isLeapYear:()=>Bu,isMatch:()=>W0,isMonday:()=>H0,isPast:()=>U0,isSameDay:()=>Zr,isSameHour:()=>Lf,isSameISOWeek:()=>_f,isSameISOWeekYear:()=>q0,isSameMinute:()=>Rf,isSameMonth:()=>Af,isSameQuarter:()=>Ff,isSameSecond:()=>$f,isSameWeek:()=>cs,isSameYear:()=>Bf,isSaturday:()=>pu,isSunday:()=>hu,isThisHour:()=>Y0,isThisISOWeek:()=>V0,isThisMinute:()=>K0,isThisMonth:()=>G0,isThisQuarter:()=>J0,isThisSecond:()=>Q0,isThisWeek:()=>X0,isThisYear:()=>Z0,isThursday:()=>ev,isToday:()=>tv,isTomorrow:()=>rv,isTuesday:()=>nv,isValid:()=>ht,isWednesday:()=>iv,isWeekend:()=>Qr,isWithinInterval:()=>ov,isYesterday:()=>sv,lastDayOfDecade:()=>av,lastDayOfISOWeek:()=>lv,lastDayOfISOWeekYear:()=>cv,lastDayOfMonth:()=>Wu,lastDayOfQuarter:()=>uv,lastDayOfWeek:()=>jf,lastDayOfYear:()=>fv,lightFormat:()=>pv,lightFormatters:()=>Qt,longFormatters:()=>Yn,max:()=>wu,milliseconds:()=>hv,millisecondsToHours:()=>mv,millisecondsToMinutes:()=>dv,millisecondsToSeconds:()=>gv,min:()=>vu,minutesToHours:()=>yv,minutesToMilliseconds:()=>xv,minutesToSeconds:()=>bv,monthsToQuarters:()=>wv,monthsToYears:()=>vv,nextDay:()=>wt,nextFriday:()=>Sv,nextMonday:()=>kv,nextSaturday:()=>Tv,nextSunday:()=>Ev,nextThursday:()=>Dv,nextTuesday:()=>Cv,nextWednesday:()=>Ov,parse:()=>Pf,parseISO:()=>Iv,parseJSON:()=>Nv,parsers:()=>Nf,previousDay:()=>vt,previousFriday:()=>Pv,previousMonday:()=>Lv,previousSaturday:()=>_v,previousSunday:()=>Rv,previousThursday:()=>Av,previousTuesday:()=>Fv,previousWednesday:()=>$v,quartersToMonths:()=>Bv,quartersToYears:()=>jv,roundToNearestHours:()=>zv,roundToNearestMinutes:()=>Wv,secondsToHours:()=>Hv,secondsToMilliseconds:()=>Uv,secondsToMinutes:()=>qv,set:()=>Yv,setDate:()=>Vv,setDay:()=>Kn,setDayOfYear:()=>Kv,setDefaultOptions:()=>Gv,setHours:()=>Jv,setISODay:()=>df,setISOWeek:()=>lf,setISOWeekYear:()=>gu,setMilliseconds:()=>Qv,setMinutes:()=>Xv,setMonth:()=>us,setQuarter:()=>Zv,setSeconds:()=>eS,setWeek:()=>sf,setWeekYear:()=>tS,setYear:()=>rS,startOfDay:()=>Xr,startOfDecade:()=>nS,startOfHour:()=>Ba,startOfISOWeek:()=>Ge,startOfISOWeekYear:()=>Jt,startOfMinute:()=>ja,startOfMonth:()=>Un,startOfQuarter:()=>tn,startOfSecond:()=>za,startOfToday:()=>iS,startOfTomorrow:()=>oS,startOfWeek:()=>_e,startOfWeekYear:()=>$i,startOfYear:()=>ts,startOfYesterday:()=>sS,sub:()=>aS,subBusinessDays:()=>lS,subDays:()=>Gn,subHours:()=>cS,subISOWeekYears:()=>Eu,subMilliseconds:()=>uS,subMinutes:()=>fS,subMonths:()=>Wf,subQuarters:()=>pS,subSeconds:()=>hS,subWeeks:()=>mS,subYears:()=>dS,toDate:()=>b,transpose:()=>Hu,weeksToDays:()=>gS,yearsToDays:()=>yS,yearsToMonths:()=>xS,yearsToQuarters:()=>bS});var su=7,_a=365.2425,nN=Math.pow(10,8)*24*60*60*1e3,s7=-nN,Gr=6048e5,au=864e5,yt=6e4,Gt=36e5,Uo=1e3,Jm=525600,$n=43200,qo=1440,lu=60,cu=3,uu=12,fu=4,Li=3600,Yo=60,ou=Li*24,dw=ou*7,Qm=ou*365.2425,Xm=Qm/12,gw=Xm*3,Zm=Symbol.for("constructDateFrom");function $(t,e){return typeof t=="function"?t(e):t&&typeof t=="object"&&Zm in t?t[Zm](e):t instanceof Date?new t.constructor(e):new Date(e)}o($,"constructFrom");var c7=$;function b(t,e){return $(e||t,t)}o(b,"toDate");var h7=b;function et(t,e,r){let n=b(t,r?.in);return isNaN(e)?$(r?.in||t,NaN):(e&&n.setDate(n.getDate()+e),n)}o(et,"addDays");var x7=et;function Jr(t,e,r){let n=b(t,r?.in);if(isNaN(e))return $(r?.in||t,NaN);if(!e)return n;let i=n.getDate(),s=$(r?.in||t,n.getTime());s.setMonth(n.getMonth()+e+1,0);let a=s.getDate();return i>=a?s:(n.setFullYear(s.getFullYear(),s.getMonth(),i),n)}o(Jr,"addMonths");var k7=Jr;function Bn(t,e,r){let{years:n=0,months:i=0,weeks:s=0,days:a=0,hours:l=0,minutes:c=0,seconds:u=0}=e,f=b(t,r?.in),p=i||n?Jr(f,i+n*12):f,h=a||s?et(p,a+s*7):p,m=c+l*60,g=(u+m*60)*1e3;return $(r?.in||t,+h+g)}o(Bn,"add");var I7=Bn;function pu(t,e){return b(t,e?.in).getDay()===6}o(pu,"isSaturday");var _7=pu;function hu(t,e){return b(t,e?.in).getDay()===0}o(hu,"isSunday");var $7=hu;function Qr(t,e){let r=b(t,e?.in).getDay();return r===0||r===6}o(Qr,"isWeekend");var W7=Qr;function mu(t,e,r){let n=b(t,r?.in),i=Qr(n,r);if(isNaN(e))return $(r?.in,NaN);let s=n.getHours(),a=e<0?-1:1,l=Math.trunc(e/5);n.setDate(n.getDate()+l*7);let c=Math.abs(e%5);for(;c>0;)n.setDate(n.getDate()+a),Qr(n,r)||(c-=1);return i&&Qr(n,r)&&e!==0&&(pu(n,r)&&n.setDate(n.getDate()+(a<0?2:-1)),hu(n,r)&&n.setDate(n.getDate()+(a<0?1:-2))),n.setHours(s),n}o(mu,"addBusinessDays");var J7=mu;function jn(t,e,r){return $(r?.in||t,+b(t)+e)}o(jn,"addMilliseconds");var tG=jn;function du(t,e,r){return jn(t,e*Gt,r)}o(du,"addHours");var sG=du;var yw={};function Oe(){return yw}o(Oe,"getDefaultOptions");function xw(t){yw=t}o(xw,"setDefaultOptions");function _e(t,e){let r=Oe(),n=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=b(t,e?.in),s=i.getDay(),a=(s<n?7:0)+s-n;return i.setDate(i.getDate()-a),i.setHours(0,0,0,0),i}o(_e,"startOfWeek");var hG=_e;function Ge(t,e){return _e(t,{...e,weekStartsOn:1})}o(Ge,"startOfISOWeek");var yG=Ge;function Mt(t,e){let r=b(t,e?.in),n=r.getFullYear(),i=$(r,0);i.setFullYear(n+1,0,4),i.setHours(0,0,0,0);let s=Ge(i),a=$(r,0);a.setFullYear(n,0,4),a.setHours(0,0,0,0);let l=Ge(a);return r.getTime()>=s.getTime()?n+1:r.getTime()>=l.getTime()?n:n-1}o(Mt,"getISOWeekYear");var kG=Mt;function We(t){let e=b(t),r=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return r.setUTCFullYear(e.getFullYear()),+t-+r}o(We,"getTimezoneOffsetInMilliseconds");function ee(t,...e){let r=$.bind(null,t||e.find(n=>typeof n=="object"));return e.map(r)}o(ee,"normalizeDates");function Xr(t,e){let r=b(t,e?.in);return r.setHours(0,0,0,0),r}o(Xr,"startOfDay");var LG=Xr;function st(t,e,r){let[n,i]=ee(r?.in,t,e),s=Xr(n),a=Xr(i),l=+s-We(s),c=+a-We(a);return Math.round((l-c)/au)}o(st,"differenceInCalendarDays");var jG=st;function Jt(t,e){let r=Mt(t,e),n=$(e?.in||t,0);return n.setFullYear(r,0,4),n.setHours(0,0,0,0),Ge(n)}o(Jt,"startOfISOWeekYear");var YG=Jt;function gu(t,e,r){let n=b(t,r?.in),i=st(n,Jt(n,r)),s=$(r?.in||t,0);return s.setFullYear(e,0,4),s.setHours(0,0,0,0),n=Jt(s),n.setDate(n.getDate()+i),n}o(gu,"setISOWeekYear");var ZG=gu;function yu(t,e,r){return gu(t,Mt(t,r)+e,r)}o(yu,"addISOWeekYears");var iJ=yu;function Vo(t,e,r){let n=b(t,r?.in);return n.setTime(n.getTime()+e*yt),n}o(Vo,"addMinutes");var cJ=Vo;function Ko(t,e,r){return Jr(t,e*3,r)}o(Ko,"addQuarters");var hJ=Ko;function xu(t,e,r){return jn(t,e*1e3,r)}o(xu,"addSeconds");var yJ=xu;function zn(t,e,r){return et(t,e*7,r)}o(zn,"addWeeks");var vJ=zn;function bu(t,e,r){return Jr(t,e*12,r)}o(bu,"addYears");var EJ=bu;function bw(t,e,r){let[n,i]=[+b(t.start,r?.in),+b(t.end,r?.in)].sort((l,c)=>l-c),[s,a]=[+b(e.start,r?.in),+b(e.end,r?.in)].sort((l,c)=>l-c);return r?.inclusive?n<=a&&s<=i:n<a&&s<i}o(bw,"areIntervalsOverlapping");var MJ=bw;function wu(t,e){let r,n=e?.in;return t.forEach(i=>{!n&&typeof i=="object"&&(n=$.bind(null,i));let s=b(i,n);(!r||r<s||isNaN(+s))&&(r=s)}),$(n,r||NaN)}o(wu,"max");var _J=wu;function vu(t,e){let r,n=e?.in;return t.forEach(i=>{!n&&typeof i=="object"&&(n=$.bind(null,i));let s=b(i,n);(!r||r>s||isNaN(+s))&&(r=s)}),$(n,r||NaN)}o(vu,"min");var BJ=vu;function ww(t,e,r){let[n,i,s]=ee(r?.in,t,e.start,e.end);return vu([wu([n,i],r),s],r)}o(ww,"clamp");var qJ=ww;function Su(t,e){let r=+b(t);if(isNaN(r))return NaN;let n,i;return e.forEach((s,a)=>{let l=b(s);if(isNaN(+l)){n=NaN,i=NaN;return}let c=Math.abs(r-+l);(n==null||c<i)&&(n=a,i=c)}),n}o(Su,"closestIndexTo");var GJ=Su;function vw(t,e,r){let[n,...i]=ee(r?.in,t,...e),s=Su(n,i);if(typeof s=="number"&&isNaN(s))return $(n,NaN);if(s!==void 0)return i[s]}o(vw,"closestTo");var tQ=vw;function xt(t,e){let r=+b(t)-+b(e);return r<0?-1:r>0?1:r}o(xt,"compareAsc");var oQ=xt;function Sw(t,e){let r=+b(t)-+b(e);return r>0?-1:r<0?1:r}o(Sw,"compareDesc");var cQ=Sw;function de(t){return $(t,Date.now())}o(de,"constructNow");var hQ=de;function kw(t){let e=Math.trunc(t/7);return e===0?0:e}o(kw,"daysToWeeks");var yQ=kw;function Zr(t,e,r){let[n,i]=ee(r?.in,t,e);return+Xr(n)==+Xr(i)}o(Zr,"isSameDay");var SQ=Zr;function ku(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}o(ku,"isDate");var EQ=ku;function ht(t){return!(!ku(t)&&typeof t!="number"||isNaN(+b(t)))}o(ht,"isValid");var IQ=ht;function Tw(t,e,r){let[n,i]=ee(r?.in,t,e);if(!ht(n)||!ht(i))return NaN;let s=st(n,i),a=s<0?-1:1,l=Math.trunc(s/7),c=l*5,u=et(i,l*7);for(;!Zr(n,u);)c+=Qr(u,r)?0:a,u=et(u,a);return c===0?0:c}o(Tw,"differenceInBusinessDays");var BQ=Tw;function Tu(t,e,r){let[n,i]=ee(r?.in,t,e);return Mt(n,r)-Mt(i,r)}o(Tu,"differenceInCalendarISOWeekYears");var UQ=Tu;function Ew(t,e,r){let[n,i]=ee(r?.in,t,e),s=Ge(n),a=Ge(i),l=+s-We(s),c=+a-We(a);return Math.round((l-c)/Gr)}o(Ew,"differenceInCalendarISOWeeks");var QQ=Ew;function _i(t,e,r){let[n,i]=ee(r?.in,t,e),s=n.getFullYear()-i.getFullYear(),a=n.getMonth()-i.getMonth();return s*12+a}o(_i,"differenceInCalendarMonths");var tX=_i;function Ra(t,e){let r=b(t,e?.in);return Math.trunc(r.getMonth()/3)+1}o(Ra,"getQuarter");var oX=Ra;function Go(t,e,r){let[n,i]=ee(r?.in,t,e),s=n.getFullYear()-i.getFullYear(),a=Ra(n)-Ra(i);return s*4+a}o(Go,"differenceInCalendarQuarters");var uX=Go;function Ri(t,e,r){let[n,i]=ee(r?.in,t,e),s=_e(n,r),a=_e(i,r),l=+s-We(s),c=+a-We(a);return Math.round((l-c)/Gr)}o(Ri,"differenceInCalendarWeeks");var yX=Ri;function Wn(t,e,r){let[n,i]=ee(r?.in,t,e);return n.getFullYear()-i.getFullYear()}o(Wn,"differenceInCalendarYears");var vX=Wn;function Jo(t,e,r){let[n,i]=ee(r?.in,t,e),s=Dw(n,i),a=Math.abs(st(n,i));n.setDate(n.getDate()-s*a);let l=+(Dw(n,i)===-s),c=s*(a-l);return c===0?0:c}o(Jo,"differenceInDays");function Dw(t,e){let r=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds();return r<0?-1:r>0?1:r}o(Dw,"compareLocalAsc");var DX=Jo;function bt(t){return e=>{let n=(t?Math[t]:Math.trunc)(e);return n===0?0:n}}o(bt,"getRoundingMethod");function Ai(t,e,r){let[n,i]=ee(r?.in,t,e),s=(+n-+i)/Gt;return bt(r?.roundingMethod)(s)}o(Ai,"differenceInHours");var _X=Ai;function Eu(t,e,r){return yu(t,-e,r)}o(Eu,"subISOWeekYears");var $X=Eu;function Cw(t,e,r){let[n,i]=ee(r?.in,t,e),s=xt(n,i),a=Math.abs(Tu(n,i,r)),l=Eu(n,s*a,r),c=+(xt(l,i)===-s),u=s*(a-c);return u===0?0:u}o(Cw,"differenceInISOWeekYears");var qX=Cw;function Qo(t,e){return+b(t)-+b(e)}o(Qo,"differenceInMilliseconds");var GX=Qo;function Fi(t,e,r){let n=Qo(t,e)/yt;return bt(r?.roundingMethod)(n)}o(Fi,"differenceInMinutes");var tZ=Fi;function Xo(t,e){let r=b(t,e?.in);return r.setHours(23,59,59,999),r}o(Xo,"endOfDay");var oZ=Xo;function Zo(t,e){let r=b(t,e?.in),n=r.getMonth();return r.setFullYear(r.getFullYear(),n+1,0),r.setHours(23,59,59,999),r}o(Zo,"endOfMonth");var cZ=Zo;function Du(t,e){let r=b(t,e?.in);return+Xo(r,e)==+Zo(r,e)}o(Du,"isLastDayOfMonth");var dZ=Du;function Hn(t,e,r){let[n,i,s]=ee(r?.in,t,t,e),a=xt(i,s),l=Math.abs(_i(i,s));if(l<1)return 0;i.getMonth()===1&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-a*l);let c=xt(i,s)===-a;Du(n)&&l===1&&xt(n,s)===1&&(c=!1);let u=a*(l-+c);return u===0?0:u}o(Hn,"differenceInMonths");var SZ=Hn;function Ow(t,e,r){let n=Hn(t,e,r)/3;return bt(r?.roundingMethod)(n)}o(Ow,"differenceInQuarters");var CZ=Ow;function en(t,e,r){let n=Qo(t,e)/1e3;return bt(r?.roundingMethod)(n)}o(en,"differenceInSeconds");var PZ=en;function Mw(t,e,r){let n=Jo(t,e,r)/7;return bt(r?.roundingMethod)(n)}o(Mw,"differenceInWeeks");var FZ=Mw;function Cu(t,e,r){let[n,i]=ee(r?.in,t,e),s=xt(n,i),a=Math.abs(Wn(n,i));n.setFullYear(1584),i.setFullYear(1584);let l=xt(n,i)===-s,c=s*(a-+l);return c===0?0:c}o(Cu,"differenceInYears");var HZ=Cu;function at(t,e){let[r,n]=ee(t,e.start,e.end);return{start:r,end:n}}o(at,"normalizeInterval");function Ou(t,e){let{start:r,end:n}=at(e?.in,t),i=+r>+n,s=i?+r:+n,a=i?n:r;a.setHours(0,0,0,0);let l=e?.step??1;if(!l)return[];l<0&&(l=-l,i=!i);let c=[];for(;+a<=s;)c.push($(r,a)),a.setDate(a.getDate()+l),a.setHours(0,0,0,0);return i?c.reverse():c}o(Ou,"eachDayOfInterval");var QZ=Ou;function Iw(t,e){let{start:r,end:n}=at(e?.in,t),i=+r>+n,s=i?+r:+n,a=i?n:r;a.setMinutes(0,0,0);let l=e?.step??1;if(!l)return[];l<0&&(l=-l,i=!i);let c=[];for(;+a<=s;)c.push($(r,a)),a.setHours(a.getHours()+l);return i?c.reverse():c}o(Iw,"eachHourOfInterval");var ree=Iw;function Nw(t,e){let{start:r,end:n}=at(e?.in,t);r.setSeconds(0,0);let i=+r>+n,s=i?+r:+n,a=i?n:r,l=e?.step??1;if(!l)return[];l<0&&(l=-l,i=!i);let c=[];for(;+a<=s;)c.push($(r,a)),a=Vo(a,l);return i?c.reverse():c}o(Nw,"eachMinuteOfInterval");var lee=Nw;function Pw(t,e){let{start:r,end:n}=at(e?.in,t),i=+r>+n,s=i?+r:+n,a=i?n:r;a.setHours(0,0,0,0),a.setDate(1);let l=e?.step??1;if(!l)return[];l<0&&(l=-l,i=!i);let c=[];for(;+a<=s;)c.push($(r,a)),a.setMonth(a.getMonth()+l);return i?c.reverse():c}o(Pw,"eachMonthOfInterval");var hee=Pw;function tn(t,e){let r=b(t,e?.in),n=r.getMonth(),i=n-n%3;return r.setMonth(i,1),r.setHours(0,0,0,0),r}o(tn,"startOfQuarter");var yee=tn;function Lw(t,e){let{start:r,end:n}=at(e?.in,t),i=+r>+n,s=i?+tn(r):+tn(n),a=i?tn(n):tn(r),l=e?.step??1;if(!l)return[];l<0&&(l=-l,i=!i);let c=[];for(;+a<=s;)c.push($(r,a)),a=Ko(a,l);return i?c.reverse():c}o(Lw,"eachQuarterOfInterval");var Tee=Lw;function _w(t,e){let{start:r,end:n}=at(e?.in,t),i=+r>+n,s=i?_e(n,e):_e(r,e),a=i?_e(r,e):_e(n,e);s.setHours(15),a.setHours(15);let l=+a.getTime(),c=s,u=e?.step??1;if(!u)return[];u<0&&(u=-u,i=!i);let f=[];for(;+c<=l;)c.setHours(0),f.push($(r,c)),c=zn(c,u),c.setHours(15);return i?f.reverse():f}o(_w,"eachWeekOfInterval");var Nee=_w;function es(t,e){let{start:r,end:n}=at(e?.in,t),i=Ou({start:r,end:n},e),s=[],a=0;for(;a<i.length;){let l=i[a++];Qr(l)&&s.push($(r,l))}return s}o(es,"eachWeekendOfInterval");var $ee=es;function Un(t,e){let r=b(t,e?.in);return r.setDate(1),r.setHours(0,0,0,0),r}o(Un,"startOfMonth");var Wee=Un;function Rw(t,e){let r=Un(t,e),n=Zo(t,e);return es({start:r,end:n},e)}o(Rw,"eachWeekendOfMonth");var Kee=Rw;function Mu(t,e){let r=b(t,e?.in),n=r.getFullYear();return r.setFullYear(n+1,0,0),r.setHours(23,59,59,999),r}o(Mu,"endOfYear");var Xee=Mu;function ts(t,e){let r=b(t,e?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}o(ts,"startOfYear");var rte=ts;function Aw(t,e){let r=ts(t,e),n=Mu(t,e);return es({start:r,end:n},e)}o(Aw,"eachWeekendOfYear");var lte=Aw;function Fw(t,e){let{start:r,end:n}=at(e?.in,t),i=+r>+n,s=i?+r:+n,a=i?n:r;a.setHours(0,0,0,0),a.setMonth(0,1);let l=e?.step??1;if(!l)return[];l<0&&(l=-l,i=!i);let c=[];for(;+a<=s;)c.push($(r,a)),a.setFullYear(a.getFullYear()+l);return i?c.reverse():c}o(Fw,"eachYearOfInterval");var hte=Fw;function $w(t,e){let r=b(t,e?.in),n=r.getFullYear(),i=9+Math.floor(n/10)*10;return r.setFullYear(i,11,31),r.setHours(23,59,59,999),r}o($w,"endOfDecade");var yte=$w;function Bw(t,e){let r=b(t,e?.in);return r.setMinutes(59,59,999),r}o(Bw,"endOfHour");var vte=Bw;function Iu(t,e){let r=Oe(),n=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=b(t,e?.in),s=i.getDay(),a=(s<n?-7:0)+6-(s-n);return i.setDate(i.getDate()+a),i.setHours(23,59,59,999),i}o(Iu,"endOfWeek");var Dte=Iu;function jw(t,e){return Iu(t,{...e,weekStartsOn:1})}o(jw,"endOfISOWeek");var Ite=jw;function zw(t,e){let r=Mt(t,e),n=$(e?.in||t,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);let i=Ge(n,e);return i.setMilliseconds(i.getMilliseconds()-1),i}o(zw,"endOfISOWeekYear");var Ate=zw;function Ww(t,e){let r=b(t,e?.in);return r.setSeconds(59,999),r}o(Ww,"endOfMinute");var jte=Ww;function Hw(t,e){let r=b(t,e?.in),n=r.getMonth(),i=n-n%3+3;return r.setMonth(i,0),r.setHours(23,59,59,999),r}o(Hw,"endOfQuarter");var Ute=Hw;function Uw(t,e){let r=b(t,e?.in);return r.setMilliseconds(999),r}o(Uw,"endOfSecond");var Kte=Uw;function qw(t){return Xo(Date.now(),t)}o(qw,"endOfToday");var Xte=qw;function Yw(t){let e=de(t?.in),r=e.getFullYear(),n=e.getMonth(),i=e.getDate(),s=de(t?.in);return s.setFullYear(r,n,i+1),s.setHours(23,59,59,999),t?.in?t.in(s):s}o(Yw,"endOfTomorrow");var rre=Yw;function Vw(t){let e=de(t?.in),r=$(t?.in,0);return r.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()-1),r.setHours(23,59,59,999),r}o(Vw,"endOfYesterday");var are=Vw;var iN={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Kw=o((t,e,r)=>{let n,i=iN[t];return typeof i=="string"?n=i:e===1?n=i.one:n=i.other.replace("{{count}}",e.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n},"formatDistance");function Nu(t){return(e={})=>{let r=e.width?String(e.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}}o(Nu,"buildFormatLongFn");var oN={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},sN={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},aN={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Gw={date:Nu({formats:oN,defaultWidth:"full"}),time:Nu({formats:sN,defaultWidth:"full"}),dateTime:Nu({formats:aN,defaultWidth:"full"})};var lN={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Jw=o((t,e,r,n)=>lN[t],"formatRelative");function rs(t){return(e,r)=>{let n=r?.context?String(r.context):"standalone",i;if(n==="formatting"&&t.formattingValues){let a=t.defaultFormattingWidth||t.defaultWidth,l=r?.width?String(r.width):a;i=t.formattingValues[l]||t.formattingValues[a]}else{let a=t.defaultWidth,l=r?.width?String(r.width):t.defaultWidth;i=t.values[l]||t.values[a]}let s=t.argumentCallback?t.argumentCallback(e):e;return i[s]}}o(rs,"buildLocalizeFn");var cN={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},uN={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},fN={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},pN={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},hN={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},mN={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},dN=o((t,e)=>{let r=Number(t),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},"ordinalNumber"),Qw={ordinalNumber:dN,era:rs({values:cN,defaultWidth:"wide"}),quarter:rs({values:uN,defaultWidth:"wide",argumentCallback:o(t=>t-1,"argumentCallback")}),month:rs({values:fN,defaultWidth:"wide"}),day:rs({values:pN,defaultWidth:"wide"}),dayPeriod:rs({values:hN,defaultWidth:"wide",formattingValues:mN,defaultFormattingWidth:"wide"})};function ns(t){return(e,r={})=>{let n=r.width,i=n&&t.matchPatterns[n]||t.matchPatterns[t.defaultMatchWidth],s=e.match(i);if(!s)return null;let a=s[0],l=n&&t.parsePatterns[n]||t.parsePatterns[t.defaultParseWidth],c=Array.isArray(l)?yN(l,p=>p.test(a)):gN(l,p=>p.test(a)),u;u=t.valueCallback?t.valueCallback(c):c,u=r.valueCallback?r.valueCallback(u):u;let f=e.slice(a.length);return{value:u,rest:f}}}o(ns,"buildMatchFn");function gN(t,e){for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&e(t[r]))return r}o(gN,"findKey");function yN(t,e){for(let r=0;r<t.length;r++)if(e(t[r]))return r}o(yN,"findIndex");function Xw(t){return(e,r={})=>{let n=e.match(t.matchPattern);if(!n)return null;let i=n[0],s=e.match(t.parsePattern);if(!s)return null;let a=t.valueCallback?t.valueCallback(s[0]):s[0];a=r.valueCallback?r.valueCallback(a):a;let l=e.slice(i.length);return{value:a,rest:l}}}o(Xw,"buildMatchPatternFn");var xN=/^(\d+)(th|st|nd|rd)?/i,bN=/\d+/i,wN={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},vN={any:[/^b/i,/^(a|c)/i]},SN={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},kN={any:[/1/i,/2/i,/3/i,/4/i]},TN={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},EN={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},DN={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},CN={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},ON={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},MN={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Zw={ordinalNumber:Xw({matchPattern:xN,parsePattern:bN,valueCallback:o(t=>parseInt(t,10),"valueCallback")}),era:ns({matchPatterns:wN,defaultMatchWidth:"wide",parsePatterns:vN,defaultParseWidth:"any"}),quarter:ns({matchPatterns:SN,defaultMatchWidth:"wide",parsePatterns:kN,defaultParseWidth:"any",valueCallback:o(t=>t+1,"valueCallback")}),month:ns({matchPatterns:TN,defaultMatchWidth:"wide",parsePatterns:EN,defaultParseWidth:"any"}),day:ns({matchPatterns:DN,defaultMatchWidth:"wide",parsePatterns:CN,defaultParseWidth:"any"}),dayPeriod:ns({matchPatterns:ON,defaultMatchWidth:"any",parsePatterns:MN,defaultParseWidth:"any"})};var Ft={code:"en-US",formatDistance:Kw,formatLong:Gw,formatRelative:Jw,localize:Qw,match:Zw,options:{weekStartsOn:0,firstWeekContainsDate:1}},Are=Ft;function Pu(t,e){let r=b(t,e?.in);return st(r,ts(r))+1}o(Pu,"getDayOfYear");var Hre=Pu;function is(t,e){let r=b(t,e?.in),n=+Ge(r)-+Jt(r);return Math.round(n/Gr)+1}o(is,"getISOWeek");var Jre=is;function qn(t,e){let r=b(t,e?.in),n=r.getFullYear(),i=Oe(),s=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,a=$(e?.in||t,0);a.setFullYear(n+1,0,s),a.setHours(0,0,0,0);let l=_e(a,e),c=$(e?.in||t,0);c.setFullYear(n,0,s),c.setHours(0,0,0,0);let u=_e(c,e);return+r>=+l?n+1:+r>=+u?n:n-1}o(qn,"getWeekYear");var nne=qn;function $i(t,e){let r=Oe(),n=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=qn(t,e),s=$(e?.in||t,0);return s.setFullYear(i,0,n),s.setHours(0,0,0,0),_e(s,e)}o($i,"startOfWeekYear");var une=$i;function os(t,e){let r=b(t,e?.in),n=+_e(r,e)-+$i(r,e);return Math.round(n/Gr)+1}o(os,"getWeek");var yne=os;function Q(t,e){let r=t<0?"-":"",n=Math.abs(t).toString().padStart(e,"0");return r+n}o(Q,"addLeadingZeros");var Qt={y(t,e){let r=t.getFullYear(),n=r>0?r:1-r;return Q(e==="yy"?n%100:n,e.length)},M(t,e){let r=t.getMonth();return e==="M"?String(r+1):Q(r+1,2)},d(t,e){return Q(t.getDate(),e.length)},a(t,e){let r=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return r==="am"?"a.m.":"p.m."}},h(t,e){return Q(t.getHours()%12||12,e.length)},H(t,e){return Q(t.getHours(),e.length)},m(t,e){return Q(t.getMinutes(),e.length)},s(t,e){return Q(t.getSeconds(),e.length)},S(t,e){let r=e.length,n=t.getMilliseconds(),i=Math.trunc(n*Math.pow(10,r-3));return Q(i,e.length)}};var ss={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Aa={G:o(function(t,e,r){let n=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});default:return r.era(n,{width:"wide"})}},"G"),y:o(function(t,e,r){if(e==="yo"){let n=t.getFullYear(),i=n>0?n:1-n;return r.ordinalNumber(i,{unit:"year"})}return Qt.y(t,e)},"y"),Y:o(function(t,e,r,n){let i=qn(t,n),s=i>0?i:1-i;if(e==="YY"){let a=s%100;return Q(a,2)}return e==="Yo"?r.ordinalNumber(s,{unit:"year"}):Q(s,e.length)},"Y"),R:o(function(t,e){let r=Mt(t);return Q(r,e.length)},"R"),u:o(function(t,e){let r=t.getFullYear();return Q(r,e.length)},"u"),Q:o(function(t,e,r){let n=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(n);case"QQ":return Q(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});default:return r.quarter(n,{width:"wide",context:"formatting"})}},"Q"),q:o(function(t,e,r){let n=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(n);case"qq":return Q(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});default:return r.quarter(n,{width:"wide",context:"standalone"})}},"q"),M:o(function(t,e,r){let n=t.getMonth();switch(e){case"M":case"MM":return Qt.M(t,e);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});default:return r.month(n,{width:"wide",context:"formatting"})}},"M"),L:o(function(t,e,r){let n=t.getMonth();switch(e){case"L":return String(n+1);case"LL":return Q(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});default:return r.month(n,{width:"wide",context:"standalone"})}},"L"),w:o(function(t,e,r,n){let i=os(t,n);return e==="wo"?r.ordinalNumber(i,{unit:"week"}):Q(i,e.length)},"w"),I:o(function(t,e,r){let n=is(t);return e==="Io"?r.ordinalNumber(n,{unit:"week"}):Q(n,e.length)},"I"),d:o(function(t,e,r){return e==="do"?r.ordinalNumber(t.getDate(),{unit:"date"}):Qt.d(t,e)},"d"),D:o(function(t,e,r){let n=Pu(t);return e==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):Q(n,e.length)},"D"),E:o(function(t,e,r){let n=t.getDay();switch(e){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},"E"),e:o(function(t,e,r,n){let i=t.getDay(),s=(i-n.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return Q(s,2);case"eo":return r.ordinalNumber(s,{unit:"day"});case"eee":return r.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(i,{width:"short",context:"formatting"});default:return r.day(i,{width:"wide",context:"formatting"})}},"e"),c:o(function(t,e,r,n){let i=t.getDay(),s=(i-n.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return Q(s,e.length);case"co":return r.ordinalNumber(s,{unit:"day"});case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});case"cccccc":return r.day(i,{width:"short",context:"standalone"});default:return r.day(i,{width:"wide",context:"standalone"})}},"c"),i:o(function(t,e,r){let n=t.getDay(),i=n===0?7:n;switch(e){case"i":return String(i);case"ii":return Q(i,e.length);case"io":return r.ordinalNumber(i,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},"i"),a:o(function(t,e,r){let i=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(i,{width:"narrow",context:"formatting"});default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},"a"),b:o(function(t,e,r){let n=t.getHours(),i;switch(n===12?i=ss.noon:n===0?i=ss.midnight:i=n/12>=1?"pm":"am",e){case"b":case"bb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(i,{width:"narrow",context:"formatting"});default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},"b"),B:o(function(t,e,r){let n=t.getHours(),i;switch(n>=17?i=ss.evening:n>=12?i=ss.afternoon:n>=4?i=ss.morning:i=ss.night,e){case"B":case"BB":case"BBB":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(i,{width:"narrow",context:"formatting"});default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},"B"),h:o(function(t,e,r){if(e==="ho"){let n=t.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return Qt.h(t,e)},"h"),H:o(function(t,e,r){return e==="Ho"?r.ordinalNumber(t.getHours(),{unit:"hour"}):Qt.H(t,e)},"H"),K:o(function(t,e,r){let n=t.getHours()%12;return e==="Ko"?r.ordinalNumber(n,{unit:"hour"}):Q(n,e.length)},"K"),k:o(function(t,e,r){let n=t.getHours();return n===0&&(n=24),e==="ko"?r.ordinalNumber(n,{unit:"hour"}):Q(n,e.length)},"k"),m:o(function(t,e,r){return e==="mo"?r.ordinalNumber(t.getMinutes(),{unit:"minute"}):Qt.m(t,e)},"m"),s:o(function(t,e,r){return e==="so"?r.ordinalNumber(t.getSeconds(),{unit:"second"}):Qt.s(t,e)},"s"),S:o(function(t,e){return Qt.S(t,e)},"S"),X:o(function(t,e,r){let n=t.getTimezoneOffset();if(n===0)return"Z";switch(e){case"X":return t0(n);case"XXXX":case"XX":return Bi(n);default:return Bi(n,":")}},"X"),x:o(function(t,e,r){let n=t.getTimezoneOffset();switch(e){case"x":return t0(n);case"xxxx":case"xx":return Bi(n);default:return Bi(n,":")}},"x"),O:o(function(t,e,r){let n=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+e0(n,":");default:return"GMT"+Bi(n,":")}},"O"),z:o(function(t,e,r){let n=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+e0(n,":");default:return"GMT"+Bi(n,":")}},"z"),t:o(function(t,e,r){let n=Math.trunc(+t/1e3);return Q(n,e.length)},"t"),T:o(function(t,e,r){return Q(+t,e.length)},"T")};function e0(t,e=""){let r=t>0?"-":"+",n=Math.abs(t),i=Math.trunc(n/60),s=n%60;return s===0?r+String(i):r+String(i)+e+Q(s,2)}o(e0,"formatTimezoneShort");function t0(t,e){return t%60===0?(t>0?"-":"+")+Q(Math.abs(t)/60,2):Bi(t,e)}o(t0,"formatTimezoneWithOptionalMinutes");function Bi(t,e=""){let r=t>0?"-":"+",n=Math.abs(t),i=Q(Math.trunc(n/60),2),s=Q(n%60,2);return r+i+e+s}o(Bi,"formatTimezone");var r0=o((t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},"dateLongFormatter"),n0=o((t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},"timeLongFormatter"),IN=o((t,e)=>{let r=t.match(/(P+)(p+)?/)||[],n=r[1],i=r[2];if(!i)return r0(t,e);let s;switch(n){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;default:s=e.dateTime({width:"full"});break}return s.replace("{{date}}",r0(n,e)).replace("{{time}}",n0(i,e))},"dateTimeLongFormatter"),Yn={p:n0,P:IN};var NN=/^D+$/,PN=/^Y+$/,LN=["D","DD","YY","YYYY"];function Lu(t){return NN.test(t)}o(Lu,"isProtectedDayOfYearToken");function _u(t){return PN.test(t)}o(_u,"isProtectedWeekYearToken");function Fa(t,e,r){let n=_N(t,e,r);if(console.warn(n),LN.includes(t))throw new RangeError(n)}o(Fa,"warnOrThrowProtectedError");function _N(t,e,r){let n=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}o(_N,"message");var RN=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,AN=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,FN=/^'([^]*?)'?$/,$N=/''/g,BN=/[a-zA-Z]/;function $a(t,e,r){let n=Oe(),i=r?.locale??n.locale??Ft,s=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,a=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,l=b(t,r?.in);if(!ht(l))throw new RangeError("Invalid time value");let c=e.match(AN).map(f=>{let p=f[0];if(p==="p"||p==="P"){let h=Yn[p];return h(f,i.formatLong)}return f}).join("").match(RN).map(f=>{if(f==="''")return{isToken:!1,value:"'"};let p=f[0];if(p==="'")return{isToken:!1,value:jN(f)};if(Aa[p])return{isToken:!0,value:f};if(p.match(BN))throw new RangeError("Format string contains an unescaped latin alphabet character `"+p+"`");return{isToken:!1,value:f}});i.localize.preprocessor&&(c=i.localize.preprocessor(l,c));let u={firstWeekContainsDate:s,weekStartsOn:a,locale:i};return c.map(f=>{if(!f.isToken)return f.value;let p=f.value;(!r?.useAdditionalWeekYearTokens&&_u(p)||!r?.useAdditionalDayOfYearTokens&&Lu(p))&&Fa(p,e,String(t));let h=Aa[p[0]];return h(l,p,i.localize,u)}).join("")}o($a,"format");function jN(t){let e=t.match(FN);return e?e[1].replace($N,"'"):t}o(jN,"cleanEscapedString");var Une=$a;function Ru(t,e,r){let n=Oe(),i=r?.locale??n.locale??Ft,s=2520,a=xt(t,e);if(isNaN(a))throw new RangeError("Invalid time value");let l=Object.assign({},r,{addSuffix:r?.addSuffix,comparison:a}),[c,u]=ee(r?.in,...a>0?[e,t]:[t,e]),f=en(u,c),p=(We(u)-We(c))/1e3,h=Math.round((f-p)/60),m;if(h<2)return r?.includeSeconds?f<5?i.formatDistance("lessThanXSeconds",5,l):f<10?i.formatDistance("lessThanXSeconds",10,l):f<20?i.formatDistance("lessThanXSeconds",20,l):f<40?i.formatDistance("halfAMinute",0,l):f<60?i.formatDistance("lessThanXMinutes",1,l):i.formatDistance("xMinutes",1,l):h===0?i.formatDistance("lessThanXMinutes",1,l):i.formatDistance("xMinutes",h,l);if(h<45)return i.formatDistance("xMinutes",h,l);if(h<90)return i.formatDistance("aboutXHours",1,l);if(h<qo){let d=Math.round(h/60);return i.formatDistance("aboutXHours",d,l)}else{if(h<s)return i.formatDistance("xDays",1,l);if(h<$n){let d=Math.round(h/qo);return i.formatDistance("xDays",d,l)}else if(h<$n*2)return m=Math.round(h/$n),i.formatDistance("aboutXMonths",m,l)}if(m=Hn(u,c),m<12){let d=Math.round(h/$n);return i.formatDistance("xMonths",d,l)}else{let d=m%12,g=Math.trunc(m/12);return d<3?i.formatDistance("aboutXYears",g,l):d<9?i.formatDistance("overXYears",g,l):i.formatDistance("almostXYears",g+1,l)}}o(Ru,"formatDistance");var tie=Ru;function Au(t,e,r){let n=Oe(),i=r?.locale??n.locale??Ft,s=xt(t,e);if(isNaN(s))throw new RangeError("Invalid time value");let a=Object.assign({},r,{addSuffix:r?.addSuffix,comparison:s}),[l,c]=ee(r?.in,...s>0?[e,t]:[t,e]),u=bt(r?.roundingMethod??"round"),f=c.getTime()-l.getTime(),p=f/yt,h=We(c)-We(l),m=(f-h)/yt,d=r?.unit,g;if(d?g=d:p<1?g="second":p<60?g="minute":p<qo?g="hour":m<$n?g="day":m<Jm?g="month":g="year",g==="second"){let y=u(f/1e3);return i.formatDistance("xSeconds",y,a)}else if(g==="minute"){let y=u(p);return i.formatDistance("xMinutes",y,a)}else if(g==="hour"){let y=u(p/60);return i.formatDistance("xHours",y,a)}else if(g==="day"){let y=u(m/qo);return i.formatDistance("xDays",y,a)}else if(g==="month"){let y=u(m/$n);return y===12&&d!=="month"?i.formatDistance("xYears",1,a):i.formatDistance("xMonths",y,a)}else{let y=u(m/Jm);return i.formatDistance("xYears",y,a)}}o(Au,"formatDistanceStrict");var fie=Au;function i0(t,e){return Ru(t,de(t),e)}o(i0,"formatDistanceToNow");var gie=i0;function o0(t,e){return Au(t,de(t),e)}o(o0,"formatDistanceToNowStrict");var vie=o0;var zN=["years","months","weeks","days","hours","minutes","seconds"];function s0(t,e){let r=Oe(),n=e?.locale??r.locale??Ft,i=e?.format??zN,s=e?.zero??!1,a=e?.delimiter??" ";return n.formatDistance?i.reduce((c,u)=>{let f=`x${u.replace(/(^.)/,h=>h.toUpperCase())}`,p=t[u];return p!==void 0&&(s||t[u])?c.concat(n.formatDistance(f,p)):c},[]).join(a):""}o(s0,"formatDuration");var Die=s0;function a0(t,e){let r=b(t,e?.in);if(isNaN(+r))throw new RangeError("Invalid time value");let n=e?.format??"extended",i=e?.representation??"complete",s="",a="",l=n==="extended"?"-":"",c=n==="extended"?":":"";if(i!=="time"){let u=Q(r.getDate(),2),f=Q(r.getMonth()+1,2);s=`${Q(r.getFullYear(),4)}${l}${f}${l}${u}`}if(i!=="date"){let u=r.getTimezoneOffset();if(u!==0){let g=Math.abs(u),y=Q(Math.trunc(g/60),2),x=Q(g%60,2);a=`${u<0?"+":"-"}${y}:${x}`}else a="Z";let f=Q(r.getHours(),2),p=Q(r.getMinutes(),2),h=Q(r.getSeconds(),2),m=s===""?"":"T",d=[f,p,h].join(c);s=`${s}${m}${d}${a}`}return s}o(a0,"formatISO");var Nie=a0;function l0(t,e){let r=b(t,e?.in);if(!ht(r))throw new RangeError("Invalid time value");let n=e?.format??"extended",i=e?.representation??"complete",s="",a=n==="extended"?"-":"",l=n==="extended"?":":"";if(i!=="time"){let c=Q(r.getDate(),2),u=Q(r.getMonth()+1,2);s=`${Q(r.getFullYear(),4)}${a}${u}${a}${c}`}if(i!=="date"){let c=Q(r.getHours(),2),u=Q(r.getMinutes(),2),f=Q(r.getSeconds(),2);s=`${s}${s===""?"":" "}${c}${l}${u}${l}${f}`}return s}o(l0,"formatISO9075");var Fie=l0;function c0(t){let{years:e=0,months:r=0,days:n=0,hours:i=0,minutes:s=0,seconds:a=0}=t;return`P${e}Y${r}M${n}DT${i}H${s}M${a}S`}o(c0,"formatISODuration");var jie=c0;function u0(t,e){let r=b(t,e?.in);if(!ht(r))throw new RangeError("Invalid time value");let n=e?.fractionDigits??0,i=Q(r.getDate(),2),s=Q(r.getMonth()+1,2),a=r.getFullYear(),l=Q(r.getHours(),2),c=Q(r.getMinutes(),2),u=Q(r.getSeconds(),2),f="";if(n>0){let m=r.getMilliseconds(),d=Math.trunc(m*Math.pow(10,n-3));f="."+Q(d,n)}let p="",h=r.getTimezoneOffset();if(h!==0){let m=Math.abs(h),d=Q(Math.trunc(m/60),2),g=Q(m%60,2);p=`${h<0?"+":"-"}${d}:${g}`}else p="Z";return`${a}-${s}-${i}T${l}:${c}:${u}${f}${p}`}o(u0,"formatRFC3339");var Yie=u0;var WN=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],HN=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function f0(t){let e=b(t);if(!ht(e))throw new RangeError("Invalid time value");let r=WN[e.getUTCDay()],n=Q(e.getUTCDate(),2),i=HN[e.getUTCMonth()],s=e.getUTCFullYear(),a=Q(e.getUTCHours(),2),l=Q(e.getUTCMinutes(),2),c=Q(e.getUTCSeconds(),2);return`${r}, ${n} ${i} ${s} ${a}:${l}:${c} GMT`}o(f0,"formatRFC7231");var Xie=f0;function p0(t,e,r){let[n,i]=ee(r?.in,t,e),s=Oe(),a=r?.locale??s.locale??Ft,l=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??s.weekStartsOn??s.locale?.options?.weekStartsOn??0,c=st(n,i);if(isNaN(c))throw new RangeError("Invalid time value");let u;c<-6?u="other":c<-1?u="lastWeek":c<0?u="yesterday":c<1?u="today":c<2?u="tomorrow":c<7?u="nextWeek":u="other";let f=a.formatRelative(u,n,i,{locale:a,weekStartsOn:l});return $a(n,f,{locale:a,weekStartsOn:l})}o(p0,"formatRelative");var soe=p0;function h0(t,e){return b(t*1e3,e?.in)}o(h0,"fromUnixTime");var uoe=h0;function Fu(t,e){return b(t,e?.in).getDate()}o(Fu,"getDate");var moe=Fu;function Vn(t,e){return b(t,e?.in).getDay()}o(Vn,"getDay");var xoe=Vn;function $u(t,e){let r=b(t,e?.in),n=r.getFullYear(),i=r.getMonth(),s=$(r,0);return s.setFullYear(n,i+1,0),s.setHours(0,0,0,0),s.getDate()}o($u,"getDaysInMonth");var koe=$u;function Bu(t,e){let n=b(t,e?.in).getFullYear();return n%400===0||n%4===0&&n%100!==0}o(Bu,"isLeapYear");var Coe=Bu;function m0(t,e){let r=b(t,e?.in);return Number.isNaN(+r)?NaN:Bu(r)?366:365}o(m0,"getDaysInYear");var Poe=m0;function d0(t,e){let n=b(t,e?.in).getFullYear();return Math.floor(n/10)*10}o(d0,"getDecade");var Aoe=d0;function ju(){return Object.assign({},Oe())}o(ju,"getDefaultOptions");var joe=ju;function g0(t,e){return b(t,e?.in).getHours()}o(g0,"getHours");var Uoe=g0;function zu(t,e){let r=b(t,e?.in).getDay();return r===0?7:r}o(zu,"getISODay");var Koe=zu;function y0(t,e){let r=Jt(t,e),i=+Jt(zn(r,60))-+r;return Math.round(i/Gr)}o(y0,"getISOWeeksInYear");var ese=y0;function x0(t){return b(t).getMilliseconds()}o(x0,"getMilliseconds");var ise=x0;function b0(t,e){return b(t,e?.in).getMinutes()}o(b0,"getMinutes");var lse=b0;function w0(t,e){return b(t,e?.in).getMonth()}o(w0,"getMonth");var pse=w0;function v0(t,e){let[r,n]=[+b(t.start),+b(t.end)].sort((p,h)=>p-h),[i,s]=[+b(e.start),+b(e.end)].sort((p,h)=>p-h);if(!(r<s&&i<n))return 0;let l=i<r?r:i,c=l-We(l),u=s>n?n:s,f=u-We(u);return Math.ceil((f-c)/au)}o(v0,"getOverlappingDaysInIntervals");var xse=v0;function S0(t){return b(t).getSeconds()}o(S0,"getSeconds");var Sse=S0;function k0(t){return+b(t)}o(k0,"getTime");var Dse=k0;function T0(t){return Math.trunc(+b(t)/1e3)}o(T0,"getUnixTime");var Ise=T0;function E0(t,e){let r=Oe(),n=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=Fu(b(t,e?.in));if(isNaN(i))return NaN;let s=Vn(Un(t,e)),a=n-s;a<=0&&(a+=7);let l=i-a;return Math.ceil(l/7)+1}o(E0,"getWeekOfMonth");var $se=E0;function Wu(t,e){let r=b(t,e?.in),n=r.getMonth();return r.setFullYear(r.getFullYear(),n+1,0),r.setHours(0,0,0,0),b(r,e?.in)}o(Wu,"lastDayOfMonth");var Wse=Wu;function D0(t,e){let r=b(t,e?.in);return Ri(Wu(r,e),Un(r,e),e)+1}o(D0,"getWeeksInMonth");var Gse=D0;function C0(t,e){return b(t,e?.in).getFullYear()}o(C0,"getYear");var Zse=C0;function O0(t){return Math.trunc(t*Gt)}o(O0,"hoursToMilliseconds");var nae=O0;function M0(t){return Math.trunc(t*lu)}o(M0,"hoursToMinutes");var aae=M0;function I0(t){return Math.trunc(t*Li)}o(I0,"hoursToSeconds");var fae=I0;function N0(t,e,r){let[n,i]=ee(r?.in,t,e);if(isNaN(+n))throw new TypeError("Start date is invalid");if(isNaN(+i))throw new TypeError("End date is invalid");if(r?.assertPositive&&+n>+i)throw new TypeError("End date must be after start date");return{start:n,end:i}}o(N0,"interval");var dae=N0;function P0(t,e){let{start:r,end:n}=at(e?.in,t),i={},s=Cu(n,r);s&&(i.years=s);let a=Bn(r,{years:i.years}),l=Hn(n,a);l&&(i.months=l);let c=Bn(a,{months:i.months}),u=Jo(n,c);u&&(i.days=u);let f=Bn(c,{days:i.days}),p=Ai(n,f);p&&(i.hours=p);let h=Bn(f,{hours:i.hours}),m=Fi(n,h);m&&(i.minutes=m);let d=Bn(h,{minutes:i.minutes}),g=en(n,d);return g&&(i.seconds=g),i}o(P0,"intervalToDuration");var Dae=P0;function L0(t,e,r){let n;return UN(e)?n=e:r=e,new Intl.DateTimeFormat(r?.locale,n).format(b(t))}o(L0,"intlFormat");function UN(t){return t!==void 0&&!("locale"in t)}o(UN,"isFormatOptions");var Iae=L0;function _0(t,e,r){let n=0,i,[s,a]=ee(r?.in,t,e);if(r?.unit)i=r?.unit,i==="second"?n=en(s,a):i==="minute"?n=Fi(s,a):i==="hour"?n=Ai(s,a):i==="day"?n=st(s,a):i==="week"?n=Ri(s,a):i==="month"?n=_i(s,a):i==="quarter"?n=Go(s,a):i==="year"&&(n=Wn(s,a));else{let c=en(s,a);Math.abs(c)<Yo?(n=en(s,a),i="second"):Math.abs(c)<Li?(n=Fi(s,a),i="minute"):Math.abs(c)<ou&&Math.abs(st(s,a))<1?(n=Ai(s,a),i="hour"):Math.abs(c)<dw&&(n=st(s,a))&&Math.abs(n)<7?i="day":Math.abs(c)<Xm?(n=Ri(s,a),i="week"):Math.abs(c)<gw?(n=_i(s,a),i="month"):Math.abs(c)<Qm?Go(s,a)<4?(n=Go(s,a),i="quarter"):(n=Wn(s,a),i="year"):(n=Wn(s,a),i="year")}return new Intl.RelativeTimeFormat(r?.locale,{numeric:"auto",...r}).format(n,i)}o(_0,"intlFormatDistance");var Hae=_0;function R0(t,e){return+b(t)>+b(e)}o(R0,"isAfter");var Vae=R0;function A0(t,e){return+b(t)<+b(e)}o(A0,"isBefore");var Qae=A0;function F0(t,e){return+b(t)==+b(e)}o(F0,"isEqual");var tle=F0;function $0(t,e,r){let n=new Date(t,e,r);return n.getFullYear()===t&&n.getMonth()===e&&n.getDate()===r}o($0,"isExists");var ile=$0;function B0(t,e){return b(t,e?.in).getDate()===1}o(B0,"isFirstDayOfMonth");var lle=B0;function j0(t,e){return b(t,e?.in).getDay()===5}o(j0,"isFriday");var ple=j0;function z0(t){return+b(t)>Date.now()}o(z0,"isFuture");var gle=z0;function Hu(t,e){let r=qN(e)?new e(0):$(e,0);return r.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),r.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),r}o(Hu,"transpose");function qN(t){return typeof t=="function"&&t.prototype?.constructor===t}o(qN,"isConstructor");var wle=Hu;var YN=10,Uu=class{static{o(this,"Setter")}subPriority=0;validate(e,r){return!0}},qu=class extends Uu{static{o(this,"ValueSetter")}constructor(e,r,n,i,s){super(),this.value=e,this.validateValue=r,this.setValue=n,this.priority=i,s&&(this.subPriority=s)}validate(e,r){return this.validateValue(e,this.value,r)}set(e,r,n){return this.setValue(e,r,this.value,n)}},Yu=class extends Uu{static{o(this,"DateTimezoneSetter")}priority=YN;subPriority=-1;constructor(e,r){super(),this.context=e||(n=>$(r,n))}set(e,r){return r.timestampIsSet?e:$(e,Hu(e,this.context))}};var J=class{static{o(this,"Parser")}run(e,r,n,i){let s=this.parse(e,r,n,i);return s?{setter:new qu(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}validate(e,r,n){return!0}};var Vu=class extends J{static{o(this,"EraParser")}priority=140;parse(e,r,n){switch(r){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}}set(e,r,n){return r.era=n,e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["R","u","t","T"]};var ve={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},ar={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Me(t,e){return t&&{value:e(t.value),rest:t.rest}}o(Me,"mapValue");function be(t,e){let r=e.match(t);return r?{value:parseInt(r[0],10),rest:e.slice(r[0].length)}:null}o(be,"parseNumericPattern");function lr(t,e){let r=e.match(t);if(!r)return null;if(r[0]==="Z")return{value:0,rest:e.slice(1)};let n=r[1]==="+"?1:-1,i=r[2]?parseInt(r[2],10):0,s=r[3]?parseInt(r[3],10):0,a=r[5]?parseInt(r[5],10):0;return{value:n*(i*Gt+s*yt+a*Uo),rest:e.slice(r[0].length)}}o(lr,"parseTimezonePattern");function Ku(t){return be(ve.anyDigitsSigned,t)}o(Ku,"parseAnyDigitsSigned");function he(t,e){switch(t){case 1:return be(ve.singleDigit,e);case 2:return be(ve.twoDigits,e);case 3:return be(ve.threeDigits,e);case 4:return be(ve.fourDigits,e);default:return be(new RegExp("^\\d{1,"+t+"}"),e)}}o(he,"parseNDigits");function as(t,e){switch(t){case 1:return be(ve.singleDigitSigned,e);case 2:return be(ve.twoDigitsSigned,e);case 3:return be(ve.threeDigitsSigned,e);case 4:return be(ve.fourDigitsSigned,e);default:return be(new RegExp("^-?\\d{1,"+t+"}"),e)}}o(as,"parseNDigitsSigned");function ls(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}o(ls,"dayPeriodEnumToHours");function Gu(t,e){let r=e>0,n=r?e:1-e,i;if(n<=50)i=t||100;else{let s=n+50,a=Math.trunc(s/100)*100,l=t>=s%100;i=t+a-(l?100:0)}return r?i:1-i}o(Gu,"normalizeTwoDigitYear");function Ju(t){return t%400===0||t%4===0&&t%100!==0}o(Ju,"isLeapYearIndex");var Qu=class extends J{static{o(this,"YearParser")}priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(e,r,n){let i=o(s=>({year:s,isTwoDigitYear:r==="yy"}),"valueCallback");switch(r){case"y":return Me(he(4,e),i);case"yo":return Me(n.ordinalNumber(e,{unit:"year"}),i);default:return Me(he(r.length,e),i)}}validate(e,r){return r.isTwoDigitYear||r.year>0}set(e,r,n){let i=e.getFullYear();if(n.isTwoDigitYear){let a=Gu(n.year,i);return e.setFullYear(a,0,1),e.setHours(0,0,0,0),e}let s=!("era"in r)||r.era===1?n.year:1-n.year;return e.setFullYear(s,0,1),e.setHours(0,0,0,0),e}};var Xu=class extends J{static{o(this,"LocalWeekYearParser")}priority=130;parse(e,r,n){let i=o(s=>({year:s,isTwoDigitYear:r==="YY"}),"valueCallback");switch(r){case"Y":return Me(he(4,e),i);case"Yo":return Me(n.ordinalNumber(e,{unit:"year"}),i);default:return Me(he(r.length,e),i)}}validate(e,r){return r.isTwoDigitYear||r.year>0}set(e,r,n,i){let s=qn(e,i);if(n.isTwoDigitYear){let l=Gu(n.year,s);return e.setFullYear(l,0,i.firstWeekContainsDate),e.setHours(0,0,0,0),_e(e,i)}let a=!("era"in r)||r.era===1?n.year:1-n.year;return e.setFullYear(a,0,i.firstWeekContainsDate),e.setHours(0,0,0,0),_e(e,i)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]};var Zu=class extends J{static{o(this,"ISOWeekYearParser")}priority=130;parse(e,r){return r==="R"?as(4,e):as(r.length,e)}set(e,r,n){let i=$(e,0);return i.setFullYear(n,0,4),i.setHours(0,0,0,0),Ge(i)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]};var ef=class extends J{static{o(this,"ExtendedYearParser")}priority=130;parse(e,r){return r==="u"?as(4,e):as(r.length,e)}set(e,r,n){return e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]};var tf=class extends J{static{o(this,"QuarterParser")}priority=120;parse(e,r,n){switch(r){case"Q":case"QQ":return he(r.length,e);case"Qo":return n.ordinalNumber(e,{unit:"quarter"});case"QQQ":return n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(e,{width:"narrow",context:"formatting"});default:return n.quarter(e,{width:"wide",context:"formatting"})||n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,r){return r>=1&&r<=4}set(e,r,n){return e.setMonth((n-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]};var rf=class extends J{static{o(this,"StandAloneQuarterParser")}priority=120;parse(e,r,n){switch(r){case"q":case"qq":return he(r.length,e);case"qo":return n.ordinalNumber(e,{unit:"quarter"});case"qqq":return n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(e,{width:"narrow",context:"standalone"});default:return n.quarter(e,{width:"wide",context:"standalone"})||n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,r){return r>=1&&r<=4}set(e,r,n){return e.setMonth((n-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]};var nf=class extends J{static{o(this,"MonthParser")}incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(e,r,n){let i=o(s=>s-1,"valueCallback");switch(r){case"M":return Me(be(ve.month,e),i);case"MM":return Me(he(2,e),i);case"Mo":return Me(n.ordinalNumber(e,{unit:"month"}),i);case"MMM":return n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(e,{width:"narrow",context:"formatting"});default:return n.month(e,{width:"wide",context:"formatting"})||n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"})}}validate(e,r){return r>=0&&r<=11}set(e,r,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}};var of=class extends J{static{o(this,"StandAloneMonthParser")}priority=110;parse(e,r,n){let i=o(s=>s-1,"valueCallback");switch(r){case"L":return Me(be(ve.month,e),i);case"LL":return Me(he(2,e),i);case"Lo":return Me(n.ordinalNumber(e,{unit:"month"}),i);case"LLL":return n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(e,{width:"narrow",context:"standalone"});default:return n.month(e,{width:"wide",context:"standalone"})||n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"})}}validate(e,r){return r>=0&&r<=11}set(e,r,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]};function sf(t,e,r){let n=b(t,r?.in),i=os(n,r)-e;return n.setDate(n.getDate()-i*7),b(n,r?.in)}o(sf,"setWeek");var Tce=sf;var af=class extends J{static{o(this,"LocalWeekParser")}priority=100;parse(e,r,n){switch(r){case"w":return be(ve.week,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return he(r.length,e)}}validate(e,r){return r>=1&&r<=53}set(e,r,n,i){return _e(sf(e,n,i),i)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]};function lf(t,e,r){let n=b(t,r?.in),i=is(n,r)-e;return n.setDate(n.getDate()-i*7),n}o(lf,"setISOWeek");var Ace=lf;var cf=class extends J{static{o(this,"ISOWeekParser")}priority=100;parse(e,r,n){switch(r){case"I":return be(ve.week,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return he(r.length,e)}}validate(e,r){return r>=1&&r<=53}set(e,r,n){return Ge(lf(e,n))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]};var VN=[31,28,31,30,31,30,31,31,30,31,30,31],KN=[31,29,31,30,31,30,31,31,30,31,30,31],uf=class extends J{static{o(this,"DateParser")}priority=90;subPriority=1;parse(e,r,n){switch(r){case"d":return be(ve.date,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return he(r.length,e)}}validate(e,r){let n=e.getFullYear(),i=Ju(n),s=e.getMonth();return i?r>=1&&r<=KN[s]:r>=1&&r<=VN[s]}set(e,r,n){return e.setDate(n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]};var ff=class extends J{static{o(this,"DayOfYearParser")}priority=90;subpriority=1;parse(e,r,n){switch(r){case"D":case"DD":return be(ve.dayOfYear,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return he(r.length,e)}}validate(e,r){let n=e.getFullYear();return Ju(n)?r>=1&&r<=366:r>=1&&r<=365}set(e,r,n){return e.setMonth(0,n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]};function Kn(t,e,r){let n=Oe(),i=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,s=b(t,r?.in),a=s.getDay(),c=(e%7+7)%7,u=7-i,f=e<0||e>6?e-(a+u)%7:(c+u)%7-(a+u)%7;return et(s,f,r)}o(Kn,"setDay");var oue=Kn;var pf=class extends J{static{o(this,"DayParser")}priority=90;parse(e,r,n){switch(r){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,r){return r>=0&&r<=6}set(e,r,n,i){return e=Kn(e,n,i),e.setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]};var hf=class extends J{static{o(this,"LocalDayParser")}priority=90;parse(e,r,n,i){let s=o(a=>{let l=Math.floor((a-1)/7)*7;return(a+i.weekStartsOn+6)%7+l},"valueCallback");switch(r){case"e":case"ee":return Me(he(r.length,e),s);case"eo":return Me(n.ordinalNumber(e,{unit:"day"}),s);case"eee":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeeee":return n.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,r){return r>=0&&r<=6}set(e,r,n,i){return e=Kn(e,n,i),e.setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]};var mf=class extends J{static{o(this,"StandAloneLocalDayParser")}priority=90;parse(e,r,n,i){let s=o(a=>{let l=Math.floor((a-1)/7)*7;return(a+i.weekStartsOn+6)%7+l},"valueCallback");switch(r){case"c":case"cc":return Me(he(r.length,e),s);case"co":return Me(n.ordinalNumber(e,{unit:"day"}),s);case"ccc":return n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"ccccc":return n.day(e,{width:"narrow",context:"standalone"});case"cccccc":return n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});default:return n.day(e,{width:"wide",context:"standalone"})||n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"})}}validate(e,r){return r>=0&&r<=6}set(e,r,n,i){return e=Kn(e,n,i),e.setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]};function df(t,e,r){let n=b(t,r?.in),i=zu(n,r),s=e-i;return et(n,s,r)}o(df,"setISODay");var Eue=df;var gf=class extends J{static{o(this,"ISODayParser")}priority=90;parse(e,r,n){let i=o(s=>s===0?7:s,"valueCallback");switch(r){case"i":case"ii":return he(r.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return Me(n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),i);case"iiiii":return Me(n.day(e,{width:"narrow",context:"formatting"}),i);case"iiiiii":return Me(n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),i);default:return Me(n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),i)}}validate(e,r){return r>=1&&r<=7}set(e,r,n){return e=df(e,n),e.setHours(0,0,0,0),e}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]};var yf=class extends J{static{o(this,"AMPMParser")}priority=80;parse(e,r,n){switch(r){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,r,n){return e.setHours(ls(n),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]};var xf=class extends J{static{o(this,"AMPMMidnightParser")}priority=80;parse(e,r,n){switch(r){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,r,n){return e.setHours(ls(n),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]};var bf=class extends J{static{o(this,"DayPeriodParser")}priority=80;parse(e,r,n){switch(r){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,r,n){return e.setHours(ls(n),0,0,0),e}incompatibleTokens=["a","b","t","T"]};var wf=class extends J{static{o(this,"Hour1to12Parser")}priority=70;parse(e,r,n){switch(r){case"h":return be(ve.hour12h,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return he(r.length,e)}}validate(e,r){return r>=1&&r<=12}set(e,r,n){let i=e.getHours()>=12;return i&&n<12?e.setHours(n+12,0,0,0):!i&&n===12?e.setHours(0,0,0,0):e.setHours(n,0,0,0),e}incompatibleTokens=["H","K","k","t","T"]};var vf=class extends J{static{o(this,"Hour0to23Parser")}priority=70;parse(e,r,n){switch(r){case"H":return be(ve.hour23h,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return he(r.length,e)}}validate(e,r){return r>=0&&r<=23}set(e,r,n){return e.setHours(n,0,0,0),e}incompatibleTokens=["a","b","h","K","k","t","T"]};var Sf=class extends J{static{o(this,"Hour0To11Parser")}priority=70;parse(e,r,n){switch(r){case"K":return be(ve.hour11h,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return he(r.length,e)}}validate(e,r){return r>=0&&r<=11}set(e,r,n){return e.getHours()>=12&&n<12?e.setHours(n+12,0,0,0):e.setHours(n,0,0,0),e}incompatibleTokens=["h","H","k","t","T"]};var kf=class extends J{static{o(this,"Hour1To24Parser")}priority=70;parse(e,r,n){switch(r){case"k":return be(ve.hour24h,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return he(r.length,e)}}validate(e,r){return r>=1&&r<=24}set(e,r,n){let i=n<=24?n%24:n;return e.setHours(i,0,0,0),e}incompatibleTokens=["a","b","h","H","K","t","T"]};var Tf=class extends J{static{o(this,"MinuteParser")}priority=60;parse(e,r,n){switch(r){case"m":return be(ve.minute,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return he(r.length,e)}}validate(e,r){return r>=0&&r<=59}set(e,r,n){return e.setMinutes(n,0,0),e}incompatibleTokens=["t","T"]};var Ef=class extends J{static{o(this,"SecondParser")}priority=50;parse(e,r,n){switch(r){case"s":return be(ve.second,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return he(r.length,e)}}validate(e,r){return r>=0&&r<=59}set(e,r,n){return e.setSeconds(n,0),e}incompatibleTokens=["t","T"]};var Df=class extends J{static{o(this,"FractionOfSecondParser")}priority=30;parse(e,r){let n=o(i=>Math.trunc(i*Math.pow(10,-r.length+3)),"valueCallback");return Me(he(r.length,e),n)}set(e,r,n){return e.setMilliseconds(n),e}incompatibleTokens=["t","T"]};var Cf=class extends J{static{o(this,"ISOTimezoneWithZParser")}priority=10;parse(e,r){switch(r){case"X":return lr(ar.basicOptionalMinutes,e);case"XX":return lr(ar.basic,e);case"XXXX":return lr(ar.basicOptionalSeconds,e);case"XXXXX":return lr(ar.extendedOptionalSeconds,e);default:return lr(ar.extended,e)}}set(e,r,n){return r.timestampIsSet?e:$(e,e.getTime()-We(e)-n)}incompatibleTokens=["t","T","x"]};var Of=class extends J{static{o(this,"ISOTimezoneParser")}priority=10;parse(e,r){switch(r){case"x":return lr(ar.basicOptionalMinutes,e);case"xx":return lr(ar.basic,e);case"xxxx":return lr(ar.basicOptionalSeconds,e);case"xxxxx":return lr(ar.extendedOptionalSeconds,e);default:return lr(ar.extended,e)}}set(e,r,n){return r.timestampIsSet?e:$(e,e.getTime()-We(e)-n)}incompatibleTokens=["t","T","X"]};var Mf=class extends J{static{o(this,"TimestampSecondsParser")}priority=40;parse(e){return Ku(e)}set(e,r,n){return[$(e,n*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"};var If=class extends J{static{o(this,"TimestampMillisecondsParser")}priority=20;parse(e){return Ku(e)}set(e,r,n){return[$(e,n),{timestampIsSet:!0}]}incompatibleTokens="*"};var Nf={G:new Vu,y:new Qu,Y:new Xu,R:new Zu,u:new ef,Q:new tf,q:new rf,M:new nf,L:new of,w:new af,I:new cf,d:new uf,D:new ff,E:new pf,e:new hf,c:new mf,i:new gf,a:new yf,b:new xf,B:new bf,h:new wf,H:new vf,K:new Sf,k:new kf,m:new Tf,s:new Ef,S:new Df,X:new Cf,x:new Of,t:new Mf,T:new If};var GN=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,JN=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,QN=/^'([^]*?)'?$/,XN=/''/g,ZN=/\S/,eP=/[a-zA-Z]/;function Pf(t,e,r,n){let i=o(()=>$(n?.in||r,NaN),"invalidDate"),s=ju(),a=n?.locale??s.locale??Ft,l=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,c=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??s.weekStartsOn??s.locale?.options?.weekStartsOn??0;if(!e)return t?i():b(r,n?.in);let u={firstWeekContainsDate:l,weekStartsOn:c,locale:a},f=[new Yu(n?.in,r)],p=e.match(JN).map(y=>{let x=y[0];if(x in Yn){let T=Yn[x];return T(y,a.formatLong)}return y}).join("").match(GN),h=[];for(let y of p){!n?.useAdditionalWeekYearTokens&&_u(y)&&Fa(y,e,t),!n?.useAdditionalDayOfYearTokens&&Lu(y)&&Fa(y,e,t);let x=y[0],T=Nf[x];if(T){let{incompatibleTokens:E}=T;if(Array.isArray(E)){let P=h.find(D=>E.includes(D.token)||D.token===x);if(P)throw new RangeError(`The format string mustn't contain \`${P.fullToken}\` and \`${y}\` at the same time`)}else if(T.incompatibleTokens==="*"&&h.length>0)throw new RangeError(`The format string mustn't contain \`${y}\` and any other token at the same time`);h.push({token:x,fullToken:y});let L=T.run(t,y,a.match,u);if(!L)return i();f.push(L.setter),t=L.rest}else{if(x.match(eP))throw new RangeError("Format string contains an unescaped latin alphabet character `"+x+"`");if(y==="''"?y="'":x==="'"&&(y=tP(y)),t.indexOf(y)===0)t=t.slice(y.length);else return i()}}if(t.length>0&&ZN.test(t))return i();let m=f.map(y=>y.priority).sort((y,x)=>x-y).filter((y,x,T)=>T.indexOf(y)===x).map(y=>f.filter(x=>x.priority===y).sort((x,T)=>T.subPriority-x.subPriority)).map(y=>y[0]),d=b(r,n?.in);if(isNaN(+d))return i();let g={};for(let y of m){if(!y.validate(d,u))return i();let x=y.set(d,g,u);Array.isArray(x)?(d=x[0],Object.assign(g,x[1])):d=x}return d}o(Pf,"parse");function tP(t){return t.match(QN)[1].replace(XN,"'")}o(tP,"cleanEscapedString");var Rpe=Pf;function W0(t,e,r){return ht(Pf(t,e,new Date,r))}o(W0,"isMatch");var jpe=W0;function H0(t,e){return b(t,e?.in).getDay()===1}o(H0,"isMonday");var Upe=H0;function U0(t){return+b(t)<Date.now()}o(U0,"isPast");var Kpe=U0;function Ba(t,e){let r=b(t,e?.in);return r.setMinutes(0,0,0),r}o(Ba,"startOfHour");var Xpe=Ba;function Lf(t,e,r){let[n,i]=ee(r?.in,t,e);return+Ba(n)==+Ba(i)}o(Lf,"isSameHour");var nhe=Lf;function cs(t,e,r){let[n,i]=ee(r?.in,t,e);return+_e(n,r)==+_e(i,r)}o(cs,"isSameWeek");var lhe=cs;function _f(t,e,r){return cs(t,e,{...r,weekStartsOn:1})}o(_f,"isSameISOWeek");var phe=_f;function q0(t,e,r){let[n,i]=ee(r?.in,t,e);return+Jt(n)==+Jt(i)}o(q0,"isSameISOWeekYear");var yhe=q0;function ja(t,e){let r=b(t,e?.in);return r.setSeconds(0,0),r}o(ja,"startOfMinute");var vhe=ja;function Rf(t,e){return+ja(t)==+ja(e)}o(Rf,"isSameMinute");var Ehe=Rf;function Af(t,e,r){let[n,i]=ee(r?.in,t,e);return n.getFullYear()===i.getFullYear()&&n.getMonth()===i.getMonth()}o(Af,"isSameMonth");var Mhe=Af;function Ff(t,e,r){let[n,i]=ee(r?.in,t,e);return+tn(n)==+tn(i)}o(Ff,"isSameQuarter");var _he=Ff;function za(t,e){let r=b(t,e?.in);return r.setMilliseconds(0),r}o(za,"startOfSecond");var $he=za;function $f(t,e){return+za(t)==+za(e)}o($f,"isSameSecond");var Whe=$f;function Bf(t,e,r){let[n,i]=ee(r?.in,t,e);return n.getFullYear()===i.getFullYear()}o(Bf,"isSameYear");var Yhe=Bf;function Y0(t,e){return Lf(b(t,e?.in),de(e?.in||t))}o(Y0,"isThisHour");var Xhe=Y0;function V0(t,e){return _f($(e?.in||t,t),de(e?.in||t))}o(V0,"isThisISOWeek");var ime=V0;function K0(t){return Rf(t,de(t))}o(K0,"isThisMinute");var cme=K0;function G0(t,e){return Af($(e?.in||t,t),de(e?.in||t))}o(G0,"isThisMonth");var dme=G0;function J0(t,e){return Ff($(e?.in||t,t),de(e?.in||t))}o(J0,"isThisQuarter");var vme=J0;function Q0(t){return $f(t,de(t))}o(Q0,"isThisSecond");var Dme=Q0;function X0(t,e){return cs($(e?.in||t,t),de(e?.in||t),e)}o(X0,"isThisWeek");var Pme=X0;function Z0(t,e){return Bf($(e?.in||t,t),de(e?.in||t))}o(Z0,"isThisYear");var $me=Z0;function ev(t,e){return b(t,e?.in).getDay()===4}o(ev,"isThursday");var Wme=ev;function tv(t,e){return Zr($(e?.in||t,t),de(e?.in||t))}o(tv,"isToday");var Kme=tv;function rv(t,e){return Zr(t,et(de(e?.in||t),1),e)}o(rv,"isTomorrow");var ede=rv;function nv(t,e){return b(t,e?.in).getDay()===2}o(nv,"isTuesday");var ide=nv;function iv(t,e){return b(t,e?.in).getDay()===3}o(iv,"isWednesday");var lde=iv;function ov(t,e,r){let n=+b(t,r?.in),[i,s]=[+b(e.start,r?.in),+b(e.end,r?.in)].sort((a,l)=>a-l);return n>=i&&n<=s}o(ov,"isWithinInterval");var pde=ov;function Gn(t,e,r){return et(t,-e,r)}o(Gn,"subDays");var gde=Gn;function sv(t,e){return Zr($(e?.in||t,t),Gn(de(e?.in||t),1))}o(sv,"isYesterday");var kde=sv;function av(t,e){let r=b(t,e?.in),n=r.getFullYear(),i=9+Math.floor(n/10)*10;return r.setFullYear(i+1,0,0),r.setHours(0,0,0,0),b(r,e?.in)}o(av,"lastDayOfDecade");var Cde=av;function jf(t,e){let r=Oe(),n=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=b(t,e?.in),s=i.getDay(),a=(s<n?-7:0)+6-(s-n);return i.setHours(0,0,0,0),i.setDate(i.getDate()+a),i}o(jf,"lastDayOfWeek");var Pde=jf;function lv(t,e){return jf(t,{...e,weekStartsOn:1})}o(lv,"lastDayOfISOWeek");var Ade=lv;function cv(t,e){let r=Mt(t,e),n=$(e?.in||t,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);let i=Ge(n,e);return i.setDate(i.getDate()-1),i}o(cv,"lastDayOfISOWeekYear");var Wde=cv;function uv(t,e){let r=b(t,e?.in),n=r.getMonth(),i=n-n%3+3;return r.setMonth(i,0),r.setHours(0,0,0,0),r}o(uv,"lastDayOfQuarter");var Yde=uv;function fv(t,e){let r=b(t,e?.in),n=r.getFullYear();return r.setFullYear(n+1,0,0),r.setHours(0,0,0,0),r}o(fv,"lastDayOfYear");var Jde=fv;var rP=/(\w)\1*|''|'(''|[^'])+('|$)|./g,nP=/^'([^]*?)'?$/,iP=/''/g,oP=/[a-zA-Z]/;function pv(t,e){let r=b(t);if(!ht(r))throw new RangeError("Invalid time value");let n=e.match(rP);return n?n.map(s=>{if(s==="''")return"'";let a=s[0];if(a==="'")return sP(s);let l=Qt[a];if(l)return l(r,s);if(a.match(oP))throw new RangeError("Format string contains an unescaped latin alphabet character `"+a+"`");return s}).join(""):""}o(pv,"lightFormat");function sP(t){let e=t.match(nP);return e?e[1].replace(iP,"'"):t}o(sP,"cleanEscapedString");var rge=pv;function hv({years:t,months:e,weeks:r,days:n,hours:i,minutes:s,seconds:a}){let l=0;t&&(l+=t*365.2425),e&&(l+=e*(365.2425/12)),r&&(l+=r*7),n&&(l+=n);let c=l*24*60*60;return i&&(c+=i*60*60),s&&(c+=s*60),a&&(c+=a),Math.trunc(c*1e3)}o(hv,"milliseconds");var sge=hv;function mv(t){let e=t/Gt;return Math.trunc(e)}o(mv,"millisecondsToHours");var uge=mv;function dv(t){let e=t/yt;return Math.trunc(e)}o(dv,"millisecondsToMinutes");var mge=dv;function gv(t){let e=t/Uo;return Math.trunc(e)}o(gv,"millisecondsToSeconds");var xge=gv;function yv(t){let e=t/lu;return Math.trunc(e)}o(yv,"minutesToHours");var Sge=yv;function xv(t){return Math.trunc(t*yt)}o(xv,"minutesToMilliseconds");var Dge=xv;function bv(t){return Math.trunc(t*Yo)}o(bv,"minutesToSeconds");var Ige=bv;function wv(t){let e=t/cu;return Math.trunc(e)}o(wv,"monthsToQuarters");var _ge=wv;function vv(t){let e=t/uu;return Math.trunc(e)}o(vv,"monthsToYears");var $ge=vv;function wt(t,e,r){let n=e-Vn(t,r);return n<=0&&(n+=7),et(t,n,r)}o(wt,"nextDay");var Hge=wt;function Sv(t,e){return wt(t,5,e)}o(Sv,"nextFriday");var Vge=Sv;function kv(t,e){return wt(t,1,e)}o(kv,"nextMonday");var Qge=kv;function Tv(t,e){return wt(t,6,e)}o(Tv,"nextSaturday");var tye=Tv;function Ev(t,e){return wt(t,0,e)}o(Ev,"nextSunday");var oye=Ev;function Dv(t,e){return wt(t,4,e)}o(Dv,"nextThursday");var cye=Dv;function Cv(t,e){return wt(t,2,e)}o(Cv,"nextTuesday");var hye=Cv;function Ov(t,e){return wt(t,3,e)}o(Ov,"nextWednesday");var yye=Ov;function Iv(t,e){let r=o(()=>$(e?.in,NaN),"invalidDate"),n=e?.additionalDigits??2,i=uP(t),s;if(i.date){let u=fP(i.date,n);s=pP(u.restDateString,u.year)}if(!s||isNaN(+s))return r();let a=+s,l=0,c;if(i.time&&(l=hP(i.time),isNaN(l)))return r();if(i.timezone){if(c=mP(i.timezone),isNaN(c))return r()}else{let u=new Date(a+l),f=b(0,e?.in);return f.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),f.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),f}return b(a+l+c,e?.in)}o(Iv,"parseISO");var zf={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},aP=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,lP=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,cP=/^([+-])(\d{2})(?::?(\d{2}))?$/;function uP(t){let e={},r=t.split(zf.dateTimeDelimiter),n;if(r.length>2)return e;if(/:/.test(r[0])?n=r[0]:(e.date=r[0],n=r[1],zf.timeZoneDelimiter.test(e.date)&&(e.date=t.split(zf.timeZoneDelimiter)[0],n=t.substr(e.date.length,t.length))),n){let i=zf.timezone.exec(n);i?(e.time=n.replace(i[1],""),e.timezone=i[1]):e.time=n}return e}o(uP,"splitDateString");function fP(t,e){let r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),n=t.match(r);if(!n)return{year:NaN,restDateString:""};let i=n[1]?parseInt(n[1]):null,s=n[2]?parseInt(n[2]):null;return{year:s===null?i:s*100,restDateString:t.slice((n[1]||n[2]).length)}}o(fP,"parseYear");function pP(t,e){if(e===null)return new Date(NaN);let r=t.match(aP);if(!r)return new Date(NaN);let n=!!r[4],i=Wa(r[1]),s=Wa(r[2])-1,a=Wa(r[3]),l=Wa(r[4]),c=Wa(r[5])-1;if(n)return bP(e,l,c)?dP(e,l,c):new Date(NaN);{let u=new Date(0);return!yP(e,s,a)||!xP(e,i)?new Date(NaN):(u.setUTCFullYear(e,s,Math.max(i,a)),u)}}o(pP,"parseDate");function Wa(t){return t?parseInt(t):1}o(Wa,"parseDateUnit");function hP(t){let e=t.match(lP);if(!e)return NaN;let r=ed(e[1]),n=ed(e[2]),i=ed(e[3]);return wP(r,n,i)?r*Gt+n*yt+i*1e3:NaN}o(hP,"parseTime");function ed(t){return t&&parseFloat(t.replace(",","."))||0}o(ed,"parseTimeUnit");function mP(t){if(t==="Z")return 0;let e=t.match(cP);if(!e)return 0;let r=e[1]==="+"?-1:1,n=parseInt(e[2]),i=e[3]&&parseInt(e[3])||0;return vP(n,i)?r*(n*Gt+i*yt):NaN}o(mP,"parseTimezone");function dP(t,e,r){let n=new Date(0);n.setUTCFullYear(t,0,4);let i=n.getUTCDay()||7,s=(e-1)*7+r+1-i;return n.setUTCDate(n.getUTCDate()+s),n}o(dP,"dayOfISOWeekYear");var gP=[31,null,31,30,31,30,31,31,30,31,30,31];function Mv(t){return t%400===0||t%4===0&&t%100!==0}o(Mv,"isLeapYearIndex");function yP(t,e,r){return e>=0&&e<=11&&r>=1&&r<=(gP[e]||(Mv(t)?29:28))}o(yP,"validateDate");function xP(t,e){return e>=1&&e<=(Mv(t)?366:365)}o(xP,"validateDayOfYearDate");function bP(t,e,r){return e>=1&&e<=53&&r>=0&&r<=6}o(bP,"validateWeekDate");function wP(t,e,r){return t===24?e===0&&r===0:r>=0&&r<60&&e>=0&&e<60&&t>=0&&t<25}o(wP,"validateTime");function vP(t,e){return e>=0&&e<=59}o(vP,"validateTimezone");var kye=Iv;function Nv(t,e){let r=t.match(/(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2}):(\d{2})(?:\.(\d{0,7}))?(?:Z|(.)(\d{2}):?(\d{2})?)?/);return r?b(Date.UTC(+r[1],+r[2]-1,+r[3],+r[4]-(+r[9]||0)*(r[8]=="-"?-1:1),+r[5]-(+r[10]||0)*(r[8]=="-"?-1:1),+r[6],+((r[7]||"0")+"00").substring(0,3)),e?.in):b(NaN,e?.in)}o(Nv,"parseJSON");var Cye=Nv;function vt(t,e,r){let n=Vn(t,r)-e;return n<=0&&(n+=7),Gn(t,n,r)}o(vt,"previousDay");var Pye=vt;function Pv(t,e){return vt(t,5,e)}o(Pv,"previousFriday");var Aye=Pv;function Lv(t,e){return vt(t,1,e)}o(Lv,"previousMonday");var jye=Lv;function _v(t,e){return vt(t,6,e)}o(_v,"previousSaturday");var Uye=_v;function Rv(t,e){return vt(t,0,e)}o(Rv,"previousSunday");var Kye=Rv;function Av(t,e){return vt(t,4,e)}o(Av,"previousThursday");var Xye=Av;function Fv(t,e){return vt(t,2,e)}o(Fv,"previousTuesday");var rxe=Fv;function $v(t,e){return vt(t,3,e)}o($v,"previousWednesday");var sxe=$v;function Bv(t){return Math.trunc(t*cu)}o(Bv,"quartersToMonths");var uxe=Bv;function jv(t){let e=t/fu;return Math.trunc(e)}o(jv,"quartersToYears");var mxe=jv;function zv(t,e){let r=e?.nearestTo??1;if(r<1||r>12)return $(e?.in||t,NaN);let n=b(t,e?.in),i=n.getMinutes()/60,s=n.getSeconds()/60/60,a=n.getMilliseconds()/1e3/60/60,l=n.getHours()+i+s+a,c=e?.roundingMethod??"round",f=bt(c)(l/r)*r;return n.setHours(f,0,0,0),n}o(zv,"roundToNearestHours");var wxe=zv;function Wv(t,e){let r=e?.nearestTo??1;if(r<1||r>30)return $(t,NaN);let n=b(t,e?.in),i=n.getSeconds()/60,s=n.getMilliseconds()/1e3/60,a=n.getMinutes()+i+s,l=e?.roundingMethod??"round",u=bt(l)(a/r)*r;return n.setMinutes(u,0,0),n}o(Wv,"roundToNearestMinutes");var Dxe=Wv;function Hv(t){let e=t/Li;return Math.trunc(e)}o(Hv,"secondsToHours");var Ixe=Hv;function Uv(t){return t*Uo}o(Uv,"secondsToMilliseconds");var _xe=Uv;function qv(t){let e=t/Yo;return Math.trunc(e)}o(qv,"secondsToMinutes");var $xe=qv;function us(t,e,r){let n=b(t,r?.in),i=n.getFullYear(),s=n.getDate(),a=$(r?.in||t,0);a.setFullYear(i,e,15),a.setHours(0,0,0,0);let l=$u(a);return n.setMonth(e,Math.min(s,l)),n}o(us,"setMonth");var Uxe=us;function Yv(t,e,r){let n=b(t,r?.in);return isNaN(+n)?$(r?.in||t,NaN):(e.year!=null&&n.setFullYear(e.year),e.month!=null&&(n=us(n,e.month)),e.date!=null&&n.setDate(e.date),e.hours!=null&&n.setHours(e.hours),e.minutes!=null&&n.setMinutes(e.minutes),e.seconds!=null&&n.setSeconds(e.seconds),e.milliseconds!=null&&n.setMilliseconds(e.milliseconds),n)}o(Yv,"set");var Jxe=Yv;function Vv(t,e,r){let n=b(t,r?.in);return n.setDate(e),n}o(Vv,"setDate");var ebe=Vv;function Kv(t,e,r){let n=b(t,r?.in);return n.setMonth(0),n.setDate(e),n}o(Kv,"setDayOfYear");var ibe=Kv;function Gv(t){let e={},r=Oe();for(let n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(t[n]===void 0?delete e[n]:e[n]=t[n]);xw(e)}o(Gv,"setDefaultOptions");var lbe=Gv;function Jv(t,e,r){let n=b(t,r?.in);return n.setHours(e),n}o(Jv,"setHours");var pbe=Jv;function Qv(t,e,r){let n=b(t,r?.in);return n.setMilliseconds(e),n}o(Qv,"setMilliseconds");var gbe=Qv;function Xv(t,e,r){let n=b(t,r?.in);return n.setMinutes(e),n}o(Xv,"setMinutes");var wbe=Xv;function Zv(t,e,r){let n=b(t,r?.in),i=Math.trunc(n.getMonth()/3)+1,s=e-i;return us(n,n.getMonth()+s*3)}o(Zv,"setQuarter");var Ebe=Zv;function eS(t,e,r){let n=b(t,r?.in);return n.setSeconds(e),n}o(eS,"setSeconds");var Mbe=eS;function tS(t,e,r){let n=Oe(),i=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=st(b(t,r?.in),$i(t,r),r),a=$(r?.in||t,0);a.setFullYear(e,0,i),a.setHours(0,0,0,0);let l=$i(a,r);return l.setDate(l.getDate()+s),l}o(tS,"setWeekYear");var Fbe=tS;function rS(t,e,r){let n=b(t,r?.in);return isNaN(+n)?$(r?.in||t,NaN):(n.setFullYear(e),n)}o(rS,"setYear");var Wbe=rS;function nS(t,e){let r=b(t,e?.in),n=r.getFullYear(),i=Math.floor(n/10)*10;return r.setFullYear(i,0,1),r.setHours(0,0,0,0),r}o(nS,"startOfDecade");var Ybe=nS;function iS(t){return Xr(Date.now(),t)}o(iS,"startOfToday");var Jbe=iS;function oS(t){let e=de(t?.in),r=e.getFullYear(),n=e.getMonth(),i=e.getDate(),s=$(t?.in,0);return s.setFullYear(r,n,i+1),s.setHours(0,0,0,0),s}o(oS,"startOfTomorrow");var twe=oS;function sS(t){let e=de(t?.in),r=e.getFullYear(),n=e.getMonth(),i=e.getDate(),s=de(t?.in);return s.setFullYear(r,n,i-1),s.setHours(0,0,0,0),s}o(sS,"startOfYesterday");var owe=sS;function Wf(t,e,r){return Jr(t,-e,r)}o(Wf,"subMonths");var cwe=Wf;function aS(t,e,r){let{years:n=0,months:i=0,weeks:s=0,days:a=0,hours:l=0,minutes:c=0,seconds:u=0}=e,f=Wf(t,i+n*12,r),p=Gn(f,a+s*7,r),h=c+l*60,d=(u+h*60)*1e3;return $(r?.in||t,+p-d)}o(aS,"sub");var dwe=aS;function lS(t,e,r){return mu(t,-e,r)}o(lS,"subBusinessDays");var bwe=lS;function cS(t,e,r){return du(t,-e,r)}o(cS,"subHours");var kwe=cS;function uS(t,e,r){return jn(t,-e,r)}o(uS,"subMilliseconds");var Cwe=uS;function fS(t,e,r){return Vo(t,-e,r)}o(fS,"subMinutes");var Nwe=fS;function pS(t,e,r){return Ko(t,-e,r)}o(pS,"subQuarters");var Rwe=pS;function hS(t,e,r){return xu(t,-e,r)}o(hS,"subSeconds");var Bwe=hS;function mS(t,e,r){return zn(t,-e,r)}o(mS,"subWeeks");var Hwe=mS;function dS(t,e,r){return bu(t,-e,r)}o(dS,"subYears");var Vwe=dS;function gS(t){return Math.trunc(t*7)}o(gS,"weeksToDays");var Qwe=gS;function yS(t){return Math.trunc(t*365.2425)}o(yS,"yearsToDays");var t0e=yS;function xS(t){return Math.trunc(t*uu)}o(xS,"yearsToMonths");var o0e=xS;function bS(t){return Math.trunc(t*fu)}o(bS,"yearsToQuarters");var c0e=bS;var SS=o(t=>Number.isFinite(t)?t:0,"toZeroIfInfinity");function SP(t){return{days:Math.trunc(t/864e5),hours:Math.trunc(t/36e5%24),minutes:Math.trunc(t/6e4%60),seconds:Math.trunc(t/1e3%60),milliseconds:Math.trunc(t%1e3),microseconds:Math.trunc(SS(t*1e3)%1e3),nanoseconds:Math.trunc(SS(t*1e6)%1e3)}}o(SP,"parseNumber");function kP(t){return{days:t/86400000n,hours:t/3600000n%24n,minutes:t/60000n%60n,seconds:t/1000n%60n,milliseconds:t%1000n,microseconds:0n,nanoseconds:0n}}o(kP,"parseBigint");function od(t){switch(typeof t){case"number":{if(Number.isFinite(t))return SP(t);break}case"bigint":return kP(t)}throw new TypeError("Expected a finite number or bigint")}o(od,"parseMilliseconds");var TP=o(t=>t===0||t===0n,"isZero"),EP=o((t,e)=>e===1||e===1n?t:`${t}s`,"pluralize"),DP=1e-7,CP=24n*60n*60n*1000n;function Ua(t,e){let r=typeof t=="bigint";if(!r&&!Number.isFinite(t))throw new TypeError("Expected a finite number or bigint");e={...e};let n=t<0?"-":"";t=t<0?-t:t,e.colonNotation&&(e.compact=!1,e.formatSubMilliseconds=!1,e.separateMilliseconds=!1,e.verbose=!1),e.compact&&(e.unitCount=1,e.secondsDecimalDigits=0,e.millisecondsDecimalDigits=0);let i=[],s=o((f,p)=>{let h=Math.floor(f*10**p+DP);return(Math.round(h)/10**p).toFixed(p)},"floorDecimals"),a=o((f,p,h,m)=>{if(!((i.length===0||!e.colonNotation)&&TP(f)&&!(e.colonNotation&&h==="m"))){if(m??=String(f),e.colonNotation){let d=m.includes(".")?m.split(".")[0].length:m.length,g=i.length>0?2:1;m="0".repeat(Math.max(0,g-d))+m}else m+=e.verbose?" "+EP(p,f):h;i.push(m)}},"add"),l=od(t),c=BigInt(l.days);if(e.hideYearAndDays?a(BigInt(c)*24n+BigInt(l.hours),"hour","h"):(e.hideYear?a(c,"day","d"):(a(c/365n,"year","y"),a(c%365n,"day","d")),a(Number(l.hours),"hour","h")),a(Number(l.minutes),"minute","m"),!e.hideSeconds)if(e.separateMilliseconds||e.formatSubMilliseconds||!e.colonNotation&&t<1e3&&!e.subSecondsAsDecimals){let f=Number(l.seconds),p=Number(l.milliseconds),h=Number(l.microseconds),m=Number(l.nanoseconds);if(a(f,"second","s"),e.formatSubMilliseconds)a(p,"millisecond","ms"),a(h,"microsecond","\xB5s"),a(m,"nanosecond","ns");else{let d=p+h/1e3+m/1e6,g=typeof e.millisecondsDecimalDigits=="number"?e.millisecondsDecimalDigits:0,y=d>=1?Math.round(d):Math.ceil(d),x=g?d.toFixed(g):y;a(Number.parseFloat(x),"millisecond","ms",x)}}else{let f=(r?Number(t%CP):t)/1e3%60,p=typeof e.secondsDecimalDigits=="number"?e.secondsDecimalDigits:1,h=s(f,p),m=e.keepDecimalsOnWholeSeconds?h:h.replace(/\.0+$/,"");a(Number.parseFloat(m),"second","s",m)}if(i.length===0)return n+"0"+(e.verbose?" milliseconds":"ms");let u=e.colonNotation?":":" ";return typeof e.unitCount=="number"&&(i=i.slice(0,Math.max(e.unitCount,1))),n+i.join(u)}o(Ua,"prettyMilliseconds");var ji=zr(wS(),1),kS=zr(vS(),1);ji.default.extend(kS.default);var qa=class{static{o(this,"CronJob")}constructor(e,r,n){this.status="initial",this.nextExecutionUnix=0,this.cronExpression=r,this.jobFunction=n,this.cronParser=new La.Cron(r)}checkExecution(){if(this.status==="stopped")return this.nextExecutionUnix;if(this.nextExecutionUnix===0&&this.getNextExecutionTime(),Date.now()>this.nextExecutionUnix){let e=this.jobFunction(this.nextExecutionUnix);e instanceof Promise&&e.catch(r=>console.log(r)),this.nextExecutionUnix=this.getNextExecutionTime()}return this.nextExecutionUnix}getNextExecutionTime(){return this.nextExecutionUnix=Date.now()+this.getTimeToNextExecution()}getTimeToNextExecution(){return this.cronParser.msToNext()}start(){this.status="started"}stop(){this.status="stopped"}};var sd=class{static{o(this,"CronManager")}constructor(){this.status="stopped",this.cronjobs=new St.ObjectMap,this.cycleWakeDeferred=null}wakeCycle(){this.cycleWakeDeferred&&this.cycleWakeDeferred.status==="pending"&&this.cycleWakeDeferred.resolve()}addCronjob(e,r){let n=new qa(this,e,r);return this.cronjobs.add(n),this.status==="started"&&(n.start(),this.wakeCycle()),n}removeCronjob(e){e.stop(),this.cronjobs.remove(e),this.status==="started"&&this.wakeCycle()}start(){if(this.status!=="started"){this.status="started";for(let e of this.cronjobs.getArray())e.start();this.runCronCycle()}}async runCronCycle(){for(;this.status==="started";){this.cycleWakeDeferred=new ie.Deferred;let e=1/0;for(let r of this.cronjobs.getArray()){r.checkExecution();let n=r.getTimeToNextExecution();n<e&&(e=n)}if(e<1/0&&e>0)this.executionTimeout=new Le.Timeout(e),await Promise.race([this.executionTimeout.promise,this.cycleWakeDeferred.promise]),this.executionTimeout.cancel();else{if(e<=0)continue;await this.cycleWakeDeferred.promise}}this.cycleWakeDeferred=null}stop(){this.status==="started"&&(this.status="stopped",this.executionTimeout&&this.executionTimeout.cancel(),this.wakeCycle());for(let e of this.cronjobs.getArray())e.stop()}};var Jn={years:o((t=1)=>t*3154e7,"years"),months:o((t=1)=>t*2628e6,"months"),weeks:o((t=1)=>t*6048e5,"weeks"),days:o((t=1)=>t*864e5,"days"),hours:o((t=1)=>t*36e5,"hours"),minutes:o((t=1)=>t*6e4,"minutes"),seconds:o((t=1)=>t*1e3,"seconds")},ad=o(t=>{let e=0,r=o(n=>{e=e+n},"addMilliSeconds");return t.years&&r(Jn.years(t.years)),t.months&&r(Jn.months(t.months)),t.weeks&&r(Jn.weeks(t.weeks)),t.days&&r(Jn.days(t.days)),t.hours&&r(Jn.hours(t.hours)),t.minutes&&r(Jn.minutes(t.minutes)),t.seconds&&r(Jn.seconds(t.seconds)),e},"getMilliSecondsFromUnits"),OP=o(t=>Ua(t),"getMilliSecondsAsHumanReadableString"),MP=o(t=>Ha.formatDistanceToNow(new Date(t)),"getMilliSecondsAsHumanReadableAgoTime");var ld=class t extends Date{static{o(this,"ExtendedDate")}static fromMillis(e){return new t(e)}static fromDate(e){return new t(e.getTime())}static fromEuropeanDate(e){let r=/(.*)\.(.*)\.(.*)/.exec(e),i=new Date(parseFloat(r[3]),parseFloat(r[2])-1,parseFloat(r[1])).getTime();return new t(i)}static fromHyphedDate(e){let r=new Date(e).getTime();return new t(r)}static fromEuropeanDateAndTime(e,r="12:00:00",n="Europe/Berlin"){let i=/(.*)\.(.*)\.(.*)/.exec(e),s=o(u=>`0${u}`.slice(-2),"sliceDate"),a=`${i[3]}-${s(i[2])}-${s(i[1])}T${r}`,c=ji.default(a).toDate().getTime();return new t(c)}constructor(e=Date.now()){super(e)}exportToEuropeanDate(){let e=this.exportToUnits();return`${e.dayString}.${e.monthString}.${e.yearString}`}exportToHyphedSortableDate(){let e=this.exportToUnits();return`${e.yearString}-${e.monthString}-${e.dayString}`}exportToUnits(){let e=["January","February","March","April","May","June","July","August","September","October","November","December"],r=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"];return{year:this.getFullYear(),yearString:`${this.getFullYear()}`,month:this.getMonth()+1,monthString:("0"+(this.getMonth()+1)).slice(-2),monthName:e[this.getMonth()],day:this.getDate(),dayString:("0"+this.getDate()).slice(-2),dayOfTheWeek:this.getDay(),dayOfTheWeekName:r[this.getDay()]}}format(e){return ji.default(this.getTime()).format(e)}isToday(){return ji.default(this.getTime()).isToday()}lessTimePassedToNow(e){let r=ad(e);return Date.now()-this.getTime()<r}moreTimePassedToNow(e){return!this.lessTimePassedToNow(e)}};var cd=class{static{o(this,"HrtMeasurement")}constructor(){this.nanoSeconds=null,this.milliSeconds=null,this._milliStart=null,this._milliDiff=null,this._started=!1}start(){this._started=!0,this._milliStart=Date.now()}stop(){if(this._started===!1){console.log("Hasn't started yet");return}return this._milliDiff=Date.now()-this._milliStart,this.nanoSeconds=this._milliDiff*1e3,this.milliSeconds=this._milliDiff,this}reset(){this.nanoSeconds=null,this.milliSeconds=null,this._milliStart=null,this._milliDiff=null,this._started=!1}};var ud=class{static{o(this,"Interval")}constructor(e){this.status="initial",this.statusAuthorization=null,this.intervalJobs=[],this.intervalMilliseconds=e}start(){this.status="started";let e=new Date;this.statusAuthorization=e,o(async()=>{for(;this.status==="started"&&this.statusAuthorization===e;)await Le.delayFor(this.intervalMilliseconds),this.executeIntervalJobs()},"runInterval")()}stop(){this.status="stopped",this.statusAuthorization=null}addIntervalJob(e){this.intervalJobs.push(e)}executeIntervalJobs(){for(let e of this.intervalJobs)e()}};var ps=class t{static{o(this,"TimeStamp")}static fromMilliSeconds(e){return new t(e)}static fromTimeStamp(e){let r=new t;return r.change=r.milliSeconds-e.milliSeconds,r}constructor(e){this.change=null,e?typeof e=="number"&&(this.date=new Date(e)):this.date=new Date,this.milliSeconds=this.date.getTime(),this.epochtime=Math.floor(this.milliSeconds/1e3)}isOlderThanOtherTimeStamp(e,r=0){return this.milliSeconds<e.milliSeconds-r}isOlderThan(e,r=0){return this.milliSeconds+r<e.milliSeconds}isYoungerThanOtherTimeStamp(e,r=0){return this.milliSeconds>e.milliSeconds+r}isYoungerThanMilliSeconds(e){let n=new t().epochtime-e,i=new t(n);return this.isYoungerThanOtherTimeStamp(i)}};var fd=class{static{o(this,"Timer")}get timeLeft(){return this.timeInMilliseconds-this.pausedAt.change}constructor(e){this.state="initiated",this.completedDeferred=ie.defer(),this.timeInMilliseconds=e,this.completed=this.completedDeferred.promise}start(){if(!this.startedAt)this.currentTimeout=setTimeout(()=>{this.completedDeferred.resolve()},this.timeInMilliseconds),this.startedAt=new ps;else throw new Error("timer has been started before. Please use resume instead")}pause(){this.startedAt&&(clearTimeout(this.currentTimeout),this.currentTimeout=null,this.pausedAt=ps.fromTimeStamp(this.startedAt))}resume(){if(this.startedAt)this.currentTimeout=setTimeout(()=>{this.completedDeferred.resolve()},this.timeLeft);else throw new Error("timer has NOT been started before. Please use .start() instead")}reset(){this.pause(),this.startedAt=null,this.pausedAt=null}};var Uf=zr(_S(),1);var hd=class{static{o(this,"AsyncExecutionStack")}executionSlots=[];isProcessing=!1;nonExclusiveMaxConcurrency=1/0;nonExclusiveCurrentCount=0;nonExclusivePendingQueue=[];async getExclusiveExecutionSlot(e,r){let n=ie.defer(),i={funcToExecute:e,executionDeferred:n,timeout:r,mode:"exclusive"};return this.executionSlots.push(i),this.processExecutionSlots(),n.promise}async getNonExclusiveExecutionSlot(e,r){let n=ie.defer(),i={funcToExecute:e,executionDeferred:n,timeout:r,mode:"nonexclusive"};return this.executionSlots.push(i),this.processExecutionSlots(),n.promise}setNonExclusiveMaxConcurrency(e){if(!Number.isFinite(e)||e<1)throw new Error("nonExclusiveMaxConcurrency must be a finite number >= 1");this.nonExclusiveMaxConcurrency=e}getNonExclusiveMaxConcurrency(){return this.nonExclusiveMaxConcurrency}getActiveNonExclusiveCount(){return this.nonExclusiveCurrentCount}getPendingNonExclusiveCount(){return this.nonExclusivePendingQueue.length}async processExecutionSlots(){if(!this.isProcessing){for(this.isProcessing=!0;this.executionSlots.length>0;){let e=this.executionSlots[0];if(e.mode==="exclusive")await this.executeExclusiveSlot(e),this.executionSlots.shift();else{let r=[];for(;this.executionSlots.length>0&&this.executionSlots[0].mode==="nonexclusive";)r.push(this.executionSlots.shift());await this.executeNonExclusiveSlots(r)}}this.isProcessing=!1}}async executeExclusiveSlot(e){try{if(e.timeout){let r=new Le.Timeout(e.timeout);try{let n=await Promise.race([e.funcToExecute(),r.promise.then(()=>{throw new Error("Timeout reached")})]);r.cancel(),e.executionDeferred.resolve(n)}catch(n){throw r.cancel(),n}}else{let r=await e.funcToExecute();e.executionDeferred.resolve(r)}}catch(r){e.executionDeferred.reject(r)}}async executeNonExclusiveSlots(e){let r=e.map(async n=>{await this.waitForNonExclusiveSlot();try{if(n.timeout){let i=new Le.Timeout(n.timeout);try{let s=await Promise.race([n.funcToExecute(),i.promise.then(()=>{throw new Error("Timeout reached")})]);i.cancel(),n.executionDeferred.resolve(s)}catch(s){throw i.cancel(),s}}else{let i=await n.funcToExecute();n.executionDeferred.resolve(i)}}catch(i){n.executionDeferred.reject(i)}finally{this.releaseNonExclusiveSlot()}});await Promise.all(r)}waitForNonExclusiveSlot(){return this.nonExclusiveCurrentCount<this.nonExclusiveMaxConcurrency?(this.nonExclusiveCurrentCount++,Promise.resolve()):new Promise(e=>{this.nonExclusivePendingQueue.push(()=>{this.nonExclusiveCurrentCount++,e()})})}releaseNonExclusiveSlot(){this.nonExclusiveCurrentCount--;let e=this.nonExclusivePendingQueue.shift();e&&e()}};var md=class{static{o(this,"BackpressuredArray")}data;highWaterMark;hasSpace=new Ne.rxjs.Subject;itemsAvailable=new Ne.rxjs.Subject;isDestroyed=!1;constructor(e=16){this.data=[],this.highWaterMark=e}get length(){return this.data.length}push(e){this.data.push(e),this.itemsAvailable.next("itemsAvailable");let r=this.checkSpaceAvailable();return r&&this.hasSpace.next("hasSpace"),r}pushMany(e){for(let r of e)this.push(r);return this.checkSpaceAvailable()}shift(){let e=this.data.shift();return this.checkSpaceAvailable()&&this.hasSpace.next("hasSpace"),e}peek(){return this.data[0]}checkSpaceAvailable(){return this.data.length<this.highWaterMark}checkHasItems(){return this.data.length>0}waitForSpace(){return new Promise(e=>{if(this.checkSpaceAvailable()||this.isDestroyed)e();else{let r=this.hasSpace.subscribe({next:o(()=>{r.unsubscribe(),e()},"next"),complete:o(()=>{e()},"complete")})}})}waitForItems(){return new Promise(e=>{if(this.data.length>0||this.isDestroyed)e();else{let r=this.itemsAvailable.subscribe({next:o(()=>{r.unsubscribe(),e()},"next"),complete:o(()=>{e()},"complete")})}})}[Symbol.iterator](){return this.data[Symbol.iterator]()}destroy(){this.isDestroyed=!0,this.hasSpace.complete(),this.itemsAvailable.complete()}};var Wi=class t{static{o(this,"FastMap")}mapObject=new Map;isUniqueKey(e){return!this.mapObject.has(e)}has(e){return this.mapObject.has(e)}get size(){return this.mapObject.size}addToMap(e,r,n){return this.isUniqueKey(e)||n&&n.force?(this.mapObject.set(e,r),!0):!1}getByKey(e){return this.mapObject.get(e)}removeFromMap(e){let r=this.mapObject.get(e);return this.mapObject.delete(e),r}getKeys(){return Array.from(this.mapObject.keys())}values(){return Array.from(this.mapObject.values())}entries(){return Array.from(this.mapObject.entries())}clean(){this.mapObject.clear()}concat(e){let r=new t;for(let n of this.getKeys())r.addToMap(n,this.getByKey(n));for(let n of e.getKeys())r.addToMap(n,e.getByKey(n),{force:!0});return r}addAllFromOther(e){for(let r of e.getKeys())this.addToMap(r,e.getByKey(r),{force:!0})}async find(e){for(let r of this.getKeys()){let n=this.getByKey(r);if(await e(n))return n}}[Symbol.iterator](){return this.mapObject.entries()}};var RS=o((t="uni")=>`${t}xxxxxxxxxxx`.replace(/[xy]/g,e=>{let r=Math.random()*16|0;return(e==="x"?r:r&3|8).toString(16)}),"uni"),bn=class t{static{o(this,"ObjectMap")}fastMap=new Wi;reverseMap=new Map;eventSubject=new Ne.rxjs.Subject;constructor(){}get length(){return this.fastMap.size}addMappedUnique(e,r){this.fastMap.addToMap(e,r),this.reverseMap.set(r,e)}getMappedUnique(e){return this.fastMap.getByKey(e)}removeMappedUnique(e){let r=this.fastMap.removeFromMap(e);return r!==void 0&&(this.reverseMap.delete(r),this.eventSubject.next({operation:"remove",payload:r})),r}add(e){let r=this.reverseMap.get(e);if(r!==void 0)return r;let n=RS("key");return this.addMappedUnique(n,e),this.eventSubject.next({operation:"add",payload:e}),n}addArray(e){for(let r of e)this.add(r)}checkForObject(e){return this.reverseMap.has(e)}getKeyForObject(e){return this.reverseMap.get(e)??null}async find(e){return this.fastMap.find(e)}findSync(e){for(let r of this.fastMap.getKeys())if(e(this.fastMap.getByKey(r)))return this.getMappedUnique(r)}async findOneAndRemove(e){let r=await this.find(e);return r&&this.remove(r),r}findOneAndRemoveSync(e){let r=this.findSync(e);return r&&this.remove(r),r}async forEach(e){for(let r of this.fastMap.getKeys())await e(this.fastMap.getByKey(r))}getOneAndRemove(){let e=this.fastMap.getKeys();if(e.length===0)return null;{let r=e[0],n=this.fastMap.removeFromMap(r);return this.reverseMap.delete(n),this.eventSubject.next({operation:"remove",payload:n}),n}}getArray(){return this.fastMap.values()}isEmpty(){return this.fastMap.size===0}remove(e){let r=this.reverseMap.get(e);if(r!==void 0){let n=this.fastMap.removeFromMap(r);return this.reverseMap.delete(n),this.eventSubject.next({operation:"remove",payload:n}),n}return null}wipe(){let e=this.fastMap.getKeys();for(let r of e){let n=this.fastMap.removeFromMap(r);this.reverseMap.delete(n),this.eventSubject.next({operation:"remove",payload:n})}}concat(e){let r=new t;r.fastMap.addAllFromOther(this.fastMap),r.fastMap.addAllFromOther(e.fastMap);for(let n of r.fastMap.getKeys())r.reverseMap.set(r.fastMap.getByKey(n),n);return r}addAllFromOther(e){this.fastMap.addAllFromOther(e.fastMap);for(let r of e.fastMap.getKeys())this.reverseMap.set(e.fastMap.getByKey(r),r)}map(e){return this.getArray().map(e)}filter(e){return this.getArray().filter(e)}reduce(e,r){return this.getArray().reduce(e,r)}[Symbol.iterator](){return this.getArray()[Symbol.iterator]()}destroy(){this.wipe(),this.reverseMap.clear(),this.eventSubject.complete()}};var Ya=class{static{o(this,"Interest")}options;interestMapRef;originalInterest;comparisonFunc;destructionTimer=new zi.Timer(1e4);isFullfilled=!1;isDestroyed=!1;fullfillmentStore=[];markLostTimeout=null;get comparisonString(){return this.comparisonFunc(this.originalInterest)}interestDeferred=new ie.Deferred;interestFullfilled=this.interestDeferred.promise;fullfillInterest(e){this.isFullfilled=!0,this.fullfillmentStore=[],this.interestDeferred.resolve(e),this.destroy()}constructor(e,r,n,i){this.interestMapRef=e,this.originalInterest=r,this.comparisonFunc=n,this.options=i,this.destructionTimer.completed.then(()=>{this.isDestroyed||this.destroy()}),this.options?.markLostAfterDefault&&(this.markLostTimeout=new Le.Timeout(this.options.markLostAfterDefault),this.markLostTimeout.promise.then(()=>{this.isDestroyed||this.markLost()}))}destroy(){this.isDestroyed||(this.isDestroyed=!0,this.destructionTimer.reset(),this.markLostTimeout&&(this.markLostTimeout.cancel(),this.markLostTimeout=null),this.fullfillmentStore=[],this.interestMapRef.removeInterest(this),!this.isFullfilled&&this.options?.defaultFullfillment&&(this.isFullfilled=!0,this.interestDeferred.resolve(this.options.defaultFullfillment)))}markLost(){this.destructionTimer.start()}renew(){this.destructionTimer.reset()}};var dd=class{static{o(this,"InterestMap")}options;interestObjectMap=new bn;interestsByComparisonString=new Map;comparisonStringsByInterest=new WeakMap;comparisonFunc;constructor(e,r={}){this.comparisonFunc=e,this.options=r}async addInterest(e,r){let n=this.comparisonFunc(e),i,s=this.interestsByComparisonString.get(n);return s?(i=s,i.renew()):(i=new Ya(this,e,this.comparisonFunc,{markLostAfterDefault:this.options.markLostAfterDefault,defaultFullfillment:r}),this.interestObjectMap.add(i),this.comparisonStringsByInterest.set(i,n),this.interestsByComparisonString.set(n,i)),this.interestObservable.push(i),i}interestObservable=new Ne.ObservableIntake;removeInterest(e){if(!this.comparisonStringsByInterest.has(e))return;let r=this.comparisonStringsByInterest.get(e);this.interestObjectMap.remove(e),this.comparisonStringsByInterest.delete(e),this.interestsByComparisonString.get(r)===e&&this.interestsByComparisonString.delete(r)}checkInterest(e){let r=this.comparisonFunc(e);return this.checkInterestByString(r)}checkInterestByString(e){return this.interestsByComparisonString.has(e)}informLostInterest(e){let r=this.findInterest(e);r&&r.markLost()}findInterest(e){let r=this.comparisonFunc(e);return this.interestsByComparisonString.get(r)??null}destroy(){let e=this.interestObjectMap.getArray();for(let r of e)r.destroy();this.interestObjectMap.wipe(),this.interestsByComparisonString.clear(),this.interestObservable.signalComplete()}};var gd=class{static{o(this,"LimitedArray")}array=[];arrayLimit;constructor(e){this.arrayLimit=e}get length(){return this.array.length}addOne(e){this.array.unshift(e),this.array.length>this.arrayLimit&&(this.array.length=this.arrayLimit)}addMany(e){for(let r of e)this.addOne(r)}setLimit(e){this.arrayLimit=e,this.array.length>this.arrayLimit&&(this.array.length=this.arrayLimit)}getAverage(){if(this.array.length===0)return 0;if(typeof this.array[0]=="number"){let e=0;for(let r of this.array)e=e+r;return e/this.array.length}else return null}remove(e){let r=this.array.indexOf(e);return r!==-1?(this.array.splice(r,1),!0):!1}clear(){this.array.length=0}getArray(){return[...this.array]}[Symbol.iterator](){return this.array[Symbol.iterator]()}};var yd=class{static{o(this,"LoopTracker")}referenceObjectMap=new bn;constructor(){}checkAndTrack(e){return this.referenceObjectMap.checkForObject(e)?!1:(this.referenceObjectMap.add(e),!0)}reset(){this.referenceObjectMap.wipe()}destroy(){this.referenceObjectMap.destroy()}};var Va=class{static{o(this,"Stringmap")}_stringArray=[];_triggerUntilTrueFunctionArray=[];constructor(){}addString(e){this._stringArray.push(e),this.notifyTrigger()}addStringArray(e){for(let r of e)this.addString(r)}removeString(e){this._stringArray=this._stringArray.filter(r=>r!==e),this.notifyTrigger()}wipe(){this._stringArray=[],this.notifyTrigger()}checkString(e){return this._stringArray.indexOf(e)!==-1}checkMinimatch(e){let r=new Sa.SmartMatch(e),n=!1;for(let i of this._stringArray)r.match(i)&&(n=!0);return n}checkIsEmpty(){return this._stringArray.length===0}getStringArray(){let e=[];for(let r of this._stringArray)e.push(r);return e}registerUntilTrue(e,r){let n=ie.defer();return this._triggerUntilTrueFunctionArray.push(()=>{let i=e(this.getStringArray());return i===!0&&(r&&r(),n.resolve()),i}),this.notifyTrigger(),n.promise}notifyTrigger(){let e=this._triggerUntilTrueFunctionArray.filter(r=>!r());this._triggerUntilTrueFunctionArray=e}destroy(){this._stringArray=[],this._triggerUntilTrueFunctionArray=[]}};var Ka=class{static{o(this,"TimedAggregtor")}options;storageArray=[];isStopped=!1;constructor(e){this.options=e}aggregationTimer;checkAggregationStatus(){if(this.isStopped)return;let e=o(()=>{this.aggregationTimer=new zi.Timer(this.options.aggregationIntervalInMillis),this.aggregationTimer.completed.then(()=>{if(this.isStopped){this.aggregationTimer=null;return}let r=this.storageArray;if(r.length===0){this.aggregationTimer=null;return}this.storageArray=[],e(),this.options.functionForAggregation(r)}),this.aggregationTimer.start()},"addAggregationTimer");this.aggregationTimer||e()}add(e){this.isStopped||(this.storageArray.push(e),this.checkAggregationStatus())}stop(e=!1){if(this.isStopped=!0,this.aggregationTimer&&(this.aggregationTimer.reset(),this.aggregationTimer=null),e&&this.storageArray.length>0){let r=this.storageArray;this.storageArray=[],this.options.functionForAggregation(r)}else this.storageArray=[]}restart(){this.isStopped=!1}};var xd=class{static{o(this,"Tree")}symbolTree;constructor(){this.symbolTree=new Uf.default}initialize(e){return this.symbolTree.initialize(e)}hasChildren(e){return this.symbolTree.hasChildren(e)}firstChild(e){return this.symbolTree.firstChild(e)}lastChild(e){return this.symbolTree.lastChild(e)}previousSibling(e){return this.symbolTree.previousSibling(e)}nextSibling(e){return this.symbolTree.nextSibling(e)}parent(e){return this.symbolTree.parent(e)}lastInclusiveDescendant(e){return this.symbolTree.lastInclusiveDescendant(e)}preceding(e,r){return this.symbolTree.preceding(e,r)}following(e,r){return this.symbolTree.following(e,r)}childrenToArray(e,r){return this.symbolTree.childrenToArray(e,r)}ancestorsToArray(e,r){return this.symbolTree.ancestorsToArray(e,r)}treeToArray(e,r){return this.symbolTree.treeToArray(e,r)}childrenIterator(e,r){return this.symbolTree.childrenIterator(e,r)}previousSiblingsIterator(e){return this.symbolTree.previousSiblingsIterator(e)}nextSiblingsIterator(e){return this.symbolTree.nextSiblingsIterator(e)}ancestorsIterator(e){return this.symbolTree.ancestorsIterator(e)}treeIterator(e,r){return this.symbolTree.treeIterator(e,r)}index(e){return this.symbolTree.index(e)}childrenCount(e){return this.symbolTree.childrenCount(e)}compareTreePosition(e,r){return this.symbolTree.compareTreePosition(e,r)}remove(e){return this.symbolTree.remove(e)}insertBefore(e,r){return this.symbolTree.insertBefore(e,r)}insertAfter(e,r){return this.symbolTree.insertAfter(e,r)}prependChild(e,r){return this.symbolTree.prependChild(e,r)}appendChild(e,r){return this.symbolTree.appendChild(e,r)}toJsonWithHierachy(e){let r=o(n=>{let i=[];if(this.hasChildren(n)){let s=this.childrenToArray(n,{});for(let a of s)i.push(r(a))}return{data:n,children:i}},"buildNode");return r(e)}fromJsonWithHierachy(e,r){let n=o((i,s)=>{let a=r?r(i.data):i.data;this.initialize(a),s&&this.appendChild(s,a);for(let l of i.children)n(l,a);return a},"buildTree");return n(e)}};var Hi={};se(Hi,{base64ToUint8Array:()=>eL,ensurePureUint8Array:()=>nL,isBufferLike:()=>rL,isUint8Array:()=>tL,uInt8ArrayExtras:()=>XP,uInt8ArrayToBase64:()=>ZP});var ti={};se(ti,{areUint8ArraysEqual:()=>BP,assertUint8Array:()=>ei,assertUint8ArrayOrArrayBuffer:()=>jS,base64ToString:()=>qP,base64ToUint8Array:()=>US,compareUint8Arrays:()=>jP,concatUint8Arrays:()=>$P,getUintBE:()=>GP,hexToUint8Array:()=>KP,includes:()=>JP,indexOf:()=>qS,isUint8Array:()=>bd,stringToBase64:()=>UP,stringToUint8Array:()=>WS,toUint8Array:()=>FP,uint8ArrayToBase64:()=>HS,uint8ArrayToHex:()=>VP,uint8ArrayToString:()=>zS});var PP=Object.prototype.toString,LP="[object Uint8Array]",_P="[object ArrayBuffer]";function AS(t,e,r){return t?t.constructor===e?!0:PP.call(t)===r:!1}o(AS,"isType");function bd(t){return AS(t,Uint8Array,LP)}o(bd,"isUint8Array");function RP(t){return AS(t,ArrayBuffer,_P)}o(RP,"isArrayBuffer");function AP(t){return bd(t)||RP(t)}o(AP,"isUint8ArrayOrArrayBuffer");function ei(t){if(!bd(t))throw new TypeError(`Expected \`Uint8Array\`, got \`${typeof t}\``)}o(ei,"assertUint8Array");function jS(t){if(!AP(t))throw new TypeError(`Expected \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof t}\``)}o(jS,"assertUint8ArrayOrArrayBuffer");function FP(t){if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new TypeError(`Unsupported value, got \`${typeof t}\`.`)}o(FP,"toUint8Array");function $P(t,e){if(t.length===0)return new Uint8Array(0);e??=t.reduce((i,s)=>i+s.length,0);let r=new Uint8Array(e),n=0;for(let i of t)ei(i),r.set(i,n),n+=i.length;return r}o($P,"concatUint8Arrays");function BP(t,e){if(ei(t),ei(e),t===e)return!0;if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}o(BP,"areUint8ArraysEqual");function jP(t,e){ei(t),ei(e);let r=Math.min(t.length,e.length);for(let n=0;n<r;n++){let i=t[n]-e[n];if(i!==0)return Math.sign(i)}return Math.sign(t.length-e.length)}o(jP,"compareUint8Arrays");var FS={utf8:new globalThis.TextDecoder("utf8")};function zS(t,e="utf8"){return jS(t),FS[e]??=new globalThis.TextDecoder(e),FS[e].decode(t)}o(zS,"uint8ArrayToString");function Ga(t){if(typeof t!="string")throw new TypeError(`Expected \`string\`, got \`${typeof t}\``)}o(Ga,"assertString");var zP=new globalThis.TextEncoder;function WS(t){return Ga(t),zP.encode(t)}o(WS,"stringToUint8Array");function WP(t){return t.replaceAll("+","-").replaceAll("/","_").replace(/=+$/,"")}o(WP,"base64ToBase64Url");function HP(t){let e=t.replaceAll("-","+").replaceAll("_","/"),r=(4-e.length%4)%4;return e+"=".repeat(r)}o(HP,"base64UrlToBase64");var $S=65535;function HS(t,{urlSafe:e=!1}={}){ei(t);let r="";for(let n=0;n<t.length;n+=$S){let i=t.subarray(n,n+$S);r+=globalThis.btoa(String.fromCodePoint.apply(void 0,i))}return e?WP(r):r}o(HS,"uint8ArrayToBase64");function US(t){return Ga(t),Uint8Array.from(globalThis.atob(HP(t)),e=>e.codePointAt(0))}o(US,"base64ToUint8Array");function UP(t,{urlSafe:e=!1}={}){return Ga(t),HS(WS(t),{urlSafe:e})}o(UP,"stringToBase64");function qP(t){return Ga(t),zS(US(t))}o(qP,"base64ToString");var YP=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function VP(t){ei(t);let e="";for(let r=0;r<t.length;r++)e+=YP[t[r]];return e}o(VP,"uint8ArrayToHex");var BS={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,b:11,c:12,d:13,e:14,f:15,A:10,B:11,C:12,D:13,E:14,F:15};function KP(t){if(Ga(t),t.length%2!==0)throw new Error("Invalid Hex string length.");let e=t.length/2,r=new Uint8Array(e);for(let n=0;n<e;n++){let i=BS[t[n*2]],s=BS[t[n*2+1]];if(i===void 0||s===void 0)throw new Error(`Invalid Hex character encountered at position ${n*2}`);r[n]=i<<4|s}return r}o(KP,"hexToUint8Array");function GP(t){let{byteLength:e}=t;if(e===6)return t.getUint16(0)*2**32+t.getUint32(2);if(e===5)return t.getUint8(0)*2**32+t.getUint32(1);if(e===4)return t.getUint32(0);if(e===3)return t.getUint8(0)*2**16+t.getUint16(1);if(e===2)return t.getUint16(0);if(e===1)return t.getUint8(0)}o(GP,"getUintBE");function qS(t,e){let r=t.length,n=e.length;if(n===0||n>r)return-1;let i=r-n;for(let s=0;s<=i;s++){let a=!0;for(let l=0;l<n;l++)if(t[s+l]!==e[l]){a=!1;break}if(a)return s}return-1}o(qS,"indexOf");function JP(t,e){return qS(t,e)!==-1}o(JP,"includes");var XP=ti;function ZP(t){return ti.uint8ArrayToBase64(t)}o(ZP,"uInt8ArrayToBase64");function eL(t){return ti.base64ToUint8Array(t)}o(eL,"base64ToUint8Array");var tL=o(t=>ti.isUint8Array(t),"isUint8Array");function rL(t){return t&&typeof t.byteLength=="number"?!0:typeof Buffer<"u"&&Buffer.isBuffer?Buffer.isBuffer(t):!1}o(rL,"isBufferLike");function nL(t){let e=new Uint8Array(t.length);return e.set(t),e}o(nL,"ensurePureUint8Array");var Za={};se(Za,{Guard:()=>Ja,GuardError:()=>Qa,GuardSet:()=>Xa,passGuardsOrReject:()=>iL});var Ja=class{static{o(this,"Guard")}constructor(e,r){this.guardFunction=e,this.options=r||{}}async exec(e){return await this.guardFunction(e)}async getFailedHint(e){return await this.exec(e)?null:this.options.failedHint||null}};var Qa=class extends Error{static{o(this,"GuardError")}constructor(e){super(e),this.name="GuardError"}};var Xa=class extends Ja{static{o(this,"GuardSet")}constructor(e=[]){super(async r=>this.allGuardsPass(r)),this.guards=e}async execAllWithData(e,r={mode:"parallel",stopOnFail:!1}){let n=[];for(let s of this.guards){let a=s.exec(e);if(r.mode==="serial"&&await a,n.push(a),r.stopOnFail&&!await a)return await Promise.all(n)}return await Promise.all(n)}async allGuardsPass(e,r={mode:"parallel",stopOnFail:!1}){return(await this.execAllWithData(e,r)).every(i=>i)}async anyGuardsPass(e){return(await this.execAllWithData(e,{mode:"parallel",stopOnFail:!1})).some(n=>n)}async getFailedHint(e){for(let r of this.guards){let n=await r.getFailedHint(e);if(n)return n}return null}};var iL=o(async(t,e)=>{let r=new Xa(e);if(!await r.allGuardsPass(t)){let i=await r.getFailedHint(t);throw new Qa(`Guards failed:
4
4
  ${i}
5
- `)}},"passGuardsOrReject");var ni={};se(ni,{CacheManager:()=>Ss,CacheStore:()=>xs,InterceptorManager:()=>ds,RequestDeduplicator:()=>ks,RetryManager:()=>vs,WebrequestClient:()=>Yi,createConditionalHeaders:()=>np,defaultCacheMaxEntries:()=>el,extractCacheMetadata:()=>rn,headersToObject:()=>ip,isFresh:()=>rp,isWebrequestTimeoutError:()=>tl,objectToHeaders:()=>lk,requiresRevalidation:()=>bs,webrequest:()=>lt});var ds=class{static{o(this,"InterceptorManager")}constructor(){this.requestInterceptors=[],this.responseInterceptors=[],this.errorInterceptors=[]}addRequestInterceptor(e){this.requestInterceptors.push(e)}addResponseInterceptor(e){this.responseInterceptors.push(e)}addErrorInterceptor(e){this.errorInterceptors.push(e)}removeRequestInterceptor(e){let r=this.requestInterceptors.indexOf(e);r>-1&&this.requestInterceptors.splice(r,1)}removeResponseInterceptor(e){let r=this.responseInterceptors.indexOf(e);r>-1&&this.responseInterceptors.splice(r,1)}removeErrorInterceptor(e){let r=this.errorInterceptors.indexOf(e);r>-1&&this.errorInterceptors.splice(r,1)}clearAll(){this.requestInterceptors=[],this.responseInterceptors=[],this.errorInterceptors=[]}async processRequest(e){let r=e;for(let n of this.requestInterceptors)try{r=await n(r)}catch(i){throw await this.processError(i instanceof Error?i:new Error(String(i)))}return r}async processResponse(e){let r=e;for(let n of this.responseInterceptors)try{r=await n(r)}catch(i){throw await this.processError(i instanceof Error?i:new Error(String(i)))}return r}async processError(e){let r=e;for(let n of this.errorInterceptors)try{r=await n(r)}catch(i){r=i instanceof Error?i:new Error(String(i))}return r}getInterceptorCounts(){return{request:this.requestInterceptors.length,response:this.responseInterceptors.length,error:this.errorInterceptors.length}}};var Tr={};se(Tr,{Smartenv:()=>dd});var dd=class{static{o(this,"Smartenv")}constructor(){this.loadedScripts=[]}async getEnvAwareModule(e){if(this.isNode)return await this.getSafeNodeModule(e.nodeModuleName);if(this.isBrowser)return await this.getSafeWebModule(e.webUrlArg,e.getFunction);console.error("platform for loading not supported by smartenv")}async getSafeNodeModule(e,r){if(!this.isNode&&!this.isDeno&&!this.isBun){console.error(`You tried to load a server module in a wrong context: ${e}. This does not throw.`);return}let n=await new Function(`return import('${e}')`)();return r&&await r(n),n}async getSafeWebModule(e,r){if(!this.isBrowser){console.error("You tried to load a web module in a wrong context");return}if(this.loadedScripts.includes(e))return r();this.loadedScripts.push(e);let n=te.defer(),i=globalThis;if(i.importScripts)i.importScripts(e),n.resolve();else{let s=document.createElement("script");s.onload=()=>{n.resolve()},s.src=e,document.head.appendChild(s)}return await n.promise,r()}get runtimeEnv(){let e=globalThis;return typeof e.Deno<"u"&&typeof e.Deno.version<"u"?"deno":typeof e.Bun<"u"&&typeof e.Bun.version<"u"?"bun":typeof globalThis.process<"u"&&typeof globalThis.process?.versions?.node<"u"?"node":(typeof globalThis.window<"u"&&typeof globalThis.document<"u","browser")}get isBrowser(){return this.runtimeEnv==="browser"}get isNode(){return this.runtimeEnv==="node"}get isDeno(){return this.runtimeEnv==="deno"}get isBun(){return this.runtimeEnv==="bun"}get userAgent(){return this.isBrowser?navigator.userAgent:"undefined"}get nodeVersion(){return this.isNode?process.version:"undefined"}get denoVersion(){return this.isDeno?globalThis.Deno?.version?.deno??"undefined":"undefined"}get bunVersion(){return this.isBun?globalThis.Bun?.version??"undefined":"undefined"}async getSafeModuleFor(e,r,n){let i;if(Array.isArray(e)?i=e.flatMap(s=>s==="server"?["node","deno","bun"]:[s]):e==="server"?i=["node","deno","bun"]:i=[e],!i.includes(this.runtimeEnv)){console.warn(`Module "${r}" requested for runtime(s) [${i.join(", ")}] but current runtime is "${this.runtimeEnv}". Skipping load.`);return}if(this.isNode||this.isDeno||this.isBun)return await this.getSafeNodeModule(r);if(this.isBrowser){if(!n){console.error(`Browser module load requires getFunction parameter for "${r}"`);return}return await this.getSafeWebModule(r,n)}}get isCI(){return this.isNode?!!process.env.CI:!1}async isMacAsync(){return this.isNode||this.isDeno||this.isBun?(await this.getSafeNodeModule(this.isDeno?"node:os":"os"))?.platform()==="darwin":!1}async isWindowsAsync(){return this.isNode||this.isDeno||this.isBun?(await this.getSafeNodeModule(this.isDeno?"node:os":"os"))?.platform()==="win32":!1}async isLinuxAsync(){return this.isNode||this.isDeno||this.isBun?(await this.getSafeNodeModule(this.isDeno?"node:os":"os"))?.platform()==="linux":!1}async printEnv(){this.isNode?(console.log("running on NODE"),console.log("node version is "+this.nodeVersion)):this.isDeno?(console.log("running on DENO"),console.log("deno version is "+this.denoVersion)):this.isBun?(console.log("running on BUN"),console.log("bun version is "+this.bunVersion)):(console.log("running on BROWSER"),console.log("browser is "+this.userAgent))}};var tt={};se(tt,{Smartjson:()=>Td,deepEqualJsonLStrings:()=>E_,deepEqualObjects:()=>rk,foldDec:()=>T_,parse:()=>Xf,parseBase64:()=>k_,parseJsonL:()=>kd,stableOneWayStringify:()=>w_,stringify:()=>qi,stringifyBase64:()=>v_,stringifyJsonL:()=>b_,stringifyPretty:()=>S_});var tn={};se(tn,{Base64:()=>Vf,Domain:()=>Gf,GitRepo:()=>Jf,base64:()=>gs,create:()=>Wf,docker:()=>Hf,encoding:()=>Uf,indent:()=>qf,normalize:()=>Yf,type:()=>Kf});var Wf={};se(Wf,{createCryptoRandomString:()=>e_,createRandomString:()=>ZP});var gd=zr(mm(),1);var QP=o((t,e)=>{if(typeof globalThis<"u"&&globalThis.crypto&&globalThis.crypto.getRandomValues){let r=e-t,n=new Uint32Array(1);return globalThis.crypto.getRandomValues(n),t+n[0]%r}else return Math.floor(Math.random()*(e-t))+t},"getRandomInt"),XP=o((t,e,r)=>{let n={A:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",a:"abcdefghijklmnopqrstuvwxyz",0:"0123456789","!":"!@#$%^&*()_+-=[]{}|;:,.<>?","*":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()_+-=[]{}|;:,.<>?"},i=t;e&&e>t.length?i=t.repeat(Math.ceil(e/t.length)).slice(0,e):e&&(i=t.slice(0,e));let s="";for(let a of i)if(n[a]){let l=n[a],c=QP(0,l.length);s+=l[c]}else s+=a;return s},"customRandomatic"),ZP=o((t,e,r)=>XP(t,e,r),"createRandomString"),e_=o(()=>gd.uni(),"createCryptoRandomString");var Hf={};se(Hf,{makeEnvObject:()=>t_});var t_=o(function(t){let e={},r=/(.*)=(.*)/;if(typeof t<"u")for(let n of t){let i=r.exec(n);i&&(e[i[1]]=i[2])}return e},"makeEnvObject");var Uf={};se(Uf,{decodeText:()=>i_,decodeUtf8OrWindows1252:()=>o_,decodeWindows1252:()=>yd,encodeWindows1252:()=>n_,encodingOfLabel:()=>Hv,isValidUtf8:()=>Wv,windows1252ByteOf:()=>zv});var Bv=[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,381,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,382,376],r_=new Map(Bv.map((t,e)=>[t,128+e])),jv=4096,yd=o(t=>{let e="";for(let r=0;r<t.length;r+=jv){let n=t.subarray(r,r+jv);e+=String.fromCharCode(...Array.from(n,i=>i>=128&&i<=159?Bv[i-128]:i))}return e},"decodeWindows1252"),zv=o(t=>t<=127||t>=160&&t<=255?t:r_.get(t),"windows1252ByteOf"),n_=o(t=>{let e=[],r=[],n=0;for(let i of t){let s=zv(i.codePointAt(0)??0);s===void 0?(e.push(63),r.push({offset:n,character:i})):e.push(s),n+=i.length}return{bytes:Uint8Array.from(e),replaced:r}},"encodeWindows1252"),Wv=o(t=>{try{return new TextDecoder("utf-8",{fatal:!0}).decode(t),!0}catch{return!1}},"isValidUtf8"),Hv=o(t=>{try{return new TextDecoder(t).encoding}catch{return}},"encodingOfLabel"),i_=o((t,e,r={})=>{let n=Hv(e);if(n!==void 0)return n==="windows-1252"?yd(t):new TextDecoder(n,{fatal:r.fatal??!1}).decode(t)},"decodeText"),o_=o(t=>Wv(t)?{text:new TextDecoder("utf-8").decode(t),encoding:"utf-8"}:{text:yd(t),encoding:"windows-1252"},"decodeUtf8OrWindows1252");var qf={};se(qf,{indent:()=>a_,indentWithPrefix:()=>l_,normalize:()=>c_});var xd=o(t=>{let e=t.split(`
6
- `);return s_(e)},"splitStringAtLineBreak"),bd=o(t=>{let e="";for(let r of t)e=e+r+`
7
- `;return e},"joinStringWithLineBreaks"),s_=o(t=>{let e=/^[\s]*$/;return e.test(t[0])&&t.shift(),e.test(t[t.length-1])&&t.pop(),t},"cleanStringArray"),a_=o((t,e)=>{let r=xd(t);for(let i of r)i=" ".repeat(e)+i;return bd(r)},"indent"),l_=o((t,e)=>{let r,n=xd(t),i=[];for(let s of n)i.push(e+s);return r=bd(i),r},"indentWithPrefix"),c_=o(t=>{let e,r=xd(t),n,i=/^(\s*)/,s=/^(\s*)$/;for(let c of r){let u=i.exec(c),f=u?u[1]:"";(typeof n>"u"||f.length<n)&&!s.test(c)&&(n=f.length)}let a=[],l=n||0;for(let c of r)a.push(c.substr(l));return e=bd(a),e},"normalize");var Yf={};se(Yf,{replaceAll:()=>Uv,standard:()=>f_});var Uv=o((t,e,r)=>t.replace(new RegExp(e,"g"),r),"replaceAll"),u_=o(t=>{let e=t.split(`
5
+ `)}},"passGuardsOrReject");var Ts={};se(Ts,{CacheManager:()=>vs,CacheStore:()=>xs,InterceptorManager:()=>ms,RequestDeduplicator:()=>ks,RetryManager:()=>Ss,WebrequestClient:()=>qi,createConditionalHeaders:()=>lp,defaultCacheMaxEntries:()=>nl,extractCacheMetadata:()=>nn,headersToObject:()=>cp,isFresh:()=>ap,isWebrequestTimeoutError:()=>il,objectToHeaders:()=>gk,requiresRevalidation:()=>bs,webrequest:()=>lt});var ms=class{static{o(this,"InterceptorManager")}constructor(){this.requestInterceptors=[],this.responseInterceptors=[],this.errorInterceptors=[]}addRequestInterceptor(e){this.requestInterceptors.push(e)}addResponseInterceptor(e){this.responseInterceptors.push(e)}addErrorInterceptor(e){this.errorInterceptors.push(e)}removeRequestInterceptor(e){let r=this.requestInterceptors.indexOf(e);r>-1&&this.requestInterceptors.splice(r,1)}removeResponseInterceptor(e){let r=this.responseInterceptors.indexOf(e);r>-1&&this.responseInterceptors.splice(r,1)}removeErrorInterceptor(e){let r=this.errorInterceptors.indexOf(e);r>-1&&this.errorInterceptors.splice(r,1)}clearAll(){this.requestInterceptors=[],this.responseInterceptors=[],this.errorInterceptors=[]}async processRequest(e){let r=e;for(let n of this.requestInterceptors)try{r=await n(r)}catch(i){throw await this.processError(i instanceof Error?i:new Error(String(i)))}return r}async processResponse(e){let r=e;for(let n of this.responseInterceptors)try{r=await n(r)}catch(i){throw await this.processError(i instanceof Error?i:new Error(String(i)))}return r}async processError(e){let r=e;for(let n of this.errorInterceptors)try{r=await n(r)}catch(i){r=i instanceof Error?i:new Error(String(i))}return r}getInterceptorCounts(){return{request:this.requestInterceptors.length,response:this.responseInterceptors.length,error:this.errorInterceptors.length}}};var Tr={};se(Tr,{Smartenv:()=>wd});var el={};se(el,{CumulativeDeferred:()=>Yf,Deferred:()=>qf,cumulativeDefer:()=>oL,defer:()=>ds,fromCallback:()=>fL,getFirstTrueOrFalse:()=>uL,map:()=>lL,rejectedPromise:()=>aL,resolvedPromise:()=>sL,timeoutAndContinue:()=>cL,timeoutWrap:()=>YS});var qf=class{static{o(this,"Deferred")}claim(){if(this.claimed)throw new Error("Deferred already claimed");this.claimed=!0}get duration(){return this.stoppedAt?this.stoppedAt-this.startedAt:Date.now()-this.startedAt}constructor(){this.claimed=!1,this.promise=new Promise((e,r)=>{this.resolve=n=>{this.status="fulfilled",this.stoppedAt=Date.now(),e(n)},this.reject=n=>{this.status="rejected",this.stoppedAt=Date.now(),r(n)},this.startedAt=Date.now(),this.status="pending"})}},ds=o(()=>new qf,"defer");var Yf=class{static{o(this,"CumulativeDeferred")}constructor(){this.accumulatedPromises=[],this.deferred=ds(),this.promise=this.deferred.promise,setTimeout(async()=>{for(;this.accumulatedPromises.length>0;)await this.accumulatedPromises.shift();this.deferred.resolve()},0)}subDefer(){let e=ds();return this.addPromise(e.promise),e}addPromise(e){this.accumulatedPromises.push(e)}},oL=o(()=>new Yf,"cumulativeDefer");function sL(t){return Promise.resolve(t)}o(sL,"resolvedPromise");var aL=o(t=>Promise.reject(t),"rejectedPromise"),lL=o(async(t,e)=>Promise.all(t.map(e)),"map"),YS=o(async(t,e,r=!0)=>new Promise((n,i)=>{let s,a=o(()=>{s!==void 0&&(clearTimeout(s),s=void 0)},"releaseTimeout");s=setTimeout(()=>{s=void 0,r?i(new Error("timeout")):n(null)},e),t.then(l=>{a(),n(l)},l=>{a(),i(l)})}),"timeoutWrap"),cL=o(async(t,e=6e4)=>YS(t,e,!1),"timeoutAndContinue"),uL=o(async t=>{let e=ds();for(let r of t)r.then(n=>{n===!0&&e.resolve(!0)});return Promise.all(t).then(()=>{e.resolve(!1)}),e.promise},"getFirstTrueOrFalse"),fL=o(t=>new Promise((e,r)=>{t((n,i)=>{n?r(n):e(i)})}),"fromCallback");var wd=class{static{o(this,"Smartenv")}constructor(){this.loadedScripts=[]}async getEnvAwareModule(e){if(this.isNode)return await this.getSafeNodeModule(e.nodeModuleName);if(this.isBrowser)return await this.getSafeWebModule(e.webUrlArg,e.getFunction);console.error("platform for loading not supported by smartenv")}async getSafeNodeModule(e,r){if(!this.isNode&&!this.isDeno&&!this.isBun){console.error(`You tried to load a server module in a wrong context: ${e}. This does not throw.`);return}let n=await new Function(`return import('${e}')`)();return r&&await r(n),n}async getSafeWebModule(e,r){if(!this.isBrowser){console.error("You tried to load a web module in a wrong context");return}if(this.loadedScripts.includes(e))return r();this.loadedScripts.push(e);let n=el.defer(),i=globalThis;if(i.importScripts)i.importScripts(e),n.resolve();else{let s=document.createElement("script");s.onload=()=>{n.resolve()},s.src=e,document.head.appendChild(s)}return await n.promise,r()}get runtimeEnv(){let e=globalThis;return typeof e.Deno<"u"&&typeof e.Deno.version<"u"?"deno":typeof e.Bun<"u"&&typeof e.Bun.version<"u"?"bun":typeof globalThis.process<"u"&&typeof globalThis.process?.versions?.node<"u"?"node":(typeof globalThis.window<"u"&&typeof globalThis.document<"u","browser")}get isBrowser(){return this.runtimeEnv==="browser"}get isNode(){return this.runtimeEnv==="node"}get isDeno(){return this.runtimeEnv==="deno"}get isBun(){return this.runtimeEnv==="bun"}get userAgent(){return this.isBrowser?navigator.userAgent:"undefined"}get nodeVersion(){return this.isNode?process.version:"undefined"}get denoVersion(){return this.isDeno?globalThis.Deno?.version?.deno??"undefined":"undefined"}get bunVersion(){return this.isBun?globalThis.Bun?.version??"undefined":"undefined"}async getSafeModuleFor(e,r,n){let i;if(Array.isArray(e)?i=e.flatMap(s=>s==="server"?["node","deno","bun"]:[s]):e==="server"?i=["node","deno","bun"]:i=[e],!i.includes(this.runtimeEnv)){console.warn(`Module "${r}" requested for runtime(s) [${i.join(", ")}] but current runtime is "${this.runtimeEnv}". Skipping load.`);return}if(this.isNode||this.isDeno||this.isBun)return await this.getSafeNodeModule(r);if(this.isBrowser){if(!n){console.error(`Browser module load requires getFunction parameter for "${r}"`);return}return await this.getSafeWebModule(r,n)}}get isCI(){return this.isNode?!!process.env.CI:!1}async isMacAsync(){return this.isNode||this.isDeno||this.isBun?(await this.getSafeNodeModule(this.isDeno?"node:os":"os"))?.platform()==="darwin":!1}async isWindowsAsync(){return this.isNode||this.isDeno||this.isBun?(await this.getSafeNodeModule(this.isDeno?"node:os":"os"))?.platform()==="win32":!1}async isLinuxAsync(){return this.isNode||this.isDeno||this.isBun?(await this.getSafeNodeModule(this.isDeno?"node:os":"os"))?.platform()==="linux":!1}async printEnv(){this.isNode?(console.log("running on NODE"),console.log("node version is "+this.nodeVersion)):this.isDeno?(console.log("running on DENO"),console.log("deno version is "+this.denoVersion)):this.isBun?(console.log("running on BUN"),console.log("bun version is "+this.bunVersion)):(console.log("running on BROWSER"),console.log("browser is "+this.userAgent))}};var tt={};se(tt,{Smartjson:()=>Md,deepEqualJsonLStrings:()=>WL,deepEqualObjects:()=>uk,foldDec:()=>zL,parse:()=>np,parseBase64:()=>jL,parseJsonL:()=>Od,stableOneWayStringify:()=>FL,stringify:()=>Ui,stringifyBase64:()=>BL,stringifyJsonL:()=>AL,stringifyPretty:()=>$L});var rn={};se(rn,{Base64:()=>Xf,Domain:()=>ep,GitRepo:()=>tp,base64:()=>gs,create:()=>Vf,docker:()=>Kf,encoding:()=>Gf,indent:()=>Jf,normalize:()=>Qf,type:()=>Zf});var Vf={};se(Vf,{createCryptoRandomString:()=>yL,createRandomString:()=>gL});var vd=zr(bm(),1);var mL=o((t,e)=>{if(typeof globalThis<"u"&&globalThis.crypto&&globalThis.crypto.getRandomValues){let r=e-t,n=new Uint32Array(1);return globalThis.crypto.getRandomValues(n),t+n[0]%r}else return Math.floor(Math.random()*(e-t))+t},"getRandomInt"),dL=o((t,e,r)=>{let n={A:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",a:"abcdefghijklmnopqrstuvwxyz",0:"0123456789","!":"!@#$%^&*()_+-=[]{}|;:,.<>?","*":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()_+-=[]{}|;:,.<>?"},i=t;e&&e>t.length?i=t.repeat(Math.ceil(e/t.length)).slice(0,e):e&&(i=t.slice(0,e));let s="";for(let a of i)if(n[a]){let l=n[a],c=mL(0,l.length);s+=l[c]}else s+=a;return s},"customRandomatic"),gL=o((t,e,r)=>dL(t,e,r),"createRandomString"),yL=o(()=>vd.uni(),"createCryptoRandomString");var Kf={};se(Kf,{makeEnvObject:()=>xL});var xL=o(function(t){let e={},r=/(.*)=(.*)/;if(typeof t<"u")for(let n of t){let i=r.exec(n);i&&(e[i[1]]=i[2])}return e},"makeEnvObject");var Gf={};se(Gf,{decodeText:()=>vL,decodeUtf8OrWindows1252:()=>SL,decodeWindows1252:()=>Sd,encodeWindows1252:()=>wL,encodingOfLabel:()=>QS,isValidUtf8:()=>JS,windows1252ByteOf:()=>GS});var VS=[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,381,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,382,376],bL=new Map(VS.map((t,e)=>[t,128+e])),KS=4096,Sd=o(t=>{let e="";for(let r=0;r<t.length;r+=KS){let n=t.subarray(r,r+KS);e+=String.fromCharCode(...Array.from(n,i=>i>=128&&i<=159?VS[i-128]:i))}return e},"decodeWindows1252"),GS=o(t=>t<=127||t>=160&&t<=255?t:bL.get(t),"windows1252ByteOf"),wL=o(t=>{let e=[],r=[],n=0;for(let i of t){let s=GS(i.codePointAt(0)??0);s===void 0?(e.push(63),r.push({offset:n,character:i})):e.push(s),n+=i.length}return{bytes:Uint8Array.from(e),replaced:r}},"encodeWindows1252"),JS=o(t=>{try{return new TextDecoder("utf-8",{fatal:!0}).decode(t),!0}catch{return!1}},"isValidUtf8"),QS=o(t=>{try{return new TextDecoder(t).encoding}catch{return}},"encodingOfLabel"),vL=o((t,e,r={})=>{let n=QS(e);if(n!==void 0)return n==="windows-1252"?Sd(t):new TextDecoder(n,{fatal:r.fatal??!1}).decode(t)},"decodeText"),SL=o(t=>JS(t)?{text:new TextDecoder("utf-8").decode(t),encoding:"utf-8"}:{text:Sd(t),encoding:"windows-1252"},"decodeUtf8OrWindows1252");var Jf={};se(Jf,{indent:()=>TL,indentWithPrefix:()=>EL,normalize:()=>DL});var kd=o(t=>{let e=t.split(`
6
+ `);return kL(e)},"splitStringAtLineBreak"),Td=o(t=>{let e="";for(let r of t)e=e+r+`
7
+ `;return e},"joinStringWithLineBreaks"),kL=o(t=>{let e=/^[\s]*$/;return e.test(t[0])&&t.shift(),e.test(t[t.length-1])&&t.pop(),t},"cleanStringArray"),TL=o((t,e)=>{let r=kd(t);for(let i of r)i=" ".repeat(e)+i;return Td(r)},"indent"),EL=o((t,e)=>{let r,n=kd(t),i=[];for(let s of n)i.push(e+s);return r=Td(i),r},"indentWithPrefix"),DL=o(t=>{let e,r=kd(t),n,i=/^(\s*)/,s=/^(\s*)$/;for(let c of r){let u=i.exec(c),f=u?u[1]:"";(typeof n>"u"||f.length<n)&&!s.test(c)&&(n=f.length)}let a=[],l=n||0;for(let c of r)a.push(c.substr(l));return e=Td(a),e},"normalize");var Qf={};se(Qf,{replaceAll:()=>XS,standard:()=>OL});var XS=o((t,e,r)=>t.replace(new RegExp(e,"g"),r),"replaceAll"),CL=o(t=>{let e=t.split(`
8
8
  `),r=1/0;for(let n of e)if(n.trim().length>0){let i=n.match(/^(\s*)/);i&&(r=Math.min(r,i[1].length))}return r===1/0||r===0?t:e.map(n=>n.length>=r?n.slice(r):n).join(`
9
- `)},"stripIndent"),f_=o((t,e)=>{let r=t;return(!e||e.stripIndent)&&(r=u_(r)),(!e||e.normalizeNewline)&&(r=r.replace(/\r\n/g,`
10
- `)),(!e||e.replaceTabs)&&(r=Uv(r," /"," ")),(!e||e.stripLeadingTrailingEmptyLines)&&(r=r.replace(/^\s*[\r\n]/gm,"").replace(/\s*[\r\n]$/gm,"")),(!e||e.stripAllEmptyLines)&&(r=r.replace(/^\s*[\r\n]/gm,"")),r},"standard");var Kf={};se(Kf,{isBase64:()=>h_,isUtf8:()=>p_});var wd={encode:o(t=>{if(typeof Buffer<"u")return Buffer.from(t,"utf8").toString("base64");if(typeof btoa<"u"){let e=new TextEncoder().encode(t),r=Array.from(e,n=>String.fromCharCode(n)).join("");return btoa(r)}else{let e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=new TextEncoder().encode(t),n="",i=0;for(;i<r.length;){let s=r[i++],a=i<r.length?r[i++]:0,l=i<r.length?r[i++]:0,c=s<<16|a<<8|l;n+=e.charAt(c>>18&63),n+=e.charAt(c>>12&63),n+=i-2<r.length?e.charAt(c>>6&63):"=",n+=i-1<r.length?e.charAt(c&63):"="}return n}},"encode"),decode:o(t=>{let e=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"=");if(typeof Buffer<"u")return Buffer.from(e,"base64").toString("utf8");if(typeof atob<"u"){let r=atob(e),n=new Uint8Array(r.length);for(let i=0;i<r.length;i++)n[i]=r.charCodeAt(i);return new TextDecoder().decode(n)}else{let r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=[],i=0;for(;i<e.length;){let s=r.indexOf(e.charAt(i++)),a=r.indexOf(e.charAt(i++)),l=r.indexOf(e.charAt(i++)),c=r.indexOf(e.charAt(i++)),u=s<<18|a<<12|l<<6|c;n.push(u>>16&255),l!==64&&n.push(u>>8&255),c!==64&&n.push(u&255)}return new TextDecoder().decode(new Uint8Array(n))}},"decode")},Vf=class{static{o(this,"Base64")}constructor(e,r){switch(r){case"string":this.refString=e;break;case"base64":this.refString=gs.decode(e);break;case"base64uri":this.refString=gs.decode(e)}}get simpleString(){return this.refString}get base64String(){return gs.encode(this.refString)}get base64UriString(){return gs.encodeUri(this.refString)}},gs={encode:o(t=>wd.encode(t),"encode"),encodeUri:o(t=>wd.encode(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,""),"encodeUri"),decode:o(t=>wd.decode(t),"decode"),isBase64:o(t=>/^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)?$/.test(t),"isBase64")};var p_=o(t=>{let r=new TextEncoder().encode(t),n=0;for(;n<r.length;){if(r[n]===9||r[n]===10||r[n]===13||32<=r[n]&&r[n]<=126){n+=1;continue}if(194<=r[n]&&r[n]<=223&&128<=r[n+1]&&r[n+1]<=191){n+=2;continue}if(r[n]===224&&160<=r[n+1]&&r[n+1]<=191&&128<=r[n+2]&&r[n+2]<=191||(225<=r[n]&&r[n]<=236||r[n]===238||r[n]===239)&&128<=r[n+1]&&r[n+1]<=191&&128<=r[n+2]&&r[n+2]<=191||r[n]===237&&128<=r[n+1]&&r[n+1]<=159&&128<=r[n+2]&&r[n+2]<=191){n+=3;continue}if(r[n]===240&&144<=r[n+1]&&r[n+1]<=191&&128<=r[n+2]&&r[n+2]<=191&&128<=r[n+3]&&r[n+3]<=191||241<=r[n]&&r[n]<=243&&128<=r[n+1]&&r[n+1]<=191&&128<=r[n+2]&&r[n+2]<=191&&128<=r[n+3]&&r[n+3]<=191||r[n]===244&&128<=r[n+1]&&r[n+1]<=143&&128<=r[n+2]&&r[n+2]<=191&&128<=r[n+3]&&r[n+3]<=191){n+=4;continue}return!1}return!0},"isUtf8"),h_=o(t=>{let e=/[^A-Z0-9+\/=]/i,r=t.length;if(!r||r%4!==0||e.test(t))return!1;let n=t.indexOf("=");return n===-1||n===r-1||n===r-2&&t[r-1]==="="},"isBase64");var Gf=class{static{o(this,"Domain")}constructor(e){this.protocol=this._protocolRegex(e),this.protocol||(e=`https://${e}`),this.nodeParsedUrl=new URL(e),this.port=this.nodeParsedUrl.port;let r=this._domainRegex(e.replace(this.nodeParsedUrl.pathname,""));[this.level1,this.level2,this.level3,this.level4,this.level5]=r,this.fullName="";for(let n of r)this.fullName===""?this.fullName=n:this.fullName=n+"."+this.fullName;this.zoneName=[this.level2,this.level1].filter(Boolean).join("."),this.topLevel=this.level1,this.domainName=this.level2,this.subDomain=this.level3}_domainRegex(e){let n=/([a-zA-Z0-9\-\_]*)\.{0,1}([a-zA-Z0-9\-\_]*)\.{0,1}([a-zA-Z0-9\-\_]*)\.{0,1}([a-zA-Z0-9\-\_]*)\.{0,1}([a-zA-Z0-9\-\_]*)\.{0,1}$/.exec(e);if(!n)return[];let i=[...n].reverse();return i.pop(),i.filter(function(a){return a!==""})}_protocolRegex(e){let n=/^([a-zA-Z0-9]*):\/\//.exec(e);if(n)return n[1]}_portRegex(e){let n=/^([a-zA-Z0-9]*):\/\//.exec(e);if(n)return n[1]}};var Jf=class{static{o(this,"GitRepo")}constructor(e,r){let n=m_(e);if(!n)throw new Error(`Invalid git repository URL: ${e}`);this.host=n[1],this.user=n[2],this.repo=n[3],this.accessToken=r,this.sshUrl=qv(this.host,this.user,this.repo,this.accessToken,"ssh"),this.httpsUrl=qv(this.host,this.user,this.repo,this.accessToken,"https")}},m_=o(function(t){return/([a-zA-Z0-9\-_\.]*)(?:\/|\:)([a-zA-Z0-9\-_\.]*)(?:\/)([a-zA-Z0-9\-_\.]*)(?:\.git)/.exec(t)},"gitRegex"),qv=o(function(t,e,r,n="",i){switch(n!==""&&(n=n+"@"),i){case"https":return"https://"+n+t+"/"+e+"/"+r+".git";case"ssh":return"git@"+t+":"+e+"/"+r+".git"}},"gitLink");var Kv=zr(Vv(),1),ys=Kv.default;var Jv=o(()=>globalThis.Buffer,"getNodeBuffer");function d_(t){let e=Jv();return e?e.from(t).toString("base64"):btoa(String.fromCharCode(...t))}o(d_,"base64Encode");function g_(t){let e=Jv();if(e){let r=e.from(t,"base64");return new Uint8Array(r.buffer,r.byteOffset,r.byteLength)}return new Uint8Array(Array.from(atob(t)).map(r=>r.charCodeAt(0)))}o(g_,"base64Decode");function Xa(t,e){return JSON.stringify(t,Qf,e)}o(Xa,"stringify");function vd(t){return JSON.parse(t,Qv)}o(vd,"parse");var Qf=o((t,e)=>{if(x_(e)){let r;if("data"in e&&Xv(e.data))r=new Uint8Array(e.data);else if(e instanceof Uint8Array)r=e;else return e;return{type:"EncodedBuffer",data:"base64:"+d_(r)}}return e},"replacer"),Qv=o((t,e)=>{if(y_(e)&&Sd(e.data)&&e.data.startsWith("base64:")){let r=e.data.slice(7);return g_(r)}return e},"reviver");function y_(t){return Zv(t)&&t.type==="EncodedBuffer"&&Sd(t.data)}o(y_,"isEncodedBuffer");function x_(t){return Zv(t)&&t.type==="Buffer"&&(Xv(t.data)||Sd(t.data))||t instanceof Uint8Array}o(x_,"isBufferLike");function Xv(t){return Array.isArray(t)}o(Xv,"isArray");function Sd(t){return typeof t=="string"}o(Sd,"isString");function Zv(t){return typeof t=="object"&&t!==null}o(Zv,"isObject");var tk=o(t=>{let e=JSON.parse(Xa(t)),r=!0,n=o(s=>{if(Array.isArray(s))return s.map(u=>n(u));if(s===null||typeof s!="object")return s;let a=Object.keys(s).sort(),l={};for(let u of a){let f=n(s[u]);u in l?Object.defineProperty(l,u,{configurable:!0,enumerable:!0,value:f,writable:!0}):l[u]=f}let c=Object.keys(l);return(c.length!==a.length||c.some((u,f)=>u!==a[f]))&&(r=!1),l},"createSortedValue"),i=n(e);return r?JSON.stringify(i):ys(e,{})},"stableStringify");var Xf=vd,kd=o(t=>t.split(`
11
- `).reduce((n,i)=>{let s=i.trim();return s.length>0&&n.push(Xf(s)),n},[]),"parseJsonL"),b_=o(t=>t.map(e=>qi(e)).join(`
12
- `),"stringifyJsonL"),w_=o((t,e,r={})=>{let n=new WeakSet,i=o(l=>{if(l===null||typeof l!="object")return l;let c=Qf("",l);if(c&&c.type==="EncodedBuffer"&&typeof c.data=="string")return c;if(n.has(l))return"__cycle__";if(n.add(l),Array.isArray(l))return l.map(f=>i(f));let u={};for(let f of Object.keys(l))try{u[f]=i(l[f])}catch{u[f]="__unserializable__"}return u},"sanitize"),s=i(t),a={...r,cycles:!0};if(e&&!a.cmp){let l=new Map;e.forEach((c,u)=>l.set(c,u)),a.cmp=(c,u)=>{let f=l.has(c.key)?l.get(c.key):Number.POSITIVE_INFINITY,p=l.has(u.key)?l.get(u.key):Number.POSITIVE_INFINITY;return f!==p?f-p:c.key<u.key?-1:c.key>u.key?1:0}}return ys(s,a)},"stableOneWayStringify"),qi=o((t,e,r=void 0)=>{if(r===void 0&&e===void 0)return tk(t);let n=Xa(t);t=JSON.parse(n);let i={...r};if(e&&!i.cmp){let a=new Map;e.forEach((l,c)=>a.set(l,c)),i.cmp=(l,c)=>{let u=a.has(l.key)?a.get(l.key):Number.POSITIVE_INFINITY,f=a.has(c.key)?a.get(c.key):Number.POSITIVE_INFINITY;return u!==f?u-f:l.key<c.key?-1:l.key>c.key?1:0}}return ys(t,i)},"stringify"),S_=o(t=>{let e=qi(t),r=JSON.parse(e);return JSON.stringify(r,null,2)},"stringifyPretty"),v_=o((...t)=>{let e=qi(...t);return tn.base64.encodeUri(e)},"stringifyBase64"),k_=o(t=>{let e=tn.base64,n=(e.decodeUri||e.decode)(t);return Xf(n)},"parseBase64"),Td=class t{static{o(this,"Smartjson")}static enfoldFromObject(e){let r=new this,n=r.saveableProperties||[];for(let i in e)n.indexOf(i)!==-1&&(r[i]=e[i]);return r}static enfoldFromJson(e){let r=Xf(e);return this.enfoldFromObject(r)}saveableProperties=[];foldToObject(){let e=new Set;return e.add(this),this.foldToObjectInternal(e)}foldToObjectInternal(e){let r={},n=o(s=>{if(s instanceof t){if(e.has(s))throw new Error("cycle detected");return e.add(s),s.foldToObjectInternal(e)}return Array.isArray(s)?s.map(a=>n(a)):structuredClone(s)},"foldValue"),i=this.saveableProperties||[];for(let s of i){let a=this[s];r[s]=n(a)}return r}foldToJson(){let e=this.foldToObject();return qi(e)}},T_=o(()=>(t,e)=>{let r=String(e.name);e.addInitializer(function(){this.saveableProperties||(this.saveableProperties=[]),this.saveableProperties.includes(r)||this.saveableProperties.push(r)})},"foldDec"),rk=o((t,e)=>{let r=qi(t),n=qi(e);return r===n},"deepEqualObjects"),E_=o((t,e)=>{let r=kd(t),n=kd(e);return rk(r,n)},"deepEqualJsonLStrings");var Er={};se(Er,{TypedrequestCache:()=>Ed,WebStore:()=>Za});var nk={};var Zf=class{static{o(this,"WebStoreDb")}constructor(e){this.nativeDb=e}async get(e,r,n={}){return this.runObjectStoreRequest(e,"readonly",i=>i.get(r),n)}async getKey(e,r,n={}){return this.runObjectStoreRequest(e,"readonly",i=>i.getKey(r),n)}async put(e,r,n,i={}){return this.runObjectStoreRequest(e,"readwrite",s=>n===void 0?s.put(r):s.put(r,n),i)}async delete(e,r,n={}){await this.runObjectStoreRequest(e,"readwrite",i=>i.delete(r),n)}async clear(e,r={}){await this.runObjectStoreRequest(e,"readwrite",n=>n.clear(),r)}async getAllKeys(e,r={}){return this.runObjectStoreRequest(e,"readonly",n=>n.getAllKeys(),r)}close(){this.nativeDb.close()}async runObjectStoreRequest(e,r,n,i){i.signal?.throwIfAborted();let s=this.nativeDb.transaction(e,r),a=s.objectStore(e),l=n(a),c,u=new Promise((p,h)=>{c=h}),f=o(()=>{try{s.abort()}catch(p){if(!(p instanceof DOMException)||p.name!=="InvalidStateError"){c(p);return}}i.signal&&c(i.signal.reason)},"abortTransaction");i.signal?.addEventListener("abort",f,{once:!0});try{let[p]=await Promise.race([Promise.all([D_(l),C_(s)]),u]);return p}catch(p){throw i.signal?.aborted?i.signal.reason:p}finally{i.signal?.removeEventListener("abort",f)}}},ok=o(async(t,e)=>{if(e?.throwIfAborted(),!e)return t;let r,n=new Promise((s,a)=>{r=a}),i=o(()=>{r(e.reason)},"abortListener");e.addEventListener("abort",i,{once:!0});try{return await Promise.race([t,n])}finally{e.removeEventListener("abort",i)}},"awaitWithSignal"),D_=o(t=>new Promise((e,r)=>{t.onsuccess=()=>e(t.result),t.onerror=()=>r(ep("IndexedDB request failed",t.error))}),"indexedDbRequestToPromise"),C_=o(t=>new Promise((e,r)=>{t.oncomplete=()=>e(),t.onabort=()=>r(ep("IndexedDB transaction aborted",t.error)),t.onerror=()=>r(ep("IndexedDB transaction failed",t.error))}),"indexedDbTransactionToPromise"),ep=o((t,e)=>e?new Error(`${t}: ${e.message}`,{cause:e}):new Error(t),"createIndexedDbError"),sk=o((t,e)=>{t.objectStoreNames.contains(e)||t.createObjectStore(e)},"ensureObjectStore"),ak=o(async(t,e,r)=>{if(!globalThis.indexedDB)throw new Error("IndexedDB is not available in this runtime");return new Promise((n,i)=>{let s=!1,a=typeof e=="number"?globalThis.indexedDB.open(t,e):globalThis.indexedDB.open(t),l=o(c=>{s||(s=!0,i(c instanceof Error?c:new Error(String(c))))},"rejectOnce");a.onupgradeneeded=()=>{if(r)try{r(a.result)}catch(c){a.transaction?.abort(),l(c)}},a.onsuccess=()=>{if(s){a.result.close();return}s=!0;let c=a.result;c.onversionchange=()=>c.close(),n(c)},a.onerror=()=>l(ep(`Failed to open IndexedDB database "${t}"`,a.error)),a.onblocked=()=>l(new Error(`Opening IndexedDB database "${t}" was blocked by another connection`))})},"openNativeDb"),O_=o(async(t,e)=>{let r=await ak(t,void 0,i=>sk(i,e));if(r.objectStoreNames.contains(e))return new Zf(r);let n=r.version+1;if(r.close(),r=await ak(t,n,i=>sk(i,e)),!r.objectStoreNames.contains(e))throw r.close(),new Error(`Failed to create IndexedDB object store "${e}" in database "${t}"`);return new Zf(r)},"openWebStoreDb"),Za=class{static{o(this,"WebStore")}constructor(e){this.lifecycleGeneration=0,this.closeCoveredGeneration=0,this.activeOperations=new Set,this.options=e}trackOperation(e){this.lifecycleGeneration+=1;let r;return r=(async()=>e())().finally(()=>{this.activeOperations.delete(r)}),this.activeOperations.add(r),r}init(e={}){return this.trackOperation(()=>this.initForOperation(e.signal))}async initForOperation(e){e?.throwIfAborted();let r=this.closePromise;return r&&(await ok(r,e),e?.throwIfAborted()),this.initPromise||(this.initPromise=this.runInit().catch(n=>{throw this.initPromise=void 0,n})),ok(this.initPromise,e)}async runInit(){let e=new Tr.Smartenv;if(!e.isBrowser&&!globalThis.indexedDB&&(await e.getSafeNodeModule("fake-indexeddb/auto"),!globalThis.indexedDB)){let r=await e.getSafeNodeModule("fake-indexeddb");globalThis.indexedDB=new r.IDBFactory}this.db=await O_(this.options.dbName,this.options.storeName)}runDataOperation(e,r){return this.trackOperation(async()=>(await this.initForOperation(r.signal),r.signal?.throwIfAborted(),e(this.db)))}close(){let e=this.lifecycleGeneration;if(this.closePromise&&e<=this.closeCoveredGeneration)return this.closePromise;let r=this.closePromise,n=[...this.activeOperations];if(!r&&!this.initPromise&&n.length===0)return Promise.resolve();let i;return i=(async()=>{try{if(r)try{await r}catch{}await Promise.allSettled(n);let s=this.initPromise;if(!s)return;try{await s}catch{return}finally{this.initPromise===s&&(this.initPromise=void 0)}this.db.close()}finally{this.closePromise===i&&(this.closePromise=void 0)}})(),this.closePromise=i,this.closeCoveredGeneration=e,i}async get(e,r={}){return this.runDataOperation(n=>n.get(this.options.storeName,e,r),r)}async check(e,r={}){return this.runDataOperation(async n=>await n.getKey(this.options.storeName,e,r)!==void 0,r)}async set(e,r,n={}){return this.runDataOperation(i=>i.put(this.options.storeName,r,e,n),n)}async delete(e,r={}){return this.runDataOperation(n=>n.delete(this.options.storeName,e,r),r)}async clear(e={}){return this.runDataOperation(r=>r.clear(this.options.storeName,e),e)}async keys(e={}){return this.runDataOperation(r=>r.getAllKeys(this.options.storeName,e),e)}};var Ed=class{static{o(this,"TypedrequestCache")}constructor(e="default"){this.webstore=new Za({dbName:"trStore",storeName:`trStore-${e}`})}buildKey(e){return tt.stringify({method:e.method,request:e.request})}async setByRequest(e){if(!e.response)throw new Error("You cannot store requests without a response present");await this.webstore.set(this.buildKey(e),e)}async getByRequest(e){return await this.webstore.get(this.buildKey(e))}};var el=256,xs=class{static{o(this,"CacheStore")}constructor(e="webrequest-v4",r="cache"){this.lifecycleController=new AbortController,this.closeReason=new Error("Webrequest cache store is closed"),this.disposed=!1,this.pruneGeneration=0,this.pruneWaiters=new Set,this.activeOwnedOperations=new Set,this.webstore=new Er.WebStore({dbName:e,storeName:r}),this.initPromise=this.init()}async init(){}generateCacheKey(e){let r=e.url,n=e.method;return n==="GET"?r:`${n}:${r}`}async set(e,r,n={}){await this.initPromise;let i=this.getOperationSignal(n.signal),s=n.maxEntries??el;if(!Number.isSafeInteger(s)||s<=0)throw new RangeError("webrequest cache maxEntries must be a positive safe integer");await this.webstore.set(e,r,{signal:i}),await this.schedulePrune(s,i)}async get(e,r={}){await this.initPromise;let n=this.getOperationSignal(r.signal);try{let i=await this.webstore.get(e,{signal:n});return i===void 0?null:this.isCacheEntry(i)?i:(await this.webstore.delete(e,{signal:n}),null)}catch{if(n.aborted)throw n.reason;return null}}async has(e,r={}){return await this.get(e,r)!==null}async delete(e,r={}){await this.initPromise;let n=this.getOperationSignal(r.signal);await this.webstore.delete(e,{signal:n})}async clear(e={}){await this.initPromise;let r=this.getOperationSignal(e.signal);await this.webstore.clear({signal:r})}responseFromCacheEntry(e){let r=new Headers(e.headers);return new Response(e.response,{status:e.status,statusText:e.statusText,headers:r})}cacheEntryFromResponse(e,r,n,i={}){return this.trackOwnedOperation(async()=>{let s=this.getOperationSignal(i.signal),a=i.preserveResponse!==!1,l=a?r.clone():r,c=await this.consumeArrayBuffer(l,s,a?r.body:void 0,i.responseSignal),u={};return l.headers.forEach((f,p)=>{u[p]=f}),{response:c,headers:u,timestamp:Date.now(),etag:n?.etag||l.headers.get("etag")||void 0,lastModified:n?.lastModified||l.headers.get("last-modified")||void 0,maxAge:n?.maxAge,url:e,status:l.status,statusText:l.statusText}})}async pruneExpired(e={}){await this.initPromise;let r=this.getOperationSignal(e.signal),n=await this.collectEntries(r),i=0;for(let s of n)r.throwIfAborted(),!(s.valid&&!this.isExpired(s))&&(await this.webstore.delete(s.key,{signal:r}),i+=1);return i}async schedulePrune(e,r){r?.throwIfAborted();let n=++this.pruneGeneration;this.pendingPruneMaxEntries=this.pendingPruneMaxEntries===void 0?e:Math.min(this.pendingPruneMaxEntries,e);let i,s,a=new Promise((c,u)=>{i=c,s=u}),l={generation:n,resolve:i,reject:s};this.pruneWaiters.add(l),this.ensurePruneLoop();try{await M_(a,r)}finally{this.pruneWaiters.delete(l)}}ensurePruneLoop(){if(this.pruneLoopPromise)return this.pruneLoopPromise;let e;return e=this.runPruneLoop().catch(r=>{this.pendingPruneMaxEntries=void 0,this.settlePruneWaiters(this.pruneGeneration,r)}).finally(()=>{this.pruneLoopPromise===e&&(this.pruneLoopPromise=void 0,this.pendingPruneMaxEntries!==void 0&&!this.disposed&&this.ensurePruneLoop())}),this.pruneLoopPromise=e,e}async runPruneLoop(){for(;this.pendingPruneMaxEntries!==void 0;){let e=this.pendingPruneMaxEntries;this.pendingPruneMaxEntries=void 0;let r=this.pruneGeneration;await this.pruneToLimit(e,this.lifecycleController.signal),this.settlePruneWaiters(r)}}settlePruneWaiters(e,r){for(let n of this.pruneWaiters)n.generation>e||(this.pruneWaiters.delete(n),r===void 0?n.resolve():n.reject(r))}async pruneToLimit(e,r){let n=await this.collectEntries(r),i=n.filter(l=>!l.valid||this.isExpired(l));for(let l of i)r?.throwIfAborted(),await this.webstore.delete(l.key,{signal:r});let s=n.filter(l=>l.valid&&!this.isExpired(l)).sort((l,c)=>l.timestamp===c.timestamp?l.key.localeCompare(c.key):(l.timestamp??0)-(c.timestamp??0)),a=Math.max(0,s.length-e);for(let l of s.slice(0,a))r?.throwIfAborted(),await this.webstore.delete(l.key,{signal:r})}async collectEntries(e){e?.throwIfAborted();let r=await this.webstore.keys({signal:e}),n=[];for(let i of r)if(e?.throwIfAborted(),typeof i=="string")try{let s=await this.webstore.get(i,{signal:e});n.push(this.isCacheEntry(s)?{key:i,valid:!0,timestamp:s.timestamp,maxAge:s.maxAge}:{key:i,valid:!1,timestamp:0})}catch{if(e?.aborted)throw e.reason;continue}return n}isCacheEntry(e){if(!e||typeof e!="object")return!1;let r=Reflect.get(e,"response"),n=Reflect.get(e,"headers"),i=Reflect.get(e,"timestamp"),s=Reflect.get(e,"url"),a=Reflect.get(e,"status"),l=Reflect.get(e,"statusText");return r instanceof ArrayBuffer&&typeof n=="object"&&n!==null&&Number.isFinite(i)&&typeof s=="string"&&Number.isInteger(a)&&typeof l=="string"}isExpired(e){return e.maxAge!==void 0&&e.maxAge>0&&Date.now()-e.timestamp>=e.maxAge}getOperationSignal(e){if(this.disposed)throw this.closeReason;return e?.throwIfAborted(),e?AbortSignal.any([e,this.lifecycleController.signal]):this.lifecycleController.signal}trackOwnedOperation(e){let r;return r=e().finally(()=>{this.activeOwnedOperations.delete(r)}),this.activeOwnedOperations.add(r),r}close(){if(this.closePromise)return this.closePromise;this.disposed=!0,this.lifecycleController.abort(this.closeReason);let e=this.pruneLoopPromise,r=[...this.activeOwnedOperations];return this.closePromise=(async()=>{await Promise.allSettled([...r,...e?[e]:[]]),await this.webstore.close()})(),this.closePromise}async consumeArrayBuffer(e,r,n,i){if(r?.throwIfAborted(),!r)return e.arrayBuffer();let s=e.body?.getReader();if(!s)return new ArrayBuffer(0);let a=[],l=0,c,u=new Promise((d,g)=>{c=g}),f,p=o(()=>{c(r.reason),i?.aborted||(f=Promise.all([s.cancel(r.reason).catch(()=>{}),n?.cancel(r.reason).catch(()=>{})]).then(()=>{}))},"abortListener");r.addEventListener("abort",p,{once:!0});try{for(;;){let d=await Promise.race([s.read(),u]);if(d.done)break;a.push(d.value),l+=d.value.byteLength}}finally{r.removeEventListener("abort",p),f&&await f;try{s.releaseLock()}catch{}}let h=new Uint8Array(l),m=0;for(let d of a)h.set(d,m),m+=d.byteLength;return h.buffer}},M_=o(async(t,e)=>{if(e?.throwIfAborted(),!e)return t;let r,n=new Promise((s,a)=>{r=a}),i=o(()=>{r(e.reason)},"abortListener");e.addEventListener("abort",i,{once:!0});try{return await Promise.race([t,n])}finally{e.removeEventListener("abort",i)}},"awaitWithSignal");function I_(t){let e={maxAge:0,immutable:!1,noCache:!1,noStore:!1,mustRevalidate:!1};if(!t)return e;let r=t.toLowerCase().split(",").map(n=>n.trim());for(let n of r)if(n==="no-cache")e.noCache=!0;else if(n==="no-store")e.noStore=!0;else if(n==="immutable")e.immutable=!0;else if(n==="must-revalidate")e.mustRevalidate=!0;else if(n.startsWith("max-age=")){let i=parseInt(n.split("=")[1],10);isNaN(i)||(e.maxAge=i*1e3)}return e}o(I_,"parseCacheControl");function N_(t){if(t)try{return new Date(t).getTime()}catch{return}}o(N_,"parseExpires");function rn(t){let e=t.get("cache-control"),r=t.get("expires"),n=t.get("etag"),i=t.get("last-modified"),s=I_(e);if(s.maxAge===0&&r){let a=N_(r);a&&(s.maxAge=Math.max(0,a-Date.now()))}return{maxAge:s.maxAge||0,etag:n||void 0,lastModified:i||void 0,immutable:s.immutable||!1,noCache:s.noCache||!1,noStore:s.noStore||!1,mustRevalidate:s.mustRevalidate||!1}}o(rn,"extractCacheMetadata");function rp(t,e){if(e.noStore)return!1;if(e.immutable)return!0;let r=Date.now()-t.timestamp,n=t.maxAge||e.maxAge||0;return n===0?!1:r<n}o(rp,"isFresh");function bs(t){return t.noCache||t.mustRevalidate}o(bs,"requiresRevalidation");function np(t){let e={};return t.etag&&(e["if-none-match"]=t.etag),t.lastModified&&(e["if-modified-since"]=t.lastModified),e}o(np,"createConditionalHeaders");function ip(t){let e={};return t.forEach((r,n)=>{e[n]=r}),e}o(ip,"headersToObject");function lk(t){let e=new Headers;return Object.entries(t).forEach(([r,n])=>{e.set(r,n)}),e}o(lk,"objectToHeaders");function P_(t){let e=new AbortController,r=!1,n=!1,i=new be.Timeout(t,null);return i.promise.then(()=>{r=!0,e.abort()}),{controller:e,cleanup:o(()=>{n||(n=!0,i.cancel())},"cleanup"),didTimeout:o(()=>r,"didTimeout")}}o(P_,"createTimeoutController");var ck=Symbol("webrequestTimeoutError"),ri=o((t,e)=>{let r=new Error(`Request timeout after ${e}ms: ${t}`);return Object.defineProperty(r,ck,{configurable:!1,enumerable:!1,value:!0,writable:!1}),r},"createTimeoutError"),tl=o(t=>t instanceof Error&&Reflect.get(t,ck)===!0,"isWebrequestTimeoutError");async function Dd(t,e,r){let n=t instanceof Request?t.url:String(t),{controller:i,cleanup:s,didTimeout:a}=P_(r),l=e.signal?AbortSignal.any([e.signal,i.signal]):i.signal;try{let c=await fetch(t,{...e,signal:l});return s(),c}catch(c){throw s(),a()?ri(n,r):c}}o(Dd,"fetchWithTimeout");var uk=o(t=>{if(t.reason instanceof Error)return t.reason;let e=new Error("The request was aborted");return e.name="AbortError",e},"normalizeAbortReason");async function fk(t,e){if(e.signal?.aborted){let f=uk(e.signal);throw await t.body?.cancel(f).catch(()=>{}),f}if(e.bodyTimeoutMs!==void 0&&e.bodyTimeoutMs<=0){let f=ri(e.url,e.reportedTimeoutMs??e.bodyTimeoutMs);throw await t.body?.cancel(f).catch(()=>{}),f}if(e.bodyTimeoutMs===void 0&&!e.signal)return await t.json();let r=t.body?.getReader();if(!r)return JSON.parse("");let n,i,s,a=new Promise((f,p)=>{s=p}),l=o(f=>{n||(n=f,r.cancel(f).catch(()=>{}),s(f))},"terminate"),c=o(()=>{e.signal&&l(uk(e.signal))},"abortListener");if(e.signal&&(e.signal.aborted?c():e.signal.addEventListener("abort",c,{once:!0})),e.bodyTimeoutMs!==void 0){let f=e.reportedTimeoutMs??e.bodyTimeoutMs;i=setTimeout(()=>{l(ri(e.url,f))},e.bodyTimeoutMs)}let u=o(async()=>{let f=new TextDecoder,p="";for(;;){let h;try{h=await r.read()}catch(m){throw n||m}if(n)throw n;if(h.done)break;p+=f.decode(h.value,{stream:!0})}if(p+=f.decode(),n)throw n;return JSON.parse(p)},"readBody");try{return await Promise.race([u(),a])}finally{i!==void 0&&clearTimeout(i),e.signal?.removeEventListener("abort",c);try{r.releaseLock()}catch{}}}o(fk,"consumeJsonWithTimeout");var op=class{static{o(this,"NetworkFirstStrategy")}async execute(e){let r;try{return r=await e.fetchFn(e.request),r.ok&&await this.cacheResponse(e,r),{response:r,fromCache:!1,revalidated:!1}}catch(n){if(await ws(r,n,e.request.signal),e.signal?.aborted)throw e.signal.reason;if(tl(n))throw n;e.logging&&console.log("[webrequest] Network failed, trying cache:",n);let i=await e.cacheStore.get(e.cacheKey,{signal:e.signal});if(i)return{response:e.cacheStore.responseFromCacheEntry(i),fromCache:!0,revalidated:!1};throw n}}async cacheResponse(e,r){let n=rn(r.headers);if(n.maxAge=rl(n.maxAge,e.cacheMaxAge),n.noStore)return;let i=await e.cacheStore.cacheEntryFromResponse(e.request.url,r,n,{signal:e.signal,responseSignal:e.request.signal});await e.cacheStore.set(e.cacheKey,i,{signal:e.signal,maxEntries:e.cacheMaxEntries})}},Cd=class{static{o(this,"CacheFirstStrategy")}async execute(e){let r=await e.cacheStore.get(e.cacheKey,{signal:e.signal});if(r){let s=rn(new Headers(r.headers));if(pk(e,r,s)&&!bs(s))return e.logging&&console.log("[webrequest] Cache hit (fresh):",e.request.url),{response:e.cacheStore.responseFromCacheEntry(r),fromCache:!0,revalidated:!1};if(bs(s)&&(r.etag||r.lastModified))return await this.revalidate(e,r)}e.logging&&console.log("[webrequest] Cache miss, fetching:",e.request.url);let n=await e.fetchFn(e.request),i=rn(n.headers);if(i.maxAge=rl(i.maxAge,e.cacheMaxAge),!i.noStore)try{let s=await e.cacheStore.cacheEntryFromResponse(e.request.url,n,i,{signal:e.signal,responseSignal:e.request.signal});await e.cacheStore.set(e.cacheKey,s,{signal:e.signal,maxEntries:e.cacheMaxEntries})}catch(s){throw await ws(n,s,e.request.signal),s}return{response:n,fromCache:!1,revalidated:!1}}async revalidate(e,r){let n=np(r),i=new Request(e.request.url,{method:e.request.method,headers:{...ip(e.request.headers),...n},signal:e.signal}),s;try{if(s=await e.fetchFn(i),s.status===304)return e.logging&&console.log("[webrequest] Cache revalidated (304):",e.request.url),r.timestamp=Date.now(),await e.cacheStore.set(e.cacheKey,r,{signal:e.signal,maxEntries:e.cacheMaxEntries}),await ws(s,"304 response replaced by cached response",i.signal),{response:e.cacheStore.responseFromCacheEntry(r),fromCache:!0,revalidated:!0};if(s.ok){let a=rn(s.headers);if(a.maxAge=rl(a.maxAge,e.cacheMaxAge),!a.noStore){let l=await e.cacheStore.cacheEntryFromResponse(e.request.url,s,a,{signal:e.signal,responseSignal:i.signal});await e.cacheStore.set(e.cacheKey,l,{signal:e.signal,maxEntries:e.cacheMaxEntries})}}return{response:s,fromCache:!1,revalidated:!0}}catch(a){if(await ws(s,a,i.signal),e.signal?.aborted)throw e.signal.reason;if(tl(a))throw a;return e.logging&&console.log("[webrequest] Revalidation failed, using cache:",a),{response:e.cacheStore.responseFromCacheEntry(r),fromCache:!0,revalidated:!1}}}},Od=class{static{o(this,"StaleWhileRevalidateStrategy")}async execute(e){let r=await e.cacheStore.get(e.cacheKey,{signal:e.signal});if(r){let s=e.cacheStore.responseFromCacheEntry(r);return e.scheduleBackgroundRevalidation(async a=>{let l={...e,request:new Request(e.request,{signal:a}),signal:a};await this.revalidateInBackground(l,r)}),{response:s,fromCache:!0,revalidated:!1}}let n=await e.fetchFn(e.request),i=rn(n.headers);if(i.maxAge=rl(i.maxAge,e.cacheMaxAge),!i.noStore&&n.ok)try{let s=await e.cacheStore.cacheEntryFromResponse(e.request.url,n,i,{signal:e.signal,responseSignal:e.request.signal});await e.cacheStore.set(e.cacheKey,s,{signal:e.signal,maxEntries:e.cacheMaxEntries})}catch(s){throw await ws(n,s,e.request.signal),s}return{response:n,fromCache:!1,revalidated:!1}}async revalidateInBackground(e,r){let n=rn(new Headers(r.headers));if(pk(e,r,n)&&!bs(n))return;let i;try{if(e.signal?.throwIfAborted(),i=await e.fetchFn(e.request),i.ok){let s=rn(i.headers);if(s.maxAge=rl(s.maxAge,e.cacheMaxAge),!s.noStore){let a=await e.cacheStore.cacheEntryFromResponse(e.request.url,i,s,{signal:e.signal,responseSignal:e.request.signal,preserveResponse:!1});await e.cacheStore.set(e.cacheKey,a,{signal:e.signal,maxEntries:e.cacheMaxEntries}),e.logging&&console.log("[webrequest] Background revalidation complete:",e.request.url)}}}catch(s){if(e.signal?.aborted)return;e.logging&&console.warn("[webrequest] Background revalidation failed:",s)}finally{await ws(i,"background revalidation response discarded",e.request.signal)}}},Md=class{static{o(this,"NetworkOnlyStrategy")}async execute(e){return{response:await e.fetchFn(e.request),fromCache:!1,revalidated:!1}}},Id=class{static{o(this,"CacheOnlyStrategy")}async execute(e){let r=await e.cacheStore.get(e.cacheKey,{signal:e.signal});if(!r)throw new Error(`Cache miss for ${e.request.url} (cache-only mode)`);return{response:e.cacheStore.responseFromCacheEntry(r),fromCache:!0,revalidated:!1}}},rl=o((t,e)=>e===void 0?t:Math.min(t,e),"resolveEffectiveMaxAge"),pk=o((t,e,r)=>rp(e,r)?t.cacheMaxAge===void 0?!0:Date.now()-e.timestamp<t.cacheMaxAge:!1,"isFreshForContext"),ws=o(async(t,e,r)=>{!t?.body||t.bodyUsed||r?.aborted||await t.body.cancel(e).catch(()=>{})},"cancelDiscardedResponse");function hk(t){switch(t){case"network-first":return new op;case"cache-first":return new Cd;case"stale-while-revalidate":return new Od;case"network-only":return new Md;case"cache-only":return new Id;default:return new op}}o(hk,"getStrategyHandler");var Ss=class{static{o(this,"CacheManager")}constructor(e,r,n){this.lifecycleController=new AbortController,this.closeReason=new Error("Webrequest cache manager is closed"),this.disposed=!1,this.backgroundRevalidations=new Map,this.cacheStore=n??new xs(e,r)}async execute(e,r,n){if(this.disposed)throw this.closeReason;e.signal.throwIfAborted();let i=this.determineStrategy(e,r);if(i==="network-only")return{response:await n(e),fromCache:!1,revalidated:!1};let s=r.cacheMaxEntries??el;if(!Number.isSafeInteger(s)||s<=0)throw new RangeError("webrequest cacheMaxEntries must be a positive safe integer");if(r.cacheMaxAge!==void 0&&(!Number.isSafeInteger(r.cacheMaxAge)||r.cacheMaxAge<0))throw new RangeError("webrequest cacheMaxAge must be a non-negative safe integer");let a=r.timeout??6e4,l=new AbortController,c=setTimeout(()=>{l.abort(ri(e.url,a))},Math.max(0,a)),u=AbortSignal.any([e.signal,this.lifecycleController.signal,l.signal]);try{let f=this.generateCacheKey(e,r),p=hk(i),h={request:e,cacheKey:f,cacheStore:this.cacheStore,fetchFn:n,logging:r.logging,signal:u,cacheMaxAge:r.cacheMaxAge,cacheMaxEntries:s,scheduleBackgroundRevalidation:o(m=>{this.scheduleBackgroundRevalidation(f,e.url,a,m)},"scheduleBackgroundRevalidation")};return await p.execute(h)}finally{clearTimeout(c)}}determineStrategy(e,r){return r.cacheStrategy?r.cacheStrategy:r.cache?this.mapCacheModeToStrategy(r.cache):e.cache?this.mapCacheModeToStrategy(e.cache):"network-first"}mapCacheModeToStrategy(e){switch(e){case"default":return"network-first";case"no-store":case"reload":return"network-only";case"no-cache":return"network-first";case"force-cache":return"cache-first";case"only-if-cached":return"cache-only";default:return"network-first"}}generateCacheKey(e,r){return r.cacheKey?typeof r.cacheKey=="function"?r.cacheKey(e):r.cacheKey:this.cacheStore.generateCacheKey(e)}async clear(){await this.cacheStore.clear()}async delete(e){await this.cacheStore.delete(e)}async has(e){return await this.cacheStore.has(e)}getStore(){return this.cacheStore}scheduleBackgroundRevalidation(e,r,n,i){if(this.disposed||this.backgroundRevalidations.has(e))return;let s=new AbortController,a=AbortSignal.any([this.lifecycleController.signal,s.signal]),l=setTimeout(()=>{s.abort(ri(r,n))},Math.max(0,n)),c;c=i(a).catch(()=>{}).finally(()=>{clearTimeout(l),this.backgroundRevalidations.get(e)===c&&this.backgroundRevalidations.delete(e)}),this.backgroundRevalidations.set(e,c)}close(){if(this.closePromise)return this.closePromise;this.disposed=!0,this.lifecycleController.abort(this.closeReason);let e=[...this.backgroundRevalidations.values()];return this.closePromise=(async()=>{await Promise.allSettled(e),await this.cacheStore.close()})(),this.closePromise}};var sp=class{static{o(this,"ExponentialBackoff")}calculate(e,r,n){let i=r*Math.pow(2,e-1);return Math.min(i,n)}},Nd=class{static{o(this,"LinearBackoff")}calculate(e,r,n){let i=r*e;return Math.min(i,n)}},Pd=class{static{o(this,"ConstantBackoff")}calculate(e,r,n){return Math.min(r,n)}};function mk(t){switch(t){case"exponential":return new sp;case"linear":return new Nd;case"constant":return new Pd;default:return new sp}}o(mk,"getBackoffCalculator");function dk(t,e=.1){let r=t*e*Math.random();return t+r}o(dk,"addJitter");var vs=class{static{o(this,"RetryManager")}constructor(e={},r){this.signal=r,this.options={maxAttempts:e.maxAttempts??3,backoff:e.backoff??"exponential",initialDelay:e.initialDelay??1e3,maxDelay:e.maxDelay??3e4,retryOn:e.retryOn??[408,429,500,502,503,504],onRetry:e.onRetry??(()=>{})}}async execute(e,r){let n;for(let i=1;i<=this.options.maxAttempts;i++){this.throwIfAborted();try{let s=await e();if(s instanceof Response&&this.shouldRetryResponse(s)){if(i===this.options.maxAttempts)return s;await this.cancelResponseBody(s,`Retrying after HTTP ${s.status}`);let a=this.calculateDelay(i);this.options.onRetry(i,new Error(`HTTP ${s.status}`),a),await this.delay(a);continue}return s}catch(s){if(this.signal?.aborted)throw this.getAbortError();n=s instanceof Error?s:new Error(String(s));let a=r?r(s,i):this.shouldRetryError(s);if(i===this.options.maxAttempts||!a)throw n;let l=this.calculateDelay(i);this.options.onRetry(i,n,l),await this.delay(l)}}throw n||new Error("Max retry attempts reached")}async executeWithFallbacks(e,r,n){if(e.length===0)throw new Error("No URLs provided for fallback execution");let i,s=[];for(let a of e){this.throwIfAborted();try{let l=await this.execute(async()=>await n(a,r));if(l.status<400||l.status>=400&&l.status<500&&l.status!==408)return l;await this.cancelResponseBody(l,`Trying fallback after HTTP ${l.status}`),s.push(a),i=new Error(`Request failed with status ${l.status}`)}catch(l){if(this.signal?.aborted)throw this.getAbortError();s.push(a),i=l instanceof Error?l:new Error(String(l))}}throw new Error(`All URLs failed: ${s.join(", ")}. Last error: ${i?.message||"Unknown error"}`)}shouldRetryResponse(e){let r=this.options.retryOn;return typeof r=="function"?r(e):Array.isArray(r)?r.includes(e.status):!1}shouldRetryError(e){if(e instanceof TypeError&&e.message.includes("fetch")||e.name==="AbortError"||e.message.includes("timeout"))return!0;let r=this.options.retryOn;return typeof r=="function"?r(void 0,e):!1}calculateDelay(e){let n=mk(this.options.backoff).calculate(e,this.options.initialDelay,this.options.maxDelay);return dk(n)}async delay(e){if(!this.signal){await be.delayFor(e);return}if(this.signal.aborted)throw this.getAbortError();let r=new be.Timeout(e,null),n,i=new Promise((a,l)=>{n=l}),s=o(()=>{r.cancel(),n(this.getAbortError())},"abortListener");try{this.signal.addEventListener("abort",s,{once:!0}),this.signal.aborted&&s(),await Promise.race([r.promise,i])}finally{r.cancel(),this.signal.removeEventListener("abort",s)}}async cancelResponseBody(e,r){await e.body?.cancel(r).catch(()=>{})}throwIfAborted(){if(this.signal?.aborted)throw this.getAbortError()}getAbortError(){if(this.signal?.reason instanceof Error)return this.signal.reason;let e=new Error("The request was aborted");return e.name="AbortError",e}};var ks=class{static{o(this,"RequestDeduplicator")}constructor(){this.inFlightRequests=new Map}generateKey(e){let r=e.url,n=e.method;return n==="GET"||n==="HEAD"?`${n}:${r}`:`${n}:${r}:${Date.now()}`}async execute(e,r){let n=this.inFlightRequests.get(e);if(n){let s=await n.promise;return{response:this.cloneValue(s),wasDeduplicated:!0}}let i=te.defer();this.inFlightRequests.set(e,i);try{let s=await r();return i.resolve(s),this.inFlightRequests.delete(e),{response:s,wasDeduplicated:!1}}catch(s){throw i.reject(s),this.inFlightRequests.delete(e),s}}isInFlight(e){return this.inFlightRequests.has(e)}getInFlightCount(){return this.inFlightRequests.size}clear(){this.inFlightRequests.clear()}cloneValue(e){return e instanceof Response?e.clone():{...e,response:e.response.clone()}}};var Yi=class{static{o(this,"WebrequestClient")}constructor(e={}){this.closeReason=new Error("Webrequest client is closed"),this.disposed=!1,this.defaultOptions=e,this.interceptorManager=new ds,this.cacheManager=new Ss,this.deduplicator=new ks}addRequestInterceptor(e){this.interceptorManager.addRequestInterceptor(e)}addResponseInterceptor(e){this.interceptorManager.addResponseInterceptor(e)}addErrorInterceptor(e){this.interceptorManager.addErrorInterceptor(e)}removeRequestInterceptor(e){this.interceptorManager.removeRequestInterceptor(e)}removeResponseInterceptor(e){this.interceptorManager.removeResponseInterceptor(e)}removeErrorInterceptor(e){this.interceptorManager.removeErrorInterceptor(e)}clearInterceptors(){this.interceptorManager.clearAll()}async clearCache(){await this.cacheManager.clear()}async deleteCache(e){await this.cacheManager.delete(e)}async request(e,r={}){return(await this.requestWithMetadata(e,r)).response}async requestWithMetadata(e,r={}){if(this.disposed)throw this.closeReason;let n={...this.defaultOptions,...r},i;if(typeof e=="string"?i=new Request(e,n):i=e,i=await this.interceptorManager.processRequest(i),n.interceptors?.request)for(let a of n.interceptors.request)i=await a(i);if(n.deduplicate??!1){let a=this.deduplicator.generateKey(i);return(await this.deduplicator.execute(a,async()=>await this.executeRequest(i,n))).response}return await this.executeRequest(i,n)}async executeRequest(e,r){try{let n=typeof r.retry=="object"?r.retry:r.retry?{}:void 0,i=o(async c=>{let u=r.timeout??6e4,f={...r};return delete f.body,delete f.headers,delete f.method,delete f.signal,await Dd(c,{...f,signal:c.signal},u)},"fetchFnForRequest"),s=o(async(c,u)=>{let f=r.timeout??6e4;return await Dd(c,u,f)},"fetchFnForFallbacks"),a;if(n){let c=new vs(n,r.signal);if(r.fallbackUrls&&r.fallbackUrls.length>0){let u=[e.url,...r.fallbackUrls];a={response:await c.executeWithFallbacks(u,{method:e.method,headers:e.headers,body:e.body,...r},s),fromCache:!1,revalidated:!1}}else{let u,f=await c.execute(async()=>{let p=await this.cacheManager.execute(e,r,i);return u=p,p.response});a=u?.response===f?u:{response:f,fromCache:!1,revalidated:!1}}}else a=await this.cacheManager.execute(e,r,i);let l=await this.interceptorManager.processResponse(a.response);if(r.interceptors?.response)for(let c of r.interceptors.response)l=await c(l);return __(l,a)}catch(n){throw await this.interceptorManager.processError(n instanceof Error?n:new Error(String(n)))}}async close(){return this.closePromise?this.closePromise:(this.disposed=!0,this.closePromise=this.cacheManager.close(),this.closePromise)}async requestJsonWithMetadata(e,r){let n={...this.defaultOptions,...r},i=n.timeout??6e4,s=n.retry?void 0:performance.now()+i,a=s===void 0?void 0:new AbortController,l=a?n.signal?AbortSignal.any([n.signal,a.signal]):a.signal:n.signal,c=a===void 0?void 0:setTimeout(()=>{a.abort(ri(e,i))},Math.max(0,i));try{let u=await this.requestWithMetadata(e,{...r,signal:l}),f=u.response;if(l?.aborted)throw await f.body?.cancel(l.reason).catch(()=>{}),l.reason instanceof Error?l.reason:new Error("The request was aborted");if(!f.ok)throw await f.body?.cancel(`HTTP ${f.status}`).catch(()=>{}),new Error(`HTTP ${f.status}: ${f.statusText}`);let p=s===void 0?i:s-performance.now(),h=await fk(f,{bodyTimeoutMs:p,reportedTimeoutMs:i,signal:l,url:e});return Object.freeze({data:h,response:f,metadata:u.metadata})}catch(u){throw l?.aborted&&l.reason instanceof Error?l.reason:u}finally{c!==void 0&&clearTimeout(c)}}async getJson(e,r={}){return(await this.getJsonWithMetadata(e,r)).data}async getJsonWithMetadata(e,r={}){return await this.requestJsonWithMetadata(e,{...r,method:"GET",headers:{Accept:"application/json",...r.headers||{}}})}async postJson(e,r,n={}){return(await this.postJsonWithMetadata(e,r,n)).data}async postJsonWithMetadata(e,r,n={}){return await this.requestJsonWithMetadata(e,{...n,method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",...n.headers||{}},body:JSON.stringify(r)})}async putJson(e,r,n={}){return(await this.putJsonWithMetadata(e,r,n)).data}async putJsonWithMetadata(e,r,n={}){return await this.requestJsonWithMetadata(e,{...n,method:"PUT",headers:{"Content-Type":"application/json",Accept:"application/json",...n.headers||{}},body:JSON.stringify(r)})}async deleteJson(e,r={}){return(await this.deleteJsonWithMetadata(e,r)).data}async deleteJsonWithMetadata(e,r={}){return await this.requestJsonWithMetadata(e,{...r,method:"DELETE",headers:{Accept:"application/json",...r.headers||{}}})}},__=o((t,e)=>{let r=Object.freeze({fromCache:e.fromCache,revalidated:e.revalidated});return Object.freeze({response:t,metadata:r})},"createResponseResult");var kt=new Yi;async function lt(t,e){let r=t instanceof Request?t.url:String(t),n=t instanceof Request?t:new Request(r,e);return await kt.request(n,e)}o(lt,"webrequest"),lt.requestWithMetadata=async function(t,e){let r=t instanceof Request?t.url:String(t),n=t instanceof Request?t:new Request(r,e);return await kt.requestWithMetadata(n,e)},lt.getJson=async function(t,e){return await kt.getJson(t,e)},lt.getJsonWithMetadata=async function(t,e){return await kt.getJsonWithMetadata(t,e)},lt.postJson=async function(t,e,r){return await kt.postJson(t,e,r)},lt.postJsonWithMetadata=async function(t,e,r){return await kt.postJsonWithMetadata(t,e,r)},lt.putJson=async function(t,e,r){return await kt.putJson(t,e,r)},lt.putJsonWithMetadata=async function(t,e,r){return await kt.putJsonWithMetadata(t,e,r)},lt.deleteJson=async function(t,e){return await kt.deleteJson(t,e)},lt.deleteJsonWithMetadata=async function(t,e){return await kt.deleteJsonWithMetadata(t,e)},lt.addRequestInterceptor=function(t){kt.addRequestInterceptor(t)},lt.addResponseInterceptor=function(t){kt.addResponseInterceptor(t)},lt.addErrorInterceptor=function(t){kt.addErrorInterceptor(t)},lt.clearInterceptors=function(){kt.clearInterceptors()},lt.clearCache=async function(){await kt.clearCache()},lt.createClient=function(t){return new Yi(t)},lt.getDefaultClient=function(){return kt};var nl=zr(mm(),1);var L_=1e4,gk=new WeakSet,yk=new WeakMap,_d=o(t=>{gk.add(t)},"authorizeVirtualStreamApplicationUse"),Vi=class extends Error{static{o(this,"VirtualStreamClosedError")}constructor(e="VirtualStream is closed",r){super(e,r),this.name="VirtualStreamClosedError"}},Ki=class extends Error{static{o(this,"VirtualStreamOpenTimeoutError")}constructor(e,r){super(e>0?`VirtualStream transport staging timed out after ${e}ms`:"VirtualStream transport staging deadline is exhausted"),this.timeoutMs=e,this.deadlineAt=r,this.name="VirtualStreamOpenTimeoutError"}},lp=class extends Error{static{o(this,"VirtualStreamLifecycleContractError")}constructor(e){super(`VirtualStream endpoint closed before terminal ${e} produced a receipt`),this.name="VirtualStreamLifecycleContractError"}},bn=class{static{o(this,"VirtualStreamActivationScope")}constructor(){this.trackedStreams=new Set,this.hasAuthorizedTrackedStreams=!1,this.published=!1,this.settled=!1}track(e){if(this.settled)throw new Error("Cannot track a VirtualStream in a settled activation scope");let r=yk.get(e);if(r&&r!==this)throw new Error("VirtualStream is already owned by another activation scope");r||yk.set(e,this),this.trackedStreams.add(e),this.hasAuthorizedTrackedStreams&&_d(e),this.published&&e.publishActivation()}authorizeApplicationUse(){if(!(this.settled||this.hasAuthorizedTrackedStreams)){this.hasAuthorizedTrackedStreams=!0;for(let e of this.trackedStreams)_d(e)}}publish(){if(!(this.settled||this.published)){this.published=!0;for(let e of this.trackedStreams)e.publishActivation()}}commit(){this.publish(),this.settled=!0,this.trackedStreams.clear()}async rollback(e){if(this.settled)return;this.settled=!0;let r=[...this.trackedStreams];this.trackedStreams.clear(),await Promise.allSettled(r.map(n=>n.rollbackActivation(e)))}},Dr=class t{static{o(this,"VirtualStream")}static{this.maximumStreamIdLength=256}static fromRegistration(e){let r=e.registration?.dispose,n=o(()=>{let i=r;r=void 0,i?.()},"disposeOnce");try{if(t.validateTransport(e.transport),typeof e.registration?.dispose!="function")throw new TypeError("VirtualStream registration requires a synchronous disposer");return t.validateNetworkDescriptor(e.registration.descriptor),t.validateEndpoint(e.registration.endpoint,e.registration.descriptor,e.registration.descriptor.creatorDirection),new t({transport:e.transport,descriptor:e.registration.descriptor,endpoint:e.registration.endpoint,registrationDispose:n,explicitRegistration:!0})}catch(i){throw n(),i}}static encodePayloadForNetwork(e,r){let n=e?.correlation?.phase==="response";return t.encodePayloadValue(e,r,n,!1,!0,{standard:new WeakMap,omittingResponseRequestStreams:new WeakMap})}static encodePayloadForNetworkWithMetadata(e,r){let n=e?.correlation?.phase==="response",i={standard:new WeakMap,omittingResponseRequestStreams:new WeakMap,containsNetworkDescriptor:!1,requiresNetworkDescriptorScan:!1},s=t.encodePayloadValue(e,r,n,!1,!0,i),a=i.requiresNetworkDescriptorScan||t.encodedContainerPrototypesMayExposeNetworkDescriptor();return{payload:s,containsNetworkDescriptor:a?t.containsNetworkDescriptor(s):i.containsNetworkDescriptor}}static encodePayloadValue(e,r,n,i,s,a){if(!e||Ui.isBufferLike(e))return e;if(e instanceof t)return i?{_OMITTED_VIRTUAL_STREAM:!0,reason:"Streams beneath an echoed response.request are omitted."}:(a.containsNetworkDescriptor!==void 0&&(a.containsNetworkDescriptor=!0),e.activateForEncoding(r));if(e instanceof Set||e instanceof Map||e instanceof Date||e instanceof RegExp||e instanceof Error||e instanceof Promise||typeof e.then=="function")return a.containsNetworkDescriptor!==void 0&&typeof e=="object"&&(a.requiresNetworkDescriptorScan=!0),e;if(typeof e!="object")return e;let c=i?a.omittingResponseRequestStreams:a.standard,u=c.get(e);if(u)return u;if(Array.isArray(e)){let p=[];c.set(e,p);for(let h=0;h<e.length;h++)p.push(t.encodePayloadValue(e[h],r,n,i,!1,a));return a.containsNetworkDescriptor!==void 0&&Object.getPrototypeOf(p)!==Array.prototype&&(a.requiresNetworkDescriptorScan=!0),p}let f={};c.set(e,f);for(let p of Object.keys(e)){let h=i||n&&s&&p==="request";f[p]=t.encodePayloadValue(e[p],r,n,h,!1,a)}return a.containsNetworkDescriptor!==void 0&&Object.getPrototypeOf(f)!==Object.prototype&&(a.requiresNetworkDescriptorScan=!0),a.containsNetworkDescriptor!==void 0&&Object.hasOwn(f,"_isVirtualStream")&&f._isVirtualStream===!0&&(a.containsNetworkDescriptor=!0),f}static async decodePayloadFromNetworkAsync(e,r){let n=new Map,i=[],s=[],a=r.activationScope??new bn,l=!r.activationScope,c=t.resolveOpenDeadlineAt(r.openDeadlineAt);try{let u=t.preparePayloadFromNetwork(e,{...r,activationScope:a},n,i,s,new WeakMap);if(i.length>0){let f=r.virtualStreamTransport;if(!f)throw new Error("VirtualStream descriptor requires a virtual stream transport");t.validateTransport(f);for(let p of i){let h=t.getRemainingOpenTimeoutMs(c),m=await t.openVirtualStreamWithTimeout(f,p.descriptor,h,c,r.abortSignal);p.stream.bindOpenedEndpoint(m)}}return l&&(a.authorizeApplicationUse(),a.commit()),u}catch(u){throw await Promise.allSettled(s.map(f=>f.rollbackActivation(u))),u}}static containsNetworkDescriptor(e,r=new WeakSet){return!e||Ui.isBufferLike(e)||typeof e!="object"?!1:e._isVirtualStream===!0?!0:r.has(e)?!1:(r.add(e),Array.isArray(e)?e.some(n=>t.containsNetworkDescriptor(n,r)):e instanceof Set||e instanceof Map||e instanceof Date||e instanceof RegExp||e instanceof Error||e instanceof Promise||typeof e.then=="function"?!1:Object.values(e).some(n=>t.containsNetworkDescriptor(n,r)))}static encodedContainerPrototypesMayExposeNetworkDescriptor(){return Object.getPrototypeOf(Object.prototype)!==null||Object.getPrototypeOf(Array.prototype)!==Object.prototype||Object.getOwnPropertyDescriptor(Object.prototype,"_isVirtualStream")!==void 0||Object.getOwnPropertyDescriptor(Array.prototype,"_isVirtualStream")!==void 0}static preparePayloadFromNetwork(e,r,n,i,s,a){if(Ui.isBufferLike(e)||e===null||typeof e!="object"||e instanceof Set||e instanceof Map||e instanceof Date||e instanceof RegExp||e instanceof Error||e instanceof Promise||typeof e.then=="function")return e;if(e._isVirtualStream===!0){t.validateNetworkDescriptor(e);let u=e,f=n.get(u.streamId);if(f){if(!t.descriptorMetadataMatches(f.descriptor,u))throw new TypeError(`Conflicting VirtualStream metadata for streamId "${u.streamId}"`);return f.stream}let p=r.virtualStreamTransport,h=new t({transport:p,descriptor:u,explicitRegistration:!1});return n.set(u.streamId,{stream:h,descriptor:u}),i.push({stream:h,descriptor:u}),s.push(h),r.activationScope?.track(h),h}let l=a.get(e);if(l)return l;if(Array.isArray(e)){let u=[];a.set(e,u);for(let f of e)u.push(t.preparePayloadFromNetwork(f,r,n,i,s,a));return u}let c={};a.set(e,c);for(let u of Object.keys(e))Object.defineProperty(c,u,{value:t.preparePayloadFromNetwork(e[u],r,n,i,s,a),configurable:!0,enumerable:!0,writable:!0});return c}static resolveOpenDeadlineAt(e){let r=performance.now()+L_;if(e===void 0)return r;if(!Number.isFinite(e)||e<0)throw new RangeError("VirtualStream openDeadlineAt must be a non-negative finite number");return Math.min(e,r)}static getRemainingOpenTimeoutMs(e){let r=Math.ceil(e-performance.now());if(!Number.isSafeInteger(r)||r<=0)throw new Ki(0,e);return r}static async openVirtualStreamWithTimeout(e,r,n,i,s){let a=new Ki(n,i),l=new AbortController,c,u,f,p=Promise.resolve().then(()=>e.openVirtualStream(r,{abortSignal:l.signal,timeoutMs:n}));p.then(async m=>{c!==void 0&&await t.abortLateOpenedEndpoint(m,c)},()=>{});let h=new Promise((m,d)=>{u=setTimeout(()=>{c=a,l.abort(a),d(a)},n),s&&(f=o(()=>{let g=s.reason??new DOMException("The operation was aborted","AbortError");c=g,l.abort(g),d(g)},"parentAbortListener"),s.addEventListener("abort",f,{once:!0}),s.aborted&&f())});try{return await Promise.race([p,h])}finally{u&&clearTimeout(u),s&&f&&s.removeEventListener("abort",f)}}static async abortLateOpenedEndpoint(e,r){let n;try{n=Promise.resolve(e.abort(r))}catch{}n?.catch(()=>{});try{await e.closed}catch{}}static validateTransport(e){if(!e||typeof e!="object"||typeof e.openVirtualStream!="function")throw new TypeError("VirtualStream transport is invalid")}static validateNetworkDescriptor(e){if(!t.isPlainObject(e))throw new TypeError("VirtualStream descriptor must be a plain object");let r=t.getOwnDataProperty(e,"_isVirtualStream"),n=t.getOwnDataProperty(e,"protocol"),i=t.getOwnDataProperty(e,"streamId"),s=t.getOwnDataProperty(e,"creatorDirection");if(r!==!0||n!=="virtual-stream-v1")throw new TypeError("VirtualStream descriptor requires protocol virtual-stream-v1");if(typeof i!="string"||i.length===0||i.length>t.maximumStreamIdLength)throw new TypeError(`VirtualStream descriptor streamId must contain 1-${t.maximumStreamIdLength} characters`);if(s!=="send"&&s!=="receive")throw new TypeError("VirtualStream descriptor creatorDirection must be send or receive");let a=Object.getOwnPropertyDescriptor(e,"contentType");if(a&&(!("value"in a)||typeof a.value!="string"||a.value.length===0))throw new TypeError("VirtualStream descriptor contentType must be a non-empty string");let l=Object.getOwnPropertyDescriptor(e,"integrity");if(l){if(!("value"in l))throw new TypeError("VirtualStream descriptor integrity must be data");t.validateIntegrity(l.value)}let c=Object.getOwnPropertyDescriptor(e,"transport");if(!c||!("value"in c))throw new TypeError("VirtualStream descriptor requires an own transport property");if(!t.isJsonCompatible(c.value,new WeakSet))throw new TypeError("VirtualStream descriptor transport must be JSON-compatible")}static validateIntegrity(e){if(!t.isPlainObject(e))throw new TypeError("VirtualStream integrity must be a plain object");let r=t.getOwnDataProperty(e,"algorithm"),n=t.getOwnDataProperty(e,"byteLength"),i=t.getOwnDataProperty(e,"digest");if(r!=="sha256")throw new TypeError("VirtualStream integrity algorithm must be sha256");if(!Number.isSafeInteger(n)||n<0)throw new TypeError("VirtualStream integrity byteLength must be a non-negative safe integer");if(typeof i!="string"||!/^sha256:[0-9a-f]{64}$/.test(i))throw new TypeError("VirtualStream integrity digest is invalid")}static validateEndpoint(e,r,n){if(!e||typeof e!="object")throw new TypeError("VirtualStream transport returned an invalid endpoint");let i=e;if(i.protocol!=="virtual-stream-v1"||i.direction!==n||i.streamId!==r.streamId||i.contentType!==r.contentType||!t.integrityMatches(i.integrity,r.integrity))throw new TypeError("VirtualStream endpoint direction or metadata does not match its descriptor");if(!("opened"in i)||!("completion"in i)||!i.closed||typeof i.closed.then!="function"||typeof i.abort!="function")throw new TypeError("VirtualStream endpoint lacks lifecycle contracts");if(n==="send"){if(typeof i.send!="function"||typeof i.close!="function"||!("writable"in i))throw new TypeError("VirtualStream sender endpoint is invalid")}else if(typeof i.receive!="function"||typeof i.accept!="function"||typeof i.reject!="function"||!("readable"in i))throw new TypeError("VirtualStream receiver endpoint is invalid")}static descriptorMetadataMatches(e,r){return e.creatorDirection===r.creatorDirection&&e.contentType===r.contentType&&t.integrityMatches(e.integrity,r.integrity)}static integrityMatches(e,r){return!e||!r?e===r:e.algorithm===r.algorithm&&e.byteLength===r.byteLength&&e.digest===r.digest}static getOwnDataProperty(e,r){let n=Object.getOwnPropertyDescriptor(e,r);if(!(!n||!("value"in n)))return n.value}static isPlainObject(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;let r=Object.getPrototypeOf(e);return r===Object.prototype||r===null}static isJsonCompatible(e,r){if(e===null||typeof e=="string"||typeof e=="boolean")return!0;if(typeof e=="number")return Number.isFinite(e);if(!e||typeof e!="object"||r.has(e))return!1;r.add(e);try{if(Array.isArray(e)){for(let n=0;n<e.length;n++){let i=Object.getOwnPropertyDescriptor(e,String(n));if(!i||!("value"in i)||!t.isJsonCompatible(i.value,r))return!1}return Reflect.ownKeys(e).every(n=>n==="length"||typeof n=="string"&&/^(0|[1-9][0-9]*)$/.test(n)&&Number(n)<e.length)}if(!t.isPlainObject(e))return!1;for(let n of Reflect.ownKeys(e)){if(typeof n!="string")return!1;let i=Object.getOwnPropertyDescriptor(e,n);if(!i.enumerable||!("value"in i)||!t.isJsonCompatible(i.value,r))return!1}return!0}finally{r.delete(e)}}constructor(e){this.activationPublished=!1,this.endpointUseStarted=!1,this.endpointClosed=!1,this.locallyDisposed=!1,this.transport=e.transport,this.descriptor=e.descriptor,this.endpoint=e.endpoint,this.registrationDispose=e.registrationDispose,this.explicitRegistration=e.explicitRegistration,this.explicitRegistration&&_d(this),this.endpoint&&this.observeEndpoint(this.endpoint)}get protocol(){return"virtual-stream-v1"}get direction(){return this.endpoint?this.endpoint.direction:this.descriptor.creatorDirection==="send"?"receive":"send"}get streamId(){return this.descriptor.streamId}get contentType(){return this.descriptor.contentType}get integrity(){return this.descriptor.integrity}get opened(){try{this.assertApplicationOperationsAllowed(),this.assertNotClosed(),this.endpointUseStarted=!0;let e=this.requireEndpoint().opened;if(!e||typeof e.then!="function")throw new TypeError("VirtualStream endpoint opened contract is invalid");return e}catch(e){return Promise.reject(e)}}get completion(){let e=this.requireEndpoint().completion;if(!e||typeof e.then!="function")throw new TypeError("VirtualStream endpoint completion contract is invalid");return e}get closed(){return this.requireEndpoint().closed}get writable(){return this.assertApplicationOperation("send"),this.endpointUseStarted=!0,this.requireEndpoint().writable}get readable(){return this.assertApplicationOperation("receive"),this.endpointUseStarted=!0,this.requireEndpoint().readable}publishActivation(){this.explicitRegistration&&!this.locallyDisposed&&(this.activationPublished=!0)}async rollbackActivation(e){if(!this.locallyDisposed){if(this.explicitRegistration&&!this.activationPublished&&!this.endpointUseStarted){this.disposeUnpublishedRegistration();return}this.endpoint&&await this.abort(e)}}async send(e){if(this.assertApplicationOperation("send"),!(e instanceof Uint8Array))throw new TypeError("VirtualStream.send accepts only Uint8Array chunks");this.endpointUseStarted=!0,await this.requireEndpoint().send(e)}async receive(){return this.assertApplicationOperation("receive"),this.endpointUseStarted=!0,this.requireEndpoint().receive()}close(){if(this.terminalPromise)return this.followTerminal("close");try{this.assertApplicationOperation("send"),this.endpointUseStarted=!0;let e=this.requireEndpoint();return this.terminateEndpoint(()=>e.close(),"close")}catch(e){return Promise.reject(e)}}accept(){if(this.terminalPromise)return this.followTerminal("accept");try{this.assertApplicationOperation("receive"),this.endpointUseStarted=!0;let e=this.requireEndpoint();return this.terminateEndpoint(()=>e.accept(),"accept")}catch(e){return Promise.reject(e)}}reject(e){if(this.terminalPromise)return this.followTerminal("reject");try{this.assertApplicationOperation("receive"),this.endpointUseStarted=!0;let r=this.requireEndpoint();return this.terminateEndpoint(()=>r.reject(e),"reject")}catch(r){return Promise.reject(r)}}abort(e){if(this.terminalPromise)return this.followTerminal("abort");if(this.locallyDisposed||this.endpointClosed)return Promise.resolve();let r=this.endpoint;return r?(this.endpointUseStarted=!0,this.terminateEndpoint(()=>r.abort(e),"abort")):Promise.resolve()}activateForEncoding(e){e.activationScope?.track(this);try{if(!e.virtualStreamTransport)throw new Error("VirtualStream requires a virtual stream transport");if(this.transport!==e.virtualStreamTransport)throw new Error("VirtualStream cannot be encoded through a different virtual stream transport");if(this.assertNotClosed(),this.terminalPromise)throw new Vi("VirtualStream has a terminal operation");return e.activationScope||this.publishActivation(),this.descriptor}catch(r){throw e.activationScope||this.rollbackActivation(r).catch(()=>{}),r}}bindOpenedEndpoint(e){this.endpoint=e;let r=this.descriptor.creatorDirection==="send"?"receive":"send";t.validateEndpoint(e,this.descriptor,r),this.observeEndpoint(e)}observeEndpoint(e){let r=e.completion;if(!r||typeof r.then!="function")throw new TypeError("VirtualStream endpoint completion contract is invalid");r.then(n=>{this.completionOutcome={status:"fulfilled",value:n}},n=>{this.completionOutcome={status:"rejected",error:n}}),e.closed.then(()=>this.markEndpointClosed(),n=>this.markEndpointClosed(n))}markEndpointClosed(e){e!==void 0&&this.getCloseError(e),this.endpointClosed=!0,this.disposeRegistration()}disposeRegistration(){let e=this.registrationDispose;this.registrationDispose=void 0,e?.()}disposeUnpublishedRegistration(){this.locallyDisposed||(this.locallyDisposed=!0,this.disposeRegistration())}requireEndpoint(){if(!this.endpoint)throw new Error("VirtualStream endpoint is not staged");return this.endpoint}assertApplicationOperationsAllowed(){if(!gk.has(this))throw new Error("VirtualStream application use is not authorized")}assertApplicationOperation(e){if(this.assertApplicationOperationsAllowed(),this.assertNotClosed(),this.terminalPromise)throw new Vi("VirtualStream has a terminal operation");if(this.direction!==e)throw new TypeError(`${this.direction} VirtualStreams cannot perform ${e} operations`)}assertNotClosed(){if(this.endpointClosed||this.locallyDisposed)throw this.getCloseError()}getCloseError(e){return this.closeError||(this.closeError=new Vi("VirtualStream is closed",e===void 0?void 0:{cause:e})),this.closeError}followTerminal(e){let r=this.terminalPromise;if(this.terminalKind===e)return r;let n=new Vi(`VirtualStream terminal ${this.terminalKind} already completed`);return r.then(()=>Promise.reject(n),()=>Promise.reject(n))}terminateEndpoint(e,r){if(this.terminalPromise)return this.followTerminal(r);let n=this.requireEndpoint();this.terminalKind=r;let i=e,s=Promise.resolve().then(()=>{let f=i;return i=void 0,f()});s.catch(()=>{});let a=s.then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",error:f})),l;a.then(f=>{l=f});let c=n.closed.then(()=>({status:"closed"}),f=>({status:"closedError",error:f})),u=(async()=>{let f=await Promise.race([a,c]);if(f.status==="fulfilled"||f.status==="rejected"){let p=await c;if(this.endpointClosed=!0,this.disposeRegistration(),f.status==="rejected")throw f.error;if(p.status==="closedError")throw p.error;return f.value}if(this.endpointClosed=!0,this.disposeRegistration(),f.status==="closedError")throw f.error;if(await Promise.resolve(),await Promise.resolve(),l?.status==="rejected")throw l.error;if(l?.status==="fulfilled")return l.value;if(r==="close"||r==="accept"){if(this.completionOutcome?.status==="fulfilled")return this.completionOutcome.value;throw this.completionOutcome?.status==="rejected"?this.completionOutcome.error:new lp(r)}})();return this.terminalPromise=u,u}};var ur=class extends Error{static{o(this,"TypedResponseError")}constructor(e,r){super(e),this.name="TypedResponseError",this.errorText=e,this.errorData=r??{}}};var Ts=Object.freeze({redacted:!0});var xk=Object.freeze(["onOutgoingRequest","onIncomingResponse","onIncomingRequest","onOutgoingResponse"]),bk=Symbol.for("@api.global/typedrequest:global-hooks:3.8"),wk=o(t=>({payloadProjector:t?.payloadProjector,errorProjector:t?.errorProjector}),"copyProjectionOptions"),up=o((t={})=>({hooks:t,projectedRegistrationsByPhase:{}}),"createTypedRouterHookRegistrationState"),R_=o(t=>xk.filter(e=>Object.hasOwn(t,e)).map(e=>[e,t[e]]),"getSuppliedHookEntries"),fp=o((t,e,r)=>{let n=R_(e);t.hooks={...t.hooks,...e};for(let[i]of n){let s=t.hooks[i];if(typeof s!="function"){delete t.projectedRegistrationsByPhase[i];continue}t.projectedRegistrationsByPhase[i]={callback:s,projectionOptions:wk(r)}}},"mergeTypedRouterHookRegistrations"),pp=o((t,e)=>{t.hooks=e;for(let r of xk)delete t.projectedRegistrationsByPhase[r]},"replaceTypedRouterHookRegistrations"),Es=o(()=>{let t=globalThis[bk];if(t?.version==="3.8"&&t.stateShape==="callback-bound-projections-v1"&&t.subscribers instanceof Map)return t;let e={version:"3.8",stateShape:"callback-bound-projections-v1",legacy:up(),subscribers:new Map};return globalThis[bk]=e,e},"getRealmGlobalHookState"),vk=o(()=>Es().legacy.hooks,"getLegacyGlobalHooks"),kk=o(t=>{pp(Es().legacy,t)},"replaceLegacyGlobalHooks"),Tk=o((t,e)=>{fp(Es().legacy,t,e)},"mergeLegacyGlobalHooks"),Ek=o((t,e)=>{let r=Es(),n=Symbol("typedrequest-hook-subscriber"),i=up();fp(i,t,e),r.subscribers.set(n,i);let s=!1;return()=>{s||(s=!0,r.subscribers.delete(n))}},"addGlobalHookSubscriber"),Dk=o(()=>{let t=Es();pp(t.legacy,{}),t.subscribers.clear()},"clearGlobalHookRegistrations"),cp=o(t=>{try{console.error(`TypedRequest hook projection failed (${t})`)}catch{}},"logProjectionFailure"),Ld=o(t=>{try{console.error(`TypedRequest hook callback failed (${t})`)}catch{}},"logCallbackFailure"),A_=o((t,e)=>{let r={correlationId:t.correlationId,method:t.method,direction:t.direction,phase:t.phase,timestamp:t.timestamp,...t.durationMs===void 0?{}:{durationMs:t.durationMs},hasError:t.errorText!==void 0};try{return Object.freeze(r)}catch{cp(e);return}},"createMetadata"),Sk=o(t=>typeof SharedArrayBuffer>"u"?!1:t instanceof SharedArrayBuffer||Object.prototype.toString.call(t)==="[object SharedArrayBuffer]","isSharedArrayBuffer"),Ds=o((t,e=new Set)=>{if(!(t===null||typeof t!="object"&&typeof t!="function")){if(Sk(t))throw new TypeError("TypedRequest hook projections cannot contain SharedArrayBuffer");if(ArrayBuffer.isView(t)){if(Sk(t.buffer))throw new TypeError("TypedRequest hook projections cannot contain SharedArrayBuffer-backed views");return}if(!e.has(t)){if(e.add(t),t instanceof Map){for(let[r,n]of t)Ds(r,e),Ds(n,e);return}if(t instanceof Set){for(let r of t)Ds(r,e);return}for(let r of Reflect.ownKeys(t)){let n=Reflect.getOwnPropertyDescriptor(t,r);if(n){if(!Object.hasOwn(n,"value"))throw new TypeError("TypedRequest hook projections cannot contain accessor properties");Ds(n.value,e)}}}}},"assertNoSharedArrayBuffer"),F_=o((t,e,r,n)=>{if(!e||!r.payloadProjector)return{payload:Ts,payloadRedacted:!0};try{let i=r.payloadProjector(t,e);Ds(i);let s=structuredClone(i);return Ds(s),s!==null&&(typeof s=="object"||typeof s=="function")&&Object.freeze(s),{payload:s,payloadRedacted:!1}}catch{return cp(n),{payload:Ts,payloadRedacted:!0}}},"snapshotPayload"),$_=o((t,e,r,n)=>{if(!(!e||t.errorText===void 0||!r.errorProjector))try{let i=r.errorProjector(t.errorText,e);if(i===void 0)return;let s=structuredClone(i);if(typeof s!="string")throw new TypeError("TypedRequest error projector must return a string or undefined");return s}catch{cp(n);return}},"snapshotError"),B_=o((t,e,r)=>{let n=A_(t,r),i=F_(t.payload,n,e,r),s=$_(t,n,e,r),a={correlationId:t.correlationId,method:t.method,direction:t.direction,phase:t.phase,timestamp:t.timestamp,...t.durationMs===void 0?{}:{durationMs:t.durationMs},hasError:t.errorText!==void 0,...i,...s===void 0?{}:{error:s}};try{return Object.freeze(a)}catch{cp(r);let l={correlationId:t.correlationId,method:t.method,direction:t.direction,phase:t.phase,timestamp:t.timestamp,...t.durationMs===void 0?{}:{durationMs:t.durationMs},hasError:t.errorText!==void 0,payload:Ts,payloadRedacted:!0};try{return Object.freeze(l)}catch{return l}}},"projectLogEntry"),Rd=o((t,e)=>{try{let r=t.hooks[e];if(typeof r!="function")return;let n=t.projectedRegistrationsByPhase[e];return{callback:r,projectionOptions:n?.callback===r?wk(n.projectionOptions):{}}}catch{Ld(e);return}},"snapshotDispatchRecipient"),Ad=o((t,e,r)=>{let n=B_(r,t.projectionOptions,e);try{let i=t.callback(n);i&&typeof i.then=="function"&&Promise.resolve(i).catch(()=>{Ld(e)})}catch{Ld(e)}},"dispatchToRecipient"),Cs=o((t,e,r)=>{let n=Es();if(n.subscribers.size===0){let a=Rd(n.legacy,t),l=r?Rd(r,t):void 0;if(!a&&!l)return;a&&Ad(a,t,e),l&&Ad(l,t,e);return}let s=[n.legacy,...Array.from(n.subscribers.values()),...r?[r]:[]].map(a=>Rd(a,t)).filter(a=>!!a);for(let a of s)Ad(a,t,e)},"dispatchTypedRequestHook");var hp=class{static{o(this,"TypedTools")}constructor(e){this.localData={},this.abortSignal=e??new AbortController().signal}async passGuards(e,r){let n=new Qa.GuardSet(e);if(!await n.allGuardsPass(r)){let s=await n.getFailedHint(r);throw new ur(`guard failed: ${s}`,{failedHint:s})}}};var aCe=16,lCe=1024,Ck=Symbol.for("@api.global/typedrequest:global-error-reporter"),Fd=o(()=>{let t=globalThis[Ck];if(t&&typeof t=="object")return t;let e={reporter:void 0};return globalThis[Ck]=e,e},"getRealmGlobalErrorReporterState"),j_=o(()=>Fd().reporter,"getGlobalTypedRequestErrorReporter"),Mk=o(t=>{let e=Fd();e.reporter=t;let r=!1;return()=>{r||(r=!0,e.reporter===t&&(e.reporter=void 0))}},"setGlobalTypedRequestErrorReporter"),Ik=o(()=>{Fd().reporter=void 0},"clearGlobalTypedRequestErrorReporter"),Gi=o(t=>{let e=t.replace(/[\u0000-\u001f\u007f]/g," ");return e.length<=1024?e:`${e.slice(0,1024)}...[truncated]`},"sanitizeLogText"),z_=o(t=>{try{let e=t.name;if(typeof e=="string"&&e.length>0)return Gi(e)}catch{}try{let e=t.constructor?.name;if(typeof e=="string"&&e.length>0)return Gi(e)}catch{}return"Error"},"readErrorName"),W_=o(t=>{try{let e=t.message;return typeof e=="string"?Gi(e):""}catch{return""}},"readErrorMessage"),H_=o(t=>{if(t instanceof Error)return{name:z_(t),message:W_(t)};if(t===null)return{name:"null",message:""};let e=typeof t;if(e==="object"||e==="function"){let n=e;try{let i=t?.constructor?.name;typeof i=="string"&&i.length>0&&(n=Gi(i))}catch{}return{name:"NonErrorThrowable",message:`<non-Error ${n} thrown>`}}let r="";try{r=Gi(String(t))}catch{}return{name:`NonErrorThrowable(${e})`,message:r}},"describeThrowable"),U_=o(t=>{if(!(t===null||typeof t!="object"&&typeof t!="function"))try{return t.cause}catch{return}},"readCause"),q_=o(t=>{let e=[],r=new Set,n=t;for(;e.length<16;){if(n!==null&&(typeof n=="object"||typeof n=="function")){if(r.has(n))break;r.add(n)}e.push(H_(n));let i=U_(n);if(i===void 0)break;n=i}return e},"buildChain"),Y_=o(t=>{if(t instanceof Error)try{return typeof t.stack=="string"?t.stack:void 0}catch{return}},"readStack"),Ok=o((t,e)=>t==="handler"?`TypedRequest handler '${e}' failed`:t==="requestscope"?`TypedRequest request scope for method '${e}' failed`:`TypedRequest middleware for method '${e}' failed`,"buildPrefix"),V_=o(t=>t.map(e=>e.message.length>0?`${e.name}: ${e.message}`:e.name).join(" <- caused by: "),"renderChain"),K_=o(t=>{let e=Gi(String(t.method)),r=q_(t.error),n=typeof t.correlationId=="string"&&t.correlationId.length>0?Gi(t.correlationId):void 0,i=n?` [correlation ${n}]`:"",s=`${Ok(t.origin,e)}${i}: ${V_(r)}`,a=Y_(t.error);return{origin:t.origin,method:e,...n===void 0?{}:{correlationId:n},chain:Object.freeze(r),formatted:s,...a===void 0?{}:{stack:a},error:t.error}},"buildTypedRequestErrorReport"),$d=o(t=>{try{console.error(t.formatted)}catch{}},"printDefaultReport"),Os=o(t=>{let e;try{e=K_(t)}catch{try{console.error(`${Ok(t.origin,String(t.method))}: <error description unavailable>`)}catch{}return}let r=j_();if(!r){$d(e);return}try{let n=r(e);n&&typeof n.then=="function"&&Promise.resolve(n).catch(()=>{$d(e)})}catch{$d(e)}},"reportTypedRequestError");var Bd=class t{static{o(this,"TypedHandler")}static{this.internalErrorMessage="Internal server error"}constructor(e,r){this.method=e,this.handlerFunction=r}async addResponse(e,r){if(e.method!==this.method)throw new Error("this handler has been given a wrong method to answer to. Please use a TypedRouter to filter requests");let n,i=new hp(r);e.localData&&(i.localData=e.localData);let s=await this.handlerFunction(e.request,i).catch(a=>{a instanceof ur?n=a:(Os({origin:"handler",method:this.method,correlationId:e.correlation?.id,error:a}),n=new ur(t.internalErrorMessage))});return n&&(e.error={text:n.errorText,data:n.errorData}),s&&(e.response=s),e?.correlation?.phase&&(e.correlation.phase="response"),e}};var G_=[],Nk=o(async(t,e,r,n,i)=>{if(e>=t.length){await r();return}let s=t[e],a=!1,l=!1,c=!1,u,f,p=o(()=>{if(a)throw new TypeError("A TypedRouter request scope called next() more than once");if(l)throw new TypeError("A TypedRouter request scope called next() after it returned");a=!0;let d=Nk(t,e+1,r,n,i);f=d.then(()=>{c=!0},y=>{c=!0,u={error:y}});let g=d.then(()=>{});return g.catch(()=>{}),g},"next"),h;try{await s(n,p,i)}catch(d){h={error:d}}l=!0;let m=a&&!c;if(f&&await f,m)throw u&&h&&h.error!==u.error&&Os({origin:"requestscope",method:i.method,correlationId:n.correlation?.id,error:h.error}),u?u.error:h?h.error:new TypeError("A TypedRouter request scope returned before next() settled");if(h)throw h.error},"runTypedRouterRequestScopeChain");function mp(t){let e=t?.method,r=t?.correlation?.id,n=t?.requestInstanceId;if(!(typeof e!="string"||e.length===0||typeof r!="string"||r.length===0||typeof n!="string"||n.length===0))return JSON.stringify([e,r,n])}o(mp,"getTypedRequestResponseInterestKey");var jd=class t{static{o(this,"TypedRouter")}constructor(){this.hookRegistrationState=up(),this.routerMap=new vt.ObjectMap,this.fallbackRouterMap=new vt.ObjectMap,this.fallbackParentRouters=new Set,this.handlerMap=new vt.ObjectMap,this.middlewares=[],this.requestScopes=[],this.fireEventInterestMap=new vt.InterestMap(e=>e)}static{this.internalErrorMessage="Internal server error"}registerVirtualStreamTransportResolver(e){if(typeof e!="function")throw new TypeError("TypedRouter virtual stream transport resolver must be a function");if(this.virtualStreamTransportResolver)throw new Error("TypedRouter already has a virtual stream transport resolver owner");this.virtualStreamTransportResolver=e;let r=!1;return()=>{r||(r=!0,this.virtualStreamTransportResolver===e&&(this.virtualStreamTransportResolver=void 0))}}registerIncomingRequestAuthorityGuard(e){if(typeof e!="function")throw new TypeError("TypedRouter incoming request authority guard must be a function");if(this.incomingRequestAuthorityGuard)throw new Error("TypedRouter already has an incoming request authority guard owner");this.incomingRequestAuthorityGuard=e;let r=!1;return()=>{r||(r=!0,this.incomingRequestAuthorityGuard===e&&(this.incomingRequestAuthorityGuard=void 0))}}registerIncomingRequestSignalResolver(e){if(typeof e!="function")throw new TypeError("TypedRouter incoming request signal resolver must be a function");if(this.incomingRequestSignalResolver)throw new Error("TypedRouter already has an incoming request signal resolver owner");this.incomingRequestSignalResolver=e;let r=!1;return()=>{r||(r=!0,this.incomingRequestSignalResolver===e&&(this.incomingRequestSignalResolver=void 0))}}registerIncomingResponseAuthorityGuard(e){if(typeof e!="function")throw new TypeError("TypedRouter incoming response authority guard must be a function");if(this.incomingResponseAuthorityGuard)throw new Error("TypedRouter already has an incoming response authority guard owner");this.incomingResponseAuthorityGuard=e;let r=!1;return()=>{r||(r=!0,this.incomingResponseAuthorityGuard===e&&(this.incomingResponseAuthorityGuard=void 0))}}static get globalHooks(){return vk()}static set globalHooks(e){kk(e)}static setGlobalHooks(e,r){Tk(e,r)}static addGlobalHooks(e,r){return Ek(e,r)}static clearGlobalHooks(){Dk()}static setGlobalErrorReporter(e){return Mk(e)}static clearGlobalErrorReporter(){Ik()}get hooks(){return this.hookRegistrationState.hooks}set hooks(e){pp(this.hookRegistrationState,e)}setHooks(e,r){fp(this.hookRegistrationState,e,r)}callHook(e,r){Cs(e,r,this.hookRegistrationState)}setErrorFromCaughtError(e,r,n){if(r instanceof ur){e.error={text:r.errorText,data:r.errorData??{}};return}Os({origin:n,method:e.method,correlationId:e.correlation?.id,error:r}),e.error={text:t.internalErrorMessage,data:{}}}addMiddleware(e){this.middlewares.push(e)}addRequestScope(e){if(typeof e!="function")throw new TypeError("TypedRouter request scope must be a function");let r={scope:e};this.requestScopes.push(r);let n=!1;return()=>{if(n)return;n=!0;let i=this.requestScopes.indexOf(r);i!==-1&&this.requestScopes.splice(i,1)}}collectRequestScopes(e){let r;for(let n of e){let i=n.requestScopes;if(!(!i||i.length===0)){r??=[];for(let s of i)r.push(s.scope)}}return r??G_}addTypedHandler(e){if(this.getTypedHandlerForMethod(e.method))throw new Error(`a TypedHandler for ${e.method} alredy exists! Can't add another one.`);this.handlerMap.add(e);try{this.validateAffectedCompositionRoots()}catch(n){throw this.handlerMap.remove(e),n}}addTypedRouter(e){if(e===this)throw new Error("A TypedRouter cannot be composed with itself.");if(this.routerMap.findSync(a=>a===e))return()=>{};let n=this.canReachRouter(e),i=e.canReachRouter(this);if(n!==i)throw new Error("Cannot add a bidirectional TypedRouter edge across an existing composition boundary.");this.routerMap.add(e),e.routerMap.add(this);try{this.validateAffectedCompositionRoots()}catch(a){throw this.routerMap.remove(e),e.routerMap.remove(this),a}let s=!1;return()=>{s||(s=!0,this.routerMap.remove(e),e.routerMap.remove(this))}}addFallbackRouter(e){if(e===this)throw new Error("A TypedRouter cannot use itself as a fallback.");if(this.fallbackRouterMap.findSync(n=>n===e))return()=>{};if(e.canReachRouter(this))throw new Error("Adding this fallback would create a TypedRouter composition cycle.");this.fallbackRouterMap.add(e),e.fallbackParentRouters.add(this);try{this.validateAffectedCompositionRoots()}catch(n){throw this.fallbackRouterMap.remove(e),e.fallbackParentRouters.delete(this),n}let r=!1;return()=>{r||(r=!0,this.fallbackRouterMap.remove(e),e.fallbackParentRouters.delete(this))}}getMethodNames(){return[...this.collectReachableHandlers().keys()].sort()}canReachRouter(e,r=new Set){if(this===e)return!0;if(r.has(this))return!1;r.add(this);for(let n of[...this.routerMap.getArray(),...this.fallbackRouterMap.getArray()])if(n.canReachRouter(e,r))return!0;return!1}collectReachableHandlers(e=new Set,r=new Map){if(e.has(this))return r;e.add(this);for(let n of this.handlerMap.getArray()){let i=r.get(n.method);i||(i=new Set,r.set(n.method,i)),i.add(this)}for(let n of[...this.routerMap.getArray(),...this.fallbackRouterMap.getArray()])n.collectReachableHandlers(e,r);return r}getAffectedCompositionRoots(){let e=new Set,r=[this];for(;r.length>0;){let n=r.pop();e.has(n)||(e.add(n),r.push(...n.routerMap.getArray(),...n.fallbackParentRouters))}return e}validateAffectedCompositionRoots(){for(let e of this.getAffectedCompositionRoots())for(let[r,n]of e.collectReachableHandlers())if(n.size>1)throw new Error(`TypedRouter composition exposes more than one handler for method "${r}".`)}checkForTypedHandler(e){return!!this.getTypedHandlerForMethod(e)}getTypedHandlerForMethod(e,r=[]){r.push(this);let n;return n=this.handlerMap.findSync(i=>i.method===e),n||this.routerMap.getArray().forEach(i=>{!n&&!r.includes(i)&&(n=i.getTypedHandlerForMethod(e,r))}),n||this.fallbackRouterMap.getArray().forEach(i=>{!n&&!r.includes(i)&&(n=i.getTypedHandlerForMethod(e,r))}),n}getTypedHandlerAndRouter(e,r=[]){r.push(this);let n=this.handlerMap.findSync(i=>i.method===e);if(n)return{handler:n,router:this,routerPath:[this]};for(let i of this.routerMap.getArray())if(!r.includes(i)){let s=i.getTypedHandlerAndRouter(e,r);if(s)return{...s,routerPath:[this,...s.routerPath??[s.router]]}}for(let i of this.fallbackRouterMap.getArray())if(!r.includes(i)){let s=i.getTypedHandlerAndRouter(e,r);if(s)return{...s,routerPath:[this,...s.routerPath??[s.router]]}}return null}static{this.defaultRouteOptions={localRequest:!1,skipHooks:!1}}async routeAndAddResponse(e,r={}){if(!e||typeof e!="object")return null;let n;try{n=Object.prototype.propertyIsEnumerable.call(e,"localData")}catch{return null}let i={...t.defaultRouteOptions,...r};if(!this.sanitizeIncomingLocalData(e))return null;let s=Object.freeze({...i.trustedLocalData??{}});if(e?.correlation?.phase==="response"){let d=mp(e);if(!d)return null;if(this.incomingResponseAuthorityGuard){let g=Object.freeze({typedRouter:this,trustedLocalData:s,wireLocalDataPresent:n}),y=!1;try{y=this.incomingResponseAuthorityGuard(e,g)===!0}catch{}if(!y)return null}return i.skipHooks||this.callHook("onIncomingResponse",{correlationId:e.correlation.id,method:e.method,direction:"incoming",phase:"response",timestamp:Date.now(),payload:e.response,errorText:e.error?.text}),this.fireEventInterestMap.findInterest(d)?.fullfillInterest(e),null}if(e?.correlation?.phase!=="request"||typeof e.correlation.id!="string"||e.correlation.id.length===0||typeof e.method!="string"||e.method.length===0||!e.request||typeof e.request!="object")return console.log("TypedRouter received a malformed request DTO"),null;if(this.incomingRequestAuthorityGuard){let d=Object.freeze({typedRouter:this,trustedLocalData:s,wireLocalDataPresent:n}),g=!1;try{g=this.incomingRequestAuthorityGuard(e,d)===!0}catch{}if(!g)return null}let a,l=i.trustedAbortSignal;if(l!==void 0&&!this.isAbortSignal(l))throw new TypeError("TypedRouter trustedAbortSignal must be an AbortSignal");if(!l&&this.incomingRequestSignalResolver){if(typeof e.requestInstanceId!="string"||e.requestInstanceId.length===0)return null;let d=Object.freeze({typedRouter:this,trustedLocalData:s,wireLocalDataPresent:n});try{a=this.incomingRequestSignalResolver(e,d)}catch{return null}if(a&&(!this.isAbortSignal(a.abortSignal)||typeof a.complete!="function")){try{a.complete?.()}catch{}return null}l=a?.abortSignal}let c;try{c=this.virtualStreamTransportResolver?.(s)}catch(d){try{a?.complete()}catch{}throw d}let u=new bn,f=new bn,p=o(async d=>{await Promise.allSettled([u.rollback(d),f.rollback(d)])},"rollbackRouteActivations"),h=o(()=>{u.commit(),f.commit()},"commitRouteActivations"),m=o(async()=>(delete e.localData,Dr.encodePayloadForNetwork(e,{side:"responding",virtualStreamTransport:c,activationScope:f})),"encodeResponse");try{if(e=await Dr.decodePayloadFromNetworkAsync(e,{side:"responding",virtualStreamTransport:c,activationScope:u,abortSignal:l}),e.localData={...s},e.localData.firstTypedrouter=this,e?.correlation?.phase==="request"){let d=Date.now();i.skipHooks||this.callHook("onIncomingRequest",{correlationId:e.correlation?.id||"unknown",method:e.method,direction:"incoming",phase:"request",timestamp:d,payload:e.request});let g=this.getTypedHandlerAndRouter(e.method);if(!g)return console.log(`Cannot find handler for methodname ${e.method}`),e.error={text:"There is no available method for this call on the server side",data:{}},e.correlation.phase="response",e=await m(),await p(e.error),i.skipHooks||this.callHook("onOutgoingResponse",{correlationId:e.correlation?.id||"unknown",method:e.method,direction:"outgoing",phase:"response",timestamp:Date.now(),durationMs:Date.now()-d,payload:e.response,errorText:e.error?.text}),this.assertTrustedAbortSignalActive(l),e;let{handler:y,router:x}=g,T=g.routerPath??[x],E,_,P=!1,D=o(async()=>{try{if(x.middlewares.length>0)try{for(let W of x.middlewares)await W(e)}catch(W){E={value:W},this.setErrorFromCaughtError(e,W,"middleware"),e.correlation.phase="response",P=!0;return}u.authorizeApplicationUse(),e=await y.addResponse(e,l),P=!0}catch(W){throw _={error:W},W}},"runMiddlewareAndHandler"),F=this.collectRequestScopes(T);if(F.length===0)await D();else{let W=Object.freeze({entryRouter:this,owningRouter:x,method:e.method,localData:s,abortSignal:l}),C;try{await Nk(F,0,D,e,W)}catch(le){if(_&&le===_.error)throw le;C={error:le}}if(C)e.response=null,this.setErrorFromCaughtError(e,C.error,"requestscope"),e.correlation.phase="response",E={value:C.error};else if(!P){if(!e.error&&(e.response===void 0||e.response===null)){let le=new Error("A TypedRouter request scope answered with neither a response nor an error");Os({origin:"requestscope",method:e.method,correlationId:e.correlation?.id,error:le}),e.error={text:t.internalErrorMessage,data:{}},E={value:le}}e.correlation.phase="response"}}let A=!!e.error;return e=await m(),A&&await p(E?E.value:e.error),i.skipHooks||this.callHook("onOutgoingResponse",{correlationId:e.correlation?.id||"unknown",method:e.method,direction:"outgoing",phase:"response",timestamp:Date.now(),durationMs:Date.now()-d,payload:e.response,errorText:e.error?.text}),A||(this.assertTrustedAbortSignalActive(l),h()),this.assertTrustedAbortSignalActive(l),e}return await p(new Error("TypedRouter received an unroutable request DTO")),this.assertTrustedAbortSignalActive(l),null}catch(d){throw await p(d),d}finally{try{a?.complete()}catch{}}}sanitizeIncomingLocalData(e){try{let r=Reflect.getOwnPropertyDescriptor(e,"localData");if(r&&(r.configurable!==!0||!Reflect.deleteProperty(e,"localData")))return!1;if(!Reflect.has(e,"localData"))return!0;if(!Reflect.isExtensible(e)||!Reflect.defineProperty(e,"localData",{configurable:!0,enumerable:!1,value:void 0,writable:!0}))return!1;let n=Reflect.getOwnPropertyDescriptor(e,"localData");return!!(n&&n.configurable===!0&&n.enumerable===!1&&n.value===void 0&&n.writable===!0)}catch{return!1}}isAbortSignal(e){return!!(e&&typeof e=="object"&&typeof Reflect.get(e,"aborted")=="boolean"&&typeof Reflect.get(e,"addEventListener")=="function"&&typeof Reflect.get(e,"removeEventListener")=="function")}assertTrustedAbortSignalActive(e){if(e?.aborted)throw e.reason??new DOMException("The operation was aborted","AbortError")}};var zd=class{static{o(this,"TypedTarget")}constructor(e){if(this.isAsync=!1,e.postMethodWithTypedRouter&&!e.typedRouterRef)throw new Error("you have to specify a typedrouter when using postmethod with typedrouter");let r=e.responseTimeoutMs??3e4;if(!Number.isSafeInteger(r)||r<=0||r>2147483647)throw new RangeError("TypedTarget responseTimeoutMs must be a positive safe integer no greater than 2147483647");this.options=e,this.responseTimeoutMs=r}async post(e,r={}){if(r.signal&&this.options.supportsAbortSignal!==!0)throw new Error("TypedTarget does not declare AbortSignal transport support");let n=this.options.postMethod||this.options.postMethodWithTypedRouter;if(!n)throw new Error("TypedTarget requires a post method");let i;if(this.options.typedRouterRef){let f=mp(e);if(!f)throw new TypeError("TypedTarget request response identity is malformed");i=await this.options.typedRouterRef.fireEventInterestMap.addInterest(f,e)}let s=r.signal;if(s?.aborted)throw i?.destroy(),s.reason??new DOMException("The operation was aborted","AbortError");let a,l=s?new Promise((f,p)=>{a=o(()=>{i?.destroy(),p(s.reason??new DOMException("The operation was aborted","AbortError"))},"abortListener"),s.addEventListener("abort",a,{once:!0})}):void 0,c,u=i?new Promise((f,p)=>{c=setTimeout(()=>{p(new Error(`TypedTarget response timed out after ${this.responseTimeoutMs}ms`))},this.responseTimeoutMs),c.unref?.()}):void 0;try{let f=Promise.resolve(n(e,r)),p=await Promise.race([f,...u?[u]:[],...l?[l]:[]]);return i?await Promise.race([i.interestFullfilled,u,...l?[l]:[]]):p||e}finally{c&&clearTimeout(c),s&&a&&s.removeEventListener("abort",a),i?.destroy()}}};var dp=new ni.WebrequestClient,gp=2147483647,yp=class extends Error{static{o(this,"TypedRequestTimeoutError")}constructor(e,r){super(`Typed request "${e}" timed out after ${r}ms`),this.name="TypedRequestTimeoutError",this.method=e,this.timeoutMs=r}},xp=class extends Error{static{o(this,"TypedRequestRetryLimitError")}constructor(e,r){super(`Typed request "${e}" exceeded its ${r} server-directed retries`),this.name="TypedRequestRetryLimitError",this.method=e,this.maxRetries=r}},bp=class{static{o(this,"TypedRequest")}constructor(e,r){this.skipHooks=!1,typeof e=="string"?this.urlEndPoint=e:this.typedTarget=e,this.method=r}async fire(e,r=!1){let n=Date.now(),i=this.resolveFireOptions(r),s=this.createAbortContext(i);i.abortSignal=s.signal;let a=new bn,l={method:this.method,request:e,response:null,requestInstanceId:nl.uni(),correlation:{id:nl.uni(),phase:"request"}};try{this.assertActive(i);let c=Dr.encodePayloadForNetworkWithMetadata(l,{side:"requesting",activationScope:a,virtualStreamTransport:this.typedTarget?.options.virtualStreamTransport});l=c.payload;let u=c.containsNetworkDescriptor;if(u&&!this.urlEndPoint&&this.typedTarget.options.supportsAbortSignal!==!0)throw new Error("VirtualStreams require TypedTarget AbortSignal transport support");if(i.useCache&&u)throw new Error("TypedRequest response caching is not supported for requests containing VirtualStreams");this.assertActive(i),i.useCache&&(i.cacheKey=await this.createCacheKey(l),this.assertActive(i)),this.skipHooks||Cs("onOutgoingRequest",{correlationId:l.correlation.id,method:this.method,direction:"outgoing",phase:"request",timestamp:n,payload:e}),a.publish();let f=await this.postTrObject(l,i);delete f.localData;let p=f.error;if(this.assertActive(i),p)throw this.skipHooks||Cs("onIncomingResponse",{correlationId:l.correlation.id,method:this.method,direction:"incoming",phase:"response",timestamp:Date.now(),durationMs:Date.now()-n,payload:f.response,errorText:p.text}),this.assertActive(i),new ur(p.text,p.data);let h=f.response;if(!this.urlEndPoint&&this.typedTarget.options.supportsAbortSignal!==!0&&Dr.containsNetworkDescriptor(h))throw new Error("VirtualStreams require TypedTarget AbortSignal transport support");try{h=await Dr.decodePayloadFromNetworkAsync(h,{side:"requesting",activationScope:a,virtualStreamTransport:this.typedTarget?.options.virtualStreamTransport,openDeadlineAt:i.deadlineAt,abortSignal:i.abortSignal})}catch(m){throw m instanceof Ki&&i.deadlineAt!==void 0&&m.deadlineAt===i.deadlineAt?this.createTimeoutError(i):m}return this.assertActive(i),a.authorizeApplicationUse(),this.skipHooks||Cs("onIncomingResponse",{correlationId:l.correlation.id,method:this.method,direction:"incoming",phase:"response",timestamp:Date.now(),durationMs:Date.now()-n,payload:h}),this.assertActive(i),a.commit(),h}catch(c){throw await a.rollback(c),c}finally{s.cleanup()}}async postTrObject(e,r={useCache:!1,maxRetries:3}){let n=0;for(;;){this.assertActive(r);let i=this.createRequestIdentitySnapshot(e),s;if(this.urlEndPoint){let a;try{a=await dp.postJsonWithMetadata(this.urlEndPoint,e,{cacheStrategy:r.useCache?"cache-first":"network-only",cacheKey:r.cacheKey,timeout:this.getRemainingTimeout(r),signal:r.abortSignal})}catch(l){throw r.cacheKey&&l instanceof SyntaxError&&await dp.deleteCache(r.cacheKey),r.abortSignal?.aborted?this.getAbortReason(r):r.timeoutMs!==void 0&&(this.hasDeadlineExpired(r)||ni.isWebrequestTimeoutError(l))?this.createTimeoutError(r):l}s=a.data;try{a.metadata.fromCache?s=this.reconstructCachedHttpResponse(s,e,i):this.assertResponseEnvelope(s,i)}catch(l){throw r.cacheKey&&await dp.deleteCache(r.cacheKey),l}r.cacheKey&&!this.isReusableCachedHttpEnvelope(s)&&await dp.deleteCache(r.cacheKey)}else s=await this.postTypedTarget(e,r);if(this.assertResponseEnvelope(s,i),this.assertActive(r),s.error&&!s.retry||!s.retry)return s;if(console.log(`Server requested a retry for TypedRequest method '${this.method}'`),n>=r.maxRetries)throw new xp(this.method,r.maxRetries);n+=1,await this.waitForRetry(s.retry.waitForMs,r),e.requestInstanceId=nl.uni(),e.correlation.phase="request",e.response=null,delete e.error,delete e.retry}}assertResponseEnvelope(e,r){let n=e?.error,i=e?.requestInstanceId,s=r.requestInstanceId;if(!e||typeof e!="object"||e.method!==r.method||e.correlation?.phase!=="response"||typeof e.correlation.id!="string"||e.correlation.id.length===0||!Object.hasOwn(e,"response")||typeof i!="string"||i.length===0||typeof s!="string"||s.length===0||i!==s||n!==void 0&&(!n||typeof n!="object"||typeof n.text!="string")||e.correlation.id!==r.correlationId)throw new TypeError("TypedRequest received an invalid response envelope")}async postTypedTarget(e,r){this.assertActive(r);try{return await this.typedTarget.post(e,{signal:r.abortSignal})}catch(n){throw r.abortSignal?.aborted?this.getAbortReason(r):n}}resolveFireOptions(e){let r=typeof e=="boolean"?{useCache:e}:e;if(!r||typeof r!="object")throw new TypeError("TypedRequest fire options must be a boolean or an options object");if(r.useCache!==void 0&&typeof r.useCache!="boolean")throw new TypeError("TypedRequest useCache must be a boolean");if(r.timeoutMs!==void 0&&(!Number.isSafeInteger(r.timeoutMs)||r.timeoutMs<=0||r.timeoutMs>gp))throw new RangeError(`TypedRequest timeoutMs must be a positive safe integer no greater than ${gp}`);if(r.abortSignal!==void 0&&!this.isAbortSignal(r.abortSignal))throw new TypeError("TypedRequest abortSignal must be an AbortSignal");if(r.maxRetries!==void 0&&(!Number.isSafeInteger(r.maxRetries)||r.maxRetries<0||r.maxRetries>1e3))throw new RangeError("TypedRequest maxRetries must be a safe integer between 0 and 1000");if((r.timeoutMs!==void 0||r.abortSignal!==void 0)&&!this.urlEndPoint&&this.typedTarget.options.supportsAbortSignal!==!0)throw new Error(r.abortSignal?"TypedRequest cancellation requires an HTTP URL or a TypedTarget with AbortSignal support":"TypedRequest timeoutMs requires an HTTP URL or a TypedTarget with AbortSignal support");return{useCache:r.useCache??!1,timeoutMs:r.timeoutMs,maxRetries:r.maxRetries??3,abortSignal:r.abortSignal,deadlineAt:r.timeoutMs===void 0?void 0:performance.now()+r.timeoutMs}}getRemainingTimeout(e){if(e.deadlineAt===void 0||e.timeoutMs===void 0)return;let r=Math.ceil(e.deadlineAt-performance.now());if(r<=0)throw this.createTimeoutError(e);return r}assertDeadline(e){this.getRemainingTimeout(e)}assertActive(e){if(e.abortSignal?.aborted)throw this.getAbortReason(e);this.assertDeadline(e)}hasDeadlineExpired(e){return e.deadlineAt!==void 0&&performance.now()>=e.deadlineAt}createTimeoutError(e){return new yp(this.method,e.timeoutMs)}async waitForRetry(e,r){if(!Number.isSafeInteger(e)||e<=0||e>gp)throw new RangeError(`TypedRequest retry waitForMs must be a positive safe integer no greater than ${gp}`);this.assertActive(r);let n=this.getRemainingTimeout(r);if(n===void 0){await this.delayWithAbort(e,r);return}if(e>=n)throw await this.delayWithAbort(n,r),this.createTimeoutError(r);await this.delayWithAbort(e,r),this.assertActive(r)}async delayWithAbort(e,r){let n=r.abortSignal;if(!n){await be.delayFor(e);return}await new Promise((i,s)=>{let a=setTimeout(()=>{n.removeEventListener("abort",l),i()},e),l=o(()=>{clearTimeout(a),n.removeEventListener("abort",l),s(this.getAbortReason(r))},"onAbort");n.addEventListener("abort",l,{once:!0}),n.aborted&&l()})}createAbortContext(e){let r=e.abortSignal;if(e.timeoutMs===void 0)return{signal:r,cleanup:o(()=>{},"cleanup")};let n=new AbortController,i=o(()=>{n.abort(r?.reason??new DOMException("The operation was aborted","AbortError"))},"onCallerAbort");r?.aborted?i():r?.addEventListener("abort",i,{once:!0});let s=Math.max(0,Math.ceil(e.deadlineAt-performance.now())),a=setTimeout(()=>{n.abort(this.createTimeoutError(e))},s);return a.unref?.(),{signal:n.signal,cleanup:o(()=>{clearTimeout(a),r?.removeEventListener("abort",i)},"cleanup")}}getAbortReason(e){return e.abortSignal?.reason??new DOMException("The operation was aborted","AbortError")}reconstructCachedHttpResponse(e,r,n){if(!e||typeof e!="object"||Array.isArray(e)||e.method!==n.method||!Object.hasOwn(e,"response")||!e.response||typeof e.response!="object"||!this.isReusableCachedHttpEnvelope(e))throw new TypeError("TypedRequest received an invalid cached response envelope");return{method:n.method,request:r.request,response:e.response,requestInstanceId:n.requestInstanceId,correlation:{id:n.correlationId,phase:"response"}}}createRequestIdentitySnapshot(e){return Object.freeze({method:e.method,correlationId:e.correlation?.id,requestInstanceId:e.requestInstanceId})}isReusableCachedHttpEnvelope(e){return!Object.hasOwn(e,"error")&&!Object.hasOwn(e,"retry")&&!Dr.containsNetworkDescriptor(e)}isAbortSignal(e){return!!(e&&typeof e=="object"&&typeof Reflect.get(e,"aborted")=="boolean"&&typeof Reflect.get(e,"addEventListener")=="function"&&typeof Reflect.get(e,"removeEventListener")=="function")}async createCacheKey(e){let r=JSON.stringify({endpoint:this.urlEndPoint,method:e.method,request:e.request}),n=await crypto.subtle.digest("SHA-256",new TextEncoder().encode(r));return`typedrequest:v1:${Array.from(new Uint8Array(n),s=>s.toString(16).padStart(2,"0")).join("")}`}};function Pk(t){return t&&typeof t.then=="function"}o(Pk,"isPromise");var _k=Promise.resolve(!1),YCe=Promise.resolve(!0),nn=Promise.resolve();function wp(t,e){return t||(t=0),new Promise(function(r){return setTimeout(function(){return r(e)},t)})}o(wp,"sleep");function Lk(t,e){return Math.floor(Math.random()*(e-t+1)+t)}o(Lk,"randomInt");function il(){return Math.random().toString(36).substring(2)}o(il,"randomToken");var Wd=0;function wn(){var t=Date.now()*1e3;return t<=Wd&&(t=Wd+1),Wd=t,t}o(wn,"microSeconds");function VCe(){return typeof navigator<"u"&&typeof navigator.locks<"u"&&typeof navigator.locks.request=="function"}o(VCe,"supportsWebLockAPI");var J_=wn,Q_="native";function X_(t){var e={time:wn(),messagesCallback:null,bc:new BroadcastChannel(t),subFns:[]};return e.bc.onmessage=function(r){e.messagesCallback&&e.messagesCallback(r.data)},e}o(X_,"create");function Z_(t){t.bc.close(),t.subFns=[]}o(Z_,"close");function eL(t,e){try{return t.bc.postMessage(e,!1),nn}catch(r){return Promise.reject(r)}}o(eL,"postMessage");function tL(t,e){t.messagesCallback=e}o(tL,"onMessage");function rL(){if(typeof globalThis<"u"&&globalThis.Deno&&globalThis.Deno.args)return!0;if((typeof window<"u"||typeof self<"u")&&typeof BroadcastChannel=="function"){if(BroadcastChannel._pubkey)throw new Error("BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill");return!0}else return!1}o(rL,"canBeUsed");function nL(){return 150}o(nL,"averageResponseTime");var Rk={create:X_,close:Z_,onMessage:tL,postMessage:eL,canBeUsed:rL,type:Q_,averageResponseTime:nL,microSeconds:J_};var Ms=class{static{o(this,"ObliviousSet")}ttl;map=new Map;_to=!1;constructor(e){this.ttl=e}has(e){let r=this.map.get(e);return typeof r>"u"?!1:r<Hd()-this.ttl?(this.map.delete(e),!1):!0}add(e){this.map.delete(e),this.map.set(e,Hd()),this._to||(this._to=!0,setTimeout(()=>{this._to=!1,iL(this)},0))}clear(){this.map.clear()}};function iL(t){let e=Hd()-t.ttl,r=t.map[Symbol.iterator]();for(;;){let n=r.next().value;if(!n)break;let i=n[0];if(n[1]<e)t.map.delete(i);else break}}o(iL,"removeTooOldValues");function Hd(){return Date.now()}o(Hd,"now");function Ji(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=JSON.parse(JSON.stringify(t));return typeof e.webWorkerSupport>"u"&&(e.webWorkerSupport=!0),e.idb||(e.idb={}),e.idb.ttl||(e.idb.ttl=1e3*45),e.idb.fallbackInterval||(e.idb.fallbackInterval=150),t.idb&&typeof t.idb.onclose=="function"&&(e.idb.onclose=t.idb.onclose),e.localstorage||(e.localstorage={}),e.localstorage.removeTimeout||(e.localstorage.removeTimeout=1e3*60),t.methods&&(e.methods=t.methods),e.node||(e.node={}),e.node.ttl||(e.node.ttl=1e3*60*2),e.node.maxParallelWrites||(e.node.maxParallelWrites=2048),typeof e.node.useFastPath>"u"&&(e.node.useFastPath=!0),e}o(Ji,"fillOptionsWithDefaults");var oL=wn,sL="pubkey.broadcast-channel-0-",Cr="messages",ol={durability:"relaxed"},aL="idb";function Ak(){if(typeof indexedDB<"u")return indexedDB;if(typeof window<"u"){if(typeof window.mozIndexedDB<"u")return window.mozIndexedDB;if(typeof window.webkitIndexedDB<"u")return window.webkitIndexedDB;if(typeof window.msIndexedDB<"u")return window.msIndexedDB}return!1}o(Ak,"getIdb");function Sp(t){t.commit&&t.commit()}o(Sp,"commitIndexedDBTransaction");function lL(t){var e=Ak(),r=sL+t,n=e.open(r);return n.onupgradeneeded=function(i){var s=i.target.result;s.createObjectStore(Cr,{keyPath:"id",autoIncrement:!0})},new Promise(function(i,s){n.onerror=function(a){return s(a)},n.onsuccess=function(){i(n.result)}})}o(lL,"createDatabase");function cL(t,e,r){var n=Date.now(),i={uuid:e,time:n,data:r},s=t.transaction([Cr],"readwrite",ol);return new Promise(function(a,l){s.oncomplete=function(){return a()},s.onerror=function(u){return l(u)};var c=s.objectStore(Cr);c.add(i),Sp(s)})}o(cL,"writeMessage");function sOe(t){var e=t.transaction(Cr,"readonly",ol),r=e.objectStore(Cr),n=[];return new Promise(function(i){r.openCursor().onsuccess=function(s){var a=s.target.result;a?(n.push(a.value),a.continue()):(Sp(e),i(n))}})}o(sOe,"getAllMessages");function uL(t,e){var r=t.transaction(Cr,"readonly",ol),n=r.objectStore(Cr),i=[],s=IDBKeyRange.bound(e+1,1/0);if(n.getAll){var a=n.getAll(s);return new Promise(function(c,u){a.onerror=function(f){return u(f)},a.onsuccess=function(f){c(f.target.result)}})}function l(){try{return s=IDBKeyRange.bound(e+1,1/0),n.openCursor(s)}catch{return n.openCursor()}}return o(l,"openCursor"),new Promise(function(c,u){var f=l();f.onerror=function(p){return u(p)},f.onsuccess=function(p){var h=p.target.result;h?h.value.id<e+1?h.continue(e+1):(i.push(h.value),h.continue()):(Sp(r),c(i))}})}o(uL,"getMessagesHigherThan");function fL(t,e){if(t.closed)return Promise.resolve([]);var r=t.db.transaction(Cr,"readwrite",ol),n=r.objectStore(Cr);return Promise.all(e.map(function(i){var s=n.delete(i);return new Promise(function(a){s.onsuccess=function(){return a()}})}))}o(fL,"removeMessagesById");function pL(t,e){var r=Date.now()-e,n=t.transaction(Cr,"readonly",ol),i=n.objectStore(Cr),s=[];return new Promise(function(a){i.openCursor().onsuccess=function(l){var c=l.target.result;if(c){var u=c.value;u.time<r?(s.push(u),c.continue()):(Sp(n),a(s))}else a(s)}})}o(pL,"getOldMessages");function hL(t){return pL(t.db,t.options.idb.ttl).then(function(e){return fL(t,e.map(function(r){return r.id}))})}o(hL,"cleanOldMessages");function mL(t,e){return e=Ji(e),lL(t).then(function(r){var n={closed:!1,lastCursorId:0,channelName:t,options:e,uuid:il(),eMIs:new Ms(e.idb.ttl*2),writeBlockPromise:nn,messagesCallback:null,readQueuePromises:[],db:r};return r.onclose=function(){n.closed=!0,e.idb.onclose&&e.idb.onclose()},Fk(n),n})}o(mL,"create");function Fk(t){t.closed||$k(t).then(function(){return wp(t.options.idb.fallbackInterval)}).then(function(){return Fk(t)})}o(Fk,"_readLoop");function dL(t,e){return!(t.uuid===e.uuid||e.eMIs.has(t.id)||t.data.time<e.messagesCallbackTime)}o(dL,"_filterMessage");function $k(t){return t.closed?nn:t.messagesCallback?uL(t.db,t.lastCursorId).then(function(e){var r=e.filter(function(n){return!!n}).map(function(n){return n.id>t.lastCursorId&&(t.lastCursorId=n.id),n}).filter(function(n){return dL(n,t)}).sort(function(n,i){return n.time-i.time});return r.forEach(function(n){t.messagesCallback&&(t.eMIs.add(n.id),t.messagesCallback(n.data))}),nn}):nn}o($k,"readNewMessages");function gL(t){t.closed=!0,t.db.close()}o(gL,"close");function yL(t,e){return t.writeBlockPromise=t.writeBlockPromise.then(function(){return cL(t.db,t.uuid,e)}).then(function(){Lk(0,10)===0&&hL(t)}),t.writeBlockPromise}o(yL,"postMessage");function xL(t,e,r){t.messagesCallbackTime=r,t.messagesCallback=e,$k(t)}o(xL,"onMessage");function bL(){return!!Ak()}o(bL,"canBeUsed");function wL(t){return t.idb.fallbackInterval*2}o(wL,"averageResponseTime");var Bk={create:mL,close:gL,onMessage:xL,postMessage:yL,canBeUsed:bL,type:aL,averageResponseTime:wL,microSeconds:oL};var SL=wn,vL="pubkey.broadcastChannel-",kL="localstorage";function jk(){var t;if(typeof window>"u")return null;try{t=window.localStorage,t=window["ie8-eventlistener/storage"]||window.localStorage}catch{}return t}o(jk,"getLocalStorage");function zk(t){return vL+t}o(zk,"storageKey");function TL(t,e){return new Promise(function(r){wp().then(function(){var n=zk(t.channelName),i={token:il(),time:Date.now(),data:e,uuid:t.uuid},s=JSON.stringify(i);jk().setItem(n,s);var a=document.createEvent("Event");a.initEvent("storage",!0,!0),a.key=n,a.newValue=s,window.dispatchEvent(a),r()})})}o(TL,"postMessage");function EL(t,e){var r=zk(t),n=o(function(s){s.key===r&&e(JSON.parse(s.newValue))},"listener");return window.addEventListener("storage",n),n}o(EL,"addStorageEventListener");function DL(t){window.removeEventListener("storage",t)}o(DL,"removeStorageEventListener");function CL(t,e){if(e=Ji(e),!Wk())throw new Error("BroadcastChannel: localstorage cannot be used");var r=il(),n=new Ms(e.localstorage.removeTimeout),i={channelName:t,uuid:r,eMIs:n};return i.listener=EL(t,function(s){i.messagesCallback&&s.uuid!==r&&(!s.token||n.has(s.token)||s.data.time&&s.data.time<i.messagesCallbackTime||(n.add(s.token),i.messagesCallback(s.data)))}),i}o(CL,"create");function OL(t){DL(t.listener)}o(OL,"close");function ML(t,e,r){t.messagesCallbackTime=r,t.messagesCallback=e}o(ML,"onMessage");function Wk(){var t=jk();if(!t)return!1;try{var e="__broadcastchannel_check";t.setItem(e,"works"),t.removeItem(e)}catch{return!1}return!0}o(Wk,"canBeUsed");function IL(){var t=120,e=navigator.userAgent.toLowerCase();return e.includes("safari")&&!e.includes("chrome")?t*2:t}o(IL,"averageResponseTime");var Hk={create:CL,close:OL,onMessage:ML,postMessage:TL,canBeUsed:Wk,type:kL,averageResponseTime:IL,microSeconds:SL};var Uk=wn,NL="simulate",Ud=new Set;function PL(t){var e={time:Uk(),name:t,messagesCallback:null};return Ud.add(e),e}o(PL,"create");function _L(t){Ud.delete(t)}o(_L,"close");var qk=5;function LL(t,e){return new Promise(function(r){return setTimeout(function(){var n=Array.from(Ud);n.forEach(function(i){i.name===t.name&&i!==t&&i.messagesCallback&&i.time<e.time&&i.messagesCallback(e)}),r()},qk)})}o(LL,"postMessage");function RL(t,e){t.messagesCallback=e}o(RL,"onMessage");function AL(){return!0}o(AL,"canBeUsed");function FL(){return qk}o(FL,"averageResponseTime");var Yk={create:PL,close:_L,onMessage:RL,postMessage:LL,canBeUsed:AL,type:NL,averageResponseTime:FL,microSeconds:Uk};var Vk=[Rk,Bk,Hk];function qd(t){var e=[].concat(t.methods,Vk).filter(Boolean);if(t.type){if(t.type==="simulate")return Yk;var r=e.find(function(i){return i.type===t.type});if(r)return r;throw new Error("method-type "+t.type+" not found")}t.webWorkerSupport||(e=e.filter(function(i){return i.type!=="idb"}));var n=e.find(function(i){return i.canBeUsed()});if(n)return n;throw new Error("No usable method found in "+JSON.stringify(Vk.map(function(i){return i.type})))}o(qd,"chooseMethod");var Vd=new Set,$L=0,Qi=o(function(e,r){this.id=$L++,Vd.add(this),this.name=e,Yd&&(r=Yd),this.options=Ji(r),this.method=qd(this.options),this._iL=!1,this._onML=null,this._addEL={message:[],internal:[]},this._uMP=new Set,this._befC=[],this._prepP=null,zL(this)},"BroadcastChannel");Qi._pubkey=!0;function BL(t){t=Ji(t);var e=qd(t);return e.type==="node"?e.clearNodeFolder().then(function(){return!0}):_k}o(BL,"clearNodeFolder");var Yd;function jL(t){Yd=t}o(jL,"enforceOptions"),Qi.prototype={postMessage:o(function(e){if(this.closed)throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed "+JSON.stringify(e));return Kk(this,"message",e)},"postMessage"),postInternal:o(function(e){return Kk(this,"internal",e)},"postInternal"),set onmessage(t){var e=this.method.microSeconds(),r={time:e,fn:t};Qk(this,"message",this._onML),t&&typeof t=="function"?(this._onML=r,Jk(this,"message",r)):this._onML=null},addEventListener:o(function(e,r){var n=this.method.microSeconds(),i={time:n,fn:r};Jk(this,e,i)},"addEventListener"),removeEventListener:o(function(e,r){var n=this._addEL[e].find(function(i){return i.fn===r});Qk(this,e,n)},"removeEventListener"),close:o(function(){var e=this;if(!this.closed){Vd.delete(this),this.closed=!0;var r=this._prepP?this._prepP:nn;return this._onML=null,this._addEL.message=[],r.then(function(){return Promise.all(Array.from(e._uMP))}).then(function(){return Promise.all(e._befC.map(function(n){return n()}))}).then(function(){return e.method.close(e._state)})}},"close"),get type(){return this.method.type},get isClosed(){return this.closed}};function Kk(t,e,r){var n=t.method.microSeconds(),i={time:n,type:e,data:r},s=t._prepP?t._prepP:nn;return s.then(function(){var a=t.method.postMessage(t._state,i);return t._uMP.add(a),a.catch().then(function(){return t._uMP.delete(a)}),a})}o(Kk,"_post");function zL(t){var e=t.method.create(t.name,t.options);Pk(e)?(t._prepP=e,e.then(function(r){t._state=r})):t._state=e}o(zL,"_prepareChannel");function Gk(t){return t._addEL.message.length>0||t._addEL.internal.length>0}o(Gk,"_hasMessageListeners");function Jk(t,e,r){t._addEL[e].push(r),WL(t)}o(Jk,"_addListenerObject");function Qk(t,e,r){t._addEL[e]=t._addEL[e].filter(function(n){return n!==r}),HL(t)}o(Qk,"_removeListenerObject");function WL(t){if(!t._iL&&Gk(t)){var e=o(function(i){t._addEL[i.type].forEach(function(s){i.time>=s.time&&s.fn(i.data)})},"listenerFn"),r=t.method.microSeconds();t._prepP?t._prepP.then(function(){t._iL=!0,t.method.onMessage(t._state,e,r)}):(t._iL=!0,t.method.onMessage(t._state,e,r))}}o(WL,"_startListening");function HL(t){if(t._iL&&!Gk(t)){t._iL=!1;var e=t.method.microSeconds();t.method.onMessage(t._state,null,e)}}o(HL,"_stopListening");var qL=o(t=>"ref"in t&&typeof t.ref=="function"&&"unref"in t&&typeof t.unref=="function","isProcessHolding"),YL=o((t,e)=>{if(typeof globalThis.BroadcastChannel=="function"){let n=new globalThis.BroadcastChannel(t);n.onmessage=s=>{e(s.data)};let i=qL(n)?n:null;return i?.unref(),{post:o(async s=>{n.postMessage(s)},"post"),close:o(async()=>{n.close()},"close"),holdProcess:o(s=>{s?i?.ref():i?.unref()},"holdProcess")}}let r=new Qi(t);return r.onmessage=n=>{e(n)},{post:o(n=>r.postMessage(n),"post"),close:o(()=>r.close(),"close"),holdProcess:o(()=>{},"holdProcess")}},"openChannel"),Xk=o(t=>typeof t=="object"&&t!==null,"isObject"),Zk=o((t,e)=>Object.prototype.hasOwnProperty.call(t,e),"hasOwn"),VL=o(t=>{if(!Xk(t)||!Zk(t,"deesCommsEvent"))return null;let e=t.deesCommsEvent;return!Xk(e)||typeof e.name!="string"||typeof e.uniqueEventId!="string"||!Zk(e,"payload")?"malformed":{name:e.name,uniqueEventId:e.uniqueEventId,payload:e.payload}},"eventOf"),KL=o(()=>{let t=globalThis.crypto.getRandomValues(new Uint8Array(16));return Array.from(t,e=>e.toString(16).padStart(2,"0")).join("")},"createEventId"),Kd=class t{static{o(this,"DeesComms")}static{this.defaultChannelName="dees-comms"}constructor(e={}){this.eventHandlers=new Map,this.hasTypedHandlers=!1,this.closed=!1,this.closing=null,this.typedrouter=new $t.TypedRouter,this.typedtarget=new $t.TypedTarget({postMethodWithTypedRouter:o(async r=>{await this.postMessage(r)},"postMethodWithTypedRouter"),typedRouterRef:this.typedrouter}),this.channelName=e.channelName??t.defaultChannelName,this.channel=YL(this.channelName,r=>{this.receive(r)})}createTypedRequest(e){return new $t.TypedRequest(this.typedtarget,e)}async postMessage(e){this.assertOpen(),await this.channel.post(e)}async createTypedHandler(e,r){this.typedrouter.addTypedHandler(new $t.TypedHandler(e,r)),this.hasTypedHandlers=!0,this.holdProcessWhileListened()}async broadcast(e,r){let n={deesCommsEvent:{name:e,uniqueEventId:KL(),payload:r}};await this.postMessage(n)}subscribe(e,r){this.assertOpen();let n=o((s,a)=>r(s,a),"handler"),i=this.eventHandlers.get(e);return i||(i=new Set,this.eventHandlers.set(e,i)),i.add(n),this.holdProcessWhileListened(),{unsubscribe:o(()=>{let s=this.eventHandlers.get(e);s&&(s.delete(n),s.size===0&&(this.eventHandlers.delete(e),this.holdProcessWhileListened()))},"unsubscribe")}}async close(){this.closing||(this.closed=!0,this.eventHandlers.clear(),this.closing=this.channel.close()),await this.closing}holdProcessWhileListened(){this.closed||this.channel.holdProcess(this.hasTypedHandlers||this.eventHandlers.size>0)}assertOpen(){if(this.closed)throw new Error(`DeesComms channel "${this.channelName}" is closed`)}async receive(e){if(this.closed)return;let r=VL(e);if(r==="malformed"){console.log("DeesComms received a malformed event");return}if(r){this.dispatch(r);return}let n=await this.typedrouter.routeAndAddResponse(e,{skipHooks:!0});n&&!n.error&&!this.closed&&await this.postMessage(n)}dispatch(e){let r=this.eventHandlers.get(e.name);if(r)for(let n of[...r]){if(this.closed)return;r.has(n)&&(async()=>n(e.payload,e))().catch(i=>{console.error(`DeesComms: a handler of the event "${e.name}" failed`,i)})}}};var sc={};se(sc,{SmartMarkdown:()=>Fx,parseMarkdown:()=>QD});var Rl={};se(Rl,{getYamlDocFromString:()=>IR,objectToYamlString:()=>MR,yamlStringToObject:()=>OR});var so={};se(so,{Alias:()=>pr,CST:()=>_l,Composer:()=>Dn,Document:()=>gr,Lexer:()=>li,LineCounter:()=>ci,Pair:()=>$e,Parser:()=>On,Scalar:()=>G,Schema:()=>oi,YAMLError:()=>si,YAMLMap:()=>Be,YAMLParseError:()=>It,YAMLSeq:()=>rt,YAMLWarning:()=>ai,default:()=>DR,isAlias:()=>jt,isCollection:()=>ke,isDocument:()=>zt,isMap:()=>Wt,isNode:()=>ge,isPair:()=>me,isScalar:()=>ae,isSeq:()=>Ht,parse:()=>Qp,parseAllDocuments:()=>Jp,parseDocument:()=>Ll,stringify:()=>Xp,visit:()=>Xt,visitAsync:()=>Xi});var Pg={};se(Pg,{Alias:()=>pr,CST:()=>_l,Composer:()=>Dn,Document:()=>gr,Lexer:()=>li,LineCounter:()=>ci,Pair:()=>$e,Parser:()=>On,Scalar:()=>G,Schema:()=>oi,YAMLError:()=>si,YAMLMap:()=>Be,YAMLParseError:()=>It,YAMLSeq:()=>rt,YAMLWarning:()=>ai,isAlias:()=>jt,isCollection:()=>ke,isDocument:()=>zt,isMap:()=>Wt,isNode:()=>ge,isPair:()=>me,isScalar:()=>ae,isSeq:()=>Ht,parse:()=>Qp,parseAllDocuments:()=>Jp,parseDocument:()=>Ll,stringify:()=>Xp,visit:()=>Xt,visitAsync:()=>Xi});var al=Symbol.for("yaml.alias"),ll=Symbol.for("yaml.document"),fr=Symbol.for("yaml.map"),vp=Symbol.for("yaml.pair"),Bt=Symbol.for("yaml.scalar"),on=Symbol.for("yaml.seq"),Tt=Symbol.for("yaml.node.type"),jt=o(t=>!!t&&typeof t=="object"&&t[Tt]===al,"isAlias"),zt=o(t=>!!t&&typeof t=="object"&&t[Tt]===ll,"isDocument"),Wt=o(t=>!!t&&typeof t=="object"&&t[Tt]===fr,"isMap"),me=o(t=>!!t&&typeof t=="object"&&t[Tt]===vp,"isPair"),ae=o(t=>!!t&&typeof t=="object"&&t[Tt]===Bt,"isScalar"),Ht=o(t=>!!t&&typeof t=="object"&&t[Tt]===on,"isSeq");function ke(t){if(t&&typeof t=="object")switch(t[Tt]){case fr:case on:return!0}return!1}o(ke,"isCollection");function ge(t){if(t&&typeof t=="object")switch(t[Tt]){case al:case fr:case Bt:case on:return!0}return!1}o(ge,"isNode");var cl=o(t=>(ae(t)||ke(t))&&!!t.anchor,"hasAnchor");var Ut=Symbol("break visit"),e1=Symbol("skip children"),sn=Symbol("remove node");function Xt(t,e){let r=t1(e);zt(t)?Is(null,t.contents,r,Object.freeze([t]))===sn&&(t.contents=null):Is(null,t,r,Object.freeze([]))}o(Xt,"visit"),Xt.BREAK=Ut,Xt.SKIP=e1,Xt.REMOVE=sn;function Is(t,e,r,n){let i=r1(t,e,r,n);if(ge(i)||me(i))return n1(t,n,i),Is(t,i,r,n);if(typeof i!="symbol"){if(ke(e)){n=Object.freeze(n.concat(e));for(let s=0;s<e.items.length;++s){let a=Is(s,e.items[s],r,n);if(typeof a=="number")s=a-1;else{if(a===Ut)return Ut;a===sn&&(e.items.splice(s,1),s-=1)}}}else if(me(e)){n=Object.freeze(n.concat(e));let s=Is("key",e.key,r,n);if(s===Ut)return Ut;s===sn&&(e.key=null);let a=Is("value",e.value,r,n);if(a===Ut)return Ut;a===sn&&(e.value=null)}}return i}o(Is,"visit_");async function Xi(t,e){let r=t1(e);zt(t)?await Ns(null,t.contents,r,Object.freeze([t]))===sn&&(t.contents=null):await Ns(null,t,r,Object.freeze([]))}o(Xi,"visitAsync"),Xi.BREAK=Ut,Xi.SKIP=e1,Xi.REMOVE=sn;async function Ns(t,e,r,n){let i=await r1(t,e,r,n);if(ge(i)||me(i))return n1(t,n,i),Ns(t,i,r,n);if(typeof i!="symbol"){if(ke(e)){n=Object.freeze(n.concat(e));for(let s=0;s<e.items.length;++s){let a=await Ns(s,e.items[s],r,n);if(typeof a=="number")s=a-1;else{if(a===Ut)return Ut;a===sn&&(e.items.splice(s,1),s-=1)}}}else if(me(e)){n=Object.freeze(n.concat(e));let s=await Ns("key",e.key,r,n);if(s===Ut)return Ut;s===sn&&(e.key=null);let a=await Ns("value",e.value,r,n);if(a===Ut)return Ut;a===sn&&(e.value=null)}}return i}o(Ns,"visitAsync_");function t1(t){return typeof t=="object"&&(t.Collection||t.Node||t.Value)?Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t):t}o(t1,"initVisitor");function r1(t,e,r,n){if(typeof r=="function")return r(t,e,n);if(Wt(e))return r.Map?.(t,e,n);if(Ht(e))return r.Seq?.(t,e,n);if(me(e))return r.Pair?.(t,e,n);if(ae(e))return r.Scalar?.(t,e,n);if(jt(e))return r.Alias?.(t,e,n)}o(r1,"callVisitor");function n1(t,e,r){let n=e[e.length-1];if(ke(n))n.items[t]=r;else if(me(n))t==="key"?n.key=r:n.value=r;else if(zt(n))n.contents=r;else{let i=jt(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}o(n1,"replaceNode");var GL={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},JL=o(t=>t.replace(/[!,[\]{}]/g,e=>GL[e]),"escapeTagName"),Or=class t{static{o(this,"Directives")}constructor(e,r){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},t.defaultYaml,e),this.tags=Object.assign({},t.defaultTags,r)}clone(){let e=new t(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new t(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:t.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},t.defaultTags);break}return e}add(e,r){this.atNextDocument&&(this.yaml={explicit:t.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},t.defaultTags),this.atNextDocument=!1);let n=e.trim().split(/[ \t]+/),i=n.shift();switch(i){case"%TAG":{if(n.length!==2&&(r(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;let[s,a]=n;return this.tags[s]=a,!0}case"%YAML":{if(this.yaml.explicit=!0,n.length!==1)return r(0,"%YAML directive should contain exactly one part"),!1;let[s]=n;if(s==="1.1"||s==="1.2")return this.yaml.version=s,!0;{let a=/^\d+\.\d+$/.test(s);return r(6,`Unsupported YAML version ${s}`,a),!1}}default:return r(0,`Unknown directive ${i}`,!0),!1}}tagName(e,r){if(e==="!")return"!";if(e[0]!=="!")return r(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let a=e.slice(2,-1);return a==="!"||a==="!!"?(r(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&r("Verbatim tags must end with a >"),a)}let[,n,i]=e.match(/^(.*!)([^!]*)$/s);i||r(`The ${e} tag has no suffix`);let s=this.tags[n];if(s)try{return s+decodeURIComponent(i)}catch(a){return r(String(a)),null}return n==="!"?e:(r(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[r,n]of Object.entries(this.tags))if(e.startsWith(n))return r+JL(e.substring(n.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags),i;if(e&&n.length>0&&ge(e.contents)){let s={};Xt(e.contents,(a,l)=>{ge(l)&&l.tag&&(s[l.tag]=!0)}),i=Object.keys(s)}else i=[];for(let[s,a]of n)s==="!!"&&a==="tag:yaml.org,2002:"||(!e||i.some(l=>l.startsWith(a)))&&r.push(`%TAG ${s} ${a}`);return r.join(`
13
- `)}};Or.defaultYaml={explicit:!1,version:"1.2"},Or.defaultTags={"!!":"tag:yaml.org,2002:"};function ul(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){let r=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(r)}return!0}o(ul,"anchorIsValid");function kp(t){let e=new Set;return Xt(t,{Value(r,n){n.anchor&&e.add(n.anchor)}}),e}o(kp,"anchorNames");function Tp(t,e){for(let r=1;;++r){let n=`${t}${r}`;if(!e.has(n))return n}}o(Tp,"findNewAnchor");function Gd(t,e){let r=[],n=new Map,i=null;return{onAnchor:o(s=>{r.push(s),i??(i=kp(t));let a=Tp(e,i);return i.add(a),a},"onAnchor"),setAnchors:o(()=>{for(let s of r){let a=n.get(s);if(typeof a=="object"&&a.anchor&&(ae(a.node)||ke(a.node)))a.node.anchor=a.anchor;else{let l=new Error("Failed to resolve repeated object (this should not happen)");throw l.source=s,l}}},"setAnchors"),sourceObjects:n}}o(Gd,"createNodeAnchors");function Sn(t,e,r,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let i=0,s=n.length;i<s;++i){let a=n[i],l=Sn(t,n,String(i),a);l===void 0?delete n[i]:l!==a&&(n[i]=l)}else if(n instanceof Map)for(let i of Array.from(n.keys())){let s=n.get(i),a=Sn(t,n,i,s);a===void 0?n.delete(i):a!==s&&n.set(i,a)}else if(n instanceof Set)for(let i of Array.from(n)){let s=Sn(t,n,i,i);s===void 0?n.delete(i):s!==i&&(n.delete(i),n.add(s))}else for(let[i,s]of Object.entries(n)){let a=Sn(t,n,i,s);a===void 0?delete n[i]:a!==s&&(n[i]=a)}return t.call(e,r,n)}o(Sn,"applyReviver");function Je(t,e,r){if(Array.isArray(t))return t.map((n,i)=>Je(n,String(i),r));if(t&&typeof t.toJSON=="function"){if(!r||!cl(t))return t.toJSON(e,r);let n={aliasCount:0,count:1,res:void 0};r.anchors.set(t,n),r.onCreate=s=>{n.res=s,delete r.onCreate};let i=t.toJSON(e,r);return r.onCreate&&r.onCreate(i),i}return typeof t=="bigint"&&!r?.keep?Number(t):t}o(Je,"toJS");var vn=class{static{o(this,"NodeBase")}constructor(e){Object.defineProperty(this,Tt,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:r,maxAliasCount:n,onAnchor:i,reviver:s}={}){if(!zt(e))throw new TypeError("A document argument is required");let a={anchors:new Map,doc:e,keep:!0,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},l=Je(this,"",a);if(typeof i=="function")for(let{count:c,res:u}of a.anchors.values())i(u,c);return typeof s=="function"?Sn(s,{"":l},"",l):l}};var pr=class extends vn{static{o(this,"Alias")}constructor(e){super(al),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,r){if(r?.maxAliasCount===0)throw new ReferenceError("Alias resolution is disabled");let n;r?.aliasResolveCache?n=r.aliasResolveCache:(n=[],Xt(e,{Node:o((s,a)=>{(jt(a)||cl(a))&&n.push(a)},"Node")}),r&&(r.aliasResolveCache=n));let i;for(let s of n){if(s===this)break;s.anchor===this.source&&(i=s)}if(i&&r){let{anchors:s,doc:a,maxAliasCount:l}=r,c=s.get(i);if(c||(Je(i,null,r),c=s.get(i)),c?.res===void 0){let u="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(u)}if(l>=0&&(c.count+=1,c.aliasCount===0&&(c.aliasCount=Ep(a,i,s)),c.count*c.aliasCount>l)){let u="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(u)}}return i}toJSON(e,r){if(!r)return{source:this.source};let n=this.resolve(r.doc,r);if(!n){let i=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(i)}return r.anchors.get(n).res}toString(e,r,n){let i=`*${this.source}`;if(e){if(ul(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(e.implicitKey)return`${i} `}return i}};function Ep(t,e,r){if(jt(e)){let n=e.resolve(t),i=r&&n&&r.get(n);return i?i.count*i.aliasCount:0}else if(ke(e)){let n=0;for(let i of e.items){let s=Ep(t,i,r);s>n&&(n=s)}return n}else if(me(e)){let n=Ep(t,e.key,r),i=Ep(t,e.value,r);return Math.max(n,i)}return 1}o(Ep,"getAliasCount");var fl=o(t=>!t||typeof t!="function"&&typeof t!="object","isScalarValue"),G=class extends vn{static{o(this,"Scalar")}constructor(e){super(Bt),this.value=e}toJSON(e,r){return r?.keep?this.value:Je(this.value,e,r)}toString(){return String(this.value)}};G.BLOCK_FOLDED="BLOCK_FOLDED",G.BLOCK_LITERAL="BLOCK_LITERAL",G.PLAIN="PLAIN",G.QUOTE_DOUBLE="QUOTE_DOUBLE",G.QUOTE_SINGLE="QUOTE_SINGLE";var QL="tag:yaml.org,2002:";function XL(t,e,r){if(e){let n=r.filter(s=>s.tag===e),i=n.find(s=>!s.format)??n[0];if(!i)throw new Error(`Tag ${e} not found`);return i}return r.find(n=>n.identify?.(t)&&!n.format)}o(XL,"findTagObject");function an(t,e,r){if(zt(t)&&(t=t.contents),ge(t))return t;if(me(t)){let p=r.schema[fr].createNode?.(r.schema,null,r);return p.items.push(t),p}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());let{aliasDuplicateObjects:n,onAnchor:i,onTagObj:s,schema:a,sourceObjects:l}=r,c;if(n&&t&&typeof t=="object"){if(c=l.get(t),c)return c.anchor??(c.anchor=i(t)),new pr(c.anchor);c={anchor:null,node:null},l.set(t,c)}e?.startsWith("!!")&&(e=QL+e.slice(2));let u=XL(t,e,a.tags);if(!u){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){let p=new G(t);return c&&(c.node=p),p}u=t instanceof Map?a[fr]:Symbol.iterator in Object(t)?a[on]:a[fr]}s&&(s(u),delete r.onTagObj);let f=u?.createNode?u.createNode(r.schema,t,r):typeof u?.nodeClass?.from=="function"?u.nodeClass.from(r.schema,t,r):new G(t);return e?f.tag=e:u.default||(f.tag=u.tag),c&&(c.node=f),f}o(an,"createNode");function Ps(t,e,r){let n=r;for(let i=e.length-1;i>=0;--i){let s=e[i];if(typeof s=="number"&&Number.isInteger(s)&&s>=0){let a=[];a[s]=n,n=a}else n=new Map([[s,n]])}return an(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:o(()=>{throw new Error("This should not happen, please report a bug.")},"onAnchor"),schema:t,sourceObjects:new Map})}o(Ps,"collectionFromPath");var eo=o(t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done,"isEmptyPath"),Zi=class extends vn{static{o(this,"Collection")}constructor(e,r){super(e),Object.defineProperty(this,"schema",{value:r,configurable:!0,enumerable:!1,writable:!0})}clone(e){let r=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(r.schema=e),r.items=r.items.map(n=>ge(n)||me(n)?n.clone(e):n),this.range&&(r.range=this.range.slice()),r}addIn(e,r){if(eo(e))this.add(r);else{let[n,...i]=e,s=this.get(n,!0);if(ke(s))s.addIn(i,r);else if(s===void 0&&this.schema)this.set(n,Ps(this.schema,i,r));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}deleteIn(e){let[r,...n]=e;if(n.length===0)return this.delete(r);let i=this.get(r,!0);if(ke(i))return i.deleteIn(n);throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}getIn(e,r){let[n,...i]=e,s=this.get(n,!0);return i.length===0?!r&&ae(s)?s.value:s:ke(s)?s.getIn(i,r):void 0}hasAllNullValues(e){return this.items.every(r=>{if(!me(r))return!1;let n=r.value;return n==null||e&&ae(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[r,...n]=e;if(n.length===0)return this.has(r);let i=this.get(r,!0);return ke(i)?i.hasIn(n):!1}setIn(e,r){let[n,...i]=e;if(i.length===0)this.set(n,r);else{let s=this.get(n,!0);if(ke(s))s.setIn(i,r);else if(s===void 0&&this.schema)this.set(n,Ps(this.schema,i,r));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}};var Jd=o(t=>t.replace(/^(?!$)(?: $)?/gm,"#"),"stringifyComment");function Zt(t,e){return/^\n+$/.test(t)?t.substring(1):e?t.replace(/^(?! *$)/gm,e):t}o(Zt,"indentComment");var Mr=o((t,e,r)=>t.endsWith(`
9
+ `)},"stripIndent"),OL=o((t,e)=>{let r=t;return(!e||e.stripIndent)&&(r=CL(r)),(!e||e.normalizeNewline)&&(r=r.replace(/\r\n/g,`
10
+ `)),(!e||e.replaceTabs)&&(r=XS(r," /"," ")),(!e||e.stripLeadingTrailingEmptyLines)&&(r=r.replace(/^\s*[\r\n]/gm,"").replace(/\s*[\r\n]$/gm,"")),(!e||e.stripAllEmptyLines)&&(r=r.replace(/^\s*[\r\n]/gm,"")),r},"standard");var Zf={};se(Zf,{isBase64:()=>IL,isUtf8:()=>ML});var Ed={encode:o(t=>{if(typeof Buffer<"u")return Buffer.from(t,"utf8").toString("base64");if(typeof btoa<"u"){let e=new TextEncoder().encode(t),r=Array.from(e,n=>String.fromCharCode(n)).join("");return btoa(r)}else{let e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=new TextEncoder().encode(t),n="",i=0;for(;i<r.length;){let s=r[i++],a=i<r.length?r[i++]:0,l=i<r.length?r[i++]:0,c=s<<16|a<<8|l;n+=e.charAt(c>>18&63),n+=e.charAt(c>>12&63),n+=i-2<r.length?e.charAt(c>>6&63):"=",n+=i-1<r.length?e.charAt(c&63):"="}return n}},"encode"),decode:o(t=>{let e=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"=");if(typeof Buffer<"u")return Buffer.from(e,"base64").toString("utf8");if(typeof atob<"u"){let r=atob(e),n=new Uint8Array(r.length);for(let i=0;i<r.length;i++)n[i]=r.charCodeAt(i);return new TextDecoder().decode(n)}else{let r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=[],i=0;for(;i<e.length;){let s=r.indexOf(e.charAt(i++)),a=r.indexOf(e.charAt(i++)),l=r.indexOf(e.charAt(i++)),c=r.indexOf(e.charAt(i++)),u=s<<18|a<<12|l<<6|c;n.push(u>>16&255),l!==64&&n.push(u>>8&255),c!==64&&n.push(u&255)}return new TextDecoder().decode(new Uint8Array(n))}},"decode")},Xf=class{static{o(this,"Base64")}constructor(e,r){switch(r){case"string":this.refString=e;break;case"base64":this.refString=gs.decode(e);break;case"base64uri":this.refString=gs.decode(e)}}get simpleString(){return this.refString}get base64String(){return gs.encode(this.refString)}get base64UriString(){return gs.encodeUri(this.refString)}},gs={encode:o(t=>Ed.encode(t),"encode"),encodeUri:o(t=>Ed.encode(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,""),"encodeUri"),decode:o(t=>Ed.decode(t),"decode"),isBase64:o(t=>/^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)?$/.test(t),"isBase64")};var ML=o(t=>{let r=new TextEncoder().encode(t),n=0;for(;n<r.length;){if(r[n]===9||r[n]===10||r[n]===13||32<=r[n]&&r[n]<=126){n+=1;continue}if(194<=r[n]&&r[n]<=223&&128<=r[n+1]&&r[n+1]<=191){n+=2;continue}if(r[n]===224&&160<=r[n+1]&&r[n+1]<=191&&128<=r[n+2]&&r[n+2]<=191||(225<=r[n]&&r[n]<=236||r[n]===238||r[n]===239)&&128<=r[n+1]&&r[n+1]<=191&&128<=r[n+2]&&r[n+2]<=191||r[n]===237&&128<=r[n+1]&&r[n+1]<=159&&128<=r[n+2]&&r[n+2]<=191){n+=3;continue}if(r[n]===240&&144<=r[n+1]&&r[n+1]<=191&&128<=r[n+2]&&r[n+2]<=191&&128<=r[n+3]&&r[n+3]<=191||241<=r[n]&&r[n]<=243&&128<=r[n+1]&&r[n+1]<=191&&128<=r[n+2]&&r[n+2]<=191&&128<=r[n+3]&&r[n+3]<=191||r[n]===244&&128<=r[n+1]&&r[n+1]<=143&&128<=r[n+2]&&r[n+2]<=191&&128<=r[n+3]&&r[n+3]<=191){n+=4;continue}return!1}return!0},"isUtf8"),IL=o(t=>{let e=/[^A-Z0-9+\/=]/i,r=t.length;if(!r||r%4!==0||e.test(t))return!1;let n=t.indexOf("=");return n===-1||n===r-1||n===r-2&&t[r-1]==="="},"isBase64");var ep=class{static{o(this,"Domain")}constructor(e){this.protocol=this._protocolRegex(e),this.protocol||(e=`https://${e}`),this.nodeParsedUrl=new URL(e),this.port=this.nodeParsedUrl.port;let r=this._domainRegex(e.replace(this.nodeParsedUrl.pathname,""));[this.level1,this.level2,this.level3,this.level4,this.level5]=r,this.fullName="";for(let n of r)this.fullName===""?this.fullName=n:this.fullName=n+"."+this.fullName;this.zoneName=[this.level2,this.level1].filter(Boolean).join("."),this.topLevel=this.level1,this.domainName=this.level2,this.subDomain=this.level3}_domainRegex(e){let n=/([a-zA-Z0-9\-\_]*)\.{0,1}([a-zA-Z0-9\-\_]*)\.{0,1}([a-zA-Z0-9\-\_]*)\.{0,1}([a-zA-Z0-9\-\_]*)\.{0,1}([a-zA-Z0-9\-\_]*)\.{0,1}$/.exec(e);if(!n)return[];let i=[...n].reverse();return i.pop(),i.filter(function(a){return a!==""})}_protocolRegex(e){let n=/^([a-zA-Z0-9]*):\/\//.exec(e);if(n)return n[1]}_portRegex(e){let n=/^([a-zA-Z0-9]*):\/\//.exec(e);if(n)return n[1]}};var tp=class{static{o(this,"GitRepo")}constructor(e,r){let n=NL(e);if(!n)throw new Error(`Invalid git repository URL: ${e}`);this.host=n[1],this.user=n[2],this.repo=n[3],this.accessToken=r,this.sshUrl=ZS(this.host,this.user,this.repo,this.accessToken,"ssh"),this.httpsUrl=ZS(this.host,this.user,this.repo,this.accessToken,"https")}},NL=o(function(t){return/([a-zA-Z0-9\-_\.]*)(?:\/|\:)([a-zA-Z0-9\-_\.]*)(?:\/)([a-zA-Z0-9\-_\.]*)(?:\.git)/.exec(t)},"gitRegex"),ZS=o(function(t,e,r,n="",i){switch(n!==""&&(n=n+"@"),i){case"https":return"https://"+n+t+"/"+e+"/"+r+".git";case"ssh":return"git@"+t+":"+e+"/"+r+".git"}},"gitLink");var rk=zr(tk(),1),ys=rk.default;var ik=o(()=>globalThis.Buffer,"getNodeBuffer");function PL(t){let e=ik();return e?e.from(t).toString("base64"):btoa(String.fromCharCode(...t))}o(PL,"base64Encode");function LL(t){let e=ik();if(e){let r=e.from(t,"base64");return new Uint8Array(r.buffer,r.byteOffset,r.byteLength)}return new Uint8Array(Array.from(atob(t)).map(r=>r.charCodeAt(0)))}o(LL,"base64Decode");function tl(t,e){return JSON.stringify(t,rp,e)}o(tl,"stringify");function Cd(t){return JSON.parse(t,ok)}o(Cd,"parse");var rp=o((t,e)=>{if(RL(e)){let r;if("data"in e&&sk(e.data))r=new Uint8Array(e.data);else if(e instanceof Uint8Array)r=e;else return e;return{type:"EncodedBuffer",data:"base64:"+PL(r)}}return e},"replacer"),ok=o((t,e)=>{if(_L(e)&&Dd(e.data)&&e.data.startsWith("base64:")){let r=e.data.slice(7);return LL(r)}return e},"reviver");function _L(t){return ak(t)&&t.type==="EncodedBuffer"&&Dd(t.data)}o(_L,"isEncodedBuffer");function RL(t){return ak(t)&&t.type==="Buffer"&&(sk(t.data)||Dd(t.data))||t instanceof Uint8Array}o(RL,"isBufferLike");function sk(t){return Array.isArray(t)}o(sk,"isArray");function Dd(t){return typeof t=="string"}o(Dd,"isString");function ak(t){return typeof t=="object"&&t!==null}o(ak,"isObject");var ck=o(t=>{let e=JSON.parse(tl(t)),r=!0,n=o(s=>{if(Array.isArray(s))return s.map(u=>n(u));if(s===null||typeof s!="object")return s;let a=Object.keys(s).sort(),l={};for(let u of a){let f=n(s[u]);u in l?Object.defineProperty(l,u,{configurable:!0,enumerable:!0,value:f,writable:!0}):l[u]=f}let c=Object.keys(l);return(c.length!==a.length||c.some((u,f)=>u!==a[f]))&&(r=!1),l},"createSortedValue"),i=n(e);return r?JSON.stringify(i):ys(e,{})},"stableStringify");var np=Cd,Od=o(t=>t.split(`
11
+ `).reduce((n,i)=>{let s=i.trim();return s.length>0&&n.push(np(s)),n},[]),"parseJsonL"),AL=o(t=>t.map(e=>Ui(e)).join(`
12
+ `),"stringifyJsonL"),FL=o((t,e,r={})=>{let n=new WeakSet,i=o(l=>{if(l===null||typeof l!="object")return l;let c=rp("",l);if(c&&c.type==="EncodedBuffer"&&typeof c.data=="string")return c;if(n.has(l))return"__cycle__";if(n.add(l),Array.isArray(l))return l.map(f=>i(f));let u={};for(let f of Object.keys(l))try{u[f]=i(l[f])}catch{u[f]="__unserializable__"}return u},"sanitize"),s=i(t),a={...r,cycles:!0};if(e&&!a.cmp){let l=new Map;e.forEach((c,u)=>l.set(c,u)),a.cmp=(c,u)=>{let f=l.has(c.key)?l.get(c.key):Number.POSITIVE_INFINITY,p=l.has(u.key)?l.get(u.key):Number.POSITIVE_INFINITY;return f!==p?f-p:c.key<u.key?-1:c.key>u.key?1:0}}return ys(s,a)},"stableOneWayStringify"),Ui=o((t,e,r=void 0)=>{if(r===void 0&&e===void 0)return ck(t);let n=tl(t);t=JSON.parse(n);let i={...r};if(e&&!i.cmp){let a=new Map;e.forEach((l,c)=>a.set(l,c)),i.cmp=(l,c)=>{let u=a.has(l.key)?a.get(l.key):Number.POSITIVE_INFINITY,f=a.has(c.key)?a.get(c.key):Number.POSITIVE_INFINITY;return u!==f?u-f:l.key<c.key?-1:l.key>c.key?1:0}}return ys(t,i)},"stringify"),$L=o(t=>{let e=Ui(t),r=JSON.parse(e);return JSON.stringify(r,null,2)},"stringifyPretty"),BL=o((...t)=>{let e=Ui(...t);return rn.base64.encodeUri(e)},"stringifyBase64"),jL=o(t=>{let e=rn.base64,n=(e.decodeUri||e.decode)(t);return np(n)},"parseBase64"),Md=class t{static{o(this,"Smartjson")}static enfoldFromObject(e){let r=new this,n=r.saveableProperties||[];for(let i in e)n.indexOf(i)!==-1&&(r[i]=e[i]);return r}static enfoldFromJson(e){let r=np(e);return this.enfoldFromObject(r)}saveableProperties=[];foldToObject(){let e=new Set;return e.add(this),this.foldToObjectInternal(e)}foldToObjectInternal(e){let r={},n=o(s=>{if(s instanceof t){if(e.has(s))throw new Error("cycle detected");return e.add(s),s.foldToObjectInternal(e)}return Array.isArray(s)?s.map(a=>n(a)):structuredClone(s)},"foldValue"),i=this.saveableProperties||[];for(let s of i){let a=this[s];r[s]=n(a)}return r}foldToJson(){let e=this.foldToObject();return Ui(e)}},zL=o(()=>(t,e)=>{let r=String(e.name);e.addInitializer(function(){this.saveableProperties||(this.saveableProperties=[]),this.saveableProperties.includes(r)||this.saveableProperties.push(r)})},"foldDec"),uk=o((t,e)=>{let r=Ui(t),n=Ui(e);return r===n},"deepEqualObjects"),WL=o((t,e)=>{let r=Od(t),n=Od(e);return uk(r,n)},"deepEqualJsonLStrings");var Er={};se(Er,{TypedrequestCache:()=>Id,WebStore:()=>rl});var fk={};var ip=class{static{o(this,"WebStoreDb")}constructor(e){this.nativeDb=e}async get(e,r,n={}){return this.runObjectStoreRequest(e,"readonly",i=>i.get(r),n)}async getKey(e,r,n={}){return this.runObjectStoreRequest(e,"readonly",i=>i.getKey(r),n)}async put(e,r,n,i={}){return this.runObjectStoreRequest(e,"readwrite",s=>n===void 0?s.put(r):s.put(r,n),i)}async delete(e,r,n={}){await this.runObjectStoreRequest(e,"readwrite",i=>i.delete(r),n)}async clear(e,r={}){await this.runObjectStoreRequest(e,"readwrite",n=>n.clear(),r)}async getAllKeys(e,r={}){return this.runObjectStoreRequest(e,"readonly",n=>n.getAllKeys(),r)}close(){this.nativeDb.close()}async runObjectStoreRequest(e,r,n,i){i.signal?.throwIfAborted();let s=this.nativeDb.transaction(e,r),a=s.objectStore(e),l=n(a),c,u=new Promise((p,h)=>{c=h}),f=o(()=>{try{s.abort()}catch(p){if(!(p instanceof DOMException)||p.name!=="InvalidStateError"){c(p);return}}i.signal&&c(i.signal.reason)},"abortTransaction");i.signal?.addEventListener("abort",f,{once:!0});try{let[p]=await Promise.race([Promise.all([HL(l),UL(s)]),u]);return p}catch(p){throw i.signal?.aborted?i.signal.reason:p}finally{i.signal?.removeEventListener("abort",f)}}},hk=o(async(t,e)=>{if(e?.throwIfAborted(),!e)return t;let r,n=new Promise((s,a)=>{r=a}),i=o(()=>{r(e.reason)},"abortListener");e.addEventListener("abort",i,{once:!0});try{return await Promise.race([t,n])}finally{e.removeEventListener("abort",i)}},"awaitWithSignal"),HL=o(t=>new Promise((e,r)=>{t.onsuccess=()=>e(t.result),t.onerror=()=>r(op("IndexedDB request failed",t.error))}),"indexedDbRequestToPromise"),UL=o(t=>new Promise((e,r)=>{t.oncomplete=()=>e(),t.onabort=()=>r(op("IndexedDB transaction aborted",t.error)),t.onerror=()=>r(op("IndexedDB transaction failed",t.error))}),"indexedDbTransactionToPromise"),op=o((t,e)=>e?new Error(`${t}: ${e.message}`,{cause:e}):new Error(t),"createIndexedDbError"),mk=o((t,e)=>{t.objectStoreNames.contains(e)||t.createObjectStore(e)},"ensureObjectStore"),dk=o(async(t,e,r)=>{if(!globalThis.indexedDB)throw new Error("IndexedDB is not available in this runtime");return new Promise((n,i)=>{let s=!1,a=typeof e=="number"?globalThis.indexedDB.open(t,e):globalThis.indexedDB.open(t),l=o(c=>{s||(s=!0,i(c instanceof Error?c:new Error(String(c))))},"rejectOnce");a.onupgradeneeded=()=>{if(r)try{r(a.result)}catch(c){a.transaction?.abort(),l(c)}},a.onsuccess=()=>{if(s){a.result.close();return}s=!0;let c=a.result;c.onversionchange=()=>c.close(),n(c)},a.onerror=()=>l(op(`Failed to open IndexedDB database "${t}"`,a.error)),a.onblocked=()=>l(new Error(`Opening IndexedDB database "${t}" was blocked by another connection`))})},"openNativeDb"),qL=o(async(t,e)=>{let r=await dk(t,void 0,i=>mk(i,e));if(r.objectStoreNames.contains(e))return new ip(r);let n=r.version+1;if(r.close(),r=await dk(t,n,i=>mk(i,e)),!r.objectStoreNames.contains(e))throw r.close(),new Error(`Failed to create IndexedDB object store "${e}" in database "${t}"`);return new ip(r)},"openWebStoreDb"),rl=class{static{o(this,"WebStore")}constructor(e){this.lifecycleGeneration=0,this.closeCoveredGeneration=0,this.activeOperations=new Set,this.options=e}trackOperation(e){this.lifecycleGeneration+=1;let r;return r=(async()=>e())().finally(()=>{this.activeOperations.delete(r)}),this.activeOperations.add(r),r}init(e={}){return this.trackOperation(()=>this.initForOperation(e.signal))}async initForOperation(e){e?.throwIfAborted();let r=this.closePromise;return r&&(await hk(r,e),e?.throwIfAborted()),this.initPromise||(this.initPromise=this.runInit().catch(n=>{throw this.initPromise=void 0,n})),hk(this.initPromise,e)}async runInit(){let e=new Tr.Smartenv;if(!e.isBrowser&&!globalThis.indexedDB&&(await e.getSafeNodeModule("fake-indexeddb/auto"),!globalThis.indexedDB)){let r=await e.getSafeNodeModule("fake-indexeddb");globalThis.indexedDB=new r.IDBFactory}this.db=await qL(this.options.dbName,this.options.storeName)}runDataOperation(e,r){return this.trackOperation(async()=>(await this.initForOperation(r.signal),r.signal?.throwIfAborted(),e(this.db)))}close(){let e=this.lifecycleGeneration;if(this.closePromise&&e<=this.closeCoveredGeneration)return this.closePromise;let r=this.closePromise,n=[...this.activeOperations];if(!r&&!this.initPromise&&n.length===0)return Promise.resolve();let i;return i=(async()=>{try{if(r)try{await r}catch{}await Promise.allSettled(n);let s=this.initPromise;if(!s)return;try{await s}catch{return}finally{this.initPromise===s&&(this.initPromise=void 0)}this.db.close()}finally{this.closePromise===i&&(this.closePromise=void 0)}})(),this.closePromise=i,this.closeCoveredGeneration=e,i}async get(e,r={}){return this.runDataOperation(n=>n.get(this.options.storeName,e,r),r)}async check(e,r={}){return this.runDataOperation(async n=>await n.getKey(this.options.storeName,e,r)!==void 0,r)}async set(e,r,n={}){return this.runDataOperation(i=>i.put(this.options.storeName,r,e,n),n)}async delete(e,r={}){return this.runDataOperation(n=>n.delete(this.options.storeName,e,r),r)}async clear(e={}){return this.runDataOperation(r=>r.clear(this.options.storeName,e),e)}async keys(e={}){return this.runDataOperation(r=>r.getAllKeys(this.options.storeName,e),e)}};var Id=class{static{o(this,"TypedrequestCache")}constructor(e="default"){this.webstore=new rl({dbName:"trStore",storeName:`trStore-${e}`})}buildKey(e){return tt.stringify({method:e.method,request:e.request})}async setByRequest(e){if(!e.response)throw new Error("You cannot store requests without a response present");await this.webstore.set(this.buildKey(e),e)}async getByRequest(e){return await this.webstore.get(this.buildKey(e))}};var nl=256,xs=class{static{o(this,"CacheStore")}constructor(e="webrequest-v4",r="cache"){this.lifecycleController=new AbortController,this.closeReason=new Error("Webrequest cache store is closed"),this.disposed=!1,this.pruneGeneration=0,this.pruneWaiters=new Set,this.activeOwnedOperations=new Set,this.webstore=new Er.WebStore({dbName:e,storeName:r}),this.initPromise=this.init()}async init(){}generateCacheKey(e){let r=e.url,n=e.method;return n==="GET"?r:`${n}:${r}`}async set(e,r,n={}){await this.initPromise;let i=this.getOperationSignal(n.signal),s=n.maxEntries??nl;if(!Number.isSafeInteger(s)||s<=0)throw new RangeError("webrequest cache maxEntries must be a positive safe integer");await this.webstore.set(e,r,{signal:i}),await this.schedulePrune(s,i)}async get(e,r={}){await this.initPromise;let n=this.getOperationSignal(r.signal);try{let i=await this.webstore.get(e,{signal:n});return i===void 0?null:this.isCacheEntry(i)?i:(await this.webstore.delete(e,{signal:n}),null)}catch{if(n.aborted)throw n.reason;return null}}async has(e,r={}){return await this.get(e,r)!==null}async delete(e,r={}){await this.initPromise;let n=this.getOperationSignal(r.signal);await this.webstore.delete(e,{signal:n})}async clear(e={}){await this.initPromise;let r=this.getOperationSignal(e.signal);await this.webstore.clear({signal:r})}responseFromCacheEntry(e){let r=new Headers(e.headers);return new Response(e.response,{status:e.status,statusText:e.statusText,headers:r})}cacheEntryFromResponse(e,r,n,i={}){return this.trackOwnedOperation(async()=>{let s=this.getOperationSignal(i.signal),a=i.preserveResponse!==!1,l=a?r.clone():r,c=await this.consumeArrayBuffer(l,s,a?r.body:void 0,i.responseSignal),u={};return l.headers.forEach((f,p)=>{u[p]=f}),{response:c,headers:u,timestamp:Date.now(),etag:n?.etag||l.headers.get("etag")||void 0,lastModified:n?.lastModified||l.headers.get("last-modified")||void 0,maxAge:n?.maxAge,url:e,status:l.status,statusText:l.statusText}})}async pruneExpired(e={}){await this.initPromise;let r=this.getOperationSignal(e.signal),n=await this.collectEntries(r),i=0;for(let s of n)r.throwIfAborted(),!(s.valid&&!this.isExpired(s))&&(await this.webstore.delete(s.key,{signal:r}),i+=1);return i}async schedulePrune(e,r){r?.throwIfAborted();let n=++this.pruneGeneration;this.pendingPruneMaxEntries=this.pendingPruneMaxEntries===void 0?e:Math.min(this.pendingPruneMaxEntries,e);let i,s,a=new Promise((c,u)=>{i=c,s=u}),l={generation:n,resolve:i,reject:s};this.pruneWaiters.add(l),this.ensurePruneLoop();try{await YL(a,r)}finally{this.pruneWaiters.delete(l)}}ensurePruneLoop(){if(this.pruneLoopPromise)return this.pruneLoopPromise;let e;return e=this.runPruneLoop().catch(r=>{this.pendingPruneMaxEntries=void 0,this.settlePruneWaiters(this.pruneGeneration,r)}).finally(()=>{this.pruneLoopPromise===e&&(this.pruneLoopPromise=void 0,this.pendingPruneMaxEntries!==void 0&&!this.disposed&&this.ensurePruneLoop())}),this.pruneLoopPromise=e,e}async runPruneLoop(){for(;this.pendingPruneMaxEntries!==void 0;){let e=this.pendingPruneMaxEntries;this.pendingPruneMaxEntries=void 0;let r=this.pruneGeneration;await this.pruneToLimit(e,this.lifecycleController.signal),this.settlePruneWaiters(r)}}settlePruneWaiters(e,r){for(let n of this.pruneWaiters)n.generation>e||(this.pruneWaiters.delete(n),r===void 0?n.resolve():n.reject(r))}async pruneToLimit(e,r){let n=await this.collectEntries(r),i=n.filter(l=>!l.valid||this.isExpired(l));for(let l of i)r?.throwIfAborted(),await this.webstore.delete(l.key,{signal:r});let s=n.filter(l=>l.valid&&!this.isExpired(l)).sort((l,c)=>l.timestamp===c.timestamp?l.key.localeCompare(c.key):(l.timestamp??0)-(c.timestamp??0)),a=Math.max(0,s.length-e);for(let l of s.slice(0,a))r?.throwIfAborted(),await this.webstore.delete(l.key,{signal:r})}async collectEntries(e){e?.throwIfAborted();let r=await this.webstore.keys({signal:e}),n=[];for(let i of r)if(e?.throwIfAborted(),typeof i=="string")try{let s=await this.webstore.get(i,{signal:e});n.push(this.isCacheEntry(s)?{key:i,valid:!0,timestamp:s.timestamp,maxAge:s.maxAge}:{key:i,valid:!1,timestamp:0})}catch{if(e?.aborted)throw e.reason;continue}return n}isCacheEntry(e){if(!e||typeof e!="object")return!1;let r=Reflect.get(e,"response"),n=Reflect.get(e,"headers"),i=Reflect.get(e,"timestamp"),s=Reflect.get(e,"url"),a=Reflect.get(e,"status"),l=Reflect.get(e,"statusText");return r instanceof ArrayBuffer&&typeof n=="object"&&n!==null&&Number.isFinite(i)&&typeof s=="string"&&Number.isInteger(a)&&typeof l=="string"}isExpired(e){return e.maxAge!==void 0&&e.maxAge>0&&Date.now()-e.timestamp>=e.maxAge}getOperationSignal(e){if(this.disposed)throw this.closeReason;return e?.throwIfAborted(),e?AbortSignal.any([e,this.lifecycleController.signal]):this.lifecycleController.signal}trackOwnedOperation(e){let r;return r=e().finally(()=>{this.activeOwnedOperations.delete(r)}),this.activeOwnedOperations.add(r),r}close(){if(this.closePromise)return this.closePromise;this.disposed=!0,this.lifecycleController.abort(this.closeReason);let e=this.pruneLoopPromise,r=[...this.activeOwnedOperations];return this.closePromise=(async()=>{await Promise.allSettled([...r,...e?[e]:[]]),await this.webstore.close()})(),this.closePromise}async consumeArrayBuffer(e,r,n,i){if(r?.throwIfAborted(),!r)return e.arrayBuffer();let s=e.body?.getReader();if(!s)return new ArrayBuffer(0);let a=[],l=0,c,u=new Promise((d,g)=>{c=g}),f,p=o(()=>{c(r.reason),i?.aborted||(f=Promise.all([s.cancel(r.reason).catch(()=>{}),n?.cancel(r.reason).catch(()=>{})]).then(()=>{}))},"abortListener");r.addEventListener("abort",p,{once:!0});try{for(;;){let d=await Promise.race([s.read(),u]);if(d.done)break;a.push(d.value),l+=d.value.byteLength}}finally{r.removeEventListener("abort",p),f&&await f;try{s.releaseLock()}catch{}}let h=new Uint8Array(l),m=0;for(let d of a)h.set(d,m),m+=d.byteLength;return h.buffer}},YL=o(async(t,e)=>{if(e?.throwIfAborted(),!e)return t;let r,n=new Promise((s,a)=>{r=a}),i=o(()=>{r(e.reason)},"abortListener");e.addEventListener("abort",i,{once:!0});try{return await Promise.race([t,n])}finally{e.removeEventListener("abort",i)}},"awaitWithSignal");function VL(t){let e={maxAge:0,immutable:!1,noCache:!1,noStore:!1,mustRevalidate:!1};if(!t)return e;let r=t.toLowerCase().split(",").map(n=>n.trim());for(let n of r)if(n==="no-cache")e.noCache=!0;else if(n==="no-store")e.noStore=!0;else if(n==="immutable")e.immutable=!0;else if(n==="must-revalidate")e.mustRevalidate=!0;else if(n.startsWith("max-age=")){let i=parseInt(n.split("=")[1],10);isNaN(i)||(e.maxAge=i*1e3)}return e}o(VL,"parseCacheControl");function KL(t){if(t)try{return new Date(t).getTime()}catch{return}}o(KL,"parseExpires");function nn(t){let e=t.get("cache-control"),r=t.get("expires"),n=t.get("etag"),i=t.get("last-modified"),s=VL(e);if(s.maxAge===0&&r){let a=KL(r);a&&(s.maxAge=Math.max(0,a-Date.now()))}return{maxAge:s.maxAge||0,etag:n||void 0,lastModified:i||void 0,immutable:s.immutable||!1,noCache:s.noCache||!1,noStore:s.noStore||!1,mustRevalidate:s.mustRevalidate||!1}}o(nn,"extractCacheMetadata");function ap(t,e){if(e.noStore)return!1;if(e.immutable)return!0;let r=Date.now()-t.timestamp,n=t.maxAge||e.maxAge||0;return n===0?!1:r<n}o(ap,"isFresh");function bs(t){return t.noCache||t.mustRevalidate}o(bs,"requiresRevalidation");function lp(t){let e={};return t.etag&&(e["if-none-match"]=t.etag),t.lastModified&&(e["if-modified-since"]=t.lastModified),e}o(lp,"createConditionalHeaders");function cp(t){let e={};return t.forEach((r,n)=>{e[n]=r}),e}o(cp,"headersToObject");function gk(t){let e=new Headers;return Object.entries(t).forEach(([r,n])=>{e.set(r,n)}),e}o(gk,"objectToHeaders");function GL(t){let e=new AbortController,r=!1,n=!1,i=new Le.Timeout(t,null);return i.promise.then(()=>{r=!0,e.abort()}),{controller:e,cleanup:o(()=>{n||(n=!0,i.cancel())},"cleanup"),didTimeout:o(()=>r,"didTimeout")}}o(GL,"createTimeoutController");var yk=Symbol("webrequestTimeoutError"),ri=o((t,e)=>{let r=new Error(`Request timeout after ${e}ms: ${t}`);return Object.defineProperty(r,yk,{configurable:!1,enumerable:!1,value:!0,writable:!1}),r},"createTimeoutError"),il=o(t=>t instanceof Error&&Reflect.get(t,yk)===!0,"isWebrequestTimeoutError");async function Nd(t,e,r){let n=t instanceof Request?t.url:String(t),{controller:i,cleanup:s,didTimeout:a}=GL(r),l=e.signal?AbortSignal.any([e.signal,i.signal]):i.signal;try{let c=await fetch(t,{...e,signal:l});return s(),c}catch(c){throw s(),a()?ri(n,r):c}}o(Nd,"fetchWithTimeout");var xk=o(t=>{if(t.reason instanceof Error)return t.reason;let e=new Error("The request was aborted");return e.name="AbortError",e},"normalizeAbortReason");async function bk(t,e){if(e.signal?.aborted){let f=xk(e.signal);throw await t.body?.cancel(f).catch(()=>{}),f}if(e.bodyTimeoutMs!==void 0&&e.bodyTimeoutMs<=0){let f=ri(e.url,e.reportedTimeoutMs??e.bodyTimeoutMs);throw await t.body?.cancel(f).catch(()=>{}),f}if(e.bodyTimeoutMs===void 0&&!e.signal)return await t.json();let r=t.body?.getReader();if(!r)return JSON.parse("");let n,i,s,a=new Promise((f,p)=>{s=p}),l=o(f=>{n||(n=f,r.cancel(f).catch(()=>{}),s(f))},"terminate"),c=o(()=>{e.signal&&l(xk(e.signal))},"abortListener");if(e.signal&&(e.signal.aborted?c():e.signal.addEventListener("abort",c,{once:!0})),e.bodyTimeoutMs!==void 0){let f=e.reportedTimeoutMs??e.bodyTimeoutMs;i=setTimeout(()=>{l(ri(e.url,f))},e.bodyTimeoutMs)}let u=o(async()=>{let f=new TextDecoder,p="";for(;;){let h;try{h=await r.read()}catch(m){throw n||m}if(n)throw n;if(h.done)break;p+=f.decode(h.value,{stream:!0})}if(p+=f.decode(),n)throw n;return JSON.parse(p)},"readBody");try{return await Promise.race([u(),a])}finally{i!==void 0&&clearTimeout(i),e.signal?.removeEventListener("abort",c);try{r.releaseLock()}catch{}}}o(bk,"consumeJsonWithTimeout");var up=class{static{o(this,"NetworkFirstStrategy")}async execute(e){let r;try{return r=await e.fetchFn(e.request),r.ok&&await this.cacheResponse(e,r),{response:r,fromCache:!1,revalidated:!1}}catch(n){if(await ws(r,n,e.request.signal),e.signal?.aborted)throw e.signal.reason;if(il(n))throw n;e.logging&&console.log("[webrequest] Network failed, trying cache:",n);let i=await e.cacheStore.get(e.cacheKey,{signal:e.signal});if(i)return{response:e.cacheStore.responseFromCacheEntry(i),fromCache:!0,revalidated:!1};throw n}}async cacheResponse(e,r){let n=nn(r.headers);if(n.maxAge=ol(n.maxAge,e.cacheMaxAge),n.noStore)return;let i=await e.cacheStore.cacheEntryFromResponse(e.request.url,r,n,{signal:e.signal,responseSignal:e.request.signal});await e.cacheStore.set(e.cacheKey,i,{signal:e.signal,maxEntries:e.cacheMaxEntries})}},Pd=class{static{o(this,"CacheFirstStrategy")}async execute(e){let r=await e.cacheStore.get(e.cacheKey,{signal:e.signal});if(r){let s=nn(new Headers(r.headers));if(wk(e,r,s)&&!bs(s))return e.logging&&console.log("[webrequest] Cache hit (fresh):",e.request.url),{response:e.cacheStore.responseFromCacheEntry(r),fromCache:!0,revalidated:!1};if(bs(s)&&(r.etag||r.lastModified))return await this.revalidate(e,r)}e.logging&&console.log("[webrequest] Cache miss, fetching:",e.request.url);let n=await e.fetchFn(e.request),i=nn(n.headers);if(i.maxAge=ol(i.maxAge,e.cacheMaxAge),!i.noStore)try{let s=await e.cacheStore.cacheEntryFromResponse(e.request.url,n,i,{signal:e.signal,responseSignal:e.request.signal});await e.cacheStore.set(e.cacheKey,s,{signal:e.signal,maxEntries:e.cacheMaxEntries})}catch(s){throw await ws(n,s,e.request.signal),s}return{response:n,fromCache:!1,revalidated:!1}}async revalidate(e,r){let n=lp(r),i=new Request(e.request.url,{method:e.request.method,headers:{...cp(e.request.headers),...n},signal:e.signal}),s;try{if(s=await e.fetchFn(i),s.status===304)return e.logging&&console.log("[webrequest] Cache revalidated (304):",e.request.url),r.timestamp=Date.now(),await e.cacheStore.set(e.cacheKey,r,{signal:e.signal,maxEntries:e.cacheMaxEntries}),await ws(s,"304 response replaced by cached response",i.signal),{response:e.cacheStore.responseFromCacheEntry(r),fromCache:!0,revalidated:!0};if(s.ok){let a=nn(s.headers);if(a.maxAge=ol(a.maxAge,e.cacheMaxAge),!a.noStore){let l=await e.cacheStore.cacheEntryFromResponse(e.request.url,s,a,{signal:e.signal,responseSignal:i.signal});await e.cacheStore.set(e.cacheKey,l,{signal:e.signal,maxEntries:e.cacheMaxEntries})}}return{response:s,fromCache:!1,revalidated:!0}}catch(a){if(await ws(s,a,i.signal),e.signal?.aborted)throw e.signal.reason;if(il(a))throw a;return e.logging&&console.log("[webrequest] Revalidation failed, using cache:",a),{response:e.cacheStore.responseFromCacheEntry(r),fromCache:!0,revalidated:!1}}}},Ld=class{static{o(this,"StaleWhileRevalidateStrategy")}async execute(e){let r=await e.cacheStore.get(e.cacheKey,{signal:e.signal});if(r){let s=e.cacheStore.responseFromCacheEntry(r);return e.scheduleBackgroundRevalidation(async a=>{let l={...e,request:new Request(e.request,{signal:a}),signal:a};await this.revalidateInBackground(l,r)}),{response:s,fromCache:!0,revalidated:!1}}let n=await e.fetchFn(e.request),i=nn(n.headers);if(i.maxAge=ol(i.maxAge,e.cacheMaxAge),!i.noStore&&n.ok)try{let s=await e.cacheStore.cacheEntryFromResponse(e.request.url,n,i,{signal:e.signal,responseSignal:e.request.signal});await e.cacheStore.set(e.cacheKey,s,{signal:e.signal,maxEntries:e.cacheMaxEntries})}catch(s){throw await ws(n,s,e.request.signal),s}return{response:n,fromCache:!1,revalidated:!1}}async revalidateInBackground(e,r){let n=nn(new Headers(r.headers));if(wk(e,r,n)&&!bs(n))return;let i;try{if(e.signal?.throwIfAborted(),i=await e.fetchFn(e.request),i.ok){let s=nn(i.headers);if(s.maxAge=ol(s.maxAge,e.cacheMaxAge),!s.noStore){let a=await e.cacheStore.cacheEntryFromResponse(e.request.url,i,s,{signal:e.signal,responseSignal:e.request.signal,preserveResponse:!1});await e.cacheStore.set(e.cacheKey,a,{signal:e.signal,maxEntries:e.cacheMaxEntries}),e.logging&&console.log("[webrequest] Background revalidation complete:",e.request.url)}}}catch(s){if(e.signal?.aborted)return;e.logging&&console.warn("[webrequest] Background revalidation failed:",s)}finally{await ws(i,"background revalidation response discarded",e.request.signal)}}},_d=class{static{o(this,"NetworkOnlyStrategy")}async execute(e){return{response:await e.fetchFn(e.request),fromCache:!1,revalidated:!1}}},Rd=class{static{o(this,"CacheOnlyStrategy")}async execute(e){let r=await e.cacheStore.get(e.cacheKey,{signal:e.signal});if(!r)throw new Error(`Cache miss for ${e.request.url} (cache-only mode)`);return{response:e.cacheStore.responseFromCacheEntry(r),fromCache:!0,revalidated:!1}}},ol=o((t,e)=>e===void 0?t:Math.min(t,e),"resolveEffectiveMaxAge"),wk=o((t,e,r)=>ap(e,r)?t.cacheMaxAge===void 0?!0:Date.now()-e.timestamp<t.cacheMaxAge:!1,"isFreshForContext"),ws=o(async(t,e,r)=>{!t?.body||t.bodyUsed||r?.aborted||await t.body.cancel(e).catch(()=>{})},"cancelDiscardedResponse");function vk(t){switch(t){case"network-first":return new up;case"cache-first":return new Pd;case"stale-while-revalidate":return new Ld;case"network-only":return new _d;case"cache-only":return new Rd;default:return new up}}o(vk,"getStrategyHandler");var vs=class{static{o(this,"CacheManager")}constructor(e,r,n){this.lifecycleController=new AbortController,this.closeReason=new Error("Webrequest cache manager is closed"),this.disposed=!1,this.backgroundRevalidations=new Map,this.cacheStore=n??new xs(e,r)}async execute(e,r,n){if(this.disposed)throw this.closeReason;e.signal.throwIfAborted();let i=this.determineStrategy(e,r);if(i==="network-only")return{response:await n(e),fromCache:!1,revalidated:!1};let s=r.cacheMaxEntries??nl;if(!Number.isSafeInteger(s)||s<=0)throw new RangeError("webrequest cacheMaxEntries must be a positive safe integer");if(r.cacheMaxAge!==void 0&&(!Number.isSafeInteger(r.cacheMaxAge)||r.cacheMaxAge<0))throw new RangeError("webrequest cacheMaxAge must be a non-negative safe integer");let a=r.timeout??6e4,l=new AbortController,c=setTimeout(()=>{l.abort(ri(e.url,a))},Math.max(0,a)),u=AbortSignal.any([e.signal,this.lifecycleController.signal,l.signal]);try{let f=this.generateCacheKey(e,r),p=vk(i),h={request:e,cacheKey:f,cacheStore:this.cacheStore,fetchFn:n,logging:r.logging,signal:u,cacheMaxAge:r.cacheMaxAge,cacheMaxEntries:s,scheduleBackgroundRevalidation:o(m=>{this.scheduleBackgroundRevalidation(f,e.url,a,m)},"scheduleBackgroundRevalidation")};return await p.execute(h)}finally{clearTimeout(c)}}determineStrategy(e,r){return r.cacheStrategy?r.cacheStrategy:r.cache?this.mapCacheModeToStrategy(r.cache):e.cache?this.mapCacheModeToStrategy(e.cache):"network-first"}mapCacheModeToStrategy(e){switch(e){case"default":return"network-first";case"no-store":case"reload":return"network-only";case"no-cache":return"network-first";case"force-cache":return"cache-first";case"only-if-cached":return"cache-only";default:return"network-first"}}generateCacheKey(e,r){return r.cacheKey?typeof r.cacheKey=="function"?r.cacheKey(e):r.cacheKey:this.cacheStore.generateCacheKey(e)}async clear(){await this.cacheStore.clear()}async delete(e){await this.cacheStore.delete(e)}async has(e){return await this.cacheStore.has(e)}getStore(){return this.cacheStore}scheduleBackgroundRevalidation(e,r,n,i){if(this.disposed||this.backgroundRevalidations.has(e))return;let s=new AbortController,a=AbortSignal.any([this.lifecycleController.signal,s.signal]),l=setTimeout(()=>{s.abort(ri(r,n))},Math.max(0,n)),c;c=i(a).catch(()=>{}).finally(()=>{clearTimeout(l),this.backgroundRevalidations.get(e)===c&&this.backgroundRevalidations.delete(e)}),this.backgroundRevalidations.set(e,c)}close(){if(this.closePromise)return this.closePromise;this.disposed=!0,this.lifecycleController.abort(this.closeReason);let e=[...this.backgroundRevalidations.values()];return this.closePromise=(async()=>{await Promise.allSettled(e),await this.cacheStore.close()})(),this.closePromise}};var fp=class{static{o(this,"ExponentialBackoff")}calculate(e,r,n){let i=r*Math.pow(2,e-1);return Math.min(i,n)}},Ad=class{static{o(this,"LinearBackoff")}calculate(e,r,n){let i=r*e;return Math.min(i,n)}},Fd=class{static{o(this,"ConstantBackoff")}calculate(e,r,n){return Math.min(r,n)}};function Sk(t){switch(t){case"exponential":return new fp;case"linear":return new Ad;case"constant":return new Fd;default:return new fp}}o(Sk,"getBackoffCalculator");function kk(t,e=.1){let r=t*e*Math.random();return t+r}o(kk,"addJitter");var Ss=class{static{o(this,"RetryManager")}constructor(e={},r){this.signal=r,this.options={maxAttempts:e.maxAttempts??3,backoff:e.backoff??"exponential",initialDelay:e.initialDelay??1e3,maxDelay:e.maxDelay??3e4,retryOn:e.retryOn??[408,429,500,502,503,504],onRetry:e.onRetry??(()=>{})}}async execute(e,r){let n;for(let i=1;i<=this.options.maxAttempts;i++){this.throwIfAborted();try{let s=await e();if(s instanceof Response&&this.shouldRetryResponse(s)){if(i===this.options.maxAttempts)return s;await this.cancelResponseBody(s,`Retrying after HTTP ${s.status}`);let a=this.calculateDelay(i);this.options.onRetry(i,new Error(`HTTP ${s.status}`),a),await this.delay(a);continue}return s}catch(s){if(this.signal?.aborted)throw this.getAbortError();n=s instanceof Error?s:new Error(String(s));let a=r?r(s,i):this.shouldRetryError(s);if(i===this.options.maxAttempts||!a)throw n;let l=this.calculateDelay(i);this.options.onRetry(i,n,l),await this.delay(l)}}throw n||new Error("Max retry attempts reached")}async executeWithFallbacks(e,r,n){if(e.length===0)throw new Error("No URLs provided for fallback execution");let i,s=[];for(let a of e){this.throwIfAborted();try{let l=await this.execute(async()=>await n(a,r));if(l.status<400||l.status>=400&&l.status<500&&l.status!==408)return l;await this.cancelResponseBody(l,`Trying fallback after HTTP ${l.status}`),s.push(a),i=new Error(`Request failed with status ${l.status}`)}catch(l){if(this.signal?.aborted)throw this.getAbortError();s.push(a),i=l instanceof Error?l:new Error(String(l))}}throw new Error(`All URLs failed: ${s.join(", ")}. Last error: ${i?.message||"Unknown error"}`)}shouldRetryResponse(e){let r=this.options.retryOn;return typeof r=="function"?r(e):Array.isArray(r)?r.includes(e.status):!1}shouldRetryError(e){if(e instanceof TypeError&&e.message.includes("fetch")||e.name==="AbortError"||e.message.includes("timeout"))return!0;let r=this.options.retryOn;return typeof r=="function"?r(void 0,e):!1}calculateDelay(e){let n=Sk(this.options.backoff).calculate(e,this.options.initialDelay,this.options.maxDelay);return kk(n)}async delay(e){if(!this.signal){await Le.delayFor(e);return}if(this.signal.aborted)throw this.getAbortError();let r=new Le.Timeout(e,null),n,i=new Promise((a,l)=>{n=l}),s=o(()=>{r.cancel(),n(this.getAbortError())},"abortListener");try{this.signal.addEventListener("abort",s,{once:!0}),this.signal.aborted&&s(),await Promise.race([r.promise,i])}finally{r.cancel(),this.signal.removeEventListener("abort",s)}}async cancelResponseBody(e,r){await e.body?.cancel(r).catch(()=>{})}throwIfAborted(){if(this.signal?.aborted)throw this.getAbortError()}getAbortError(){if(this.signal?.reason instanceof Error)return this.signal.reason;let e=new Error("The request was aborted");return e.name="AbortError",e}};var ks=class{static{o(this,"RequestDeduplicator")}constructor(){this.inFlightRequests=new Map}generateKey(e){let r=e.url,n=e.method;return n==="GET"||n==="HEAD"?`${n}:${r}`:`${n}:${r}:${Date.now()}`}async execute(e,r){let n=this.inFlightRequests.get(e);if(n){let s=await n.promise;return{response:this.cloneValue(s),wasDeduplicated:!0}}let i=ie.defer();this.inFlightRequests.set(e,i);try{let s=await r();return i.resolve(s),this.inFlightRequests.delete(e),{response:s,wasDeduplicated:!1}}catch(s){throw i.reject(s),this.inFlightRequests.delete(e),s}}isInFlight(e){return this.inFlightRequests.has(e)}getInFlightCount(){return this.inFlightRequests.size}clear(){this.inFlightRequests.clear()}cloneValue(e){return e instanceof Response?e.clone():{...e,response:e.response.clone()}}};var qi=class{static{o(this,"WebrequestClient")}constructor(e={}){this.closeReason=new Error("Webrequest client is closed"),this.disposed=!1,this.defaultOptions=e,this.interceptorManager=new ms,this.cacheManager=new vs,this.deduplicator=new ks}addRequestInterceptor(e){this.interceptorManager.addRequestInterceptor(e)}addResponseInterceptor(e){this.interceptorManager.addResponseInterceptor(e)}addErrorInterceptor(e){this.interceptorManager.addErrorInterceptor(e)}removeRequestInterceptor(e){this.interceptorManager.removeRequestInterceptor(e)}removeResponseInterceptor(e){this.interceptorManager.removeResponseInterceptor(e)}removeErrorInterceptor(e){this.interceptorManager.removeErrorInterceptor(e)}clearInterceptors(){this.interceptorManager.clearAll()}async clearCache(){await this.cacheManager.clear()}async deleteCache(e){await this.cacheManager.delete(e)}async request(e,r={}){return(await this.requestWithMetadata(e,r)).response}async requestWithMetadata(e,r={}){if(this.disposed)throw this.closeReason;let n={...this.defaultOptions,...r},i;if(typeof e=="string"?i=new Request(e,n):i=e,i=await this.interceptorManager.processRequest(i),n.interceptors?.request)for(let a of n.interceptors.request)i=await a(i);if(n.deduplicate??!1){let a=this.deduplicator.generateKey(i);return(await this.deduplicator.execute(a,async()=>await this.executeRequest(i,n))).response}return await this.executeRequest(i,n)}async executeRequest(e,r){try{let n=typeof r.retry=="object"?r.retry:r.retry?{}:void 0,i=o(async c=>{let u=r.timeout??6e4,f={...r};return delete f.body,delete f.headers,delete f.method,delete f.signal,await Nd(c,{...f,signal:c.signal},u)},"fetchFnForRequest"),s=o(async(c,u)=>{let f=r.timeout??6e4;return await Nd(c,u,f)},"fetchFnForFallbacks"),a;if(n){let c=new Ss(n,r.signal);if(r.fallbackUrls&&r.fallbackUrls.length>0){let u=[e.url,...r.fallbackUrls];a={response:await c.executeWithFallbacks(u,{method:e.method,headers:e.headers,body:e.body,...r},s),fromCache:!1,revalidated:!1}}else{let u,f=await c.execute(async()=>{let p=await this.cacheManager.execute(e,r,i);return u=p,p.response});a=u?.response===f?u:{response:f,fromCache:!1,revalidated:!1}}}else a=await this.cacheManager.execute(e,r,i);let l=await this.interceptorManager.processResponse(a.response);if(r.interceptors?.response)for(let c of r.interceptors.response)l=await c(l);return JL(l,a)}catch(n){throw await this.interceptorManager.processError(n instanceof Error?n:new Error(String(n)))}}async close(){return this.closePromise?this.closePromise:(this.disposed=!0,this.closePromise=this.cacheManager.close(),this.closePromise)}async requestJsonWithMetadata(e,r){let n={...this.defaultOptions,...r},i=n.timeout??6e4,s=n.retry?void 0:performance.now()+i,a=s===void 0?void 0:new AbortController,l=a?n.signal?AbortSignal.any([n.signal,a.signal]):a.signal:n.signal,c=a===void 0?void 0:setTimeout(()=>{a.abort(ri(e,i))},Math.max(0,i));try{let u=await this.requestWithMetadata(e,{...r,signal:l}),f=u.response;if(l?.aborted)throw await f.body?.cancel(l.reason).catch(()=>{}),l.reason instanceof Error?l.reason:new Error("The request was aborted");if(!f.ok)throw await f.body?.cancel(`HTTP ${f.status}`).catch(()=>{}),new Error(`HTTP ${f.status}: ${f.statusText}`);let p=s===void 0?i:s-performance.now(),h=await bk(f,{bodyTimeoutMs:p,reportedTimeoutMs:i,signal:l,url:e});return Object.freeze({data:h,response:f,metadata:u.metadata})}catch(u){throw l?.aborted&&l.reason instanceof Error?l.reason:u}finally{c!==void 0&&clearTimeout(c)}}async getJson(e,r={}){return(await this.getJsonWithMetadata(e,r)).data}async getJsonWithMetadata(e,r={}){return await this.requestJsonWithMetadata(e,{...r,method:"GET",headers:{Accept:"application/json",...r.headers||{}}})}async postJson(e,r,n={}){return(await this.postJsonWithMetadata(e,r,n)).data}async postJsonWithMetadata(e,r,n={}){return await this.requestJsonWithMetadata(e,{...n,method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",...n.headers||{}},body:JSON.stringify(r)})}async putJson(e,r,n={}){return(await this.putJsonWithMetadata(e,r,n)).data}async putJsonWithMetadata(e,r,n={}){return await this.requestJsonWithMetadata(e,{...n,method:"PUT",headers:{"Content-Type":"application/json",Accept:"application/json",...n.headers||{}},body:JSON.stringify(r)})}async deleteJson(e,r={}){return(await this.deleteJsonWithMetadata(e,r)).data}async deleteJsonWithMetadata(e,r={}){return await this.requestJsonWithMetadata(e,{...r,method:"DELETE",headers:{Accept:"application/json",...r.headers||{}}})}},JL=o((t,e)=>{let r=Object.freeze({fromCache:e.fromCache,revalidated:e.revalidated});return Object.freeze({response:t,metadata:r})},"createResponseResult");var kt=new qi;async function lt(t,e){let r=t instanceof Request?t.url:String(t),n=t instanceof Request?t:new Request(r,e);return await kt.request(n,e)}o(lt,"webrequest"),lt.requestWithMetadata=async function(t,e){let r=t instanceof Request?t.url:String(t),n=t instanceof Request?t:new Request(r,e);return await kt.requestWithMetadata(n,e)},lt.getJson=async function(t,e){return await kt.getJson(t,e)},lt.getJsonWithMetadata=async function(t,e){return await kt.getJsonWithMetadata(t,e)},lt.postJson=async function(t,e,r){return await kt.postJson(t,e,r)},lt.postJsonWithMetadata=async function(t,e,r){return await kt.postJsonWithMetadata(t,e,r)},lt.putJson=async function(t,e,r){return await kt.putJson(t,e,r)},lt.putJsonWithMetadata=async function(t,e,r){return await kt.putJsonWithMetadata(t,e,r)},lt.deleteJson=async function(t,e){return await kt.deleteJson(t,e)},lt.deleteJsonWithMetadata=async function(t,e){return await kt.deleteJsonWithMetadata(t,e)},lt.addRequestInterceptor=function(t){kt.addRequestInterceptor(t)},lt.addResponseInterceptor=function(t){kt.addResponseInterceptor(t)},lt.addErrorInterceptor=function(t){kt.addErrorInterceptor(t)},lt.clearInterceptors=function(){kt.clearInterceptors()},lt.clearCache=async function(){await kt.clearCache()},lt.createClient=function(t){return new qi(t)},lt.getDefaultClient=function(){return kt};var sl=zr(bm(),1);var QL=1e4,Tk=new WeakSet,Ek=new WeakMap,$d=o(t=>{Tk.add(t)},"authorizeVirtualStreamApplicationUse"),Yi=class extends Error{static{o(this,"VirtualStreamClosedError")}constructor(e="VirtualStream is closed",r){super(e,r),this.name="VirtualStreamClosedError"}},Vi=class extends Error{static{o(this,"VirtualStreamOpenTimeoutError")}constructor(e,r){super(e>0?`VirtualStream transport staging timed out after ${e}ms`:"VirtualStream transport staging deadline is exhausted"),this.timeoutMs=e,this.deadlineAt=r,this.name="VirtualStreamOpenTimeoutError"}},hp=class extends Error{static{o(this,"VirtualStreamLifecycleContractError")}constructor(e){super(`VirtualStream endpoint closed before terminal ${e} produced a receipt`),this.name="VirtualStreamLifecycleContractError"}},wn=class{static{o(this,"VirtualStreamActivationScope")}constructor(){this.trackedStreams=new Set,this.hasAuthorizedTrackedStreams=!1,this.published=!1,this.settled=!1}track(e){if(this.settled)throw new Error("Cannot track a VirtualStream in a settled activation scope");let r=Ek.get(e);if(r&&r!==this)throw new Error("VirtualStream is already owned by another activation scope");r||Ek.set(e,this),this.trackedStreams.add(e),this.hasAuthorizedTrackedStreams&&$d(e),this.published&&e.publishActivation()}authorizeApplicationUse(){if(!(this.settled||this.hasAuthorizedTrackedStreams)){this.hasAuthorizedTrackedStreams=!0;for(let e of this.trackedStreams)$d(e)}}publish(){if(!(this.settled||this.published)){this.published=!0;for(let e of this.trackedStreams)e.publishActivation()}}commit(){this.publish(),this.settled=!0,this.trackedStreams.clear()}async rollback(e){if(this.settled)return;this.settled=!0;let r=[...this.trackedStreams];this.trackedStreams.clear(),await Promise.allSettled(r.map(n=>n.rollbackActivation(e)))}},Dr=class t{static{o(this,"VirtualStream")}static{this.maximumStreamIdLength=256}static fromRegistration(e){let r=e.registration?.dispose,n=o(()=>{let i=r;r=void 0,i?.()},"disposeOnce");try{if(t.validateTransport(e.transport),typeof e.registration?.dispose!="function")throw new TypeError("VirtualStream registration requires a synchronous disposer");return t.validateNetworkDescriptor(e.registration.descriptor),t.validateEndpoint(e.registration.endpoint,e.registration.descriptor,e.registration.descriptor.creatorDirection),new t({transport:e.transport,descriptor:e.registration.descriptor,endpoint:e.registration.endpoint,registrationDispose:n,explicitRegistration:!0})}catch(i){throw n(),i}}static encodePayloadForNetwork(e,r){let n=e?.correlation?.phase==="response";return t.encodePayloadValue(e,r,n,!1,!0,{standard:new WeakMap,omittingResponseRequestStreams:new WeakMap})}static encodePayloadForNetworkWithMetadata(e,r){let n=e?.correlation?.phase==="response",i={standard:new WeakMap,omittingResponseRequestStreams:new WeakMap,containsNetworkDescriptor:!1,requiresNetworkDescriptorScan:!1},s=t.encodePayloadValue(e,r,n,!1,!0,i),a=i.requiresNetworkDescriptorScan||t.encodedContainerPrototypesMayExposeNetworkDescriptor();return{payload:s,containsNetworkDescriptor:a?t.containsNetworkDescriptor(s):i.containsNetworkDescriptor}}static encodePayloadValue(e,r,n,i,s,a){if(!e||Hi.isBufferLike(e))return e;if(e instanceof t)return i?{_OMITTED_VIRTUAL_STREAM:!0,reason:"Streams beneath an echoed response.request are omitted."}:(a.containsNetworkDescriptor!==void 0&&(a.containsNetworkDescriptor=!0),e.activateForEncoding(r));if(e instanceof Set||e instanceof Map||e instanceof Date||e instanceof RegExp||e instanceof Error||e instanceof Promise||typeof e.then=="function")return a.containsNetworkDescriptor!==void 0&&typeof e=="object"&&(a.requiresNetworkDescriptorScan=!0),e;if(typeof e!="object")return e;let c=i?a.omittingResponseRequestStreams:a.standard,u=c.get(e);if(u)return u;if(Array.isArray(e)){let p=[];c.set(e,p);for(let h=0;h<e.length;h++)p.push(t.encodePayloadValue(e[h],r,n,i,!1,a));return a.containsNetworkDescriptor!==void 0&&Object.getPrototypeOf(p)!==Array.prototype&&(a.requiresNetworkDescriptorScan=!0),p}let f={};c.set(e,f);for(let p of Object.keys(e)){let h=i||n&&s&&p==="request";f[p]=t.encodePayloadValue(e[p],r,n,h,!1,a)}return a.containsNetworkDescriptor!==void 0&&Object.getPrototypeOf(f)!==Object.prototype&&(a.requiresNetworkDescriptorScan=!0),a.containsNetworkDescriptor!==void 0&&Object.hasOwn(f,"_isVirtualStream")&&f._isVirtualStream===!0&&(a.containsNetworkDescriptor=!0),f}static async decodePayloadFromNetworkAsync(e,r){let n=new Map,i=[],s=[],a=r.activationScope??new wn,l=!r.activationScope,c=t.resolveOpenDeadlineAt(r.openDeadlineAt);try{let u=t.preparePayloadFromNetwork(e,{...r,activationScope:a},n,i,s,new WeakMap);if(i.length>0){let f=r.virtualStreamTransport;if(!f)throw new Error("VirtualStream descriptor requires a virtual stream transport");t.validateTransport(f);for(let p of i){let h=t.getRemainingOpenTimeoutMs(c),m=await t.openVirtualStreamWithTimeout(f,p.descriptor,h,c,r.abortSignal);p.stream.bindOpenedEndpoint(m)}}return l&&(a.authorizeApplicationUse(),a.commit()),u}catch(u){throw await Promise.allSettled(s.map(f=>f.rollbackActivation(u))),u}}static containsNetworkDescriptor(e,r=new WeakSet){return!e||Hi.isBufferLike(e)||typeof e!="object"?!1:e._isVirtualStream===!0?!0:r.has(e)?!1:(r.add(e),Array.isArray(e)?e.some(n=>t.containsNetworkDescriptor(n,r)):e instanceof Set||e instanceof Map||e instanceof Date||e instanceof RegExp||e instanceof Error||e instanceof Promise||typeof e.then=="function"?!1:Object.values(e).some(n=>t.containsNetworkDescriptor(n,r)))}static encodedContainerPrototypesMayExposeNetworkDescriptor(){return Object.getPrototypeOf(Object.prototype)!==null||Object.getPrototypeOf(Array.prototype)!==Object.prototype||Object.getOwnPropertyDescriptor(Object.prototype,"_isVirtualStream")!==void 0||Object.getOwnPropertyDescriptor(Array.prototype,"_isVirtualStream")!==void 0}static preparePayloadFromNetwork(e,r,n,i,s,a){if(Hi.isBufferLike(e)||e===null||typeof e!="object"||e instanceof Set||e instanceof Map||e instanceof Date||e instanceof RegExp||e instanceof Error||e instanceof Promise||typeof e.then=="function")return e;if(e._isVirtualStream===!0){t.validateNetworkDescriptor(e);let u=e,f=n.get(u.streamId);if(f){if(!t.descriptorMetadataMatches(f.descriptor,u))throw new TypeError(`Conflicting VirtualStream metadata for streamId "${u.streamId}"`);return f.stream}let p=r.virtualStreamTransport,h=new t({transport:p,descriptor:u,explicitRegistration:!1});return n.set(u.streamId,{stream:h,descriptor:u}),i.push({stream:h,descriptor:u}),s.push(h),r.activationScope?.track(h),h}let l=a.get(e);if(l)return l;if(Array.isArray(e)){let u=[];a.set(e,u);for(let f of e)u.push(t.preparePayloadFromNetwork(f,r,n,i,s,a));return u}let c={};a.set(e,c);for(let u of Object.keys(e))Object.defineProperty(c,u,{value:t.preparePayloadFromNetwork(e[u],r,n,i,s,a),configurable:!0,enumerable:!0,writable:!0});return c}static resolveOpenDeadlineAt(e){let r=performance.now()+QL;if(e===void 0)return r;if(!Number.isFinite(e)||e<0)throw new RangeError("VirtualStream openDeadlineAt must be a non-negative finite number");return Math.min(e,r)}static getRemainingOpenTimeoutMs(e){let r=Math.ceil(e-performance.now());if(!Number.isSafeInteger(r)||r<=0)throw new Vi(0,e);return r}static async openVirtualStreamWithTimeout(e,r,n,i,s){let a=new Vi(n,i),l=new AbortController,c,u,f,p=Promise.resolve().then(()=>e.openVirtualStream(r,{abortSignal:l.signal,timeoutMs:n}));p.then(async m=>{c!==void 0&&await t.abortLateOpenedEndpoint(m,c)},()=>{});let h=new Promise((m,d)=>{u=setTimeout(()=>{c=a,l.abort(a),d(a)},n),s&&(f=o(()=>{let g=s.reason??new DOMException("The operation was aborted","AbortError");c=g,l.abort(g),d(g)},"parentAbortListener"),s.addEventListener("abort",f,{once:!0}),s.aborted&&f())});try{return await Promise.race([p,h])}finally{u&&clearTimeout(u),s&&f&&s.removeEventListener("abort",f)}}static async abortLateOpenedEndpoint(e,r){let n;try{n=Promise.resolve(e.abort(r))}catch{}n?.catch(()=>{});try{await e.closed}catch{}}static validateTransport(e){if(!e||typeof e!="object"||typeof e.openVirtualStream!="function")throw new TypeError("VirtualStream transport is invalid")}static validateNetworkDescriptor(e){if(!t.isPlainObject(e))throw new TypeError("VirtualStream descriptor must be a plain object");let r=t.getOwnDataProperty(e,"_isVirtualStream"),n=t.getOwnDataProperty(e,"protocol"),i=t.getOwnDataProperty(e,"streamId"),s=t.getOwnDataProperty(e,"creatorDirection");if(r!==!0||n!=="virtual-stream-v1")throw new TypeError("VirtualStream descriptor requires protocol virtual-stream-v1");if(typeof i!="string"||i.length===0||i.length>t.maximumStreamIdLength)throw new TypeError(`VirtualStream descriptor streamId must contain 1-${t.maximumStreamIdLength} characters`);if(s!=="send"&&s!=="receive")throw new TypeError("VirtualStream descriptor creatorDirection must be send or receive");let a=Object.getOwnPropertyDescriptor(e,"contentType");if(a&&(!("value"in a)||typeof a.value!="string"||a.value.length===0))throw new TypeError("VirtualStream descriptor contentType must be a non-empty string");let l=Object.getOwnPropertyDescriptor(e,"integrity");if(l){if(!("value"in l))throw new TypeError("VirtualStream descriptor integrity must be data");t.validateIntegrity(l.value)}let c=Object.getOwnPropertyDescriptor(e,"transport");if(!c||!("value"in c))throw new TypeError("VirtualStream descriptor requires an own transport property");if(!t.isJsonCompatible(c.value,new WeakSet))throw new TypeError("VirtualStream descriptor transport must be JSON-compatible")}static validateIntegrity(e){if(!t.isPlainObject(e))throw new TypeError("VirtualStream integrity must be a plain object");let r=t.getOwnDataProperty(e,"algorithm"),n=t.getOwnDataProperty(e,"byteLength"),i=t.getOwnDataProperty(e,"digest");if(r!=="sha256")throw new TypeError("VirtualStream integrity algorithm must be sha256");if(!Number.isSafeInteger(n)||n<0)throw new TypeError("VirtualStream integrity byteLength must be a non-negative safe integer");if(typeof i!="string"||!/^sha256:[0-9a-f]{64}$/.test(i))throw new TypeError("VirtualStream integrity digest is invalid")}static validateEndpoint(e,r,n){if(!e||typeof e!="object")throw new TypeError("VirtualStream transport returned an invalid endpoint");let i=e;if(i.protocol!=="virtual-stream-v1"||i.direction!==n||i.streamId!==r.streamId||i.contentType!==r.contentType||!t.integrityMatches(i.integrity,r.integrity))throw new TypeError("VirtualStream endpoint direction or metadata does not match its descriptor");if(!("opened"in i)||!("completion"in i)||!i.closed||typeof i.closed.then!="function"||typeof i.abort!="function")throw new TypeError("VirtualStream endpoint lacks lifecycle contracts");if(n==="send"){if(typeof i.send!="function"||typeof i.close!="function"||!("writable"in i))throw new TypeError("VirtualStream sender endpoint is invalid")}else if(typeof i.receive!="function"||typeof i.accept!="function"||typeof i.reject!="function"||!("readable"in i))throw new TypeError("VirtualStream receiver endpoint is invalid")}static descriptorMetadataMatches(e,r){return e.creatorDirection===r.creatorDirection&&e.contentType===r.contentType&&t.integrityMatches(e.integrity,r.integrity)}static integrityMatches(e,r){return!e||!r?e===r:e.algorithm===r.algorithm&&e.byteLength===r.byteLength&&e.digest===r.digest}static getOwnDataProperty(e,r){let n=Object.getOwnPropertyDescriptor(e,r);if(!(!n||!("value"in n)))return n.value}static isPlainObject(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;let r=Object.getPrototypeOf(e);return r===Object.prototype||r===null}static isJsonCompatible(e,r){if(e===null||typeof e=="string"||typeof e=="boolean")return!0;if(typeof e=="number")return Number.isFinite(e);if(!e||typeof e!="object"||r.has(e))return!1;r.add(e);try{if(Array.isArray(e)){for(let n=0;n<e.length;n++){let i=Object.getOwnPropertyDescriptor(e,String(n));if(!i||!("value"in i)||!t.isJsonCompatible(i.value,r))return!1}return Reflect.ownKeys(e).every(n=>n==="length"||typeof n=="string"&&/^(0|[1-9][0-9]*)$/.test(n)&&Number(n)<e.length)}if(!t.isPlainObject(e))return!1;for(let n of Reflect.ownKeys(e)){if(typeof n!="string")return!1;let i=Object.getOwnPropertyDescriptor(e,n);if(!i.enumerable||!("value"in i)||!t.isJsonCompatible(i.value,r))return!1}return!0}finally{r.delete(e)}}constructor(e){this.activationPublished=!1,this.endpointUseStarted=!1,this.endpointClosed=!1,this.locallyDisposed=!1,this.transport=e.transport,this.descriptor=e.descriptor,this.endpoint=e.endpoint,this.registrationDispose=e.registrationDispose,this.explicitRegistration=e.explicitRegistration,this.explicitRegistration&&$d(this),this.endpoint&&this.observeEndpoint(this.endpoint)}get protocol(){return"virtual-stream-v1"}get direction(){return this.endpoint?this.endpoint.direction:this.descriptor.creatorDirection==="send"?"receive":"send"}get streamId(){return this.descriptor.streamId}get contentType(){return this.descriptor.contentType}get integrity(){return this.descriptor.integrity}get opened(){try{this.assertApplicationOperationsAllowed(),this.assertNotClosed(),this.endpointUseStarted=!0;let e=this.requireEndpoint().opened;if(!e||typeof e.then!="function")throw new TypeError("VirtualStream endpoint opened contract is invalid");return e}catch(e){return Promise.reject(e)}}get completion(){let e=this.requireEndpoint().completion;if(!e||typeof e.then!="function")throw new TypeError("VirtualStream endpoint completion contract is invalid");return e}get closed(){return this.requireEndpoint().closed}get writable(){return this.assertApplicationOperation("send"),this.endpointUseStarted=!0,this.requireEndpoint().writable}get readable(){return this.assertApplicationOperation("receive"),this.endpointUseStarted=!0,this.requireEndpoint().readable}publishActivation(){this.explicitRegistration&&!this.locallyDisposed&&(this.activationPublished=!0)}async rollbackActivation(e){if(!this.locallyDisposed){if(this.explicitRegistration&&!this.activationPublished&&!this.endpointUseStarted){this.disposeUnpublishedRegistration();return}this.endpoint&&await this.abort(e)}}async send(e){if(this.assertApplicationOperation("send"),!(e instanceof Uint8Array))throw new TypeError("VirtualStream.send accepts only Uint8Array chunks");this.endpointUseStarted=!0,await this.requireEndpoint().send(e)}async receive(){return this.assertApplicationOperation("receive"),this.endpointUseStarted=!0,this.requireEndpoint().receive()}close(){if(this.terminalPromise)return this.followTerminal("close");try{this.assertApplicationOperation("send"),this.endpointUseStarted=!0;let e=this.requireEndpoint();return this.terminateEndpoint(()=>e.close(),"close")}catch(e){return Promise.reject(e)}}accept(){if(this.terminalPromise)return this.followTerminal("accept");try{this.assertApplicationOperation("receive"),this.endpointUseStarted=!0;let e=this.requireEndpoint();return this.terminateEndpoint(()=>e.accept(),"accept")}catch(e){return Promise.reject(e)}}reject(e){if(this.terminalPromise)return this.followTerminal("reject");try{this.assertApplicationOperation("receive"),this.endpointUseStarted=!0;let r=this.requireEndpoint();return this.terminateEndpoint(()=>r.reject(e),"reject")}catch(r){return Promise.reject(r)}}abort(e){if(this.terminalPromise)return this.followTerminal("abort");if(this.locallyDisposed||this.endpointClosed)return Promise.resolve();let r=this.endpoint;return r?(this.endpointUseStarted=!0,this.terminateEndpoint(()=>r.abort(e),"abort")):Promise.resolve()}activateForEncoding(e){e.activationScope?.track(this);try{if(!e.virtualStreamTransport)throw new Error("VirtualStream requires a virtual stream transport");if(this.transport!==e.virtualStreamTransport)throw new Error("VirtualStream cannot be encoded through a different virtual stream transport");if(this.assertNotClosed(),this.terminalPromise)throw new Yi("VirtualStream has a terminal operation");return e.activationScope||this.publishActivation(),this.descriptor}catch(r){throw e.activationScope||this.rollbackActivation(r).catch(()=>{}),r}}bindOpenedEndpoint(e){this.endpoint=e;let r=this.descriptor.creatorDirection==="send"?"receive":"send";t.validateEndpoint(e,this.descriptor,r),this.observeEndpoint(e)}observeEndpoint(e){let r=e.completion;if(!r||typeof r.then!="function")throw new TypeError("VirtualStream endpoint completion contract is invalid");r.then(n=>{this.completionOutcome={status:"fulfilled",value:n}},n=>{this.completionOutcome={status:"rejected",error:n}}),e.closed.then(()=>this.markEndpointClosed(),n=>this.markEndpointClosed(n))}markEndpointClosed(e){e!==void 0&&this.getCloseError(e),this.endpointClosed=!0,this.disposeRegistration()}disposeRegistration(){let e=this.registrationDispose;this.registrationDispose=void 0,e?.()}disposeUnpublishedRegistration(){this.locallyDisposed||(this.locallyDisposed=!0,this.disposeRegistration())}requireEndpoint(){if(!this.endpoint)throw new Error("VirtualStream endpoint is not staged");return this.endpoint}assertApplicationOperationsAllowed(){if(!Tk.has(this))throw new Error("VirtualStream application use is not authorized")}assertApplicationOperation(e){if(this.assertApplicationOperationsAllowed(),this.assertNotClosed(),this.terminalPromise)throw new Yi("VirtualStream has a terminal operation");if(this.direction!==e)throw new TypeError(`${this.direction} VirtualStreams cannot perform ${e} operations`)}assertNotClosed(){if(this.endpointClosed||this.locallyDisposed)throw this.getCloseError()}getCloseError(e){return this.closeError||(this.closeError=new Yi("VirtualStream is closed",e===void 0?void 0:{cause:e})),this.closeError}followTerminal(e){let r=this.terminalPromise;if(this.terminalKind===e)return r;let n=new Yi(`VirtualStream terminal ${this.terminalKind} already completed`);return r.then(()=>Promise.reject(n),()=>Promise.reject(n))}terminateEndpoint(e,r){if(this.terminalPromise)return this.followTerminal(r);let n=this.requireEndpoint();this.terminalKind=r;let i=e,s=Promise.resolve().then(()=>{let f=i;return i=void 0,f()});s.catch(()=>{});let a=s.then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",error:f})),l;a.then(f=>{l=f});let c=n.closed.then(()=>({status:"closed"}),f=>({status:"closedError",error:f})),u=(async()=>{let f=await Promise.race([a,c]);if(f.status==="fulfilled"||f.status==="rejected"){let p=await c;if(this.endpointClosed=!0,this.disposeRegistration(),f.status==="rejected")throw f.error;if(p.status==="closedError")throw p.error;return f.value}if(this.endpointClosed=!0,this.disposeRegistration(),f.status==="closedError")throw f.error;if(await Promise.resolve(),await Promise.resolve(),l?.status==="rejected")throw l.error;if(l?.status==="fulfilled")return l.value;if(r==="close"||r==="accept"){if(this.completionOutcome?.status==="fulfilled")return this.completionOutcome.value;throw this.completionOutcome?.status==="rejected"?this.completionOutcome.error:new hp(r)}})();return this.terminalPromise=u,u}};var ur=class extends Error{static{o(this,"TypedResponseError")}constructor(e,r){super(e),this.name="TypedResponseError",this.errorText=e,this.errorData=r??{}}};var Es=Object.freeze({redacted:!0});var Dk=Object.freeze(["onOutgoingRequest","onIncomingResponse","onIncomingRequest","onOutgoingResponse"]),Ck=Symbol.for("@api.global/typedrequest:global-hooks:3.8"),Ok=o(t=>({payloadProjector:t?.payloadProjector,errorProjector:t?.errorProjector}),"copyProjectionOptions"),dp=o((t={})=>({hooks:t,projectedRegistrationsByPhase:{}}),"createTypedRouterHookRegistrationState"),XL=o(t=>Dk.filter(e=>Object.hasOwn(t,e)).map(e=>[e,t[e]]),"getSuppliedHookEntries"),gp=o((t,e,r)=>{let n=XL(e);t.hooks={...t.hooks,...e};for(let[i]of n){let s=t.hooks[i];if(typeof s!="function"){delete t.projectedRegistrationsByPhase[i];continue}t.projectedRegistrationsByPhase[i]={callback:s,projectionOptions:Ok(r)}}},"mergeTypedRouterHookRegistrations"),yp=o((t,e)=>{t.hooks=e;for(let r of Dk)delete t.projectedRegistrationsByPhase[r]},"replaceTypedRouterHookRegistrations"),Ds=o(()=>{let t=globalThis[Ck];if(t?.version==="3.8"&&t.stateShape==="callback-bound-projections-v1"&&t.subscribers instanceof Map)return t;let e={version:"3.8",stateShape:"callback-bound-projections-v1",legacy:dp(),subscribers:new Map};return globalThis[Ck]=e,e},"getRealmGlobalHookState"),Ik=o(()=>Ds().legacy.hooks,"getLegacyGlobalHooks"),Nk=o(t=>{yp(Ds().legacy,t)},"replaceLegacyGlobalHooks"),Pk=o((t,e)=>{gp(Ds().legacy,t,e)},"mergeLegacyGlobalHooks"),Lk=o((t,e)=>{let r=Ds(),n=Symbol("typedrequest-hook-subscriber"),i=dp();gp(i,t,e),r.subscribers.set(n,i);let s=!1;return()=>{s||(s=!0,r.subscribers.delete(n))}},"addGlobalHookSubscriber"),_k=o(()=>{let t=Ds();yp(t.legacy,{}),t.subscribers.clear()},"clearGlobalHookRegistrations"),mp=o(t=>{try{console.error(`TypedRequest hook projection failed (${t})`)}catch{}},"logProjectionFailure"),Bd=o(t=>{try{console.error(`TypedRequest hook callback failed (${t})`)}catch{}},"logCallbackFailure"),ZL=o((t,e)=>{let r={correlationId:t.correlationId,method:t.method,direction:t.direction,phase:t.phase,timestamp:t.timestamp,...t.durationMs===void 0?{}:{durationMs:t.durationMs},hasError:t.errorText!==void 0};try{return Object.freeze(r)}catch{mp(e);return}},"createMetadata"),Mk=o(t=>typeof SharedArrayBuffer>"u"?!1:t instanceof SharedArrayBuffer||Object.prototype.toString.call(t)==="[object SharedArrayBuffer]","isSharedArrayBuffer"),Cs=o((t,e=new Set)=>{if(!(t===null||typeof t!="object"&&typeof t!="function")){if(Mk(t))throw new TypeError("TypedRequest hook projections cannot contain SharedArrayBuffer");if(ArrayBuffer.isView(t)){if(Mk(t.buffer))throw new TypeError("TypedRequest hook projections cannot contain SharedArrayBuffer-backed views");return}if(!e.has(t)){if(e.add(t),t instanceof Map){for(let[r,n]of t)Cs(r,e),Cs(n,e);return}if(t instanceof Set){for(let r of t)Cs(r,e);return}for(let r of Reflect.ownKeys(t)){let n=Reflect.getOwnPropertyDescriptor(t,r);if(n){if(!Object.hasOwn(n,"value"))throw new TypeError("TypedRequest hook projections cannot contain accessor properties");Cs(n.value,e)}}}}},"assertNoSharedArrayBuffer"),e_=o((t,e,r,n)=>{if(!e||!r.payloadProjector)return{payload:Es,payloadRedacted:!0};try{let i=r.payloadProjector(t,e);Cs(i);let s=structuredClone(i);return Cs(s),s!==null&&(typeof s=="object"||typeof s=="function")&&Object.freeze(s),{payload:s,payloadRedacted:!1}}catch{return mp(n),{payload:Es,payloadRedacted:!0}}},"snapshotPayload"),t_=o((t,e,r,n)=>{if(!(!e||t.errorText===void 0||!r.errorProjector))try{let i=r.errorProjector(t.errorText,e);if(i===void 0)return;let s=structuredClone(i);if(typeof s!="string")throw new TypeError("TypedRequest error projector must return a string or undefined");return s}catch{mp(n);return}},"snapshotError"),r_=o((t,e,r)=>{let n=ZL(t,r),i=e_(t.payload,n,e,r),s=t_(t,n,e,r),a={correlationId:t.correlationId,method:t.method,direction:t.direction,phase:t.phase,timestamp:t.timestamp,...t.durationMs===void 0?{}:{durationMs:t.durationMs},hasError:t.errorText!==void 0,...i,...s===void 0?{}:{error:s}};try{return Object.freeze(a)}catch{mp(r);let l={correlationId:t.correlationId,method:t.method,direction:t.direction,phase:t.phase,timestamp:t.timestamp,...t.durationMs===void 0?{}:{durationMs:t.durationMs},hasError:t.errorText!==void 0,payload:Es,payloadRedacted:!0};try{return Object.freeze(l)}catch{return l}}},"projectLogEntry"),jd=o((t,e)=>{try{let r=t.hooks[e];if(typeof r!="function")return;let n=t.projectedRegistrationsByPhase[e];return{callback:r,projectionOptions:n?.callback===r?Ok(n.projectionOptions):{}}}catch{Bd(e);return}},"snapshotDispatchRecipient"),zd=o((t,e,r)=>{let n=r_(r,t.projectionOptions,e);try{let i=t.callback(n);i&&typeof i.then=="function"&&Promise.resolve(i).catch(()=>{Bd(e)})}catch{Bd(e)}},"dispatchToRecipient"),Os=o((t,e,r)=>{let n=Ds();if(n.subscribers.size===0){let a=jd(n.legacy,t),l=r?jd(r,t):void 0;if(!a&&!l)return;a&&zd(a,t,e),l&&zd(l,t,e);return}let s=[n.legacy,...Array.from(n.subscribers.values()),...r?[r]:[]].map(a=>jd(a,t)).filter(a=>!!a);for(let a of s)zd(a,t,e)},"dispatchTypedRequestHook");var xp=class{static{o(this,"TypedTools")}constructor(e){this.localData={},this.abortSignal=e??new AbortController().signal}async passGuards(e,r){let n=new Za.GuardSet(e);if(!await n.allGuardsPass(r)){let s=await n.getFailedHint(r);throw new ur(`guard failed: ${s}`,{failedHint:s})}}};var $Ce=16,BCe=1024,Rk=Symbol.for("@api.global/typedrequest:global-error-reporter"),Wd=o(()=>{let t=globalThis[Rk];if(t&&typeof t=="object")return t;let e={reporter:void 0};return globalThis[Rk]=e,e},"getRealmGlobalErrorReporterState"),n_=o(()=>Wd().reporter,"getGlobalTypedRequestErrorReporter"),Fk=o(t=>{let e=Wd();e.reporter=t;let r=!1;return()=>{r||(r=!0,e.reporter===t&&(e.reporter=void 0))}},"setGlobalTypedRequestErrorReporter"),$k=o(()=>{Wd().reporter=void 0},"clearGlobalTypedRequestErrorReporter"),Ki=o(t=>{let e=t.replace(/[\u0000-\u001f\u007f]/g," ");return e.length<=1024?e:`${e.slice(0,1024)}...[truncated]`},"sanitizeLogText"),i_=o(t=>{try{let e=t.name;if(typeof e=="string"&&e.length>0)return Ki(e)}catch{}try{let e=t.constructor?.name;if(typeof e=="string"&&e.length>0)return Ki(e)}catch{}return"Error"},"readErrorName"),o_=o(t=>{try{let e=t.message;return typeof e=="string"?Ki(e):""}catch{return""}},"readErrorMessage"),s_=o(t=>{if(t instanceof Error)return{name:i_(t),message:o_(t)};if(t===null)return{name:"null",message:""};let e=typeof t;if(e==="object"||e==="function"){let n=e;try{let i=t?.constructor?.name;typeof i=="string"&&i.length>0&&(n=Ki(i))}catch{}return{name:"NonErrorThrowable",message:`<non-Error ${n} thrown>`}}let r="";try{r=Ki(String(t))}catch{}return{name:`NonErrorThrowable(${e})`,message:r}},"describeThrowable"),a_=o(t=>{if(!(t===null||typeof t!="object"&&typeof t!="function"))try{return t.cause}catch{return}},"readCause"),l_=o(t=>{let e=[],r=new Set,n=t;for(;e.length<16;){if(n!==null&&(typeof n=="object"||typeof n=="function")){if(r.has(n))break;r.add(n)}e.push(s_(n));let i=a_(n);if(i===void 0)break;n=i}return e},"buildChain"),c_=o(t=>{if(t instanceof Error)try{return typeof t.stack=="string"?t.stack:void 0}catch{return}},"readStack"),Ak=o((t,e)=>t==="handler"?`TypedRequest handler '${e}' failed`:t==="requestscope"?`TypedRequest request scope for method '${e}' failed`:`TypedRequest middleware for method '${e}' failed`,"buildPrefix"),u_=o(t=>t.map(e=>e.message.length>0?`${e.name}: ${e.message}`:e.name).join(" <- caused by: "),"renderChain"),f_=o(t=>{let e=Ki(String(t.method)),r=l_(t.error),n=typeof t.correlationId=="string"&&t.correlationId.length>0?Ki(t.correlationId):void 0,i=n?` [correlation ${n}]`:"",s=`${Ak(t.origin,e)}${i}: ${u_(r)}`,a=c_(t.error);return{origin:t.origin,method:e,...n===void 0?{}:{correlationId:n},chain:Object.freeze(r),formatted:s,...a===void 0?{}:{stack:a},error:t.error}},"buildTypedRequestErrorReport"),Hd=o(t=>{try{console.error(t.formatted)}catch{}},"printDefaultReport"),Ms=o(t=>{let e;try{e=f_(t)}catch{try{console.error(`${Ak(t.origin,String(t.method))}: <error description unavailable>`)}catch{}return}let r=n_();if(!r){Hd(e);return}try{let n=r(e);n&&typeof n.then=="function"&&Promise.resolve(n).catch(()=>{Hd(e)})}catch{Hd(e)}},"reportTypedRequestError");var Ud=class t{static{o(this,"TypedHandler")}static{this.internalErrorMessage="Internal server error"}constructor(e,r){this.method=e,this.handlerFunction=r}async addResponse(e,r){if(e.method!==this.method)throw new Error("this handler has been given a wrong method to answer to. Please use a TypedRouter to filter requests");let n,i=new xp(r);e.localData&&(i.localData=e.localData);let s=await this.handlerFunction(e.request,i).catch(a=>{a instanceof ur?n=a:(Ms({origin:"handler",method:this.method,correlationId:e.correlation?.id,error:a}),n=new ur(t.internalErrorMessage))});return n&&(e.error={text:n.errorText,data:n.errorData}),s&&(e.response=s),e?.correlation?.phase&&(e.correlation.phase="response"),e}};var p_=[],Bk=o(async(t,e,r,n,i)=>{if(e>=t.length){await r();return}let s=t[e],a=!1,l=!1,c=!1,u,f,p=o(()=>{if(a)throw new TypeError("A TypedRouter request scope called next() more than once");if(l)throw new TypeError("A TypedRouter request scope called next() after it returned");a=!0;let d=Bk(t,e+1,r,n,i);f=d.then(()=>{c=!0},y=>{c=!0,u={error:y}});let g=d.then(()=>{});return g.catch(()=>{}),g},"next"),h;try{await s(n,p,i)}catch(d){h={error:d}}l=!0;let m=a&&!c;if(f&&await f,m)throw u&&h&&h.error!==u.error&&Ms({origin:"requestscope",method:i.method,correlationId:n.correlation?.id,error:h.error}),u?u.error:h?h.error:new TypeError("A TypedRouter request scope returned before next() settled");if(h)throw h.error},"runTypedRouterRequestScopeChain");function bp(t){let e=t?.method,r=t?.correlation?.id,n=t?.requestInstanceId;if(!(typeof e!="string"||e.length===0||typeof r!="string"||r.length===0||typeof n!="string"||n.length===0))return JSON.stringify([e,r,n])}o(bp,"getTypedRequestResponseInterestKey");var qd=class t{static{o(this,"TypedRouter")}constructor(){this.hookRegistrationState=dp(),this.routerMap=new St.ObjectMap,this.fallbackRouterMap=new St.ObjectMap,this.fallbackParentRouters=new Set,this.handlerMap=new St.ObjectMap,this.middlewares=[],this.requestScopes=[],this.fireEventInterestMap=new St.InterestMap(e=>e)}static{this.internalErrorMessage="Internal server error"}registerVirtualStreamTransportResolver(e){if(typeof e!="function")throw new TypeError("TypedRouter virtual stream transport resolver must be a function");if(this.virtualStreamTransportResolver)throw new Error("TypedRouter already has a virtual stream transport resolver owner");this.virtualStreamTransportResolver=e;let r=!1;return()=>{r||(r=!0,this.virtualStreamTransportResolver===e&&(this.virtualStreamTransportResolver=void 0))}}registerIncomingRequestAuthorityGuard(e){if(typeof e!="function")throw new TypeError("TypedRouter incoming request authority guard must be a function");if(this.incomingRequestAuthorityGuard)throw new Error("TypedRouter already has an incoming request authority guard owner");this.incomingRequestAuthorityGuard=e;let r=!1;return()=>{r||(r=!0,this.incomingRequestAuthorityGuard===e&&(this.incomingRequestAuthorityGuard=void 0))}}registerIncomingRequestSignalResolver(e){if(typeof e!="function")throw new TypeError("TypedRouter incoming request signal resolver must be a function");if(this.incomingRequestSignalResolver)throw new Error("TypedRouter already has an incoming request signal resolver owner");this.incomingRequestSignalResolver=e;let r=!1;return()=>{r||(r=!0,this.incomingRequestSignalResolver===e&&(this.incomingRequestSignalResolver=void 0))}}registerIncomingResponseAuthorityGuard(e){if(typeof e!="function")throw new TypeError("TypedRouter incoming response authority guard must be a function");if(this.incomingResponseAuthorityGuard)throw new Error("TypedRouter already has an incoming response authority guard owner");this.incomingResponseAuthorityGuard=e;let r=!1;return()=>{r||(r=!0,this.incomingResponseAuthorityGuard===e&&(this.incomingResponseAuthorityGuard=void 0))}}static get globalHooks(){return Ik()}static set globalHooks(e){Nk(e)}static setGlobalHooks(e,r){Pk(e,r)}static addGlobalHooks(e,r){return Lk(e,r)}static clearGlobalHooks(){_k()}static setGlobalErrorReporter(e){return Fk(e)}static clearGlobalErrorReporter(){$k()}get hooks(){return this.hookRegistrationState.hooks}set hooks(e){yp(this.hookRegistrationState,e)}setHooks(e,r){gp(this.hookRegistrationState,e,r)}callHook(e,r){Os(e,r,this.hookRegistrationState)}setErrorFromCaughtError(e,r,n){if(r instanceof ur){e.error={text:r.errorText,data:r.errorData??{}};return}Ms({origin:n,method:e.method,correlationId:e.correlation?.id,error:r}),e.error={text:t.internalErrorMessage,data:{}}}addMiddleware(e){this.middlewares.push(e)}addRequestScope(e){if(typeof e!="function")throw new TypeError("TypedRouter request scope must be a function");let r={scope:e};this.requestScopes.push(r);let n=!1;return()=>{if(n)return;n=!0;let i=this.requestScopes.indexOf(r);i!==-1&&this.requestScopes.splice(i,1)}}collectRequestScopes(e){let r;for(let n of e){let i=n.requestScopes;if(!(!i||i.length===0)){r??=[];for(let s of i)r.push(s.scope)}}return r??p_}addTypedHandler(e){if(this.getTypedHandlerForMethod(e.method))throw new Error(`a TypedHandler for ${e.method} alredy exists! Can't add another one.`);this.handlerMap.add(e);try{this.validateAffectedCompositionRoots()}catch(n){throw this.handlerMap.remove(e),n}}addTypedRouter(e){if(e===this)throw new Error("A TypedRouter cannot be composed with itself.");if(this.routerMap.findSync(a=>a===e))return()=>{};let n=this.canReachRouter(e),i=e.canReachRouter(this);if(n!==i)throw new Error("Cannot add a bidirectional TypedRouter edge across an existing composition boundary.");this.routerMap.add(e),e.routerMap.add(this);try{this.validateAffectedCompositionRoots()}catch(a){throw this.routerMap.remove(e),e.routerMap.remove(this),a}let s=!1;return()=>{s||(s=!0,this.routerMap.remove(e),e.routerMap.remove(this))}}addFallbackRouter(e){if(e===this)throw new Error("A TypedRouter cannot use itself as a fallback.");if(this.fallbackRouterMap.findSync(n=>n===e))return()=>{};if(e.canReachRouter(this))throw new Error("Adding this fallback would create a TypedRouter composition cycle.");this.fallbackRouterMap.add(e),e.fallbackParentRouters.add(this);try{this.validateAffectedCompositionRoots()}catch(n){throw this.fallbackRouterMap.remove(e),e.fallbackParentRouters.delete(this),n}let r=!1;return()=>{r||(r=!0,this.fallbackRouterMap.remove(e),e.fallbackParentRouters.delete(this))}}getMethodNames(){return[...this.collectReachableHandlers().keys()].sort()}canReachRouter(e,r=new Set){if(this===e)return!0;if(r.has(this))return!1;r.add(this);for(let n of[...this.routerMap.getArray(),...this.fallbackRouterMap.getArray()])if(n.canReachRouter(e,r))return!0;return!1}collectReachableHandlers(e=new Set,r=new Map){if(e.has(this))return r;e.add(this);for(let n of this.handlerMap.getArray()){let i=r.get(n.method);i||(i=new Set,r.set(n.method,i)),i.add(this)}for(let n of[...this.routerMap.getArray(),...this.fallbackRouterMap.getArray()])n.collectReachableHandlers(e,r);return r}getAffectedCompositionRoots(){let e=new Set,r=[this];for(;r.length>0;){let n=r.pop();e.has(n)||(e.add(n),r.push(...n.routerMap.getArray(),...n.fallbackParentRouters))}return e}validateAffectedCompositionRoots(){for(let e of this.getAffectedCompositionRoots())for(let[r,n]of e.collectReachableHandlers())if(n.size>1)throw new Error(`TypedRouter composition exposes more than one handler for method "${r}".`)}checkForTypedHandler(e){return!!this.getTypedHandlerForMethod(e)}getTypedHandlerForMethod(e,r=[]){r.push(this);let n;return n=this.handlerMap.findSync(i=>i.method===e),n||this.routerMap.getArray().forEach(i=>{!n&&!r.includes(i)&&(n=i.getTypedHandlerForMethod(e,r))}),n||this.fallbackRouterMap.getArray().forEach(i=>{!n&&!r.includes(i)&&(n=i.getTypedHandlerForMethod(e,r))}),n}getTypedHandlerAndRouter(e,r=[]){r.push(this);let n=this.handlerMap.findSync(i=>i.method===e);if(n)return{handler:n,router:this,routerPath:[this]};for(let i of this.routerMap.getArray())if(!r.includes(i)){let s=i.getTypedHandlerAndRouter(e,r);if(s)return{...s,routerPath:[this,...s.routerPath??[s.router]]}}for(let i of this.fallbackRouterMap.getArray())if(!r.includes(i)){let s=i.getTypedHandlerAndRouter(e,r);if(s)return{...s,routerPath:[this,...s.routerPath??[s.router]]}}return null}static{this.defaultRouteOptions={localRequest:!1,skipHooks:!1}}async routeAndAddResponse(e,r={}){if(!e||typeof e!="object")return null;let n;try{n=Object.prototype.propertyIsEnumerable.call(e,"localData")}catch{return null}let i={...t.defaultRouteOptions,...r};if(!this.sanitizeIncomingLocalData(e))return null;let s=Object.freeze({...i.trustedLocalData??{}});if(e?.correlation?.phase==="response"){let d=bp(e);if(!d)return null;if(this.incomingResponseAuthorityGuard){let g=Object.freeze({typedRouter:this,trustedLocalData:s,wireLocalDataPresent:n}),y=!1;try{y=this.incomingResponseAuthorityGuard(e,g)===!0}catch{}if(!y)return null}return i.skipHooks||this.callHook("onIncomingResponse",{correlationId:e.correlation.id,method:e.method,direction:"incoming",phase:"response",timestamp:Date.now(),payload:e.response,errorText:e.error?.text}),this.fireEventInterestMap.findInterest(d)?.fullfillInterest(e),null}if(e?.correlation?.phase!=="request"||typeof e.correlation.id!="string"||e.correlation.id.length===0||typeof e.method!="string"||e.method.length===0||!e.request||typeof e.request!="object")return console.log("TypedRouter received a malformed request DTO"),null;if(this.incomingRequestAuthorityGuard){let d=Object.freeze({typedRouter:this,trustedLocalData:s,wireLocalDataPresent:n}),g=!1;try{g=this.incomingRequestAuthorityGuard(e,d)===!0}catch{}if(!g)return null}let a,l=i.trustedAbortSignal;if(l!==void 0&&!this.isAbortSignal(l))throw new TypeError("TypedRouter trustedAbortSignal must be an AbortSignal");if(!l&&this.incomingRequestSignalResolver){if(typeof e.requestInstanceId!="string"||e.requestInstanceId.length===0)return null;let d=Object.freeze({typedRouter:this,trustedLocalData:s,wireLocalDataPresent:n});try{a=this.incomingRequestSignalResolver(e,d)}catch{return null}if(a&&(!this.isAbortSignal(a.abortSignal)||typeof a.complete!="function")){try{a.complete?.()}catch{}return null}l=a?.abortSignal}let c;try{c=this.virtualStreamTransportResolver?.(s)}catch(d){try{a?.complete()}catch{}throw d}let u=new wn,f=new wn,p=o(async d=>{await Promise.allSettled([u.rollback(d),f.rollback(d)])},"rollbackRouteActivations"),h=o(()=>{u.commit(),f.commit()},"commitRouteActivations"),m=o(async()=>(delete e.localData,Dr.encodePayloadForNetwork(e,{side:"responding",virtualStreamTransport:c,activationScope:f})),"encodeResponse");try{if(e=await Dr.decodePayloadFromNetworkAsync(e,{side:"responding",virtualStreamTransport:c,activationScope:u,abortSignal:l}),e.localData={...s},e.localData.firstTypedrouter=this,e?.correlation?.phase==="request"){let d=Date.now();i.skipHooks||this.callHook("onIncomingRequest",{correlationId:e.correlation?.id||"unknown",method:e.method,direction:"incoming",phase:"request",timestamp:d,payload:e.request});let g=this.getTypedHandlerAndRouter(e.method);if(!g)return console.log(`Cannot find handler for methodname ${e.method}`),e.error={text:"There is no available method for this call on the server side",data:{}},e.correlation.phase="response",e=await m(),await p(e.error),i.skipHooks||this.callHook("onOutgoingResponse",{correlationId:e.correlation?.id||"unknown",method:e.method,direction:"outgoing",phase:"response",timestamp:Date.now(),durationMs:Date.now()-d,payload:e.response,errorText:e.error?.text}),this.assertTrustedAbortSignalActive(l),e;let{handler:y,router:x}=g,T=g.routerPath??[x],E,L,P=!1,D=o(async()=>{try{if(x.middlewares.length>0)try{for(let W of x.middlewares)await W(e)}catch(W){E={value:W},this.setErrorFromCaughtError(e,W,"middleware"),e.correlation.phase="response",P=!0;return}u.authorizeApplicationUse(),e=await y.addResponse(e,l),P=!0}catch(W){throw L={error:W},W}},"runMiddlewareAndHandler"),F=this.collectRequestScopes(T);if(F.length===0)await D();else{let W=Object.freeze({entryRouter:this,owningRouter:x,method:e.method,localData:s,abortSignal:l}),C;try{await Bk(F,0,D,e,W)}catch(le){if(L&&le===L.error)throw le;C={error:le}}if(C)e.response=null,this.setErrorFromCaughtError(e,C.error,"requestscope"),e.correlation.phase="response",E={value:C.error};else if(!P){if(!e.error&&(e.response===void 0||e.response===null)){let le=new Error("A TypedRouter request scope answered with neither a response nor an error");Ms({origin:"requestscope",method:e.method,correlationId:e.correlation?.id,error:le}),e.error={text:t.internalErrorMessage,data:{}},E={value:le}}e.correlation.phase="response"}}let A=!!e.error;return e=await m(),A&&await p(E?E.value:e.error),i.skipHooks||this.callHook("onOutgoingResponse",{correlationId:e.correlation?.id||"unknown",method:e.method,direction:"outgoing",phase:"response",timestamp:Date.now(),durationMs:Date.now()-d,payload:e.response,errorText:e.error?.text}),A||(this.assertTrustedAbortSignalActive(l),h()),this.assertTrustedAbortSignalActive(l),e}return await p(new Error("TypedRouter received an unroutable request DTO")),this.assertTrustedAbortSignalActive(l),null}catch(d){throw await p(d),d}finally{try{a?.complete()}catch{}}}sanitizeIncomingLocalData(e){try{let r=Reflect.getOwnPropertyDescriptor(e,"localData");if(r&&(r.configurable!==!0||!Reflect.deleteProperty(e,"localData")))return!1;if(!Reflect.has(e,"localData"))return!0;if(!Reflect.isExtensible(e)||!Reflect.defineProperty(e,"localData",{configurable:!0,enumerable:!1,value:void 0,writable:!0}))return!1;let n=Reflect.getOwnPropertyDescriptor(e,"localData");return!!(n&&n.configurable===!0&&n.enumerable===!1&&n.value===void 0&&n.writable===!0)}catch{return!1}}isAbortSignal(e){return!!(e&&typeof e=="object"&&typeof Reflect.get(e,"aborted")=="boolean"&&typeof Reflect.get(e,"addEventListener")=="function"&&typeof Reflect.get(e,"removeEventListener")=="function")}assertTrustedAbortSignalActive(e){if(e?.aborted)throw e.reason??new DOMException("The operation was aborted","AbortError")}};var Yd=class{static{o(this,"TypedTarget")}constructor(e){if(this.isAsync=!1,e.postMethodWithTypedRouter&&!e.typedRouterRef)throw new Error("you have to specify a typedrouter when using postmethod with typedrouter");let r=e.responseTimeoutMs??3e4;if(!Number.isSafeInteger(r)||r<=0||r>2147483647)throw new RangeError("TypedTarget responseTimeoutMs must be a positive safe integer no greater than 2147483647");this.options=e,this.responseTimeoutMs=r}async post(e,r={}){if(r.signal&&this.options.supportsAbortSignal!==!0)throw new Error("TypedTarget does not declare AbortSignal transport support");let n=this.options.postMethod||this.options.postMethodWithTypedRouter;if(!n)throw new Error("TypedTarget requires a post method");let i;if(this.options.typedRouterRef){let f=bp(e);if(!f)throw new TypeError("TypedTarget request response identity is malformed");i=await this.options.typedRouterRef.fireEventInterestMap.addInterest(f,e)}let s=r.signal;if(s?.aborted)throw i?.destroy(),s.reason??new DOMException("The operation was aborted","AbortError");let a,l=s?new Promise((f,p)=>{a=o(()=>{i?.destroy(),p(s.reason??new DOMException("The operation was aborted","AbortError"))},"abortListener"),s.addEventListener("abort",a,{once:!0})}):void 0,c,u=i?new Promise((f,p)=>{c=setTimeout(()=>{p(new Error(`TypedTarget response timed out after ${this.responseTimeoutMs}ms`))},this.responseTimeoutMs),c.unref?.()}):void 0;try{let f=Promise.resolve(n(e,r)),p=await Promise.race([f,...u?[u]:[],...l?[l]:[]]);return i?await Promise.race([i.interestFullfilled,u,...l?[l]:[]]):p||e}finally{c&&clearTimeout(c),s&&a&&s.removeEventListener("abort",a),i?.destroy()}}};var wp=new Ts.WebrequestClient,vp=2147483647,Sp=class extends Error{static{o(this,"TypedRequestTimeoutError")}constructor(e,r){super(`Typed request "${e}" timed out after ${r}ms`),this.name="TypedRequestTimeoutError",this.method=e,this.timeoutMs=r}},kp=class extends Error{static{o(this,"TypedRequestRetryLimitError")}constructor(e,r){super(`Typed request "${e}" exceeded its ${r} server-directed retries`),this.name="TypedRequestRetryLimitError",this.method=e,this.maxRetries=r}},Tp=class{static{o(this,"TypedRequest")}constructor(e,r){this.skipHooks=!1,typeof e=="string"?this.urlEndPoint=e:this.typedTarget=e,this.method=r}async fire(e,r=!1){let n=Date.now(),i=this.resolveFireOptions(r),s=this.createAbortContext(i);i.abortSignal=s.signal;let a=new wn,l={method:this.method,request:e,response:null,requestInstanceId:sl.uni(),correlation:{id:sl.uni(),phase:"request"}};try{this.assertActive(i);let c=Dr.encodePayloadForNetworkWithMetadata(l,{side:"requesting",activationScope:a,virtualStreamTransport:this.typedTarget?.options.virtualStreamTransport});l=c.payload;let u=c.containsNetworkDescriptor;if(u&&!this.urlEndPoint&&this.typedTarget.options.supportsAbortSignal!==!0)throw new Error("VirtualStreams require TypedTarget AbortSignal transport support");if(i.useCache&&u)throw new Error("TypedRequest response caching is not supported for requests containing VirtualStreams");this.assertActive(i),i.useCache&&(i.cacheKey=await this.createCacheKey(l),this.assertActive(i)),this.skipHooks||Os("onOutgoingRequest",{correlationId:l.correlation.id,method:this.method,direction:"outgoing",phase:"request",timestamp:n,payload:e}),a.publish();let f=await this.postTrObject(l,i);delete f.localData;let p=f.error;if(this.assertActive(i),p)throw this.skipHooks||Os("onIncomingResponse",{correlationId:l.correlation.id,method:this.method,direction:"incoming",phase:"response",timestamp:Date.now(),durationMs:Date.now()-n,payload:f.response,errorText:p.text}),this.assertActive(i),new ur(p.text,p.data);let h=f.response;if(!this.urlEndPoint&&this.typedTarget.options.supportsAbortSignal!==!0&&Dr.containsNetworkDescriptor(h))throw new Error("VirtualStreams require TypedTarget AbortSignal transport support");try{h=await Dr.decodePayloadFromNetworkAsync(h,{side:"requesting",activationScope:a,virtualStreamTransport:this.typedTarget?.options.virtualStreamTransport,openDeadlineAt:i.deadlineAt,abortSignal:i.abortSignal})}catch(m){throw m instanceof Vi&&i.deadlineAt!==void 0&&m.deadlineAt===i.deadlineAt?this.createTimeoutError(i):m}return this.assertActive(i),a.authorizeApplicationUse(),this.skipHooks||Os("onIncomingResponse",{correlationId:l.correlation.id,method:this.method,direction:"incoming",phase:"response",timestamp:Date.now(),durationMs:Date.now()-n,payload:h}),this.assertActive(i),a.commit(),h}catch(c){throw await a.rollback(c),c}finally{s.cleanup()}}async postTrObject(e,r={useCache:!1,maxRetries:3}){let n=0;for(;;){this.assertActive(r);let i=this.createRequestIdentitySnapshot(e),s;if(this.urlEndPoint){let a;try{a=await wp.postJsonWithMetadata(this.urlEndPoint,e,{cacheStrategy:r.useCache?"cache-first":"network-only",cacheKey:r.cacheKey,timeout:this.getRemainingTimeout(r),signal:r.abortSignal})}catch(l){throw r.cacheKey&&l instanceof SyntaxError&&await wp.deleteCache(r.cacheKey),r.abortSignal?.aborted?this.getAbortReason(r):r.timeoutMs!==void 0&&(this.hasDeadlineExpired(r)||Ts.isWebrequestTimeoutError(l))?this.createTimeoutError(r):l}s=a.data;try{a.metadata.fromCache?s=this.reconstructCachedHttpResponse(s,e,i):this.assertResponseEnvelope(s,i)}catch(l){throw r.cacheKey&&await wp.deleteCache(r.cacheKey),l}r.cacheKey&&!this.isReusableCachedHttpEnvelope(s)&&await wp.deleteCache(r.cacheKey)}else s=await this.postTypedTarget(e,r);if(this.assertResponseEnvelope(s,i),this.assertActive(r),s.error&&!s.retry||!s.retry)return s;if(console.log(`Server requested a retry for TypedRequest method '${this.method}'`),n>=r.maxRetries)throw new kp(this.method,r.maxRetries);n+=1,await this.waitForRetry(s.retry.waitForMs,r),e.requestInstanceId=sl.uni(),e.correlation.phase="request",e.response=null,delete e.error,delete e.retry}}assertResponseEnvelope(e,r){let n=e?.error,i=e?.requestInstanceId,s=r.requestInstanceId;if(!e||typeof e!="object"||e.method!==r.method||e.correlation?.phase!=="response"||typeof e.correlation.id!="string"||e.correlation.id.length===0||!Object.hasOwn(e,"response")||typeof i!="string"||i.length===0||typeof s!="string"||s.length===0||i!==s||n!==void 0&&(!n||typeof n!="object"||typeof n.text!="string")||e.correlation.id!==r.correlationId)throw new TypeError("TypedRequest received an invalid response envelope")}async postTypedTarget(e,r){this.assertActive(r);try{return await this.typedTarget.post(e,{signal:r.abortSignal})}catch(n){throw r.abortSignal?.aborted?this.getAbortReason(r):n}}resolveFireOptions(e){let r=typeof e=="boolean"?{useCache:e}:e;if(!r||typeof r!="object")throw new TypeError("TypedRequest fire options must be a boolean or an options object");if(r.useCache!==void 0&&typeof r.useCache!="boolean")throw new TypeError("TypedRequest useCache must be a boolean");if(r.timeoutMs!==void 0&&(!Number.isSafeInteger(r.timeoutMs)||r.timeoutMs<=0||r.timeoutMs>vp))throw new RangeError(`TypedRequest timeoutMs must be a positive safe integer no greater than ${vp}`);if(r.abortSignal!==void 0&&!this.isAbortSignal(r.abortSignal))throw new TypeError("TypedRequest abortSignal must be an AbortSignal");if(r.maxRetries!==void 0&&(!Number.isSafeInteger(r.maxRetries)||r.maxRetries<0||r.maxRetries>1e3))throw new RangeError("TypedRequest maxRetries must be a safe integer between 0 and 1000");if((r.timeoutMs!==void 0||r.abortSignal!==void 0)&&!this.urlEndPoint&&this.typedTarget.options.supportsAbortSignal!==!0)throw new Error(r.abortSignal?"TypedRequest cancellation requires an HTTP URL or a TypedTarget with AbortSignal support":"TypedRequest timeoutMs requires an HTTP URL or a TypedTarget with AbortSignal support");return{useCache:r.useCache??!1,timeoutMs:r.timeoutMs,maxRetries:r.maxRetries??3,abortSignal:r.abortSignal,deadlineAt:r.timeoutMs===void 0?void 0:performance.now()+r.timeoutMs}}getRemainingTimeout(e){if(e.deadlineAt===void 0||e.timeoutMs===void 0)return;let r=Math.ceil(e.deadlineAt-performance.now());if(r<=0)throw this.createTimeoutError(e);return r}assertDeadline(e){this.getRemainingTimeout(e)}assertActive(e){if(e.abortSignal?.aborted)throw this.getAbortReason(e);this.assertDeadline(e)}hasDeadlineExpired(e){return e.deadlineAt!==void 0&&performance.now()>=e.deadlineAt}createTimeoutError(e){return new Sp(this.method,e.timeoutMs)}async waitForRetry(e,r){if(!Number.isSafeInteger(e)||e<=0||e>vp)throw new RangeError(`TypedRequest retry waitForMs must be a positive safe integer no greater than ${vp}`);this.assertActive(r);let n=this.getRemainingTimeout(r);if(n===void 0){await this.delayWithAbort(e,r);return}if(e>=n)throw await this.delayWithAbort(n,r),this.createTimeoutError(r);await this.delayWithAbort(e,r),this.assertActive(r)}async delayWithAbort(e,r){let n=r.abortSignal;if(!n){await Le.delayFor(e);return}await new Promise((i,s)=>{let a=setTimeout(()=>{n.removeEventListener("abort",l),i()},e),l=o(()=>{clearTimeout(a),n.removeEventListener("abort",l),s(this.getAbortReason(r))},"onAbort");n.addEventListener("abort",l,{once:!0}),n.aborted&&l()})}createAbortContext(e){let r=e.abortSignal;if(e.timeoutMs===void 0)return{signal:r,cleanup:o(()=>{},"cleanup")};let n=new AbortController,i=o(()=>{n.abort(r?.reason??new DOMException("The operation was aborted","AbortError"))},"onCallerAbort");r?.aborted?i():r?.addEventListener("abort",i,{once:!0});let s=Math.max(0,Math.ceil(e.deadlineAt-performance.now())),a=setTimeout(()=>{n.abort(this.createTimeoutError(e))},s);return a.unref?.(),{signal:n.signal,cleanup:o(()=>{clearTimeout(a),r?.removeEventListener("abort",i)},"cleanup")}}getAbortReason(e){return e.abortSignal?.reason??new DOMException("The operation was aborted","AbortError")}reconstructCachedHttpResponse(e,r,n){if(!e||typeof e!="object"||Array.isArray(e)||e.method!==n.method||!Object.hasOwn(e,"response")||!e.response||typeof e.response!="object"||!this.isReusableCachedHttpEnvelope(e))throw new TypeError("TypedRequest received an invalid cached response envelope");return{method:n.method,request:r.request,response:e.response,requestInstanceId:n.requestInstanceId,correlation:{id:n.correlationId,phase:"response"}}}createRequestIdentitySnapshot(e){return Object.freeze({method:e.method,correlationId:e.correlation?.id,requestInstanceId:e.requestInstanceId})}isReusableCachedHttpEnvelope(e){return!Object.hasOwn(e,"error")&&!Object.hasOwn(e,"retry")&&!Dr.containsNetworkDescriptor(e)}isAbortSignal(e){return!!(e&&typeof e=="object"&&typeof Reflect.get(e,"aborted")=="boolean"&&typeof Reflect.get(e,"addEventListener")=="function"&&typeof Reflect.get(e,"removeEventListener")=="function")}async createCacheKey(e){let r=JSON.stringify({endpoint:this.urlEndPoint,method:e.method,request:e.request}),n=await crypto.subtle.digest("SHA-256",new TextEncoder().encode(r));return`typedrequest:v1:${Array.from(new Uint8Array(n),s=>s.toString(16).padStart(2,"0")).join("")}`}};function jk(t){return t&&typeof t.then=="function"}o(jk,"isPromise");var zk=Promise.resolve(!1),kOe=Promise.resolve(!0),on=Promise.resolve();function Ep(t,e){return t||(t=0),new Promise(function(r){return setTimeout(function(){return r(e)},t)})}o(Ep,"sleep");function Wk(t,e){return Math.floor(Math.random()*(e-t+1)+t)}o(Wk,"randomInt");function al(){return Math.random().toString(36).substring(2)}o(al,"randomToken");var Vd=0;function vn(){var t=Date.now()*1e3;return t<=Vd&&(t=Vd+1),Vd=t,t}o(vn,"microSeconds");function TOe(){return typeof navigator<"u"&&typeof navigator.locks<"u"&&typeof navigator.locks.request=="function"}o(TOe,"supportsWebLockAPI");var h_=vn,m_="native";function d_(t){var e={time:vn(),messagesCallback:null,bc:new BroadcastChannel(t),subFns:[]};return e.bc.onmessage=function(r){e.messagesCallback&&e.messagesCallback(r.data)},e}o(d_,"create");function g_(t){t.bc.close(),t.subFns=[]}o(g_,"close");function y_(t,e){try{return t.bc.postMessage(e,!1),on}catch(r){return Promise.reject(r)}}o(y_,"postMessage");function x_(t,e){t.messagesCallback=e}o(x_,"onMessage");function b_(){if(typeof globalThis<"u"&&globalThis.Deno&&globalThis.Deno.args)return!0;if((typeof window<"u"||typeof self<"u")&&typeof BroadcastChannel=="function"){if(BroadcastChannel._pubkey)throw new Error("BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill");return!0}else return!1}o(b_,"canBeUsed");function w_(){return 150}o(w_,"averageResponseTime");var Hk={create:d_,close:g_,onMessage:x_,postMessage:y_,canBeUsed:b_,type:m_,averageResponseTime:w_,microSeconds:h_};var Is=class{static{o(this,"ObliviousSet")}ttl;map=new Map;_to=!1;constructor(e){this.ttl=e}has(e){let r=this.map.get(e);return typeof r>"u"?!1:r<Kd()-this.ttl?(this.map.delete(e),!1):!0}add(e){this.map.delete(e),this.map.set(e,Kd()),this._to||(this._to=!0,setTimeout(()=>{this._to=!1,v_(this)},0))}clear(){this.map.clear()}};function v_(t){let e=Kd()-t.ttl,r=t.map[Symbol.iterator]();for(;;){let n=r.next().value;if(!n)break;let i=n[0];if(n[1]<e)t.map.delete(i);else break}}o(v_,"removeTooOldValues");function Kd(){return Date.now()}o(Kd,"now");function Gi(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=JSON.parse(JSON.stringify(t));return typeof e.webWorkerSupport>"u"&&(e.webWorkerSupport=!0),e.idb||(e.idb={}),e.idb.ttl||(e.idb.ttl=1e3*45),e.idb.fallbackInterval||(e.idb.fallbackInterval=150),t.idb&&typeof t.idb.onclose=="function"&&(e.idb.onclose=t.idb.onclose),e.localstorage||(e.localstorage={}),e.localstorage.removeTimeout||(e.localstorage.removeTimeout=1e3*60),t.methods&&(e.methods=t.methods),e.node||(e.node={}),e.node.ttl||(e.node.ttl=1e3*60*2),e.node.maxParallelWrites||(e.node.maxParallelWrites=2048),typeof e.node.useFastPath>"u"&&(e.node.useFastPath=!0),e}o(Gi,"fillOptionsWithDefaults");var S_=vn,k_="pubkey.broadcast-channel-0-",Cr="messages",ll={durability:"relaxed"},T_="idb";function Uk(){if(typeof indexedDB<"u")return indexedDB;if(typeof window<"u"){if(typeof window.mozIndexedDB<"u")return window.mozIndexedDB;if(typeof window.webkitIndexedDB<"u")return window.webkitIndexedDB;if(typeof window.msIndexedDB<"u")return window.msIndexedDB}return!1}o(Uk,"getIdb");function Dp(t){t.commit&&t.commit()}o(Dp,"commitIndexedDBTransaction");function E_(t){var e=Uk(),r=k_+t,n=e.open(r);return n.onupgradeneeded=function(i){var s=i.target.result;s.createObjectStore(Cr,{keyPath:"id",autoIncrement:!0})},new Promise(function(i,s){n.onerror=function(a){return s(a)},n.onsuccess=function(){i(n.result)}})}o(E_,"createDatabase");function D_(t,e,r){var n=Date.now(),i={uuid:e,time:n,data:r},s=t.transaction([Cr],"readwrite",ll);return new Promise(function(a,l){s.oncomplete=function(){return a()},s.onerror=function(u){return l(u)};var c=s.objectStore(Cr);c.add(i),Dp(s)})}o(D_,"writeMessage");function FOe(t){var e=t.transaction(Cr,"readonly",ll),r=e.objectStore(Cr),n=[];return new Promise(function(i){r.openCursor().onsuccess=function(s){var a=s.target.result;a?(n.push(a.value),a.continue()):(Dp(e),i(n))}})}o(FOe,"getAllMessages");function C_(t,e){var r=t.transaction(Cr,"readonly",ll),n=r.objectStore(Cr),i=[],s=IDBKeyRange.bound(e+1,1/0);if(n.getAll){var a=n.getAll(s);return new Promise(function(c,u){a.onerror=function(f){return u(f)},a.onsuccess=function(f){c(f.target.result)}})}function l(){try{return s=IDBKeyRange.bound(e+1,1/0),n.openCursor(s)}catch{return n.openCursor()}}return o(l,"openCursor"),new Promise(function(c,u){var f=l();f.onerror=function(p){return u(p)},f.onsuccess=function(p){var h=p.target.result;h?h.value.id<e+1?h.continue(e+1):(i.push(h.value),h.continue()):(Dp(r),c(i))}})}o(C_,"getMessagesHigherThan");function O_(t,e){if(t.closed)return Promise.resolve([]);var r=t.db.transaction(Cr,"readwrite",ll),n=r.objectStore(Cr);return Promise.all(e.map(function(i){var s=n.delete(i);return new Promise(function(a){s.onsuccess=function(){return a()}})}))}o(O_,"removeMessagesById");function M_(t,e){var r=Date.now()-e,n=t.transaction(Cr,"readonly",ll),i=n.objectStore(Cr),s=[];return new Promise(function(a){i.openCursor().onsuccess=function(l){var c=l.target.result;if(c){var u=c.value;u.time<r?(s.push(u),c.continue()):(Dp(n),a(s))}else a(s)}})}o(M_,"getOldMessages");function I_(t){return M_(t.db,t.options.idb.ttl).then(function(e){return O_(t,e.map(function(r){return r.id}))})}o(I_,"cleanOldMessages");function N_(t,e){return e=Gi(e),E_(t).then(function(r){var n={closed:!1,lastCursorId:0,channelName:t,options:e,uuid:al(),eMIs:new Is(e.idb.ttl*2),writeBlockPromise:on,messagesCallback:null,readQueuePromises:[],db:r};return r.onclose=function(){n.closed=!0,e.idb.onclose&&e.idb.onclose()},qk(n),n})}o(N_,"create");function qk(t){t.closed||Yk(t).then(function(){return Ep(t.options.idb.fallbackInterval)}).then(function(){return qk(t)})}o(qk,"_readLoop");function P_(t,e){return!(t.uuid===e.uuid||e.eMIs.has(t.id)||t.data.time<e.messagesCallbackTime)}o(P_,"_filterMessage");function Yk(t){return t.closed?on:t.messagesCallback?C_(t.db,t.lastCursorId).then(function(e){var r=e.filter(function(n){return!!n}).map(function(n){return n.id>t.lastCursorId&&(t.lastCursorId=n.id),n}).filter(function(n){return P_(n,t)}).sort(function(n,i){return n.time-i.time});return r.forEach(function(n){t.messagesCallback&&(t.eMIs.add(n.id),t.messagesCallback(n.data))}),on}):on}o(Yk,"readNewMessages");function L_(t){t.closed=!0,t.db.close()}o(L_,"close");function __(t,e){return t.writeBlockPromise=t.writeBlockPromise.then(function(){return D_(t.db,t.uuid,e)}).then(function(){Wk(0,10)===0&&I_(t)}),t.writeBlockPromise}o(__,"postMessage");function R_(t,e,r){t.messagesCallbackTime=r,t.messagesCallback=e,Yk(t)}o(R_,"onMessage");function A_(){return!!Uk()}o(A_,"canBeUsed");function F_(t){return t.idb.fallbackInterval*2}o(F_,"averageResponseTime");var Vk={create:N_,close:L_,onMessage:R_,postMessage:__,canBeUsed:A_,type:T_,averageResponseTime:F_,microSeconds:S_};var $_=vn,B_="pubkey.broadcastChannel-",j_="localstorage";function Kk(){var t;if(typeof window>"u")return null;try{t=window.localStorage,t=window["ie8-eventlistener/storage"]||window.localStorage}catch{}return t}o(Kk,"getLocalStorage");function Gk(t){return B_+t}o(Gk,"storageKey");function z_(t,e){return new Promise(function(r){Ep().then(function(){var n=Gk(t.channelName),i={token:al(),time:Date.now(),data:e,uuid:t.uuid},s=JSON.stringify(i);Kk().setItem(n,s);var a=document.createEvent("Event");a.initEvent("storage",!0,!0),a.key=n,a.newValue=s,window.dispatchEvent(a),r()})})}o(z_,"postMessage");function W_(t,e){var r=Gk(t),n=o(function(s){s.key===r&&e(JSON.parse(s.newValue))},"listener");return window.addEventListener("storage",n),n}o(W_,"addStorageEventListener");function H_(t){window.removeEventListener("storage",t)}o(H_,"removeStorageEventListener");function U_(t,e){if(e=Gi(e),!Jk())throw new Error("BroadcastChannel: localstorage cannot be used");var r=al(),n=new Is(e.localstorage.removeTimeout),i={channelName:t,uuid:r,eMIs:n};return i.listener=W_(t,function(s){i.messagesCallback&&s.uuid!==r&&(!s.token||n.has(s.token)||s.data.time&&s.data.time<i.messagesCallbackTime||(n.add(s.token),i.messagesCallback(s.data)))}),i}o(U_,"create");function q_(t){H_(t.listener)}o(q_,"close");function Y_(t,e,r){t.messagesCallbackTime=r,t.messagesCallback=e}o(Y_,"onMessage");function Jk(){var t=Kk();if(!t)return!1;try{var e="__broadcastchannel_check";t.setItem(e,"works"),t.removeItem(e)}catch{return!1}return!0}o(Jk,"canBeUsed");function V_(){var t=120,e=navigator.userAgent.toLowerCase();return e.includes("safari")&&!e.includes("chrome")?t*2:t}o(V_,"averageResponseTime");var Qk={create:U_,close:q_,onMessage:Y_,postMessage:z_,canBeUsed:Jk,type:j_,averageResponseTime:V_,microSeconds:$_};var Xk=vn,K_="simulate",Gd=new Set;function G_(t){var e={time:Xk(),name:t,messagesCallback:null};return Gd.add(e),e}o(G_,"create");function J_(t){Gd.delete(t)}o(J_,"close");var Zk=5;function Q_(t,e){return new Promise(function(r){return setTimeout(function(){var n=Array.from(Gd);n.forEach(function(i){i.name===t.name&&i!==t&&i.messagesCallback&&i.time<e.time&&i.messagesCallback(e)}),r()},Zk)})}o(Q_,"postMessage");function X_(t,e){t.messagesCallback=e}o(X_,"onMessage");function Z_(){return!0}o(Z_,"canBeUsed");function eR(){return Zk}o(eR,"averageResponseTime");var e1={create:G_,close:J_,onMessage:X_,postMessage:Q_,canBeUsed:Z_,type:K_,averageResponseTime:eR,microSeconds:Xk};var t1=[Hk,Vk,Qk];function Jd(t){var e=[].concat(t.methods,t1).filter(Boolean);if(t.type){if(t.type==="simulate")return e1;var r=e.find(function(i){return i.type===t.type});if(r)return r;throw new Error("method-type "+t.type+" not found")}t.webWorkerSupport||(e=e.filter(function(i){return i.type!=="idb"}));var n=e.find(function(i){return i.canBeUsed()});if(n)return n;throw new Error("No usable method found in "+JSON.stringify(t1.map(function(i){return i.type})))}o(Jd,"chooseMethod");var Xd=new Set,tR=0,Ji=o(function(e,r){this.id=tR++,Xd.add(this),this.name=e,Qd&&(r=Qd),this.options=Gi(r),this.method=Jd(this.options),this._iL=!1,this._onML=null,this._addEL={message:[],internal:[]},this._uMP=new Set,this._befC=[],this._prepP=null,iR(this)},"BroadcastChannel");Ji._pubkey=!0;function rR(t){t=Gi(t);var e=Jd(t);return e.type==="node"?e.clearNodeFolder().then(function(){return!0}):zk}o(rR,"clearNodeFolder");var Qd;function nR(t){Qd=t}o(nR,"enforceOptions"),Ji.prototype={postMessage:o(function(e){if(this.closed)throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed "+JSON.stringify(e));return r1(this,"message",e)},"postMessage"),postInternal:o(function(e){return r1(this,"internal",e)},"postInternal"),set onmessage(t){var e=this.method.microSeconds(),r={time:e,fn:t};o1(this,"message",this._onML),t&&typeof t=="function"?(this._onML=r,i1(this,"message",r)):this._onML=null},addEventListener:o(function(e,r){var n=this.method.microSeconds(),i={time:n,fn:r};i1(this,e,i)},"addEventListener"),removeEventListener:o(function(e,r){var n=this._addEL[e].find(function(i){return i.fn===r});o1(this,e,n)},"removeEventListener"),close:o(function(){var e=this;if(!this.closed){Xd.delete(this),this.closed=!0;var r=this._prepP?this._prepP:on;return this._onML=null,this._addEL.message=[],r.then(function(){return Promise.all(Array.from(e._uMP))}).then(function(){return Promise.all(e._befC.map(function(n){return n()}))}).then(function(){return e.method.close(e._state)})}},"close"),get type(){return this.method.type},get isClosed(){return this.closed}};function r1(t,e,r){var n=t.method.microSeconds(),i={time:n,type:e,data:r},s=t._prepP?t._prepP:on;return s.then(function(){var a=t.method.postMessage(t._state,i);return t._uMP.add(a),a.catch().then(function(){return t._uMP.delete(a)}),a})}o(r1,"_post");function iR(t){var e=t.method.create(t.name,t.options);jk(e)?(t._prepP=e,e.then(function(r){t._state=r})):t._state=e}o(iR,"_prepareChannel");function n1(t){return t._addEL.message.length>0||t._addEL.internal.length>0}o(n1,"_hasMessageListeners");function i1(t,e,r){t._addEL[e].push(r),oR(t)}o(i1,"_addListenerObject");function o1(t,e,r){t._addEL[e]=t._addEL[e].filter(function(n){return n!==r}),sR(t)}o(o1,"_removeListenerObject");function oR(t){if(!t._iL&&n1(t)){var e=o(function(i){t._addEL[i.type].forEach(function(s){i.time>=s.time&&s.fn(i.data)})},"listenerFn"),r=t.method.microSeconds();t._prepP?t._prepP.then(function(){t._iL=!0,t.method.onMessage(t._state,e,r)}):(t._iL=!0,t.method.onMessage(t._state,e,r))}}o(oR,"_startListening");function sR(t){if(t._iL&&!n1(t)){t._iL=!1;var e=t.method.microSeconds();t.method.onMessage(t._state,null,e)}}o(sR,"_stopListening");var lR=o(t=>"ref"in t&&typeof t.ref=="function"&&"unref"in t&&typeof t.unref=="function","isProcessHolding"),cR=o((t,e)=>{if(typeof globalThis.BroadcastChannel=="function"){let n=new globalThis.BroadcastChannel(t);n.onmessage=s=>{e(s.data)};let i=lR(n)?n:null;return i?.unref(),{post:o(async s=>{n.postMessage(s)},"post"),close:o(async()=>{n.close()},"close"),holdProcess:o(s=>{s?i?.ref():i?.unref()},"holdProcess")}}let r=new Ji(t);return r.onmessage=n=>{e(n)},{post:o(n=>r.postMessage(n),"post"),close:o(()=>r.close(),"close"),holdProcess:o(()=>{},"holdProcess")}},"openChannel"),s1=o(t=>typeof t=="object"&&t!==null,"isObject"),a1=o((t,e)=>Object.prototype.hasOwnProperty.call(t,e),"hasOwn"),uR=o(t=>{if(!s1(t)||!a1(t,"deesCommsEvent"))return null;let e=t.deesCommsEvent;return!s1(e)||typeof e.name!="string"||typeof e.uniqueEventId!="string"||!a1(e,"payload")?"malformed":{name:e.name,uniqueEventId:e.uniqueEventId,payload:e.payload}},"eventOf"),fR=o(()=>{let t=globalThis.crypto.getRandomValues(new Uint8Array(16));return Array.from(t,e=>e.toString(16).padStart(2,"0")).join("")},"createEventId"),Zd=class t{static{o(this,"DeesComms")}static{this.defaultChannelName="dees-comms"}constructor(e={}){this.eventHandlers=new Map,this.hasTypedHandlers=!1,this.closed=!1,this.closing=null,this.typedrouter=new $t.TypedRouter,this.typedtarget=new $t.TypedTarget({postMethodWithTypedRouter:o(async r=>{await this.postMessage(r)},"postMethodWithTypedRouter"),typedRouterRef:this.typedrouter}),this.channelName=e.channelName??t.defaultChannelName,this.channel=cR(this.channelName,r=>{this.receive(r)})}createTypedRequest(e){return new $t.TypedRequest(this.typedtarget,e)}async postMessage(e){this.assertOpen(),await this.channel.post(e)}async createTypedHandler(e,r){this.typedrouter.addTypedHandler(new $t.TypedHandler(e,r)),this.hasTypedHandlers=!0,this.holdProcessWhileListened()}async broadcast(e,r){let n={deesCommsEvent:{name:e,uniqueEventId:fR(),payload:r}};await this.postMessage(n)}subscribe(e,r){this.assertOpen();let n=o((s,a)=>r(s,a),"handler"),i=this.eventHandlers.get(e);return i||(i=new Set,this.eventHandlers.set(e,i)),i.add(n),this.holdProcessWhileListened(),{unsubscribe:o(()=>{let s=this.eventHandlers.get(e);s&&(s.delete(n),s.size===0&&(this.eventHandlers.delete(e),this.holdProcessWhileListened()))},"unsubscribe")}}async close(){this.closing||(this.closed=!0,this.eventHandlers.clear(),this.closing=this.channel.close()),await this.closing}holdProcessWhileListened(){this.closed||this.channel.holdProcess(this.hasTypedHandlers||this.eventHandlers.size>0)}assertOpen(){if(this.closed)throw new Error(`DeesComms channel "${this.channelName}" is closed`)}async receive(e){if(this.closed)return;let r=uR(e);if(r==="malformed"){console.log("DeesComms received a malformed event");return}if(r){this.dispatch(r);return}let n=await this.typedrouter.routeAndAddResponse(e,{skipHooks:!0});n&&!n.error&&!this.closed&&await this.postMessage(n)}dispatch(e){let r=this.eventHandlers.get(e.name);if(r)for(let n of[...r]){if(this.closed)return;r.has(n)&&(async()=>n(e.payload,e))().catch(i=>{console.error(`DeesComms: a handler of the event "${e.name}" failed`,i)})}}};var cc={};se(cc,{SmartMarkdown:()=>Wx,parseMarkdown:()=>oC});var $l={};se($l,{getYamlDocFromString:()=>VR,objectToYamlString:()=>YR,yamlStringToObject:()=>qR});var oo={};se(oo,{Alias:()=>pr,CST:()=>Al,Composer:()=>Cn,Document:()=>gr,Lexer:()=>ai,LineCounter:()=>li,Pair:()=>$e,Parser:()=>Mn,Scalar:()=>G,Schema:()=>ii,YAMLError:()=>oi,YAMLMap:()=>Be,YAMLParseError:()=>It,YAMLSeq:()=>rt,YAMLWarning:()=>si,default:()=>HR,isAlias:()=>jt,isCollection:()=>Se,isDocument:()=>zt,isMap:()=>Wt,isNode:()=>ge,isPair:()=>me,isScalar:()=>ae,isSeq:()=>Ht,parse:()=>rh,parseAllDocuments:()=>th,parseDocument:()=>Fl,stringify:()=>nh,visit:()=>Xt,visitAsync:()=>Qi});var Fg={};se(Fg,{Alias:()=>pr,CST:()=>Al,Composer:()=>Cn,Document:()=>gr,Lexer:()=>ai,LineCounter:()=>li,Pair:()=>$e,Parser:()=>Mn,Scalar:()=>G,Schema:()=>ii,YAMLError:()=>oi,YAMLMap:()=>Be,YAMLParseError:()=>It,YAMLSeq:()=>rt,YAMLWarning:()=>si,isAlias:()=>jt,isCollection:()=>Se,isDocument:()=>zt,isMap:()=>Wt,isNode:()=>ge,isPair:()=>me,isScalar:()=>ae,isSeq:()=>Ht,parse:()=>rh,parseAllDocuments:()=>th,parseDocument:()=>Fl,stringify:()=>nh,visit:()=>Xt,visitAsync:()=>Qi});var ul=Symbol.for("yaml.alias"),fl=Symbol.for("yaml.document"),fr=Symbol.for("yaml.map"),Cp=Symbol.for("yaml.pair"),Bt=Symbol.for("yaml.scalar"),sn=Symbol.for("yaml.seq"),Tt=Symbol.for("yaml.node.type"),jt=o(t=>!!t&&typeof t=="object"&&t[Tt]===ul,"isAlias"),zt=o(t=>!!t&&typeof t=="object"&&t[Tt]===fl,"isDocument"),Wt=o(t=>!!t&&typeof t=="object"&&t[Tt]===fr,"isMap"),me=o(t=>!!t&&typeof t=="object"&&t[Tt]===Cp,"isPair"),ae=o(t=>!!t&&typeof t=="object"&&t[Tt]===Bt,"isScalar"),Ht=o(t=>!!t&&typeof t=="object"&&t[Tt]===sn,"isSeq");function Se(t){if(t&&typeof t=="object")switch(t[Tt]){case fr:case sn:return!0}return!1}o(Se,"isCollection");function ge(t){if(t&&typeof t=="object")switch(t[Tt]){case ul:case fr:case Bt:case sn:return!0}return!1}o(ge,"isNode");var pl=o(t=>(ae(t)||Se(t))&&!!t.anchor,"hasAnchor");var Ut=Symbol("break visit"),l1=Symbol("skip children"),an=Symbol("remove node");function Xt(t,e){let r=c1(e);zt(t)?Ns(null,t.contents,r,Object.freeze([t]))===an&&(t.contents=null):Ns(null,t,r,Object.freeze([]))}o(Xt,"visit"),Xt.BREAK=Ut,Xt.SKIP=l1,Xt.REMOVE=an;function Ns(t,e,r,n){let i=u1(t,e,r,n);if(ge(i)||me(i))return f1(t,n,i),Ns(t,i,r,n);if(typeof i!="symbol"){if(Se(e)){n=Object.freeze(n.concat(e));for(let s=0;s<e.items.length;++s){let a=Ns(s,e.items[s],r,n);if(typeof a=="number")s=a-1;else{if(a===Ut)return Ut;a===an&&(e.items.splice(s,1),s-=1)}}}else if(me(e)){n=Object.freeze(n.concat(e));let s=Ns("key",e.key,r,n);if(s===Ut)return Ut;s===an&&(e.key=null);let a=Ns("value",e.value,r,n);if(a===Ut)return Ut;a===an&&(e.value=null)}}return i}o(Ns,"visit_");async function Qi(t,e){let r=c1(e);zt(t)?await Ps(null,t.contents,r,Object.freeze([t]))===an&&(t.contents=null):await Ps(null,t,r,Object.freeze([]))}o(Qi,"visitAsync"),Qi.BREAK=Ut,Qi.SKIP=l1,Qi.REMOVE=an;async function Ps(t,e,r,n){let i=await u1(t,e,r,n);if(ge(i)||me(i))return f1(t,n,i),Ps(t,i,r,n);if(typeof i!="symbol"){if(Se(e)){n=Object.freeze(n.concat(e));for(let s=0;s<e.items.length;++s){let a=await Ps(s,e.items[s],r,n);if(typeof a=="number")s=a-1;else{if(a===Ut)return Ut;a===an&&(e.items.splice(s,1),s-=1)}}}else if(me(e)){n=Object.freeze(n.concat(e));let s=await Ps("key",e.key,r,n);if(s===Ut)return Ut;s===an&&(e.key=null);let a=await Ps("value",e.value,r,n);if(a===Ut)return Ut;a===an&&(e.value=null)}}return i}o(Ps,"visitAsync_");function c1(t){return typeof t=="object"&&(t.Collection||t.Node||t.Value)?Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t):t}o(c1,"initVisitor");function u1(t,e,r,n){if(typeof r=="function")return r(t,e,n);if(Wt(e))return r.Map?.(t,e,n);if(Ht(e))return r.Seq?.(t,e,n);if(me(e))return r.Pair?.(t,e,n);if(ae(e))return r.Scalar?.(t,e,n);if(jt(e))return r.Alias?.(t,e,n)}o(u1,"callVisitor");function f1(t,e,r){let n=e[e.length-1];if(Se(n))n.items[t]=r;else if(me(n))t==="key"?n.key=r:n.value=r;else if(zt(n))n.contents=r;else{let i=jt(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}o(f1,"replaceNode");var pR={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},hR=o(t=>t.replace(/[!,[\]{}]/g,e=>pR[e]),"escapeTagName"),Or=class t{static{o(this,"Directives")}constructor(e,r){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},t.defaultYaml,e),this.tags=Object.assign({},t.defaultTags,r)}clone(){let e=new t(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new t(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:t.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},t.defaultTags);break}return e}add(e,r){this.atNextDocument&&(this.yaml={explicit:t.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},t.defaultTags),this.atNextDocument=!1);let n=e.trim().split(/[ \t]+/),i=n.shift();switch(i){case"%TAG":{if(n.length!==2&&(r(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;let[s,a]=n;return this.tags[s]=a,!0}case"%YAML":{if(this.yaml.explicit=!0,n.length!==1)return r(0,"%YAML directive should contain exactly one part"),!1;let[s]=n;if(s==="1.1"||s==="1.2")return this.yaml.version=s,!0;{let a=/^\d+\.\d+$/.test(s);return r(6,`Unsupported YAML version ${s}`,a),!1}}default:return r(0,`Unknown directive ${i}`,!0),!1}}tagName(e,r){if(e==="!")return"!";if(e[0]!=="!")return r(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let a=e.slice(2,-1);return a==="!"||a==="!!"?(r(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&r("Verbatim tags must end with a >"),a)}let[,n,i]=e.match(/^(.*!)([^!]*)$/s);i||r(`The ${e} tag has no suffix`);let s=this.tags[n];if(s)try{return s+decodeURIComponent(i)}catch(a){return r(String(a)),null}return n==="!"?e:(r(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[r,n]of Object.entries(this.tags))if(e.startsWith(n))return r+hR(e.substring(n.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags),i;if(e&&n.length>0&&ge(e.contents)){let s={};Xt(e.contents,(a,l)=>{ge(l)&&l.tag&&(s[l.tag]=!0)}),i=Object.keys(s)}else i=[];for(let[s,a]of n)s==="!!"&&a==="tag:yaml.org,2002:"||(!e||i.some(l=>l.startsWith(a)))&&r.push(`%TAG ${s} ${a}`);return r.join(`
13
+ `)}};Or.defaultYaml={explicit:!1,version:"1.2"},Or.defaultTags={"!!":"tag:yaml.org,2002:"};function hl(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){let r=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(r)}return!0}o(hl,"anchorIsValid");function Op(t){let e=new Set;return Xt(t,{Value(r,n){n.anchor&&e.add(n.anchor)}}),e}o(Op,"anchorNames");function Mp(t,e){for(let r=1;;++r){let n=`${t}${r}`;if(!e.has(n))return n}}o(Mp,"findNewAnchor");function eg(t,e){let r=[],n=new Map,i=null;return{onAnchor:o(s=>{r.push(s),i??(i=Op(t));let a=Mp(e,i);return i.add(a),a},"onAnchor"),setAnchors:o(()=>{for(let s of r){let a=n.get(s);if(typeof a=="object"&&a.anchor&&(ae(a.node)||Se(a.node)))a.node.anchor=a.anchor;else{let l=new Error("Failed to resolve repeated object (this should not happen)");throw l.source=s,l}}},"setAnchors"),sourceObjects:n}}o(eg,"createNodeAnchors");function Sn(t,e,r,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let i=0,s=n.length;i<s;++i){let a=n[i],l=Sn(t,n,String(i),a);l===void 0?delete n[i]:l!==a&&(n[i]=l)}else if(n instanceof Map)for(let i of Array.from(n.keys())){let s=n.get(i),a=Sn(t,n,i,s);a===void 0?n.delete(i):a!==s&&n.set(i,a)}else if(n instanceof Set)for(let i of Array.from(n)){let s=Sn(t,n,i,i);s===void 0?n.delete(i):s!==i&&(n.delete(i),n.add(s))}else for(let[i,s]of Object.entries(n)){let a=Sn(t,n,i,s);a===void 0?delete n[i]:a!==s&&(n[i]=a)}return t.call(e,r,n)}o(Sn,"applyReviver");function Je(t,e,r){if(Array.isArray(t))return t.map((n,i)=>Je(n,String(i),r));if(t&&typeof t.toJSON=="function"){if(!r||!pl(t))return t.toJSON(e,r);let n={aliasCount:0,count:1,res:void 0};r.anchors.set(t,n),r.onCreate=s=>{n.res=s,delete r.onCreate};let i=t.toJSON(e,r);return r.onCreate&&r.onCreate(i),i}return typeof t=="bigint"&&!r?.keep?Number(t):t}o(Je,"toJS");var kn=class{static{o(this,"NodeBase")}constructor(e){Object.defineProperty(this,Tt,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:r,maxAliasCount:n,onAnchor:i,reviver:s}={}){if(!zt(e))throw new TypeError("A document argument is required");let a={anchors:new Map,doc:e,keep:!0,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},l=Je(this,"",a);if(typeof i=="function")for(let{count:c,res:u}of a.anchors.values())i(u,c);return typeof s=="function"?Sn(s,{"":l},"",l):l}};var pr=class extends kn{static{o(this,"Alias")}constructor(e){super(ul),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,r){if(r?.maxAliasCount===0)throw new ReferenceError("Alias resolution is disabled");let n;r?.aliasResolveCache?n=r.aliasResolveCache:(n=[],Xt(e,{Node:o((s,a)=>{(jt(a)||pl(a))&&n.push(a)},"Node")}),r&&(r.aliasResolveCache=n));let i;for(let s of n){if(s===this)break;s.anchor===this.source&&(i=s)}if(i&&r){let{anchors:s,doc:a,maxAliasCount:l}=r,c=s.get(i);if(c||(Je(i,null,r),c=s.get(i)),c?.res===void 0){let u="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(u)}if(l>=0&&(c.count+=1,c.aliasCount===0&&(c.aliasCount=Ip(a,i,s)),c.count*c.aliasCount>l)){let u="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(u)}}return i}toJSON(e,r){if(!r)return{source:this.source};let n=this.resolve(r.doc,r);if(!n){let i=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(i)}return r.anchors.get(n).res}toString(e,r,n){let i=`*${this.source}`;if(e){if(hl(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(e.implicitKey)return`${i} `}return i}};function Ip(t,e,r){if(jt(e)){let n=e.resolve(t),i=r&&n&&r.get(n);return i?i.count*i.aliasCount:0}else if(Se(e)){let n=0;for(let i of e.items){let s=Ip(t,i,r);s>n&&(n=s)}return n}else if(me(e)){let n=Ip(t,e.key,r),i=Ip(t,e.value,r);return Math.max(n,i)}return 1}o(Ip,"getAliasCount");var ml=o(t=>!t||typeof t!="function"&&typeof t!="object","isScalarValue"),G=class extends kn{static{o(this,"Scalar")}constructor(e){super(Bt),this.value=e}toJSON(e,r){return r?.keep?this.value:Je(this.value,e,r)}toString(){return String(this.value)}};G.BLOCK_FOLDED="BLOCK_FOLDED",G.BLOCK_LITERAL="BLOCK_LITERAL",G.PLAIN="PLAIN",G.QUOTE_DOUBLE="QUOTE_DOUBLE",G.QUOTE_SINGLE="QUOTE_SINGLE";var mR="tag:yaml.org,2002:";function dR(t,e,r){if(e){let n=r.filter(s=>s.tag===e),i=n.find(s=>!s.format)??n[0];if(!i)throw new Error(`Tag ${e} not found`);return i}return r.find(n=>n.identify?.(t)&&!n.format)}o(dR,"findTagObject");function ln(t,e,r){if(zt(t)&&(t=t.contents),ge(t))return t;if(me(t)){let p=r.schema[fr].createNode?.(r.schema,null,r);return p.items.push(t),p}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());let{aliasDuplicateObjects:n,onAnchor:i,onTagObj:s,schema:a,sourceObjects:l}=r,c;if(n&&t&&typeof t=="object"){if(c=l.get(t),c)return c.anchor??(c.anchor=i(t)),new pr(c.anchor);c={anchor:null,node:null},l.set(t,c)}e?.startsWith("!!")&&(e=mR+e.slice(2));let u=dR(t,e,a.tags);if(!u){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){let p=new G(t);return c&&(c.node=p),p}u=t instanceof Map?a[fr]:Symbol.iterator in Object(t)?a[sn]:a[fr]}s&&(s(u),delete r.onTagObj);let f=u?.createNode?u.createNode(r.schema,t,r):typeof u?.nodeClass?.from=="function"?u.nodeClass.from(r.schema,t,r):new G(t);return e?f.tag=e:u.default||(f.tag=u.tag),c&&(c.node=f),f}o(ln,"createNode");function Ls(t,e,r){let n=r;for(let i=e.length-1;i>=0;--i){let s=e[i];if(typeof s=="number"&&Number.isInteger(s)&&s>=0){let a=[];a[s]=n,n=a}else n=new Map([[s,n]])}return ln(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:o(()=>{throw new Error("This should not happen, please report a bug.")},"onAnchor"),schema:t,sourceObjects:new Map})}o(Ls,"collectionFromPath");var Zi=o(t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done,"isEmptyPath"),Xi=class extends kn{static{o(this,"Collection")}constructor(e,r){super(e),Object.defineProperty(this,"schema",{value:r,configurable:!0,enumerable:!1,writable:!0})}clone(e){let r=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(r.schema=e),r.items=r.items.map(n=>ge(n)||me(n)?n.clone(e):n),this.range&&(r.range=this.range.slice()),r}addIn(e,r){if(Zi(e))this.add(r);else{let[n,...i]=e,s=this.get(n,!0);if(Se(s))s.addIn(i,r);else if(s===void 0&&this.schema)this.set(n,Ls(this.schema,i,r));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}deleteIn(e){let[r,...n]=e;if(n.length===0)return this.delete(r);let i=this.get(r,!0);if(Se(i))return i.deleteIn(n);throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}getIn(e,r){let[n,...i]=e,s=this.get(n,!0);return i.length===0?!r&&ae(s)?s.value:s:Se(s)?s.getIn(i,r):void 0}hasAllNullValues(e){return this.items.every(r=>{if(!me(r))return!1;let n=r.value;return n==null||e&&ae(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[r,...n]=e;if(n.length===0)return this.has(r);let i=this.get(r,!0);return Se(i)?i.hasIn(n):!1}setIn(e,r){let[n,...i]=e;if(i.length===0)this.set(n,r);else{let s=this.get(n,!0);if(Se(s))s.setIn(i,r);else if(s===void 0&&this.schema)this.set(n,Ls(this.schema,i,r));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}};var tg=o(t=>t.replace(/^(?!$)(?: $)?/gm,"#"),"stringifyComment");function Zt(t,e){return/^\n+$/.test(t)?t.substring(1):e?t.replace(/^(?! *$)/gm,e):t}o(Zt,"indentComment");var Mr=o((t,e,r)=>t.endsWith(`
14
14
  `)?Zt(r,e):r.includes(`
15
15
  `)?`
16
- `+Zt(r,e):(t.endsWith(" ")?"":" ")+r,"lineComment");var Dp="flow",pl="block",_s="quoted";function Ls(t,e,r="flow",{indentAtStart:n,lineWidth:i=80,minContentWidth:s=20,onFold:a,onOverflow:l}={}){if(!i||i<0)return t;i<s&&(s=0);let c=Math.max(1+s,1+i-e.length);if(t.length<=c)return t;let u=[],f={},p=i-e.length;typeof n=="number"&&(n>i-Math.max(2,s)?u.push(0):p=i-n);let h,m,d=!1,g=-1,y=-1,x=-1;r===pl&&(g=i1(t,g,e.length),g!==-1&&(p=g+c));for(let E;E=t[g+=1];){if(r===_s&&E==="\\"){switch(y=g,t[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}x=g}if(E===`
17
- `)r===pl&&(g=i1(t,g,e.length)),p=g+e.length+c,h=void 0;else{if(E===" "&&m&&m!==" "&&m!==`
18
- `&&m!==" "){let _=t[g+1];_&&_!==" "&&_!==`
19
- `&&_!==" "&&(h=g)}if(g>=p)if(h)u.push(h),p=h+c,h=void 0;else if(r===_s){for(;m===" "||m===" ";)m=E,E=t[g+=1],d=!0;let _=g>x+1?g-2:y-1;if(f[_])return t;u.push(_),f[_]=!0,p=_+c,h=void 0}else d=!0}m=E}if(d&&l&&l(),u.length===0)return t;a&&a();let T=t.slice(0,u[0]);for(let E=0;E<u.length;++E){let _=u[E],P=u[E+1]||t.length;_===0?T=`
20
- ${e}${t.slice(0,P)}`:(r===_s&&f[_]&&(T+=`${t[_]}\\`),T+=`
21
- ${e}${t.slice(_+1,P)}`)}return T}o(Ls,"foldFlowLines");function i1(t,e,r){let n=e,i=e+1,s=t[i];for(;s===" "||s===" ";)if(e<i+r)s=t[++e];else{do s=t[++e];while(s&&s!==`
22
- `);n=e,i=e+1,s=t[i]}return n}o(i1,"consumeMoreIndentedLines");var Cp=o((t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),"getFoldOptions"),Op=o(t=>/^(%|---|\.\.\.)/m.test(t),"containsDocumentMarker");function ZL(t,e,r){if(!e||e<0)return!1;let n=e-r,i=t.length;if(i<=n)return!1;for(let s=0,a=0;s<i;++s)if(t[s]===`
23
- `){if(s-a>n)return!0;if(a=s+1,i-a<=n)return!1}return!0}o(ZL,"lineLengthOverLimit");function hl(t,e){let r=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return r;let{implicitKey:n}=e,i=e.options.doubleQuotedMinMultiLineLength,s=e.indent||(Op(t)?" ":""),a="",l=0;for(let c=0,u=r[c];u;u=r[++c])if(u===" "&&r[c+1]==="\\"&&r[c+2]==="n"&&(a+=r.slice(l,c)+"\\ ",c+=1,l=c,u="\\"),u==="\\")switch(r[c+1]){case"u":{a+=r.slice(l,c);let f=r.substr(c+2,4);switch(f){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:f.substr(0,2)==="00"?a+="\\x"+f.substr(2):a+=r.substr(c,6)}c+=5,l=c+1}break;case"n":if(n||r[c+2]==='"'||r.length<i)c+=1;else{for(a+=r.slice(l,c)+`
16
+ `+Zt(r,e):(t.endsWith(" ")?"":" ")+r,"lineComment");var Np="flow",dl="block",_s="quoted";function Rs(t,e,r="flow",{indentAtStart:n,lineWidth:i=80,minContentWidth:s=20,onFold:a,onOverflow:l}={}){if(!i||i<0)return t;i<s&&(s=0);let c=Math.max(1+s,1+i-e.length);if(t.length<=c)return t;let u=[],f={},p=i-e.length;typeof n=="number"&&(n>i-Math.max(2,s)?u.push(0):p=i-n);let h,m,d=!1,g=-1,y=-1,x=-1;r===dl&&(g=p1(t,g,e.length),g!==-1&&(p=g+c));for(let E;E=t[g+=1];){if(r===_s&&E==="\\"){switch(y=g,t[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}x=g}if(E===`
17
+ `)r===dl&&(g=p1(t,g,e.length)),p=g+e.length+c,h=void 0;else{if(E===" "&&m&&m!==" "&&m!==`
18
+ `&&m!==" "){let L=t[g+1];L&&L!==" "&&L!==`
19
+ `&&L!==" "&&(h=g)}if(g>=p)if(h)u.push(h),p=h+c,h=void 0;else if(r===_s){for(;m===" "||m===" ";)m=E,E=t[g+=1],d=!0;let L=g>x+1?g-2:y-1;if(f[L])return t;u.push(L),f[L]=!0,p=L+c,h=void 0}else d=!0}m=E}if(d&&l&&l(),u.length===0)return t;a&&a();let T=t.slice(0,u[0]);for(let E=0;E<u.length;++E){let L=u[E],P=u[E+1]||t.length;L===0?T=`
20
+ ${e}${t.slice(0,P)}`:(r===_s&&f[L]&&(T+=`${t[L]}\\`),T+=`
21
+ ${e}${t.slice(L+1,P)}`)}return T}o(Rs,"foldFlowLines");function p1(t,e,r){let n=e,i=e+1,s=t[i];for(;s===" "||s===" ";)if(e<i+r)s=t[++e];else{do s=t[++e];while(s&&s!==`
22
+ `);n=e,i=e+1,s=t[i]}return n}o(p1,"consumeMoreIndentedLines");var Pp=o((t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),"getFoldOptions"),Lp=o(t=>/^(%|---|\.\.\.)/m.test(t),"containsDocumentMarker");function gR(t,e,r){if(!e||e<0)return!1;let n=e-r,i=t.length;if(i<=n)return!1;for(let s=0,a=0;s<i;++s)if(t[s]===`
23
+ `){if(s-a>n)return!0;if(a=s+1,i-a<=n)return!1}return!0}o(gR,"lineLengthOverLimit");function gl(t,e){let r=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return r;let{implicitKey:n}=e,i=e.options.doubleQuotedMinMultiLineLength,s=e.indent||(Lp(t)?" ":""),a="",l=0;for(let c=0,u=r[c];u;u=r[++c])if(u===" "&&r[c+1]==="\\"&&r[c+2]==="n"&&(a+=r.slice(l,c)+"\\ ",c+=1,l=c,u="\\"),u==="\\")switch(r[c+1]){case"u":{a+=r.slice(l,c);let f=r.substr(c+2,4);switch(f){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:f.substr(0,2)==="00"?a+="\\x"+f.substr(2):a+=r.substr(c,6)}c+=5,l=c+1}break;case"n":if(n||r[c+2]==='"'||r.length<i)c+=1;else{for(a+=r.slice(l,c)+`
24
24
 
25
25
  `;r[c+2]==="\\"&&r[c+3]==="n"&&r[c+4]!=='"';)a+=`
26
- `,c+=2;a+=s,r[c+2]===" "&&(a+="\\"),c+=1,l=c+1}break;default:c+=1}return a=l?a+r.slice(l):r,n?a:Ls(a,s,_s,Cp(e,!1))}o(hl,"doubleQuotedString");function Qd(t,e){if(e.options.singleQuote===!1||e.implicitKey&&t.includes(`
27
- `)||/[ \t]\n|\n[ \t]/.test(t))return hl(t,e);let r=e.indent||(Op(t)?" ":""),n="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
28
- ${r}`)+"'";return e.implicitKey?n:Ls(n,r,Dp,Cp(e,!1))}o(Qd,"singleQuotedString");function Rs(t,e){let{singleQuote:r}=e.options,n;if(r===!1)n=hl;else{let i=t.includes('"'),s=t.includes("'");i&&!s?n=Qd:s&&!i?n=hl:n=r?Qd:hl}return n(t,e)}o(Rs,"quotedString");var Xd;try{Xd=new RegExp(`(^|(?<!
26
+ `,c+=2;a+=s,r[c+2]===" "&&(a+="\\"),c+=1,l=c+1}break;default:c+=1}return a=l?a+r.slice(l):r,n?a:Rs(a,s,_s,Pp(e,!1))}o(gl,"doubleQuotedString");function rg(t,e){if(e.options.singleQuote===!1||e.implicitKey&&t.includes(`
27
+ `)||/[ \t]\n|\n[ \t]/.test(t))return gl(t,e);let r=e.indent||(Lp(t)?" ":""),n="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
28
+ ${r}`)+"'";return e.implicitKey?n:Rs(n,r,Np,Pp(e,!1))}o(rg,"singleQuotedString");function As(t,e){let{singleQuote:r}=e.options,n;if(r===!1)n=gl;else{let i=t.includes('"'),s=t.includes("'");i&&!s?n=rg:s&&!i?n=gl:n=r?rg:gl}return n(t,e)}o(As,"quotedString");var ng;try{ng=new RegExp(`(^|(?<!
29
29
  ))
30
30
  +(?!
31
- |$)`,"g")}catch{Xd=/\n+(?!\n|$)/g}function Mp({comment:t,type:e,value:r},n,i,s){let{blockQuote:a,commentString:l,lineWidth:c}=n.options;if(!a||/\n[\t ]+$/.test(r))return Rs(r,n);let u=n.indent||(n.forceBlockIndent||Op(r)?" ":""),f=a==="literal"?!0:a==="folded"||e===G.BLOCK_FOLDED?!1:e===G.BLOCK_LITERAL?!0:!ZL(r,c,u.length);if(!r)return f?`|
31
+ |$)`,"g")}catch{ng=/\n+(?!\n|$)/g}function _p({comment:t,type:e,value:r},n,i,s){let{blockQuote:a,commentString:l,lineWidth:c}=n.options;if(!a||/\n[\t ]+$/.test(r))return As(r,n);let u=n.indent||(n.forceBlockIndent||Lp(r)?" ":""),f=a==="literal"?!0:a==="folded"||e===G.BLOCK_FOLDED?!1:e===G.BLOCK_LITERAL?!0:!gR(r,c,u.length);if(!r)return f?`|
32
32
  `:`>
33
33
  `;let p,h;for(h=r.length;h>0;--h){let P=r[h-1];if(P!==`
34
34
  `&&P!==" "&&P!==" ")break}let m=r.substring(h),d=m.indexOf(`
35
35
  `);d===-1?p="-":r===m||d!==m.length-1?(p="+",s&&s()):p="",m&&(r=r.slice(0,-m.length),m[m.length-1]===`
36
- `&&(m=m.slice(0,-1)),m=m.replace(Xd,`$&${u}`));let g=!1,y,x=-1;for(y=0;y<r.length;++y){let P=r[y];if(P===" ")g=!0;else if(P===`
37
- `)x=y;else break}let T=r.substring(0,x<y?x+1:y);T&&(r=r.substring(T.length),T=T.replace(/\n+/g,`$&${u}`));let _=(g?u?"2":"1":"")+p;if(t&&(_+=" "+l(t.replace(/ ?[\r\n]+/g," ")),i&&i()),!f){let P=r.replace(/\n+/g,`
38
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${u}`),D=!1,F=Cp(n,!0);a!=="folded"&&e!==G.BLOCK_FOLDED&&(F.onOverflow=()=>{D=!0});let A=Ls(`${T}${P}${m}`,u,pl,F);if(!D)return`>${_}
39
- ${u}${A}`}return r=r.replace(/\n+/g,`$&${u}`),`|${_}
40
- ${u}${T}${r}${m}`}o(Mp,"blockString");function eR(t,e,r,n){let{type:i,value:s}=t,{actualString:a,implicitKey:l,indent:c,indentStep:u,inFlow:f}=e;if(l&&s.includes(`
41
- `)||f&&/[[\]{},]/.test(s))return Rs(s,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return l||f||!s.includes(`
42
- `)?Rs(s,e):Mp(t,e,r,n);if(!l&&!f&&i!==G.PLAIN&&s.includes(`
43
- `))return Mp(t,e,r,n);if(Op(s)){if(c==="")return e.forceBlockIndent=!0,Mp(t,e,r,n);if(l&&c===u)return Rs(s,e)}let p=s.replace(/\n+/g,`$&
44
- ${c}`);if(a){let h=o(g=>g.default&&g.tag!=="tag:yaml.org,2002:str"&&g.test?.test(p),"test"),{compat:m,tags:d}=e.doc.schema;if(d.some(h)||m?.some(h))return Rs(s,e)}return l?p:Ls(p,c,Dp,Cp(e,!1))}o(eR,"plainString");function ln(t,e,r,n){let{implicitKey:i,inFlow:s}=e,a=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)}),{type:l}=t;l!==G.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(a.value)&&(l=G.QUOTE_DOUBLE);let c=o(f=>{switch(f){case G.BLOCK_FOLDED:case G.BLOCK_LITERAL:return i||s?Rs(a.value,e):Mp(a,e,r,n);case G.QUOTE_DOUBLE:return hl(a.value,e);case G.QUOTE_SINGLE:return Qd(a.value,e);case G.PLAIN:return eR(a,e,r,n);default:return null}},"_stringify"),u=c(l);if(u===null){let{defaultKeyType:f,defaultStringType:p}=e.options,h=i&&f||p;if(u=c(h),u===null)throw new Error(`Unsupported default string type ${h}`)}return u}o(ln,"stringifyString");function ml(t,e){let r=Object.assign({blockQuote:!0,commentString:Jd,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},t.schema.toStringOptions,e),n;switch(r.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:t,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:typeof r.indent=="number"?" ".repeat(r.indent):" ",inFlow:n,options:r}}o(ml,"createStringifyContext");function tR(t,e){if(e.tag){let i=t.filter(s=>s.tag===e.tag);if(i.length>0)return i.find(s=>s.format===e.format)??i[0]}let r,n;if(ae(e)){n=e.value;let i=t.filter(s=>s.identify?.(n));if(i.length>1){let s=i.filter(a=>a.test);s.length>0&&(i=s)}r=i.find(s=>s.format===e.format)??i.find(s=>!s.format)}else n=e,r=t.find(i=>i.nodeClass&&n instanceof i.nodeClass);if(!r){let i=n?.constructor?.name??(n===null?"null":typeof n);throw new Error(`Tag not resolved for ${i} value`)}return r}o(tR,"getTagObject");function rR(t,e,{anchors:r,doc:n}){if(!n.directives)return"";let i=[],s=(ae(t)||ke(t))&&t.anchor;s&&ul(s)&&(r.add(s),i.push(`&${s}`));let a=t.tag??(e.default?null:e.tag);return a&&i.push(n.directives.tagString(a)),i.join(" ")}o(rR,"stringifyProps");function cn(t,e,r,n){if(me(t))return t.toString(e,r,n);if(jt(t)){if(e.doc.directives)return t.toString(e);if(e.resolvedAliases?.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let i,s=ge(t)?t:e.doc.createNode(t,{onTagObj:o(c=>i=c,"onTagObj")});i??(i=tR(e.doc.schema.tags,s));let a=rR(s,i,e);a.length>0&&(e.indentAtStart=(e.indentAtStart??0)+a.length+1);let l=typeof i.stringify=="function"?i.stringify(s,e,r,n):ae(s)?ln(s,e,r,n):s.toString(e,r,n);return a?ae(s)||l[0]==="{"||l[0]==="["?`${a} ${l}`:`${a}
45
- ${e.indent}${l}`:l}o(cn,"stringify");function Zd({key:t,value:e},r,n,i){let{allNullValues:s,doc:a,indent:l,indentStep:c,options:{commentString:u,indentSeq:f,simpleKeys:p}}=r,h=ge(t)&&t.comment||null;if(p){if(h)throw new Error("With simple keys, key nodes cannot have comments");if(ke(t)||!ge(t)&&typeof t=="object"){let F="With simple keys, collection cannot be used as a key value";throw new Error(F)}}let m=!p&&(!t||h&&e==null&&!r.inFlow||ke(t)||(ae(t)?t.type===G.BLOCK_FOLDED||t.type===G.BLOCK_LITERAL:typeof t=="object"));r=Object.assign({},r,{allNullValues:!1,implicitKey:!m&&(p||!s),indent:l+c});let d=!1,g=!1,y=cn(t,r,()=>d=!0,()=>g=!0);if(!m&&!r.inFlow&&y.length>1024){if(p)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");m=!0}if(r.inFlow){if(s||e==null)return d&&n&&n(),y===""?"?":m?`? ${y}`:y}else if(s&&!p||e==null&&m)return y=`? ${y}`,h&&!d?y+=Mr(y,r.indent,u(h)):g&&i&&i(),y;d&&(h=null),m?(h&&(y+=Mr(y,r.indent,u(h))),y=`? ${y}
46
- ${l}:`):(y=`${y}:`,h&&(y+=Mr(y,r.indent,u(h))));let x,T,E;ge(e)?(x=!!e.spaceBefore,T=e.commentBefore,E=e.comment):(x=!1,T=null,E=null,e&&typeof e=="object"&&(e=a.createNode(e))),r.implicitKey=!1,!m&&!h&&ae(e)&&(r.indentAtStart=y.length+1),g=!1,!f&&c.length>=2&&!r.inFlow&&!m&&Ht(e)&&!e.flow&&!e.tag&&!e.anchor&&(r.indent=r.indent.substring(2));let _=!1,P=cn(e,r,()=>_=!0,()=>g=!0),D=" ";if(h||x||T){if(D=x?`
36
+ `&&(m=m.slice(0,-1)),m=m.replace(ng,`$&${u}`));let g=!1,y,x=-1;for(y=0;y<r.length;++y){let P=r[y];if(P===" ")g=!0;else if(P===`
37
+ `)x=y;else break}let T=r.substring(0,x<y?x+1:y);T&&(r=r.substring(T.length),T=T.replace(/\n+/g,`$&${u}`));let L=(g?u?"2":"1":"")+p;if(t&&(L+=" "+l(t.replace(/ ?[\r\n]+/g," ")),i&&i()),!f){let P=r.replace(/\n+/g,`
38
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${u}`),D=!1,F=Pp(n,!0);a!=="folded"&&e!==G.BLOCK_FOLDED&&(F.onOverflow=()=>{D=!0});let A=Rs(`${T}${P}${m}`,u,dl,F);if(!D)return`>${L}
39
+ ${u}${A}`}return r=r.replace(/\n+/g,`$&${u}`),`|${L}
40
+ ${u}${T}${r}${m}`}o(_p,"blockString");function yR(t,e,r,n){let{type:i,value:s}=t,{actualString:a,implicitKey:l,indent:c,indentStep:u,inFlow:f}=e;if(l&&s.includes(`
41
+ `)||f&&/[[\]{},]/.test(s))return As(s,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return l||f||!s.includes(`
42
+ `)?As(s,e):_p(t,e,r,n);if(!l&&!f&&i!==G.PLAIN&&s.includes(`
43
+ `))return _p(t,e,r,n);if(Lp(s)){if(c==="")return e.forceBlockIndent=!0,_p(t,e,r,n);if(l&&c===u)return As(s,e)}let p=s.replace(/\n+/g,`$&
44
+ ${c}`);if(a){let h=o(g=>g.default&&g.tag!=="tag:yaml.org,2002:str"&&g.test?.test(p),"test"),{compat:m,tags:d}=e.doc.schema;if(d.some(h)||m?.some(h))return As(s,e)}return l?p:Rs(p,c,Np,Pp(e,!1))}o(yR,"plainString");function cn(t,e,r,n){let{implicitKey:i,inFlow:s}=e,a=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)}),{type:l}=t;l!==G.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(a.value)&&(l=G.QUOTE_DOUBLE);let c=o(f=>{switch(f){case G.BLOCK_FOLDED:case G.BLOCK_LITERAL:return i||s?As(a.value,e):_p(a,e,r,n);case G.QUOTE_DOUBLE:return gl(a.value,e);case G.QUOTE_SINGLE:return rg(a.value,e);case G.PLAIN:return yR(a,e,r,n);default:return null}},"_stringify"),u=c(l);if(u===null){let{defaultKeyType:f,defaultStringType:p}=e.options,h=i&&f||p;if(u=c(h),u===null)throw new Error(`Unsupported default string type ${h}`)}return u}o(cn,"stringifyString");function yl(t,e){let r=Object.assign({blockQuote:!0,commentString:tg,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},t.schema.toStringOptions,e),n;switch(r.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:t,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:typeof r.indent=="number"?" ".repeat(r.indent):" ",inFlow:n,options:r}}o(yl,"createStringifyContext");function xR(t,e){if(e.tag){let i=t.filter(s=>s.tag===e.tag);if(i.length>0)return i.find(s=>s.format===e.format)??i[0]}let r,n;if(ae(e)){n=e.value;let i=t.filter(s=>s.identify?.(n));if(i.length>1){let s=i.filter(a=>a.test);s.length>0&&(i=s)}r=i.find(s=>s.format===e.format)??i.find(s=>!s.format)}else n=e,r=t.find(i=>i.nodeClass&&n instanceof i.nodeClass);if(!r){let i=n?.constructor?.name??(n===null?"null":typeof n);throw new Error(`Tag not resolved for ${i} value`)}return r}o(xR,"getTagObject");function bR(t,e,{anchors:r,doc:n}){if(!n.directives)return"";let i=[],s=(ae(t)||Se(t))&&t.anchor;s&&hl(s)&&(r.add(s),i.push(`&${s}`));let a=t.tag??(e.default?null:e.tag);return a&&i.push(n.directives.tagString(a)),i.join(" ")}o(bR,"stringifyProps");function un(t,e,r,n){if(me(t))return t.toString(e,r,n);if(jt(t)){if(e.doc.directives)return t.toString(e);if(e.resolvedAliases?.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let i,s=ge(t)?t:e.doc.createNode(t,{onTagObj:o(c=>i=c,"onTagObj")});i??(i=xR(e.doc.schema.tags,s));let a=bR(s,i,e);a.length>0&&(e.indentAtStart=(e.indentAtStart??0)+a.length+1);let l=typeof i.stringify=="function"?i.stringify(s,e,r,n):ae(s)?cn(s,e,r,n):s.toString(e,r,n);return a?ae(s)||l[0]==="{"||l[0]==="["?`${a} ${l}`:`${a}
45
+ ${e.indent}${l}`:l}o(un,"stringify");function ig({key:t,value:e},r,n,i){let{allNullValues:s,doc:a,indent:l,indentStep:c,options:{commentString:u,indentSeq:f,simpleKeys:p}}=r,h=ge(t)&&t.comment||null;if(p){if(h)throw new Error("With simple keys, key nodes cannot have comments");if(Se(t)||!ge(t)&&typeof t=="object"){let F="With simple keys, collection cannot be used as a key value";throw new Error(F)}}let m=!p&&(!t||h&&e==null&&!r.inFlow||Se(t)||(ae(t)?t.type===G.BLOCK_FOLDED||t.type===G.BLOCK_LITERAL:typeof t=="object"));r=Object.assign({},r,{allNullValues:!1,implicitKey:!m&&(p||!s),indent:l+c});let d=!1,g=!1,y=un(t,r,()=>d=!0,()=>g=!0);if(!m&&!r.inFlow&&y.length>1024){if(p)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");m=!0}if(r.inFlow){if(s||e==null)return d&&n&&n(),y===""?"?":m?`? ${y}`:y}else if(s&&!p||e==null&&m)return y=`? ${y}`,h&&!d?y+=Mr(y,r.indent,u(h)):g&&i&&i(),y;d&&(h=null),m?(h&&(y+=Mr(y,r.indent,u(h))),y=`? ${y}
46
+ ${l}:`):(y=`${y}:`,h&&(y+=Mr(y,r.indent,u(h))));let x,T,E;ge(e)?(x=!!e.spaceBefore,T=e.commentBefore,E=e.comment):(x=!1,T=null,E=null,e&&typeof e=="object"&&(e=a.createNode(e))),r.implicitKey=!1,!m&&!h&&ae(e)&&(r.indentAtStart=y.length+1),g=!1,!f&&c.length>=2&&!r.inFlow&&!m&&Ht(e)&&!e.flow&&!e.tag&&!e.anchor&&(r.indent=r.indent.substring(2));let L=!1,P=un(e,r,()=>L=!0,()=>g=!0),D=" ";if(h||x||T){if(D=x?`
47
47
  `:"",T){let F=u(T);D+=`
48
48
  ${Zt(F,r.indent)}`}P===""&&!r.inFlow?D===`
49
49
  `&&E&&(D=`
50
50
 
51
51
  `):D+=`
52
- ${r.indent}`}else if(!m&&ke(e)){let F=P[0],A=P.indexOf(`
52
+ ${r.indent}`}else if(!m&&Se(e)){let F=P[0],A=P.indexOf(`
53
53
  `),W=A!==-1,C=r.inFlow??e.flow??e.items.length===0;if(W||!C){let le=!1;if(W&&(F==="&"||F==="!")){let j=P.indexOf(" ");F==="&"&&j!==-1&&j<A&&P[j+1]==="!"&&(j=P.indexOf(" ",j+1)),(j===-1||A<j)&&(le=!0)}le||(D=`
54
54
  ${r.indent}`)}}else(P===""||P[0]===`
55
- `)&&(D="");return y+=D+P,r.inFlow?_&&n&&n():E&&!_?y+=Mr(y,r.indent,u(E)):g&&i&&i(),y}o(Zd,"stringifyPair");function nR(t,...e){t==="debug"&&console.log(...e)}o(nR,"debug");function dl(t,e){(t==="debug"||t==="warn")&&console.warn(e)}o(dl,"warn");var Ip="<<",hr={identify:o(t=>t===Ip||typeof t=="symbol"&&t.description===Ip,"identify"),default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:o(()=>Object.assign(new G(Symbol(Ip)),{addToJSMap:Np}),"resolve"),stringify:o(()=>Ip,"stringify")},tg=o((t,e)=>(hr.identify(e)||ae(e)&&(!e.type||e.type===G.PLAIN)&&hr.identify(e.value))&&t?.doc.schema.tags.some(r=>r.tag===hr.tag&&r.default),"isMergeKey");function Np(t,e,r){let n=o1(t,r);if(Ht(n))for(let i of n.items)eg(t,e,i);else if(Array.isArray(n))for(let i of n)eg(t,e,i);else eg(t,e,n)}o(Np,"addMergeToJSMap");function eg(t,e,r){let n=o1(t,r);if(!Wt(n))throw new Error("Merge sources must be maps or map aliases");let i=n.toJSON(null,t,Map);for(let[s,a]of i)e instanceof Map?e.has(s)||e.set(s,a):e instanceof Set?e.add(s):Object.prototype.hasOwnProperty.call(e,s)||Object.defineProperty(e,s,{value:a,writable:!0,enumerable:!0,configurable:!0});return e}o(eg,"mergeValue");function o1(t,e){return t&&jt(e)?e.resolve(t.doc,t):e}o(o1,"resolveAliasValue");function gl(t,e,{key:r,value:n}){if(ge(r)&&r.addToJSMap)r.addToJSMap(t,e,n);else if(tg(t,r))Np(t,e,n);else{let i=Je(r,"",t);if(e instanceof Map)e.set(i,Je(n,i,t));else if(e instanceof Set)e.add(i);else{let s=iR(r,i,t),a=Je(n,s,t);s in e?Object.defineProperty(e,s,{value:a,writable:!0,enumerable:!0,configurable:!0}):e[s]=a}}return e}o(gl,"addPairToJSMap");function iR(t,e,r){if(e===null)return"";if(typeof e!="object")return String(e);if(ge(t)&&r?.doc){let n=ml(r.doc,{});n.anchors=new Set;for(let s of r.anchors.keys())n.anchors.add(s.anchor);n.inFlow=!0,n.inStringifyKey=!0;let i=t.toString(n);if(!r.mapKeyWarned){let s=JSON.stringify(i);s.length>40&&(s=s.substring(0,36)+'..."'),dl(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),r.mapKeyWarned=!0}return i}return JSON.stringify(e)}o(iR,"stringifyKey");function to(t,e,r){let n=an(t,void 0,r),i=an(e,void 0,r);return new $e(n,i)}o(to,"createPair");var $e=class t{static{o(this,"Pair")}constructor(e,r=null){Object.defineProperty(this,Tt,{value:vp}),this.key=e,this.value=r}clone(e){let{key:r,value:n}=this;return ge(r)&&(r=r.clone(e)),ge(n)&&(n=n.clone(e)),new t(r,n)}toJSON(e,r){let n=r?.mapAsMap?new Map:{};return gl(r,n,this)}toString(e,r,n){return e?.doc?Zd(this,e,r,n):JSON.stringify(this)}};function yl(t,e,r){return(e.inFlow??t.flow?sR:oR)(t,e,r)}o(yl,"stringifyCollection");function oR({comment:t,items:e},r,{blockItemPrefix:n,flowChars:i,itemIndent:s,onChompKeep:a,onComment:l}){let{indent:c,options:{commentString:u}}=r,f=Object.assign({},r,{indent:s,type:null}),p=!1,h=[];for(let d=0;d<e.length;++d){let g=e[d],y=null;if(ge(g))!p&&g.spaceBefore&&h.push(""),Pp(r,h,g.commentBefore,p),g.comment&&(y=g.comment);else if(me(g)){let T=ge(g.key)?g.key:null;T&&(!p&&T.spaceBefore&&h.push(""),Pp(r,h,T.commentBefore,p))}p=!1;let x=cn(g,f,()=>y=null,()=>p=!0);y&&(x+=Mr(x,s,u(y))),p&&y&&(p=!1),h.push(n+x)}let m;if(h.length===0)m=i.start+i.end;else{m=h[0];for(let d=1;d<h.length;++d){let g=h[d];m+=g?`
55
+ `)&&(D="");return y+=D+P,r.inFlow?L&&n&&n():E&&!L?y+=Mr(y,r.indent,u(E)):g&&i&&i(),y}o(ig,"stringifyPair");function wR(t,...e){t==="debug"&&console.log(...e)}o(wR,"debug");function xl(t,e){(t==="debug"||t==="warn")&&console.warn(e)}o(xl,"warn");var Rp="<<",hr={identify:o(t=>t===Rp||typeof t=="symbol"&&t.description===Rp,"identify"),default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:o(()=>Object.assign(new G(Symbol(Rp)),{addToJSMap:Ap}),"resolve"),stringify:o(()=>Rp,"stringify")},sg=o((t,e)=>(hr.identify(e)||ae(e)&&(!e.type||e.type===G.PLAIN)&&hr.identify(e.value))&&t?.doc.schema.tags.some(r=>r.tag===hr.tag&&r.default),"isMergeKey");function Ap(t,e,r){let n=h1(t,r);if(Ht(n))for(let i of n.items)og(t,e,i);else if(Array.isArray(n))for(let i of n)og(t,e,i);else og(t,e,n)}o(Ap,"addMergeToJSMap");function og(t,e,r){let n=h1(t,r);if(!Wt(n))throw new Error("Merge sources must be maps or map aliases");let i=n.toJSON(null,t,Map);for(let[s,a]of i)e instanceof Map?e.has(s)||e.set(s,a):e instanceof Set?e.add(s):Object.prototype.hasOwnProperty.call(e,s)||Object.defineProperty(e,s,{value:a,writable:!0,enumerable:!0,configurable:!0});return e}o(og,"mergeValue");function h1(t,e){return t&&jt(e)?e.resolve(t.doc,t):e}o(h1,"resolveAliasValue");function bl(t,e,{key:r,value:n}){if(ge(r)&&r.addToJSMap)r.addToJSMap(t,e,n);else if(sg(t,r))Ap(t,e,n);else{let i=Je(r,"",t);if(e instanceof Map)e.set(i,Je(n,i,t));else if(e instanceof Set)e.add(i);else{let s=vR(r,i,t),a=Je(n,s,t);s in e?Object.defineProperty(e,s,{value:a,writable:!0,enumerable:!0,configurable:!0}):e[s]=a}}return e}o(bl,"addPairToJSMap");function vR(t,e,r){if(e===null)return"";if(typeof e!="object")return String(e);if(ge(t)&&r?.doc){let n=yl(r.doc,{});n.anchors=new Set;for(let s of r.anchors.keys())n.anchors.add(s.anchor);n.inFlow=!0,n.inStringifyKey=!0;let i=t.toString(n);if(!r.mapKeyWarned){let s=JSON.stringify(i);s.length>40&&(s=s.substring(0,36)+'..."'),xl(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),r.mapKeyWarned=!0}return i}return JSON.stringify(e)}o(vR,"stringifyKey");function eo(t,e,r){let n=ln(t,void 0,r),i=ln(e,void 0,r);return new $e(n,i)}o(eo,"createPair");var $e=class t{static{o(this,"Pair")}constructor(e,r=null){Object.defineProperty(this,Tt,{value:Cp}),this.key=e,this.value=r}clone(e){let{key:r,value:n}=this;return ge(r)&&(r=r.clone(e)),ge(n)&&(n=n.clone(e)),new t(r,n)}toJSON(e,r){let n=r?.mapAsMap?new Map:{};return bl(r,n,this)}toString(e,r,n){return e?.doc?ig(this,e,r,n):JSON.stringify(this)}};function wl(t,e,r){return(e.inFlow??t.flow?kR:SR)(t,e,r)}o(wl,"stringifyCollection");function SR({comment:t,items:e},r,{blockItemPrefix:n,flowChars:i,itemIndent:s,onChompKeep:a,onComment:l}){let{indent:c,options:{commentString:u}}=r,f=Object.assign({},r,{indent:s,type:null}),p=!1,h=[];for(let d=0;d<e.length;++d){let g=e[d],y=null;if(ge(g))!p&&g.spaceBefore&&h.push(""),Fp(r,h,g.commentBefore,p),g.comment&&(y=g.comment);else if(me(g)){let T=ge(g.key)?g.key:null;T&&(!p&&T.spaceBefore&&h.push(""),Fp(r,h,T.commentBefore,p))}p=!1;let x=un(g,f,()=>y=null,()=>p=!0);y&&(x+=Mr(x,s,u(y))),p&&y&&(p=!1),h.push(n+x)}let m;if(h.length===0)m=i.start+i.end;else{m=h[0];for(let d=1;d<h.length;++d){let g=h[d];m+=g?`
56
56
  ${c}${g}`:`
57
57
  `}}return t?(m+=`
58
- `+Zt(u(t),c),l&&l()):p&&a&&a(),m}o(oR,"stringifyBlockCollection");function sR({items:t},e,{flowChars:r,itemIndent:n}){let{indent:i,indentStep:s,flowCollectionPadding:a,options:{commentString:l}}=e;n+=s;let c=Object.assign({},e,{indent:n,inFlow:!0,type:null}),u=!1,f=0,p=[];for(let d=0;d<t.length;++d){let g=t[d],y=null;if(ge(g))g.spaceBefore&&p.push(""),Pp(e,p,g.commentBefore,!1),g.comment&&(y=g.comment);else if(me(g)){let T=ge(g.key)?g.key:null;T&&(T.spaceBefore&&p.push(""),Pp(e,p,T.commentBefore,!1),T.comment&&(u=!0));let E=ge(g.value)?g.value:null;E?(E.comment&&(y=E.comment),E.commentBefore&&(u=!0)):g.value==null&&T?.comment&&(y=T.comment)}y&&(u=!0);let x=cn(g,c,()=>y=null);u||(u=p.length>f||x.includes(`
58
+ `+Zt(u(t),c),l&&l()):p&&a&&a(),m}o(SR,"stringifyBlockCollection");function kR({items:t},e,{flowChars:r,itemIndent:n}){let{indent:i,indentStep:s,flowCollectionPadding:a,options:{commentString:l}}=e;n+=s;let c=Object.assign({},e,{indent:n,inFlow:!0,type:null}),u=!1,f=0,p=[];for(let d=0;d<t.length;++d){let g=t[d],y=null;if(ge(g))g.spaceBefore&&p.push(""),Fp(e,p,g.commentBefore,!1),g.comment&&(y=g.comment);else if(me(g)){let T=ge(g.key)?g.key:null;T&&(T.spaceBefore&&p.push(""),Fp(e,p,T.commentBefore,!1),T.comment&&(u=!0));let E=ge(g.value)?g.value:null;E?(E.comment&&(y=E.comment),E.commentBefore&&(u=!0)):g.value==null&&T?.comment&&(y=T.comment)}y&&(u=!0);let x=un(g,c,()=>y=null);u||(u=p.length>f||x.includes(`
59
59
  `)),d<t.length-1?x+=",":e.options.trailingComma&&(e.options.lineWidth>0&&(u||(u=p.reduce((T,E)=>T+E.length+2,2)+(x.length+2)>e.options.lineWidth)),u&&(x+=",")),y&&(x+=Mr(x,n,l(y))),p.push(x),f=p.length}let{start:h,end:m}=r;if(p.length===0)return h+m;if(!u){let d=p.reduce((g,y)=>g+y.length+2,2);u=e.options.lineWidth>0&&d>e.options.lineWidth}if(u){let d=h;for(let g of p)d+=g?`
60
60
  ${s}${i}${g}`:`
61
61
  `;return`${d}
62
- ${i}${m}`}else return`${h}${a}${p.join(" ")}${a}${m}`}o(sR,"stringifyFlowCollection");function Pp({indent:t,options:{commentString:e}},r,n,i){if(n&&i&&(n=n.replace(/^\n+/,"")),n){let s=Zt(e(n),t);r.push(s.trimStart())}}o(Pp,"addCommentBefore");function kn(t,e){let r=ae(e)?e.value:e;for(let n of t)if(me(n)&&(n.key===e||n.key===r||ae(n.key)&&n.key.value===r))return n}o(kn,"findPair");var Be=class extends Zi{static{o(this,"YAMLMap")}static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(fr,e),this.items=[]}static from(e,r,n){let{keepUndefined:i,replacer:s}=n,a=new this(e),l=o((c,u)=>{if(typeof s=="function")u=s.call(r,c,u);else if(Array.isArray(s)&&!s.includes(c))return;(u!==void 0||i)&&a.items.push(to(c,u,n))},"add");if(r instanceof Map)for(let[c,u]of r)l(c,u);else if(r&&typeof r=="object")for(let c of Object.keys(r))l(c,r[c]);return typeof e.sortMapEntries=="function"&&a.items.sort(e.sortMapEntries),a}add(e,r){let n;me(e)?n=e:!e||typeof e!="object"||!("key"in e)?n=new $e(e,e?.value):n=new $e(e.key,e.value);let i=kn(this.items,n.key),s=this.schema?.sortMapEntries;if(i){if(!r)throw new Error(`Key ${n.key} already set`);ae(i.value)&&fl(n.value)?i.value.value=n.value:i.value=n.value}else if(s){let a=this.items.findIndex(l=>s(n,l)<0);a===-1?this.items.push(n):this.items.splice(a,0,n)}else this.items.push(n)}delete(e){let r=kn(this.items,e);return r?this.items.splice(this.items.indexOf(r),1).length>0:!1}get(e,r){let i=kn(this.items,e)?.value;return(!r&&ae(i)?i.value:i)??void 0}has(e){return!!kn(this.items,e)}set(e,r){this.add(new $e(e,r),!0)}toJSON(e,r,n){let i=n?new n:r?.mapAsMap?new Map:{};r?.onCreate&&r.onCreate(i);for(let s of this.items)gl(r,i,s);return i}toString(e,r,n){if(!e)return JSON.stringify(this);for(let i of this.items)if(!me(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),yl(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:r})}};var mr={collection:"map",default:!0,nodeClass:Be,tag:"tag:yaml.org,2002:map",resolve(t,e){return Wt(t)||e("Expected a mapping for this tag"),t},createNode:o((t,e,r)=>Be.from(t,e,r),"createNode")};var rt=class extends Zi{static{o(this,"YAMLSeq")}static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(on,e),this.items=[]}add(e){this.items.push(e)}delete(e){let r=_p(e);return typeof r!="number"?!1:this.items.splice(r,1).length>0}get(e,r){let n=_p(e);if(typeof n!="number")return;let i=this.items[n];return!r&&ae(i)?i.value:i}has(e){let r=_p(e);return typeof r=="number"&&r<this.items.length}set(e,r){let n=_p(e);if(typeof n!="number")throw new Error(`Expected a valid index, not ${e}.`);let i=this.items[n];ae(i)&&fl(r)?i.value=r:this.items[n]=r}toJSON(e,r){let n=[];r?.onCreate&&r.onCreate(n);let i=0;for(let s of this.items)n.push(Je(s,String(i++),r));return n}toString(e,r,n){return e?yl(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:n,onComment:r}):JSON.stringify(this)}static from(e,r,n){let{replacer:i}=n,s=new this(e);if(r&&Symbol.iterator in Object(r)){let a=0;for(let l of r){if(typeof i=="function"){let c=r instanceof Set?l:String(a++);l=i.call(r,c,l)}s.items.push(an(l,void 0,n))}}return s}};function _p(t){let e=ae(t)?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}o(_p,"asItemIndex");var dr={collection:"seq",default:!0,nodeClass:rt,tag:"tag:yaml.org,2002:seq",resolve(t,e){return Ht(t)||e("Expected a sequence for this tag"),t},createNode:o((t,e,r)=>rt.from(t,e,r),"createNode")};var Tn={identify:o(t=>typeof t=="string","identify"),default:!0,tag:"tag:yaml.org,2002:str",resolve:o(t=>t,"resolve"),stringify(t,e,r,n){return e=Object.assign({actualString:!0},e),ln(t,e,r,n)}};var ii={identify:o(t=>t==null,"identify"),createNode:o(()=>new G(null),"createNode"),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:o(()=>new G(null),"resolve"),stringify:o(({source:t},e)=>typeof t=="string"&&ii.test.test(t)?t:e.options.nullStr,"stringify")};var As={identify:o(t=>typeof t=="boolean","identify"),default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:o(t=>new G(t[0]==="t"||t[0]==="T"),"resolve"),stringify({source:t,value:e},r){if(t&&As.test.test(t)){let n=t[0]==="t"||t[0]==="T";if(e===n)return t}return e?r.options.trueStr:r.options.falseStr}};function mt({format:t,minFractionDigits:e,tag:r,value:n}){if(typeof n=="bigint")return String(n);let i=typeof n=="number"?n:Number(n);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let s=Object.is(n,-0)?"-0":JSON.stringify(n);if(!t&&e&&(!r||r==="tag:yaml.org,2002:float")&&/^-?\d/.test(s)&&!s.includes("e")){let a=s.indexOf(".");a<0&&(a=s.length,s+=".");let l=e-(s.length-a-1);for(;l-- >0;)s+="0"}return s}o(mt,"stringifyNumber");var xl={identify:o(t=>typeof t=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:o(t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,"resolve"),stringify:mt},bl={identify:o(t=>typeof t=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:o(t=>parseFloat(t),"resolve"),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():mt(t)}},wl={identify:o(t=>typeof t=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){let e=new G(parseFloat(t)),r=t.indexOf(".");return r!==-1&&t[t.length-1]==="0"&&(e.minFractionDigits=t.length-r-1),e},stringify:mt};var Lp=o(t=>typeof t=="bigint"||Number.isInteger(t),"intIdentify"),rg=o((t,e,r,{intAsBigInt:n})=>n?BigInt(t):parseInt(t.substring(e),r),"intResolve");function s1(t,e,r){let{value:n}=t;return Lp(n)&&n>=0?r+n.toString(e):mt(t)}o(s1,"intStringify");var Sl={identify:o(t=>Lp(t)&&t>=0,"identify"),default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:o((t,e,r)=>rg(t,2,8,r),"resolve"),stringify:o(t=>s1(t,8,"0o"),"stringify")},vl={identify:Lp,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:o((t,e,r)=>rg(t,0,10,r),"resolve"),stringify:mt},kl={identify:o(t=>Lp(t)&&t>=0,"identify"),default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:o((t,e,r)=>rg(t,2,16,r),"resolve"),stringify:o(t=>s1(t,16,"0x"),"stringify")};var ng=[mr,dr,Tn,ii,As,Sl,vl,kl,xl,bl,wl];function a1(t){return typeof t=="bigint"||Number.isInteger(t)}o(a1,"intIdentify");var Rp=o(({value:t})=>JSON.stringify(t),"stringifyJSON"),aR=[{identify:o(t=>typeof t=="string","identify"),default:!0,tag:"tag:yaml.org,2002:str",resolve:o(t=>t,"resolve"),stringify:Rp},{identify:o(t=>t==null,"identify"),createNode:o(()=>new G(null),"createNode"),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:o(()=>null,"resolve"),stringify:Rp},{identify:o(t=>typeof t=="boolean","identify"),default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:o(t=>t==="true","resolve"),stringify:Rp},{identify:a1,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:o((t,e,{intAsBigInt:r})=>r?BigInt(t):parseInt(t,10),"resolve"),stringify:o(({value:t})=>a1(t)?t.toString():JSON.stringify(t),"stringify")},{identify:o(t=>typeof t=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:o(t=>parseFloat(t),"resolve"),stringify:Rp}],lR={default:!0,tag:"",test:/^/,resolve(t,e){return e(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},ig=[mr,dr].concat(aR,lR);var Fs={identify:o(t=>t instanceof Uint8Array,"identify"),default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,e){if(typeof atob=="function"){let r=atob(t.replace(/[\n\r]/g,"")),n=new Uint8Array(r.length);for(let i=0;i<r.length;++i)n[i]=r.charCodeAt(i);return n}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:t,type:e,value:r},n,i,s){if(!r)return"";let a=r,l;if(typeof btoa=="function"){let c="";for(let u=0;u<a.length;++u)c+=String.fromCharCode(a[u]);l=btoa(c)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e??(e=G.BLOCK_LITERAL),e!==G.QUOTE_DOUBLE){let c=Math.max(n.options.lineWidth-n.indent.length,n.options.minContentWidth),u=Math.ceil(l.length/c),f=new Array(u);for(let p=0,h=0;p<u;++p,h+=c)f[p]=l.substr(h,c);l=f.join(e===G.BLOCK_LITERAL?`
63
- `:" ")}return ln({comment:t,type:e,value:l},n,i,s)}};function Ap(t,e){if(Ht(t))for(let r=0;r<t.items.length;++r){let n=t.items[r];if(!me(n)){if(Wt(n)){n.items.length>1&&e("Each pair must have its own sequence indicator");let i=n.items[0]||new $e(new G(null));if(n.commentBefore&&(i.key.commentBefore=i.key.commentBefore?`${n.commentBefore}
62
+ ${i}${m}`}else return`${h}${a}${p.join(" ")}${a}${m}`}o(kR,"stringifyFlowCollection");function Fp({indent:t,options:{commentString:e}},r,n,i){if(n&&i&&(n=n.replace(/^\n+/,"")),n){let s=Zt(e(n),t);r.push(s.trimStart())}}o(Fp,"addCommentBefore");function Tn(t,e){let r=ae(e)?e.value:e;for(let n of t)if(me(n)&&(n.key===e||n.key===r||ae(n.key)&&n.key.value===r))return n}o(Tn,"findPair");var Be=class extends Xi{static{o(this,"YAMLMap")}static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(fr,e),this.items=[]}static from(e,r,n){let{keepUndefined:i,replacer:s}=n,a=new this(e),l=o((c,u)=>{if(typeof s=="function")u=s.call(r,c,u);else if(Array.isArray(s)&&!s.includes(c))return;(u!==void 0||i)&&a.items.push(eo(c,u,n))},"add");if(r instanceof Map)for(let[c,u]of r)l(c,u);else if(r&&typeof r=="object")for(let c of Object.keys(r))l(c,r[c]);return typeof e.sortMapEntries=="function"&&a.items.sort(e.sortMapEntries),a}add(e,r){let n;me(e)?n=e:!e||typeof e!="object"||!("key"in e)?n=new $e(e,e?.value):n=new $e(e.key,e.value);let i=Tn(this.items,n.key),s=this.schema?.sortMapEntries;if(i){if(!r)throw new Error(`Key ${n.key} already set`);ae(i.value)&&ml(n.value)?i.value.value=n.value:i.value=n.value}else if(s){let a=this.items.findIndex(l=>s(n,l)<0);a===-1?this.items.push(n):this.items.splice(a,0,n)}else this.items.push(n)}delete(e){let r=Tn(this.items,e);return r?this.items.splice(this.items.indexOf(r),1).length>0:!1}get(e,r){let i=Tn(this.items,e)?.value;return(!r&&ae(i)?i.value:i)??void 0}has(e){return!!Tn(this.items,e)}set(e,r){this.add(new $e(e,r),!0)}toJSON(e,r,n){let i=n?new n:r?.mapAsMap?new Map:{};r?.onCreate&&r.onCreate(i);for(let s of this.items)bl(r,i,s);return i}toString(e,r,n){if(!e)return JSON.stringify(this);for(let i of this.items)if(!me(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),wl(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:r})}};var mr={collection:"map",default:!0,nodeClass:Be,tag:"tag:yaml.org,2002:map",resolve(t,e){return Wt(t)||e("Expected a mapping for this tag"),t},createNode:o((t,e,r)=>Be.from(t,e,r),"createNode")};var rt=class extends Xi{static{o(this,"YAMLSeq")}static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(sn,e),this.items=[]}add(e){this.items.push(e)}delete(e){let r=$p(e);return typeof r!="number"?!1:this.items.splice(r,1).length>0}get(e,r){let n=$p(e);if(typeof n!="number")return;let i=this.items[n];return!r&&ae(i)?i.value:i}has(e){let r=$p(e);return typeof r=="number"&&r<this.items.length}set(e,r){let n=$p(e);if(typeof n!="number")throw new Error(`Expected a valid index, not ${e}.`);let i=this.items[n];ae(i)&&ml(r)?i.value=r:this.items[n]=r}toJSON(e,r){let n=[];r?.onCreate&&r.onCreate(n);let i=0;for(let s of this.items)n.push(Je(s,String(i++),r));return n}toString(e,r,n){return e?wl(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:n,onComment:r}):JSON.stringify(this)}static from(e,r,n){let{replacer:i}=n,s=new this(e);if(r&&Symbol.iterator in Object(r)){let a=0;for(let l of r){if(typeof i=="function"){let c=r instanceof Set?l:String(a++);l=i.call(r,c,l)}s.items.push(ln(l,void 0,n))}}return s}};function $p(t){let e=ae(t)?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}o($p,"asItemIndex");var dr={collection:"seq",default:!0,nodeClass:rt,tag:"tag:yaml.org,2002:seq",resolve(t,e){return Ht(t)||e("Expected a sequence for this tag"),t},createNode:o((t,e,r)=>rt.from(t,e,r),"createNode")};var En={identify:o(t=>typeof t=="string","identify"),default:!0,tag:"tag:yaml.org,2002:str",resolve:o(t=>t,"resolve"),stringify(t,e,r,n){return e=Object.assign({actualString:!0},e),cn(t,e,r,n)}};var ni={identify:o(t=>t==null,"identify"),createNode:o(()=>new G(null),"createNode"),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:o(()=>new G(null),"resolve"),stringify:o(({source:t},e)=>typeof t=="string"&&ni.test.test(t)?t:e.options.nullStr,"stringify")};var Fs={identify:o(t=>typeof t=="boolean","identify"),default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:o(t=>new G(t[0]==="t"||t[0]==="T"),"resolve"),stringify({source:t,value:e},r){if(t&&Fs.test.test(t)){let n=t[0]==="t"||t[0]==="T";if(e===n)return t}return e?r.options.trueStr:r.options.falseStr}};function mt({format:t,minFractionDigits:e,tag:r,value:n}){if(typeof n=="bigint")return String(n);let i=typeof n=="number"?n:Number(n);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let s=Object.is(n,-0)?"-0":JSON.stringify(n);if(!t&&e&&(!r||r==="tag:yaml.org,2002:float")&&/^-?\d/.test(s)&&!s.includes("e")){let a=s.indexOf(".");a<0&&(a=s.length,s+=".");let l=e-(s.length-a-1);for(;l-- >0;)s+="0"}return s}o(mt,"stringifyNumber");var vl={identify:o(t=>typeof t=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:o(t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,"resolve"),stringify:mt},Sl={identify:o(t=>typeof t=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:o(t=>parseFloat(t),"resolve"),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():mt(t)}},kl={identify:o(t=>typeof t=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){let e=new G(parseFloat(t)),r=t.indexOf(".");return r!==-1&&t[t.length-1]==="0"&&(e.minFractionDigits=t.length-r-1),e},stringify:mt};var Bp=o(t=>typeof t=="bigint"||Number.isInteger(t),"intIdentify"),ag=o((t,e,r,{intAsBigInt:n})=>n?BigInt(t):parseInt(t.substring(e),r),"intResolve");function m1(t,e,r){let{value:n}=t;return Bp(n)&&n>=0?r+n.toString(e):mt(t)}o(m1,"intStringify");var Tl={identify:o(t=>Bp(t)&&t>=0,"identify"),default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:o((t,e,r)=>ag(t,2,8,r),"resolve"),stringify:o(t=>m1(t,8,"0o"),"stringify")},El={identify:Bp,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:o((t,e,r)=>ag(t,0,10,r),"resolve"),stringify:mt},Dl={identify:o(t=>Bp(t)&&t>=0,"identify"),default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:o((t,e,r)=>ag(t,2,16,r),"resolve"),stringify:o(t=>m1(t,16,"0x"),"stringify")};var lg=[mr,dr,En,ni,Fs,Tl,El,Dl,vl,Sl,kl];function d1(t){return typeof t=="bigint"||Number.isInteger(t)}o(d1,"intIdentify");var jp=o(({value:t})=>JSON.stringify(t),"stringifyJSON"),TR=[{identify:o(t=>typeof t=="string","identify"),default:!0,tag:"tag:yaml.org,2002:str",resolve:o(t=>t,"resolve"),stringify:jp},{identify:o(t=>t==null,"identify"),createNode:o(()=>new G(null),"createNode"),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:o(()=>null,"resolve"),stringify:jp},{identify:o(t=>typeof t=="boolean","identify"),default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:o(t=>t==="true","resolve"),stringify:jp},{identify:d1,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:o((t,e,{intAsBigInt:r})=>r?BigInt(t):parseInt(t,10),"resolve"),stringify:o(({value:t})=>d1(t)?t.toString():JSON.stringify(t),"stringify")},{identify:o(t=>typeof t=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:o(t=>parseFloat(t),"resolve"),stringify:jp}],ER={default:!0,tag:"",test:/^/,resolve(t,e){return e(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},cg=[mr,dr].concat(TR,ER);var $s={identify:o(t=>t instanceof Uint8Array,"identify"),default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,e){if(typeof atob=="function"){let r=atob(t.replace(/[\n\r]/g,"")),n=new Uint8Array(r.length);for(let i=0;i<r.length;++i)n[i]=r.charCodeAt(i);return n}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:t,type:e,value:r},n,i,s){if(!r)return"";let a=r,l;if(typeof btoa=="function"){let c="";for(let u=0;u<a.length;++u)c+=String.fromCharCode(a[u]);l=btoa(c)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e??(e=G.BLOCK_LITERAL),e!==G.QUOTE_DOUBLE){let c=Math.max(n.options.lineWidth-n.indent.length,n.options.minContentWidth),u=Math.ceil(l.length/c),f=new Array(u);for(let p=0,h=0;p<u;++p,h+=c)f[p]=l.substr(h,c);l=f.join(e===G.BLOCK_LITERAL?`
63
+ `:" ")}return cn({comment:t,type:e,value:l},n,i,s)}};function zp(t,e){if(Ht(t))for(let r=0;r<t.items.length;++r){let n=t.items[r];if(!me(n)){if(Wt(n)){n.items.length>1&&e("Each pair must have its own sequence indicator");let i=n.items[0]||new $e(new G(null));if(n.commentBefore&&(i.key.commentBefore=i.key.commentBefore?`${n.commentBefore}
64
64
  ${i.key.commentBefore}`:n.commentBefore),n.comment){let s=i.value??i.key;s.comment=s.comment?`${n.comment}
65
- ${s.comment}`:n.comment}n=i}t.items[r]=me(n)?n:new $e(n)}}else e("Expected a sequence for this tag");return t}o(Ap,"resolvePairs");function Fp(t,e,r){let{replacer:n}=r,i=new rt(t);i.tag="tag:yaml.org,2002:pairs";let s=0;if(e&&Symbol.iterator in Object(e))for(let a of e){typeof n=="function"&&(a=n.call(e,String(s++),a));let l,c;if(Array.isArray(a))if(a.length===2)l=a[0],c=a[1];else throw new TypeError(`Expected [key, value] tuple: ${a}`);else if(a&&a instanceof Object){let u=Object.keys(a);if(u.length===1)l=u[0],c=a[l];else throw new TypeError(`Expected tuple with one key, not ${u.length} keys`)}else l=a;i.items.push(to(l,c,r))}return i}o(Fp,"createPairs");var $s={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Ap,createNode:Fp};var ro=class t extends rt{static{o(this,"YAMLOMap")}constructor(){super(),this.add=Be.prototype.add.bind(this),this.delete=Be.prototype.delete.bind(this),this.get=Be.prototype.get.bind(this),this.has=Be.prototype.has.bind(this),this.set=Be.prototype.set.bind(this),this.tag=t.tag}toJSON(e,r){if(!r)return super.toJSON(e);let n=new Map;r?.onCreate&&r.onCreate(n);for(let i of this.items){let s,a;if(me(i)?(s=Je(i.key,"",r),a=Je(i.value,s,r)):s=Je(i,"",r),n.has(s))throw new Error("Ordered maps must not include duplicate keys");n.set(s,a)}return n}static from(e,r,n){let i=Fp(e,r,n),s=new this;return s.items=i.items,s}};ro.tag="tag:yaml.org,2002:omap";var Bs={collection:"seq",identify:o(t=>t instanceof Map,"identify"),nodeClass:ro,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){let r=Ap(t,e),n=[];for(let{key:i}of r.items)ae(i)&&(n.includes(i.value)?e(`Ordered maps must not include duplicate keys: ${i.value}`):n.push(i.value));return Object.assign(new ro,r)},createNode:o((t,e,r)=>ro.from(t,e,r),"createNode")};function l1({value:t,source:e},r){return e&&(t?$p:Bp).test.test(e)?e:t?r.options.trueStr:r.options.falseStr}o(l1,"boolStringify");var $p={identify:o(t=>t===!0,"identify"),default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:o(()=>new G(!0),"resolve"),stringify:l1},Bp={identify:o(t=>t===!1,"identify"),default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:o(()=>new G(!1),"resolve"),stringify:l1};var og={identify:o(t=>typeof t=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:o(t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,"resolve"),stringify:mt},sg={identify:o(t=>typeof t=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:o(t=>parseFloat(t.replace(/_/g,"")),"resolve"),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():mt(t)}},ag={identify:o(t=>typeof t=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){let e=new G(parseFloat(t.replace(/_/g,""))),r=t.indexOf(".");if(r!==-1){let n=t.substring(r+1).replace(/_/g,"");n[n.length-1]==="0"&&(e.minFractionDigits=n.length)}return e},stringify:mt};var Tl=o(t=>typeof t=="bigint"||Number.isInteger(t),"intIdentify");function jp(t,e,r,{intAsBigInt:n}){let i=t[0];if((i==="-"||i==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),n){switch(r){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}let a=BigInt(t);return i==="-"?BigInt(-1)*a:a}let s=parseInt(t,r);return i==="-"?-1*s:s}o(jp,"intResolve");function lg(t,e,r){let{value:n}=t;if(Tl(n)){let i=n.toString(e);return n<0?"-"+r+i.substr(1):r+i}return mt(t)}o(lg,"intStringify");var cg={identify:Tl,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:o((t,e,r)=>jp(t,2,2,r),"resolve"),stringify:o(t=>lg(t,2,"0b"),"stringify")},ug={identify:Tl,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:o((t,e,r)=>jp(t,1,8,r),"resolve"),stringify:o(t=>lg(t,8,"0"),"stringify")},fg={identify:Tl,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:o((t,e,r)=>jp(t,0,10,r),"resolve"),stringify:mt},pg={identify:Tl,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:o((t,e,r)=>jp(t,2,16,r),"resolve"),stringify:o(t=>lg(t,16,"0x"),"stringify")};var no=class t extends Be{static{o(this,"YAMLSet")}constructor(e){super(e),this.tag=t.tag}add(e){let r;me(e)?r=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?r=new $e(e.key,null):r=new $e(e,null),kn(this.items,r.key)||this.items.push(r)}get(e,r){let n=kn(this.items,e);return!r&&me(n)?ae(n.key)?n.key.value:n.key:n}set(e,r){if(typeof r!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof r}`);let n=kn(this.items,e);n&&!r?this.items.splice(this.items.indexOf(n),1):!n&&r&&this.items.push(new $e(e))}toJSON(e,r){return super.toJSON(e,r,Set)}toString(e,r,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),r,n);throw new Error("Set items must all have null values")}static from(e,r,n){let{replacer:i}=n,s=new this(e);if(r&&Symbol.iterator in Object(r))for(let a of r)typeof i=="function"&&(a=i.call(r,a,a)),s.items.push(to(a,null,n));return s}};no.tag="tag:yaml.org,2002:set";var js={collection:"map",identify:o(t=>t instanceof Set,"identify"),nodeClass:no,default:!1,tag:"tag:yaml.org,2002:set",createNode:o((t,e,r)=>no.from(t,e,r),"createNode"),resolve(t,e){if(Wt(t)){if(t.hasAllNullValues(!0))return Object.assign(new no,t);e("Set items must all have null values")}else e("Expected a mapping for this tag");return t}};function hg(t,e){let r=t[0],n=r==="-"||r==="+"?t.substring(1):t,i=o(a=>e?BigInt(a):Number(a),"num"),s=n.replace(/_/g,"").split(":").reduce((a,l)=>a*i(60)+i(l),i(0));return r==="-"?i(-1)*s:s}o(hg,"parseSexagesimal");function c1(t){let{value:e}=t,r=o(a=>a,"num");if(typeof e=="bigint")r=o(a=>BigInt(a),"num");else if(isNaN(e)||!isFinite(e))return mt(t);let n="";e<0&&(n="-",e*=r(-1));let i=r(60),s=[e%i];return e<60?s.unshift(0):(e=(e-s[0])/i,s.unshift(e%i),e>=60&&(e=(e-s[0])/i,s.unshift(e))),n+s.map(a=>String(a).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}o(c1,"stringifySexagesimal");var El={identify:o(t=>typeof t=="bigint"||Number.isInteger(t),"identify"),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:o((t,e,{intAsBigInt:r})=>hg(t,r),"resolve"),stringify:c1},Dl={identify:o(t=>typeof t=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:o(t=>hg(t,!1),"resolve"),stringify:c1},io={identify:o(t=>t instanceof Date,"identify"),default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(t){let e=t.match(io.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,r,n,i,s,a,l]=e.map(Number),c=e[7]?Number((e[7]+"00").substr(1,3)):0,u=Date.UTC(r,n-1,i,s||0,a||0,l||0,c),f=e[8];if(f&&f!=="Z"){let p=hg(f,!1);Math.abs(p)<30&&(p*=60),u-=6e4*p}return new Date(u)},stringify:o(({value:t})=>t?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??"","stringify")};var zp=[mr,dr,Tn,ii,$p,Bp,cg,ug,fg,pg,og,sg,ag,Fs,hr,Bs,$s,js,El,Dl,io];var u1=new Map([["core",ng],["failsafe",[mr,dr,Tn]],["json",ig],["yaml11",zp],["yaml-1.1",zp]]),f1={binary:Fs,bool:As,float:wl,floatExp:bl,floatNaN:xl,floatTime:Dl,int:vl,intHex:kl,intOct:Sl,intTime:El,map:mr,merge:hr,null:ii,omap:Bs,pairs:$s,seq:dr,set:js,timestamp:io},mg={"tag:yaml.org,2002:binary":Fs,"tag:yaml.org,2002:merge":hr,"tag:yaml.org,2002:omap":Bs,"tag:yaml.org,2002:pairs":$s,"tag:yaml.org,2002:set":js,"tag:yaml.org,2002:timestamp":io};function Cl(t,e,r){let n=u1.get(e);if(n&&!t)return r&&!n.includes(hr)?n.concat(hr):n.slice();let i=n;if(!i)if(Array.isArray(t))i=[];else{let s=Array.from(u1.keys()).filter(a=>a!=="yaml11").map(a=>JSON.stringify(a)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${s} or define customTags array`)}if(Array.isArray(t))for(let s of t)i=i.concat(s);else typeof t=="function"&&(i=t(i.slice()));return r&&(i=i.concat(hr)),i.reduce((s,a)=>{let l=typeof a=="string"?f1[a]:a;if(!l){let c=JSON.stringify(a),u=Object.keys(f1).map(f=>JSON.stringify(f)).join(", ");throw new Error(`Unknown custom tag ${c}; use one of ${u}`)}return s.includes(l)||s.push(l),s},[])}o(Cl,"getTags");var cR=o((t,e)=>t.key<e.key?-1:t.key>e.key?1:0,"sortMapEntriesByKey"),oi=class t{static{o(this,"Schema")}constructor({compat:e,customTags:r,merge:n,resolveKnownTags:i,schema:s,sortMapEntries:a,toStringDefaults:l}){this.compat=Array.isArray(e)?Cl(e,"compat"):e?Cl(null,e):null,this.name=typeof s=="string"&&s||"core",this.knownTags=i?mg:{},this.tags=Cl(r,this.name,n),this.toStringOptions=l??null,Object.defineProperty(this,fr,{value:mr}),Object.defineProperty(this,Bt,{value:Tn}),Object.defineProperty(this,on,{value:dr}),this.sortMapEntries=typeof a=="function"?a:a===!0?cR:null}clone(){let e=Object.create(t.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};function dg(t,e){let r=[],n=e.directives===!0;if(e.directives!==!1&&t.directives){let c=t.directives.toString(t);c?(r.push(c),n=!0):t.directives.docStart&&(n=!0)}n&&r.push("---");let i=ml(t,e),{commentString:s}=i.options;if(t.commentBefore){r.length!==1&&r.unshift("");let c=s(t.commentBefore);r.unshift(Zt(c,""))}let a=!1,l=null;if(t.contents){if(ge(t.contents)){if(t.contents.spaceBefore&&n&&r.push(""),t.contents.commentBefore){let f=s(t.contents.commentBefore);r.push(Zt(f,""))}i.forceBlockIndent=!!t.comment,l=t.contents.comment}let c=l?void 0:()=>a=!0,u=cn(t.contents,i,()=>l=null,c);l&&(u+=Mr(u,"",s(l))),(u[0]==="|"||u[0]===">")&&r[r.length-1]==="---"?r[r.length-1]=`--- ${u}`:r.push(u)}else r.push(cn(t.contents,i));if(t.directives?.docEnd)if(t.comment){let c=s(t.comment);c.includes(`
65
+ ${s.comment}`:n.comment}n=i}t.items[r]=me(n)?n:new $e(n)}}else e("Expected a sequence for this tag");return t}o(zp,"resolvePairs");function Wp(t,e,r){let{replacer:n}=r,i=new rt(t);i.tag="tag:yaml.org,2002:pairs";let s=0;if(e&&Symbol.iterator in Object(e))for(let a of e){typeof n=="function"&&(a=n.call(e,String(s++),a));let l,c;if(Array.isArray(a))if(a.length===2)l=a[0],c=a[1];else throw new TypeError(`Expected [key, value] tuple: ${a}`);else if(a&&a instanceof Object){let u=Object.keys(a);if(u.length===1)l=u[0],c=a[l];else throw new TypeError(`Expected tuple with one key, not ${u.length} keys`)}else l=a;i.items.push(eo(l,c,r))}return i}o(Wp,"createPairs");var Bs={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:zp,createNode:Wp};var to=class t extends rt{static{o(this,"YAMLOMap")}constructor(){super(),this.add=Be.prototype.add.bind(this),this.delete=Be.prototype.delete.bind(this),this.get=Be.prototype.get.bind(this),this.has=Be.prototype.has.bind(this),this.set=Be.prototype.set.bind(this),this.tag=t.tag}toJSON(e,r){if(!r)return super.toJSON(e);let n=new Map;r?.onCreate&&r.onCreate(n);for(let i of this.items){let s,a;if(me(i)?(s=Je(i.key,"",r),a=Je(i.value,s,r)):s=Je(i,"",r),n.has(s))throw new Error("Ordered maps must not include duplicate keys");n.set(s,a)}return n}static from(e,r,n){let i=Wp(e,r,n),s=new this;return s.items=i.items,s}};to.tag="tag:yaml.org,2002:omap";var js={collection:"seq",identify:o(t=>t instanceof Map,"identify"),nodeClass:to,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){let r=zp(t,e),n=[];for(let{key:i}of r.items)ae(i)&&(n.includes(i.value)?e(`Ordered maps must not include duplicate keys: ${i.value}`):n.push(i.value));return Object.assign(new to,r)},createNode:o((t,e,r)=>to.from(t,e,r),"createNode")};function g1({value:t,source:e},r){return e&&(t?Hp:Up).test.test(e)?e:t?r.options.trueStr:r.options.falseStr}o(g1,"boolStringify");var Hp={identify:o(t=>t===!0,"identify"),default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:o(()=>new G(!0),"resolve"),stringify:g1},Up={identify:o(t=>t===!1,"identify"),default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:o(()=>new G(!1),"resolve"),stringify:g1};var ug={identify:o(t=>typeof t=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:o(t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,"resolve"),stringify:mt},fg={identify:o(t=>typeof t=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:o(t=>parseFloat(t.replace(/_/g,"")),"resolve"),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():mt(t)}},pg={identify:o(t=>typeof t=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){let e=new G(parseFloat(t.replace(/_/g,""))),r=t.indexOf(".");if(r!==-1){let n=t.substring(r+1).replace(/_/g,"");n[n.length-1]==="0"&&(e.minFractionDigits=n.length)}return e},stringify:mt};var Cl=o(t=>typeof t=="bigint"||Number.isInteger(t),"intIdentify");function qp(t,e,r,{intAsBigInt:n}){let i=t[0];if((i==="-"||i==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),n){switch(r){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}let a=BigInt(t);return i==="-"?BigInt(-1)*a:a}let s=parseInt(t,r);return i==="-"?-1*s:s}o(qp,"intResolve");function hg(t,e,r){let{value:n}=t;if(Cl(n)){let i=n.toString(e);return n<0?"-"+r+i.substr(1):r+i}return mt(t)}o(hg,"intStringify");var mg={identify:Cl,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:o((t,e,r)=>qp(t,2,2,r),"resolve"),stringify:o(t=>hg(t,2,"0b"),"stringify")},dg={identify:Cl,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:o((t,e,r)=>qp(t,1,8,r),"resolve"),stringify:o(t=>hg(t,8,"0"),"stringify")},gg={identify:Cl,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:o((t,e,r)=>qp(t,0,10,r),"resolve"),stringify:mt},yg={identify:Cl,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:o((t,e,r)=>qp(t,2,16,r),"resolve"),stringify:o(t=>hg(t,16,"0x"),"stringify")};var ro=class t extends Be{static{o(this,"YAMLSet")}constructor(e){super(e),this.tag=t.tag}add(e){let r;me(e)?r=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?r=new $e(e.key,null):r=new $e(e,null),Tn(this.items,r.key)||this.items.push(r)}get(e,r){let n=Tn(this.items,e);return!r&&me(n)?ae(n.key)?n.key.value:n.key:n}set(e,r){if(typeof r!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof r}`);let n=Tn(this.items,e);n&&!r?this.items.splice(this.items.indexOf(n),1):!n&&r&&this.items.push(new $e(e))}toJSON(e,r){return super.toJSON(e,r,Set)}toString(e,r,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),r,n);throw new Error("Set items must all have null values")}static from(e,r,n){let{replacer:i}=n,s=new this(e);if(r&&Symbol.iterator in Object(r))for(let a of r)typeof i=="function"&&(a=i.call(r,a,a)),s.items.push(eo(a,null,n));return s}};ro.tag="tag:yaml.org,2002:set";var zs={collection:"map",identify:o(t=>t instanceof Set,"identify"),nodeClass:ro,default:!1,tag:"tag:yaml.org,2002:set",createNode:o((t,e,r)=>ro.from(t,e,r),"createNode"),resolve(t,e){if(Wt(t)){if(t.hasAllNullValues(!0))return Object.assign(new ro,t);e("Set items must all have null values")}else e("Expected a mapping for this tag");return t}};function xg(t,e){let r=t[0],n=r==="-"||r==="+"?t.substring(1):t,i=o(a=>e?BigInt(a):Number(a),"num"),s=n.replace(/_/g,"").split(":").reduce((a,l)=>a*i(60)+i(l),i(0));return r==="-"?i(-1)*s:s}o(xg,"parseSexagesimal");function y1(t){let{value:e}=t,r=o(a=>a,"num");if(typeof e=="bigint")r=o(a=>BigInt(a),"num");else if(isNaN(e)||!isFinite(e))return mt(t);let n="";e<0&&(n="-",e*=r(-1));let i=r(60),s=[e%i];return e<60?s.unshift(0):(e=(e-s[0])/i,s.unshift(e%i),e>=60&&(e=(e-s[0])/i,s.unshift(e))),n+s.map(a=>String(a).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}o(y1,"stringifySexagesimal");var Ol={identify:o(t=>typeof t=="bigint"||Number.isInteger(t),"identify"),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:o((t,e,{intAsBigInt:r})=>xg(t,r),"resolve"),stringify:y1},Ml={identify:o(t=>typeof t=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:o(t=>xg(t,!1),"resolve"),stringify:y1},no={identify:o(t=>t instanceof Date,"identify"),default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(t){let e=t.match(no.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,r,n,i,s,a,l]=e.map(Number),c=e[7]?Number((e[7]+"00").substr(1,3)):0,u=Date.UTC(r,n-1,i,s||0,a||0,l||0,c),f=e[8];if(f&&f!=="Z"){let p=xg(f,!1);Math.abs(p)<30&&(p*=60),u-=6e4*p}return new Date(u)},stringify:o(({value:t})=>t?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??"","stringify")};var Yp=[mr,dr,En,ni,Hp,Up,mg,dg,gg,yg,ug,fg,pg,$s,hr,js,Bs,zs,Ol,Ml,no];var x1=new Map([["core",lg],["failsafe",[mr,dr,En]],["json",cg],["yaml11",Yp],["yaml-1.1",Yp]]),b1={binary:$s,bool:Fs,float:kl,floatExp:Sl,floatNaN:vl,floatTime:Ml,int:El,intHex:Dl,intOct:Tl,intTime:Ol,map:mr,merge:hr,null:ni,omap:js,pairs:Bs,seq:dr,set:zs,timestamp:no},bg={"tag:yaml.org,2002:binary":$s,"tag:yaml.org,2002:merge":hr,"tag:yaml.org,2002:omap":js,"tag:yaml.org,2002:pairs":Bs,"tag:yaml.org,2002:set":zs,"tag:yaml.org,2002:timestamp":no};function Il(t,e,r){let n=x1.get(e);if(n&&!t)return r&&!n.includes(hr)?n.concat(hr):n.slice();let i=n;if(!i)if(Array.isArray(t))i=[];else{let s=Array.from(x1.keys()).filter(a=>a!=="yaml11").map(a=>JSON.stringify(a)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${s} or define customTags array`)}if(Array.isArray(t))for(let s of t)i=i.concat(s);else typeof t=="function"&&(i=t(i.slice()));return r&&(i=i.concat(hr)),i.reduce((s,a)=>{let l=typeof a=="string"?b1[a]:a;if(!l){let c=JSON.stringify(a),u=Object.keys(b1).map(f=>JSON.stringify(f)).join(", ");throw new Error(`Unknown custom tag ${c}; use one of ${u}`)}return s.includes(l)||s.push(l),s},[])}o(Il,"getTags");var DR=o((t,e)=>t.key<e.key?-1:t.key>e.key?1:0,"sortMapEntriesByKey"),ii=class t{static{o(this,"Schema")}constructor({compat:e,customTags:r,merge:n,resolveKnownTags:i,schema:s,sortMapEntries:a,toStringDefaults:l}){this.compat=Array.isArray(e)?Il(e,"compat"):e?Il(null,e):null,this.name=typeof s=="string"&&s||"core",this.knownTags=i?bg:{},this.tags=Il(r,this.name,n),this.toStringOptions=l??null,Object.defineProperty(this,fr,{value:mr}),Object.defineProperty(this,Bt,{value:En}),Object.defineProperty(this,sn,{value:dr}),this.sortMapEntries=typeof a=="function"?a:a===!0?DR:null}clone(){let e=Object.create(t.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};function wg(t,e){let r=[],n=e.directives===!0;if(e.directives!==!1&&t.directives){let c=t.directives.toString(t);c?(r.push(c),n=!0):t.directives.docStart&&(n=!0)}n&&r.push("---");let i=yl(t,e),{commentString:s}=i.options;if(t.commentBefore){r.length!==1&&r.unshift("");let c=s(t.commentBefore);r.unshift(Zt(c,""))}let a=!1,l=null;if(t.contents){if(ge(t.contents)){if(t.contents.spaceBefore&&n&&r.push(""),t.contents.commentBefore){let f=s(t.contents.commentBefore);r.push(Zt(f,""))}i.forceBlockIndent=!!t.comment,l=t.contents.comment}let c=l?void 0:()=>a=!0,u=un(t.contents,i,()=>l=null,c);l&&(u+=Mr(u,"",s(l))),(u[0]==="|"||u[0]===">")&&r[r.length-1]==="---"?r[r.length-1]=`--- ${u}`:r.push(u)}else r.push(un(t.contents,i));if(t.directives?.docEnd)if(t.comment){let c=s(t.comment);c.includes(`
66
66
  `)?(r.push("..."),r.push(Zt(c,""))):r.push(`... ${c}`)}else r.push("...");else{let c=t.comment;c&&a&&(c=c.replace(/^\n+/,"")),c&&((!a||l)&&r[r.length-1]!==""&&r.push(""),r.push(Zt(s(c),"")))}return r.join(`
67
67
  `)+`
68
- `}o(dg,"stringifyDocument");var gr=class t{static{o(this,"Document")}constructor(e,r,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Tt,{value:ll});let i=null;typeof r=="function"||Array.isArray(r)?i=r:n===void 0&&r&&(n=r,r=void 0);let s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},n);this.options=s;let{version:a}=s;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new Or({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,i,n)}clone(){let e=Object.create(t.prototype,{[Tt]:{value:ll}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=ge(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){zs(this.contents)&&this.contents.add(e)}addIn(e,r){zs(this.contents)&&this.contents.addIn(e,r)}createAlias(e,r){if(!e.anchor){let n=kp(this);e.anchor=!r||n.has(r)?Tp(r||"a",n):r}return new pr(e.anchor)}createNode(e,r,n){let i;if(typeof r=="function")e=r.call({"":e},"",e),i=r;else if(Array.isArray(r)){let y=o(T=>typeof T=="number"||T instanceof String||T instanceof Number,"keyToStr"),x=r.filter(y).map(String);x.length>0&&(r=r.concat(x)),i=r}else n===void 0&&r&&(n=r,r=void 0);let{aliasDuplicateObjects:s,anchorPrefix:a,flow:l,keepUndefined:c,onTagObj:u,tag:f}=n??{},{onAnchor:p,setAnchors:h,sourceObjects:m}=Gd(this,a||"a"),d={aliasDuplicateObjects:s??!0,keepUndefined:c??!1,onAnchor:p,onTagObj:u,replacer:i,schema:this.schema,sourceObjects:m},g=an(e,f,d);return l&&ke(g)&&(g.flow=!0),h(),g}createPair(e,r,n={}){let i=this.createNode(e,null,n),s=this.createNode(r,null,n);return new $e(i,s)}delete(e){return zs(this.contents)?this.contents.delete(e):!1}deleteIn(e){return eo(e)?this.contents==null?!1:(this.contents=null,!0):zs(this.contents)?this.contents.deleteIn(e):!1}get(e,r){return ke(this.contents)?this.contents.get(e,r):void 0}getIn(e,r){return eo(e)?!r&&ae(this.contents)?this.contents.value:this.contents:ke(this.contents)?this.contents.getIn(e,r):void 0}has(e){return ke(this.contents)?this.contents.has(e):!1}hasIn(e){return eo(e)?this.contents!==void 0:ke(this.contents)?this.contents.hasIn(e):!1}set(e,r){this.contents==null?this.contents=Ps(this.schema,[e],r):zs(this.contents)&&this.contents.set(e,r)}setIn(e,r){eo(e)?this.contents=r:this.contents==null?this.contents=Ps(this.schema,Array.from(e),r):zs(this.contents)&&this.contents.setIn(e,r)}setSchema(e,r={}){typeof e=="number"&&(e=String(e));let n;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Or({version:"1.1"}),n={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new Or({version:e}),n={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{let i=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`)}}if(r.schema instanceof Object)this.schema=r.schema;else if(n)this.schema=new oi(Object.assign(n,r));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:r,mapAsMap:n,maxAliasCount:i,onAnchor:s,reviver:a}={}){let l={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},c=Je(this.contents,r??"",l);if(typeof s=="function")for(let{count:u,res:f}of l.anchors.values())s(f,u);return typeof a=="function"?Sn(a,{"":c},"",c):c}toJSON(e,r){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:r})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let r=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${r}`)}return dg(this,e)}};function zs(t){if(ke(t))return!0;throw new Error("Expected a YAML collection as document contents")}o(zs,"assertCollection");var si=class extends Error{static{o(this,"YAMLError")}constructor(e,r,n,i){super(),this.name=e,this.code=n,this.message=i,this.pos=r}},It=class extends si{static{o(this,"YAMLParseError")}constructor(e,r,n){super("YAMLParseError",e,r,n)}},ai=class extends si{static{o(this,"YAMLWarning")}constructor(e,r,n){super("YAMLWarning",e,r,n)}},Ws=o((t,e)=>r=>{if(r.pos[0]===-1)return;r.linePos=r.pos.map(l=>e.linePos(l));let{line:n,col:i}=r.linePos[0];r.message+=` at line ${n}, column ${i}`;let s=i-1,a=t.substring(e.lineStarts[n-1],e.lineStarts[n]).replace(/[\n\r]+$/,"");if(s>=60&&a.length>80){let l=Math.min(s-39,a.length-79);a="\u2026"+a.substring(l),s-=l-1}if(a.length>80&&(a=a.substring(0,79)+"\u2026"),n>1&&/^ *$/.test(a.substring(0,s))){let l=t.substring(e.lineStarts[n-2],e.lineStarts[n-1]);l.length>80&&(l=l.substring(0,79)+`\u2026
68
+ `}o(wg,"stringifyDocument");var gr=class t{static{o(this,"Document")}constructor(e,r,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Tt,{value:fl});let i=null;typeof r=="function"||Array.isArray(r)?i=r:n===void 0&&r&&(n=r,r=void 0);let s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},n);this.options=s;let{version:a}=s;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new Or({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,i,n)}clone(){let e=Object.create(t.prototype,{[Tt]:{value:fl}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=ge(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){Ws(this.contents)&&this.contents.add(e)}addIn(e,r){Ws(this.contents)&&this.contents.addIn(e,r)}createAlias(e,r){if(!e.anchor){let n=Op(this);e.anchor=!r||n.has(r)?Mp(r||"a",n):r}return new pr(e.anchor)}createNode(e,r,n){let i;if(typeof r=="function")e=r.call({"":e},"",e),i=r;else if(Array.isArray(r)){let y=o(T=>typeof T=="number"||T instanceof String||T instanceof Number,"keyToStr"),x=r.filter(y).map(String);x.length>0&&(r=r.concat(x)),i=r}else n===void 0&&r&&(n=r,r=void 0);let{aliasDuplicateObjects:s,anchorPrefix:a,flow:l,keepUndefined:c,onTagObj:u,tag:f}=n??{},{onAnchor:p,setAnchors:h,sourceObjects:m}=eg(this,a||"a"),d={aliasDuplicateObjects:s??!0,keepUndefined:c??!1,onAnchor:p,onTagObj:u,replacer:i,schema:this.schema,sourceObjects:m},g=ln(e,f,d);return l&&Se(g)&&(g.flow=!0),h(),g}createPair(e,r,n={}){let i=this.createNode(e,null,n),s=this.createNode(r,null,n);return new $e(i,s)}delete(e){return Ws(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Zi(e)?this.contents==null?!1:(this.contents=null,!0):Ws(this.contents)?this.contents.deleteIn(e):!1}get(e,r){return Se(this.contents)?this.contents.get(e,r):void 0}getIn(e,r){return Zi(e)?!r&&ae(this.contents)?this.contents.value:this.contents:Se(this.contents)?this.contents.getIn(e,r):void 0}has(e){return Se(this.contents)?this.contents.has(e):!1}hasIn(e){return Zi(e)?this.contents!==void 0:Se(this.contents)?this.contents.hasIn(e):!1}set(e,r){this.contents==null?this.contents=Ls(this.schema,[e],r):Ws(this.contents)&&this.contents.set(e,r)}setIn(e,r){Zi(e)?this.contents=r:this.contents==null?this.contents=Ls(this.schema,Array.from(e),r):Ws(this.contents)&&this.contents.setIn(e,r)}setSchema(e,r={}){typeof e=="number"&&(e=String(e));let n;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Or({version:"1.1"}),n={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new Or({version:e}),n={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{let i=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`)}}if(r.schema instanceof Object)this.schema=r.schema;else if(n)this.schema=new ii(Object.assign(n,r));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:r,mapAsMap:n,maxAliasCount:i,onAnchor:s,reviver:a}={}){let l={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},c=Je(this.contents,r??"",l);if(typeof s=="function")for(let{count:u,res:f}of l.anchors.values())s(f,u);return typeof a=="function"?Sn(a,{"":c},"",c):c}toJSON(e,r){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:r})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let r=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${r}`)}return wg(this,e)}};function Ws(t){if(Se(t))return!0;throw new Error("Expected a YAML collection as document contents")}o(Ws,"assertCollection");var oi=class extends Error{static{o(this,"YAMLError")}constructor(e,r,n,i){super(),this.name=e,this.code=n,this.message=i,this.pos=r}},It=class extends oi{static{o(this,"YAMLParseError")}constructor(e,r,n){super("YAMLParseError",e,r,n)}},si=class extends oi{static{o(this,"YAMLWarning")}constructor(e,r,n){super("YAMLWarning",e,r,n)}},Hs=o((t,e)=>r=>{if(r.pos[0]===-1)return;r.linePos=r.pos.map(l=>e.linePos(l));let{line:n,col:i}=r.linePos[0];r.message+=` at line ${n}, column ${i}`;let s=i-1,a=t.substring(e.lineStarts[n-1],e.lineStarts[n]).replace(/[\n\r]+$/,"");if(s>=60&&a.length>80){let l=Math.min(s-39,a.length-79);a="\u2026"+a.substring(l),s-=l-1}if(a.length>80&&(a=a.substring(0,79)+"\u2026"),n>1&&/^ *$/.test(a.substring(0,s))){let l=t.substring(e.lineStarts[n-2],e.lineStarts[n-1]);l.length>80&&(l=l.substring(0,79)+`\u2026
69
69
  `),a=l+a}if(/[^ ]/.test(a)){let l=1,c=r.linePos[1];c?.line===n&&c.col>i&&(l=Math.max(1,Math.min(c.col-i,80-s)));let u=" ".repeat(s)+"^".repeat(l);r.message+=`:
70
70
 
71
71
  ${a}
72
72
  ${u}
73
- `}},"prettifyError");function Ir(t,{flow:e,indicator:r,next:n,offset:i,onError:s,parentIndent:a,startOnNewline:l}){let c=!1,u=l,f=l,p="",h="",m=!1,d=!1,g=null,y=null,x=null,T=null,E=null,_=null,P=null;for(let A of t)switch(d&&(A.type!=="space"&&A.type!=="newline"&&A.type!=="comma"&&s(A.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),d=!1),g&&(u&&A.type!=="comment"&&A.type!=="newline"&&s(g,"TAB_AS_INDENT","Tabs are not allowed as indentation"),g=null),A.type){case"space":!e&&(r!=="doc-start"||n?.type!=="flow-collection")&&A.source.includes(" ")&&(g=A),f=!0;break;case"comment":{f||s(A,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let W=A.source.substring(1)||" ";p?p+=h+W:p=W,h="",u=!1;break}case"newline":u?p?p+=A.source:(!_||r!=="seq-item-ind")&&(c=!0):h+=A.source,u=!0,m=!0,(y||x)&&(T=A),f=!0;break;case"anchor":y&&s(A,"MULTIPLE_ANCHORS","A node can have at most one anchor"),A.source.endsWith(":")&&s(A.offset+A.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),y=A,P??(P=A.offset),u=!1,f=!1,d=!0;break;case"tag":{x&&s(A,"MULTIPLE_TAGS","A node can have at most one tag"),x=A,P??(P=A.offset),u=!1,f=!1,d=!0;break}case r:(y||x)&&s(A,"BAD_PROP_ORDER",`Anchors and tags must be after the ${A.source} indicator`),_&&s(A,"UNEXPECTED_TOKEN",`Unexpected ${A.source} in ${e??"collection"}`),_=A,u=r==="seq-item-ind"||r==="explicit-key-ind",f=!1;break;case"comma":if(e){E&&s(A,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),E=A,u=!1,f=!1;break}default:s(A,"UNEXPECTED_TOKEN",`Unexpected ${A.type} token`),u=!1,f=!1}let D=t[t.length-1],F=D?D.offset+D.source.length:i;return d&&n&&n.type!=="space"&&n.type!=="newline"&&n.type!=="comma"&&(n.type!=="scalar"||n.source!=="")&&s(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),g&&(u&&g.indent<=a||n?.type==="block-map"||n?.type==="block-seq")&&s(g,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:E,found:_,spaceBefore:c,comment:p,hasNewline:m,anchor:y,tag:x,newlineAfterProp:T,end:F,start:P??F}}o(Ir,"resolveProps");function En(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(`
74
- `))return!0;if(t.end){for(let e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of t.items){for(let r of e.start)if(r.type==="newline")return!0;if(e.sep){for(let r of e.sep)if(r.type==="newline")return!0}if(En(e.key)||En(e.value))return!0}return!1;default:return!0}}o(En,"containsNewline");function Hs(t,e,r){if(e?.type==="flow-collection"){let n=e.end[0];n.indent===t&&(n.source==="]"||n.source==="}")&&En(e)&&r(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}o(Hs,"flowIndentCheck");function Ol(t,e,r){let{uniqueKeys:n}=t.options;if(n===!1)return!1;let i=typeof n=="function"?n:(s,a)=>s===a||ae(s)&&ae(a)&&s.value===a.value;return e.some(s=>i(s.key,r))}o(Ol,"mapIncludes");var p1="All mapping items must start at the same column";function gg({composeNode:t,composeEmptyNode:e},r,n,i,s){let a=s?.nodeClass??Be,l=new a(r.schema);r.atRoot&&(r.atRoot=!1);let c=n.offset,u=null;for(let f of n.items){let{start:p,key:h,sep:m,value:d}=f,g=Ir(p,{indicator:"explicit-key-ind",next:h??m?.[0],offset:c,onError:i,parentIndent:n.indent,startOnNewline:!0}),y=!g.found;if(y){if(h&&(h.type==="block-seq"?i(c,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in h&&h.indent!==n.indent&&i(c,"BAD_INDENT",p1)),!g.anchor&&!g.tag&&!m){u=g.end,g.comment&&(l.comment?l.comment+=`
75
- `+g.comment:l.comment=g.comment);continue}(g.newlineAfterProp||En(h))&&i(h??p[p.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else g.found?.indent!==n.indent&&i(c,"BAD_INDENT",p1);r.atKey=!0;let x=g.end,T=h?t(r,h,g,i):e(r,x,p,null,g,i);r.schema.compat&&Hs(n.indent,h,i),r.atKey=!1,Ol(r,l.items,T)&&i(x,"DUPLICATE_KEY","Map keys must be unique");let E=Ir(m??[],{indicator:"map-value-ind",next:d,offset:T.range[2],onError:i,parentIndent:n.indent,startOnNewline:!h||h.type==="block-scalar"});if(c=E.end,E.found){y&&(d?.type==="block-map"&&!E.hasNewline&&i(c,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),r.options.strict&&g.start<E.found.offset-1024&&i(T.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let _=d?t(r,d,E,i):e(r,c,m,null,E,i);r.schema.compat&&Hs(n.indent,d,i),c=_.range[2];let P=new $e(T,_);r.options.keepSourceTokens&&(P.srcToken=f),l.items.push(P)}else{y&&i(T.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),E.comment&&(T.comment?T.comment+=`
76
- `+E.comment:T.comment=E.comment);let _=new $e(T);r.options.keepSourceTokens&&(_.srcToken=f),l.items.push(_)}}return u&&u<c&&i(u,"IMPOSSIBLE","Map comment with trailing content"),l.range=[n.offset,c,u??c],l}o(gg,"resolveBlockMap");function yg({composeNode:t,composeEmptyNode:e},r,n,i,s){let a=s?.nodeClass??rt,l=new a(r.schema);r.atRoot&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let c=n.offset,u=null;for(let{start:f,value:p}of n.items){let h=Ir(f,{indicator:"seq-item-ind",next:p,offset:c,onError:i,parentIndent:n.indent,startOnNewline:!0});if(!h.found)if(h.anchor||h.tag||p)p?.type==="block-seq"?i(h.end,"BAD_INDENT","All sequence items must start at the same column"):i(c,"MISSING_CHAR","Sequence item without - indicator");else{u=h.end,h.comment&&(l.comment=h.comment);continue}let m=p?t(r,p,h,i):e(r,h.end,f,null,h,i);r.schema.compat&&Hs(n.indent,p,i),c=m.range[2],l.items.push(m)}return l.range=[n.offset,c,u??c],l}o(yg,"resolveBlockSeq");function Nr(t,e,r,n){let i="";if(t){let s=!1,a="";for(let l of t){let{source:c,type:u}=l;switch(u){case"space":s=!0;break;case"comment":{r&&!s&&n(l,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let f=c.substring(1)||" ";i?i+=a+f:i=f,a="";break}case"newline":i&&(a+=c),s=!0;break;default:n(l,"UNEXPECTED_TOKEN",`Unexpected ${u} at node end`)}e+=c.length}}return{comment:i,offset:e}}o(Nr,"resolveEnd");var xg="Block collections are not allowed within flow collections",bg=o(t=>t&&(t.type==="block-map"||t.type==="block-seq"),"isBlock");function wg({composeNode:t,composeEmptyNode:e},r,n,i,s){let a=n.start.source==="{",l=a?"flow map":"flow sequence",c=s?.nodeClass??(a?Be:rt),u=new c(r.schema);u.flow=!0;let f=r.atRoot;f&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let p=n.offset+n.start.source.length;for(let y=0;y<n.items.length;++y){let x=n.items[y],{start:T,key:E,sep:_,value:P}=x,D=Ir(T,{flow:l,indicator:"explicit-key-ind",next:E??_?.[0],offset:p,onError:i,parentIndent:n.indent,startOnNewline:!1});if(!D.found){if(!D.anchor&&!D.tag&&!_&&!P){y===0&&D.comma?i(D.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${l}`):y<n.items.length-1&&i(D.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${l}`),D.comment&&(u.comment?u.comment+=`
77
- `+D.comment:u.comment=D.comment),p=D.end;continue}!a&&r.options.strict&&En(E)&&i(E,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(y===0)D.comma&&i(D.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${l}`);else if(D.comma||i(D.start,"MISSING_CHAR",`Missing , between ${l} items`),D.comment){let F="";e:for(let A of T)switch(A.type){case"comma":case"space":break;case"comment":F=A.source.substring(1);break e;default:break e}if(F){let A=u.items[u.items.length-1];me(A)&&(A=A.value??A.key),A.comment?A.comment+=`
78
- `+F:A.comment=F,D.comment=D.comment.substring(F.length+1)}}if(!a&&!_&&!D.found){let F=P?t(r,P,D,i):e(r,D.end,_,null,D,i);u.items.push(F),p=F.range[2],bg(P)&&i(F.range,"BLOCK_IN_FLOW",xg)}else{r.atKey=!0;let F=D.end,A=E?t(r,E,D,i):e(r,F,T,null,D,i);bg(E)&&i(A.range,"BLOCK_IN_FLOW",xg),r.atKey=!1;let W=Ir(_??[],{flow:l,indicator:"map-value-ind",next:P,offset:A.range[2],onError:i,parentIndent:n.indent,startOnNewline:!1});if(W.found){if(!a&&!D.found&&r.options.strict){if(_)for(let j of _){if(j===W.found)break;if(j.type==="newline"){i(j,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}D.start<W.found.offset-1024&&i(W.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else P&&("source"in P&&P.source?.[0]===":"?i(P,"MISSING_CHAR",`Missing space after : in ${l}`):i(W.start,"MISSING_CHAR",`Missing , or : between ${l} items`));let C=P?t(r,P,W,i):W.found?e(r,W.end,_,null,W,i):null;C?bg(P)&&i(C.range,"BLOCK_IN_FLOW",xg):W.comment&&(A.comment?A.comment+=`
79
- `+W.comment:A.comment=W.comment);let le=new $e(A,C);if(r.options.keepSourceTokens&&(le.srcToken=x),a){let j=u;Ol(r,j.items,A)&&i(F,"DUPLICATE_KEY","Map keys must be unique"),j.items.push(le)}else{let j=new Be(r.schema);j.flow=!0,j.items.push(le);let N=(C??A).range;j.range=[A.range[0],N[1],N[2]],u.items.push(j)}p=C?C.range[2]:W.end}}let h=a?"}":"]",[m,...d]=n.end,g=p;if(m?.source===h)g=m.offset+m.source.length;else{let y=l[0].toUpperCase()+l.substring(1),x=f?`${y} must end with a ${h}`:`${y} in block collection must be sufficiently indented and end with a ${h}`;i(p,f?"MISSING_CHAR":"BAD_INDENT",x),m&&m.source.length!==1&&d.unshift(m)}if(d.length>0){let y=Nr(d,g,r.options.strict,i);y.comment&&(u.comment?u.comment+=`
80
- `+y.comment:u.comment=y.comment),u.range=[n.offset,g,y.offset]}else u.range=[n.offset,g,g];return u}o(wg,"resolveFlowCollection");function Sg(t,e,r,n,i,s){let a=r.type==="block-map"?gg(t,e,r,n,s):r.type==="block-seq"?yg(t,e,r,n,s):wg(t,e,r,n,s),l=a.constructor;return i==="!"||i===l.tagName?(a.tag=l.tagName,a):(i&&(a.tag=i),a)}o(Sg,"resolveCollection");function vg(t,e,r,n,i){let s=n.tag,a=s?e.directives.tagName(s.source,h=>i(s,"TAG_RESOLVE_FAILED",h)):null;if(r.type==="block-seq"){let{anchor:h,newlineAfterProp:m}=n,d=h&&s?h.offset>s.offset?h:s:h??s;d&&(!m||m.offset<d.offset)&&i(d,"MISSING_CHAR","Missing newline after block sequence props")}let l=r.type==="block-map"?"map":r.type==="block-seq"?"seq":r.start.source==="{"?"map":"seq";if(!s||!a||a==="!"||a===Be.tagName&&l==="map"||a===rt.tagName&&l==="seq")return Sg(t,e,r,i,a);let c=e.schema.tags.find(h=>h.tag===a&&h.collection===l);if(!c){let h=e.schema.knownTags[a];if(h?.collection===l)e.schema.tags.push(Object.assign({},h,{default:!1})),c=h;else return h?i(s,"BAD_COLLECTION_TYPE",`${h.tag} used for ${l} collection, but expects ${h.collection??"scalar"}`,!0):i(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${a}`,!0),Sg(t,e,r,i,a)}let u=Sg(t,e,r,i,a,c),f=c.resolve?.(u,h=>i(s,"TAG_RESOLVE_FAILED",h),e.options)??u,p=ge(f)?f:new G(f);return p.range=u.range,p.tag=a,c?.format&&(p.format=c.format),p}o(vg,"composeCollection");function Ml(t,e,r){let n=e.offset,i=uR(e,t.options.strict,r);if(!i)return{value:"",type:null,comment:"",range:[n,n,n]};let s=i.mode===">"?G.BLOCK_FOLDED:G.BLOCK_LITERAL,a=e.source?fR(e.source):[],l=a.length;for(let g=a.length-1;g>=0;--g){let y=a[g][1];if(y===""||y==="\r")l=g;else break}if(l===0){let g=i.chomp==="+"&&a.length>0?`
73
+ `}},"prettifyError");function Ir(t,{flow:e,indicator:r,next:n,offset:i,onError:s,parentIndent:a,startOnNewline:l}){let c=!1,u=l,f=l,p="",h="",m=!1,d=!1,g=null,y=null,x=null,T=null,E=null,L=null,P=null;for(let A of t)switch(d&&(A.type!=="space"&&A.type!=="newline"&&A.type!=="comma"&&s(A.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),d=!1),g&&(u&&A.type!=="comment"&&A.type!=="newline"&&s(g,"TAB_AS_INDENT","Tabs are not allowed as indentation"),g=null),A.type){case"space":!e&&(r!=="doc-start"||n?.type!=="flow-collection")&&A.source.includes(" ")&&(g=A),f=!0;break;case"comment":{f||s(A,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let W=A.source.substring(1)||" ";p?p+=h+W:p=W,h="",u=!1;break}case"newline":u?p?p+=A.source:(!L||r!=="seq-item-ind")&&(c=!0):h+=A.source,u=!0,m=!0,(y||x)&&(T=A),f=!0;break;case"anchor":y&&s(A,"MULTIPLE_ANCHORS","A node can have at most one anchor"),A.source.endsWith(":")&&s(A.offset+A.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),y=A,P??(P=A.offset),u=!1,f=!1,d=!0;break;case"tag":{x&&s(A,"MULTIPLE_TAGS","A node can have at most one tag"),x=A,P??(P=A.offset),u=!1,f=!1,d=!0;break}case r:(y||x)&&s(A,"BAD_PROP_ORDER",`Anchors and tags must be after the ${A.source} indicator`),L&&s(A,"UNEXPECTED_TOKEN",`Unexpected ${A.source} in ${e??"collection"}`),L=A,u=r==="seq-item-ind"||r==="explicit-key-ind",f=!1;break;case"comma":if(e){E&&s(A,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),E=A,u=!1,f=!1;break}default:s(A,"UNEXPECTED_TOKEN",`Unexpected ${A.type} token`),u=!1,f=!1}let D=t[t.length-1],F=D?D.offset+D.source.length:i;return d&&n&&n.type!=="space"&&n.type!=="newline"&&n.type!=="comma"&&(n.type!=="scalar"||n.source!=="")&&s(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),g&&(u&&g.indent<=a||n?.type==="block-map"||n?.type==="block-seq")&&s(g,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:E,found:L,spaceBefore:c,comment:p,hasNewline:m,anchor:y,tag:x,newlineAfterProp:T,end:F,start:P??F}}o(Ir,"resolveProps");function Dn(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(`
74
+ `))return!0;if(t.end){for(let e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of t.items){for(let r of e.start)if(r.type==="newline")return!0;if(e.sep){for(let r of e.sep)if(r.type==="newline")return!0}if(Dn(e.key)||Dn(e.value))return!0}return!1;default:return!0}}o(Dn,"containsNewline");function Us(t,e,r){if(e?.type==="flow-collection"){let n=e.end[0];n.indent===t&&(n.source==="]"||n.source==="}")&&Dn(e)&&r(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}o(Us,"flowIndentCheck");function Nl(t,e,r){let{uniqueKeys:n}=t.options;if(n===!1)return!1;let i=typeof n=="function"?n:(s,a)=>s===a||ae(s)&&ae(a)&&s.value===a.value;return e.some(s=>i(s.key,r))}o(Nl,"mapIncludes");var w1="All mapping items must start at the same column";function vg({composeNode:t,composeEmptyNode:e},r,n,i,s){let a=s?.nodeClass??Be,l=new a(r.schema);r.atRoot&&(r.atRoot=!1);let c=n.offset,u=null;for(let f of n.items){let{start:p,key:h,sep:m,value:d}=f,g=Ir(p,{indicator:"explicit-key-ind",next:h??m?.[0],offset:c,onError:i,parentIndent:n.indent,startOnNewline:!0}),y=!g.found;if(y){if(h&&(h.type==="block-seq"?i(c,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in h&&h.indent!==n.indent&&i(c,"BAD_INDENT",w1)),!g.anchor&&!g.tag&&!m){u=g.end,g.comment&&(l.comment?l.comment+=`
75
+ `+g.comment:l.comment=g.comment);continue}(g.newlineAfterProp||Dn(h))&&i(h??p[p.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else g.found?.indent!==n.indent&&i(c,"BAD_INDENT",w1);r.atKey=!0;let x=g.end,T=h?t(r,h,g,i):e(r,x,p,null,g,i);r.schema.compat&&Us(n.indent,h,i),r.atKey=!1,Nl(r,l.items,T)&&i(x,"DUPLICATE_KEY","Map keys must be unique");let E=Ir(m??[],{indicator:"map-value-ind",next:d,offset:T.range[2],onError:i,parentIndent:n.indent,startOnNewline:!h||h.type==="block-scalar"});if(c=E.end,E.found){y&&(d?.type==="block-map"&&!E.hasNewline&&i(c,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),r.options.strict&&g.start<E.found.offset-1024&&i(T.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let L=d?t(r,d,E,i):e(r,c,m,null,E,i);r.schema.compat&&Us(n.indent,d,i),c=L.range[2];let P=new $e(T,L);r.options.keepSourceTokens&&(P.srcToken=f),l.items.push(P)}else{y&&i(T.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),E.comment&&(T.comment?T.comment+=`
76
+ `+E.comment:T.comment=E.comment);let L=new $e(T);r.options.keepSourceTokens&&(L.srcToken=f),l.items.push(L)}}return u&&u<c&&i(u,"IMPOSSIBLE","Map comment with trailing content"),l.range=[n.offset,c,u??c],l}o(vg,"resolveBlockMap");function Sg({composeNode:t,composeEmptyNode:e},r,n,i,s){let a=s?.nodeClass??rt,l=new a(r.schema);r.atRoot&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let c=n.offset,u=null;for(let{start:f,value:p}of n.items){let h=Ir(f,{indicator:"seq-item-ind",next:p,offset:c,onError:i,parentIndent:n.indent,startOnNewline:!0});if(!h.found)if(h.anchor||h.tag||p)p?.type==="block-seq"?i(h.end,"BAD_INDENT","All sequence items must start at the same column"):i(c,"MISSING_CHAR","Sequence item without - indicator");else{u=h.end,h.comment&&(l.comment=h.comment);continue}let m=p?t(r,p,h,i):e(r,h.end,f,null,h,i);r.schema.compat&&Us(n.indent,p,i),c=m.range[2],l.items.push(m)}return l.range=[n.offset,c,u??c],l}o(Sg,"resolveBlockSeq");function Nr(t,e,r,n){let i="";if(t){let s=!1,a="";for(let l of t){let{source:c,type:u}=l;switch(u){case"space":s=!0;break;case"comment":{r&&!s&&n(l,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let f=c.substring(1)||" ";i?i+=a+f:i=f,a="";break}case"newline":i&&(a+=c),s=!0;break;default:n(l,"UNEXPECTED_TOKEN",`Unexpected ${u} at node end`)}e+=c.length}}return{comment:i,offset:e}}o(Nr,"resolveEnd");var kg="Block collections are not allowed within flow collections",Tg=o(t=>t&&(t.type==="block-map"||t.type==="block-seq"),"isBlock");function Eg({composeNode:t,composeEmptyNode:e},r,n,i,s){let a=n.start.source==="{",l=a?"flow map":"flow sequence",c=s?.nodeClass??(a?Be:rt),u=new c(r.schema);u.flow=!0;let f=r.atRoot;f&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let p=n.offset+n.start.source.length;for(let y=0;y<n.items.length;++y){let x=n.items[y],{start:T,key:E,sep:L,value:P}=x,D=Ir(T,{flow:l,indicator:"explicit-key-ind",next:E??L?.[0],offset:p,onError:i,parentIndent:n.indent,startOnNewline:!1});if(!D.found){if(!D.anchor&&!D.tag&&!L&&!P){y===0&&D.comma?i(D.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${l}`):y<n.items.length-1&&i(D.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${l}`),D.comment&&(u.comment?u.comment+=`
77
+ `+D.comment:u.comment=D.comment),p=D.end;continue}!a&&r.options.strict&&Dn(E)&&i(E,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(y===0)D.comma&&i(D.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${l}`);else if(D.comma||i(D.start,"MISSING_CHAR",`Missing , between ${l} items`),D.comment){let F="";e:for(let A of T)switch(A.type){case"comma":case"space":break;case"comment":F=A.source.substring(1);break e;default:break e}if(F){let A=u.items[u.items.length-1];me(A)&&(A=A.value??A.key),A.comment?A.comment+=`
78
+ `+F:A.comment=F,D.comment=D.comment.substring(F.length+1)}}if(!a&&!L&&!D.found){let F=P?t(r,P,D,i):e(r,D.end,L,null,D,i);u.items.push(F),p=F.range[2],Tg(P)&&i(F.range,"BLOCK_IN_FLOW",kg)}else{r.atKey=!0;let F=D.end,A=E?t(r,E,D,i):e(r,F,T,null,D,i);Tg(E)&&i(A.range,"BLOCK_IN_FLOW",kg),r.atKey=!1;let W=Ir(L??[],{flow:l,indicator:"map-value-ind",next:P,offset:A.range[2],onError:i,parentIndent:n.indent,startOnNewline:!1});if(W.found){if(!a&&!D.found&&r.options.strict){if(L)for(let j of L){if(j===W.found)break;if(j.type==="newline"){i(j,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}D.start<W.found.offset-1024&&i(W.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else P&&("source"in P&&P.source?.[0]===":"?i(P,"MISSING_CHAR",`Missing space after : in ${l}`):i(W.start,"MISSING_CHAR",`Missing , or : between ${l} items`));let C=P?t(r,P,W,i):W.found?e(r,W.end,L,null,W,i):null;C?Tg(P)&&i(C.range,"BLOCK_IN_FLOW",kg):W.comment&&(A.comment?A.comment+=`
79
+ `+W.comment:A.comment=W.comment);let le=new $e(A,C);if(r.options.keepSourceTokens&&(le.srcToken=x),a){let j=u;Nl(r,j.items,A)&&i(F,"DUPLICATE_KEY","Map keys must be unique"),j.items.push(le)}else{let j=new Be(r.schema);j.flow=!0,j.items.push(le);let N=(C??A).range;j.range=[A.range[0],N[1],N[2]],u.items.push(j)}p=C?C.range[2]:W.end}}let h=a?"}":"]",[m,...d]=n.end,g=p;if(m?.source===h)g=m.offset+m.source.length;else{let y=l[0].toUpperCase()+l.substring(1),x=f?`${y} must end with a ${h}`:`${y} in block collection must be sufficiently indented and end with a ${h}`;i(p,f?"MISSING_CHAR":"BAD_INDENT",x),m&&m.source.length!==1&&d.unshift(m)}if(d.length>0){let y=Nr(d,g,r.options.strict,i);y.comment&&(u.comment?u.comment+=`
80
+ `+y.comment:u.comment=y.comment),u.range=[n.offset,g,y.offset]}else u.range=[n.offset,g,g];return u}o(Eg,"resolveFlowCollection");function Dg(t,e,r,n,i,s){let a=r.type==="block-map"?vg(t,e,r,n,s):r.type==="block-seq"?Sg(t,e,r,n,s):Eg(t,e,r,n,s),l=a.constructor;return i==="!"||i===l.tagName?(a.tag=l.tagName,a):(i&&(a.tag=i),a)}o(Dg,"resolveCollection");function Cg(t,e,r,n,i){let s=n.tag,a=s?e.directives.tagName(s.source,h=>i(s,"TAG_RESOLVE_FAILED",h)):null;if(r.type==="block-seq"){let{anchor:h,newlineAfterProp:m}=n,d=h&&s?h.offset>s.offset?h:s:h??s;d&&(!m||m.offset<d.offset)&&i(d,"MISSING_CHAR","Missing newline after block sequence props")}let l=r.type==="block-map"?"map":r.type==="block-seq"?"seq":r.start.source==="{"?"map":"seq";if(!s||!a||a==="!"||a===Be.tagName&&l==="map"||a===rt.tagName&&l==="seq")return Dg(t,e,r,i,a);let c=e.schema.tags.find(h=>h.tag===a&&h.collection===l);if(!c){let h=e.schema.knownTags[a];if(h?.collection===l)e.schema.tags.push(Object.assign({},h,{default:!1})),c=h;else return h?i(s,"BAD_COLLECTION_TYPE",`${h.tag} used for ${l} collection, but expects ${h.collection??"scalar"}`,!0):i(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${a}`,!0),Dg(t,e,r,i,a)}let u=Dg(t,e,r,i,a,c),f=c.resolve?.(u,h=>i(s,"TAG_RESOLVE_FAILED",h),e.options)??u,p=ge(f)?f:new G(f);return p.range=u.range,p.tag=a,c?.format&&(p.format=c.format),p}o(Cg,"composeCollection");function Pl(t,e,r){let n=e.offset,i=CR(e,t.options.strict,r);if(!i)return{value:"",type:null,comment:"",range:[n,n,n]};let s=i.mode===">"?G.BLOCK_FOLDED:G.BLOCK_LITERAL,a=e.source?OR(e.source):[],l=a.length;for(let g=a.length-1;g>=0;--g){let y=a[g][1];if(y===""||y==="\r")l=g;else break}if(l===0){let g=i.chomp==="+"&&a.length>0?`
81
81
  `.repeat(Math.max(1,a.length-1)):"",y=n+i.length;return e.source&&(y+=e.source.length),{value:g,type:s,comment:i.comment,range:[n,y,y]}}let c=e.indent+i.indent,u=e.offset+i.length,f=0;for(let g=0;g<l;++g){let[y,x]=a[g];if(x===""||x==="\r")i.indent===0&&y.length>c&&(c=y.length);else{y.length<c&&r(u+y.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),i.indent===0&&(c=y.length),f=g,c===0&&!t.atRoot&&r(u,"BAD_INDENT","Block scalar values in collections must be indented");break}u+=y.length+x.length+1}for(let g=a.length-1;g>=l;--g)a[g][0].length>c&&(l=g+1);let p="",h="",m=!1;for(let g=0;g<f;++g)p+=a[g][0].slice(c)+`
82
- `;for(let g=f;g<l;++g){let[y,x]=a[g];u+=y.length+x.length+1;let T=x[x.length-1]==="\r";if(T&&(x=x.slice(0,-1)),x&&y.length<c){let _=`Block scalar lines must not be less indented than their ${i.indent?"explicit indentation indicator":"first line"}`;r(u-x.length-(T?2:1),"BAD_INDENT",_),y=""}s===G.BLOCK_LITERAL?(p+=h+y.slice(c)+x,h=`
82
+ `;for(let g=f;g<l;++g){let[y,x]=a[g];u+=y.length+x.length+1;let T=x[x.length-1]==="\r";if(T&&(x=x.slice(0,-1)),x&&y.length<c){let L=`Block scalar lines must not be less indented than their ${i.indent?"explicit indentation indicator":"first line"}`;r(u-x.length-(T?2:1),"BAD_INDENT",L),y=""}s===G.BLOCK_LITERAL?(p+=h+y.slice(c)+x,h=`
83
83
  `):y.length>c||x[0]===" "?(h===" "?h=`
84
84
  `:!m&&h===`
85
85
  `&&(h=`
@@ -92,70 +92,70 @@ ${u}
92
92
  `+a[g][0].slice(c);p[p.length-1]!==`
93
93
  `&&(p+=`
94
94
  `);break;default:p+=`
95
- `}let d=n+i.length+e.source.length;return{value:p,type:s,comment:i.comment,range:[n,d,d]}}o(Ml,"resolveBlockScalar");function uR({offset:t,props:e},r,n){if(e[0].type!=="block-scalar-header")return n(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:i}=e[0],s=i[0],a=0,l="",c=-1;for(let h=1;h<i.length;++h){let m=i[h];if(!l&&(m==="-"||m==="+"))l=m;else{let d=Number(m);!a&&d?a=d:c===-1&&(c=t+h)}}c!==-1&&n(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let u=!1,f="",p=i.length;for(let h=1;h<e.length;++h){let m=e[h];switch(m.type){case"space":u=!0;case"newline":p+=m.source.length;break;case"comment":r&&!u&&n(m,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),p+=m.source.length,f=m.source.substring(1);break;case"error":n(m,"UNEXPECTED_TOKEN",m.message),p+=m.source.length;break;default:{let d=`Unexpected token in block scalar header: ${m.type}`;n(m,"UNEXPECTED_TOKEN",d);let g=m.source;g&&typeof g=="string"&&(p+=g.length)}}}return{mode:s,indent:a,chomp:l,comment:f,length:p}}o(uR,"parseBlockScalarHeader");function fR(t){let e=t.split(/\n( *)/),r=e[0],n=r.match(/^( *)/),s=[n?.[1]?[n[1],r.slice(n[1].length)]:["",r]];for(let a=1;a<e.length;a+=2)s.push([e[a],e[a+1]]);return s}o(fR,"splitLines");function Il(t,e,r){let{offset:n,type:i,source:s,end:a}=t,l,c,u=o((h,m,d)=>r(n+h,m,d),"_onError");switch(i){case"scalar":l=G.PLAIN,c=pR(s,u);break;case"single-quoted-scalar":l=G.QUOTE_SINGLE,c=hR(s,u);break;case"double-quoted-scalar":l=G.QUOTE_DOUBLE,c=mR(s,u);break;default:return r(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[n,n+s.length,n+s.length]}}let f=n+s.length,p=Nr(a,f,e,r);return{value:c,type:l,comment:p.comment,range:[n,f,p.offset]}}o(Il,"resolveFlowScalar");function pR(t,e){let r="";switch(t[0]){case" ":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":{r=`block scalar indicator ${t[0]}`;break}case"@":case"`":{r=`reserved character ${t[0]}`;break}}return r&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),h1(t)}o(pR,"plainValue");function hR(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),h1(t.slice(1,-1)).replace(/''/g,"'")}o(hR,"singleQuotedValue");function h1(t){let e=/(.*?)\r?\n/sy,r=e.exec(t);if(!r)return t;let n,i;try{n=new RegExp("(?<![ ])[ ]+$"),i=new RegExp("^[ ]+|(?<![ ])[ ]+$","g")}catch{n=/[ \t]+$/,i=/^[ \t]+|[ \t]+$/g}let s=r[1].replace(n,""),a=" ",l=e.lastIndex;for(;r=e.exec(t);){let u=r[1].replace(i,"");u===""?a===`
95
+ `}let d=n+i.length+e.source.length;return{value:p,type:s,comment:i.comment,range:[n,d,d]}}o(Pl,"resolveBlockScalar");function CR({offset:t,props:e},r,n){if(e[0].type!=="block-scalar-header")return n(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:i}=e[0],s=i[0],a=0,l="",c=-1;for(let h=1;h<i.length;++h){let m=i[h];if(!l&&(m==="-"||m==="+"))l=m;else{let d=Number(m);!a&&d?a=d:c===-1&&(c=t+h)}}c!==-1&&n(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let u=!1,f="",p=i.length;for(let h=1;h<e.length;++h){let m=e[h];switch(m.type){case"space":u=!0;case"newline":p+=m.source.length;break;case"comment":r&&!u&&n(m,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),p+=m.source.length,f=m.source.substring(1);break;case"error":n(m,"UNEXPECTED_TOKEN",m.message),p+=m.source.length;break;default:{let d=`Unexpected token in block scalar header: ${m.type}`;n(m,"UNEXPECTED_TOKEN",d);let g=m.source;g&&typeof g=="string"&&(p+=g.length)}}}return{mode:s,indent:a,chomp:l,comment:f,length:p}}o(CR,"parseBlockScalarHeader");function OR(t){let e=t.split(/\n( *)/),r=e[0],n=r.match(/^( *)/),s=[n?.[1]?[n[1],r.slice(n[1].length)]:["",r]];for(let a=1;a<e.length;a+=2)s.push([e[a],e[a+1]]);return s}o(OR,"splitLines");function Ll(t,e,r){let{offset:n,type:i,source:s,end:a}=t,l,c,u=o((h,m,d)=>r(n+h,m,d),"_onError");switch(i){case"scalar":l=G.PLAIN,c=MR(s,u);break;case"single-quoted-scalar":l=G.QUOTE_SINGLE,c=IR(s,u);break;case"double-quoted-scalar":l=G.QUOTE_DOUBLE,c=NR(s,u);break;default:return r(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[n,n+s.length,n+s.length]}}let f=n+s.length,p=Nr(a,f,e,r);return{value:c,type:l,comment:p.comment,range:[n,f,p.offset]}}o(Ll,"resolveFlowScalar");function MR(t,e){let r="";switch(t[0]){case" ":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":{r=`block scalar indicator ${t[0]}`;break}case"@":case"`":{r=`reserved character ${t[0]}`;break}}return r&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),v1(t)}o(MR,"plainValue");function IR(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),v1(t.slice(1,-1)).replace(/''/g,"'")}o(IR,"singleQuotedValue");function v1(t){let e=/(.*?)\r?\n/sy,r=e.exec(t);if(!r)return t;let n,i;try{n=new RegExp("(?<![ ])[ ]+$"),i=new RegExp("^[ ]+|(?<![ ])[ ]+$","g")}catch{n=/[ \t]+$/,i=/^[ \t]+|[ \t]+$/g}let s=r[1].replace(n,""),a=" ",l=e.lastIndex;for(;r=e.exec(t);){let u=r[1].replace(i,"");u===""?a===`
96
96
  `?s+=a:a=`
97
- `:(s+=a+u,a=" "),l=e.lastIndex}let c=/[ \t]*(.*)/sy;return c.lastIndex=l,r=c.exec(t),s+a+(r?.[1]??"")}o(h1,"unfoldLines");function mR(t,e){let r="";for(let n=1;n<t.length-1;++n){let i=t[n];if(!(i==="\r"&&t[n+1]===`
97
+ `:(s+=a+u,a=" "),l=e.lastIndex}let c=/[ \t]*(.*)/sy;return c.lastIndex=l,r=c.exec(t),s+a+(r?.[1]??"")}o(v1,"unfoldLines");function NR(t,e){let r="";for(let n=1;n<t.length-1;++n){let i=t[n];if(!(i==="\r"&&t[n+1]===`
98
98
  `))if(i===`
99
- `){let{fold:s,offset:a}=dR(t,n);r+=s,n=a}else if(i==="\\"){let s=t[++n],a=gR[s];if(a)r+=a;else if(s===`
99
+ `){let{fold:s,offset:a}=PR(t,n);r+=s,n=a}else if(i==="\\"){let s=t[++n],a=LR[s];if(a)r+=a;else if(s===`
100
100
  `)for(s=t[n+1];s===" "||s===" ";)s=t[++n+1];else if(s==="\r"&&t[n+1]===`
101
- `)for(s=t[++n+1];s===" "||s===" ";)s=t[++n+1];else if(s==="x"||s==="u"||s==="U"){let l=s==="x"?2:s==="u"?4:8;r+=yR(t,n+1,l,e),n+=l}else{let l=t.substr(n-1,2);e(n-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${l}`),r+=l}}else if(i===" "||i===" "){let s=n,a=t[n+1];for(;a===" "||a===" ";)a=t[++n+1];a!==`
101
+ `)for(s=t[++n+1];s===" "||s===" ";)s=t[++n+1];else if(s==="x"||s==="u"||s==="U"){let l=s==="x"?2:s==="u"?4:8;r+=_R(t,n+1,l,e),n+=l}else{let l=t.substr(n-1,2);e(n-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${l}`),r+=l}}else if(i===" "||i===" "){let s=n,a=t[n+1];for(;a===" "||a===" ";)a=t[++n+1];a!==`
102
102
  `&&!(a==="\r"&&t[n+2]===`
103
- `)&&(r+=n>s?t.slice(s,n+1):i)}else r+=i}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),r}o(mR,"doubleQuotedValue");function dR(t,e){let r="",n=t[e+1];for(;(n===" "||n===" "||n===`
103
+ `)&&(r+=n>s?t.slice(s,n+1):i)}else r+=i}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),r}o(NR,"doubleQuotedValue");function PR(t,e){let r="",n=t[e+1];for(;(n===" "||n===" "||n===`
104
104
  `||n==="\r")&&!(n==="\r"&&t[e+2]!==`
105
105
  `);)n===`
106
106
  `&&(r+=`
107
- `),e+=1,n=t[e+1];return r||(r=" "),{fold:r,offset:e}}o(dR,"foldNewline");var gR={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
108
- `,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function yR(t,e,r,n){let i=t.substr(e,r),a=i.length===r&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;try{return String.fromCodePoint(a)}catch{let l=t.substr(e-2,r+2);return n(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${l}`),l}}o(yR,"parseCharCode");function Wp(t,e,r,n){let{value:i,type:s,comment:a,range:l}=e.type==="block-scalar"?Ml(t,e,n):Il(e,t.options.strict,n),c=r?t.directives.tagName(r.source,p=>n(r,"TAG_RESOLVE_FAILED",p)):null,u;t.options.stringKeys&&t.atKey?u=t.schema[Bt]:c?u=xR(t.schema,i,c,r,n):e.type==="scalar"?u=bR(t,i,e,n):u=t.schema[Bt];let f;try{let p=u.resolve(i,h=>n(r??e,"TAG_RESOLVE_FAILED",h),t.options);f=ae(p)?p:new G(p)}catch(p){let h=p instanceof Error?p.message:String(p);n(r??e,"TAG_RESOLVE_FAILED",h),f=new G(i)}return f.range=l,f.source=i,s&&(f.type=s),c&&(f.tag=c),u.format&&(f.format=u.format),a&&(f.comment=a),f}o(Wp,"composeScalar");function xR(t,e,r,n,i){if(r==="!")return t[Bt];let s=[];for(let l of t.tags)if(!l.collection&&l.tag===r)if(l.default&&l.test)s.push(l);else return l;for(let l of s)if(l.test?.test(e))return l;let a=t.knownTags[r];return a&&!a.collection?(t.tags.push(Object.assign({},a,{default:!1,test:void 0})),a):(i(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,r!=="tag:yaml.org,2002:str"),t[Bt])}o(xR,"findScalarTagByName");function bR({atKey:t,directives:e,schema:r},n,i,s){let a=r.tags.find(l=>(l.default===!0||t&&l.default==="key")&&l.test?.test(n))||r[Bt];if(r.compat){let l=r.compat.find(c=>c.default&&c.test?.test(n))??r[Bt];if(a.tag!==l.tag){let c=e.tagString(a.tag),u=e.tagString(l.tag),f=`Value may be parsed as either ${c} or ${u}`;s(i,"TAG_RESOLVE_FAILED",f,!0)}}return a}o(bR,"findScalarTagByTest");function kg(t,e,r){if(e){r??(r=e.length);for(let n=r-1;n>=0;--n){let i=e[n];switch(i.type){case"space":case"comment":case"newline":t-=i.source.length;continue}for(i=e[++n];i?.type==="space";)t+=i.source.length,i=e[++n];break}}return t}o(kg,"emptyScalarPosition");var wR={composeNode:Hp,composeEmptyNode:Nl};function Hp(t,e,r,n){let i=t.atKey,{spaceBefore:s,comment:a,anchor:l,tag:c}=r,u,f=!0;switch(e.type){case"alias":u=SR(t,e,n),(l||c)&&n(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":u=Wp(t,e,c,n),l&&(u.anchor=l.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{u=vg(wR,t,e,r,n),l&&(u.anchor=l.source.substring(1))}catch(p){let h=p instanceof Error?p.message:String(p);n(e,"RESOURCE_EXHAUSTION",h)}break;default:{let p=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;n(e,"UNEXPECTED_TOKEN",p),f=!1}}return u??(u=Nl(t,e.offset,void 0,null,r,n)),l&&u.anchor===""&&n(l,"BAD_ALIAS","Anchor cannot be an empty string"),i&&t.options.stringKeys&&(!ae(u)||typeof u.value!="string"||u.tag&&u.tag!=="tag:yaml.org,2002:str")&&n(c??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),s&&(u.spaceBefore=!0),a&&(e.type==="scalar"&&e.source===""?u.comment=a:u.commentBefore=a),t.options.keepSourceTokens&&f&&(u.srcToken=e),u}o(Hp,"composeNode");function Nl(t,e,r,n,{spaceBefore:i,comment:s,anchor:a,tag:l,end:c},u){let f={type:"scalar",offset:kg(e,r,n),indent:-1,source:""},p=Wp(t,f,l,u);return a&&(p.anchor=a.source.substring(1),p.anchor===""&&u(a,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(p.spaceBefore=!0),s&&(p.comment=s,p.range[2]=c),p}o(Nl,"composeEmptyNode");function SR({options:t},{offset:e,source:r,end:n},i){let s=new pr(r.substring(1));s.source===""&&i(e,"BAD_ALIAS","Alias cannot be an empty string"),s.source.endsWith(":")&&i(e+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let a=e+r.length,l=Nr(n,a,t.strict,i);return s.range=[e,a,l.offset],l.comment&&(s.comment=l.comment),s}o(SR,"composeAlias");function Tg(t,e,{offset:r,start:n,value:i,end:s},a){let l=Object.assign({_directives:e},t),c=new gr(void 0,l),u={atKey:!1,atRoot:!0,directives:c.directives,options:c.options,schema:c.schema},f=Ir(n,{indicator:"doc-start",next:i??s?.[0],offset:r,onError:a,parentIndent:0,startOnNewline:!0});f.found&&(c.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!f.hasNewline&&a(f.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),c.contents=i?Hp(u,i,f,a):Nl(u,f.end,n,null,f,a);let p=c.contents.range[2],h=Nr(s,p,!1,a);return h.comment&&(c.comment=h.comment),c.range=[r,p,h.offset],c}o(Tg,"composeDoc");function Pl(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];let{offset:e,source:r}=t;return[e,e+(typeof r=="string"?r.length:1)]}o(Pl,"getErrorPos");function m1(t){let e="",r=!1,n=!1;for(let i=0;i<t.length;++i){let s=t[i];switch(s[0]){case"#":e+=(e===""?"":n?`
107
+ `),e+=1,n=t[e+1];return r||(r=" "),{fold:r,offset:e}}o(PR,"foldNewline");var LR={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
108
+ `,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function _R(t,e,r,n){let i=t.substr(e,r),a=i.length===r&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;try{return String.fromCodePoint(a)}catch{let l=t.substr(e-2,r+2);return n(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${l}`),l}}o(_R,"parseCharCode");function Vp(t,e,r,n){let{value:i,type:s,comment:a,range:l}=e.type==="block-scalar"?Pl(t,e,n):Ll(e,t.options.strict,n),c=r?t.directives.tagName(r.source,p=>n(r,"TAG_RESOLVE_FAILED",p)):null,u;t.options.stringKeys&&t.atKey?u=t.schema[Bt]:c?u=RR(t.schema,i,c,r,n):e.type==="scalar"?u=AR(t,i,e,n):u=t.schema[Bt];let f;try{let p=u.resolve(i,h=>n(r??e,"TAG_RESOLVE_FAILED",h),t.options);f=ae(p)?p:new G(p)}catch(p){let h=p instanceof Error?p.message:String(p);n(r??e,"TAG_RESOLVE_FAILED",h),f=new G(i)}return f.range=l,f.source=i,s&&(f.type=s),c&&(f.tag=c),u.format&&(f.format=u.format),a&&(f.comment=a),f}o(Vp,"composeScalar");function RR(t,e,r,n,i){if(r==="!")return t[Bt];let s=[];for(let l of t.tags)if(!l.collection&&l.tag===r)if(l.default&&l.test)s.push(l);else return l;for(let l of s)if(l.test?.test(e))return l;let a=t.knownTags[r];return a&&!a.collection?(t.tags.push(Object.assign({},a,{default:!1,test:void 0})),a):(i(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,r!=="tag:yaml.org,2002:str"),t[Bt])}o(RR,"findScalarTagByName");function AR({atKey:t,directives:e,schema:r},n,i,s){let a=r.tags.find(l=>(l.default===!0||t&&l.default==="key")&&l.test?.test(n))||r[Bt];if(r.compat){let l=r.compat.find(c=>c.default&&c.test?.test(n))??r[Bt];if(a.tag!==l.tag){let c=e.tagString(a.tag),u=e.tagString(l.tag),f=`Value may be parsed as either ${c} or ${u}`;s(i,"TAG_RESOLVE_FAILED",f,!0)}}return a}o(AR,"findScalarTagByTest");function Og(t,e,r){if(e){r??(r=e.length);for(let n=r-1;n>=0;--n){let i=e[n];switch(i.type){case"space":case"comment":case"newline":t-=i.source.length;continue}for(i=e[++n];i?.type==="space";)t+=i.source.length,i=e[++n];break}}return t}o(Og,"emptyScalarPosition");var FR={composeNode:Kp,composeEmptyNode:_l};function Kp(t,e,r,n){let i=t.atKey,{spaceBefore:s,comment:a,anchor:l,tag:c}=r,u,f=!0;switch(e.type){case"alias":u=$R(t,e,n),(l||c)&&n(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":u=Vp(t,e,c,n),l&&(u.anchor=l.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{u=Cg(FR,t,e,r,n),l&&(u.anchor=l.source.substring(1))}catch(p){let h=p instanceof Error?p.message:String(p);n(e,"RESOURCE_EXHAUSTION",h)}break;default:{let p=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;n(e,"UNEXPECTED_TOKEN",p),f=!1}}return u??(u=_l(t,e.offset,void 0,null,r,n)),l&&u.anchor===""&&n(l,"BAD_ALIAS","Anchor cannot be an empty string"),i&&t.options.stringKeys&&(!ae(u)||typeof u.value!="string"||u.tag&&u.tag!=="tag:yaml.org,2002:str")&&n(c??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),s&&(u.spaceBefore=!0),a&&(e.type==="scalar"&&e.source===""?u.comment=a:u.commentBefore=a),t.options.keepSourceTokens&&f&&(u.srcToken=e),u}o(Kp,"composeNode");function _l(t,e,r,n,{spaceBefore:i,comment:s,anchor:a,tag:l,end:c},u){let f={type:"scalar",offset:Og(e,r,n),indent:-1,source:""},p=Vp(t,f,l,u);return a&&(p.anchor=a.source.substring(1),p.anchor===""&&u(a,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(p.spaceBefore=!0),s&&(p.comment=s,p.range[2]=c),p}o(_l,"composeEmptyNode");function $R({options:t},{offset:e,source:r,end:n},i){let s=new pr(r.substring(1));s.source===""&&i(e,"BAD_ALIAS","Alias cannot be an empty string"),s.source.endsWith(":")&&i(e+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let a=e+r.length,l=Nr(n,a,t.strict,i);return s.range=[e,a,l.offset],l.comment&&(s.comment=l.comment),s}o($R,"composeAlias");function Mg(t,e,{offset:r,start:n,value:i,end:s},a){let l=Object.assign({_directives:e},t),c=new gr(void 0,l),u={atKey:!1,atRoot:!0,directives:c.directives,options:c.options,schema:c.schema},f=Ir(n,{indicator:"doc-start",next:i??s?.[0],offset:r,onError:a,parentIndent:0,startOnNewline:!0});f.found&&(c.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!f.hasNewline&&a(f.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),c.contents=i?Kp(u,i,f,a):_l(u,f.end,n,null,f,a);let p=c.contents.range[2],h=Nr(s,p,!1,a);return h.comment&&(c.comment=h.comment),c.range=[r,p,h.offset],c}o(Mg,"composeDoc");function Rl(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];let{offset:e,source:r}=t;return[e,e+(typeof r=="string"?r.length:1)]}o(Rl,"getErrorPos");function S1(t){let e="",r=!1,n=!1;for(let i=0;i<t.length;++i){let s=t[i];switch(s[0]){case"#":e+=(e===""?"":n?`
109
109
 
110
110
  `:`
111
- `)+(s.substring(1)||" "),r=!0,n=!1;break;case"%":t[i+1]?.[0]!=="#"&&(i+=1),r=!1;break;default:r||(n=!0),r=!1}}return{comment:e,afterEmptyLine:n}}o(m1,"parsePrelude");var Dn=class{static{o(this,"Composer")}constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(r,n,i,s)=>{let a=Pl(r);s?this.warnings.push(new ai(a,n,i)):this.errors.push(new It(a,n,i))},this.directives=new Or({version:e.version||"1.2"}),this.options=e}decorate(e,r){let{comment:n,afterEmptyLine:i}=m1(this.prelude);if(n){let s=e.contents;if(r)e.comment=e.comment?`${e.comment}
112
- ${n}`:n;else if(i||e.directives.docStart||!s)e.commentBefore=n;else if(ke(s)&&!s.flow&&s.items.length>0){let a=s.items[0];me(a)&&(a=a.key);let l=a.commentBefore;a.commentBefore=l?`${n}
111
+ `)+(s.substring(1)||" "),r=!0,n=!1;break;case"%":t[i+1]?.[0]!=="#"&&(i+=1),r=!1;break;default:r||(n=!0),r=!1}}return{comment:e,afterEmptyLine:n}}o(S1,"parsePrelude");var Cn=class{static{o(this,"Composer")}constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(r,n,i,s)=>{let a=Rl(r);s?this.warnings.push(new si(a,n,i)):this.errors.push(new It(a,n,i))},this.directives=new Or({version:e.version||"1.2"}),this.options=e}decorate(e,r){let{comment:n,afterEmptyLine:i}=S1(this.prelude);if(n){let s=e.contents;if(r)e.comment=e.comment?`${e.comment}
112
+ ${n}`:n;else if(i||e.directives.docStart||!s)e.commentBefore=n;else if(Se(s)&&!s.flow&&s.items.length>0){let a=s.items[0];me(a)&&(a=a.key);let l=a.commentBefore;a.commentBefore=l?`${n}
113
113
  ${l}`:n}else{let a=s.commentBefore;s.commentBefore=a?`${n}
114
- ${a}`:n}}if(r){for(let s=0;s<this.errors.length;++s)e.errors.push(this.errors[s]);for(let s=0;s<this.warnings.length;++s)e.warnings.push(this.warnings[s])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:m1(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,r=!1,n=-1){for(let i of e)yield*this.next(i);yield*this.end(r,n)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(r,n,i)=>{let s=Pl(e);s[0]+=r,this.onError(s,"BAD_DIRECTIVE",n,i)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let r=Tg(this.options,this.directives,e,this.onError);this.atDirectives&&!r.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(r,!1),this.doc&&(yield this.doc),this.doc=r,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let r=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new It(Pl(e),"UNEXPECTED_TOKEN",r);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){let n="Unexpected doc-end without preceding document";this.errors.push(new It(Pl(e),"UNEXPECTED_TOKEN",n));break}this.doc.directives.docEnd=!0;let r=Nr(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),r.comment){let n=this.doc.comment;this.doc.comment=n?`${n}
115
- ${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.push(new It(Pl(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,r=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let n=Object.assign({_directives:this.directives},this.options),i=new gr(void 0,n);this.atDirectives&&this.onError(r,"MISSING_CHAR","Missing directives-end indicator line"),i.range=[0,r,r],this.decorate(i,!1),yield i}}};var _l={};se(_l,{BOM:()=>Us,DOCUMENT:()=>qs,FLOW_END:()=>Ys,SCALAR:()=>oo,createScalarToken:()=>Cg,isCollection:()=>x1,isScalar:()=>b1,prettyToken:()=>w1,resolveAsScalar:()=>Dg,setScalarValue:()=>Og,stringify:()=>Mg,tokenType:()=>Yp,visit:()=>Cn});function Dg(t,e=!0,r){if(t){let n=o((i,s,a)=>{let l=typeof i=="number"?i:Array.isArray(i)?i[0]:i.offset;if(r)r(l,s,a);else throw new It([l,l+1],s,a)},"_onError");switch(t.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return Il(t,e,n);case"block-scalar":return Ml({options:{strict:e}},t,n)}}return null}o(Dg,"resolveAsScalar");function Cg(t,e){let{implicitKey:r=!1,indent:n,inFlow:i=!1,offset:s=-1,type:a="PLAIN"}=e,l=ln({type:a,value:t},{implicitKey:r,indent:n>0?" ".repeat(n):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),c=e.end??[{type:"newline",offset:-1,indent:n,source:`
114
+ ${a}`:n}}if(r){for(let s=0;s<this.errors.length;++s)e.errors.push(this.errors[s]);for(let s=0;s<this.warnings.length;++s)e.warnings.push(this.warnings[s])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:S1(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,r=!1,n=-1){for(let i of e)yield*this.next(i);yield*this.end(r,n)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(r,n,i)=>{let s=Rl(e);s[0]+=r,this.onError(s,"BAD_DIRECTIVE",n,i)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let r=Mg(this.options,this.directives,e,this.onError);this.atDirectives&&!r.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(r,!1),this.doc&&(yield this.doc),this.doc=r,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let r=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new It(Rl(e),"UNEXPECTED_TOKEN",r);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){let n="Unexpected doc-end without preceding document";this.errors.push(new It(Rl(e),"UNEXPECTED_TOKEN",n));break}this.doc.directives.docEnd=!0;let r=Nr(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),r.comment){let n=this.doc.comment;this.doc.comment=n?`${n}
115
+ ${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.push(new It(Rl(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,r=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let n=Object.assign({_directives:this.directives},this.options),i=new gr(void 0,n);this.atDirectives&&this.onError(r,"MISSING_CHAR","Missing directives-end indicator line"),i.range=[0,r,r],this.decorate(i,!1),yield i}}};var Al={};se(Al,{BOM:()=>qs,DOCUMENT:()=>Ys,FLOW_END:()=>Vs,SCALAR:()=>io,createScalarToken:()=>Pg,isCollection:()=>D1,isScalar:()=>C1,prettyToken:()=>O1,resolveAsScalar:()=>Ng,setScalarValue:()=>Lg,stringify:()=>_g,tokenType:()=>Qp,visit:()=>On});function Ng(t,e=!0,r){if(t){let n=o((i,s,a)=>{let l=typeof i=="number"?i:Array.isArray(i)?i[0]:i.offset;if(r)r(l,s,a);else throw new It([l,l+1],s,a)},"_onError");switch(t.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return Ll(t,e,n);case"block-scalar":return Pl({options:{strict:e}},t,n)}}return null}o(Ng,"resolveAsScalar");function Pg(t,e){let{implicitKey:r=!1,indent:n,inFlow:i=!1,offset:s=-1,type:a="PLAIN"}=e,l=cn({type:a,value:t},{implicitKey:r,indent:n>0?" ".repeat(n):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),c=e.end??[{type:"newline",offset:-1,indent:n,source:`
116
116
  `}];switch(l[0]){case"|":case">":{let u=l.indexOf(`
117
117
  `),f=l.substring(0,u),p=l.substring(u+1)+`
118
- `,h=[{type:"block-scalar-header",offset:s,indent:n,source:f}];return d1(h,c)||h.push({type:"newline",offset:-1,indent:n,source:`
119
- `}),{type:"block-scalar",offset:s,indent:n,props:h,source:p}}case'"':return{type:"double-quoted-scalar",offset:s,indent:n,source:l,end:c};case"'":return{type:"single-quoted-scalar",offset:s,indent:n,source:l,end:c};default:return{type:"scalar",offset:s,indent:n,source:l,end:c}}}o(Cg,"createScalarToken");function Og(t,e,r={}){let{afterKey:n=!1,implicitKey:i=!1,inFlow:s=!1,type:a}=r,l="indent"in t?t.indent:null;if(n&&typeof l=="number"&&(l+=2),!a)switch(t.type){case"single-quoted-scalar":a="QUOTE_SINGLE";break;case"double-quoted-scalar":a="QUOTE_DOUBLE";break;case"block-scalar":{let u=t.props[0];if(u.type!=="block-scalar-header")throw new Error("Invalid block scalar header");a=u.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:a="PLAIN"}let c=ln({type:a,value:e},{implicitKey:i||l===null,indent:l!==null&&l>0?" ".repeat(l):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}});switch(c[0]){case"|":case">":vR(t,c);break;case'"':Eg(t,c,"double-quoted-scalar");break;case"'":Eg(t,c,"single-quoted-scalar");break;default:Eg(t,c,"scalar")}}o(Og,"setScalarValue");function vR(t,e){let r=e.indexOf(`
118
+ `,h=[{type:"block-scalar-header",offset:s,indent:n,source:f}];return k1(h,c)||h.push({type:"newline",offset:-1,indent:n,source:`
119
+ `}),{type:"block-scalar",offset:s,indent:n,props:h,source:p}}case'"':return{type:"double-quoted-scalar",offset:s,indent:n,source:l,end:c};case"'":return{type:"single-quoted-scalar",offset:s,indent:n,source:l,end:c};default:return{type:"scalar",offset:s,indent:n,source:l,end:c}}}o(Pg,"createScalarToken");function Lg(t,e,r={}){let{afterKey:n=!1,implicitKey:i=!1,inFlow:s=!1,type:a}=r,l="indent"in t?t.indent:null;if(n&&typeof l=="number"&&(l+=2),!a)switch(t.type){case"single-quoted-scalar":a="QUOTE_SINGLE";break;case"double-quoted-scalar":a="QUOTE_DOUBLE";break;case"block-scalar":{let u=t.props[0];if(u.type!=="block-scalar-header")throw new Error("Invalid block scalar header");a=u.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:a="PLAIN"}let c=cn({type:a,value:e},{implicitKey:i||l===null,indent:l!==null&&l>0?" ".repeat(l):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}});switch(c[0]){case"|":case">":BR(t,c);break;case'"':Ig(t,c,"double-quoted-scalar");break;case"'":Ig(t,c,"single-quoted-scalar");break;default:Ig(t,c,"scalar")}}o(Lg,"setScalarValue");function BR(t,e){let r=e.indexOf(`
120
120
  `),n=e.substring(0,r),i=e.substring(r+1)+`
121
- `;if(t.type==="block-scalar"){let s=t.props[0];if(s.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s.source=n,t.source=i}else{let{offset:s}=t,a="indent"in t?t.indent:-1,l=[{type:"block-scalar-header",offset:s,indent:a,source:n}];d1(l,"end"in t?t.end:void 0)||l.push({type:"newline",offset:-1,indent:a,source:`
122
- `});for(let c of Object.keys(t))c!=="type"&&c!=="offset"&&delete t[c];Object.assign(t,{type:"block-scalar",indent:a,props:l,source:i})}}o(vR,"setBlockScalarValue");function d1(t,e){if(e)for(let r of e)switch(r.type){case"space":case"comment":t.push(r);break;case"newline":return t.push(r),!0}return!1}o(d1,"addEndtoBlockProps");function Eg(t,e,r){switch(t.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":t.type=r,t.source=e;break;case"block-scalar":{let n=t.props.slice(1),i=e.length;t.props[0].type==="block-scalar-header"&&(i-=t.props[0].source.length);for(let s of n)s.offset+=i;delete t.props,Object.assign(t,{type:r,source:e,end:n});break}case"block-map":case"block-seq":{let i={type:"newline",offset:t.offset+e.length,indent:t.indent,source:`
123
- `};delete t.items,Object.assign(t,{type:r,source:e,end:[i]});break}default:{let n="indent"in t?t.indent:-1,i="end"in t&&Array.isArray(t.end)?t.end.filter(s=>s.type==="space"||s.type==="comment"||s.type==="newline"):[];for(let s of Object.keys(t))s!=="type"&&s!=="offset"&&delete t[s];Object.assign(t,{type:r,indent:n,source:e,end:i})}}}o(Eg,"setFlowScalarValue");var Mg=o(t=>"type"in t?Up(t):qp(t),"stringify");function Up(t){switch(t.type){case"block-scalar":{let e="";for(let r of t.props)e+=Up(r);return e+t.source}case"block-map":case"block-seq":{let e="";for(let r of t.items)e+=qp(r);return e}case"flow-collection":{let e=t.start.source;for(let r of t.items)e+=qp(r);for(let r of t.end)e+=r.source;return e}case"document":{let e=qp(t);if(t.end)for(let r of t.end)e+=r.source;return e}default:{let e=t.source;if("end"in t&&t.end)for(let r of t.end)e+=r.source;return e}}}o(Up,"stringifyToken");function qp({start:t,key:e,sep:r,value:n}){let i="";for(let s of t)i+=s.source;if(e&&(i+=Up(e)),r)for(let s of r)i+=s.source;return n&&(i+=Up(n)),i}o(qp,"stringifyItem");var Ig=Symbol("break visit"),kR=Symbol("skip children"),g1=Symbol("remove item");function Cn(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),y1(Object.freeze([]),t,e)}o(Cn,"visit"),Cn.BREAK=Ig,Cn.SKIP=kR,Cn.REMOVE=g1,Cn.itemAtPath=(t,e)=>{let r=t;for(let[n,i]of e){let s=r?.[n];if(s&&"items"in s)r=s.items[i];else return}return r},Cn.parentCollection=(t,e)=>{let r=Cn.itemAtPath(t,e.slice(0,-1)),n=e[e.length-1][0],i=r?.[n];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function y1(t,e,r){let n=r(e,t);if(typeof n=="symbol")return n;for(let i of["key","value"]){let s=e[i];if(s&&"items"in s){for(let a=0;a<s.items.length;++a){let l=y1(Object.freeze(t.concat([[i,a]])),s.items[a],r);if(typeof l=="number")a=l-1;else{if(l===Ig)return Ig;l===g1&&(s.items.splice(a,1),a-=1)}}typeof n=="function"&&i==="key"&&(n=n(e,t))}}return typeof n=="function"?n(e,t):n}o(y1,"_visit");var Us="\uFEFF",qs="",Ys="",oo="",x1=o(t=>!!t&&"items"in t,"isCollection"),b1=o(t=>!!t&&(t.type==="scalar"||t.type==="single-quoted-scalar"||t.type==="double-quoted-scalar"||t.type==="block-scalar"),"isScalar");function w1(t){switch(t){case Us:return"<BOM>";case qs:return"<DOC>";case Ys:return"<FLOW_END>";case oo:return"<SCALAR>";default:return JSON.stringify(t)}}o(w1,"prettyToken");function Yp(t){switch(t){case Us:return"byte-order-mark";case qs:return"doc-mode";case Ys:return"flow-error-end";case oo:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
121
+ `;if(t.type==="block-scalar"){let s=t.props[0];if(s.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s.source=n,t.source=i}else{let{offset:s}=t,a="indent"in t?t.indent:-1,l=[{type:"block-scalar-header",offset:s,indent:a,source:n}];k1(l,"end"in t?t.end:void 0)||l.push({type:"newline",offset:-1,indent:a,source:`
122
+ `});for(let c of Object.keys(t))c!=="type"&&c!=="offset"&&delete t[c];Object.assign(t,{type:"block-scalar",indent:a,props:l,source:i})}}o(BR,"setBlockScalarValue");function k1(t,e){if(e)for(let r of e)switch(r.type){case"space":case"comment":t.push(r);break;case"newline":return t.push(r),!0}return!1}o(k1,"addEndtoBlockProps");function Ig(t,e,r){switch(t.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":t.type=r,t.source=e;break;case"block-scalar":{let n=t.props.slice(1),i=e.length;t.props[0].type==="block-scalar-header"&&(i-=t.props[0].source.length);for(let s of n)s.offset+=i;delete t.props,Object.assign(t,{type:r,source:e,end:n});break}case"block-map":case"block-seq":{let i={type:"newline",offset:t.offset+e.length,indent:t.indent,source:`
123
+ `};delete t.items,Object.assign(t,{type:r,source:e,end:[i]});break}default:{let n="indent"in t?t.indent:-1,i="end"in t&&Array.isArray(t.end)?t.end.filter(s=>s.type==="space"||s.type==="comment"||s.type==="newline"):[];for(let s of Object.keys(t))s!=="type"&&s!=="offset"&&delete t[s];Object.assign(t,{type:r,indent:n,source:e,end:i})}}}o(Ig,"setFlowScalarValue");var _g=o(t=>"type"in t?Gp(t):Jp(t),"stringify");function Gp(t){switch(t.type){case"block-scalar":{let e="";for(let r of t.props)e+=Gp(r);return e+t.source}case"block-map":case"block-seq":{let e="";for(let r of t.items)e+=Jp(r);return e}case"flow-collection":{let e=t.start.source;for(let r of t.items)e+=Jp(r);for(let r of t.end)e+=r.source;return e}case"document":{let e=Jp(t);if(t.end)for(let r of t.end)e+=r.source;return e}default:{let e=t.source;if("end"in t&&t.end)for(let r of t.end)e+=r.source;return e}}}o(Gp,"stringifyToken");function Jp({start:t,key:e,sep:r,value:n}){let i="";for(let s of t)i+=s.source;if(e&&(i+=Gp(e)),r)for(let s of r)i+=s.source;return n&&(i+=Gp(n)),i}o(Jp,"stringifyItem");var Rg=Symbol("break visit"),jR=Symbol("skip children"),T1=Symbol("remove item");function On(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),E1(Object.freeze([]),t,e)}o(On,"visit"),On.BREAK=Rg,On.SKIP=jR,On.REMOVE=T1,On.itemAtPath=(t,e)=>{let r=t;for(let[n,i]of e){let s=r?.[n];if(s&&"items"in s)r=s.items[i];else return}return r},On.parentCollection=(t,e)=>{let r=On.itemAtPath(t,e.slice(0,-1)),n=e[e.length-1][0],i=r?.[n];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function E1(t,e,r){let n=r(e,t);if(typeof n=="symbol")return n;for(let i of["key","value"]){let s=e[i];if(s&&"items"in s){for(let a=0;a<s.items.length;++a){let l=E1(Object.freeze(t.concat([[i,a]])),s.items[a],r);if(typeof l=="number")a=l-1;else{if(l===Rg)return Rg;l===T1&&(s.items.splice(a,1),a-=1)}}typeof n=="function"&&i==="key"&&(n=n(e,t))}}return typeof n=="function"?n(e,t):n}o(E1,"_visit");var qs="\uFEFF",Ys="",Vs="",io="",D1=o(t=>!!t&&"items"in t,"isCollection"),C1=o(t=>!!t&&(t.type==="scalar"||t.type==="single-quoted-scalar"||t.type==="double-quoted-scalar"||t.type==="block-scalar"),"isScalar");function O1(t){switch(t){case qs:return"<BOM>";case Ys:return"<DOC>";case Vs:return"<FLOW_END>";case io:return"<SCALAR>";default:return JSON.stringify(t)}}o(O1,"prettyToken");function Qp(t){switch(t){case qs:return"byte-order-mark";case Ys:return"doc-mode";case Vs:return"flow-error-end";case io:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
124
124
  `:case`\r
125
- `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(t[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}o(Yp,"tokenType");function Pr(t){switch(t){case void 0:case" ":case`
126
- `:case"\r":case" ":return!0;default:return!1}}o(Pr,"isEmpty");var S1=new Set("0123456789ABCDEFabcdef"),TR=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Vp=new Set(",[]{}"),ER=new Set(` ,[]{}
127
- \r `),Ng=o(t=>!t||ER.has(t),"isNotAnchorChar"),li=class{static{o(this,"Lexer")}constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,r=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!r;let n=this.next??"stream";for(;n&&(r||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,r=this.buffer[e];for(;r===" "||r===" ";)r=this.buffer[++e];return!r||r==="#"||r===`
125
+ `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(t[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}o(Qp,"tokenType");function Pr(t){switch(t){case void 0:case" ":case`
126
+ `:case"\r":case" ":return!0;default:return!1}}o(Pr,"isEmpty");var M1=new Set("0123456789ABCDEFabcdef"),zR=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Xp=new Set(",[]{}"),WR=new Set(` ,[]{}
127
+ \r `),Ag=o(t=>!t||WR.has(t),"isNotAnchorChar"),ai=class{static{o(this,"Lexer")}constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,r=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!r;let n=this.next??"stream";for(;n&&(r||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,r=this.buffer[e];for(;r===" "||r===" ";)r=this.buffer[++e];return!r||r==="#"||r===`
128
128
  `?!0:r==="\r"?this.buffer[e+1]===`
129
129
  `:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let r=this.buffer[e];if(this.indentNext>0){let n=0;for(;r===" ";)r=this.buffer[++n+e];if(r==="\r"){let i=this.buffer[n+e+1];if(i===`
130
130
  `||!i&&!this.atEnd)return e+n+1}return r===`
131
131
  `||n>=this.indentNext||!r&&!this.atEnd?e+n:-1}if(r==="-"||r==="."){let n=this.buffer.substr(e,3);if((n==="---"||n==="...")&&Pr(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
132
- `,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===Us&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let r=e.length,n=e.indexOf("#");for(;n!==-1;){let s=e[n-1];if(s===" "||s===" "){r=n-1;break}else n=e.indexOf("#",n+1)}for(;;){let s=e[r-1];if(s===" "||s===" ")r-=1;else break}let i=(yield*this.pushCount(r))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-i),this.pushNewline(),"stream"}if(this.atLineEnd()){let r=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-r),yield*this.pushNewline(),"stream"}return yield qs,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let r=this.peek(3);if((r==="---"||r==="...")&&Pr(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,r==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Pr(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,r]=this.peek(2);if(!r&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&Pr(r)){let n=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=n,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let r=yield*this.pushIndicators();switch(e[r]){case"#":yield*this.pushCount(e.length-r);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(Ng),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return r+=yield*this.parseBlockScalarHeader(),r+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-r),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,r,n=-1;do e=yield*this.pushNewline(),e>0?(r=yield*this.pushSpaces(!1),this.indentValue=n=r):r=0,r+=yield*this.pushSpaces(!0);while(e+r>0);let i=this.getLine();if(i===null)return this.setNext("flow");if((n!==-1&&n<this.indentNext&&i[0]!=="#"||n===0&&(i.startsWith("---")||i.startsWith("..."))&&Pr(i[3]))&&!(n===this.indentNext-1&&this.flowLevel===1&&(i[0]==="]"||i[0]==="}")))return this.flowLevel=0,yield Ys,yield*this.parseLineStart();let s=0;for(;i[s]===",";)s+=yield*this.pushCount(1),s+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(s+=yield*this.pushIndicators(),i[s]){case void 0:return"flow";case"#":return yield*this.pushCount(i.length-s),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(Ng),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let a=this.charAt(1);if(this.flowKey||Pr(a)||a===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),r=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;r!==-1&&this.buffer[r+1]==="'";)r=this.buffer.indexOf("'",r+2);else for(;r!==-1;){let s=0;for(;this.buffer[r-1-s]==="\\";)s+=1;if(s%2===0)break;r=this.buffer.indexOf('"',r+1)}let n=this.buffer.substring(0,r),i=n.indexOf(`
132
+ `,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===qs&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let r=e.length,n=e.indexOf("#");for(;n!==-1;){let s=e[n-1];if(s===" "||s===" "){r=n-1;break}else n=e.indexOf("#",n+1)}for(;;){let s=e[r-1];if(s===" "||s===" ")r-=1;else break}let i=(yield*this.pushCount(r))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-i),this.pushNewline(),"stream"}if(this.atLineEnd()){let r=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-r),yield*this.pushNewline(),"stream"}return yield Ys,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let r=this.peek(3);if((r==="---"||r==="...")&&Pr(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,r==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Pr(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,r]=this.peek(2);if(!r&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&Pr(r)){let n=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=n,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let r=yield*this.pushIndicators();switch(e[r]){case"#":yield*this.pushCount(e.length-r);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(Ag),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return r+=yield*this.parseBlockScalarHeader(),r+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-r),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,r,n=-1;do e=yield*this.pushNewline(),e>0?(r=yield*this.pushSpaces(!1),this.indentValue=n=r):r=0,r+=yield*this.pushSpaces(!0);while(e+r>0);let i=this.getLine();if(i===null)return this.setNext("flow");if((n!==-1&&n<this.indentNext&&i[0]!=="#"||n===0&&(i.startsWith("---")||i.startsWith("..."))&&Pr(i[3]))&&!(n===this.indentNext-1&&this.flowLevel===1&&(i[0]==="]"||i[0]==="}")))return this.flowLevel=0,yield Vs,yield*this.parseLineStart();let s=0;for(;i[s]===",";)s+=yield*this.pushCount(1),s+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(s+=yield*this.pushIndicators(),i[s]){case void 0:return"flow";case"#":return yield*this.pushCount(i.length-s),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(Ag),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let a=this.charAt(1);if(this.flowKey||Pr(a)||a===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),r=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;r!==-1&&this.buffer[r+1]==="'";)r=this.buffer.indexOf("'",r+2);else for(;r!==-1;){let s=0;for(;this.buffer[r-1-s]==="\\";)s+=1;if(s%2===0)break;r=this.buffer.indexOf('"',r+1)}let n=this.buffer.substring(0,r),i=n.indexOf(`
133
133
  `,this.pos);if(i!==-1){for(;i!==-1;){let s=this.continueScalar(i+1);if(s===-1)break;i=n.indexOf(`
134
134
  `,s)}i!==-1&&(r=i-(n[i-1]==="\r"?2:1))}if(r===-1){if(!this.atEnd)return this.setNext("quoted-scalar");r=this.buffer.length}return yield*this.pushToIndex(r+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let r=this.buffer[++e];if(r==="+")this.blockScalarKeep=!0;else if(r>"0"&&r<="9")this.blockScalarIndent=Number(r)-1;else if(r!=="-")break}return yield*this.pushUntil(r=>Pr(r)||r==="#")}*parseBlockScalar(){let e=this.pos-1,r=0,n;e:for(let s=this.pos;n=this.buffer[s];++s)switch(n){case" ":r+=1;break;case`
135
135
  `:e=s,r=0;break;case"\r":{let a=this.buffer[s+1];if(!a&&!this.atEnd)return this.setNext("block-scalar");if(a===`
136
136
  `)break}default:break e}if(!n&&!this.atEnd)return this.setNext("block-scalar");if(r>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=r:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let s=this.continueScalar(e+1);if(s===-1)break;e=this.buffer.indexOf(`
137
137
  `,s)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let i=e+1;for(n=this.buffer[i];n===" ";)n=this.buffer[++i];if(n===" "){for(;n===" "||n===" "||n==="\r"||n===`
138
138
  `;)n=this.buffer[++i];e=i-1}else if(!this.blockScalarKeep)do{let s=e-1,a=this.buffer[s];a==="\r"&&(a=this.buffer[--s]);let l=s;for(;a===" ";)a=this.buffer[--s];if(a===`
139
- `&&s>=this.pos&&s+1+r>l)e=s;else break}while(!0);return yield oo,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,r=this.pos-1,n=this.pos-1,i;for(;i=this.buffer[++n];)if(i===":"){let s=this.buffer[n+1];if(Pr(s)||e&&Vp.has(s))break;r=n}else if(Pr(i)){let s=this.buffer[n+1];if(i==="\r"&&(s===`
139
+ `&&s>=this.pos&&s+1+r>l)e=s;else break}while(!0);return yield io,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,r=this.pos-1,n=this.pos-1,i;for(;i=this.buffer[++n];)if(i===":"){let s=this.buffer[n+1];if(Pr(s)||e&&Xp.has(s))break;r=n}else if(Pr(i)){let s=this.buffer[n+1];if(i==="\r"&&(s===`
140
140
  `?(n+=1,i=`
141
- `,s=this.buffer[n+1]):r=n),s==="#"||e&&Vp.has(s))break;if(i===`
142
- `){let a=this.continueScalar(n+1);if(a===-1)break;n=Math.max(n,a-2)}}else{if(e&&Vp.has(i))break;r=n}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield oo,yield*this.pushToIndex(r+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,r){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(r&&(yield""),0)}*pushIndicators(){let e=0;e:for(;;){switch(this.charAt(0)){case"!":e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue e;case"&":e+=yield*this.pushUntil(Ng),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let r=this.flowLevel>0,n=this.charAt(1);if(Pr(n)||r&&Vp.has(n)){r?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue e}}}break e}return e}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,r=this.buffer[e];for(;!Pr(r)&&r!==">";)r=this.buffer[++e];return yield*this.pushToIndex(r===">"?e+1:e,!1)}else{let e=this.pos+1,r=this.buffer[e];for(;r;)if(TR.has(r))r=this.buffer[++e];else if(r==="%"&&S1.has(this.buffer[e+1])&&S1.has(this.buffer[e+2]))r=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
141
+ `,s=this.buffer[n+1]):r=n),s==="#"||e&&Xp.has(s))break;if(i===`
142
+ `){let a=this.continueScalar(n+1);if(a===-1)break;n=Math.max(n,a-2)}}else{if(e&&Xp.has(i))break;r=n}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield io,yield*this.pushToIndex(r+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,r){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(r&&(yield""),0)}*pushIndicators(){let e=0;e:for(;;){switch(this.charAt(0)){case"!":e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue e;case"&":e+=yield*this.pushUntil(Ag),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let r=this.flowLevel>0,n=this.charAt(1);if(Pr(n)||r&&Xp.has(n)){r?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue e}}}break e}return e}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,r=this.buffer[e];for(;!Pr(r)&&r!==">";)r=this.buffer[++e];return yield*this.pushToIndex(r===">"?e+1:e,!1)}else{let e=this.pos+1,r=this.buffer[e];for(;r;)if(zR.has(r))r=this.buffer[++e];else if(r==="%"&&M1.has(this.buffer[e+1])&&M1.has(this.buffer[e+2]))r=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
143
143
  `?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
144
- `?yield*this.pushCount(2):0}*pushSpaces(e){let r=this.pos-1,n;do n=this.buffer[++r];while(n===" "||e&&n===" ");let i=r-this.pos;return i>0&&(yield this.buffer.substr(this.pos,i),this.pos=r),i}*pushUntil(e){let r=this.pos,n=this.buffer[r];for(;!e(n);)n=this.buffer[++r];return yield*this.pushToIndex(r,!1)}};var ci=class{static{o(this,"LineCounter")}constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let r=0,n=this.lineStarts.length;for(;r<n;){let s=r+n>>1;this.lineStarts[s]<e?r=s+1:n=s}if(this.lineStarts[r]===e)return{line:r+1,col:1};if(r===0)return{line:0,col:e};let i=this.lineStarts[r-1];return{line:r,col:e-i+1}}}};function ui(t,e){for(let r=0;r<t.length;++r)if(t[r].type===e)return!0;return!1}o(ui,"includesToken");function v1(t){for(let e=0;e<t.length;++e)switch(t[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}o(v1,"findNonEmptyIndex");function k1(t){switch(t?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}o(k1,"isFlowToken");function Kp(t){switch(t.type){case"document":return t.start;case"block-map":{let e=t.items[t.items.length-1];return e.sep??e.start}case"block-seq":return t.items[t.items.length-1].start;default:return[]}}o(Kp,"getPrevProps");function Vs(t){if(t.length===0)return[];let e=t.length;e:for(;--e>=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;t[++e]?.type==="space";);return t.splice(e,t.length)}o(Vs,"getFirstKeyStartProps");function Gp(t,e){if(e.length<1e5)Array.prototype.push.apply(t,e);else for(let r=0;r<e.length;++r)t.push(e[r])}o(Gp,"arrayPushArray");function T1(t){if(t.start.type==="flow-seq-start")for(let e of t.items)e.sep&&!e.value&&!ui(e.start,"explicit-key-ind")&&!ui(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,k1(e.value)?e.value.end?Gp(e.value.end,e.sep):e.value.end=e.sep:Gp(e.start,e.sep),delete e.sep)}o(T1,"fixFlowSeqItems");var On=class{static{o(this,"Parser")}constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new li,this.onNewLine=e}*parse(e,r=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let n of this.lexer.lex(e,r))yield*this.next(n);r||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let r=Yp(e);if(r)if(r==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=r,yield*this.step(),r){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let n=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:n,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type==="doc-end"&&e?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let r=e??this.stack.pop();if(!r)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield r;else{let n=this.peek(1);switch(r.type==="block-scalar"?r.indent="indent"in n?n.indent:0:r.type==="flow-collection"&&n.type==="document"&&(r.indent=0),r.type==="flow-collection"&&T1(r),n.type){case"document":n.value=r;break;case"block-scalar":n.props.push(r);break;case"block-map":{let i=n.items[n.items.length-1];if(i.value){n.items.push({start:[],key:r,sep:[]}),this.onKeyLine=!0;return}else if(i.sep)i.value=r;else{Object.assign(i,{key:r,sep:[]}),this.onKeyLine=!i.explicitKey;return}break}case"block-seq":{let i=n.items[n.items.length-1];i.value?n.items.push({start:[],value:r}):i.value=r;break}case"flow-collection":{let i=n.items[n.items.length-1];!i||i.value?n.items.push({start:[],key:r,sep:[]}):i.sep?i.value=r:Object.assign(i,{key:r,sep:[]});return}default:yield*this.pop(),yield*this.pop(r)}if((n.type==="document"||n.type==="block-map"||n.type==="block-seq")&&(r.type==="block-map"||r.type==="block-seq")){let i=r.items[r.items.length-1];i&&!i.sep&&!i.value&&i.start.length>0&&v1(i.start)===-1&&(r.indent===0||i.start.every(s=>s.type!=="comment"||s.indent<r.indent))&&(n.type==="document"?n.end=i.start:n.items.push({start:i.start}),r.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{v1(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}let r=this.startBlockValue(e);r?this.stack.push(r):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){let r=Kp(this.peek(2)),n=Vs(r),i;e.end?(i=e.end,i.push(this.sourceToken),delete e.end):i=[this.sourceToken];let s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:i}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let r=this.source.indexOf(`
144
+ `?yield*this.pushCount(2):0}*pushSpaces(e){let r=this.pos-1,n;do n=this.buffer[++r];while(n===" "||e&&n===" ");let i=r-this.pos;return i>0&&(yield this.buffer.substr(this.pos,i),this.pos=r),i}*pushUntil(e){let r=this.pos,n=this.buffer[r];for(;!e(n);)n=this.buffer[++r];return yield*this.pushToIndex(r,!1)}};var li=class{static{o(this,"LineCounter")}constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let r=0,n=this.lineStarts.length;for(;r<n;){let s=r+n>>1;this.lineStarts[s]<e?r=s+1:n=s}if(this.lineStarts[r]===e)return{line:r+1,col:1};if(r===0)return{line:0,col:e};let i=this.lineStarts[r-1];return{line:r,col:e-i+1}}}};function ci(t,e){for(let r=0;r<t.length;++r)if(t[r].type===e)return!0;return!1}o(ci,"includesToken");function I1(t){for(let e=0;e<t.length;++e)switch(t[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}o(I1,"findNonEmptyIndex");function N1(t){switch(t?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}o(N1,"isFlowToken");function Zp(t){switch(t.type){case"document":return t.start;case"block-map":{let e=t.items[t.items.length-1];return e.sep??e.start}case"block-seq":return t.items[t.items.length-1].start;default:return[]}}o(Zp,"getPrevProps");function Ks(t){if(t.length===0)return[];let e=t.length;e:for(;--e>=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;t[++e]?.type==="space";);return t.splice(e,t.length)}o(Ks,"getFirstKeyStartProps");function eh(t,e){if(e.length<1e5)Array.prototype.push.apply(t,e);else for(let r=0;r<e.length;++r)t.push(e[r])}o(eh,"arrayPushArray");function P1(t){if(t.start.type==="flow-seq-start")for(let e of t.items)e.sep&&!e.value&&!ci(e.start,"explicit-key-ind")&&!ci(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,N1(e.value)?e.value.end?eh(e.value.end,e.sep):e.value.end=e.sep:eh(e.start,e.sep),delete e.sep)}o(P1,"fixFlowSeqItems");var Mn=class{static{o(this,"Parser")}constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new ai,this.onNewLine=e}*parse(e,r=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let n of this.lexer.lex(e,r))yield*this.next(n);r||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let r=Qp(e);if(r)if(r==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=r,yield*this.step(),r){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let n=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:n,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type==="doc-end"&&e?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let r=e??this.stack.pop();if(!r)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield r;else{let n=this.peek(1);switch(r.type==="block-scalar"?r.indent="indent"in n?n.indent:0:r.type==="flow-collection"&&n.type==="document"&&(r.indent=0),r.type==="flow-collection"&&P1(r),n.type){case"document":n.value=r;break;case"block-scalar":n.props.push(r);break;case"block-map":{let i=n.items[n.items.length-1];if(i.value){n.items.push({start:[],key:r,sep:[]}),this.onKeyLine=!0;return}else if(i.sep)i.value=r;else{Object.assign(i,{key:r,sep:[]}),this.onKeyLine=!i.explicitKey;return}break}case"block-seq":{let i=n.items[n.items.length-1];i.value?n.items.push({start:[],value:r}):i.value=r;break}case"flow-collection":{let i=n.items[n.items.length-1];!i||i.value?n.items.push({start:[],key:r,sep:[]}):i.sep?i.value=r:Object.assign(i,{key:r,sep:[]});return}default:yield*this.pop(),yield*this.pop(r)}if((n.type==="document"||n.type==="block-map"||n.type==="block-seq")&&(r.type==="block-map"||r.type==="block-seq")){let i=r.items[r.items.length-1];i&&!i.sep&&!i.value&&i.start.length>0&&I1(i.start)===-1&&(r.indent===0||i.start.every(s=>s.type!=="comment"||s.indent<r.indent))&&(n.type==="document"?n.end=i.start:n.items.push({start:i.start}),r.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{I1(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}let r=this.startBlockValue(e);r?this.stack.push(r):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){let r=Zp(this.peek(2)),n=Ks(r),i;e.end?(i=e.end,i.push(this.sourceToken),delete e.end):i=[this.sourceToken];let s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:i}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let r=this.source.indexOf(`
145
145
  `)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
146
- `,r)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let r=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,r.value){let n="end"in r.value?r.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type==="comment"?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)e.items.push({start:[this.sourceToken]});else if(r.sep)r.sep.push(this.sourceToken);else{if(this.atIndentedComment(r.start,e.indent)){let i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){Gp(i,r.start),i.push(this.sourceToken),e.items.pop();return}}r.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,i=n&&(r.sep||r.explicitKey)&&this.type!=="seq-item-ind",s=[];if(i&&r.sep&&!r.value){let a=[];for(let l=0;l<r.sep.length;++l){let c=r.sep[l];switch(c.type){case"newline":a.push(l);break;case"space":break;case"comment":c.indent>e.indent&&(a.length=0);break;default:a.length=0}}a.length>=2&&(s=r.sep.splice(a[1]))}switch(this.type){case"anchor":case"tag":i||r.value?(s.push(this.sourceToken),e.items.push({start:s}),this.onKeyLine=!0):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"explicit-key-ind":!r.sep&&!r.explicitKey?(r.start.push(this.sourceToken),r.explicitKey=!0):i||r.value?(s.push(this.sourceToken),e.items.push({start:s,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(r.explicitKey)if(r.sep)if(r.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(ui(r.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]});else if(k1(r.key)&&!ui(r.sep,"newline")){let a=Vs(r.start),l=r.key,c=r.sep;c.push(this.sourceToken),delete r.key,delete r.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:l,sep:c}]})}else s.length>0?r.sep=r.sep.concat(s,this.sourceToken):r.sep.push(this.sourceToken);else if(ui(r.start,"newline"))Object.assign(r,{key:null,sep:[this.sourceToken]});else{let a=Vs(r.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]})}else r.sep?r.value||i?e.items.push({start:s,key:null,sep:[this.sourceToken]}):ui(r.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let a=this.flowScalar(this.type);i||r.value?(e.items.push({start:s,key:a,sep:[]}),this.onKeyLine=!0):r.sep?this.stack.push(a):(Object.assign(r,{key:a,sep:[]}),this.onKeyLine=!0);return}default:{let a=this.startBlockValue(e);if(a){if(a.type==="block-seq"){if(!r.explicitKey&&r.sep&&!ui(r.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else n&&e.items.push({start:s});this.stack.push(a);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let r=e.items[e.items.length-1];switch(this.type){case"newline":if(r.value){let n="end"in r.value?r.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type==="comment"?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(r.start,e.indent)){let i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){Gp(i,r.start),i.push(this.sourceToken),e.items.pop();return}}r.start.push(this.sourceToken)}return;case"anchor":case"tag":if(r.value||this.indent<=e.indent)break;r.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;r.value||ui(r.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return}if(this.indent>e.indent){let n=this.startBlockValue(e);if(n){this.stack.push(n);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let r=e.items[e.items.length-1];if(this.type==="flow-error-end"){let n;do yield*this.pop(),n=this.peek(1);while(n?.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!r||r.sep?e.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return;case"map-value-ind":!r||r.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!r||r.value?e.items.push({start:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let i=this.flowScalar(this.type);!r||r.value?e.items.push({start:[],key:i,sep:[]}):r.sep?this.stack.push(i):Object.assign(r,{key:i,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{let n=this.peek(2);if(n.type==="block-map"&&(this.type==="map-value-ind"&&n.indent===e.indent||this.type==="newline"&&!n.items[n.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&n.type!=="flow-collection"){let i=Kp(n),s=Vs(i);T1(e);let a=e.end.splice(1,e.end.length);a.push(this.sourceToken);let l={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:a}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=l}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let r=this.source.indexOf(`
146
+ `,r)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let r=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,r.value){let n="end"in r.value?r.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type==="comment"?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)e.items.push({start:[this.sourceToken]});else if(r.sep)r.sep.push(this.sourceToken);else{if(this.atIndentedComment(r.start,e.indent)){let i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){eh(i,r.start),i.push(this.sourceToken),e.items.pop();return}}r.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,i=n&&(r.sep||r.explicitKey)&&this.type!=="seq-item-ind",s=[];if(i&&r.sep&&!r.value){let a=[];for(let l=0;l<r.sep.length;++l){let c=r.sep[l];switch(c.type){case"newline":a.push(l);break;case"space":break;case"comment":c.indent>e.indent&&(a.length=0);break;default:a.length=0}}a.length>=2&&(s=r.sep.splice(a[1]))}switch(this.type){case"anchor":case"tag":i||r.value?(s.push(this.sourceToken),e.items.push({start:s}),this.onKeyLine=!0):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"explicit-key-ind":!r.sep&&!r.explicitKey?(r.start.push(this.sourceToken),r.explicitKey=!0):i||r.value?(s.push(this.sourceToken),e.items.push({start:s,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(r.explicitKey)if(r.sep)if(r.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(ci(r.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]});else if(N1(r.key)&&!ci(r.sep,"newline")){let a=Ks(r.start),l=r.key,c=r.sep;c.push(this.sourceToken),delete r.key,delete r.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:l,sep:c}]})}else s.length>0?r.sep=r.sep.concat(s,this.sourceToken):r.sep.push(this.sourceToken);else if(ci(r.start,"newline"))Object.assign(r,{key:null,sep:[this.sourceToken]});else{let a=Ks(r.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]})}else r.sep?r.value||i?e.items.push({start:s,key:null,sep:[this.sourceToken]}):ci(r.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let a=this.flowScalar(this.type);i||r.value?(e.items.push({start:s,key:a,sep:[]}),this.onKeyLine=!0):r.sep?this.stack.push(a):(Object.assign(r,{key:a,sep:[]}),this.onKeyLine=!0);return}default:{let a=this.startBlockValue(e);if(a){if(a.type==="block-seq"){if(!r.explicitKey&&r.sep&&!ci(r.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else n&&e.items.push({start:s});this.stack.push(a);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let r=e.items[e.items.length-1];switch(this.type){case"newline":if(r.value){let n="end"in r.value?r.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type==="comment"?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(r.start,e.indent)){let i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){eh(i,r.start),i.push(this.sourceToken),e.items.pop();return}}r.start.push(this.sourceToken)}return;case"anchor":case"tag":if(r.value||this.indent<=e.indent)break;r.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;r.value||ci(r.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return}if(this.indent>e.indent){let n=this.startBlockValue(e);if(n){this.stack.push(n);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let r=e.items[e.items.length-1];if(this.type==="flow-error-end"){let n;do yield*this.pop(),n=this.peek(1);while(n?.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!r||r.sep?e.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return;case"map-value-ind":!r||r.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!r||r.value?e.items.push({start:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let i=this.flowScalar(this.type);!r||r.value?e.items.push({start:[],key:i,sep:[]}):r.sep?this.stack.push(i):Object.assign(r,{key:i,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{let n=this.peek(2);if(n.type==="block-map"&&(this.type==="map-value-ind"&&n.indent===e.indent||this.type==="newline"&&!n.items[n.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&n.type!=="flow-collection"){let i=Zp(n),s=Ks(i);P1(e);let a=e.end.splice(1,e.end.length);a.push(this.sourceToken);let l={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:a}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=l}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let r=this.source.indexOf(`
147
147
  `)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
148
- `,r)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let r=Kp(e),n=Vs(r);return n.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let r=Kp(e),n=Vs(r);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,r){return this.type!=="comment"||this.indent<=r?!1:e.every(n=>n.type==="newline"||n.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};function E1(t){let e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new ci||null,prettyErrors:e}}o(E1,"parseOptions");function Jp(t,e={}){let{lineCounter:r,prettyErrors:n}=E1(e),i=new On(r?.addNewLine),s=new Dn(e),a=Array.from(s.compose(i.parse(t)));if(n&&r)for(let l of a)l.errors.forEach(Ws(t,r)),l.warnings.forEach(Ws(t,r));return a.length>0?a:Object.assign([],{empty:!0},s.streamInfo())}o(Jp,"parseAllDocuments");function Ll(t,e={}){let{lineCounter:r,prettyErrors:n}=E1(e),i=new On(r?.addNewLine),s=new Dn(e),a=null;for(let l of s.compose(i.parse(t),!0,t.length))if(!a)a=l;else if(a.options.logLevel!=="silent"){a.errors.push(new It(l.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return n&&r&&(a.errors.forEach(Ws(t,r)),a.warnings.forEach(Ws(t,r))),a}o(Ll,"parseDocument");function Qp(t,e,r){let n;typeof e=="function"?n=e:r===void 0&&e&&typeof e=="object"&&(r=e);let i=Ll(t,r);if(!i)return null;if(i.warnings.forEach(s=>dl(i.options.logLevel,s)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:n},r))}o(Qp,"parse");function Xp(t,e,r){let n=null;if(typeof e=="function"||Array.isArray(e)?n=e:r===void 0&&e&&(r=e),typeof r=="string"&&(r=r.length),typeof r=="number"){let i=Math.round(r);r=i<1?void 0:i>8?{indent:8}:{indent:i}}if(t===void 0){let{keepUndefined:i}=r??e??{};if(!i)return}return zt(t)&&!n?t.toString(r):new gr(t,n,r).toString(r)}o(Xp,"stringify");var DR=Pg;var OR=o(async t=>so.parse(t),"yamlStringToObject"),MR=o(async t=>so.stringify(t),"objectToYamlString"),IR=o(async t=>so.parseDocument(t),"getYamlDocFromString");var D1=typeof self=="object"?self:globalThis,NR=o((t,e)=>{let r=o((i,s)=>(t.set(s,i),i),"as"),n=o(i=>{if(t.has(i))return t.get(i);let[s,a]=e[i];switch(s){case 0:case-1:return r(a,i);case 1:{let l=r([],i);for(let c of a)l.push(n(c));return l}case 2:{let l=r({},i);for(let[c,u]of a)l[n(c)]=n(u);return l}case 3:return r(new Date(a),i);case 4:{let{source:l,flags:c}=a;return r(new RegExp(l,c),i)}case 5:{let l=r(new Map,i);for(let[c,u]of a)l.set(n(c),n(u));return l}case 6:{let l=r(new Set,i);for(let c of a)l.add(n(c));return l}case 7:{let{name:l,message:c}=a;return r(new D1[l](c),i)}case 8:return r(BigInt(a),i);case"BigInt":return r(Object(BigInt(a)),i);case"ArrayBuffer":return r(new Uint8Array(a).buffer,a);case"DataView":{let{buffer:l}=new Uint8Array(a);return r(new DataView(l),a)}}return r(new D1[s](a),i)},"unpair");return n},"deserializer"),nh=o(t=>NR(new Map,t)(0),"deserialize");var Gs="",{toString:PR}={},{keys:_R}=Object,$l=o(t=>{let e=typeof t;if(e!=="object"||!t)return[0,e];let r=PR.call(t).slice(8,-1);switch(r){case"Array":return[1,Gs];case"Object":return[2,Gs];case"Date":return[3,Gs];case"RegExp":return[4,Gs];case"Map":return[5,Gs];case"Set":return[6,Gs];case"DataView":return[1,r]}return r.includes("Array")?[1,r]:r.includes("Error")?[7,r]:[2,r]},"typeOf"),ih=o(([t,e])=>t===0&&(e==="function"||e==="symbol"),"shouldSkip"),LR=o((t,e,r,n)=>{let i=o((a,l)=>{let c=n.push(a)-1;return r.set(l,c),c},"as"),s=o(a=>{if(r.has(a))return r.get(a);let[l,c]=$l(a);switch(l){case 0:{let f=a;switch(c){case"bigint":l=8,f=a.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+c);f=null;break;case"undefined":return i([-1],a)}return i([l,f],a)}case 1:{if(c){let h=a;return c==="DataView"?h=new Uint8Array(a.buffer):c==="ArrayBuffer"&&(h=new Uint8Array(a)),i([c,[...h]],a)}let f=[],p=i([l,f],a);for(let h of a)f.push(s(h));return p}case 2:{if(c)switch(c){case"BigInt":return i([c,a.toString()],a);case"Boolean":case"Number":case"String":return i([c,a.valueOf()],a)}if(e&&"toJSON"in a)return s(a.toJSON());let f=[],p=i([l,f],a);for(let h of _R(a))(t||!ih($l(a[h])))&&f.push([s(h),s(a[h])]);return p}case 3:return i([l,a.toISOString()],a);case 4:{let{source:f,flags:p}=a;return i([l,{source:f,flags:p}],a)}case 5:{let f=[],p=i([l,f],a);for(let[h,m]of a)(t||!(ih($l(h))||ih($l(m))))&&f.push([s(h),s(m)]);return p}case 6:{let f=[],p=i([l,f],a);for(let h of a)(t||!ih($l(h)))&&f.push(s(h));return p}}let{message:u}=a;return i([l,{name:c,message:u}],a)},"pair");return s},"serializer"),oh=o((t,{json:e,lossy:r}={})=>{let n=[];return LR(!(e||r),!!e,new Map,n)(t),n},"serialize");var fi=typeof structuredClone=="function"?(t,e)=>e&&("json"in e||"lossy"in e)?nh(oh(t,e)):structuredClone(t):(t,e)=>nh(oh(t,e));var sh=C1("end"),ah=C1("start");function C1(t){return e;function e(r){let n=r&&r.position&&r.position[t]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}o(C1,"point");function Bl(t){let e=ah(t),r=sh(t);if(e&&r)return{start:e,end:r}}o(Bl,"position");var ao=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],lh={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...ao,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...ao],h2:[["className","sr-only"]],img:[...ao,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...ao,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...ao],table:[...ao],ul:[...ao,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]};var pi={}.hasOwnProperty;function Ag(t,e){let r={type:"root",children:[]},n={schema:e?{...lh,...e}:lh,stack:[]},i=O1(n,t);return i&&(Array.isArray(i)?i.length===1?r=i[0]:r.children=i:r=i),r}o(Ag,"sanitize");function O1(t,e){if(e&&typeof e=="object"){let r=e;switch(typeof r.type=="string"?r.type:""){case"comment":return RR(t,r);case"doctype":return AR(t,r);case"element":return FR(t,r);case"root":return $R(t,r);case"text":return BR(t,r);default:}}}o(O1,"transform");function RR(t,e){if(t.schema.allowComments){let r=typeof e.value=="string"?e.value:"",n=r.indexOf("-->"),s={type:"comment",value:n<0?r:r.slice(0,n)};return jl(s,e),s}}o(RR,"comment");function AR(t,e){if(t.schema.allowDoctypes){let r={type:"doctype"};return jl(r,e),r}}o(AR,"doctype");function FR(t,e){let r=typeof e.tagName=="string"?e.tagName:"";t.stack.push(r);let n=M1(t,e.children),i=jR(t,e.properties);t.stack.pop();let s=!1;if(r&&r!=="*"&&(!t.schema.tagNames||t.schema.tagNames.includes(r))&&(s=!0,t.schema.ancestors&&pi.call(t.schema.ancestors,r))){let l=t.schema.ancestors[r],c=-1;for(s=!1;++c<l.length;)t.stack.includes(l[c])&&(s=!0)}if(!s)return t.schema.strip&&!t.schema.strip.includes(r)?n:void 0;let a={type:"element",tagName:r,properties:i,children:n};return jl(a,e),a}o(FR,"element");function $R(t,e){let n={type:"root",children:M1(t,e.children)};return jl(n,e),n}o($R,"root");function BR(t,e){let n={type:"text",value:typeof e.value=="string"?e.value:""};return jl(n,e),n}o(BR,"text");function M1(t,e){let r=[];if(Array.isArray(e)){let n=e,i=-1;for(;++i<n.length;){let s=O1(t,n[i]);s&&(Array.isArray(s)?r.push(...s):r.push(s))}}return r}o(M1,"children");function jR(t,e){let r=t.stack[t.stack.length-1],n=t.schema.attributes,i=t.schema.required,s=n&&pi.call(n,r)?n[r]:void 0,a=n&&pi.call(n,"*")?n["*"]:void 0,l=e&&typeof e=="object"?e:{},c={},u;for(u in l)if(pi.call(l,u)){let f=l[u],p=I1(t,P1(s,u),u,f);p==null&&(p=I1(t,P1(a,u),u,f)),p!=null&&(c[u]=p)}if(i&&pi.call(i,r)){let f=i[r];for(u in f)pi.call(f,u)&&!pi.call(c,u)&&(c[u]=f[u])}return c}o(jR,"properties");function I1(t,e,r,n){return e?Array.isArray(n)?zR(t,e,r,n):N1(t,e,r,n):void 0}o(I1,"propertyValue");function zR(t,e,r,n){let i=-1,s=[];for(;++i<n.length;){let a=N1(t,e,r,n[i]);(typeof a=="number"||typeof a=="string")&&s.push(a)}return s}o(zR,"propertyValueMany");function N1(t,e,r,n){if(!(typeof n!="boolean"&&typeof n!="number"&&typeof n!="string")&&WR(t,r,n)){if(typeof e=="object"&&e.length>1){let i=!1,s=0;for(;++s<e.length;){let a=e[s];if(a&&typeof a=="object"&&"flags"in a){if(a.test(String(n))){i=!0;break}}else if(a===n){i=!0;break}}if(!i)return}return t.schema.clobber&&t.schema.clobberPrefix&&t.schema.clobber.includes(r)?t.schema.clobberPrefix+n:n}}o(N1,"propertyValuePrimitive");function WR(t,e,r){let n=t.schema.protocols&&pi.call(t.schema.protocols,e)?t.schema.protocols[e]:void 0;if(!n||n.length===0)return!0;let i=String(r),s=i.indexOf(":"),a=i.indexOf("?"),l=i.indexOf("#"),c=i.indexOf("/");if(s<0||c>-1&&s>c||a>-1&&s>a||l>-1&&s>l)return!0;let u=-1;for(;++u<n.length;){let f=n[u];if(s===f.length&&i.slice(0,f.length)===f)return!0}return!1}o(WR,"safeProtocol");function jl(t,e){let r=Bl(e);e.data&&(t.data=fi(e.data)),r&&(t.position=r)}o(jl,"patch");function P1(t,e){let r,n=-1;if(t)for(;++n<t.length;){let i=t[n],s=typeof i=="string"?i:i[0];if(s===e)return i;s==="data*"&&(r=i)}if(e.length>4&&e.slice(0,4).toLowerCase()==="data")return r}o(P1,"findDefinition");function _1(t,e){let r={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(e),!0)};return t.patch(e,r),t.applyData(e,r)}o(_1,"blockquote");function L1(t,e){let r={type:"element",tagName:"br",properties:{},children:[]};return t.patch(e,r),[t.applyData(e,r),{type:"text",value:`
149
- `}]}o(L1,"hardBreak");function R1(t,e){let r=e.value?e.value+`
150
- `:"",n={},i=e.lang?e.lang.split(/\s+/):[];i.length>0&&(n.className=["language-"+i[0]]);let s={type:"element",tagName:"code",properties:n,children:[{type:"text",value:r}]};return e.meta&&(s.data={meta:e.meta}),t.patch(e,s),s=t.applyData(e,s),s={type:"element",tagName:"pre",properties:{},children:[s]},t.patch(e,s),s}o(R1,"code");function A1(t,e){let r={type:"element",tagName:"del",properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}o(A1,"strikethrough");function F1(t,e){let r={type:"element",tagName:"em",properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}o(F1,"emphasis");var nt=hi(/[A-Za-z]/),He=hi(/[\dA-Za-z]/),$1=hi(/[#-'*+\--9=?A-Z^-~]/);function lo(t){return t!==null&&(t<32||t===127)}o(lo,"asciiControl");var zl=hi(/\d/),B1=hi(/[\dA-Fa-f]/),j1=hi(/[!-/:-@[-`{-~]/);function V(t){return t!==null&&t<-2}o(V,"markdownLineEnding");function ye(t){return t!==null&&(t<0||t===32)}o(ye,"markdownLineEndingOrSpace");function Z(t){return t===-2||t===-1||t===32}o(Z,"markdownSpace");var co=hi(/\p{P}|\p{S}/u),un=hi(/\s/);function hi(t){return e;function e(r){return r!==null&&r>-1&&t.test(String.fromCharCode(r))}}o(hi,"regexCheck");var HR={'"':"quot","&":"amp","<":"lt",">":"gt"};function ch(t){return t.replace(/["&<>]/g,e);function e(r){return"&"+HR[r]+";"}}o(ch,"encode");function fn(t,e){let r=ch(er(t||""));if(!e)return r;let n=r.indexOf(":"),i=r.indexOf("?"),s=r.indexOf("#"),a=r.indexOf("/");return n<0||a>-1&&n>a||i>-1&&n>i||s>-1&&n>s||e.test(r.slice(0,n))?r:""}o(fn,"sanitizeUri");function er(t){let e=[],r=-1,n=0,i=0;for(;++r<t.length;){let s=t.charCodeAt(r),a="";if(s===37&&He(t.charCodeAt(r+1))&&He(t.charCodeAt(r+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(a=String.fromCharCode(s));else if(s>55295&&s<57344){let l=t.charCodeAt(r+1);s<56320&&l>56319&&l<57344?(a=String.fromCharCode(s,l),i=1):a="\uFFFD"}else a=String.fromCharCode(s);a&&(e.push(t.slice(n,r),encodeURIComponent(a)),n=r+i+1,a=""),i&&(r+=i,i=0)}return e.join("")+t.slice(n)}o(er,"normalizeUri");function z1(t,e){let r=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",n=String(e.identifier).toUpperCase(),i=er(n.toLowerCase()),s=t.footnoteOrder.indexOf(n),a,l=t.footnoteCounts.get(n);l===void 0?(l=0,t.footnoteOrder.push(n),a=t.footnoteOrder.length):a=s+1,l+=1,t.footnoteCounts.set(n,l);let c={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+i,id:r+"fnref-"+i+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};t.patch(e,c);let u={type:"element",tagName:"sup",properties:{},children:[c]};return t.patch(e,u),t.applyData(e,u)}o(z1,"footnoteReference");function W1(t,e){let r={type:"element",tagName:"h"+e.depth,properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}o(W1,"heading");function H1(t,e){if(t.options.allowDangerousHtml){let r={type:"raw",value:e.value};return t.patch(e,r),t.applyData(e,r)}}o(H1,"html");function uh(t,e){let r=e.referenceType,n="]";if(r==="collapsed"?n+="[]":r==="full"&&(n+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return[{type:"text",value:"!["+e.alt+n}];let i=t.all(e),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});let a=i[i.length-1];return a&&a.type==="text"?a.value+=n:i.push({type:"text",value:n}),i}o(uh,"revert");function U1(t,e){let r=String(e.identifier).toUpperCase(),n=t.definitionById.get(r);if(!n)return uh(t,e);let i={src:er(n.url||""),alt:e.alt};n.title!==null&&n.title!==void 0&&(i.title=n.title);let s={type:"element",tagName:"img",properties:i,children:[]};return t.patch(e,s),t.applyData(e,s)}o(U1,"imageReference");function q1(t,e){let r={src:er(e.url)};e.alt!==null&&e.alt!==void 0&&(r.alt=e.alt),e.title!==null&&e.title!==void 0&&(r.title=e.title);let n={type:"element",tagName:"img",properties:r,children:[]};return t.patch(e,n),t.applyData(e,n)}o(q1,"image");function Y1(t,e){let r={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};t.patch(e,r);let n={type:"element",tagName:"code",properties:{},children:[r]};return t.patch(e,n),t.applyData(e,n)}o(Y1,"inlineCode");function V1(t,e){let r=String(e.identifier).toUpperCase(),n=t.definitionById.get(r);if(!n)return uh(t,e);let i={href:er(n.url||"")};n.title!==null&&n.title!==void 0&&(i.title=n.title);let s={type:"element",tagName:"a",properties:i,children:t.all(e)};return t.patch(e,s),t.applyData(e,s)}o(V1,"linkReference");function K1(t,e){let r={href:er(e.url)};e.title!==null&&e.title!==void 0&&(r.title=e.title);let n={type:"element",tagName:"a",properties:r,children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}o(K1,"link");function J1(t,e,r){let n=t.all(e),i=r?UR(r):G1(e),s={},a=[];if(typeof e.checked=="boolean"){let f=n[0],p;f&&f.type==="element"&&f.tagName==="p"?p=f:(p={type:"element",tagName:"p",properties:{},children:[]},n.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let l=-1;for(;++l<n.length;){let f=n[l];(i||l!==0||f.type!=="element"||f.tagName!=="p")&&a.push({type:"text",value:`
148
+ `,r)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let r=Zp(e),n=Ks(r);return n.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let r=Zp(e),n=Ks(r);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,r){return this.type!=="comment"||this.indent<=r?!1:e.every(n=>n.type==="newline"||n.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};function L1(t){let e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new li||null,prettyErrors:e}}o(L1,"parseOptions");function th(t,e={}){let{lineCounter:r,prettyErrors:n}=L1(e),i=new Mn(r?.addNewLine),s=new Cn(e),a=Array.from(s.compose(i.parse(t)));if(n&&r)for(let l of a)l.errors.forEach(Hs(t,r)),l.warnings.forEach(Hs(t,r));return a.length>0?a:Object.assign([],{empty:!0},s.streamInfo())}o(th,"parseAllDocuments");function Fl(t,e={}){let{lineCounter:r,prettyErrors:n}=L1(e),i=new Mn(r?.addNewLine),s=new Cn(e),a=null;for(let l of s.compose(i.parse(t),!0,t.length))if(!a)a=l;else if(a.options.logLevel!=="silent"){a.errors.push(new It(l.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return n&&r&&(a.errors.forEach(Hs(t,r)),a.warnings.forEach(Hs(t,r))),a}o(Fl,"parseDocument");function rh(t,e,r){let n;typeof e=="function"?n=e:r===void 0&&e&&typeof e=="object"&&(r=e);let i=Fl(t,r);if(!i)return null;if(i.warnings.forEach(s=>xl(i.options.logLevel,s)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:n},r))}o(rh,"parse");function nh(t,e,r){let n=null;if(typeof e=="function"||Array.isArray(e)?n=e:r===void 0&&e&&(r=e),typeof r=="string"&&(r=r.length),typeof r=="number"){let i=Math.round(r);r=i<1?void 0:i>8?{indent:8}:{indent:i}}if(t===void 0){let{keepUndefined:i}=r??e??{};if(!i)return}return zt(t)&&!n?t.toString(r):new gr(t,n,r).toString(r)}o(nh,"stringify");var HR=Fg;var qR=o(async t=>oo.parse(t),"yamlStringToObject"),YR=o(async t=>oo.stringify(t),"objectToYamlString"),VR=o(async t=>oo.parseDocument(t),"getYamlDocFromString");var _1=typeof self=="object"?self:globalThis,KR=o((t,e)=>{let r=o((i,s)=>(t.set(s,i),i),"as"),n=o(i=>{if(t.has(i))return t.get(i);let[s,a]=e[i];switch(s){case 0:case-1:return r(a,i);case 1:{let l=r([],i);for(let c of a)l.push(n(c));return l}case 2:{let l=r({},i);for(let[c,u]of a)l[n(c)]=n(u);return l}case 3:return r(new Date(a),i);case 4:{let{source:l,flags:c}=a;return r(new RegExp(l,c),i)}case 5:{let l=r(new Map,i);for(let[c,u]of a)l.set(n(c),n(u));return l}case 6:{let l=r(new Set,i);for(let c of a)l.add(n(c));return l}case 7:{let{name:l,message:c}=a;return r(new _1[l](c),i)}case 8:return r(BigInt(a),i);case"BigInt":return r(Object(BigInt(a)),i);case"ArrayBuffer":return r(new Uint8Array(a).buffer,a);case"DataView":{let{buffer:l}=new Uint8Array(a);return r(new DataView(l),a)}}return r(new _1[s](a),i)},"unpair");return n},"deserializer"),lh=o(t=>KR(new Map,t)(0),"deserialize");var Js="",{toString:GR}={},{keys:JR}=Object,zl=o(t=>{let e=typeof t;if(e!=="object"||!t)return[0,e];let r=GR.call(t).slice(8,-1);switch(r){case"Array":return[1,Js];case"Object":return[2,Js];case"Date":return[3,Js];case"RegExp":return[4,Js];case"Map":return[5,Js];case"Set":return[6,Js];case"DataView":return[1,r]}return r.includes("Array")?[1,r]:r.includes("Error")?[7,r]:[2,r]},"typeOf"),ch=o(([t,e])=>t===0&&(e==="function"||e==="symbol"),"shouldSkip"),QR=o((t,e,r,n)=>{let i=o((a,l)=>{let c=n.push(a)-1;return r.set(l,c),c},"as"),s=o(a=>{if(r.has(a))return r.get(a);let[l,c]=zl(a);switch(l){case 0:{let f=a;switch(c){case"bigint":l=8,f=a.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+c);f=null;break;case"undefined":return i([-1],a)}return i([l,f],a)}case 1:{if(c){let h=a;return c==="DataView"?h=new Uint8Array(a.buffer):c==="ArrayBuffer"&&(h=new Uint8Array(a)),i([c,[...h]],a)}let f=[],p=i([l,f],a);for(let h of a)f.push(s(h));return p}case 2:{if(c)switch(c){case"BigInt":return i([c,a.toString()],a);case"Boolean":case"Number":case"String":return i([c,a.valueOf()],a)}if(e&&"toJSON"in a)return s(a.toJSON());let f=[],p=i([l,f],a);for(let h of JR(a))(t||!ch(zl(a[h])))&&f.push([s(h),s(a[h])]);return p}case 3:return i([l,a.toISOString()],a);case 4:{let{source:f,flags:p}=a;return i([l,{source:f,flags:p}],a)}case 5:{let f=[],p=i([l,f],a);for(let[h,m]of a)(t||!(ch(zl(h))||ch(zl(m))))&&f.push([s(h),s(m)]);return p}case 6:{let f=[],p=i([l,f],a);for(let h of a)(t||!ch(zl(h)))&&f.push(s(h));return p}}let{message:u}=a;return i([l,{name:c,message:u}],a)},"pair");return s},"serializer"),uh=o((t,{json:e,lossy:r}={})=>{let n=[];return QR(!(e||r),!!e,new Map,n)(t),n},"serialize");var ui=typeof structuredClone=="function"?(t,e)=>e&&("json"in e||"lossy"in e)?lh(uh(t,e)):structuredClone(t):(t,e)=>lh(uh(t,e));var fh=R1("end"),ph=R1("start");function R1(t){return e;function e(r){let n=r&&r.position&&r.position[t]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}o(R1,"point");function Wl(t){let e=ph(t),r=fh(t);if(e&&r)return{start:e,end:r}}o(Wl,"position");var so=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],hh={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...so,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...so],h2:[["className","sr-only"]],img:[...so,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...so,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...so],table:[...so],ul:[...so,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]};var fi={}.hasOwnProperty;function zg(t,e){let r={type:"root",children:[]},n={schema:e?{...hh,...e}:hh,stack:[]},i=A1(n,t);return i&&(Array.isArray(i)?i.length===1?r=i[0]:r.children=i:r=i),r}o(zg,"sanitize");function A1(t,e){if(e&&typeof e=="object"){let r=e;switch(typeof r.type=="string"?r.type:""){case"comment":return XR(t,r);case"doctype":return ZR(t,r);case"element":return eA(t,r);case"root":return tA(t,r);case"text":return rA(t,r);default:}}}o(A1,"transform");function XR(t,e){if(t.schema.allowComments){let r=typeof e.value=="string"?e.value:"",n=r.indexOf("-->"),s={type:"comment",value:n<0?r:r.slice(0,n)};return Hl(s,e),s}}o(XR,"comment");function ZR(t,e){if(t.schema.allowDoctypes){let r={type:"doctype"};return Hl(r,e),r}}o(ZR,"doctype");function eA(t,e){let r=typeof e.tagName=="string"?e.tagName:"";t.stack.push(r);let n=F1(t,e.children),i=nA(t,e.properties);t.stack.pop();let s=!1;if(r&&r!=="*"&&(!t.schema.tagNames||t.schema.tagNames.includes(r))&&(s=!0,t.schema.ancestors&&fi.call(t.schema.ancestors,r))){let l=t.schema.ancestors[r],c=-1;for(s=!1;++c<l.length;)t.stack.includes(l[c])&&(s=!0)}if(!s)return t.schema.strip&&!t.schema.strip.includes(r)?n:void 0;let a={type:"element",tagName:r,properties:i,children:n};return Hl(a,e),a}o(eA,"element");function tA(t,e){let n={type:"root",children:F1(t,e.children)};return Hl(n,e),n}o(tA,"root");function rA(t,e){let n={type:"text",value:typeof e.value=="string"?e.value:""};return Hl(n,e),n}o(rA,"text");function F1(t,e){let r=[];if(Array.isArray(e)){let n=e,i=-1;for(;++i<n.length;){let s=A1(t,n[i]);s&&(Array.isArray(s)?r.push(...s):r.push(s))}}return r}o(F1,"children");function nA(t,e){let r=t.stack[t.stack.length-1],n=t.schema.attributes,i=t.schema.required,s=n&&fi.call(n,r)?n[r]:void 0,a=n&&fi.call(n,"*")?n["*"]:void 0,l=e&&typeof e=="object"?e:{},c={},u;for(u in l)if(fi.call(l,u)){let f=l[u],p=$1(t,j1(s,u),u,f);p==null&&(p=$1(t,j1(a,u),u,f)),p!=null&&(c[u]=p)}if(i&&fi.call(i,r)){let f=i[r];for(u in f)fi.call(f,u)&&!fi.call(c,u)&&(c[u]=f[u])}return c}o(nA,"properties");function $1(t,e,r,n){return e?Array.isArray(n)?iA(t,e,r,n):B1(t,e,r,n):void 0}o($1,"propertyValue");function iA(t,e,r,n){let i=-1,s=[];for(;++i<n.length;){let a=B1(t,e,r,n[i]);(typeof a=="number"||typeof a=="string")&&s.push(a)}return s}o(iA,"propertyValueMany");function B1(t,e,r,n){if(!(typeof n!="boolean"&&typeof n!="number"&&typeof n!="string")&&oA(t,r,n)){if(typeof e=="object"&&e.length>1){let i=!1,s=0;for(;++s<e.length;){let a=e[s];if(a&&typeof a=="object"&&"flags"in a){if(a.test(String(n))){i=!0;break}}else if(a===n){i=!0;break}}if(!i)return}return t.schema.clobber&&t.schema.clobberPrefix&&t.schema.clobber.includes(r)?t.schema.clobberPrefix+n:n}}o(B1,"propertyValuePrimitive");function oA(t,e,r){let n=t.schema.protocols&&fi.call(t.schema.protocols,e)?t.schema.protocols[e]:void 0;if(!n||n.length===0)return!0;let i=String(r),s=i.indexOf(":"),a=i.indexOf("?"),l=i.indexOf("#"),c=i.indexOf("/");if(s<0||c>-1&&s>c||a>-1&&s>a||l>-1&&s>l)return!0;let u=-1;for(;++u<n.length;){let f=n[u];if(s===f.length&&i.slice(0,f.length)===f)return!0}return!1}o(oA,"safeProtocol");function Hl(t,e){let r=Wl(e);e.data&&(t.data=ui(e.data)),r&&(t.position=r)}o(Hl,"patch");function j1(t,e){let r,n=-1;if(t)for(;++n<t.length;){let i=t[n],s=typeof i=="string"?i:i[0];if(s===e)return i;s==="data*"&&(r=i)}if(e.length>4&&e.slice(0,4).toLowerCase()==="data")return r}o(j1,"findDefinition");function z1(t,e){let r={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(e),!0)};return t.patch(e,r),t.applyData(e,r)}o(z1,"blockquote");function W1(t,e){let r={type:"element",tagName:"br",properties:{},children:[]};return t.patch(e,r),[t.applyData(e,r),{type:"text",value:`
149
+ `}]}o(W1,"hardBreak");function H1(t,e){let r=e.value?e.value+`
150
+ `:"",n={},i=e.lang?e.lang.split(/\s+/):[];i.length>0&&(n.className=["language-"+i[0]]);let s={type:"element",tagName:"code",properties:n,children:[{type:"text",value:r}]};return e.meta&&(s.data={meta:e.meta}),t.patch(e,s),s=t.applyData(e,s),s={type:"element",tagName:"pre",properties:{},children:[s]},t.patch(e,s),s}o(H1,"code");function U1(t,e){let r={type:"element",tagName:"del",properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}o(U1,"strikethrough");function q1(t,e){let r={type:"element",tagName:"em",properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}o(q1,"emphasis");var nt=pi(/[A-Za-z]/),He=pi(/[\dA-Za-z]/),Y1=pi(/[#-'*+\--9=?A-Z^-~]/);function ao(t){return t!==null&&(t<32||t===127)}o(ao,"asciiControl");var Ul=pi(/\d/),V1=pi(/[\dA-Fa-f]/),K1=pi(/[!-/:-@[-`{-~]/);function V(t){return t!==null&&t<-2}o(V,"markdownLineEnding");function ye(t){return t!==null&&(t<0||t===32)}o(ye,"markdownLineEndingOrSpace");function Z(t){return t===-2||t===-1||t===32}o(Z,"markdownSpace");var lo=pi(/\p{P}|\p{S}/u),fn=pi(/\s/);function pi(t){return e;function e(r){return r!==null&&r>-1&&t.test(String.fromCharCode(r))}}o(pi,"regexCheck");var sA={'"':"quot","&":"amp","<":"lt",">":"gt"};function mh(t){return t.replace(/["&<>]/g,e);function e(r){return"&"+sA[r]+";"}}o(mh,"encode");function pn(t,e){let r=mh(er(t||""));if(!e)return r;let n=r.indexOf(":"),i=r.indexOf("?"),s=r.indexOf("#"),a=r.indexOf("/");return n<0||a>-1&&n>a||i>-1&&n>i||s>-1&&n>s||e.test(r.slice(0,n))?r:""}o(pn,"sanitizeUri");function er(t){let e=[],r=-1,n=0,i=0;for(;++r<t.length;){let s=t.charCodeAt(r),a="";if(s===37&&He(t.charCodeAt(r+1))&&He(t.charCodeAt(r+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(a=String.fromCharCode(s));else if(s>55295&&s<57344){let l=t.charCodeAt(r+1);s<56320&&l>56319&&l<57344?(a=String.fromCharCode(s,l),i=1):a="\uFFFD"}else a=String.fromCharCode(s);a&&(e.push(t.slice(n,r),encodeURIComponent(a)),n=r+i+1,a=""),i&&(r+=i,i=0)}return e.join("")+t.slice(n)}o(er,"normalizeUri");function G1(t,e){let r=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",n=String(e.identifier).toUpperCase(),i=er(n.toLowerCase()),s=t.footnoteOrder.indexOf(n),a,l=t.footnoteCounts.get(n);l===void 0?(l=0,t.footnoteOrder.push(n),a=t.footnoteOrder.length):a=s+1,l+=1,t.footnoteCounts.set(n,l);let c={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+i,id:r+"fnref-"+i+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};t.patch(e,c);let u={type:"element",tagName:"sup",properties:{},children:[c]};return t.patch(e,u),t.applyData(e,u)}o(G1,"footnoteReference");function J1(t,e){let r={type:"element",tagName:"h"+e.depth,properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}o(J1,"heading");function Q1(t,e){if(t.options.allowDangerousHtml){let r={type:"raw",value:e.value};return t.patch(e,r),t.applyData(e,r)}}o(Q1,"html");function dh(t,e){let r=e.referenceType,n="]";if(r==="collapsed"?n+="[]":r==="full"&&(n+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return[{type:"text",value:"!["+e.alt+n}];let i=t.all(e),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});let a=i[i.length-1];return a&&a.type==="text"?a.value+=n:i.push({type:"text",value:n}),i}o(dh,"revert");function X1(t,e){let r=String(e.identifier).toUpperCase(),n=t.definitionById.get(r);if(!n)return dh(t,e);let i={src:er(n.url||""),alt:e.alt};n.title!==null&&n.title!==void 0&&(i.title=n.title);let s={type:"element",tagName:"img",properties:i,children:[]};return t.patch(e,s),t.applyData(e,s)}o(X1,"imageReference");function Z1(t,e){let r={src:er(e.url)};e.alt!==null&&e.alt!==void 0&&(r.alt=e.alt),e.title!==null&&e.title!==void 0&&(r.title=e.title);let n={type:"element",tagName:"img",properties:r,children:[]};return t.patch(e,n),t.applyData(e,n)}o(Z1,"image");function eT(t,e){let r={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};t.patch(e,r);let n={type:"element",tagName:"code",properties:{},children:[r]};return t.patch(e,n),t.applyData(e,n)}o(eT,"inlineCode");function tT(t,e){let r=String(e.identifier).toUpperCase(),n=t.definitionById.get(r);if(!n)return dh(t,e);let i={href:er(n.url||"")};n.title!==null&&n.title!==void 0&&(i.title=n.title);let s={type:"element",tagName:"a",properties:i,children:t.all(e)};return t.patch(e,s),t.applyData(e,s)}o(tT,"linkReference");function rT(t,e){let r={href:er(e.url)};e.title!==null&&e.title!==void 0&&(r.title=e.title);let n={type:"element",tagName:"a",properties:r,children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}o(rT,"link");function iT(t,e,r){let n=t.all(e),i=r?aA(r):nT(e),s={},a=[];if(typeof e.checked=="boolean"){let f=n[0],p;f&&f.type==="element"&&f.tagName==="p"?p=f:(p={type:"element",tagName:"p",properties:{},children:[]},n.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let l=-1;for(;++l<n.length;){let f=n[l];(i||l!==0||f.type!=="element"||f.tagName!=="p")&&a.push({type:"text",value:`
151
151
  `}),f.type==="element"&&f.tagName==="p"&&!i?a.push(...f.children):a.push(f)}let c=n[n.length-1];c&&(i||c.type!=="element"||c.tagName!=="p")&&a.push({type:"text",value:`
152
- `});let u={type:"element",tagName:"li",properties:s,children:a};return t.patch(e,u),t.applyData(e,u)}o(J1,"listItem");function UR(t){let e=!1;if(t.type==="list"){e=t.spread||!1;let r=t.children,n=-1;for(;!e&&++n<r.length;)e=G1(r[n])}return e}o(UR,"listLoose");function G1(t){let e=t.spread;return e??t.children.length>1}o(G1,"listItemLoose");function Q1(t,e){let r={},n=t.all(e),i=-1;for(typeof e.start=="number"&&e.start!==1&&(r.start=e.start);++i<n.length;){let a=n[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}let s={type:"element",tagName:e.ordered?"ol":"ul",properties:r,children:t.wrap(n,!0)};return t.patch(e,s),t.applyData(e,s)}o(Q1,"list");function X1(t,e){let r={type:"element",tagName:"p",properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}o(X1,"paragraph");function Z1(t,e){let r={type:"root",children:t.wrap(t.all(e))};return t.patch(e,r),t.applyData(e,r)}o(Z1,"root");function eT(t,e){let r={type:"element",tagName:"strong",properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}o(eT,"strong");function tT(t,e){let r=t.all(e),n=r.shift(),i=[];if(n){let a={type:"element",tagName:"thead",properties:{},children:t.wrap([n],!0)};t.patch(e.children[0],a),i.push(a)}if(r.length>0){let a={type:"element",tagName:"tbody",properties:{},children:t.wrap(r,!0)},l=ah(e.children[1]),c=sh(e.children[e.children.length-1]);l&&c&&(a.position={start:l,end:c}),i.push(a)}let s={type:"element",tagName:"table",properties:{},children:t.wrap(i,!0)};return t.patch(e,s),t.applyData(e,s)}o(tT,"table");function rT(t,e,r){let n=r?r.children:void 0,s=(n?n.indexOf(e):1)===0?"th":"td",a=r&&r.type==="table"?r.align:void 0,l=a?a.length:e.children.length,c=-1,u=[];for(;++c<l;){let p=e.children[c],h={},m=a?a[c]:void 0;m&&(h.align=m);let d={type:"element",tagName:s,properties:h,children:[]};p&&(d.children=t.all(p),t.patch(p,d),d=t.applyData(p,d)),u.push(d)}let f={type:"element",tagName:"tr",properties:{},children:t.wrap(u,!0)};return t.patch(e,f),t.applyData(e,f)}o(rT,"tableRow");function nT(t,e){let r={type:"element",tagName:"td",properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}o(nT,"tableCell");var rFe=9,nFe=32;function oT(t){let e=String(t),r=/\r?\n|\r/g,n=r.exec(e),i=0,s=[];for(;n;)s.push(iT(e.slice(i,n.index),i>0,!0),n[0]),i=n.index+n[0].length,n=r.exec(e);return s.push(iT(e.slice(i),i>0,!1)),s.join("")}o(oT,"trimLines");function iT(t,e,r){let n=0,i=t.length;if(e){let s=t.codePointAt(n);for(;s===9||s===32;)n++,s=t.codePointAt(n)}if(r){let s=t.codePointAt(i-1);for(;s===9||s===32;)i--,s=t.codePointAt(i-1)}return i>n?t.slice(n,i):""}o(iT,"trimLine");function sT(t,e){let r={type:"text",value:oT(String(e.value))};return t.patch(e,r),t.applyData(e,r)}o(sT,"text");function aT(t,e){let r={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(e,r),t.applyData(e,r)}o(aT,"thematicBreak");var Fg={blockquote:_1,break:L1,code:R1,delete:A1,emphasis:F1,footnoteReference:z1,heading:W1,html:H1,imageReference:U1,image:q1,inlineCode:Y1,linkReference:V1,link:K1,listItem:J1,list:Q1,paragraph:X1,root:Z1,strong:eT,table:tT,tableCell:nT,tableRow:rT,text:sT,thematicBreak:aT,toml:fh,yaml:fh,definition:fh,footnoteDefinition:fh};function fh(){}o(fh,"ignore");function lT(t,e){let r=[{type:"text",value:"\u21A9"}];return e>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(e)}]}),r}o(lT,"defaultFootnoteBackContent");function cT(t,e){return"Back to reference "+(t+1)+(e>1?"-"+e:"")}o(cT,"defaultFootnoteBackLabel");function uT(t){let e=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",r=t.options.footnoteBackContent||lT,n=t.options.footnoteBackLabel||cT,i=t.options.footnoteLabel||"Footnotes",s=t.options.footnoteLabelTagName||"h2",a=t.options.footnoteLabelProperties||{className:["sr-only"]},l=[],c=-1;for(;++c<t.footnoteOrder.length;){let u=t.footnoteById.get(t.footnoteOrder[c]);if(!u)continue;let f=t.all(u),p=String(u.identifier).toUpperCase(),h=er(p.toLowerCase()),m=0,d=[],g=t.footnoteCounts.get(p);for(;g!==void 0&&++m<=g;){d.length>0&&d.push({type:"text",value:" "});let T=typeof r=="string"?r:r(c,m);typeof T=="string"&&(T={type:"text",value:T}),d.push({type:"element",tagName:"a",properties:{href:"#"+e+"fnref-"+h+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof n=="string"?n:n(c,m),className:["data-footnote-backref"]},children:Array.isArray(T)?T:[T]})}let y=f[f.length-1];if(y&&y.type==="element"&&y.tagName==="p"){let T=y.children[y.children.length-1];T&&T.type==="text"?T.value+=" ":y.children.push({type:"text",value:" "}),y.children.push(...d)}else f.push(...d);let x={type:"element",tagName:"li",properties:{id:e+"fn-"+h},children:t.wrap(f,!0)};t.patch(u,x),l.push(x)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...fi(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
152
+ `});let u={type:"element",tagName:"li",properties:s,children:a};return t.patch(e,u),t.applyData(e,u)}o(iT,"listItem");function aA(t){let e=!1;if(t.type==="list"){e=t.spread||!1;let r=t.children,n=-1;for(;!e&&++n<r.length;)e=nT(r[n])}return e}o(aA,"listLoose");function nT(t){let e=t.spread;return e??t.children.length>1}o(nT,"listItemLoose");function oT(t,e){let r={},n=t.all(e),i=-1;for(typeof e.start=="number"&&e.start!==1&&(r.start=e.start);++i<n.length;){let a=n[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}let s={type:"element",tagName:e.ordered?"ol":"ul",properties:r,children:t.wrap(n,!0)};return t.patch(e,s),t.applyData(e,s)}o(oT,"list");function sT(t,e){let r={type:"element",tagName:"p",properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}o(sT,"paragraph");function aT(t,e){let r={type:"root",children:t.wrap(t.all(e))};return t.patch(e,r),t.applyData(e,r)}o(aT,"root");function lT(t,e){let r={type:"element",tagName:"strong",properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}o(lT,"strong");function cT(t,e){let r=t.all(e),n=r.shift(),i=[];if(n){let a={type:"element",tagName:"thead",properties:{},children:t.wrap([n],!0)};t.patch(e.children[0],a),i.push(a)}if(r.length>0){let a={type:"element",tagName:"tbody",properties:{},children:t.wrap(r,!0)},l=ph(e.children[1]),c=fh(e.children[e.children.length-1]);l&&c&&(a.position={start:l,end:c}),i.push(a)}let s={type:"element",tagName:"table",properties:{},children:t.wrap(i,!0)};return t.patch(e,s),t.applyData(e,s)}o(cT,"table");function uT(t,e,r){let n=r?r.children:void 0,s=(n?n.indexOf(e):1)===0?"th":"td",a=r&&r.type==="table"?r.align:void 0,l=a?a.length:e.children.length,c=-1,u=[];for(;++c<l;){let p=e.children[c],h={},m=a?a[c]:void 0;m&&(h.align=m);let d={type:"element",tagName:s,properties:h,children:[]};p&&(d.children=t.all(p),t.patch(p,d),d=t.applyData(p,d)),u.push(d)}let f={type:"element",tagName:"tr",properties:{},children:t.wrap(u,!0)};return t.patch(e,f),t.applyData(e,f)}o(uT,"tableRow");function fT(t,e){let r={type:"element",tagName:"td",properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}o(fT,"tableCell");var LFe=9,_Fe=32;function hT(t){let e=String(t),r=/\r?\n|\r/g,n=r.exec(e),i=0,s=[];for(;n;)s.push(pT(e.slice(i,n.index),i>0,!0),n[0]),i=n.index+n[0].length,n=r.exec(e);return s.push(pT(e.slice(i),i>0,!1)),s.join("")}o(hT,"trimLines");function pT(t,e,r){let n=0,i=t.length;if(e){let s=t.codePointAt(n);for(;s===9||s===32;)n++,s=t.codePointAt(n)}if(r){let s=t.codePointAt(i-1);for(;s===9||s===32;)i--,s=t.codePointAt(i-1)}return i>n?t.slice(n,i):""}o(pT,"trimLine");function mT(t,e){let r={type:"text",value:hT(String(e.value))};return t.patch(e,r),t.applyData(e,r)}o(mT,"text");function dT(t,e){let r={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(e,r),t.applyData(e,r)}o(dT,"thematicBreak");var Wg={blockquote:z1,break:W1,code:H1,delete:U1,emphasis:q1,footnoteReference:G1,heading:J1,html:Q1,imageReference:X1,image:Z1,inlineCode:eT,linkReference:tT,link:rT,listItem:iT,list:oT,paragraph:sT,root:aT,strong:lT,table:cT,tableCell:fT,tableRow:uT,text:mT,thematicBreak:dT,toml:gh,yaml:gh,definition:gh,footnoteDefinition:gh};function gh(){}o(gh,"ignore");function gT(t,e){let r=[{type:"text",value:"\u21A9"}];return e>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(e)}]}),r}o(gT,"defaultFootnoteBackContent");function yT(t,e){return"Back to reference "+(t+1)+(e>1?"-"+e:"")}o(yT,"defaultFootnoteBackLabel");function xT(t){let e=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",r=t.options.footnoteBackContent||gT,n=t.options.footnoteBackLabel||yT,i=t.options.footnoteLabel||"Footnotes",s=t.options.footnoteLabelTagName||"h2",a=t.options.footnoteLabelProperties||{className:["sr-only"]},l=[],c=-1;for(;++c<t.footnoteOrder.length;){let u=t.footnoteById.get(t.footnoteOrder[c]);if(!u)continue;let f=t.all(u),p=String(u.identifier).toUpperCase(),h=er(p.toLowerCase()),m=0,d=[],g=t.footnoteCounts.get(p);for(;g!==void 0&&++m<=g;){d.length>0&&d.push({type:"text",value:" "});let T=typeof r=="string"?r:r(c,m);typeof T=="string"&&(T={type:"text",value:T}),d.push({type:"element",tagName:"a",properties:{href:"#"+e+"fnref-"+h+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof n=="string"?n:n(c,m),className:["data-footnote-backref"]},children:Array.isArray(T)?T:[T]})}let y=f[f.length-1];if(y&&y.type==="element"&&y.tagName==="p"){let T=y.children[y.children.length-1];T&&T.type==="text"?T.value+=" ":y.children.push({type:"text",value:" "}),y.children.push(...d)}else f.push(...d);let x={type:"element",tagName:"li",properties:{id:e+"fn-"+h},children:t.wrap(f,!0)};t.patch(u,x),l.push(x)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...ui(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
153
153
  `},{type:"element",tagName:"ol",properties:{},children:t.wrap(l,!0)},{type:"text",value:`
154
- `}]}}o(uT,"footer");var pT=o((function(t,e,r,n,i){let s=Mn(e);if(r!=null&&(typeof r!="number"||r<0||r===Number.POSITIVE_INFINITY))throw new Error("Expected positive finite index");if(n!=null&&(!pT(n)||!n.children))throw new Error("Expected parent node");if(n==null!=(r==null))throw new Error("Expected both parent and index");return fT(t)?s.call(i,t,r,n):!1}),"is"),Mn=o((function(t){if(t==null)return KR;if(typeof t=="function")return ph(t);if(typeof t=="object")return Array.isArray(t)?qR(t):YR(t);if(typeof t=="string")return VR(t);throw new Error("Expected function, string, or object as test")}),"convert");function qR(t){let e=[],r=-1;for(;++r<t.length;)e[r]=Mn(t[r]);return ph(n);function n(...i){let s=-1;for(;++s<e.length;)if(e[s].apply(this,i))return!0;return!1}}o(qR,"anyFactory");function YR(t){let e=t;return ph(r);function r(n){let i=n,s;for(s in t)if(i[s]!==e[s])return!1;return!0}}o(YR,"propertiesFactory");function VR(t){return ph(e);function e(r){return r&&r.type===t}}o(VR,"typeFactory");function ph(t){return e;function e(r,n,i){return!!(fT(r)&&t.call(this,r,typeof n=="number"?n:void 0,i||void 0))}}o(ph,"castFactory");function KR(){return!0}o(KR,"ok");function fT(t){return t!==null&&typeof t=="object"&&"type"in t}o(fT,"looksLikeANode");var hT=[],hh=!0,uo=!1,mh="skip";function Wl(t,e,r,n){let i;typeof e=="function"&&typeof r!="function"?(n=r,r=e):i=e;let s=Mn(i),a=n?-1:1;l(t,void 0,[])();function l(c,u,f){let p=c&&typeof c=="object"?c:{};if(typeof p.type=="string"){let m=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(c.type+(m?"<"+m+">":""))+")"})}return h;function h(){let m=hT,d,g,y;if((!e||s(c,u,f[f.length-1]||void 0))&&(m=GR(r(c,f)),m[0]===uo))return m;if("children"in c&&c.children){let x=c;if(x.children&&m[0]!==mh)for(g=(n?x.children.length:-1)+a,y=f.concat(x);g>-1&&g<x.children.length;){let T=x.children[g];if(d=l(T,g,y)(),d[0]===uo)return d;g=typeof d[1]=="number"?d[1]:g+a}}return m}}o(l,"factory")}o(Wl,"visitParents");function GR(t){return Array.isArray(t)?t:typeof t=="number"?[hh,t]:t==null?hT:[t]}o(GR,"toResult");function Hl(t,e,r,n){let i,s,a;typeof e=="function"&&typeof r!="function"?(s=void 0,a=e,i=r):(s=e,a=r,i=n),Wl(t,s,l,i);function l(c,u){let f=u[u.length-1],p=f?f.children.indexOf(c):void 0;return a(c,p,f)}o(l,"overload")}o(Hl,"visit");var $g={}.hasOwnProperty,JR={};function dT(t,e){let r=e||JR,n=new Map,i=new Map,s=new Map,a={...Fg,...r.handlers},l={all:u,applyData:XR,definitionById:n,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:a,one:c,options:r,patch:QR,wrap:eA};return Hl(t,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){let p=f.type==="definition"?n:i,h=String(f.identifier).toUpperCase();p.has(h)||p.set(h,f)}}),l;function c(f,p){let h=f.type,m=l.handlers[h];if($g.call(l.handlers,h)&&m)return m(l,f,p);if(l.options.passThrough&&l.options.passThrough.includes(h)){if("children"in f){let{children:g,...y}=f,x=fi(y);return x.children=l.all(f),x}return fi(f)}return(l.options.unknownHandler||ZR)(l,f,p)}o(c,"one");function u(f){let p=[];if("children"in f){let h=f.children,m=-1;for(;++m<h.length;){let d=l.one(h[m],f);if(d){if(m&&h[m-1].type==="break"&&(!Array.isArray(d)&&d.type==="text"&&(d.value=mT(d.value)),!Array.isArray(d)&&d.type==="element")){let g=d.children[0];g&&g.type==="text"&&(g.value=mT(g.value))}Array.isArray(d)?p.push(...d):p.push(d)}}}return p}o(u,"all")}o(dT,"createState");function QR(t,e){t.position&&(e.position=Bl(t))}o(QR,"patch");function XR(t,e){let r=e;if(t&&t.data){let n=t.data.hName,i=t.data.hChildren,s=t.data.hProperties;if(typeof n=="string")if(r.type==="element")r.tagName=n;else{let a="children"in r?r.children:[r];r={type:"element",tagName:n,properties:{},children:a}}r.type==="element"&&s&&Object.assign(r.properties,fi(s)),"children"in r&&r.children&&i!==null&&i!==void 0&&(r.children=i)}return r}o(XR,"applyData");function ZR(t,e){let r=e.data||{},n="value"in e&&!($g.call(r,"hProperties")||$g.call(r,"hChildren"))?{type:"text",value:e.value}:{type:"element",tagName:"div",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}o(ZR,"defaultUnknownHandler");function eA(t,e){let r=[],n=-1;for(e&&r.push({type:"text",value:`
154
+ `}]}}o(xT,"footer");var wT=o((function(t,e,r,n,i){let s=In(e);if(r!=null&&(typeof r!="number"||r<0||r===Number.POSITIVE_INFINITY))throw new Error("Expected positive finite index");if(n!=null&&(!wT(n)||!n.children))throw new Error("Expected parent node");if(n==null!=(r==null))throw new Error("Expected both parent and index");return bT(t)?s.call(i,t,r,n):!1}),"is"),In=o((function(t){if(t==null)return fA;if(typeof t=="function")return yh(t);if(typeof t=="object")return Array.isArray(t)?lA(t):cA(t);if(typeof t=="string")return uA(t);throw new Error("Expected function, string, or object as test")}),"convert");function lA(t){let e=[],r=-1;for(;++r<t.length;)e[r]=In(t[r]);return yh(n);function n(...i){let s=-1;for(;++s<e.length;)if(e[s].apply(this,i))return!0;return!1}}o(lA,"anyFactory");function cA(t){let e=t;return yh(r);function r(n){let i=n,s;for(s in t)if(i[s]!==e[s])return!1;return!0}}o(cA,"propertiesFactory");function uA(t){return yh(e);function e(r){return r&&r.type===t}}o(uA,"typeFactory");function yh(t){return e;function e(r,n,i){return!!(bT(r)&&t.call(this,r,typeof n=="number"?n:void 0,i||void 0))}}o(yh,"castFactory");function fA(){return!0}o(fA,"ok");function bT(t){return t!==null&&typeof t=="object"&&"type"in t}o(bT,"looksLikeANode");var vT=[],xh=!0,co=!1,bh="skip";function ql(t,e,r,n){let i;typeof e=="function"&&typeof r!="function"?(n=r,r=e):i=e;let s=In(i),a=n?-1:1;l(t,void 0,[])();function l(c,u,f){let p=c&&typeof c=="object"?c:{};if(typeof p.type=="string"){let m=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(c.type+(m?"<"+m+">":""))+")"})}return h;function h(){let m=vT,d,g,y;if((!e||s(c,u,f[f.length-1]||void 0))&&(m=pA(r(c,f)),m[0]===co))return m;if("children"in c&&c.children){let x=c;if(x.children&&m[0]!==bh)for(g=(n?x.children.length:-1)+a,y=f.concat(x);g>-1&&g<x.children.length;){let T=x.children[g];if(d=l(T,g,y)(),d[0]===co)return d;g=typeof d[1]=="number"?d[1]:g+a}}return m}}o(l,"factory")}o(ql,"visitParents");function pA(t){return Array.isArray(t)?t:typeof t=="number"?[xh,t]:t==null?vT:[t]}o(pA,"toResult");function Yl(t,e,r,n){let i,s,a;typeof e=="function"&&typeof r!="function"?(s=void 0,a=e,i=r):(s=e,a=r,i=n),ql(t,s,l,i);function l(c,u){let f=u[u.length-1],p=f?f.children.indexOf(c):void 0;return a(c,p,f)}o(l,"overload")}o(Yl,"visit");var Hg={}.hasOwnProperty,hA={};function kT(t,e){let r=e||hA,n=new Map,i=new Map,s=new Map,a={...Wg,...r.handlers},l={all:u,applyData:dA,definitionById:n,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:a,one:c,options:r,patch:mA,wrap:yA};return Yl(t,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){let p=f.type==="definition"?n:i,h=String(f.identifier).toUpperCase();p.has(h)||p.set(h,f)}}),l;function c(f,p){let h=f.type,m=l.handlers[h];if(Hg.call(l.handlers,h)&&m)return m(l,f,p);if(l.options.passThrough&&l.options.passThrough.includes(h)){if("children"in f){let{children:g,...y}=f,x=ui(y);return x.children=l.all(f),x}return ui(f)}return(l.options.unknownHandler||gA)(l,f,p)}o(c,"one");function u(f){let p=[];if("children"in f){let h=f.children,m=-1;for(;++m<h.length;){let d=l.one(h[m],f);if(d){if(m&&h[m-1].type==="break"&&(!Array.isArray(d)&&d.type==="text"&&(d.value=ST(d.value)),!Array.isArray(d)&&d.type==="element")){let g=d.children[0];g&&g.type==="text"&&(g.value=ST(g.value))}Array.isArray(d)?p.push(...d):p.push(d)}}}return p}o(u,"all")}o(kT,"createState");function mA(t,e){t.position&&(e.position=Wl(t))}o(mA,"patch");function dA(t,e){let r=e;if(t&&t.data){let n=t.data.hName,i=t.data.hChildren,s=t.data.hProperties;if(typeof n=="string")if(r.type==="element")r.tagName=n;else{let a="children"in r?r.children:[r];r={type:"element",tagName:n,properties:{},children:a}}r.type==="element"&&s&&Object.assign(r.properties,ui(s)),"children"in r&&r.children&&i!==null&&i!==void 0&&(r.children=i)}return r}o(dA,"applyData");function gA(t,e){let r=e.data||{},n="value"in e&&!(Hg.call(r,"hProperties")||Hg.call(r,"hChildren"))?{type:"text",value:e.value}:{type:"element",tagName:"div",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}o(gA,"defaultUnknownHandler");function yA(t,e){let r=[],n=-1;for(e&&r.push({type:"text",value:`
155
155
  `});++n<t.length;)n&&r.push({type:"text",value:`
156
156
  `}),r.push(t[n]);return e&&t.length>0&&r.push({type:"text",value:`
157
- `}),r}o(eA,"wrap");function mT(t){let e=0,r=t.charCodeAt(e);for(;r===9||r===32;)e++,r=t.charCodeAt(e);return t.slice(e)}o(mT,"trimMarkdownSpaceStart");function Bg(t,e){let r=dT(t,e),n=r.one(t,void 0),i=uT(r),s=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return i&&("children"in s,s.children.push({type:"text",value:`
158
- `},i)),s}o(Bg,"toHast");var gT=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];var In=class{static{o(this,"Schema")}constructor(e,r,n){this.normal=r,this.property=e,n&&(this.space=n)}};In.prototype.normal={},In.prototype.property={},In.prototype.space=void 0;function jg(t,e){let r={},n={};for(let i of t)Object.assign(r,i.property),Object.assign(n,i.normal);return new In(r,n,e)}o(jg,"merge");function Qs(t){return t.toLowerCase()}o(Qs,"normalize");var ct=class{static{o(this,"Info")}constructor(e,r){this.attribute=r,this.property=e}};ct.prototype.attribute="",ct.prototype.booleanish=!1,ct.prototype.boolean=!1,ct.prototype.commaOrSpaceSeparated=!1,ct.prototype.commaSeparated=!1,ct.prototype.defined=!1,ct.prototype.mustUseProperty=!1,ct.prototype.number=!1,ct.prototype.overloadedBoolean=!1,ct.prototype.property="",ct.prototype.spaceSeparated=!1,ct.prototype.space=void 0;var Ul={};se(Ul,{boolean:()=>ce,booleanish:()=>Ue,commaOrSpaceSeparated:()=>qt,commaSeparated:()=>mi,number:()=>H,overloadedBoolean:()=>dh,spaceSeparated:()=>Ne});var tA=0,ce=fo(),Ue=fo(),dh=fo(),H=fo(),Ne=fo(),mi=fo(),qt=fo();function fo(){return 2**++tA}o(fo,"increment");var zg=Object.keys(Ul),po=class extends ct{static{o(this,"DefinedInfo")}constructor(e,r,n,i){let s=-1;if(super(e,r),yT(this,"space",i),typeof n=="number")for(;++s<zg.length;){let a=zg[s];yT(this,zg[s],(n&Ul[a])===Ul[a])}}};po.prototype.defined=!0;function yT(t,e,r){r&&(t[e]=r)}o(yT,"mark");function yr(t){let e={},r={};for(let[n,i]of Object.entries(t.properties)){let s=new po(n,t.transform(t.attributes||{},n),i,t.space);t.mustUseProperty&&t.mustUseProperty.includes(n)&&(s.mustUseProperty=!0),e[n]=s,r[Qs(n)]=n,r[Qs(s.attribute)]=n}return new In(e,r,t.space)}o(yr,"create");var Wg=yr({properties:{ariaActiveDescendant:null,ariaAtomic:Ue,ariaAutoComplete:null,ariaBusy:Ue,ariaChecked:Ue,ariaColCount:H,ariaColIndex:H,ariaColSpan:H,ariaControls:Ne,ariaCurrent:null,ariaDescribedBy:Ne,ariaDetails:null,ariaDisabled:Ue,ariaDropEffect:Ne,ariaErrorMessage:null,ariaExpanded:Ue,ariaFlowTo:Ne,ariaGrabbed:Ue,ariaHasPopup:null,ariaHidden:Ue,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ne,ariaLevel:H,ariaLive:null,ariaModal:Ue,ariaMultiLine:Ue,ariaMultiSelectable:Ue,ariaOrientation:null,ariaOwns:Ne,ariaPlaceholder:null,ariaPosInSet:H,ariaPressed:Ue,ariaReadOnly:Ue,ariaRelevant:null,ariaRequired:Ue,ariaRoleDescription:Ne,ariaRowCount:H,ariaRowIndex:H,ariaRowSpan:H,ariaSelected:Ue,ariaSetSize:H,ariaSort:null,ariaValueMax:H,ariaValueMin:H,ariaValueNow:H,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function gh(t,e){return e in t?t[e]:e}o(gh,"caseSensitiveTransform");function yh(t,e){return gh(t,e.toLowerCase())}o(yh,"caseInsensitiveTransform");var xT=yr({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:mi,acceptCharset:Ne,accessKey:Ne,action:null,allow:null,allowFullScreen:ce,allowPaymentRequest:ce,allowUserMedia:ce,alt:null,as:null,async:ce,autoCapitalize:null,autoComplete:Ne,autoFocus:ce,autoPlay:ce,blocking:Ne,capture:null,charSet:null,checked:ce,cite:null,className:Ne,cols:H,colSpan:null,content:null,contentEditable:Ue,controls:ce,controlsList:Ne,coords:H|mi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ce,defer:ce,dir:null,dirName:null,disabled:ce,download:dh,draggable:Ue,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ce,formTarget:null,headers:Ne,height:H,hidden:dh,high:H,href:null,hrefLang:null,htmlFor:Ne,httpEquiv:Ne,id:null,imageSizes:null,imageSrcSet:null,inert:ce,inputMode:null,integrity:null,is:null,isMap:ce,itemId:null,itemProp:Ne,itemRef:Ne,itemScope:ce,itemType:Ne,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ce,low:H,manifest:null,max:null,maxLength:H,media:null,method:null,min:null,minLength:H,multiple:ce,muted:ce,name:null,nonce:null,noModule:ce,noValidate:ce,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ce,optimum:H,pattern:null,ping:Ne,placeholder:null,playsInline:ce,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ce,referrerPolicy:null,rel:Ne,required:ce,reversed:ce,rows:H,rowSpan:H,sandbox:Ne,scope:null,scoped:ce,seamless:ce,selected:ce,shadowRootClonable:ce,shadowRootDelegatesFocus:ce,shadowRootMode:null,shape:null,size:H,sizes:null,slot:null,span:H,spellCheck:Ue,src:null,srcDoc:null,srcLang:null,srcSet:null,start:H,step:null,style:null,tabIndex:H,target:null,title:null,translate:null,type:null,typeMustMatch:ce,useMap:null,value:Ue,width:H,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ne,axis:null,background:null,bgColor:null,border:H,borderColor:null,bottomMargin:H,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ce,declare:ce,event:null,face:null,frame:null,frameBorder:null,hSpace:H,leftMargin:H,link:null,longDesc:null,lowSrc:null,marginHeight:H,marginWidth:H,noResize:ce,noHref:ce,noShade:ce,noWrap:ce,object:null,profile:null,prompt:null,rev:null,rightMargin:H,rules:null,scheme:null,scrolling:Ue,standby:null,summary:null,text:null,topMargin:H,valueType:null,version:null,vAlign:null,vLink:null,vSpace:H,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ce,disableRemotePlayback:ce,prefix:null,property:null,results:H,security:null,unselectable:null},space:"html",transform:yh});var bT=yr({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:qt,accentHeight:H,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:H,amplitude:H,arabicForm:null,ascent:H,attributeName:null,attributeType:null,azimuth:H,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:H,by:null,calcMode:null,capHeight:H,className:Ne,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:H,diffuseConstant:H,direction:null,display:null,dur:null,divisor:H,dominantBaseline:null,download:ce,dx:null,dy:null,edgeMode:null,editable:null,elevation:H,enableBackground:null,end:null,event:null,exponent:H,externalResourcesRequired:null,fill:null,fillOpacity:H,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:mi,g2:mi,glyphName:mi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:H,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:H,horizOriginX:H,horizOriginY:H,id:null,ideographic:H,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:H,k:H,k1:H,k2:H,k3:H,k4:H,kernelMatrix:qt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:H,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:H,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:H,overlineThickness:H,paintOrder:null,panose1:null,path:null,pathLength:H,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ne,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:H,pointsAtY:H,pointsAtZ:H,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:qt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:qt,rev:qt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:qt,requiredFeatures:qt,requiredFonts:qt,requiredFormats:qt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:H,specularExponent:H,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:H,strikethroughThickness:H,string:null,stroke:null,strokeDashArray:qt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:H,strokeOpacity:H,strokeWidth:null,style:null,surfaceScale:H,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:qt,tabIndex:H,tableValues:null,target:null,targetX:H,targetY:H,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:qt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:H,underlineThickness:H,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:H,values:null,vAlphabetic:H,vMathematical:H,vectorEffect:null,vHanging:H,vIdeographic:H,version:null,vertAdvY:H,vertOriginX:H,vertOriginY:H,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:H,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:gh});var Hg=yr({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()}});var Ug=yr({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:yh});var qg=yr({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}});var rA=/[A-Z]/g,wT=/-[a-z]/g,nA=/^data[-\w.:]+$/i;function Yg(t,e){let r=Qs(e),n=e,i=ct;if(r in t.normal)return t.property[t.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&nA.test(e)){if(e.charAt(4)==="-"){let s=e.slice(5).replace(wT,oA);n="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{let s=e.slice(4);if(!wT.test(s)){let a=s.replace(rA,iA);a.charAt(0)!=="-"&&(a="-"+a),e="data"+a}}i=po}return new i(n,e)}o(Yg,"find");function iA(t){return"-"+t.toLowerCase()}o(iA,"kebab");function oA(t){return t.charAt(1).toUpperCase()}o(oA,"camelcase");var ST=jg([Wg,xT,Hg,Ug,qg],"html"),xh=jg([Wg,bT,Hg,Ug,qg],"svg");var vT={}.hasOwnProperty;function bh(t,e){let r=e||{};function n(i,...s){let a=n.invalid,l=n.handlers;if(i&&vT.call(i,t)){let c=String(i[t]);a=vT.call(l,c)?l[c]:n.unknown}if(a)return a.call(this,i,...s)}return o(n,"one"),n.handlers=r.handlers||{},n.invalid=r.invalid,n.unknown=r.unknown,n}o(bh,"zwitch");var sA=/["&'<>`]/g,aA=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,lA=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,cA=/[|\\{}()[\]^$+*?.]/g,kT=new WeakMap;function Vg(t,e){if(t=t.replace(e.subset?uA(e.subset):sA,n),e.subset||e.escapeOnly)return t;return t.replace(aA,r).replace(lA,n);function r(i,s,a){return e.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,a.charCodeAt(s+2),e)}function n(i,s,a){return e.format(i.charCodeAt(0),a.charCodeAt(s+1),e)}}o(Vg,"core");function uA(t){let e=kT.get(t);return e||(e=fA(t),kT.set(t,e)),e}o(uA,"charactersToExpressionCached");function fA(t){let e=[],r=-1;for(;++r<t.length;)e.push(t[r].replace(cA,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}o(fA,"charactersToExpression");var pA=/[\dA-Fa-f]/;function TT(t,e,r){let n="&#x"+t.toString(16).toUpperCase();return r&&e&&!pA.test(String.fromCharCode(e))?n:n+";"}o(TT,"toHexadecimal");var hA=/\d/;function ET(t,e,r){let n="&#"+String(t);return r&&e&&!hA.test(String.fromCharCode(e))?n:n+";"}o(ET,"toDecimal");var DT=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"];var wh={nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",fnof:"\u0192",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",bull:"\u2022",hellip:"\u2026",prime:"\u2032",Prime:"\u2033",oline:"\u203E",frasl:"\u2044",weierp:"\u2118",image:"\u2111",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",lang:"\u2329",rang:"\u232A",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",quot:'"',amp:"&",lt:"<",gt:">",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",circ:"\u02C6",tilde:"\u02DC",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",permil:"\u2030",lsaquo:"\u2039",rsaquo:"\u203A",euro:"\u20AC"};var CT=["cent","copy","divide","gt","lt","not","para","times"];var OT={}.hasOwnProperty,Kg={},Sh;for(Sh in wh)OT.call(wh,Sh)&&(Kg[wh[Sh]]=Sh);var mA=/[^\dA-Za-z]/;function MT(t,e,r,n){let i=String.fromCharCode(t);if(OT.call(Kg,i)){let s=Kg[i],a="&"+s;return r&&DT.includes(s)&&!CT.includes(s)&&(!n||e&&e!==61&&mA.test(String.fromCharCode(e)))?a:a+";"}return""}o(MT,"toNamed");function IT(t,e,r){let n=TT(t,e,r.omitOptionalSemicolons),i;if((r.useNamedReferences||r.useShortestReferences)&&(i=MT(t,e,r.omitOptionalSemicolons,r.attribute)),(r.useShortestReferences||!i)&&r.useShortestReferences){let s=ET(t,e,r.omitOptionalSemicolons);s.length<n.length&&(n=s)}return i&&(!r.useShortestReferences||i.length<n.length)?i:n}o(IT,"formatSmart");function NT(t){return"&#x"+t.toString(16).toUpperCase()+";"}o(NT,"formatBasic");function Nn(t,e){return Vg(t,Object.assign({format:IT},e))}o(Nn,"stringifyEntities");function G$e(t,e){return Vg(t,Object.assign({format:NT},e))}o(G$e,"stringifyEntitiesLight");var dA=/^>|^->|<!--|-->|--!>|<!-$/g,gA=[">"],yA=["<",">"];function PT(t,e,r,n){return n.settings.bogusComments?"<?"+Nn(t.value,Object.assign({},n.settings.characterReferences,{subset:gA}))+">":"<!--"+t.value.replace(dA,i)+"-->";function i(s){return Nn(s,Object.assign({},n.settings.characterReferences,{subset:yA}))}}o(PT,"comment");function _T(t,e,r,n){return"<!"+(n.settings.upperDoctype?"DOCTYPE":"doctype")+(n.settings.tightDoctype?"":" ")+"html>"}o(_T,"doctype");function Xs(t,e){let r=String(t);if(typeof e!="string")throw new TypeError("Expected character");let n=0,i=r.indexOf(e);for(;i!==-1;)n++,i=r.indexOf(e,i+e.length);return n}o(Xs,"ccount");function oBe(t){let e=[],r=String(t||""),n=r.indexOf(","),i=0,s=!1;for(;!s;){n===-1&&(n=r.length,s=!0);let a=r.slice(i,n).trim();(a||!s)&&e.push(a),i=n+1,n=r.indexOf(",",i)}return e}o(oBe,"parse");function LT(t,e){let r=e||{};return(t[t.length-1]===""?[...t,""]:t).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}o(LT,"stringify");function lBe(t){let e=String(t||"").trim();return e?e.split(/[ \t\n\r\f]+/g):[]}o(lBe,"parse");function RT(t){return t.join(" ").trim()}o(RT,"stringify");var xA=/[ \t\n\f\r]/g;function ho(t){return typeof t=="object"?t.type==="text"?AT(t.value):!1:AT(t)}o(ho,"whitespace");function AT(t){return t.replace(xA,"")===""}o(AT,"empty");var Ve=FT(1),Gg=FT(-1),bA=[];function FT(t){return e;function e(r,n,i){let s=r?r.children:bA,a=(n||0)+t,l=s[a];if(!i)for(;l&&ho(l);)a+=t,l=s[a];return l}}o(FT,"siblings");var wA={}.hasOwnProperty;function vh(t){return e;function e(r,n,i){return wA.call(t,r.tagName)&&t[r.tagName](r,n,i)}}o(vh,"omission");var ql=vh({body:vA,caption:Jg,colgroup:Jg,dd:DA,dt:EA,head:Jg,html:SA,li:TA,optgroup:CA,option:OA,p:kA,rp:$T,rt:$T,tbody:IA,td:BT,tfoot:NA,th:BT,thead:MA,tr:PA});function Jg(t,e,r){let n=Ve(r,e,!0);return!n||n.type!=="comment"&&!(n.type==="text"&&ho(n.value.charAt(0)))}o(Jg,"headOrColgroupOrCaption");function SA(t,e,r){let n=Ve(r,e);return!n||n.type!=="comment"}o(SA,"html");function vA(t,e,r){let n=Ve(r,e);return!n||n.type!=="comment"}o(vA,"body");function kA(t,e,r){let n=Ve(r,e);return n?n.type==="element"&&(n.tagName==="address"||n.tagName==="article"||n.tagName==="aside"||n.tagName==="blockquote"||n.tagName==="details"||n.tagName==="div"||n.tagName==="dl"||n.tagName==="fieldset"||n.tagName==="figcaption"||n.tagName==="figure"||n.tagName==="footer"||n.tagName==="form"||n.tagName==="h1"||n.tagName==="h2"||n.tagName==="h3"||n.tagName==="h4"||n.tagName==="h5"||n.tagName==="h6"||n.tagName==="header"||n.tagName==="hgroup"||n.tagName==="hr"||n.tagName==="main"||n.tagName==="menu"||n.tagName==="nav"||n.tagName==="ol"||n.tagName==="p"||n.tagName==="pre"||n.tagName==="section"||n.tagName==="table"||n.tagName==="ul"):!r||!(r.type==="element"&&(r.tagName==="a"||r.tagName==="audio"||r.tagName==="del"||r.tagName==="ins"||r.tagName==="map"||r.tagName==="noscript"||r.tagName==="video"))}o(kA,"p");function TA(t,e,r){let n=Ve(r,e);return!n||n.type==="element"&&n.tagName==="li"}o(TA,"li");function EA(t,e,r){let n=Ve(r,e);return!!(n&&n.type==="element"&&(n.tagName==="dt"||n.tagName==="dd"))}o(EA,"dt");function DA(t,e,r){let n=Ve(r,e);return!n||n.type==="element"&&(n.tagName==="dt"||n.tagName==="dd")}o(DA,"dd");function $T(t,e,r){let n=Ve(r,e);return!n||n.type==="element"&&(n.tagName==="rp"||n.tagName==="rt")}o($T,"rubyElement");function CA(t,e,r){let n=Ve(r,e);return!n||n.type==="element"&&n.tagName==="optgroup"}o(CA,"optgroup");function OA(t,e,r){let n=Ve(r,e);return!n||n.type==="element"&&(n.tagName==="option"||n.tagName==="optgroup")}o(OA,"option");function MA(t,e,r){let n=Ve(r,e);return!!(n&&n.type==="element"&&(n.tagName==="tbody"||n.tagName==="tfoot"))}o(MA,"thead");function IA(t,e,r){let n=Ve(r,e);return!n||n.type==="element"&&(n.tagName==="tbody"||n.tagName==="tfoot")}o(IA,"tbody");function NA(t,e,r){return!Ve(r,e)}o(NA,"tfoot");function PA(t,e,r){let n=Ve(r,e);return!n||n.type==="element"&&n.tagName==="tr"}o(PA,"tr");function BT(t,e,r){let n=Ve(r,e);return!n||n.type==="element"&&(n.tagName==="td"||n.tagName==="th")}o(BT,"cells");var jT=vh({body:RA,colgroup:AA,head:LA,html:_A,tbody:FA});function _A(t){let e=Ve(t,-1);return!e||e.type!=="comment"}o(_A,"html");function LA(t){let e=new Set;for(let n of t.children)if(n.type==="element"&&(n.tagName==="base"||n.tagName==="title")){if(e.has(n.tagName))return!1;e.add(n.tagName)}let r=t.children[0];return!r||r.type==="element"}o(LA,"head");function RA(t){let e=Ve(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&ho(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}o(RA,"body");function AA(t,e,r){let n=Gg(r,e),i=Ve(t,-1,!0);return r&&n&&n.type==="element"&&n.tagName==="colgroup"&&ql(n,r.children.indexOf(n),r)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}o(AA,"colgroup");function FA(t,e,r){let n=Gg(r,e),i=Ve(t,-1);return r&&n&&n.type==="element"&&(n.tagName==="thead"||n.tagName==="tbody")&&ql(n,r.children.indexOf(n),r)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}o(FA,"tbody");var kh={name:[[`
157
+ `}),r}o(yA,"wrap");function ST(t){let e=0,r=t.charCodeAt(e);for(;r===9||r===32;)e++,r=t.charCodeAt(e);return t.slice(e)}o(ST,"trimMarkdownSpaceStart");function Ug(t,e){let r=kT(t,e),n=r.one(t,void 0),i=xT(r),s=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return i&&("children"in s,s.children.push({type:"text",value:`
158
+ `},i)),s}o(Ug,"toHast");var TT=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];var Nn=class{static{o(this,"Schema")}constructor(e,r,n){this.normal=r,this.property=e,n&&(this.space=n)}};Nn.prototype.normal={},Nn.prototype.property={},Nn.prototype.space=void 0;function qg(t,e){let r={},n={};for(let i of t)Object.assign(r,i.property),Object.assign(n,i.normal);return new Nn(r,n,e)}o(qg,"merge");function Xs(t){return t.toLowerCase()}o(Xs,"normalize");var ct=class{static{o(this,"Info")}constructor(e,r){this.attribute=r,this.property=e}};ct.prototype.attribute="",ct.prototype.booleanish=!1,ct.prototype.boolean=!1,ct.prototype.commaOrSpaceSeparated=!1,ct.prototype.commaSeparated=!1,ct.prototype.defined=!1,ct.prototype.mustUseProperty=!1,ct.prototype.number=!1,ct.prototype.overloadedBoolean=!1,ct.prototype.property="",ct.prototype.spaceSeparated=!1,ct.prototype.space=void 0;var Vl={};se(Vl,{boolean:()=>ce,booleanish:()=>Ue,commaOrSpaceSeparated:()=>qt,commaSeparated:()=>hi,number:()=>H,overloadedBoolean:()=>wh,spaceSeparated:()=>Ie});var xA=0,ce=uo(),Ue=uo(),wh=uo(),H=uo(),Ie=uo(),hi=uo(),qt=uo();function uo(){return 2**++xA}o(uo,"increment");var Yg=Object.keys(Vl),fo=class extends ct{static{o(this,"DefinedInfo")}constructor(e,r,n,i){let s=-1;if(super(e,r),ET(this,"space",i),typeof n=="number")for(;++s<Yg.length;){let a=Yg[s];ET(this,Yg[s],(n&Vl[a])===Vl[a])}}};fo.prototype.defined=!0;function ET(t,e,r){r&&(t[e]=r)}o(ET,"mark");function yr(t){let e={},r={};for(let[n,i]of Object.entries(t.properties)){let s=new fo(n,t.transform(t.attributes||{},n),i,t.space);t.mustUseProperty&&t.mustUseProperty.includes(n)&&(s.mustUseProperty=!0),e[n]=s,r[Xs(n)]=n,r[Xs(s.attribute)]=n}return new Nn(e,r,t.space)}o(yr,"create");var Vg=yr({properties:{ariaActiveDescendant:null,ariaAtomic:Ue,ariaAutoComplete:null,ariaBusy:Ue,ariaChecked:Ue,ariaColCount:H,ariaColIndex:H,ariaColSpan:H,ariaControls:Ie,ariaCurrent:null,ariaDescribedBy:Ie,ariaDetails:null,ariaDisabled:Ue,ariaDropEffect:Ie,ariaErrorMessage:null,ariaExpanded:Ue,ariaFlowTo:Ie,ariaGrabbed:Ue,ariaHasPopup:null,ariaHidden:Ue,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ie,ariaLevel:H,ariaLive:null,ariaModal:Ue,ariaMultiLine:Ue,ariaMultiSelectable:Ue,ariaOrientation:null,ariaOwns:Ie,ariaPlaceholder:null,ariaPosInSet:H,ariaPressed:Ue,ariaReadOnly:Ue,ariaRelevant:null,ariaRequired:Ue,ariaRoleDescription:Ie,ariaRowCount:H,ariaRowIndex:H,ariaRowSpan:H,ariaSelected:Ue,ariaSetSize:H,ariaSort:null,ariaValueMax:H,ariaValueMin:H,ariaValueNow:H,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function vh(t,e){return e in t?t[e]:e}o(vh,"caseSensitiveTransform");function Sh(t,e){return vh(t,e.toLowerCase())}o(Sh,"caseInsensitiveTransform");var DT=yr({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:hi,acceptCharset:Ie,accessKey:Ie,action:null,allow:null,allowFullScreen:ce,allowPaymentRequest:ce,allowUserMedia:ce,alt:null,as:null,async:ce,autoCapitalize:null,autoComplete:Ie,autoFocus:ce,autoPlay:ce,blocking:Ie,capture:null,charSet:null,checked:ce,cite:null,className:Ie,cols:H,colSpan:null,content:null,contentEditable:Ue,controls:ce,controlsList:Ie,coords:H|hi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ce,defer:ce,dir:null,dirName:null,disabled:ce,download:wh,draggable:Ue,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ce,formTarget:null,headers:Ie,height:H,hidden:wh,high:H,href:null,hrefLang:null,htmlFor:Ie,httpEquiv:Ie,id:null,imageSizes:null,imageSrcSet:null,inert:ce,inputMode:null,integrity:null,is:null,isMap:ce,itemId:null,itemProp:Ie,itemRef:Ie,itemScope:ce,itemType:Ie,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ce,low:H,manifest:null,max:null,maxLength:H,media:null,method:null,min:null,minLength:H,multiple:ce,muted:ce,name:null,nonce:null,noModule:ce,noValidate:ce,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ce,optimum:H,pattern:null,ping:Ie,placeholder:null,playsInline:ce,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ce,referrerPolicy:null,rel:Ie,required:ce,reversed:ce,rows:H,rowSpan:H,sandbox:Ie,scope:null,scoped:ce,seamless:ce,selected:ce,shadowRootClonable:ce,shadowRootDelegatesFocus:ce,shadowRootMode:null,shape:null,size:H,sizes:null,slot:null,span:H,spellCheck:Ue,src:null,srcDoc:null,srcLang:null,srcSet:null,start:H,step:null,style:null,tabIndex:H,target:null,title:null,translate:null,type:null,typeMustMatch:ce,useMap:null,value:Ue,width:H,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ie,axis:null,background:null,bgColor:null,border:H,borderColor:null,bottomMargin:H,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ce,declare:ce,event:null,face:null,frame:null,frameBorder:null,hSpace:H,leftMargin:H,link:null,longDesc:null,lowSrc:null,marginHeight:H,marginWidth:H,noResize:ce,noHref:ce,noShade:ce,noWrap:ce,object:null,profile:null,prompt:null,rev:null,rightMargin:H,rules:null,scheme:null,scrolling:Ue,standby:null,summary:null,text:null,topMargin:H,valueType:null,version:null,vAlign:null,vLink:null,vSpace:H,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ce,disableRemotePlayback:ce,prefix:null,property:null,results:H,security:null,unselectable:null},space:"html",transform:Sh});var CT=yr({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:qt,accentHeight:H,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:H,amplitude:H,arabicForm:null,ascent:H,attributeName:null,attributeType:null,azimuth:H,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:H,by:null,calcMode:null,capHeight:H,className:Ie,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:H,diffuseConstant:H,direction:null,display:null,dur:null,divisor:H,dominantBaseline:null,download:ce,dx:null,dy:null,edgeMode:null,editable:null,elevation:H,enableBackground:null,end:null,event:null,exponent:H,externalResourcesRequired:null,fill:null,fillOpacity:H,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:hi,g2:hi,glyphName:hi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:H,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:H,horizOriginX:H,horizOriginY:H,id:null,ideographic:H,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:H,k:H,k1:H,k2:H,k3:H,k4:H,kernelMatrix:qt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:H,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:H,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:H,overlineThickness:H,paintOrder:null,panose1:null,path:null,pathLength:H,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ie,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:H,pointsAtY:H,pointsAtZ:H,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:qt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:qt,rev:qt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:qt,requiredFeatures:qt,requiredFonts:qt,requiredFormats:qt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:H,specularExponent:H,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:H,strikethroughThickness:H,string:null,stroke:null,strokeDashArray:qt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:H,strokeOpacity:H,strokeWidth:null,style:null,surfaceScale:H,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:qt,tabIndex:H,tableValues:null,target:null,targetX:H,targetY:H,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:qt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:H,underlineThickness:H,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:H,values:null,vAlphabetic:H,vMathematical:H,vectorEffect:null,vHanging:H,vIdeographic:H,version:null,vertAdvY:H,vertOriginX:H,vertOriginY:H,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:H,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:vh});var Kg=yr({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()}});var Gg=yr({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Sh});var Jg=yr({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}});var bA=/[A-Z]/g,OT=/-[a-z]/g,wA=/^data[-\w.:]+$/i;function Qg(t,e){let r=Xs(e),n=e,i=ct;if(r in t.normal)return t.property[t.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&wA.test(e)){if(e.charAt(4)==="-"){let s=e.slice(5).replace(OT,SA);n="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{let s=e.slice(4);if(!OT.test(s)){let a=s.replace(bA,vA);a.charAt(0)!=="-"&&(a="-"+a),e="data"+a}}i=fo}return new i(n,e)}o(Qg,"find");function vA(t){return"-"+t.toLowerCase()}o(vA,"kebab");function SA(t){return t.charAt(1).toUpperCase()}o(SA,"camelcase");var MT=qg([Vg,DT,Kg,Gg,Jg],"html"),kh=qg([Vg,CT,Kg,Gg,Jg],"svg");var IT={}.hasOwnProperty;function Th(t,e){let r=e||{};function n(i,...s){let a=n.invalid,l=n.handlers;if(i&&IT.call(i,t)){let c=String(i[t]);a=IT.call(l,c)?l[c]:n.unknown}if(a)return a.call(this,i,...s)}return o(n,"one"),n.handlers=r.handlers||{},n.invalid=r.invalid,n.unknown=r.unknown,n}o(Th,"zwitch");var kA=/["&'<>`]/g,TA=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,EA=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,DA=/[|\\{}()[\]^$+*?.]/g,NT=new WeakMap;function Xg(t,e){if(t=t.replace(e.subset?CA(e.subset):kA,n),e.subset||e.escapeOnly)return t;return t.replace(TA,r).replace(EA,n);function r(i,s,a){return e.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,a.charCodeAt(s+2),e)}function n(i,s,a){return e.format(i.charCodeAt(0),a.charCodeAt(s+1),e)}}o(Xg,"core");function CA(t){let e=NT.get(t);return e||(e=OA(t),NT.set(t,e)),e}o(CA,"charactersToExpressionCached");function OA(t){let e=[],r=-1;for(;++r<t.length;)e.push(t[r].replace(DA,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}o(OA,"charactersToExpression");var MA=/[\dA-Fa-f]/;function PT(t,e,r){let n="&#x"+t.toString(16).toUpperCase();return r&&e&&!MA.test(String.fromCharCode(e))?n:n+";"}o(PT,"toHexadecimal");var IA=/\d/;function LT(t,e,r){let n="&#"+String(t);return r&&e&&!IA.test(String.fromCharCode(e))?n:n+";"}o(LT,"toDecimal");var _T=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"];var Eh={nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",fnof:"\u0192",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",bull:"\u2022",hellip:"\u2026",prime:"\u2032",Prime:"\u2033",oline:"\u203E",frasl:"\u2044",weierp:"\u2118",image:"\u2111",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",lang:"\u2329",rang:"\u232A",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",quot:'"',amp:"&",lt:"<",gt:">",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",circ:"\u02C6",tilde:"\u02DC",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",permil:"\u2030",lsaquo:"\u2039",rsaquo:"\u203A",euro:"\u20AC"};var RT=["cent","copy","divide","gt","lt","not","para","times"];var AT={}.hasOwnProperty,Zg={},Dh;for(Dh in Eh)AT.call(Eh,Dh)&&(Zg[Eh[Dh]]=Dh);var NA=/[^\dA-Za-z]/;function FT(t,e,r,n){let i=String.fromCharCode(t);if(AT.call(Zg,i)){let s=Zg[i],a="&"+s;return r&&_T.includes(s)&&!RT.includes(s)&&(!n||e&&e!==61&&NA.test(String.fromCharCode(e)))?a:a+";"}return""}o(FT,"toNamed");function $T(t,e,r){let n=PT(t,e,r.omitOptionalSemicolons),i;if((r.useNamedReferences||r.useShortestReferences)&&(i=FT(t,e,r.omitOptionalSemicolons,r.attribute)),(r.useShortestReferences||!i)&&r.useShortestReferences){let s=LT(t,e,r.omitOptionalSemicolons);s.length<n.length&&(n=s)}return i&&(!r.useShortestReferences||i.length<n.length)?i:n}o($T,"formatSmart");function BT(t){return"&#x"+t.toString(16).toUpperCase()+";"}o(BT,"formatBasic");function Pn(t,e){return Xg(t,Object.assign({format:$T},e))}o(Pn,"stringifyEntities");function DBe(t,e){return Xg(t,Object.assign({format:BT},e))}o(DBe,"stringifyEntitiesLight");var PA=/^>|^->|<!--|-->|--!>|<!-$/g,LA=[">"],_A=["<",">"];function jT(t,e,r,n){return n.settings.bogusComments?"<?"+Pn(t.value,Object.assign({},n.settings.characterReferences,{subset:LA}))+">":"<!--"+t.value.replace(PA,i)+"-->";function i(s){return Pn(s,Object.assign({},n.settings.characterReferences,{subset:_A}))}}o(jT,"comment");function zT(t,e,r,n){return"<!"+(n.settings.upperDoctype?"DOCTYPE":"doctype")+(n.settings.tightDoctype?"":" ")+"html>"}o(zT,"doctype");function Zs(t,e){let r=String(t);if(typeof e!="string")throw new TypeError("Expected character");let n=0,i=r.indexOf(e);for(;i!==-1;)n++,i=r.indexOf(e,i+e.length);return n}o(Zs,"ccount");function ABe(t){let e=[],r=String(t||""),n=r.indexOf(","),i=0,s=!1;for(;!s;){n===-1&&(n=r.length,s=!0);let a=r.slice(i,n).trim();(a||!s)&&e.push(a),i=n+1,n=r.indexOf(",",i)}return e}o(ABe,"parse");function WT(t,e){let r=e||{};return(t[t.length-1]===""?[...t,""]:t).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}o(WT,"stringify");function BBe(t){let e=String(t||"").trim();return e?e.split(/[ \t\n\r\f]+/g):[]}o(BBe,"parse");function HT(t){return t.join(" ").trim()}o(HT,"stringify");var RA=/[ \t\n\f\r]/g;function po(t){return typeof t=="object"?t.type==="text"?UT(t.value):!1:UT(t)}o(po,"whitespace");function UT(t){return t.replace(RA,"")===""}o(UT,"empty");var Ve=qT(1),ey=qT(-1),AA=[];function qT(t){return e;function e(r,n,i){let s=r?r.children:AA,a=(n||0)+t,l=s[a];if(!i)for(;l&&po(l);)a+=t,l=s[a];return l}}o(qT,"siblings");var FA={}.hasOwnProperty;function Ch(t){return e;function e(r,n,i){return FA.call(t,r.tagName)&&t[r.tagName](r,n,i)}}o(Ch,"omission");var Kl=Ch({body:BA,caption:ty,colgroup:ty,dd:HA,dt:WA,head:ty,html:$A,li:zA,optgroup:UA,option:qA,p:jA,rp:YT,rt:YT,tbody:VA,td:VT,tfoot:KA,th:VT,thead:YA,tr:GA});function ty(t,e,r){let n=Ve(r,e,!0);return!n||n.type!=="comment"&&!(n.type==="text"&&po(n.value.charAt(0)))}o(ty,"headOrColgroupOrCaption");function $A(t,e,r){let n=Ve(r,e);return!n||n.type!=="comment"}o($A,"html");function BA(t,e,r){let n=Ve(r,e);return!n||n.type!=="comment"}o(BA,"body");function jA(t,e,r){let n=Ve(r,e);return n?n.type==="element"&&(n.tagName==="address"||n.tagName==="article"||n.tagName==="aside"||n.tagName==="blockquote"||n.tagName==="details"||n.tagName==="div"||n.tagName==="dl"||n.tagName==="fieldset"||n.tagName==="figcaption"||n.tagName==="figure"||n.tagName==="footer"||n.tagName==="form"||n.tagName==="h1"||n.tagName==="h2"||n.tagName==="h3"||n.tagName==="h4"||n.tagName==="h5"||n.tagName==="h6"||n.tagName==="header"||n.tagName==="hgroup"||n.tagName==="hr"||n.tagName==="main"||n.tagName==="menu"||n.tagName==="nav"||n.tagName==="ol"||n.tagName==="p"||n.tagName==="pre"||n.tagName==="section"||n.tagName==="table"||n.tagName==="ul"):!r||!(r.type==="element"&&(r.tagName==="a"||r.tagName==="audio"||r.tagName==="del"||r.tagName==="ins"||r.tagName==="map"||r.tagName==="noscript"||r.tagName==="video"))}o(jA,"p");function zA(t,e,r){let n=Ve(r,e);return!n||n.type==="element"&&n.tagName==="li"}o(zA,"li");function WA(t,e,r){let n=Ve(r,e);return!!(n&&n.type==="element"&&(n.tagName==="dt"||n.tagName==="dd"))}o(WA,"dt");function HA(t,e,r){let n=Ve(r,e);return!n||n.type==="element"&&(n.tagName==="dt"||n.tagName==="dd")}o(HA,"dd");function YT(t,e,r){let n=Ve(r,e);return!n||n.type==="element"&&(n.tagName==="rp"||n.tagName==="rt")}o(YT,"rubyElement");function UA(t,e,r){let n=Ve(r,e);return!n||n.type==="element"&&n.tagName==="optgroup"}o(UA,"optgroup");function qA(t,e,r){let n=Ve(r,e);return!n||n.type==="element"&&(n.tagName==="option"||n.tagName==="optgroup")}o(qA,"option");function YA(t,e,r){let n=Ve(r,e);return!!(n&&n.type==="element"&&(n.tagName==="tbody"||n.tagName==="tfoot"))}o(YA,"thead");function VA(t,e,r){let n=Ve(r,e);return!n||n.type==="element"&&(n.tagName==="tbody"||n.tagName==="tfoot")}o(VA,"tbody");function KA(t,e,r){return!Ve(r,e)}o(KA,"tfoot");function GA(t,e,r){let n=Ve(r,e);return!n||n.type==="element"&&n.tagName==="tr"}o(GA,"tr");function VT(t,e,r){let n=Ve(r,e);return!n||n.type==="element"&&(n.tagName==="td"||n.tagName==="th")}o(VT,"cells");var KT=Ch({body:XA,colgroup:ZA,head:QA,html:JA,tbody:eF});function JA(t){let e=Ve(t,-1);return!e||e.type!=="comment"}o(JA,"html");function QA(t){let e=new Set;for(let n of t.children)if(n.type==="element"&&(n.tagName==="base"||n.tagName==="title")){if(e.has(n.tagName))return!1;e.add(n.tagName)}let r=t.children[0];return!r||r.type==="element"}o(QA,"head");function XA(t){let e=Ve(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&po(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}o(XA,"body");function ZA(t,e,r){let n=ey(r,e),i=Ve(t,-1,!0);return r&&n&&n.type==="element"&&n.tagName==="colgroup"&&Kl(n,r.children.indexOf(n),r)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}o(ZA,"colgroup");function eF(t,e,r){let n=ey(r,e),i=Ve(t,-1);return r&&n&&n.type==="element"&&(n.tagName==="thead"||n.tagName==="tbody")&&Kl(n,r.children.indexOf(n),r)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}o(eF,"tbody");var Oh={name:[[`
159
159
  \f\r &/=>`.split(""),`
160
160
  \f\r "&'/=>\``.split("")],[`\0
161
161
  \f\r "&'/<=>`.split(""),`\0
@@ -163,53 +163,53 @@ ${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.pus
163
163
  \f\r &>`.split(""),`\0
164
164
  \f\r "&'<=>\``.split("")],[`\0
165
165
  \f\r "&'<=>\``.split(""),`\0
166
- \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function zT(t,e,r,n){let i=n.schema,s=i.space==="svg"?!1:n.settings.omitOptionalTags,a=i.space==="svg"?n.settings.closeEmptyElements:n.settings.voids.includes(t.tagName.toLowerCase()),l=[],c;i.space==="html"&&t.tagName==="svg"&&(n.schema=xh);let u=$A(n,t.properties),f=n.all(i.space==="html"&&t.tagName==="template"?t.content:t);return n.schema=i,f&&(a=!1),(u||!s||!jT(t,e,r))&&(l.push("<",t.tagName,u?" "+u:""),a&&(i.space==="svg"||n.settings.closeSelfClosing)&&(c=u.charAt(u.length-1),(!n.settings.tightSelfClosing||c==="/"||c&&c!=='"'&&c!=="'")&&l.push(" "),l.push("/")),l.push(">")),l.push(f),!a&&(!s||!ql(t,e,r))&&l.push("</"+t.tagName+">"),l.join("")}o(zT,"element");function $A(t,e){let r=[],n=-1,i;if(e){for(i in e)if(e[i]!==null&&e[i]!==void 0){let s=BA(t,i,e[i]);s&&r.push(s)}}for(;++n<r.length;){let s=t.settings.tightAttributes?r[n].charAt(r[n].length-1):void 0;n!==r.length-1&&s!=='"'&&s!=="'"&&(r[n]+=" ")}return r.join("")}o($A,"serializeAttributes");function BA(t,e,r){let n=Yg(t.schema,e),i=t.settings.allowParseErrors&&t.schema.space==="html"?0:1,s=t.settings.allowDangerousCharacters?0:1,a=t.quote,l;if(n.overloadedBoolean&&(r===n.attribute||r==="")?r=!0:(n.boolean||n.overloadedBoolean)&&(typeof r!="string"||r===n.attribute||r==="")&&(r=!!r),r==null||r===!1||typeof r=="number"&&Number.isNaN(r))return"";let c=Nn(n.attribute,Object.assign({},t.settings.characterReferences,{subset:kh.name[i][s]}));return r===!0||(r=Array.isArray(r)?(n.commaSeparated?LT:RT)(r,{padLeft:!t.settings.tightCommaSeparatedLists}):String(r),t.settings.collapseEmptyAttributes&&!r)?c:(t.settings.preferUnquoted&&(l=Nn(r,Object.assign({},t.settings.characterReferences,{attribute:!0,subset:kh.unquoted[i][s]}))),l!==r&&(t.settings.quoteSmart&&Xs(r,a)>Xs(r,t.alternative)&&(a=t.alternative),l=a+Nn(r,Object.assign({},t.settings.characterReferences,{subset:(a==="'"?kh.single:kh.double)[i][s],attribute:!0}))+a),c+(l&&"="+l))}o(BA,"serializeAttribute");var jA=["<","&"];function Th(t,e,r,n){return r&&r.type==="element"&&(r.tagName==="script"||r.tagName==="style")?t.value:Nn(t.value,Object.assign({},n.settings.characterReferences,{subset:jA}))}o(Th,"text");function WT(t,e,r,n){return n.settings.allowDangerousHtml?t.value:Th(t,e,r,n)}o(WT,"raw");function HT(t,e,r,n){return n.all(t)}o(HT,"root");var UT=bh("type",{invalid:zA,unknown:WA,handlers:{comment:PT,doctype:_T,element:zT,raw:WT,root:HT,text:Th}});function zA(t){throw new Error("Expected node, not `"+t+"`")}o(zA,"invalid");function WA(t){let e=t;throw new Error("Cannot compile unknown node `"+e.type+"`")}o(WA,"unknown");var HA={},UA={},qA=[];function Qg(t,e){let r=e||HA,n=r.quote||'"',i=n==='"'?"'":'"';if(n!=='"'&&n!=="'")throw new Error("Invalid quote `"+n+"`, expected `'` or `\"`");return{one:YA,all:VA,settings:{omitOptionalTags:r.omitOptionalTags||!1,allowParseErrors:r.allowParseErrors||!1,allowDangerousCharacters:r.allowDangerousCharacters||!1,quoteSmart:r.quoteSmart||!1,preferUnquoted:r.preferUnquoted||!1,tightAttributes:r.tightAttributes||!1,upperDoctype:r.upperDoctype||!1,tightDoctype:r.tightDoctype||!1,bogusComments:r.bogusComments||!1,tightCommaSeparatedLists:r.tightCommaSeparatedLists||!1,tightSelfClosing:r.tightSelfClosing||!1,collapseEmptyAttributes:r.collapseEmptyAttributes||!1,allowDangerousHtml:r.allowDangerousHtml||!1,voids:r.voids||gT,characterReferences:r.characterReferences||UA,closeSelfClosing:r.closeSelfClosing||!1,closeEmptyElements:r.closeEmptyElements||!1},schema:r.space==="svg"?xh:ST,quote:n,alternative:i}.one(Array.isArray(t)?{type:"root",children:t}:t,void 0,void 0)}o(Qg,"toHtml");function YA(t,e,r){return UT(t,e,r,this)}o(YA,"one");function VA(t){let e=[],r=t&&t.children||qA,n=-1;for(;++n<r.length;)e[n]=this.one(r[n],n,t);return e.join("")}o(VA,"all");var KA={};function Zs(t){let e=this,{handlers:r,sanitize:n,...i}=t||KA,s=!1,a;typeof n=="boolean"?s=!n:n&&(a=n),e.compiler=l;function l(c,u){let f=Bg(c,{handlers:r,allowDangerousHtml:s}),p=s?f:Ag(f,a),h=Qg(p,{...i,allowDangerousHtml:s});return u.extname&&(u.extname=".html"),c&&c.type==="root"&&h&&/[^\r\n]/.test(h.charAt(h.length-1))?h+`
167
- `:h}o(l,"compiler")}o(Zs,"remarkHtml");var GA={}.hasOwnProperty;function Xg(t,e){let r=-1,n;if(e.extensions)for(;++r<e.extensions.length;)Xg(t,e.extensions[r]);for(n in e)if(GA.call(e,n))switch(n){case"extensions":break;case"unsafe":{qT(t[n],e[n]);break}case"join":{qT(t[n],e[n]);break}case"handlers":{JA(t[n],e[n]);break}default:t.options[n]=e[n]}return t}o(Xg,"configure");function qT(t,e){e&&t.push(...e)}o(qT,"list");function JA(t,e){e&&Object.assign(t,e)}o(JA,"map");function YT(t,e,r,n){let i=r.enter("blockquote"),s=r.createTracker(n);s.move("> "),s.shift(2);let a=r.indentLines(r.containerFlow(t,s.current()),QA);return i(),a}o(YT,"blockquote");function QA(t,e,r){return">"+(r?"":" ")+t}o(QA,"map");function Eh(t,e){return VT(t,e.inConstruct,!0)&&!VT(t,e.notInConstruct,!1)}o(Eh,"patternInScope");function VT(t,e,r){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return r;let n=-1;for(;++n<e.length;)if(t.includes(e[n]))return!0;return!1}o(VT,"listInScope");function Zg(t,e,r,n){let i=-1;for(;++i<r.unsafe.length;)if(r.unsafe[i].character===`
168
- `&&Eh(r.stack,r.unsafe[i]))return/[ \t]/.test(n.before)?"":" ";return`\\
169
- `}o(Zg,"hardBreak");function KT(t,e){let r=String(t),n=r.indexOf(e),i=n,s=0,a=0;if(typeof e!="string")throw new TypeError("Expected substring");for(;n!==-1;)n===i?++s>a&&(a=s):s=1,i=n+e.length,n=r.indexOf(e,i);return a}o(KT,"longestStreak");function Yl(t,e){return!!(e.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}o(Yl,"formatCodeAsIndented");function GT(t){let e=t.options.fence||"`";if(e!=="`"&&e!=="~")throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`");return e}o(GT,"checkFence");function JT(t,e,r,n){let i=GT(r),s=t.value||"",a=i==="`"?"GraveAccent":"Tilde";if(Yl(t,r)){let p=r.enter("codeIndented"),h=r.indentLines(s,XA);return p(),h}let l=r.createTracker(n),c=i.repeat(Math.max(KT(s,i)+1,3)),u=r.enter("codeFenced"),f=l.move(c);if(t.lang){let p=r.enter(`codeFencedLang${a}`);f+=l.move(r.safe(t.lang,{before:f,after:" ",encode:["`"],...l.current()})),p()}if(t.lang&&t.meta){let p=r.enter(`codeFencedMeta${a}`);f+=l.move(" "),f+=l.move(r.safe(t.meta,{before:f,after:`
166
+ \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function GT(t,e,r,n){let i=n.schema,s=i.space==="svg"?!1:n.settings.omitOptionalTags,a=i.space==="svg"?n.settings.closeEmptyElements:n.settings.voids.includes(t.tagName.toLowerCase()),l=[],c;i.space==="html"&&t.tagName==="svg"&&(n.schema=kh);let u=tF(n,t.properties),f=n.all(i.space==="html"&&t.tagName==="template"?t.content:t);return n.schema=i,f&&(a=!1),(u||!s||!KT(t,e,r))&&(l.push("<",t.tagName,u?" "+u:""),a&&(i.space==="svg"||n.settings.closeSelfClosing)&&(c=u.charAt(u.length-1),(!n.settings.tightSelfClosing||c==="/"||c&&c!=='"'&&c!=="'")&&l.push(" "),l.push("/")),l.push(">")),l.push(f),!a&&(!s||!Kl(t,e,r))&&l.push("</"+t.tagName+">"),l.join("")}o(GT,"element");function tF(t,e){let r=[],n=-1,i;if(e){for(i in e)if(e[i]!==null&&e[i]!==void 0){let s=rF(t,i,e[i]);s&&r.push(s)}}for(;++n<r.length;){let s=t.settings.tightAttributes?r[n].charAt(r[n].length-1):void 0;n!==r.length-1&&s!=='"'&&s!=="'"&&(r[n]+=" ")}return r.join("")}o(tF,"serializeAttributes");function rF(t,e,r){let n=Qg(t.schema,e),i=t.settings.allowParseErrors&&t.schema.space==="html"?0:1,s=t.settings.allowDangerousCharacters?0:1,a=t.quote,l;if(n.overloadedBoolean&&(r===n.attribute||r==="")?r=!0:(n.boolean||n.overloadedBoolean)&&(typeof r!="string"||r===n.attribute||r==="")&&(r=!!r),r==null||r===!1||typeof r=="number"&&Number.isNaN(r))return"";let c=Pn(n.attribute,Object.assign({},t.settings.characterReferences,{subset:Oh.name[i][s]}));return r===!0||(r=Array.isArray(r)?(n.commaSeparated?WT:HT)(r,{padLeft:!t.settings.tightCommaSeparatedLists}):String(r),t.settings.collapseEmptyAttributes&&!r)?c:(t.settings.preferUnquoted&&(l=Pn(r,Object.assign({},t.settings.characterReferences,{attribute:!0,subset:Oh.unquoted[i][s]}))),l!==r&&(t.settings.quoteSmart&&Zs(r,a)>Zs(r,t.alternative)&&(a=t.alternative),l=a+Pn(r,Object.assign({},t.settings.characterReferences,{subset:(a==="'"?Oh.single:Oh.double)[i][s],attribute:!0}))+a),c+(l&&"="+l))}o(rF,"serializeAttribute");var nF=["<","&"];function Mh(t,e,r,n){return r&&r.type==="element"&&(r.tagName==="script"||r.tagName==="style")?t.value:Pn(t.value,Object.assign({},n.settings.characterReferences,{subset:nF}))}o(Mh,"text");function JT(t,e,r,n){return n.settings.allowDangerousHtml?t.value:Mh(t,e,r,n)}o(JT,"raw");function QT(t,e,r,n){return n.all(t)}o(QT,"root");var XT=Th("type",{invalid:iF,unknown:oF,handlers:{comment:jT,doctype:zT,element:GT,raw:JT,root:QT,text:Mh}});function iF(t){throw new Error("Expected node, not `"+t+"`")}o(iF,"invalid");function oF(t){let e=t;throw new Error("Cannot compile unknown node `"+e.type+"`")}o(oF,"unknown");var sF={},aF={},lF=[];function ry(t,e){let r=e||sF,n=r.quote||'"',i=n==='"'?"'":'"';if(n!=='"'&&n!=="'")throw new Error("Invalid quote `"+n+"`, expected `'` or `\"`");return{one:cF,all:uF,settings:{omitOptionalTags:r.omitOptionalTags||!1,allowParseErrors:r.allowParseErrors||!1,allowDangerousCharacters:r.allowDangerousCharacters||!1,quoteSmart:r.quoteSmart||!1,preferUnquoted:r.preferUnquoted||!1,tightAttributes:r.tightAttributes||!1,upperDoctype:r.upperDoctype||!1,tightDoctype:r.tightDoctype||!1,bogusComments:r.bogusComments||!1,tightCommaSeparatedLists:r.tightCommaSeparatedLists||!1,tightSelfClosing:r.tightSelfClosing||!1,collapseEmptyAttributes:r.collapseEmptyAttributes||!1,allowDangerousHtml:r.allowDangerousHtml||!1,voids:r.voids||TT,characterReferences:r.characterReferences||aF,closeSelfClosing:r.closeSelfClosing||!1,closeEmptyElements:r.closeEmptyElements||!1},schema:r.space==="svg"?kh:MT,quote:n,alternative:i}.one(Array.isArray(t)?{type:"root",children:t}:t,void 0,void 0)}o(ry,"toHtml");function cF(t,e,r){return XT(t,e,r,this)}o(cF,"one");function uF(t){let e=[],r=t&&t.children||lF,n=-1;for(;++n<r.length;)e[n]=this.one(r[n],n,t);return e.join("")}o(uF,"all");var fF={};function ea(t){let e=this,{handlers:r,sanitize:n,...i}=t||fF,s=!1,a;typeof n=="boolean"?s=!n:n&&(a=n),e.compiler=l;function l(c,u){let f=Ug(c,{handlers:r,allowDangerousHtml:s}),p=s?f:zg(f,a),h=ry(p,{...i,allowDangerousHtml:s});return u.extname&&(u.extname=".html"),c&&c.type==="root"&&h&&/[^\r\n]/.test(h.charAt(h.length-1))?h+`
167
+ `:h}o(l,"compiler")}o(ea,"remarkHtml");var pF={}.hasOwnProperty;function ny(t,e){let r=-1,n;if(e.extensions)for(;++r<e.extensions.length;)ny(t,e.extensions[r]);for(n in e)if(pF.call(e,n))switch(n){case"extensions":break;case"unsafe":{ZT(t[n],e[n]);break}case"join":{ZT(t[n],e[n]);break}case"handlers":{hF(t[n],e[n]);break}default:t.options[n]=e[n]}return t}o(ny,"configure");function ZT(t,e){e&&t.push(...e)}o(ZT,"list");function hF(t,e){e&&Object.assign(t,e)}o(hF,"map");function eE(t,e,r,n){let i=r.enter("blockquote"),s=r.createTracker(n);s.move("> "),s.shift(2);let a=r.indentLines(r.containerFlow(t,s.current()),mF);return i(),a}o(eE,"blockquote");function mF(t,e,r){return">"+(r?"":" ")+t}o(mF,"map");function Ih(t,e){return tE(t,e.inConstruct,!0)&&!tE(t,e.notInConstruct,!1)}o(Ih,"patternInScope");function tE(t,e,r){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return r;let n=-1;for(;++n<e.length;)if(t.includes(e[n]))return!0;return!1}o(tE,"listInScope");function iy(t,e,r,n){let i=-1;for(;++i<r.unsafe.length;)if(r.unsafe[i].character===`
168
+ `&&Ih(r.stack,r.unsafe[i]))return/[ \t]/.test(n.before)?"":" ";return`\\
169
+ `}o(iy,"hardBreak");function rE(t,e){let r=String(t),n=r.indexOf(e),i=n,s=0,a=0;if(typeof e!="string")throw new TypeError("Expected substring");for(;n!==-1;)n===i?++s>a&&(a=s):s=1,i=n+e.length,n=r.indexOf(e,i);return a}o(rE,"longestStreak");function Gl(t,e){return!!(e.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}o(Gl,"formatCodeAsIndented");function nE(t){let e=t.options.fence||"`";if(e!=="`"&&e!=="~")throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`");return e}o(nE,"checkFence");function iE(t,e,r,n){let i=nE(r),s=t.value||"",a=i==="`"?"GraveAccent":"Tilde";if(Gl(t,r)){let p=r.enter("codeIndented"),h=r.indentLines(s,dF);return p(),h}let l=r.createTracker(n),c=i.repeat(Math.max(rE(s,i)+1,3)),u=r.enter("codeFenced"),f=l.move(c);if(t.lang){let p=r.enter(`codeFencedLang${a}`);f+=l.move(r.safe(t.lang,{before:f,after:" ",encode:["`"],...l.current()})),p()}if(t.lang&&t.meta){let p=r.enter(`codeFencedMeta${a}`);f+=l.move(" "),f+=l.move(r.safe(t.meta,{before:f,after:`
170
170
  `,encode:["`"],...l.current()})),p()}return f+=l.move(`
171
171
  `),s&&(f+=l.move(s+`
172
- `)),f+=l.move(c),u(),f}o(JT,"code");function XA(t,e,r){return(r?"":" ")+t}o(XA,"map");function ea(t){let e=t.options.quote||'"';if(e!=='"'&&e!=="'")throw new Error("Cannot serialize title with `"+e+"` for `options.quote`, expected `\"`, or `'`");return e}o(ea,"checkQuote");function QT(t,e,r,n){let i=ea(r),s=i==='"'?"Quote":"Apostrophe",a=r.enter("definition"),l=r.enter("label"),c=r.createTracker(n),u=c.move("[");return u+=c.move(r.safe(r.associationId(t),{before:u,after:"]",...c.current()})),u+=c.move("]: "),l(),!t.url||/[\0- \u007F]/.test(t.url)?(l=r.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(r.safe(t.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(l=r.enter("destinationRaw"),u+=c.move(r.safe(t.url,{before:u,after:t.title?" ":`
173
- `,...c.current()}))),l(),t.title&&(l=r.enter(`title${s}`),u+=c.move(" "+i),u+=c.move(r.safe(t.title,{before:u,after:i,...c.current()})),u+=c.move(i),l()),a(),u}o(QT,"definition");function XT(t){let e=t.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}o(XT,"checkEmphasis");function tr(t){return"&#x"+t.toString(16).toUpperCase()+";"}o(tr,"encodeCharacterReference");function Pn(t){if(t===null||ye(t)||un(t))return 1;if(co(t))return 2}o(Pn,"classifyCharacter");function ta(t,e,r){let n=Pn(t),i=Pn(e);return n===void 0?i===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:n===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}o(ta,"encodeInfo");ey.peek=ZA;function ey(t,e,r,n){let i=XT(r),s=r.enter("emphasis"),a=r.createTracker(n),l=a.move(i),c=a.move(r.containerPhrasing(t,{after:i,before:l,...a.current()})),u=c.charCodeAt(0),f=ta(n.before.charCodeAt(n.before.length-1),u,i);f.inside&&(c=tr(u)+c.slice(1));let p=c.charCodeAt(c.length-1),h=ta(n.after.charCodeAt(0),p,i);h.inside&&(c=c.slice(0,-1)+tr(p));let m=a.move(i);return s(),r.attentionEncodeSurroundingInfo={after:h.outside,before:f.outside},l+c+m}o(ey,"emphasis");function ZA(t,e,r){return r.options.emphasis||"*"}o(ZA,"emphasisPeek");var eF={};function mo(t,e){let r=e||eF,n=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,i=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return ZT(t,n,i)}o(mo,"toString");function ZT(t,e,r){if(tF(t)){if("value"in t)return t.type==="html"&&!r?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return eE(t.children,e,r)}return Array.isArray(t)?eE(t,e,r):""}o(ZT,"one");function eE(t,e,r){let n=[],i=-1;for(;++i<t.length;)n[i]=ZT(t[i],e,r);return n.join("")}o(eE,"all");function tF(t){return!!(t&&typeof t=="object")}o(tF,"node");function Dh(t,e){let r=!1;return Hl(t,function(n){if("value"in n&&/\r?\n|\r/.test(n.value)||n.type==="break")return r=!0,uo}),!!((!t.depth||t.depth<3)&&mo(t)&&(e.options.setext||r))}o(Dh,"formatHeadingAsSetext");function tE(t,e,r,n){let i=Math.max(Math.min(6,t.depth||1),1),s=r.createTracker(n);if(Dh(t,r)){let f=r.enter("headingSetext"),p=r.enter("phrasing"),h=r.containerPhrasing(t,{...s.current(),before:`
172
+ `)),f+=l.move(c),u(),f}o(iE,"code");function dF(t,e,r){return(r?"":" ")+t}o(dF,"map");function ta(t){let e=t.options.quote||'"';if(e!=='"'&&e!=="'")throw new Error("Cannot serialize title with `"+e+"` for `options.quote`, expected `\"`, or `'`");return e}o(ta,"checkQuote");function oE(t,e,r,n){let i=ta(r),s=i==='"'?"Quote":"Apostrophe",a=r.enter("definition"),l=r.enter("label"),c=r.createTracker(n),u=c.move("[");return u+=c.move(r.safe(r.associationId(t),{before:u,after:"]",...c.current()})),u+=c.move("]: "),l(),!t.url||/[\0- \u007F]/.test(t.url)?(l=r.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(r.safe(t.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(l=r.enter("destinationRaw"),u+=c.move(r.safe(t.url,{before:u,after:t.title?" ":`
173
+ `,...c.current()}))),l(),t.title&&(l=r.enter(`title${s}`),u+=c.move(" "+i),u+=c.move(r.safe(t.title,{before:u,after:i,...c.current()})),u+=c.move(i),l()),a(),u}o(oE,"definition");function sE(t){let e=t.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}o(sE,"checkEmphasis");function tr(t){return"&#x"+t.toString(16).toUpperCase()+";"}o(tr,"encodeCharacterReference");function Ln(t){if(t===null||ye(t)||fn(t))return 1;if(lo(t))return 2}o(Ln,"classifyCharacter");function ra(t,e,r){let n=Ln(t),i=Ln(e);return n===void 0?i===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:n===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}o(ra,"encodeInfo");oy.peek=gF;function oy(t,e,r,n){let i=sE(r),s=r.enter("emphasis"),a=r.createTracker(n),l=a.move(i),c=a.move(r.containerPhrasing(t,{after:i,before:l,...a.current()})),u=c.charCodeAt(0),f=ra(n.before.charCodeAt(n.before.length-1),u,i);f.inside&&(c=tr(u)+c.slice(1));let p=c.charCodeAt(c.length-1),h=ra(n.after.charCodeAt(0),p,i);h.inside&&(c=c.slice(0,-1)+tr(p));let m=a.move(i);return s(),r.attentionEncodeSurroundingInfo={after:h.outside,before:f.outside},l+c+m}o(oy,"emphasis");function gF(t,e,r){return r.options.emphasis||"*"}o(gF,"emphasisPeek");var yF={};function ho(t,e){let r=e||yF,n=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,i=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return aE(t,n,i)}o(ho,"toString");function aE(t,e,r){if(xF(t)){if("value"in t)return t.type==="html"&&!r?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return lE(t.children,e,r)}return Array.isArray(t)?lE(t,e,r):""}o(aE,"one");function lE(t,e,r){let n=[],i=-1;for(;++i<t.length;)n[i]=aE(t[i],e,r);return n.join("")}o(lE,"all");function xF(t){return!!(t&&typeof t=="object")}o(xF,"node");function Nh(t,e){let r=!1;return Yl(t,function(n){if("value"in n&&/\r?\n|\r/.test(n.value)||n.type==="break")return r=!0,co}),!!((!t.depth||t.depth<3)&&ho(t)&&(e.options.setext||r))}o(Nh,"formatHeadingAsSetext");function cE(t,e,r,n){let i=Math.max(Math.min(6,t.depth||1),1),s=r.createTracker(n);if(Nh(t,r)){let f=r.enter("headingSetext"),p=r.enter("phrasing"),h=r.containerPhrasing(t,{...s.current(),before:`
174
174
  `,after:`
175
175
  `});return p(),f(),h+`
176
176
  `+(i===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
177
177
  `))+1))}let a="#".repeat(i),l=r.enter("headingAtx"),c=r.enter("phrasing");s.move(a+" ");let u=r.containerPhrasing(t,{before:"# ",after:`
178
- `,...s.current()});return/^[\t ]/.test(u)&&(u=tr(u.charCodeAt(0))+u.slice(1)),u=u?a+" "+u:a,r.options.closeAtx&&(u+=" "+a),c(),l(),u}o(tE,"heading");ty.peek=rF;function ty(t){return t.value||""}o(ty,"html");function rF(){return"<"}o(rF,"htmlPeek");ry.peek=nF;function ry(t,e,r,n){let i=ea(r),s=i==='"'?"Quote":"Apostrophe",a=r.enter("image"),l=r.enter("label"),c=r.createTracker(n),u=c.move("![");return u+=c.move(r.safe(t.alt,{before:u,after:"]",...c.current()})),u+=c.move("]("),l(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(l=r.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(r.safe(t.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(l=r.enter("destinationRaw"),u+=c.move(r.safe(t.url,{before:u,after:t.title?" ":")",...c.current()}))),l(),t.title&&(l=r.enter(`title${s}`),u+=c.move(" "+i),u+=c.move(r.safe(t.title,{before:u,after:i,...c.current()})),u+=c.move(i),l()),u+=c.move(")"),a(),u}o(ry,"image");function nF(){return"!"}o(nF,"imagePeek");ny.peek=iF;function ny(t,e,r,n){let i=t.referenceType,s=r.enter("imageReference"),a=r.enter("label"),l=r.createTracker(n),c=l.move("!["),u=r.safe(t.alt,{before:c,after:"]",...l.current()});c+=l.move(u+"]["),a();let f=r.stack;r.stack=[],a=r.enter("reference");let p=r.safe(r.associationId(t),{before:c,after:"]",...l.current()});return a(),r.stack=f,s(),i==="full"||!u||u!==p?c+=l.move(p+"]"):i==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}o(ny,"imageReference");function iF(){return"!"}o(iF,"imageReferencePeek");iy.peek=oF;function iy(t,e,r){let n=t.value||"",i="`",s=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(n);)i+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++s<r.unsafe.length;){let a=r.unsafe[s],l=r.compilePattern(a),c;if(a.atBreak)for(;c=l.exec(n);){let u=c.index;n.charCodeAt(u)===10&&n.charCodeAt(u-1)===13&&u--,n=n.slice(0,u)+" "+n.slice(c.index+1)}}return i+n+i}o(iy,"inlineCode");function oF(){return"`"}o(oF,"inlineCodePeek");function oy(t,e){let r=mo(t);return!!(!e.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(r===t.url||"mailto:"+r===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}o(oy,"formatLinkAsAutolink");sy.peek=sF;function sy(t,e,r,n){let i=ea(r),s=i==='"'?"Quote":"Apostrophe",a=r.createTracker(n),l,c;if(oy(t,r)){let f=r.stack;r.stack=[],l=r.enter("autolink");let p=a.move("<");return p+=a.move(r.containerPhrasing(t,{before:p,after:">",...a.current()})),p+=a.move(">"),l(),r.stack=f,p}l=r.enter("link"),c=r.enter("label");let u=a.move("[");return u+=a.move(r.containerPhrasing(t,{before:u,after:"](",...a.current()})),u+=a.move("]("),c(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(c=r.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(r.safe(t.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(c=r.enter("destinationRaw"),u+=a.move(r.safe(t.url,{before:u,after:t.title?" ":")",...a.current()}))),c(),t.title&&(c=r.enter(`title${s}`),u+=a.move(" "+i),u+=a.move(r.safe(t.title,{before:u,after:i,...a.current()})),u+=a.move(i),c()),u+=a.move(")"),l(),u}o(sy,"link");function sF(t,e,r){return oy(t,r)?"<":"["}o(sF,"linkPeek");ay.peek=aF;function ay(t,e,r,n){let i=t.referenceType,s=r.enter("linkReference"),a=r.enter("label"),l=r.createTracker(n),c=l.move("["),u=r.containerPhrasing(t,{before:c,after:"]",...l.current()});c+=l.move(u+"]["),a();let f=r.stack;r.stack=[],a=r.enter("reference");let p=r.safe(r.associationId(t),{before:c,after:"]",...l.current()});return a(),r.stack=f,s(),i==="full"||!u||u!==p?c+=l.move(p+"]"):i==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}o(ay,"linkReference");function aF(){return"["}o(aF,"linkReferencePeek");function ra(t){let e=t.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}o(ra,"checkBullet");function rE(t){let e=ra(t),r=t.options.bulletOther;if(!r)return e==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+r+"`) to be different");return r}o(rE,"checkBulletOther");function nE(t){let e=t.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}o(nE,"checkBulletOrdered");function Ch(t){let e=t.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}o(Ch,"checkRule");function iE(t,e,r,n){let i=r.enter("list"),s=r.bulletCurrent,a=t.ordered?nE(r):ra(r),l=t.ordered?a==="."?")":".":rE(r),c=e&&r.bulletLastUsed?a===r.bulletLastUsed:!1;if(!t.ordered){let f=t.children?t.children[0]:void 0;if((a==="*"||a==="-")&&f&&(!f.children||!f.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(c=!0),Ch(r)===a&&f){let p=-1;for(;++p<t.children.length;){let h=t.children[p];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(a=l),r.bulletCurrent=a;let u=r.containerFlow(t,n);return r.bulletLastUsed=a,r.bulletCurrent=s,i(),u}o(iE,"list");function oE(t){let e=t.options.listItemIndent||"one";if(e!=="tab"&&e!=="one"&&e!=="mixed")throw new Error("Cannot serialize items with `"+e+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return e}o(oE,"checkListItemIndent");function sE(t,e,r,n){let i=oE(r),s=r.bulletCurrent||ra(r);e&&e.type==="list"&&e.ordered&&(s=(typeof e.start=="number"&&e.start>-1?e.start:1)+(r.options.incrementListMarker===!1?0:e.children.indexOf(t))+s);let a=s.length+1;(i==="tab"||i==="mixed"&&(e&&e.type==="list"&&e.spread||t.spread))&&(a=Math.ceil(a/4)*4);let l=r.createTracker(n);l.move(s+" ".repeat(a-s.length)),l.shift(a);let c=r.enter("listItem"),u=r.indentLines(r.containerFlow(t,l.current()),f);return c(),u;function f(p,h,m){return h?(m?"":" ".repeat(a))+p:(m?s:s+" ".repeat(a-s.length))+p}o(f,"map")}o(sE,"listItem");function aE(t,e,r,n){let i=r.enter("paragraph"),s=r.enter("phrasing"),a=r.containerPhrasing(t,n);return s(),i(),a}o(aE,"paragraph");var ly=Mn(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function lE(t,e,r,n){return(t.children.some(function(a){return ly(a)})?r.containerPhrasing:r.containerFlow).call(r,t,n)}o(lE,"root");function cE(t){let e=t.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}o(cE,"checkStrong");cy.peek=lF;function cy(t,e,r,n){let i=cE(r),s=r.enter("strong"),a=r.createTracker(n),l=a.move(i+i),c=a.move(r.containerPhrasing(t,{after:i,before:l,...a.current()})),u=c.charCodeAt(0),f=ta(n.before.charCodeAt(n.before.length-1),u,i);f.inside&&(c=tr(u)+c.slice(1));let p=c.charCodeAt(c.length-1),h=ta(n.after.charCodeAt(0),p,i);h.inside&&(c=c.slice(0,-1)+tr(p));let m=a.move(i+i);return s(),r.attentionEncodeSurroundingInfo={after:h.outside,before:f.outside},l+c+m}o(cy,"strong");function lF(t,e,r){return r.options.strong||"*"}o(lF,"strongPeek");function uE(t,e,r,n){return r.safe(t.value,n)}o(uE,"text");function fE(t){let e=t.options.ruleRepetition||3;if(e<3)throw new Error("Cannot serialize rules with repetition `"+e+"` for `options.ruleRepetition`, expected `3` or more");return e}o(fE,"checkRuleRepetition");function pE(t,e,r){let n=(Ch(r)+(r.options.ruleSpaces?" ":"")).repeat(fE(r));return r.options.ruleSpaces?n.slice(0,-1):n}o(pE,"thematicBreak");var go={blockquote:YT,break:Zg,code:JT,definition:QT,emphasis:ey,hardBreak:Zg,heading:tE,html:ty,image:ry,imageReference:ny,inlineCode:iy,link:sy,linkReference:ay,list:iE,listItem:sE,paragraph:aE,root:lE,strong:cy,text:uE,thematicBreak:pE};var hE=[cF];function cF(t,e,r,n){if(e.type==="code"&&Yl(e,n)&&(t.type==="list"||t.type===e.type&&Yl(t,n)))return!1;if("spread"in r&&typeof r.spread=="boolean")return t.type==="paragraph"&&(t.type===e.type||e.type==="definition"||e.type==="heading"&&Dh(e,n))?void 0:r.spread?1:0}o(cF,"joinDefaults");var yo=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],mE=[{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:`
179
- `,inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:yo},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r
180
- ]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:yo},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r
181
- *])`},{character:"*",inConstruct:"phrasing",notInConstruct:yo},{atBreak:!0,character:"+",after:`(?:[ \r
178
+ `,...s.current()});return/^[\t ]/.test(u)&&(u=tr(u.charCodeAt(0))+u.slice(1)),u=u?a+" "+u:a,r.options.closeAtx&&(u+=" "+a),c(),l(),u}o(cE,"heading");sy.peek=bF;function sy(t){return t.value||""}o(sy,"html");function bF(){return"<"}o(bF,"htmlPeek");ay.peek=wF;function ay(t,e,r,n){let i=ta(r),s=i==='"'?"Quote":"Apostrophe",a=r.enter("image"),l=r.enter("label"),c=r.createTracker(n),u=c.move("![");return u+=c.move(r.safe(t.alt,{before:u,after:"]",...c.current()})),u+=c.move("]("),l(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(l=r.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(r.safe(t.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(l=r.enter("destinationRaw"),u+=c.move(r.safe(t.url,{before:u,after:t.title?" ":")",...c.current()}))),l(),t.title&&(l=r.enter(`title${s}`),u+=c.move(" "+i),u+=c.move(r.safe(t.title,{before:u,after:i,...c.current()})),u+=c.move(i),l()),u+=c.move(")"),a(),u}o(ay,"image");function wF(){return"!"}o(wF,"imagePeek");ly.peek=vF;function ly(t,e,r,n){let i=t.referenceType,s=r.enter("imageReference"),a=r.enter("label"),l=r.createTracker(n),c=l.move("!["),u=r.safe(t.alt,{before:c,after:"]",...l.current()});c+=l.move(u+"]["),a();let f=r.stack;r.stack=[],a=r.enter("reference");let p=r.safe(r.associationId(t),{before:c,after:"]",...l.current()});return a(),r.stack=f,s(),i==="full"||!u||u!==p?c+=l.move(p+"]"):i==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}o(ly,"imageReference");function vF(){return"!"}o(vF,"imageReferencePeek");cy.peek=SF;function cy(t,e,r){let n=t.value||"",i="`",s=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(n);)i+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++s<r.unsafe.length;){let a=r.unsafe[s],l=r.compilePattern(a),c;if(a.atBreak)for(;c=l.exec(n);){let u=c.index;n.charCodeAt(u)===10&&n.charCodeAt(u-1)===13&&u--,n=n.slice(0,u)+" "+n.slice(c.index+1)}}return i+n+i}o(cy,"inlineCode");function SF(){return"`"}o(SF,"inlineCodePeek");function uy(t,e){let r=ho(t);return!!(!e.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(r===t.url||"mailto:"+r===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}o(uy,"formatLinkAsAutolink");fy.peek=kF;function fy(t,e,r,n){let i=ta(r),s=i==='"'?"Quote":"Apostrophe",a=r.createTracker(n),l,c;if(uy(t,r)){let f=r.stack;r.stack=[],l=r.enter("autolink");let p=a.move("<");return p+=a.move(r.containerPhrasing(t,{before:p,after:">",...a.current()})),p+=a.move(">"),l(),r.stack=f,p}l=r.enter("link"),c=r.enter("label");let u=a.move("[");return u+=a.move(r.containerPhrasing(t,{before:u,after:"](",...a.current()})),u+=a.move("]("),c(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(c=r.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(r.safe(t.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(c=r.enter("destinationRaw"),u+=a.move(r.safe(t.url,{before:u,after:t.title?" ":")",...a.current()}))),c(),t.title&&(c=r.enter(`title${s}`),u+=a.move(" "+i),u+=a.move(r.safe(t.title,{before:u,after:i,...a.current()})),u+=a.move(i),c()),u+=a.move(")"),l(),u}o(fy,"link");function kF(t,e,r){return uy(t,r)?"<":"["}o(kF,"linkPeek");py.peek=TF;function py(t,e,r,n){let i=t.referenceType,s=r.enter("linkReference"),a=r.enter("label"),l=r.createTracker(n),c=l.move("["),u=r.containerPhrasing(t,{before:c,after:"]",...l.current()});c+=l.move(u+"]["),a();let f=r.stack;r.stack=[],a=r.enter("reference");let p=r.safe(r.associationId(t),{before:c,after:"]",...l.current()});return a(),r.stack=f,s(),i==="full"||!u||u!==p?c+=l.move(p+"]"):i==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}o(py,"linkReference");function TF(){return"["}o(TF,"linkReferencePeek");function na(t){let e=t.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}o(na,"checkBullet");function uE(t){let e=na(t),r=t.options.bulletOther;if(!r)return e==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+r+"`) to be different");return r}o(uE,"checkBulletOther");function fE(t){let e=t.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}o(fE,"checkBulletOrdered");function Ph(t){let e=t.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}o(Ph,"checkRule");function pE(t,e,r,n){let i=r.enter("list"),s=r.bulletCurrent,a=t.ordered?fE(r):na(r),l=t.ordered?a==="."?")":".":uE(r),c=e&&r.bulletLastUsed?a===r.bulletLastUsed:!1;if(!t.ordered){let f=t.children?t.children[0]:void 0;if((a==="*"||a==="-")&&f&&(!f.children||!f.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(c=!0),Ph(r)===a&&f){let p=-1;for(;++p<t.children.length;){let h=t.children[p];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(a=l),r.bulletCurrent=a;let u=r.containerFlow(t,n);return r.bulletLastUsed=a,r.bulletCurrent=s,i(),u}o(pE,"list");function hE(t){let e=t.options.listItemIndent||"one";if(e!=="tab"&&e!=="one"&&e!=="mixed")throw new Error("Cannot serialize items with `"+e+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return e}o(hE,"checkListItemIndent");function mE(t,e,r,n){let i=hE(r),s=r.bulletCurrent||na(r);e&&e.type==="list"&&e.ordered&&(s=(typeof e.start=="number"&&e.start>-1?e.start:1)+(r.options.incrementListMarker===!1?0:e.children.indexOf(t))+s);let a=s.length+1;(i==="tab"||i==="mixed"&&(e&&e.type==="list"&&e.spread||t.spread))&&(a=Math.ceil(a/4)*4);let l=r.createTracker(n);l.move(s+" ".repeat(a-s.length)),l.shift(a);let c=r.enter("listItem"),u=r.indentLines(r.containerFlow(t,l.current()),f);return c(),u;function f(p,h,m){return h?(m?"":" ".repeat(a))+p:(m?s:s+" ".repeat(a-s.length))+p}o(f,"map")}o(mE,"listItem");function dE(t,e,r,n){let i=r.enter("paragraph"),s=r.enter("phrasing"),a=r.containerPhrasing(t,n);return s(),i(),a}o(dE,"paragraph");var hy=In(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function gE(t,e,r,n){return(t.children.some(function(a){return hy(a)})?r.containerPhrasing:r.containerFlow).call(r,t,n)}o(gE,"root");function yE(t){let e=t.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}o(yE,"checkStrong");my.peek=EF;function my(t,e,r,n){let i=yE(r),s=r.enter("strong"),a=r.createTracker(n),l=a.move(i+i),c=a.move(r.containerPhrasing(t,{after:i,before:l,...a.current()})),u=c.charCodeAt(0),f=ra(n.before.charCodeAt(n.before.length-1),u,i);f.inside&&(c=tr(u)+c.slice(1));let p=c.charCodeAt(c.length-1),h=ra(n.after.charCodeAt(0),p,i);h.inside&&(c=c.slice(0,-1)+tr(p));let m=a.move(i+i);return s(),r.attentionEncodeSurroundingInfo={after:h.outside,before:f.outside},l+c+m}o(my,"strong");function EF(t,e,r){return r.options.strong||"*"}o(EF,"strongPeek");function xE(t,e,r,n){return r.safe(t.value,n)}o(xE,"text");function bE(t){let e=t.options.ruleRepetition||3;if(e<3)throw new Error("Cannot serialize rules with repetition `"+e+"` for `options.ruleRepetition`, expected `3` or more");return e}o(bE,"checkRuleRepetition");function wE(t,e,r){let n=(Ph(r)+(r.options.ruleSpaces?" ":"")).repeat(bE(r));return r.options.ruleSpaces?n.slice(0,-1):n}o(wE,"thematicBreak");var mo={blockquote:eE,break:iy,code:iE,definition:oE,emphasis:oy,hardBreak:iy,heading:cE,html:sy,image:ay,imageReference:ly,inlineCode:cy,link:fy,linkReference:py,list:pE,listItem:mE,paragraph:dE,root:gE,strong:my,text:xE,thematicBreak:wE};var vE=[DF];function DF(t,e,r,n){if(e.type==="code"&&Gl(e,n)&&(t.type==="list"||t.type===e.type&&Gl(t,n)))return!1;if("spread"in r&&typeof r.spread=="boolean")return t.type==="paragraph"&&(t.type===e.type||e.type==="definition"||e.type==="heading"&&Nh(e,n))?void 0:r.spread?1:0}o(DF,"joinDefaults");var go=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],SE=[{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:`
179
+ `,inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:go},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r
180
+ ]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:go},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r
181
+ *])`},{character:"*",inConstruct:"phrasing",notInConstruct:go},{atBreak:!0,character:"+",after:`(?:[ \r
182
182
  ])`},{atBreak:!0,character:"-",after:`(?:[ \r
183
183
  -])`},{atBreak:!0,before:"\\d+",character:".",after:`(?:[ \r
184
- ]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:yo},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:yo},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:yo},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:yo},{atBreak:!0,character:"~"}];var dE=document.createElement("i");function di(t){let e="&"+t+";";dE.innerHTML=e;let r=dE.textContent;return r.charCodeAt(r.length-1)===59&&t!=="semi"||r===e?!1:r}o(di,"decodeNamedCharacterReference");function na(t,e){let r=Number.parseInt(t,e);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"\uFFFD":String.fromCodePoint(r)}o(na,"decodeNumericCharacterReference");var uF=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Oh(t){return t.replace(uF,fF)}o(Oh,"decodeString");function fF(t,e,r){if(e)return e;if(r.charCodeAt(0)===35){let i=r.charCodeAt(1),s=i===120||i===88;return na(r.slice(s?2:1),s?16:10)}return di(r)||t}o(fF,"decode");function gE(t){return t.label||!t.identifier?t.label||"":Oh(t.identifier)}o(gE,"association");function yE(t){if(!t._compiled){let e=(t.atBreak?"[\\r\\n][\\t ]*":"")+(t.before?"(?:"+t.before+")":"");t._compiled=new RegExp((e?"("+e+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(t.character)?"\\":"")+t.character+(t.after?"(?:"+t.after+")":""),"g")}return t._compiled}o(yE,"compilePattern");function xE(t,e,r){let n=e.indexStack,i=t.children||[],s=[],a=-1,l=r.before,c;n.push(-1);let u=e.createTracker(r);for(;++a<i.length;){let f=i[a],p;if(n[n.length-1]=a,a+1<i.length){let d=e.handle.handlers[i[a+1].type];d&&d.peek&&(d=d.peek),p=d?d(i[a+1],t,e,{before:"",after:"",...u.current()}).charAt(0):""}else p=r.after;s.length>0&&(l==="\r"||l===`
185
- `)&&f.type==="html"&&(s[s.length-1]=s[s.length-1].replace(/(\r?\n|\r)$/," "),l=" ",u=e.createTracker(r),u.move(s.join("")));let h=e.handle(f,t,e,{...u.current(),after:p,before:l});c&&c===h.slice(0,1)&&(h=tr(c.charCodeAt(0))+h.slice(1));let m=e.attentionEncodeSurroundingInfo;e.attentionEncodeSurroundingInfo=void 0,c=void 0,m&&(s.length>0&&m.before&&l===s[s.length-1].slice(-1)&&(s[s.length-1]=s[s.length-1].slice(0,-1)+tr(l.charCodeAt(0))),m.after&&(c=p)),u.move(h),s.push(h),l=h.slice(-1)}return n.pop(),s.join("")}o(xE,"containerPhrasing");function bE(t,e,r){let n=e.indexStack,i=t.children||[],s=e.createTracker(r),a=[],l=-1;for(n.push(-1);++l<i.length;){let c=i[l];n[n.length-1]=l,a.push(s.move(e.handle(c,t,e,{before:`
184
+ ]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:go},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:go},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:go},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:go},{atBreak:!0,character:"~"}];var kE=document.createElement("i");function mi(t){let e="&"+t+";";kE.innerHTML=e;let r=kE.textContent;return r.charCodeAt(r.length-1)===59&&t!=="semi"||r===e?!1:r}o(mi,"decodeNamedCharacterReference");function ia(t,e){let r=Number.parseInt(t,e);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"\uFFFD":String.fromCodePoint(r)}o(ia,"decodeNumericCharacterReference");var CF=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Lh(t){return t.replace(CF,OF)}o(Lh,"decodeString");function OF(t,e,r){if(e)return e;if(r.charCodeAt(0)===35){let i=r.charCodeAt(1),s=i===120||i===88;return ia(r.slice(s?2:1),s?16:10)}return mi(r)||t}o(OF,"decode");function TE(t){return t.label||!t.identifier?t.label||"":Lh(t.identifier)}o(TE,"association");function EE(t){if(!t._compiled){let e=(t.atBreak?"[\\r\\n][\\t ]*":"")+(t.before?"(?:"+t.before+")":"");t._compiled=new RegExp((e?"("+e+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(t.character)?"\\":"")+t.character+(t.after?"(?:"+t.after+")":""),"g")}return t._compiled}o(EE,"compilePattern");function DE(t,e,r){let n=e.indexStack,i=t.children||[],s=[],a=-1,l=r.before,c;n.push(-1);let u=e.createTracker(r);for(;++a<i.length;){let f=i[a],p;if(n[n.length-1]=a,a+1<i.length){let d=e.handle.handlers[i[a+1].type];d&&d.peek&&(d=d.peek),p=d?d(i[a+1],t,e,{before:"",after:"",...u.current()}).charAt(0):""}else p=r.after;s.length>0&&(l==="\r"||l===`
185
+ `)&&f.type==="html"&&(s[s.length-1]=s[s.length-1].replace(/(\r?\n|\r)$/," "),l=" ",u=e.createTracker(r),u.move(s.join("")));let h=e.handle(f,t,e,{...u.current(),after:p,before:l});c&&c===h.slice(0,1)&&(h=tr(c.charCodeAt(0))+h.slice(1));let m=e.attentionEncodeSurroundingInfo;e.attentionEncodeSurroundingInfo=void 0,c=void 0,m&&(s.length>0&&m.before&&l===s[s.length-1].slice(-1)&&(s[s.length-1]=s[s.length-1].slice(0,-1)+tr(l.charCodeAt(0))),m.after&&(c=p)),u.move(h),s.push(h),l=h.slice(-1)}return n.pop(),s.join("")}o(DE,"containerPhrasing");function CE(t,e,r){let n=e.indexStack,i=t.children||[],s=e.createTracker(r),a=[],l=-1;for(n.push(-1);++l<i.length;){let c=i[l];n[n.length-1]=l,a.push(s.move(e.handle(c,t,e,{before:`
186
186
  `,after:`
187
- `,...s.current()}))),c.type!=="list"&&(e.bulletLastUsed=void 0),l<i.length-1&&a.push(s.move(pF(c,i[l+1],t,e)))}return n.pop(),a.join("")}o(bE,"containerFlow");function pF(t,e,r,n){let i=n.join.length;for(;i--;){let s=n.join[i](t,e,r,n);if(s===!0||s===1)break;if(typeof s=="number")return`
187
+ `,...s.current()}))),c.type!=="list"&&(e.bulletLastUsed=void 0),l<i.length-1&&a.push(s.move(MF(c,i[l+1],t,e)))}return n.pop(),a.join("")}o(CE,"containerFlow");function MF(t,e,r,n){let i=n.join.length;for(;i--;){let s=n.join[i](t,e,r,n);if(s===!0||s===1)break;if(typeof s=="number")return`
188
188
  `.repeat(1+s);if(s===!1)return`
189
189
 
190
190
  <!---->
191
191
 
192
192
  `}return`
193
193
 
194
- `}o(pF,"between");var hF=/\r?\n|\r/g;function wE(t,e){let r=[],n=0,i=0,s;for(;s=hF.exec(t);)a(t.slice(n,s.index)),r.push(s[0]),n=s.index+s[0].length,i++;return a(t.slice(n)),r.join("");function a(l){r.push(e(l,i,!l))}o(a,"one")}o(wE,"indentLines");function vE(t,e,r){let n=(r.before||"")+(e||"")+(r.after||""),i=[],s=[],a={},l=-1;for(;++l<t.unsafe.length;){let f=t.unsafe[l];if(!Eh(t.stack,f))continue;let p=t.compilePattern(f),h;for(;h=p.exec(n);){let m="before"in f||!!f.atBreak,d="after"in f,g=h.index+(m?h[1].length:0);i.includes(g)?(a[g].before&&!m&&(a[g].before=!1),a[g].after&&!d&&(a[g].after=!1)):(i.push(g),a[g]={before:m,after:d})}}i.sort(mF);let c=r.before?r.before.length:0,u=n.length-(r.after?r.after.length:0);for(l=-1;++l<i.length;){let f=i[l];f<c||f>=u||f+1<u&&i[l+1]===f+1&&a[f].after&&!a[f+1].before&&!a[f+1].after||i[l-1]===f-1&&a[f].before&&!a[f-1].before&&!a[f-1].after||(c!==f&&s.push(SE(n.slice(c,f),"\\")),c=f,/[!-/:-@[-`{-~]/.test(n.charAt(f))&&(!r.encode||!r.encode.includes(n.charAt(f)))?s.push("\\"):(s.push(tr(n.charCodeAt(f))),c++))}return s.push(SE(n.slice(c,u),r.after)),s.join("")}o(vE,"safe");function mF(t,e){return t-e}o(mF,"numerical");function SE(t,e){let r=/\\(?=[!-/:-@[-`{-~])/g,n=[],i=[],s=t+e,a=-1,l=0,c;for(;c=r.exec(s);)n.push(c.index);for(;++a<n.length;)l!==n[a]&&i.push(t.slice(l,n[a])),i.push("\\"),l=n[a];return i.push(t.slice(l)),i.join("")}o(SE,"escapeBackslashes");function kE(t){let e=t||{},r=e.now||{},n=e.lineShift||0,i=r.line||1,s=r.column||1;return{move:c,current:a,shift:l};function a(){return{now:{line:i,column:s},lineShift:n}}function l(u){n+=u}function c(u){let f=u||"",p=f.split(/\r?\n|\r/g),h=p[p.length-1];return i+=p.length-1,s=p.length===1?s+h.length:1+h.length+n,f}}o(kE,"track");function uy(t,e){let r=e||{},n={associationId:gE,containerPhrasing:xF,containerFlow:bF,createTracker:kE,compilePattern:yE,enter:s,handlers:{...go},handle:void 0,indentLines:wE,indexStack:[],join:[...hE],options:{},safe:wF,stack:[],unsafe:[...mE]};Xg(n,r),n.options.tightDefinitions&&n.join.push(yF),n.handle=bh("type",{invalid:dF,unknown:gF,handlers:n.handlers});let i=n.handle(t,void 0,n,{before:`
194
+ `}o(MF,"between");var IF=/\r?\n|\r/g;function OE(t,e){let r=[],n=0,i=0,s;for(;s=IF.exec(t);)a(t.slice(n,s.index)),r.push(s[0]),n=s.index+s[0].length,i++;return a(t.slice(n)),r.join("");function a(l){r.push(e(l,i,!l))}o(a,"one")}o(OE,"indentLines");function IE(t,e,r){let n=(r.before||"")+(e||"")+(r.after||""),i=[],s=[],a={},l=-1;for(;++l<t.unsafe.length;){let f=t.unsafe[l];if(!Ih(t.stack,f))continue;let p=t.compilePattern(f),h;for(;h=p.exec(n);){let m="before"in f||!!f.atBreak,d="after"in f,g=h.index+(m?h[1].length:0);i.includes(g)?(a[g].before&&!m&&(a[g].before=!1),a[g].after&&!d&&(a[g].after=!1)):(i.push(g),a[g]={before:m,after:d})}}i.sort(NF);let c=r.before?r.before.length:0,u=n.length-(r.after?r.after.length:0);for(l=-1;++l<i.length;){let f=i[l];f<c||f>=u||f+1<u&&i[l+1]===f+1&&a[f].after&&!a[f+1].before&&!a[f+1].after||i[l-1]===f-1&&a[f].before&&!a[f-1].before&&!a[f-1].after||(c!==f&&s.push(ME(n.slice(c,f),"\\")),c=f,/[!-/:-@[-`{-~]/.test(n.charAt(f))&&(!r.encode||!r.encode.includes(n.charAt(f)))?s.push("\\"):(s.push(tr(n.charCodeAt(f))),c++))}return s.push(ME(n.slice(c,u),r.after)),s.join("")}o(IE,"safe");function NF(t,e){return t-e}o(NF,"numerical");function ME(t,e){let r=/\\(?=[!-/:-@[-`{-~])/g,n=[],i=[],s=t+e,a=-1,l=0,c;for(;c=r.exec(s);)n.push(c.index);for(;++a<n.length;)l!==n[a]&&i.push(t.slice(l,n[a])),i.push("\\"),l=n[a];return i.push(t.slice(l)),i.join("")}o(ME,"escapeBackslashes");function NE(t){let e=t||{},r=e.now||{},n=e.lineShift||0,i=r.line||1,s=r.column||1;return{move:c,current:a,shift:l};function a(){return{now:{line:i,column:s},lineShift:n}}function l(u){n+=u}function c(u){let f=u||"",p=f.split(/\r?\n|\r/g),h=p[p.length-1];return i+=p.length-1,s=p.length===1?s+h.length:1+h.length+n,f}}o(NE,"track");function dy(t,e){let r=e||{},n={associationId:TE,containerPhrasing:RF,containerFlow:AF,createTracker:NE,compilePattern:EE,enter:s,handlers:{...mo},handle:void 0,indentLines:OE,indexStack:[],join:[...vE],options:{},safe:FF,stack:[],unsafe:[...SE]};ny(n,r),n.options.tightDefinitions&&n.join.push(_F),n.handle=Th("type",{invalid:PF,unknown:LF,handlers:n.handlers});let i=n.handle(t,void 0,n,{before:`
195
195
  `,after:`
196
196
  `,now:{line:1,column:1},lineShift:0});return i&&i.charCodeAt(i.length-1)!==10&&i.charCodeAt(i.length-1)!==13&&(i+=`
197
- `),i;function s(a){return n.stack.push(a),l;function l(){n.stack.pop()}o(l,"exit")}o(s,"enter")}o(uy,"toMarkdown");function dF(t){throw new Error("Cannot handle value `"+t+"`, expected node")}o(dF,"invalid");function gF(t){let e=t;throw new Error("Cannot handle unknown node `"+e.type+"`")}o(gF,"unknown");function yF(t,e){if(t.type==="definition"&&t.type===e.type)return 0}o(yF,"joinDefinition");function xF(t,e){return xE(t,this,e)}o(xF,"containerPhrasingBound");function bF(t,e){return bE(t,this,e)}o(bF,"containerFlowBound");function wF(t,e){return vE(this,t,e)}o(wF,"safeBound");function ia(t){let e=this;e.compiler=r;function r(n){return uy(n,{...e.data("settings"),...t,extensions:e.data("toMarkdownExtensions")||[]})}o(r,"compiler")}o(ia,"remarkStringify");function SF(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}o(SF,"extend");function fy(t,e){return Array(e+1).join(t)}o(fy,"repeat");function TE(t){return t.replace(/^\n*/,"")}o(TE,"trimLeadingNewlines");function EE(t){for(var e=t.length;e>0&&t[e-1]===`
198
- `;)e--;return t.substring(0,e)}o(EE,"trimTrailingNewlines");function DE(t){return EE(TE(t))}o(DE,"trimNewlines");var vF=["ADDRESS","ARTICLE","ASIDE","AUDIO","BLOCKQUOTE","BODY","CANVAS","CENTER","DD","DIR","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","FRAMESET","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","HTML","ISINDEX","LI","MAIN","MENU","NAV","NOFRAMES","NOSCRIPT","OL","OUTPUT","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"];function py(t){return hy(t,vF)}o(py,"isBlock");var CE=["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"];function OE(t){return hy(t,CE)}o(OE,"isVoid");function kF(t){return IE(t,CE)}o(kF,"hasVoid");var ME=["A","TABLE","THEAD","TBODY","TFOOT","TH","TD","IFRAME","SCRIPT","AUDIO","VIDEO"];function TF(t){return hy(t,ME)}o(TF,"isMeaningfulWhenBlank");function EF(t){return IE(t,ME)}o(EF,"hasMeaningfulWhenBlank");function hy(t,e){return e.indexOf(t.nodeName)>=0}o(hy,"is");function IE(t,e){return t.getElementsByTagName&&e.some(function(r){return t.getElementsByTagName(r).length})}o(IE,"has");var DF=[[/\\/g,"\\\\"],[/\*/g,"\\*"],[/^-/g,"\\-"],[/^\+ /g,"\\+ "],[/^(=+)/g,"\\$1"],[/^(#{1,6}) /g,"\\$1 "],[/`/g,"\\`"],[/^~~~/g,"\\~~~"],[/\[/g,"\\["],[/\]/g,"\\]"],[/^>/g,"\\>"],[/_/g,"\\_"],[/^(\d+)\. /g,"$1\\. "]];function NE(t){return DF.reduce(function(e,r){return e.replace(r[0],r[1])},t)}o(NE,"escapeMarkdown");var Et={};Et.paragraph={filter:"p",replacement:o(function(t){return`
197
+ `),i;function s(a){return n.stack.push(a),l;function l(){n.stack.pop()}o(l,"exit")}o(s,"enter")}o(dy,"toMarkdown");function PF(t){throw new Error("Cannot handle value `"+t+"`, expected node")}o(PF,"invalid");function LF(t){let e=t;throw new Error("Cannot handle unknown node `"+e.type+"`")}o(LF,"unknown");function _F(t,e){if(t.type==="definition"&&t.type===e.type)return 0}o(_F,"joinDefinition");function RF(t,e){return DE(t,this,e)}o(RF,"containerPhrasingBound");function AF(t,e){return CE(t,this,e)}o(AF,"containerFlowBound");function FF(t,e){return IE(this,t,e)}o(FF,"safeBound");function oa(t){let e=this;e.compiler=r;function r(n){return dy(n,{...e.data("settings"),...t,extensions:e.data("toMarkdownExtensions")||[]})}o(r,"compiler")}o(oa,"remarkStringify");function $F(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}o($F,"extend");function gy(t,e){return Array(e+1).join(t)}o(gy,"repeat");function PE(t){return t.replace(/^\n*/,"")}o(PE,"trimLeadingNewlines");function LE(t){for(var e=t.length;e>0&&t[e-1]===`
198
+ `;)e--;return t.substring(0,e)}o(LE,"trimTrailingNewlines");function _E(t){return LE(PE(t))}o(_E,"trimNewlines");var BF=["ADDRESS","ARTICLE","ASIDE","AUDIO","BLOCKQUOTE","BODY","CANVAS","CENTER","DD","DIR","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","FRAMESET","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","HTML","ISINDEX","LI","MAIN","MENU","NAV","NOFRAMES","NOSCRIPT","OL","OUTPUT","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"];function yy(t){return xy(t,BF)}o(yy,"isBlock");var RE=["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"];function AE(t){return xy(t,RE)}o(AE,"isVoid");function jF(t){return $E(t,RE)}o(jF,"hasVoid");var FE=["A","TABLE","THEAD","TBODY","TFOOT","TH","TD","IFRAME","SCRIPT","AUDIO","VIDEO"];function zF(t){return xy(t,FE)}o(zF,"isMeaningfulWhenBlank");function WF(t){return $E(t,FE)}o(WF,"hasMeaningfulWhenBlank");function xy(t,e){return e.indexOf(t.nodeName)>=0}o(xy,"is");function $E(t,e){return t.getElementsByTagName&&e.some(function(r){return t.getElementsByTagName(r).length})}o($E,"has");var HF=[[/\\/g,"\\\\"],[/\*/g,"\\*"],[/^-/g,"\\-"],[/^\+ /g,"\\+ "],[/^(=+)/g,"\\$1"],[/^(#{1,6}) /g,"\\$1 "],[/`/g,"\\`"],[/^~~~/g,"\\~~~"],[/\[/g,"\\["],[/\]/g,"\\]"],[/^>/g,"\\>"],[/_/g,"\\_"],[/^(\d+)\. /g,"$1\\. "]];function BE(t){return HF.reduce(function(e,r){return e.replace(r[0],r[1])},t)}o(BE,"escapeMarkdown");var Et={};Et.paragraph={filter:"p",replacement:o(function(t){return`
199
199
 
200
200
  `+t+`
201
201
 
202
202
  `},"replacement")},Et.lineBreak={filter:"br",replacement:o(function(t,e,r){return r.br+`
203
- `},"replacement")},Et.heading={filter:["h1","h2","h3","h4","h5","h6"],replacement:o(function(t,e,r){var n=Number(e.nodeName.charAt(1));if(r.headingStyle==="setext"&&n<3){var i=fy(n===1?"=":"-",t.length);return`
203
+ `},"replacement")},Et.heading={filter:["h1","h2","h3","h4","h5","h6"],replacement:o(function(t,e,r){var n=Number(e.nodeName.charAt(1));if(r.headingStyle==="setext"&&n<3){var i=gy(n===1?"=":"-",t.length);return`
204
204
 
205
205
  `+t+`
206
206
  `+i+`
207
207
 
208
208
  `}else return`
209
209
 
210
- `+fy("#",n)+" "+t+`
210
+ `+gy("#",n)+" "+t+`
211
211
 
212
- `},"replacement")},Et.blockquote={filter:"blockquote",replacement:o(function(t){return t=DE(t).replace(/^/gm,"> "),`
212
+ `},"replacement")},Et.blockquote={filter:"blockquote",replacement:o(function(t){return t=_E(t).replace(/^/gm,"> "),`
213
213
 
214
214
  `+t+`
215
215
 
@@ -218,7 +218,7 @@ ${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.pus
218
218
 
219
219
  `+t+`
220
220
 
221
- `},"replacement")},Et.listItem={filter:"li",replacement:o(function(t,e,r){var n=r.bulletListMarker+" ",i=e.parentNode;if(i.nodeName==="OL"){var s=i.getAttribute("start"),a=Array.prototype.indexOf.call(i.children,e);n=(s?Number(s)+a:a+1)+". "}var l=/\n$/.test(t);return t=DE(t)+(l?`
221
+ `},"replacement")},Et.listItem={filter:"li",replacement:o(function(t,e,r){var n=r.bulletListMarker+" ",i=e.parentNode;if(i.nodeName==="OL"){var s=i.getAttribute("start"),a=Array.prototype.indexOf.call(i.children,e);n=(s?Number(s)+a:a+1)+". "}var l=/\n$/.test(t);return t=_E(t)+(l?`
222
222
  `:""),t=t.replace(/\n/gm,`
223
223
  `+" ".repeat(n.length)),n+t+(e.nextSibling?`
224
224
  `:"")},"replacement")},Et.indentedCodeBlock={filter:o(function(t,e){return e.codeBlockStyle==="indented"&&t.nodeName==="PRE"&&t.firstChild&&t.firstChild.nodeName==="CODE"},"filter"),replacement:o(function(t,e,r){return`
@@ -226,7 +226,7 @@ ${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.pus
226
226
  `+e.firstChild.textContent.replace(/\n/g,`
227
227
  `)+`
228
228
 
229
- `},"replacement")},Et.fencedCodeBlock={filter:o(function(t,e){return e.codeBlockStyle==="fenced"&&t.nodeName==="PRE"&&t.firstChild&&t.firstChild.nodeName==="CODE"},"filter"),replacement:o(function(t,e,r){for(var n=e.firstChild.getAttribute("class")||"",i=(n.match(/language-(\S+)/)||[null,""])[1],s=e.firstChild.textContent,a=r.fence.charAt(0),l=3,c=new RegExp("^"+a+"{3,}","gm"),u;u=c.exec(s);)u[0].length>=l&&(l=u[0].length+1);var f=fy(a,l);return`
229
+ `},"replacement")},Et.fencedCodeBlock={filter:o(function(t,e){return e.codeBlockStyle==="fenced"&&t.nodeName==="PRE"&&t.firstChild&&t.firstChild.nodeName==="CODE"},"filter"),replacement:o(function(t,e,r){for(var n=e.firstChild.getAttribute("class")||"",i=(n.match(/language-(\S+)/)||[null,""])[1],s=e.firstChild.textContent,a=r.fence.charAt(0),l=3,c=new RegExp("^"+a+"{3,}","gm"),u;u=c.exec(s);)u[0].length>=l&&(l=u[0].length+1);var f=gy(a,l);return`
230
230
 
231
231
  `+f+i+`
232
232
  `+s.replace(/\n$/,"")+`
@@ -236,13 +236,13 @@ ${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.pus
236
236
 
237
237
  `+r.hr+`
238
238
 
239
- `},"replacement")},Et.inlineLink={filter:o(function(t,e){return e.linkStyle==="inlined"&&t.nodeName==="A"&&t.getAttribute("href")},"filter"),replacement:o(function(t,e){var r=my(e.getAttribute("href")),n=dy(Mh(e.getAttribute("title"))),i=n?' "'+n+'"':"";return"["+t+"]("+r+i+")"},"replacement")},Et.referenceLink={filter:o(function(t,e){return e.linkStyle==="referenced"&&t.nodeName==="A"&&t.getAttribute("href")},"filter"),replacement:o(function(t,e,r){var n=my(e.getAttribute("href")),i=Mh(e.getAttribute("title"));i&&(i=' "'+dy(i)+'"');var s,a;switch(r.linkReferenceStyle){case"collapsed":s="["+t+"][]",a="["+t+"]: "+n+i;break;case"shortcut":s="["+t+"]",a="["+t+"]: "+n+i;break;default:var l=this.references.length+1;s="["+t+"]["+l+"]",a="["+l+"]: "+n+i}return this.references.push(a),s},"replacement"),references:[],append:o(function(t){var e="";return this.references.length&&(e=`
239
+ `},"replacement")},Et.inlineLink={filter:o(function(t,e){return e.linkStyle==="inlined"&&t.nodeName==="A"&&t.getAttribute("href")},"filter"),replacement:o(function(t,e){var r=by(e.getAttribute("href")),n=wy(_h(e.getAttribute("title"))),i=n?' "'+n+'"':"";return"["+t+"]("+r+i+")"},"replacement")},Et.referenceLink={filter:o(function(t,e){return e.linkStyle==="referenced"&&t.nodeName==="A"&&t.getAttribute("href")},"filter"),replacement:o(function(t,e,r){var n=by(e.getAttribute("href")),i=_h(e.getAttribute("title"));i&&(i=' "'+wy(i)+'"');var s,a;switch(r.linkReferenceStyle){case"collapsed":s="["+t+"][]",a="["+t+"]: "+n+i;break;case"shortcut":s="["+t+"]",a="["+t+"]: "+n+i;break;default:var l=this.references.length+1;s="["+t+"]["+l+"]",a="["+l+"]: "+n+i}return this.references.push(a),s},"replacement"),references:[],append:o(function(t){var e="";return this.references.length&&(e=`
240
240
 
241
241
  `+this.references.join(`
242
242
  `)+`
243
243
 
244
- `,this.references=[]),e},"append")},Et.emphasis={filter:["em","i"],replacement:o(function(t,e,r){return t.trim()?r.emDelimiter+t+r.emDelimiter:""},"replacement")},Et.strong={filter:["strong","b"],replacement:o(function(t,e,r){return t.trim()?r.strongDelimiter+t+r.strongDelimiter:""},"replacement")},Et.code={filter:o(function(t){var e=t.previousSibling||t.nextSibling,r=t.parentNode.nodeName==="PRE"&&!e;return t.nodeName==="CODE"&&!r},"filter"),replacement:o(function(t){if(!t)return"";t=t.replace(/\r?\n|\r/g," ");for(var e=/^`|^ .*?[^ ].* $|`$/.test(t)?" ":"",r="`",n=t.match(/`+/gm)||[];n.indexOf(r)!==-1;)r=r+"`";return r+e+t+e+r},"replacement")},Et.image={filter:"img",replacement:o(function(t,e){var r=NE(Mh(e.getAttribute("alt"))),n=my(e.getAttribute("src")||""),i=Mh(e.getAttribute("title")),s=i?' "'+dy(i)+'"':"";return n?"!["+r+"]("+n+s+")":""},"replacement")};function Mh(t){return t?t.replace(/(\n+\s*)+/g,`
245
- `):""}o(Mh,"cleanAttribute");function my(t){var e=t.replace(/([<>()])/g,"\\$1");return e.indexOf(" ")>=0?"<"+e+">":e}o(my,"escapeLinkDestination");function dy(t){return t.replace(/"/g,'\\"')}o(dy,"escapeLinkTitle");function PE(t){this.options=t,this._keep=[],this._remove=[],this.blankRule={replacement:t.blankReplacement},this.keepReplacement=t.keepReplacement,this.defaultRule={replacement:t.defaultReplacement},this.array=[];for(var e in t.rules)this.array.push(t.rules[e])}o(PE,"Rules"),PE.prototype={add:o(function(t,e){this.array.unshift(e)},"add"),keep:o(function(t){this._keep.unshift({filter:t,replacement:this.keepReplacement})},"keep"),remove:o(function(t){this._remove.unshift({filter:t,replacement:o(function(){return""},"replacement")})},"remove"),forNode:o(function(t){if(t.isBlank)return this.blankRule;var e;return(e=gy(this.array,t,this.options))||(e=gy(this._keep,t,this.options))||(e=gy(this._remove,t,this.options))?e:this.defaultRule},"forNode"),forEach:o(function(t){for(var e=0;e<this.array.length;e++)t(this.array[e],e)},"forEach")};function gy(t,e,r){for(var n=0;n<t.length;n++){var i=t[n];if(CF(i,e,r))return i}}o(gy,"findRule");function CF(t,e,r){var n=t.filter;if(typeof n=="string"){if(n===e.nodeName.toLowerCase())return!0}else if(Array.isArray(n)){if(n.indexOf(e.nodeName.toLowerCase())>-1)return!0}else if(typeof n=="function"){if(n.call(t,e,r))return!0}else throw new TypeError("`filter` needs to be a string, array, or function")}o(CF,"filterValue");function OF(t){var e=t.element,r=t.isBlock,n=t.isVoid,i=t.isPre||function(p){return p.nodeName==="PRE"};if(!(!e.firstChild||i(e))){for(var s=null,a=!1,l=null,c=_E(l,e,i);c!==e;){if(c.nodeType===3||c.nodeType===4){var u=c.data.replace(/[ \r\n\t]+/g," ");if((!s||/ $/.test(s.data))&&!a&&u[0]===" "&&(u=u.substr(1)),!u){c=yy(c);continue}c.data=u,s=c}else if(c.nodeType===1)r(c)||c.nodeName==="BR"?(s&&(s.data=s.data.replace(/ $/,"")),s=null,a=!1):n(c)||i(c)?(s=null,a=!0):s&&(a=!1);else{c=yy(c);continue}var f=_E(l,c,i);l=c,c=f}s&&(s.data=s.data.replace(/ $/,""),s.data||yy(s))}}o(OF,"collapseWhitespace");function yy(t){var e=t.nextSibling||t.parentNode;return t.parentNode.removeChild(t),e}o(yy,"remove");function _E(t,e,r){return t&&t.parentNode===e||r(e)?e.nextSibling||e.parentNode:e.firstChild||e.nextSibling||e.parentNode}o(_E,"next");var xy=typeof window<"u"?window:{};function MF(){var t=xy.DOMParser,e=!1;try{new t().parseFromString("","text/html")&&(e=!0)}catch{}return e}o(MF,"canParseHTMLNatively");function IF(){var t=o(function(){},"Parser");return NF()?t.prototype.parseFromString=function(e){var r=new window.ActiveXObject("htmlfile");return r.designMode="on",r.open(),r.write(e),r.close(),r}:t.prototype.parseFromString=function(e){var r=document.implementation.createHTMLDocument("");return r.open(),r.write(e),r.close(),r},t}o(IF,"createHTMLParser");function NF(){var t=!1;try{document.implementation.createHTMLDocument("").open()}catch{xy.ActiveXObject&&(t=!0)}return t}o(NF,"shouldUseActiveX");var PF=MF()?xy.DOMParser:IF();function _F(t,e){var r;if(typeof t=="string"){var n=LF().parseFromString('<x-turndown id="turndown-root">'+t+"</x-turndown>","text/html");r=n.getElementById("turndown-root")}else r=t.cloneNode(!0);return OF({element:r,isBlock:py,isVoid:OE,isPre:e.preformattedCode?RF:null}),r}o(_F,"RootNode");var by;function LF(){return by=by||new PF,by}o(LF,"htmlParser");function RF(t){return t.nodeName==="PRE"||t.nodeName==="CODE"}o(RF,"isPreOrCode");function AF(t,e){return t.isBlock=py(t),t.isCode=t.nodeName==="CODE"||t.parentNode.isCode,t.isBlank=FF(t),t.flankingWhitespace=$F(t,e),t}o(AF,"Node");function FF(t){return!OE(t)&&!TF(t)&&/^\s*$/i.test(t.textContent)&&!kF(t)&&!EF(t)}o(FF,"isBlank");function $F(t,e){if(t.isBlock||e.preformattedCode&&t.isCode)return{leading:"",trailing:""};var r=BF(t.textContent);return r.leadingAscii&&LE("left",t,e)&&(r.leading=r.leadingNonAscii),r.trailingAscii&&LE("right",t,e)&&(r.trailing=r.trailingNonAscii),{leading:r.leading,trailing:r.trailing}}o($F,"flankingWhitespace");function BF(t){var e=t.match(/^(([ \t\r\n]*)(\s*))(?:(?=\S)[\s\S]*\S)?((\s*?)([ \t\r\n]*))$/);return{leading:e[1],leadingAscii:e[2],leadingNonAscii:e[3],trailing:e[4],trailingNonAscii:e[5],trailingAscii:e[6]}}o(BF,"edgeWhitespace");function LE(t,e,r){var n,i,s;return t==="left"?(n=e.previousSibling,i=/ $/):(n=e.nextSibling,i=/^ /),n&&(n.nodeType===3?s=i.test(n.nodeValue):r.preformattedCode&&n.nodeName==="CODE"?s=!1:n.nodeType===1&&!py(n)&&(s=i.test(n.textContent))),s}o(LE,"isFlankedByWhitespace");var jF=Array.prototype.reduce;function gi(t){if(!(this instanceof gi))return new gi(t);var e={rules:Et,headingStyle:"setext",hr:"* * *",bulletListMarker:"*",codeBlockStyle:"indented",fence:"```",emDelimiter:"_",strongDelimiter:"**",linkStyle:"inlined",linkReferenceStyle:"full",br:" ",preformattedCode:!1,blankReplacement:o(function(r,n){return n.isBlock?`
244
+ `,this.references=[]),e},"append")},Et.emphasis={filter:["em","i"],replacement:o(function(t,e,r){return t.trim()?r.emDelimiter+t+r.emDelimiter:""},"replacement")},Et.strong={filter:["strong","b"],replacement:o(function(t,e,r){return t.trim()?r.strongDelimiter+t+r.strongDelimiter:""},"replacement")},Et.code={filter:o(function(t){var e=t.previousSibling||t.nextSibling,r=t.parentNode.nodeName==="PRE"&&!e;return t.nodeName==="CODE"&&!r},"filter"),replacement:o(function(t){if(!t)return"";t=t.replace(/\r?\n|\r/g," ");for(var e=/^`|^ .*?[^ ].* $|`$/.test(t)?" ":"",r="`",n=t.match(/`+/gm)||[];n.indexOf(r)!==-1;)r=r+"`";return r+e+t+e+r},"replacement")},Et.image={filter:"img",replacement:o(function(t,e){var r=BE(_h(e.getAttribute("alt"))),n=by(e.getAttribute("src")||""),i=_h(e.getAttribute("title")),s=i?' "'+wy(i)+'"':"";return n?"!["+r+"]("+n+s+")":""},"replacement")};function _h(t){return t?t.replace(/(\n+\s*)+/g,`
245
+ `):""}o(_h,"cleanAttribute");function by(t){var e=t.replace(/([<>()])/g,"\\$1");return e.indexOf(" ")>=0?"<"+e+">":e}o(by,"escapeLinkDestination");function wy(t){return t.replace(/"/g,'\\"')}o(wy,"escapeLinkTitle");function jE(t){this.options=t,this._keep=[],this._remove=[],this.blankRule={replacement:t.blankReplacement},this.keepReplacement=t.keepReplacement,this.defaultRule={replacement:t.defaultReplacement},this.array=[];for(var e in t.rules)this.array.push(t.rules[e])}o(jE,"Rules"),jE.prototype={add:o(function(t,e){this.array.unshift(e)},"add"),keep:o(function(t){this._keep.unshift({filter:t,replacement:this.keepReplacement})},"keep"),remove:o(function(t){this._remove.unshift({filter:t,replacement:o(function(){return""},"replacement")})},"remove"),forNode:o(function(t){if(t.isBlank)return this.blankRule;var e;return(e=vy(this.array,t,this.options))||(e=vy(this._keep,t,this.options))||(e=vy(this._remove,t,this.options))?e:this.defaultRule},"forNode"),forEach:o(function(t){for(var e=0;e<this.array.length;e++)t(this.array[e],e)},"forEach")};function vy(t,e,r){for(var n=0;n<t.length;n++){var i=t[n];if(UF(i,e,r))return i}}o(vy,"findRule");function UF(t,e,r){var n=t.filter;if(typeof n=="string"){if(n===e.nodeName.toLowerCase())return!0}else if(Array.isArray(n)){if(n.indexOf(e.nodeName.toLowerCase())>-1)return!0}else if(typeof n=="function"){if(n.call(t,e,r))return!0}else throw new TypeError("`filter` needs to be a string, array, or function")}o(UF,"filterValue");function qF(t){var e=t.element,r=t.isBlock,n=t.isVoid,i=t.isPre||function(p){return p.nodeName==="PRE"};if(!(!e.firstChild||i(e))){for(var s=null,a=!1,l=null,c=zE(l,e,i);c!==e;){if(c.nodeType===3||c.nodeType===4){var u=c.data.replace(/[ \r\n\t]+/g," ");if((!s||/ $/.test(s.data))&&!a&&u[0]===" "&&(u=u.substr(1)),!u){c=Sy(c);continue}c.data=u,s=c}else if(c.nodeType===1)r(c)||c.nodeName==="BR"?(s&&(s.data=s.data.replace(/ $/,"")),s=null,a=!1):n(c)||i(c)?(s=null,a=!0):s&&(a=!1);else{c=Sy(c);continue}var f=zE(l,c,i);l=c,c=f}s&&(s.data=s.data.replace(/ $/,""),s.data||Sy(s))}}o(qF,"collapseWhitespace");function Sy(t){var e=t.nextSibling||t.parentNode;return t.parentNode.removeChild(t),e}o(Sy,"remove");function zE(t,e,r){return t&&t.parentNode===e||r(e)?e.nextSibling||e.parentNode:e.firstChild||e.nextSibling||e.parentNode}o(zE,"next");var ky=typeof window<"u"?window:{};function YF(){var t=ky.DOMParser,e=!1;try{new t().parseFromString("","text/html")&&(e=!0)}catch{}return e}o(YF,"canParseHTMLNatively");function VF(){var t=o(function(){},"Parser");return KF()?t.prototype.parseFromString=function(e){var r=new window.ActiveXObject("htmlfile");return r.designMode="on",r.open(),r.write(e),r.close(),r}:t.prototype.parseFromString=function(e){var r=document.implementation.createHTMLDocument("");return r.open(),r.write(e),r.close(),r},t}o(VF,"createHTMLParser");function KF(){var t=!1;try{document.implementation.createHTMLDocument("").open()}catch{ky.ActiveXObject&&(t=!0)}return t}o(KF,"shouldUseActiveX");var GF=YF()?ky.DOMParser:VF();function JF(t,e){var r;if(typeof t=="string"){var n=QF().parseFromString('<x-turndown id="turndown-root">'+t+"</x-turndown>","text/html");r=n.getElementById("turndown-root")}else r=t.cloneNode(!0);return qF({element:r,isBlock:yy,isVoid:AE,isPre:e.preformattedCode?XF:null}),r}o(JF,"RootNode");var Ty;function QF(){return Ty=Ty||new GF,Ty}o(QF,"htmlParser");function XF(t){return t.nodeName==="PRE"||t.nodeName==="CODE"}o(XF,"isPreOrCode");function ZF(t,e){return t.isBlock=yy(t),t.isCode=t.nodeName==="CODE"||t.parentNode.isCode,t.isBlank=e2(t),t.flankingWhitespace=t2(t,e),t}o(ZF,"Node");function e2(t){return!AE(t)&&!zF(t)&&/^\s*$/i.test(t.textContent)&&!jF(t)&&!WF(t)}o(e2,"isBlank");function t2(t,e){if(t.isBlock||e.preformattedCode&&t.isCode)return{leading:"",trailing:""};var r=r2(t.textContent);return r.leadingAscii&&WE("left",t,e)&&(r.leading=r.leadingNonAscii),r.trailingAscii&&WE("right",t,e)&&(r.trailing=r.trailingNonAscii),{leading:r.leading,trailing:r.trailing}}o(t2,"flankingWhitespace");function r2(t){var e=t.match(/^(([ \t\r\n]*)(\s*))(?:(?=\S)[\s\S]*\S)?((\s*?)([ \t\r\n]*))$/);return{leading:e[1],leadingAscii:e[2],leadingNonAscii:e[3],trailing:e[4],trailingNonAscii:e[5],trailingAscii:e[6]}}o(r2,"edgeWhitespace");function WE(t,e,r){var n,i,s;return t==="left"?(n=e.previousSibling,i=/ $/):(n=e.nextSibling,i=/^ /),n&&(n.nodeType===3?s=i.test(n.nodeValue):r.preformattedCode&&n.nodeName==="CODE"?s=!1:n.nodeType===1&&!yy(n)&&(s=i.test(n.textContent))),s}o(WE,"isFlankedByWhitespace");var n2=Array.prototype.reduce;function di(t){if(!(this instanceof di))return new di(t);var e={rules:Et,headingStyle:"setext",hr:"* * *",bulletListMarker:"*",codeBlockStyle:"indented",fence:"```",emDelimiter:"_",strongDelimiter:"**",linkStyle:"inlined",linkReferenceStyle:"full",br:" ",preformattedCode:!1,blankReplacement:o(function(r,n){return n.isBlock?`
246
246
 
247
247
  `:""},"blankReplacement"),keepReplacement:o(function(r,n){return n.isBlock?`
248
248
 
@@ -252,51 +252,51 @@ ${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.pus
252
252
 
253
253
  `+r+`
254
254
 
255
- `:r},"defaultReplacement")};this.options=SF({},e,t),this.rules=new PE(this.options)}o(gi,"TurndownService"),gi.prototype={turndown:o(function(t){if(!HF(t))throw new TypeError(t+" is not a string, or an element/document/fragment node.");if(t==="")return"";var e=RE.call(this,new _F(t,this.options));return zF.call(this,e)},"turndown"),use:o(function(t){if(Array.isArray(t))for(var e=0;e<t.length;e++)this.use(t[e]);else if(typeof t=="function")t(this);else throw new TypeError("plugin must be a Function or an Array of Functions");return this},"use"),addRule:o(function(t,e){return this.rules.add(t,e),this},"addRule"),keep:o(function(t){return this.rules.keep(t),this},"keep"),remove:o(function(t){return this.rules.remove(t),this},"remove"),escape:o(function(t){return NE(t)},"escape")};function RE(t){var e=this;return jF.call(t.childNodes,function(r,n){n=new AF(n,e.options);var i="";return n.nodeType===3?i=n.isCode?n.nodeValue:e.escape(n.nodeValue):n.nodeType===1&&(i=WF.call(e,n)),AE(r,i)},"")}o(RE,"process");function zF(t){var e=this;return this.rules.forEach(function(r){typeof r.append=="function"&&(t=AE(t,r.append(e.options)))}),t.replace(/^[\t\r\n]+/,"").replace(/[\t\r\n\s]+$/,"")}o(zF,"postProcess");function WF(t){var e=this.rules.forNode(t),r=RE.call(this,t),n=t.flankingWhitespace;return(n.leading||n.trailing)&&(r=r.trim()),n.leading+e.replacement(r,t,this.options)+n.trailing}o(WF,"replacementForNode");function AE(t,e){var r=EE(t),n=TE(e),i=Math.max(t.length-r.length,e.length-n.length),s=`
255
+ `:r},"defaultReplacement")};this.options=$F({},e,t),this.rules=new jE(this.options)}o(di,"TurndownService"),di.prototype={turndown:o(function(t){if(!s2(t))throw new TypeError(t+" is not a string, or an element/document/fragment node.");if(t==="")return"";var e=HE.call(this,new JF(t,this.options));return i2.call(this,e)},"turndown"),use:o(function(t){if(Array.isArray(t))for(var e=0;e<t.length;e++)this.use(t[e]);else if(typeof t=="function")t(this);else throw new TypeError("plugin must be a Function or an Array of Functions");return this},"use"),addRule:o(function(t,e){return this.rules.add(t,e),this},"addRule"),keep:o(function(t){return this.rules.keep(t),this},"keep"),remove:o(function(t){return this.rules.remove(t),this},"remove"),escape:o(function(t){return BE(t)},"escape")};function HE(t){var e=this;return n2.call(t.childNodes,function(r,n){n=new ZF(n,e.options);var i="";return n.nodeType===3?i=n.isCode?n.nodeValue:e.escape(n.nodeValue):n.nodeType===1&&(i=o2.call(e,n)),UE(r,i)},"")}o(HE,"process");function i2(t){var e=this;return this.rules.forEach(function(r){typeof r.append=="function"&&(t=UE(t,r.append(e.options)))}),t.replace(/^[\t\r\n]+/,"").replace(/[\t\r\n\s]+$/,"")}o(i2,"postProcess");function o2(t){var e=this.rules.forNode(t),r=HE.call(this,t),n=t.flankingWhitespace;return(n.leading||n.trailing)&&(r=r.trim()),n.leading+e.replacement(r,t,this.options)+n.trailing}o(o2,"replacementForNode");function UE(t,e){var r=LE(t),n=PE(e),i=Math.max(t.length-r.length,e.length-n.length),s=`
256
256
 
257
- `.substring(0,i);return r+s+n}o(AE,"join");function HF(t){return t!=null&&(typeof t=="string"||t.nodeType&&(t.nodeType===1||t.nodeType===9||t.nodeType===11))}o(HF,"canConvert");var Ey={};se(Ey,{gfm:()=>BE,highlightedCodeBlock:()=>Sy,strikethrough:()=>vy,tables:()=>ky,taskListItems:()=>Ty});var FE=/highlight-(?:text|source)-([a-z0-9]+)/;function Sy(t){t.addRule("highlightedCodeBlock",{filter:o(function(e){var r=e.firstChild;return e.nodeName==="DIV"&&FE.test(e.className)&&r&&r.nodeName==="PRE"},"filter"),replacement:o(function(e,r,n){var i=r.className||"",s=(i.match(FE)||[null,""])[1];return`
257
+ `.substring(0,i);return r+s+n}o(UE,"join");function s2(t){return t!=null&&(typeof t=="string"||t.nodeType&&(t.nodeType===1||t.nodeType===9||t.nodeType===11))}o(s2,"canConvert");var Iy={};se(Iy,{gfm:()=>VE,highlightedCodeBlock:()=>Dy,strikethrough:()=>Cy,tables:()=>Oy,taskListItems:()=>My});var qE=/highlight-(?:text|source)-([a-z0-9]+)/;function Dy(t){t.addRule("highlightedCodeBlock",{filter:o(function(e){var r=e.firstChild;return e.nodeName==="DIV"&&qE.test(e.className)&&r&&r.nodeName==="PRE"},"filter"),replacement:o(function(e,r,n){var i=r.className||"",s=(i.match(qE)||[null,""])[1];return`
258
258
 
259
259
  `+n.fence+s+`
260
260
  `+r.firstChild.textContent+`
261
261
  `+n.fence+`
262
262
 
263
- `},"replacement")})}o(Sy,"highlightedCodeBlock");function vy(t){t.addRule("strikethrough",{filter:["del","s","strike"],replacement:o(function(e){return"~"+e+"~"},"replacement")})}o(vy,"strikethrough");var UF=Array.prototype.indexOf,qF=Array.prototype.every,oa={};oa.tableCell={filter:["th","td"],replacement:o(function(t,e){return $E(t,e)},"replacement")},oa.tableRow={filter:"tr",replacement:o(function(t,e){var r="",n={left:":--",right:"--:",center:":-:"};if(wy(e))for(var i=0;i<e.childNodes.length;i++){var s="---",a=(e.childNodes[i].getAttribute("align")||"").toLowerCase();a&&(s=n[a]||s),r+=$E(s,e.childNodes[i])}return`
263
+ `},"replacement")})}o(Dy,"highlightedCodeBlock");function Cy(t){t.addRule("strikethrough",{filter:["del","s","strike"],replacement:o(function(e){return"~"+e+"~"},"replacement")})}o(Cy,"strikethrough");var a2=Array.prototype.indexOf,l2=Array.prototype.every,sa={};sa.tableCell={filter:["th","td"],replacement:o(function(t,e){return YE(t,e)},"replacement")},sa.tableRow={filter:"tr",replacement:o(function(t,e){var r="",n={left:":--",right:"--:",center:":-:"};if(Ey(e))for(var i=0;i<e.childNodes.length;i++){var s="---",a=(e.childNodes[i].getAttribute("align")||"").toLowerCase();a&&(s=n[a]||s),r+=YE(s,e.childNodes[i])}return`
264
264
  `+t+(r?`
265
- `+r:"")},"replacement")},oa.table={filter:o(function(t){return t.nodeName==="TABLE"&&wy(t.rows[0])},"filter"),replacement:o(function(t){return t=t.replace(`
265
+ `+r:"")},"replacement")},sa.table={filter:o(function(t){return t.nodeName==="TABLE"&&Ey(t.rows[0])},"filter"),replacement:o(function(t){return t=t.replace(`
266
266
 
267
267
  `,`
268
268
  `),`
269
269
 
270
270
  `+t+`
271
271
 
272
- `},"replacement")},oa.tableSection={filter:["thead","tbody","tfoot"],replacement:o(function(t){return t},"replacement")};function wy(t){var e=t.parentNode;return e.nodeName==="THEAD"||e.firstChild===t&&(e.nodeName==="TABLE"||YF(e))&&qF.call(t.childNodes,function(r){return r.nodeName==="TH"})}o(wy,"isHeadingRow");function YF(t){var e=t.previousSibling;return t.nodeName==="TBODY"&&(!e||e.nodeName==="THEAD"&&/^\s*$/i.test(e.textContent))}o(YF,"isFirstTbody");function $E(t,e){var r=UF.call(e.parentNode.childNodes,e),n=" ";return r===0&&(n="| "),n+t+" |"}o($E,"cell");function ky(t){t.keep(function(r){return r.nodeName==="TABLE"&&!wy(r.rows[0])});for(var e in oa)t.addRule(e,oa[e])}o(ky,"tables");function Ty(t){t.addRule("taskListItems",{filter:o(function(e){return e.type==="checkbox"&&e.parentNode.nodeName==="LI"},"filter"),replacement:o(function(e,r){return(r.checked?"[x]":"[ ]")+" "},"replacement")})}o(Ty,"taskListItems");function BE(t){t.use([Sy,vy,ky,Ty])}o(BE,"gfm");var Dy=Ey;function Cy(t){if(t)throw t}o(Cy,"bail");function Vl(t){if(typeof t!="object"||t===null)return!1;let e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}o(Vl,"isPlainObject");function Oy(){let t=[],e={run:r,use:n};return e;function r(...i){let s=-1,a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);l(null,...i);function l(c,...u){let f=t[++s],p=-1;if(c){a(c);return}for(;++p<i.length;)(u[p]===null||u[p]===void 0)&&(u[p]=i[p]);i=u,f?JE(f,l)(...u):a(null,...u)}o(l,"next")}function n(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return t.push(i),e}}o(Oy,"trough");function JE(t,e){let r;return n;function n(...a){let l=t.length>a.length,c;l&&a.push(i);try{c=t.apply(this,a)}catch(u){let f=u;if(l&&r)throw f;return i(f)}l||(c&&c.then&&typeof c.then=="function"?c.then(s,i):c instanceof Error?i(c):s(c))}function i(a,...l){r||(r=!0,e(a,...l))}function s(a){i(null,a)}}o(JE,"wrap");function yi(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?QE(t.position):"start"in t||"end"in t?QE(t):"line"in t||"column"in t?My(t):""}o(yi,"stringifyPosition");function My(t){return XE(t&&t.line)+":"+XE(t&&t.column)}o(My,"point");function QE(t){return My(t&&t.start)+"-"+My(t&&t.end)}o(QE,"position");function XE(t){return t&&typeof t=="number"?t:1}o(XE,"index");var ut=class extends Error{static{o(this,"VFileMessage")}constructor(e,r,n){super(),typeof r=="string"&&(n=r,r=void 0);let i="",s={},a=!1;if(r&&("line"in r&&"column"in r?s={place:r}:"start"in r&&"end"in r?s={place:r}:"type"in r?s={ancestors:[r],place:r.position}:s={...r}),typeof e=="string"?i=e:!s.cause&&e&&(a=!0,i=e.message,s.cause=e),!s.ruleId&&!s.source&&typeof n=="string"){let c=n.indexOf(":");c===-1?s.ruleId=n:(s.source=n.slice(0,c),s.ruleId=n.slice(c+1))}if(!s.place&&s.ancestors&&s.ancestors){let c=s.ancestors[s.ancestors.length-1];c&&(s.place=c.position)}let l=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=l?l.line:void 0,this.name=yi(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=a&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};ut.prototype.file="",ut.prototype.name="",ut.prototype.reason="",ut.prototype.message="",ut.prototype.stack="",ut.prototype.column=void 0,ut.prototype.line=void 0,ut.prototype.ancestors=void 0,ut.prototype.cause=void 0,ut.prototype.fatal=void 0,ut.prototype.place=void 0,ut.prototype.ruleId=void 0,ut.prototype.source=void 0;var _r={basename:VF,dirname:KF,extname:GF,join:JF,sep:"/"};function VF(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');Kl(t);let r=0,n=-1,i=t.length,s;if(e===void 0||e.length===0||e.length>t.length){for(;i--;)if(t.codePointAt(i)===47){if(s){r=i+1;break}}else n<0&&(s=!0,n=i+1);return n<0?"":t.slice(r,n)}if(e===t)return"";let a=-1,l=e.length-1;for(;i--;)if(t.codePointAt(i)===47){if(s){r=i+1;break}}else a<0&&(s=!0,a=i+1),l>-1&&(t.codePointAt(i)===e.codePointAt(l--)?l<0&&(n=i):(l=-1,n=a));return r===n?n=a:n<0&&(n=t.length),t.slice(r,n)}o(VF,"basename");function KF(t){if(Kl(t),t.length===0)return".";let e=-1,r=t.length,n;for(;--r;)if(t.codePointAt(r)===47){if(n){e=r;break}}else n||(n=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}o(KF,"dirname");function GF(t){Kl(t);let e=t.length,r=-1,n=0,i=-1,s=0,a;for(;e--;){let l=t.codePointAt(e);if(l===47){if(a){n=e+1;break}continue}r<0&&(a=!0,r=e+1),l===46?i<0?i=e:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||r<0||s===0||s===1&&i===r-1&&i===n+1?"":t.slice(i,r)}o(GF,"extname");function JF(...t){let e=-1,r;for(;++e<t.length;)Kl(t[e]),t[e]&&(r=r===void 0?t[e]:r+"/"+t[e]);return r===void 0?".":QF(r)}o(JF,"join");function QF(t){Kl(t);let e=t.codePointAt(0)===47,r=XF(t,!e);return r.length===0&&!e&&(r="."),r.length>0&&t.codePointAt(t.length-1)===47&&(r+="/"),e?"/"+r:r}o(QF,"normalize");function XF(t,e){let r="",n=0,i=-1,s=0,a=-1,l,c;for(;++a<=t.length;){if(a<t.length)l=t.codePointAt(a);else{if(l===47)break;l=47}if(l===47){if(!(i===a-1||s===1))if(i!==a-1&&s===2){if(r.length<2||n!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(c=r.lastIndexOf("/"),c!==r.length-1){c<0?(r="",n=0):(r=r.slice(0,c),n=r.length-1-r.lastIndexOf("/")),i=a,s=0;continue}}else if(r.length>0){r="",n=0,i=a,s=0;continue}}e&&(r=r.length>0?r+"/..":"..",n=2)}else r.length>0?r+="/"+t.slice(i+1,a):r=t.slice(i+1,a),n=a-i-1;i=a,s=0}else l===46&&s>-1?s++:s=-1}return r}o(XF,"normalizeString");function Kl(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}o(Kl,"assertPath");var ZE={cwd:ZF};function ZF(){return"/"}o(ZF,"cwd");function sa(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}o(sa,"isUrl");function eD(t){if(typeof t=="string")t=new URL(t);else if(!sa(t)){let e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){let e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return e2(t)}o(eD,"urlToPath");function e2(t){if(t.hostname!==""){let n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}let e=t.pathname,r=-1;for(;++r<e.length;)if(e.codePointAt(r)===37&&e.codePointAt(r+1)===50){let n=e.codePointAt(r+2);if(n===70||n===102){let i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(e)}o(e2,"getPathFromURLPosix");var Iy=["history","path","basename","stem","extname","dirname"],Gl=class{static{o(this,"VFile")}constructor(e){let r;e?sa(e)?r={path:e}:typeof e=="string"||t2(e)?r={value:e}:r=e:r={},this.cwd="cwd"in r?"":ZE.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Iy.length;){let s=Iy[n];s in r&&r[s]!==void 0&&r[s]!==null&&(this[s]=s==="history"?[...r[s]]:r[s])}let i;for(i in r)Iy.includes(i)||(this[i]=r[i])}get basename(){return typeof this.path=="string"?_r.basename(this.path):void 0}set basename(e){Py(e,"basename"),Ny(e,"basename"),this.path=_r.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?_r.dirname(this.path):void 0}set dirname(e){tD(this.basename,"dirname"),this.path=_r.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?_r.extname(this.path):void 0}set extname(e){if(Ny(e,"extname"),tD(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=_r.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){sa(e)&&(e=eD(e)),Py(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?_r.basename(this.path,this.extname):void 0}set stem(e){Py(e,"stem"),Ny(e,"stem"),this.path=_r.join(this.dirname||"",e+(this.extname||""))}fail(e,r,n){let i=this.message(e,r,n);throw i.fatal=!0,i}info(e,r,n){let i=this.message(e,r,n);return i.fatal=void 0,i}message(e,r,n){let i=new ut(e,r,n);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}};function Ny(t,e){if(t&&t.includes(_r.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+_r.sep+"`")}o(Ny,"assertPart");function Py(t,e){if(!t)throw new Error("`"+e+"` cannot be empty")}o(Py,"assertNonEmpty");function tD(t,e){if(!t)throw new Error("Setting `"+e+"` requires `path` to be set too")}o(tD,"assertPath");function t2(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}o(t2,"isUint8Array");var rD=o((function(t){let n=this.constructor.prototype,i=n[t],s=o(function(){return i.apply(s,arguments)},"apply");return Object.setPrototypeOf(s,n),s}),"CallableInstance");var Ph=zr(GE(),1),r2={}.hasOwnProperty,_y=class t extends rD{static{o(this,"Processor")}constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Oy()}copy(){let e=new t,r=-1;for(;++r<this.attachers.length;){let n=this.attachers[r];e.use(...n)}return e.data((0,Ph.default)(!0,{},this.namespace)),e}data(e,r){return typeof e=="string"?arguments.length===2?(Ay("data",this.frozen),this.namespace[e]=r,this):r2.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Ay("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[r,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let i=r.call(e,...n);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();let r=Nh(e),n=this.parser||this.Parser;return Ly("parse",n),n(String(r),r)}process(e,r){let n=this;return this.freeze(),Ly("process",this.parser||this.Parser),Ry("process",this.compiler||this.Compiler),r?i(void 0,r):new Promise(i);function i(s,a){let l=Nh(e),c=n.parse(l);n.run(c,l,function(f,p,h){if(f||!p||!h)return u(f);let m=p,d=n.stringify(m,h);i2(d)?h.value=d:h.result=d,u(f,h)});function u(f,p){f||!p?a(f):s?s(p):r(void 0,p)}o(u,"realDone")}o(i,"executor")}processSync(e){let r=!1,n;return this.freeze(),Ly("processSync",this.parser||this.Parser),Ry("processSync",this.compiler||this.Compiler),this.process(e,i),iD("processSync","process",r),n;function i(s,a){r=!0,Cy(s),n=a}o(i,"realDone")}run(e,r,n){nD(e),this.freeze();let i=this.transformers;return!n&&typeof r=="function"&&(n=r,r=void 0),n?s(void 0,n):new Promise(s);function s(a,l){let c=Nh(r);i.run(e,c,u);function u(f,p,h){let m=p||e;f?l(f):a?a(m):n(void 0,m,h)}o(u,"realDone")}o(s,"executor")}runSync(e,r){let n=!1,i;return this.run(e,r,s),iD("runSync","run",n),i;function s(a,l){Cy(a),i=l,n=!0}o(s,"realDone")}stringify(e,r){this.freeze();let n=Nh(r),i=this.compiler||this.Compiler;return Ry("stringify",i),nD(e),i(e,n)}use(e,...r){let n=this.attachers,i=this.namespace;if(Ay("use",this.frozen),e!=null)if(typeof e=="function")c(e,r);else if(typeof e=="object")Array.isArray(e)?l(e):a(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function s(u){if(typeof u=="function")c(u,[]);else if(typeof u=="object")if(Array.isArray(u)){let[f,...p]=u;c(f,p)}else a(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function a(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(u.plugins),u.settings&&(i.settings=(0,Ph.default)(!0,i.settings,u.settings))}function l(u){let f=-1;if(u!=null)if(Array.isArray(u))for(;++f<u.length;){let p=u[f];s(p)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function c(u,f){let p=-1,h=-1;for(;++p<n.length;)if(n[p][0]===u){h=p;break}if(h===-1)n.push([u,...f]);else if(f.length>0){let[m,...d]=f,g=n[h][1];Vl(g)&&Vl(m)&&(m=(0,Ph.default)(!0,g,m)),n[h]=[u,m,...d]}}}},Jl=new _y().freeze();function Ly(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}o(Ly,"assertParser");function Ry(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}o(Ry,"assertCompiler");function Ay(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}o(Ay,"assertUnfrozen");function nD(t){if(!Vl(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}o(nD,"assertNode");function iD(t,e,r){if(!r)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}o(iD,"assertDone");function Nh(t){return n2(t)?t:new Gl(t)}o(Nh,"vfile");function n2(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}o(n2,"looksLikeAVFile");function i2(t){return typeof t=="string"||o2(t)}o(i2,"looksLikeAValue");function o2(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}o(o2,"isUint8Array");function Ke(t,e,r,n){let i=t.length,s=0,a;if(e<0?e=-e>i?0:i+e:e=e>i?i:e,r=r>0?r:0,n.length<1e4)a=Array.from(n),a.unshift(e,r),t.splice(...a);else for(r&&t.splice(e,r);s<n.length;)a=n.slice(s,s+1e4),a.unshift(e,0),t.splice(...a),s+=1e4,e+=1e4}o(Ke,"splice");function Qe(t,e){return t.length>0?(Ke(t,t.length,0,e),t):e}o(Qe,"push");var Fy={}.hasOwnProperty;function _h(t){let e={},r=-1;for(;++r<t.length;)s2(e,t[r]);return e}o(_h,"combineExtensions");function s2(t,e){let r;for(r in e){let i=(Fy.call(t,r)?t[r]:void 0)||(t[r]={}),s=e[r],a;if(s)for(a in s){Fy.call(i,a)||(i[a]=[]);let l=s[a];a2(i[a],Array.isArray(l)?l:l?[l]:[])}}}o(s2,"syntaxExtension");function a2(t,e){let r=-1,n=[];for(;++r<e.length;)(e[r].add==="after"?t:n).push(e[r]);Ke(t,0,0,n)}o(a2,"constructs");function Lh(t){let e={},r=-1;for(;++r<t.length;)l2(e,t[r]);return e}o(Lh,"combineHtmlExtensions");function l2(t,e){let r;for(r in e){let i=(Fy.call(t,r)?t[r]:void 0)||(t[r]={}),s=e[r],a;if(s)for(a in s)i[a]=s[a]}}o(l2,"htmlExtension");function qe(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}o(qe,"normalizeIdentifier");var oD={}.hasOwnProperty,sD=/^(https?|ircs?|mailto|xmpp)$/i,c2=/^https?$/i;function $y(t){let e=t||{},r=!0,n={},i=[[]],s=[],a=[],c=Lh([{enter:{blockQuote:z,codeFenced:ue,codeFencedFenceInfo:y,codeFencedFenceMeta:y,codeIndented:Te,codeText:Ot,content:Ar,definition:_e,definitionDestinationString:Pt,definitionLabelString:y,definitionTitleString:y,emphasis:Di,htmlFlow:Kt,htmlText:ir,image:Ae,label:y,link:Ye,listItemMarker:le,listItemValue:C,listOrdered:A,listUnordered:W,paragraph:K,reference:y,resource:M,resourceDestinationString:I,resourceTitleString:y,setextHeading:nr,strong:Ci},exit:{atxHeading:ze,atxHeadingSequence:Vt,autolinkEmail:zC,autolinkProtocol:jC,blockQuote:U,characterEscapeValue:q,characterReferenceMarkerHexadecimal:Ob,characterReferenceMarkerNumeric:Ob,characterReferenceValue:BC,codeFenced:k,codeFencedFence:xe,codeFencedFenceInfo:w,codeFencedFenceMeta:F,codeFlowValue:fe,codeIndented:k,codeText:Rn,codeTextData:q,data:q,definition:br,definitionDestinationString:ot,definitionLabelString:Ee,definitionTitleString:Ct,emphasis:wr,hardBreakEscape:De,hardBreakTrailing:De,htmlFlow:$r,htmlFlowData:q,htmlText:$r,htmlTextData:q,image:Re,label:O,labelText:Yt,lineEnding:oe,link:Re,listOrdered:j,listUnordered:N,paragraph:X,reference:F,referenceString:v,resource:F,resourceDestinationString:B,resourceTitleString:re,setextHeading:L,setextHeadingLineSequence:Fr,setextHeadingText:_t,strong:FC,thematicBreak:$C}},...e.htmlExtensions||[]]),u={definitions:n,tightStack:a},f={buffer:y,encode:D,getData:g,lineEndingIfNeeded:P,options:e,raw:E,resume:x,setData:d,tag:T},p=e.defaultLineEnding;return h;function h(Y){let ne=-1,dt=0,Sr=[],Br=[],gn=[];for(;++ne<Y.length;)!p&&(Y[ne][1].type==="lineEnding"||Y[ne][1].type==="lineEndingBlank")&&(p=Y[ne][2].sliceSerialize(Y[ne][1])),(Y[ne][1].type==="listOrdered"||Y[ne][1].type==="listUnordered")&&(Y[ne][0]==="enter"?Sr.push(ne):m(Y.slice(Sr.pop(),ne))),Y[ne][1].type==="definition"&&(Y[ne][0]==="enter"?(gn=Qe(gn,Y.slice(dt,ne)),dt=ne):(Br=Qe(Br,Y.slice(dt,ne+1)),dt=ne+1));Br=Qe(Br,gn),Br=Qe(Br,Y.slice(dt)),ne=-1;let jr=Br;for(c.enter.null&&c.enter.null.call(f);++ne<Y.length;){let Mb=c[jr[ne][0]],Ib=jr[ne][1].type,Nb=Mb[Ib];oD.call(Mb,Ib)&&Nb&&Nb.call({sliceSerialize:jr[ne][2].sliceSerialize,...f},jr[ne][1])}return c.exit.null&&c.exit.null.call(f),i[0].join("")}function m(Y){let ne=Y.length,dt=0,Sr=0,Br=!1,gn;for(;++dt<ne;){let jr=Y[dt];if(jr[1]._container)gn=void 0,jr[0]==="enter"?Sr++:Sr--;else switch(jr[1].type){case"listItemPrefix":{jr[0]==="exit"&&(gn=!0);break}case"linePrefix":break;case"lineEndingBlank":{jr[0]==="enter"&&!Sr&&(gn?gn=void 0:Br=!0);break}default:gn=void 0}}Y[0][1]._loose=Br}function d(Y,ne){u[Y]=ne}function g(Y){return u[Y]}function y(){i.push([])}function x(){return i.pop().join("")}function T(Y){r&&(d("lastWasTag",!0),i[i.length-1].push(Y))}function E(Y){d("lastWasTag"),i[i.length-1].push(Y)}function _(){E(p||`
273
- `)}function P(){let Y=i[i.length-1],ne=Y[Y.length-1],dt=ne?ne.charCodeAt(ne.length-1):null;dt===10||dt===13||dt===null||_()}function D(Y){return g("ignoreEncode")?Y:ch(Y)}function F(){x()}function A(Y){a.push(!Y._loose),P(),T("<ol"),d("expectFirstItem",!0)}function W(Y){a.push(!Y._loose),P(),T("<ul"),d("expectFirstItem",!0)}function C(Y){if(g("expectFirstItem")){let ne=Number.parseInt(this.sliceSerialize(Y),10);ne!==1&&T(' start="'+D(String(ne))+'"')}}function le(){g("expectFirstItem")?T(">"):R(),P(),T("<li>"),d("expectFirstItem"),d("lastWasTag")}function j(){R(),a.pop(),_(),T("</ol>")}function N(){R(),a.pop(),_(),T("</ul>")}function R(){g("lastWasTag")&&!g("slurpAllLineEndings")&&P(),T("</li>"),d("slurpAllLineEndings")}function z(){a.push(!1),P(),T("<blockquote>")}function U(){a.pop(),P(),T("</blockquote>"),d("slurpAllLineEndings")}function K(){a[a.length-1]||(P(),T("<p>")),d("slurpAllLineEndings")}function X(){a[a.length-1]?d("slurpAllLineEndings",!0):T("</p>")}function ue(){P(),T("<pre><code"),d("fencesCount",0)}function w(){let Y=x();T(' class="language-'+Y+'"')}function xe(){let Y=g("fencesCount")||0;Y||(T(">"),d("slurpOneLineEnding",!0)),d("fencesCount",Y+1)}function Te(){P(),T("<pre><code>")}function k(){let Y=g("fencesCount");Y!==void 0&&Y<2&&u.tightStack.length>0&&!g("lastWasTag")&&_(),g("flowCodeSeenData")&&P(),T("</code></pre>"),Y!==void 0&&Y<2&&P(),d("flowCodeSeenData"),d("fencesCount"),d("slurpOneLineEnding")}function Ae(){s.push({image:!0}),r=void 0}function Ye(){s.push({})}function Yt(Y){s[s.length-1].labelId=this.sliceSerialize(Y)}function O(){s[s.length-1].label=x()}function v(Y){s[s.length-1].referenceId=this.sliceSerialize(Y)}function M(){y(),s[s.length-1].destination=""}function I(){y(),d("ignoreEncode",!0)}function B(){s[s.length-1].destination=x(),d("ignoreEncode")}function re(){s[s.length-1].title=x()}function Re(){let Y=s.length-1,ne=s[Y],dt=ne.referenceId||ne.labelId,Sr=ne.destination===void 0?n[qe(dt)]:ne;for(r=!0;Y--;)if(s[Y].image){r=void 0;break}ne.image?(T('<img src="'+fn(Sr.destination,e.allowDangerousProtocol?void 0:c2)+'" alt="'),E(ne.label),T('"')):T('<a href="'+fn(Sr.destination,e.allowDangerousProtocol?void 0:sD)+'"'),T(Sr.title?' title="'+Sr.title+'"':""),ne.image?T(" />"):(T(">"),E(ne.label),T("</a>")),s.pop()}function _e(){y(),s.push({})}function Ee(Y){x(),s[s.length-1].labelId=this.sliceSerialize(Y)}function Pt(){y(),d("ignoreEncode",!0)}function ot(){s[s.length-1].destination=x(),d("ignoreEncode")}function Ct(){s[s.length-1].title=x()}function br(){let Y=s[s.length-1],ne=qe(Y.labelId);x(),oD.call(n,ne)||(n[ne]=s[s.length-1]),s.pop()}function Ar(){d("slurpAllLineEndings",!0)}function Vt(Y){g("headingRank")||(d("headingRank",this.sliceSerialize(Y).length),P(),T("<h"+g("headingRank")+">"))}function nr(){y(),d("slurpAllLineEndings")}function _t(){d("slurpAllLineEndings",!0)}function ze(){T("</h"+g("headingRank")+">"),d("headingRank")}function Fr(Y){d("headingRank",this.sliceSerialize(Y).charCodeAt(0)===61?1:2)}function L(){let Y=x();P(),T("<h"+g("headingRank")+">"),E(Y),T("</h"+g("headingRank")+">"),d("slurpAllLineEndings"),d("headingRank")}function q(Y){E(D(this.sliceSerialize(Y)))}function oe(Y){if(!g("slurpAllLineEndings")){if(g("slurpOneLineEnding")){d("slurpOneLineEnding");return}if(g("inCodeText")){E(" ");return}E(D(this.sliceSerialize(Y)))}}function fe(Y){E(D(this.sliceSerialize(Y))),d("flowCodeSeenData",!0)}function De(){T("<br />")}function Kt(){P(),ir()}function $r(){d("ignoreEncode")}function ir(){e.allowDangerousHtml&&d("ignoreEncode",!0)}function Di(){T("<em>")}function Ci(){T("<strong>")}function Ot(){d("inCodeText",!0),T("<code>")}function Rn(){d("inCodeText"),T("</code>")}function wr(){T("</em>")}function FC(){T("</strong>")}function $C(){P(),T("<hr />")}function Ob(Y){d("characterReferenceType",Y.type)}function BC(Y){let ne=this.sliceSerialize(Y),dt=g("characterReferenceType")?na(ne,g("characterReferenceType")==="characterReferenceMarkerNumeric"?10:16):di(ne);E(D(dt)),d("characterReferenceType")}function jC(Y){let ne=this.sliceSerialize(Y);T('<a href="'+fn(ne,e.allowDangerousProtocol?void 0:sD)+'">'),E(D(ne)),T("</a>")}function zC(Y){let ne=this.sliceSerialize(Y);T('<a href="'+fn("mailto:"+ne)+'">'),E(D(ne)),T("</a>")}}o($y,"compile");function ie(t,e,r,n){let i=n?n-1:Number.POSITIVE_INFINITY,s=0;return a;function a(c){return Z(c)?(t.enter(r),l(c)):e(c)}function l(c){return Z(c)&&s++<i?(t.consume(c),l):(t.exit(r),e(c))}}o(ie,"factorySpace");var aD={tokenize:u2};function u2(t){let e=t.attempt(this.parser.constructs.contentInitial,n,i),r;return e;function n(l){if(l===null){t.consume(l);return}return t.enter("lineEnding"),t.consume(l),t.exit("lineEnding"),ie(t,e,"linePrefix")}function i(l){return t.enter("paragraph"),s(l)}function s(l){let c=t.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=c),r=c,a(l)}function a(l){if(l===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(l);return}return V(l)?(t.consume(l),t.exit("chunkText"),s):(t.consume(l),a)}}o(u2,"initializeContent");var cD={tokenize:f2},lD={tokenize:p2};function f2(t){let e=this,r=[],n=0,i,s,a;return l;function l(E){if(n<r.length){let _=r[n];return e.containerState=_[1],t.attempt(_[0].continuation,c,u)(E)}return u(E)}function c(E){if(n++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,i&&T();let _=e.events.length,P=_,D;for(;P--;)if(e.events[P][0]==="exit"&&e.events[P][1].type==="chunkFlow"){D=e.events[P][1].end;break}x(n);let F=_;for(;F<e.events.length;)e.events[F][1].end={...D},F++;return Ke(e.events,P+1,0,e.events.slice(_)),e.events.length=F,u(E)}return l(E)}function u(E){if(n===r.length){if(!i)return h(E);if(i.currentConstruct&&i.currentConstruct.concrete)return d(E);e.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return e.containerState={},t.check(lD,f,p)(E)}function f(E){return i&&T(),x(n),h(E)}function p(E){return e.parser.lazy[e.now().line]=n!==r.length,a=e.now().offset,d(E)}function h(E){return e.containerState={},t.attempt(lD,m,d)(E)}function m(E){return n++,r.push([e.currentConstruct,e.containerState]),h(E)}function d(E){if(E===null){i&&T(),x(0),t.consume(E);return}return i=i||e.parser.flow(e.now()),t.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),g(E)}function g(E){if(E===null){y(t.exit("chunkFlow"),!0),x(0),t.consume(E);return}return V(E)?(t.consume(E),y(t.exit("chunkFlow")),n=0,e.interrupt=void 0,l):(t.consume(E),g)}function y(E,_){let P=e.sliceStream(E);if(_&&P.push(null),E.previous=s,s&&(s.next=E),s=E,i.defineSkip(E.start),i.write(P),e.parser.lazy[E.start.line]){let D=i.events.length;for(;D--;)if(i.events[D][1].start.offset<a&&(!i.events[D][1].end||i.events[D][1].end.offset>a))return;let F=e.events.length,A=F,W,C;for(;A--;)if(e.events[A][0]==="exit"&&e.events[A][1].type==="chunkFlow"){if(W){C=e.events[A][1].end;break}W=!0}for(x(n),D=F;D<e.events.length;)e.events[D][1].end={...C},D++;Ke(e.events,A+1,0,e.events.slice(F)),e.events.length=D}}function x(E){let _=r.length;for(;_-- >E;){let P=r[_];e.containerState=P[1],P[0].exit.call(e,t)}r.length=E}function T(){i.write([null]),s=void 0,i=void 0,e.containerState._closeFlow=void 0}}o(f2,"initializeDocument");function p2(t,e,r){return ie(t,t.attempt(this.parser.constructs.document,e,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}o(p2,"tokenizeContainer");function xi(t,e,r){let n=[],i=-1;for(;++i<t.length;){let s=t[i].resolveAll;s&&!n.includes(s)&&(e=s(e,r),n.push(s))}return e}o(xi,"resolveAll");var Ql={name:"attention",resolveAll:h2,tokenize:m2};function h2(t,e){let r=-1,n,i,s,a,l,c,u,f;for(;++r<t.length;)if(t[r][0]==="enter"&&t[r][1].type==="attentionSequence"&&t[r][1]._close){for(n=r;n--;)if(t[n][0]==="exit"&&t[n][1].type==="attentionSequence"&&t[n][1]._open&&e.sliceSerialize(t[n][1]).charCodeAt(0)===e.sliceSerialize(t[r][1]).charCodeAt(0)){if((t[n][1]._close||t[r][1]._open)&&(t[r][1].end.offset-t[r][1].start.offset)%3&&!((t[n][1].end.offset-t[n][1].start.offset+t[r][1].end.offset-t[r][1].start.offset)%3))continue;c=t[n][1].end.offset-t[n][1].start.offset>1&&t[r][1].end.offset-t[r][1].start.offset>1?2:1;let p={...t[n][1].end},h={...t[r][1].start};uD(p,-c),uD(h,c),a={type:c>1?"strongSequence":"emphasisSequence",start:p,end:{...t[n][1].end}},l={type:c>1?"strongSequence":"emphasisSequence",start:{...t[r][1].start},end:h},s={type:c>1?"strongText":"emphasisText",start:{...t[n][1].end},end:{...t[r][1].start}},i={type:c>1?"strong":"emphasis",start:{...a.start},end:{...l.end}},t[n][1].end={...a.start},t[r][1].start={...l.end},u=[],t[n][1].end.offset-t[n][1].start.offset&&(u=Qe(u,[["enter",t[n][1],e],["exit",t[n][1],e]])),u=Qe(u,[["enter",i,e],["enter",a,e],["exit",a,e],["enter",s,e]]),u=Qe(u,xi(e.parser.constructs.insideSpan.null,t.slice(n+1,r),e)),u=Qe(u,[["exit",s,e],["enter",l,e],["exit",l,e],["exit",i,e]]),t[r][1].end.offset-t[r][1].start.offset?(f=2,u=Qe(u,[["enter",t[r][1],e],["exit",t[r][1],e]])):f=0,Ke(t,n-1,r-n+3,u),r=n+u.length-f-2;break}}for(r=-1;++r<t.length;)t[r][1].type==="attentionSequence"&&(t[r][1].type="data");return t}o(h2,"resolveAllAttention");function m2(t,e){let r=this.parser.constructs.attentionMarkers.null,n=this.previous,i=Pn(n),s;return a;function a(c){return s=c,t.enter("attentionSequence"),l(c)}function l(c){if(c===s)return t.consume(c),l;let u=t.exit("attentionSequence"),f=Pn(c),p=!f||f===2&&i||r.includes(c),h=!i||i===2&&f||r.includes(n);return u._open=!!(s===42?p:p&&(i||!h)),u._close=!!(s===42?h:h&&(f||!p)),e(c)}}o(m2,"tokenizeAttention");function uD(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}o(uD,"movePoint");var By={name:"autolink",tokenize:d2};function d2(t,e,r){let n=0;return i;function i(m){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(m),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),s}function s(m){return nt(m)?(t.consume(m),a):m===64?r(m):u(m)}function a(m){return m===43||m===45||m===46||He(m)?(n=1,l(m)):u(m)}function l(m){return m===58?(t.consume(m),n=0,c):(m===43||m===45||m===46||He(m))&&n++<32?(t.consume(m),l):(n=0,u(m))}function c(m){return m===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(m),t.exit("autolinkMarker"),t.exit("autolink"),e):m===null||m===32||m===60||lo(m)?r(m):(t.consume(m),c)}function u(m){return m===64?(t.consume(m),f):$1(m)?(t.consume(m),u):r(m)}function f(m){return He(m)?p(m):r(m)}function p(m){return m===46?(t.consume(m),n=0,f):m===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(m),t.exit("autolinkMarker"),t.exit("autolink"),e):h(m)}function h(m){if((m===45||He(m))&&n++<63){let d=m===45?h:p;return t.consume(m),d}return r(m)}}o(d2,"tokenizeAutolink");var pn={partial:!0,tokenize:g2};function g2(t,e,r){return n;function n(s){return Z(s)?ie(t,i,"linePrefix")(s):i(s)}function i(s){return s===null||V(s)?e(s):r(s)}}o(g2,"tokenizeBlankLine");var Rh={continuation:{tokenize:x2},exit:b2,name:"blockQuote",tokenize:y2};function y2(t,e,r){let n=this;return i;function i(a){if(a===62){let l=n.containerState;return l.open||(t.enter("blockQuote",{_container:!0}),l.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(a),t.exit("blockQuoteMarker"),s}return r(a)}function s(a){return Z(a)?(t.enter("blockQuotePrefixWhitespace"),t.consume(a),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),e):(t.exit("blockQuotePrefix"),e(a))}}o(y2,"tokenizeBlockQuoteStart");function x2(t,e,r){let n=this;return i;function i(a){return Z(a)?ie(t,s,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):s(a)}function s(a){return t.attempt(Rh,e,r)(a)}}o(x2,"tokenizeBlockQuoteContinuation");function b2(t){t.exit("blockQuote")}o(b2,"exit");var Ah={name:"characterEscape",tokenize:w2};function w2(t,e,r){return n;function n(s){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(s),t.exit("escapeMarker"),i}function i(s){return j1(s)?(t.enter("characterEscapeValue"),t.consume(s),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):r(s)}}o(w2,"tokenizeCharacterEscape");var Fh={name:"characterReference",tokenize:S2};function S2(t,e,r){let n=this,i=0,s,a;return l;function l(p){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(p),t.exit("characterReferenceMarker"),c}function c(p){return p===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(p),t.exit("characterReferenceMarkerNumeric"),u):(t.enter("characterReferenceValue"),s=31,a=He,f(p))}function u(p){return p===88||p===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(p),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),s=6,a=B1,f):(t.enter("characterReferenceValue"),s=7,a=zl,f(p))}function f(p){if(p===59&&i){let h=t.exit("characterReferenceValue");return a===He&&!di(n.sliceSerialize(h))?r(p):(t.enter("characterReferenceMarker"),t.consume(p),t.exit("characterReferenceMarker"),t.exit("characterReference"),e)}return a(p)&&i++<s?(t.consume(p),f):r(p)}}o(S2,"tokenizeCharacterReference");var fD={partial:!0,tokenize:k2},$h={concrete:!0,name:"codeFenced",tokenize:v2};function v2(t,e,r){let n=this,i={partial:!0,tokenize:P},s=0,a=0,l;return c;function c(D){return u(D)}function u(D){let F=n.events[n.events.length-1];return s=F&&F[1].type==="linePrefix"?F[2].sliceSerialize(F[1],!0).length:0,l=D,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),f(D)}function f(D){return D===l?(a++,t.consume(D),f):a<3?r(D):(t.exit("codeFencedFenceSequence"),Z(D)?ie(t,p,"whitespace")(D):p(D))}function p(D){return D===null||V(D)?(t.exit("codeFencedFence"),n.interrupt?e(D):t.check(fD,g,_)(D)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),h(D))}function h(D){return D===null||V(D)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),p(D)):Z(D)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),ie(t,m,"whitespace")(D)):D===96&&D===l?r(D):(t.consume(D),h)}function m(D){return D===null||V(D)?p(D):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),d(D))}function d(D){return D===null||V(D)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),p(D)):D===96&&D===l?r(D):(t.consume(D),d)}function g(D){return t.attempt(i,_,y)(D)}function y(D){return t.enter("lineEnding"),t.consume(D),t.exit("lineEnding"),x}function x(D){return s>0&&Z(D)?ie(t,T,"linePrefix",s+1)(D):T(D)}function T(D){return D===null||V(D)?t.check(fD,g,_)(D):(t.enter("codeFlowValue"),E(D))}function E(D){return D===null||V(D)?(t.exit("codeFlowValue"),T(D)):(t.consume(D),E)}function _(D){return t.exit("codeFenced"),e(D)}function P(D,F,A){let W=0;return C;function C(z){return D.enter("lineEnding"),D.consume(z),D.exit("lineEnding"),le}function le(z){return D.enter("codeFencedFence"),Z(z)?ie(D,j,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):j(z)}function j(z){return z===l?(D.enter("codeFencedFenceSequence"),N(z)):A(z)}function N(z){return z===l?(W++,D.consume(z),N):W>=a?(D.exit("codeFencedFenceSequence"),Z(z)?ie(D,R,"whitespace")(z):R(z)):A(z)}function R(z){return z===null||V(z)?(D.exit("codeFencedFence"),F(z)):A(z)}}}o(v2,"tokenizeCodeFenced");function k2(t,e,r){let n=this;return i;function i(a){return a===null?r(a):(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),s)}function s(a){return n.parser.lazy[n.now().line]?r(a):e(a)}}o(k2,"tokenizeNonLazyContinuation");var Xl={name:"codeIndented",tokenize:E2},T2={partial:!0,tokenize:D2};function E2(t,e,r){let n=this;return i;function i(u){return t.enter("codeIndented"),ie(t,s,"linePrefix",5)(u)}function s(u){let f=n.events[n.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?a(u):r(u)}function a(u){return u===null?c(u):V(u)?t.attempt(T2,a,c)(u):(t.enter("codeFlowValue"),l(u))}function l(u){return u===null||V(u)?(t.exit("codeFlowValue"),a(u)):(t.consume(u),l)}function c(u){return t.exit("codeIndented"),e(u)}}o(E2,"tokenizeCodeIndented");function D2(t,e,r){let n=this;return i;function i(a){return n.parser.lazy[n.now().line]?r(a):V(a)?(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),i):ie(t,s,"linePrefix",5)(a)}function s(a){let l=n.events[n.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?e(a):V(a)?i(a):r(a)}}o(D2,"tokenizeFurtherStart");var jy={name:"codeText",previous:O2,resolve:C2,tokenize:M2};function C2(t){let e=t.length-4,r=3,n,i;if((t[r][1].type==="lineEnding"||t[r][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(n=r;++n<e;)if(t[n][1].type==="codeTextData"){t[r][1].type="codeTextPadding",t[e][1].type="codeTextPadding",r+=2,e-=2;break}}for(n=r-1,e++;++n<=e;)i===void 0?n!==e&&t[n][1].type!=="lineEnding"&&(i=n):(n===e||t[n][1].type==="lineEnding")&&(t[i][1].type="codeTextData",n!==i+2&&(t[i][1].end=t[n-1][1].end,t.splice(i+2,n-i-2),e-=n-i-2,n=i+2),i=void 0);return t}o(C2,"resolveCodeText");function O2(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}o(O2,"previous");function M2(t,e,r){let n=this,i=0,s,a;return l;function l(h){return t.enter("codeText"),t.enter("codeTextSequence"),c(h)}function c(h){return h===96?(t.consume(h),i++,c):(t.exit("codeTextSequence"),u(h))}function u(h){return h===null?r(h):h===32?(t.enter("space"),t.consume(h),t.exit("space"),u):h===96?(a=t.enter("codeTextSequence"),s=0,p(h)):V(h)?(t.enter("lineEnding"),t.consume(h),t.exit("lineEnding"),u):(t.enter("codeTextData"),f(h))}function f(h){return h===null||h===32||h===96||V(h)?(t.exit("codeTextData"),u(h)):(t.consume(h),f)}function p(h){return h===96?(t.consume(h),s++,p):s===i?(t.exit("codeTextSequence"),t.exit("codeText"),e(h)):(a.type="codeTextData",f(h))}}o(M2,"tokenizeCodeText");var ec=class{static{o(this,"SpliceBuffer")}constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,r){let n=r??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,r,n){let i=r||0;this.setCursor(Math.trunc(e));let s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return n&&Zl(this.left,n),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),Zl(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Zl(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let r=this.left.splice(e,Number.POSITIVE_INFINITY);Zl(this.right,r.reverse())}else{let r=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Zl(this.left,r.reverse())}}};function Zl(t,e){let r=0;if(e.length<1e4)t.push(...e);else for(;r<e.length;)t.push(...e.slice(r,r+1e4)),r+=1e4}o(Zl,"chunkedPush");function Bh(t){let e={},r=-1,n,i,s,a,l,c,u,f=new ec(t);for(;++r<f.length;){for(;r in e;)r=e[r];if(n=f.get(r),r&&n[1].type==="chunkFlow"&&f.get(r-1)[1].type==="listItemPrefix"&&(c=n[1]._tokenizer.events,s=0,s<c.length&&c[s][1].type==="lineEndingBlank"&&(s+=2),s<c.length&&c[s][1].type==="content"))for(;++s<c.length&&c[s][1].type!=="content";)c[s][1].type==="chunkText"&&(c[s][1]._isInFirstContentOfListItem=!0,s++);if(n[0]==="enter")n[1].contentType&&(Object.assign(e,I2(f,r)),r=e[r],u=!0);else if(n[1]._container){for(s=r,i=void 0;s--;)if(a=f.get(s),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=s);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(n[1].end={...f.get(i)[1].start},l=f.slice(i,r),l.unshift(n),f.splice(i,r-i+1,l))}}return Ke(t,0,Number.POSITIVE_INFINITY,f.slice(0)),!u}o(Bh,"subtokenize");function I2(t,e){let r=t.get(e)[1],n=t.get(e)[2],i=e-1,s=[],a=r._tokenizer;a||(a=n.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));let l=a.events,c=[],u={},f,p,h=-1,m=r,d=0,g=0,y=[g];for(;m;){for(;t.get(++i)[1]!==m;);s.push(i),m._tokenizer||(f=n.sliceStream(m),m.next||f.push(null),p&&a.defineSkip(m.start),m._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(f),m._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),p=m,m=m.next}for(m=r;++h<l.length;)l[h][0]==="exit"&&l[h-1][0]==="enter"&&l[h][1].type===l[h-1][1].type&&l[h][1].start.line!==l[h][1].end.line&&(g=h+1,y.push(g),m._tokenizer=void 0,m.previous=void 0,m=m.next);for(a.events=[],m?(m._tokenizer=void 0,m.previous=void 0):y.pop(),h=y.length;h--;){let x=l.slice(y[h],y[h+1]),T=s.pop();c.push([T,T+x.length-1]),t.splice(T,2,x)}for(c.reverse(),h=-1;++h<c.length;)u[d+c[h][0]]=d+c[h][1],d+=c[h][1]-c[h][0]-1;return u}o(I2,"subcontent");var zy={resolve:P2,tokenize:_2},N2={partial:!0,tokenize:L2};function P2(t){return Bh(t),t}o(P2,"resolveContent");function _2(t,e){let r;return n;function n(l){return t.enter("content"),r=t.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?s(l):V(l)?t.check(N2,a,s)(l):(t.consume(l),i)}function s(l){return t.exit("chunkContent"),t.exit("content"),e(l)}function a(l){return t.consume(l),t.exit("chunkContent"),r.next=t.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,i}}o(_2,"tokenizeContent");function L2(t,e,r){let n=this;return i;function i(a){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),ie(t,s,"linePrefix")}function s(a){if(a===null||V(a))return r(a);let l=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?e(a):t.interrupt(n.parser.constructs.flow,r,e)(a)}}o(L2,"tokenizeContinuation");function jh(t,e,r,n,i,s,a,l,c){let u=c||Number.POSITIVE_INFINITY,f=0;return p;function p(x){return x===60?(t.enter(n),t.enter(i),t.enter(s),t.consume(x),t.exit(s),h):x===null||x===32||x===41||lo(x)?r(x):(t.enter(n),t.enter(a),t.enter(l),t.enter("chunkString",{contentType:"string"}),g(x))}function h(x){return x===62?(t.enter(s),t.consume(x),t.exit(s),t.exit(i),t.exit(n),e):(t.enter(l),t.enter("chunkString",{contentType:"string"}),m(x))}function m(x){return x===62?(t.exit("chunkString"),t.exit(l),h(x)):x===null||x===60||V(x)?r(x):(t.consume(x),x===92?d:m)}function d(x){return x===60||x===62||x===92?(t.consume(x),m):m(x)}function g(x){return!f&&(x===null||x===41||ye(x))?(t.exit("chunkString"),t.exit(l),t.exit(a),t.exit(n),e(x)):f<u&&x===40?(t.consume(x),f++,g):x===41?(t.consume(x),f--,g):x===null||x===32||x===40||lo(x)?r(x):(t.consume(x),x===92?y:g)}function y(x){return x===40||x===41||x===92?(t.consume(x),g):g(x)}}o(jh,"factoryDestination");function zh(t,e,r,n,i,s){let a=this,l=0,c;return u;function u(m){return t.enter(n),t.enter(i),t.consume(m),t.exit(i),t.enter(s),f}function f(m){return l>999||m===null||m===91||m===93&&!c||m===94&&!l&&"_hiddenFootnoteSupport"in a.parser.constructs?r(m):m===93?(t.exit(s),t.enter(i),t.consume(m),t.exit(i),t.exit(n),e):V(m)?(t.enter("lineEnding"),t.consume(m),t.exit("lineEnding"),f):(t.enter("chunkString",{contentType:"string"}),p(m))}function p(m){return m===null||m===91||m===93||V(m)||l++>999?(t.exit("chunkString"),f(m)):(t.consume(m),c||(c=!Z(m)),m===92?h:p)}function h(m){return m===91||m===92||m===93?(t.consume(m),l++,p):p(m)}}o(zh,"factoryLabel");function Wh(t,e,r,n,i,s){let a;return l;function l(h){return h===34||h===39||h===40?(t.enter(n),t.enter(i),t.consume(h),t.exit(i),a=h===40?41:h,c):r(h)}function c(h){return h===a?(t.enter(i),t.consume(h),t.exit(i),t.exit(n),e):(t.enter(s),u(h))}function u(h){return h===a?(t.exit(s),c(a)):h===null?r(h):V(h)?(t.enter("lineEnding"),t.consume(h),t.exit("lineEnding"),ie(t,u,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===a||h===null||V(h)?(t.exit("chunkString"),u(h)):(t.consume(h),h===92?p:f)}function p(h){return h===a||h===92?(t.consume(h),f):f(h)}}o(Wh,"factoryTitle");function xo(t,e){let r;return n;function n(i){return V(i)?(t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),r=!0,n):Z(i)?ie(t,n,r?"linePrefix":"lineSuffix")(i):e(i)}}o(xo,"factoryWhitespace");var Wy={name:"definition",tokenize:A2},R2={partial:!0,tokenize:F2};function A2(t,e,r){let n=this,i;return s;function s(m){return t.enter("definition"),a(m)}function a(m){return zh.call(n,t,l,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function l(m){return i=qe(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),m===58?(t.enter("definitionMarker"),t.consume(m),t.exit("definitionMarker"),c):r(m)}function c(m){return ye(m)?xo(t,u)(m):u(m)}function u(m){return jh(t,f,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function f(m){return t.attempt(R2,p,p)(m)}function p(m){return Z(m)?ie(t,h,"whitespace")(m):h(m)}function h(m){return m===null||V(m)?(t.exit("definition"),n.parser.defined.push(i),e(m)):r(m)}}o(A2,"tokenizeDefinition");function F2(t,e,r){return n;function n(l){return ye(l)?xo(t,i)(l):r(l)}function i(l){return Wh(t,s,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function s(l){return Z(l)?ie(t,a,"whitespace")(l):a(l)}function a(l){return l===null||V(l)?e(l):r(l)}}o(F2,"tokenizeTitleBefore");var Hy={name:"hardBreakEscape",tokenize:$2};function $2(t,e,r){return n;function n(s){return t.enter("hardBreakEscape"),t.consume(s),i}function i(s){return V(s)?(t.exit("hardBreakEscape"),e(s)):r(s)}}o($2,"tokenizeHardBreakEscape");var Uy={name:"headingAtx",resolve:B2,tokenize:j2};function B2(t,e){let r=t.length-2,n=3,i,s;return t[n][1].type==="whitespace"&&(n+=2),r-2>n&&t[r][1].type==="whitespace"&&(r-=2),t[r][1].type==="atxHeadingSequence"&&(n===r-1||r-4>n&&t[r-2][1].type==="whitespace")&&(r-=n+1===r?2:4),r>n&&(i={type:"atxHeadingText",start:t[n][1].start,end:t[r][1].end},s={type:"chunkText",start:t[n][1].start,end:t[r][1].end,contentType:"text"},Ke(t,n,r-n+1,[["enter",i,e],["enter",s,e],["exit",s,e],["exit",i,e]])),t}o(B2,"resolveHeadingAtx");function j2(t,e,r){let n=0;return i;function i(f){return t.enter("atxHeading"),s(f)}function s(f){return t.enter("atxHeadingSequence"),a(f)}function a(f){return f===35&&n++<6?(t.consume(f),a):f===null||ye(f)?(t.exit("atxHeadingSequence"),l(f)):r(f)}function l(f){return f===35?(t.enter("atxHeadingSequence"),c(f)):f===null||V(f)?(t.exit("atxHeading"),e(f)):Z(f)?ie(t,l,"whitespace")(f):(t.enter("atxHeadingText"),u(f))}function c(f){return f===35?(t.consume(f),c):(t.exit("atxHeadingSequence"),l(f))}function u(f){return f===null||f===35||ye(f)?(t.exit("atxHeadingText"),l(f)):(t.consume(f),u)}}o(j2,"tokenizeHeadingAtx");var pD=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],qy=["pre","script","style","textarea"];var Yy={concrete:!0,name:"htmlFlow",resolveTo:H2,tokenize:U2},z2={partial:!0,tokenize:Y2},W2={partial:!0,tokenize:q2};function H2(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}o(H2,"resolveToHtmlFlow");function U2(t,e,r){let n=this,i,s,a,l,c;return u;function u(k){return f(k)}function f(k){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(k),p}function p(k){return k===33?(t.consume(k),h):k===47?(t.consume(k),s=!0,g):k===63?(t.consume(k),i=3,n.interrupt?e:w):nt(k)?(t.consume(k),a=String.fromCharCode(k),y):r(k)}function h(k){return k===45?(t.consume(k),i=2,m):k===91?(t.consume(k),i=5,l=0,d):nt(k)?(t.consume(k),i=4,n.interrupt?e:w):r(k)}function m(k){return k===45?(t.consume(k),n.interrupt?e:w):r(k)}function d(k){let Ae="CDATA[";return k===Ae.charCodeAt(l++)?(t.consume(k),l===Ae.length?n.interrupt?e:j:d):r(k)}function g(k){return nt(k)?(t.consume(k),a=String.fromCharCode(k),y):r(k)}function y(k){if(k===null||k===47||k===62||ye(k)){let Ae=k===47,Ye=a.toLowerCase();return!Ae&&!s&&qy.includes(Ye)?(i=1,n.interrupt?e(k):j(k)):pD.includes(a.toLowerCase())?(i=6,Ae?(t.consume(k),x):n.interrupt?e(k):j(k)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(k):s?T(k):E(k))}return k===45||He(k)?(t.consume(k),a+=String.fromCharCode(k),y):r(k)}function x(k){return k===62?(t.consume(k),n.interrupt?e:j):r(k)}function T(k){return Z(k)?(t.consume(k),T):C(k)}function E(k){return k===47?(t.consume(k),C):k===58||k===95||nt(k)?(t.consume(k),_):Z(k)?(t.consume(k),E):C(k)}function _(k){return k===45||k===46||k===58||k===95||He(k)?(t.consume(k),_):P(k)}function P(k){return k===61?(t.consume(k),D):Z(k)?(t.consume(k),P):E(k)}function D(k){return k===null||k===60||k===61||k===62||k===96?r(k):k===34||k===39?(t.consume(k),c=k,F):Z(k)?(t.consume(k),D):A(k)}function F(k){return k===c?(t.consume(k),c=null,W):k===null||V(k)?r(k):(t.consume(k),F)}function A(k){return k===null||k===34||k===39||k===47||k===60||k===61||k===62||k===96||ye(k)?P(k):(t.consume(k),A)}function W(k){return k===47||k===62||Z(k)?E(k):r(k)}function C(k){return k===62?(t.consume(k),le):r(k)}function le(k){return k===null||V(k)?j(k):Z(k)?(t.consume(k),le):r(k)}function j(k){return k===45&&i===2?(t.consume(k),U):k===60&&i===1?(t.consume(k),K):k===62&&i===4?(t.consume(k),xe):k===63&&i===3?(t.consume(k),w):k===93&&i===5?(t.consume(k),ue):V(k)&&(i===6||i===7)?(t.exit("htmlFlowData"),t.check(z2,Te,N)(k)):k===null||V(k)?(t.exit("htmlFlowData"),N(k)):(t.consume(k),j)}function N(k){return t.check(W2,R,Te)(k)}function R(k){return t.enter("lineEnding"),t.consume(k),t.exit("lineEnding"),z}function z(k){return k===null||V(k)?N(k):(t.enter("htmlFlowData"),j(k))}function U(k){return k===45?(t.consume(k),w):j(k)}function K(k){return k===47?(t.consume(k),a="",X):j(k)}function X(k){if(k===62){let Ae=a.toLowerCase();return qy.includes(Ae)?(t.consume(k),xe):j(k)}return nt(k)&&a.length<8?(t.consume(k),a+=String.fromCharCode(k),X):j(k)}function ue(k){return k===93?(t.consume(k),w):j(k)}function w(k){return k===62?(t.consume(k),xe):k===45&&i===2?(t.consume(k),w):j(k)}function xe(k){return k===null||V(k)?(t.exit("htmlFlowData"),Te(k)):(t.consume(k),xe)}function Te(k){return t.exit("htmlFlow"),e(k)}}o(U2,"tokenizeHtmlFlow");function q2(t,e,r){let n=this;return i;function i(a){return V(a)?(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),s):r(a)}function s(a){return n.parser.lazy[n.now().line]?r(a):e(a)}}o(q2,"tokenizeNonLazyContinuationStart");function Y2(t,e,r){return n;function n(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),t.attempt(pn,e,r)}}o(Y2,"tokenizeBlankLineBefore");var Vy={name:"htmlText",tokenize:V2};function V2(t,e,r){let n=this,i,s,a;return l;function l(w){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(w),c}function c(w){return w===33?(t.consume(w),u):w===47?(t.consume(w),P):w===63?(t.consume(w),E):nt(w)?(t.consume(w),A):r(w)}function u(w){return w===45?(t.consume(w),f):w===91?(t.consume(w),s=0,d):nt(w)?(t.consume(w),T):r(w)}function f(w){return w===45?(t.consume(w),m):r(w)}function p(w){return w===null?r(w):w===45?(t.consume(w),h):V(w)?(a=p,K(w)):(t.consume(w),p)}function h(w){return w===45?(t.consume(w),m):p(w)}function m(w){return w===62?U(w):w===45?h(w):p(w)}function d(w){let xe="CDATA[";return w===xe.charCodeAt(s++)?(t.consume(w),s===xe.length?g:d):r(w)}function g(w){return w===null?r(w):w===93?(t.consume(w),y):V(w)?(a=g,K(w)):(t.consume(w),g)}function y(w){return w===93?(t.consume(w),x):g(w)}function x(w){return w===62?U(w):w===93?(t.consume(w),x):g(w)}function T(w){return w===null||w===62?U(w):V(w)?(a=T,K(w)):(t.consume(w),T)}function E(w){return w===null?r(w):w===63?(t.consume(w),_):V(w)?(a=E,K(w)):(t.consume(w),E)}function _(w){return w===62?U(w):E(w)}function P(w){return nt(w)?(t.consume(w),D):r(w)}function D(w){return w===45||He(w)?(t.consume(w),D):F(w)}function F(w){return V(w)?(a=F,K(w)):Z(w)?(t.consume(w),F):U(w)}function A(w){return w===45||He(w)?(t.consume(w),A):w===47||w===62||ye(w)?W(w):r(w)}function W(w){return w===47?(t.consume(w),U):w===58||w===95||nt(w)?(t.consume(w),C):V(w)?(a=W,K(w)):Z(w)?(t.consume(w),W):U(w)}function C(w){return w===45||w===46||w===58||w===95||He(w)?(t.consume(w),C):le(w)}function le(w){return w===61?(t.consume(w),j):V(w)?(a=le,K(w)):Z(w)?(t.consume(w),le):W(w)}function j(w){return w===null||w===60||w===61||w===62||w===96?r(w):w===34||w===39?(t.consume(w),i=w,N):V(w)?(a=j,K(w)):Z(w)?(t.consume(w),j):(t.consume(w),R)}function N(w){return w===i?(t.consume(w),i=void 0,z):w===null?r(w):V(w)?(a=N,K(w)):(t.consume(w),N)}function R(w){return w===null||w===34||w===39||w===60||w===61||w===96?r(w):w===47||w===62||ye(w)?W(w):(t.consume(w),R)}function z(w){return w===47||w===62||ye(w)?W(w):r(w)}function U(w){return w===62?(t.consume(w),t.exit("htmlTextData"),t.exit("htmlText"),e):r(w)}function K(w){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(w),t.exit("lineEnding"),X}function X(w){return Z(w)?ie(t,ue,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):ue(w)}function ue(w){return t.enter("htmlTextData"),a(w)}}o(V2,"tokenizeHtmlText");var bo={name:"labelEnd",resolveAll:Q2,resolveTo:X2,tokenize:Z2},K2={tokenize:e$},G2={tokenize:t$},J2={tokenize:r$};function Q2(t){let e=-1,r=[];for(;++e<t.length;){let n=t[e][1];if(r.push(t[e]),n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd"){let i=n.type==="labelImage"?4:2;n.type="data",e+=i}}return t.length!==r.length&&Ke(t,0,t.length,r),t}o(Q2,"resolveAllLabelEnd");function X2(t,e){let r=t.length,n=0,i,s,a,l;for(;r--;)if(i=t[r][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;t[r][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(t[r][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=r,i.type!=="labelLink")){n=2;break}}else i.type==="labelEnd"&&(a=r);let c={type:t[s][1].type==="labelLink"?"link":"image",start:{...t[s][1].start},end:{...t[t.length-1][1].end}},u={type:"label",start:{...t[s][1].start},end:{...t[a][1].end}},f={type:"labelText",start:{...t[s+n+2][1].end},end:{...t[a-2][1].start}};return l=[["enter",c,e],["enter",u,e]],l=Qe(l,t.slice(s+1,s+n+3)),l=Qe(l,[["enter",f,e]]),l=Qe(l,xi(e.parser.constructs.insideSpan.null,t.slice(s+n+4,a-3),e)),l=Qe(l,[["exit",f,e],t[a-2],t[a-1],["exit",u,e]]),l=Qe(l,t.slice(a+1)),l=Qe(l,[["exit",c,e]]),Ke(t,s,t.length,l),t}o(X2,"resolveToLabelEnd");function Z2(t,e,r){let n=this,i=n.events.length,s,a;for(;i--;)if((n.events[i][1].type==="labelImage"||n.events[i][1].type==="labelLink")&&!n.events[i][1]._balanced){s=n.events[i][1];break}return l;function l(h){return s?s._inactive?p(h):(a=n.parser.defined.includes(qe(n.sliceSerialize({start:s.end,end:n.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(h),t.exit("labelMarker"),t.exit("labelEnd"),c):r(h)}function c(h){return h===40?t.attempt(K2,f,a?f:p)(h):h===91?t.attempt(G2,f,a?u:p)(h):a?f(h):p(h)}function u(h){return t.attempt(J2,f,p)(h)}function f(h){return e(h)}function p(h){return s._balanced=!0,r(h)}}o(Z2,"tokenizeLabelEnd");function e$(t,e,r){return n;function n(p){return t.enter("resource"),t.enter("resourceMarker"),t.consume(p),t.exit("resourceMarker"),i}function i(p){return ye(p)?xo(t,s)(p):s(p)}function s(p){return p===41?f(p):jh(t,a,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function a(p){return ye(p)?xo(t,c)(p):f(p)}function l(p){return r(p)}function c(p){return p===34||p===39||p===40?Wh(t,u,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):f(p)}function u(p){return ye(p)?xo(t,f)(p):f(p)}function f(p){return p===41?(t.enter("resourceMarker"),t.consume(p),t.exit("resourceMarker"),t.exit("resource"),e):r(p)}}o(e$,"tokenizeResource");function t$(t,e,r){let n=this;return i;function i(l){return zh.call(n,t,s,a,"reference","referenceMarker","referenceString")(l)}function s(l){return n.parser.defined.includes(qe(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?e(l):r(l)}function a(l){return r(l)}}o(t$,"tokenizeReferenceFull");function r$(t,e,r){return n;function n(s){return t.enter("reference"),t.enter("referenceMarker"),t.consume(s),t.exit("referenceMarker"),i}function i(s){return s===93?(t.enter("referenceMarker"),t.consume(s),t.exit("referenceMarker"),t.exit("reference"),e):r(s)}}o(r$,"tokenizeReferenceCollapsed");var Ky={name:"labelStartImage",resolveAll:bo.resolveAll,tokenize:n$};function n$(t,e,r){let n=this;return i;function i(l){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(l),t.exit("labelImageMarker"),s}function s(l){return l===91?(t.enter("labelMarker"),t.consume(l),t.exit("labelMarker"),t.exit("labelImage"),a):r(l)}function a(l){return l===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(l):e(l)}}o(n$,"tokenizeLabelStartImage");var Gy={name:"labelStartLink",resolveAll:bo.resolveAll,tokenize:i$};function i$(t,e,r){let n=this;return i;function i(a){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(a),t.exit("labelMarker"),t.exit("labelLink"),s}function s(a){return a===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(a):e(a)}}o(i$,"tokenizeLabelStartLink");var tc={name:"lineEnding",tokenize:o$};function o$(t,e){return r;function r(n){return t.enter("lineEnding"),t.consume(n),t.exit("lineEnding"),ie(t,e,"linePrefix")}}o(o$,"tokenizeLineEnding");var wo={name:"thematicBreak",tokenize:s$};function s$(t,e,r){let n=0,i;return s;function s(u){return t.enter("thematicBreak"),a(u)}function a(u){return i=u,l(u)}function l(u){return u===i?(t.enter("thematicBreakSequence"),c(u)):n>=3&&(u===null||V(u))?(t.exit("thematicBreak"),e(u)):r(u)}function c(u){return u===i?(t.consume(u),n++,c):(t.exit("thematicBreakSequence"),Z(u)?ie(t,l,"whitespace")(u):l(u))}}o(s$,"tokenizeThematicBreak");var Dt={continuation:{tokenize:u$},exit:p$,name:"list",tokenize:c$},a$={partial:!0,tokenize:h$},l$={partial:!0,tokenize:f$};function c$(t,e,r){let n=this,i=n.events[n.events.length-1],s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return l;function l(m){let d=n.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(d==="listUnordered"?!n.containerState.marker||m===n.containerState.marker:zl(m)){if(n.containerState.type||(n.containerState.type=d,t.enter(d,{_container:!0})),d==="listUnordered")return t.enter("listItemPrefix"),m===42||m===45?t.check(wo,r,u)(m):u(m);if(!n.interrupt||m===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),c(m)}return r(m)}function c(m){return zl(m)&&++a<10?(t.consume(m),c):(!n.interrupt||a<2)&&(n.containerState.marker?m===n.containerState.marker:m===41||m===46)?(t.exit("listItemValue"),u(m)):r(m)}function u(m){return t.enter("listItemMarker"),t.consume(m),t.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||m,t.check(pn,n.interrupt?r:f,t.attempt(a$,h,p))}function f(m){return n.containerState.initialBlankLine=!0,s++,h(m)}function p(m){return Z(m)?(t.enter("listItemPrefixWhitespace"),t.consume(m),t.exit("listItemPrefixWhitespace"),h):r(m)}function h(m){return n.containerState.size=s+n.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(m)}}o(c$,"tokenizeListStart");function u$(t,e,r){let n=this;return n.containerState._closeFlow=void 0,t.check(pn,i,s);function i(l){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,ie(t,e,"listItemIndent",n.containerState.size+1)(l)}o(i,"onBlank");function s(l){return n.containerState.furtherBlankLines||!Z(l)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,a(l)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,t.attempt(l$,e,a)(l))}o(s,"notBlank");function a(l){return n.containerState._closeFlow=!0,n.interrupt=void 0,ie(t,t.attempt(Dt,e,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}o(a,"notInCurrentItem")}o(u$,"tokenizeListContinuation");function f$(t,e,r){let n=this;return ie(t,i,"listItemIndent",n.containerState.size+1);function i(s){let a=n.events[n.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===n.containerState.size?e(s):r(s)}}o(f$,"tokenizeIndent");function p$(t){t.exit(this.containerState.type)}o(p$,"tokenizeListEnd");function h$(t,e,r){let n=this;return ie(t,i,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){let a=n.events[n.events.length-1];return!Z(s)&&a&&a[1].type==="listItemPrefixWhitespace"?e(s):r(s)}}o(h$,"tokenizeListItemPrefixWhitespace");var Hh={name:"setextUnderline",resolveTo:m$,tokenize:d$};function m$(t,e){let r=t.length,n,i,s;for(;r--;)if(t[r][0]==="enter"){if(t[r][1].type==="content"){n=r;break}t[r][1].type==="paragraph"&&(i=r)}else t[r][1].type==="content"&&t.splice(r,1),!s&&t[r][1].type==="definition"&&(s=r);let a={type:"setextHeading",start:{...t[n][1].start},end:{...t[t.length-1][1].end}};return t[i][1].type="setextHeadingText",s?(t.splice(i,0,["enter",a,e]),t.splice(s+1,0,["exit",t[n][1],e]),t[n][1].end={...t[s][1].end}):t[n][1]=a,t.push(["exit",a,e]),t}o(m$,"resolveToSetextUnderline");function d$(t,e,r){let n=this,i;return s;function s(u){let f=n.events.length,p;for(;f--;)if(n.events[f][1].type!=="lineEnding"&&n.events[f][1].type!=="linePrefix"&&n.events[f][1].type!=="content"){p=n.events[f][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||p)?(t.enter("setextHeadingLine"),i=u,a(u)):r(u)}function a(u){return t.enter("setextHeadingLineSequence"),l(u)}function l(u){return u===i?(t.consume(u),l):(t.exit("setextHeadingLineSequence"),Z(u)?ie(t,c,"lineSuffix")(u):c(u))}function c(u){return u===null||V(u)?(t.exit("setextHeadingLine"),e(u)):r(u)}}o(d$,"tokenizeSetextUnderline");var hD={tokenize:g$};function g$(t){let e=this,r=t.attempt(pn,n,t.attempt(this.parser.constructs.flowInitial,i,ie(t,t.attempt(this.parser.constructs.flow,i,t.attempt(zy,i)),"linePrefix")));return r;function n(s){if(s===null){t.consume(s);return}return t.enter("lineEndingBlank"),t.consume(s),t.exit("lineEndingBlank"),e.currentConstruct=void 0,r}function i(s){if(s===null){t.consume(s);return}return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),e.currentConstruct=void 0,r}}o(g$,"initializeFlow");var gD={resolveAll:dD()},yD=mD("string"),xD=mD("text");function mD(t){return{resolveAll:dD(t==="text"?y$:void 0),tokenize:e};function e(r){let n=this,i=this.parser.constructs[t],s=r.attempt(i,a,l);return a;function a(f){return u(f)?s(f):l(f)}function l(f){if(f===null){r.consume(f);return}return r.enter("data"),r.consume(f),c}function c(f){return u(f)?(r.exit("data"),s(f)):(r.consume(f),c)}function u(f){if(f===null)return!0;let p=i[f],h=-1;if(p)for(;++h<p.length;){let m=p[h];if(!m.previous||m.previous.call(n,n.previous))return!0}return!1}}}o(mD,"initializeFactory");function dD(t){return e;function e(r,n){let i=-1,s;for(;++i<=r.length;)s===void 0?r[i]&&r[i][1].type==="data"&&(s=i,i++):(!r[i]||r[i][1].type!=="data")&&(i!==s+2&&(r[s][1].end=r[i-1][1].end,r.splice(s+2,i-s-2),i=s+2),s=void 0);return t?t(r,n):r}}o(dD,"createResolver");function y$(t,e){let r=0;for(;++r<=t.length;)if((r===t.length||t[r][1].type==="lineEnding")&&t[r-1][1].type==="data"){let n=t[r-1][1],i=e.sliceStream(n),s=i.length,a=-1,l=0,c;for(;s--;){let u=i[s];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)l++,a--;if(a)break;a=-1}else if(u===-2)c=!0,l++;else if(u!==-1){s++;break}}if(e._contentTypeTextTrailing&&r===t.length&&(l=0),l){let u={type:r===t.length||c||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:n.start._bufferIndex+a,_index:n.start._index+s,line:n.end.line,column:n.end.column-l,offset:n.end.offset-l},end:{...n.end}};n.end={...u.start},n.start.offset===n.end.offset?Object.assign(n,u):(t.splice(r,0,["enter",u,e],["exit",u,e]),r+=2)}r++}return t}o(y$,"resolveAllLineSuffixes");var Jy={};se(Jy,{attentionMarkers:()=>E$,contentInitial:()=>b$,disable:()=>D$,document:()=>x$,flow:()=>S$,flowInitial:()=>w$,insideSpan:()=>T$,string:()=>v$,text:()=>k$});var x$={42:Dt,43:Dt,45:Dt,48:Dt,49:Dt,50:Dt,51:Dt,52:Dt,53:Dt,54:Dt,55:Dt,56:Dt,57:Dt,62:Rh},b$={91:Wy},w$={[-2]:Xl,[-1]:Xl,32:Xl},S$={35:Uy,42:wo,45:[Hh,wo],60:Yy,61:Hh,95:wo,96:$h,126:$h},v$={38:Fh,92:Ah},k$={[-5]:tc,[-4]:tc,[-3]:tc,33:Ky,38:Fh,42:Ql,60:[By,Vy],91:Gy,92:[Hy,Ah],93:bo,95:Ql,96:jy},T$={null:[Ql,gD]},E$={null:[42,95]},D$={null:[]};function bD(t,e,r){let n={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0},i={},s=[],a=[],l=[],c=!0,u={attempt:W(F),check:W(A),consume:_,enter:P,exit:D,interrupt:W(A,{interrupt:!0})},f={code:null,containerState:{},defineSkip:x,events:[],now:y,parser:t,previous:null,sliceSerialize:d,sliceStream:g,write:m},p=e.tokenize.call(f,u),h;return e.resolveAll&&s.push(e),f;function m(N){return a=Qe(a,N),T(),a[a.length-1]!==null?[]:(C(e,0),f.events=xi(s,f.events,f),f.events)}o(m,"write");function d(N,R){return O$(g(N),R)}o(d,"sliceSerialize");function g(N){return C$(a,N)}o(g,"sliceStream");function y(){let{_bufferIndex:N,_index:R,line:z,column:U,offset:K}=n;return{_bufferIndex:N,_index:R,line:z,column:U,offset:K}}o(y,"now");function x(N){i[N.line]=N.column,j()}o(x,"defineSkip");function T(){let N;for(;n._index<a.length;){let R=a[n._index];if(typeof R=="string")for(N=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===N&&n._bufferIndex<R.length;)E(R.charCodeAt(n._bufferIndex));else E(R)}}o(T,"main");function E(N){c=void 0,h=N,p=p(N)}o(E,"go");function _(N){V(N)?(n.line++,n.column=1,n.offset+=N===-3?2:1,j()):N!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===a[n._index].length&&(n._bufferIndex=-1,n._index++)),f.previous=N,c=!0}o(_,"consume");function P(N,R){let z=R||{};return z.type=N,z.start=y(),f.events.push(["enter",z,f]),l.push(z),z}o(P,"enter");function D(N){let R=l.pop();return R.end=y(),f.events.push(["exit",R,f]),R}o(D,"exit");function F(N,R){C(N,R.from)}o(F,"onsuccessfulconstruct");function A(N,R){R.restore()}o(A,"onsuccessfulcheck");function W(N,R){return z;function z(U,K,X){let ue,w,xe,Te;return Array.isArray(U)?Ae(U):"tokenize"in U?Ae([U]):k(U);function k(v){return M;function M(I){let B=I!==null&&v[I],re=I!==null&&v.null,Re=[...Array.isArray(B)?B:B?[B]:[],...Array.isArray(re)?re:re?[re]:[]];return Ae(Re)(I)}}function Ae(v){return ue=v,w=0,v.length===0?X:Ye(v[w])}function Ye(v){return M;function M(I){return Te=le(),xe=v,v.partial||(f.currentConstruct=v),v.name&&f.parser.constructs.disable.null.includes(v.name)?O(I):v.tokenize.call(R?Object.assign(Object.create(f),R):f,u,Yt,O)(I)}}function Yt(v){return c=!0,N(xe,Te),K}function O(v){return c=!0,Te.restore(),++w<ue.length?Ye(ue[w]):X}}}o(W,"constructFactory");function C(N,R){N.resolveAll&&!s.includes(N)&&s.push(N),N.resolve&&Ke(f.events,R,f.events.length-R,N.resolve(f.events.slice(R),f)),N.resolveTo&&(f.events=N.resolveTo(f.events,f))}o(C,"addResult");function le(){let N=y(),R=f.previous,z=f.currentConstruct,U=f.events.length,K=Array.from(l);return{from:U,restore:X};function X(){n=N,f.previous=R,f.currentConstruct=z,f.events.length=U,l=K,j()}}o(le,"store");function j(){n.line in i&&n.column<2&&(n.column=i[n.line],n.offset+=i[n.line]-1)}o(j,"accountForPotentialSkip")}o(bD,"createTokenizer");function C$(t,e){let r=e.start._index,n=e.start._bufferIndex,i=e.end._index,s=e.end._bufferIndex,a;if(r===i)a=[t[r].slice(n,s)];else{if(a=t.slice(r,i),n>-1){let l=a[0];typeof l=="string"?a[0]=l.slice(n):a.shift()}s>0&&a.push(t[i].slice(0,s))}return a}o(C$,"sliceChunks");function O$(t,e){let r=-1,n=[],i;for(;++r<t.length;){let s=t[r],a;if(typeof s=="string")a=s;else switch(s){case-5:{a="\r";break}case-4:{a=`
272
+ `},"replacement")},sa.tableSection={filter:["thead","tbody","tfoot"],replacement:o(function(t){return t},"replacement")};function Ey(t){var e=t.parentNode;return e.nodeName==="THEAD"||e.firstChild===t&&(e.nodeName==="TABLE"||c2(e))&&l2.call(t.childNodes,function(r){return r.nodeName==="TH"})}o(Ey,"isHeadingRow");function c2(t){var e=t.previousSibling;return t.nodeName==="TBODY"&&(!e||e.nodeName==="THEAD"&&/^\s*$/i.test(e.textContent))}o(c2,"isFirstTbody");function YE(t,e){var r=a2.call(e.parentNode.childNodes,e),n=" ";return r===0&&(n="| "),n+t+" |"}o(YE,"cell");function Oy(t){t.keep(function(r){return r.nodeName==="TABLE"&&!Ey(r.rows[0])});for(var e in sa)t.addRule(e,sa[e])}o(Oy,"tables");function My(t){t.addRule("taskListItems",{filter:o(function(e){return e.type==="checkbox"&&e.parentNode.nodeName==="LI"},"filter"),replacement:o(function(e,r){return(r.checked?"[x]":"[ ]")+" "},"replacement")})}o(My,"taskListItems");function VE(t){t.use([Dy,Cy,Oy,My])}o(VE,"gfm");var Ny=Iy;function Py(t){if(t)throw t}o(Py,"bail");function Jl(t){if(typeof t!="object"||t===null)return!1;let e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}o(Jl,"isPlainObject");function Ly(){let t=[],e={run:r,use:n};return e;function r(...i){let s=-1,a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);l(null,...i);function l(c,...u){let f=t[++s],p=-1;if(c){a(c);return}for(;++p<i.length;)(u[p]===null||u[p]===void 0)&&(u[p]=i[p]);i=u,f?iD(f,l)(...u):a(null,...u)}o(l,"next")}function n(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return t.push(i),e}}o(Ly,"trough");function iD(t,e){let r;return n;function n(...a){let l=t.length>a.length,c;l&&a.push(i);try{c=t.apply(this,a)}catch(u){let f=u;if(l&&r)throw f;return i(f)}l||(c&&c.then&&typeof c.then=="function"?c.then(s,i):c instanceof Error?i(c):s(c))}function i(a,...l){r||(r=!0,e(a,...l))}function s(a){i(null,a)}}o(iD,"wrap");function gi(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?oD(t.position):"start"in t||"end"in t?oD(t):"line"in t||"column"in t?_y(t):""}o(gi,"stringifyPosition");function _y(t){return sD(t&&t.line)+":"+sD(t&&t.column)}o(_y,"point");function oD(t){return _y(t&&t.start)+"-"+_y(t&&t.end)}o(oD,"position");function sD(t){return t&&typeof t=="number"?t:1}o(sD,"index");var ut=class extends Error{static{o(this,"VFileMessage")}constructor(e,r,n){super(),typeof r=="string"&&(n=r,r=void 0);let i="",s={},a=!1;if(r&&("line"in r&&"column"in r?s={place:r}:"start"in r&&"end"in r?s={place:r}:"type"in r?s={ancestors:[r],place:r.position}:s={...r}),typeof e=="string"?i=e:!s.cause&&e&&(a=!0,i=e.message,s.cause=e),!s.ruleId&&!s.source&&typeof n=="string"){let c=n.indexOf(":");c===-1?s.ruleId=n:(s.source=n.slice(0,c),s.ruleId=n.slice(c+1))}if(!s.place&&s.ancestors&&s.ancestors){let c=s.ancestors[s.ancestors.length-1];c&&(s.place=c.position)}let l=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=l?l.line:void 0,this.name=gi(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=a&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};ut.prototype.file="",ut.prototype.name="",ut.prototype.reason="",ut.prototype.message="",ut.prototype.stack="",ut.prototype.column=void 0,ut.prototype.line=void 0,ut.prototype.ancestors=void 0,ut.prototype.cause=void 0,ut.prototype.fatal=void 0,ut.prototype.place=void 0,ut.prototype.ruleId=void 0,ut.prototype.source=void 0;var Lr={basename:u2,dirname:f2,extname:p2,join:h2,sep:"/"};function u2(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');Ql(t);let r=0,n=-1,i=t.length,s;if(e===void 0||e.length===0||e.length>t.length){for(;i--;)if(t.codePointAt(i)===47){if(s){r=i+1;break}}else n<0&&(s=!0,n=i+1);return n<0?"":t.slice(r,n)}if(e===t)return"";let a=-1,l=e.length-1;for(;i--;)if(t.codePointAt(i)===47){if(s){r=i+1;break}}else a<0&&(s=!0,a=i+1),l>-1&&(t.codePointAt(i)===e.codePointAt(l--)?l<0&&(n=i):(l=-1,n=a));return r===n?n=a:n<0&&(n=t.length),t.slice(r,n)}o(u2,"basename");function f2(t){if(Ql(t),t.length===0)return".";let e=-1,r=t.length,n;for(;--r;)if(t.codePointAt(r)===47){if(n){e=r;break}}else n||(n=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}o(f2,"dirname");function p2(t){Ql(t);let e=t.length,r=-1,n=0,i=-1,s=0,a;for(;e--;){let l=t.codePointAt(e);if(l===47){if(a){n=e+1;break}continue}r<0&&(a=!0,r=e+1),l===46?i<0?i=e:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||r<0||s===0||s===1&&i===r-1&&i===n+1?"":t.slice(i,r)}o(p2,"extname");function h2(...t){let e=-1,r;for(;++e<t.length;)Ql(t[e]),t[e]&&(r=r===void 0?t[e]:r+"/"+t[e]);return r===void 0?".":m2(r)}o(h2,"join");function m2(t){Ql(t);let e=t.codePointAt(0)===47,r=d2(t,!e);return r.length===0&&!e&&(r="."),r.length>0&&t.codePointAt(t.length-1)===47&&(r+="/"),e?"/"+r:r}o(m2,"normalize");function d2(t,e){let r="",n=0,i=-1,s=0,a=-1,l,c;for(;++a<=t.length;){if(a<t.length)l=t.codePointAt(a);else{if(l===47)break;l=47}if(l===47){if(!(i===a-1||s===1))if(i!==a-1&&s===2){if(r.length<2||n!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(c=r.lastIndexOf("/"),c!==r.length-1){c<0?(r="",n=0):(r=r.slice(0,c),n=r.length-1-r.lastIndexOf("/")),i=a,s=0;continue}}else if(r.length>0){r="",n=0,i=a,s=0;continue}}e&&(r=r.length>0?r+"/..":"..",n=2)}else r.length>0?r+="/"+t.slice(i+1,a):r=t.slice(i+1,a),n=a-i-1;i=a,s=0}else l===46&&s>-1?s++:s=-1}return r}o(d2,"normalizeString");function Ql(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}o(Ql,"assertPath");var aD={cwd:g2};function g2(){return"/"}o(g2,"cwd");function aa(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}o(aa,"isUrl");function lD(t){if(typeof t=="string")t=new URL(t);else if(!aa(t)){let e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){let e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return y2(t)}o(lD,"urlToPath");function y2(t){if(t.hostname!==""){let n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}let e=t.pathname,r=-1;for(;++r<e.length;)if(e.codePointAt(r)===37&&e.codePointAt(r+1)===50){let n=e.codePointAt(r+2);if(n===70||n===102){let i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(e)}o(y2,"getPathFromURLPosix");var Ry=["history","path","basename","stem","extname","dirname"],Xl=class{static{o(this,"VFile")}constructor(e){let r;e?aa(e)?r={path:e}:typeof e=="string"||x2(e)?r={value:e}:r=e:r={},this.cwd="cwd"in r?"":aD.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Ry.length;){let s=Ry[n];s in r&&r[s]!==void 0&&r[s]!==null&&(this[s]=s==="history"?[...r[s]]:r[s])}let i;for(i in r)Ry.includes(i)||(this[i]=r[i])}get basename(){return typeof this.path=="string"?Lr.basename(this.path):void 0}set basename(e){Fy(e,"basename"),Ay(e,"basename"),this.path=Lr.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?Lr.dirname(this.path):void 0}set dirname(e){cD(this.basename,"dirname"),this.path=Lr.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?Lr.extname(this.path):void 0}set extname(e){if(Ay(e,"extname"),cD(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Lr.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){aa(e)&&(e=lD(e)),Fy(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?Lr.basename(this.path,this.extname):void 0}set stem(e){Fy(e,"stem"),Ay(e,"stem"),this.path=Lr.join(this.dirname||"",e+(this.extname||""))}fail(e,r,n){let i=this.message(e,r,n);throw i.fatal=!0,i}info(e,r,n){let i=this.message(e,r,n);return i.fatal=void 0,i}message(e,r,n){let i=new ut(e,r,n);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}};function Ay(t,e){if(t&&t.includes(Lr.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+Lr.sep+"`")}o(Ay,"assertPart");function Fy(t,e){if(!t)throw new Error("`"+e+"` cannot be empty")}o(Fy,"assertNonEmpty");function cD(t,e){if(!t)throw new Error("Setting `"+e+"` requires `path` to be set too")}o(cD,"assertPath");function x2(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}o(x2,"isUint8Array");var uD=o((function(t){let n=this.constructor.prototype,i=n[t],s=o(function(){return i.apply(s,arguments)},"apply");return Object.setPrototypeOf(s,n),s}),"CallableInstance");var Fh=zr(nD(),1),b2={}.hasOwnProperty,$y=class t extends uD{static{o(this,"Processor")}constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Ly()}copy(){let e=new t,r=-1;for(;++r<this.attachers.length;){let n=this.attachers[r];e.use(...n)}return e.data((0,Fh.default)(!0,{},this.namespace)),e}data(e,r){return typeof e=="string"?arguments.length===2?(zy("data",this.frozen),this.namespace[e]=r,this):b2.call(this.namespace,e)&&this.namespace[e]||void 0:e?(zy("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[r,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let i=r.call(e,...n);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();let r=Ah(e),n=this.parser||this.Parser;return By("parse",n),n(String(r),r)}process(e,r){let n=this;return this.freeze(),By("process",this.parser||this.Parser),jy("process",this.compiler||this.Compiler),r?i(void 0,r):new Promise(i);function i(s,a){let l=Ah(e),c=n.parse(l);n.run(c,l,function(f,p,h){if(f||!p||!h)return u(f);let m=p,d=n.stringify(m,h);v2(d)?h.value=d:h.result=d,u(f,h)});function u(f,p){f||!p?a(f):s?s(p):r(void 0,p)}o(u,"realDone")}o(i,"executor")}processSync(e){let r=!1,n;return this.freeze(),By("processSync",this.parser||this.Parser),jy("processSync",this.compiler||this.Compiler),this.process(e,i),pD("processSync","process",r),n;function i(s,a){r=!0,Py(s),n=a}o(i,"realDone")}run(e,r,n){fD(e),this.freeze();let i=this.transformers;return!n&&typeof r=="function"&&(n=r,r=void 0),n?s(void 0,n):new Promise(s);function s(a,l){let c=Ah(r);i.run(e,c,u);function u(f,p,h){let m=p||e;f?l(f):a?a(m):n(void 0,m,h)}o(u,"realDone")}o(s,"executor")}runSync(e,r){let n=!1,i;return this.run(e,r,s),pD("runSync","run",n),i;function s(a,l){Py(a),i=l,n=!0}o(s,"realDone")}stringify(e,r){this.freeze();let n=Ah(r),i=this.compiler||this.Compiler;return jy("stringify",i),fD(e),i(e,n)}use(e,...r){let n=this.attachers,i=this.namespace;if(zy("use",this.frozen),e!=null)if(typeof e=="function")c(e,r);else if(typeof e=="object")Array.isArray(e)?l(e):a(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function s(u){if(typeof u=="function")c(u,[]);else if(typeof u=="object")if(Array.isArray(u)){let[f,...p]=u;c(f,p)}else a(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function a(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(u.plugins),u.settings&&(i.settings=(0,Fh.default)(!0,i.settings,u.settings))}function l(u){let f=-1;if(u!=null)if(Array.isArray(u))for(;++f<u.length;){let p=u[f];s(p)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function c(u,f){let p=-1,h=-1;for(;++p<n.length;)if(n[p][0]===u){h=p;break}if(h===-1)n.push([u,...f]);else if(f.length>0){let[m,...d]=f,g=n[h][1];Jl(g)&&Jl(m)&&(m=(0,Fh.default)(!0,g,m)),n[h]=[u,m,...d]}}}},Zl=new $y().freeze();function By(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}o(By,"assertParser");function jy(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}o(jy,"assertCompiler");function zy(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}o(zy,"assertUnfrozen");function fD(t){if(!Jl(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}o(fD,"assertNode");function pD(t,e,r){if(!r)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}o(pD,"assertDone");function Ah(t){return w2(t)?t:new Xl(t)}o(Ah,"vfile");function w2(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}o(w2,"looksLikeAVFile");function v2(t){return typeof t=="string"||S2(t)}o(v2,"looksLikeAValue");function S2(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}o(S2,"isUint8Array");function Ke(t,e,r,n){let i=t.length,s=0,a;if(e<0?e=-e>i?0:i+e:e=e>i?i:e,r=r>0?r:0,n.length<1e4)a=Array.from(n),a.unshift(e,r),t.splice(...a);else for(r&&t.splice(e,r);s<n.length;)a=n.slice(s,s+1e4),a.unshift(e,0),t.splice(...a),s+=1e4,e+=1e4}o(Ke,"splice");function Qe(t,e){return t.length>0?(Ke(t,t.length,0,e),t):e}o(Qe,"push");var Wy={}.hasOwnProperty;function $h(t){let e={},r=-1;for(;++r<t.length;)k2(e,t[r]);return e}o($h,"combineExtensions");function k2(t,e){let r;for(r in e){let i=(Wy.call(t,r)?t[r]:void 0)||(t[r]={}),s=e[r],a;if(s)for(a in s){Wy.call(i,a)||(i[a]=[]);let l=s[a];T2(i[a],Array.isArray(l)?l:l?[l]:[])}}}o(k2,"syntaxExtension");function T2(t,e){let r=-1,n=[];for(;++r<e.length;)(e[r].add==="after"?t:n).push(e[r]);Ke(t,0,0,n)}o(T2,"constructs");function Bh(t){let e={},r=-1;for(;++r<t.length;)E2(e,t[r]);return e}o(Bh,"combineHtmlExtensions");function E2(t,e){let r;for(r in e){let i=(Wy.call(t,r)?t[r]:void 0)||(t[r]={}),s=e[r],a;if(s)for(a in s)i[a]=s[a]}}o(E2,"htmlExtension");function qe(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}o(qe,"normalizeIdentifier");var hD={}.hasOwnProperty,mD=/^(https?|ircs?|mailto|xmpp)$/i,D2=/^https?$/i;function Hy(t){let e=t||{},r=!0,n={},i=[[]],s=[],a=[],c=Bh([{enter:{blockQuote:z,codeFenced:ue,codeFencedFenceInfo:y,codeFencedFenceMeta:y,codeIndented:ke,codeText:Ot,content:Ar,definition:Pe,definitionDestinationString:Pt,definitionLabelString:y,definitionTitleString:y,emphasis:Ei,htmlFlow:Kt,htmlText:ir,image:Ae,label:y,link:Ye,listItemMarker:le,listItemValue:C,listOrdered:A,listUnordered:W,paragraph:K,reference:y,resource:M,resourceDestinationString:I,resourceTitleString:y,setextHeading:nr,strong:Di},exit:{atxHeading:ze,atxHeadingSequence:Vt,autolinkEmail:GC,autolinkProtocol:KC,blockQuote:U,characterEscapeValue:q,characterReferenceMarkerHexadecimal:Lb,characterReferenceMarkerNumeric:Lb,characterReferenceValue:VC,codeFenced:k,codeFencedFence:xe,codeFencedFenceInfo:w,codeFencedFenceMeta:F,codeFlowValue:fe,codeIndented:k,codeText:An,codeTextData:q,data:q,definition:br,definitionDestinationString:ot,definitionLabelString:Te,definitionTitleString:Ct,emphasis:wr,hardBreakEscape:Ee,hardBreakTrailing:Ee,htmlFlow:$r,htmlFlowData:q,htmlText:$r,htmlTextData:q,image:Re,label:O,labelText:Yt,lineEnding:oe,link:Re,listOrdered:j,listUnordered:N,paragraph:X,reference:F,referenceString:S,resource:F,resourceDestinationString:B,resourceTitleString:te,setextHeading:_,setextHeadingLineSequence:Fr,setextHeadingText:Lt,strong:qC,thematicBreak:YC}},...e.htmlExtensions||[]]),u={definitions:n,tightStack:a},f={buffer:y,encode:D,getData:g,lineEndingIfNeeded:P,options:e,raw:E,resume:x,setData:d,tag:T},p=e.defaultLineEnding;return h;function h(Y){let re=-1,dt=0,vr=[],Br=[],yn=[];for(;++re<Y.length;)!p&&(Y[re][1].type==="lineEnding"||Y[re][1].type==="lineEndingBlank")&&(p=Y[re][2].sliceSerialize(Y[re][1])),(Y[re][1].type==="listOrdered"||Y[re][1].type==="listUnordered")&&(Y[re][0]==="enter"?vr.push(re):m(Y.slice(vr.pop(),re))),Y[re][1].type==="definition"&&(Y[re][0]==="enter"?(yn=Qe(yn,Y.slice(dt,re)),dt=re):(Br=Qe(Br,Y.slice(dt,re+1)),dt=re+1));Br=Qe(Br,yn),Br=Qe(Br,Y.slice(dt)),re=-1;let jr=Br;for(c.enter.null&&c.enter.null.call(f);++re<Y.length;){let _b=c[jr[re][0]],Rb=jr[re][1].type,Ab=_b[Rb];hD.call(_b,Rb)&&Ab&&Ab.call({sliceSerialize:jr[re][2].sliceSerialize,...f},jr[re][1])}return c.exit.null&&c.exit.null.call(f),i[0].join("")}function m(Y){let re=Y.length,dt=0,vr=0,Br=!1,yn;for(;++dt<re;){let jr=Y[dt];if(jr[1]._container)yn=void 0,jr[0]==="enter"?vr++:vr--;else switch(jr[1].type){case"listItemPrefix":{jr[0]==="exit"&&(yn=!0);break}case"linePrefix":break;case"lineEndingBlank":{jr[0]==="enter"&&!vr&&(yn?yn=void 0:Br=!0);break}default:yn=void 0}}Y[0][1]._loose=Br}function d(Y,re){u[Y]=re}function g(Y){return u[Y]}function y(){i.push([])}function x(){return i.pop().join("")}function T(Y){r&&(d("lastWasTag",!0),i[i.length-1].push(Y))}function E(Y){d("lastWasTag"),i[i.length-1].push(Y)}function L(){E(p||`
273
+ `)}function P(){let Y=i[i.length-1],re=Y[Y.length-1],dt=re?re.charCodeAt(re.length-1):null;dt===10||dt===13||dt===null||L()}function D(Y){return g("ignoreEncode")?Y:mh(Y)}function F(){x()}function A(Y){a.push(!Y._loose),P(),T("<ol"),d("expectFirstItem",!0)}function W(Y){a.push(!Y._loose),P(),T("<ul"),d("expectFirstItem",!0)}function C(Y){if(g("expectFirstItem")){let re=Number.parseInt(this.sliceSerialize(Y),10);re!==1&&T(' start="'+D(String(re))+'"')}}function le(){g("expectFirstItem")?T(">"):R(),P(),T("<li>"),d("expectFirstItem"),d("lastWasTag")}function j(){R(),a.pop(),L(),T("</ol>")}function N(){R(),a.pop(),L(),T("</ul>")}function R(){g("lastWasTag")&&!g("slurpAllLineEndings")&&P(),T("</li>"),d("slurpAllLineEndings")}function z(){a.push(!1),P(),T("<blockquote>")}function U(){a.pop(),P(),T("</blockquote>"),d("slurpAllLineEndings")}function K(){a[a.length-1]||(P(),T("<p>")),d("slurpAllLineEndings")}function X(){a[a.length-1]?d("slurpAllLineEndings",!0):T("</p>")}function ue(){P(),T("<pre><code"),d("fencesCount",0)}function w(){let Y=x();T(' class="language-'+Y+'"')}function xe(){let Y=g("fencesCount")||0;Y||(T(">"),d("slurpOneLineEnding",!0)),d("fencesCount",Y+1)}function ke(){P(),T("<pre><code>")}function k(){let Y=g("fencesCount");Y!==void 0&&Y<2&&u.tightStack.length>0&&!g("lastWasTag")&&L(),g("flowCodeSeenData")&&P(),T("</code></pre>"),Y!==void 0&&Y<2&&P(),d("flowCodeSeenData"),d("fencesCount"),d("slurpOneLineEnding")}function Ae(){s.push({image:!0}),r=void 0}function Ye(){s.push({})}function Yt(Y){s[s.length-1].labelId=this.sliceSerialize(Y)}function O(){s[s.length-1].label=x()}function S(Y){s[s.length-1].referenceId=this.sliceSerialize(Y)}function M(){y(),s[s.length-1].destination=""}function I(){y(),d("ignoreEncode",!0)}function B(){s[s.length-1].destination=x(),d("ignoreEncode")}function te(){s[s.length-1].title=x()}function Re(){let Y=s.length-1,re=s[Y],dt=re.referenceId||re.labelId,vr=re.destination===void 0?n[qe(dt)]:re;for(r=!0;Y--;)if(s[Y].image){r=void 0;break}re.image?(T('<img src="'+pn(vr.destination,e.allowDangerousProtocol?void 0:D2)+'" alt="'),E(re.label),T('"')):T('<a href="'+pn(vr.destination,e.allowDangerousProtocol?void 0:mD)+'"'),T(vr.title?' title="'+vr.title+'"':""),re.image?T(" />"):(T(">"),E(re.label),T("</a>")),s.pop()}function Pe(){y(),s.push({})}function Te(Y){x(),s[s.length-1].labelId=this.sliceSerialize(Y)}function Pt(){y(),d("ignoreEncode",!0)}function ot(){s[s.length-1].destination=x(),d("ignoreEncode")}function Ct(){s[s.length-1].title=x()}function br(){let Y=s[s.length-1],re=qe(Y.labelId);x(),hD.call(n,re)||(n[re]=s[s.length-1]),s.pop()}function Ar(){d("slurpAllLineEndings",!0)}function Vt(Y){g("headingRank")||(d("headingRank",this.sliceSerialize(Y).length),P(),T("<h"+g("headingRank")+">"))}function nr(){y(),d("slurpAllLineEndings")}function Lt(){d("slurpAllLineEndings",!0)}function ze(){T("</h"+g("headingRank")+">"),d("headingRank")}function Fr(Y){d("headingRank",this.sliceSerialize(Y).charCodeAt(0)===61?1:2)}function _(){let Y=x();P(),T("<h"+g("headingRank")+">"),E(Y),T("</h"+g("headingRank")+">"),d("slurpAllLineEndings"),d("headingRank")}function q(Y){E(D(this.sliceSerialize(Y)))}function oe(Y){if(!g("slurpAllLineEndings")){if(g("slurpOneLineEnding")){d("slurpOneLineEnding");return}if(g("inCodeText")){E(" ");return}E(D(this.sliceSerialize(Y)))}}function fe(Y){E(D(this.sliceSerialize(Y))),d("flowCodeSeenData",!0)}function Ee(){T("<br />")}function Kt(){P(),ir()}function $r(){d("ignoreEncode")}function ir(){e.allowDangerousHtml&&d("ignoreEncode",!0)}function Ei(){T("<em>")}function Di(){T("<strong>")}function Ot(){d("inCodeText",!0),T("<code>")}function An(){d("inCodeText"),T("</code>")}function wr(){T("</em>")}function qC(){T("</strong>")}function YC(){P(),T("<hr />")}function Lb(Y){d("characterReferenceType",Y.type)}function VC(Y){let re=this.sliceSerialize(Y),dt=g("characterReferenceType")?ia(re,g("characterReferenceType")==="characterReferenceMarkerNumeric"?10:16):mi(re);E(D(dt)),d("characterReferenceType")}function KC(Y){let re=this.sliceSerialize(Y);T('<a href="'+pn(re,e.allowDangerousProtocol?void 0:mD)+'">'),E(D(re)),T("</a>")}function GC(Y){let re=this.sliceSerialize(Y);T('<a href="'+pn("mailto:"+re)+'">'),E(D(re)),T("</a>")}}o(Hy,"compile");function ne(t,e,r,n){let i=n?n-1:Number.POSITIVE_INFINITY,s=0;return a;function a(c){return Z(c)?(t.enter(r),l(c)):e(c)}function l(c){return Z(c)&&s++<i?(t.consume(c),l):(t.exit(r),e(c))}}o(ne,"factorySpace");var dD={tokenize:C2};function C2(t){let e=t.attempt(this.parser.constructs.contentInitial,n,i),r;return e;function n(l){if(l===null){t.consume(l);return}return t.enter("lineEnding"),t.consume(l),t.exit("lineEnding"),ne(t,e,"linePrefix")}function i(l){return t.enter("paragraph"),s(l)}function s(l){let c=t.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=c),r=c,a(l)}function a(l){if(l===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(l);return}return V(l)?(t.consume(l),t.exit("chunkText"),s):(t.consume(l),a)}}o(C2,"initializeContent");var yD={tokenize:O2},gD={tokenize:M2};function O2(t){let e=this,r=[],n=0,i,s,a;return l;function l(E){if(n<r.length){let L=r[n];return e.containerState=L[1],t.attempt(L[0].continuation,c,u)(E)}return u(E)}function c(E){if(n++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,i&&T();let L=e.events.length,P=L,D;for(;P--;)if(e.events[P][0]==="exit"&&e.events[P][1].type==="chunkFlow"){D=e.events[P][1].end;break}x(n);let F=L;for(;F<e.events.length;)e.events[F][1].end={...D},F++;return Ke(e.events,P+1,0,e.events.slice(L)),e.events.length=F,u(E)}return l(E)}function u(E){if(n===r.length){if(!i)return h(E);if(i.currentConstruct&&i.currentConstruct.concrete)return d(E);e.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return e.containerState={},t.check(gD,f,p)(E)}function f(E){return i&&T(),x(n),h(E)}function p(E){return e.parser.lazy[e.now().line]=n!==r.length,a=e.now().offset,d(E)}function h(E){return e.containerState={},t.attempt(gD,m,d)(E)}function m(E){return n++,r.push([e.currentConstruct,e.containerState]),h(E)}function d(E){if(E===null){i&&T(),x(0),t.consume(E);return}return i=i||e.parser.flow(e.now()),t.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),g(E)}function g(E){if(E===null){y(t.exit("chunkFlow"),!0),x(0),t.consume(E);return}return V(E)?(t.consume(E),y(t.exit("chunkFlow")),n=0,e.interrupt=void 0,l):(t.consume(E),g)}function y(E,L){let P=e.sliceStream(E);if(L&&P.push(null),E.previous=s,s&&(s.next=E),s=E,i.defineSkip(E.start),i.write(P),e.parser.lazy[E.start.line]){let D=i.events.length;for(;D--;)if(i.events[D][1].start.offset<a&&(!i.events[D][1].end||i.events[D][1].end.offset>a))return;let F=e.events.length,A=F,W,C;for(;A--;)if(e.events[A][0]==="exit"&&e.events[A][1].type==="chunkFlow"){if(W){C=e.events[A][1].end;break}W=!0}for(x(n),D=F;D<e.events.length;)e.events[D][1].end={...C},D++;Ke(e.events,A+1,0,e.events.slice(F)),e.events.length=D}}function x(E){let L=r.length;for(;L-- >E;){let P=r[L];e.containerState=P[1],P[0].exit.call(e,t)}r.length=E}function T(){i.write([null]),s=void 0,i=void 0,e.containerState._closeFlow=void 0}}o(O2,"initializeDocument");function M2(t,e,r){return ne(t,t.attempt(this.parser.constructs.document,e,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}o(M2,"tokenizeContainer");function yi(t,e,r){let n=[],i=-1;for(;++i<t.length;){let s=t[i].resolveAll;s&&!n.includes(s)&&(e=s(e,r),n.push(s))}return e}o(yi,"resolveAll");var ec={name:"attention",resolveAll:I2,tokenize:N2};function I2(t,e){let r=-1,n,i,s,a,l,c,u,f;for(;++r<t.length;)if(t[r][0]==="enter"&&t[r][1].type==="attentionSequence"&&t[r][1]._close){for(n=r;n--;)if(t[n][0]==="exit"&&t[n][1].type==="attentionSequence"&&t[n][1]._open&&e.sliceSerialize(t[n][1]).charCodeAt(0)===e.sliceSerialize(t[r][1]).charCodeAt(0)){if((t[n][1]._close||t[r][1]._open)&&(t[r][1].end.offset-t[r][1].start.offset)%3&&!((t[n][1].end.offset-t[n][1].start.offset+t[r][1].end.offset-t[r][1].start.offset)%3))continue;c=t[n][1].end.offset-t[n][1].start.offset>1&&t[r][1].end.offset-t[r][1].start.offset>1?2:1;let p={...t[n][1].end},h={...t[r][1].start};xD(p,-c),xD(h,c),a={type:c>1?"strongSequence":"emphasisSequence",start:p,end:{...t[n][1].end}},l={type:c>1?"strongSequence":"emphasisSequence",start:{...t[r][1].start},end:h},s={type:c>1?"strongText":"emphasisText",start:{...t[n][1].end},end:{...t[r][1].start}},i={type:c>1?"strong":"emphasis",start:{...a.start},end:{...l.end}},t[n][1].end={...a.start},t[r][1].start={...l.end},u=[],t[n][1].end.offset-t[n][1].start.offset&&(u=Qe(u,[["enter",t[n][1],e],["exit",t[n][1],e]])),u=Qe(u,[["enter",i,e],["enter",a,e],["exit",a,e],["enter",s,e]]),u=Qe(u,yi(e.parser.constructs.insideSpan.null,t.slice(n+1,r),e)),u=Qe(u,[["exit",s,e],["enter",l,e],["exit",l,e],["exit",i,e]]),t[r][1].end.offset-t[r][1].start.offset?(f=2,u=Qe(u,[["enter",t[r][1],e],["exit",t[r][1],e]])):f=0,Ke(t,n-1,r-n+3,u),r=n+u.length-f-2;break}}for(r=-1;++r<t.length;)t[r][1].type==="attentionSequence"&&(t[r][1].type="data");return t}o(I2,"resolveAllAttention");function N2(t,e){let r=this.parser.constructs.attentionMarkers.null,n=this.previous,i=Ln(n),s;return a;function a(c){return s=c,t.enter("attentionSequence"),l(c)}function l(c){if(c===s)return t.consume(c),l;let u=t.exit("attentionSequence"),f=Ln(c),p=!f||f===2&&i||r.includes(c),h=!i||i===2&&f||r.includes(n);return u._open=!!(s===42?p:p&&(i||!h)),u._close=!!(s===42?h:h&&(f||!p)),e(c)}}o(N2,"tokenizeAttention");function xD(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}o(xD,"movePoint");var Uy={name:"autolink",tokenize:P2};function P2(t,e,r){let n=0;return i;function i(m){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(m),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),s}function s(m){return nt(m)?(t.consume(m),a):m===64?r(m):u(m)}function a(m){return m===43||m===45||m===46||He(m)?(n=1,l(m)):u(m)}function l(m){return m===58?(t.consume(m),n=0,c):(m===43||m===45||m===46||He(m))&&n++<32?(t.consume(m),l):(n=0,u(m))}function c(m){return m===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(m),t.exit("autolinkMarker"),t.exit("autolink"),e):m===null||m===32||m===60||ao(m)?r(m):(t.consume(m),c)}function u(m){return m===64?(t.consume(m),f):Y1(m)?(t.consume(m),u):r(m)}function f(m){return He(m)?p(m):r(m)}function p(m){return m===46?(t.consume(m),n=0,f):m===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(m),t.exit("autolinkMarker"),t.exit("autolink"),e):h(m)}function h(m){if((m===45||He(m))&&n++<63){let d=m===45?h:p;return t.consume(m),d}return r(m)}}o(P2,"tokenizeAutolink");var hn={partial:!0,tokenize:L2};function L2(t,e,r){return n;function n(s){return Z(s)?ne(t,i,"linePrefix")(s):i(s)}function i(s){return s===null||V(s)?e(s):r(s)}}o(L2,"tokenizeBlankLine");var jh={continuation:{tokenize:R2},exit:A2,name:"blockQuote",tokenize:_2};function _2(t,e,r){let n=this;return i;function i(a){if(a===62){let l=n.containerState;return l.open||(t.enter("blockQuote",{_container:!0}),l.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(a),t.exit("blockQuoteMarker"),s}return r(a)}function s(a){return Z(a)?(t.enter("blockQuotePrefixWhitespace"),t.consume(a),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),e):(t.exit("blockQuotePrefix"),e(a))}}o(_2,"tokenizeBlockQuoteStart");function R2(t,e,r){let n=this;return i;function i(a){return Z(a)?ne(t,s,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):s(a)}function s(a){return t.attempt(jh,e,r)(a)}}o(R2,"tokenizeBlockQuoteContinuation");function A2(t){t.exit("blockQuote")}o(A2,"exit");var zh={name:"characterEscape",tokenize:F2};function F2(t,e,r){return n;function n(s){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(s),t.exit("escapeMarker"),i}function i(s){return K1(s)?(t.enter("characterEscapeValue"),t.consume(s),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):r(s)}}o(F2,"tokenizeCharacterEscape");var Wh={name:"characterReference",tokenize:$2};function $2(t,e,r){let n=this,i=0,s,a;return l;function l(p){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(p),t.exit("characterReferenceMarker"),c}function c(p){return p===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(p),t.exit("characterReferenceMarkerNumeric"),u):(t.enter("characterReferenceValue"),s=31,a=He,f(p))}function u(p){return p===88||p===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(p),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),s=6,a=V1,f):(t.enter("characterReferenceValue"),s=7,a=Ul,f(p))}function f(p){if(p===59&&i){let h=t.exit("characterReferenceValue");return a===He&&!mi(n.sliceSerialize(h))?r(p):(t.enter("characterReferenceMarker"),t.consume(p),t.exit("characterReferenceMarker"),t.exit("characterReference"),e)}return a(p)&&i++<s?(t.consume(p),f):r(p)}}o($2,"tokenizeCharacterReference");var bD={partial:!0,tokenize:j2},Hh={concrete:!0,name:"codeFenced",tokenize:B2};function B2(t,e,r){let n=this,i={partial:!0,tokenize:P},s=0,a=0,l;return c;function c(D){return u(D)}function u(D){let F=n.events[n.events.length-1];return s=F&&F[1].type==="linePrefix"?F[2].sliceSerialize(F[1],!0).length:0,l=D,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),f(D)}function f(D){return D===l?(a++,t.consume(D),f):a<3?r(D):(t.exit("codeFencedFenceSequence"),Z(D)?ne(t,p,"whitespace")(D):p(D))}function p(D){return D===null||V(D)?(t.exit("codeFencedFence"),n.interrupt?e(D):t.check(bD,g,L)(D)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),h(D))}function h(D){return D===null||V(D)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),p(D)):Z(D)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),ne(t,m,"whitespace")(D)):D===96&&D===l?r(D):(t.consume(D),h)}function m(D){return D===null||V(D)?p(D):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),d(D))}function d(D){return D===null||V(D)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),p(D)):D===96&&D===l?r(D):(t.consume(D),d)}function g(D){return t.attempt(i,L,y)(D)}function y(D){return t.enter("lineEnding"),t.consume(D),t.exit("lineEnding"),x}function x(D){return s>0&&Z(D)?ne(t,T,"linePrefix",s+1)(D):T(D)}function T(D){return D===null||V(D)?t.check(bD,g,L)(D):(t.enter("codeFlowValue"),E(D))}function E(D){return D===null||V(D)?(t.exit("codeFlowValue"),T(D)):(t.consume(D),E)}function L(D){return t.exit("codeFenced"),e(D)}function P(D,F,A){let W=0;return C;function C(z){return D.enter("lineEnding"),D.consume(z),D.exit("lineEnding"),le}function le(z){return D.enter("codeFencedFence"),Z(z)?ne(D,j,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):j(z)}function j(z){return z===l?(D.enter("codeFencedFenceSequence"),N(z)):A(z)}function N(z){return z===l?(W++,D.consume(z),N):W>=a?(D.exit("codeFencedFenceSequence"),Z(z)?ne(D,R,"whitespace")(z):R(z)):A(z)}function R(z){return z===null||V(z)?(D.exit("codeFencedFence"),F(z)):A(z)}}}o(B2,"tokenizeCodeFenced");function j2(t,e,r){let n=this;return i;function i(a){return a===null?r(a):(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),s)}function s(a){return n.parser.lazy[n.now().line]?r(a):e(a)}}o(j2,"tokenizeNonLazyContinuation");var tc={name:"codeIndented",tokenize:W2},z2={partial:!0,tokenize:H2};function W2(t,e,r){let n=this;return i;function i(u){return t.enter("codeIndented"),ne(t,s,"linePrefix",5)(u)}function s(u){let f=n.events[n.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?a(u):r(u)}function a(u){return u===null?c(u):V(u)?t.attempt(z2,a,c)(u):(t.enter("codeFlowValue"),l(u))}function l(u){return u===null||V(u)?(t.exit("codeFlowValue"),a(u)):(t.consume(u),l)}function c(u){return t.exit("codeIndented"),e(u)}}o(W2,"tokenizeCodeIndented");function H2(t,e,r){let n=this;return i;function i(a){return n.parser.lazy[n.now().line]?r(a):V(a)?(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),i):ne(t,s,"linePrefix",5)(a)}function s(a){let l=n.events[n.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?e(a):V(a)?i(a):r(a)}}o(H2,"tokenizeFurtherStart");var qy={name:"codeText",previous:q2,resolve:U2,tokenize:Y2};function U2(t){let e=t.length-4,r=3,n,i;if((t[r][1].type==="lineEnding"||t[r][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(n=r;++n<e;)if(t[n][1].type==="codeTextData"){t[r][1].type="codeTextPadding",t[e][1].type="codeTextPadding",r+=2,e-=2;break}}for(n=r-1,e++;++n<=e;)i===void 0?n!==e&&t[n][1].type!=="lineEnding"&&(i=n):(n===e||t[n][1].type==="lineEnding")&&(t[i][1].type="codeTextData",n!==i+2&&(t[i][1].end=t[n-1][1].end,t.splice(i+2,n-i-2),e-=n-i-2,n=i+2),i=void 0);return t}o(U2,"resolveCodeText");function q2(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}o(q2,"previous");function Y2(t,e,r){let n=this,i=0,s,a;return l;function l(h){return t.enter("codeText"),t.enter("codeTextSequence"),c(h)}function c(h){return h===96?(t.consume(h),i++,c):(t.exit("codeTextSequence"),u(h))}function u(h){return h===null?r(h):h===32?(t.enter("space"),t.consume(h),t.exit("space"),u):h===96?(a=t.enter("codeTextSequence"),s=0,p(h)):V(h)?(t.enter("lineEnding"),t.consume(h),t.exit("lineEnding"),u):(t.enter("codeTextData"),f(h))}function f(h){return h===null||h===32||h===96||V(h)?(t.exit("codeTextData"),u(h)):(t.consume(h),f)}function p(h){return h===96?(t.consume(h),s++,p):s===i?(t.exit("codeTextSequence"),t.exit("codeText"),e(h)):(a.type="codeTextData",f(h))}}o(Y2,"tokenizeCodeText");var nc=class{static{o(this,"SpliceBuffer")}constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,r){let n=r??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,r,n){let i=r||0;this.setCursor(Math.trunc(e));let s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return n&&rc(this.left,n),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),rc(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),rc(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let r=this.left.splice(e,Number.POSITIVE_INFINITY);rc(this.right,r.reverse())}else{let r=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);rc(this.left,r.reverse())}}};function rc(t,e){let r=0;if(e.length<1e4)t.push(...e);else for(;r<e.length;)t.push(...e.slice(r,r+1e4)),r+=1e4}o(rc,"chunkedPush");function Uh(t){let e={},r=-1,n,i,s,a,l,c,u,f=new nc(t);for(;++r<f.length;){for(;r in e;)r=e[r];if(n=f.get(r),r&&n[1].type==="chunkFlow"&&f.get(r-1)[1].type==="listItemPrefix"&&(c=n[1]._tokenizer.events,s=0,s<c.length&&c[s][1].type==="lineEndingBlank"&&(s+=2),s<c.length&&c[s][1].type==="content"))for(;++s<c.length&&c[s][1].type!=="content";)c[s][1].type==="chunkText"&&(c[s][1]._isInFirstContentOfListItem=!0,s++);if(n[0]==="enter")n[1].contentType&&(Object.assign(e,V2(f,r)),r=e[r],u=!0);else if(n[1]._container){for(s=r,i=void 0;s--;)if(a=f.get(s),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=s);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(n[1].end={...f.get(i)[1].start},l=f.slice(i,r),l.unshift(n),f.splice(i,r-i+1,l))}}return Ke(t,0,Number.POSITIVE_INFINITY,f.slice(0)),!u}o(Uh,"subtokenize");function V2(t,e){let r=t.get(e)[1],n=t.get(e)[2],i=e-1,s=[],a=r._tokenizer;a||(a=n.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));let l=a.events,c=[],u={},f,p,h=-1,m=r,d=0,g=0,y=[g];for(;m;){for(;t.get(++i)[1]!==m;);s.push(i),m._tokenizer||(f=n.sliceStream(m),m.next||f.push(null),p&&a.defineSkip(m.start),m._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(f),m._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),p=m,m=m.next}for(m=r;++h<l.length;)l[h][0]==="exit"&&l[h-1][0]==="enter"&&l[h][1].type===l[h-1][1].type&&l[h][1].start.line!==l[h][1].end.line&&(g=h+1,y.push(g),m._tokenizer=void 0,m.previous=void 0,m=m.next);for(a.events=[],m?(m._tokenizer=void 0,m.previous=void 0):y.pop(),h=y.length;h--;){let x=l.slice(y[h],y[h+1]),T=s.pop();c.push([T,T+x.length-1]),t.splice(T,2,x)}for(c.reverse(),h=-1;++h<c.length;)u[d+c[h][0]]=d+c[h][1],d+=c[h][1]-c[h][0]-1;return u}o(V2,"subcontent");var Yy={resolve:G2,tokenize:J2},K2={partial:!0,tokenize:Q2};function G2(t){return Uh(t),t}o(G2,"resolveContent");function J2(t,e){let r;return n;function n(l){return t.enter("content"),r=t.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?s(l):V(l)?t.check(K2,a,s)(l):(t.consume(l),i)}function s(l){return t.exit("chunkContent"),t.exit("content"),e(l)}function a(l){return t.consume(l),t.exit("chunkContent"),r.next=t.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,i}}o(J2,"tokenizeContent");function Q2(t,e,r){let n=this;return i;function i(a){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),ne(t,s,"linePrefix")}function s(a){if(a===null||V(a))return r(a);let l=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?e(a):t.interrupt(n.parser.constructs.flow,r,e)(a)}}o(Q2,"tokenizeContinuation");function qh(t,e,r,n,i,s,a,l,c){let u=c||Number.POSITIVE_INFINITY,f=0;return p;function p(x){return x===60?(t.enter(n),t.enter(i),t.enter(s),t.consume(x),t.exit(s),h):x===null||x===32||x===41||ao(x)?r(x):(t.enter(n),t.enter(a),t.enter(l),t.enter("chunkString",{contentType:"string"}),g(x))}function h(x){return x===62?(t.enter(s),t.consume(x),t.exit(s),t.exit(i),t.exit(n),e):(t.enter(l),t.enter("chunkString",{contentType:"string"}),m(x))}function m(x){return x===62?(t.exit("chunkString"),t.exit(l),h(x)):x===null||x===60||V(x)?r(x):(t.consume(x),x===92?d:m)}function d(x){return x===60||x===62||x===92?(t.consume(x),m):m(x)}function g(x){return!f&&(x===null||x===41||ye(x))?(t.exit("chunkString"),t.exit(l),t.exit(a),t.exit(n),e(x)):f<u&&x===40?(t.consume(x),f++,g):x===41?(t.consume(x),f--,g):x===null||x===32||x===40||ao(x)?r(x):(t.consume(x),x===92?y:g)}function y(x){return x===40||x===41||x===92?(t.consume(x),g):g(x)}}o(qh,"factoryDestination");function Yh(t,e,r,n,i,s){let a=this,l=0,c;return u;function u(m){return t.enter(n),t.enter(i),t.consume(m),t.exit(i),t.enter(s),f}function f(m){return l>999||m===null||m===91||m===93&&!c||m===94&&!l&&"_hiddenFootnoteSupport"in a.parser.constructs?r(m):m===93?(t.exit(s),t.enter(i),t.consume(m),t.exit(i),t.exit(n),e):V(m)?(t.enter("lineEnding"),t.consume(m),t.exit("lineEnding"),f):(t.enter("chunkString",{contentType:"string"}),p(m))}function p(m){return m===null||m===91||m===93||V(m)||l++>999?(t.exit("chunkString"),f(m)):(t.consume(m),c||(c=!Z(m)),m===92?h:p)}function h(m){return m===91||m===92||m===93?(t.consume(m),l++,p):p(m)}}o(Yh,"factoryLabel");function Vh(t,e,r,n,i,s){let a;return l;function l(h){return h===34||h===39||h===40?(t.enter(n),t.enter(i),t.consume(h),t.exit(i),a=h===40?41:h,c):r(h)}function c(h){return h===a?(t.enter(i),t.consume(h),t.exit(i),t.exit(n),e):(t.enter(s),u(h))}function u(h){return h===a?(t.exit(s),c(a)):h===null?r(h):V(h)?(t.enter("lineEnding"),t.consume(h),t.exit("lineEnding"),ne(t,u,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===a||h===null||V(h)?(t.exit("chunkString"),u(h)):(t.consume(h),h===92?p:f)}function p(h){return h===a||h===92?(t.consume(h),f):f(h)}}o(Vh,"factoryTitle");function yo(t,e){let r;return n;function n(i){return V(i)?(t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),r=!0,n):Z(i)?ne(t,n,r?"linePrefix":"lineSuffix")(i):e(i)}}o(yo,"factoryWhitespace");var Vy={name:"definition",tokenize:Z2},X2={partial:!0,tokenize:e$};function Z2(t,e,r){let n=this,i;return s;function s(m){return t.enter("definition"),a(m)}function a(m){return Yh.call(n,t,l,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function l(m){return i=qe(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),m===58?(t.enter("definitionMarker"),t.consume(m),t.exit("definitionMarker"),c):r(m)}function c(m){return ye(m)?yo(t,u)(m):u(m)}function u(m){return qh(t,f,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function f(m){return t.attempt(X2,p,p)(m)}function p(m){return Z(m)?ne(t,h,"whitespace")(m):h(m)}function h(m){return m===null||V(m)?(t.exit("definition"),n.parser.defined.push(i),e(m)):r(m)}}o(Z2,"tokenizeDefinition");function e$(t,e,r){return n;function n(l){return ye(l)?yo(t,i)(l):r(l)}function i(l){return Vh(t,s,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function s(l){return Z(l)?ne(t,a,"whitespace")(l):a(l)}function a(l){return l===null||V(l)?e(l):r(l)}}o(e$,"tokenizeTitleBefore");var Ky={name:"hardBreakEscape",tokenize:t$};function t$(t,e,r){return n;function n(s){return t.enter("hardBreakEscape"),t.consume(s),i}function i(s){return V(s)?(t.exit("hardBreakEscape"),e(s)):r(s)}}o(t$,"tokenizeHardBreakEscape");var Gy={name:"headingAtx",resolve:r$,tokenize:n$};function r$(t,e){let r=t.length-2,n=3,i,s;return t[n][1].type==="whitespace"&&(n+=2),r-2>n&&t[r][1].type==="whitespace"&&(r-=2),t[r][1].type==="atxHeadingSequence"&&(n===r-1||r-4>n&&t[r-2][1].type==="whitespace")&&(r-=n+1===r?2:4),r>n&&(i={type:"atxHeadingText",start:t[n][1].start,end:t[r][1].end},s={type:"chunkText",start:t[n][1].start,end:t[r][1].end,contentType:"text"},Ke(t,n,r-n+1,[["enter",i,e],["enter",s,e],["exit",s,e],["exit",i,e]])),t}o(r$,"resolveHeadingAtx");function n$(t,e,r){let n=0;return i;function i(f){return t.enter("atxHeading"),s(f)}function s(f){return t.enter("atxHeadingSequence"),a(f)}function a(f){return f===35&&n++<6?(t.consume(f),a):f===null||ye(f)?(t.exit("atxHeadingSequence"),l(f)):r(f)}function l(f){return f===35?(t.enter("atxHeadingSequence"),c(f)):f===null||V(f)?(t.exit("atxHeading"),e(f)):Z(f)?ne(t,l,"whitespace")(f):(t.enter("atxHeadingText"),u(f))}function c(f){return f===35?(t.consume(f),c):(t.exit("atxHeadingSequence"),l(f))}function u(f){return f===null||f===35||ye(f)?(t.exit("atxHeadingText"),l(f)):(t.consume(f),u)}}o(n$,"tokenizeHeadingAtx");var wD=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Jy=["pre","script","style","textarea"];var Qy={concrete:!0,name:"htmlFlow",resolveTo:s$,tokenize:a$},i$={partial:!0,tokenize:c$},o$={partial:!0,tokenize:l$};function s$(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}o(s$,"resolveToHtmlFlow");function a$(t,e,r){let n=this,i,s,a,l,c;return u;function u(k){return f(k)}function f(k){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(k),p}function p(k){return k===33?(t.consume(k),h):k===47?(t.consume(k),s=!0,g):k===63?(t.consume(k),i=3,n.interrupt?e:w):nt(k)?(t.consume(k),a=String.fromCharCode(k),y):r(k)}function h(k){return k===45?(t.consume(k),i=2,m):k===91?(t.consume(k),i=5,l=0,d):nt(k)?(t.consume(k),i=4,n.interrupt?e:w):r(k)}function m(k){return k===45?(t.consume(k),n.interrupt?e:w):r(k)}function d(k){let Ae="CDATA[";return k===Ae.charCodeAt(l++)?(t.consume(k),l===Ae.length?n.interrupt?e:j:d):r(k)}function g(k){return nt(k)?(t.consume(k),a=String.fromCharCode(k),y):r(k)}function y(k){if(k===null||k===47||k===62||ye(k)){let Ae=k===47,Ye=a.toLowerCase();return!Ae&&!s&&Jy.includes(Ye)?(i=1,n.interrupt?e(k):j(k)):wD.includes(a.toLowerCase())?(i=6,Ae?(t.consume(k),x):n.interrupt?e(k):j(k)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(k):s?T(k):E(k))}return k===45||He(k)?(t.consume(k),a+=String.fromCharCode(k),y):r(k)}function x(k){return k===62?(t.consume(k),n.interrupt?e:j):r(k)}function T(k){return Z(k)?(t.consume(k),T):C(k)}function E(k){return k===47?(t.consume(k),C):k===58||k===95||nt(k)?(t.consume(k),L):Z(k)?(t.consume(k),E):C(k)}function L(k){return k===45||k===46||k===58||k===95||He(k)?(t.consume(k),L):P(k)}function P(k){return k===61?(t.consume(k),D):Z(k)?(t.consume(k),P):E(k)}function D(k){return k===null||k===60||k===61||k===62||k===96?r(k):k===34||k===39?(t.consume(k),c=k,F):Z(k)?(t.consume(k),D):A(k)}function F(k){return k===c?(t.consume(k),c=null,W):k===null||V(k)?r(k):(t.consume(k),F)}function A(k){return k===null||k===34||k===39||k===47||k===60||k===61||k===62||k===96||ye(k)?P(k):(t.consume(k),A)}function W(k){return k===47||k===62||Z(k)?E(k):r(k)}function C(k){return k===62?(t.consume(k),le):r(k)}function le(k){return k===null||V(k)?j(k):Z(k)?(t.consume(k),le):r(k)}function j(k){return k===45&&i===2?(t.consume(k),U):k===60&&i===1?(t.consume(k),K):k===62&&i===4?(t.consume(k),xe):k===63&&i===3?(t.consume(k),w):k===93&&i===5?(t.consume(k),ue):V(k)&&(i===6||i===7)?(t.exit("htmlFlowData"),t.check(i$,ke,N)(k)):k===null||V(k)?(t.exit("htmlFlowData"),N(k)):(t.consume(k),j)}function N(k){return t.check(o$,R,ke)(k)}function R(k){return t.enter("lineEnding"),t.consume(k),t.exit("lineEnding"),z}function z(k){return k===null||V(k)?N(k):(t.enter("htmlFlowData"),j(k))}function U(k){return k===45?(t.consume(k),w):j(k)}function K(k){return k===47?(t.consume(k),a="",X):j(k)}function X(k){if(k===62){let Ae=a.toLowerCase();return Jy.includes(Ae)?(t.consume(k),xe):j(k)}return nt(k)&&a.length<8?(t.consume(k),a+=String.fromCharCode(k),X):j(k)}function ue(k){return k===93?(t.consume(k),w):j(k)}function w(k){return k===62?(t.consume(k),xe):k===45&&i===2?(t.consume(k),w):j(k)}function xe(k){return k===null||V(k)?(t.exit("htmlFlowData"),ke(k)):(t.consume(k),xe)}function ke(k){return t.exit("htmlFlow"),e(k)}}o(a$,"tokenizeHtmlFlow");function l$(t,e,r){let n=this;return i;function i(a){return V(a)?(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),s):r(a)}function s(a){return n.parser.lazy[n.now().line]?r(a):e(a)}}o(l$,"tokenizeNonLazyContinuationStart");function c$(t,e,r){return n;function n(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),t.attempt(hn,e,r)}}o(c$,"tokenizeBlankLineBefore");var Xy={name:"htmlText",tokenize:u$};function u$(t,e,r){let n=this,i,s,a;return l;function l(w){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(w),c}function c(w){return w===33?(t.consume(w),u):w===47?(t.consume(w),P):w===63?(t.consume(w),E):nt(w)?(t.consume(w),A):r(w)}function u(w){return w===45?(t.consume(w),f):w===91?(t.consume(w),s=0,d):nt(w)?(t.consume(w),T):r(w)}function f(w){return w===45?(t.consume(w),m):r(w)}function p(w){return w===null?r(w):w===45?(t.consume(w),h):V(w)?(a=p,K(w)):(t.consume(w),p)}function h(w){return w===45?(t.consume(w),m):p(w)}function m(w){return w===62?U(w):w===45?h(w):p(w)}function d(w){let xe="CDATA[";return w===xe.charCodeAt(s++)?(t.consume(w),s===xe.length?g:d):r(w)}function g(w){return w===null?r(w):w===93?(t.consume(w),y):V(w)?(a=g,K(w)):(t.consume(w),g)}function y(w){return w===93?(t.consume(w),x):g(w)}function x(w){return w===62?U(w):w===93?(t.consume(w),x):g(w)}function T(w){return w===null||w===62?U(w):V(w)?(a=T,K(w)):(t.consume(w),T)}function E(w){return w===null?r(w):w===63?(t.consume(w),L):V(w)?(a=E,K(w)):(t.consume(w),E)}function L(w){return w===62?U(w):E(w)}function P(w){return nt(w)?(t.consume(w),D):r(w)}function D(w){return w===45||He(w)?(t.consume(w),D):F(w)}function F(w){return V(w)?(a=F,K(w)):Z(w)?(t.consume(w),F):U(w)}function A(w){return w===45||He(w)?(t.consume(w),A):w===47||w===62||ye(w)?W(w):r(w)}function W(w){return w===47?(t.consume(w),U):w===58||w===95||nt(w)?(t.consume(w),C):V(w)?(a=W,K(w)):Z(w)?(t.consume(w),W):U(w)}function C(w){return w===45||w===46||w===58||w===95||He(w)?(t.consume(w),C):le(w)}function le(w){return w===61?(t.consume(w),j):V(w)?(a=le,K(w)):Z(w)?(t.consume(w),le):W(w)}function j(w){return w===null||w===60||w===61||w===62||w===96?r(w):w===34||w===39?(t.consume(w),i=w,N):V(w)?(a=j,K(w)):Z(w)?(t.consume(w),j):(t.consume(w),R)}function N(w){return w===i?(t.consume(w),i=void 0,z):w===null?r(w):V(w)?(a=N,K(w)):(t.consume(w),N)}function R(w){return w===null||w===34||w===39||w===60||w===61||w===96?r(w):w===47||w===62||ye(w)?W(w):(t.consume(w),R)}function z(w){return w===47||w===62||ye(w)?W(w):r(w)}function U(w){return w===62?(t.consume(w),t.exit("htmlTextData"),t.exit("htmlText"),e):r(w)}function K(w){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(w),t.exit("lineEnding"),X}function X(w){return Z(w)?ne(t,ue,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):ue(w)}function ue(w){return t.enter("htmlTextData"),a(w)}}o(u$,"tokenizeHtmlText");var xo={name:"labelEnd",resolveAll:m$,resolveTo:d$,tokenize:g$},f$={tokenize:y$},p$={tokenize:x$},h$={tokenize:b$};function m$(t){let e=-1,r=[];for(;++e<t.length;){let n=t[e][1];if(r.push(t[e]),n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd"){let i=n.type==="labelImage"?4:2;n.type="data",e+=i}}return t.length!==r.length&&Ke(t,0,t.length,r),t}o(m$,"resolveAllLabelEnd");function d$(t,e){let r=t.length,n=0,i,s,a,l;for(;r--;)if(i=t[r][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;t[r][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(t[r][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=r,i.type!=="labelLink")){n=2;break}}else i.type==="labelEnd"&&(a=r);let c={type:t[s][1].type==="labelLink"?"link":"image",start:{...t[s][1].start},end:{...t[t.length-1][1].end}},u={type:"label",start:{...t[s][1].start},end:{...t[a][1].end}},f={type:"labelText",start:{...t[s+n+2][1].end},end:{...t[a-2][1].start}};return l=[["enter",c,e],["enter",u,e]],l=Qe(l,t.slice(s+1,s+n+3)),l=Qe(l,[["enter",f,e]]),l=Qe(l,yi(e.parser.constructs.insideSpan.null,t.slice(s+n+4,a-3),e)),l=Qe(l,[["exit",f,e],t[a-2],t[a-1],["exit",u,e]]),l=Qe(l,t.slice(a+1)),l=Qe(l,[["exit",c,e]]),Ke(t,s,t.length,l),t}o(d$,"resolveToLabelEnd");function g$(t,e,r){let n=this,i=n.events.length,s,a;for(;i--;)if((n.events[i][1].type==="labelImage"||n.events[i][1].type==="labelLink")&&!n.events[i][1]._balanced){s=n.events[i][1];break}return l;function l(h){return s?s._inactive?p(h):(a=n.parser.defined.includes(qe(n.sliceSerialize({start:s.end,end:n.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(h),t.exit("labelMarker"),t.exit("labelEnd"),c):r(h)}function c(h){return h===40?t.attempt(f$,f,a?f:p)(h):h===91?t.attempt(p$,f,a?u:p)(h):a?f(h):p(h)}function u(h){return t.attempt(h$,f,p)(h)}function f(h){return e(h)}function p(h){return s._balanced=!0,r(h)}}o(g$,"tokenizeLabelEnd");function y$(t,e,r){return n;function n(p){return t.enter("resource"),t.enter("resourceMarker"),t.consume(p),t.exit("resourceMarker"),i}function i(p){return ye(p)?yo(t,s)(p):s(p)}function s(p){return p===41?f(p):qh(t,a,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function a(p){return ye(p)?yo(t,c)(p):f(p)}function l(p){return r(p)}function c(p){return p===34||p===39||p===40?Vh(t,u,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):f(p)}function u(p){return ye(p)?yo(t,f)(p):f(p)}function f(p){return p===41?(t.enter("resourceMarker"),t.consume(p),t.exit("resourceMarker"),t.exit("resource"),e):r(p)}}o(y$,"tokenizeResource");function x$(t,e,r){let n=this;return i;function i(l){return Yh.call(n,t,s,a,"reference","referenceMarker","referenceString")(l)}function s(l){return n.parser.defined.includes(qe(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?e(l):r(l)}function a(l){return r(l)}}o(x$,"tokenizeReferenceFull");function b$(t,e,r){return n;function n(s){return t.enter("reference"),t.enter("referenceMarker"),t.consume(s),t.exit("referenceMarker"),i}function i(s){return s===93?(t.enter("referenceMarker"),t.consume(s),t.exit("referenceMarker"),t.exit("reference"),e):r(s)}}o(b$,"tokenizeReferenceCollapsed");var Zy={name:"labelStartImage",resolveAll:xo.resolveAll,tokenize:w$};function w$(t,e,r){let n=this;return i;function i(l){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(l),t.exit("labelImageMarker"),s}function s(l){return l===91?(t.enter("labelMarker"),t.consume(l),t.exit("labelMarker"),t.exit("labelImage"),a):r(l)}function a(l){return l===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(l):e(l)}}o(w$,"tokenizeLabelStartImage");var ex={name:"labelStartLink",resolveAll:xo.resolveAll,tokenize:v$};function v$(t,e,r){let n=this;return i;function i(a){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(a),t.exit("labelMarker"),t.exit("labelLink"),s}function s(a){return a===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(a):e(a)}}o(v$,"tokenizeLabelStartLink");var ic={name:"lineEnding",tokenize:S$};function S$(t,e){return r;function r(n){return t.enter("lineEnding"),t.consume(n),t.exit("lineEnding"),ne(t,e,"linePrefix")}}o(S$,"tokenizeLineEnding");var bo={name:"thematicBreak",tokenize:k$};function k$(t,e,r){let n=0,i;return s;function s(u){return t.enter("thematicBreak"),a(u)}function a(u){return i=u,l(u)}function l(u){return u===i?(t.enter("thematicBreakSequence"),c(u)):n>=3&&(u===null||V(u))?(t.exit("thematicBreak"),e(u)):r(u)}function c(u){return u===i?(t.consume(u),n++,c):(t.exit("thematicBreakSequence"),Z(u)?ne(t,l,"whitespace")(u):l(u))}}o(k$,"tokenizeThematicBreak");var Dt={continuation:{tokenize:C$},exit:M$,name:"list",tokenize:D$},T$={partial:!0,tokenize:I$},E$={partial:!0,tokenize:O$};function D$(t,e,r){let n=this,i=n.events[n.events.length-1],s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return l;function l(m){let d=n.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(d==="listUnordered"?!n.containerState.marker||m===n.containerState.marker:Ul(m)){if(n.containerState.type||(n.containerState.type=d,t.enter(d,{_container:!0})),d==="listUnordered")return t.enter("listItemPrefix"),m===42||m===45?t.check(bo,r,u)(m):u(m);if(!n.interrupt||m===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),c(m)}return r(m)}function c(m){return Ul(m)&&++a<10?(t.consume(m),c):(!n.interrupt||a<2)&&(n.containerState.marker?m===n.containerState.marker:m===41||m===46)?(t.exit("listItemValue"),u(m)):r(m)}function u(m){return t.enter("listItemMarker"),t.consume(m),t.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||m,t.check(hn,n.interrupt?r:f,t.attempt(T$,h,p))}function f(m){return n.containerState.initialBlankLine=!0,s++,h(m)}function p(m){return Z(m)?(t.enter("listItemPrefixWhitespace"),t.consume(m),t.exit("listItemPrefixWhitespace"),h):r(m)}function h(m){return n.containerState.size=s+n.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(m)}}o(D$,"tokenizeListStart");function C$(t,e,r){let n=this;return n.containerState._closeFlow=void 0,t.check(hn,i,s);function i(l){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,ne(t,e,"listItemIndent",n.containerState.size+1)(l)}o(i,"onBlank");function s(l){return n.containerState.furtherBlankLines||!Z(l)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,a(l)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,t.attempt(E$,e,a)(l))}o(s,"notBlank");function a(l){return n.containerState._closeFlow=!0,n.interrupt=void 0,ne(t,t.attempt(Dt,e,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}o(a,"notInCurrentItem")}o(C$,"tokenizeListContinuation");function O$(t,e,r){let n=this;return ne(t,i,"listItemIndent",n.containerState.size+1);function i(s){let a=n.events[n.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===n.containerState.size?e(s):r(s)}}o(O$,"tokenizeIndent");function M$(t){t.exit(this.containerState.type)}o(M$,"tokenizeListEnd");function I$(t,e,r){let n=this;return ne(t,i,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){let a=n.events[n.events.length-1];return!Z(s)&&a&&a[1].type==="listItemPrefixWhitespace"?e(s):r(s)}}o(I$,"tokenizeListItemPrefixWhitespace");var Kh={name:"setextUnderline",resolveTo:N$,tokenize:P$};function N$(t,e){let r=t.length,n,i,s;for(;r--;)if(t[r][0]==="enter"){if(t[r][1].type==="content"){n=r;break}t[r][1].type==="paragraph"&&(i=r)}else t[r][1].type==="content"&&t.splice(r,1),!s&&t[r][1].type==="definition"&&(s=r);let a={type:"setextHeading",start:{...t[n][1].start},end:{...t[t.length-1][1].end}};return t[i][1].type="setextHeadingText",s?(t.splice(i,0,["enter",a,e]),t.splice(s+1,0,["exit",t[n][1],e]),t[n][1].end={...t[s][1].end}):t[n][1]=a,t.push(["exit",a,e]),t}o(N$,"resolveToSetextUnderline");function P$(t,e,r){let n=this,i;return s;function s(u){let f=n.events.length,p;for(;f--;)if(n.events[f][1].type!=="lineEnding"&&n.events[f][1].type!=="linePrefix"&&n.events[f][1].type!=="content"){p=n.events[f][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||p)?(t.enter("setextHeadingLine"),i=u,a(u)):r(u)}function a(u){return t.enter("setextHeadingLineSequence"),l(u)}function l(u){return u===i?(t.consume(u),l):(t.exit("setextHeadingLineSequence"),Z(u)?ne(t,c,"lineSuffix")(u):c(u))}function c(u){return u===null||V(u)?(t.exit("setextHeadingLine"),e(u)):r(u)}}o(P$,"tokenizeSetextUnderline");var vD={tokenize:L$};function L$(t){let e=this,r=t.attempt(hn,n,t.attempt(this.parser.constructs.flowInitial,i,ne(t,t.attempt(this.parser.constructs.flow,i,t.attempt(Yy,i)),"linePrefix")));return r;function n(s){if(s===null){t.consume(s);return}return t.enter("lineEndingBlank"),t.consume(s),t.exit("lineEndingBlank"),e.currentConstruct=void 0,r}function i(s){if(s===null){t.consume(s);return}return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),e.currentConstruct=void 0,r}}o(L$,"initializeFlow");var TD={resolveAll:kD()},ED=SD("string"),DD=SD("text");function SD(t){return{resolveAll:kD(t==="text"?_$:void 0),tokenize:e};function e(r){let n=this,i=this.parser.constructs[t],s=r.attempt(i,a,l);return a;function a(f){return u(f)?s(f):l(f)}function l(f){if(f===null){r.consume(f);return}return r.enter("data"),r.consume(f),c}function c(f){return u(f)?(r.exit("data"),s(f)):(r.consume(f),c)}function u(f){if(f===null)return!0;let p=i[f],h=-1;if(p)for(;++h<p.length;){let m=p[h];if(!m.previous||m.previous.call(n,n.previous))return!0}return!1}}}o(SD,"initializeFactory");function kD(t){return e;function e(r,n){let i=-1,s;for(;++i<=r.length;)s===void 0?r[i]&&r[i][1].type==="data"&&(s=i,i++):(!r[i]||r[i][1].type!=="data")&&(i!==s+2&&(r[s][1].end=r[i-1][1].end,r.splice(s+2,i-s-2),i=s+2),s=void 0);return t?t(r,n):r}}o(kD,"createResolver");function _$(t,e){let r=0;for(;++r<=t.length;)if((r===t.length||t[r][1].type==="lineEnding")&&t[r-1][1].type==="data"){let n=t[r-1][1],i=e.sliceStream(n),s=i.length,a=-1,l=0,c;for(;s--;){let u=i[s];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)l++,a--;if(a)break;a=-1}else if(u===-2)c=!0,l++;else if(u!==-1){s++;break}}if(e._contentTypeTextTrailing&&r===t.length&&(l=0),l){let u={type:r===t.length||c||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:n.start._bufferIndex+a,_index:n.start._index+s,line:n.end.line,column:n.end.column-l,offset:n.end.offset-l},end:{...n.end}};n.end={...u.start},n.start.offset===n.end.offset?Object.assign(n,u):(t.splice(r,0,["enter",u,e],["exit",u,e]),r+=2)}r++}return t}o(_$,"resolveAllLineSuffixes");var tx={};se(tx,{attentionMarkers:()=>W$,contentInitial:()=>A$,disable:()=>H$,document:()=>R$,flow:()=>$$,flowInitial:()=>F$,insideSpan:()=>z$,string:()=>B$,text:()=>j$});var R$={42:Dt,43:Dt,45:Dt,48:Dt,49:Dt,50:Dt,51:Dt,52:Dt,53:Dt,54:Dt,55:Dt,56:Dt,57:Dt,62:jh},A$={91:Vy},F$={[-2]:tc,[-1]:tc,32:tc},$$={35:Gy,42:bo,45:[Kh,bo],60:Qy,61:Kh,95:bo,96:Hh,126:Hh},B$={38:Wh,92:zh},j$={[-5]:ic,[-4]:ic,[-3]:ic,33:Zy,38:Wh,42:ec,60:[Uy,Xy],91:ex,92:[Ky,zh],93:xo,95:ec,96:qy},z$={null:[ec,TD]},W$={null:[42,95]},H$={null:[]};function CD(t,e,r){let n={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0},i={},s=[],a=[],l=[],c=!0,u={attempt:W(F),check:W(A),consume:L,enter:P,exit:D,interrupt:W(A,{interrupt:!0})},f={code:null,containerState:{},defineSkip:x,events:[],now:y,parser:t,previous:null,sliceSerialize:d,sliceStream:g,write:m},p=e.tokenize.call(f,u),h;return e.resolveAll&&s.push(e),f;function m(N){return a=Qe(a,N),T(),a[a.length-1]!==null?[]:(C(e,0),f.events=yi(s,f.events,f),f.events)}o(m,"write");function d(N,R){return q$(g(N),R)}o(d,"sliceSerialize");function g(N){return U$(a,N)}o(g,"sliceStream");function y(){let{_bufferIndex:N,_index:R,line:z,column:U,offset:K}=n;return{_bufferIndex:N,_index:R,line:z,column:U,offset:K}}o(y,"now");function x(N){i[N.line]=N.column,j()}o(x,"defineSkip");function T(){let N;for(;n._index<a.length;){let R=a[n._index];if(typeof R=="string")for(N=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===N&&n._bufferIndex<R.length;)E(R.charCodeAt(n._bufferIndex));else E(R)}}o(T,"main");function E(N){c=void 0,h=N,p=p(N)}o(E,"go");function L(N){V(N)?(n.line++,n.column=1,n.offset+=N===-3?2:1,j()):N!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===a[n._index].length&&(n._bufferIndex=-1,n._index++)),f.previous=N,c=!0}o(L,"consume");function P(N,R){let z=R||{};return z.type=N,z.start=y(),f.events.push(["enter",z,f]),l.push(z),z}o(P,"enter");function D(N){let R=l.pop();return R.end=y(),f.events.push(["exit",R,f]),R}o(D,"exit");function F(N,R){C(N,R.from)}o(F,"onsuccessfulconstruct");function A(N,R){R.restore()}o(A,"onsuccessfulcheck");function W(N,R){return z;function z(U,K,X){let ue,w,xe,ke;return Array.isArray(U)?Ae(U):"tokenize"in U?Ae([U]):k(U);function k(S){return M;function M(I){let B=I!==null&&S[I],te=I!==null&&S.null,Re=[...Array.isArray(B)?B:B?[B]:[],...Array.isArray(te)?te:te?[te]:[]];return Ae(Re)(I)}}function Ae(S){return ue=S,w=0,S.length===0?X:Ye(S[w])}function Ye(S){return M;function M(I){return ke=le(),xe=S,S.partial||(f.currentConstruct=S),S.name&&f.parser.constructs.disable.null.includes(S.name)?O(I):S.tokenize.call(R?Object.assign(Object.create(f),R):f,u,Yt,O)(I)}}function Yt(S){return c=!0,N(xe,ke),K}function O(S){return c=!0,ke.restore(),++w<ue.length?Ye(ue[w]):X}}}o(W,"constructFactory");function C(N,R){N.resolveAll&&!s.includes(N)&&s.push(N),N.resolve&&Ke(f.events,R,f.events.length-R,N.resolve(f.events.slice(R),f)),N.resolveTo&&(f.events=N.resolveTo(f.events,f))}o(C,"addResult");function le(){let N=y(),R=f.previous,z=f.currentConstruct,U=f.events.length,K=Array.from(l);return{from:U,restore:X};function X(){n=N,f.previous=R,f.currentConstruct=z,f.events.length=U,l=K,j()}}o(le,"store");function j(){n.line in i&&n.column<2&&(n.column=i[n.line],n.offset+=i[n.line]-1)}o(j,"accountForPotentialSkip")}o(CD,"createTokenizer");function U$(t,e){let r=e.start._index,n=e.start._bufferIndex,i=e.end._index,s=e.end._bufferIndex,a;if(r===i)a=[t[r].slice(n,s)];else{if(a=t.slice(r,i),n>-1){let l=a[0];typeof l=="string"?a[0]=l.slice(n):a.shift()}s>0&&a.push(t[i].slice(0,s))}return a}o(U$,"sliceChunks");function q$(t,e){let r=-1,n=[],i;for(;++r<t.length;){let s=t[r],a;if(typeof s=="string")a=s;else switch(s){case-5:{a="\r";break}case-4:{a=`
274
274
  `;break}case-3:{a=`\r
275
- `;break}case-2:{a=e?" ":" ";break}case-1:{if(!e&&i)continue;a=" ";break}default:a=String.fromCharCode(s)}i=s===-2,n.push(a)}return n.join("")}o(O$,"serializeChunks");function rc(t){let n={constructs:_h([Jy,...(t||{}).extensions||[]]),content:i(aD),defined:[],document:i(cD),flow:i(hD),lazy:{},string:i(yD),text:i(xD)};return n;function i(s){return a;function a(l){return bD(n,s,l)}}}o(rc,"parse");function nc(t){for(;!Bh(t););return t}o(nc,"postprocess");var wD=/[\0\t\n\r]/g;function ic(){let t=1,e="",r=!0,n;return i;function i(s,a,l){let c=[],u,f,p,h,m;for(s=e+(typeof s=="string"?s.toString():new TextDecoder(a||void 0).decode(s)),p=0,e="",r&&(s.charCodeAt(0)===65279&&p++,r=void 0);p<s.length;){if(wD.lastIndex=p,u=wD.exec(s),h=u&&u.index!==void 0?u.index:s.length,m=s.charCodeAt(h),!u){e=s.slice(p);break}if(m===10&&p===h&&n)c.push(-3),n=void 0;else switch(n&&(c.push(-5),n=void 0),p<h&&(c.push(s.slice(p,h)),t+=h-p),m){case 0:{c.push(65533),t++;break}case 9:{for(f=Math.ceil(t/4)*4,c.push(-2);t++<f;)c.push(-1);break}case 10:{c.push(-4),t=1;break}default:n=!0,t=1}p=h+1}return l&&(n&&c.push(-5),e&&c.push(e),c.push(null)),c}}o(ic,"preprocess");function A6e(t,e,r){return typeof e!="string"&&(r=e,e=void 0),$y(r)(nc(rc(r).document().write(ic()(t,e,!0))))}o(A6e,"micromark");var SD={}.hasOwnProperty;function Qy(t,e,r){return e&&typeof e=="object"&&(r=e,e=void 0),M$(r)(nc(rc(r).document().write(ic()(t,e,!0))))}o(Qy,"fromMarkdown");function M$(t){let e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(br),autolinkProtocol:W,autolinkEmail:W,atxHeading:s(Ee),blockQuote:s(I),characterEscape:W,characterReference:W,codeFenced:s(B),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(B,a),codeText:s(re,a),codeTextData:W,data:W,codeFlowValue:W,definition:s(Re),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(_e),hardBreakEscape:s(Pt),hardBreakTrailing:s(Pt),htmlFlow:s(ot,a),htmlFlowData:W,htmlText:s(ot,a),htmlTextData:W,image:s(Ct),label:a,link:s(br),listItem:s(Vt),listItemValue:h,listOrdered:s(Ar,p),listUnordered:s(Ar),paragraph:s(nr),reference:k,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(Ee),strong:s(_t),thematicBreak:s(Fr)},exit:{atxHeading:c(),atxHeadingSequence:P,autolink:c(),autolinkEmail:M,autolinkProtocol:v,blockQuote:c(),characterEscapeValue:C,characterReferenceMarkerHexadecimal:Ye,characterReferenceMarkerNumeric:Ye,characterReferenceValue:Yt,characterReference:O,codeFenced:c(y),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:d,codeFlowValue:C,codeIndented:c(x),codeText:c(z),codeTextData:C,data:C,definition:c(),definitionDestinationString:_,definitionLabelString:T,definitionTitleString:E,emphasis:c(),hardBreakEscape:c(j),hardBreakTrailing:c(j),htmlFlow:c(N),htmlFlowData:C,htmlText:c(R),htmlTextData:C,image:c(K),label:ue,labelText:X,lineEnding:le,link:c(U),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:Ae,resourceDestinationString:w,resourceTitleString:xe,resource:Te,setextHeading:c(A),setextHeadingLineSequence:F,setextHeadingText:D,strong:c(),thematicBreak:c()}};vD(e,(t||{}).mdastExtensions||[]);let r={};return n;function n(L){let q={type:"root",children:[]},oe={stack:[q],tokenStack:[],config:e,enter:l,exit:u,buffer:a,resume:f,data:r},fe=[],De=-1;for(;++De<L.length;)if(L[De][1].type==="listOrdered"||L[De][1].type==="listUnordered")if(L[De][0]==="enter")fe.push(De);else{let Kt=fe.pop();De=i(L,Kt,De)}for(De=-1;++De<L.length;){let Kt=e[L[De][0]];SD.call(Kt,L[De][1].type)&&Kt[L[De][1].type].call(Object.assign({sliceSerialize:L[De][2].sliceSerialize},oe),L[De][1])}if(oe.tokenStack.length>0){let Kt=oe.tokenStack[oe.tokenStack.length-1];(Kt[1]||kD).call(oe,void 0,Kt[0])}for(q.position={start:bi(L.length>0?L[0][1].start:{line:1,column:1,offset:0}),end:bi(L.length>0?L[L.length-2][1].end:{line:1,column:1,offset:0})},De=-1;++De<e.transforms.length;)q=e.transforms[De](q)||q;return q}function i(L,q,oe){let fe=q-1,De=-1,Kt=!1,$r,ir,Di,Ci;for(;++fe<=oe;){let Ot=L[fe];switch(Ot[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ot[0]==="enter"?De++:De--,Ci=void 0;break}case"lineEndingBlank":{Ot[0]==="enter"&&($r&&!Ci&&!De&&!Di&&(Di=fe),Ci=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ci=void 0}if(!De&&Ot[0]==="enter"&&Ot[1].type==="listItemPrefix"||De===-1&&Ot[0]==="exit"&&(Ot[1].type==="listUnordered"||Ot[1].type==="listOrdered")){if($r){let Rn=fe;for(ir=void 0;Rn--;){let wr=L[Rn];if(wr[1].type==="lineEnding"||wr[1].type==="lineEndingBlank"){if(wr[0]==="exit")continue;ir&&(L[ir][1].type="lineEndingBlank",Kt=!0),wr[1].type="lineEnding",ir=Rn}else if(!(wr[1].type==="linePrefix"||wr[1].type==="blockQuotePrefix"||wr[1].type==="blockQuotePrefixWhitespace"||wr[1].type==="blockQuoteMarker"||wr[1].type==="listItemIndent"))break}Di&&(!ir||Di<ir)&&($r._spread=!0),$r.end=Object.assign({},ir?L[ir][1].start:Ot[1].end),L.splice(ir||fe,0,["exit",$r,Ot[2]]),fe++,oe++}if(Ot[1].type==="listItemPrefix"){let Rn={type:"listItem",_spread:!1,start:Object.assign({},Ot[1].start),end:void 0};$r=Rn,L.splice(fe,0,["enter",Rn,Ot[2]]),fe++,oe++,Di=void 0,Ci=!0}}}return L[q][1]._spread=Kt,oe}function s(L,q){return oe;function oe(fe){l.call(this,L(fe),fe),q&&q.call(this,fe)}}function a(){this.stack.push({type:"fragment",children:[]})}function l(L,q,oe){this.stack[this.stack.length-1].children.push(L),this.stack.push(L),this.tokenStack.push([q,oe||void 0]),L.position={start:bi(q.start),end:void 0}}function c(L){return q;function q(oe){L&&L.call(this,oe),u.call(this,oe)}}function u(L,q){let oe=this.stack.pop(),fe=this.tokenStack.pop();if(fe)fe[0].type!==L.type&&(q?q.call(this,L,fe[0]):(fe[1]||kD).call(this,L,fe[0]));else throw new Error("Cannot close `"+L.type+"` ("+yi({start:L.start,end:L.end})+"): it\u2019s not open");oe.position.end=bi(L.end)}function f(){return mo(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function h(L){if(this.data.expectingFirstListItemValue){let q=this.stack[this.stack.length-2];q.start=Number.parseInt(this.sliceSerialize(L),10),this.data.expectingFirstListItemValue=void 0}}function m(){let L=this.resume(),q=this.stack[this.stack.length-1];q.lang=L}function d(){let L=this.resume(),q=this.stack[this.stack.length-1];q.meta=L}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){let L=this.resume(),q=this.stack[this.stack.length-1];q.value=L.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){let L=this.resume(),q=this.stack[this.stack.length-1];q.value=L.replace(/(\r?\n|\r)$/g,"")}function T(L){let q=this.resume(),oe=this.stack[this.stack.length-1];oe.label=q,oe.identifier=qe(this.sliceSerialize(L)).toLowerCase()}function E(){let L=this.resume(),q=this.stack[this.stack.length-1];q.title=L}function _(){let L=this.resume(),q=this.stack[this.stack.length-1];q.url=L}function P(L){let q=this.stack[this.stack.length-1];if(!q.depth){let oe=this.sliceSerialize(L).length;q.depth=oe}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function F(L){let q=this.stack[this.stack.length-1];q.depth=this.sliceSerialize(L).codePointAt(0)===61?1:2}function A(){this.data.setextHeadingSlurpLineEnding=void 0}function W(L){let oe=this.stack[this.stack.length-1].children,fe=oe[oe.length-1];(!fe||fe.type!=="text")&&(fe=ze(),fe.position={start:bi(L.start),end:void 0},oe.push(fe)),this.stack.push(fe)}function C(L){let q=this.stack.pop();q.value+=this.sliceSerialize(L),q.position.end=bi(L.end)}function le(L){let q=this.stack[this.stack.length-1];if(this.data.atHardBreak){let oe=q.children[q.children.length-1];oe.position.end=bi(L.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(q.type)&&(W.call(this,L),C.call(this,L))}function j(){this.data.atHardBreak=!0}function N(){let L=this.resume(),q=this.stack[this.stack.length-1];q.value=L}function R(){let L=this.resume(),q=this.stack[this.stack.length-1];q.value=L}function z(){let L=this.resume(),q=this.stack[this.stack.length-1];q.value=L}function U(){let L=this.stack[this.stack.length-1];if(this.data.inReference){let q=this.data.referenceType||"shortcut";L.type+="Reference",L.referenceType=q,delete L.url,delete L.title}else delete L.identifier,delete L.label;this.data.referenceType=void 0}function K(){let L=this.stack[this.stack.length-1];if(this.data.inReference){let q=this.data.referenceType||"shortcut";L.type+="Reference",L.referenceType=q,delete L.url,delete L.title}else delete L.identifier,delete L.label;this.data.referenceType=void 0}function X(L){let q=this.sliceSerialize(L),oe=this.stack[this.stack.length-2];oe.label=Oh(q),oe.identifier=qe(q).toLowerCase()}function ue(){let L=this.stack[this.stack.length-1],q=this.resume(),oe=this.stack[this.stack.length-1];if(this.data.inReference=!0,oe.type==="link"){let fe=L.children;oe.children=fe}else oe.alt=q}function w(){let L=this.resume(),q=this.stack[this.stack.length-1];q.url=L}function xe(){let L=this.resume(),q=this.stack[this.stack.length-1];q.title=L}function Te(){this.data.inReference=void 0}function k(){this.data.referenceType="collapsed"}function Ae(L){let q=this.resume(),oe=this.stack[this.stack.length-1];oe.label=q,oe.identifier=qe(this.sliceSerialize(L)).toLowerCase(),this.data.referenceType="full"}function Ye(L){this.data.characterReferenceType=L.type}function Yt(L){let q=this.sliceSerialize(L),oe=this.data.characterReferenceType,fe;oe?(fe=na(q,oe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):fe=di(q);let De=this.stack[this.stack.length-1];De.value+=fe}function O(L){let q=this.stack.pop();q.position.end=bi(L.end)}function v(L){C.call(this,L);let q=this.stack[this.stack.length-1];q.url=this.sliceSerialize(L)}function M(L){C.call(this,L);let q=this.stack[this.stack.length-1];q.url="mailto:"+this.sliceSerialize(L)}function I(){return{type:"blockquote",children:[]}}function B(){return{type:"code",lang:null,meta:null,value:""}}function re(){return{type:"inlineCode",value:""}}function Re(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function _e(){return{type:"emphasis",children:[]}}function Ee(){return{type:"heading",depth:0,children:[]}}function Pt(){return{type:"break"}}function ot(){return{type:"html",value:""}}function Ct(){return{type:"image",title:null,url:"",alt:null}}function br(){return{type:"link",title:null,url:"",children:[]}}function Ar(L){return{type:"list",ordered:L.type==="listOrdered",start:null,spread:L._spread,children:[]}}function Vt(L){return{type:"listItem",spread:L._spread,checked:null,children:[]}}function nr(){return{type:"paragraph",children:[]}}function _t(){return{type:"strong",children:[]}}function ze(){return{type:"text",value:""}}function Fr(){return{type:"thematicBreak"}}}o(M$,"compiler");function bi(t){return{line:t.line,column:t.column,offset:t.offset}}o(bi,"point");function vD(t,e){let r=-1;for(;++r<e.length;){let n=e[r];Array.isArray(n)?vD(t,n):I$(t,n)}}o(vD,"configure");function I$(t,e){let r;for(r in e)if(SD.call(e,r))switch(r){case"canContainEols":{let n=e[r];n&&t[r].push(...n);break}case"transforms":{let n=e[r];n&&t[r].push(...n);break}case"enter":case"exit":{let n=e[r];n&&Object.assign(t[r],n);break}}}o(I$,"extension");function kD(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+yi({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+yi({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+yi({start:e.start,end:e.end})+") is still open")}o(kD,"defaultOnError");function aa(t){let e=this;e.parser=r;function r(n){return Qy(n,{...e.data("settings"),...t,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}o(r,"parser")}o(aa,"remarkParse");function Xy(t,e,r){let i=Mn((r||{}).ignore||[]),s=N$(e),a=-1;for(;++a<s.length;)Wl(t,"text",l);function l(u,f){let p=-1,h;for(;++p<f.length;){let m=f[p],d=h?h.children:void 0;if(i(m,d?d.indexOf(m):void 0,h))return;h=m}if(h)return c(u,f)}o(l,"visitor");function c(u,f){let p=f[f.length-1],h=s[a][0],m=s[a][1],d=0,y=p.children.indexOf(u),x=!1,T=[];h.lastIndex=0;let E=h.exec(u.value);for(;E;){let _=E.index,P={index:E.index,input:E.input,stack:[...f,u]},D=m(...E,P);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?h.lastIndex=_+1:(d!==_&&T.push({type:"text",value:u.value.slice(d,_)}),Array.isArray(D)?T.push(...D):D&&T.push(D),d=_+E[0].length,x=!0),!h.global)break;E=h.exec(u.value)}return x?(d<u.value.length&&T.push({type:"text",value:u.value.slice(d)}),p.children.splice(y,1,...T)):T=[u],y+T.length}o(c,"handler")}o(Xy,"findAndReplace");function N$(t){let e=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");let r=!t[0]||Array.isArray(t[0])?t:[t],n=-1;for(;++n<r.length;){let i=r[n];e.push([P$(i[0]),_$(i[1])])}return e}o(N$,"toPairs");function P$(t){return typeof t=="string"?new RegExp(Oi(t),"g"):t}o(P$,"toExpression");function _$(t){return typeof t=="function"?t:function(){return t}}o(_$,"toFunction");var Zy="phrasing",ex=["autolink","link","image","label"];function rx(){return{transforms:[B$],enter:{literalAutolink:L$,literalAutolinkEmail:tx,literalAutolinkHttp:tx,literalAutolinkWww:tx},exit:{literalAutolink:$$,literalAutolinkEmail:F$,literalAutolinkHttp:R$,literalAutolinkWww:A$}}}o(rx,"gfmAutolinkLiteralFromMarkdown");function nx(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Zy,notInConstruct:ex},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Zy,notInConstruct:ex},{character:":",before:"[ps]",after:"\\/",inConstruct:Zy,notInConstruct:ex}]}}o(nx,"gfmAutolinkLiteralToMarkdown");function L$(t){this.enter({type:"link",title:null,url:"",children:[]},t)}o(L$,"enterLiteralAutolink");function tx(t){this.config.enter.autolinkProtocol.call(this,t)}o(tx,"enterLiteralAutolinkValue");function R$(t){this.config.exit.autolinkProtocol.call(this,t)}o(R$,"exitLiteralAutolinkHttp");function A$(t){this.config.exit.data.call(this,t);let e=this.stack[this.stack.length-1];e.type,e.url="http://"+this.sliceSerialize(t)}o(A$,"exitLiteralAutolinkWww");function F$(t){this.config.exit.autolinkEmail.call(this,t)}o(F$,"exitLiteralAutolinkEmail");function $$(t){this.exit(t)}o($$,"exitLiteralAutolink");function B$(t){Xy(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,j$],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,z$]],{ignore:["link","linkReference"]})}o(B$,"transformGfmAutolinkLiterals");function j$(t,e,r,n,i){let s="";if(!TD(i)||(/^w/i.test(e)&&(r=e+r,e="",s="http://"),!W$(r)))return!1;let a=H$(r+n);if(!a[0])return!1;let l={type:"link",title:null,url:s+e+a[0],children:[{type:"text",value:e+a[0]}]};return a[1]?[l,{type:"text",value:a[1]}]:l}o(j$,"findUrl");function z$(t,e,r,n){return!TD(n,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+r,children:[{type:"text",value:e+"@"+r}]}}o(z$,"findEmail");function W$(t){let e=t.split(".");return!(e.length<2||e[e.length-1]&&(/_/.test(e[e.length-1])||!/[a-zA-Z\d]/.test(e[e.length-1]))||e[e.length-2]&&(/_/.test(e[e.length-2])||!/[a-zA-Z\d]/.test(e[e.length-2])))}o(W$,"isCorrectDomain");function H$(t){let e=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!e)return[t,void 0];t=t.slice(0,e.index);let r=e[0],n=r.indexOf(")"),i=Xs(t,"("),s=Xs(t,")");for(;n!==-1&&i>s;)t+=r.slice(0,n+1),r=r.slice(n+1),n=r.indexOf(")"),s++;return[t,r]}o(H$,"splitUrl");function TD(t,e){let r=t.input.charCodeAt(t.index-1);return(t.index===0||un(r)||co(r))&&(!e||r!==47)}o(TD,"previous");ED.peek=X$;function U$(){this.buffer()}o(U$,"enterFootnoteCallString");function q$(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}o(q$,"enterFootnoteCall");function Y$(){this.buffer()}o(Y$,"enterFootnoteDefinitionLabelString");function V$(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}o(V$,"enterFootnoteDefinition");function K$(t){let e=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=qe(this.sliceSerialize(t)).toLowerCase(),r.label=e}o(K$,"exitFootnoteCallString");function G$(t){this.exit(t)}o(G$,"exitFootnoteCall");function J$(t){let e=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=qe(this.sliceSerialize(t)).toLowerCase(),r.label=e}o(J$,"exitFootnoteDefinitionLabelString");function Q$(t){this.exit(t)}o(Q$,"exitFootnoteDefinition");function X$(){return"["}o(X$,"footnoteReferencePeek");function ED(t,e,r,n){let i=r.createTracker(n),s=i.move("[^"),a=r.enter("footnoteReference"),l=r.enter("reference");return s+=i.move(r.safe(r.associationId(t),{after:"]",before:s})),l(),a(),s+=i.move("]"),s}o(ED,"footnoteReference");function ix(){return{enter:{gfmFootnoteCallString:U$,gfmFootnoteCall:q$,gfmFootnoteDefinitionLabelString:Y$,gfmFootnoteDefinition:V$},exit:{gfmFootnoteCallString:K$,gfmFootnoteCall:G$,gfmFootnoteDefinitionLabelString:J$,gfmFootnoteDefinition:Q$}}}o(ix,"gfmFootnoteFromMarkdown");function ox(t){let e=!1;return t&&t.firstLineBlank&&(e=!0),{handlers:{footnoteDefinition:r,footnoteReference:ED},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(n,i,s,a){let l=s.createTracker(a),c=l.move("[^"),u=s.enter("footnoteDefinition"),f=s.enter("label");return c+=l.move(s.safe(s.associationId(n),{before:c,after:"]"})),f(),c+=l.move("]:"),n.children&&n.children.length>0&&(l.shift(4),c+=l.move((e?`
276
- `:" ")+s.indentLines(s.containerFlow(n,l.current()),e?DD:Z$))),u(),c}o(r,"footnoteDefinition")}o(ox,"gfmFootnoteToMarkdown");function Z$(t,e,r){return e===0?t:DD(t,e,r)}o(Z$,"mapExceptFirst");function DD(t,e,r){return(r?"":" ")+t}o(DD,"mapAll");var eB=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];CD.peek=nB;function sx(){return{canContainEols:["delete"],enter:{strikethrough:tB},exit:{strikethrough:rB}}}o(sx,"gfmStrikethroughFromMarkdown");function ax(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:eB}],handlers:{delete:CD}}}o(ax,"gfmStrikethroughToMarkdown");function tB(t){this.enter({type:"delete",children:[]},t)}o(tB,"enterStrikethrough");function rB(t){this.exit(t)}o(rB,"exitStrikethrough");function CD(t,e,r,n){let i=r.createTracker(n),s=r.enter("strikethrough"),a=i.move("~~");return a+=r.containerPhrasing(t,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),s(),a}o(CD,"handleDelete");function nB(){return"~"}o(nB,"peekDelete");function iB(t){return t.length}o(iB,"defaultStringLength");function MD(t,e){let r=e||{},n=(r.align||[]).concat(),i=r.stringLength||iB,s=[],a=[],l=[],c=[],u=0,f=-1;for(;++f<t.length;){let g=[],y=[],x=-1;for(t[f].length>u&&(u=t[f].length);++x<t[f].length;){let T=oB(t[f][x]);if(r.alignDelimiters!==!1){let E=i(T);y[x]=E,(c[x]===void 0||E>c[x])&&(c[x]=E)}g.push(T)}a[f]=g,l[f]=y}let p=-1;if(typeof n=="object"&&"length"in n)for(;++p<u;)s[p]=OD(n[p]);else{let g=OD(n);for(;++p<u;)s[p]=g}p=-1;let h=[],m=[];for(;++p<u;){let g=s[p],y="",x="";g===99?(y=":",x=":"):g===108?y=":":g===114&&(x=":");let T=r.alignDelimiters===!1?1:Math.max(1,c[p]-y.length-x.length),E=y+"-".repeat(T)+x;r.alignDelimiters!==!1&&(T=y.length+T+x.length,T>c[p]&&(c[p]=T),m[p]=T),h[p]=E}a.splice(1,0,h),l.splice(1,0,m),f=-1;let d=[];for(;++f<a.length;){let g=a[f],y=l[f];p=-1;let x=[];for(;++p<u;){let T=g[p]||"",E="",_="";if(r.alignDelimiters!==!1){let P=c[p]-(y[p]||0),D=s[p];D===114?E=" ".repeat(P):D===99?P%2?(E=" ".repeat(P/2+.5),_=" ".repeat(P/2-.5)):(E=" ".repeat(P/2),_=E):_=" ".repeat(P)}r.delimiterStart!==!1&&!p&&x.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&T==="")&&(r.delimiterStart!==!1||p)&&x.push(" "),r.alignDelimiters!==!1&&x.push(E),x.push(T),r.alignDelimiters!==!1&&x.push(_),r.padding!==!1&&x.push(" "),(r.delimiterEnd!==!1||p!==u-1)&&x.push("|")}d.push(r.delimiterEnd===!1?x.join("").replace(/ +$/,""):x.join(""))}return d.join(`
277
- `)}o(MD,"markdownTable");function oB(t){return t==null?"":String(t)}o(oB,"serialize");function OD(t){let e=typeof t=="string"?t.codePointAt(0):0;return e===67||e===99?99:e===76||e===108?108:e===82||e===114?114:0}o(OD,"toAlignment");function cx(){return{enter:{table:sB,tableData:ID,tableHeader:ID,tableRow:lB},exit:{codeText:cB,table:aB,tableData:lx,tableHeader:lx,tableRow:lx}}}o(cx,"gfmTableFromMarkdown");function sB(t){let e=t._align;this.enter({type:"table",align:e.map(function(r){return r==="none"?null:r}),children:[]},t),this.data.inTable=!0}o(sB,"enterTable");function aB(t){this.exit(t),this.data.inTable=void 0}o(aB,"exitTable");function lB(t){this.enter({type:"tableRow",children:[]},t)}o(lB,"enterRow");function lx(t){this.exit(t)}o(lx,"exit");function ID(t){this.enter({type:"tableCell",children:[]},t)}o(ID,"enterCell");function cB(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,uB));let r=this.stack[this.stack.length-1];r.type,r.value=e,this.exit(t)}o(cB,"exitCodeText");function uB(t,e){return e==="|"?e:t}o(uB,"replace");function ux(t){let e=t||{},r=e.tableCellPadding,n=e.tablePipeAlign,i=e.stringLength,s=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
275
+ `;break}case-2:{a=e?" ":" ";break}case-1:{if(!e&&i)continue;a=" ";break}default:a=String.fromCharCode(s)}i=s===-2,n.push(a)}return n.join("")}o(q$,"serializeChunks");function oc(t){let n={constructs:$h([tx,...(t||{}).extensions||[]]),content:i(dD),defined:[],document:i(yD),flow:i(vD),lazy:{},string:i(ED),text:i(DD)};return n;function i(s){return a;function a(l){return CD(n,s,l)}}}o(oc,"parse");function sc(t){for(;!Uh(t););return t}o(sc,"postprocess");var OD=/[\0\t\n\r]/g;function ac(){let t=1,e="",r=!0,n;return i;function i(s,a,l){let c=[],u,f,p,h,m;for(s=e+(typeof s=="string"?s.toString():new TextDecoder(a||void 0).decode(s)),p=0,e="",r&&(s.charCodeAt(0)===65279&&p++,r=void 0);p<s.length;){if(OD.lastIndex=p,u=OD.exec(s),h=u&&u.index!==void 0?u.index:s.length,m=s.charCodeAt(h),!u){e=s.slice(p);break}if(m===10&&p===h&&n)c.push(-3),n=void 0;else switch(n&&(c.push(-5),n=void 0),p<h&&(c.push(s.slice(p,h)),t+=h-p),m){case 0:{c.push(65533),t++;break}case 9:{for(f=Math.ceil(t/4)*4,c.push(-2);t++<f;)c.push(-1);break}case 10:{c.push(-4),t=1;break}default:n=!0,t=1}p=h+1}return l&&(n&&c.push(-5),e&&c.push(e),c.push(null)),c}}o(ac,"preprocess");function hYe(t,e,r){return typeof e!="string"&&(r=e,e=void 0),Hy(r)(sc(oc(r).document().write(ac()(t,e,!0))))}o(hYe,"micromark");var MD={}.hasOwnProperty;function rx(t,e,r){return e&&typeof e=="object"&&(r=e,e=void 0),Y$(r)(sc(oc(r).document().write(ac()(t,e,!0))))}o(rx,"fromMarkdown");function Y$(t){let e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(br),autolinkProtocol:W,autolinkEmail:W,atxHeading:s(Te),blockQuote:s(I),characterEscape:W,characterReference:W,codeFenced:s(B),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(B,a),codeText:s(te,a),codeTextData:W,data:W,codeFlowValue:W,definition:s(Re),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(Pe),hardBreakEscape:s(Pt),hardBreakTrailing:s(Pt),htmlFlow:s(ot,a),htmlFlowData:W,htmlText:s(ot,a),htmlTextData:W,image:s(Ct),label:a,link:s(br),listItem:s(Vt),listItemValue:h,listOrdered:s(Ar,p),listUnordered:s(Ar),paragraph:s(nr),reference:k,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(Te),strong:s(Lt),thematicBreak:s(Fr)},exit:{atxHeading:c(),atxHeadingSequence:P,autolink:c(),autolinkEmail:M,autolinkProtocol:S,blockQuote:c(),characterEscapeValue:C,characterReferenceMarkerHexadecimal:Ye,characterReferenceMarkerNumeric:Ye,characterReferenceValue:Yt,characterReference:O,codeFenced:c(y),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:d,codeFlowValue:C,codeIndented:c(x),codeText:c(z),codeTextData:C,data:C,definition:c(),definitionDestinationString:L,definitionLabelString:T,definitionTitleString:E,emphasis:c(),hardBreakEscape:c(j),hardBreakTrailing:c(j),htmlFlow:c(N),htmlFlowData:C,htmlText:c(R),htmlTextData:C,image:c(K),label:ue,labelText:X,lineEnding:le,link:c(U),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:Ae,resourceDestinationString:w,resourceTitleString:xe,resource:ke,setextHeading:c(A),setextHeadingLineSequence:F,setextHeadingText:D,strong:c(),thematicBreak:c()}};ID(e,(t||{}).mdastExtensions||[]);let r={};return n;function n(_){let q={type:"root",children:[]},oe={stack:[q],tokenStack:[],config:e,enter:l,exit:u,buffer:a,resume:f,data:r},fe=[],Ee=-1;for(;++Ee<_.length;)if(_[Ee][1].type==="listOrdered"||_[Ee][1].type==="listUnordered")if(_[Ee][0]==="enter")fe.push(Ee);else{let Kt=fe.pop();Ee=i(_,Kt,Ee)}for(Ee=-1;++Ee<_.length;){let Kt=e[_[Ee][0]];MD.call(Kt,_[Ee][1].type)&&Kt[_[Ee][1].type].call(Object.assign({sliceSerialize:_[Ee][2].sliceSerialize},oe),_[Ee][1])}if(oe.tokenStack.length>0){let Kt=oe.tokenStack[oe.tokenStack.length-1];(Kt[1]||ND).call(oe,void 0,Kt[0])}for(q.position={start:xi(_.length>0?_[0][1].start:{line:1,column:1,offset:0}),end:xi(_.length>0?_[_.length-2][1].end:{line:1,column:1,offset:0})},Ee=-1;++Ee<e.transforms.length;)q=e.transforms[Ee](q)||q;return q}function i(_,q,oe){let fe=q-1,Ee=-1,Kt=!1,$r,ir,Ei,Di;for(;++fe<=oe;){let Ot=_[fe];switch(Ot[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ot[0]==="enter"?Ee++:Ee--,Di=void 0;break}case"lineEndingBlank":{Ot[0]==="enter"&&($r&&!Di&&!Ee&&!Ei&&(Ei=fe),Di=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Di=void 0}if(!Ee&&Ot[0]==="enter"&&Ot[1].type==="listItemPrefix"||Ee===-1&&Ot[0]==="exit"&&(Ot[1].type==="listUnordered"||Ot[1].type==="listOrdered")){if($r){let An=fe;for(ir=void 0;An--;){let wr=_[An];if(wr[1].type==="lineEnding"||wr[1].type==="lineEndingBlank"){if(wr[0]==="exit")continue;ir&&(_[ir][1].type="lineEndingBlank",Kt=!0),wr[1].type="lineEnding",ir=An}else if(!(wr[1].type==="linePrefix"||wr[1].type==="blockQuotePrefix"||wr[1].type==="blockQuotePrefixWhitespace"||wr[1].type==="blockQuoteMarker"||wr[1].type==="listItemIndent"))break}Ei&&(!ir||Ei<ir)&&($r._spread=!0),$r.end=Object.assign({},ir?_[ir][1].start:Ot[1].end),_.splice(ir||fe,0,["exit",$r,Ot[2]]),fe++,oe++}if(Ot[1].type==="listItemPrefix"){let An={type:"listItem",_spread:!1,start:Object.assign({},Ot[1].start),end:void 0};$r=An,_.splice(fe,0,["enter",An,Ot[2]]),fe++,oe++,Ei=void 0,Di=!0}}}return _[q][1]._spread=Kt,oe}function s(_,q){return oe;function oe(fe){l.call(this,_(fe),fe),q&&q.call(this,fe)}}function a(){this.stack.push({type:"fragment",children:[]})}function l(_,q,oe){this.stack[this.stack.length-1].children.push(_),this.stack.push(_),this.tokenStack.push([q,oe||void 0]),_.position={start:xi(q.start),end:void 0}}function c(_){return q;function q(oe){_&&_.call(this,oe),u.call(this,oe)}}function u(_,q){let oe=this.stack.pop(),fe=this.tokenStack.pop();if(fe)fe[0].type!==_.type&&(q?q.call(this,_,fe[0]):(fe[1]||ND).call(this,_,fe[0]));else throw new Error("Cannot close `"+_.type+"` ("+gi({start:_.start,end:_.end})+"): it\u2019s not open");oe.position.end=xi(_.end)}function f(){return ho(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function h(_){if(this.data.expectingFirstListItemValue){let q=this.stack[this.stack.length-2];q.start=Number.parseInt(this.sliceSerialize(_),10),this.data.expectingFirstListItemValue=void 0}}function m(){let _=this.resume(),q=this.stack[this.stack.length-1];q.lang=_}function d(){let _=this.resume(),q=this.stack[this.stack.length-1];q.meta=_}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){let _=this.resume(),q=this.stack[this.stack.length-1];q.value=_.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){let _=this.resume(),q=this.stack[this.stack.length-1];q.value=_.replace(/(\r?\n|\r)$/g,"")}function T(_){let q=this.resume(),oe=this.stack[this.stack.length-1];oe.label=q,oe.identifier=qe(this.sliceSerialize(_)).toLowerCase()}function E(){let _=this.resume(),q=this.stack[this.stack.length-1];q.title=_}function L(){let _=this.resume(),q=this.stack[this.stack.length-1];q.url=_}function P(_){let q=this.stack[this.stack.length-1];if(!q.depth){let oe=this.sliceSerialize(_).length;q.depth=oe}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function F(_){let q=this.stack[this.stack.length-1];q.depth=this.sliceSerialize(_).codePointAt(0)===61?1:2}function A(){this.data.setextHeadingSlurpLineEnding=void 0}function W(_){let oe=this.stack[this.stack.length-1].children,fe=oe[oe.length-1];(!fe||fe.type!=="text")&&(fe=ze(),fe.position={start:xi(_.start),end:void 0},oe.push(fe)),this.stack.push(fe)}function C(_){let q=this.stack.pop();q.value+=this.sliceSerialize(_),q.position.end=xi(_.end)}function le(_){let q=this.stack[this.stack.length-1];if(this.data.atHardBreak){let oe=q.children[q.children.length-1];oe.position.end=xi(_.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(q.type)&&(W.call(this,_),C.call(this,_))}function j(){this.data.atHardBreak=!0}function N(){let _=this.resume(),q=this.stack[this.stack.length-1];q.value=_}function R(){let _=this.resume(),q=this.stack[this.stack.length-1];q.value=_}function z(){let _=this.resume(),q=this.stack[this.stack.length-1];q.value=_}function U(){let _=this.stack[this.stack.length-1];if(this.data.inReference){let q=this.data.referenceType||"shortcut";_.type+="Reference",_.referenceType=q,delete _.url,delete _.title}else delete _.identifier,delete _.label;this.data.referenceType=void 0}function K(){let _=this.stack[this.stack.length-1];if(this.data.inReference){let q=this.data.referenceType||"shortcut";_.type+="Reference",_.referenceType=q,delete _.url,delete _.title}else delete _.identifier,delete _.label;this.data.referenceType=void 0}function X(_){let q=this.sliceSerialize(_),oe=this.stack[this.stack.length-2];oe.label=Lh(q),oe.identifier=qe(q).toLowerCase()}function ue(){let _=this.stack[this.stack.length-1],q=this.resume(),oe=this.stack[this.stack.length-1];if(this.data.inReference=!0,oe.type==="link"){let fe=_.children;oe.children=fe}else oe.alt=q}function w(){let _=this.resume(),q=this.stack[this.stack.length-1];q.url=_}function xe(){let _=this.resume(),q=this.stack[this.stack.length-1];q.title=_}function ke(){this.data.inReference=void 0}function k(){this.data.referenceType="collapsed"}function Ae(_){let q=this.resume(),oe=this.stack[this.stack.length-1];oe.label=q,oe.identifier=qe(this.sliceSerialize(_)).toLowerCase(),this.data.referenceType="full"}function Ye(_){this.data.characterReferenceType=_.type}function Yt(_){let q=this.sliceSerialize(_),oe=this.data.characterReferenceType,fe;oe?(fe=ia(q,oe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):fe=mi(q);let Ee=this.stack[this.stack.length-1];Ee.value+=fe}function O(_){let q=this.stack.pop();q.position.end=xi(_.end)}function S(_){C.call(this,_);let q=this.stack[this.stack.length-1];q.url=this.sliceSerialize(_)}function M(_){C.call(this,_);let q=this.stack[this.stack.length-1];q.url="mailto:"+this.sliceSerialize(_)}function I(){return{type:"blockquote",children:[]}}function B(){return{type:"code",lang:null,meta:null,value:""}}function te(){return{type:"inlineCode",value:""}}function Re(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Pe(){return{type:"emphasis",children:[]}}function Te(){return{type:"heading",depth:0,children:[]}}function Pt(){return{type:"break"}}function ot(){return{type:"html",value:""}}function Ct(){return{type:"image",title:null,url:"",alt:null}}function br(){return{type:"link",title:null,url:"",children:[]}}function Ar(_){return{type:"list",ordered:_.type==="listOrdered",start:null,spread:_._spread,children:[]}}function Vt(_){return{type:"listItem",spread:_._spread,checked:null,children:[]}}function nr(){return{type:"paragraph",children:[]}}function Lt(){return{type:"strong",children:[]}}function ze(){return{type:"text",value:""}}function Fr(){return{type:"thematicBreak"}}}o(Y$,"compiler");function xi(t){return{line:t.line,column:t.column,offset:t.offset}}o(xi,"point");function ID(t,e){let r=-1;for(;++r<e.length;){let n=e[r];Array.isArray(n)?ID(t,n):V$(t,n)}}o(ID,"configure");function V$(t,e){let r;for(r in e)if(MD.call(e,r))switch(r){case"canContainEols":{let n=e[r];n&&t[r].push(...n);break}case"transforms":{let n=e[r];n&&t[r].push(...n);break}case"enter":case"exit":{let n=e[r];n&&Object.assign(t[r],n);break}}}o(V$,"extension");function ND(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+gi({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+gi({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+gi({start:e.start,end:e.end})+") is still open")}o(ND,"defaultOnError");function la(t){let e=this;e.parser=r;function r(n){return rx(n,{...e.data("settings"),...t,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}o(r,"parser")}o(la,"remarkParse");function nx(t,e,r){let i=In((r||{}).ignore||[]),s=K$(e),a=-1;for(;++a<s.length;)ql(t,"text",l);function l(u,f){let p=-1,h;for(;++p<f.length;){let m=f[p],d=h?h.children:void 0;if(i(m,d?d.indexOf(m):void 0,h))return;h=m}if(h)return c(u,f)}o(l,"visitor");function c(u,f){let p=f[f.length-1],h=s[a][0],m=s[a][1],d=0,y=p.children.indexOf(u),x=!1,T=[];h.lastIndex=0;let E=h.exec(u.value);for(;E;){let L=E.index,P={index:E.index,input:E.input,stack:[...f,u]},D=m(...E,P);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?h.lastIndex=L+1:(d!==L&&T.push({type:"text",value:u.value.slice(d,L)}),Array.isArray(D)?T.push(...D):D&&T.push(D),d=L+E[0].length,x=!0),!h.global)break;E=h.exec(u.value)}return x?(d<u.value.length&&T.push({type:"text",value:u.value.slice(d)}),p.children.splice(y,1,...T)):T=[u],y+T.length}o(c,"handler")}o(nx,"findAndReplace");function K$(t){let e=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");let r=!t[0]||Array.isArray(t[0])?t:[t],n=-1;for(;++n<r.length;){let i=r[n];e.push([G$(i[0]),J$(i[1])])}return e}o(K$,"toPairs");function G$(t){return typeof t=="string"?new RegExp(Ci(t),"g"):t}o(G$,"toExpression");function J$(t){return typeof t=="function"?t:function(){return t}}o(J$,"toFunction");var ix="phrasing",ox=["autolink","link","image","label"];function ax(){return{transforms:[rB],enter:{literalAutolink:Q$,literalAutolinkEmail:sx,literalAutolinkHttp:sx,literalAutolinkWww:sx},exit:{literalAutolink:tB,literalAutolinkEmail:eB,literalAutolinkHttp:X$,literalAutolinkWww:Z$}}}o(ax,"gfmAutolinkLiteralFromMarkdown");function lx(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ix,notInConstruct:ox},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ix,notInConstruct:ox},{character:":",before:"[ps]",after:"\\/",inConstruct:ix,notInConstruct:ox}]}}o(lx,"gfmAutolinkLiteralToMarkdown");function Q$(t){this.enter({type:"link",title:null,url:"",children:[]},t)}o(Q$,"enterLiteralAutolink");function sx(t){this.config.enter.autolinkProtocol.call(this,t)}o(sx,"enterLiteralAutolinkValue");function X$(t){this.config.exit.autolinkProtocol.call(this,t)}o(X$,"exitLiteralAutolinkHttp");function Z$(t){this.config.exit.data.call(this,t);let e=this.stack[this.stack.length-1];e.type,e.url="http://"+this.sliceSerialize(t)}o(Z$,"exitLiteralAutolinkWww");function eB(t){this.config.exit.autolinkEmail.call(this,t)}o(eB,"exitLiteralAutolinkEmail");function tB(t){this.exit(t)}o(tB,"exitLiteralAutolink");function rB(t){nx(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,nB],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,iB]],{ignore:["link","linkReference"]})}o(rB,"transformGfmAutolinkLiterals");function nB(t,e,r,n,i){let s="";if(!PD(i)||(/^w/i.test(e)&&(r=e+r,e="",s="http://"),!oB(r)))return!1;let a=sB(r+n);if(!a[0])return!1;let l={type:"link",title:null,url:s+e+a[0],children:[{type:"text",value:e+a[0]}]};return a[1]?[l,{type:"text",value:a[1]}]:l}o(nB,"findUrl");function iB(t,e,r,n){return!PD(n,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+r,children:[{type:"text",value:e+"@"+r}]}}o(iB,"findEmail");function oB(t){let e=t.split(".");return!(e.length<2||e[e.length-1]&&(/_/.test(e[e.length-1])||!/[a-zA-Z\d]/.test(e[e.length-1]))||e[e.length-2]&&(/_/.test(e[e.length-2])||!/[a-zA-Z\d]/.test(e[e.length-2])))}o(oB,"isCorrectDomain");function sB(t){let e=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!e)return[t,void 0];t=t.slice(0,e.index);let r=e[0],n=r.indexOf(")"),i=Zs(t,"("),s=Zs(t,")");for(;n!==-1&&i>s;)t+=r.slice(0,n+1),r=r.slice(n+1),n=r.indexOf(")"),s++;return[t,r]}o(sB,"splitUrl");function PD(t,e){let r=t.input.charCodeAt(t.index-1);return(t.index===0||fn(r)||lo(r))&&(!e||r!==47)}o(PD,"previous");LD.peek=dB;function aB(){this.buffer()}o(aB,"enterFootnoteCallString");function lB(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}o(lB,"enterFootnoteCall");function cB(){this.buffer()}o(cB,"enterFootnoteDefinitionLabelString");function uB(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}o(uB,"enterFootnoteDefinition");function fB(t){let e=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=qe(this.sliceSerialize(t)).toLowerCase(),r.label=e}o(fB,"exitFootnoteCallString");function pB(t){this.exit(t)}o(pB,"exitFootnoteCall");function hB(t){let e=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=qe(this.sliceSerialize(t)).toLowerCase(),r.label=e}o(hB,"exitFootnoteDefinitionLabelString");function mB(t){this.exit(t)}o(mB,"exitFootnoteDefinition");function dB(){return"["}o(dB,"footnoteReferencePeek");function LD(t,e,r,n){let i=r.createTracker(n),s=i.move("[^"),a=r.enter("footnoteReference"),l=r.enter("reference");return s+=i.move(r.safe(r.associationId(t),{after:"]",before:s})),l(),a(),s+=i.move("]"),s}o(LD,"footnoteReference");function cx(){return{enter:{gfmFootnoteCallString:aB,gfmFootnoteCall:lB,gfmFootnoteDefinitionLabelString:cB,gfmFootnoteDefinition:uB},exit:{gfmFootnoteCallString:fB,gfmFootnoteCall:pB,gfmFootnoteDefinitionLabelString:hB,gfmFootnoteDefinition:mB}}}o(cx,"gfmFootnoteFromMarkdown");function ux(t){let e=!1;return t&&t.firstLineBlank&&(e=!0),{handlers:{footnoteDefinition:r,footnoteReference:LD},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(n,i,s,a){let l=s.createTracker(a),c=l.move("[^"),u=s.enter("footnoteDefinition"),f=s.enter("label");return c+=l.move(s.safe(s.associationId(n),{before:c,after:"]"})),f(),c+=l.move("]:"),n.children&&n.children.length>0&&(l.shift(4),c+=l.move((e?`
276
+ `:" ")+s.indentLines(s.containerFlow(n,l.current()),e?_D:gB))),u(),c}o(r,"footnoteDefinition")}o(ux,"gfmFootnoteToMarkdown");function gB(t,e,r){return e===0?t:_D(t,e,r)}o(gB,"mapExceptFirst");function _D(t,e,r){return(r?"":" ")+t}o(_D,"mapAll");var yB=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];RD.peek=wB;function fx(){return{canContainEols:["delete"],enter:{strikethrough:xB},exit:{strikethrough:bB}}}o(fx,"gfmStrikethroughFromMarkdown");function px(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:yB}],handlers:{delete:RD}}}o(px,"gfmStrikethroughToMarkdown");function xB(t){this.enter({type:"delete",children:[]},t)}o(xB,"enterStrikethrough");function bB(t){this.exit(t)}o(bB,"exitStrikethrough");function RD(t,e,r,n){let i=r.createTracker(n),s=r.enter("strikethrough"),a=i.move("~~");return a+=r.containerPhrasing(t,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),s(),a}o(RD,"handleDelete");function wB(){return"~"}o(wB,"peekDelete");function vB(t){return t.length}o(vB,"defaultStringLength");function FD(t,e){let r=e||{},n=(r.align||[]).concat(),i=r.stringLength||vB,s=[],a=[],l=[],c=[],u=0,f=-1;for(;++f<t.length;){let g=[],y=[],x=-1;for(t[f].length>u&&(u=t[f].length);++x<t[f].length;){let T=SB(t[f][x]);if(r.alignDelimiters!==!1){let E=i(T);y[x]=E,(c[x]===void 0||E>c[x])&&(c[x]=E)}g.push(T)}a[f]=g,l[f]=y}let p=-1;if(typeof n=="object"&&"length"in n)for(;++p<u;)s[p]=AD(n[p]);else{let g=AD(n);for(;++p<u;)s[p]=g}p=-1;let h=[],m=[];for(;++p<u;){let g=s[p],y="",x="";g===99?(y=":",x=":"):g===108?y=":":g===114&&(x=":");let T=r.alignDelimiters===!1?1:Math.max(1,c[p]-y.length-x.length),E=y+"-".repeat(T)+x;r.alignDelimiters!==!1&&(T=y.length+T+x.length,T>c[p]&&(c[p]=T),m[p]=T),h[p]=E}a.splice(1,0,h),l.splice(1,0,m),f=-1;let d=[];for(;++f<a.length;){let g=a[f],y=l[f];p=-1;let x=[];for(;++p<u;){let T=g[p]||"",E="",L="";if(r.alignDelimiters!==!1){let P=c[p]-(y[p]||0),D=s[p];D===114?E=" ".repeat(P):D===99?P%2?(E=" ".repeat(P/2+.5),L=" ".repeat(P/2-.5)):(E=" ".repeat(P/2),L=E):L=" ".repeat(P)}r.delimiterStart!==!1&&!p&&x.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&T==="")&&(r.delimiterStart!==!1||p)&&x.push(" "),r.alignDelimiters!==!1&&x.push(E),x.push(T),r.alignDelimiters!==!1&&x.push(L),r.padding!==!1&&x.push(" "),(r.delimiterEnd!==!1||p!==u-1)&&x.push("|")}d.push(r.delimiterEnd===!1?x.join("").replace(/ +$/,""):x.join(""))}return d.join(`
277
+ `)}o(FD,"markdownTable");function SB(t){return t==null?"":String(t)}o(SB,"serialize");function AD(t){let e=typeof t=="string"?t.codePointAt(0):0;return e===67||e===99?99:e===76||e===108?108:e===82||e===114?114:0}o(AD,"toAlignment");function mx(){return{enter:{table:kB,tableData:$D,tableHeader:$D,tableRow:EB},exit:{codeText:DB,table:TB,tableData:hx,tableHeader:hx,tableRow:hx}}}o(mx,"gfmTableFromMarkdown");function kB(t){let e=t._align;this.enter({type:"table",align:e.map(function(r){return r==="none"?null:r}),children:[]},t),this.data.inTable=!0}o(kB,"enterTable");function TB(t){this.exit(t),this.data.inTable=void 0}o(TB,"exitTable");function EB(t){this.enter({type:"tableRow",children:[]},t)}o(EB,"enterRow");function hx(t){this.exit(t)}o(hx,"exit");function $D(t){this.enter({type:"tableCell",children:[]},t)}o($D,"enterCell");function DB(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,CB));let r=this.stack[this.stack.length-1];r.type,r.value=e,this.exit(t)}o(DB,"exitCodeText");function CB(t,e){return e==="|"?e:t}o(CB,"replace");function dx(t){let e=t||{},r=e.tableCellPadding,n=e.tablePipeAlign,i=e.stringLength,s=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
278
278
  `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:a,tableCell:c,tableRow:l}};function a(m,d,g,y){return u(f(m,g,y),m.align)}function l(m,d,g,y){let x=p(m,g,y),T=u([x]);return T.slice(0,T.indexOf(`
279
- `))}function c(m,d,g,y){let x=g.enter("tableCell"),T=g.enter("phrasing"),E=g.containerPhrasing(m,{...y,before:s,after:s});return T(),x(),E}function u(m,d){return MD(m,{align:d,alignDelimiters:n,padding:r,stringLength:i})}function f(m,d,g){let y=m.children,x=-1,T=[],E=d.enter("table");for(;++x<y.length;)T[x]=p(y[x],d,g);return E(),T}function p(m,d,g){let y=m.children,x=-1,T=[],E=d.enter("tableRow");for(;++x<y.length;)T[x]=c(y[x],m,d,g);return E(),T}function h(m,d,g){let y=go.inlineCode(m,d,g);return g.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}o(ux,"gfmTableToMarkdown");function fx(){return{exit:{taskListCheckValueChecked:ND,taskListCheckValueUnchecked:ND,paragraph:fB}}}o(fx,"gfmTaskListItemFromMarkdown");function px(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:pB}}}o(px,"gfmTaskListItemToMarkdown");function ND(t){let e=this.stack[this.stack.length-2];e.type,e.checked=t.type==="taskListCheckValueChecked"}o(ND,"exitCheck");function fB(t){let e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked=="boolean"){let r=this.stack[this.stack.length-1];r.type;let n=r.children[0];if(n&&n.type==="text"){let i=e.children,s=-1,a;for(;++s<i.length;){let l=i[s];if(l.type==="paragraph"){a=l;break}}a===r&&(n.value=n.value.slice(1),n.value.length===0?r.children.shift():r.position&&n.position&&typeof n.position.start.offset=="number"&&(n.position.start.column++,n.position.start.offset++,r.position.start=Object.assign({},n.position.start)))}}this.exit(t)}o(fB,"exitParagraphWithTaskListItem");function pB(t,e,r,n){let i=t.children[0],s=typeof t.checked=="boolean"&&i&&i.type==="paragraph",a="["+(t.checked?"x":" ")+"] ",l=r.createTracker(n);s&&l.move(a);let c=go.listItem(t,e,r,{...n,...l.current()});return s&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),c;function u(f){return f+a}o(u,"check")}o(pB,"listItemWithTaskListItem");function hx(){return[rx(),ix(),sx(),cx(),fx()]}o(hx,"gfmFromMarkdown");function mx(t){return{extensions:[nx(),ox(t),ax(),ux(t),px()]}}o(mx,"gfmToMarkdown");var hB={tokenize:xB,partial:!0},PD={tokenize:bB,partial:!0},_D={tokenize:wB,partial:!0},LD={tokenize:SB,partial:!0},mB={tokenize:vB,partial:!0},RD={name:"wwwAutolink",tokenize:gB,previous:FD},AD={name:"protocolAutolink",tokenize:yB,previous:$D},_n={name:"emailAutolink",tokenize:dB,previous:BD},hn={};function yx(){return{text:hn}}o(yx,"gfmAutolinkLiteral");for(var So=48;So<123;)hn[So]=_n,So++,So===58?So=65:So===91&&(So=97);hn[43]=_n,hn[45]=_n,hn[46]=_n,hn[95]=_n,hn[72]=[_n,AD],hn[104]=[_n,AD],hn[87]=[_n,RD],hn[119]=[_n,RD];function dB(t,e,r){let n=this,i,s;return a;function a(p){return!dx(p)||!BD.call(n,n.previous)||gx(n.events)?r(p):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),l(p))}function l(p){return dx(p)?(t.consume(p),l):p===64?(t.consume(p),c):r(p)}function c(p){return p===46?t.check(mB,f,u)(p):p===45||p===95||He(p)?(s=!0,t.consume(p),c):f(p)}function u(p){return t.consume(p),i=!0,c}function f(p){return s&&i&&nt(n.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(p)):r(p)}}o(dB,"tokenizeEmailAutolink");function gB(t,e,r){let n=this;return i;function i(a){return a!==87&&a!==119||!FD.call(n,n.previous)||gx(n.events)?r(a):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(hB,t.attempt(PD,t.attempt(_D,s),r),r)(a))}function s(a){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(a)}}o(gB,"tokenizeWwwAutolink");function yB(t,e,r){let n=this,i="",s=!1;return a;function a(p){return(p===72||p===104)&&$D.call(n,n.previous)&&!gx(n.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),i+=String.fromCodePoint(p),t.consume(p),l):r(p)}function l(p){if(nt(p)&&i.length<5)return i+=String.fromCodePoint(p),t.consume(p),l;if(p===58){let h=i.toLowerCase();if(h==="http"||h==="https")return t.consume(p),c}return r(p)}function c(p){return p===47?(t.consume(p),s?u:(s=!0,c)):r(p)}function u(p){return p===null||lo(p)||ye(p)||un(p)||co(p)?r(p):t.attempt(PD,t.attempt(_D,f),r)(p)}function f(p){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(p)}}o(yB,"tokenizeProtocolAutolink");function xB(t,e,r){let n=0;return i;function i(a){return(a===87||a===119)&&n<3?(n++,t.consume(a),i):a===46&&n===3?(t.consume(a),s):r(a)}function s(a){return a===null?r(a):e(a)}}o(xB,"tokenizeWwwPrefix");function bB(t,e,r){let n,i,s;return a;function a(u){return u===46||u===95?t.check(LD,c,l)(u):u===null||ye(u)||un(u)||u!==45&&co(u)?c(u):(s=!0,t.consume(u),a)}function l(u){return u===95?n=!0:(i=n,n=void 0),t.consume(u),a}function c(u){return i||n||!s?r(u):e(u)}}o(bB,"tokenizeDomain");function wB(t,e){let r=0,n=0;return i;function i(a){return a===40?(r++,t.consume(a),i):a===41&&n<r?s(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?t.check(LD,e,s)(a):a===null||ye(a)||un(a)?e(a):(t.consume(a),i)}function s(a){return a===41&&n++,t.consume(a),i}}o(wB,"tokenizePath");function SB(t,e,r){return n;function n(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(t.consume(l),n):l===38?(t.consume(l),s):l===93?(t.consume(l),i):l===60||l===null||ye(l)||un(l)?e(l):r(l)}function i(l){return l===null||l===40||l===91||ye(l)||un(l)?e(l):n(l)}function s(l){return nt(l)?a(l):r(l)}function a(l){return l===59?(t.consume(l),n):nt(l)?(t.consume(l),a):r(l)}}o(SB,"tokenizeTrail");function vB(t,e,r){return n;function n(s){return t.consume(s),i}function i(s){return He(s)?r(s):e(s)}}o(vB,"tokenizeEmailDomainDotTrail");function FD(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||ye(t)}o(FD,"previousWww");function $D(t){return!nt(t)}o($D,"previousProtocol");function BD(t){return!(t===47||dx(t))}o(BD,"previousEmail");function dx(t){return t===43||t===45||t===46||t===95||He(t)}o(dx,"gfmAtext");function gx(t){let e=t.length,r=!1;for(;e--;){let n=t[e][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){r=!0;break}if(n._gfmAutolinkLiteralWalkedInto){r=!1;break}}return t.length>0&&!r&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}o(gx,"previousUnbalanced");function bx(){return{exit:{literalAutolinkEmail:TB,literalAutolinkHttp:EB,literalAutolinkWww:kB}}}o(bx,"gfmAutolinkLiteralHtml");function kB(t){xx.call(this,t,"http://")}o(kB,"literalAutolinkWww");function TB(t){xx.call(this,t,"mailto:")}o(TB,"literalAutolinkEmail");function EB(t){xx.call(this,t)}o(EB,"literalAutolinkHttp");function xx(t,e){let r=this.sliceSerialize(t);this.tag('<a href="'+fn((e||"")+r)+'">'),this.raw(this.encode(r)),this.tag("</a>")}o(xx,"anchorFromToken");var DB={tokenize:_B,partial:!0};function wx(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:IB,continuation:{tokenize:NB},exit:PB}},text:{91:{name:"gfmFootnoteCall",tokenize:MB},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:CB,resolveTo:OB}}}}o(wx,"gfmFootnote");function CB(t,e,r){let n=this,i=n.events.length,s=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),a;for(;i--;){let c=n.events[i][1];if(c.type==="labelImage"){a=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return l;function l(c){if(!a||!a._balanced)return r(c);let u=qe(n.sliceSerialize({start:a.end,end:n.now()}));return u.codePointAt(0)!==94||!s.includes(u.slice(1))?r(c):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(c),t.exit("gfmFootnoteCallLabelMarker"),e(c))}}o(CB,"tokenizePotentialGfmFootnoteCall");function OB(t,e){let r=t.length,n;for(;r--;)if(t[r][1].type==="labelImage"&&t[r][0]==="enter"){n=t[r][1];break}t[r+1][1].type="data",t[r+3][1].type="gfmFootnoteCallLabelMarker";let i={type:"gfmFootnoteCall",start:Object.assign({},t[r+3][1].start),end:Object.assign({},t[t.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},t[r+3][1].end),end:Object.assign({},t[r+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;let a={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},t[t.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},c=[t[r+1],t[r+2],["enter",i,e],t[r+3],t[r+4],["enter",s,e],["exit",s,e],["enter",a,e],["enter",l,e],["exit",l,e],["exit",a,e],t[t.length-2],t[t.length-1],["exit",i,e]];return t.splice(r,t.length-r+1,...c),t}o(OB,"resolveToPotentialGfmFootnoteCall");function MB(t,e,r){let n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),s=0,a;return l;function l(p){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(p),t.exit("gfmFootnoteCallLabelMarker"),c}function c(p){return p!==94?r(p):(t.enter("gfmFootnoteCallMarker"),t.consume(p),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",u)}function u(p){if(s>999||p===93&&!a||p===null||p===91||ye(p))return r(p);if(p===93){t.exit("chunkString");let h=t.exit("gfmFootnoteCallString");return i.includes(qe(n.sliceSerialize(h)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(p),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):r(p)}return ye(p)||(a=!0),s++,t.consume(p),p===92?f:u}function f(p){return p===91||p===92||p===93?(t.consume(p),s++,u):u(p)}}o(MB,"tokenizeGfmFootnoteCall");function IB(t,e,r){let n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),s,a=0,l;return c;function c(d){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(d),t.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(d){return d===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(d),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",f):r(d)}function f(d){if(a>999||d===93&&!l||d===null||d===91||ye(d))return r(d);if(d===93){t.exit("chunkString");let g=t.exit("gfmFootnoteDefinitionLabelString");return s=qe(n.sliceSerialize(g)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(d),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),h}return ye(d)||(l=!0),a++,t.consume(d),d===92?p:f}function p(d){return d===91||d===92||d===93?(t.consume(d),a++,f):f(d)}function h(d){return d===58?(t.enter("definitionMarker"),t.consume(d),t.exit("definitionMarker"),i.includes(s)||i.push(s),ie(t,m,"gfmFootnoteDefinitionWhitespace")):r(d)}function m(d){return e(d)}}o(IB,"tokenizeDefinitionStart");function NB(t,e,r){return t.check(pn,e,t.attempt(DB,e,r))}o(NB,"tokenizeDefinitionContinuation");function PB(t){t.exit("gfmFootnoteDefinition")}o(PB,"gfmFootnoteDefinitionEnd");function _B(t,e,r){let n=this;return ie(t,i,"gfmFootnoteDefinitionIndent",5);function i(s){let a=n.events[n.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?e(s):r(s)}}o(_B,"tokenizeIndent");var LB={}.hasOwnProperty,RB={};function jD(t,e){return"Back to reference "+(t+1)+(e>1?"-"+e:"")}o(jD,"defaultBackLabel");function Sx(t){let e=t||RB,r=e.label||"Footnotes",n=e.labelTagName||"h2",i=e.labelAttributes===null||e.labelAttributes===void 0?'class="sr-only"':e.labelAttributes,s=e.backLabel||jD,a=e.clobberPrefix===null||e.clobberPrefix===void 0?"user-content-":e.clobberPrefix;return{enter:{gfmFootnoteDefinition(){this.getData("tightStack").push(!1)},gfmFootnoteDefinitionLabelString(){this.buffer()},gfmFootnoteCallString(){this.buffer()}},exit:{gfmFootnoteDefinition(){let l=this.getData("gfmFootnoteDefinitions"),c=this.getData("gfmFootnoteDefinitionStack"),u=this.getData("tightStack"),f=c.pop(),p=this.resume();l||this.setData("gfmFootnoteDefinitions",l={}),LB.call(l,f)||(l[f]=p),u.pop(),this.setData("slurpOneLineEnding",!0),this.setData("lastWasTag")},gfmFootnoteDefinitionLabelString(l){let c=this.getData("gfmFootnoteDefinitionStack");c||this.setData("gfmFootnoteDefinitionStack",c=[]),c.push(qe(this.sliceSerialize(l))),this.resume(),this.buffer()},gfmFootnoteCallString(l){let c=this.getData("gfmFootnoteCallOrder"),u=this.getData("gfmFootnoteCallCounts"),f=qe(this.sliceSerialize(l)),p;this.resume(),c||this.setData("gfmFootnoteCallOrder",c=[]),u||this.setData("gfmFootnoteCallCounts",u={});let h=c.indexOf(f),m=fn(f.toLowerCase());h===-1?(c.push(f),u[f]=1,p=c.length):(u[f]++,p=h+1);let d=u[f];this.tag('<sup><a href="#'+a+"fn-"+m+'" id="'+a+"fnref-"+m+(d>1?"-"+d:"")+'" data-footnote-ref="" aria-describedby="footnote-label">'+String(p)+"</a></sup>")},null(){let l=this.getData("gfmFootnoteCallOrder")||[],c=this.getData("gfmFootnoteCallCounts")||{},u=this.getData("gfmFootnoteDefinitions")||{},f=-1;for(l.length>0&&(this.lineEndingIfNeeded(),this.tag('<section data-footnotes="" class="footnotes"><'+n+' id="footnote-label"'+(i?" "+i:"")+">"),this.raw(this.encode(r)),this.tag("</"+n+">"),this.lineEndingIfNeeded(),this.tag("<ol>"));++f<l.length;){let p=l[f],h=fn(p.toLowerCase()),m=0,d=[];for(;++m<=c[p];)d.push('<a href="#'+a+"fnref-"+h+(m>1?"-"+m:"")+'" data-footnote-backref="" aria-label="'+this.encode(typeof s=="string"?s:s(f,m))+'" class="data-footnote-backref">\u21A9'+(m>1?"<sup>"+m+"</sup>":"")+"</a>");let g=d.join(" "),y=!1;this.lineEndingIfNeeded(),this.tag('<li id="'+a+"fn-"+h+'">'),this.lineEndingIfNeeded(),this.tag(u[p].replace(/<\/p>(?:\r?\n|\r)?$/,function(x){return y=!0," "+g+x})),y||(this.lineEndingIfNeeded(),this.tag(g)),this.lineEndingIfNeeded(),this.tag("</li>")}l.length>0&&(this.lineEndingIfNeeded(),this.tag("</ol>"),this.lineEndingIfNeeded(),this.tag("</section>"))}}}}o(Sx,"gfmFootnoteHtml");function vx(){return{enter:{strikethrough(){this.tag("<del>")}},exit:{strikethrough(){this.tag("</del>")}}}}o(vx,"gfmStrikethroughHtml");function kx(t){let r=(t||{}).singleTilde,n={name:"strikethrough",tokenize:s,resolveAll:i};return r==null&&(r=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function i(a,l){let c=-1;for(;++c<a.length;)if(a[c][0]==="enter"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._close){let u=c;for(;u--;)if(a[u][0]==="exit"&&a[u][1].type==="strikethroughSequenceTemporary"&&a[u][1]._open&&a[c][1].end.offset-a[c][1].start.offset===a[u][1].end.offset-a[u][1].start.offset){a[c][1].type="strikethroughSequence",a[u][1].type="strikethroughSequence";let f={type:"strikethrough",start:Object.assign({},a[u][1].start),end:Object.assign({},a[c][1].end)},p={type:"strikethroughText",start:Object.assign({},a[u][1].end),end:Object.assign({},a[c][1].start)},h=[["enter",f,l],["enter",a[u][1],l],["exit",a[u][1],l],["enter",p,l]],m=l.parser.constructs.insideSpan.null;m&&Ke(h,h.length,0,xi(m,a.slice(u+1,c),l)),Ke(h,h.length,0,[["exit",p,l],["enter",a[c][1],l],["exit",a[c][1],l],["exit",f,l]]),Ke(a,u-1,c-u+3,h),c=u+h.length-2;break}}for(c=-1;++c<a.length;)a[c][1].type==="strikethroughSequenceTemporary"&&(a[c][1].type="data");return a}o(i,"resolveAllStrikethrough");function s(a,l,c){let u=this.previous,f=this.events,p=0;return h;function h(d){return u===126&&f[f.length-1][1].type!=="characterEscape"?c(d):(a.enter("strikethroughSequenceTemporary"),m(d))}function m(d){let g=Pn(u);if(d===126)return p>1?c(d):(a.consume(d),p++,m);if(p<2&&!r)return c(d);let y=a.exit("strikethroughSequenceTemporary"),x=Pn(d);return y._open=!x||x===2&&!!g,y._close=!g||g===2&&!!x,l(d)}}o(s,"tokenizeStrikethrough")}o(kx,"gfmStrikethrough");var Tx={none:"",left:' align="left"',right:' align="right"',center:' align="center"'};function Ex(){return{enter:{table(t){let e=t._align;this.lineEndingIfNeeded(),this.tag("<table>"),this.setData("tableAlign",e)},tableBody(){this.tag("<tbody>")},tableData(){let t=this.getData("tableAlign"),e=this.getData("tableColumn"),r=Tx[t[e]];r===void 0?this.buffer():(this.lineEndingIfNeeded(),this.tag("<td"+r+">"))},tableHead(){this.lineEndingIfNeeded(),this.tag("<thead>")},tableHeader(){let t=this.getData("tableAlign"),e=this.getData("tableColumn"),r=Tx[t[e]];this.lineEndingIfNeeded(),this.tag("<th"+r+">")},tableRow(){this.setData("tableColumn",0),this.lineEndingIfNeeded(),this.tag("<tr>")}},exit:{codeTextData(t){let e=this.sliceSerialize(t);this.getData("tableAlign")&&(e=e.replace(/\\([\\|])/g,AB)),this.raw(this.encode(e))},table(){this.setData("tableAlign"),this.setData("slurpAllLineEndings"),this.lineEndingIfNeeded(),this.tag("</table>")},tableBody(){this.lineEndingIfNeeded(),this.tag("</tbody>")},tableData(){let t=this.getData("tableAlign"),e=this.getData("tableColumn");e in t?(this.tag("</td>"),this.setData("tableColumn",e+1)):this.resume()},tableHead(){this.lineEndingIfNeeded(),this.tag("</thead>")},tableHeader(){let t=this.getData("tableColumn");this.tag("</th>"),this.setData("tableColumn",t+1)},tableRow(){let t=this.getData("tableAlign"),e=this.getData("tableColumn");for(;e<t.length;)this.lineEndingIfNeeded(),this.tag("<td"+Tx[t[e]]+"></td>"),e++;this.setData("tableColumn",e),this.lineEndingIfNeeded(),this.tag("</tr>")}}}}o(Ex,"gfmTableHtml");function AB(t,e){return e==="|"?e:t}o(AB,"replace");var Uh=class{static{o(this,"EditMap")}constructor(){this.map=[]}add(e,r,n){FB(this,e,r,n)}consume(e){if(this.map.sort(function(s,a){return s[0]-a[0]}),this.map.length===0)return;let r=this.map.length,n=[];for(;r>0;)r-=1,n.push(e.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),e.length=this.map[r][0];n.push(e.slice()),e.length=0;let i=n.pop();for(;i;){for(let s of i)e.push(s);i=n.pop()}this.map.length=0}};function FB(t,e,r,n){let i=0;if(!(r===0&&n.length===0)){for(;i<t.map.length;){if(t.map[i][0]===e){t.map[i][1]+=r,t.map[i][2].push(...n);return}i+=1}t.map.push([e,r,n])}}o(FB,"addImplementation");function zD(t,e){let r=!1,n=[];for(;e<t.length;){let i=t[e];if(r){if(i[0]==="enter")i[1].type==="tableContent"&&n.push(t[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(t[e-1][1].type==="tableDelimiterMarker"){let s=n.length-1;n[s]=n[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(r=!0);e+=1}return n}o(zD,"gfmTableAlign");function Dx(){return{flow:{null:{name:"table",tokenize:$B,resolveAll:BB}}}}o(Dx,"gfmTable");function $B(t,e,r){let n=this,i=0,s=0,a;return l;function l(C){let le=n.events.length-1;for(;le>-1;){let R=n.events[le][1].type;if(R==="lineEnding"||R==="linePrefix")le--;else break}let j=le>-1?n.events[le][1].type:null,N=j==="tableHead"||j==="tableRow"?D:c;return N===D&&n.parser.lazy[n.now().line]?r(C):N(C)}function c(C){return t.enter("tableHead"),t.enter("tableRow"),u(C)}function u(C){return C===124||(a=!0,s+=1),f(C)}function f(C){return C===null?r(C):V(C)?s>1?(s=0,n.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(C),t.exit("lineEnding"),m):r(C):Z(C)?ie(t,f,"whitespace")(C):(s+=1,a&&(a=!1,i+=1),C===124?(t.enter("tableCellDivider"),t.consume(C),t.exit("tableCellDivider"),a=!0,f):(t.enter("data"),p(C)))}function p(C){return C===null||C===124||ye(C)?(t.exit("data"),f(C)):(t.consume(C),C===92?h:p)}function h(C){return C===92||C===124?(t.consume(C),p):p(C)}function m(C){return n.interrupt=!1,n.parser.lazy[n.now().line]?r(C):(t.enter("tableDelimiterRow"),a=!1,Z(C)?ie(t,d,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):d(C))}function d(C){return C===45||C===58?y(C):C===124?(a=!0,t.enter("tableCellDivider"),t.consume(C),t.exit("tableCellDivider"),g):P(C)}function g(C){return Z(C)?ie(t,y,"whitespace")(C):y(C)}function y(C){return C===58?(s+=1,a=!0,t.enter("tableDelimiterMarker"),t.consume(C),t.exit("tableDelimiterMarker"),x):C===45?(s+=1,x(C)):C===null||V(C)?_(C):P(C)}function x(C){return C===45?(t.enter("tableDelimiterFiller"),T(C)):P(C)}function T(C){return C===45?(t.consume(C),T):C===58?(a=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(C),t.exit("tableDelimiterMarker"),E):(t.exit("tableDelimiterFiller"),E(C))}function E(C){return Z(C)?ie(t,_,"whitespace")(C):_(C)}function _(C){return C===124?d(C):C===null||V(C)?!a||i!==s?P(C):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(C)):P(C)}function P(C){return r(C)}function D(C){return t.enter("tableRow"),F(C)}function F(C){return C===124?(t.enter("tableCellDivider"),t.consume(C),t.exit("tableCellDivider"),F):C===null||V(C)?(t.exit("tableRow"),e(C)):Z(C)?ie(t,F,"whitespace")(C):(t.enter("data"),A(C))}function A(C){return C===null||C===124||ye(C)?(t.exit("data"),F(C)):(t.consume(C),C===92?W:A)}function W(C){return C===92||C===124?(t.consume(C),A):A(C)}}o($B,"tokenizeTable");function BB(t,e){let r=-1,n=!0,i=0,s=[0,0,0,0],a=[0,0,0,0],l=!1,c=0,u,f,p,h=new Uh;for(;++r<t.length;){let m=t[r],d=m[1];m[0]==="enter"?d.type==="tableHead"?(l=!1,c!==0&&(WD(h,e,c,u,f),f=void 0,c=0),u={type:"table",start:Object.assign({},d.start),end:Object.assign({},d.end)},h.add(r,0,[["enter",u,e]])):d.type==="tableRow"||d.type==="tableDelimiterRow"?(n=!0,p=void 0,s=[0,0,0,0],a=[0,r+1,0,0],l&&(l=!1,f={type:"tableBody",start:Object.assign({},d.start),end:Object.assign({},d.end)},h.add(r,0,[["enter",f,e]])),i=d.type==="tableDelimiterRow"?2:f?3:1):i&&(d.type==="data"||d.type==="tableDelimiterMarker"||d.type==="tableDelimiterFiller")?(n=!1,a[2]===0&&(s[1]!==0&&(a[0]=a[1],p=qh(h,e,s,i,void 0,p),s=[0,0,0,0]),a[2]=r)):d.type==="tableCellDivider"&&(n?n=!1:(s[1]!==0&&(a[0]=a[1],p=qh(h,e,s,i,void 0,p)),s=a,a=[s[1],r,0,0])):d.type==="tableHead"?(l=!0,c=r):d.type==="tableRow"||d.type==="tableDelimiterRow"?(c=r,s[1]!==0?(a[0]=a[1],p=qh(h,e,s,i,r,p)):a[1]!==0&&(p=qh(h,e,a,i,r,p)),i=0):i&&(d.type==="data"||d.type==="tableDelimiterMarker"||d.type==="tableDelimiterFiller")&&(a[3]=r)}for(c!==0&&WD(h,e,c,u,f),h.consume(e.events),r=-1;++r<e.events.length;){let m=e.events[r];m[0]==="enter"&&m[1].type==="table"&&(m[1]._align=zD(e.events,r))}return t}o(BB,"resolveTable");function qh(t,e,r,n,i,s){let a=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",l="tableContent";r[0]!==0&&(s.end=Object.assign({},la(e.events,r[0])),t.add(r[0],0,[["exit",s,e]]));let c=la(e.events,r[1]);if(s={type:a,start:Object.assign({},c),end:Object.assign({},c)},t.add(r[1],0,[["enter",s,e]]),r[2]!==0){let u=la(e.events,r[2]),f=la(e.events,r[3]),p={type:l,start:Object.assign({},u),end:Object.assign({},f)};if(t.add(r[2],0,[["enter",p,e]]),n!==2){let h=e.events[r[2]],m=e.events[r[3]];if(h[1].end=Object.assign({},m[1].end),h[1].type="chunkText",h[1].contentType="text",r[3]>r[2]+1){let d=r[2]+1,g=r[3]-r[2]-1;t.add(d,g,[])}}t.add(r[3]+1,0,[["exit",p,e]])}return i!==void 0&&(s.end=Object.assign({},la(e.events,i)),t.add(i,0,[["exit",s,e]]),s=void 0),s}o(qh,"flushCell");function WD(t,e,r,n,i){let s=[],a=la(e.events,r);i&&(i.end=Object.assign({},a),s.push(["exit",i,e])),n.end=Object.assign({},a),s.push(["exit",n,e]),t.add(r+1,0,s)}o(WD,"flushTableEnd");function la(t,e){let r=t[e],n=r[0]==="enter"?"start":"end";return r[1][n]}o(la,"getPoint");var HD=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|title|textarea|xmp)(?=[\t\n\f\r />])/gi,jB=new RegExp("^"+HD.source,"i");function Cx(){return{exit:{htmlFlowData(t){UD.call(this,t,HD)},htmlTextData(t){UD.call(this,t,jB)}}}}o(Cx,"gfmTagfilterHtml");function UD(t,e){let r=this.sliceSerialize(t);this.options.allowDangerousHtml&&(r=r.replace(e,"&lt;$1$2")),this.raw(this.encode(r))}o(UD,"exitHtmlData");function Ox(){return{enter:{taskListCheck(){this.tag('<input type="checkbox" disabled="" ')}},exit:{taskListCheck(){this.tag("/>")},taskListCheckValueChecked(){this.tag('checked="" ')}}}}o(Ox,"gfmTaskListItemHtml");var zB={name:"tasklistCheck",tokenize:WB};function Mx(){return{text:{91:zB}}}o(Mx,"gfmTaskListItem");function WB(t,e,r){let n=this;return i;function i(c){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?r(c):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(c),t.exit("taskListCheckMarker"),s)}function s(c){return ye(c)?(t.enter("taskListCheckValueUnchecked"),t.consume(c),t.exit("taskListCheckValueUnchecked"),a):c===88||c===120?(t.enter("taskListCheckValueChecked"),t.consume(c),t.exit("taskListCheckValueChecked"),a):r(c)}function a(c){return c===93?(t.enter("taskListCheckMarker"),t.consume(c),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),l):r(c)}function l(c){return V(c)?e(c):Z(c)?t.check({tokenize:HB},e,r)(c):r(c)}}o(WB,"tokenizeTasklistCheck");function HB(t,e,r){return ie(t,n,"whitespace");function n(i){return i===null?r(i):e(i)}}o(HB,"spaceThenNonSpace");function qD(t){return _h([yx(),wx(),kx(t),Dx(),Mx()])}o(qD,"gfm");function h9e(t){return Lh([bx(),Sx(t),vx(),Ex(),Cx(),Ox()])}o(h9e,"gfmHtml");var UB={};function ca(t){let e=this,r=t||UB,n=e.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),s=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),a=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(qD(r)),s.push(hx()),a.push(mx(r))}o(ca,"remarkGfm");var VD=zr(YD(),1),oc=Object.assign(vo(Error),{eval:vo(EvalError),range:vo(RangeError),reference:vo(ReferenceError),syntax:vo(SyntaxError),type:vo(TypeError),uri:vo(URIError)});function vo(t){return e.displayName=t.displayName||t.name,e;function e(r,...n){let i=r&&(0,VD.default)(r,...n);return new t(i)}o(e,"FormattedError")}o(vo,"create");var Yh={}.hasOwnProperty,KD={yaml:"-",toml:"+"};function ua(t){let e=[],r=-1,n=Array.isArray(t)?t:t?[t]:["yaml"];for(;++r<n.length;)e[r]=qB(n[r]);return e}o(ua,"toMatters");function qB(t){let e=t;if(typeof e=="string"){if(!Yh.call(KD,e))throw oc("Missing matter definition for `%s`",e);e={type:e,marker:KD[e]}}else if(typeof e!="object")throw oc("Expected matter to be an object, not `%j`",e);if(!Yh.call(e,"type"))throw oc("Missing `type` in matter `%j`",e);if(!Yh.call(e,"fence")&&!Yh.call(e,"marker"))throw oc("Missing `marker` or `fence` in matter `%j`",e);return e}o(qB,"matter");function Px(t){let e=ua(t),r={},n=-1;for(;++n<e.length;){let i=e[n],s=Nx(i,"open").charCodeAt(0),a=YB(i),l=r[s];Array.isArray(l)?l.push(a):r[s]=[a]}return{flow:r}}o(Px,"frontmatter");function YB(t){let e=t.anywhere,r=t.type,n=r+"Fence",i=n+"Sequence",s=r+"Value",a={tokenize:f,partial:!0},l,c=0;return{tokenize:u,concrete:!0};function u(p,h,m){let d=this;return g;function g(F){let A=d.now();return A.column===1&&(A.line===1||e)&&(l=Nx(t,"open"),c=0,F===l.charCodeAt(c))?(p.enter(r),p.enter(n),p.enter(i),y(F)):m(F)}function y(F){return c===l.length?(p.exit(i),Z(F)?(p.enter("whitespace"),x(F)):T(F)):F===l.charCodeAt(c++)?(p.consume(F),y):m(F)}function x(F){return Z(F)?(p.consume(F),x):(p.exit("whitespace"),T(F))}function T(F){return V(F)?(p.exit(n),p.enter("lineEnding"),p.consume(F),p.exit("lineEnding"),l=Nx(t,"close"),c=0,p.attempt(a,D,E)):m(F)}function E(F){return F===null||V(F)?P(F):(p.enter(s),_(F))}function _(F){return F===null||V(F)?(p.exit(s),P(F)):(p.consume(F),_)}function P(F){return F===null?m(F):(p.enter("lineEnding"),p.consume(F),p.exit("lineEnding"),p.attempt(a,D,E))}function D(F){return p.exit(r),h(F)}}function f(p,h,m){let d=0;return g;function g(E){return E===l.charCodeAt(d)?(p.enter(n),p.enter(i),y(E)):m(E)}function y(E){return d===l.length?(p.exit(i),Z(E)?(p.enter("whitespace"),x(E)):T(E)):E===l.charCodeAt(d++)?(p.consume(E),y):m(E)}function x(E){return Z(E)?(p.consume(E),x):(p.exit("whitespace"),T(E))}function T(E){return E===null||V(E)?(p.exit(n),h(E)):m(E)}}}o(YB,"createConstruct");function Nx(t,e){return t.marker?GD(t.marker,e).repeat(3):GD(t.fence,e)}o(Nx,"fence");function GD(t,e){return typeof t=="string"?t:t[e]}o(GD,"pick");function Lx(t){let e=ua(t),r={},n={},i=-1;for(;++i<e.length;){let s=e[i];r[s.type]=VB(s),n[s.type]=KB,n[s.type+"Value"]=GB}return{enter:r,exit:n}}o(Lx,"frontmatterFromMarkdown");function VB(t){return e;function e(r){this.enter({type:t.type,value:""},r),this.buffer()}}o(VB,"opener");function KB(t){let e=this.resume(),r=this.stack[this.stack.length-1];"value"in r,this.exit(t),r.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,"")}o(KB,"close");function GB(t){this.config.enter.data.call(this,t),this.config.exit.data.call(this,t)}o(GB,"value");function Rx(t){let e=[],r={},n=ua(t),i=-1;for(;++i<n.length;){let s=n[i];r[s.type]=JB(s);let a=_x(s,"open");e.push({atBreak:!0,character:a.charAt(0),after:Oi(a.charAt(1))})}return{unsafe:e,handlers:r}}o(Rx,"frontmatterToMarkdown");function JB(t){let e=_x(t,"open"),r=_x(t,"close");return n;function n(i){return e+(i.value?`
279
+ `))}function c(m,d,g,y){let x=g.enter("tableCell"),T=g.enter("phrasing"),E=g.containerPhrasing(m,{...y,before:s,after:s});return T(),x(),E}function u(m,d){return FD(m,{align:d,alignDelimiters:n,padding:r,stringLength:i})}function f(m,d,g){let y=m.children,x=-1,T=[],E=d.enter("table");for(;++x<y.length;)T[x]=p(y[x],d,g);return E(),T}function p(m,d,g){let y=m.children,x=-1,T=[],E=d.enter("tableRow");for(;++x<y.length;)T[x]=c(y[x],m,d,g);return E(),T}function h(m,d,g){let y=mo.inlineCode(m,d,g);return g.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}o(dx,"gfmTableToMarkdown");function gx(){return{exit:{taskListCheckValueChecked:BD,taskListCheckValueUnchecked:BD,paragraph:OB}}}o(gx,"gfmTaskListItemFromMarkdown");function yx(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:MB}}}o(yx,"gfmTaskListItemToMarkdown");function BD(t){let e=this.stack[this.stack.length-2];e.type,e.checked=t.type==="taskListCheckValueChecked"}o(BD,"exitCheck");function OB(t){let e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked=="boolean"){let r=this.stack[this.stack.length-1];r.type;let n=r.children[0];if(n&&n.type==="text"){let i=e.children,s=-1,a;for(;++s<i.length;){let l=i[s];if(l.type==="paragraph"){a=l;break}}a===r&&(n.value=n.value.slice(1),n.value.length===0?r.children.shift():r.position&&n.position&&typeof n.position.start.offset=="number"&&(n.position.start.column++,n.position.start.offset++,r.position.start=Object.assign({},n.position.start)))}}this.exit(t)}o(OB,"exitParagraphWithTaskListItem");function MB(t,e,r,n){let i=t.children[0],s=typeof t.checked=="boolean"&&i&&i.type==="paragraph",a="["+(t.checked?"x":" ")+"] ",l=r.createTracker(n);s&&l.move(a);let c=mo.listItem(t,e,r,{...n,...l.current()});return s&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),c;function u(f){return f+a}o(u,"check")}o(MB,"listItemWithTaskListItem");function xx(){return[ax(),cx(),fx(),mx(),gx()]}o(xx,"gfmFromMarkdown");function bx(t){return{extensions:[lx(),ux(t),px(),dx(t),yx()]}}o(bx,"gfmToMarkdown");var IB={tokenize:RB,partial:!0},jD={tokenize:AB,partial:!0},zD={tokenize:FB,partial:!0},WD={tokenize:$B,partial:!0},NB={tokenize:BB,partial:!0},HD={name:"wwwAutolink",tokenize:LB,previous:qD},UD={name:"protocolAutolink",tokenize:_B,previous:YD},_n={name:"emailAutolink",tokenize:PB,previous:VD},mn={};function Sx(){return{text:mn}}o(Sx,"gfmAutolinkLiteral");for(var wo=48;wo<123;)mn[wo]=_n,wo++,wo===58?wo=65:wo===91&&(wo=97);mn[43]=_n,mn[45]=_n,mn[46]=_n,mn[95]=_n,mn[72]=[_n,UD],mn[104]=[_n,UD],mn[87]=[_n,HD],mn[119]=[_n,HD];function PB(t,e,r){let n=this,i,s;return a;function a(p){return!wx(p)||!VD.call(n,n.previous)||vx(n.events)?r(p):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),l(p))}function l(p){return wx(p)?(t.consume(p),l):p===64?(t.consume(p),c):r(p)}function c(p){return p===46?t.check(NB,f,u)(p):p===45||p===95||He(p)?(s=!0,t.consume(p),c):f(p)}function u(p){return t.consume(p),i=!0,c}function f(p){return s&&i&&nt(n.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(p)):r(p)}}o(PB,"tokenizeEmailAutolink");function LB(t,e,r){let n=this;return i;function i(a){return a!==87&&a!==119||!qD.call(n,n.previous)||vx(n.events)?r(a):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(IB,t.attempt(jD,t.attempt(zD,s),r),r)(a))}function s(a){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(a)}}o(LB,"tokenizeWwwAutolink");function _B(t,e,r){let n=this,i="",s=!1;return a;function a(p){return(p===72||p===104)&&YD.call(n,n.previous)&&!vx(n.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),i+=String.fromCodePoint(p),t.consume(p),l):r(p)}function l(p){if(nt(p)&&i.length<5)return i+=String.fromCodePoint(p),t.consume(p),l;if(p===58){let h=i.toLowerCase();if(h==="http"||h==="https")return t.consume(p),c}return r(p)}function c(p){return p===47?(t.consume(p),s?u:(s=!0,c)):r(p)}function u(p){return p===null||ao(p)||ye(p)||fn(p)||lo(p)?r(p):t.attempt(jD,t.attempt(zD,f),r)(p)}function f(p){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(p)}}o(_B,"tokenizeProtocolAutolink");function RB(t,e,r){let n=0;return i;function i(a){return(a===87||a===119)&&n<3?(n++,t.consume(a),i):a===46&&n===3?(t.consume(a),s):r(a)}function s(a){return a===null?r(a):e(a)}}o(RB,"tokenizeWwwPrefix");function AB(t,e,r){let n,i,s;return a;function a(u){return u===46||u===95?t.check(WD,c,l)(u):u===null||ye(u)||fn(u)||u!==45&&lo(u)?c(u):(s=!0,t.consume(u),a)}function l(u){return u===95?n=!0:(i=n,n=void 0),t.consume(u),a}function c(u){return i||n||!s?r(u):e(u)}}o(AB,"tokenizeDomain");function FB(t,e){let r=0,n=0;return i;function i(a){return a===40?(r++,t.consume(a),i):a===41&&n<r?s(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?t.check(WD,e,s)(a):a===null||ye(a)||fn(a)?e(a):(t.consume(a),i)}function s(a){return a===41&&n++,t.consume(a),i}}o(FB,"tokenizePath");function $B(t,e,r){return n;function n(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(t.consume(l),n):l===38?(t.consume(l),s):l===93?(t.consume(l),i):l===60||l===null||ye(l)||fn(l)?e(l):r(l)}function i(l){return l===null||l===40||l===91||ye(l)||fn(l)?e(l):n(l)}function s(l){return nt(l)?a(l):r(l)}function a(l){return l===59?(t.consume(l),n):nt(l)?(t.consume(l),a):r(l)}}o($B,"tokenizeTrail");function BB(t,e,r){return n;function n(s){return t.consume(s),i}function i(s){return He(s)?r(s):e(s)}}o(BB,"tokenizeEmailDomainDotTrail");function qD(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||ye(t)}o(qD,"previousWww");function YD(t){return!nt(t)}o(YD,"previousProtocol");function VD(t){return!(t===47||wx(t))}o(VD,"previousEmail");function wx(t){return t===43||t===45||t===46||t===95||He(t)}o(wx,"gfmAtext");function vx(t){let e=t.length,r=!1;for(;e--;){let n=t[e][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){r=!0;break}if(n._gfmAutolinkLiteralWalkedInto){r=!1;break}}return t.length>0&&!r&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}o(vx,"previousUnbalanced");function Tx(){return{exit:{literalAutolinkEmail:zB,literalAutolinkHttp:WB,literalAutolinkWww:jB}}}o(Tx,"gfmAutolinkLiteralHtml");function jB(t){kx.call(this,t,"http://")}o(jB,"literalAutolinkWww");function zB(t){kx.call(this,t,"mailto:")}o(zB,"literalAutolinkEmail");function WB(t){kx.call(this,t)}o(WB,"literalAutolinkHttp");function kx(t,e){let r=this.sliceSerialize(t);this.tag('<a href="'+pn((e||"")+r)+'">'),this.raw(this.encode(r)),this.tag("</a>")}o(kx,"anchorFromToken");var HB={tokenize:JB,partial:!0};function Ex(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:VB,continuation:{tokenize:KB},exit:GB}},text:{91:{name:"gfmFootnoteCall",tokenize:YB},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:UB,resolveTo:qB}}}}o(Ex,"gfmFootnote");function UB(t,e,r){let n=this,i=n.events.length,s=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),a;for(;i--;){let c=n.events[i][1];if(c.type==="labelImage"){a=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return l;function l(c){if(!a||!a._balanced)return r(c);let u=qe(n.sliceSerialize({start:a.end,end:n.now()}));return u.codePointAt(0)!==94||!s.includes(u.slice(1))?r(c):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(c),t.exit("gfmFootnoteCallLabelMarker"),e(c))}}o(UB,"tokenizePotentialGfmFootnoteCall");function qB(t,e){let r=t.length,n;for(;r--;)if(t[r][1].type==="labelImage"&&t[r][0]==="enter"){n=t[r][1];break}t[r+1][1].type="data",t[r+3][1].type="gfmFootnoteCallLabelMarker";let i={type:"gfmFootnoteCall",start:Object.assign({},t[r+3][1].start),end:Object.assign({},t[t.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},t[r+3][1].end),end:Object.assign({},t[r+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;let a={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},t[t.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},c=[t[r+1],t[r+2],["enter",i,e],t[r+3],t[r+4],["enter",s,e],["exit",s,e],["enter",a,e],["enter",l,e],["exit",l,e],["exit",a,e],t[t.length-2],t[t.length-1],["exit",i,e]];return t.splice(r,t.length-r+1,...c),t}o(qB,"resolveToPotentialGfmFootnoteCall");function YB(t,e,r){let n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),s=0,a;return l;function l(p){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(p),t.exit("gfmFootnoteCallLabelMarker"),c}function c(p){return p!==94?r(p):(t.enter("gfmFootnoteCallMarker"),t.consume(p),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",u)}function u(p){if(s>999||p===93&&!a||p===null||p===91||ye(p))return r(p);if(p===93){t.exit("chunkString");let h=t.exit("gfmFootnoteCallString");return i.includes(qe(n.sliceSerialize(h)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(p),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):r(p)}return ye(p)||(a=!0),s++,t.consume(p),p===92?f:u}function f(p){return p===91||p===92||p===93?(t.consume(p),s++,u):u(p)}}o(YB,"tokenizeGfmFootnoteCall");function VB(t,e,r){let n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),s,a=0,l;return c;function c(d){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(d),t.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(d){return d===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(d),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",f):r(d)}function f(d){if(a>999||d===93&&!l||d===null||d===91||ye(d))return r(d);if(d===93){t.exit("chunkString");let g=t.exit("gfmFootnoteDefinitionLabelString");return s=qe(n.sliceSerialize(g)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(d),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),h}return ye(d)||(l=!0),a++,t.consume(d),d===92?p:f}function p(d){return d===91||d===92||d===93?(t.consume(d),a++,f):f(d)}function h(d){return d===58?(t.enter("definitionMarker"),t.consume(d),t.exit("definitionMarker"),i.includes(s)||i.push(s),ne(t,m,"gfmFootnoteDefinitionWhitespace")):r(d)}function m(d){return e(d)}}o(VB,"tokenizeDefinitionStart");function KB(t,e,r){return t.check(hn,e,t.attempt(HB,e,r))}o(KB,"tokenizeDefinitionContinuation");function GB(t){t.exit("gfmFootnoteDefinition")}o(GB,"gfmFootnoteDefinitionEnd");function JB(t,e,r){let n=this;return ne(t,i,"gfmFootnoteDefinitionIndent",5);function i(s){let a=n.events[n.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?e(s):r(s)}}o(JB,"tokenizeIndent");var QB={}.hasOwnProperty,XB={};function KD(t,e){return"Back to reference "+(t+1)+(e>1?"-"+e:"")}o(KD,"defaultBackLabel");function Dx(t){let e=t||XB,r=e.label||"Footnotes",n=e.labelTagName||"h2",i=e.labelAttributes===null||e.labelAttributes===void 0?'class="sr-only"':e.labelAttributes,s=e.backLabel||KD,a=e.clobberPrefix===null||e.clobberPrefix===void 0?"user-content-":e.clobberPrefix;return{enter:{gfmFootnoteDefinition(){this.getData("tightStack").push(!1)},gfmFootnoteDefinitionLabelString(){this.buffer()},gfmFootnoteCallString(){this.buffer()}},exit:{gfmFootnoteDefinition(){let l=this.getData("gfmFootnoteDefinitions"),c=this.getData("gfmFootnoteDefinitionStack"),u=this.getData("tightStack"),f=c.pop(),p=this.resume();l||this.setData("gfmFootnoteDefinitions",l={}),QB.call(l,f)||(l[f]=p),u.pop(),this.setData("slurpOneLineEnding",!0),this.setData("lastWasTag")},gfmFootnoteDefinitionLabelString(l){let c=this.getData("gfmFootnoteDefinitionStack");c||this.setData("gfmFootnoteDefinitionStack",c=[]),c.push(qe(this.sliceSerialize(l))),this.resume(),this.buffer()},gfmFootnoteCallString(l){let c=this.getData("gfmFootnoteCallOrder"),u=this.getData("gfmFootnoteCallCounts"),f=qe(this.sliceSerialize(l)),p;this.resume(),c||this.setData("gfmFootnoteCallOrder",c=[]),u||this.setData("gfmFootnoteCallCounts",u={});let h=c.indexOf(f),m=pn(f.toLowerCase());h===-1?(c.push(f),u[f]=1,p=c.length):(u[f]++,p=h+1);let d=u[f];this.tag('<sup><a href="#'+a+"fn-"+m+'" id="'+a+"fnref-"+m+(d>1?"-"+d:"")+'" data-footnote-ref="" aria-describedby="footnote-label">'+String(p)+"</a></sup>")},null(){let l=this.getData("gfmFootnoteCallOrder")||[],c=this.getData("gfmFootnoteCallCounts")||{},u=this.getData("gfmFootnoteDefinitions")||{},f=-1;for(l.length>0&&(this.lineEndingIfNeeded(),this.tag('<section data-footnotes="" class="footnotes"><'+n+' id="footnote-label"'+(i?" "+i:"")+">"),this.raw(this.encode(r)),this.tag("</"+n+">"),this.lineEndingIfNeeded(),this.tag("<ol>"));++f<l.length;){let p=l[f],h=pn(p.toLowerCase()),m=0,d=[];for(;++m<=c[p];)d.push('<a href="#'+a+"fnref-"+h+(m>1?"-"+m:"")+'" data-footnote-backref="" aria-label="'+this.encode(typeof s=="string"?s:s(f,m))+'" class="data-footnote-backref">\u21A9'+(m>1?"<sup>"+m+"</sup>":"")+"</a>");let g=d.join(" "),y=!1;this.lineEndingIfNeeded(),this.tag('<li id="'+a+"fn-"+h+'">'),this.lineEndingIfNeeded(),this.tag(u[p].replace(/<\/p>(?:\r?\n|\r)?$/,function(x){return y=!0," "+g+x})),y||(this.lineEndingIfNeeded(),this.tag(g)),this.lineEndingIfNeeded(),this.tag("</li>")}l.length>0&&(this.lineEndingIfNeeded(),this.tag("</ol>"),this.lineEndingIfNeeded(),this.tag("</section>"))}}}}o(Dx,"gfmFootnoteHtml");function Cx(){return{enter:{strikethrough(){this.tag("<del>")}},exit:{strikethrough(){this.tag("</del>")}}}}o(Cx,"gfmStrikethroughHtml");function Ox(t){let r=(t||{}).singleTilde,n={name:"strikethrough",tokenize:s,resolveAll:i};return r==null&&(r=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function i(a,l){let c=-1;for(;++c<a.length;)if(a[c][0]==="enter"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._close){let u=c;for(;u--;)if(a[u][0]==="exit"&&a[u][1].type==="strikethroughSequenceTemporary"&&a[u][1]._open&&a[c][1].end.offset-a[c][1].start.offset===a[u][1].end.offset-a[u][1].start.offset){a[c][1].type="strikethroughSequence",a[u][1].type="strikethroughSequence";let f={type:"strikethrough",start:Object.assign({},a[u][1].start),end:Object.assign({},a[c][1].end)},p={type:"strikethroughText",start:Object.assign({},a[u][1].end),end:Object.assign({},a[c][1].start)},h=[["enter",f,l],["enter",a[u][1],l],["exit",a[u][1],l],["enter",p,l]],m=l.parser.constructs.insideSpan.null;m&&Ke(h,h.length,0,yi(m,a.slice(u+1,c),l)),Ke(h,h.length,0,[["exit",p,l],["enter",a[c][1],l],["exit",a[c][1],l],["exit",f,l]]),Ke(a,u-1,c-u+3,h),c=u+h.length-2;break}}for(c=-1;++c<a.length;)a[c][1].type==="strikethroughSequenceTemporary"&&(a[c][1].type="data");return a}o(i,"resolveAllStrikethrough");function s(a,l,c){let u=this.previous,f=this.events,p=0;return h;function h(d){return u===126&&f[f.length-1][1].type!=="characterEscape"?c(d):(a.enter("strikethroughSequenceTemporary"),m(d))}function m(d){let g=Ln(u);if(d===126)return p>1?c(d):(a.consume(d),p++,m);if(p<2&&!r)return c(d);let y=a.exit("strikethroughSequenceTemporary"),x=Ln(d);return y._open=!x||x===2&&!!g,y._close=!g||g===2&&!!x,l(d)}}o(s,"tokenizeStrikethrough")}o(Ox,"gfmStrikethrough");var Mx={none:"",left:' align="left"',right:' align="right"',center:' align="center"'};function Ix(){return{enter:{table(t){let e=t._align;this.lineEndingIfNeeded(),this.tag("<table>"),this.setData("tableAlign",e)},tableBody(){this.tag("<tbody>")},tableData(){let t=this.getData("tableAlign"),e=this.getData("tableColumn"),r=Mx[t[e]];r===void 0?this.buffer():(this.lineEndingIfNeeded(),this.tag("<td"+r+">"))},tableHead(){this.lineEndingIfNeeded(),this.tag("<thead>")},tableHeader(){let t=this.getData("tableAlign"),e=this.getData("tableColumn"),r=Mx[t[e]];this.lineEndingIfNeeded(),this.tag("<th"+r+">")},tableRow(){this.setData("tableColumn",0),this.lineEndingIfNeeded(),this.tag("<tr>")}},exit:{codeTextData(t){let e=this.sliceSerialize(t);this.getData("tableAlign")&&(e=e.replace(/\\([\\|])/g,ZB)),this.raw(this.encode(e))},table(){this.setData("tableAlign"),this.setData("slurpAllLineEndings"),this.lineEndingIfNeeded(),this.tag("</table>")},tableBody(){this.lineEndingIfNeeded(),this.tag("</tbody>")},tableData(){let t=this.getData("tableAlign"),e=this.getData("tableColumn");e in t?(this.tag("</td>"),this.setData("tableColumn",e+1)):this.resume()},tableHead(){this.lineEndingIfNeeded(),this.tag("</thead>")},tableHeader(){let t=this.getData("tableColumn");this.tag("</th>"),this.setData("tableColumn",t+1)},tableRow(){let t=this.getData("tableAlign"),e=this.getData("tableColumn");for(;e<t.length;)this.lineEndingIfNeeded(),this.tag("<td"+Mx[t[e]]+"></td>"),e++;this.setData("tableColumn",e),this.lineEndingIfNeeded(),this.tag("</tr>")}}}}o(Ix,"gfmTableHtml");function ZB(t,e){return e==="|"?e:t}o(ZB,"replace");var Gh=class{static{o(this,"EditMap")}constructor(){this.map=[]}add(e,r,n){ej(this,e,r,n)}consume(e){if(this.map.sort(function(s,a){return s[0]-a[0]}),this.map.length===0)return;let r=this.map.length,n=[];for(;r>0;)r-=1,n.push(e.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),e.length=this.map[r][0];n.push(e.slice()),e.length=0;let i=n.pop();for(;i;){for(let s of i)e.push(s);i=n.pop()}this.map.length=0}};function ej(t,e,r,n){let i=0;if(!(r===0&&n.length===0)){for(;i<t.map.length;){if(t.map[i][0]===e){t.map[i][1]+=r,t.map[i][2].push(...n);return}i+=1}t.map.push([e,r,n])}}o(ej,"addImplementation");function GD(t,e){let r=!1,n=[];for(;e<t.length;){let i=t[e];if(r){if(i[0]==="enter")i[1].type==="tableContent"&&n.push(t[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(t[e-1][1].type==="tableDelimiterMarker"){let s=n.length-1;n[s]=n[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(r=!0);e+=1}return n}o(GD,"gfmTableAlign");function Nx(){return{flow:{null:{name:"table",tokenize:tj,resolveAll:rj}}}}o(Nx,"gfmTable");function tj(t,e,r){let n=this,i=0,s=0,a;return l;function l(C){let le=n.events.length-1;for(;le>-1;){let R=n.events[le][1].type;if(R==="lineEnding"||R==="linePrefix")le--;else break}let j=le>-1?n.events[le][1].type:null,N=j==="tableHead"||j==="tableRow"?D:c;return N===D&&n.parser.lazy[n.now().line]?r(C):N(C)}function c(C){return t.enter("tableHead"),t.enter("tableRow"),u(C)}function u(C){return C===124||(a=!0,s+=1),f(C)}function f(C){return C===null?r(C):V(C)?s>1?(s=0,n.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(C),t.exit("lineEnding"),m):r(C):Z(C)?ne(t,f,"whitespace")(C):(s+=1,a&&(a=!1,i+=1),C===124?(t.enter("tableCellDivider"),t.consume(C),t.exit("tableCellDivider"),a=!0,f):(t.enter("data"),p(C)))}function p(C){return C===null||C===124||ye(C)?(t.exit("data"),f(C)):(t.consume(C),C===92?h:p)}function h(C){return C===92||C===124?(t.consume(C),p):p(C)}function m(C){return n.interrupt=!1,n.parser.lazy[n.now().line]?r(C):(t.enter("tableDelimiterRow"),a=!1,Z(C)?ne(t,d,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):d(C))}function d(C){return C===45||C===58?y(C):C===124?(a=!0,t.enter("tableCellDivider"),t.consume(C),t.exit("tableCellDivider"),g):P(C)}function g(C){return Z(C)?ne(t,y,"whitespace")(C):y(C)}function y(C){return C===58?(s+=1,a=!0,t.enter("tableDelimiterMarker"),t.consume(C),t.exit("tableDelimiterMarker"),x):C===45?(s+=1,x(C)):C===null||V(C)?L(C):P(C)}function x(C){return C===45?(t.enter("tableDelimiterFiller"),T(C)):P(C)}function T(C){return C===45?(t.consume(C),T):C===58?(a=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(C),t.exit("tableDelimiterMarker"),E):(t.exit("tableDelimiterFiller"),E(C))}function E(C){return Z(C)?ne(t,L,"whitespace")(C):L(C)}function L(C){return C===124?d(C):C===null||V(C)?!a||i!==s?P(C):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(C)):P(C)}function P(C){return r(C)}function D(C){return t.enter("tableRow"),F(C)}function F(C){return C===124?(t.enter("tableCellDivider"),t.consume(C),t.exit("tableCellDivider"),F):C===null||V(C)?(t.exit("tableRow"),e(C)):Z(C)?ne(t,F,"whitespace")(C):(t.enter("data"),A(C))}function A(C){return C===null||C===124||ye(C)?(t.exit("data"),F(C)):(t.consume(C),C===92?W:A)}function W(C){return C===92||C===124?(t.consume(C),A):A(C)}}o(tj,"tokenizeTable");function rj(t,e){let r=-1,n=!0,i=0,s=[0,0,0,0],a=[0,0,0,0],l=!1,c=0,u,f,p,h=new Gh;for(;++r<t.length;){let m=t[r],d=m[1];m[0]==="enter"?d.type==="tableHead"?(l=!1,c!==0&&(JD(h,e,c,u,f),f=void 0,c=0),u={type:"table",start:Object.assign({},d.start),end:Object.assign({},d.end)},h.add(r,0,[["enter",u,e]])):d.type==="tableRow"||d.type==="tableDelimiterRow"?(n=!0,p=void 0,s=[0,0,0,0],a=[0,r+1,0,0],l&&(l=!1,f={type:"tableBody",start:Object.assign({},d.start),end:Object.assign({},d.end)},h.add(r,0,[["enter",f,e]])),i=d.type==="tableDelimiterRow"?2:f?3:1):i&&(d.type==="data"||d.type==="tableDelimiterMarker"||d.type==="tableDelimiterFiller")?(n=!1,a[2]===0&&(s[1]!==0&&(a[0]=a[1],p=Jh(h,e,s,i,void 0,p),s=[0,0,0,0]),a[2]=r)):d.type==="tableCellDivider"&&(n?n=!1:(s[1]!==0&&(a[0]=a[1],p=Jh(h,e,s,i,void 0,p)),s=a,a=[s[1],r,0,0])):d.type==="tableHead"?(l=!0,c=r):d.type==="tableRow"||d.type==="tableDelimiterRow"?(c=r,s[1]!==0?(a[0]=a[1],p=Jh(h,e,s,i,r,p)):a[1]!==0&&(p=Jh(h,e,a,i,r,p)),i=0):i&&(d.type==="data"||d.type==="tableDelimiterMarker"||d.type==="tableDelimiterFiller")&&(a[3]=r)}for(c!==0&&JD(h,e,c,u,f),h.consume(e.events),r=-1;++r<e.events.length;){let m=e.events[r];m[0]==="enter"&&m[1].type==="table"&&(m[1]._align=GD(e.events,r))}return t}o(rj,"resolveTable");function Jh(t,e,r,n,i,s){let a=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",l="tableContent";r[0]!==0&&(s.end=Object.assign({},ca(e.events,r[0])),t.add(r[0],0,[["exit",s,e]]));let c=ca(e.events,r[1]);if(s={type:a,start:Object.assign({},c),end:Object.assign({},c)},t.add(r[1],0,[["enter",s,e]]),r[2]!==0){let u=ca(e.events,r[2]),f=ca(e.events,r[3]),p={type:l,start:Object.assign({},u),end:Object.assign({},f)};if(t.add(r[2],0,[["enter",p,e]]),n!==2){let h=e.events[r[2]],m=e.events[r[3]];if(h[1].end=Object.assign({},m[1].end),h[1].type="chunkText",h[1].contentType="text",r[3]>r[2]+1){let d=r[2]+1,g=r[3]-r[2]-1;t.add(d,g,[])}}t.add(r[3]+1,0,[["exit",p,e]])}return i!==void 0&&(s.end=Object.assign({},ca(e.events,i)),t.add(i,0,[["exit",s,e]]),s=void 0),s}o(Jh,"flushCell");function JD(t,e,r,n,i){let s=[],a=ca(e.events,r);i&&(i.end=Object.assign({},a),s.push(["exit",i,e])),n.end=Object.assign({},a),s.push(["exit",n,e]),t.add(r+1,0,s)}o(JD,"flushTableEnd");function ca(t,e){let r=t[e],n=r[0]==="enter"?"start":"end";return r[1][n]}o(ca,"getPoint");var QD=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|title|textarea|xmp)(?=[\t\n\f\r />])/gi,nj=new RegExp("^"+QD.source,"i");function Px(){return{exit:{htmlFlowData(t){XD.call(this,t,QD)},htmlTextData(t){XD.call(this,t,nj)}}}}o(Px,"gfmTagfilterHtml");function XD(t,e){let r=this.sliceSerialize(t);this.options.allowDangerousHtml&&(r=r.replace(e,"&lt;$1$2")),this.raw(this.encode(r))}o(XD,"exitHtmlData");function Lx(){return{enter:{taskListCheck(){this.tag('<input type="checkbox" disabled="" ')}},exit:{taskListCheck(){this.tag("/>")},taskListCheckValueChecked(){this.tag('checked="" ')}}}}o(Lx,"gfmTaskListItemHtml");var ij={name:"tasklistCheck",tokenize:oj};function _x(){return{text:{91:ij}}}o(_x,"gfmTaskListItem");function oj(t,e,r){let n=this;return i;function i(c){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?r(c):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(c),t.exit("taskListCheckMarker"),s)}function s(c){return ye(c)?(t.enter("taskListCheckValueUnchecked"),t.consume(c),t.exit("taskListCheckValueUnchecked"),a):c===88||c===120?(t.enter("taskListCheckValueChecked"),t.consume(c),t.exit("taskListCheckValueChecked"),a):r(c)}function a(c){return c===93?(t.enter("taskListCheckMarker"),t.consume(c),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),l):r(c)}function l(c){return V(c)?e(c):Z(c)?t.check({tokenize:sj},e,r)(c):r(c)}}o(oj,"tokenizeTasklistCheck");function sj(t,e,r){return ne(t,n,"whitespace");function n(i){return i===null?r(i):e(i)}}o(sj,"spaceThenNonSpace");function ZD(t){return $h([Sx(),Ex(),Ox(t),Nx(),_x()])}o(ZD,"gfm");function U9e(t){return Bh([Tx(),Dx(t),Cx(),Ix(),Px(),Lx()])}o(U9e,"gfmHtml");var aj={};function ua(t){let e=this,r=t||aj,n=e.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),s=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),a=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(ZD(r)),s.push(xx()),a.push(bx(r))}o(ua,"remarkGfm");var tC=zr(eC(),1),lc=Object.assign(vo(Error),{eval:vo(EvalError),range:vo(RangeError),reference:vo(ReferenceError),syntax:vo(SyntaxError),type:vo(TypeError),uri:vo(URIError)});function vo(t){return e.displayName=t.displayName||t.name,e;function e(r,...n){let i=r&&(0,tC.default)(r,...n);return new t(i)}o(e,"FormattedError")}o(vo,"create");var Qh={}.hasOwnProperty,rC={yaml:"-",toml:"+"};function fa(t){let e=[],r=-1,n=Array.isArray(t)?t:t?[t]:["yaml"];for(;++r<n.length;)e[r]=lj(n[r]);return e}o(fa,"toMatters");function lj(t){let e=t;if(typeof e=="string"){if(!Qh.call(rC,e))throw lc("Missing matter definition for `%s`",e);e={type:e,marker:rC[e]}}else if(typeof e!="object")throw lc("Expected matter to be an object, not `%j`",e);if(!Qh.call(e,"type"))throw lc("Missing `type` in matter `%j`",e);if(!Qh.call(e,"fence")&&!Qh.call(e,"marker"))throw lc("Missing `marker` or `fence` in matter `%j`",e);return e}o(lj,"matter");function Fx(t){let e=fa(t),r={},n=-1;for(;++n<e.length;){let i=e[n],s=Ax(i,"open").charCodeAt(0),a=cj(i),l=r[s];Array.isArray(l)?l.push(a):r[s]=[a]}return{flow:r}}o(Fx,"frontmatter");function cj(t){let e=t.anywhere,r=t.type,n=r+"Fence",i=n+"Sequence",s=r+"Value",a={tokenize:f,partial:!0},l,c=0;return{tokenize:u,concrete:!0};function u(p,h,m){let d=this;return g;function g(F){let A=d.now();return A.column===1&&(A.line===1||e)&&(l=Ax(t,"open"),c=0,F===l.charCodeAt(c))?(p.enter(r),p.enter(n),p.enter(i),y(F)):m(F)}function y(F){return c===l.length?(p.exit(i),Z(F)?(p.enter("whitespace"),x(F)):T(F)):F===l.charCodeAt(c++)?(p.consume(F),y):m(F)}function x(F){return Z(F)?(p.consume(F),x):(p.exit("whitespace"),T(F))}function T(F){return V(F)?(p.exit(n),p.enter("lineEnding"),p.consume(F),p.exit("lineEnding"),l=Ax(t,"close"),c=0,p.attempt(a,D,E)):m(F)}function E(F){return F===null||V(F)?P(F):(p.enter(s),L(F))}function L(F){return F===null||V(F)?(p.exit(s),P(F)):(p.consume(F),L)}function P(F){return F===null?m(F):(p.enter("lineEnding"),p.consume(F),p.exit("lineEnding"),p.attempt(a,D,E))}function D(F){return p.exit(r),h(F)}}function f(p,h,m){let d=0;return g;function g(E){return E===l.charCodeAt(d)?(p.enter(n),p.enter(i),y(E)):m(E)}function y(E){return d===l.length?(p.exit(i),Z(E)?(p.enter("whitespace"),x(E)):T(E)):E===l.charCodeAt(d++)?(p.consume(E),y):m(E)}function x(E){return Z(E)?(p.consume(E),x):(p.exit("whitespace"),T(E))}function T(E){return E===null||V(E)?(p.exit(n),h(E)):m(E)}}}o(cj,"createConstruct");function Ax(t,e){return t.marker?nC(t.marker,e).repeat(3):nC(t.fence,e)}o(Ax,"fence");function nC(t,e){return typeof t=="string"?t:t[e]}o(nC,"pick");function Bx(t){let e=fa(t),r={},n={},i=-1;for(;++i<e.length;){let s=e[i];r[s.type]=uj(s),n[s.type]=fj,n[s.type+"Value"]=pj}return{enter:r,exit:n}}o(Bx,"frontmatterFromMarkdown");function uj(t){return e;function e(r){this.enter({type:t.type,value:""},r),this.buffer()}}o(uj,"opener");function fj(t){let e=this.resume(),r=this.stack[this.stack.length-1];"value"in r,this.exit(t),r.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,"")}o(fj,"close");function pj(t){this.config.enter.data.call(this,t),this.config.exit.data.call(this,t)}o(pj,"value");function jx(t){let e=[],r={},n=fa(t),i=-1;for(;++i<n.length;){let s=n[i];r[s.type]=hj(s);let a=$x(s,"open");e.push({atBreak:!0,character:a.charAt(0),after:Ci(a.charAt(1))})}return{unsafe:e,handlers:r}}o(jx,"frontmatterToMarkdown");function hj(t){let e=$x(t,"open"),r=$x(t,"close");return n;function n(i){return e+(i.value?`
280
280
  `+i.value:"")+`
281
- `+r}}o(JB,"handler");function _x(t,e){return t.marker?JD(t.marker,e).repeat(3):JD(t.fence,e)}o(_x,"fence");function JD(t,e){return typeof t=="string"?t:t[e]}o(JD,"pick");var QB="yaml";function fa(t){let e=this,r=t||QB,n=e.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),s=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),a=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(Px(r)),s.push(Lx(r)),a.push(Rx(r))}o(fa,"remarkFrontmatter");var Ax=o(()=>Jl().use(aa).use(ca).use(fa,["yaml","toml"]),"createMarkdownProcessor"),QD=o(t=>{if(typeof t!="string")throw new TypeError("Markdown source must be a string.");return Ax().parse(t)},"parseMarkdown");var ZB=o(t=>t.type==="yaml"&&"value"in t&&typeof t.value=="string","isYamlNode"),Vh=class t{static{o(this,"MdParsedResult")}constructor(){this.originalString="",this.title="",this.html="",this.frontmatterData={}}static async createFromMarkdownString(e){let r=new t;return await r.updateFromMarkdownString(e),r}async updateFromMarkdownString(e){this.originalString=e;let r,n=await Ax().use(ia).use(Zs).use(()=>i=>{let s=i.children.find(ZB);s&&(r=s.value)}).process(e);this.html=n.toString(),r?this.frontmatterData=await Rl.yamlStringToObject(r):this.frontmatterData={}}};var Fx=class t{static{o(this,"SmartMarkdown")}static async easyMarkdownToHtml(e){return(await new t().getMdParsedResultFromMarkdown(e)).html}constructor(){}async getMdParsedResultFromMarkdown(e){return await Vh.createFromMarkdownString(e)}htmlToMarkdown(e){let r=new gi({headingStyle:"atx",codeBlockStyle:"fenced"});return r.use(Dy.gfm),r.turndown(e)}};var ko={};se(ko,{SmartRouter:()=>Ux});var Hx=zr(iC(),1);var Gh=class{static{o(this,"QueryParams")}constructor(){}getAllAsObject(){let e=new URLSearchParams(window.location.search);return Object.fromEntries(e.entries())}setQueryParam(e,r,n="replace"){var i=new URLSearchParams(window.location.search);i.set(e,r),n==="push"?history.pushState(null,null,"?"+i.toString()):history.replaceState(null,null,"?"+i.toString())}deleteQueryParam(e,r="replace"){var n=new URLSearchParams(window.location.search);n.delete(e),r==="push"?history.pushState(null,null,"?"+n.toString()):history.replaceState(null,null,"?"+n.toString())}getQueryParam(e){return this.getAllAsObject()[e]}};var y5e=o(t=>{console.log(`%c[Router]%c ${t}`,"color: rgb(255, 105, 100);","color: inherit")},"routeLog"),Ux=class t{static{o(this,"SmartRouter")}constructor(e,r=""){this.options={debug:!1},this.queryParams=new Gh,this.routes=[],this.options={...this.options,...e},this.basePath=r,this.popstateListener=n=>{n.preventDefault(),this._handleRouteState()},window.addEventListener("popstate",this.popstateListener)}createSubRouter(e,r){let n=`${this.basePath}${e}`;return new t({...this.options,...r},n)}async pushUrl(e="/",r={}){let n=`${this.basePath}${e}`;n!==window.location.pathname?window.history.pushState(r,window.document.title,n):window.history.replaceState(r,window.document.title,n),await this._handleRouteState()}on(e,r){let n=`${this.basePath}${e}`,i={matchFunction:Hx.match(n),handler:r};return this.routes.push(i),o(()=>{this.routes.splice(this.routes.indexOf(i),1)},"removeFunction")}async _handleRouteState(){let e=window.location.pathname,r=this.routes.filter(n=>!!n.matchFunction(e));for(let n of r){let i=n.matchFunction(e);n.handler({...i.valueOf(),queryParams:this.queryParams.getAllAsObject()})}}destroy(){window.removeEventListener("popstate",this.popstateListener),this.routes=[]}};var To={};se(To,{Smartstate:()=>Kx,StateAction:()=>lc,StatePart:()=>cc,StateProcess:()=>ha,attachContextProvider:()=>kj,computed:()=>Vx});var ac={};se(ac,{createSha256Hasher:()=>pa,md5FromString:()=>bj,sha256FromBuffer:()=>dj,sha256FromFile:()=>xj,sha256FromStream:()=>yj,sha256FromString:()=>aC,sha256FromStringSync:()=>mj,sha265FromObject:()=>gj});var fj=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),pj=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),mn=o((t,e)=>t>>>e|t<<32-e,"rotateRight"),hj=o(t=>t instanceof Uint8Array?t:new Uint8Array(t),"asBytes"),qx=class{static{o(this,"BrowserSha256Hasher")}constructor(){this.state=new Uint32Array(pj),this.block=new Uint8Array(64),this.words=new Uint32Array(64),this.blockLength=0,this.totalBytesHigh=0,this.totalBytesLow=0,this.finalized=!1}update(e){if(this.finalized)throw new Error("SHA-256 hasher is already finalized.");let r=hj(e);this.addByteLength(r.byteLength);let n=0;if(this.blockLength>0){let i=Math.min(64-this.blockLength,r.byteLength);this.block.set(r.subarray(0,i),this.blockLength),this.blockLength+=i,n=i,this.blockLength===64&&(this.processBlock(this.block,0),this.blockLength=0)}for(;n+64<=r.byteLength;)this.processBlock(r,n),n+=64;return n<r.byteLength&&(this.block.set(r.subarray(n),0),this.blockLength=r.byteLength-n),this}digest(){if(this.finalized)throw new Error("SHA-256 hasher is already finalized.");this.finalized=!0;let e=this.blockLength<56?64:128,r=new Uint8Array(e);r.set(this.block.subarray(0,this.blockLength)),r[this.blockLength]=128;let n=(this.totalBytesHigh<<3|this.totalBytesLow>>>29)>>>0,i=this.totalBytesLow<<3>>>0,s=new DataView(r.buffer);s.setUint32(e-8,n,!1),s.setUint32(e-4,i,!1);for(let l=0;l<e;l+=64)this.processBlock(r,l);let a="";for(let l of this.state)a+=l.toString(16).padStart(8,"0");return this.block.fill(0),this.words.fill(0),a}addByteLength(e){let r=this.totalBytesLow;this.totalBytesLow=this.totalBytesLow+e>>>0,this.totalBytesHigh=this.totalBytesHigh+Math.floor(e/4294967296)+(this.totalBytesLow<r?1:0)>>>0}processBlock(e,r){let n=this.words;for(let h=0;h<16;h++){let m=r+h*4;n[h]=(e[m]<<24|e[m+1]<<16|e[m+2]<<8|e[m+3])>>>0}for(let h=16;h<64;h++){let m=n[h-15],d=n[h-2],g=mn(m,7)^mn(m,18)^m>>>3,y=mn(d,17)^mn(d,19)^d>>>10;n[h]=n[h-16]+g+n[h-7]+y>>>0}let i=this.state[0],s=this.state[1],a=this.state[2],l=this.state[3],c=this.state[4],u=this.state[5],f=this.state[6],p=this.state[7];for(let h=0;h<64;h++){let m=mn(c,6)^mn(c,11)^mn(c,25),d=c&u^~c&f,g=p+m+d+fj[h]+n[h]>>>0,y=mn(i,2)^mn(i,13)^mn(i,22),x=i&s^i&a^s&a,T=y+x>>>0;p=f,f=u,u=c,c=l+g>>>0,l=a,a=s,s=i,i=g+T>>>0}this.state[0]=this.state[0]+i>>>0,this.state[1]=this.state[1]+s>>>0,this.state[2]=this.state[2]+a>>>0,this.state[3]=this.state[3]+l>>>0,this.state[4]=this.state[4]+c>>>0,this.state[5]=this.state[5]+u>>>0,this.state[6]=this.state[6]+f>>>0,this.state[7]=this.state[7]+p>>>0}},pa=o(()=>new qx,"createSha256Hasher");function Yx(t){return pa().update(t).digest()}o(Yx,"sha256Fallback");var oC=o(t=>{let e=[],r=new DataView(t);for(let n=0;n<r.byteLength;n+=4){let s=r.getUint32(n).toString(16),a="00000000",l=(a+s).slice(-a.length);e.push(l)}return e.join("")},"hex"),sC=o(()=>typeof crypto<"u"&&crypto.subtle!==void 0,"isCryptoSubtleAvailable"),aC=o(async t=>{let e=new TextEncoder().encode(t);if(sC()){let r=await crypto.subtle.digest("SHA-256",e);return oC(r)}else return Yx(e)},"sha256FromString"),mj=o(t=>pa().update(new TextEncoder().encode(t)).digest(),"sha256FromStringSync"),dj=o(async t=>{if(sC()){let e;if(t instanceof Uint8Array){let i=t;e=i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength)}else e=t;let r=await crypto.subtle.digest("SHA-256",e);return oC(r)}else{let e=t instanceof Uint8Array?t:new Uint8Array(t);return Yx(e)}},"sha256FromBuffer"),gj=o(async t=>{let e=tt.stringify(t);return await aC(e)},"sha265FromObject"),yj=o(async t=>{if(!t||typeof t.getReader!="function")throw new TypeError("sha256FromStream requires a readable Web stream.");let e=pa(),r=t.getReader(),n=!1;try{for(;;){let{value:i,done:s}=await r.read();if(s)return n=!0,e.digest();if(!(i instanceof Uint8Array))throw new TypeError("SHA-256 Web streams must emit Uint8Arrays.");e.update(i)}}catch(i){throw n||await r.cancel(i).catch(()=>{}),i}finally{r.releaseLock()}},"sha256FromStream"),xj=o(async t=>{throw new Error("sha256FromFile is not supported in browser environment")},"sha256FromFile"),bj=o(async t=>{throw new Error("md5FromString is not supported in browser environment. Web Crypto API does not support MD5.")},"md5FromString");var lc=class{static{o(this,"StateAction")}constructor(e,r){this.statePartRef=e,this.actionDef=r}trigger(e){return this.statePartRef.dispatchAction(this,e)}};function Sj(){return typeof document>"u"?Da(!0):new Se(t=>{t.next(!document.hidden);let e=o(()=>t.next(!document.hidden),"handler");return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)})}o(Sj,"createVisibilityObservable");var ha=class{static{o(this,"StateProcess")}constructor(e,r){this.statusSubject=new Ao("idle"),this.producerSubscription=null,this.autoPauseSubscription=null,this.processingQueue=Promise.resolve(),this.statePartRef=e,this.producerFn=r.producer,this.reducer=r.reducer,this.sideEffect=r.sideEffect,this.autoPauseOption=r.autoPause??!1}get status(){return this.statusSubject.getValue()}get status$(){return this.statusSubject.asObservable()}start(){if(this.status==="disposed")throw new Error("Cannot start a disposed process");this.status!=="running"&&(this.statusSubject.next("running"),this.subscribeProducer(),this.setupAutoPause())}pause(){if(this.status==="disposed")throw new Error("Cannot pause a disposed process");this.status==="running"&&(this.statusSubject.next("paused"),this.unsubscribeProducer())}resume(){if(this.status==="disposed")throw new Error("Cannot resume a disposed process");this.status==="paused"&&(this.statusSubject.next("running"),this.subscribeProducer())}dispose(){this.status!=="disposed"&&(this.unsubscribeProducer(),this.teardownAutoPause(),this.statusSubject.next("disposed"),this.statusSubject.complete(),this.statePartRef._removeProcess(this))}subscribeProducer(){this.unsubscribeProducer();let e=this.producerFn();this.producerSubscription=e.subscribe({next:o(r=>{this.processingQueue=this.processingQueue.then(async()=>{try{if(this.sideEffect)await this.sideEffect(r);else if(this.reducer){let n=this.statePartRef.getState();n!==void 0&&await this.statePartRef.setState(this.reducer(n,r))}}catch(n){console.error("StateProcess value handling error:",n)}})},"next"),error:o(r=>{console.error("StateProcess producer error:",r),this.status==="running"&&(this.statusSubject.next("paused"),this.unsubscribeProducer())},"error")})}unsubscribeProducer(){this.producerSubscription&&(this.producerSubscription.unsubscribe(),this.producerSubscription=null)}setupAutoPause(){if(this.teardownAutoPause(),!this.autoPauseOption)return;let e=this.autoPauseOption==="visibility"?Sj():this.autoPauseOption;this.autoPauseSubscription=e.subscribe(r=>{!r&&this.status==="running"?this.pause():r&&this.status==="paused"&&this.resume()})}teardownAutoPause(){this.autoPauseSubscription&&(this.autoPauseSubscription.unsubscribe(),this.autoPauseSubscription=null)}};var lC=o(t=>{let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null},"isPlainObject"),Jh=o((t,e)=>{let r=new WeakMap,n=new WeakMap,i=o((s,a)=>{if(Object.is(s,a))return!0;if(s===null||a===null||typeof s!="object"||typeof a!="object")return!1;if(s instanceof Date||a instanceof Date)return s instanceof Date&&a instanceof Date&&Object.is(s.getTime(),a.getTime());let l=Array.isArray(s),c=Array.isArray(a);if(l!==c||!l&&(!lC(s)||!lC(a)))return!1;let u=r.get(s);if(u)return u===a;let f=n.get(a);if(f)return f===s;if(r.set(s,a),n.set(a,s),l&&c){if(s.length!==a.length)return!1;for(let g=0;g<s.length;g++)if(!i(s[g],a[g]))return!1;return!0}let p=s,h=a,m=Object.keys(p),d=Object.keys(h);if(m.length!==d.length)return!1;for(let g of m)if(!Object.prototype.hasOwnProperty.call(h,g)||!i(p[g],h[g]))return!1;return!0},"compare");return i(t,e)},"isStateSelectionEqual");function vj(t){return new Se(e=>{if(t.aborted){e.next(),e.complete();return}let r=o(()=>{e.next(),e.complete()},"handler");return t.addEventListener("abort",r),()=>t.removeEventListener("abort",r)})}o(vj,"fromAbortSignal");var cc=class t{static{o(this,"StatePart")}static{this.MAX_NESTED_DISPATCH_DEPTH=10}constructor(e,r){this.state=new Ao(void 0),this.disposed=!1,this.cumulativeDeferred=te.cumulativeDefer(),this.mutationQueue=Promise.resolve(),this.pendingCumulativeNotification=null,this.webStore=null,this.middlewares=[],this.processes=[],this.selectorCache=new WeakMap,this.defaultSelectObservable=null,this.name=e,r&&(this.webStoreOptions=r)}async init(){if(this.webStoreOptions){this.webStore=new Er.WebStore(this.webStoreOptions),await this.webStore.init();let e=await this.webStore.get(String(this.name));e&&this.validateState(e)&&(this.stateStore=e,await this.notifyChange())}}getState(){return this.stateStore}addMiddleware(e){return this.middlewares.push(e),()=>{let r=this.middlewares.indexOf(e);r!==-1&&this.middlewares.splice(r,1)}}async setState(e){if(this.disposed)throw new Error(`StatePart '${this.name}' has been disposed`);return this.mutationQueue=this.mutationQueue.then(()=>this.applyState(e),()=>this.applyState(e))}async applyState(e){let r=e;for(let n of this.middlewares)r=await n(r,this.stateStore);if(!this.validateState(r))throw new Error(`Invalid state structure for state part '${this.name}'`);return this.webStore&&await this.webStore.set(String(this.name),r),this.stateStore=r,await this.notifyChange(),this.stateStore}validateState(e){return e!=null}async notifyChange(){let e=this.stateStore;if(e===void 0)return;if(this.smartstateRef?.isBatching){this.smartstateRef.registerPendingNotification(this);return}let r=o(async n=>await ac.sha256FromString(tt.stableOneWayStringify(n)),"createStateHash");try{let n=await r(e);if(this.lastStateNotificationPayloadHash&&n===this.lastStateNotificationPayloadHash)return;this.lastStateNotificationPayloadHash=n}catch(n){console.error(`State hash computation failed for '${this.name}':`,n)}this.state.next(e)}notifyChangeCumulative(){this.pendingCumulativeNotification&&clearTimeout(this.pendingCumulativeNotification),this.pendingCumulativeNotification=setTimeout(()=>{this.pendingCumulativeNotification=null,this.stateStore!==void 0&&this.notifyChange().catch(e=>{console.error(`notifyChangeCumulative failed for '${this.name}':`,e)})},0)}select(e,r){let n=r?.signal!=null;if(!n){if(e){if(this.selectorCache.has(e))return this.selectorCache.get(e)}else if(this.defaultSelectObservable)return this.defaultSelectObservable}let i=e||(c=>c),s=Symbol("selector-error"),a=this.state.pipe(Pe.rxjs.ops.filter(c=>c!==void 0),Pe.rxjs.ops.map(c=>{try{return i(c)}catch(u){return console.error(`Selector error in state part '${this.name}':`,u),s}}),Pe.rxjs.ops.filter(c=>c!==s),zo(Jh));if(n)return a=a.pipe(Wo(vj(r.signal))),a;let l=a.pipe(Qc({bufferSize:1,refCount:!0}));return e?this.selectorCache.set(e,l):this.defaultSelectObservable=l,l}createAction(e){return new lc(this,e)}createActionContext(e){let r=this;return{dispatch:o(async(n,i)=>{if(e>=t.MAX_NESTED_DISPATCH_DEPTH)throw new Error(`Maximum nested action dispatch depth (${t.MAX_NESTED_DISPATCH_DEPTH}) exceeded. Check for circular action dispatches.`);let s=r.createActionContext(e+1),a=await n.actionDef(r,i,s);return r.applyState(a)},"dispatch")}}async dispatchAction(e,r){if(this.disposed)throw new Error(`StatePart '${this.name}' has been disposed`);await this.cumulativeDeferred.promise;let n=o(async()=>{let i=this.createActionContext(0),s=await e.actionDef(this,r,i);return this.applyState(s)},"execute");return this.mutationQueue=this.mutationQueue.then(n,n)}async waitUntilPresent(e,r){let n,i;typeof r=="number"?n=r:r&&(n=r.timeoutMs,i=r.signal);let s=te.defer(),a=this.select(e),l=!1;if(i?.aborted)throw new Error("Aborted");let c=a.subscribe(p=>{p!=null&&!l&&(l=!0,s.resolve(p))}),u;n&&(u=setTimeout(()=>{l||(l=!0,c.unsubscribe(),s.reject(new Error(`waitUntilPresent timed out after ${n}ms`)))},n));let f=i?()=>{l||(l=!0,c.unsubscribe(),u&&clearTimeout(u),s.reject(new Error("Aborted")))}:void 0;i&&f&&i.addEventListener("abort",f);try{return await s.promise}finally{c.unsubscribe(),u&&clearTimeout(u),i&&f&&i.removeEventListener("abort",f)}}async stateSetup(e){let r=e(this);this.cumulativeDeferred.addPromise(r),await this.setState(await r)}createProcess(e){if(this.disposed)throw new Error(`StatePart '${this.name}' has been disposed`);let r=new ha(this,e);return this.processes.push(r),e.autoStart&&r.start(),r}createScheduledAction(e){if(this.disposed)throw new Error(`StatePart '${this.name}' has been disposed`);let r=new ha(this,{producer:o(()=>$m(e.intervalMs),"producer"),sideEffect:o(async()=>{await e.action.trigger(e.payload)},"sideEffect"),autoPause:e.autoPause??!1});return this.processes.push(r),r.start(),r}_removeProcess(e){let r=this.processes.indexOf(e);r!==-1&&this.processes.splice(r,1)}dispose(){if(!this.disposed){this.disposed=!0;for(let e of[...this.processes])e.dispose();this.processes.length=0,this.state.complete(),this.mutationQueue=Promise.resolve(),this.pendingCumulativeNotification&&(clearTimeout(this.pendingCumulativeNotification),this.pendingCumulativeNotification=null),this.middlewares.length=0,this.selectorCache=new WeakMap,this.defaultSelectObservable=null,this.webStore=null,this.smartstateRef=void 0,this.stateStore=void 0}}};function Vx(t,e){return Fm(t.map(r=>r.select())).pipe(Vr(r=>e(...r)),zo(Jh))}o(Vx,"computed");var Kx=class{static{o(this,"Smartstate")}constructor(){this.statePartMap={},this.pendingStatePartCreation=new Map,this.batchDepth=0,this.isFlushing=!1,this.pendingNotifications=new Set}get isBatching(){return this.batchDepth>0}registerPendingNotification(e){this.pendingNotifications.add(e)}async batch(e){this.batchDepth++;try{await e()}finally{if(this.batchDepth--,this.batchDepth===0&&!this.isFlushing){this.isFlushing=!0;try{for(;this.pendingNotifications.size>0;){let r=[...this.pendingNotifications];this.pendingNotifications.clear();for(let n of r)try{await n.notifyChange()}catch(i){console.error("Error flushing notification for state part:",i)}}}finally{this.isFlushing=!1}}}}computed(e,r){return Vx(e,r)}dispose(){for(let e of Object.keys(this.statePartMap)){let r=this.statePartMap[e];r&&r.dispose()}this.statePartMap={},this.pendingStatePartCreation.clear(),this.pendingNotifications.clear()}async getStatePart(e,r,n="soft"){let i=this.pendingStatePartCreation.get(e);if(i)return i;let s=this.statePartMap[e];if(s)switch(n){case"mandatory":throw new Error(`State part '${e}' already exists, but initMode is 'mandatory'`);case"force":s.dispose();break;default:return s}else if(r===void 0)throw new Error(`State part '${e}' does not exist and no initial state provided`);let a=this.createStatePart(e,r,n);this.pendingStatePartCreation.set(e,a);try{return await a}finally{this.pendingStatePartCreation.delete(e)}}async createStatePart(e,r,n="soft"){let i=new cc(e,n==="persistent"?{dbName:"smartstate",storeName:e}:void 0);i.smartstateRef=this,await i.init();let s=i.getState();return n==="persistent"&&s!==void 0?await i.setState({...r,...s}):await i.setState(r),this.statePartMap[e]=i,i}};function kj(t,e){let{context:r,statePart:n,selectorFn:i}=e,s=new Set,a=n.select(i).subscribe(u=>{for(let f of s)f(u)}),l=o(()=>{let u=n.getState();if(u!==void 0)return i?i(u):u},"getValue"),c=o(u=>{let f=u,p=f.detail;if(!(!p||p.context!==r))if(f.stopPropagation(),p.subscribe){let h=p.callback;s.add(h);let m=o(()=>s.delete(h),"unsubscribe");h(l(),m)}else p.callback(l())},"handler");return t.addEventListener("context-request",c),()=>{t.removeEventListener("context-request",c),a.unsubscribe(),s.clear()}}o(kj,"attachContextProvider");var Eo={};se(Eo,{Smarturl:()=>Gx});var Gx=class t{static{o(this,"Smarturl")}static createFromUrl(e,r){let n=new URL(e),i={},s=[];n.search&&n.search.replace("?","").split("&").map(u=>{s.push({key:u.split("=")[0],value:u.split("=")[1]})});for(let u of s)i[u.key]=u.value;if(r?.searchParams)for(let u of Object.keys(r.searchParams))i[u]=r.searchParams[u];let a=n.pathname||"";if(Object.keys(i).length>0){a+="?";let u=!0;for(let f of Object.keys(i))u?u=!1:a+="&",a+=`${f}=${i[f]}`}let l={...n,href:n.href,origin:n.origin,protocol:n.protocol,username:n.username,password:n.password,host:n.host,hostname:n.hostname,port:n.port,path:a,pathname:n.pathname,search:n.search,searchParams:i,hash:n.hash};!l.port&&l.protocol==="https:"&&(l.port="443"),!l.port&&l.protocol==="http:"&&(l.port="80");let c=new t;return Object.assign(c,l),c}static createFromParsedUrl(e){let r=new t;return Object.assign(r,e),r}constructor(){this.searchParams={}}clone(){let e=new t;return Object.assign(e,this),e.searchParams={...this.searchParams},e}set(e,r){return this[e]=r,this}toString(){let e="";return this.username&&!this.password&&(e=`${this.username}@`),this.username&&this.password&&(e=`${this.username}:${this.password}@`),`${this.protocol}//${e}${this.hostname}:${this.port}${this.path}`}};var ub={};se(ub,{JsonLdTag:()=>Do,MetaTag:()=>xr,OpengraphTag:()=>Nt,Title:()=>cb,WebSetup:()=>uc});var lb={};se(lb,{business:()=>Xx,code:()=>Zx,container:()=>eb,content:()=>rb,database:()=>Jx,descriptors:()=>tb,finance:()=>Qx,general:()=>nb,network:()=>Qh,saas:()=>ob,storage:()=>sb,website:()=>ab});var Xx={};var Jx={};var Qx={};var Zx={};var eb={};var tb={};var rb={};var nb={};var Qh={};se(Qh,{ICnameDescriptor:()=>ib});var ib=class{static{o(this,"ICnameDescriptor")}};var ob={};var sb={};var ab={};var ki=class{static{o(this,"Tag")}constructor(){this.tagLevel="levelbound"}appendToDom(){!this.elementRef.parentElement&&!this.elementRef.parentNode&&document.getElementsByTagName("head")[0].appendChild(this.elementRef)}removeFromDom(){this.elementRef.parentElement?this.elementRef.parentElement.removeChild(this.elementRef):this.elementRef.parentNode&&this.elementRef.parentNode.removeChild(this.elementRef)}};var Do=class t extends ki{static{o(this,"JsonLdTag")}static createCompanyJsonLd(e){let r={"@context":"https://schema.org","@type":"Corporation",name:e.name,alternateName:e.name.replace(" GmbH",""),url:e.website,logo:e.logoUrl,contactPoint:{"@type":"ContactPoint",telephone:e.phone,contactType:"customer service",areaServed:"DE",availableLanguage:["en","German"]},sameAs:[]},n=e.socials?.find(a=>a.type==="facebook")?.url;n&&r.sameAs.push(n);let i=e.socials?.find(a=>a.type==="twitter")?.url;return i&&r.sameAs.push(i),new t(r)}static createNewsArticleJsonLd(e){let r={"@context":"https://schema.org","@type":"NewsArticle",mainEntityOfPage:{"@type":"WebPage","@id":window.location.href},headline:"Article headline",image:[e.featuredImageUrl],datePublished:new Date(e.timestamp).toISOString(),dateModified:new Date(e.timestamp).toISOString(),author:{"@type":"Person",name:`${e.author.firstName} ${e.author.surName}`},publisher:{"@type":"Organization",name:e.author.surName,logo:{"@type":"ImageObject",url:e.author.surName}},description:e.author.firstName};return new t(r)}static createProductJsonLd(e,r){let n={"@context":"https://schema.org","@type":"SoftwareApplication",name:e.name,description:e.description,operatingSystem:e.os,applicationCategory:e.category,offers:{"@type":"Offer",name:"User-based Plan",priceSpecification:{"@type":"PropertyValueSpecification",valueName:"Number of Users",valueRequired:!0,price:"4.99",priceCurrency:"EUR"}},publisher:r?this.createCompanyJsonLd(r).elementRef.textContent:void 0,screenshot:"https://www.social.io/screenshot.png",url:"https://www.social.io/"};return new t(n)}constructor(e){super();let r=document.createElement("script");r.type="application/ld+json",r.text=JSON.stringify(e),this.elementRef=r}};var Nt=class t extends ki{static{o(this,"OpengraphTag")}static createNewsArticleOgTags(e){let r=[];return r.push(new t("og:url",e.url??globalThis.location.href)),r.push(new t("og:title",e.title)),r.push(new t("og:description",e.content)),r.push(new t("og:image",e.featuredImageUrl??"")),r}static createProductOgTags(e){let r=[];return r.push(new t("og:type","product")),r.push(new t("og:url",globalThis.location.href)),r.push(new t("og:title",`${e.name} - ${e.slogan}`)),r.push(new t("og:site_name",e.name)),r.push(new t("og:description",e.description)),r.push(new t("og:image",e.logoLink)),r}static createCompanyOgTags(e){let r=[];return r.push(new t("og:type","company")),r.push(new t("og:url",globalThis.location.href)),r.push(new t("og:title",e.name)),r.push(new t("og:site_name",e.name)),r.push(new t("og:description",e.description)),r.push(new t("og:image",e.logoUrl??"")),r}constructor(e,r){super();let n=document.createElement("meta");n.setAttribute("property",e),n.content=r,this.elementRef=n}};var ma=class{static{o(this,"TagLevel")}set title(e){this.titleStore=e,this.state==="enabled"&&(document.title=this.titleStore)}get title(){return this.titleStore}constructor(e,r){this.tags=[],this.state="disabled",this.tagManagerRef=e,this.type=r}addTag(e){if(e instanceof Array)for(let r of e)this.addTag(r);else this.tags.push(e),this.state==="enabled"&&e.appendToDom()}async addCompanyInfo(e){this.addTag(Do.createCompanyJsonLd(e)),this.addTag(new Nt("og:type","business.business")),this.addTag(new Nt("og:title",e.name)),this.addTag(new Nt("og:url",e.website??"")),this.addTag(new Nt("og:image",e.logoUrl??"")),this.addTag(new Nt("business:contact_data:street_address",`${e.address.streetName} ${e.address.houseNumber}`)),this.addTag(new Nt("business:contact_data:locality",e.address.postalCode)),this.addTag(new Nt("business:contact_data:region",e.address.city)),this.addTag(new Nt("business:contact_data:postal_code",e.address.postalCode)),this.addTag(new Nt("business:contact_data:country_name",e.address.country))}addNewsArticleInfo(e){this.addTag(Do.createNewsArticleJsonLd(e)),this.addTag(Nt.createNewsArticleOgTags(e))}addProductInfo(e,r){this.addTag(Do.createProductJsonLd(e,r)),this.addTag(Nt.createProductOgTags(e))}async enable(){this.title&&(document.title=this.title);for(let e of this.tags)e.appendToDom();this.state="enabled"}async disable(){for(let e of this.tags)e.removeFromDom();this.state="disabled"}};var xr=class extends ki{static{o(this,"MetaTag")}constructor(e,r){super();let n=document.createElement("meta");n.name=e,n.content=r,this.elementRef=n}};var Xh=class{static{o(this,"TagManager")}constructor(){this.globalLevel=new ma(this,"global"),this.baseLevel=new ma(this,"base")}async setup(e){switch(this.globalLevel.addTag(new xr("google","notranslate")),this.globalLevel.addTag(new xr("revisit-after","1 days")),e.twitterHandle&&(this.globalLevel.addTag(new xr("twitter:card","summary_large_image")),this.globalLevel.addTag(new xr("twitter:site",e.twitterHandle)),this.globalLevel.addTag(new xr("twitter:creator",e.twitterHandle))),this.baseLevel.title=e.title,e.description&&this.baseLevel.addTag(new xr("description",e.description)),e.canonicalDomain&&this.baseLevel.addTag(new xr("canonical",e.canonicalDomain)),!0){case(e.ldCompany&&!e.ldProduct):this.baseLevel.addCompanyInfo(e.ldCompany);break;case!!e.ldProduct:this.baseLevel.addProductInfo(e.ldProduct,e.ldCompany);break}await this.globalLevel.enable(),this.activeLevel=this.baseLevel,await this.activeLevel.enable()}async setSubPageLevel(e){let r=new ma(this,"subpage");return r.title=e.title,e.description&&r.addTag(new xr("description",e.description)),await this.activeLevel.disable(),this.activeLevel=r,await this.activeLevel.enable(),r}async revertToBaseLevel(){this.activeLevel!==this.baseLevel&&(await this.activeLevel.disable(),this.activeLevel=this.baseLevel,await this.activeLevel.enable())}};var uc=class{static{o(this,"WebSetup")}constructor(e){this.tagManager=new Xh,this.readyDeferred=te.defer(),this.readyForSmartssrDeferred=te.defer(),this.readyPromise=this.readyDeferred.promise,this.readyForSmartssrPromise=this.readyForSmartssrDeferred.promise,this.options=e,this.setup().then(()=>{this.readyDeferred.resolve(),this.options.smartssrWaitForReadySignal||this.readyForSmartssrDeferred.resolve()})}async setup(e){e&&(this.options=e),await this.tagManager.setup(this.options.metaObject)}revertToBaseLevel(){this.tagManager.revertToBaseLevel()}async setSubLevel(e){return await this.tagManager.setSubPageLevel(e)}flashTitle(e){}informReadyForSmartssr(){this.options.smartssrWaitForReadySignal||console.error("You have not indicated that you inform smartssr by a dedicated signal! Please consider doing so!"),this.readyForSmartssrDeferred.resolve()}};var cb=class{static{o(this,"Title")}};var Ej="1.3.17";function cC(t,e,r){return Math.max(t,Math.min(e,r))}o(cC,"clamp");function Dj(t,e,r){return(1-r)*t+r*e}o(Dj,"lerp");function Cj(t,e,r,n){return Dj(t,e,1-Math.exp(-r*n))}o(Cj,"damp");function Oj(t,e){return(t%e+e)%e}o(Oj,"modulo");var Mj=class{static{o(this,"Animate")}isRunning=!1;value=0;from=0;to=0;currentTime=0;lerp;duration;easing;onUpdate;advance(t){if(!this.isRunning)return;let e=!1;if(this.duration&&this.easing){this.currentTime+=t;let r=cC(0,this.currentTime/this.duration,1);e=r>=1;let n=e?1:this.easing(r);this.value=this.from+(this.to-this.from)*n}else this.lerp?(this.value=Cj(this.value,this.to,this.lerp*60,t),Math.round(this.value)===this.to&&(this.value=this.to,e=!0)):(this.value=this.to,e=!0);e&&this.stop(),this.onUpdate?.(this.value,e)}stop(){this.isRunning=!1}fromTo(t,e,{lerp:r,duration:n,easing:i,onStart:s,onUpdate:a}){this.from=this.value=t,this.to=e,this.lerp=r,this.duration=n,this.easing=i,this.currentTime=0,this.isRunning=!0,s?.(),this.onUpdate=a}};function Ij(t,e){let r;return function(...n){let i=this;clearTimeout(r),r=setTimeout(()=>{r=void 0,t.apply(i,n)},e)}}o(Ij,"debounce");var Nj=class{static{o(this,"Dimensions")}constructor(t,e,{autoResize:r=!0,debounce:n=250}={}){this.wrapper=t,this.content=e,r&&(this.debouncedResize=Ij(this.resize,n),this.wrapper instanceof Window?window.addEventListener("resize",this.debouncedResize,!1):(this.wrapperResizeObserver=new ResizeObserver(this.debouncedResize),this.wrapperResizeObserver.observe(this.wrapper)),this.contentResizeObserver=new ResizeObserver(this.debouncedResize),this.contentResizeObserver.observe(this.content)),this.resize()}width=0;height=0;scrollHeight=0;scrollWidth=0;debouncedResize;wrapperResizeObserver;contentResizeObserver;destroy(){this.wrapperResizeObserver?.disconnect(),this.contentResizeObserver?.disconnect(),this.wrapper===window&&this.debouncedResize&&window.removeEventListener("resize",this.debouncedResize,!1)}resize=o(()=>{this.onWrapperResize(),this.onContentResize()},"resize");onWrapperResize=o(()=>{this.wrapper instanceof Window?(this.width=window.innerWidth,this.height=window.innerHeight):(this.width=this.wrapper.clientWidth,this.height=this.wrapper.clientHeight)},"onWrapperResize");onContentResize=o(()=>{this.wrapper instanceof Window?(this.scrollHeight=this.content.scrollHeight,this.scrollWidth=this.content.scrollWidth):(this.scrollHeight=this.wrapper.scrollHeight,this.scrollWidth=this.wrapper.scrollWidth)},"onContentResize");get limit(){return{x:this.scrollWidth-this.width,y:this.scrollHeight-this.height}}},uC=class{static{o(this,"Emitter")}events={};emit(t,...e){let r=this.events[t]||[];for(let n=0,i=r.length;n<i;n++)r[n]?.(...e)}on(t,e){return this.events[t]?.push(e)||(this.events[t]=[e]),()=>{this.events[t]=this.events[t]?.filter(r=>e!==r)}}off(t,e){this.events[t]=this.events[t]?.filter(r=>e!==r)}destroy(){this.events={}}},fC=100/6,Ti={passive:!1},Pj=class{static{o(this,"VirtualScroll")}constructor(t,e={wheelMultiplier:1,touchMultiplier:1}){this.element=t,this.options=e,window.addEventListener("resize",this.onWindowResize,!1),this.onWindowResize(),this.element.addEventListener("wheel",this.onWheel,Ti),this.element.addEventListener("touchstart",this.onTouchStart,Ti),this.element.addEventListener("touchmove",this.onTouchMove,Ti),this.element.addEventListener("touchend",this.onTouchEnd,Ti)}touchStart={x:0,y:0};lastDelta={x:0,y:0};window={width:0,height:0};emitter=new uC;on(t,e){return this.emitter.on(t,e)}destroy(){this.emitter.destroy(),window.removeEventListener("resize",this.onWindowResize,!1),this.element.removeEventListener("wheel",this.onWheel,Ti),this.element.removeEventListener("touchstart",this.onTouchStart,Ti),this.element.removeEventListener("touchmove",this.onTouchMove,Ti),this.element.removeEventListener("touchend",this.onTouchEnd,Ti)}onTouchStart=o(t=>{let{clientX:e,clientY:r}=t.targetTouches?t.targetTouches[0]:t;this.touchStart.x=e,this.touchStart.y=r,this.lastDelta={x:0,y:0},this.emitter.emit("scroll",{deltaX:0,deltaY:0,event:t})},"onTouchStart");onTouchMove=o(t=>{let{clientX:e,clientY:r}=t.targetTouches?t.targetTouches[0]:t,n=-(e-this.touchStart.x)*this.options.touchMultiplier,i=-(r-this.touchStart.y)*this.options.touchMultiplier;this.touchStart.x=e,this.touchStart.y=r,this.lastDelta={x:n,y:i},this.emitter.emit("scroll",{deltaX:n,deltaY:i,event:t})},"onTouchMove");onTouchEnd=o(t=>{this.emitter.emit("scroll",{deltaX:this.lastDelta.x,deltaY:this.lastDelta.y,event:t})},"onTouchEnd");onWheel=o(t=>{let{deltaX:e,deltaY:r,deltaMode:n}=t,i=n===1?fC:n===2?this.window.width:1,s=n===1?fC:n===2?this.window.height:1;e*=i,r*=s,e*=this.options.wheelMultiplier,r*=this.options.wheelMultiplier,this.emitter.emit("scroll",{deltaX:e,deltaY:r,event:t})},"onWheel");onWindowResize=o(()=>{this.window={width:window.innerWidth,height:window.innerHeight}},"onWindowResize")},pC=o(t=>Math.min(1,1.001-Math.pow(2,-10*t)),"defaultEasing"),fc=class{static{o(this,"Lenis")}_isScrolling=!1;_isStopped=!1;_isLocked=!1;_preventNextNativeScrollEvent=!1;_resetVelocityTimeout=null;_rafId=null;isTouching;time=0;userData={};lastVelocity=0;velocity=0;direction=0;options;targetScroll;animatedScroll;animate=new Mj;emitter=new uC;dimensions;virtualScroll;constructor({wrapper:t=window,content:e=document.documentElement,eventsTarget:r=t,smoothWheel:n=!0,syncTouch:i=!1,syncTouchLerp:s=.075,touchInertiaExponent:a=1.7,duration:l,easing:c,lerp:u=.1,infinite:f=!1,orientation:p="vertical",gestureOrientation:h=p==="horizontal"?"both":"vertical",touchMultiplier:m=1,wheelMultiplier:d=1,autoResize:g=!0,prevent:y,virtualScroll:x,overscroll:T=!0,autoRaf:E=!1,anchors:_=!1,autoToggle:P=!1,allowNestedScroll:D=!1,__experimental__naiveDimensions:F=!1,naiveDimensions:A=F,stopInertiaOnNavigate:W=!1}={}){window.lenisVersion=Ej,(!t||t===document.documentElement)&&(t=window),typeof l=="number"&&typeof c!="function"?c=pC:typeof c=="function"&&typeof l!="number"&&(l=1),this.options={wrapper:t,content:e,eventsTarget:r,smoothWheel:n,syncTouch:i,syncTouchLerp:s,touchInertiaExponent:a,duration:l,easing:c,lerp:u,infinite:f,gestureOrientation:h,orientation:p,touchMultiplier:m,wheelMultiplier:d,autoResize:g,prevent:y,virtualScroll:x,overscroll:T,autoRaf:E,anchors:_,autoToggle:P,allowNestedScroll:D,naiveDimensions:A,stopInertiaOnNavigate:W},this.dimensions=new Nj(t,e,{autoResize:g}),this.updateClassName(),this.targetScroll=this.animatedScroll=this.actualScroll,this.options.wrapper.addEventListener("scroll",this.onNativeScroll,!1),this.options.wrapper.addEventListener("scrollend",this.onScrollEnd,{capture:!0}),(this.options.anchors||this.options.stopInertiaOnNavigate)&&this.options.wrapper.addEventListener("click",this.onClick,!1),this.options.wrapper.addEventListener("pointerdown",this.onPointerDown,!1),this.virtualScroll=new Pj(r,{touchMultiplier:m,wheelMultiplier:d}),this.virtualScroll.on("scroll",this.onVirtualScroll),this.options.autoToggle&&(this.checkOverflow(),this.rootElement.addEventListener("transitionend",this.onTransitionEnd,{passive:!0})),this.options.autoRaf&&(this._rafId=requestAnimationFrame(this.raf))}destroy(){this.emitter.destroy(),this.options.wrapper.removeEventListener("scroll",this.onNativeScroll,!1),this.options.wrapper.removeEventListener("scrollend",this.onScrollEnd,{capture:!0}),this.options.wrapper.removeEventListener("pointerdown",this.onPointerDown,!1),(this.options.anchors||this.options.stopInertiaOnNavigate)&&this.options.wrapper.removeEventListener("click",this.onClick,!1),this.virtualScroll.destroy(),this.dimensions.destroy(),this.cleanUpClassName(),this._rafId&&cancelAnimationFrame(this._rafId)}on(t,e){return this.emitter.on(t,e)}off(t,e){return this.emitter.off(t,e)}onScrollEnd=o(t=>{t instanceof CustomEvent||(this.isScrolling==="smooth"||this.isScrolling===!1)&&t.stopPropagation()},"onScrollEnd");dispatchScrollendEvent=o(()=>{this.options.wrapper.dispatchEvent(new CustomEvent("scrollend",{bubbles:this.options.wrapper===window,detail:{lenisScrollEnd:!0}}))},"dispatchScrollendEvent");get overflow(){let t=this.isHorizontal?"overflow-x":"overflow-y";return getComputedStyle(this.rootElement)[t]}checkOverflow(){["hidden","clip"].includes(this.overflow)?this.internalStop():this.internalStart()}onTransitionEnd=o(t=>{t.propertyName.includes("overflow")&&this.checkOverflow()},"onTransitionEnd");setScroll(t){this.isHorizontal?this.options.wrapper.scrollTo({left:t,behavior:"instant"}):this.options.wrapper.scrollTo({top:t,behavior:"instant"})}onClick=o(t=>{let r=t.composedPath().filter(n=>n instanceof HTMLAnchorElement&&n.getAttribute("href"));if(this.options.anchors){let n=r.find(i=>i.getAttribute("href")?.includes("#"));if(n){let i=n.getAttribute("href");if(i){let s=typeof this.options.anchors=="object"&&this.options.anchors?this.options.anchors:void 0,a=`#${i.split("#")[1]}`;this.scrollTo(a,s)}}}this.options.stopInertiaOnNavigate&&r.find(i=>i.host===window.location.host)&&this.reset()},"onClick");onPointerDown=o(t=>{t.button===1&&this.reset()},"onPointerDown");onVirtualScroll=o(t=>{if(typeof this.options.virtualScroll=="function"&&this.options.virtualScroll(t)===!1)return;let{deltaX:e,deltaY:r,event:n}=t;if(this.emitter.emit("virtual-scroll",{deltaX:e,deltaY:r,event:n}),n.ctrlKey||n.lenisStopPropagation)return;let i=n.type.includes("touch"),s=n.type.includes("wheel");this.isTouching=n.type==="touchstart"||n.type==="touchmove";let a=e===0&&r===0;if(this.options.syncTouch&&i&&n.type==="touchstart"&&a&&!this.isStopped&&!this.isLocked){this.reset();return}let c=this.options.gestureOrientation==="vertical"&&r===0||this.options.gestureOrientation==="horizontal"&&e===0;if(a||c)return;let u=n.composedPath();u=u.slice(0,u.indexOf(this.rootElement));let f=this.options.prevent;if(u.find(y=>y instanceof HTMLElement&&(typeof f=="function"&&f?.(y)||y.hasAttribute?.("data-lenis-prevent")||i&&y.hasAttribute?.("data-lenis-prevent-touch")||s&&y.hasAttribute?.("data-lenis-prevent-wheel")||this.options.allowNestedScroll&&this.checkNestedScroll(y,{deltaX:e,deltaY:r}))))return;if(this.isStopped||this.isLocked){n.cancelable&&n.preventDefault();return}if(!(this.options.syncTouch&&i||this.options.smoothWheel&&s)){this.isScrolling="native",this.animate.stop(),n.lenisStopPropagation=!0;return}let h=r;this.options.gestureOrientation==="both"?h=Math.abs(r)>Math.abs(e)?r:e:this.options.gestureOrientation==="horizontal"&&(h=e),(!this.options.overscroll||this.options.infinite||this.options.wrapper!==window&&this.limit>0&&(this.animatedScroll>0&&this.animatedScroll<this.limit||this.animatedScroll===0&&r>0||this.animatedScroll===this.limit&&r<0))&&(n.lenisStopPropagation=!0),n.cancelable&&n.preventDefault();let m=i&&this.options.syncTouch,g=i&&n.type==="touchend";g&&(h=Math.sign(this.velocity)*Math.pow(Math.abs(this.velocity),this.options.touchInertiaExponent)),this.scrollTo(this.targetScroll+h,{programmatic:!1,...m?{lerp:g?this.options.syncTouchLerp:1}:{lerp:this.options.lerp,duration:this.options.duration,easing:this.options.easing}})},"onVirtualScroll");resize(){this.dimensions.resize(),this.animatedScroll=this.targetScroll=this.actualScroll,this.emit()}emit(){this.emitter.emit("scroll",this)}onNativeScroll=o(()=>{if(this._resetVelocityTimeout!==null&&(clearTimeout(this._resetVelocityTimeout),this._resetVelocityTimeout=null),this._preventNextNativeScrollEvent){this._preventNextNativeScrollEvent=!1;return}if(this.isScrolling===!1||this.isScrolling==="native"){let t=this.animatedScroll;this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity,this.velocity=this.animatedScroll-t,this.direction=Math.sign(this.animatedScroll-t),this.isStopped||(this.isScrolling="native"),this.emit(),this.velocity!==0&&(this._resetVelocityTimeout=setTimeout(()=>{this.lastVelocity=this.velocity,this.velocity=0,this.isScrolling=!1,this.emit()},400))}},"onNativeScroll");reset(){this.isLocked=!1,this.isScrolling=!1,this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity=0,this.animate.stop()}start(){if(this.isStopped){if(this.options.autoToggle){this.rootElement.style.removeProperty("overflow");return}this.internalStart()}}internalStart(){this.isStopped&&(this.reset(),this.isStopped=!1,this.emit())}stop(){if(!this.isStopped){if(this.options.autoToggle){this.rootElement.style.setProperty("overflow","clip");return}this.internalStop()}}internalStop(){this.isStopped||(this.reset(),this.isStopped=!0,this.emit())}raf=o(t=>{let e=t-(this.time||t);this.time=t,this.animate.advance(e*.001),this.options.autoRaf&&(this._rafId=requestAnimationFrame(this.raf))},"raf");scrollTo(t,{offset:e=0,immediate:r=!1,lock:n=!1,programmatic:i=!0,lerp:s=i?this.options.lerp:void 0,duration:a=i?this.options.duration:void 0,easing:l=i?this.options.easing:void 0,onStart:c,onComplete:u,force:f=!1,userData:p}={}){if(!((this.isStopped||this.isLocked)&&!f)){if(typeof t=="string"&&["top","left","start","#"].includes(t))t=0;else if(typeof t=="string"&&["bottom","right","end"].includes(t))t=this.limit;else{let h;if(typeof t=="string"?(h=document.querySelector(t),h||(t==="#top"?t=0:console.warn("Lenis: Target not found",t))):t instanceof HTMLElement&&t?.nodeType&&(h=t),h){if(this.options.wrapper!==window){let d=this.rootElement.getBoundingClientRect();e-=this.isHorizontal?d.left:d.top}let m=h.getBoundingClientRect();t=(this.isHorizontal?m.left:m.top)+this.animatedScroll}}if(typeof t=="number"){if(t+=e,t=Math.round(t),this.options.infinite){if(i){this.targetScroll=this.animatedScroll=this.scroll;let h=t-this.animatedScroll;h>this.limit/2?t=t-this.limit:h<-this.limit/2&&(t=t+this.limit)}}else t=cC(0,t,this.limit);if(t===this.targetScroll){c?.(this),u?.(this);return}if(this.userData=p??{},r){this.animatedScroll=this.targetScroll=t,this.setScroll(this.scroll),this.reset(),this.preventNextNativeScrollEvent(),this.emit(),u?.(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()});return}i||(this.targetScroll=t),typeof a=="number"&&typeof l!="function"?l=pC:typeof l=="function"&&typeof a!="number"&&(a=1),this.animate.fromTo(this.animatedScroll,t,{duration:a,easing:l,lerp:s,onStart:o(()=>{n&&(this.isLocked=!0),this.isScrolling="smooth",c?.(this)},"onStart"),onUpdate:o((h,m)=>{this.isScrolling="smooth",this.lastVelocity=this.velocity,this.velocity=h-this.animatedScroll,this.direction=Math.sign(this.velocity),this.animatedScroll=h,this.setScroll(this.scroll),i&&(this.targetScroll=h),m||this.emit(),m&&(this.reset(),this.emit(),u?.(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()}),this.preventNextNativeScrollEvent())},"onUpdate")})}}}preventNextNativeScrollEvent(){this._preventNextNativeScrollEvent=!0,requestAnimationFrame(()=>{this._preventNextNativeScrollEvent=!1})}checkNestedScroll(t,{deltaX:e,deltaY:r}){let n=Date.now(),i=t._lenis??={},s,a,l,c,u,f,p,h,m=this.options.gestureOrientation;if(n-(i.time??0)>2e3){i.time=Date.now();let P=window.getComputedStyle(t);i.computedStyle=P;let D=P.overflowX,F=P.overflowY;if(s=["auto","overlay","scroll"].includes(D),a=["auto","overlay","scroll"].includes(F),i.hasOverflowX=s,i.hasOverflowY=a,!s&&!a||m==="vertical"&&!a||m==="horizontal"&&!s)return!1;u=t.scrollWidth,f=t.scrollHeight,p=t.clientWidth,h=t.clientHeight,l=u>p,c=f>h,i.isScrollableX=l,i.isScrollableY=c,i.scrollWidth=u,i.scrollHeight=f,i.clientWidth=p,i.clientHeight=h}else l=i.isScrollableX,c=i.isScrollableY,s=i.hasOverflowX,a=i.hasOverflowY,u=i.scrollWidth,f=i.scrollHeight,p=i.clientWidth,h=i.clientHeight;if(!s&&!a||!l&&!c||m==="vertical"&&(!a||!c)||m==="horizontal"&&(!s||!l))return!1;let d;if(m==="horizontal")d="x";else if(m==="vertical")d="y";else{let P=e!==0,D=r!==0;P&&s&&l&&(d="x"),D&&a&&c&&(d="y")}if(!d)return!1;let g,y,x,T,E;if(d==="x")g=t.scrollLeft,y=u-p,x=e,T=s,E=l;else if(d==="y")g=t.scrollTop,y=f-h,x=r,T=a,E=c;else return!1;return(x>0?g<y:g>0)&&T&&E}get rootElement(){return this.options.wrapper===window?document.documentElement:this.options.wrapper}get limit(){return this.options.naiveDimensions?this.isHorizontal?this.rootElement.scrollWidth-this.rootElement.clientWidth:this.rootElement.scrollHeight-this.rootElement.clientHeight:this.dimensions.limit[this.isHorizontal?"x":"y"]}get isHorizontal(){return this.options.orientation==="horizontal"}get actualScroll(){let t=this.options.wrapper;return this.isHorizontal?t.scrollX??t.scrollLeft:t.scrollY??t.scrollTop}get scroll(){return this.options.infinite?Oj(this.animatedScroll,this.limit):this.animatedScroll}get progress(){return this.limit===0?1:this.scroll/this.limit}get isScrolling(){return this._isScrolling}set isScrolling(t){this._isScrolling!==t&&(this._isScrolling=t,this.updateClassName())}get isStopped(){return this._isStopped}set isStopped(t){this._isStopped!==t&&(this._isStopped=t,this.updateClassName())}get isLocked(){return this._isLocked}set isLocked(t){this._isLocked!==t&&(this._isLocked=t,this.updateClassName())}get isSmooth(){return this.isScrolling==="smooth"}get className(){let t="lenis";return this.options.autoToggle&&(t+=" lenis-autoToggle"),this.isStopped&&(t+=" lenis-stopped"),this.isLocked&&(t+=" lenis-locked"),this.isScrolling&&(t+=" lenis-scrolling"),this.isScrolling==="smooth"&&(t+=" lenis-smooth"),t}updateClassName(){this.cleanUpClassName(),this.rootElement.className=`${this.rootElement.className} ${this.className}`.trim()}cleanUpClassName(){this.rootElement.className=this.rootElement.className.replace(/lenis(-\w+)?/g,"").trim()}};var da=zr(hC(),1),_j={ObjectMap:xn,Stringmap:qa,FastMap:Hi};var Tb={};se(Tb,{containerContextStyles:()=>Xj,cssForConstraint:()=>Jj,cssForConstraintContainer:()=>Qj,cssForContainer:()=>LC,cssForDesktop:()=>Zj,cssForNotebook:()=>ez,cssForPhablet:()=>rz,cssForPhone:()=>nz,cssForTablet:()=>tz,cssForViewport:()=>_o,desktop:()=>MC,notebook:()=>IC,phablet:()=>PC,phone:()=>_C,tablet:()=>NC});var em=globalThis,pc=em.ShadowRoot&&(em.ShadyCSS===void 0||em.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,hb=Symbol(),mC=new WeakMap,ga=class{static{o(this,"n")}constructor(e,r,n){if(this._$cssResult$=!0,n!==hb)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=r}get styleSheet(){let e=this.o,r=this.t;if(pc&&e===void 0){let n=r!==void 0&&r.length===1;n&&(e=mC.get(r)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&mC.set(r,e))}return e}toString(){return this.cssText}},rr=o(t=>new ga(typeof t=="string"?t:t+"",void 0,hb),"r"),Rr=o((t,...e)=>{let r=t.length===1?t[0]:e.reduce((n,i,s)=>n+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[s+1],t[0]);return new ga(r,t,hb)},"i"),tm=o((t,e)=>{if(pc)t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of e){let n=document.createElement("style"),i=em.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,t.appendChild(n)}},"S"),hc=pc?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let r="";for(let n of e.cssRules)r+=n.cssText;return rr(r)})(t):t;var{is:Lj,defineProperty:Rj,getOwnPropertyDescriptor:Aj,getOwnPropertyNames:Fj,getOwnPropertySymbols:$j,getPrototypeOf:Bj}=Object,rm=globalThis,dC=rm.trustedTypes,jj=dC?dC.emptyScript:"",zj=rm.reactiveElementPolyfillSupport,mc=o((t,e)=>t,"d"),nm={toAttribute(t,e){switch(e){case Boolean:t=t?jj:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let r=t;switch(e){case Boolean:r=t!==null;break;case Number:r=t===null?null:Number(t);break;case Object:case Array:try{r=JSON.parse(t)}catch{r=null}}return r}},mb=o((t,e)=>!Lj(t,e),"f"),gC={attribute:!0,type:String,converter:nm,reflect:!1,useDefault:!1,hasChanged:mb};Symbol.metadata??=Symbol("metadata"),rm.litPropertyMetadata??=new WeakMap;var dn=class extends HTMLElement{static{o(this,"y")}static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,r=gC){if(r.state&&(r.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((r=Object.create(r)).wrapped=!0),this.elementProperties.set(e,r),!r.noAccessor){let n=Symbol(),i=this.getPropertyDescriptor(e,n,r);i!==void 0&&Rj(this.prototype,e,i)}}static getPropertyDescriptor(e,r,n){let{get:i,set:s}=Aj(this.prototype,e)??{get(){return this[r]},set(a){this[r]=a}};return{get:i,set(a){let l=i?.call(this);s?.call(this,a),this.requestUpdate(e,l,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??gC}static _$Ei(){if(this.hasOwnProperty(mc("elementProperties")))return;let e=Bj(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(mc("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(mc("properties"))){let r=this.properties,n=[...Fj(r),...$j(r)];for(let i of n)this.createProperty(i,r[i])}let e=this[Symbol.metadata];if(e!==null){let r=litPropertyMetadata.get(e);if(r!==void 0)for(let[n,i]of r)this.elementProperties.set(n,i)}this._$Eh=new Map;for(let[r,n]of this.elementProperties){let i=this._$Eu(r,n);i!==void 0&&this._$Eh.set(i,r)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let r=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let i of n)r.unshift(hc(i))}else e!==void 0&&r.push(hc(e));return r}static _$Eu(e,r){let n=r.attribute;return n===!1?void 0:typeof n=="string"?n:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,r=this.constructor.elementProperties;for(let n of r.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return tm(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,r,n){this._$AK(e,n)}_$ET(e,r){let n=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,n);if(i!==void 0&&n.reflect===!0){let s=(n.converter?.toAttribute!==void 0?n.converter:nm).toAttribute(r,n.type);this._$Em=e,s==null?this.removeAttribute(i):this.setAttribute(i,s),this._$Em=null}}_$AK(e,r){let n=this.constructor,i=n._$Eh.get(e);if(i!==void 0&&this._$Em!==i){let s=n.getPropertyOptions(i),a=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:nm;this._$Em=i;let l=a.fromAttribute(r,s.type);this[i]=l??this._$Ej?.get(i)??l,this._$Em=null}}requestUpdate(e,r,n,i=!1,s){if(e!==void 0){let a=this.constructor;if(i===!1&&(s=this[e]),n??=a.getPropertyOptions(e),!((n.hasChanged??mb)(s,r)||n.useDefault&&n.reflect&&s===this._$Ej?.get(e)&&!this.hasAttribute(a._$Eu(e,n))))return;this.C(e,r,n)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,r,{useDefault:n,reflect:i,wrapped:s},a){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,a??r??this[e]),s!==!0||a!==void 0)||(this._$AL.has(e)||(this.hasUpdated||n||(r=void 0),this._$AL.set(e,r)),i===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(r){Promise.reject(r)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[i,s]of this._$Ep)this[i]=s;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[i,s]of n){let{wrapped:a}=s,l=this[i];a!==!0||this._$AL.has(i)||l===void 0||this.C(i,void 0,s,l)}}let e=!1,r=this._$AL;try{e=this.shouldUpdate(r),e?(this.willUpdate(r),this._$EO?.forEach(n=>n.hostUpdate?.()),this.update(r)):this._$EM()}catch(n){throw e=!1,this._$EM(),n}e&&this._$AE(r)}willUpdate(e){}_$AE(e){this._$EO?.forEach(r=>r.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(r=>this._$ET(r,this[r])),this._$EM()}updated(e){}firstUpdated(e){}};dn.elementStyles=[],dn.shadowRootOptions={mode:"open"},dn[mc("elementProperties")]=new Map,dn[mc("finalized")]=new Map,zj?.({ReactiveElement:dn}),(rm.reactiveElementVersions??=[]).push("2.1.2");var db=globalThis,yC=o(t=>t,"i"),im=db.trustedTypes,xC=im?im.createPolicy("lit-html",{createHTML:o(t=>t,"createHTML")}):void 0,gb="$lit$",Ln=`lit$${Math.random().toFixed(9).slice(2)}$`,yb="?"+Ln,Wj=`<${yb}>`,Co=document,dc=o(()=>Co.createComment(""),"c"),gc=o(t=>t===null||typeof t!="object"&&typeof t!="function","a"),xb=Array.isArray,bC=o(t=>xb(t)||typeof t?.[Symbol.iterator]=="function","d"),bb=`[
282
- \f\r]`,yc=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,wC=/-->/g,SC=/>/g,Oo=RegExp(`>|${bb}(?:([^\\s"'>=/]+)(${bb}*=${bb}*(?:[^
283
- \f\r"'\`<>=]|("|')|))|$)`,"g"),vC=/'/g,kC=/"/g,TC=/^(?:script|style|textarea|title)$/i,wb=o(t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),"x"),Sb=wb(1),Hj=wb(2),Uj=wb(3),Ei=Symbol.for("lit-noChange"),it=Symbol.for("lit-nothing"),EC=new WeakMap,Mo=Co.createTreeWalker(Co,129);function DC(t,e){if(!xb(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return xC!==void 0?xC.createHTML(e):e}o(DC,"V");var CC=o((t,e)=>{let r=t.length-1,n=[],i,s=e===2?"<svg>":e===3?"<math>":"",a=yc;for(let l=0;l<r;l++){let c=t[l],u,f,p=-1,h=0;for(;h<c.length&&(a.lastIndex=h,f=a.exec(c),f!==null);)h=a.lastIndex,a===yc?f[1]==="!--"?a=wC:f[1]!==void 0?a=SC:f[2]!==void 0?(TC.test(f[2])&&(i=RegExp("</"+f[2],"g")),a=Oo):f[3]!==void 0&&(a=Oo):a===Oo?f[0]===">"?(a=i??yc,p=-1):f[1]===void 0?p=-2:(p=a.lastIndex-f[2].length,u=f[1],a=f[3]===void 0?Oo:f[3]==='"'?kC:vC):a===kC||a===vC?a=Oo:a===wC||a===SC?a=yc:(a=Oo,i=void 0);let m=a===Oo&&t[l+1].startsWith("/>")?" ":"";s+=a===yc?c+Wj:p>=0?(n.push(u),c.slice(0,p)+gb+c.slice(p)+Ln+m):c+Ln+(p===-2?l:m)}return[DC(t,s+(t[r]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),n]},"N"),xc=class t{static{o(this,"S")}constructor({strings:e,_$litType$:r},n){let i;this.parts=[];let s=0,a=0,l=e.length-1,c=this.parts,[u,f]=CC(e,r);if(this.el=t.createElement(u,n),Mo.currentNode=this.el.content,r===2||r===3){let p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(i=Mo.nextNode())!==null&&c.length<l;){if(i.nodeType===1){if(i.hasAttributes())for(let p of i.getAttributeNames())if(p.endsWith(gb)){let h=f[a++],m=i.getAttribute(p).split(Ln),d=/([.?@])?(.*)/.exec(h);c.push({type:1,index:s,name:d[2],strings:m,ctor:d[1]==="."?sm:d[1]==="?"?am:d[1]==="@"?lm:No}),i.removeAttribute(p)}else p.startsWith(Ln)&&(c.push({type:6,index:s}),i.removeAttribute(p));if(TC.test(i.tagName)){let p=i.textContent.split(Ln),h=p.length-1;if(h>0){i.textContent=im?im.emptyScript:"";for(let m=0;m<h;m++)i.append(p[m],dc()),Mo.nextNode(),c.push({type:2,index:++s});i.append(p[h],dc())}}}else if(i.nodeType===8)if(i.data===yb)c.push({type:2,index:s});else{let p=-1;for(;(p=i.data.indexOf(Ln,p+1))!==-1;)c.push({type:7,index:s}),p+=Ln.length-1}s++}}static createElement(e,r){let n=Co.createElement("template");return n.innerHTML=e,n}};function Io(t,e,r=t,n){if(e===Ei)return e;let i=n!==void 0?r._$Co?.[n]:r._$Cl,s=gc(e)?void 0:e._$litDirective$;return i?.constructor!==s&&(i?._$AO?.(!1),s===void 0?i=void 0:(i=new s(t),i._$AT(t,r,n)),n!==void 0?(r._$Co??=[])[n]=i:r._$Cl=i),i!==void 0&&(e=Io(t,i._$AS(t,e.values),i,n)),e}o(Io,"M");var om=class{static{o(this,"R")}constructor(e,r){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:r},parts:n}=this._$AD,i=(e?.creationScope??Co).importNode(r,!0);Mo.currentNode=i;let s=Mo.nextNode(),a=0,l=0,c=n[0];for(;c!==void 0;){if(a===c.index){let u;c.type===2?u=new ya(s,s.nextSibling,this,e):c.type===1?u=new c.ctor(s,c.name,c.strings,this,e):c.type===6&&(u=new cm(s,this,e)),this._$AV.push(u),c=n[++l]}a!==c?.index&&(s=Mo.nextNode(),a++)}return Mo.currentNode=Co,i}p(e){let r=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,r),r+=n.strings.length-2):n._$AI(e[r])),r++}},ya=class t{static{o(this,"k")}get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,r,n,i){this.type=2,this._$AH=it,this._$AN=void 0,this._$AA=e,this._$AB=r,this._$AM=n,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,r=this._$AM;return r!==void 0&&e?.nodeType===11&&(e=r.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,r=this){e=Io(this,e,r),gc(e)?e===it||e==null||e===""?(this._$AH!==it&&this._$AR(),this._$AH=it):e!==this._$AH&&e!==Ei&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):bC(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==it&&gc(this._$AH)?this._$AA.nextSibling.data=e:this.T(Co.createTextNode(e)),this._$AH=e}$(e){let{values:r,_$litType$:n}=e,i=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=xc.createElement(DC(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===i)this._$AH.p(r);else{let s=new om(i,this),a=s.u(this.options);s.p(r),this.T(a),this._$AH=s}}_$AC(e){let r=EC.get(e.strings);return r===void 0&&EC.set(e.strings,r=new xc(e)),r}k(e){xb(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,n,i=0;for(let s of e)i===r.length?r.push(n=new t(this.O(dc()),this.O(dc()),this,this.options)):n=r[i],n._$AI(s),i++;i<r.length&&(this._$AR(n&&n._$AB.nextSibling,i),r.length=i)}_$AR(e=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);e!==this._$AB;){let n=yC(e).nextSibling;yC(e).remove(),e=n}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},No=class{static{o(this,"H")}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,r,n,i,s){this.type=1,this._$AH=it,this._$AN=void 0,this.element=e,this.name=r,this._$AM=i,this.options=s,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=it}_$AI(e,r=this,n,i){let s=this.strings,a=!1;if(s===void 0)e=Io(this,e,r,0),a=!gc(e)||e!==this._$AH&&e!==Ei,a&&(this._$AH=e);else{let l=e,c,u;for(e=s[0],c=0;c<s.length-1;c++)u=Io(this,l[n+c],r,c),u===Ei&&(u=this._$AH[c]),a||=!gc(u)||u!==this._$AH[c],u===it?e=it:e!==it&&(e+=(u??"")+s[c+1]),this._$AH[c]=u}a&&!i&&this.j(e)}j(e){e===it?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},sm=class extends No{static{o(this,"I")}constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===it?void 0:e}},am=class extends No{static{o(this,"L")}constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==it)}},lm=class extends No{static{o(this,"z")}constructor(e,r,n,i,s){super(e,r,n,i,s),this.type=5}_$AI(e,r=this){if((e=Io(this,e,r,0)??it)===Ei)return;let n=this._$AH,i=e===it&&n!==it||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,s=e!==it&&(n===it||i);i&&this.element.removeEventListener(this.name,this,n),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},cm=class{static{o(this,"Z")}constructor(e,r,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=r,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){Io(this,e)}},qj={M:gb,P:Ln,A:yb,C:1,L:CC,R:om,D:bC,V:Io,I:ya,H:No,N:am,U:lm,B:sm,F:cm},Yj=db.litHtmlPolyfillSupport;Yj?.(xc,ya),(db.litHtmlVersions??=[]).push("3.3.2");var vb=o((t,e,r)=>{let n=r?.renderBefore??e,i=n._$litPart$;if(i===void 0){let s=r?.renderBefore??null;n._$litPart$=i=new ya(e.insertBefore(dc(),s),s,void 0,r??{})}return i._$AI(t),i},"D");var kb=globalThis,Po=class extends dn{static{o(this,"i")}constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=vb(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Ei}};Po._$litElement$=!0,Po.finalized=!0,kb.litElementHydrateSupport?.({LitElement:Po});var Vj=kb.litElementPolyfillSupport;Vj?.({LitElement:Po});var Kj={_$AK:o((t,e,r)=>{t._$AK(e,r)},"_$AK"),_$AL:o(t=>t._$AL,"_$AL")};(kb.litElementVersions??=[]).push("4.2.2");var Gj=!1;var MC=1600,IC=1240,NC=1024,PC=600,_C=400,OC=o(t=>{let e=[];return t.minWidth&&e.push(`(min-width: ${t.minWidth}px)`),t.maxWidth&&e.push(`(max-width: ${t.maxWidth}px)`),e.join(" and ")},"buildCondition"),_o=o((t,e)=>rr(`
281
+ `+r}}o(hj,"handler");function $x(t,e){return t.marker?iC(t.marker,e).repeat(3):iC(t.fence,e)}o($x,"fence");function iC(t,e){return typeof t=="string"?t:t[e]}o(iC,"pick");var mj="yaml";function pa(t){let e=this,r=t||mj,n=e.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),s=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),a=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(Fx(r)),s.push(Bx(r)),a.push(jx(r))}o(pa,"remarkFrontmatter");var zx=o(()=>Zl().use(la).use(ua).use(pa,["yaml","toml"]),"createMarkdownProcessor"),oC=o(t=>{if(typeof t!="string")throw new TypeError("Markdown source must be a string.");return zx().parse(t)},"parseMarkdown");var gj=o(t=>t.type==="yaml"&&"value"in t&&typeof t.value=="string","isYamlNode"),Xh=class t{static{o(this,"MdParsedResult")}constructor(){this.originalString="",this.title="",this.html="",this.frontmatterData={}}static async createFromMarkdownString(e){let r=new t;return await r.updateFromMarkdownString(e),r}async updateFromMarkdownString(e){this.originalString=e;let r,n=await zx().use(oa).use(ea).use(()=>i=>{let s=i.children.find(gj);s&&(r=s.value)}).process(e);this.html=n.toString(),r?this.frontmatterData=await $l.yamlStringToObject(r):this.frontmatterData={}}};var Wx=class t{static{o(this,"SmartMarkdown")}static async easyMarkdownToHtml(e){return(await new t().getMdParsedResultFromMarkdown(e)).html}constructor(){}async getMdParsedResultFromMarkdown(e){return await Xh.createFromMarkdownString(e)}htmlToMarkdown(e){let r=new di({headingStyle:"atx",codeBlockStyle:"fenced"});return r.use(Ny.gfm),r.turndown(e)}};var So={};se(So,{SmartRouter:()=>Gx});var Kx=zr(pC(),1);var em=class{static{o(this,"QueryParams")}constructor(){}getAllAsObject(){let e=new URLSearchParams(window.location.search);return Object.fromEntries(e.entries())}setQueryParam(e,r,n="replace"){var i=new URLSearchParams(window.location.search);i.set(e,r),n==="push"?history.pushState(null,null,"?"+i.toString()):history.replaceState(null,null,"?"+i.toString())}deleteQueryParam(e,r="replace"){var n=new URLSearchParams(window.location.search);n.delete(e),r==="push"?history.pushState(null,null,"?"+n.toString()):history.replaceState(null,null,"?"+n.toString())}getQueryParam(e){return this.getAllAsObject()[e]}};var K5e=o(t=>{console.log(`%c[Router]%c ${t}`,"color: rgb(255, 105, 100);","color: inherit")},"routeLog"),Gx=class t{static{o(this,"SmartRouter")}constructor(e,r=""){this.options={debug:!1},this.queryParams=new em,this.routes=[],this.options={...this.options,...e},this.basePath=r,this.popstateListener=n=>{n.preventDefault(),this._handleRouteState()},window.addEventListener("popstate",this.popstateListener)}createSubRouter(e,r){let n=`${this.basePath}${e}`;return new t({...this.options,...r},n)}async pushUrl(e="/",r={}){let n=`${this.basePath}${e}`;n!==window.location.pathname?window.history.pushState(r,window.document.title,n):window.history.replaceState(r,window.document.title,n),await this._handleRouteState()}on(e,r){let n=`${this.basePath}${e}`,i={matchFunction:Kx.match(n),handler:r};return this.routes.push(i),o(()=>{this.routes.splice(this.routes.indexOf(i),1)},"removeFunction")}async _handleRouteState(){let e=window.location.pathname,r=this.routes.filter(n=>!!n.matchFunction(e));for(let n of r){let i=n.matchFunction(e);n.handler({...i.valueOf(),queryParams:this.queryParams.getAllAsObject()})}}destroy(){window.removeEventListener("popstate",this.popstateListener),this.routes=[]}};var ko={};se(ko,{Smartstate:()=>Zx,StateAction:()=>fc,StatePart:()=>pc,StateProcess:()=>ma,attachContextProvider:()=>jj,computed:()=>Xx});var uc={};se(uc,{createSha256Hasher:()=>ha,md5FromString:()=>Aj,sha256FromBuffer:()=>Pj,sha256FromFile:()=>Rj,sha256FromStream:()=>_j,sha256FromString:()=>dC,sha256FromStringSync:()=>Nj,sha265FromObject:()=>Lj});var Oj=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Mj=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),dn=o((t,e)=>t>>>e|t<<32-e,"rotateRight"),Ij=o(t=>t instanceof Uint8Array?t:new Uint8Array(t),"asBytes"),Jx=class{static{o(this,"BrowserSha256Hasher")}constructor(){this.state=new Uint32Array(Mj),this.block=new Uint8Array(64),this.words=new Uint32Array(64),this.blockLength=0,this.totalBytesHigh=0,this.totalBytesLow=0,this.finalized=!1}update(e){if(this.finalized)throw new Error("SHA-256 hasher is already finalized.");let r=Ij(e);this.addByteLength(r.byteLength);let n=0;if(this.blockLength>0){let i=Math.min(64-this.blockLength,r.byteLength);this.block.set(r.subarray(0,i),this.blockLength),this.blockLength+=i,n=i,this.blockLength===64&&(this.processBlock(this.block,0),this.blockLength=0)}for(;n+64<=r.byteLength;)this.processBlock(r,n),n+=64;return n<r.byteLength&&(this.block.set(r.subarray(n),0),this.blockLength=r.byteLength-n),this}digest(){if(this.finalized)throw new Error("SHA-256 hasher is already finalized.");this.finalized=!0;let e=this.blockLength<56?64:128,r=new Uint8Array(e);r.set(this.block.subarray(0,this.blockLength)),r[this.blockLength]=128;let n=(this.totalBytesHigh<<3|this.totalBytesLow>>>29)>>>0,i=this.totalBytesLow<<3>>>0,s=new DataView(r.buffer);s.setUint32(e-8,n,!1),s.setUint32(e-4,i,!1);for(let l=0;l<e;l+=64)this.processBlock(r,l);let a="";for(let l of this.state)a+=l.toString(16).padStart(8,"0");return this.block.fill(0),this.words.fill(0),a}addByteLength(e){let r=this.totalBytesLow;this.totalBytesLow=this.totalBytesLow+e>>>0,this.totalBytesHigh=this.totalBytesHigh+Math.floor(e/4294967296)+(this.totalBytesLow<r?1:0)>>>0}processBlock(e,r){let n=this.words;for(let h=0;h<16;h++){let m=r+h*4;n[h]=(e[m]<<24|e[m+1]<<16|e[m+2]<<8|e[m+3])>>>0}for(let h=16;h<64;h++){let m=n[h-15],d=n[h-2],g=dn(m,7)^dn(m,18)^m>>>3,y=dn(d,17)^dn(d,19)^d>>>10;n[h]=n[h-16]+g+n[h-7]+y>>>0}let i=this.state[0],s=this.state[1],a=this.state[2],l=this.state[3],c=this.state[4],u=this.state[5],f=this.state[6],p=this.state[7];for(let h=0;h<64;h++){let m=dn(c,6)^dn(c,11)^dn(c,25),d=c&u^~c&f,g=p+m+d+Oj[h]+n[h]>>>0,y=dn(i,2)^dn(i,13)^dn(i,22),x=i&s^i&a^s&a,T=y+x>>>0;p=f,f=u,u=c,c=l+g>>>0,l=a,a=s,s=i,i=g+T>>>0}this.state[0]=this.state[0]+i>>>0,this.state[1]=this.state[1]+s>>>0,this.state[2]=this.state[2]+a>>>0,this.state[3]=this.state[3]+l>>>0,this.state[4]=this.state[4]+c>>>0,this.state[5]=this.state[5]+u>>>0,this.state[6]=this.state[6]+f>>>0,this.state[7]=this.state[7]+p>>>0}},ha=o(()=>new Jx,"createSha256Hasher");function Qx(t){return ha().update(t).digest()}o(Qx,"sha256Fallback");var hC=o(t=>{let e=[],r=new DataView(t);for(let n=0;n<r.byteLength;n+=4){let s=r.getUint32(n).toString(16),a="00000000",l=(a+s).slice(-a.length);e.push(l)}return e.join("")},"hex"),mC=o(()=>typeof crypto<"u"&&crypto.subtle!==void 0,"isCryptoSubtleAvailable"),dC=o(async t=>{let e=new TextEncoder().encode(t);if(mC()){let r=await crypto.subtle.digest("SHA-256",e);return hC(r)}else return Qx(e)},"sha256FromString"),Nj=o(t=>ha().update(new TextEncoder().encode(t)).digest(),"sha256FromStringSync"),Pj=o(async t=>{if(mC()){let e;if(t instanceof Uint8Array){let i=t;e=i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength)}else e=t;let r=await crypto.subtle.digest("SHA-256",e);return hC(r)}else{let e=t instanceof Uint8Array?t:new Uint8Array(t);return Qx(e)}},"sha256FromBuffer"),Lj=o(async t=>{let e=tt.stringify(t);return await dC(e)},"sha265FromObject"),_j=o(async t=>{if(!t||typeof t.getReader!="function")throw new TypeError("sha256FromStream requires a readable Web stream.");let e=ha(),r=t.getReader(),n=!1;try{for(;;){let{value:i,done:s}=await r.read();if(s)return n=!0,e.digest();if(!(i instanceof Uint8Array))throw new TypeError("SHA-256 Web streams must emit Uint8Arrays.");e.update(i)}}catch(i){throw n||await r.cancel(i).catch(()=>{}),i}finally{r.releaseLock()}},"sha256FromStream"),Rj=o(async t=>{throw new Error("sha256FromFile is not supported in browser environment")},"sha256FromFile"),Aj=o(async t=>{throw new Error("md5FromString is not supported in browser environment. Web Crypto API does not support MD5.")},"md5FromString");var fc=class{static{o(this,"StateAction")}constructor(e,r){this.statePartRef=e,this.actionDef=r}trigger(e){return this.statePartRef.dispatchAction(this,e)}};function $j(){return typeof document>"u"?Oa(!0):new we(t=>{t.next(!document.hidden);let e=o(()=>t.next(!document.hidden),"handler");return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)})}o($j,"createVisibilityObservable");var ma=class{static{o(this,"StateProcess")}constructor(e,r){this.statusSubject=new Ro("idle"),this.producerSubscription=null,this.autoPauseSubscription=null,this.processingQueue=Promise.resolve(),this.statePartRef=e,this.producerFn=r.producer,this.reducer=r.reducer,this.sideEffect=r.sideEffect,this.autoPauseOption=r.autoPause??!1}get status(){return this.statusSubject.getValue()}get status$(){return this.statusSubject.asObservable()}start(){if(this.status==="disposed")throw new Error("Cannot start a disposed process");this.status!=="running"&&(this.statusSubject.next("running"),this.subscribeProducer(),this.setupAutoPause())}pause(){if(this.status==="disposed")throw new Error("Cannot pause a disposed process");this.status==="running"&&(this.statusSubject.next("paused"),this.unsubscribeProducer())}resume(){if(this.status==="disposed")throw new Error("Cannot resume a disposed process");this.status==="paused"&&(this.statusSubject.next("running"),this.subscribeProducer())}dispose(){this.status!=="disposed"&&(this.unsubscribeProducer(),this.teardownAutoPause(),this.statusSubject.next("disposed"),this.statusSubject.complete(),this.statePartRef._removeProcess(this))}subscribeProducer(){this.unsubscribeProducer();let e=this.producerFn();this.producerSubscription=e.subscribe({next:o(r=>{this.processingQueue=this.processingQueue.then(async()=>{try{if(this.sideEffect)await this.sideEffect(r);else if(this.reducer){let n=this.statePartRef.getState();n!==void 0&&await this.statePartRef.setState(this.reducer(n,r))}}catch(n){console.error("StateProcess value handling error:",n)}})},"next"),error:o(r=>{console.error("StateProcess producer error:",r),this.status==="running"&&(this.statusSubject.next("paused"),this.unsubscribeProducer())},"error")})}unsubscribeProducer(){this.producerSubscription&&(this.producerSubscription.unsubscribe(),this.producerSubscription=null)}setupAutoPause(){if(this.teardownAutoPause(),!this.autoPauseOption)return;let e=this.autoPauseOption==="visibility"?$j():this.autoPauseOption;this.autoPauseSubscription=e.subscribe(r=>{!r&&this.status==="running"?this.pause():r&&this.status==="paused"&&this.resume()})}teardownAutoPause(){this.autoPauseSubscription&&(this.autoPauseSubscription.unsubscribe(),this.autoPauseSubscription=null)}};var gC=o(t=>{let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null},"isPlainObject"),tm=o((t,e)=>{let r=new WeakMap,n=new WeakMap,i=o((s,a)=>{if(Object.is(s,a))return!0;if(s===null||a===null||typeof s!="object"||typeof a!="object")return!1;if(s instanceof Date||a instanceof Date)return s instanceof Date&&a instanceof Date&&Object.is(s.getTime(),a.getTime());let l=Array.isArray(s),c=Array.isArray(a);if(l!==c||!l&&(!gC(s)||!gC(a)))return!1;let u=r.get(s);if(u)return u===a;let f=n.get(a);if(f)return f===s;if(r.set(s,a),n.set(a,s),l&&c){if(s.length!==a.length)return!1;for(let g=0;g<s.length;g++)if(!i(s[g],a[g]))return!1;return!0}let p=s,h=a,m=Object.keys(p),d=Object.keys(h);if(m.length!==d.length)return!1;for(let g of m)if(!Object.prototype.hasOwnProperty.call(h,g)||!i(p[g],h[g]))return!1;return!0},"compare");return i(t,e)},"isStateSelectionEqual");function Bj(t){return new we(e=>{if(t.aborted){e.next(),e.complete();return}let r=o(()=>{e.next(),e.complete()},"handler");return t.addEventListener("abort",r),()=>t.removeEventListener("abort",r)})}o(Bj,"fromAbortSignal");var pc=class t{static{o(this,"StatePart")}static{this.MAX_NESTED_DISPATCH_DEPTH=10}constructor(e,r){this.state=new Ro(void 0),this.disposed=!1,this.cumulativeDeferred=ie.cumulativeDefer(),this.mutationQueue=Promise.resolve(),this.pendingCumulativeNotification=null,this.webStore=null,this.middlewares=[],this.processes=[],this.selectorCache=new WeakMap,this.defaultSelectObservable=null,this.name=e,r&&(this.webStoreOptions=r)}async init(){if(this.webStoreOptions){this.webStore=new Er.WebStore(this.webStoreOptions),await this.webStore.init();let e=await this.webStore.get(String(this.name));e&&this.validateState(e)&&(this.stateStore=e,await this.notifyChange())}}getState(){return this.stateStore}addMiddleware(e){return this.middlewares.push(e),()=>{let r=this.middlewares.indexOf(e);r!==-1&&this.middlewares.splice(r,1)}}async setState(e){if(this.disposed)throw new Error(`StatePart '${this.name}' has been disposed`);return this.mutationQueue=this.mutationQueue.then(()=>this.applyState(e),()=>this.applyState(e))}async applyState(e){let r=e;for(let n of this.middlewares)r=await n(r,this.stateStore);if(!this.validateState(r))throw new Error(`Invalid state structure for state part '${this.name}'`);return this.webStore&&await this.webStore.set(String(this.name),r),this.stateStore=r,await this.notifyChange(),this.stateStore}validateState(e){return e!=null}async notifyChange(){let e=this.stateStore;if(e===void 0)return;if(this.smartstateRef?.isBatching){this.smartstateRef.registerPendingNotification(this);return}let r=o(async n=>await uc.sha256FromString(tt.stableOneWayStringify(n)),"createStateHash");try{let n=await r(e);if(this.lastStateNotificationPayloadHash&&n===this.lastStateNotificationPayloadHash)return;this.lastStateNotificationPayloadHash=n}catch(n){console.error(`State hash computation failed for '${this.name}':`,n)}this.state.next(e)}notifyChangeCumulative(){this.pendingCumulativeNotification&&clearTimeout(this.pendingCumulativeNotification),this.pendingCumulativeNotification=setTimeout(()=>{this.pendingCumulativeNotification=null,this.stateStore!==void 0&&this.notifyChange().catch(e=>{console.error(`notifyChangeCumulative failed for '${this.name}':`,e)})},0)}select(e,r){let n=r?.signal!=null;if(!n){if(e){if(this.selectorCache.has(e))return this.selectorCache.get(e)}else if(this.defaultSelectObservable)return this.defaultSelectObservable}let i=e||(c=>c),s=Symbol("selector-error"),a=this.state.pipe(Ne.rxjs.ops.filter(c=>c!==void 0),Ne.rxjs.ops.map(c=>{try{return i(c)}catch(u){return console.error(`Selector error in state part '${this.name}':`,u),s}}),Ne.rxjs.ops.filter(c=>c!==s),jo(tm));if(n)return a=a.pipe(zo(Bj(r.signal))),a;let l=a.pipe(eu({bufferSize:1,refCount:!0}));return e?this.selectorCache.set(e,l):this.defaultSelectObservable=l,l}createAction(e){return new fc(this,e)}createActionContext(e){let r=this;return{dispatch:o(async(n,i)=>{if(e>=t.MAX_NESTED_DISPATCH_DEPTH)throw new Error(`Maximum nested action dispatch depth (${t.MAX_NESTED_DISPATCH_DEPTH}) exceeded. Check for circular action dispatches.`);let s=r.createActionContext(e+1),a=await n.actionDef(r,i,s);return r.applyState(a)},"dispatch")}}async dispatchAction(e,r){if(this.disposed)throw new Error(`StatePart '${this.name}' has been disposed`);await this.cumulativeDeferred.promise;let n=o(async()=>{let i=this.createActionContext(0),s=await e.actionDef(this,r,i);return this.applyState(s)},"execute");return this.mutationQueue=this.mutationQueue.then(n,n)}async waitUntilPresent(e,r){let n,i;typeof r=="number"?n=r:r&&(n=r.timeoutMs,i=r.signal);let s=ie.defer(),a=this.select(e),l=!1;if(i?.aborted)throw new Error("Aborted");let c=a.subscribe(p=>{p!=null&&!l&&(l=!0,s.resolve(p))}),u;n&&(u=setTimeout(()=>{l||(l=!0,c.unsubscribe(),s.reject(new Error(`waitUntilPresent timed out after ${n}ms`)))},n));let f=i?()=>{l||(l=!0,c.unsubscribe(),u&&clearTimeout(u),s.reject(new Error("Aborted")))}:void 0;i&&f&&i.addEventListener("abort",f);try{return await s.promise}finally{c.unsubscribe(),u&&clearTimeout(u),i&&f&&i.removeEventListener("abort",f)}}async stateSetup(e){let r=e(this);this.cumulativeDeferred.addPromise(r),await this.setState(await r)}createProcess(e){if(this.disposed)throw new Error(`StatePart '${this.name}' has been disposed`);let r=new ma(this,e);return this.processes.push(r),e.autoStart&&r.start(),r}createScheduledAction(e){if(this.disposed)throw new Error(`StatePart '${this.name}' has been disposed`);let r=new ma(this,{producer:o(()=>Hm(e.intervalMs),"producer"),sideEffect:o(async()=>{await e.action.trigger(e.payload)},"sideEffect"),autoPause:e.autoPause??!1});return this.processes.push(r),r.start(),r}_removeProcess(e){let r=this.processes.indexOf(e);r!==-1&&this.processes.splice(r,1)}dispose(){if(!this.disposed){this.disposed=!0;for(let e of[...this.processes])e.dispose();this.processes.length=0,this.state.complete(),this.mutationQueue=Promise.resolve(),this.pendingCumulativeNotification&&(clearTimeout(this.pendingCumulativeNotification),this.pendingCumulativeNotification=null),this.middlewares.length=0,this.selectorCache=new WeakMap,this.defaultSelectObservable=null,this.webStore=null,this.smartstateRef=void 0,this.stateStore=void 0}}};function Xx(t,e){return Wm(t.map(r=>r.select())).pipe(Kr(r=>e(...r)),jo(tm))}o(Xx,"computed");var Zx=class{static{o(this,"Smartstate")}constructor(){this.statePartMap={},this.pendingStatePartCreation=new Map,this.batchDepth=0,this.isFlushing=!1,this.pendingNotifications=new Set}get isBatching(){return this.batchDepth>0}registerPendingNotification(e){this.pendingNotifications.add(e)}async batch(e){this.batchDepth++;try{await e()}finally{if(this.batchDepth--,this.batchDepth===0&&!this.isFlushing){this.isFlushing=!0;try{for(;this.pendingNotifications.size>0;){let r=[...this.pendingNotifications];this.pendingNotifications.clear();for(let n of r)try{await n.notifyChange()}catch(i){console.error("Error flushing notification for state part:",i)}}}finally{this.isFlushing=!1}}}}computed(e,r){return Xx(e,r)}dispose(){for(let e of Object.keys(this.statePartMap)){let r=this.statePartMap[e];r&&r.dispose()}this.statePartMap={},this.pendingStatePartCreation.clear(),this.pendingNotifications.clear()}async getStatePart(e,r,n="soft"){let i=this.pendingStatePartCreation.get(e);if(i)return i;let s=this.statePartMap[e];if(s)switch(n){case"mandatory":throw new Error(`State part '${e}' already exists, but initMode is 'mandatory'`);case"force":s.dispose();break;default:return s}else if(r===void 0)throw new Error(`State part '${e}' does not exist and no initial state provided`);let a=this.createStatePart(e,r,n);this.pendingStatePartCreation.set(e,a);try{return await a}finally{this.pendingStatePartCreation.delete(e)}}async createStatePart(e,r,n="soft"){let i=new pc(e,n==="persistent"?{dbName:"smartstate",storeName:e}:void 0);i.smartstateRef=this,await i.init();let s=i.getState();return n==="persistent"&&s!==void 0?await i.setState({...r,...s}):await i.setState(r),this.statePartMap[e]=i,i}};function jj(t,e){let{context:r,statePart:n,selectorFn:i}=e,s=new Set,a=n.select(i).subscribe(u=>{for(let f of s)f(u)}),l=o(()=>{let u=n.getState();if(u!==void 0)return i?i(u):u},"getValue"),c=o(u=>{let f=u,p=f.detail;if(!(!p||p.context!==r))if(f.stopPropagation(),p.subscribe){let h=p.callback;s.add(h);let m=o(()=>s.delete(h),"unsubscribe");h(l(),m)}else p.callback(l())},"handler");return t.addEventListener("context-request",c),()=>{t.removeEventListener("context-request",c),a.unsubscribe(),s.clear()}}o(jj,"attachContextProvider");var To={};se(To,{Smarturl:()=>eb});var eb=class t{static{o(this,"Smarturl")}static createFromUrl(e,r){let n=new URL(e),i={},s=[];n.search&&n.search.replace("?","").split("&").map(u=>{s.push({key:u.split("=")[0],value:u.split("=")[1]})});for(let u of s)i[u.key]=u.value;if(r?.searchParams)for(let u of Object.keys(r.searchParams))i[u]=r.searchParams[u];let a=n.pathname||"";if(Object.keys(i).length>0){a+="?";let u=!0;for(let f of Object.keys(i))u?u=!1:a+="&",a+=`${f}=${i[f]}`}let l={...n,href:n.href,origin:n.origin,protocol:n.protocol,username:n.username,password:n.password,host:n.host,hostname:n.hostname,port:n.port,path:a,pathname:n.pathname,search:n.search,searchParams:i,hash:n.hash};!l.port&&l.protocol==="https:"&&(l.port="443"),!l.port&&l.protocol==="http:"&&(l.port="80");let c=new t;return Object.assign(c,l),c}static createFromParsedUrl(e){let r=new t;return Object.assign(r,e),r}constructor(){this.searchParams={}}clone(){let e=new t;return Object.assign(e,this),e.searchParams={...this.searchParams},e}set(e,r){return this[e]=r,this}toString(){let e="";return this.username&&!this.password&&(e=`${this.username}@`),this.username&&this.password&&(e=`${this.username}:${this.password}@`),`${this.protocol}//${e}${this.hostname}:${this.port}${this.path}`}};var db={};se(db,{JsonLdTag:()=>Eo,MetaTag:()=>xr,OpengraphTag:()=>Nt,Title:()=>mb,WebSetup:()=>hc});var hb={};se(hb,{business:()=>nb,code:()=>ib,container:()=>ob,content:()=>ab,database:()=>tb,descriptors:()=>sb,finance:()=>rb,general:()=>lb,network:()=>rm,saas:()=>ub,storage:()=>fb,website:()=>pb});var nb={};var tb={};var rb={};var ib={};var ob={};var sb={};var ab={};var lb={};var rm={};se(rm,{ICnameDescriptor:()=>cb});var cb=class{static{o(this,"ICnameDescriptor")}};var ub={};var fb={};var pb={};var Si=class{static{o(this,"Tag")}constructor(){this.tagLevel="levelbound"}appendToDom(){!this.elementRef.parentElement&&!this.elementRef.parentNode&&document.getElementsByTagName("head")[0].appendChild(this.elementRef)}removeFromDom(){this.elementRef.parentElement?this.elementRef.parentElement.removeChild(this.elementRef):this.elementRef.parentNode&&this.elementRef.parentNode.removeChild(this.elementRef)}};var Eo=class t extends Si{static{o(this,"JsonLdTag")}static createCompanyJsonLd(e){let r={"@context":"https://schema.org","@type":"Corporation",name:e.name,alternateName:e.name.replace(" GmbH",""),url:e.website,logo:e.logoUrl,contactPoint:{"@type":"ContactPoint",telephone:e.phone,contactType:"customer service",areaServed:"DE",availableLanguage:["en","German"]},sameAs:[]},n=e.socials?.find(a=>a.type==="facebook")?.url;n&&r.sameAs.push(n);let i=e.socials?.find(a=>a.type==="twitter")?.url;return i&&r.sameAs.push(i),new t(r)}static createNewsArticleJsonLd(e){let r={"@context":"https://schema.org","@type":"NewsArticle",mainEntityOfPage:{"@type":"WebPage","@id":window.location.href},headline:"Article headline",image:[e.featuredImageUrl],datePublished:new Date(e.timestamp).toISOString(),dateModified:new Date(e.timestamp).toISOString(),author:{"@type":"Person",name:`${e.author.firstName} ${e.author.surName}`},publisher:{"@type":"Organization",name:e.author.surName,logo:{"@type":"ImageObject",url:e.author.surName}},description:e.author.firstName};return new t(r)}static createProductJsonLd(e,r){let n={"@context":"https://schema.org","@type":"SoftwareApplication",name:e.name,description:e.description,operatingSystem:e.os,applicationCategory:e.category,offers:{"@type":"Offer",name:"User-based Plan",priceSpecification:{"@type":"PropertyValueSpecification",valueName:"Number of Users",valueRequired:!0,price:"4.99",priceCurrency:"EUR"}},publisher:r?this.createCompanyJsonLd(r).elementRef.textContent:void 0,screenshot:"https://www.social.io/screenshot.png",url:"https://www.social.io/"};return new t(n)}constructor(e){super();let r=document.createElement("script");r.type="application/ld+json",r.text=JSON.stringify(e),this.elementRef=r}};var Nt=class t extends Si{static{o(this,"OpengraphTag")}static createNewsArticleOgTags(e){let r=[];return r.push(new t("og:url",e.url??globalThis.location.href)),r.push(new t("og:title",e.title)),r.push(new t("og:description",e.content)),r.push(new t("og:image",e.featuredImageUrl??"")),r}static createProductOgTags(e){let r=[];return r.push(new t("og:type","product")),r.push(new t("og:url",globalThis.location.href)),r.push(new t("og:title",`${e.name} - ${e.slogan}`)),r.push(new t("og:site_name",e.name)),r.push(new t("og:description",e.description)),r.push(new t("og:image",e.logoLink)),r}static createCompanyOgTags(e){let r=[];return r.push(new t("og:type","company")),r.push(new t("og:url",globalThis.location.href)),r.push(new t("og:title",e.name)),r.push(new t("og:site_name",e.name)),r.push(new t("og:description",e.description)),r.push(new t("og:image",e.logoUrl??"")),r}constructor(e,r){super();let n=document.createElement("meta");n.setAttribute("property",e),n.content=r,this.elementRef=n}};var da=class{static{o(this,"TagLevel")}set title(e){this.titleStore=e,this.state==="enabled"&&(document.title=this.titleStore)}get title(){return this.titleStore}constructor(e,r){this.tags=[],this.state="disabled",this.tagManagerRef=e,this.type=r}addTag(e){if(e instanceof Array)for(let r of e)this.addTag(r);else this.tags.push(e),this.state==="enabled"&&e.appendToDom()}async addCompanyInfo(e){this.addTag(Eo.createCompanyJsonLd(e)),this.addTag(new Nt("og:type","business.business")),this.addTag(new Nt("og:title",e.name)),this.addTag(new Nt("og:url",e.website??"")),this.addTag(new Nt("og:image",e.logoUrl??"")),this.addTag(new Nt("business:contact_data:street_address",`${e.address.streetName} ${e.address.houseNumber}`)),this.addTag(new Nt("business:contact_data:locality",e.address.postalCode)),this.addTag(new Nt("business:contact_data:region",e.address.city)),this.addTag(new Nt("business:contact_data:postal_code",e.address.postalCode)),this.addTag(new Nt("business:contact_data:country_name",e.address.country))}addNewsArticleInfo(e){this.addTag(Eo.createNewsArticleJsonLd(e)),this.addTag(Nt.createNewsArticleOgTags(e))}addProductInfo(e,r){this.addTag(Eo.createProductJsonLd(e,r)),this.addTag(Nt.createProductOgTags(e))}async enable(){this.title&&(document.title=this.title);for(let e of this.tags)e.appendToDom();this.state="enabled"}async disable(){for(let e of this.tags)e.removeFromDom();this.state="disabled"}};var xr=class extends Si{static{o(this,"MetaTag")}constructor(e,r){super();let n=document.createElement("meta");n.name=e,n.content=r,this.elementRef=n}};var nm=class{static{o(this,"TagManager")}constructor(){this.globalLevel=new da(this,"global"),this.baseLevel=new da(this,"base")}async setup(e){switch(this.globalLevel.addTag(new xr("google","notranslate")),this.globalLevel.addTag(new xr("revisit-after","1 days")),e.twitterHandle&&(this.globalLevel.addTag(new xr("twitter:card","summary_large_image")),this.globalLevel.addTag(new xr("twitter:site",e.twitterHandle)),this.globalLevel.addTag(new xr("twitter:creator",e.twitterHandle))),this.baseLevel.title=e.title,e.description&&this.baseLevel.addTag(new xr("description",e.description)),e.canonicalDomain&&this.baseLevel.addTag(new xr("canonical",e.canonicalDomain)),!0){case(e.ldCompany&&!e.ldProduct):this.baseLevel.addCompanyInfo(e.ldCompany);break;case!!e.ldProduct:this.baseLevel.addProductInfo(e.ldProduct,e.ldCompany);break}await this.globalLevel.enable(),this.activeLevel=this.baseLevel,await this.activeLevel.enable()}async setSubPageLevel(e){let r=new da(this,"subpage");return r.title=e.title,e.description&&r.addTag(new xr("description",e.description)),await this.activeLevel.disable(),this.activeLevel=r,await this.activeLevel.enable(),r}async revertToBaseLevel(){this.activeLevel!==this.baseLevel&&(await this.activeLevel.disable(),this.activeLevel=this.baseLevel,await this.activeLevel.enable())}};var hc=class{static{o(this,"WebSetup")}constructor(e){this.tagManager=new nm,this.readyDeferred=ie.defer(),this.readyForSmartssrDeferred=ie.defer(),this.readyPromise=this.readyDeferred.promise,this.readyForSmartssrPromise=this.readyForSmartssrDeferred.promise,this.options=e,this.setup().then(()=>{this.readyDeferred.resolve(),this.options.smartssrWaitForReadySignal||this.readyForSmartssrDeferred.resolve()})}async setup(e){e&&(this.options=e),await this.tagManager.setup(this.options.metaObject)}revertToBaseLevel(){this.tagManager.revertToBaseLevel()}async setSubLevel(e){return await this.tagManager.setSubPageLevel(e)}flashTitle(e){}informReadyForSmartssr(){this.options.smartssrWaitForReadySignal||console.error("You have not indicated that you inform smartssr by a dedicated signal! Please consider doing so!"),this.readyForSmartssrDeferred.resolve()}};var mb=class{static{o(this,"Title")}};var Wj="1.3.17";function yC(t,e,r){return Math.max(t,Math.min(e,r))}o(yC,"clamp");function Hj(t,e,r){return(1-r)*t+r*e}o(Hj,"lerp");function Uj(t,e,r,n){return Hj(t,e,1-Math.exp(-r*n))}o(Uj,"damp");function qj(t,e){return(t%e+e)%e}o(qj,"modulo");var Yj=class{static{o(this,"Animate")}isRunning=!1;value=0;from=0;to=0;currentTime=0;lerp;duration;easing;onUpdate;advance(t){if(!this.isRunning)return;let e=!1;if(this.duration&&this.easing){this.currentTime+=t;let r=yC(0,this.currentTime/this.duration,1);e=r>=1;let n=e?1:this.easing(r);this.value=this.from+(this.to-this.from)*n}else this.lerp?(this.value=Uj(this.value,this.to,this.lerp*60,t),Math.round(this.value)===this.to&&(this.value=this.to,e=!0)):(this.value=this.to,e=!0);e&&this.stop(),this.onUpdate?.(this.value,e)}stop(){this.isRunning=!1}fromTo(t,e,{lerp:r,duration:n,easing:i,onStart:s,onUpdate:a}){this.from=this.value=t,this.to=e,this.lerp=r,this.duration=n,this.easing=i,this.currentTime=0,this.isRunning=!0,s?.(),this.onUpdate=a}};function Vj(t,e){let r;return function(...n){let i=this;clearTimeout(r),r=setTimeout(()=>{r=void 0,t.apply(i,n)},e)}}o(Vj,"debounce");var Kj=class{static{o(this,"Dimensions")}constructor(t,e,{autoResize:r=!0,debounce:n=250}={}){this.wrapper=t,this.content=e,r&&(this.debouncedResize=Vj(this.resize,n),this.wrapper instanceof Window?window.addEventListener("resize",this.debouncedResize,!1):(this.wrapperResizeObserver=new ResizeObserver(this.debouncedResize),this.wrapperResizeObserver.observe(this.wrapper)),this.contentResizeObserver=new ResizeObserver(this.debouncedResize),this.contentResizeObserver.observe(this.content)),this.resize()}width=0;height=0;scrollHeight=0;scrollWidth=0;debouncedResize;wrapperResizeObserver;contentResizeObserver;destroy(){this.wrapperResizeObserver?.disconnect(),this.contentResizeObserver?.disconnect(),this.wrapper===window&&this.debouncedResize&&window.removeEventListener("resize",this.debouncedResize,!1)}resize=o(()=>{this.onWrapperResize(),this.onContentResize()},"resize");onWrapperResize=o(()=>{this.wrapper instanceof Window?(this.width=window.innerWidth,this.height=window.innerHeight):(this.width=this.wrapper.clientWidth,this.height=this.wrapper.clientHeight)},"onWrapperResize");onContentResize=o(()=>{this.wrapper instanceof Window?(this.scrollHeight=this.content.scrollHeight,this.scrollWidth=this.content.scrollWidth):(this.scrollHeight=this.wrapper.scrollHeight,this.scrollWidth=this.wrapper.scrollWidth)},"onContentResize");get limit(){return{x:this.scrollWidth-this.width,y:this.scrollHeight-this.height}}},xC=class{static{o(this,"Emitter")}events={};emit(t,...e){let r=this.events[t]||[];for(let n=0,i=r.length;n<i;n++)r[n]?.(...e)}on(t,e){return this.events[t]?.push(e)||(this.events[t]=[e]),()=>{this.events[t]=this.events[t]?.filter(r=>e!==r)}}off(t,e){this.events[t]=this.events[t]?.filter(r=>e!==r)}destroy(){this.events={}}},bC=100/6,ki={passive:!1},Gj=class{static{o(this,"VirtualScroll")}constructor(t,e={wheelMultiplier:1,touchMultiplier:1}){this.element=t,this.options=e,window.addEventListener("resize",this.onWindowResize,!1),this.onWindowResize(),this.element.addEventListener("wheel",this.onWheel,ki),this.element.addEventListener("touchstart",this.onTouchStart,ki),this.element.addEventListener("touchmove",this.onTouchMove,ki),this.element.addEventListener("touchend",this.onTouchEnd,ki)}touchStart={x:0,y:0};lastDelta={x:0,y:0};window={width:0,height:0};emitter=new xC;on(t,e){return this.emitter.on(t,e)}destroy(){this.emitter.destroy(),window.removeEventListener("resize",this.onWindowResize,!1),this.element.removeEventListener("wheel",this.onWheel,ki),this.element.removeEventListener("touchstart",this.onTouchStart,ki),this.element.removeEventListener("touchmove",this.onTouchMove,ki),this.element.removeEventListener("touchend",this.onTouchEnd,ki)}onTouchStart=o(t=>{let{clientX:e,clientY:r}=t.targetTouches?t.targetTouches[0]:t;this.touchStart.x=e,this.touchStart.y=r,this.lastDelta={x:0,y:0},this.emitter.emit("scroll",{deltaX:0,deltaY:0,event:t})},"onTouchStart");onTouchMove=o(t=>{let{clientX:e,clientY:r}=t.targetTouches?t.targetTouches[0]:t,n=-(e-this.touchStart.x)*this.options.touchMultiplier,i=-(r-this.touchStart.y)*this.options.touchMultiplier;this.touchStart.x=e,this.touchStart.y=r,this.lastDelta={x:n,y:i},this.emitter.emit("scroll",{deltaX:n,deltaY:i,event:t})},"onTouchMove");onTouchEnd=o(t=>{this.emitter.emit("scroll",{deltaX:this.lastDelta.x,deltaY:this.lastDelta.y,event:t})},"onTouchEnd");onWheel=o(t=>{let{deltaX:e,deltaY:r,deltaMode:n}=t,i=n===1?bC:n===2?this.window.width:1,s=n===1?bC:n===2?this.window.height:1;e*=i,r*=s,e*=this.options.wheelMultiplier,r*=this.options.wheelMultiplier,this.emitter.emit("scroll",{deltaX:e,deltaY:r,event:t})},"onWheel");onWindowResize=o(()=>{this.window={width:window.innerWidth,height:window.innerHeight}},"onWindowResize")},wC=o(t=>Math.min(1,1.001-Math.pow(2,-10*t)),"defaultEasing"),mc=class{static{o(this,"Lenis")}_isScrolling=!1;_isStopped=!1;_isLocked=!1;_preventNextNativeScrollEvent=!1;_resetVelocityTimeout=null;_rafId=null;isTouching;time=0;userData={};lastVelocity=0;velocity=0;direction=0;options;targetScroll;animatedScroll;animate=new Yj;emitter=new xC;dimensions;virtualScroll;constructor({wrapper:t=window,content:e=document.documentElement,eventsTarget:r=t,smoothWheel:n=!0,syncTouch:i=!1,syncTouchLerp:s=.075,touchInertiaExponent:a=1.7,duration:l,easing:c,lerp:u=.1,infinite:f=!1,orientation:p="vertical",gestureOrientation:h=p==="horizontal"?"both":"vertical",touchMultiplier:m=1,wheelMultiplier:d=1,autoResize:g=!0,prevent:y,virtualScroll:x,overscroll:T=!0,autoRaf:E=!1,anchors:L=!1,autoToggle:P=!1,allowNestedScroll:D=!1,__experimental__naiveDimensions:F=!1,naiveDimensions:A=F,stopInertiaOnNavigate:W=!1}={}){window.lenisVersion=Wj,(!t||t===document.documentElement)&&(t=window),typeof l=="number"&&typeof c!="function"?c=wC:typeof c=="function"&&typeof l!="number"&&(l=1),this.options={wrapper:t,content:e,eventsTarget:r,smoothWheel:n,syncTouch:i,syncTouchLerp:s,touchInertiaExponent:a,duration:l,easing:c,lerp:u,infinite:f,gestureOrientation:h,orientation:p,touchMultiplier:m,wheelMultiplier:d,autoResize:g,prevent:y,virtualScroll:x,overscroll:T,autoRaf:E,anchors:L,autoToggle:P,allowNestedScroll:D,naiveDimensions:A,stopInertiaOnNavigate:W},this.dimensions=new Kj(t,e,{autoResize:g}),this.updateClassName(),this.targetScroll=this.animatedScroll=this.actualScroll,this.options.wrapper.addEventListener("scroll",this.onNativeScroll,!1),this.options.wrapper.addEventListener("scrollend",this.onScrollEnd,{capture:!0}),(this.options.anchors||this.options.stopInertiaOnNavigate)&&this.options.wrapper.addEventListener("click",this.onClick,!1),this.options.wrapper.addEventListener("pointerdown",this.onPointerDown,!1),this.virtualScroll=new Gj(r,{touchMultiplier:m,wheelMultiplier:d}),this.virtualScroll.on("scroll",this.onVirtualScroll),this.options.autoToggle&&(this.checkOverflow(),this.rootElement.addEventListener("transitionend",this.onTransitionEnd,{passive:!0})),this.options.autoRaf&&(this._rafId=requestAnimationFrame(this.raf))}destroy(){this.emitter.destroy(),this.options.wrapper.removeEventListener("scroll",this.onNativeScroll,!1),this.options.wrapper.removeEventListener("scrollend",this.onScrollEnd,{capture:!0}),this.options.wrapper.removeEventListener("pointerdown",this.onPointerDown,!1),(this.options.anchors||this.options.stopInertiaOnNavigate)&&this.options.wrapper.removeEventListener("click",this.onClick,!1),this.virtualScroll.destroy(),this.dimensions.destroy(),this.cleanUpClassName(),this._rafId&&cancelAnimationFrame(this._rafId)}on(t,e){return this.emitter.on(t,e)}off(t,e){return this.emitter.off(t,e)}onScrollEnd=o(t=>{t instanceof CustomEvent||(this.isScrolling==="smooth"||this.isScrolling===!1)&&t.stopPropagation()},"onScrollEnd");dispatchScrollendEvent=o(()=>{this.options.wrapper.dispatchEvent(new CustomEvent("scrollend",{bubbles:this.options.wrapper===window,detail:{lenisScrollEnd:!0}}))},"dispatchScrollendEvent");get overflow(){let t=this.isHorizontal?"overflow-x":"overflow-y";return getComputedStyle(this.rootElement)[t]}checkOverflow(){["hidden","clip"].includes(this.overflow)?this.internalStop():this.internalStart()}onTransitionEnd=o(t=>{t.propertyName.includes("overflow")&&this.checkOverflow()},"onTransitionEnd");setScroll(t){this.isHorizontal?this.options.wrapper.scrollTo({left:t,behavior:"instant"}):this.options.wrapper.scrollTo({top:t,behavior:"instant"})}onClick=o(t=>{let r=t.composedPath().filter(n=>n instanceof HTMLAnchorElement&&n.getAttribute("href"));if(this.options.anchors){let n=r.find(i=>i.getAttribute("href")?.includes("#"));if(n){let i=n.getAttribute("href");if(i){let s=typeof this.options.anchors=="object"&&this.options.anchors?this.options.anchors:void 0,a=`#${i.split("#")[1]}`;this.scrollTo(a,s)}}}this.options.stopInertiaOnNavigate&&r.find(i=>i.host===window.location.host)&&this.reset()},"onClick");onPointerDown=o(t=>{t.button===1&&this.reset()},"onPointerDown");onVirtualScroll=o(t=>{if(typeof this.options.virtualScroll=="function"&&this.options.virtualScroll(t)===!1)return;let{deltaX:e,deltaY:r,event:n}=t;if(this.emitter.emit("virtual-scroll",{deltaX:e,deltaY:r,event:n}),n.ctrlKey||n.lenisStopPropagation)return;let i=n.type.includes("touch"),s=n.type.includes("wheel");this.isTouching=n.type==="touchstart"||n.type==="touchmove";let a=e===0&&r===0;if(this.options.syncTouch&&i&&n.type==="touchstart"&&a&&!this.isStopped&&!this.isLocked){this.reset();return}let c=this.options.gestureOrientation==="vertical"&&r===0||this.options.gestureOrientation==="horizontal"&&e===0;if(a||c)return;let u=n.composedPath();u=u.slice(0,u.indexOf(this.rootElement));let f=this.options.prevent;if(u.find(y=>y instanceof HTMLElement&&(typeof f=="function"&&f?.(y)||y.hasAttribute?.("data-lenis-prevent")||i&&y.hasAttribute?.("data-lenis-prevent-touch")||s&&y.hasAttribute?.("data-lenis-prevent-wheel")||this.options.allowNestedScroll&&this.checkNestedScroll(y,{deltaX:e,deltaY:r}))))return;if(this.isStopped||this.isLocked){n.cancelable&&n.preventDefault();return}if(!(this.options.syncTouch&&i||this.options.smoothWheel&&s)){this.isScrolling="native",this.animate.stop(),n.lenisStopPropagation=!0;return}let h=r;this.options.gestureOrientation==="both"?h=Math.abs(r)>Math.abs(e)?r:e:this.options.gestureOrientation==="horizontal"&&(h=e),(!this.options.overscroll||this.options.infinite||this.options.wrapper!==window&&this.limit>0&&(this.animatedScroll>0&&this.animatedScroll<this.limit||this.animatedScroll===0&&r>0||this.animatedScroll===this.limit&&r<0))&&(n.lenisStopPropagation=!0),n.cancelable&&n.preventDefault();let m=i&&this.options.syncTouch,g=i&&n.type==="touchend";g&&(h=Math.sign(this.velocity)*Math.pow(Math.abs(this.velocity),this.options.touchInertiaExponent)),this.scrollTo(this.targetScroll+h,{programmatic:!1,...m?{lerp:g?this.options.syncTouchLerp:1}:{lerp:this.options.lerp,duration:this.options.duration,easing:this.options.easing}})},"onVirtualScroll");resize(){this.dimensions.resize(),this.animatedScroll=this.targetScroll=this.actualScroll,this.emit()}emit(){this.emitter.emit("scroll",this)}onNativeScroll=o(()=>{if(this._resetVelocityTimeout!==null&&(clearTimeout(this._resetVelocityTimeout),this._resetVelocityTimeout=null),this._preventNextNativeScrollEvent){this._preventNextNativeScrollEvent=!1;return}if(this.isScrolling===!1||this.isScrolling==="native"){let t=this.animatedScroll;this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity,this.velocity=this.animatedScroll-t,this.direction=Math.sign(this.animatedScroll-t),this.isStopped||(this.isScrolling="native"),this.emit(),this.velocity!==0&&(this._resetVelocityTimeout=setTimeout(()=>{this.lastVelocity=this.velocity,this.velocity=0,this.isScrolling=!1,this.emit()},400))}},"onNativeScroll");reset(){this.isLocked=!1,this.isScrolling=!1,this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity=0,this.animate.stop()}start(){if(this.isStopped){if(this.options.autoToggle){this.rootElement.style.removeProperty("overflow");return}this.internalStart()}}internalStart(){this.isStopped&&(this.reset(),this.isStopped=!1,this.emit())}stop(){if(!this.isStopped){if(this.options.autoToggle){this.rootElement.style.setProperty("overflow","clip");return}this.internalStop()}}internalStop(){this.isStopped||(this.reset(),this.isStopped=!0,this.emit())}raf=o(t=>{let e=t-(this.time||t);this.time=t,this.animate.advance(e*.001),this.options.autoRaf&&(this._rafId=requestAnimationFrame(this.raf))},"raf");scrollTo(t,{offset:e=0,immediate:r=!1,lock:n=!1,programmatic:i=!0,lerp:s=i?this.options.lerp:void 0,duration:a=i?this.options.duration:void 0,easing:l=i?this.options.easing:void 0,onStart:c,onComplete:u,force:f=!1,userData:p}={}){if(!((this.isStopped||this.isLocked)&&!f)){if(typeof t=="string"&&["top","left","start","#"].includes(t))t=0;else if(typeof t=="string"&&["bottom","right","end"].includes(t))t=this.limit;else{let h;if(typeof t=="string"?(h=document.querySelector(t),h||(t==="#top"?t=0:console.warn("Lenis: Target not found",t))):t instanceof HTMLElement&&t?.nodeType&&(h=t),h){if(this.options.wrapper!==window){let d=this.rootElement.getBoundingClientRect();e-=this.isHorizontal?d.left:d.top}let m=h.getBoundingClientRect();t=(this.isHorizontal?m.left:m.top)+this.animatedScroll}}if(typeof t=="number"){if(t+=e,t=Math.round(t),this.options.infinite){if(i){this.targetScroll=this.animatedScroll=this.scroll;let h=t-this.animatedScroll;h>this.limit/2?t=t-this.limit:h<-this.limit/2&&(t=t+this.limit)}}else t=yC(0,t,this.limit);if(t===this.targetScroll){c?.(this),u?.(this);return}if(this.userData=p??{},r){this.animatedScroll=this.targetScroll=t,this.setScroll(this.scroll),this.reset(),this.preventNextNativeScrollEvent(),this.emit(),u?.(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()});return}i||(this.targetScroll=t),typeof a=="number"&&typeof l!="function"?l=wC:typeof l=="function"&&typeof a!="number"&&(a=1),this.animate.fromTo(this.animatedScroll,t,{duration:a,easing:l,lerp:s,onStart:o(()=>{n&&(this.isLocked=!0),this.isScrolling="smooth",c?.(this)},"onStart"),onUpdate:o((h,m)=>{this.isScrolling="smooth",this.lastVelocity=this.velocity,this.velocity=h-this.animatedScroll,this.direction=Math.sign(this.velocity),this.animatedScroll=h,this.setScroll(this.scroll),i&&(this.targetScroll=h),m||this.emit(),m&&(this.reset(),this.emit(),u?.(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()}),this.preventNextNativeScrollEvent())},"onUpdate")})}}}preventNextNativeScrollEvent(){this._preventNextNativeScrollEvent=!0,requestAnimationFrame(()=>{this._preventNextNativeScrollEvent=!1})}checkNestedScroll(t,{deltaX:e,deltaY:r}){let n=Date.now(),i=t._lenis??={},s,a,l,c,u,f,p,h,m=this.options.gestureOrientation;if(n-(i.time??0)>2e3){i.time=Date.now();let P=window.getComputedStyle(t);i.computedStyle=P;let D=P.overflowX,F=P.overflowY;if(s=["auto","overlay","scroll"].includes(D),a=["auto","overlay","scroll"].includes(F),i.hasOverflowX=s,i.hasOverflowY=a,!s&&!a||m==="vertical"&&!a||m==="horizontal"&&!s)return!1;u=t.scrollWidth,f=t.scrollHeight,p=t.clientWidth,h=t.clientHeight,l=u>p,c=f>h,i.isScrollableX=l,i.isScrollableY=c,i.scrollWidth=u,i.scrollHeight=f,i.clientWidth=p,i.clientHeight=h}else l=i.isScrollableX,c=i.isScrollableY,s=i.hasOverflowX,a=i.hasOverflowY,u=i.scrollWidth,f=i.scrollHeight,p=i.clientWidth,h=i.clientHeight;if(!s&&!a||!l&&!c||m==="vertical"&&(!a||!c)||m==="horizontal"&&(!s||!l))return!1;let d;if(m==="horizontal")d="x";else if(m==="vertical")d="y";else{let P=e!==0,D=r!==0;P&&s&&l&&(d="x"),D&&a&&c&&(d="y")}if(!d)return!1;let g,y,x,T,E;if(d==="x")g=t.scrollLeft,y=u-p,x=e,T=s,E=l;else if(d==="y")g=t.scrollTop,y=f-h,x=r,T=a,E=c;else return!1;return(x>0?g<y:g>0)&&T&&E}get rootElement(){return this.options.wrapper===window?document.documentElement:this.options.wrapper}get limit(){return this.options.naiveDimensions?this.isHorizontal?this.rootElement.scrollWidth-this.rootElement.clientWidth:this.rootElement.scrollHeight-this.rootElement.clientHeight:this.dimensions.limit[this.isHorizontal?"x":"y"]}get isHorizontal(){return this.options.orientation==="horizontal"}get actualScroll(){let t=this.options.wrapper;return this.isHorizontal?t.scrollX??t.scrollLeft:t.scrollY??t.scrollTop}get scroll(){return this.options.infinite?qj(this.animatedScroll,this.limit):this.animatedScroll}get progress(){return this.limit===0?1:this.scroll/this.limit}get isScrolling(){return this._isScrolling}set isScrolling(t){this._isScrolling!==t&&(this._isScrolling=t,this.updateClassName())}get isStopped(){return this._isStopped}set isStopped(t){this._isStopped!==t&&(this._isStopped=t,this.updateClassName())}get isLocked(){return this._isLocked}set isLocked(t){this._isLocked!==t&&(this._isLocked=t,this.updateClassName())}get isSmooth(){return this.isScrolling==="smooth"}get className(){let t="lenis";return this.options.autoToggle&&(t+=" lenis-autoToggle"),this.isStopped&&(t+=" lenis-stopped"),this.isLocked&&(t+=" lenis-locked"),this.isScrolling&&(t+=" lenis-scrolling"),this.isScrolling==="smooth"&&(t+=" lenis-smooth"),t}updateClassName(){this.cleanUpClassName(),this.rootElement.className=`${this.rootElement.className} ${this.className}`.trim()}cleanUpClassName(){this.rootElement.className=this.rootElement.className.replace(/lenis(-\w+)?/g,"").trim()}};var ga=zr(vC(),1),Jj={ObjectMap:bn,Stringmap:Va,FastMap:Wi};var Mb={};se(Mb,{containerContextStyles:()=>dz,cssForConstraint:()=>hz,cssForConstraintContainer:()=>mz,cssForContainer:()=>WC,cssForDesktop:()=>gz,cssForNotebook:()=>yz,cssForPhablet:()=>bz,cssForPhone:()=>wz,cssForTablet:()=>xz,cssForViewport:()=>Po,desktop:()=>FC,notebook:()=>$C,phablet:()=>jC,phone:()=>zC,tablet:()=>BC});var om=globalThis,dc=om.ShadowRoot&&(om.ShadyCSS===void 0||om.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,xb=Symbol(),SC=new WeakMap,ya=class{static{o(this,"n")}constructor(e,r,n){if(this._$cssResult$=!0,n!==xb)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=r}get styleSheet(){let e=this.o,r=this.t;if(dc&&e===void 0){let n=r!==void 0&&r.length===1;n&&(e=SC.get(r)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&SC.set(r,e))}return e}toString(){return this.cssText}},rr=o(t=>new ya(typeof t=="string"?t:t+"",void 0,xb),"r"),Rr=o((t,...e)=>{let r=t.length===1?t[0]:e.reduce((n,i,s)=>n+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[s+1],t[0]);return new ya(r,t,xb)},"i"),sm=o((t,e)=>{if(dc)t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of e){let n=document.createElement("style"),i=om.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,t.appendChild(n)}},"S"),gc=dc?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let r="";for(let n of e.cssRules)r+=n.cssText;return rr(r)})(t):t;var{is:Qj,defineProperty:Xj,getOwnPropertyDescriptor:Zj,getOwnPropertyNames:ez,getOwnPropertySymbols:tz,getPrototypeOf:rz}=Object,am=globalThis,kC=am.trustedTypes,nz=kC?kC.emptyScript:"",iz=am.reactiveElementPolyfillSupport,yc=o((t,e)=>t,"d"),lm={toAttribute(t,e){switch(e){case Boolean:t=t?nz:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let r=t;switch(e){case Boolean:r=t!==null;break;case Number:r=t===null?null:Number(t);break;case Object:case Array:try{r=JSON.parse(t)}catch{r=null}}return r}},bb=o((t,e)=>!Qj(t,e),"f"),TC={attribute:!0,type:String,converter:lm,reflect:!1,useDefault:!1,hasChanged:bb};Symbol.metadata??=Symbol("metadata"),am.litPropertyMetadata??=new WeakMap;var gn=class extends HTMLElement{static{o(this,"y")}static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,r=TC){if(r.state&&(r.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((r=Object.create(r)).wrapped=!0),this.elementProperties.set(e,r),!r.noAccessor){let n=Symbol(),i=this.getPropertyDescriptor(e,n,r);i!==void 0&&Xj(this.prototype,e,i)}}static getPropertyDescriptor(e,r,n){let{get:i,set:s}=Zj(this.prototype,e)??{get(){return this[r]},set(a){this[r]=a}};return{get:i,set(a){let l=i?.call(this);s?.call(this,a),this.requestUpdate(e,l,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??TC}static _$Ei(){if(this.hasOwnProperty(yc("elementProperties")))return;let e=rz(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(yc("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(yc("properties"))){let r=this.properties,n=[...ez(r),...tz(r)];for(let i of n)this.createProperty(i,r[i])}let e=this[Symbol.metadata];if(e!==null){let r=litPropertyMetadata.get(e);if(r!==void 0)for(let[n,i]of r)this.elementProperties.set(n,i)}this._$Eh=new Map;for(let[r,n]of this.elementProperties){let i=this._$Eu(r,n);i!==void 0&&this._$Eh.set(i,r)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let r=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let i of n)r.unshift(gc(i))}else e!==void 0&&r.push(gc(e));return r}static _$Eu(e,r){let n=r.attribute;return n===!1?void 0:typeof n=="string"?n:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,r=this.constructor.elementProperties;for(let n of r.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return sm(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,r,n){this._$AK(e,n)}_$ET(e,r){let n=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,n);if(i!==void 0&&n.reflect===!0){let s=(n.converter?.toAttribute!==void 0?n.converter:lm).toAttribute(r,n.type);this._$Em=e,s==null?this.removeAttribute(i):this.setAttribute(i,s),this._$Em=null}}_$AK(e,r){let n=this.constructor,i=n._$Eh.get(e);if(i!==void 0&&this._$Em!==i){let s=n.getPropertyOptions(i),a=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:lm;this._$Em=i;let l=a.fromAttribute(r,s.type);this[i]=l??this._$Ej?.get(i)??l,this._$Em=null}}requestUpdate(e,r,n,i=!1,s){if(e!==void 0){let a=this.constructor;if(i===!1&&(s=this[e]),n??=a.getPropertyOptions(e),!((n.hasChanged??bb)(s,r)||n.useDefault&&n.reflect&&s===this._$Ej?.get(e)&&!this.hasAttribute(a._$Eu(e,n))))return;this.C(e,r,n)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,r,{useDefault:n,reflect:i,wrapped:s},a){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,a??r??this[e]),s!==!0||a!==void 0)||(this._$AL.has(e)||(this.hasUpdated||n||(r=void 0),this._$AL.set(e,r)),i===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(r){Promise.reject(r)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[i,s]of this._$Ep)this[i]=s;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[i,s]of n){let{wrapped:a}=s,l=this[i];a!==!0||this._$AL.has(i)||l===void 0||this.C(i,void 0,s,l)}}let e=!1,r=this._$AL;try{e=this.shouldUpdate(r),e?(this.willUpdate(r),this._$EO?.forEach(n=>n.hostUpdate?.()),this.update(r)):this._$EM()}catch(n){throw e=!1,this._$EM(),n}e&&this._$AE(r)}willUpdate(e){}_$AE(e){this._$EO?.forEach(r=>r.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(r=>this._$ET(r,this[r])),this._$EM()}updated(e){}firstUpdated(e){}};gn.elementStyles=[],gn.shadowRootOptions={mode:"open"},gn[yc("elementProperties")]=new Map,gn[yc("finalized")]=new Map,iz?.({ReactiveElement:gn}),(am.reactiveElementVersions??=[]).push("2.1.2");var wb=globalThis,EC=o(t=>t,"i"),cm=wb.trustedTypes,DC=cm?cm.createPolicy("lit-html",{createHTML:o(t=>t,"createHTML")}):void 0,vb="$lit$",Rn=`lit$${Math.random().toFixed(9).slice(2)}$`,Sb="?"+Rn,oz=`<${Sb}>`,Do=document,xc=o(()=>Do.createComment(""),"c"),bc=o(t=>t===null||typeof t!="object"&&typeof t!="function","a"),kb=Array.isArray,CC=o(t=>kb(t)||typeof t?.[Symbol.iterator]=="function","d"),Tb=`[
282
+ \f\r]`,wc=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,OC=/-->/g,MC=/>/g,Co=RegExp(`>|${Tb}(?:([^\\s"'>=/]+)(${Tb}*=${Tb}*(?:[^
283
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),IC=/'/g,NC=/"/g,PC=/^(?:script|style|textarea|title)$/i,Eb=o(t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),"x"),Db=Eb(1),sz=Eb(2),az=Eb(3),Ti=Symbol.for("lit-noChange"),it=Symbol.for("lit-nothing"),LC=new WeakMap,Oo=Do.createTreeWalker(Do,129);function _C(t,e){if(!kb(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return DC!==void 0?DC.createHTML(e):e}o(_C,"V");var RC=o((t,e)=>{let r=t.length-1,n=[],i,s=e===2?"<svg>":e===3?"<math>":"",a=wc;for(let l=0;l<r;l++){let c=t[l],u,f,p=-1,h=0;for(;h<c.length&&(a.lastIndex=h,f=a.exec(c),f!==null);)h=a.lastIndex,a===wc?f[1]==="!--"?a=OC:f[1]!==void 0?a=MC:f[2]!==void 0?(PC.test(f[2])&&(i=RegExp("</"+f[2],"g")),a=Co):f[3]!==void 0&&(a=Co):a===Co?f[0]===">"?(a=i??wc,p=-1):f[1]===void 0?p=-2:(p=a.lastIndex-f[2].length,u=f[1],a=f[3]===void 0?Co:f[3]==='"'?NC:IC):a===NC||a===IC?a=Co:a===OC||a===MC?a=wc:(a=Co,i=void 0);let m=a===Co&&t[l+1].startsWith("/>")?" ":"";s+=a===wc?c+oz:p>=0?(n.push(u),c.slice(0,p)+vb+c.slice(p)+Rn+m):c+Rn+(p===-2?l:m)}return[_C(t,s+(t[r]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),n]},"N"),vc=class t{static{o(this,"S")}constructor({strings:e,_$litType$:r},n){let i;this.parts=[];let s=0,a=0,l=e.length-1,c=this.parts,[u,f]=RC(e,r);if(this.el=t.createElement(u,n),Oo.currentNode=this.el.content,r===2||r===3){let p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(i=Oo.nextNode())!==null&&c.length<l;){if(i.nodeType===1){if(i.hasAttributes())for(let p of i.getAttributeNames())if(p.endsWith(vb)){let h=f[a++],m=i.getAttribute(p).split(Rn),d=/([.?@])?(.*)/.exec(h);c.push({type:1,index:s,name:d[2],strings:m,ctor:d[1]==="."?fm:d[1]==="?"?pm:d[1]==="@"?hm:Io}),i.removeAttribute(p)}else p.startsWith(Rn)&&(c.push({type:6,index:s}),i.removeAttribute(p));if(PC.test(i.tagName)){let p=i.textContent.split(Rn),h=p.length-1;if(h>0){i.textContent=cm?cm.emptyScript:"";for(let m=0;m<h;m++)i.append(p[m],xc()),Oo.nextNode(),c.push({type:2,index:++s});i.append(p[h],xc())}}}else if(i.nodeType===8)if(i.data===Sb)c.push({type:2,index:s});else{let p=-1;for(;(p=i.data.indexOf(Rn,p+1))!==-1;)c.push({type:7,index:s}),p+=Rn.length-1}s++}}static createElement(e,r){let n=Do.createElement("template");return n.innerHTML=e,n}};function Mo(t,e,r=t,n){if(e===Ti)return e;let i=n!==void 0?r._$Co?.[n]:r._$Cl,s=bc(e)?void 0:e._$litDirective$;return i?.constructor!==s&&(i?._$AO?.(!1),s===void 0?i=void 0:(i=new s(t),i._$AT(t,r,n)),n!==void 0?(r._$Co??=[])[n]=i:r._$Cl=i),i!==void 0&&(e=Mo(t,i._$AS(t,e.values),i,n)),e}o(Mo,"M");var um=class{static{o(this,"R")}constructor(e,r){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:r},parts:n}=this._$AD,i=(e?.creationScope??Do).importNode(r,!0);Oo.currentNode=i;let s=Oo.nextNode(),a=0,l=0,c=n[0];for(;c!==void 0;){if(a===c.index){let u;c.type===2?u=new xa(s,s.nextSibling,this,e):c.type===1?u=new c.ctor(s,c.name,c.strings,this,e):c.type===6&&(u=new mm(s,this,e)),this._$AV.push(u),c=n[++l]}a!==c?.index&&(s=Oo.nextNode(),a++)}return Oo.currentNode=Do,i}p(e){let r=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,r),r+=n.strings.length-2):n._$AI(e[r])),r++}},xa=class t{static{o(this,"k")}get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,r,n,i){this.type=2,this._$AH=it,this._$AN=void 0,this._$AA=e,this._$AB=r,this._$AM=n,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,r=this._$AM;return r!==void 0&&e?.nodeType===11&&(e=r.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,r=this){e=Mo(this,e,r),bc(e)?e===it||e==null||e===""?(this._$AH!==it&&this._$AR(),this._$AH=it):e!==this._$AH&&e!==Ti&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):CC(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==it&&bc(this._$AH)?this._$AA.nextSibling.data=e:this.T(Do.createTextNode(e)),this._$AH=e}$(e){let{values:r,_$litType$:n}=e,i=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=vc.createElement(_C(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===i)this._$AH.p(r);else{let s=new um(i,this),a=s.u(this.options);s.p(r),this.T(a),this._$AH=s}}_$AC(e){let r=LC.get(e.strings);return r===void 0&&LC.set(e.strings,r=new vc(e)),r}k(e){kb(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,n,i=0;for(let s of e)i===r.length?r.push(n=new t(this.O(xc()),this.O(xc()),this,this.options)):n=r[i],n._$AI(s),i++;i<r.length&&(this._$AR(n&&n._$AB.nextSibling,i),r.length=i)}_$AR(e=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);e!==this._$AB;){let n=EC(e).nextSibling;EC(e).remove(),e=n}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},Io=class{static{o(this,"H")}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,r,n,i,s){this.type=1,this._$AH=it,this._$AN=void 0,this.element=e,this.name=r,this._$AM=i,this.options=s,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=it}_$AI(e,r=this,n,i){let s=this.strings,a=!1;if(s===void 0)e=Mo(this,e,r,0),a=!bc(e)||e!==this._$AH&&e!==Ti,a&&(this._$AH=e);else{let l=e,c,u;for(e=s[0],c=0;c<s.length-1;c++)u=Mo(this,l[n+c],r,c),u===Ti&&(u=this._$AH[c]),a||=!bc(u)||u!==this._$AH[c],u===it?e=it:e!==it&&(e+=(u??"")+s[c+1]),this._$AH[c]=u}a&&!i&&this.j(e)}j(e){e===it?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},fm=class extends Io{static{o(this,"I")}constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===it?void 0:e}},pm=class extends Io{static{o(this,"L")}constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==it)}},hm=class extends Io{static{o(this,"z")}constructor(e,r,n,i,s){super(e,r,n,i,s),this.type=5}_$AI(e,r=this){if((e=Mo(this,e,r,0)??it)===Ti)return;let n=this._$AH,i=e===it&&n!==it||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,s=e!==it&&(n===it||i);i&&this.element.removeEventListener(this.name,this,n),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},mm=class{static{o(this,"Z")}constructor(e,r,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=r,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){Mo(this,e)}},lz={M:vb,P:Rn,A:Sb,C:1,L:RC,R:um,D:CC,V:Mo,I:xa,H:Io,N:pm,U:hm,B:fm,F:mm},cz=wb.litHtmlPolyfillSupport;cz?.(vc,xa),(wb.litHtmlVersions??=[]).push("3.3.2");var Cb=o((t,e,r)=>{let n=r?.renderBefore??e,i=n._$litPart$;if(i===void 0){let s=r?.renderBefore??null;n._$litPart$=i=new xa(e.insertBefore(xc(),s),s,void 0,r??{})}return i._$AI(t),i},"D");var Ob=globalThis,No=class extends gn{static{o(this,"i")}constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Cb(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Ti}};No._$litElement$=!0,No.finalized=!0,Ob.litElementHydrateSupport?.({LitElement:No});var uz=Ob.litElementPolyfillSupport;uz?.({LitElement:No});var fz={_$AK:o((t,e,r)=>{t._$AK(e,r)},"_$AK"),_$AL:o(t=>t._$AL,"_$AL")};(Ob.litElementVersions??=[]).push("4.2.2");var pz=!1;var FC=1600,$C=1240,BC=1024,jC=600,zC=400,AC=o(t=>{let e=[];return t.minWidth&&e.push(`(min-width: ${t.minWidth}px)`),t.maxWidth&&e.push(`(max-width: ${t.maxWidth}px)`),e.join(" and ")},"buildCondition"),Po=o((t,e)=>rr(`
284
284
  @container wccToolsViewport ${e} {
285
285
  ${t.cssText}
286
286
  }
287
287
  @media ${e} {
288
288
  ${t.cssText}
289
289
  }
290
- `),"cssForViewport"),LC=o((t,e,r)=>rr(`
290
+ `),"cssForViewport"),WC=o((t,e,r)=>rr(`
291
291
  @container ${r} ${e} {
292
292
  ${t.cssText}
293
293
  }
294
- `),"cssForContainer"),Jj=o(t=>e=>_o(e,OC(t)),"cssForConstraint"),Qj=o((t,e)=>r=>LC(r,OC(t),e),"cssForConstraintContainer"),Xj=o(t=>Rr`
294
+ `),"cssForContainer"),hz=o(t=>e=>Po(e,AC(t)),"cssForConstraint"),mz=o((t,e)=>r=>WC(r,AC(t),e),"cssForConstraintContainer"),dz=o(t=>Rr`
295
295
  :host {
296
296
  container-type: inline-size;
297
297
  container-name: ${rr(t)};
298
298
  }
299
- `,"containerContextStyles"),Zj=o(t=>_o(t,`(min-width: ${MC}px)`),"cssForDesktop"),ez=o(t=>_o(t,`(max-width: ${IC}px)`),"cssForNotebook"),tz=o(t=>_o(t,`(max-width: ${NC}px)`),"cssForTablet"),rz=o(t=>_o(t,`(max-width: ${PC}px)`),"cssForPhablet"),nz=o(t=>_o(t,`(max-width: ${_C}px)`),"cssForPhone");var um=class{static{o(this,"Scroller")}domtoolsInstance;disposed=!1;scrollCallbacks=[];lenisInstance=null;lenisScrollUnsubscribe=null;nativeScrollListenerAttached=!1;handleNativeScroll=o(e=>{this.executeScrollCallbacks()},"handleNativeScroll");handleLenisScroll=o(e=>{this.executeScrollCallbacks()},"handleLenisScroll");constructor(e){this.domtoolsInstance=e,this.attachNativeScrollListener()}sweetScroller=new da.default({});async toElement(e,r){this.sweetScroller.toElement(e,r),r?.duration&&await be.delayFor(r.duration)}async detectNativeSmoothScroll(){let e=getComputedStyle(document.documentElement).scrollBehavior,r=document.body?getComputedStyle(document.body).scrollBehavior:"auto";if(e==="smooth"||r==="smooth")return!0;let n=te.defer(),i=12,s=3,a=.75,l=1200,c=[],u=o(m=>{window.removeEventListener("wheel",f),window.clearTimeout(h),n.resolve(m)},"finalize");function f(m){c.push(m.deltaY),c.length>=i&&p()}o(f,"onWheel");function p(){if(c.length<2){u(!1);return}let m=c.length-1,d=0;for(let y=0;y<m;y++)Math.abs(c[y+1]-c[y])<=s&&d++;let g=d/m;u(g>=a)}o(p,"analyzeEvents");let h=window.setTimeout(()=>{p()},l);return window.addEventListener("wheel",f,{passive:!0}),n.promise}async enableLenisScroll(e){if(this.disposed)return;this.lenisInstance&&this.disableLenisScroll();let r=new fc({autoRaf:!0});if(e?.disableOnNativeSmoothScroll&&await this.detectNativeSmoothScroll()){r.destroy();return}this.lenisInstance=r,this.detachNativeScrollListener(),this.attachLenisScrollListener()}disableLenisScroll(){this.lenisInstance&&(this.detachLenisScrollListener(),this.lenisInstance.destroy(),this.lenisInstance=null,this.attachNativeScrollListener())}onScroll(e){return this.scrollCallbacks.push(e),()=>{this.scrollCallbacks=this.scrollCallbacks.filter(r=>r!==e)}}executeScrollCallbacks(){this.scrollCallbacks.forEach(e=>{try{e()}catch(r){console.error("Error in scroll callback:",r)}})}attachNativeScrollListener(){this.nativeScrollListenerAttached||this.disposed||(window.addEventListener("scroll",this.handleNativeScroll),this.nativeScrollListenerAttached=!0)}detachNativeScrollListener(){this.nativeScrollListenerAttached&&(window.removeEventListener("scroll",this.handleNativeScroll),this.nativeScrollListenerAttached=!1)}attachLenisScrollListener(){this.lenisInstance&&!this.lenisScrollUnsubscribe&&(this.lenisScrollUnsubscribe=this.lenisInstance.on("scroll",this.handleLenisScroll))}detachLenisScrollListener(){this.lenisScrollUnsubscribe&&(this.lenisScrollUnsubscribe(),this.lenisScrollUnsubscribe=null)}dispose(){this.disposed||(this.disposed=!0,this.detachLenisScrollListener(),this.lenisInstance?.destroy(),this.lenisInstance=null,this.detachNativeScrollListener(),this.scrollCallbacks=[],this.sweetScroller.destroy())}};var fm=class{static{o(this,"ThemeManager")}domtoolsRef;goBrightBoolean=!1;preferredColorSchemeMediaMatch=window.matchMedia("(prefers-color-scheme: light)");themeObservable=new Pe.rxjs.ReplaySubject(1);automaticGlobalThemeChangeSubscription=null;preferredColorSchemeChangeHandler=o(e=>{this.goBrightBoolean=e.matches,this.updateAllConnectedElements()},"preferredColorSchemeChangeHandler");constructor(e){this.domtoolsRef=e,this.goBrightBoolean=this.preferredColorSchemeMediaMatch.matches,this.preferredColorSchemeMediaMatch.addEventListener("change",this.preferredColorSchemeChangeHandler),this.updateAllConnectedElements()}async enableAutomaticGlobalThemeChange(){await this.domtoolsRef.domReady.promise,this.automaticGlobalThemeChangeSubscription||(this.automaticGlobalThemeChangeSubscription=this.themeObservable.subscribe({next:o(e=>{document.body.style.background=e?"#fff":"#000"},"next")}))}updateAllConnectedElements(){this.domtoolsRef.disposed||this.themeObservable.next(this.goBrightBoolean)}goBright(){this.goBrightBoolean=!0,this.updateAllConnectedElements()}goDark(){this.goBrightBoolean=!1,this.updateAllConnectedElements()}toggleDarkBright(){this.goBrightBoolean=!this.goBrightBoolean,this.updateAllConnectedElements()}dispose(){this.preferredColorSchemeMediaMatch.removeEventListener("change",this.preferredColorSchemeChangeHandler),this.automaticGlobalThemeChangeSubscription?.unsubscribe(),this.automaticGlobalThemeChangeSubscription=null,this.themeObservable.complete()}};var xa=(S=>(S[S.Backspace=8]="Backspace",S[S.Tab=9]="Tab",S[S.Enter=13]="Enter",S[S.Shift=16]="Shift",S[S.Ctrl=17]="Ctrl",S[S.Alt=18]="Alt",S[S.PauseBreak=19]="PauseBreak",S[S.CapsLock=20]="CapsLock",S[S.Escape=27]="Escape",S[S.Space=32]="Space",S[S.PageUp=33]="PageUp",S[S.PageDown=34]="PageDown",S[S.End=35]="End",S[S.Home=36]="Home",S[S.LeftArrow=37]="LeftArrow",S[S.UpArrow=38]="UpArrow",S[S.RightArrow=39]="RightArrow",S[S.DownArrow=40]="DownArrow",S[S.Insert=45]="Insert",S[S.Delete=46]="Delete",S[S.Zero=48]="Zero",S[S.ClosedParen=48]="ClosedParen",S[S.One=49]="One",S[S.ExclamationMark=49]="ExclamationMark",S[S.Two=50]="Two",S[S.AtSign=50]="AtSign",S[S.Three=51]="Three",S[S.PoundSign=51]="PoundSign",S[S.Hash=51]="Hash",S[S.Four=52]="Four",S[S.DollarSign=52]="DollarSign",S[S.Five=53]="Five",S[S.PercentSign=53]="PercentSign",S[S.Six=54]="Six",S[S.Caret=54]="Caret",S[S.Hat=54]="Hat",S[S.Seven=55]="Seven",S[S.Ampersand=55]="Ampersand",S[S.Eight=56]="Eight",S[S.Star=56]="Star",S[S.Asterik=56]="Asterik",S[S.Nine=57]="Nine",S[S.OpenParen=57]="OpenParen",S[S.A=65]="A",S[S.B=66]="B",S[S.C=67]="C",S[S.D=68]="D",S[S.E=69]="E",S[S.F=70]="F",S[S.G=71]="G",S[S.H=72]="H",S[S.I=73]="I",S[S.J=74]="J",S[S.K=75]="K",S[S.L=76]="L",S[S.M=77]="M",S[S.N=78]="N",S[S.O=79]="O",S[S.P=80]="P",S[S.Q=81]="Q",S[S.R=82]="R",S[S.S=83]="S",S[S.T=84]="T",S[S.U=85]="U",S[S.V=86]="V",S[S.W=87]="W",S[S.X=88]="X",S[S.Y=89]="Y",S[S.Z=90]="Z",S[S.LeftWindowKey=91]="LeftWindowKey",S[S.RightWindowKey=92]="RightWindowKey",S[S.SelectKey=93]="SelectKey",S[S.Numpad0=96]="Numpad0",S[S.Numpad1=97]="Numpad1",S[S.Numpad2=98]="Numpad2",S[S.Numpad3=99]="Numpad3",S[S.Numpad4=100]="Numpad4",S[S.Numpad5=101]="Numpad5",S[S.Numpad6=102]="Numpad6",S[S.Numpad7=103]="Numpad7",S[S.Numpad8=104]="Numpad8",S[S.Numpad9=105]="Numpad9",S[S.Multiply=106]="Multiply",S[S.Add=107]="Add",S[S.Subtract=109]="Subtract",S[S.DecimalPoint=110]="DecimalPoint",S[S.Divide=111]="Divide",S[S.F1=112]="F1",S[S.F2=113]="F2",S[S.F3=114]="F3",S[S.F4=115]="F4",S[S.F5=116]="F5",S[S.F6=117]="F6",S[S.F7=118]="F7",S[S.F8=119]="F8",S[S.F9=120]="F9",S[S.F10=121]="F10",S[S.F11=122]="F11",S[S.F12=123]="F12",S[S.NumLock=144]="NumLock",S[S.ScrollLock=145]="ScrollLock",S[S.SemiColon=186]="SemiColon",S[S.Equals=187]="Equals",S[S.Comma=188]="Comma",S[S.Dash=189]="Dash",S[S.Period=190]="Period",S[S.UnderScore=189]="UnderScore",S[S.PlusSign=187]="PlusSign",S[S.ForwardSlash=191]="ForwardSlash",S[S.Tilde=192]="Tilde",S[S.GraveAccent=192]="GraveAccent",S[S.OpenBracket=219]="OpenBracket",S[S.ClosedBracket=221]="ClosedBracket",S[S.Quote=222]="Quote",S))(xa||{}),pm=class{constructor(e){this.domNode=e;this.startListening()}domNode;static{o(this,"Keyboard")}mapCombosToHandlers=new Map;pressedKeys=new Set;listening=!1;keyEnum=xa;on(e){let r=new Pe.rxjs.Subject;return this.registerKeys(e,r),r}triggerKeyPress(e){let r=this.normalizeKeys(e);for(let n of r)this.pressedKeys.add(n);this.checkMatchingKeyboardSubjects(this.createKeyboardEvent(r));for(let n of r)this.pressedKeys.delete(n)}startListening(){this.listening||(this.domNode.addEventListener("keydown",this.handleKeyDown),this.domNode.addEventListener("keyup",this.handleKeyUp),this.listening=!0)}stopListening(){this.listening&&(this.domNode.removeEventListener("keydown",this.handleKeyDown),this.domNode.removeEventListener("keyup",this.handleKeyUp),this.listening=!1)}clear(){this.stopListening();for(let e of this.mapCombosToHandlers.values())for(let r of e.subjects)r.complete();this.mapCombosToHandlers.clear(),this.pressedKeys.clear()}dispose(){this.clear()}handleKeyDown=o(e=>{let r=this.resolveKey(e);r!==null&&(this.pressedKeys.add(r),this.checkMatchingKeyboardSubjects(e))},"handleKeyDown");checkMatchingKeyboardSubjects(e){this.mapCombosToHandlers.forEach(r=>{if(this.areAllKeysPressed(r.keys))for(let n of r.subjects)n.next(e)})}handleKeyUp=o(e=>{let r=this.resolveKey(e);r!==null&&this.pressedKeys.delete(r)},"handleKeyUp");areAllKeysPressed(e){let r=!0;return e.forEach(n=>{this.pressedKeys.has(n)||(r=!1)}),r}registerKeys(e,r){let n=this.normalizeKeys(e),i=n.join("+"),s=this.mapCombosToHandlers.get(i);if(!s){this.mapCombosToHandlers.set(i,{keys:n,subjects:[r]});return}s.subjects.push(r)}normalizeKeys(e){return[...new Set(e)].sort((r,n)=>r-n)}resolveKey(e){return this.resolveKeyFromCode(e.code)??this.resolveKeyFromKey(e.key)??this.resolveKeyFromKeyCode(e.keyCode)}resolveKeyFromCode(e){if(!e)return null;if(e.startsWith("Key")&&e.length===4)return xa[e.slice(3)]??null;if(e.startsWith("Digit")&&e.length===6)return this.resolveKeyFromKey(e.slice(5));switch(e){case"Backspace":return 8;case"Tab":return 9;case"Enter":case"NumpadEnter":return 13;case"ShiftLeft":case"ShiftRight":return 16;case"ControlLeft":case"ControlRight":return 17;case"AltLeft":case"AltRight":return 18;case"Pause":return 19;case"CapsLock":return 20;case"Escape":return 27;case"Space":return 32;case"PageUp":return 33;case"PageDown":return 34;case"End":return 35;case"Home":return 36;case"ArrowLeft":return 37;case"ArrowUp":return 38;case"ArrowRight":return 39;case"ArrowDown":return 40;case"Insert":return 45;case"Delete":return 46;case"MetaLeft":return 91;case"MetaRight":return 92;case"ContextMenu":return 93;case"Numpad0":return 96;case"Numpad1":return 97;case"Numpad2":return 98;case"Numpad3":return 99;case"Numpad4":return 100;case"Numpad5":return 101;case"Numpad6":return 102;case"Numpad7":return 103;case"Numpad8":return 104;case"Numpad9":return 105;case"NumpadMultiply":return 106;case"NumpadAdd":return 107;case"NumpadSubtract":return 109;case"NumpadDecimal":return 110;case"NumpadDivide":return 111;case"F1":return 112;case"F2":return 113;case"F3":return 114;case"F4":return 115;case"F5":return 116;case"F6":return 117;case"F7":return 118;case"F8":return 119;case"F9":return 120;case"F10":return 121;case"F11":return 122;case"F12":return 123;case"NumLock":return 144;case"ScrollLock":return 145;case"Semicolon":return 186;case"Equal":return 187;case"Comma":return 188;case"Minus":return 189;case"Period":return 190;case"Slash":return 191;case"Backquote":return 192;case"BracketLeft":return 219;case"BracketRight":return 221;case"Quote":return 222;default:return null}}resolveKeyFromKey(e){if(!e)return null;if(e.length===1){let r=e.toUpperCase();if(r>="A"&&r<="Z")return xa[r]??null;switch(e){case"0":return 48;case"1":return 49;case"2":return 50;case"3":return 51;case"4":return 52;case"5":return 53;case"6":return 54;case"7":return 55;case"8":return 56;case"9":return 57;case" ":return 32;case";":return 186;case"=":return 187;case",":return 188;case"-":return 189;case".":return 190;case"/":return 191;case"`":return 192;case"[":return 219;case"]":return 221;case"'":return 222;default:return null}}switch(e){case"Backspace":return 8;case"Tab":return 9;case"Enter":return 13;case"Shift":return 16;case"Control":return 17;case"Alt":return 18;case"Pause":return 19;case"CapsLock":return 20;case"Escape":return 27;case"PageUp":return 33;case"PageDown":return 34;case"End":return 35;case"Home":return 36;case"ArrowLeft":return 37;case"ArrowUp":return 38;case"ArrowRight":return 39;case"ArrowDown":return 40;case"Insert":return 45;case"Delete":return 46;case"Meta":return 91;case"ContextMenu":return 93;case"NumLock":return 144;case"ScrollLock":return 145;default:return null}}resolveKeyFromKeyCode(e){return typeof e!="number"?null:typeof xa[e]<"u"?e:null}createKeyboardEvent(e){let r=e[e.length-1]??13,n=this.getKeyDescriptor(r);return new KeyboardEvent("keydown",{key:n.key,code:n.code,ctrlKey:e.includes(17),shiftKey:e.includes(16),altKey:e.includes(18),metaKey:e.includes(91)||e.includes(92)})}getKeyDescriptor(e){switch(e){case 17:return{key:"Control",code:"ControlLeft"};case 16:return{key:"Shift",code:"ShiftLeft"};case 18:return{key:"Alt",code:"AltLeft"};case 13:return{key:"Enter",code:"Enter"};case 32:return{key:" ",code:"Space"};default:{let r=xa[e];if(r&&r.length===1&&r>="A"&&r<="Z")return{key:r.toLowerCase(),code:`Key${r}`};if(e>=48&&e<=57){let n=String(e-48);return{key:n,code:`Digit${n}`}}return{key:r??"Unidentified",code:"Unidentified"}}}}};var bc=class t{static{o(this,"DomTools")}static initializationPromise=null;static async setupDomTools(e={}){if(e.ignoreGlobal){let r=new t(e);return await r.initializationPromise,r}if(globalThis.deesDomTools&&!globalThis.deesDomTools.disposed)return await globalThis.deesDomTools.initializationPromise,globalThis.deesDomTools;if(!t.initializationPromise){let r=new t(e);globalThis.deesDomTools=r,t.initializationPromise=r.initializationPromise.then(()=>r).catch(n=>{throw globalThis.deesDomTools===r&&(globalThis.deesDomTools=void 0),t.initializationPromise=null,n})}return await t.initializationPromise}static getGlobalDomToolsSync(){let e=globalThis.deesDomTools;if(!e||e.disposed)throw new Error("You tried to access domtools synchronously too early");return e}elements={headElement:null,bodyElement:null};websetup=new uc({metaObject:{title:""}});smartstate=new To.Smartstate;domToolsStatePart=this.smartstate.getStatePart("domtools",{virtualViewport:"native",jwt:""});router=new ko.SmartRouter({debug:!1});convenience={typedrequest:$t,smartdelay:be,smartjson:tt,smarturl:Eo};deesComms=new sl.DeesComms;scroller=new um(this);themeManager=new fm(this);keyboard=null;disposed=!1;domToolsReady=te.defer();domReady=te.defer();globalStylesReady=te.defer();initializationPromise;managedDomNodes=[];readyStateChangedFunc=o(()=>{this.tryMarkDomReady()},"readyStateChangedFunc");constructor(e){this.initializationPromise=this.initialize()}runOncePromiseMap=new Map;async initialize(){this.tryMarkDomReady(),this.domReady.status==="pending"&&document.addEventListener("readystatechange",this.readyStateChangedFunc),this.domToolsReady.status==="pending"&&this.domToolsReady.resolve()}tryMarkDomReady(){this.disposed||this.domReady.status!=="pending"||document.readyState!=="interactive"&&document.readyState!=="complete"||!document.head||!document.body||(this.elements.headElement=document.head,this.elements.bodyElement=document.body,this.keyboard||(this.keyboard=new pm(document.body)),document.removeEventListener("readystatechange",this.readyStateChangedFunc),this.domReady.resolve())}trackManagedDomNode(e){return this.managedDomNodes.push(e),e}getHeadOrBodyElement(){let e=this.elements.headElement||document.head||this.elements.bodyElement||document.body;if(!e)throw new Error("DomTools could not find a DOM target element to attach resources to");return e}async runOnce(e,r){let n=this.runOncePromiseMap.get(e);return n||(n=Promise.resolve().then(async()=>await r()),this.runOncePromiseMap.set(e,n)),await n}async setGlobalStyles(e){await this.domReady.promise;let r=this.trackManagedDomNode(document.createElement("style"));r.type="text/css",r.appendChild(document.createTextNode(e)),this.getHeadOrBodyElement().appendChild(r)}async setExternalScript(e){await this.domReady.promise;let r=te.defer(),n=this.trackManagedDomNode(document.createElement("script"));n.src=e,n.addEventListener("load",()=>{r.resolve()}),n.addEventListener("error",()=>{r.reject(new Error(`Failed to load external script: ${e}`))}),this.getHeadOrBodyElement().append(n),await r.promise}async setExternalCss(e){await this.domReady.promise;let r=te.defer(),n=this.trackManagedDomNode(document.createElement("link"));n.rel="stylesheet",n.crossOrigin="anonymous",n.href=e,n.addEventListener("load",()=>{r.resolve()}),n.addEventListener("error",()=>{r.reject(new Error(`Failed to load external stylesheet: ${e}`))}),this.getHeadOrBodyElement().append(n),await r.promise}async setWebsiteInfo(e){await this.websetup.setup(e),await this.websetup.readyPromise}dispose(){if(!this.disposed){this.disposed=!0,document.removeEventListener("readystatechange",this.readyStateChangedFunc),this.keyboard?.dispose(),this.keyboard=null,this.scroller.dispose(),this.themeManager.dispose();for(let e of this.managedDomNodes)e.remove();this.managedDomNodes.length=0,globalThis.deesDomTools===this&&(globalThis.deesDomTools=void 0,t.initializationPromise=null)}}};var hm=(()=>{let t=navigator.userAgent.indexOf("Mac OS X")===-1?Rr``.cssText:"";return Rr`
299
+ `,"containerContextStyles"),gz=o(t=>Po(t,`(min-width: ${FC}px)`),"cssForDesktop"),yz=o(t=>Po(t,`(max-width: ${$C}px)`),"cssForNotebook"),xz=o(t=>Po(t,`(max-width: ${BC}px)`),"cssForTablet"),bz=o(t=>Po(t,`(max-width: ${jC}px)`),"cssForPhablet"),wz=o(t=>Po(t,`(max-width: ${zC}px)`),"cssForPhone");var dm=class{static{o(this,"Scroller")}domtoolsInstance;disposed=!1;scrollCallbacks=[];lenisInstance=null;lenisScrollUnsubscribe=null;nativeScrollListenerAttached=!1;handleNativeScroll=o(e=>{this.executeScrollCallbacks()},"handleNativeScroll");handleLenisScroll=o(e=>{this.executeScrollCallbacks()},"handleLenisScroll");constructor(e){this.domtoolsInstance=e,this.attachNativeScrollListener()}sweetScroller=new ga.default({});async toElement(e,r){this.sweetScroller.toElement(e,r),r?.duration&&await ie.delayFor(r.duration)}async detectNativeSmoothScroll(){let e=getComputedStyle(document.documentElement).scrollBehavior,r=document.body?getComputedStyle(document.body).scrollBehavior:"auto";if(e==="smooth"||r==="smooth")return!0;let n=ie.defer(),i=12,s=3,a=.75,l=1200,c=[],u=o(m=>{window.removeEventListener("wheel",f),window.clearTimeout(h),n.resolve(m)},"finalize");function f(m){c.push(m.deltaY),c.length>=i&&p()}o(f,"onWheel");function p(){if(c.length<2){u(!1);return}let m=c.length-1,d=0;for(let y=0;y<m;y++)Math.abs(c[y+1]-c[y])<=s&&d++;let g=d/m;u(g>=a)}o(p,"analyzeEvents");let h=window.setTimeout(()=>{p()},l);return window.addEventListener("wheel",f,{passive:!0}),n.promise}async enableLenisScroll(e){if(this.disposed)return;this.lenisInstance&&this.disableLenisScroll();let r=new mc({autoRaf:!0});if(e?.disableOnNativeSmoothScroll&&await this.detectNativeSmoothScroll()){r.destroy();return}this.lenisInstance=r,this.detachNativeScrollListener(),this.attachLenisScrollListener()}disableLenisScroll(){this.lenisInstance&&(this.detachLenisScrollListener(),this.lenisInstance.destroy(),this.lenisInstance=null,this.attachNativeScrollListener())}onScroll(e){return this.scrollCallbacks.push(e),()=>{this.scrollCallbacks=this.scrollCallbacks.filter(r=>r!==e)}}executeScrollCallbacks(){this.scrollCallbacks.forEach(e=>{try{e()}catch(r){console.error("Error in scroll callback:",r)}})}attachNativeScrollListener(){this.nativeScrollListenerAttached||this.disposed||(window.addEventListener("scroll",this.handleNativeScroll),this.nativeScrollListenerAttached=!0)}detachNativeScrollListener(){this.nativeScrollListenerAttached&&(window.removeEventListener("scroll",this.handleNativeScroll),this.nativeScrollListenerAttached=!1)}attachLenisScrollListener(){this.lenisInstance&&!this.lenisScrollUnsubscribe&&(this.lenisScrollUnsubscribe=this.lenisInstance.on("scroll",this.handleLenisScroll))}detachLenisScrollListener(){this.lenisScrollUnsubscribe&&(this.lenisScrollUnsubscribe(),this.lenisScrollUnsubscribe=null)}dispose(){this.disposed||(this.disposed=!0,this.detachLenisScrollListener(),this.lenisInstance?.destroy(),this.lenisInstance=null,this.detachNativeScrollListener(),this.scrollCallbacks=[],this.sweetScroller.destroy())}};var gm=class{static{o(this,"ThemeManager")}domtoolsRef;goBrightBoolean=!1;preferredColorSchemeMediaMatch=window.matchMedia("(prefers-color-scheme: light)");themeObservable=new Ne.rxjs.ReplaySubject(1);automaticGlobalThemeChangeSubscription=null;preferredColorSchemeChangeHandler=o(e=>{this.goBrightBoolean=e.matches,this.updateAllConnectedElements()},"preferredColorSchemeChangeHandler");constructor(e){this.domtoolsRef=e,this.goBrightBoolean=this.preferredColorSchemeMediaMatch.matches,this.preferredColorSchemeMediaMatch.addEventListener("change",this.preferredColorSchemeChangeHandler),this.updateAllConnectedElements()}async enableAutomaticGlobalThemeChange(){await this.domtoolsRef.domReady.promise,this.automaticGlobalThemeChangeSubscription||(this.automaticGlobalThemeChangeSubscription=this.themeObservable.subscribe({next:o(e=>{document.body.style.background=e?"#fff":"#000"},"next")}))}updateAllConnectedElements(){this.domtoolsRef.disposed||this.themeObservable.next(this.goBrightBoolean)}goBright(){this.goBrightBoolean=!0,this.updateAllConnectedElements()}goDark(){this.goBrightBoolean=!1,this.updateAllConnectedElements()}toggleDarkBright(){this.goBrightBoolean=!this.goBrightBoolean,this.updateAllConnectedElements()}dispose(){this.preferredColorSchemeMediaMatch.removeEventListener("change",this.preferredColorSchemeChangeHandler),this.automaticGlobalThemeChangeSubscription?.unsubscribe(),this.automaticGlobalThemeChangeSubscription=null,this.themeObservable.complete()}};var ba=(v=>(v[v.Backspace=8]="Backspace",v[v.Tab=9]="Tab",v[v.Enter=13]="Enter",v[v.Shift=16]="Shift",v[v.Ctrl=17]="Ctrl",v[v.Alt=18]="Alt",v[v.PauseBreak=19]="PauseBreak",v[v.CapsLock=20]="CapsLock",v[v.Escape=27]="Escape",v[v.Space=32]="Space",v[v.PageUp=33]="PageUp",v[v.PageDown=34]="PageDown",v[v.End=35]="End",v[v.Home=36]="Home",v[v.LeftArrow=37]="LeftArrow",v[v.UpArrow=38]="UpArrow",v[v.RightArrow=39]="RightArrow",v[v.DownArrow=40]="DownArrow",v[v.Insert=45]="Insert",v[v.Delete=46]="Delete",v[v.Zero=48]="Zero",v[v.ClosedParen=48]="ClosedParen",v[v.One=49]="One",v[v.ExclamationMark=49]="ExclamationMark",v[v.Two=50]="Two",v[v.AtSign=50]="AtSign",v[v.Three=51]="Three",v[v.PoundSign=51]="PoundSign",v[v.Hash=51]="Hash",v[v.Four=52]="Four",v[v.DollarSign=52]="DollarSign",v[v.Five=53]="Five",v[v.PercentSign=53]="PercentSign",v[v.Six=54]="Six",v[v.Caret=54]="Caret",v[v.Hat=54]="Hat",v[v.Seven=55]="Seven",v[v.Ampersand=55]="Ampersand",v[v.Eight=56]="Eight",v[v.Star=56]="Star",v[v.Asterik=56]="Asterik",v[v.Nine=57]="Nine",v[v.OpenParen=57]="OpenParen",v[v.A=65]="A",v[v.B=66]="B",v[v.C=67]="C",v[v.D=68]="D",v[v.E=69]="E",v[v.F=70]="F",v[v.G=71]="G",v[v.H=72]="H",v[v.I=73]="I",v[v.J=74]="J",v[v.K=75]="K",v[v.L=76]="L",v[v.M=77]="M",v[v.N=78]="N",v[v.O=79]="O",v[v.P=80]="P",v[v.Q=81]="Q",v[v.R=82]="R",v[v.S=83]="S",v[v.T=84]="T",v[v.U=85]="U",v[v.V=86]="V",v[v.W=87]="W",v[v.X=88]="X",v[v.Y=89]="Y",v[v.Z=90]="Z",v[v.LeftWindowKey=91]="LeftWindowKey",v[v.RightWindowKey=92]="RightWindowKey",v[v.SelectKey=93]="SelectKey",v[v.Numpad0=96]="Numpad0",v[v.Numpad1=97]="Numpad1",v[v.Numpad2=98]="Numpad2",v[v.Numpad3=99]="Numpad3",v[v.Numpad4=100]="Numpad4",v[v.Numpad5=101]="Numpad5",v[v.Numpad6=102]="Numpad6",v[v.Numpad7=103]="Numpad7",v[v.Numpad8=104]="Numpad8",v[v.Numpad9=105]="Numpad9",v[v.Multiply=106]="Multiply",v[v.Add=107]="Add",v[v.Subtract=109]="Subtract",v[v.DecimalPoint=110]="DecimalPoint",v[v.Divide=111]="Divide",v[v.F1=112]="F1",v[v.F2=113]="F2",v[v.F3=114]="F3",v[v.F4=115]="F4",v[v.F5=116]="F5",v[v.F6=117]="F6",v[v.F7=118]="F7",v[v.F8=119]="F8",v[v.F9=120]="F9",v[v.F10=121]="F10",v[v.F11=122]="F11",v[v.F12=123]="F12",v[v.NumLock=144]="NumLock",v[v.ScrollLock=145]="ScrollLock",v[v.SemiColon=186]="SemiColon",v[v.Equals=187]="Equals",v[v.Comma=188]="Comma",v[v.Dash=189]="Dash",v[v.Period=190]="Period",v[v.UnderScore=189]="UnderScore",v[v.PlusSign=187]="PlusSign",v[v.ForwardSlash=191]="ForwardSlash",v[v.Tilde=192]="Tilde",v[v.GraveAccent=192]="GraveAccent",v[v.OpenBracket=219]="OpenBracket",v[v.ClosedBracket=221]="ClosedBracket",v[v.Quote=222]="Quote",v))(ba||{}),ym=class{constructor(e){this.domNode=e;this.startListening()}domNode;static{o(this,"Keyboard")}mapCombosToHandlers=new Map;pressedKeys=new Set;listening=!1;keyEnum=ba;on(e){let r=new Ne.rxjs.Subject;return this.registerKeys(e,r),r}triggerKeyPress(e){let r=this.normalizeKeys(e);for(let n of r)this.pressedKeys.add(n);this.checkMatchingKeyboardSubjects(this.createKeyboardEvent(r));for(let n of r)this.pressedKeys.delete(n)}startListening(){this.listening||(this.domNode.addEventListener("keydown",this.handleKeyDown),this.domNode.addEventListener("keyup",this.handleKeyUp),this.listening=!0)}stopListening(){this.listening&&(this.domNode.removeEventListener("keydown",this.handleKeyDown),this.domNode.removeEventListener("keyup",this.handleKeyUp),this.listening=!1)}clear(){this.stopListening();for(let e of this.mapCombosToHandlers.values())for(let r of e.subjects)r.complete();this.mapCombosToHandlers.clear(),this.pressedKeys.clear()}dispose(){this.clear()}handleKeyDown=o(e=>{let r=this.resolveKey(e);r!==null&&(this.pressedKeys.add(r),this.checkMatchingKeyboardSubjects(e))},"handleKeyDown");checkMatchingKeyboardSubjects(e){this.mapCombosToHandlers.forEach(r=>{if(this.areAllKeysPressed(r.keys))for(let n of r.subjects)n.next(e)})}handleKeyUp=o(e=>{let r=this.resolveKey(e);r!==null&&this.pressedKeys.delete(r)},"handleKeyUp");areAllKeysPressed(e){let r=!0;return e.forEach(n=>{this.pressedKeys.has(n)||(r=!1)}),r}registerKeys(e,r){let n=this.normalizeKeys(e),i=n.join("+"),s=this.mapCombosToHandlers.get(i);if(!s){this.mapCombosToHandlers.set(i,{keys:n,subjects:[r]});return}s.subjects.push(r)}normalizeKeys(e){return[...new Set(e)].sort((r,n)=>r-n)}resolveKey(e){return this.resolveKeyFromCode(e.code)??this.resolveKeyFromKey(e.key)??this.resolveKeyFromKeyCode(e.keyCode)}resolveKeyFromCode(e){if(!e)return null;if(e.startsWith("Key")&&e.length===4)return ba[e.slice(3)]??null;if(e.startsWith("Digit")&&e.length===6)return this.resolveKeyFromKey(e.slice(5));switch(e){case"Backspace":return 8;case"Tab":return 9;case"Enter":case"NumpadEnter":return 13;case"ShiftLeft":case"ShiftRight":return 16;case"ControlLeft":case"ControlRight":return 17;case"AltLeft":case"AltRight":return 18;case"Pause":return 19;case"CapsLock":return 20;case"Escape":return 27;case"Space":return 32;case"PageUp":return 33;case"PageDown":return 34;case"End":return 35;case"Home":return 36;case"ArrowLeft":return 37;case"ArrowUp":return 38;case"ArrowRight":return 39;case"ArrowDown":return 40;case"Insert":return 45;case"Delete":return 46;case"MetaLeft":return 91;case"MetaRight":return 92;case"ContextMenu":return 93;case"Numpad0":return 96;case"Numpad1":return 97;case"Numpad2":return 98;case"Numpad3":return 99;case"Numpad4":return 100;case"Numpad5":return 101;case"Numpad6":return 102;case"Numpad7":return 103;case"Numpad8":return 104;case"Numpad9":return 105;case"NumpadMultiply":return 106;case"NumpadAdd":return 107;case"NumpadSubtract":return 109;case"NumpadDecimal":return 110;case"NumpadDivide":return 111;case"F1":return 112;case"F2":return 113;case"F3":return 114;case"F4":return 115;case"F5":return 116;case"F6":return 117;case"F7":return 118;case"F8":return 119;case"F9":return 120;case"F10":return 121;case"F11":return 122;case"F12":return 123;case"NumLock":return 144;case"ScrollLock":return 145;case"Semicolon":return 186;case"Equal":return 187;case"Comma":return 188;case"Minus":return 189;case"Period":return 190;case"Slash":return 191;case"Backquote":return 192;case"BracketLeft":return 219;case"BracketRight":return 221;case"Quote":return 222;default:return null}}resolveKeyFromKey(e){if(!e)return null;if(e.length===1){let r=e.toUpperCase();if(r>="A"&&r<="Z")return ba[r]??null;switch(e){case"0":return 48;case"1":return 49;case"2":return 50;case"3":return 51;case"4":return 52;case"5":return 53;case"6":return 54;case"7":return 55;case"8":return 56;case"9":return 57;case" ":return 32;case";":return 186;case"=":return 187;case",":return 188;case"-":return 189;case".":return 190;case"/":return 191;case"`":return 192;case"[":return 219;case"]":return 221;case"'":return 222;default:return null}}switch(e){case"Backspace":return 8;case"Tab":return 9;case"Enter":return 13;case"Shift":return 16;case"Control":return 17;case"Alt":return 18;case"Pause":return 19;case"CapsLock":return 20;case"Escape":return 27;case"PageUp":return 33;case"PageDown":return 34;case"End":return 35;case"Home":return 36;case"ArrowLeft":return 37;case"ArrowUp":return 38;case"ArrowRight":return 39;case"ArrowDown":return 40;case"Insert":return 45;case"Delete":return 46;case"Meta":return 91;case"ContextMenu":return 93;case"NumLock":return 144;case"ScrollLock":return 145;default:return null}}resolveKeyFromKeyCode(e){return typeof e!="number"?null:typeof ba[e]<"u"?e:null}createKeyboardEvent(e){let r=e[e.length-1]??13,n=this.getKeyDescriptor(r);return new KeyboardEvent("keydown",{key:n.key,code:n.code,ctrlKey:e.includes(17),shiftKey:e.includes(16),altKey:e.includes(18),metaKey:e.includes(91)||e.includes(92)})}getKeyDescriptor(e){switch(e){case 17:return{key:"Control",code:"ControlLeft"};case 16:return{key:"Shift",code:"ShiftLeft"};case 18:return{key:"Alt",code:"AltLeft"};case 13:return{key:"Enter",code:"Enter"};case 32:return{key:" ",code:"Space"};default:{let r=ba[e];if(r&&r.length===1&&r>="A"&&r<="Z")return{key:r.toLowerCase(),code:`Key${r}`};if(e>=48&&e<=57){let n=String(e-48);return{key:n,code:`Digit${n}`}}return{key:r??"Unidentified",code:"Unidentified"}}}}};var Sc=class t{static{o(this,"DomTools")}static initializationPromise=null;static async setupDomTools(e={}){if(e.ignoreGlobal){let r=new t(e);return await r.initializationPromise,r}if(globalThis.deesDomTools&&!globalThis.deesDomTools.disposed)return await globalThis.deesDomTools.initializationPromise,globalThis.deesDomTools;if(!t.initializationPromise){let r=new t(e);globalThis.deesDomTools=r,t.initializationPromise=r.initializationPromise.then(()=>r).catch(n=>{throw globalThis.deesDomTools===r&&(globalThis.deesDomTools=void 0),t.initializationPromise=null,n})}return await t.initializationPromise}static getGlobalDomToolsSync(){let e=globalThis.deesDomTools;if(!e||e.disposed)throw new Error("You tried to access domtools synchronously too early");return e}elements={headElement:null,bodyElement:null};websetup=new hc({metaObject:{title:""}});smartstate=new ko.Smartstate;domToolsStatePart=this.smartstate.getStatePart("domtools",{virtualViewport:"native",jwt:""});router=new So.SmartRouter({debug:!1});convenience={typedrequest:$t,smartjson:tt,smartpromise:ie,smarturl:To};deesComms=new cl.DeesComms;scroller=new dm(this);themeManager=new gm(this);keyboard=null;disposed=!1;domToolsReady=ie.defer();domReady=ie.defer();globalStylesReady=ie.defer();initializationPromise;managedDomNodes=[];readyStateChangedFunc=o(()=>{this.tryMarkDomReady()},"readyStateChangedFunc");constructor(e){this.initializationPromise=this.initialize()}runOncePromiseMap=new Map;async initialize(){this.tryMarkDomReady(),this.domReady.status==="pending"&&document.addEventListener("readystatechange",this.readyStateChangedFunc),this.domToolsReady.status==="pending"&&this.domToolsReady.resolve()}tryMarkDomReady(){this.disposed||this.domReady.status!=="pending"||document.readyState!=="interactive"&&document.readyState!=="complete"||!document.head||!document.body||(this.elements.headElement=document.head,this.elements.bodyElement=document.body,this.keyboard||(this.keyboard=new ym(document.body)),document.removeEventListener("readystatechange",this.readyStateChangedFunc),this.domReady.resolve())}trackManagedDomNode(e){return this.managedDomNodes.push(e),e}getHeadOrBodyElement(){let e=this.elements.headElement||document.head||this.elements.bodyElement||document.body;if(!e)throw new Error("DomTools could not find a DOM target element to attach resources to");return e}async runOnce(e,r){let n=this.runOncePromiseMap.get(e);return n||(n=Promise.resolve().then(async()=>await r()),this.runOncePromiseMap.set(e,n)),await n}async setGlobalStyles(e){await this.domReady.promise;let r=this.trackManagedDomNode(document.createElement("style"));r.type="text/css",r.appendChild(document.createTextNode(e)),this.getHeadOrBodyElement().appendChild(r)}async setExternalScript(e){await this.domReady.promise;let r=ie.defer(),n=this.trackManagedDomNode(document.createElement("script"));n.src=e,n.addEventListener("load",()=>{r.resolve()}),n.addEventListener("error",()=>{r.reject(new Error(`Failed to load external script: ${e}`))}),this.getHeadOrBodyElement().append(n),await r.promise}async setExternalCss(e){await this.domReady.promise;let r=ie.defer(),n=this.trackManagedDomNode(document.createElement("link"));n.rel="stylesheet",n.crossOrigin="anonymous",n.href=e,n.addEventListener("load",()=>{r.resolve()}),n.addEventListener("error",()=>{r.reject(new Error(`Failed to load external stylesheet: ${e}`))}),this.getHeadOrBodyElement().append(n),await r.promise}async setWebsiteInfo(e){await this.websetup.setup(e),await this.websetup.readyPromise}dispose(){if(!this.disposed){this.disposed=!0,document.removeEventListener("readystatechange",this.readyStateChangedFunc),this.keyboard?.dispose(),this.keyboard=null,this.scroller.dispose(),this.themeManager.dispose();for(let e of this.managedDomNodes)e.remove();this.managedDomNodes.length=0,globalThis.deesDomTools===this&&(globalThis.deesDomTools=void 0,t.initializationPromise=null)}}};var xm=(()=>{let t=navigator.userAgent.indexOf("Mac OS X")===-1?Rr``.cssText:"";return Rr`
300
300
  /* width */
301
301
  ::-webkit-scrollbar {
302
302
  width: 0px;
@@ -304,7 +304,7 @@ ${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.pus
304
304
  body {
305
305
  scrollbar-width: none;
306
306
  }
307
- `.cssText})(),RC=Rr`
307
+ `.cssText})(),HC=Rr`
308
308
  /*
309
309
  @font-face {
310
310
  font-family: 'Material Icons';
@@ -322,37 +322,37 @@ ${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.pus
322
322
  }
323
323
 
324
324
  /* scroll bar styles */
325
- ${rr(hm)}
326
- `.cssText;var iz=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","menu","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","script","search","section","select","slot","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"],oz=[...iz,":not(xhtml|*)"].map(t=>`:where(${t})`).join(", "),AC=Rr`
325
+ ${rr(xm)}
326
+ `.cssText;var vz=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","menu","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","script","search","section","select","slot","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"],Sz=[...vz,":not(xhtml|*)"].map(t=>`:where(${t})`).join(", "),UC=Rr`
327
327
  @namespace xhtml url('http://www.w3.org/1999/xhtml');
328
328
 
329
329
  * {
330
330
  box-sizing: border-box;
331
331
  }
332
332
 
333
- ${rr(oz)} {
333
+ ${rr(Sz)} {
334
334
  transition: background 0.1s, color 0.1s;
335
335
  }
336
- `.cssText,sz=Rr`
337
- ${rr(AC)}
336
+ `.cssText,kz=Rr`
337
+ ${rr(UC)}
338
338
 
339
339
  :host {
340
340
  box-sizing: border-box;
341
341
  font-family: 'Geist Sans', 'Inter', sans-serif;
342
342
  }
343
343
 
344
- ${rr(hm)}
345
- `,az=Sb`
344
+ ${rr(xm)}
345
+ `,Tz=Db`
346
346
  <style>
347
- ${AC}
347
+ ${UC}
348
348
 
349
349
  :host {
350
350
  font-family: 'Geist Sans', 'Inter', sans-serif;
351
351
  }
352
352
 
353
- ${hm}
353
+ ${xm}
354
354
  </style>
355
- `,lz=o(async(t,e={})=>{let r=await bc.setupDomTools(e);return await r.runOnce("elementBasicSetup",async()=>{await r.setGlobalStyles(RC)}),r.globalStylesReady.status==="pending"&&r.globalStylesReady.resolve(),await r.globalStylesReady.promise,r},"setup");var Db={};se(Db,{cssGridColumns:()=>cz});var cz=o((t,e)=>{let r="";for(let n=0;n<t;n++)r+=` calc((100%/${t}) - (${e*(t-1)}px/${t}))`;return r},"cssGridColumns");var Cb={};se(Cb,{SweetScroll:()=>da.default,smartdelay:()=>be,smartmarkdown:()=>sc,smartpromise:()=>te,smartrouter:()=>ko,smartrx:()=>Pe,smartstate:()=>To,smartstring:()=>tn,smarturl:()=>Eo,typedrequest:()=>$t});export{bc as DomTools,bp as TypedRequest,Tb as breakpoints,Db as css,Eb as elementBasic,Cb as plugins};
355
+ `,Ez=o(async(t,e={})=>{let r=await Sc.setupDomTools(e);return await r.runOnce("elementBasicSetup",async()=>{await r.setGlobalStyles(HC)}),r.globalStylesReady.status==="pending"&&r.globalStylesReady.resolve(),await r.globalStylesReady.promise,r},"setup");var Nb={};se(Nb,{cssGridColumns:()=>Dz});var Dz=o((t,e)=>{let r="";for(let n=0;n<t;n++)r+=` calc((100%/${t}) - (${e*(t-1)}px/${t}))`;return r},"cssGridColumns");var Pb={};se(Pb,{SweetScroll:()=>ga.default,smartmarkdown:()=>cc,smartpromise:()=>ie,smartrouter:()=>So,smartrx:()=>Ne,smartstate:()=>ko,smartstring:()=>rn,smarturl:()=>To,typedrequest:()=>$t});export{Sc as DomTools,Tp as TypedRequest,Mb as breakpoints,Nb as css,Ib as elementBasic,Pb as plugins};
356
356
  /*! Bundled license information:
357
357
 
358
358
  sweet-scroll/sweet-scroll.js: