@design.estate/dees-domtools 5.0.0 → 5.0.1

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,25 +1,25 @@
1
- var UO=Object.create;var Rc=Object.defineProperty;var zO=Object.getOwnPropertyDescriptor;var HO=Object.getOwnPropertyNames;var WO=Object.getPrototypeOf,qO=Object.prototype.hasOwnProperty;var o=(t,e)=>Rc(t,"name",{value:e,configurable:!0});var Cr=(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)Rc(t,r,{get:e[r],enumerable:!0})},YO=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of HO(e))!qO.call(t,i)&&i!==r&&Rc(t,i,{get:()=>e[i],enumerable:!(n=zO(e,i))||n.enumerable});return t};var Wn=(t,e,r)=>(r=t!=null?UO(WO(t)):{},YO(e||!t||!t.__esModule?Rc(r,"default",{value:t,enumerable:!0}):r,t));var Rv=Cr((md,dd)=>{(function(t,e){typeof md=="object"&&typeof dd<"u"?dd.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e()})(md,(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 U=String(j);return!U||U.length>=N?j:""+Array(N+1-U.length).join(R)+j},"m"),T={s:x,z:o(function(j){var N=-j.utcOffset(),R=Math.abs(N),U=Math.floor(R/60),W=R%60;return(N<=0?"+":"-")+x(U,2,"0")+":"+x(W,2,"0")},"z"),m:o(function j(N,R){if(N.date()<R.date())return-j(R,N);var U=12*(R.year()-N.year())+(R.month()-N.month()),W=N.clone().add(U,u),K=R-W<0,Z=N.clone().add(U+(K?-1:1),u);return+(-(U+(R-W)/(K?W-Z:Z-W))||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"),A=o(function j(N,R,U){var W;if(!N)return E;if(typeof N=="string"){var K=N.toLowerCase();L[K]&&(W=K),R&&(L[K]=R,W=K);var Z=N.split("-");if(!W&&Z.length>1)return j(Z[0])}else{var ue=N.name;L[ue]=N,W=ue}return!U&&W&&(E=W),W||!U&&E},"t"),F=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"),z=T;z.l=A,z.i=D,z.w=function(j,N){return F(j,{locale:N.$L,utc:N.$u,x:N.$x,$offset:N.$offset})};var C=(function(){function j(R){this.$L=A(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(U){var W=U.date,K=U.utc;if(W===null)return new Date(NaN);if(z.u(W))return new Date;if(W instanceof Date)return new Date(W);if(typeof W=="string"&&!/Z$/i.test(W)){var Z=W.match(d);if(Z){var ue=Z[2]-1||0,w=(Z[7]||"0").substring(0,3);return K?new Date(Date.UTC(Z[1],ue,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,w)):new Date(Z[1],ue,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,w)}}return new Date(W)})(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 z},N.isValid=function(){return this.$d.toString()!==m},N.isSame=function(R,U){var W=F(R);return this.startOf(U)<=W&&W<=this.endOf(U)},N.isAfter=function(R,U){return F(R)<this.startOf(U)},N.isBefore=function(R,U){return this.endOf(U)<F(R)},N.$g=function(R,U,W){return z.u(R)?this[U]:this.set(W,R)},N.unix=function(){return Math.floor(this.valueOf()/1e3)},N.valueOf=function(){return this.$d.getTime()},N.startOf=function(R,U){var W=this,K=!!z.u(U)||U,Z=z.p(R),ue=o(function(O,v){var I=z.w(W.$u?Date.UTC(W.$y,v,O):new Date(W.$y,v,O),W);return K?I:I.endOf(l)},"l"),w=o(function(O,v){return z.w(W.toDate()[O].apply(W.toDate("s"),(K?[0,0,0,0]:[23,59,59,999]).slice(v)),W)},"$"),xe=this.$W,ke=this.$M,k=this.$D,Re="set"+(this.$u?"UTC":"");switch(Z){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,Kt=(xe<Ye?xe+7:xe)-Ye;return ue(K?k-Kt:k+(6-Kt),ke);case l:case h:return w(Re+"Hours",0);case a:return w(Re+"Minutes",1);case s:return w(Re+"Seconds",2);case i:return w(Re+"Milliseconds",3);default:return this.clone()}},N.endOf=function(R){return this.startOf(R,!1)},N.$set=function(R,U){var W,K=z.p(R),Z="set"+(this.$u?"UTC":""),ue=(W={},W[l]=Z+"Date",W[h]=Z+"Date",W[u]=Z+"Month",W[p]=Z+"FullYear",W[a]=Z+"Hours",W[s]=Z+"Minutes",W[i]=Z+"Seconds",W[n]=Z+"Milliseconds",W)[K],w=K===l?this.$D+(U-this.$W):U;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,U){return this.clone().$set(R,U)},N.get=function(R){return this[z.p(R)]()},N.add=function(R,U){var W,K=this;R=Number(R);var Z=z.p(U),ue=o(function(ke){var k=F(K);return z.w(k.date(k.date()+Math.round(ke*R)),K)},"y");if(Z===u)return this.set(u,this.$M+R);if(Z===p)return this.set(p,this.$y+R);if(Z===l)return ue(1);if(Z===c)return ue(7);var w=(W={},W[s]=e,W[a]=r,W[i]=t,W)[Z]||1,xe=this.$d.getTime()+R*w;return z.w(xe,this)},N.subtract=function(R,U){return this.add(-1*R,U)},N.format=function(R){var U=this,W=this.$locale();if(!this.isValid())return W.invalidDate||m;var K=R||"YYYY-MM-DDTHH:mm:ssZ",Z=z.z(this),ue=this.$H,w=this.$m,xe=this.$M,ke=W.weekdays,k=W.months,Re=W.meridiem,Ye=o(function(v,I,M,B){return v&&(v[I]||v(U,K))||M[I].slice(0,B)},"h"),Kt=o(function(v){return z.s(ue%12||12,v,"0")},"d"),O=Re||function(v,I,M){var B=v<12?"AM":"PM";return M?B.toLowerCase():B};return K.replace(g,(function(v,I){return I||(function(M){switch(M){case"YY":return String(U.$y).slice(-2);case"YYYY":return z.s(U.$y,4,"0");case"M":return xe+1;case"MM":return z.s(xe+1,2,"0");case"MMM":return Ye(W.monthsShort,xe,k,3);case"MMMM":return Ye(k,xe);case"D":return U.$D;case"DD":return z.s(U.$D,2,"0");case"d":return String(U.$W);case"dd":return Ye(W.weekdaysMin,U.$W,ke,2);case"ddd":return Ye(W.weekdaysShort,U.$W,ke,3);case"dddd":return ke[U.$W];case"H":return String(ue);case"HH":return z.s(ue,2,"0");case"h":return Kt(1);case"hh":return Kt(2);case"a":return O(ue,w,!0);case"A":return O(ue,w,!1);case"m":return String(w);case"mm":return z.s(w,2,"0");case"s":return String(U.$s);case"ss":return z.s(U.$s,2,"0");case"SSS":return z.s(U.$ms,3,"0");case"Z":return Z}return null})(v)||Z.replace(":","")}))},N.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},N.diff=function(R,U,W){var K,Z=this,ue=z.p(U),w=F(R),xe=(w.utcOffset()-this.utcOffset())*e,ke=this-w,k=o(function(){return z.m(Z,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 W?K:z.a(K)},N.daysInMonth=function(){return this.endOf(u).$D},N.$locale=function(){return L[this.$L]},N.locale=function(R,U){if(!R)return this.$L;var W=this.clone(),K=A(R,U,!0);return K&&(W.$L=K),W},N.clone=function(){return z.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 F.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])}})),F.extend=function(j,N){return j.$i||(j(N,C,F),j.$i=!0),F},F.locale=A,F.isDayjs=D,F.unix=function(j){return F(1e3*j)},F.en=L[E],F.Ls=L,F.p={},F}))});var Fv=Cr((gd,yd)=>{(function(t,e){typeof gd=="object"&&typeof yd<"u"?yd.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_isToday=e()})(gd,(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 jv=Cr((GEe,Bv)=>{"use strict";Bv.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 zv=Cr((JEe,Uv)=>{"use strict";Uv.exports=Object.freeze({DISCONNECTED:1,PRECEDING:2,FOLLOWING:4,CONTAINS:8,CONTAINED_BY:16})});var Vv=Cr((XEe,Yv)=>{"use strict";var Hv=Symbol(),Wv=Symbol(),si=Symbol(),qv=Symbol(),Ir=class{static{o(this,"TreeIterator")}constructor(e,r,n,i){this[Hv]=e,this[Wv]=r,this[si]=n,this[qv]=i}next(){let e=this[Hv],r=this[qv],n=this[Wv];if(!this[si])return{done:!0,value:n};let i=this[si];return r===1?this[si]=e._node(i).previousSibling:r===2?this[si]=e._node(i).nextSibling:r===3?this[si]=e._node(i).parent:r===4?this[si]=e.preceding(i,{root:n}):this[si]=e.following(i,{root:n}),{done:!1,value:i}}};Object.defineProperty(Ir.prototype,Symbol.iterator,{value:o(function(){return this},"value"),writable:!1}),Ir.PREV=1,Ir.NEXT=2,Ir.PARENT=3,Ir.PRECEDING=4,Ir.FOLLOWING=5,Object.freeze(Ir),Object.freeze(Ir.prototype),Yv.exports=Ir});var Gv=Cr((eDe,Kv)=>{"use strict";var bL=jv(),ai=zv(),pr=Vv();function Ed(){return!0}o(Ed,"returnTrue");function Cs(t,e){return t[t.length-1-e]}o(Cs,"reverseArrayIndex");var Zf=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 bL)}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||Ed,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||Ed,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||Ed,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 pr(this,e,n?i.lastChild:i.firstChild,n?pr.PREV:pr.NEXT)}previousSiblingsIterator(e){return new pr(this,e,this._node(e).previousSibling,pr.PREV)}nextSiblingsIterator(e){return new pr(this,e,this._node(e).nextSibling,pr.NEXT)}ancestorsIterator(e){return new pr(this,e,e,pr.PARENT)}treeIterator(e,r){let n=r&&r.reverse;return new pr(this,e,n?this.lastInclusiveDescendant(e):e,n?pr.PRECEDING:pr.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 ai.CONTAINS|ai.PRECEDING;n.push(f),f=this.parent(f)}}let i=[];{let f=r;for(;f;){if(f===e)return ai.CONTAINED_BY|ai.FOLLOWING;i.push(f),f=this.parent(f)}}let s=Cs(n,0);if(!s||s!==Cs(i,0))return ai.DISCONNECTED;let a=0,l=Math.min(n.length,i.length);for(let f=0;f<l;++f){let p=Cs(n,f),h=Cs(i,f);if(p!==h)break;a=f}let c=this.index(Cs(n,a+1));return this.index(Cs(i,a+1))<c?ai.PRECEDING:ai.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}};Kv.exports=Zf,Zf.TreePosition=ai});var Pk=Cr((uIe,Nk)=>{"use strict";Nk.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 AD=Cr((pWe,FD)=>{"use strict";var Gh=Object.prototype.hasOwnProperty,ID=Object.prototype.toString,MD=Object.defineProperty,ND=Object.getOwnPropertyDescriptor,PD=o(function(e){return typeof Array.isArray=="function"?Array.isArray(e):ID.call(e)==="[object Array]"},"isArray"),LD=o(function(e){if(!e||ID.call(e)!=="[object Object]")return!1;var r=Gh.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&Gh.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;var i;for(i in e);return typeof i>"u"||Gh.call(e,i)},"isPlainObject"),_D=o(function(e,r){MD&&r.name==="__proto__"?MD(e,r.name,{enumerable:!0,configurable:!0,value:r.newValue,writable:!0}):e[r.name]=r.newValue},"setProperty"),RD=o(function(e,r){if(r==="__proto__")if(Gh.call(e,r)){if(ND)return ND(e,r).value}else return;return e[r]},"getProperty");FD.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=RD(l,r),i=RD(e,r),l!==i&&(f&&i&&(LD(i)||(s=PD(i)))?(s?(s=!1,a=n&&PD(n)?n:[]):a=n&&LD(n)?n:{},_D(l,{name:r,newValue:t(f,a,i)})):typeof i<"u"&&_D(l,{name:r,newValue:i}));return l},"extend")});var _C=Cr((A7e,Kx)=>{(function(){var t;typeof Kx<"u"?t=Kx.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 tO=Cr(jr=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0}),jr.PathError=jr.TokenData=void 0,jr.parse=ob,jr.compile=qU,jr.match=VU,jr.pathToRegexp=JC,jr.stringify=GU;var nb="/",ib=o(t=>t,"NOOP_VALUE"),UU=/^[$_\p{ID_Start}]$/u,GC=/^[$\u200c\u200d\p{ID_Continue}]$/u,zU=/^[$_\p{ID_Start}][$\u200c\u200d\p{ID_Continue}]*$/u,HU="{}()[]+?!";function WU(t){return t.replace(/[{}()\[\]+?!:*\\]/g,"\\$&")}o(WU,"escapeText");function Mi(t){return t.replace(/[.+*?^${}()[\]|/\\]/g,"\\$&")}o(Mi,"escape");var hm=class{static{o(this,"TokenData")}constructor(e,r){this.tokens=e,this.originalPath=r}};jr.TokenData=hm;var Ni=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}};jr.PathError=Ni;function ob(t,e={}){let{encodePath:r=ib}=e,n=[...t],i=[],s=0,a=0;function l(){let u="";if(UU.test(n[s]))do u+=n[s++];while(GC.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 Ni(`Unterminated quote at index ${f}`,t)}if(!u)throw new Ni(`Missing parameter name at index ${s}`,t);return u}for(o(l,"name");s<n.length;){let u=n[s++];HU.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 Ni(`Unexpected ${p.type} at index ${p.index}, expected ${u}`,t)}return f}return o(c,"consumeUntil"),new hm(c("end"),t)}o(ob,"parse");function qU(t,e={}){let{encode:r=encodeURIComponent,delimiter:n=nb}=e,i=typeof t=="object"?t:ob(t,e),s=QC(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(qU,"compile");function QC(t,e,r){let n=t.map(i=>YU(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(QC,"tokensToFunction");function YU(t,e,r){if(t.type==="text")return()=>[t.value];if(t.type==="group"){let i=QC(t.tokens,e,r);return s=>{let[a,...l]=i(s);return l.length?[""]:[a]}}let n=r||ib;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(YU,"tokenToFunction");function VU(t,e={}){let{decode:r=decodeURIComponent,delimiter:n=nb}=e,{regexp:i,keys:s}=JC(t,e),a=s.map(l=>r===!1?ib: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(VU,"match");function JC(t,e={}){let{delimiter:r=nb,end:n=!0,sensitive:i=!1,trailing:s=!0}=e,a=new sb("^"),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:ob(p,e);ab(h.tokens,0,[],m=>{if(c++>=256)throw new Ni("Too many path combinations",h.originalPath);let d=a;for(let g of KU(m,r,h.originalPath))d=d.add(g.source,g.key);d.add("")})}let u=[],f=XC(a,u);return s&&(f+="(?:"+Mi(r)+"$)?"),f+=n?"$":"(?="+Mi(r)+"|$)",{regexp:new RegExp(f,i?"":"i"),keys:u}}o(JC,"pathToRegexp");function XC(t,e){t.key&&e.push(t.key);let r=Object.keys(t.children),n=r.map(i=>XC(t.children[i],e)).join("|");return t.source+(r.length<2?n:`(?:${n})`)}o(XC,"toRegExp");var sb=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 ab(t,e,r,n){for(;e<t.length;){let i=t[e++];if(i.type==="group"){ab(i.tokens,0,r.slice(),s=>ab(t,e,s,n));continue}r.push(i)}n(r)}o(ab,"flatten");function KU(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:Mi(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 Ni(`Missing text before "${p.name}" ${p.type}`,r);p.type==="param"?(n.push({source:l?`(${Pi(e,i)}+?)`:u(c,"wildcard")?`(${Pi(e,f(c))}+?)`:`(${Pi(e,"")}+?)`,key:p}),l|=a=1):(n.push({source:l&2?`(${Pi(i,"")}+?)`:l&1?`(${Pi(s,"")}+?)`:s?`(${Pi(s,"")}+?|${Pi(e,"")}+?)`:"([^]+?)",key:p}),s="",l|=a=2),i="";continue}throw new TypeError(`Unknown token type: ${p.type}`)}return n}o(KU,"toRegExpSource");function Pi(t,e){return e.length>t.length?Pi(e,t):(t===e&&(e=""),e.length>1?`(?:(?!${Mi(t)}|${Mi(e)})[^])`:t.length>1?`(?:(?!${Mi(t)})[^${Mi(e)}])`:`[^${Mi(t+e)}]`)}o(Pi,"negate");function ZC(t,e){let r="";for(;e<t.length;){let n=t[e++];if(n.type==="text"){r+=WU(n.value);continue}if(n.type==="group"){r+="{"+ZC(n.tokens,0)+"}";continue}if(n.type==="param"){r+=":"+eO(n.name,t[e]);continue}if(n.type==="wildcard"){r+="*"+eO(n.name,t[e]);continue}throw new TypeError(`Unknown token type: ${n.type}`)}return r}o(ZC,"stringifyTokens");function GU(t){return ZC(t.tokens,0)}o(GU,"stringify");function eO(t,e){return!zU.test(t)||e?.type==="text"&&GC.test(e.value[0])?JSON.stringify(t):t}o(eO,"stringifyName")});var pO=Cr((Pb,Lb)=>{(function(t,e){typeof Pb=="object"&&typeof Lb<"u"?Lb.exports=e():typeof define=="function"&&define.amd?define(e):(t=t||self,t.SweetScroll=e())})(Pb,function(){"use strict";var t=o(function(){return t=Object.assign||o(function(v){for(var I,M=1,B=arguments.length;M<B;M++){I=arguments[M];for(var re in I)Object.prototype.hasOwnProperty.call(I,re)&&(v[re]=I[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,I=Object.defineProperty({},"passive",{get:o(function(){O=!0},"get")});v.addEventListener("test",null,I),v.removeEventListener("test",null,I)}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,I,M,B){return M*(v/=B)*v+I},"easeInQuad"),easeOutQuad:o(function(O,v,I,M,B){return-M*(v/=B)*(v-2)+I},"easeOutQuad"),easeInOutQuad:o(function(O,v,I,M,B){return(v/=B/2)<1?M/2*v*v+I:-M/2*(--v*(v-2)-1)+I},"easeInOutQuad"),easeInCubic:o(function(O,v,I,M,B){return M*(v/=B)*v*v+I},"easeInCubic"),easeOutCubic:o(function(O,v,I,M,B){return M*((v=v/B-1)*v*v+1)+I},"easeOutCubic"),easeInOutCubic:o(function(O,v,I,M,B){return(v/=B/2)<1?M/2*v*v*v+I:M/2*((v-=2)*v*v+2)+I},"easeInOutCubic"),easeInQuart:o(function(O,v,I,M,B){return M*(v/=B)*v*v*v+I},"easeInQuart"),easeOutQuart:o(function(O,v,I,M,B){return-M*((v=v/B-1)*v*v*v-1)+I},"easeOutQuart"),easeInOutQuart:o(function(O,v,I,M,B){return(v/=B/2)<1?M/2*v*v*v*v+I:-M/2*((v-=2)*v*v*v-2)+I},"easeInOutQuart"),easeInQuint:o(function(O,v,I,M,B){return M*(v/=B)*v*v*v*v+I},"easeInQuint"),easeOutQuint:o(function(O,v,I,M,B){return M*((v=v/B-1)*v*v*v*v+1)+I},"easeOutQuint"),easeInOutQuint:o(function(O,v,I,M,B){return(v/=B/2)<1?M/2*v*v*v*v*v+I:M/2*((v-=2)*v*v*v*v+2)+I},"easeInOutQuint"),easeInSine:o(function(O,v,I,M,B){return-M*p(v/B*(g/2))+M+I},"easeInSine"),easeOutSine:o(function(O,v,I,M,B){return M*h(v/B*(g/2))+I},"easeOutSine"),easeInOutSine:o(function(O,v,I,M,B){return-M/2*(p(g*v/B)-1)+I},"easeInOutSine"),easeInExpo:o(function(O,v,I,M,B){return v===0?I:M*m(2,10*(v/B-1))+I},"easeInExpo"),easeOutExpo:o(function(O,v,I,M,B){return v===B?I+M:M*(-m(2,-10*v/B)+1)+I},"easeOutExpo"),easeInOutExpo:o(function(O,v,I,M,B){return v===0?I:v===B?I+M:(v/=B/2)<1?M/2*m(2,10*(v-1))+I:M/2*(-m(2,-10*--v)+2)+I},"easeInOutExpo"),easeInCirc:o(function(O,v,I,M,B){return-M*(d(1-(v/=B)*v)-1)+I},"easeInCirc"),easeOutCirc:o(function(O,v,I,M,B){return M*d(1-(v=v/B-1)*v)+I},"easeOutCirc"),easeInOutCirc:o(function(O,v,I,M,B){return(v/=B/2)<1?-M/2*(d(1-v*v)-1)+I:M/2*(d(1-(v-=2)*v)+1)+I},"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,v){if(E(v))return O===v;for(var I=x(v),M=I.length;--M>=0&&I[M]!==O;);return M>-1},"matches"),A=o(function(O){return Math.max(O.scrollHeight,O.clientHeight,O.offsetHeight)},"getHeight"),F=o(function(O){return Math.max(O.scrollWidth,O.clientWidth,O.offsetWidth)},"getWidth"),z=o(function(O){return{width:F(O),height:A(O)}},"getSize"),C=o(function(O){var v=L(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(F(document.body),F(document.documentElement)),height:Math.max(A(document.body),A(document.documentElement))}:z(O)}},"getViewportAndElementSizes"),le={y:"scrollTop",x:"scrollLeft"},j={y:"pageYOffset",x:"pageXOffset"},N=o(function(O,v){return L(O)?O[j[v]]:O[le[v]]},"getScroll"),R=o(function(O,v,I){if(L(O)){var M=I==="y";O.scrollTo(M?O.pageXOffset:v,M?v:O.pageYOffset)}else O[le[I]]=v},"setScroll"),U=o(function(O,v){var I=O.getBoundingClientRect();if(I.width||I.height){var M={top:0,left:0},B=void 0;if(L(v)||P(v))B=document.documentElement,M.top=window[j.y],M.left=window[j.x];else{B=v;var re=B.getBoundingClientRect();M.top=re.top*-1+B[le.y],M.left=re.left*-1+B[le.x]}return{top:I.top+M.top-B.clientTop,left:I.left+M.left-B.clientLeft}}return I},"getOffset"),W=(function(){return e?"onwheel"in document?"wheel":"mousewheel":"wheel"})(),K=o(function(O){return O==="wheel"?W:O},"eventName"),Z=o(function(O,v,I,M,B){I.split(" ").forEach(function(re){O[v](K(re),M,n?{passive:B}:!1)})},"apply"),ue=o(function(O,v,I,M){return Z(O,"addEventListener",v,I,M)},"addEvent"),w=o(function(O,v,I,M){return Z(O,"removeEventListener",v,I,M)},"removeEvent"),xe=/^(\+|-)=(\d+(?:\.\d+)?)$/,ke=o(function(O,v){var I={top:0,left:0,relative:!1};if(c(O,"top")||c(O,"left"))I=t({},I,O);else if(a(O))if(O.length>1)I.top=O[0],I.left=O[1];else if(O.length===1)I.top=v?O[0]:0,I.left=v?0:O[0];else return null;else if(l(O))v?I.top=O:I.left=O;else if(i(O)){var M=O.trim().match(xe);if(!M)return null;var B=M[1],re=parseInt(M[2],10);B==="+"?(I.top=v?re:0,I.left=v?0:re):(I.top=v?-re:0,I.left=v?0:-re),I.relative=!0}else return null;return I},"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},Re="click",Ye="wheel touchstart touchmove",Kt=(function(){function O(v,I){var M=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 _e=M,Pe=_e.$el,Te=_e.ctx;if(Te.start||(Te.start=re),!Te.progress||!Pe){M.stop();return}var _t=Te.opts,it=Te.pos,Ot=Te.start,Tr=Te.startPos,zr=Te.easing,Gt=_t.duration,ar={top:"y",left:"x"},Rt=re-Ot,je=Math.min(1,Math.max(Rt/Gt,0));Object.keys(it).forEach(function(Hr){var _=it[Hr],q=Tr[Hr],oe=_-q;if(oe!==0){var fe=zr(je,Gt*je,0,1,Gt);R(Pe,Math.round(q+oe*fe),ar[Hr])}}),Rt<=Gt?(M.hook(_t,"step",je),Te.id=O.raf(M.loop)):M.stop(!0)},this.handleClick=function(re){for(var _e=M.opts,Pe=re.target;Pe&&Pe!==document;Pe=Pe.parentNode)if(D(Pe,_e.trigger)){var Te=JSON.parse(Pe.getAttribute("data-scroll-options")||"{}"),_t=Pe.getAttribute("data-scroll"),it=_t||Pe.getAttribute("href"),Ot=t({},_e,Te),Tr=Ot.preventDefault,zr=Ot.stopPropagation,Gt=Ot.vertical,ar=Ot.horizontal;Tr&&re.preventDefault(),zr&&re.stopPropagation(),M.ctx.$trigger=Pe,ar&&Gt?M.to(it,Ot):Gt?M.toTop(it,Ot):ar&&M.toLeft(it,Ot);break}},this.handleStop=function(re){var _e=M.ctx,Pe=_e.opts;Pe&&Pe.cancellable?(_e.cancel=!0,M.stop()):re.preventDefault()},this.opts=t({},k,v||{});var B=null;e&&(typeof I=="string"?B=T(I):I!=null?B=I:B=window),this.$el=B,B&&this.bind(!0,!1)}return o(O,"SweetScroll"),O.create=function(v,I){return new O(v,I)},O.prototype.to=function(v,I){if(e){var M=this,B=M.$el,re=M.ctx,_e=M.opts,Pe=re.$trigger,Te=t({},_e,I||{}),_t=Te.offset,it=Te.vertical,Ot=Te.horizontal,Tr=E(Te.header)?Te.header:T(Te.header),zr=/^#/,Gt=i(v)&&zr.test(v)?v:null;if(re.opts=Te,re.cancel=!1,re.hash=Gt,this.stop(),!!B){var ar=ke(_t,it),Rt=ke(v,it),je={top:0,left:0};if(Rt)if(Rt.relative){var Hr=N(B,it?"y":"x");je.top=it?Hr+Rt.top:Rt.top,je.left=it?Rt.left:Hr+Rt.left}else je=Rt;else if(i(v)&&v!=="#"){var _=T(v);if(!_)return;je=U(_,B)}ar&&(je.top+=ar.top,je.left+=ar.left),Tr&&(je.top=Math.max(0,je.top-z(Tr).height));var q=C(B),oe=q.viewport,fe=q.size;if(je.top=it?Math.max(0,Math.min(fe.height-oe.height,je.top)):N(B,"y"),je.left=Ot?Math.max(0,Math.min(fe.width-oe.width,je.left)):N(B,"x"),this.hook(Te,"before",je,Pe)===!1){re.opts=null;return}re.pos=je,this.start(Te),this.bind(!1,!0)}}},O.prototype.toTop=function(v,I){this.to(v,t({},I||{},{vertical:!0,horizontal:!1}))},O.prototype.toLeft=function(v,I){this.to(v,t({},I||{},{vertical:!1,horizontal:!0}))},O.prototype.toElement=function(v,I){var M=this.$el;!e||!M||this.to(U(v,M),I||{})},O.prototype.stop=function(v){v===void 0&&(v=!1);var I=this,M=I.$el,B=I.ctx,re=B.pos;!M||!B.progress||(O.caf(B.id),B.progress=!1,B.start=0,B.id=0,v&&re&&(R(M,re.left,"x"),R(M,re.top,"y")),this.complete())},O.prototype.update=function(v){if(this.$el){var I=t({},this.opts,v);this.stop(),this.unbind(!0,!0),this.opts=I,this.bind(!0,!1)}},O.prototype.destroy=function(){this.$el&&(this.stop(),this.unbind(!0,!0),this.$el=null)},O.prototype.onBefore=function(v,I){return!0},O.prototype.onStep=function(v){},O.prototype.onAfter=function(v,I){},O.prototype.onCancel=function(){},O.prototype.onComplete=function(v){},O.prototype.start=function(v){var I=this.ctx;I.opts=v,I.progress=!0,I.easing=s(v.easing)?v.easing:y[v.easing];var M=this.$el,B={top:N(M,"y"),left:N(M,"x")};I.startPos=B,I.id=O.raf(this.loop)},O.prototype.complete=function(){var v=this,I=v.$el,M=v.ctx,B=M.hash,re=M.cancel,_e=M.opts,Pe=M.pos,Te=M.$trigger;if(!(!I||!_e)){if(B!=null&&B!==window.location.hash){var _t=_e.updateURL;e&&r&&_t!==!1&&window.history[_t==="replace"?"replaceState":"pushState"](null,"",B)}this.unbind(!1,!0),M.opts=null,M.$trigger=null,re?this.hook(_e,"cancel"):this.hook(_e,"after",Pe,Te),this.hook(_e,"complete",re)}},O.prototype.hook=function(v,I){for(var M=[],B=2;B<arguments.length;B++)M[B-2]=arguments[B];var re,_e=v[I],Pe,Te;return s(_e)&&(Pe=_e.apply(this,M.concat([this]))),Te=(re=this)["on"+(I[0].toUpperCase()+I.slice(1))].apply(re,M),Pe!==void 0?Pe:Te},O.prototype.bind=function(v,I){var M=this,B=M.$el,re=M.ctx.opts;B&&(v&&ue(B,Re,this.handleClick,!1),I&&ue(B,Ye,this.handleStop,re?re.cancellable:!0))},O.prototype.unbind=function(v,I){var M=this,B=M.$el,re=M.ctx.opts;B&&(v&&w(B,Re,this.handleClick,!1),I&&w(B,Ye,this.handleStop,re?re.cancellable:!0))},O.raf=u,O.caf=f,O})();return Kt})});var Yb={};se(Yb,{setup:()=>Q4,staticStyles:()=>K4,styles:()=>G4});var Sl={};se(Sl,{DeesComms:()=>pg});var Fc={};var jt={};se(jt,{TYPED_REQUEST_REDACTED_PAYLOAD:()=>_s,TypedHandler:()=>ng,TypedRequest:()=>$p,TypedRequestRetryLimitError:()=>Ap,TypedRequestTimeoutError:()=>Fp,TypedResponseError:()=>dr,TypedRouter:()=>ig,TypedTarget:()=>og,VirtualStream:()=>Pr,VirtualStreamActivationScope:()=>Cn,VirtualStreamClosedError:()=>so,VirtualStreamLifecycleContractError:()=>Cp,VirtualStreamOpenTimeoutError:()=>ao,getTypedRequestResponseInterestKey:()=>Lp});var hr={};se(hr,{AsyncExecutionStack:()=>Dd,BackpressuredArray:()=>Cd,FastMap:()=>Zi,Interest:()=>rl,InterestMap:()=>Od,LimitedArray:()=>Id,LoopTracker:()=>Md,ObjectMap:()=>kn,Stringmap:()=>nl,TimedAggregator:()=>il,TimedAggregtor:()=>il,Tree:()=>Nd,uni:()=>Qv});var Ma={};se(Ma,{SmartMatch:()=>_m});var Ia={};se(Ia,{isMatch:()=>GO,matcher:()=>KO});function $i(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}o($i,"escapeStringRegexp");var Lm=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"),VO=o((t,e)=>{e={caseSensitive:!1,...e};let r=t+JSON.stringify(e);if(Lm.has(r))return Lm.get(r);let n=t[0]==="!";n&&(t=t.slice(1)),t=$i(t).replace(/\\\*/g,"[\\s\\S]*");let i=new RegExp(`^${t}$`,e.caseSensitive?"":"i");return i.negated=n,Lm.set(r,i),i},"makeRegexp"),ew=o((t,e,r,n)=>{if(t=Zb(t,"inputs"),e=Zb(e,"patterns"),e.length===0)return[];e=e.map(a=>VO(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 KO(t,e,r){return ew(t,e,r,!1)}o(KO,"matcher");function GO(t,e,r){return ew(t,e,r,!0).length>0}o(GO,"isMatch");var _m=class{static{o(this,"SmartMatch")}constructor(e){this.wildcard=e}match(e){return Ia.isMatch(e,this.wildcard)}};var Q={};se(Q,{CumulativeDeferred:()=>$c,Deferred:()=>Ac,Timeout:()=>Na,cumulativeDefer:()=>XO,defer:()=>qn,delayFor:()=>nw,delayForRandom:()=>nI,fromCallback:()=>oI,getFirstTrueOrFalse:()=>iI,map:()=>tI,rejectedPromise:()=>eI,resolvedPromise:()=>ZO,timeoutAndContinue:()=>rI,timeoutWrap:()=>rw});var Ac=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"})}},qn=o(()=>new Ac,"defer");var JO=2147483647,tw=o(t=>{t.unref?.()},"unrefTimer"),Na=class{static{o(this,"Timeout")}constructor(e,r,n=!1){this.unrefed=!1,this.state="running",this.timeLeftAtCancel=0,this.passOn=r,this.deferred=qn(),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,JO),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&&tw(n),n}makeUnrefed(){this.unrefed=!0,tw(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 $c=class{static{o(this,"CumulativeDeferred")}constructor(){this.accumulatedPromises=[],this.deferred=qn(),this.promise=this.deferred.promise,setTimeout(async()=>{for(;this.accumulatedPromises.length>0;)await this.accumulatedPromises.shift();this.deferred.resolve()},0)}subDefer(){let e=qn();return this.addPromise(e.promise),e}addPromise(e){this.accumulatedPromises.push(e)}},XO=o(()=>new $c,"cumulativeDefer");function ZO(t){return Promise.resolve(t)}o(ZO,"resolvedPromise");var eI=o(t=>Promise.reject(t),"rejectedPromise"),tI=o(async(t,e)=>Promise.all(t.map(e)),"map"),rw=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"),rI=o(async(t,e=6e4)=>rw(t,e,!1),"timeoutAndContinue"),nw=o(async(t,e,r=!1)=>(await new Na(t,void 0,r).promise,e),"delayFor"),nI=o(async(t,e,r,n=!1)=>(await nw(Math.random()*(e-t)+t,void 0,n),r),"delayForRandom"),iI=o(async t=>{let e=qn();for(let r of t)r.then(n=>{n===!0&&e.resolve(!0)});return Promise.all(t).then(()=>{e.resolve(!1)}),e.promise},"getFirstTrueOrFalse"),oI=o(t=>new Promise((e,r)=>{t((n,i)=>{n?r(n):e(i)})}),"fromCallback");var Ne={};se(Ne,{ObservableIntake:()=>od,Observablemap:()=>id,fromStreamWithBackpressure:()=>jN,rxjs:()=>rs});var rs={};se(rs,{Observable:()=>we,ReplaySubject:()=>Qo,Subject:()=>$t,Subscription:()=>At,from:()=>Jr,fromEvent:()=>Hi,of:()=>Aa,ops:()=>BN});var Rm=o(function(t,e){return Rm=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])},Rm(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");Rm(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 Fm=o(function(){return Fm=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"),Fm.apply(this,arguments)},"__assign");function aI(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(aI,"__rest");function lI(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(lI,"__decorate");function cI(t,e){return function(r,n){e(r,n,t)}}o(cI,"__param");function uI(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(uI,"__esDecorate");function fI(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(fI,"__runInitializers");function pI(t){return typeof t=="symbol"?t:"".concat(t)}o(pI,"__propKey");function hI(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(hI,"__setFunctionName");function mI(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}o(mI,"__metadata");function Bm(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(Bm,"__awaiter");function Pa(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(Pa,"__generator");var Am=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 dI(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Am(e,t,r)}o(dI,"__exportStar");function dt(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(dt,"__values");function ct(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(ct,"__read");function gI(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(ct(arguments[e]));return t}o(gI,"__spread");function yI(){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(yI,"__spreadArrays");function Ft(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(Ft,"__spreadArray");function vn(t){return this instanceof vn?(this.v=t,this):new vn(t)}o(vn,"__await");function jm(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 vn?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(jm,"__asyncGenerator");function xI(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:vn(t[i](a)),done:!1}:s?s(a):a}:s}}o(xI,"__asyncDelegator");function Um(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 dt=="function"?dt(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(Um,"__asyncValues");function bI(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}o(bI,"__makeTemplateObject");var wI=Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e},$m=o(function(t){return $m=Object.getOwnPropertyNames||function(e){var r=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[r.length]=n);return r},$m(t)},"ownKeys");function SI(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r=$m(t),n=0;n<r.length;n++)r[n]!=="default"&&Am(e,t,r[n]);return wI(e,t),e}o(SI,"__importStar");function vI(t){return t&&t.__esModule?t:{default:t}}o(vI,"__importDefault");function kI(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(kI,"__classPrivateFieldGet");function TI(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(TI,"__classPrivateFieldSet");function EI(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(EI,"__classPrivateFieldIn");function DI(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(DI,"__addDisposableResource");var CI=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 OI(t){function e(s){t.error=t.hasError?new CI(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(OI,"__disposeResources");function II(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(II,"__rewriteRelativeImportExtension");var Sz={__extends:Xe,__assign:Fm,__rest:aI,__decorate:lI,__param:cI,__esDecorate:uI,__runInitializers:fI,__propKey:pI,__setFunctionName:hI,__metadata:mI,__awaiter:Bm,__generator:Pa,__createBinding:Am,__exportStar:dI,__values:dt,__read:ct,__spread:gI,__spreadArrays:yI,__spreadArray:Ft,__await:vn,__asyncGenerator:jm,__asyncDelegator:xI,__asyncValues:Um,__makeTemplateObject:bI,__importStar:SI,__importDefault:vI,__classPrivateFieldGet:kI,__classPrivateFieldSet:TI,__classPrivateFieldIn:EI,__addDisposableResource:DI,__disposeResources:OI,__rewriteRelativeImportExtension:II};function pe(t){return typeof t=="function"}o(pe,"isFunction");function Bc(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(Bc,"createErrorClass");var La=Bc(function(t){return o(function(r){t(this),this.message=r?r.length+` errors occurred during unsubscription:
1
+ var zO=Object.create;var Fc=Object.defineProperty;var HO=Object.getOwnPropertyDescriptor;var WO=Object.getOwnPropertyNames;var qO=Object.getPrototypeOf,YO=Object.prototype.hasOwnProperty;var o=(t,e)=>Fc(t,"name",{value:e,configurable:!0});var Cr=(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)Fc(t,r,{get:e[r],enumerable:!0})},VO=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of WO(e))!YO.call(t,i)&&i!==r&&Fc(t,i,{get:()=>e[i],enumerable:!(n=HO(e,i))||n.enumerable});return t};var qn=(t,e,r)=>(r=t!=null?zO(qO(t)):{},VO(e||!t||!t.__esModule?Fc(r,"default",{value:t,enumerable:!0}):r,t));var Fv=Cr((dd,gd)=>{(function(t,e){typeof dd=="object"&&typeof gd<"u"?gd.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e()})(dd,(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 U=String(j);return!U||U.length>=N?j:""+Array(N+1-U.length).join(R)+j},"m"),T={s:x,z:o(function(j){var N=-j.utcOffset(),R=Math.abs(N),U=Math.floor(R/60),W=R%60;return(N<=0?"+":"-")+x(U,2,"0")+":"+x(W,2,"0")},"z"),m:o(function j(N,R){if(N.date()<R.date())return-j(R,N);var U=12*(R.year()-N.year())+(R.month()-N.month()),W=N.clone().add(U,u),K=R-W<0,Z=N.clone().add(U+(K?-1:1),u);return+(-(U+(R-W)/(K?W-Z:Z-W))||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"),A=o(function j(N,R,U){var W;if(!N)return E;if(typeof N=="string"){var K=N.toLowerCase();L[K]&&(W=K),R&&(L[K]=R,W=K);var Z=N.split("-");if(!W&&Z.length>1)return j(Z[0])}else{var ue=N.name;L[ue]=N,W=ue}return!U&&W&&(E=W),W||!U&&E},"t"),F=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"),z=T;z.l=A,z.i=D,z.w=function(j,N){return F(j,{locale:N.$L,utc:N.$u,x:N.$x,$offset:N.$offset})};var C=(function(){function j(R){this.$L=A(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(U){var W=U.date,K=U.utc;if(W===null)return new Date(NaN);if(z.u(W))return new Date;if(W instanceof Date)return new Date(W);if(typeof W=="string"&&!/Z$/i.test(W)){var Z=W.match(d);if(Z){var ue=Z[2]-1||0,w=(Z[7]||"0").substring(0,3);return K?new Date(Date.UTC(Z[1],ue,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,w)):new Date(Z[1],ue,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,w)}}return new Date(W)})(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 z},N.isValid=function(){return this.$d.toString()!==m},N.isSame=function(R,U){var W=F(R);return this.startOf(U)<=W&&W<=this.endOf(U)},N.isAfter=function(R,U){return F(R)<this.startOf(U)},N.isBefore=function(R,U){return this.endOf(U)<F(R)},N.$g=function(R,U,W){return z.u(R)?this[U]:this.set(W,R)},N.unix=function(){return Math.floor(this.valueOf()/1e3)},N.valueOf=function(){return this.$d.getTime()},N.startOf=function(R,U){var W=this,K=!!z.u(U)||U,Z=z.p(R),ue=o(function(O,v){var I=z.w(W.$u?Date.UTC(W.$y,v,O):new Date(W.$y,v,O),W);return K?I:I.endOf(l)},"l"),w=o(function(O,v){return z.w(W.toDate()[O].apply(W.toDate("s"),(K?[0,0,0,0]:[23,59,59,999]).slice(v)),W)},"$"),xe=this.$W,ke=this.$M,k=this.$D,Re="set"+(this.$u?"UTC":"");switch(Z){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,Kt=(xe<Ye?xe+7:xe)-Ye;return ue(K?k-Kt:k+(6-Kt),ke);case l:case h:return w(Re+"Hours",0);case a:return w(Re+"Minutes",1);case s:return w(Re+"Seconds",2);case i:return w(Re+"Milliseconds",3);default:return this.clone()}},N.endOf=function(R){return this.startOf(R,!1)},N.$set=function(R,U){var W,K=z.p(R),Z="set"+(this.$u?"UTC":""),ue=(W={},W[l]=Z+"Date",W[h]=Z+"Date",W[u]=Z+"Month",W[p]=Z+"FullYear",W[a]=Z+"Hours",W[s]=Z+"Minutes",W[i]=Z+"Seconds",W[n]=Z+"Milliseconds",W)[K],w=K===l?this.$D+(U-this.$W):U;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,U){return this.clone().$set(R,U)},N.get=function(R){return this[z.p(R)]()},N.add=function(R,U){var W,K=this;R=Number(R);var Z=z.p(U),ue=o(function(ke){var k=F(K);return z.w(k.date(k.date()+Math.round(ke*R)),K)},"y");if(Z===u)return this.set(u,this.$M+R);if(Z===p)return this.set(p,this.$y+R);if(Z===l)return ue(1);if(Z===c)return ue(7);var w=(W={},W[s]=e,W[a]=r,W[i]=t,W)[Z]||1,xe=this.$d.getTime()+R*w;return z.w(xe,this)},N.subtract=function(R,U){return this.add(-1*R,U)},N.format=function(R){var U=this,W=this.$locale();if(!this.isValid())return W.invalidDate||m;var K=R||"YYYY-MM-DDTHH:mm:ssZ",Z=z.z(this),ue=this.$H,w=this.$m,xe=this.$M,ke=W.weekdays,k=W.months,Re=W.meridiem,Ye=o(function(v,I,M,B){return v&&(v[I]||v(U,K))||M[I].slice(0,B)},"h"),Kt=o(function(v){return z.s(ue%12||12,v,"0")},"d"),O=Re||function(v,I,M){var B=v<12?"AM":"PM";return M?B.toLowerCase():B};return K.replace(g,(function(v,I){return I||(function(M){switch(M){case"YY":return String(U.$y).slice(-2);case"YYYY":return z.s(U.$y,4,"0");case"M":return xe+1;case"MM":return z.s(xe+1,2,"0");case"MMM":return Ye(W.monthsShort,xe,k,3);case"MMMM":return Ye(k,xe);case"D":return U.$D;case"DD":return z.s(U.$D,2,"0");case"d":return String(U.$W);case"dd":return Ye(W.weekdaysMin,U.$W,ke,2);case"ddd":return Ye(W.weekdaysShort,U.$W,ke,3);case"dddd":return ke[U.$W];case"H":return String(ue);case"HH":return z.s(ue,2,"0");case"h":return Kt(1);case"hh":return Kt(2);case"a":return O(ue,w,!0);case"A":return O(ue,w,!1);case"m":return String(w);case"mm":return z.s(w,2,"0");case"s":return String(U.$s);case"ss":return z.s(U.$s,2,"0");case"SSS":return z.s(U.$ms,3,"0");case"Z":return Z}return null})(v)||Z.replace(":","")}))},N.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},N.diff=function(R,U,W){var K,Z=this,ue=z.p(U),w=F(R),xe=(w.utcOffset()-this.utcOffset())*e,ke=this-w,k=o(function(){return z.m(Z,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 W?K:z.a(K)},N.daysInMonth=function(){return this.endOf(u).$D},N.$locale=function(){return L[this.$L]},N.locale=function(R,U){if(!R)return this.$L;var W=this.clone(),K=A(R,U,!0);return K&&(W.$L=K),W},N.clone=function(){return z.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 F.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])}})),F.extend=function(j,N){return j.$i||(j(N,C,F),j.$i=!0),F},F.locale=A,F.isDayjs=D,F.unix=function(j){return F(1e3*j)},F.en=L[E],F.Ls=L,F.p={},F}))});var Av=Cr((yd,xd)=>{(function(t,e){typeof yd=="object"&&typeof xd<"u"?xd.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_isToday=e()})(yd,(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 Uv=Cr((QEe,jv)=>{"use strict";jv.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 Hv=Cr((XEe,zv)=>{"use strict";zv.exports=Object.freeze({DISCONNECTED:1,PRECEDING:2,FOLLOWING:4,CONTAINS:8,CONTAINED_BY:16})});var Kv=Cr((ZEe,Vv)=>{"use strict";var Wv=Symbol(),qv=Symbol(),ai=Symbol(),Yv=Symbol(),Ir=class{static{o(this,"TreeIterator")}constructor(e,r,n,i){this[Wv]=e,this[qv]=r,this[ai]=n,this[Yv]=i}next(){let e=this[Wv],r=this[Yv],n=this[qv];if(!this[ai])return{done:!0,value:n};let i=this[ai];return r===1?this[ai]=e._node(i).previousSibling:r===2?this[ai]=e._node(i).nextSibling:r===3?this[ai]=e._node(i).parent:r===4?this[ai]=e.preceding(i,{root:n}):this[ai]=e.following(i,{root:n}),{done:!1,value:i}}};Object.defineProperty(Ir.prototype,Symbol.iterator,{value:o(function(){return this},"value"),writable:!1}),Ir.PREV=1,Ir.NEXT=2,Ir.PARENT=3,Ir.PRECEDING=4,Ir.FOLLOWING=5,Object.freeze(Ir),Object.freeze(Ir.prototype),Vv.exports=Ir});var Qv=Cr((tDe,Gv)=>{"use strict";var wL=Uv(),li=Hv(),pr=Kv();function Dd(){return!0}o(Dd,"returnTrue");function Os(t,e){return t[t.length-1-e]}o(Os,"reverseArrayIndex");var ep=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 wL)}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||Dd,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||Dd,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||Dd,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 pr(this,e,n?i.lastChild:i.firstChild,n?pr.PREV:pr.NEXT)}previousSiblingsIterator(e){return new pr(this,e,this._node(e).previousSibling,pr.PREV)}nextSiblingsIterator(e){return new pr(this,e,this._node(e).nextSibling,pr.NEXT)}ancestorsIterator(e){return new pr(this,e,e,pr.PARENT)}treeIterator(e,r){let n=r&&r.reverse;return new pr(this,e,n?this.lastInclusiveDescendant(e):e,n?pr.PRECEDING:pr.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 li.CONTAINS|li.PRECEDING;n.push(f),f=this.parent(f)}}let i=[];{let f=r;for(;f;){if(f===e)return li.CONTAINED_BY|li.FOLLOWING;i.push(f),f=this.parent(f)}}let s=Os(n,0);if(!s||s!==Os(i,0))return li.DISCONNECTED;let a=0,l=Math.min(n.length,i.length);for(let f=0;f<l;++f){let p=Os(n,f),h=Os(i,f);if(p!==h)break;a=f}let c=this.index(Os(n,a+1));return this.index(Os(i,a+1))<c?li.PRECEDING:li.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}};Gv.exports=ep,ep.TreePosition=li});var Lk=Cr((fIe,Pk)=>{"use strict";Pk.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 $D=Cr((hWe,AD)=>{"use strict";var Qh=Object.prototype.hasOwnProperty,MD=Object.prototype.toString,ND=Object.defineProperty,PD=Object.getOwnPropertyDescriptor,LD=o(function(e){return typeof Array.isArray=="function"?Array.isArray(e):MD.call(e)==="[object Array]"},"isArray"),_D=o(function(e){if(!e||MD.call(e)!=="[object Object]")return!1;var r=Qh.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&Qh.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;var i;for(i in e);return typeof i>"u"||Qh.call(e,i)},"isPlainObject"),RD=o(function(e,r){ND&&r.name==="__proto__"?ND(e,r.name,{enumerable:!0,configurable:!0,value:r.newValue,writable:!0}):e[r.name]=r.newValue},"setProperty"),FD=o(function(e,r){if(r==="__proto__")if(Qh.call(e,r)){if(PD)return PD(e,r).value}else return;return e[r]},"getProperty");AD.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=FD(l,r),i=FD(e,r),l!==i&&(f&&i&&(_D(i)||(s=LD(i)))?(s?(s=!1,a=n&&LD(n)?n:[]):a=n&&_D(n)?n:{},RD(l,{name:r,newValue:t(f,a,i)})):typeof i<"u"&&RD(l,{name:r,newValue:i}));return l},"extend")});var RC=Cr(($7e,Gx)=>{(function(){var t;typeof Gx<"u"?t=Gx.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 rO=Cr(jr=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0}),jr.PathError=jr.TokenData=void 0,jr.parse=sb,jr.compile=YU,jr.match=KU,jr.pathToRegexp=XC,jr.stringify=QU;var ib="/",ob=o(t=>t,"NOOP_VALUE"),zU=/^[$_\p{ID_Start}]$/u,QC=/^[$\u200c\u200d\p{ID_Continue}]$/u,HU=/^[$_\p{ID_Start}][$\u200c\u200d\p{ID_Continue}]*$/u,WU="{}()[]+?!";function qU(t){return t.replace(/[{}()\[\]+?!:*\\]/g,"\\$&")}o(qU,"escapeText");function Ni(t){return t.replace(/[.+*?^${}()[\]|/\\]/g,"\\$&")}o(Ni,"escape");var mm=class{static{o(this,"TokenData")}constructor(e,r){this.tokens=e,this.originalPath=r}};jr.TokenData=mm;var Pi=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}};jr.PathError=Pi;function sb(t,e={}){let{encodePath:r=ob}=e,n=[...t],i=[],s=0,a=0;function l(){let u="";if(zU.test(n[s]))do u+=n[s++];while(QC.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 Pi(`Unterminated quote at index ${f}`,t)}if(!u)throw new Pi(`Missing parameter name at index ${s}`,t);return u}for(o(l,"name");s<n.length;){let u=n[s++];WU.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 Pi(`Unexpected ${p.type} at index ${p.index}, expected ${u}`,t)}return f}return o(c,"consumeUntil"),new mm(c("end"),t)}o(sb,"parse");function YU(t,e={}){let{encode:r=encodeURIComponent,delimiter:n=ib}=e,i=typeof t=="object"?t:sb(t,e),s=JC(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(YU,"compile");function JC(t,e,r){let n=t.map(i=>VU(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(JC,"tokensToFunction");function VU(t,e,r){if(t.type==="text")return()=>[t.value];if(t.type==="group"){let i=JC(t.tokens,e,r);return s=>{let[a,...l]=i(s);return l.length?[""]:[a]}}let n=r||ob;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(VU,"tokenToFunction");function KU(t,e={}){let{decode:r=decodeURIComponent,delimiter:n=ib}=e,{regexp:i,keys:s}=XC(t,e),a=s.map(l=>r===!1?ob: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(KU,"match");function XC(t,e={}){let{delimiter:r=ib,end:n=!0,sensitive:i=!1,trailing:s=!0}=e,a=new ab("^"),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:sb(p,e);lb(h.tokens,0,[],m=>{if(c++>=256)throw new Pi("Too many path combinations",h.originalPath);let d=a;for(let g of GU(m,r,h.originalPath))d=d.add(g.source,g.key);d.add("")})}let u=[],f=ZC(a,u);return s&&(f+="(?:"+Ni(r)+"$)?"),f+=n?"$":"(?="+Ni(r)+"|$)",{regexp:new RegExp(f,i?"":"i"),keys:u}}o(XC,"pathToRegexp");function ZC(t,e){t.key&&e.push(t.key);let r=Object.keys(t.children),n=r.map(i=>ZC(t.children[i],e)).join("|");return t.source+(r.length<2?n:`(?:${n})`)}o(ZC,"toRegExp");var ab=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 lb(t,e,r,n){for(;e<t.length;){let i=t[e++];if(i.type==="group"){lb(i.tokens,0,r.slice(),s=>lb(t,e,s,n));continue}r.push(i)}n(r)}o(lb,"flatten");function GU(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:Ni(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 Pi(`Missing text before "${p.name}" ${p.type}`,r);p.type==="param"?(n.push({source:l?`(${Li(e,i)}+?)`:u(c,"wildcard")?`(${Li(e,f(c))}+?)`:`(${Li(e,"")}+?)`,key:p}),l|=a=1):(n.push({source:l&2?`(${Li(i,"")}+?)`:l&1?`(${Li(s,"")}+?)`:s?`(${Li(s,"")}+?|${Li(e,"")}+?)`:"([^]+?)",key:p}),s="",l|=a=2),i="";continue}throw new TypeError(`Unknown token type: ${p.type}`)}return n}o(GU,"toRegExpSource");function Li(t,e){return e.length>t.length?Li(e,t):(t===e&&(e=""),e.length>1?`(?:(?!${Ni(t)}|${Ni(e)})[^])`:t.length>1?`(?:(?!${Ni(t)})[^${Ni(e)}])`:`[^${Ni(t+e)}]`)}o(Li,"negate");function eO(t,e){let r="";for(;e<t.length;){let n=t[e++];if(n.type==="text"){r+=qU(n.value);continue}if(n.type==="group"){r+="{"+eO(n.tokens,0)+"}";continue}if(n.type==="param"){r+=":"+tO(n.name,t[e]);continue}if(n.type==="wildcard"){r+="*"+tO(n.name,t[e]);continue}throw new TypeError(`Unknown token type: ${n.type}`)}return r}o(eO,"stringifyTokens");function QU(t){return eO(t.tokens,0)}o(QU,"stringify");function tO(t,e){return!HU.test(t)||e?.type==="text"&&QC.test(e.value[0])?JSON.stringify(t):t}o(tO,"stringifyName")});var hO=Cr((Lb,_b)=>{(function(t,e){typeof Lb=="object"&&typeof _b<"u"?_b.exports=e():typeof define=="function"&&define.amd?define(e):(t=t||self,t.SweetScroll=e())})(Lb,function(){"use strict";var t=o(function(){return t=Object.assign||o(function(v){for(var I,M=1,B=arguments.length;M<B;M++){I=arguments[M];for(var re in I)Object.prototype.hasOwnProperty.call(I,re)&&(v[re]=I[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,I=Object.defineProperty({},"passive",{get:o(function(){O=!0},"get")});v.addEventListener("test",null,I),v.removeEventListener("test",null,I)}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,I,M,B){return M*(v/=B)*v+I},"easeInQuad"),easeOutQuad:o(function(O,v,I,M,B){return-M*(v/=B)*(v-2)+I},"easeOutQuad"),easeInOutQuad:o(function(O,v,I,M,B){return(v/=B/2)<1?M/2*v*v+I:-M/2*(--v*(v-2)-1)+I},"easeInOutQuad"),easeInCubic:o(function(O,v,I,M,B){return M*(v/=B)*v*v+I},"easeInCubic"),easeOutCubic:o(function(O,v,I,M,B){return M*((v=v/B-1)*v*v+1)+I},"easeOutCubic"),easeInOutCubic:o(function(O,v,I,M,B){return(v/=B/2)<1?M/2*v*v*v+I:M/2*((v-=2)*v*v+2)+I},"easeInOutCubic"),easeInQuart:o(function(O,v,I,M,B){return M*(v/=B)*v*v*v+I},"easeInQuart"),easeOutQuart:o(function(O,v,I,M,B){return-M*((v=v/B-1)*v*v*v-1)+I},"easeOutQuart"),easeInOutQuart:o(function(O,v,I,M,B){return(v/=B/2)<1?M/2*v*v*v*v+I:-M/2*((v-=2)*v*v*v-2)+I},"easeInOutQuart"),easeInQuint:o(function(O,v,I,M,B){return M*(v/=B)*v*v*v*v+I},"easeInQuint"),easeOutQuint:o(function(O,v,I,M,B){return M*((v=v/B-1)*v*v*v*v+1)+I},"easeOutQuint"),easeInOutQuint:o(function(O,v,I,M,B){return(v/=B/2)<1?M/2*v*v*v*v*v+I:M/2*((v-=2)*v*v*v*v+2)+I},"easeInOutQuint"),easeInSine:o(function(O,v,I,M,B){return-M*p(v/B*(g/2))+M+I},"easeInSine"),easeOutSine:o(function(O,v,I,M,B){return M*h(v/B*(g/2))+I},"easeOutSine"),easeInOutSine:o(function(O,v,I,M,B){return-M/2*(p(g*v/B)-1)+I},"easeInOutSine"),easeInExpo:o(function(O,v,I,M,B){return v===0?I:M*m(2,10*(v/B-1))+I},"easeInExpo"),easeOutExpo:o(function(O,v,I,M,B){return v===B?I+M:M*(-m(2,-10*v/B)+1)+I},"easeOutExpo"),easeInOutExpo:o(function(O,v,I,M,B){return v===0?I:v===B?I+M:(v/=B/2)<1?M/2*m(2,10*(v-1))+I:M/2*(-m(2,-10*--v)+2)+I},"easeInOutExpo"),easeInCirc:o(function(O,v,I,M,B){return-M*(d(1-(v/=B)*v)-1)+I},"easeInCirc"),easeOutCirc:o(function(O,v,I,M,B){return M*d(1-(v=v/B-1)*v)+I},"easeOutCirc"),easeInOutCirc:o(function(O,v,I,M,B){return(v/=B/2)<1?-M/2*(d(1-v*v)-1)+I:M/2*(d(1-(v-=2)*v)+1)+I},"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,v){if(E(v))return O===v;for(var I=x(v),M=I.length;--M>=0&&I[M]!==O;);return M>-1},"matches"),A=o(function(O){return Math.max(O.scrollHeight,O.clientHeight,O.offsetHeight)},"getHeight"),F=o(function(O){return Math.max(O.scrollWidth,O.clientWidth,O.offsetWidth)},"getWidth"),z=o(function(O){return{width:F(O),height:A(O)}},"getSize"),C=o(function(O){var v=L(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(F(document.body),F(document.documentElement)),height:Math.max(A(document.body),A(document.documentElement))}:z(O)}},"getViewportAndElementSizes"),le={y:"scrollTop",x:"scrollLeft"},j={y:"pageYOffset",x:"pageXOffset"},N=o(function(O,v){return L(O)?O[j[v]]:O[le[v]]},"getScroll"),R=o(function(O,v,I){if(L(O)){var M=I==="y";O.scrollTo(M?O.pageXOffset:v,M?v:O.pageYOffset)}else O[le[I]]=v},"setScroll"),U=o(function(O,v){var I=O.getBoundingClientRect();if(I.width||I.height){var M={top:0,left:0},B=void 0;if(L(v)||P(v))B=document.documentElement,M.top=window[j.y],M.left=window[j.x];else{B=v;var re=B.getBoundingClientRect();M.top=re.top*-1+B[le.y],M.left=re.left*-1+B[le.x]}return{top:I.top+M.top-B.clientTop,left:I.left+M.left-B.clientLeft}}return I},"getOffset"),W=(function(){return e?"onwheel"in document?"wheel":"mousewheel":"wheel"})(),K=o(function(O){return O==="wheel"?W:O},"eventName"),Z=o(function(O,v,I,M,B){I.split(" ").forEach(function(re){O[v](K(re),M,n?{passive:B}:!1)})},"apply"),ue=o(function(O,v,I,M){return Z(O,"addEventListener",v,I,M)},"addEvent"),w=o(function(O,v,I,M){return Z(O,"removeEventListener",v,I,M)},"removeEvent"),xe=/^(\+|-)=(\d+(?:\.\d+)?)$/,ke=o(function(O,v){var I={top:0,left:0,relative:!1};if(c(O,"top")||c(O,"left"))I=t({},I,O);else if(a(O))if(O.length>1)I.top=O[0],I.left=O[1];else if(O.length===1)I.top=v?O[0]:0,I.left=v?0:O[0];else return null;else if(l(O))v?I.top=O:I.left=O;else if(i(O)){var M=O.trim().match(xe);if(!M)return null;var B=M[1],re=parseInt(M[2],10);B==="+"?(I.top=v?re:0,I.left=v?0:re):(I.top=v?-re:0,I.left=v?0:-re),I.relative=!0}else return null;return I},"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},Re="click",Ye="wheel touchstart touchmove",Kt=(function(){function O(v,I){var M=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 _e=M,Pe=_e.$el,Te=_e.ctx;if(Te.start||(Te.start=re),!Te.progress||!Pe){M.stop();return}var _t=Te.opts,it=Te.pos,Ot=Te.start,Tr=Te.startPos,zr=Te.easing,Gt=_t.duration,ar={top:"y",left:"x"},Rt=re-Ot,je=Math.min(1,Math.max(Rt/Gt,0));Object.keys(it).forEach(function(Hr){var _=it[Hr],q=Tr[Hr],oe=_-q;if(oe!==0){var fe=zr(je,Gt*je,0,1,Gt);R(Pe,Math.round(q+oe*fe),ar[Hr])}}),Rt<=Gt?(M.hook(_t,"step",je),Te.id=O.raf(M.loop)):M.stop(!0)},this.handleClick=function(re){for(var _e=M.opts,Pe=re.target;Pe&&Pe!==document;Pe=Pe.parentNode)if(D(Pe,_e.trigger)){var Te=JSON.parse(Pe.getAttribute("data-scroll-options")||"{}"),_t=Pe.getAttribute("data-scroll"),it=_t||Pe.getAttribute("href"),Ot=t({},_e,Te),Tr=Ot.preventDefault,zr=Ot.stopPropagation,Gt=Ot.vertical,ar=Ot.horizontal;Tr&&re.preventDefault(),zr&&re.stopPropagation(),M.ctx.$trigger=Pe,ar&&Gt?M.to(it,Ot):Gt?M.toTop(it,Ot):ar&&M.toLeft(it,Ot);break}},this.handleStop=function(re){var _e=M.ctx,Pe=_e.opts;Pe&&Pe.cancellable?(_e.cancel=!0,M.stop()):re.preventDefault()},this.opts=t({},k,v||{});var B=null;e&&(typeof I=="string"?B=T(I):I!=null?B=I:B=window),this.$el=B,B&&this.bind(!0,!1)}return o(O,"SweetScroll"),O.create=function(v,I){return new O(v,I)},O.prototype.to=function(v,I){if(e){var M=this,B=M.$el,re=M.ctx,_e=M.opts,Pe=re.$trigger,Te=t({},_e,I||{}),_t=Te.offset,it=Te.vertical,Ot=Te.horizontal,Tr=E(Te.header)?Te.header:T(Te.header),zr=/^#/,Gt=i(v)&&zr.test(v)?v:null;if(re.opts=Te,re.cancel=!1,re.hash=Gt,this.stop(),!!B){var ar=ke(_t,it),Rt=ke(v,it),je={top:0,left:0};if(Rt)if(Rt.relative){var Hr=N(B,it?"y":"x");je.top=it?Hr+Rt.top:Rt.top,je.left=it?Rt.left:Hr+Rt.left}else je=Rt;else if(i(v)&&v!=="#"){var _=T(v);if(!_)return;je=U(_,B)}ar&&(je.top+=ar.top,je.left+=ar.left),Tr&&(je.top=Math.max(0,je.top-z(Tr).height));var q=C(B),oe=q.viewport,fe=q.size;if(je.top=it?Math.max(0,Math.min(fe.height-oe.height,je.top)):N(B,"y"),je.left=Ot?Math.max(0,Math.min(fe.width-oe.width,je.left)):N(B,"x"),this.hook(Te,"before",je,Pe)===!1){re.opts=null;return}re.pos=je,this.start(Te),this.bind(!1,!0)}}},O.prototype.toTop=function(v,I){this.to(v,t({},I||{},{vertical:!0,horizontal:!1}))},O.prototype.toLeft=function(v,I){this.to(v,t({},I||{},{vertical:!1,horizontal:!0}))},O.prototype.toElement=function(v,I){var M=this.$el;!e||!M||this.to(U(v,M),I||{})},O.prototype.stop=function(v){v===void 0&&(v=!1);var I=this,M=I.$el,B=I.ctx,re=B.pos;!M||!B.progress||(O.caf(B.id),B.progress=!1,B.start=0,B.id=0,v&&re&&(R(M,re.left,"x"),R(M,re.top,"y")),this.complete())},O.prototype.update=function(v){if(this.$el){var I=t({},this.opts,v);this.stop(),this.unbind(!0,!0),this.opts=I,this.bind(!0,!1)}},O.prototype.destroy=function(){this.$el&&(this.stop(),this.unbind(!0,!0),this.$el=null)},O.prototype.onBefore=function(v,I){return!0},O.prototype.onStep=function(v){},O.prototype.onAfter=function(v,I){},O.prototype.onCancel=function(){},O.prototype.onComplete=function(v){},O.prototype.start=function(v){var I=this.ctx;I.opts=v,I.progress=!0,I.easing=s(v.easing)?v.easing:y[v.easing];var M=this.$el,B={top:N(M,"y"),left:N(M,"x")};I.startPos=B,I.id=O.raf(this.loop)},O.prototype.complete=function(){var v=this,I=v.$el,M=v.ctx,B=M.hash,re=M.cancel,_e=M.opts,Pe=M.pos,Te=M.$trigger;if(!(!I||!_e)){if(B!=null&&B!==window.location.hash){var _t=_e.updateURL;e&&r&&_t!==!1&&window.history[_t==="replace"?"replaceState":"pushState"](null,"",B)}this.unbind(!1,!0),M.opts=null,M.$trigger=null,re?this.hook(_e,"cancel"):this.hook(_e,"after",Pe,Te),this.hook(_e,"complete",re)}},O.prototype.hook=function(v,I){for(var M=[],B=2;B<arguments.length;B++)M[B-2]=arguments[B];var re,_e=v[I],Pe,Te;return s(_e)&&(Pe=_e.apply(this,M.concat([this]))),Te=(re=this)["on"+(I[0].toUpperCase()+I.slice(1))].apply(re,M),Pe!==void 0?Pe:Te},O.prototype.bind=function(v,I){var M=this,B=M.$el,re=M.ctx.opts;B&&(v&&ue(B,Re,this.handleClick,!1),I&&ue(B,Ye,this.handleStop,re?re.cancellable:!0))},O.prototype.unbind=function(v,I){var M=this,B=M.$el,re=M.ctx.opts;B&&(v&&w(B,Re,this.handleClick,!1),I&&w(B,Ye,this.handleStop,re?re.cancellable:!0))},O.raf=u,O.caf=f,O})();return Kt})});var Vb={};se(Vb,{setup:()=>J4,staticStyles:()=>G4,styles:()=>Q4});var vl={};se(vl,{DeesComms:()=>hg});var Ac={};var jt={};se(jt,{TYPED_REQUEST_REDACTED_PAYLOAD:()=>Rs,TypedHandler:()=>ig,TypedRequest:()=>Bp,TypedRequestRetryLimitError:()=>$p,TypedRequestTimeoutError:()=>Ap,TypedResponseError:()=>dr,TypedRouter:()=>og,TypedTarget:()=>sg,VirtualStream:()=>Pr,VirtualStreamActivationScope:()=>On,VirtualStreamClosedError:()=>ao,VirtualStreamLifecycleContractError:()=>Op,VirtualStreamOpenTimeoutError:()=>lo,getTypedRequestResponseInterestKey:()=>_p});var hr={};se(hr,{AsyncExecutionStack:()=>Cd,BackpressuredArray:()=>Od,FastMap:()=>eo,Interest:()=>nl,InterestMap:()=>Id,LimitedArray:()=>Md,LoopTracker:()=>Nd,ObjectMap:()=>Tn,Stringmap:()=>il,TimedAggregator:()=>ol,TimedAggregtor:()=>ol,Tree:()=>Pd,uni:()=>Jv});var Na={};se(Na,{SmartMatch:()=>Rm});var Ma={};se(Ma,{isMatch:()=>QO,matcher:()=>GO});function Bi(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}o(Bi,"escapeStringRegexp");var _m=new Map,ew=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"),KO=o((t,e)=>{e={caseSensitive:!1,...e};let r=t+JSON.stringify(e);if(_m.has(r))return _m.get(r);let n=t[0]==="!";n&&(t=t.slice(1)),t=Bi(t).replace(/\\\*/g,"[\\s\\S]*");let i=new RegExp(`^${t}$`,e.caseSensitive?"":"i");return i.negated=n,_m.set(r,i),i},"makeRegexp"),tw=o((t,e,r,n)=>{if(t=ew(t,"inputs"),e=ew(e,"patterns"),e.length===0)return[];e=e.map(a=>KO(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 GO(t,e,r){return tw(t,e,r,!1)}o(GO,"matcher");function QO(t,e,r){return tw(t,e,r,!0).length>0}o(QO,"isMatch");var Rm=class{static{o(this,"SmartMatch")}constructor(e){this.wildcard=e}match(e){return Ma.isMatch(e,this.wildcard)}};var Q={};se(Q,{CumulativeDeferred:()=>Bc,Deferred:()=>$c,Timeout:()=>Pa,cumulativeDefer:()=>ZO,defer:()=>Yn,delayFor:()=>iw,delayForRandom:()=>iI,fromCallback:()=>sI,getFirstTrueOrFalse:()=>oI,map:()=>rI,rejectedPromise:()=>tI,resolvedPromise:()=>eI,timeoutAndContinue:()=>nI,timeoutWrap:()=>nw});var $c=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"})}},Yn=o(()=>new $c,"defer");var XO=2147483647,rw=o(t=>{t.unref?.()},"unrefTimer"),Pa=class{static{o(this,"Timeout")}constructor(e,r,n=!1){this.unrefed=!1,this.state="running",this.timeLeftAtCancel=0,this.passOn=r,this.deferred=Yn(),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,XO),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&&rw(n),n}makeUnrefed(){this.unrefed=!0,rw(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 Bc=class{static{o(this,"CumulativeDeferred")}constructor(){this.accumulatedPromises=[],this.deferred=Yn(),this.promise=this.deferred.promise,setTimeout(async()=>{for(;this.accumulatedPromises.length>0;)await this.accumulatedPromises.shift();this.deferred.resolve()},0)}subDefer(){let e=Yn();return this.addPromise(e.promise),e}addPromise(e){this.accumulatedPromises.push(e)}},ZO=o(()=>new Bc,"cumulativeDefer");function eI(t){return Promise.resolve(t)}o(eI,"resolvedPromise");var tI=o(t=>Promise.reject(t),"rejectedPromise"),rI=o(async(t,e)=>Promise.all(t.map(e)),"map"),nw=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"),nI=o(async(t,e=6e4)=>nw(t,e,!1),"timeoutAndContinue"),iw=o(async(t,e,r=!1)=>(await new Pa(t,void 0,r).promise,e),"delayFor"),iI=o(async(t,e,r,n=!1)=>(await iw(Math.random()*(e-t)+t,void 0,n),r),"delayForRandom"),oI=o(async t=>{let e=Yn();for(let r of t)r.then(n=>{n===!0&&e.resolve(!0)});return Promise.all(t).then(()=>{e.resolve(!1)}),e.promise},"getFirstTrueOrFalse"),sI=o(t=>new Promise((e,r)=>{t((n,i)=>{n?r(n):e(i)})}),"fromCallback");var Ne={};se(Ne,{ObservableIntake:()=>sd,Observablemap:()=>od,fromStreamWithBackpressure:()=>UN,rxjs:()=>ns});var ns={};se(ns,{Observable:()=>we,ReplaySubject:()=>Jo,Subject:()=>$t,Subscription:()=>At,from:()=>Jr,fromEvent:()=>Wi,of:()=>$a,ops:()=>jN});var Fm=o(function(t,e){return Fm=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])},Fm(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");Fm(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 Am=o(function(){return Am=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"),Am.apply(this,arguments)},"__assign");function lI(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(lI,"__rest");function cI(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(cI,"__decorate");function uI(t,e){return function(r,n){e(r,n,t)}}o(uI,"__param");function fI(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(fI,"__esDecorate");function pI(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(pI,"__runInitializers");function hI(t){return typeof t=="symbol"?t:"".concat(t)}o(hI,"__propKey");function mI(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(mI,"__setFunctionName");function dI(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}o(dI,"__metadata");function jm(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(jm,"__awaiter");function La(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(La,"__generator");var $m=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 gI(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&$m(e,t,r)}o(gI,"__exportStar");function dt(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(dt,"__values");function ct(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(ct,"__read");function yI(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(ct(arguments[e]));return t}o(yI,"__spread");function xI(){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(xI,"__spreadArrays");function Ft(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(Ft,"__spreadArray");function kn(t){return this instanceof kn?(this.v=t,this):new kn(t)}o(kn,"__await");function Um(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 kn?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(Um,"__asyncGenerator");function bI(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:kn(t[i](a)),done:!1}:s?s(a):a}:s}}o(bI,"__asyncDelegator");function zm(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 dt=="function"?dt(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(zm,"__asyncValues");function wI(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}o(wI,"__makeTemplateObject");var SI=Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e},Bm=o(function(t){return Bm=Object.getOwnPropertyNames||function(e){var r=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[r.length]=n);return r},Bm(t)},"ownKeys");function vI(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r=Bm(t),n=0;n<r.length;n++)r[n]!=="default"&&$m(e,t,r[n]);return SI(e,t),e}o(vI,"__importStar");function kI(t){return t&&t.__esModule?t:{default:t}}o(kI,"__importDefault");function TI(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(TI,"__classPrivateFieldGet");function EI(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(EI,"__classPrivateFieldSet");function DI(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(DI,"__classPrivateFieldIn");function CI(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(CI,"__addDisposableResource");var OI=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 II(t){function e(s){t.error=t.hasError?new OI(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(II,"__disposeResources");function MI(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(MI,"__rewriteRelativeImportExtension");var vz={__extends:Xe,__assign:Am,__rest:lI,__decorate:cI,__param:uI,__esDecorate:fI,__runInitializers:pI,__propKey:hI,__setFunctionName:mI,__metadata:dI,__awaiter:jm,__generator:La,__createBinding:$m,__exportStar:gI,__values:dt,__read:ct,__spread:yI,__spreadArrays:xI,__spreadArray:Ft,__await:kn,__asyncGenerator:Um,__asyncDelegator:bI,__asyncValues:zm,__makeTemplateObject:wI,__importStar:vI,__importDefault:kI,__classPrivateFieldGet:TI,__classPrivateFieldSet:EI,__classPrivateFieldIn:DI,__addDisposableResource:CI,__disposeResources:II,__rewriteRelativeImportExtension:MI};function pe(t){return typeof t=="function"}o(pe,"isFunction");function jc(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(jc,"createErrorClass");var _a=jc(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 Or(t,e){if(t){var r=t.indexOf(e);0<=r&&t.splice(r,1)}}o(Or,"arrRemove");var At=(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=dt(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 La?g.errors:[g]}var p=this._finalizers;if(p){this._finalizers=null;try{for(var h=dt(p),m=h.next();!m.done;m=h.next()){var d=m.value;try{iw(d)}catch(g){s=s??[],g instanceof La?s=Ft(Ft([],ct(s)),ct(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 La(s)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)iw(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)&&Or(r,e)},t.prototype.remove=function(e){var r=this._finalizers;r&&Or(r,e),e instanceof t&&e._removeParent(this)},t.EMPTY=(function(){var e=new t;return e.closed=!0,e})(),t})(),zm=At.EMPTY;function jc(t){return t instanceof At||t&&"closed"in t&&pe(t.remove)&&pe(t.add)&&pe(t.unsubscribe)}o(jc,"isSubscription");function iw(t){pe(t)?t():t.unsubscribe()}o(iw,"execFinalizer");var cr={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var Vo={setTimeout:o(function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=Vo.delegate;return i?.setTimeout?i.setTimeout.apply(i,Ft([t,e],ct(r))):setTimeout.apply(void 0,Ft([t,e],ct(r)))},"setTimeout"),clearTimeout:o(function(t){var e=Vo.delegate;return(e?.clearTimeout||clearTimeout)(t)},"clearTimeout"),delegate:void 0};function Uc(t){Vo.setTimeout(function(){var e=cr.onUnhandledError;if(e)e(t);else throw t})}o(Uc,"reportUnhandledError");function Vr(){}o(Vr,"noop");var ow=(function(){return Hm("C",void 0,void 0)})();function sw(t){return Hm("E",void 0,t)}o(sw,"errorNotification");function aw(t){return Hm("N",t,void 0)}o(aw,"nextNotification");function Hm(t,e,r){return{kind:t,value:e,error:r}}o(Hm,"createNotification");var Bi=null;function Ko(t){if(cr.useDeprecatedSynchronousErrorHandling){var e=!Bi;if(e&&(Bi={errorThrown:!1,error:null}),t(),e){var r=Bi,n=r.errorThrown,i=r.error;if(Bi=null,n)throw i}}else t()}o(Ko,"errorContext");function lw(t){cr.useDeprecatedSynchronousErrorHandling&&Bi&&(Bi.errorThrown=!0,Bi.error=t)}o(lw,"captureError");var ji=(function(t){Xe(e,t);function e(r){var n=t.call(this)||this;return n.isStopped=!1,r?(n.destination=r,jc(r)&&r.add(n)):n.destination=LI,n}return o(e,"Subscriber"),e.create=function(r,n,i){return new Yn(r,n,i)},e.prototype.next=function(r){this.isStopped?qm(aw(r),this):this._next(r)},e.prototype.error=function(r){this.isStopped?qm(sw(r),this):(this.isStopped=!0,this._error(r))},e.prototype.complete=function(){this.isStopped?qm(ow,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})(At),MI=Function.prototype.bind;function Wm(t,e){return MI.call(t,e)}o(Wm,"bind");var NI=(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){zc(n)}},t.prototype.error=function(e){var r=this.partialObserver;if(r.error)try{r.error(e)}catch(n){zc(n)}else zc(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(r){zc(r)}},t})(),Yn=(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&&cr.useDeprecatedNextContext?(l=Object.create(r),l.unsubscribe=function(){return s.unsubscribe()},a={next:r.next&&Wm(r.next,l),error:r.error&&Wm(r.error,l),complete:r.complete&&Wm(r.complete,l)}):a=r}return s.destination=new NI(a),s}return o(e,"SafeSubscriber"),e})(ji);function zc(t){cr.useDeprecatedSynchronousErrorHandling?lw(t):Uc(t)}o(zc,"handleUnhandledError");function PI(t){throw t}o(PI,"defaultErrorHandler");function qm(t,e){var r=cr.onStoppedNotification;r&&Vo.setTimeout(function(){return r(t,e)})}o(qm,"handleStoppedNotification");var LI={closed:!0,next:Vr,error:PI,complete:Vr};var Ui=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function Kr(t){return t}o(Kr,"identity");function _I(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Ym(t)}o(_I,"pipe");function Ym(t){return t.length===0?Kr:t.length===1?t[0]:o(function(r){return t.reduce(function(n,i){return i(n)},r)},"piped")}o(Ym,"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=FI(e)?e:new Yn(e,r,n);return Ko(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=cw(r),new r(function(i,s){var a=new Yn({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[Ui]=function(){return this},t.prototype.pipe=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return Ym(e)(this)},t.prototype.toPromise=function(e){var r=this;return e=cw(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 cw(t){var e;return(e=t??cr.Promise)!==null&&e!==void 0?e:Promise}o(cw,"getPromiseCtor");function RI(t){return t&&pe(t.next)&&pe(t.error)&&pe(t.complete)}o(RI,"isObserver");function FI(t){return t&&t instanceof ji||RI(t)&&jc(t)}o(FI,"isSubscriber");function AI(t){return pe(t?.lift)}o(AI,"hasLift");function De(t){return function(e){if(AI(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 uw(t,e,r,n,i)}o(Ce,"createOperatorSubscriber");var uw=(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})(ji);var Vm=Bc(function(t){return o(function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"},"ObjectUnsubscribedErrorImpl")});var $t=(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 Km(this,this);return n.operator=r,n},e.prototype._throwIfClosed=function(){if(this.closed)throw new Vm},e.prototype.next=function(r){var n=this;Ko(function(){var i,s;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var a=dt(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;Ko(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;Ko(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?zm:(this.currentObservers=null,l.push(r),new At(function(){n.currentObservers=null,Or(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 Km(r,n)},e})(we),Km=(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:zm},e})($t);var Go=(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})($t);var _a={now:o(function(){return(_a.delegate||Date).now()},"now"),delegate:void 0};var Qo=(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=_a);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})($t);var Gm=(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})(At);var Ra={setInterval:o(function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=Ra.delegate;return i?.setInterval?i.setInterval.apply(i,Ft([t,e],ct(r))):setInterval.apply(void 0,Ft([t,e],ct(r)))},"setInterval"),clearInterval:o(function(t){var e=Ra.delegate;return(e?.clearInterval||clearInterval)(t)},"clearInterval"),delegate:void 0};var Qm=(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),Ra.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&&Ra.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,Or(s,this),n!=null&&(this.id=this.recycleAsyncId(i,n,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e})(Gm);var Fa=(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=_a.now,t})();var Jm=(function(t){Xe(e,t);function e(r,n){n===void 0&&(n=Fa.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})(Fa);var Gr=new Jm(Qm),Xm=Gr;function Hc(t){return t&&pe(t.schedule)}o(Hc,"isScheduler");function Zm(t){return t[t.length-1]}o(Zm,"last");function fw(t){return pe(Zm(t))?t.pop():void 0}o(fw,"popResultSelector");function Qr(t){return Hc(Zm(t))?t.pop():void 0}o(Qr,"popScheduler");function IH(t,e){return typeof Zm(t)=="number"?t.pop():e}o(IH,"popNumber");var Jo=o((function(t){return t&&typeof t.length=="number"&&typeof t!="function"}),"isArrayLike");function Wc(t){return pe(t?.then)}o(Wc,"isPromise");function qc(t){return pe(t[Ui])}o(qc,"isInteropObservable");function Yc(t){return Symbol.asyncIterator&&pe(t?.[Symbol.asyncIterator])}o(Yc,"isAsyncIterable");function Vc(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(Vc,"createInvalidObservableTypeError");function $I(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}o($I,"getSymbolIterator");var Kc=$I();function Gc(t){return pe(t?.[Kc])}o(Gc,"isIterable");function Qc(t){return jm(this,arguments,o(function(){var r,n,i,s;return Pa(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,vn(r.read())];case 3:return n=a.sent(),i=n.value,s=n.done,s?[4,vn(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,vn(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(Qc,"readableStreamLikeToAsyncGenerator");function Jc(t){return pe(t?.getReader)}o(Jc,"isReadableStreamLike");function Be(t){if(t instanceof we)return t;if(t!=null){if(qc(t))return BI(t);if(Jo(t))return jI(t);if(Wc(t))return UI(t);if(Yc(t))return pw(t);if(Gc(t))return zI(t);if(Jc(t))return HI(t)}throw Vc(t)}o(Be,"innerFrom");function BI(t){return new we(function(e){var r=t[Ui]();if(pe(r.subscribe))return r.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}o(BI,"fromInteropObservable");function jI(t){return new we(function(e){for(var r=0;r<t.length&&!e.closed;r++)e.next(t[r]);e.complete()})}o(jI,"fromArrayLike");function UI(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,Uc)})}o(UI,"fromPromise");function zI(t){return new we(function(e){var r,n;try{for(var i=dt(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(zI,"fromIterable");function pw(t){return new we(function(e){WI(t,e).catch(function(r){return e.error(r)})})}o(pw,"fromAsyncIterable");function HI(t){return pw(Qc(t))}o(HI,"fromReadableStreamLike");function WI(t,e){var r,n,i,s;return Bm(this,void 0,void 0,function(){var a,l;return Pa(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),r=Um(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(WI,"process");function ut(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(ut,"executeSchedule");function Xo(t,e){return e===void 0&&(e=0),De(function(r,n){r.subscribe(Ce(n,function(i){return ut(n,t,function(){return n.next(i)},e)},function(){return ut(n,t,function(){return n.complete()},e)},function(i){return ut(n,t,function(){return n.error(i)},e)}))})}o(Xo,"observeOn");function Zo(t,e){return e===void 0&&(e=0),De(function(r,n){n.add(t.schedule(function(){return r.subscribe(n)},e))})}o(Zo,"subscribeOn");function hw(t,e){return Be(t).pipe(Zo(e),Xo(e))}o(hw,"scheduleObservable");function mw(t,e){return Be(t).pipe(Zo(e),Xo(e))}o(mw,"schedulePromise");function dw(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(dw,"scheduleArray");function gw(t,e){return new we(function(r){var n;return ut(r,e,function(){n=t[Kc](),ut(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(gw,"scheduleIterable");function Xc(t,e){if(!t)throw new Error("Iterable cannot be null");return new we(function(r){ut(r,e,function(){var n=t[Symbol.asyncIterator]();ut(r,e,function(){n.next().then(function(i){i.done?r.complete():r.next(i.value)})},0,!0)})})}o(Xc,"scheduleAsyncIterable");function yw(t,e){return Xc(Qc(t),e)}o(yw,"scheduleReadableStreamLike");function ed(t,e){if(t!=null){if(qc(t))return hw(t,e);if(Jo(t))return dw(t,e);if(Wc(t))return mw(t,e);if(Yc(t))return Xc(t,e);if(Gc(t))return gw(t,e);if(Jc(t))return yw(t,e)}throw Vc(t)}o(ed,"scheduled");function Jr(t,e){return e?ed(t,e):Be(t)}o(Jr,"from");function Aa(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=Qr(t);return Jr(t,r)}o(Aa,"of");function xw(t){return t instanceof Date&&!isNaN(t)}o(xw,"isValidDate");function Xr(t,e){return De(function(r,n){var i=0;r.subscribe(Ce(n,function(s){n.next(t.call(e,s,i++))}))})}o(Xr,"map");var qI=Array.isArray;function YI(t,e){return qI(e)?t.apply(void 0,Ft([],ct(e))):t(e)}o(YI,"callOrApply");function Zc(t){return Xr(function(e){return YI(t,e)})}o(Zc,"mapOneOrManyArgs");var VI=Array.isArray,KI=Object.getPrototypeOf,GI=Object.prototype,QI=Object.keys;function bw(t){if(t.length===1){var e=t[0];if(VI(e))return{args:e,keys:null};if(JI(e)){var r=QI(e);return{args:r.map(function(n){return e[n]}),keys:r}}}return{args:t,keys:null}}o(bw,"argsArgArrayOrObject");function JI(t){return t&&typeof t=="object"&&KI(t)===GI}o(JI,"isPOJO");function ww(t,e){return t.reduce(function(r,n,i){return r[n]=e[i],r},{})}o(ww,"createObject");function td(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=Qr(t),n=fw(t),i=bw(t),s=i.args,a=i.keys;if(s.length===0)return Jr([],r);var l=new we(XI(s,r,a?function(c){return ww(a,c)}:Kr));return n?l.pipe(Zc(n)):l}o(td,"combineLatest");function XI(t,e,r){return r===void 0&&(r=Kr),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=Jr(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(XI,"combineLatestInit");function Sw(t,e,r){t?ut(r,t,e):e()}o(Sw,"maybeSchedule");function vw(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;Be(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?ut(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(vw,"mergeInternals");function zi(t,e,r){return r===void 0&&(r=1/0),pe(e)?zi(function(n,i){return Xr(function(s,a){return e(n,s,i,a)})(Be(t(n,i)))},r):(typeof e=="number"&&(r=e),De(function(n,i){return vw(n,i,t,r)}))}o(zi,"mergeMap");function eu(t){return t===void 0&&(t=1/0),zi(Kr,t)}o(eu,"mergeAll");function tu(){return eu(1)}o(tu,"concatAll");function ru(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return tu()(Jr(t,Qr(t)))}o(ru,"concat");var ZI=["addListener","removeListener"],eM=["addEventListener","removeEventListener"],tM=["on","off"];function Hi(t,e,r,n){if(pe(r)&&(n=r,r=void 0),n)return Hi(t,e,r).pipe(Zc(n));var i=ct(iM(t)?eM.map(function(l){return function(c){return t[l](e,c,r)}}):rM(t)?ZI.map(kw(t,e)):nM(t)?tM.map(kw(t,e)):[],2),s=i[0],a=i[1];if(!s&&Jo(t))return zi(function(l){return Hi(l,e,r)})(Be(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(Hi,"fromEvent");function kw(t,e){return function(r){return function(n){return t[r](e,n)}}}o(kw,"toCommonHandlerRegistry");function rM(t){return pe(t.addListener)&&pe(t.removeListener)}o(rM,"isNodeStyleEventEmitter");function nM(t){return pe(t.on)&&pe(t.off)}o(nM,"isJQueryStyleEventEmitter");function iM(t){return pe(t.addEventListener)&&pe(t.removeEventListener)}o(iM,"isEventTarget");function $a(t,e,r){t===void 0&&(t=0),r===void 0&&(r=Xm);var n=-1;return e!=null&&(Hc(e)?r=e:n=e),new we(function(i){var s=xw(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($a,"timer");function rd(t,e){return t===void 0&&(t=0),e===void 0&&(e=Gr),t<0&&(t=0),$a(t,t,e)}o(rd,"interval");function nu(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(nu,"filter");function iu(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()})),Be(t).subscribe(Ce(r,function(){var i=n;n=[],r.next(i)},Vr)),function(){n=null}})}o(iu,"buffer");function ou(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=dt(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=dt(p),y=g.next();!y.done;y=g.next()){var d=y.value;Or(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=dt(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(ou,"bufferCount");function su(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:Gr,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(),Or(f,g),u.next(y),p&&m()},"emit"),m=o(function(){if(f){var g=new At;u.add(g);var y=[],x={buffer:y,subs:g};f.push(x),ut(g,s,function(){return h(x)},t)}},"startBuffer");a!==null&&a>=0?ut(u,s,m,a,!0):p=!0,m();var d=Ce(u,function(g){var y,x,T=f.slice();try{for(var E=dt(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(A){y={error:A}}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(su,"bufferTime");function au(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,Vr),Be(t(l)).subscribe(s)},function(){a(),r.complete()},void 0,function(){i=s=null}))})}o(au,"debounce");function lu(t,e){return e===void 0&&(e=Gr),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(lu,"debounceTime");function es(t,e){return e===void 0&&(e=Kr),t=t??oM,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(es,"distinctUntilChanged");function oM(t,e){return t===e}o(oM,"defaultCompare");function cu(t){t===void 0&&(t={});var e=t.connector,r=e===void 0?function(){return new $t}: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=nd(T,c))}),P.subscribe(L),!f&&m>0&&(f=new Yn({next:o(function(D){return P.next(D)},"next"),error:o(function(D){g=!0,y(),p=nd(x,i,D),P.error(D)},"error"),complete:o(function(){d=!0,y(),p=nd(x,a),P.complete()},"complete")}),Be(E).subscribe(f))})(u)}}o(cu,"share");function nd(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 Yn({next:o(function(){i.unsubscribe(),t()},"next")});return Be(e.apply(void 0,Ft([],ct(r)))).subscribe(i)}}o(nd,"handleReset");function uu(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,cu({connector:o(function(){return new Qo(a,e,r)},"connector"),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:l})}o(uu,"shareReplay");function fu(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=Qr(t);return De(function(n,i){(r?ru(t,n,r):ru(t,n)).subscribe(i)})}o(fu,"startWith");function ts(t){return De(function(e,r){Be(t).subscribe(Ce(r,function(){return r.complete()},Vr)),!r.closed&&e.subscribe(r)})}o(ts,"takeUntil");function pu(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=Be(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(pu,"throttle");function hu(t,e,r){e===void 0&&(e=Gr);var n=$a(t,e);return pu(function(){return n},r)}o(hu,"throttleTime");var BN={buffer:iu,bufferCount:ou,bufferTime:su,debounce:au,debounceTime:lu,filter:nu,map:Xr,startWith:fu,takeUntil:ts,throttleTime:hu};var id=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=Hi(e,r),s=new $t;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 $t,eventRef:e,event:r};return this.observableEventTargetBundleArray.push(s),s.subject}}};var od=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=Q.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 jN(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(jN,"fromStreamWithBackpressure");var Xi={};se(Xi,{CronJob:()=>el,CronJobCollection:()=>tl,CronManager:()=>bd,ExtendedDate:()=>Sd,HrtMeasurement:()=>vd,Interval:()=>kd,TimeStamp:()=>Ds,Timer:()=>Td,getMilliSecondsAsHumanReadableAgoTime:()=>yL,getMilliSecondsAsHumanReadableString:()=>gL,getMilliSecondsFromUnits:()=>wd,units:()=>oi});var za={};se(za,{Cron:()=>Iw,CronDate:()=>Ze,CronPattern:()=>mu,scheduledJobs:()=>ns});function Ba(t){return Date.UTC(t.y,t.m-1,t.d,t.h,t.i,t.s)}o(Ba,"T");function sd(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(sd,"D");function UN(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("-")?ad(r.getUTCFullYear(),r.getUTCMonth()+1,r.getUTCDate(),r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),"Etc/UTC"):ad(r.getFullYear(),r.getMonth()+1,r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),e)}o(UN,"A");function Tw(t,e,r){return Ew(UN(t,e),r)}o(Tw,"v");function Ew(t,e){let r=new Date(Ba(t)),n=ja(r,t.tz),i=Ba(t),s=Ba(n),a=i-s,l=new Date(r.getTime()+a),c=ja(l,t.tz);if(sd(c,t)){let p=new Date(l.getTime()-36e5),h=ja(p,t.tz);return sd(h,t)?p:l}let u=new Date(l.getTime()+Ba(t)-Ba(c)),f=ja(u,t.tz);if(sd(f,t))return u;if(e)throw new Error("Invalid date passed to fromTZ()");return l.getTime()>u.getTime()?l:u}o(Ew,"k");function ja(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(ja,"g");function ad(t,e,r,n,i,s,a){return{y:t,m:e,d:r,h:n,i,s,tz:a}}o(ad,"b");var Dw=[1,2,4,8,16],mu=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]|Dw[e-1];else throw new TypeError(`CronPattern: nth weekday out of range, should be 1-5 or L. Value: ${e}, Type: ${typeof e}`)}},ld=[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 Ow{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 Ow)this.fromCronDate(e);else throw new TypeError("CronDate: Invalid type ("+typeof e+") passed to CronDate constructor")}getLastDayOfMonth(e,r){return r!==1?ld[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&&Dw[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=ja(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>ld[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=Tw(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(Tw(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?ld[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)):Ew(ad(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 zN(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(zN,"R");function Ua(t){return Object.prototype.toString.call(t)==="[object Function]"||typeof t=="function"||t instanceof Function}o(Ua,"p");function HN(t){return Ua(t)}o(HN,"_");function WN(t){typeof Deno<"u"&&typeof Deno.unrefTimer<"u"?Deno.unrefTimer(t):t&&typeof t.unref<"u"&&t.unref()}o(WN,"x");var Cw=30*1e3,ns=[],Iw=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(Ua(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(Ua(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=zN(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 mu("* * * * *",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 mu(t,this.options.timezone,{mode:this.options.mode,alternativeWeekdays:this.options.alternativeWeekdays,sloppyRanges:this.options.sloppyRanges}),this.name){if(ns.find(s=>s.name===this.name))throw new Error("Cron: Tried to initialize new named job '"+this.name+"', but name already taken.");ns.push(this)}return i!==void 0&&HN(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=ns.indexOf(this);t>=0&&ns.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>Cw&&(e=Cw),this._states.currentTimeout=setTimeout(()=>this._checkTrigger(r),e),this._states.currentTimeout&&this.options.unref&&WN(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(Ua(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&&Ua(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 Xa={};se(Xa,{add:()=>Kn,addBusinessDays:()=>Tu,addDays:()=>et,addHours:()=>Eu,addISOWeekYears:()=>Cu,addMilliseconds:()=>Gn,addMinutes:()=>as,addMonths:()=>en,addQuarters:()=>ls,addSeconds:()=>Ou,addWeeks:()=>Qn,addYears:()=>Iu,areIntervalsOverlapping:()=>_w,clamp:()=>Rw,closestIndexTo:()=>Pu,closestTo:()=>Fw,compareAsc:()=>yt,compareDesc:()=>Aw,constructFrom:()=>$,constructNow:()=>de,daysToWeeks:()=>$w,differenceInBusinessDays:()=>Bw,differenceInCalendarDays:()=>ot,differenceInCalendarISOWeekYears:()=>_u,differenceInCalendarISOWeeks:()=>jw,differenceInCalendarMonths:()=>qi,differenceInCalendarQuarters:()=>cs,differenceInCalendarWeeks:()=>Yi,differenceInCalendarYears:()=>Jn,differenceInDays:()=>us,differenceInHours:()=>Vi,differenceInISOWeekYears:()=>zw,differenceInMilliseconds:()=>fs,differenceInMinutes:()=>Ki,differenceInMonths:()=>Xn,differenceInQuarters:()=>Hw,differenceInSeconds:()=>on,differenceInWeeks:()=>Ww,differenceInYears:()=>Au,eachDayOfInterval:()=>$u,eachHourOfInterval:()=>qw,eachMinuteOfInterval:()=>Yw,eachMonthOfInterval:()=>Vw,eachQuarterOfInterval:()=>Kw,eachWeekOfInterval:()=>Gw,eachWeekendOfInterval:()=>ms,eachWeekendOfMonth:()=>Qw,eachWeekendOfYear:()=>Jw,eachYearOfInterval:()=>Xw,endOfDay:()=>ps,endOfDecade:()=>Zw,endOfHour:()=>e0,endOfISOWeek:()=>t0,endOfISOWeekYear:()=>r0,endOfMinute:()=>n0,endOfMonth:()=>hs,endOfQuarter:()=>i0,endOfSecond:()=>o0,endOfToday:()=>s0,endOfTomorrow:()=>a0,endOfWeek:()=>ju,endOfYear:()=>Bu,endOfYesterday:()=>l0,format:()=>Va,formatDate:()=>Va,formatDistance:()=>qu,formatDistanceStrict:()=>Yu,formatDistanceToNow:()=>b0,formatDistanceToNowStrict:()=>w0,formatDuration:()=>S0,formatISO:()=>v0,formatISO9075:()=>k0,formatISODuration:()=>T0,formatRFC3339:()=>E0,formatRFC7231:()=>D0,formatRelative:()=>C0,formatters:()=>qa,fromUnixTime:()=>O0,getDate:()=>Vu,getDay:()=>ri,getDayOfYear:()=>zu,getDaysInMonth:()=>Ku,getDaysInYear:()=>I0,getDecade:()=>M0,getDefaultOptions:()=>Qu,getHours:()=>N0,getISODay:()=>Ju,getISOWeek:()=>xs,getISOWeekYear:()=>Mt,getISOWeeksInYear:()=>P0,getMilliseconds:()=>L0,getMinutes:()=>_0,getMonth:()=>R0,getOverlappingDaysInIntervals:()=>F0,getQuarter:()=>Wa,getSeconds:()=>A0,getTime:()=>$0,getUnixTime:()=>B0,getWeek:()=>bs,getWeekOfMonth:()=>j0,getWeekYear:()=>ei,getWeeksInMonth:()=>U0,getYear:()=>z0,hoursToMilliseconds:()=>H0,hoursToMinutes:()=>W0,hoursToSeconds:()=>q0,interval:()=>Y0,intervalToDuration:()=>V0,intlFormat:()=>K0,intlFormatDistance:()=>G0,isAfter:()=>Q0,isBefore:()=>J0,isDate:()=>Lu,isEqual:()=>X0,isExists:()=>Z0,isFirstDayOfMonth:()=>eS,isFriday:()=>tS,isFuture:()=>rS,isLastDayOfMonth:()=>Fu,isLeapYear:()=>Gu,isMatch:()=>nS,isMonday:()=>iS,isPast:()=>oS,isSameDay:()=>nn,isSameHour:()=>Hf,isSameISOWeek:()=>Wf,isSameISOWeekYear:()=>sS,isSameMinute:()=>qf,isSameMonth:()=>Yf,isSameQuarter:()=>Vf,isSameSecond:()=>Kf,isSameWeek:()=>ks,isSameYear:()=>Gf,isSaturday:()=>vu,isSunday:()=>ku,isThisHour:()=>aS,isThisISOWeek:()=>lS,isThisMinute:()=>cS,isThisMonth:()=>uS,isThisQuarter:()=>fS,isThisSecond:()=>pS,isThisWeek:()=>hS,isThisYear:()=>mS,isThursday:()=>dS,isToday:()=>gS,isTomorrow:()=>yS,isTuesday:()=>xS,isValid:()=>ft,isWednesday:()=>bS,isWeekend:()=>tn,isWithinInterval:()=>wS,isYesterday:()=>SS,lastDayOfDecade:()=>vS,lastDayOfISOWeek:()=>kS,lastDayOfISOWeekYear:()=>TS,lastDayOfMonth:()=>Xu,lastDayOfQuarter:()=>ES,lastDayOfWeek:()=>Qf,lastDayOfYear:()=>DS,lightFormat:()=>CS,lightFormatters:()=>Zt,longFormatters:()=>ti,max:()=>Mu,milliseconds:()=>OS,millisecondsToHours:()=>IS,millisecondsToMinutes:()=>MS,millisecondsToSeconds:()=>NS,min:()=>Nu,minutesToHours:()=>PS,minutesToMilliseconds:()=>LS,minutesToSeconds:()=>_S,monthsToQuarters:()=>RS,monthsToYears:()=>FS,nextDay:()=>bt,nextFriday:()=>AS,nextMonday:()=>$S,nextSaturday:()=>BS,nextSunday:()=>jS,nextThursday:()=>US,nextTuesday:()=>zS,nextWednesday:()=>HS,parse:()=>zf,parseISO:()=>qS,parseJSON:()=>YS,parsers:()=>Uf,previousDay:()=>wt,previousFriday:()=>VS,previousMonday:()=>KS,previousSaturday:()=>GS,previousSunday:()=>QS,previousThursday:()=>JS,previousTuesday:()=>XS,previousWednesday:()=>ZS,quartersToMonths:()=>ev,quartersToYears:()=>tv,roundToNearestHours:()=>rv,roundToNearestMinutes:()=>nv,secondsToHours:()=>iv,secondsToMilliseconds:()=>ov,secondsToMinutes:()=>sv,set:()=>av,setDate:()=>lv,setDay:()=>ni,setDayOfYear:()=>cv,setDefaultOptions:()=>uv,setHours:()=>fv,setISODay:()=>Ef,setISOWeek:()=>xf,setISOWeekYear:()=>Du,setMilliseconds:()=>pv,setMinutes:()=>hv,setMonth:()=>Ts,setQuarter:()=>mv,setSeconds:()=>dv,setWeek:()=>gf,setWeekYear:()=>gv,setYear:()=>yv,startOfDay:()=>rn,startOfDecade:()=>xv,startOfHour:()=>Ka,startOfISOWeek:()=>Ge,startOfISOWeekYear:()=>Xt,startOfMinute:()=>Ga,startOfMonth:()=>Zn,startOfQuarter:()=>sn,startOfSecond:()=>Qa,startOfToday:()=>bv,startOfTomorrow:()=>wv,startOfWeek:()=>Le,startOfWeekYear:()=>Gi,startOfYear:()=>ds,startOfYesterday:()=>Sv,sub:()=>vv,subBusinessDays:()=>kv,subDays:()=>ii,subHours:()=>Tv,subISOWeekYears:()=>Ru,subMilliseconds:()=>Ev,subMinutes:()=>Dv,subMonths:()=>Xf,subQuarters:()=>Cv,subSeconds:()=>Ov,subWeeks:()=>Iv,subYears:()=>Mv,toDate:()=>b,transpose:()=>Zu,weeksToDays:()=>Nv,yearsToDays:()=>Pv,yearsToMonths:()=>Lv,yearsToQuarters:()=>_v});var gu=7,Ha=365.2425,qN=Math.pow(10,8)*24*60*60*1e3,OG=-qN,Zr=6048e5,yu=864e5,gt=6e4,Jt=36e5,is=1e3,cd=525600,Vn=43200,os=1440,xu=60,bu=3,wu=12,Su=4,Wi=3600,ss=60,du=Wi*24,Mw=du*7,ud=du*365.2425,fd=ud/12,Nw=fd*3,pd=Symbol.for("constructDateFrom");function $(t,e){return typeof t=="function"?t(e):t&&typeof t=="object"&&pd in t?t[pd](e):t instanceof Date?new t.constructor(e):new Date(e)}o($,"constructFrom");var NG=$;function b(t,e){return $(e||t,t)}o(b,"toDate");var RG=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 jG=et;function en(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(en,"addMonths");var qG=en;function Kn(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?en(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(Kn,"add");var XG=Kn;function vu(t,e){return b(t,e?.in).getDay()===6}o(vu,"isSaturday");var rQ=vu;function ku(t,e){return b(t,e?.in).getDay()===0}o(ku,"isSunday");var sQ=ku;function tn(t,e){let r=b(t,e?.in).getDay();return r===0||r===6}o(tn,"isWeekend");var uQ=tn;function Tu(t,e,r){let n=b(t,r?.in),i=tn(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),tn(n,r)||(c-=1);return i&&tn(n,r)&&e!==0&&(vu(n,r)&&n.setDate(n.getDate()+(a<0?2:-1)),ku(n,r)&&n.setDate(n.getDate()+(a<0?1:-2))),n.setHours(s),n}o(Tu,"addBusinessDays");var xQ=Tu;function Gn(t,e,r){return $(r?.in||t,+b(t)+e)}o(Gn,"addMilliseconds");var kQ=Gn;function Eu(t,e,r){return Gn(t,e*Jt,r)}o(Eu,"addHours");var OQ=Eu;var Pw={};function Oe(){return Pw}o(Oe,"getDefaultOptions");function Lw(t){Pw=t}o(Lw,"setDefaultOptions");function Le(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(Le,"startOfWeek");var RQ=Le;function Ge(t,e){return Le(t,{...e,weekStartsOn:1})}o(Ge,"startOfISOWeek");var BQ=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 qQ=Mt;function Ue(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(Ue,"getTimezoneOffsetInMilliseconds");function te(t,...e){let r=$.bind(null,t||e.find(n=>typeof n=="object"));return e.map(r)}o(te,"normalizeDates");function rn(t,e){let r=b(t,e?.in);return r.setHours(0,0,0,0),r}o(rn,"startOfDay");var tJ=rn;function ot(t,e,r){let[n,i]=te(r?.in,t,e),s=rn(n),a=rn(i),l=+s-Ue(s),c=+a-Ue(a);return Math.round((l-c)/yu)}o(ot,"differenceInCalendarDays");var lJ=ot;function Xt(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(Xt,"startOfISOWeekYear");var mJ=Xt;function Du(t,e,r){let n=b(t,r?.in),i=ot(n,Xt(n,r)),s=$(r?.in||t,0);return s.setFullYear(e,0,4),s.setHours(0,0,0,0),n=Xt(s),n.setDate(n.getDate()+i),n}o(Du,"setISOWeekYear");var SJ=Du;function Cu(t,e,r){return Du(t,Mt(t,r)+e,r)}o(Cu,"addISOWeekYears");var DJ=Cu;function as(t,e,r){let n=b(t,r?.in);return n.setTime(n.getTime()+e*gt),n}o(as,"addMinutes");var NJ=as;function ls(t,e,r){return en(t,e*3,r)}o(ls,"addQuarters");var RJ=ls;function Ou(t,e,r){return Gn(t,e*1e3,r)}o(Ou,"addSeconds");var BJ=Ou;function Qn(t,e,r){return et(t,e*7,r)}o(Qn,"addWeeks");var HJ=Qn;function Iu(t,e,r){return en(t,e*12,r)}o(Iu,"addYears");var VJ=Iu;function _w(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(_w,"areIntervalsOverlapping");var JJ=_w;function Mu(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(Mu,"max");var rX=Mu;function Nu(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(Nu,"min");var aX=Nu;function Rw(t,e,r){let[n,i,s]=te(r?.in,t,e.start,e.end);return Nu([Mu([n,i],r),s],r)}o(Rw,"clamp");var hX=Rw;function Pu(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(Pu,"closestIndexTo");var yX=Pu;function Fw(t,e,r){let[n,...i]=te(r?.in,t,...e),s=Pu(n,i);if(typeof s=="number"&&isNaN(s))return $(n,NaN);if(s!==void 0)return i[s]}o(Fw,"closestTo");var kX=Fw;function yt(t,e){let r=+b(t)-+b(e);return r<0?-1:r>0?1:r}o(yt,"compareAsc");var CX=yt;function Aw(t,e){let r=+b(t)-+b(e);return r>0?-1:r<0?1:r}o(Aw,"compareDesc");var NX=Aw;function de(t){return $(t,Date.now())}o(de,"constructNow");var RX=de;function $w(t){let e=Math.trunc(t/7);return e===0?0:e}o($w,"daysToWeeks");var BX=$w;function nn(t,e,r){let[n,i]=te(r?.in,t,e);return+rn(n)==+rn(i)}o(nn,"isSameDay");var WX=nn;function Lu(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}o(Lu,"isDate");var VX=Lu;function ft(t){return!(!Lu(t)&&typeof t!="number"||isNaN(+b(t)))}o(ft,"isValid");var XX=ft;function Bw(t,e,r){let[n,i]=te(r?.in,t,e);if(!ft(n)||!ft(i))return NaN;let s=ot(n,i),a=s<0?-1:1,l=Math.trunc(s/7),c=l*5,u=et(i,l*7);for(;!nn(n,u);)c+=tn(u,r)?0:a,u=et(u,a);return c===0?0:c}o(Bw,"differenceInBusinessDays");var aZ=Bw;function _u(t,e,r){let[n,i]=te(r?.in,t,e);return Mt(n,r)-Mt(i,r)}o(_u,"differenceInCalendarISOWeekYears");var pZ=_u;function jw(t,e,r){let[n,i]=te(r?.in,t,e),s=Ge(n),a=Ge(i),l=+s-Ue(s),c=+a-Ue(a);return Math.round((l-c)/Zr)}o(jw,"differenceInCalendarISOWeeks");var bZ=jw;function qi(t,e,r){let[n,i]=te(r?.in,t,e),s=n.getFullYear()-i.getFullYear(),a=n.getMonth()-i.getMonth();return s*12+a}o(qi,"differenceInCalendarMonths");var kZ=qi;function Wa(t,e){let r=b(t,e?.in);return Math.trunc(r.getMonth()/3)+1}o(Wa,"getQuarter");var CZ=Wa;function cs(t,e,r){let[n,i]=te(r?.in,t,e),s=n.getFullYear()-i.getFullYear(),a=Wa(n)-Wa(i);return s*4+a}o(cs,"differenceInCalendarQuarters");var PZ=cs;function Yi(t,e,r){let[n,i]=te(r?.in,t,e),s=Le(n,r),a=Le(i,r),l=+s-Ue(s),c=+a-Ue(a);return Math.round((l-c)/Zr)}o(Yi,"differenceInCalendarWeeks");var BZ=Yi;function Jn(t,e,r){let[n,i]=te(r?.in,t,e);return n.getFullYear()-i.getFullYear()}o(Jn,"differenceInCalendarYears");var HZ=Jn;function us(t,e,r){let[n,i]=te(r?.in,t,e),s=Uw(n,i),a=Math.abs(ot(n,i));n.setDate(n.getDate()-s*a);let l=+(Uw(n,i)===-s),c=s*(a-l);return c===0?0:c}o(us,"differenceInDays");function Uw(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(Uw,"compareLocalAsc");var KZ=us;function xt(t){return e=>{let n=(t?Math[t]:Math.trunc)(e);return n===0?0:n}}o(xt,"getRoundingMethod");function Vi(t,e,r){let[n,i]=te(r?.in,t,e),s=(+n-+i)/Jt;return xt(r?.roundingMethod)(s)}o(Vi,"differenceInHours");var ree=Vi;function Ru(t,e,r){return Cu(t,-e,r)}o(Ru,"subISOWeekYears");var see=Ru;function zw(t,e,r){let[n,i]=te(r?.in,t,e),s=yt(n,i),a=Math.abs(_u(n,i,r)),l=Ru(n,s*a,r),c=+(yt(l,i)===-s),u=s*(a-c);return u===0?0:u}o(zw,"differenceInISOWeekYears");var hee=zw;function fs(t,e){return+b(t)-+b(e)}o(fs,"differenceInMilliseconds");var yee=fs;function Ki(t,e,r){let n=fs(t,e)/gt;return xt(r?.roundingMethod)(n)}o(Ki,"differenceInMinutes");var kee=Ki;function ps(t,e){let r=b(t,e?.in);return r.setHours(23,59,59,999),r}o(ps,"endOfDay");var Cee=ps;function hs(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(hs,"endOfMonth");var Nee=hs;function Fu(t,e){let r=b(t,e?.in);return+ps(r,e)==+hs(r,e)}o(Fu,"isLastDayOfMonth");var Aee=Fu;function Xn(t,e,r){let[n,i,s]=te(r?.in,t,t,e),a=yt(i,s),l=Math.abs(qi(i,s));if(l<1)return 0;i.getMonth()===1&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-a*l);let c=yt(i,s)===-a;Fu(n)&&l===1&&yt(n,s)===1&&(c=!1);let u=a*(l-+c);return u===0?0:u}o(Xn,"differenceInMonths");var Wee=Xn;function Hw(t,e,r){let n=Xn(t,e,r)/3;return xt(r?.roundingMethod)(n)}o(Hw,"differenceInQuarters");var Gee=Hw;function on(t,e,r){let n=fs(t,e)/1e3;return xt(r?.roundingMethod)(n)}o(on,"differenceInSeconds");var ete=on;function Ww(t,e,r){let n=us(t,e,r)/7;return xt(r?.roundingMethod)(n)}o(Ww,"differenceInWeeks");var ote=Ww;function Au(t,e,r){let[n,i]=te(r?.in,t,e),s=yt(n,i),a=Math.abs(Jn(n,i));n.setFullYear(1584),i.setFullYear(1584);let l=yt(n,i)===-s,c=s*(a-+l);return c===0?0:c}o(Au,"differenceInYears");var fte=Au;function st(t,e){let[r,n]=te(t,e.start,e.end);return{start:r,end:n}}o(st,"normalizeInterval");function $u(t,e){let{start:r,end:n}=st(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($u,"eachDayOfInterval");var bte=$u;function qw(t,e){let{start:r,end:n}=st(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(qw,"eachHourOfInterval");var Tte=qw;function Yw(t,e){let{start:r,end:n}=st(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=as(a,l);return i?c.reverse():c}o(Yw,"eachMinuteOfInterval");var Mte=Yw;function Vw(t,e){let{start:r,end:n}=st(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(Vw,"eachMonthOfInterval");var Rte=Vw;function sn(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(sn,"startOfQuarter");var Bte=sn;function Kw(t,e){let{start:r,end:n}=st(e?.in,t),i=+r>+n,s=i?+sn(r):+sn(n),a=i?sn(n):sn(r),l=e?.step??1;if(!l)return[];l<0&&(l=-l,i=!i);let c=[];for(;+a<=s;)c.push($(r,a)),a=ls(a,l);return i?c.reverse():c}o(Kw,"eachQuarterOfInterval");var Yte=Kw;function Gw(t,e){let{start:r,end:n}=st(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=Qn(c,u),c.setHours(15);return i?f.reverse():f}o(Gw,"eachWeekOfInterval");var Zte=Gw;function ms(t,e){let{start:r,end:n}=st(e?.in,t),i=$u({start:r,end:n},e),s=[],a=0;for(;a<i.length;){let l=i[a++];tn(l)&&s.push($(r,l))}return s}o(ms,"eachWeekendOfInterval");var sre=ms;function Zn(t,e){let r=b(t,e?.in);return r.setDate(1),r.setHours(0,0,0,0),r}o(Zn,"startOfMonth");var ure=Zn;function Qw(t,e){let r=Zn(t,e),n=hs(t,e);return ms({start:r,end:n},e)}o(Qw,"eachWeekendOfMonth");var gre=Qw;function Bu(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(Bu,"endOfYear");var wre=Bu;function ds(t,e){let r=b(t,e?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}o(ds,"startOfYear");var Tre=ds;function Jw(t,e){let r=ds(t,e),n=Bu(t,e);return ms({start:r,end:n},e)}o(Jw,"eachWeekendOfYear");var Mre=Jw;function Xw(t,e){let{start:r,end:n}=st(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(Xw,"eachYearOfInterval");var Rre=Xw;function Zw(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(Zw,"endOfDecade");var Bre=Zw;function e0(t,e){let r=b(t,e?.in);return r.setMinutes(59,59,999),r}o(e0,"endOfHour");var Hre=e0;function ju(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(ju,"endOfWeek");var Kre=ju;function t0(t,e){return ju(t,{...e,weekStartsOn:1})}o(t0,"endOfISOWeek");var Xre=t0;function r0(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(r0,"endOfISOWeekYear");var ine=r0;function n0(t,e){let r=b(t,e?.in);return r.setSeconds(59,999),r}o(n0,"endOfMinute");var lne=n0;function i0(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(i0,"endOfQuarter");var pne=i0;function o0(t,e){let r=b(t,e?.in);return r.setMilliseconds(999),r}o(o0,"endOfSecond");var gne=o0;function s0(t){return ps(Date.now(),t)}o(s0,"endOfToday");var wne=s0;function a0(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(a0,"endOfTomorrow");var Tne=a0;function l0(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(l0,"endOfYesterday");var Ine=l0;var YN={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"}},c0=o((t,e,r)=>{let n,i=YN[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 Uu(t){return(e={})=>{let r=e.width?String(e.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}}o(Uu,"buildFormatLongFn");var VN={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},KN={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},GN={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},u0={date:Uu({formats:VN,defaultWidth:"full"}),time:Uu({formats:KN,defaultWidth:"full"}),dateTime:Uu({formats:GN,defaultWidth:"full"})};var QN={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},f0=o((t,e,r,n)=>QN[t],"formatRelative");function gs(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(gs,"buildLocalizeFn");var JN={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},XN={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ZN={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"]},eP={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"]},tP={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"}},rP={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"}},nP=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"),p0={ordinalNumber:nP,era:gs({values:JN,defaultWidth:"wide"}),quarter:gs({values:XN,defaultWidth:"wide",argumentCallback:o(t=>t-1,"argumentCallback")}),month:gs({values:ZN,defaultWidth:"wide"}),day:gs({values:eP,defaultWidth:"wide"}),dayPeriod:gs({values:tP,defaultWidth:"wide",formattingValues:rP,defaultFormattingWidth:"wide"})};function ys(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)?oP(l,p=>p.test(a)):iP(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(ys,"buildMatchFn");function iP(t,e){for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&e(t[r]))return r}o(iP,"findKey");function oP(t,e){for(let r=0;r<t.length;r++)if(e(t[r]))return r}o(oP,"findIndex");function h0(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(h0,"buildMatchPatternFn");var sP=/^(\d+)(th|st|nd|rd)?/i,aP=/\d+/i,lP={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},cP={any:[/^b/i,/^(a|c)/i]},uP={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},fP={any:[/1/i,/2/i,/3/i,/4/i]},pP={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},hP={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]},mP={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},dP={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]},gP={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},yP={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}},m0={ordinalNumber:h0({matchPattern:sP,parsePattern:aP,valueCallback:o(t=>parseInt(t,10),"valueCallback")}),era:ys({matchPatterns:lP,defaultMatchWidth:"wide",parsePatterns:cP,defaultParseWidth:"any"}),quarter:ys({matchPatterns:uP,defaultMatchWidth:"wide",parsePatterns:fP,defaultParseWidth:"any",valueCallback:o(t=>t+1,"valueCallback")}),month:ys({matchPatterns:pP,defaultMatchWidth:"wide",parsePatterns:hP,defaultParseWidth:"any"}),day:ys({matchPatterns:mP,defaultMatchWidth:"wide",parsePatterns:dP,defaultParseWidth:"any"}),dayPeriod:ys({matchPatterns:gP,defaultMatchWidth:"any",parsePatterns:yP,defaultParseWidth:"any"})};var Bt={code:"en-US",formatDistance:c0,formatLong:u0,formatRelative:f0,localize:p0,match:m0,options:{weekStartsOn:0,firstWeekContainsDate:1}},iie=Bt;function zu(t,e){let r=b(t,e?.in);return ot(r,ds(r))+1}o(zu,"getDayOfYear");var fie=zu;function xs(t,e){let r=b(t,e?.in),n=+Ge(r)-+Xt(r);return Math.round(n/Zr)+1}o(xs,"getISOWeek");var xie=xs;function ei(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=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(ei,"getWeekYear");var Eie=ei;function Gi(t,e){let r=Oe(),n=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=ei(t,e),s=$(e?.in||t,0);return s.setFullYear(i,0,n),s.setHours(0,0,0,0),Le(s,e)}o(Gi,"startOfWeekYear");var Pie=Gi;function bs(t,e){let r=b(t,e?.in),n=+Le(r,e)-+Gi(r,e);return Math.round(n/Zr)+1}o(bs,"getWeek");var Bie=bs;function X(t,e){let r=t<0?"-":"",n=Math.abs(t).toString().padStart(e,"0");return r+n}o(X,"addLeadingZeros");var Zt={y(t,e){let r=t.getFullYear(),n=r>0?r:1-r;return X(e==="yy"?n%100:n,e.length)},M(t,e){let r=t.getMonth();return e==="M"?String(r+1):X(r+1,2)},d(t,e){return X(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 X(t.getHours()%12||12,e.length)},H(t,e){return X(t.getHours(),e.length)},m(t,e){return X(t.getMinutes(),e.length)},s(t,e){return X(t.getSeconds(),e.length)},S(t,e){let r=e.length,n=t.getMilliseconds(),i=Math.trunc(n*Math.pow(10,r-3));return X(i,e.length)}};var ws={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},qa={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 Zt.y(t,e)},"y"),Y:o(function(t,e,r,n){let i=ei(t,n),s=i>0?i:1-i;if(e==="YY"){let a=s%100;return X(a,2)}return e==="Yo"?r.ordinalNumber(s,{unit:"year"}):X(s,e.length)},"Y"),R:o(function(t,e){let r=Mt(t);return X(r,e.length)},"R"),u:o(function(t,e){let r=t.getFullYear();return X(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 X(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 X(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 Zt.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 X(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=bs(t,n);return e==="wo"?r.ordinalNumber(i,{unit:"week"}):X(i,e.length)},"w"),I:o(function(t,e,r){let n=xs(t);return e==="Io"?r.ordinalNumber(n,{unit:"week"}):X(n,e.length)},"I"),d:o(function(t,e,r){return e==="do"?r.ordinalNumber(t.getDate(),{unit:"date"}):Zt.d(t,e)},"d"),D:o(function(t,e,r){let n=zu(t);return e==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):X(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 X(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 X(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 X(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=ws.noon:n===0?i=ws.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=ws.evening:n>=12?i=ws.afternoon:n>=4?i=ws.morning:i=ws.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 Zt.h(t,e)},"h"),H:o(function(t,e,r){return e==="Ho"?r.ordinalNumber(t.getHours(),{unit:"hour"}):Zt.H(t,e)},"H"),K:o(function(t,e,r){let n=t.getHours()%12;return e==="Ko"?r.ordinalNumber(n,{unit:"hour"}):X(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"}):X(n,e.length)},"k"),m:o(function(t,e,r){return e==="mo"?r.ordinalNumber(t.getMinutes(),{unit:"minute"}):Zt.m(t,e)},"m"),s:o(function(t,e,r){return e==="so"?r.ordinalNumber(t.getSeconds(),{unit:"second"}):Zt.s(t,e)},"s"),S:o(function(t,e){return Zt.S(t,e)},"S"),X:o(function(t,e,r){let n=t.getTimezoneOffset();if(n===0)return"Z";switch(e){case"X":return g0(n);case"XXXX":case"XX":return Qi(n);default:return Qi(n,":")}},"X"),x:o(function(t,e,r){let n=t.getTimezoneOffset();switch(e){case"x":return g0(n);case"xxxx":case"xx":return Qi(n);default:return Qi(n,":")}},"x"),O:o(function(t,e,r){let n=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+d0(n,":");default:return"GMT"+Qi(n,":")}},"O"),z:o(function(t,e,r){let n=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+d0(n,":");default:return"GMT"+Qi(n,":")}},"z"),t:o(function(t,e,r){let n=Math.trunc(+t/1e3);return X(n,e.length)},"t"),T:o(function(t,e,r){return X(+t,e.length)},"T")};function d0(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+X(s,2)}o(d0,"formatTimezoneShort");function g0(t,e){return t%60===0?(t>0?"-":"+")+X(Math.abs(t)/60,2):Qi(t,e)}o(g0,"formatTimezoneWithOptionalMinutes");function Qi(t,e=""){let r=t>0?"-":"+",n=Math.abs(t),i=X(Math.trunc(n/60),2),s=X(n%60,2);return r+i+e+s}o(Qi,"formatTimezone");var y0=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"),x0=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"),xP=o((t,e)=>{let r=t.match(/(P+)(p+)?/)||[],n=r[1],i=r[2];if(!i)return y0(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}}",y0(n,e)).replace("{{time}}",x0(i,e))},"dateTimeLongFormatter"),ti={p:x0,P:xP};var bP=/^D+$/,wP=/^Y+$/,SP=["D","DD","YY","YYYY"];function Hu(t){return bP.test(t)}o(Hu,"isProtectedDayOfYearToken");function Wu(t){return wP.test(t)}o(Wu,"isProtectedWeekYearToken");function Ya(t,e,r){let n=vP(t,e,r);if(console.warn(n),SP.includes(t))throw new RangeError(n)}o(Ya,"warnOrThrowProtectedError");function vP(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(vP,"message");var kP=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,TP=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,EP=/^'([^]*?)'?$/,DP=/''/g,CP=/[a-zA-Z]/;function Va(t,e,r){let n=Oe(),i=r?.locale??n.locale??Bt,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(!ft(l))throw new RangeError("Invalid time value");let c=e.match(TP).map(f=>{let p=f[0];if(p==="p"||p==="P"){let h=ti[p];return h(f,i.formatLong)}return f}).join("").match(kP).map(f=>{if(f==="''")return{isToken:!1,value:"'"};let p=f[0];if(p==="'")return{isToken:!1,value:OP(f)};if(qa[p])return{isToken:!0,value:f};if(p.match(CP))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&&Wu(p)||!r?.useAdditionalDayOfYearTokens&&Hu(p))&&Ya(p,e,String(t));let h=qa[p[0]];return h(l,p,i.localize,u)}).join("")}o(Va,"format");function OP(t){let e=t.match(EP);return e?e[1].replace(DP,"'"):t}o(OP,"cleanEscapedString");var poe=Va;function qu(t,e,r){let n=Oe(),i=r?.locale??n.locale??Bt,s=2520,a=yt(t,e);if(isNaN(a))throw new RangeError("Invalid time value");let l=Object.assign({},r,{addSuffix:r?.addSuffix,comparison:a}),[c,u]=te(r?.in,...a>0?[e,t]:[t,e]),f=on(u,c),p=(Ue(u)-Ue(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<os){let d=Math.round(h/60);return i.formatDistance("aboutXHours",d,l)}else{if(h<s)return i.formatDistance("xDays",1,l);if(h<Vn){let d=Math.round(h/os);return i.formatDistance("xDays",d,l)}else if(h<Vn*2)return m=Math.round(h/Vn),i.formatDistance("aboutXMonths",m,l)}if(m=Xn(u,c),m<12){let d=Math.round(h/Vn);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(qu,"formatDistance");var koe=qu;function Yu(t,e,r){let n=Oe(),i=r?.locale??n.locale??Bt,s=yt(t,e);if(isNaN(s))throw new RangeError("Invalid time value");let a=Object.assign({},r,{addSuffix:r?.addSuffix,comparison:s}),[l,c]=te(r?.in,...s>0?[e,t]:[t,e]),u=xt(r?.roundingMethod??"round"),f=c.getTime()-l.getTime(),p=f/gt,h=Ue(c)-Ue(l),m=(f-h)/gt,d=r?.unit,g;if(d?g=d:p<1?g="second":p<60?g="minute":p<os?g="hour":m<Vn?g="day":m<cd?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/os);return i.formatDistance("xDays",y,a)}else if(g==="month"){let y=u(m/Vn);return y===12&&d!=="month"?i.formatDistance("xYears",1,a):i.formatDistance("xMonths",y,a)}else{let y=u(m/cd);return i.formatDistance("xYears",y,a)}}o(Yu,"formatDistanceStrict");var Loe=Yu;function b0(t,e){return qu(t,de(t),e)}o(b0,"formatDistanceToNow");var $oe=b0;function w0(t,e){return Yu(t,de(t),e)}o(w0,"formatDistanceToNowStrict");var Hoe=w0;var IP=["years","months","weeks","days","hours","minutes","seconds"];function S0(t,e){let r=Oe(),n=e?.locale??r.locale??Bt,i=e?.format??IP,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 Koe=S0;function v0(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=X(r.getDate(),2),f=X(r.getMonth()+1,2);s=`${X(r.getFullYear(),4)}${l}${f}${l}${u}`}if(i!=="date"){let u=r.getTimezoneOffset();if(u!==0){let g=Math.abs(u),y=X(Math.trunc(g/60),2),x=X(g%60,2);a=`${u<0?"+":"-"}${y}:${x}`}else a="Z";let f=X(r.getHours(),2),p=X(r.getMinutes(),2),h=X(r.getSeconds(),2),m=s===""?"":"T",d=[f,p,h].join(c);s=`${s}${m}${d}${a}`}return s}o(v0,"formatISO");var Zoe=v0;function k0(t,e){let r=b(t,e?.in);if(!ft(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=X(r.getDate(),2),u=X(r.getMonth()+1,2);s=`${X(r.getFullYear(),4)}${a}${u}${a}${c}`}if(i!=="date"){let c=X(r.getHours(),2),u=X(r.getMinutes(),2),f=X(r.getSeconds(),2);s=`${s}${s===""?"":" "}${c}${l}${u}${l}${f}`}return s}o(k0,"formatISO9075");var ose=k0;function T0(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(T0,"formatISODuration");var lse=T0;function E0(t,e){let r=b(t,e?.in);if(!ft(r))throw new RangeError("Invalid time value");let n=e?.fractionDigits??0,i=X(r.getDate(),2),s=X(r.getMonth()+1,2),a=r.getFullYear(),l=X(r.getHours(),2),c=X(r.getMinutes(),2),u=X(r.getSeconds(),2),f="";if(n>0){let m=r.getMilliseconds(),d=Math.trunc(m*Math.pow(10,n-3));f="."+X(d,n)}let p="",h=r.getTimezoneOffset();if(h!==0){let m=Math.abs(h),d=X(Math.trunc(m/60),2),g=X(m%60,2);p=`${h<0?"+":"-"}${d}:${g}`}else p="Z";return`${a}-${s}-${i}T${l}:${c}:${u}${f}${p}`}o(E0,"formatRFC3339");var mse=E0;var MP=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],NP=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function D0(t){let e=b(t);if(!ft(e))throw new RangeError("Invalid time value");let r=MP[e.getUTCDay()],n=X(e.getUTCDate(),2),i=NP[e.getUTCMonth()],s=e.getUTCFullYear(),a=X(e.getUTCHours(),2),l=X(e.getUTCMinutes(),2),c=X(e.getUTCSeconds(),2);return`${r}, ${n} ${i} ${s} ${a}:${l}:${c} GMT`}o(D0,"formatRFC7231");var wse=D0;function C0(t,e,r){let[n,i]=te(r?.in,t,e),s=Oe(),a=r?.locale??s.locale??Bt,l=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??s.weekStartsOn??s.locale?.options?.weekStartsOn??0,c=ot(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 Va(n,f,{locale:a,weekStartsOn:l})}o(C0,"formatRelative");var Ose=C0;function O0(t,e){return b(t*1e3,e?.in)}o(O0,"fromUnixTime");var Pse=O0;function Vu(t,e){return b(t,e?.in).getDate()}o(Vu,"getDate");var Fse=Vu;function ri(t,e){return b(t,e?.in).getDay()}o(ri,"getDay");var jse=ri;function Ku(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(Ku,"getDaysInMonth");var qse=Ku;function Gu(t,e){let n=b(t,e?.in).getFullYear();return n%400===0||n%4===0&&n%100!==0}o(Gu,"isLeapYear");var Gse=Gu;function I0(t,e){let r=b(t,e?.in);return Number.isNaN(+r)?NaN:Gu(r)?366:365}o(I0,"getDaysInYear");var eae=I0;function M0(t,e){let n=b(t,e?.in).getFullYear();return Math.floor(n/10)*10}o(M0,"getDecade");var iae=M0;function Qu(){return Object.assign({},Oe())}o(Qu,"getDefaultOptions");var lae=Qu;function N0(t,e){return b(t,e?.in).getHours()}o(N0,"getHours");var pae=N0;function Ju(t,e){let r=b(t,e?.in).getDay();return r===0?7:r}o(Ju,"getISODay");var gae=Ju;function P0(t,e){let r=Xt(t,e),i=+Xt(Qn(r,60))-+r;return Math.round(i/Zr)}o(P0,"getISOWeeksInYear");var vae=P0;function L0(t){return b(t).getMilliseconds()}o(L0,"getMilliseconds");var Dae=L0;function _0(t,e){return b(t,e?.in).getMinutes()}o(_0,"getMinutes");var Mae=_0;function R0(t,e){return b(t,e?.in).getMonth()}o(R0,"getMonth");var _ae=R0;function F0(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-Ue(l),u=s>n?n:s,f=u-Ue(u);return Math.ceil((f-c)/yu)}o(F0,"getOverlappingDaysInIntervals");var jae=F0;function A0(t){return b(t).getSeconds()}o(A0,"getSeconds");var Wae=A0;function $0(t){return+b(t)}o($0,"getTime");var Kae=$0;function B0(t){return Math.trunc(+b(t)/1e3)}o(B0,"getUnixTime");var Xae=B0;function j0(t,e){let r=Oe(),n=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=Vu(b(t,e?.in));if(isNaN(i))return NaN;let s=ri(Zn(t,e)),a=n-s;a<=0&&(a+=7);let l=i-a;return Math.ceil(l/7)+1}o(j0,"getWeekOfMonth");var sle=j0;function Xu(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(Xu,"lastDayOfMonth");var ule=Xu;function U0(t,e){let r=b(t,e?.in);return Yi(Xu(r,e),Zn(r,e),e)+1}o(U0,"getWeeksInMonth");var yle=U0;function z0(t,e){return b(t,e?.in).getFullYear()}o(z0,"getYear");var Sle=z0;function H0(t){return Math.trunc(t*Jt)}o(H0,"hoursToMilliseconds");var Ele=H0;function W0(t){return Math.trunc(t*xu)}o(W0,"hoursToMinutes");var Ile=W0;function q0(t){return Math.trunc(t*Wi)}o(q0,"hoursToSeconds");var Lle=q0;function Y0(t,e,r){let[n,i]=te(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(Y0,"interval");var Ale=Y0;function V0(t,e){let{start:r,end:n}=st(e?.in,t),i={},s=Au(n,r);s&&(i.years=s);let a=Kn(r,{years:i.years}),l=Xn(n,a);l&&(i.months=l);let c=Kn(a,{months:i.months}),u=us(n,c);u&&(i.days=u);let f=Kn(c,{days:i.days}),p=Vi(n,f);p&&(i.hours=p);let h=Kn(f,{hours:i.hours}),m=Ki(n,h);m&&(i.minutes=m);let d=Kn(h,{minutes:i.minutes}),g=on(n,d);return g&&(i.seconds=g),i}o(V0,"intervalToDuration");var Kle=V0;function K0(t,e,r){let n;return PP(e)?n=e:r=e,new Intl.DateTimeFormat(r?.locale,n).format(b(t))}o(K0,"intlFormat");function PP(t){return t!==void 0&&!("locale"in t)}o(PP,"isFormatOptions");var Xle=K0;function G0(t,e,r){let n=0,i,[s,a]=te(r?.in,t,e);if(r?.unit)i=r?.unit,i==="second"?n=on(s,a):i==="minute"?n=Ki(s,a):i==="hour"?n=Vi(s,a):i==="day"?n=ot(s,a):i==="week"?n=Yi(s,a):i==="month"?n=qi(s,a):i==="quarter"?n=cs(s,a):i==="year"&&(n=Jn(s,a));else{let c=on(s,a);Math.abs(c)<ss?(n=on(s,a),i="second"):Math.abs(c)<Wi?(n=Ki(s,a),i="minute"):Math.abs(c)<du&&Math.abs(ot(s,a))<1?(n=Vi(s,a),i="hour"):Math.abs(c)<Mw&&(n=ot(s,a))&&Math.abs(n)<7?i="day":Math.abs(c)<fd?(n=Yi(s,a),i="week"):Math.abs(c)<Nw?(n=qi(s,a),i="month"):Math.abs(c)<ud?cs(s,a)<4?(n=cs(s,a),i="quarter"):(n=Jn(s,a),i="year"):(n=Jn(s,a),i="year")}return new Intl.RelativeTimeFormat(r?.locale,{numeric:"auto",...r}).format(n,i)}o(G0,"intlFormatDistance");var fce=G0;function Q0(t,e){return+b(t)>+b(e)}o(Q0,"isAfter");var dce=Q0;function J0(t,e){return+b(t)<+b(e)}o(J0,"isBefore");var bce=J0;function X0(t,e){return+b(t)==+b(e)}o(X0,"isEqual");var kce=X0;function Z0(t,e,r){let n=new Date(t,e,r);return n.getFullYear()===t&&n.getMonth()===e&&n.getDate()===r}o(Z0,"isExists");var Dce=Z0;function eS(t,e){return b(t,e?.in).getDate()===1}o(eS,"isFirstDayOfMonth");var Mce=eS;function tS(t,e){return b(t,e?.in).getDay()===5}o(tS,"isFriday");var _ce=tS;function rS(t){return+b(t)>Date.now()}o(rS,"isFuture");var $ce=rS;function Zu(t,e){let r=LP(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(Zu,"transpose");function LP(t){return typeof t=="function"&&t.prototype?.constructor===t}o(LP,"isConstructor");var zce=Zu;var _P=10,ef=class{static{o(this,"Setter")}subPriority=0;validate(e,r){return!0}},tf=class extends ef{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)}},rf=class extends ef{static{o(this,"DateTimezoneSetter")}priority=_P;subPriority=-1;constructor(e,r){super(),this.context=e||(n=>$(r,n))}set(e,r){return r.timestampIsSet?e:$(e,Zu(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 tf(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}validate(e,r,n){return!0}};var nf=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 Se={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}/},ur={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 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 fr(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*Jt+s*gt+a*is),rest:e.slice(r[0].length)}}o(fr,"parseTimezonePattern");function of(t){return be(Se.anyDigitsSigned,t)}o(of,"parseAnyDigitsSigned");function he(t,e){switch(t){case 1:return be(Se.singleDigit,e);case 2:return be(Se.twoDigits,e);case 3:return be(Se.threeDigits,e);case 4:return be(Se.fourDigits,e);default:return be(new RegExp("^\\d{1,"+t+"}"),e)}}o(he,"parseNDigits");function Ss(t,e){switch(t){case 1:return be(Se.singleDigitSigned,e);case 2:return be(Se.twoDigitsSigned,e);case 3:return be(Se.threeDigitsSigned,e);case 4:return be(Se.fourDigitsSigned,e);default:return be(new RegExp("^-?\\d{1,"+t+"}"),e)}}o(Ss,"parseNDigitsSigned");function vs(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}o(vs,"dayPeriodEnumToHours");function sf(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(sf,"normalizeTwoDigitYear");function af(t){return t%400===0||t%4===0&&t%100!==0}o(af,"isLeapYearIndex");var lf=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=sf(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 cf=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=ei(e,i);if(n.isTwoDigitYear){let l=sf(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 uf=class extends J{static{o(this,"ISOWeekYearParser")}priority=130;parse(e,r){return r==="R"?Ss(4,e):Ss(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 ff=class extends J{static{o(this,"ExtendedYearParser")}priority=130;parse(e,r){return r==="u"?Ss(4,e):Ss(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 pf=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 hf=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 mf=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(be(Se.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 df=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(be(Se.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 gf(t,e,r){let n=b(t,r?.in),i=bs(n,r)-e;return n.setDate(n.getDate()-i*7),b(n,r?.in)}o(gf,"setWeek");var Yue=gf;var yf=class extends J{static{o(this,"LocalWeekParser")}priority=100;parse(e,r,n){switch(r){case"w":return be(Se.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(gf(e,n,i),i)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]};function xf(t,e,r){let n=b(t,r?.in),i=xs(n,r)-e;return n.setDate(n.getDate()-i*7),n}o(xf,"setISOWeek");var ife=xf;var bf=class extends J{static{o(this,"ISOWeekParser")}priority=100;parse(e,r,n){switch(r){case"I":return be(Se.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(xf(e,n))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]};var RP=[31,28,31,30,31,30,31,31,30,31,30,31],FP=[31,29,31,30,31,30,31,31,30,31,30,31],wf=class extends J{static{o(this,"DateParser")}priority=90;subPriority=1;parse(e,r,n){switch(r){case"d":return be(Se.date,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return he(r.length,e)}}validate(e,r){let n=e.getFullYear(),i=af(n),s=e.getMonth();return i?r>=1&&r<=FP[s]:r>=1&&r<=RP[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 Sf=class extends J{static{o(this,"DayOfYearParser")}priority=90;subpriority=1;parse(e,r,n){switch(r){case"D":case"DD":return be(Se.dayOfYear,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return he(r.length,e)}}validate(e,r){let n=e.getFullYear();return af(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 ni(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(ni,"setDay");var Cfe=ni;var vf=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=ni(e,n,i),e.setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]};var kf=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=ni(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 Tf=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=ni(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 Ef(t,e,r){let n=b(t,r?.in),i=Ju(n,r),s=e-i;return et(n,s,r)}o(Ef,"setISODay");var Vfe=Ef;var Df=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=Ef(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 Cf=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(vs(n),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]};var Of=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(vs(n),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]};var If=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(vs(n),0,0,0),e}incompatibleTokens=["a","b","t","T"]};var Mf=class extends J{static{o(this,"Hour1to12Parser")}priority=70;parse(e,r,n){switch(r){case"h":return be(Se.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 Nf=class extends J{static{o(this,"Hour0to23Parser")}priority=70;parse(e,r,n){switch(r){case"H":return be(Se.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 Pf=class extends J{static{o(this,"Hour0To11Parser")}priority=70;parse(e,r,n){switch(r){case"K":return be(Se.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 Lf=class extends J{static{o(this,"Hour1To24Parser")}priority=70;parse(e,r,n){switch(r){case"k":return be(Se.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 _f=class extends J{static{o(this,"MinuteParser")}priority=60;parse(e,r,n){switch(r){case"m":return be(Se.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 Rf=class extends J{static{o(this,"SecondParser")}priority=50;parse(e,r,n){switch(r){case"s":return be(Se.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 Ff=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 Af=class extends J{static{o(this,"ISOTimezoneWithZParser")}priority=10;parse(e,r){switch(r){case"X":return fr(ur.basicOptionalMinutes,e);case"XX":return fr(ur.basic,e);case"XXXX":return fr(ur.basicOptionalSeconds,e);case"XXXXX":return fr(ur.extendedOptionalSeconds,e);default:return fr(ur.extended,e)}}set(e,r,n){return r.timestampIsSet?e:$(e,e.getTime()-Ue(e)-n)}incompatibleTokens=["t","T","x"]};var $f=class extends J{static{o(this,"ISOTimezoneParser")}priority=10;parse(e,r){switch(r){case"x":return fr(ur.basicOptionalMinutes,e);case"xx":return fr(ur.basic,e);case"xxxx":return fr(ur.basicOptionalSeconds,e);case"xxxxx":return fr(ur.extendedOptionalSeconds,e);default:return fr(ur.extended,e)}}set(e,r,n){return r.timestampIsSet?e:$(e,e.getTime()-Ue(e)-n)}incompatibleTokens=["t","T","X"]};var Bf=class extends J{static{o(this,"TimestampSecondsParser")}priority=40;parse(e){return of(e)}set(e,r,n){return[$(e,n*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"};var jf=class extends J{static{o(this,"TimestampMillisecondsParser")}priority=20;parse(e){return of(e)}set(e,r,n){return[$(e,n),{timestampIsSet:!0}]}incompatibleTokens="*"};var Uf={G:new nf,y:new lf,Y:new cf,R:new uf,u:new ff,Q:new pf,q:new hf,M:new mf,L:new df,w:new yf,I:new bf,d:new wf,D:new Sf,E:new vf,e:new kf,c:new Tf,i:new Df,a:new Cf,b:new Of,B:new If,h:new Mf,H:new Nf,K:new Pf,k:new Lf,m:new _f,s:new Rf,S:new Ff,X:new Af,x:new $f,t:new Bf,T:new jf};var AP=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,$P=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,BP=/^'([^]*?)'?$/,jP=/''/g,UP=/\S/,zP=/[a-zA-Z]/;function zf(t,e,r,n){let i=o(()=>$(n?.in||r,NaN),"invalidDate"),s=Qu(),a=n?.locale??s.locale??Bt,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 rf(n?.in,r)],p=e.match($P).map(y=>{let x=y[0];if(x in ti){let T=ti[x];return T(y,a.formatLong)}return y}).join("").match(AP),h=[];for(let y of p){!n?.useAdditionalWeekYearTokens&&Wu(y)&&Ya(y,e,t),!n?.useAdditionalDayOfYearTokens&&Hu(y)&&Ya(y,e,t);let x=y[0],T=Uf[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(zP))throw new RangeError("Format string contains an unescaped latin alphabet character `"+x+"`");if(y==="''"?y="'":x==="'"&&(y=HP(y)),t.indexOf(y)===0)t=t.slice(y.length);else return i()}}if(t.length>0&&UP.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(zf,"parse");function HP(t){return t.match(BP)[1].replace(jP,"'")}o(HP,"cleanEscapedString");var nme=zf;function nS(t,e,r){return ft(zf(t,e,new Date,r))}o(nS,"isMatch");var lme=nS;function iS(t,e){return b(t,e?.in).getDay()===1}o(iS,"isMonday");var pme=iS;function oS(t){return+b(t)<Date.now()}o(oS,"isPast");var gme=oS;function Ka(t,e){let r=b(t,e?.in);return r.setMinutes(0,0,0),r}o(Ka,"startOfHour");var wme=Ka;function Hf(t,e,r){let[n,i]=te(r?.in,t,e);return+Ka(n)==+Ka(i)}o(Hf,"isSameHour");var Eme=Hf;function ks(t,e,r){let[n,i]=te(r?.in,t,e);return+Le(n,r)==+Le(i,r)}o(ks,"isSameWeek");var Mme=ks;function Wf(t,e,r){return ks(t,e,{...r,weekStartsOn:1})}o(Wf,"isSameISOWeek");var _me=Wf;function sS(t,e,r){let[n,i]=te(r?.in,t,e);return+Xt(n)==+Xt(i)}o(sS,"isSameISOWeekYear");var Bme=sS;function Ga(t,e){let r=b(t,e?.in);return r.setSeconds(0,0),r}o(Ga,"startOfMinute");var Hme=Ga;function qf(t,e){return+Ga(t)==+Ga(e)}o(qf,"isSameMinute");var Vme=qf;function Yf(t,e,r){let[n,i]=te(r?.in,t,e);return n.getFullYear()===i.getFullYear()&&n.getMonth()===i.getMonth()}o(Yf,"isSameMonth");var Jme=Yf;function Vf(t,e,r){let[n,i]=te(r?.in,t,e);return+sn(n)==+sn(i)}o(Vf,"isSameQuarter");var rde=Vf;function Qa(t,e){let r=b(t,e?.in);return r.setMilliseconds(0),r}o(Qa,"startOfSecond");var sde=Qa;function Kf(t,e){return+Qa(t)==+Qa(e)}o(Kf,"isSameSecond");var ude=Kf;function Gf(t,e,r){let[n,i]=te(r?.in,t,e);return n.getFullYear()===i.getFullYear()}o(Gf,"isSameYear");var mde=Gf;function aS(t,e){return Hf(b(t,e?.in),de(e?.in||t))}o(aS,"isThisHour");var wde=aS;function lS(t,e){return Wf($(e?.in||t,t),de(e?.in||t))}o(lS,"isThisISOWeek");var Dde=lS;function cS(t){return qf(t,de(t))}o(cS,"isThisMinute");var Nde=cS;function uS(t,e){return Yf($(e?.in||t,t),de(e?.in||t))}o(uS,"isThisMonth");var Ade=uS;function fS(t,e){return Vf($(e?.in||t,t),de(e?.in||t))}o(fS,"isThisQuarter");var Hde=fS;function pS(t){return Kf(t,de(t))}o(pS,"isThisSecond");var Kde=pS;function hS(t,e){return ks($(e?.in||t,t),de(e?.in||t),e)}o(hS,"isThisWeek");var ege=hS;function mS(t,e){return Gf($(e?.in||t,t),de(e?.in||t))}o(mS,"isThisYear");var sge=mS;function dS(t,e){return b(t,e?.in).getDay()===4}o(dS,"isThursday");var uge=dS;function gS(t,e){return nn($(e?.in||t,t),de(e?.in||t))}o(gS,"isToday");var gge=gS;function yS(t,e){return nn(t,et(de(e?.in||t),1),e)}o(yS,"isTomorrow");var vge=yS;function xS(t,e){return b(t,e?.in).getDay()===2}o(xS,"isTuesday");var Dge=xS;function bS(t,e){return b(t,e?.in).getDay()===3}o(bS,"isWednesday");var Mge=bS;function wS(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(wS,"isWithinInterval");var _ge=wS;function ii(t,e,r){return et(t,-e,r)}o(ii,"subDays");var $ge=ii;function SS(t,e){return nn($(e?.in||t,t),ii(de(e?.in||t),1))}o(SS,"isYesterday");var qge=SS;function vS(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(vS,"lastDayOfDecade");var Gge=vS;function Qf(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(Qf,"lastDayOfWeek");var eye=Qf;function kS(t,e){return Qf(t,{...e,weekStartsOn:1})}o(kS,"lastDayOfISOWeek");var iye=kS;function TS(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(TS,"lastDayOfISOWeekYear");var uye=TS;function ES(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(ES,"lastDayOfQuarter");var mye=ES;function DS(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(DS,"lastDayOfYear");var xye=DS;var WP=/(\w)\1*|''|'(''|[^'])+('|$)|./g,qP=/^'([^]*?)'?$/,YP=/''/g,VP=/[a-zA-Z]/;function CS(t,e){let r=b(t);if(!ft(r))throw new RangeError("Invalid time value");let n=e.match(WP);return n?n.map(s=>{if(s==="''")return"'";let a=s[0];if(a==="'")return KP(s);let l=Zt[a];if(l)return l(r,s);if(a.match(VP))throw new RangeError("Format string contains an unescaped latin alphabet character `"+a+"`");return s}).join(""):""}o(CS,"lightFormat");function KP(t){let e=t.match(qP);return e?e[1].replace(YP,"'"):t}o(KP,"cleanEscapedString");var Tye=CS;function OS({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(OS,"milliseconds");var Oye=OS;function IS(t){let e=t/Jt;return Math.trunc(e)}o(IS,"millisecondsToHours");var Pye=IS;function MS(t){let e=t/gt;return Math.trunc(e)}o(MS,"millisecondsToMinutes");var Fye=MS;function NS(t){let e=t/is;return Math.trunc(e)}o(NS,"millisecondsToSeconds");var jye=NS;function PS(t){let e=t/xu;return Math.trunc(e)}o(PS,"minutesToHours");var Wye=PS;function LS(t){return Math.trunc(t*gt)}o(LS,"minutesToMilliseconds");var Kye=LS;function _S(t){return Math.trunc(t*ss)}o(_S,"minutesToSeconds");var Xye=_S;function RS(t){let e=t/bu;return Math.trunc(e)}o(RS,"monthsToQuarters");var rxe=RS;function FS(t){let e=t/wu;return Math.trunc(e)}o(FS,"monthsToYears");var sxe=FS;function bt(t,e,r){let n=e-ri(t,r);return n<=0&&(n+=7),et(t,n,r)}o(bt,"nextDay");var fxe=bt;function AS(t,e){return bt(t,5,e)}o(AS,"nextFriday");var dxe=AS;function $S(t,e){return bt(t,1,e)}o($S,"nextMonday");var bxe=$S;function BS(t,e){return bt(t,6,e)}o(BS,"nextSaturday");var kxe=BS;function jS(t,e){return bt(t,0,e)}o(jS,"nextSunday");var Cxe=jS;function US(t,e){return bt(t,4,e)}o(US,"nextThursday");var Nxe=US;function zS(t,e){return bt(t,2,e)}o(zS,"nextTuesday");var Rxe=zS;function HS(t,e){return bt(t,3,e)}o(HS,"nextWednesday");var Bxe=HS;function qS(t,e){let r=o(()=>$(e?.in,NaN),"invalidDate"),n=e?.additionalDigits??2,i=XP(t),s;if(i.date){let u=ZP(i.date,n);s=eL(u.restDateString,u.year)}if(!s||isNaN(+s))return r();let a=+s,l=0,c;if(i.time&&(l=tL(i.time),isNaN(l)))return r();if(i.timezone){if(c=rL(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(qS,"parseISO");var Jf={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},GP=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,QP=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,JP=/^([+-])(\d{2})(?::?(\d{2}))?$/;function XP(t){let e={},r=t.split(Jf.dateTimeDelimiter),n;if(r.length>2)return e;if(/:/.test(r[0])?n=r[0]:(e.date=r[0],n=r[1],Jf.timeZoneDelimiter.test(e.date)&&(e.date=t.split(Jf.timeZoneDelimiter)[0],n=t.substr(e.date.length,t.length))),n){let i=Jf.timezone.exec(n);i?(e.time=n.replace(i[1],""),e.timezone=i[1]):e.time=n}return e}o(XP,"splitDateString");function ZP(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(ZP,"parseYear");function eL(t,e){if(e===null)return new Date(NaN);let r=t.match(GP);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 aL(e,l,c)?nL(e,l,c):new Date(NaN);{let u=new Date(0);return!oL(e,s,a)||!sL(e,i)?new Date(NaN):(u.setUTCFullYear(e,s,Math.max(i,a)),u)}}o(eL,"parseDate");function Ja(t){return t?parseInt(t):1}o(Ja,"parseDateUnit");function tL(t){let e=t.match(QP);if(!e)return NaN;let r=hd(e[1]),n=hd(e[2]),i=hd(e[3]);return lL(r,n,i)?r*Jt+n*gt+i*1e3:NaN}o(tL,"parseTime");function hd(t){return t&&parseFloat(t.replace(",","."))||0}o(hd,"parseTimeUnit");function rL(t){if(t==="Z")return 0;let e=t.match(JP);if(!e)return 0;let r=e[1]==="+"?-1:1,n=parseInt(e[2]),i=e[3]&&parseInt(e[3])||0;return cL(n,i)?r*(n*Jt+i*gt):NaN}o(rL,"parseTimezone");function nL(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(nL,"dayOfISOWeekYear");var iL=[31,null,31,30,31,30,31,31,30,31,30,31];function WS(t){return t%400===0||t%4===0&&t%100!==0}o(WS,"isLeapYearIndex");function oL(t,e,r){return e>=0&&e<=11&&r>=1&&r<=(iL[e]||(WS(t)?29:28))}o(oL,"validateDate");function sL(t,e){return e>=1&&e<=(WS(t)?366:365)}o(sL,"validateDayOfYearDate");function aL(t,e,r){return e>=1&&e<=53&&r>=0&&r<=6}o(aL,"validateWeekDate");function lL(t,e,r){return t===24?e===0&&r===0:r>=0&&r<60&&e>=0&&e<60&&t>=0&&t<25}o(lL,"validateTime");function cL(t,e){return e>=0&&e<=59}o(cL,"validateTimezone");var qxe=qS;function YS(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(YS,"parseJSON");var Gxe=YS;function wt(t,e,r){let n=ri(t,r)-e;return n<=0&&(n+=7),ii(t,n,r)}o(wt,"previousDay");var ebe=wt;function VS(t,e){return wt(t,5,e)}o(VS,"previousFriday");var ibe=VS;function KS(t,e){return wt(t,1,e)}o(KS,"previousMonday");var lbe=KS;function GS(t,e){return wt(t,6,e)}o(GS,"previousSaturday");var pbe=GS;function QS(t,e){return wt(t,0,e)}o(QS,"previousSunday");var gbe=QS;function JS(t,e){return wt(t,4,e)}o(JS,"previousThursday");var wbe=JS;function XS(t,e){return wt(t,2,e)}o(XS,"previousTuesday");var Tbe=XS;function ZS(t,e){return wt(t,3,e)}o(ZS,"previousWednesday");var Obe=ZS;function ev(t){return Math.trunc(t*bu)}o(ev,"quartersToMonths");var Pbe=ev;function tv(t){let e=t/Su;return Math.trunc(e)}o(tv,"quartersToYears");var Fbe=tv;function rv(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=xt(c)(l/r)*r;return n.setHours(f,0,0,0),n}o(rv,"roundToNearestHours");var zbe=rv;function nv(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=xt(l)(a/r)*r;return n.setMinutes(u,0,0),n}o(nv,"roundToNearestMinutes");var Kbe=nv;function iv(t){let e=t/Wi;return Math.trunc(e)}o(iv,"secondsToHours");var Xbe=iv;function ov(t){return t*is}o(ov,"secondsToMilliseconds");var rwe=ov;function sv(t){let e=t/ss;return Math.trunc(e)}o(sv,"secondsToMinutes");var swe=sv;function Ts(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=Ku(a);return n.setMonth(e,Math.min(s,l)),n}o(Ts,"setMonth");var pwe=Ts;function av(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=Ts(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(av,"set");var xwe=av;function lv(t,e,r){let n=b(t,r?.in);return n.setDate(e),n}o(lv,"setDate");var vwe=lv;function cv(t,e,r){let n=b(t,r?.in);return n.setMonth(0),n.setDate(e),n}o(cv,"setDayOfYear");var Dwe=cv;function uv(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]);Lw(e)}o(uv,"setDefaultOptions");var Mwe=uv;function fv(t,e,r){let n=b(t,r?.in);return n.setHours(e),n}o(fv,"setHours");var _we=fv;function pv(t,e,r){let n=b(t,r?.in);return n.setMilliseconds(e),n}o(pv,"setMilliseconds");var $we=pv;function hv(t,e,r){let n=b(t,r?.in);return n.setMinutes(e),n}o(hv,"setMinutes");var zwe=hv;function mv(t,e,r){let n=b(t,r?.in),i=Math.trunc(n.getMonth()/3)+1,s=e-i;return Ts(n,n.getMonth()+s*3)}o(mv,"setQuarter");var Vwe=mv;function dv(t,e,r){let n=b(t,r?.in);return n.setSeconds(e),n}o(dv,"setSeconds");var Jwe=dv;function gv(t,e,r){let n=Oe(),i=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=ot(b(t,r?.in),Gi(t,r),r),a=$(r?.in||t,0);a.setFullYear(e,0,i),a.setHours(0,0,0,0);let l=Gi(a,r);return l.setDate(l.getDate()+s),l}o(gv,"setWeekYear");var o0e=gv;function yv(t,e,r){let n=b(t,r?.in);return isNaN(+n)?$(r?.in||t,NaN):(n.setFullYear(e),n)}o(yv,"setYear");var u0e=yv;function xv(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(xv,"startOfDecade");var m0e=xv;function bv(t){return rn(Date.now(),t)}o(bv,"startOfToday");var x0e=bv;function wv(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(wv,"startOfTomorrow");var k0e=wv;function Sv(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(Sv,"startOfYesterday");var C0e=Sv;function Xf(t,e,r){return en(t,-e,r)}o(Xf,"subMonths");var N0e=Xf;function vv(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=Xf(t,i+n*12,r),p=ii(f,a+s*7,r),h=c+l*60,d=(u+h*60)*1e3;return $(r?.in||t,+p-d)}o(vv,"sub");var A0e=vv;function kv(t,e,r){return Tu(t,-e,r)}o(kv,"subBusinessDays");var U0e=kv;function Tv(t,e,r){return Eu(t,-e,r)}o(Tv,"subHours");var q0e=Tv;function Ev(t,e,r){return Gn(t,-e,r)}o(Ev,"subMilliseconds");var G0e=Ev;function Dv(t,e,r){return as(t,-e,r)}o(Dv,"subMinutes");var Z0e=Dv;function Cv(t,e,r){return ls(t,-e,r)}o(Cv,"subQuarters");var nSe=Cv;function Ov(t,e,r){return Ou(t,-e,r)}o(Ov,"subSeconds");var aSe=Ov;function Iv(t,e,r){return Qn(t,-e,r)}o(Iv,"subWeeks");var fSe=Iv;function Mv(t,e,r){return Iu(t,-e,r)}o(Mv,"subYears");var dSe=Mv;function Nv(t){return Math.trunc(t*7)}o(Nv,"weeksToDays");var bSe=Nv;function Pv(t){return Math.trunc(t*365.2425)}o(Pv,"yearsToDays");var kSe=Pv;function Lv(t){return Math.trunc(t*wu)}o(Lv,"yearsToMonths");var CSe=Lv;function _v(t){return Math.trunc(t*Su)}o(_v,"yearsToQuarters");var NSe=_v;var Av=o(t=>Number.isFinite(t)?t:0,"toZeroIfInfinity");function uL(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(Av(t*1e3)%1e3),nanoseconds:Math.trunc(Av(t*1e6)%1e3)}}o(uL,"parseNumber");function fL(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(fL,"parseBigint");function xd(t){switch(typeof t){case"number":{if(Number.isFinite(t))return uL(t);break}case"bigint":return fL(t)}throw new TypeError("Expected a finite number or bigint")}o(xd,"parseMilliseconds");var pL=o(t=>t===0||t===0n,"isZero"),hL=o((t,e)=>e===1||e===1n?t:`${t}s`,"pluralize"),mL=1e-7,dL=24n*60n*60n*1000n;function Za(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+mL);return(Math.round(h)/10**p).toFixed(p)},"floorDecimals"),a=o((f,p,h,m)=>{if(!((i.length===0||!e.colonNotation)&&pL(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?" "+hL(p,f):h;i.push(m)}},"add"),l=xd(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%dL):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(Za,"prettyMilliseconds");var Ji=Wn(Rv(),1),$v=Wn(Fv(),1);Ji.default.extend($v.default);var el=class{static{o(this,"CronJob")}constructor(e,r,n){this.status="initial",this.nextExecutionUnix=0,this.cronExpression=r,this.jobFunction=n,this.cronParser=new za.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()??1/0}start(){this.status="started"}stop(){this.status="stopped"}};var tl=class{static{o(this,"CronJobCollection")}constructor(){this.cronJobSet=new Set}add(e){this.cronJobSet.add(e)}remove(e){this.cronJobSet.delete(e)}getArray(){return[...this.cronJobSet]}isEmpty(){return this.cronJobSet.size===0}get length(){return this.cronJobSet.size}[Symbol.iterator](){return this.cronJobSet.values()}};var bd=class{static{o(this,"CronManager")}constructor(){this.executionTimeout=null,this.status="stopped",this.cronjobs=new tl,this.cycleWakeDeferred=null,this.cycleGeneration=0}wakeCycle(){this.cycleWakeDeferred&&this.cycleWakeDeferred.status==="pending"&&this.cycleWakeDeferred.resolve()}addCronjob(e,r){let n=new el(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.cycleGeneration++,this.runCronCycle(this.cycleGeneration)}}isCurrentCycle(e){return this.status==="started"&&this.cycleGeneration===e}async runCronCycle(e){for(;this.isCurrentCycle(e);){let r=new Q.Deferred;this.cycleWakeDeferred=r;let n=1/0;for(let i of this.cronjobs.getArray()){i.checkExecution();let s=i.getTimeToNextExecution();s<n&&(n=s)}if(n<1/0&&n>0){let i=new Q.Timeout(n);this.executionTimeout=i,await Promise.race([i.promise,r.promise]),i.cancel()}else{if(n<=0)continue;await r.promise}}this.cycleGeneration===e&&(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 oi={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")},wd=o(t=>{let e=0,r=o(n=>{e=e+n},"addMilliSeconds");return t.years&&r(oi.years(t.years)),t.months&&r(oi.months(t.months)),t.weeks&&r(oi.weeks(t.weeks)),t.days&&r(oi.days(t.days)),t.hours&&r(oi.hours(t.hours)),t.minutes&&r(oi.minutes(t.minutes)),t.seconds&&r(oi.seconds(t.seconds)),e},"getMilliSecondsFromUnits"),gL=o(t=>Za(t),"getMilliSecondsAsHumanReadableString"),yL=o(t=>Xa.formatDistanceToNow(new Date(t)),"getMilliSecondsAsHumanReadableAgoTime");var Sd=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=t.parseEuropeanDate(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=t.parseEuropeanDate(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)}static parseEuropeanDate(e){let r=/(.*)\.(.*)\.(.*)/.exec(e);if(!r)throw new Error(`"${e}" is not a European date like "28.03.2018"`);return r}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=wd(e);return Date.now()-this.getTime()<r}moreTimePassedToNow(e){return!this.lessTimePassedToNow(e)}};var vd=class{static{o(this,"HrtMeasurement")}constructor(){this.nanoSeconds=null,this.milliSeconds=null,this._milliStart=null,this._milliDiff=null}start(){this._milliStart=performance.now()}stop(){return this._milliStart===null?(console.log("Hasn't started yet"),this):(this._milliDiff=performance.now()-this._milliStart,this.nanoSeconds=this._milliDiff*1e6,this.milliSeconds=this._milliDiff,this)}reset(){this.nanoSeconds=null,this.milliSeconds=null,this._milliStart=null,this._milliDiff=null}};var kd=class{static{o(this,"Interval")}constructor(e){this.status="initial",this.currentRun=null,this.intervalJobs=[],this.intervalMilliseconds=e}start(){this.endCurrentRun(),this.status="started";let e={timeout:null,stopped:Q.defer()};this.currentRun=e,o(async()=>{for(;this.currentRun===e&&(e.timeout=new Q.Timeout(this.intervalMilliseconds),await Promise.race([e.timeout.promise,e.stopped.promise]),this.currentRun===e);)this.executeIntervalJobs()},"runInterval")()}stop(){this.status="stopped",this.endCurrentRun()}addIntervalJob(e){this.intervalJobs.push(e)}endCurrentRun(){let e=this.currentRun;e&&(this.currentRun=null,e.timeout?.cancel(),e.stopped.resolve())}executeIntervalJobs(){for(let e of this.intervalJobs)e()}};var Ds=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,this.date=e?new Date(e):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 Td=class{static{o(this,"Timer")}get timeLeft(){let e=this.pausedAt?.change;if(e==null)throw new Error("timer has NOT been paused before. timeLeft is known after .pause()");return this.timeInMilliseconds-e}constructor(e){this.state="initiated",this.startedAt=null,this.pausedAt=null,this.currentTimeout=null,this.completedDeferred=Q.defer(),this.timeInMilliseconds=e,this.completed=this.completedDeferred.promise}start(){if(!this.startedAt)this.startTimeout(this.timeInMilliseconds),this.startedAt=new Ds;else throw new Error("timer has been started before. Please use resume instead")}pause(){this.startedAt&&(this.currentTimeout?.cancel(),this.currentTimeout=null,this.pausedAt=Ds.fromTimeStamp(this.startedAt))}resume(){if(this.startedAt)this.startTimeout(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}startTimeout(e){this.currentTimeout?.cancel();let r=new Q.Timeout(e);this.currentTimeout=r,r.promise.then(()=>{this.completedDeferred.resolve()})}};var ep=Wn(Gv(),1);var Dd=class{static{o(this,"AsyncExecutionStack")}executionSlots=[];isProcessing=!1;nonExclusiveMaxConcurrency=1/0;nonExclusiveCurrentCount=0;nonExclusivePendingQueue=[];async getExclusiveExecutionSlot(e,r){let n=Q.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=Q.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 Q.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 Q.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 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 Zi=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 Qv=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"),kn=class t{static{o(this,"ObjectMap")}fastMap=new Zi;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=Qv("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 rl=class{static{o(this,"Interest")}options;interestMapRef;originalInterest;comparisonFunc;destructionTimer=new Xi.Timer(1e4);isFullfilled=!1;isDestroyed=!1;fullfillmentStore=[];markLostTimeout=null;get comparisonString(){return this.comparisonFunc(this.originalInterest)}interestDeferred=new Q.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 Q.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 Od=class{static{o(this,"InterestMap")}options;interestObjectMap=new kn;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 rl(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 Id=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 Md=class{static{o(this,"LoopTracker")}referenceObjectMap=new kn;constructor(){}checkAndTrack(e){return this.referenceObjectMap.checkForObject(e)?!1:(this.referenceObjectMap.add(e),!0)}reset(){this.referenceObjectMap.wipe()}destroy(){this.referenceObjectMap.destroy()}};var nl=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 Ma.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=Q.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 il=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 Xi.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 Nd=class{static{o(this,"Tree")}symbolTree;constructor(){this.symbolTree=new ep.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 eo={};se(eo,{base64ToUint8Array:()=>zL,ensurePureUint8Array:()=>qL,isBufferLike:()=>WL,isUint8Array:()=>HL,uInt8ArrayExtras:()=>jL,uInt8ArrayToBase64:()=>UL});var ui={};se(ui,{areUint8ArraysEqual:()=>CL,assertUint8Array:()=>ci,assertUint8ArrayOrArrayBuffer:()=>tk,base64ToString:()=>LL,base64ToUint8Array:()=>ok,compareUint8Arrays:()=>OL,concatUint8Arrays:()=>DL,getUintBE:()=>AL,hexToUint8Array:()=>FL,includes:()=>$L,indexOf:()=>sk,isUint8Array:()=>Pd,stringToBase64:()=>PL,stringToUint8Array:()=>nk,toUint8Array:()=>EL,uint8ArrayToBase64:()=>ik,uint8ArrayToHex:()=>RL,uint8ArrayToString:()=>rk});var wL=Object.prototype.toString,SL="[object Uint8Array]",vL="[object ArrayBuffer]";function Jv(t,e,r){return t?t.constructor===e?!0:wL.call(t)===r:!1}o(Jv,"isType");function Pd(t){return Jv(t,Uint8Array,SL)}o(Pd,"isUint8Array");function kL(t){return Jv(t,ArrayBuffer,vL)}o(kL,"isArrayBuffer");function TL(t){return Pd(t)||kL(t)}o(TL,"isUint8ArrayOrArrayBuffer");function ci(t){if(!Pd(t))throw new TypeError(`Expected \`Uint8Array\`, got \`${typeof t}\``)}o(ci,"assertUint8Array");function tk(t){if(!TL(t))throw new TypeError(`Expected \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof t}\``)}o(tk,"assertUint8ArrayOrArrayBuffer");function EL(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(EL,"toUint8Array");function DL(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)ci(i),r.set(i,n),n+=i.length;return r}o(DL,"concatUint8Arrays");function CL(t,e){if(ci(t),ci(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(CL,"areUint8ArraysEqual");function OL(t,e){ci(t),ci(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(OL,"compareUint8Arrays");var Xv={utf8:new globalThis.TextDecoder("utf8")};function rk(t,e="utf8"){return tk(t),Xv[e]??=new globalThis.TextDecoder(e),Xv[e].decode(t)}o(rk,"uint8ArrayToString");function ol(t){if(typeof t!="string")throw new TypeError(`Expected \`string\`, got \`${typeof t}\``)}o(ol,"assertString");var IL=new globalThis.TextEncoder;function nk(t){return ol(t),IL.encode(t)}o(nk,"stringToUint8Array");function ML(t){return t.replaceAll("+","-").replaceAll("/","_").replace(/=+$/,"")}o(ML,"base64ToBase64Url");function NL(t){let e=t.replaceAll("-","+").replaceAll("_","/"),r=(4-e.length%4)%4;return e+"=".repeat(r)}o(NL,"base64UrlToBase64");var Zv=65535;function ik(t,{urlSafe:e=!1}={}){ci(t);let r="";for(let n=0;n<t.length;n+=Zv){let i=t.subarray(n,n+Zv);r+=globalThis.btoa(String.fromCodePoint.apply(void 0,i))}return e?ML(r):r}o(ik,"uint8ArrayToBase64");function ok(t){return ol(t),Uint8Array.from(globalThis.atob(NL(t)),e=>e.codePointAt(0))}o(ok,"base64ToUint8Array");function PL(t,{urlSafe:e=!1}={}){return ol(t),ik(nk(t),{urlSafe:e})}o(PL,"stringToBase64");function LL(t){return ol(t),rk(ok(t))}o(LL,"base64ToString");var _L=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function RL(t){ci(t);let e="";for(let r=0;r<t.length;r++)e+=_L[t[r]];return e}o(RL,"uint8ArrayToHex");var ek={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 FL(t){if(ol(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=ek[t[n*2]],s=ek[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(FL,"hexToUint8Array");function AL(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(AL,"getUintBE");function sk(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(sk,"indexOf");function $L(t,e){return sk(t,e)!==-1}o($L,"includes");var jL=ui;function UL(t){return ui.uint8ArrayToBase64(t)}o(UL,"uInt8ArrayToBase64");function zL(t){return ui.base64ToUint8Array(t)}o(zL,"base64ToUint8Array");var HL=o(t=>ui.isUint8Array(t),"isUint8Array");function WL(t){return t&&typeof t.byteLength=="number"?!0:typeof Buffer<"u"&&Buffer.isBuffer?Buffer.isBuffer(t):!1}o(WL,"isBufferLike");function qL(t){let e=new Uint8Array(t.length);return e.set(t),e}o(qL,"ensurePureUint8Array");var cl={};se(cl,{Guard:()=>sl,GuardError:()=>al,GuardSet:()=>ll,passGuardsOrReject:()=>YL});var sl=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 al=class extends Error{static{o(this,"GuardError")}constructor(e){super(e),this.name="GuardError"}};var ll=class extends sl{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 YL=o(async(t,e)=>{let r=new ll(e);if(!await r.allGuardsPass(t)){let i=await r.getFailedHint(t);throw new al(`Guards failed:
3
+ `):"",this.name="UnsubscriptionError",this.errors=r},"UnsubscriptionErrorImpl")});function Or(t,e){if(t){var r=t.indexOf(e);0<=r&&t.splice(r,1)}}o(Or,"arrRemove");var At=(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=dt(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 _a?g.errors:[g]}var p=this._finalizers;if(p){this._finalizers=null;try{for(var h=dt(p),m=h.next();!m.done;m=h.next()){var d=m.value;try{ow(d)}catch(g){s=s??[],g instanceof _a?s=Ft(Ft([],ct(s)),ct(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 _a(s)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)ow(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)&&Or(r,e)},t.prototype.remove=function(e){var r=this._finalizers;r&&Or(r,e),e instanceof t&&e._removeParent(this)},t.EMPTY=(function(){var e=new t;return e.closed=!0,e})(),t})(),Hm=At.EMPTY;function Uc(t){return t instanceof At||t&&"closed"in t&&pe(t.remove)&&pe(t.add)&&pe(t.unsubscribe)}o(Uc,"isSubscription");function ow(t){pe(t)?t():t.unsubscribe()}o(ow,"execFinalizer");var cr={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var Ko={setTimeout:o(function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=Ko.delegate;return i?.setTimeout?i.setTimeout.apply(i,Ft([t,e],ct(r))):setTimeout.apply(void 0,Ft([t,e],ct(r)))},"setTimeout"),clearTimeout:o(function(t){var e=Ko.delegate;return(e?.clearTimeout||clearTimeout)(t)},"clearTimeout"),delegate:void 0};function zc(t){Ko.setTimeout(function(){var e=cr.onUnhandledError;if(e)e(t);else throw t})}o(zc,"reportUnhandledError");function Vr(){}o(Vr,"noop");var sw=(function(){return Wm("C",void 0,void 0)})();function aw(t){return Wm("E",void 0,t)}o(aw,"errorNotification");function lw(t){return Wm("N",t,void 0)}o(lw,"nextNotification");function Wm(t,e,r){return{kind:t,value:e,error:r}}o(Wm,"createNotification");var ji=null;function Go(t){if(cr.useDeprecatedSynchronousErrorHandling){var e=!ji;if(e&&(ji={errorThrown:!1,error:null}),t(),e){var r=ji,n=r.errorThrown,i=r.error;if(ji=null,n)throw i}}else t()}o(Go,"errorContext");function cw(t){cr.useDeprecatedSynchronousErrorHandling&&ji&&(ji.errorThrown=!0,ji.error=t)}o(cw,"captureError");var Ui=(function(t){Xe(e,t);function e(r){var n=t.call(this)||this;return n.isStopped=!1,r?(n.destination=r,Uc(r)&&r.add(n)):n.destination=_I,n}return o(e,"Subscriber"),e.create=function(r,n,i){return new Vn(r,n,i)},e.prototype.next=function(r){this.isStopped?Ym(lw(r),this):this._next(r)},e.prototype.error=function(r){this.isStopped?Ym(aw(r),this):(this.isStopped=!0,this._error(r))},e.prototype.complete=function(){this.isStopped?Ym(sw,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})(At),NI=Function.prototype.bind;function qm(t,e){return NI.call(t,e)}o(qm,"bind");var PI=(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){Hc(n)}},t.prototype.error=function(e){var r=this.partialObserver;if(r.error)try{r.error(e)}catch(n){Hc(n)}else Hc(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(r){Hc(r)}},t})(),Vn=(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&&cr.useDeprecatedNextContext?(l=Object.create(r),l.unsubscribe=function(){return s.unsubscribe()},a={next:r.next&&qm(r.next,l),error:r.error&&qm(r.error,l),complete:r.complete&&qm(r.complete,l)}):a=r}return s.destination=new PI(a),s}return o(e,"SafeSubscriber"),e})(Ui);function Hc(t){cr.useDeprecatedSynchronousErrorHandling?cw(t):zc(t)}o(Hc,"handleUnhandledError");function LI(t){throw t}o(LI,"defaultErrorHandler");function Ym(t,e){var r=cr.onStoppedNotification;r&&Ko.setTimeout(function(){return r(t,e)})}o(Ym,"handleStoppedNotification");var _I={closed:!0,next:Vr,error:LI,complete:Vr};var zi=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function Kr(t){return t}o(Kr,"identity");function RI(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Vm(t)}o(RI,"pipe");function Vm(t){return t.length===0?Kr:t.length===1?t[0]:o(function(r){return t.reduce(function(n,i){return i(n)},r)},"piped")}o(Vm,"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=AI(e)?e:new Vn(e,r,n);return Go(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=uw(r),new r(function(i,s){var a=new Vn({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[zi]=function(){return this},t.prototype.pipe=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return Vm(e)(this)},t.prototype.toPromise=function(e){var r=this;return e=uw(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 uw(t){var e;return(e=t??cr.Promise)!==null&&e!==void 0?e:Promise}o(uw,"getPromiseCtor");function FI(t){return t&&pe(t.next)&&pe(t.error)&&pe(t.complete)}o(FI,"isObserver");function AI(t){return t&&t instanceof Ui||FI(t)&&Uc(t)}o(AI,"isSubscriber");function $I(t){return pe(t?.lift)}o($I,"hasLift");function De(t){return function(e){if($I(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 fw(t,e,r,n,i)}o(Ce,"createOperatorSubscriber");var fw=(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})(Ui);var Km=jc(function(t){return o(function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"},"ObjectUnsubscribedErrorImpl")});var $t=(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 Gm(this,this);return n.operator=r,n},e.prototype._throwIfClosed=function(){if(this.closed)throw new Km},e.prototype.next=function(r){var n=this;Go(function(){var i,s;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var a=dt(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;Go(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;Go(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?Hm:(this.currentObservers=null,l.push(r),new At(function(){n.currentObservers=null,Or(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 Gm(r,n)},e})(we),Gm=(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:Hm},e})($t);var Qo=(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})($t);var Ra={now:o(function(){return(Ra.delegate||Date).now()},"now"),delegate:void 0};var Jo=(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=Ra);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})($t);var Qm=(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})(At);var Fa={setInterval:o(function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=Fa.delegate;return i?.setInterval?i.setInterval.apply(i,Ft([t,e],ct(r))):setInterval.apply(void 0,Ft([t,e],ct(r)))},"setInterval"),clearInterval:o(function(t){var e=Fa.delegate;return(e?.clearInterval||clearInterval)(t)},"clearInterval"),delegate:void 0};var Jm=(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),Fa.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&&Fa.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,Or(s,this),n!=null&&(this.id=this.recycleAsyncId(i,n,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e})(Qm);var Aa=(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=Ra.now,t})();var Xm=(function(t){Xe(e,t);function e(r,n){n===void 0&&(n=Aa.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})(Aa);var Gr=new Xm(Jm),Zm=Gr;function Wc(t){return t&&pe(t.schedule)}o(Wc,"isScheduler");function ed(t){return t[t.length-1]}o(ed,"last");function pw(t){return pe(ed(t))?t.pop():void 0}o(pw,"popResultSelector");function Qr(t){return Wc(ed(t))?t.pop():void 0}o(Qr,"popScheduler");function MH(t,e){return typeof ed(t)=="number"?t.pop():e}o(MH,"popNumber");var Xo=o((function(t){return t&&typeof t.length=="number"&&typeof t!="function"}),"isArrayLike");function qc(t){return pe(t?.then)}o(qc,"isPromise");function Yc(t){return pe(t[zi])}o(Yc,"isInteropObservable");function Vc(t){return Symbol.asyncIterator&&pe(t?.[Symbol.asyncIterator])}o(Vc,"isAsyncIterable");function Kc(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(Kc,"createInvalidObservableTypeError");function BI(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}o(BI,"getSymbolIterator");var Gc=BI();function Qc(t){return pe(t?.[Gc])}o(Qc,"isIterable");function Jc(t){return Um(this,arguments,o(function(){var r,n,i,s;return La(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,kn(r.read())];case 3:return n=a.sent(),i=n.value,s=n.done,s?[4,kn(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,kn(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 Xc(t){return pe(t?.getReader)}o(Xc,"isReadableStreamLike");function Be(t){if(t instanceof we)return t;if(t!=null){if(Yc(t))return jI(t);if(Xo(t))return UI(t);if(qc(t))return zI(t);if(Vc(t))return hw(t);if(Qc(t))return HI(t);if(Xc(t))return WI(t)}throw Kc(t)}o(Be,"innerFrom");function jI(t){return new we(function(e){var r=t[zi]();if(pe(r.subscribe))return r.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}o(jI,"fromInteropObservable");function UI(t){return new we(function(e){for(var r=0;r<t.length&&!e.closed;r++)e.next(t[r]);e.complete()})}o(UI,"fromArrayLike");function zI(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,zc)})}o(zI,"fromPromise");function HI(t){return new we(function(e){var r,n;try{for(var i=dt(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(HI,"fromIterable");function hw(t){return new we(function(e){qI(t,e).catch(function(r){return e.error(r)})})}o(hw,"fromAsyncIterable");function WI(t){return hw(Jc(t))}o(WI,"fromReadableStreamLike");function qI(t,e){var r,n,i,s;return jm(this,void 0,void 0,function(){var a,l;return La(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),r=zm(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(qI,"process");function ut(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(ut,"executeSchedule");function Zo(t,e){return e===void 0&&(e=0),De(function(r,n){r.subscribe(Ce(n,function(i){return ut(n,t,function(){return n.next(i)},e)},function(){return ut(n,t,function(){return n.complete()},e)},function(i){return ut(n,t,function(){return n.error(i)},e)}))})}o(Zo,"observeOn");function es(t,e){return e===void 0&&(e=0),De(function(r,n){n.add(t.schedule(function(){return r.subscribe(n)},e))})}o(es,"subscribeOn");function mw(t,e){return Be(t).pipe(es(e),Zo(e))}o(mw,"scheduleObservable");function dw(t,e){return Be(t).pipe(es(e),Zo(e))}o(dw,"schedulePromise");function gw(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(gw,"scheduleArray");function yw(t,e){return new we(function(r){var n;return ut(r,e,function(){n=t[Gc](),ut(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(yw,"scheduleIterable");function Zc(t,e){if(!t)throw new Error("Iterable cannot be null");return new we(function(r){ut(r,e,function(){var n=t[Symbol.asyncIterator]();ut(r,e,function(){n.next().then(function(i){i.done?r.complete():r.next(i.value)})},0,!0)})})}o(Zc,"scheduleAsyncIterable");function xw(t,e){return Zc(Jc(t),e)}o(xw,"scheduleReadableStreamLike");function td(t,e){if(t!=null){if(Yc(t))return mw(t,e);if(Xo(t))return gw(t,e);if(qc(t))return dw(t,e);if(Vc(t))return Zc(t,e);if(Qc(t))return yw(t,e);if(Xc(t))return xw(t,e)}throw Kc(t)}o(td,"scheduled");function Jr(t,e){return e?td(t,e):Be(t)}o(Jr,"from");function $a(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=Qr(t);return Jr(t,r)}o($a,"of");function bw(t){return t instanceof Date&&!isNaN(t)}o(bw,"isValidDate");function Xr(t,e){return De(function(r,n){var i=0;r.subscribe(Ce(n,function(s){n.next(t.call(e,s,i++))}))})}o(Xr,"map");var YI=Array.isArray;function VI(t,e){return YI(e)?t.apply(void 0,Ft([],ct(e))):t(e)}o(VI,"callOrApply");function eu(t){return Xr(function(e){return VI(t,e)})}o(eu,"mapOneOrManyArgs");var KI=Array.isArray,GI=Object.getPrototypeOf,QI=Object.prototype,JI=Object.keys;function ww(t){if(t.length===1){var e=t[0];if(KI(e))return{args:e,keys:null};if(XI(e)){var r=JI(e);return{args:r.map(function(n){return e[n]}),keys:r}}}return{args:t,keys:null}}o(ww,"argsArgArrayOrObject");function XI(t){return t&&typeof t=="object"&&GI(t)===QI}o(XI,"isPOJO");function Sw(t,e){return t.reduce(function(r,n,i){return r[n]=e[i],r},{})}o(Sw,"createObject");function rd(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=Qr(t),n=pw(t),i=ww(t),s=i.args,a=i.keys;if(s.length===0)return Jr([],r);var l=new we(ZI(s,r,a?function(c){return Sw(a,c)}:Kr));return n?l.pipe(eu(n)):l}o(rd,"combineLatest");function ZI(t,e,r){return r===void 0&&(r=Kr),function(n){vw(e,function(){for(var i=t.length,s=new Array(i),a=i,l=i,c=o(function(f){vw(e,function(){var p=Jr(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(ZI,"combineLatestInit");function vw(t,e,r){t?ut(r,t,e):e()}o(vw,"maybeSchedule");function kw(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;Be(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?ut(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(kw,"mergeInternals");function Hi(t,e,r){return r===void 0&&(r=1/0),pe(e)?Hi(function(n,i){return Xr(function(s,a){return e(n,s,i,a)})(Be(t(n,i)))},r):(typeof e=="number"&&(r=e),De(function(n,i){return kw(n,i,t,r)}))}o(Hi,"mergeMap");function tu(t){return t===void 0&&(t=1/0),Hi(Kr,t)}o(tu,"mergeAll");function ru(){return tu(1)}o(ru,"concatAll");function nu(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return ru()(Jr(t,Qr(t)))}o(nu,"concat");var eM=["addListener","removeListener"],tM=["addEventListener","removeEventListener"],rM=["on","off"];function Wi(t,e,r,n){if(pe(r)&&(n=r,r=void 0),n)return Wi(t,e,r).pipe(eu(n));var i=ct(oM(t)?tM.map(function(l){return function(c){return t[l](e,c,r)}}):nM(t)?eM.map(Tw(t,e)):iM(t)?rM.map(Tw(t,e)):[],2),s=i[0],a=i[1];if(!s&&Xo(t))return Hi(function(l){return Wi(l,e,r)})(Be(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(Wi,"fromEvent");function Tw(t,e){return function(r){return function(n){return t[r](e,n)}}}o(Tw,"toCommonHandlerRegistry");function nM(t){return pe(t.addListener)&&pe(t.removeListener)}o(nM,"isNodeStyleEventEmitter");function iM(t){return pe(t.on)&&pe(t.off)}o(iM,"isJQueryStyleEventEmitter");function oM(t){return pe(t.addEventListener)&&pe(t.removeEventListener)}o(oM,"isEventTarget");function Ba(t,e,r){t===void 0&&(t=0),r===void 0&&(r=Zm);var n=-1;return e!=null&&(Wc(e)?r=e:n=e),new we(function(i){var s=bw(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(Ba,"timer");function nd(t,e){return t===void 0&&(t=0),e===void 0&&(e=Gr),t<0&&(t=0),Ba(t,t,e)}o(nd,"interval");function iu(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(iu,"filter");function ou(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()})),Be(t).subscribe(Ce(r,function(){var i=n;n=[],r.next(i)},Vr)),function(){n=null}})}o(ou,"buffer");function su(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=dt(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=dt(p),y=g.next();!y.done;y=g.next()){var d=y.value;Or(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=dt(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(su,"bufferCount");function au(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:Gr,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(),Or(f,g),u.next(y),p&&m()},"emit"),m=o(function(){if(f){var g=new At;u.add(g);var y=[],x={buffer:y,subs:g};f.push(x),ut(g,s,function(){return h(x)},t)}},"startBuffer");a!==null&&a>=0?ut(u,s,m,a,!0):p=!0,m();var d=Ce(u,function(g){var y,x,T=f.slice();try{for(var E=dt(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(A){y={error:A}}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(au,"bufferTime");function lu(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,Vr),Be(t(l)).subscribe(s)},function(){a(),r.complete()},void 0,function(){i=s=null}))})}o(lu,"debounce");function cu(t,e){return e===void 0&&(e=Gr),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(cu,"debounceTime");function ts(t,e){return e===void 0&&(e=Kr),t=t??sM,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(ts,"distinctUntilChanged");function sM(t,e){return t===e}o(sM,"defaultCompare");function uu(t){t===void 0&&(t={});var e=t.connector,r=e===void 0?function(){return new $t}: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=id(T,c))}),P.subscribe(L),!f&&m>0&&(f=new Vn({next:o(function(D){return P.next(D)},"next"),error:o(function(D){g=!0,y(),p=id(x,i,D),P.error(D)},"error"),complete:o(function(){d=!0,y(),p=id(x,a),P.complete()},"complete")}),Be(E).subscribe(f))})(u)}}o(uu,"share");function id(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 Vn({next:o(function(){i.unsubscribe(),t()},"next")});return Be(e.apply(void 0,Ft([],ct(r)))).subscribe(i)}}o(id,"handleReset");function fu(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,uu({connector:o(function(){return new Jo(a,e,r)},"connector"),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:l})}o(fu,"shareReplay");function pu(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=Qr(t);return De(function(n,i){(r?nu(t,n,r):nu(t,n)).subscribe(i)})}o(pu,"startWith");function rs(t){return De(function(e,r){Be(t).subscribe(Ce(r,function(){return r.complete()},Vr)),!r.closed&&e.subscribe(r)})}o(rs,"takeUntil");function hu(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=Be(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(hu,"throttle");function mu(t,e,r){e===void 0&&(e=Gr);var n=Ba(t,e);return hu(function(){return n},r)}o(mu,"throttleTime");var jN={buffer:ou,bufferCount:su,bufferTime:au,debounce:lu,debounceTime:cu,filter:iu,map:Xr,startWith:pu,takeUntil:rs,throttleTime:mu};var od=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=Wi(e,r),s=new $t;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 $t,eventRef:e,event:r};return this.observableEventTargetBundleArray.push(s),s.subject}}};var sd=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=Q.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 UN(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(UN,"fromStreamWithBackpressure");var Zi={};se(Zi,{CronJob:()=>tl,CronJobCollection:()=>rl,CronManager:()=>wd,ExtendedDate:()=>vd,HrtMeasurement:()=>kd,Interval:()=>Td,TimeStamp:()=>Cs,Timer:()=>Ed,getMilliSecondsAsHumanReadableAgoTime:()=>xL,getMilliSecondsAsHumanReadableString:()=>yL,getMilliSecondsFromUnits:()=>Sd,units:()=>si});var Ha={};se(Ha,{Cron:()=>Mw,CronDate:()=>Ze,CronPattern:()=>du,scheduledJobs:()=>is});function ja(t){return Date.UTC(t.y,t.m-1,t.d,t.h,t.i,t.s)}o(ja,"T");function ad(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(ad,"D");function zN(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("-")?ld(r.getUTCFullYear(),r.getUTCMonth()+1,r.getUTCDate(),r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),"Etc/UTC"):ld(r.getFullYear(),r.getMonth()+1,r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),e)}o(zN,"A");function Ew(t,e,r){return Dw(zN(t,e),r)}o(Ew,"v");function Dw(t,e){let r=new Date(ja(t)),n=Ua(r,t.tz),i=ja(t),s=ja(n),a=i-s,l=new Date(r.getTime()+a),c=Ua(l,t.tz);if(ad(c,t)){let p=new Date(l.getTime()-36e5),h=Ua(p,t.tz);return ad(h,t)?p:l}let u=new Date(l.getTime()+ja(t)-ja(c)),f=Ua(u,t.tz);if(ad(f,t))return u;if(e)throw new Error("Invalid date passed to fromTZ()");return l.getTime()>u.getTime()?l:u}o(Dw,"k");function Ua(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(Ua,"g");function ld(t,e,r,n,i,s,a){return{y:t,m:e,d:r,h:n,i,s,tz:a}}o(ld,"b");var Cw=[1,2,4,8,16],du=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]|Cw[e-1];else throw new TypeError(`CronPattern: nth weekday out of range, should be 1-5 or L. Value: ${e}, Type: ${typeof e}`)}},cd=[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 Iw{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 Iw)this.fromCronDate(e);else throw new TypeError("CronDate: Invalid type ("+typeof e+") passed to CronDate constructor")}getLastDayOfMonth(e,r){return r!==1?cd[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&&Cw[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=Ua(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>cd[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=Ew(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(Ew(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?cd[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)):Dw(ld(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 HN(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(HN,"R");function za(t){return Object.prototype.toString.call(t)==="[object Function]"||typeof t=="function"||t instanceof Function}o(za,"p");function WN(t){return za(t)}o(WN,"_");function qN(t){typeof Deno<"u"&&typeof Deno.unrefTimer<"u"?Deno.unrefTimer(t):t&&typeof t.unref<"u"&&t.unref()}o(qN,"x");var Ow=30*1e3,is=[],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(za(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(za(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=HN(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 du("* * * * *",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 du(t,this.options.timezone,{mode:this.options.mode,alternativeWeekdays:this.options.alternativeWeekdays,sloppyRanges:this.options.sloppyRanges}),this.name){if(is.find(s=>s.name===this.name))throw new Error("Cron: Tried to initialize new named job '"+this.name+"', but name already taken.");is.push(this)}return i!==void 0&&WN(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=is.indexOf(this);t>=0&&is.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&&qN(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(za(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&&za(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:()=>Gn,addBusinessDays:()=>Eu,addDays:()=>et,addHours:()=>Du,addISOWeekYears:()=>Ou,addMilliseconds:()=>Qn,addMinutes:()=>ls,addMonths:()=>en,addQuarters:()=>cs,addSeconds:()=>Iu,addWeeks:()=>Jn,addYears:()=>Mu,areIntervalsOverlapping:()=>Rw,clamp:()=>Fw,closestIndexTo:()=>Lu,closestTo:()=>Aw,compareAsc:()=>yt,compareDesc:()=>$w,constructFrom:()=>$,constructNow:()=>de,daysToWeeks:()=>Bw,differenceInBusinessDays:()=>jw,differenceInCalendarDays:()=>ot,differenceInCalendarISOWeekYears:()=>Ru,differenceInCalendarISOWeeks:()=>Uw,differenceInCalendarMonths:()=>Yi,differenceInCalendarQuarters:()=>us,differenceInCalendarWeeks:()=>Vi,differenceInCalendarYears:()=>Xn,differenceInDays:()=>fs,differenceInHours:()=>Ki,differenceInISOWeekYears:()=>Hw,differenceInMilliseconds:()=>ps,differenceInMinutes:()=>Gi,differenceInMonths:()=>Zn,differenceInQuarters:()=>Ww,differenceInSeconds:()=>on,differenceInWeeks:()=>qw,differenceInYears:()=>$u,eachDayOfInterval:()=>Bu,eachHourOfInterval:()=>Yw,eachMinuteOfInterval:()=>Vw,eachMonthOfInterval:()=>Kw,eachQuarterOfInterval:()=>Gw,eachWeekOfInterval:()=>Qw,eachWeekendOfInterval:()=>ds,eachWeekendOfMonth:()=>Jw,eachWeekendOfYear:()=>Xw,eachYearOfInterval:()=>Zw,endOfDay:()=>hs,endOfDecade:()=>e0,endOfHour:()=>t0,endOfISOWeek:()=>r0,endOfISOWeekYear:()=>n0,endOfMinute:()=>i0,endOfMonth:()=>ms,endOfQuarter:()=>o0,endOfSecond:()=>s0,endOfToday:()=>a0,endOfTomorrow:()=>l0,endOfWeek:()=>Uu,endOfYear:()=>ju,endOfYesterday:()=>c0,format:()=>Ka,formatDate:()=>Ka,formatDistance:()=>Yu,formatDistanceStrict:()=>Vu,formatDistanceToNow:()=>w0,formatDistanceToNowStrict:()=>S0,formatDuration:()=>v0,formatISO:()=>k0,formatISO9075:()=>T0,formatISODuration:()=>E0,formatRFC3339:()=>D0,formatRFC7231:()=>C0,formatRelative:()=>O0,formatters:()=>Ya,fromUnixTime:()=>I0,getDate:()=>Ku,getDay:()=>ni,getDayOfYear:()=>Hu,getDaysInMonth:()=>Gu,getDaysInYear:()=>M0,getDecade:()=>N0,getDefaultOptions:()=>Ju,getHours:()=>P0,getISODay:()=>Xu,getISOWeek:()=>bs,getISOWeekYear:()=>Mt,getISOWeeksInYear:()=>L0,getMilliseconds:()=>_0,getMinutes:()=>R0,getMonth:()=>F0,getOverlappingDaysInIntervals:()=>A0,getQuarter:()=>qa,getSeconds:()=>$0,getTime:()=>B0,getUnixTime:()=>j0,getWeek:()=>ws,getWeekOfMonth:()=>U0,getWeekYear:()=>ti,getWeeksInMonth:()=>z0,getYear:()=>H0,hoursToMilliseconds:()=>W0,hoursToMinutes:()=>q0,hoursToSeconds:()=>Y0,interval:()=>V0,intervalToDuration:()=>K0,intlFormat:()=>G0,intlFormatDistance:()=>Q0,isAfter:()=>J0,isBefore:()=>X0,isDate:()=>_u,isEqual:()=>Z0,isExists:()=>eS,isFirstDayOfMonth:()=>tS,isFriday:()=>rS,isFuture:()=>nS,isLastDayOfMonth:()=>Au,isLeapYear:()=>Qu,isMatch:()=>iS,isMonday:()=>oS,isPast:()=>sS,isSameDay:()=>nn,isSameHour:()=>Wf,isSameISOWeek:()=>qf,isSameISOWeekYear:()=>aS,isSameMinute:()=>Yf,isSameMonth:()=>Vf,isSameQuarter:()=>Kf,isSameSecond:()=>Gf,isSameWeek:()=>Ts,isSameYear:()=>Qf,isSaturday:()=>ku,isSunday:()=>Tu,isThisHour:()=>lS,isThisISOWeek:()=>cS,isThisMinute:()=>uS,isThisMonth:()=>fS,isThisQuarter:()=>pS,isThisSecond:()=>hS,isThisWeek:()=>mS,isThisYear:()=>dS,isThursday:()=>gS,isToday:()=>yS,isTomorrow:()=>xS,isTuesday:()=>bS,isValid:()=>ft,isWednesday:()=>wS,isWeekend:()=>tn,isWithinInterval:()=>SS,isYesterday:()=>vS,lastDayOfDecade:()=>kS,lastDayOfISOWeek:()=>TS,lastDayOfISOWeekYear:()=>ES,lastDayOfMonth:()=>Zu,lastDayOfQuarter:()=>DS,lastDayOfWeek:()=>Jf,lastDayOfYear:()=>CS,lightFormat:()=>OS,lightFormatters:()=>Zt,longFormatters:()=>ri,max:()=>Nu,milliseconds:()=>IS,millisecondsToHours:()=>MS,millisecondsToMinutes:()=>NS,millisecondsToSeconds:()=>PS,min:()=>Pu,minutesToHours:()=>LS,minutesToMilliseconds:()=>_S,minutesToSeconds:()=>RS,monthsToQuarters:()=>FS,monthsToYears:()=>AS,nextDay:()=>bt,nextFriday:()=>$S,nextMonday:()=>BS,nextSaturday:()=>jS,nextSunday:()=>US,nextThursday:()=>zS,nextTuesday:()=>HS,nextWednesday:()=>WS,parse:()=>Hf,parseISO:()=>YS,parseJSON:()=>VS,parsers:()=>zf,previousDay:()=>wt,previousFriday:()=>KS,previousMonday:()=>GS,previousSaturday:()=>QS,previousSunday:()=>JS,previousThursday:()=>XS,previousTuesday:()=>ZS,previousWednesday:()=>ev,quartersToMonths:()=>tv,quartersToYears:()=>rv,roundToNearestHours:()=>nv,roundToNearestMinutes:()=>iv,secondsToHours:()=>ov,secondsToMilliseconds:()=>sv,secondsToMinutes:()=>av,set:()=>lv,setDate:()=>cv,setDay:()=>ii,setDayOfYear:()=>uv,setDefaultOptions:()=>fv,setHours:()=>pv,setISODay:()=>Df,setISOWeek:()=>bf,setISOWeekYear:()=>Cu,setMilliseconds:()=>hv,setMinutes:()=>mv,setMonth:()=>Es,setQuarter:()=>dv,setSeconds:()=>gv,setWeek:()=>yf,setWeekYear:()=>yv,setYear:()=>xv,startOfDay:()=>rn,startOfDecade:()=>bv,startOfHour:()=>Ga,startOfISOWeek:()=>Ge,startOfISOWeekYear:()=>Xt,startOfMinute:()=>Qa,startOfMonth:()=>ei,startOfQuarter:()=>sn,startOfSecond:()=>Ja,startOfToday:()=>wv,startOfTomorrow:()=>Sv,startOfWeek:()=>Le,startOfWeekYear:()=>Qi,startOfYear:()=>gs,startOfYesterday:()=>vv,sub:()=>kv,subBusinessDays:()=>Tv,subDays:()=>oi,subHours:()=>Ev,subISOWeekYears:()=>Fu,subMilliseconds:()=>Dv,subMinutes:()=>Cv,subMonths:()=>Zf,subQuarters:()=>Ov,subSeconds:()=>Iv,subWeeks:()=>Mv,subYears:()=>Nv,toDate:()=>b,transpose:()=>ef,weeksToDays:()=>Pv,yearsToDays:()=>Lv,yearsToMonths:()=>_v,yearsToQuarters:()=>Rv});var yu=7,Wa=365.2425,YN=Math.pow(10,8)*24*60*60*1e3,IG=-YN,Zr=6048e5,xu=864e5,gt=6e4,Jt=36e5,os=1e3,ud=525600,Kn=43200,ss=1440,bu=60,wu=3,Su=12,vu=4,qi=3600,as=60,gu=qi*24,Nw=gu*7,fd=gu*365.2425,pd=fd/12,Pw=pd*3,hd=Symbol.for("constructDateFrom");function $(t,e){return typeof t=="function"?t(e):t&&typeof t=="object"&&hd in t?t[hd](e):t instanceof Date?new t.constructor(e):new Date(e)}o($,"constructFrom");var PG=$;function b(t,e){return $(e||t,t)}o(b,"toDate");var FG=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 UG=et;function en(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(en,"addMonths");var YG=en;function Gn(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?en(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(Gn,"add");var ZG=Gn;function ku(t,e){return b(t,e?.in).getDay()===6}o(ku,"isSaturday");var nQ=ku;function Tu(t,e){return b(t,e?.in).getDay()===0}o(Tu,"isSunday");var aQ=Tu;function tn(t,e){let r=b(t,e?.in).getDay();return r===0||r===6}o(tn,"isWeekend");var fQ=tn;function Eu(t,e,r){let n=b(t,r?.in),i=tn(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),tn(n,r)||(c-=1);return i&&tn(n,r)&&e!==0&&(ku(n,r)&&n.setDate(n.getDate()+(a<0?2:-1)),Tu(n,r)&&n.setDate(n.getDate()+(a<0?1:-2))),n.setHours(s),n}o(Eu,"addBusinessDays");var bQ=Eu;function Qn(t,e,r){return $(r?.in||t,+b(t)+e)}o(Qn,"addMilliseconds");var TQ=Qn;function Du(t,e,r){return Qn(t,e*Jt,r)}o(Du,"addHours");var IQ=Du;var Lw={};function Oe(){return Lw}o(Oe,"getDefaultOptions");function _w(t){Lw=t}o(_w,"setDefaultOptions");function Le(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(Le,"startOfWeek");var FQ=Le;function Ge(t,e){return Le(t,{...e,weekStartsOn:1})}o(Ge,"startOfISOWeek");var jQ=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 YQ=Mt;function Ue(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(Ue,"getTimezoneOffsetInMilliseconds");function te(t,...e){let r=$.bind(null,t||e.find(n=>typeof n=="object"));return e.map(r)}o(te,"normalizeDates");function rn(t,e){let r=b(t,e?.in);return r.setHours(0,0,0,0),r}o(rn,"startOfDay");var rJ=rn;function ot(t,e,r){let[n,i]=te(r?.in,t,e),s=rn(n),a=rn(i),l=+s-Ue(s),c=+a-Ue(a);return Math.round((l-c)/xu)}o(ot,"differenceInCalendarDays");var cJ=ot;function Xt(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(Xt,"startOfISOWeekYear");var dJ=Xt;function Cu(t,e,r){let n=b(t,r?.in),i=ot(n,Xt(n,r)),s=$(r?.in||t,0);return s.setFullYear(e,0,4),s.setHours(0,0,0,0),n=Xt(s),n.setDate(n.getDate()+i),n}o(Cu,"setISOWeekYear");var vJ=Cu;function Ou(t,e,r){return Cu(t,Mt(t,r)+e,r)}o(Ou,"addISOWeekYears");var CJ=Ou;function ls(t,e,r){let n=b(t,r?.in);return n.setTime(n.getTime()+e*gt),n}o(ls,"addMinutes");var PJ=ls;function cs(t,e,r){return en(t,e*3,r)}o(cs,"addQuarters");var FJ=cs;function Iu(t,e,r){return Qn(t,e*1e3,r)}o(Iu,"addSeconds");var jJ=Iu;function Jn(t,e,r){return et(t,e*7,r)}o(Jn,"addWeeks");var WJ=Jn;function Mu(t,e,r){return en(t,e*12,r)}o(Mu,"addYears");var KJ=Mu;function Rw(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(Rw,"areIntervalsOverlapping");var XJ=Rw;function Nu(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(Nu,"max");var nX=Nu;function Pu(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(Pu,"min");var lX=Pu;function Fw(t,e,r){let[n,i,s]=te(r?.in,t,e.start,e.end);return Pu([Nu([n,i],r),s],r)}o(Fw,"clamp");var mX=Fw;function Lu(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(Lu,"closestIndexTo");var xX=Lu;function Aw(t,e,r){let[n,...i]=te(r?.in,t,...e),s=Lu(n,i);if(typeof s=="number"&&isNaN(s))return $(n,NaN);if(s!==void 0)return i[s]}o(Aw,"closestTo");var TX=Aw;function yt(t,e){let r=+b(t)-+b(e);return r<0?-1:r>0?1:r}o(yt,"compareAsc");var OX=yt;function $w(t,e){let r=+b(t)-+b(e);return r>0?-1:r<0?1:r}o($w,"compareDesc");var PX=$w;function de(t){return $(t,Date.now())}o(de,"constructNow");var FX=de;function Bw(t){let e=Math.trunc(t/7);return e===0?0:e}o(Bw,"daysToWeeks");var jX=Bw;function nn(t,e,r){let[n,i]=te(r?.in,t,e);return+rn(n)==+rn(i)}o(nn,"isSameDay");var qX=nn;function _u(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}o(_u,"isDate");var KX=_u;function ft(t){return!(!_u(t)&&typeof t!="number"||isNaN(+b(t)))}o(ft,"isValid");var ZX=ft;function jw(t,e,r){let[n,i]=te(r?.in,t,e);if(!ft(n)||!ft(i))return NaN;let s=ot(n,i),a=s<0?-1:1,l=Math.trunc(s/7),c=l*5,u=et(i,l*7);for(;!nn(n,u);)c+=tn(u,r)?0:a,u=et(u,a);return c===0?0:c}o(jw,"differenceInBusinessDays");var lZ=jw;function Ru(t,e,r){let[n,i]=te(r?.in,t,e);return Mt(n,r)-Mt(i,r)}o(Ru,"differenceInCalendarISOWeekYears");var hZ=Ru;function Uw(t,e,r){let[n,i]=te(r?.in,t,e),s=Ge(n),a=Ge(i),l=+s-Ue(s),c=+a-Ue(a);return Math.round((l-c)/Zr)}o(Uw,"differenceInCalendarISOWeeks");var wZ=Uw;function Yi(t,e,r){let[n,i]=te(r?.in,t,e),s=n.getFullYear()-i.getFullYear(),a=n.getMonth()-i.getMonth();return s*12+a}o(Yi,"differenceInCalendarMonths");var TZ=Yi;function qa(t,e){let r=b(t,e?.in);return Math.trunc(r.getMonth()/3)+1}o(qa,"getQuarter");var OZ=qa;function us(t,e,r){let[n,i]=te(r?.in,t,e),s=n.getFullYear()-i.getFullYear(),a=qa(n)-qa(i);return s*4+a}o(us,"differenceInCalendarQuarters");var LZ=us;function Vi(t,e,r){let[n,i]=te(r?.in,t,e),s=Le(n,r),a=Le(i,r),l=+s-Ue(s),c=+a-Ue(a);return Math.round((l-c)/Zr)}o(Vi,"differenceInCalendarWeeks");var jZ=Vi;function Xn(t,e,r){let[n,i]=te(r?.in,t,e);return n.getFullYear()-i.getFullYear()}o(Xn,"differenceInCalendarYears");var WZ=Xn;function fs(t,e,r){let[n,i]=te(r?.in,t,e),s=zw(n,i),a=Math.abs(ot(n,i));n.setDate(n.getDate()-s*a);let l=+(zw(n,i)===-s),c=s*(a-l);return c===0?0:c}o(fs,"differenceInDays");function zw(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(zw,"compareLocalAsc");var GZ=fs;function xt(t){return e=>{let n=(t?Math[t]:Math.trunc)(e);return n===0?0:n}}o(xt,"getRoundingMethod");function Ki(t,e,r){let[n,i]=te(r?.in,t,e),s=(+n-+i)/Jt;return xt(r?.roundingMethod)(s)}o(Ki,"differenceInHours");var nee=Ki;function Fu(t,e,r){return Ou(t,-e,r)}o(Fu,"subISOWeekYears");var aee=Fu;function Hw(t,e,r){let[n,i]=te(r?.in,t,e),s=yt(n,i),a=Math.abs(Ru(n,i,r)),l=Fu(n,s*a,r),c=+(yt(l,i)===-s),u=s*(a-c);return u===0?0:u}o(Hw,"differenceInISOWeekYears");var mee=Hw;function ps(t,e){return+b(t)-+b(e)}o(ps,"differenceInMilliseconds");var xee=ps;function Gi(t,e,r){let n=ps(t,e)/gt;return xt(r?.roundingMethod)(n)}o(Gi,"differenceInMinutes");var Tee=Gi;function hs(t,e){let r=b(t,e?.in);return r.setHours(23,59,59,999),r}o(hs,"endOfDay");var Oee=hs;function ms(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(ms,"endOfMonth");var Pee=ms;function Au(t,e){let r=b(t,e?.in);return+hs(r,e)==+ms(r,e)}o(Au,"isLastDayOfMonth");var $ee=Au;function Zn(t,e,r){let[n,i,s]=te(r?.in,t,t,e),a=yt(i,s),l=Math.abs(Yi(i,s));if(l<1)return 0;i.getMonth()===1&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-a*l);let c=yt(i,s)===-a;Au(n)&&l===1&&yt(n,s)===1&&(c=!1);let u=a*(l-+c);return u===0?0:u}o(Zn,"differenceInMonths");var qee=Zn;function Ww(t,e,r){let n=Zn(t,e,r)/3;return xt(r?.roundingMethod)(n)}o(Ww,"differenceInQuarters");var Qee=Ww;function on(t,e,r){let n=ps(t,e)/1e3;return xt(r?.roundingMethod)(n)}o(on,"differenceInSeconds");var tte=on;function qw(t,e,r){let n=fs(t,e,r)/7;return xt(r?.roundingMethod)(n)}o(qw,"differenceInWeeks");var ste=qw;function $u(t,e,r){let[n,i]=te(r?.in,t,e),s=yt(n,i),a=Math.abs(Xn(n,i));n.setFullYear(1584),i.setFullYear(1584);let l=yt(n,i)===-s,c=s*(a-+l);return c===0?0:c}o($u,"differenceInYears");var pte=$u;function st(t,e){let[r,n]=te(t,e.start,e.end);return{start:r,end:n}}o(st,"normalizeInterval");function Bu(t,e){let{start:r,end:n}=st(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(Bu,"eachDayOfInterval");var wte=Bu;function Yw(t,e){let{start:r,end:n}=st(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(Yw,"eachHourOfInterval");var Ete=Yw;function Vw(t,e){let{start:r,end:n}=st(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=ls(a,l);return i?c.reverse():c}o(Vw,"eachMinuteOfInterval");var Nte=Vw;function Kw(t,e){let{start:r,end:n}=st(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(Kw,"eachMonthOfInterval");var Fte=Kw;function sn(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(sn,"startOfQuarter");var jte=sn;function Gw(t,e){let{start:r,end:n}=st(e?.in,t),i=+r>+n,s=i?+sn(r):+sn(n),a=i?sn(n):sn(r),l=e?.step??1;if(!l)return[];l<0&&(l=-l,i=!i);let c=[];for(;+a<=s;)c.push($(r,a)),a=cs(a,l);return i?c.reverse():c}o(Gw,"eachQuarterOfInterval");var Vte=Gw;function Qw(t,e){let{start:r,end:n}=st(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=Jn(c,u),c.setHours(15);return i?f.reverse():f}o(Qw,"eachWeekOfInterval");var ere=Qw;function ds(t,e){let{start:r,end:n}=st(e?.in,t),i=Bu({start:r,end:n},e),s=[],a=0;for(;a<i.length;){let l=i[a++];tn(l)&&s.push($(r,l))}return s}o(ds,"eachWeekendOfInterval");var are=ds;function ei(t,e){let r=b(t,e?.in);return r.setDate(1),r.setHours(0,0,0,0),r}o(ei,"startOfMonth");var fre=ei;function Jw(t,e){let r=ei(t,e),n=ms(t,e);return ds({start:r,end:n},e)}o(Jw,"eachWeekendOfMonth");var yre=Jw;function ju(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(ju,"endOfYear");var Sre=ju;function gs(t,e){let r=b(t,e?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}o(gs,"startOfYear");var Ere=gs;function Xw(t,e){let r=gs(t,e),n=ju(t,e);return ds({start:r,end:n},e)}o(Xw,"eachWeekendOfYear");var Nre=Xw;function Zw(t,e){let{start:r,end:n}=st(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(Zw,"eachYearOfInterval");var Fre=Zw;function e0(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(e0,"endOfDecade");var jre=e0;function t0(t,e){let r=b(t,e?.in);return r.setMinutes(59,59,999),r}o(t0,"endOfHour");var Wre=t0;function Uu(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(Uu,"endOfWeek");var Gre=Uu;function r0(t,e){return Uu(t,{...e,weekStartsOn:1})}o(r0,"endOfISOWeek");var Zre=r0;function n0(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(n0,"endOfISOWeekYear");var one=n0;function i0(t,e){let r=b(t,e?.in);return r.setSeconds(59,999),r}o(i0,"endOfMinute");var cne=i0;function o0(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(o0,"endOfQuarter");var hne=o0;function s0(t,e){let r=b(t,e?.in);return r.setMilliseconds(999),r}o(s0,"endOfSecond");var yne=s0;function a0(t){return hs(Date.now(),t)}o(a0,"endOfToday");var Sne=a0;function l0(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(l0,"endOfTomorrow");var Ene=l0;function c0(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(c0,"endOfYesterday");var Mne=c0;var VN={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"}},u0=o((t,e,r)=>{let n,i=VN[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 zu(t){return(e={})=>{let r=e.width?String(e.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}}o(zu,"buildFormatLongFn");var KN={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},GN={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},QN={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},f0={date:zu({formats:KN,defaultWidth:"full"}),time:zu({formats:GN,defaultWidth:"full"}),dateTime:zu({formats:QN,defaultWidth:"full"})};var JN={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},p0=o((t,e,r,n)=>JN[t],"formatRelative");function ys(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(ys,"buildLocalizeFn");var XN={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},ZN={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},eP={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"]},tP={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"]},rP={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"}},nP={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"}},iP=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"),h0={ordinalNumber:iP,era:ys({values:XN,defaultWidth:"wide"}),quarter:ys({values:ZN,defaultWidth:"wide",argumentCallback:o(t=>t-1,"argumentCallback")}),month:ys({values:eP,defaultWidth:"wide"}),day:ys({values:tP,defaultWidth:"wide"}),dayPeriod:ys({values:rP,defaultWidth:"wide",formattingValues:nP,defaultFormattingWidth:"wide"})};function xs(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)?sP(l,p=>p.test(a)):oP(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(xs,"buildMatchFn");function oP(t,e){for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&e(t[r]))return r}o(oP,"findKey");function sP(t,e){for(let r=0;r<t.length;r++)if(e(t[r]))return r}o(sP,"findIndex");function m0(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(m0,"buildMatchPatternFn");var aP=/^(\d+)(th|st|nd|rd)?/i,lP=/\d+/i,cP={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},uP={any:[/^b/i,/^(a|c)/i]},fP={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},pP={any:[/1/i,/2/i,/3/i,/4/i]},hP={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},mP={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]},dP={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},gP={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]},yP={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},xP={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}},d0={ordinalNumber:m0({matchPattern:aP,parsePattern:lP,valueCallback:o(t=>parseInt(t,10),"valueCallback")}),era:xs({matchPatterns:cP,defaultMatchWidth:"wide",parsePatterns:uP,defaultParseWidth:"any"}),quarter:xs({matchPatterns:fP,defaultMatchWidth:"wide",parsePatterns:pP,defaultParseWidth:"any",valueCallback:o(t=>t+1,"valueCallback")}),month:xs({matchPatterns:hP,defaultMatchWidth:"wide",parsePatterns:mP,defaultParseWidth:"any"}),day:xs({matchPatterns:dP,defaultMatchWidth:"wide",parsePatterns:gP,defaultParseWidth:"any"}),dayPeriod:xs({matchPatterns:yP,defaultMatchWidth:"any",parsePatterns:xP,defaultParseWidth:"any"})};var Bt={code:"en-US",formatDistance:u0,formatLong:f0,formatRelative:p0,localize:h0,match:d0,options:{weekStartsOn:0,firstWeekContainsDate:1}},oie=Bt;function Hu(t,e){let r=b(t,e?.in);return ot(r,gs(r))+1}o(Hu,"getDayOfYear");var pie=Hu;function bs(t,e){let r=b(t,e?.in),n=+Ge(r)-+Xt(r);return Math.round(n/Zr)+1}o(bs,"getISOWeek");var bie=bs;function ti(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=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(ti,"getWeekYear");var Die=ti;function Qi(t,e){let r=Oe(),n=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=ti(t,e),s=$(e?.in||t,0);return s.setFullYear(i,0,n),s.setHours(0,0,0,0),Le(s,e)}o(Qi,"startOfWeekYear");var Lie=Qi;function ws(t,e){let r=b(t,e?.in),n=+Le(r,e)-+Qi(r,e);return Math.round(n/Zr)+1}o(ws,"getWeek");var jie=ws;function X(t,e){let r=t<0?"-":"",n=Math.abs(t).toString().padStart(e,"0");return r+n}o(X,"addLeadingZeros");var Zt={y(t,e){let r=t.getFullYear(),n=r>0?r:1-r;return X(e==="yy"?n%100:n,e.length)},M(t,e){let r=t.getMonth();return e==="M"?String(r+1):X(r+1,2)},d(t,e){return X(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 X(t.getHours()%12||12,e.length)},H(t,e){return X(t.getHours(),e.length)},m(t,e){return X(t.getMinutes(),e.length)},s(t,e){return X(t.getSeconds(),e.length)},S(t,e){let r=e.length,n=t.getMilliseconds(),i=Math.trunc(n*Math.pow(10,r-3));return X(i,e.length)}};var Ss={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ya={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 Zt.y(t,e)},"y"),Y:o(function(t,e,r,n){let i=ti(t,n),s=i>0?i:1-i;if(e==="YY"){let a=s%100;return X(a,2)}return e==="Yo"?r.ordinalNumber(s,{unit:"year"}):X(s,e.length)},"Y"),R:o(function(t,e){let r=Mt(t);return X(r,e.length)},"R"),u:o(function(t,e){let r=t.getFullYear();return X(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 X(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 X(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 Zt.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 X(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=ws(t,n);return e==="wo"?r.ordinalNumber(i,{unit:"week"}):X(i,e.length)},"w"),I:o(function(t,e,r){let n=bs(t);return e==="Io"?r.ordinalNumber(n,{unit:"week"}):X(n,e.length)},"I"),d:o(function(t,e,r){return e==="do"?r.ordinalNumber(t.getDate(),{unit:"date"}):Zt.d(t,e)},"d"),D:o(function(t,e,r){let n=Hu(t);return e==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):X(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 X(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 X(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 X(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 Zt.h(t,e)},"h"),H:o(function(t,e,r){return e==="Ho"?r.ordinalNumber(t.getHours(),{unit:"hour"}):Zt.H(t,e)},"H"),K:o(function(t,e,r){let n=t.getHours()%12;return e==="Ko"?r.ordinalNumber(n,{unit:"hour"}):X(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"}):X(n,e.length)},"k"),m:o(function(t,e,r){return e==="mo"?r.ordinalNumber(t.getMinutes(),{unit:"minute"}):Zt.m(t,e)},"m"),s:o(function(t,e,r){return e==="so"?r.ordinalNumber(t.getSeconds(),{unit:"second"}):Zt.s(t,e)},"s"),S:o(function(t,e){return Zt.S(t,e)},"S"),X:o(function(t,e,r){let n=t.getTimezoneOffset();if(n===0)return"Z";switch(e){case"X":return y0(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 y0(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"+g0(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"+g0(n,":");default:return"GMT"+Ji(n,":")}},"z"),t:o(function(t,e,r){let n=Math.trunc(+t/1e3);return X(n,e.length)},"t"),T:o(function(t,e,r){return X(+t,e.length)},"T")};function g0(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+X(s,2)}o(g0,"formatTimezoneShort");function y0(t,e){return t%60===0?(t>0?"-":"+")+X(Math.abs(t)/60,2):Ji(t,e)}o(y0,"formatTimezoneWithOptionalMinutes");function Ji(t,e=""){let r=t>0?"-":"+",n=Math.abs(t),i=X(Math.trunc(n/60),2),s=X(n%60,2);return r+i+e+s}o(Ji,"formatTimezone");var x0=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"),b0=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"),bP=o((t,e)=>{let r=t.match(/(P+)(p+)?/)||[],n=r[1],i=r[2];if(!i)return x0(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}}",x0(n,e)).replace("{{time}}",b0(i,e))},"dateTimeLongFormatter"),ri={p:b0,P:bP};var wP=/^D+$/,SP=/^Y+$/,vP=["D","DD","YY","YYYY"];function Wu(t){return wP.test(t)}o(Wu,"isProtectedDayOfYearToken");function qu(t){return SP.test(t)}o(qu,"isProtectedWeekYearToken");function Va(t,e,r){let n=kP(t,e,r);if(console.warn(n),vP.includes(t))throw new RangeError(n)}o(Va,"warnOrThrowProtectedError");function kP(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(kP,"message");var TP=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,EP=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,DP=/^'([^]*?)'?$/,CP=/''/g,OP=/[a-zA-Z]/;function Ka(t,e,r){let n=Oe(),i=r?.locale??n.locale??Bt,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(!ft(l))throw new RangeError("Invalid time value");let c=e.match(EP).map(f=>{let p=f[0];if(p==="p"||p==="P"){let h=ri[p];return h(f,i.formatLong)}return f}).join("").match(TP).map(f=>{if(f==="''")return{isToken:!1,value:"'"};let p=f[0];if(p==="'")return{isToken:!1,value:IP(f)};if(Ya[p])return{isToken:!0,value:f};if(p.match(OP))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&&qu(p)||!r?.useAdditionalDayOfYearTokens&&Wu(p))&&Va(p,e,String(t));let h=Ya[p[0]];return h(l,p,i.localize,u)}).join("")}o(Ka,"format");function IP(t){let e=t.match(DP);return e?e[1].replace(CP,"'"):t}o(IP,"cleanEscapedString");var hoe=Ka;function Yu(t,e,r){let n=Oe(),i=r?.locale??n.locale??Bt,s=2520,a=yt(t,e);if(isNaN(a))throw new RangeError("Invalid time value");let l=Object.assign({},r,{addSuffix:r?.addSuffix,comparison:a}),[c,u]=te(r?.in,...a>0?[e,t]:[t,e]),f=on(u,c),p=(Ue(u)-Ue(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<ss){let d=Math.round(h/60);return i.formatDistance("aboutXHours",d,l)}else{if(h<s)return i.formatDistance("xDays",1,l);if(h<Kn){let d=Math.round(h/ss);return i.formatDistance("xDays",d,l)}else if(h<Kn*2)return m=Math.round(h/Kn),i.formatDistance("aboutXMonths",m,l)}if(m=Zn(u,c),m<12){let d=Math.round(h/Kn);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(Yu,"formatDistance");var Toe=Yu;function Vu(t,e,r){let n=Oe(),i=r?.locale??n.locale??Bt,s=yt(t,e);if(isNaN(s))throw new RangeError("Invalid time value");let a=Object.assign({},r,{addSuffix:r?.addSuffix,comparison:s}),[l,c]=te(r?.in,...s>0?[e,t]:[t,e]),u=xt(r?.roundingMethod??"round"),f=c.getTime()-l.getTime(),p=f/gt,h=Ue(c)-Ue(l),m=(f-h)/gt,d=r?.unit,g;if(d?g=d:p<1?g="second":p<60?g="minute":p<ss?g="hour":m<Kn?g="day":m<ud?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/ss);return i.formatDistance("xDays",y,a)}else if(g==="month"){let y=u(m/Kn);return y===12&&d!=="month"?i.formatDistance("xYears",1,a):i.formatDistance("xMonths",y,a)}else{let y=u(m/ud);return i.formatDistance("xYears",y,a)}}o(Vu,"formatDistanceStrict");var _oe=Vu;function w0(t,e){return Yu(t,de(t),e)}o(w0,"formatDistanceToNow");var Boe=w0;function S0(t,e){return Vu(t,de(t),e)}o(S0,"formatDistanceToNowStrict");var Woe=S0;var MP=["years","months","weeks","days","hours","minutes","seconds"];function v0(t,e){let r=Oe(),n=e?.locale??r.locale??Bt,i=e?.format??MP,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(v0,"formatDuration");var Goe=v0;function k0(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=X(r.getDate(),2),f=X(r.getMonth()+1,2);s=`${X(r.getFullYear(),4)}${l}${f}${l}${u}`}if(i!=="date"){let u=r.getTimezoneOffset();if(u!==0){let g=Math.abs(u),y=X(Math.trunc(g/60),2),x=X(g%60,2);a=`${u<0?"+":"-"}${y}:${x}`}else a="Z";let f=X(r.getHours(),2),p=X(r.getMinutes(),2),h=X(r.getSeconds(),2),m=s===""?"":"T",d=[f,p,h].join(c);s=`${s}${m}${d}${a}`}return s}o(k0,"formatISO");var ese=k0;function T0(t,e){let r=b(t,e?.in);if(!ft(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=X(r.getDate(),2),u=X(r.getMonth()+1,2);s=`${X(r.getFullYear(),4)}${a}${u}${a}${c}`}if(i!=="date"){let c=X(r.getHours(),2),u=X(r.getMinutes(),2),f=X(r.getSeconds(),2);s=`${s}${s===""?"":" "}${c}${l}${u}${l}${f}`}return s}o(T0,"formatISO9075");var sse=T0;function E0(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(E0,"formatISODuration");var cse=E0;function D0(t,e){let r=b(t,e?.in);if(!ft(r))throw new RangeError("Invalid time value");let n=e?.fractionDigits??0,i=X(r.getDate(),2),s=X(r.getMonth()+1,2),a=r.getFullYear(),l=X(r.getHours(),2),c=X(r.getMinutes(),2),u=X(r.getSeconds(),2),f="";if(n>0){let m=r.getMilliseconds(),d=Math.trunc(m*Math.pow(10,n-3));f="."+X(d,n)}let p="",h=r.getTimezoneOffset();if(h!==0){let m=Math.abs(h),d=X(Math.trunc(m/60),2),g=X(m%60,2);p=`${h<0?"+":"-"}${d}:${g}`}else p="Z";return`${a}-${s}-${i}T${l}:${c}:${u}${f}${p}`}o(D0,"formatRFC3339");var dse=D0;var NP=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],PP=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function C0(t){let e=b(t);if(!ft(e))throw new RangeError("Invalid time value");let r=NP[e.getUTCDay()],n=X(e.getUTCDate(),2),i=PP[e.getUTCMonth()],s=e.getUTCFullYear(),a=X(e.getUTCHours(),2),l=X(e.getUTCMinutes(),2),c=X(e.getUTCSeconds(),2);return`${r}, ${n} ${i} ${s} ${a}:${l}:${c} GMT`}o(C0,"formatRFC7231");var Sse=C0;function O0(t,e,r){let[n,i]=te(r?.in,t,e),s=Oe(),a=r?.locale??s.locale??Bt,l=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??s.weekStartsOn??s.locale?.options?.weekStartsOn??0,c=ot(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 Ka(n,f,{locale:a,weekStartsOn:l})}o(O0,"formatRelative");var Ise=O0;function I0(t,e){return b(t*1e3,e?.in)}o(I0,"fromUnixTime");var Lse=I0;function Ku(t,e){return b(t,e?.in).getDate()}o(Ku,"getDate");var Ase=Ku;function ni(t,e){return b(t,e?.in).getDay()}o(ni,"getDay");var Use=ni;function Gu(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(Gu,"getDaysInMonth");var Yse=Gu;function Qu(t,e){let n=b(t,e?.in).getFullYear();return n%400===0||n%4===0&&n%100!==0}o(Qu,"isLeapYear");var Qse=Qu;function M0(t,e){let r=b(t,e?.in);return Number.isNaN(+r)?NaN:Qu(r)?366:365}o(M0,"getDaysInYear");var tae=M0;function N0(t,e){let n=b(t,e?.in).getFullYear();return Math.floor(n/10)*10}o(N0,"getDecade");var oae=N0;function Ju(){return Object.assign({},Oe())}o(Ju,"getDefaultOptions");var cae=Ju;function P0(t,e){return b(t,e?.in).getHours()}o(P0,"getHours");var hae=P0;function Xu(t,e){let r=b(t,e?.in).getDay();return r===0?7:r}o(Xu,"getISODay");var yae=Xu;function L0(t,e){let r=Xt(t,e),i=+Xt(Jn(r,60))-+r;return Math.round(i/Zr)}o(L0,"getISOWeeksInYear");var kae=L0;function _0(t){return b(t).getMilliseconds()}o(_0,"getMilliseconds");var Cae=_0;function R0(t,e){return b(t,e?.in).getMinutes()}o(R0,"getMinutes");var Nae=R0;function F0(t,e){return b(t,e?.in).getMonth()}o(F0,"getMonth");var Rae=F0;function A0(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-Ue(l),u=s>n?n:s,f=u-Ue(u);return Math.ceil((f-c)/xu)}o(A0,"getOverlappingDaysInIntervals");var Uae=A0;function $0(t){return b(t).getSeconds()}o($0,"getSeconds");var qae=$0;function B0(t){return+b(t)}o(B0,"getTime");var Gae=B0;function j0(t){return Math.trunc(+b(t)/1e3)}o(j0,"getUnixTime");var Zae=j0;function U0(t,e){let r=Oe(),n=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=Ku(b(t,e?.in));if(isNaN(i))return NaN;let s=ni(ei(t,e)),a=n-s;a<=0&&(a+=7);let l=i-a;return Math.ceil(l/7)+1}o(U0,"getWeekOfMonth");var ale=U0;function Zu(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(Zu,"lastDayOfMonth");var fle=Zu;function z0(t,e){let r=b(t,e?.in);return Vi(Zu(r,e),ei(r,e),e)+1}o(z0,"getWeeksInMonth");var xle=z0;function H0(t,e){return b(t,e?.in).getFullYear()}o(H0,"getYear");var vle=H0;function W0(t){return Math.trunc(t*Jt)}o(W0,"hoursToMilliseconds");var Dle=W0;function q0(t){return Math.trunc(t*bu)}o(q0,"hoursToMinutes");var Mle=q0;function Y0(t){return Math.trunc(t*qi)}o(Y0,"hoursToSeconds");var _le=Y0;function V0(t,e,r){let[n,i]=te(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(V0,"interval");var $le=V0;function K0(t,e){let{start:r,end:n}=st(e?.in,t),i={},s=$u(n,r);s&&(i.years=s);let a=Gn(r,{years:i.years}),l=Zn(n,a);l&&(i.months=l);let c=Gn(a,{months:i.months}),u=fs(n,c);u&&(i.days=u);let f=Gn(c,{days:i.days}),p=Ki(n,f);p&&(i.hours=p);let h=Gn(f,{hours:i.hours}),m=Gi(n,h);m&&(i.minutes=m);let d=Gn(h,{minutes:i.minutes}),g=on(n,d);return g&&(i.seconds=g),i}o(K0,"intervalToDuration");var Gle=K0;function G0(t,e,r){let n;return LP(e)?n=e:r=e,new Intl.DateTimeFormat(r?.locale,n).format(b(t))}o(G0,"intlFormat");function LP(t){return t!==void 0&&!("locale"in t)}o(LP,"isFormatOptions");var Zle=G0;function Q0(t,e,r){let n=0,i,[s,a]=te(r?.in,t,e);if(r?.unit)i=r?.unit,i==="second"?n=on(s,a):i==="minute"?n=Gi(s,a):i==="hour"?n=Ki(s,a):i==="day"?n=ot(s,a):i==="week"?n=Vi(s,a):i==="month"?n=Yi(s,a):i==="quarter"?n=us(s,a):i==="year"&&(n=Xn(s,a));else{let c=on(s,a);Math.abs(c)<as?(n=on(s,a),i="second"):Math.abs(c)<qi?(n=Gi(s,a),i="minute"):Math.abs(c)<gu&&Math.abs(ot(s,a))<1?(n=Ki(s,a),i="hour"):Math.abs(c)<Nw&&(n=ot(s,a))&&Math.abs(n)<7?i="day":Math.abs(c)<pd?(n=Vi(s,a),i="week"):Math.abs(c)<Pw?(n=Yi(s,a),i="month"):Math.abs(c)<fd?us(s,a)<4?(n=us(s,a),i="quarter"):(n=Xn(s,a),i="year"):(n=Xn(s,a),i="year")}return new Intl.RelativeTimeFormat(r?.locale,{numeric:"auto",...r}).format(n,i)}o(Q0,"intlFormatDistance");var pce=Q0;function J0(t,e){return+b(t)>+b(e)}o(J0,"isAfter");var gce=J0;function X0(t,e){return+b(t)<+b(e)}o(X0,"isBefore");var wce=X0;function Z0(t,e){return+b(t)==+b(e)}o(Z0,"isEqual");var Tce=Z0;function eS(t,e,r){let n=new Date(t,e,r);return n.getFullYear()===t&&n.getMonth()===e&&n.getDate()===r}o(eS,"isExists");var Cce=eS;function tS(t,e){return b(t,e?.in).getDate()===1}o(tS,"isFirstDayOfMonth");var Nce=tS;function rS(t,e){return b(t,e?.in).getDay()===5}o(rS,"isFriday");var Rce=rS;function nS(t){return+b(t)>Date.now()}o(nS,"isFuture");var Bce=nS;function ef(t,e){let r=_P(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(ef,"transpose");function _P(t){return typeof t=="function"&&t.prototype?.constructor===t}o(_P,"isConstructor");var Hce=ef;var RP=10,tf=class{static{o(this,"Setter")}subPriority=0;validate(e,r){return!0}},rf=class extends tf{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)}},nf=class extends tf{static{o(this,"DateTimezoneSetter")}priority=RP;subPriority=-1;constructor(e,r){super(),this.context=e||(n=>$(r,n))}set(e,r){return r.timestampIsSet?e:$(e,ef(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 rf(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}validate(e,r,n){return!0}};var of=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 Se={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}/},ur={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 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 fr(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*Jt+s*gt+a*os),rest:e.slice(r[0].length)}}o(fr,"parseTimezonePattern");function sf(t){return be(Se.anyDigitsSigned,t)}o(sf,"parseAnyDigitsSigned");function he(t,e){switch(t){case 1:return be(Se.singleDigit,e);case 2:return be(Se.twoDigits,e);case 3:return be(Se.threeDigits,e);case 4:return be(Se.fourDigits,e);default:return be(new RegExp("^\\d{1,"+t+"}"),e)}}o(he,"parseNDigits");function vs(t,e){switch(t){case 1:return be(Se.singleDigitSigned,e);case 2:return be(Se.twoDigitsSigned,e);case 3:return be(Se.threeDigitsSigned,e);case 4:return be(Se.fourDigitsSigned,e);default:return be(new RegExp("^-?\\d{1,"+t+"}"),e)}}o(vs,"parseNDigitsSigned");function ks(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}o(ks,"dayPeriodEnumToHours");function af(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(af,"normalizeTwoDigitYear");function lf(t){return t%400===0||t%4===0&&t%100!==0}o(lf,"isLeapYearIndex");var cf=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=af(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 uf=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=ti(e,i);if(n.isTwoDigitYear){let l=af(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 ff=class extends J{static{o(this,"ISOWeekYearParser")}priority=130;parse(e,r){return r==="R"?vs(4,e):vs(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 pf=class extends J{static{o(this,"ExtendedYearParser")}priority=130;parse(e,r){return r==="u"?vs(4,e):vs(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 hf=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 mf=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 df=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(be(Se.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 gf=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(be(Se.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 yf(t,e,r){let n=b(t,r?.in),i=ws(n,r)-e;return n.setDate(n.getDate()-i*7),b(n,r?.in)}o(yf,"setWeek");var Vue=yf;var xf=class extends J{static{o(this,"LocalWeekParser")}priority=100;parse(e,r,n){switch(r){case"w":return be(Se.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(yf(e,n,i),i)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]};function bf(t,e,r){let n=b(t,r?.in),i=bs(n,r)-e;return n.setDate(n.getDate()-i*7),n}o(bf,"setISOWeek");var ofe=bf;var wf=class extends J{static{o(this,"ISOWeekParser")}priority=100;parse(e,r,n){switch(r){case"I":return be(Se.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(bf(e,n))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]};var FP=[31,28,31,30,31,30,31,31,30,31,30,31],AP=[31,29,31,30,31,30,31,31,30,31,30,31],Sf=class extends J{static{o(this,"DateParser")}priority=90;subPriority=1;parse(e,r,n){switch(r){case"d":return be(Se.date,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return he(r.length,e)}}validate(e,r){let n=e.getFullYear(),i=lf(n),s=e.getMonth();return i?r>=1&&r<=AP[s]:r>=1&&r<=FP[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 vf=class extends J{static{o(this,"DayOfYearParser")}priority=90;subpriority=1;parse(e,r,n){switch(r){case"D":case"DD":return be(Se.dayOfYear,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return he(r.length,e)}}validate(e,r){let n=e.getFullYear();return lf(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 ii(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(ii,"setDay");var Ofe=ii;var kf=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=ii(e,n,i),e.setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]};var Tf=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=ii(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 Ef=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=ii(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=Xu(n,r),s=e-i;return et(n,s,r)}o(Df,"setISODay");var Kfe=Df;var Cf=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=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 Of=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(ks(n),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]};var If=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(ks(n),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]};var Mf=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(ks(n),0,0,0),e}incompatibleTokens=["a","b","t","T"]};var Nf=class extends J{static{o(this,"Hour1to12Parser")}priority=70;parse(e,r,n){switch(r){case"h":return be(Se.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 Pf=class extends J{static{o(this,"Hour0to23Parser")}priority=70;parse(e,r,n){switch(r){case"H":return be(Se.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 Lf=class extends J{static{o(this,"Hour0To11Parser")}priority=70;parse(e,r,n){switch(r){case"K":return be(Se.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 _f=class extends J{static{o(this,"Hour1To24Parser")}priority=70;parse(e,r,n){switch(r){case"k":return be(Se.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 Rf=class extends J{static{o(this,"MinuteParser")}priority=60;parse(e,r,n){switch(r){case"m":return be(Se.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 Ff=class extends J{static{o(this,"SecondParser")}priority=50;parse(e,r,n){switch(r){case"s":return be(Se.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 Af=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 $f=class extends J{static{o(this,"ISOTimezoneWithZParser")}priority=10;parse(e,r){switch(r){case"X":return fr(ur.basicOptionalMinutes,e);case"XX":return fr(ur.basic,e);case"XXXX":return fr(ur.basicOptionalSeconds,e);case"XXXXX":return fr(ur.extendedOptionalSeconds,e);default:return fr(ur.extended,e)}}set(e,r,n){return r.timestampIsSet?e:$(e,e.getTime()-Ue(e)-n)}incompatibleTokens=["t","T","x"]};var Bf=class extends J{static{o(this,"ISOTimezoneParser")}priority=10;parse(e,r){switch(r){case"x":return fr(ur.basicOptionalMinutes,e);case"xx":return fr(ur.basic,e);case"xxxx":return fr(ur.basicOptionalSeconds,e);case"xxxxx":return fr(ur.extendedOptionalSeconds,e);default:return fr(ur.extended,e)}}set(e,r,n){return r.timestampIsSet?e:$(e,e.getTime()-Ue(e)-n)}incompatibleTokens=["t","T","X"]};var jf=class extends J{static{o(this,"TimestampSecondsParser")}priority=40;parse(e){return sf(e)}set(e,r,n){return[$(e,n*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"};var Uf=class extends J{static{o(this,"TimestampMillisecondsParser")}priority=20;parse(e){return sf(e)}set(e,r,n){return[$(e,n),{timestampIsSet:!0}]}incompatibleTokens="*"};var zf={G:new of,y:new cf,Y:new uf,R:new ff,u:new pf,Q:new hf,q:new mf,M:new df,L:new gf,w:new xf,I:new wf,d:new Sf,D:new vf,E:new kf,e:new Tf,c:new Ef,i:new Cf,a:new Of,b:new If,B:new Mf,h:new Nf,H:new Pf,K:new Lf,k:new _f,m:new Rf,s:new Ff,S:new Af,X:new $f,x:new Bf,t:new jf,T:new Uf};var $P=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,BP=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,jP=/^'([^]*?)'?$/,UP=/''/g,zP=/\S/,HP=/[a-zA-Z]/;function Hf(t,e,r,n){let i=o(()=>$(n?.in||r,NaN),"invalidDate"),s=Ju(),a=n?.locale??s.locale??Bt,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 nf(n?.in,r)],p=e.match(BP).map(y=>{let x=y[0];if(x in ri){let T=ri[x];return T(y,a.formatLong)}return y}).join("").match($P),h=[];for(let y of p){!n?.useAdditionalWeekYearTokens&&qu(y)&&Va(y,e,t),!n?.useAdditionalDayOfYearTokens&&Wu(y)&&Va(y,e,t);let x=y[0],T=zf[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(HP))throw new RangeError("Format string contains an unescaped latin alphabet character `"+x+"`");if(y==="''"?y="'":x==="'"&&(y=WP(y)),t.indexOf(y)===0)t=t.slice(y.length);else return i()}}if(t.length>0&&zP.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(Hf,"parse");function WP(t){return t.match(jP)[1].replace(UP,"'")}o(WP,"cleanEscapedString");var ime=Hf;function iS(t,e,r){return ft(Hf(t,e,new Date,r))}o(iS,"isMatch");var cme=iS;function oS(t,e){return b(t,e?.in).getDay()===1}o(oS,"isMonday");var hme=oS;function sS(t){return+b(t)<Date.now()}o(sS,"isPast");var yme=sS;function Ga(t,e){let r=b(t,e?.in);return r.setMinutes(0,0,0),r}o(Ga,"startOfHour");var Sme=Ga;function Wf(t,e,r){let[n,i]=te(r?.in,t,e);return+Ga(n)==+Ga(i)}o(Wf,"isSameHour");var Dme=Wf;function Ts(t,e,r){let[n,i]=te(r?.in,t,e);return+Le(n,r)==+Le(i,r)}o(Ts,"isSameWeek");var Nme=Ts;function qf(t,e,r){return Ts(t,e,{...r,weekStartsOn:1})}o(qf,"isSameISOWeek");var Rme=qf;function aS(t,e,r){let[n,i]=te(r?.in,t,e);return+Xt(n)==+Xt(i)}o(aS,"isSameISOWeekYear");var jme=aS;function Qa(t,e){let r=b(t,e?.in);return r.setSeconds(0,0),r}o(Qa,"startOfMinute");var Wme=Qa;function Yf(t,e){return+Qa(t)==+Qa(e)}o(Yf,"isSameMinute");var Kme=Yf;function Vf(t,e,r){let[n,i]=te(r?.in,t,e);return n.getFullYear()===i.getFullYear()&&n.getMonth()===i.getMonth()}o(Vf,"isSameMonth");var Xme=Vf;function Kf(t,e,r){let[n,i]=te(r?.in,t,e);return+sn(n)==+sn(i)}o(Kf,"isSameQuarter");var nde=Kf;function Ja(t,e){let r=b(t,e?.in);return r.setMilliseconds(0),r}o(Ja,"startOfSecond");var ade=Ja;function Gf(t,e){return+Ja(t)==+Ja(e)}o(Gf,"isSameSecond");var fde=Gf;function Qf(t,e,r){let[n,i]=te(r?.in,t,e);return n.getFullYear()===i.getFullYear()}o(Qf,"isSameYear");var dde=Qf;function lS(t,e){return Wf(b(t,e?.in),de(e?.in||t))}o(lS,"isThisHour");var Sde=lS;function cS(t,e){return qf($(e?.in||t,t),de(e?.in||t))}o(cS,"isThisISOWeek");var Cde=cS;function uS(t){return Yf(t,de(t))}o(uS,"isThisMinute");var Pde=uS;function fS(t,e){return Vf($(e?.in||t,t),de(e?.in||t))}o(fS,"isThisMonth");var $de=fS;function pS(t,e){return Kf($(e?.in||t,t),de(e?.in||t))}o(pS,"isThisQuarter");var Wde=pS;function hS(t){return Gf(t,de(t))}o(hS,"isThisSecond");var Gde=hS;function mS(t,e){return Ts($(e?.in||t,t),de(e?.in||t),e)}o(mS,"isThisWeek");var tge=mS;function dS(t,e){return Qf($(e?.in||t,t),de(e?.in||t))}o(dS,"isThisYear");var age=dS;function gS(t,e){return b(t,e?.in).getDay()===4}o(gS,"isThursday");var fge=gS;function yS(t,e){return nn($(e?.in||t,t),de(e?.in||t))}o(yS,"isToday");var yge=yS;function xS(t,e){return nn(t,et(de(e?.in||t),1),e)}o(xS,"isTomorrow");var kge=xS;function bS(t,e){return b(t,e?.in).getDay()===2}o(bS,"isTuesday");var Cge=bS;function wS(t,e){return b(t,e?.in).getDay()===3}o(wS,"isWednesday");var Nge=wS;function SS(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(SS,"isWithinInterval");var Rge=SS;function oi(t,e,r){return et(t,-e,r)}o(oi,"subDays");var Bge=oi;function vS(t,e){return nn($(e?.in||t,t),oi(de(e?.in||t),1))}o(vS,"isYesterday");var Yge=vS;function kS(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(kS,"lastDayOfDecade");var Qge=kS;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 tye=Jf;function TS(t,e){return Jf(t,{...e,weekStartsOn:1})}o(TS,"lastDayOfISOWeek");var oye=TS;function ES(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(ES,"lastDayOfISOWeekYear");var fye=ES;function DS(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(DS,"lastDayOfQuarter");var dye=DS;function CS(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(CS,"lastDayOfYear");var bye=CS;var qP=/(\w)\1*|''|'(''|[^'])+('|$)|./g,YP=/^'([^]*?)'?$/,VP=/''/g,KP=/[a-zA-Z]/;function OS(t,e){let r=b(t);if(!ft(r))throw new RangeError("Invalid time value");let n=e.match(qP);return n?n.map(s=>{if(s==="''")return"'";let a=s[0];if(a==="'")return GP(s);let l=Zt[a];if(l)return l(r,s);if(a.match(KP))throw new RangeError("Format string contains an unescaped latin alphabet character `"+a+"`");return s}).join(""):""}o(OS,"lightFormat");function GP(t){let e=t.match(YP);return e?e[1].replace(VP,"'"):t}o(GP,"cleanEscapedString");var Eye=OS;function IS({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(IS,"milliseconds");var Iye=IS;function MS(t){let e=t/Jt;return Math.trunc(e)}o(MS,"millisecondsToHours");var Lye=MS;function NS(t){let e=t/gt;return Math.trunc(e)}o(NS,"millisecondsToMinutes");var Aye=NS;function PS(t){let e=t/os;return Math.trunc(e)}o(PS,"millisecondsToSeconds");var Uye=PS;function LS(t){let e=t/bu;return Math.trunc(e)}o(LS,"minutesToHours");var qye=LS;function _S(t){return Math.trunc(t*gt)}o(_S,"minutesToMilliseconds");var Gye=_S;function RS(t){return Math.trunc(t*as)}o(RS,"minutesToSeconds");var Zye=RS;function FS(t){let e=t/wu;return Math.trunc(e)}o(FS,"monthsToQuarters");var nxe=FS;function AS(t){let e=t/Su;return Math.trunc(e)}o(AS,"monthsToYears");var axe=AS;function bt(t,e,r){let n=e-ni(t,r);return n<=0&&(n+=7),et(t,n,r)}o(bt,"nextDay");var pxe=bt;function $S(t,e){return bt(t,5,e)}o($S,"nextFriday");var gxe=$S;function BS(t,e){return bt(t,1,e)}o(BS,"nextMonday");var wxe=BS;function jS(t,e){return bt(t,6,e)}o(jS,"nextSaturday");var Txe=jS;function US(t,e){return bt(t,0,e)}o(US,"nextSunday");var Oxe=US;function zS(t,e){return bt(t,4,e)}o(zS,"nextThursday");var Pxe=zS;function HS(t,e){return bt(t,2,e)}o(HS,"nextTuesday");var Fxe=HS;function WS(t,e){return bt(t,3,e)}o(WS,"nextWednesday");var jxe=WS;function YS(t,e){let r=o(()=>$(e?.in,NaN),"invalidDate"),n=e?.additionalDigits??2,i=ZP(t),s;if(i.date){let u=eL(i.date,n);s=tL(u.restDateString,u.year)}if(!s||isNaN(+s))return r();let a=+s,l=0,c;if(i.time&&(l=rL(i.time),isNaN(l)))return r();if(i.timezone){if(c=nL(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(YS,"parseISO");var Xf={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},QP=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,JP=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,XP=/^([+-])(\d{2})(?::?(\d{2}))?$/;function ZP(t){let e={},r=t.split(Xf.dateTimeDelimiter),n;if(r.length>2)return e;if(/:/.test(r[0])?n=r[0]:(e.date=r[0],n=r[1],Xf.timeZoneDelimiter.test(e.date)&&(e.date=t.split(Xf.timeZoneDelimiter)[0],n=t.substr(e.date.length,t.length))),n){let i=Xf.timezone.exec(n);i?(e.time=n.replace(i[1],""),e.timezone=i[1]):e.time=n}return e}o(ZP,"splitDateString");function eL(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(eL,"parseYear");function tL(t,e){if(e===null)return new Date(NaN);let r=t.match(QP);if(!r)return new Date(NaN);let n=!!r[4],i=Xa(r[1]),s=Xa(r[2])-1,a=Xa(r[3]),l=Xa(r[4]),c=Xa(r[5])-1;if(n)return lL(e,l,c)?iL(e,l,c):new Date(NaN);{let u=new Date(0);return!sL(e,s,a)||!aL(e,i)?new Date(NaN):(u.setUTCFullYear(e,s,Math.max(i,a)),u)}}o(tL,"parseDate");function Xa(t){return t?parseInt(t):1}o(Xa,"parseDateUnit");function rL(t){let e=t.match(JP);if(!e)return NaN;let r=md(e[1]),n=md(e[2]),i=md(e[3]);return cL(r,n,i)?r*Jt+n*gt+i*1e3:NaN}o(rL,"parseTime");function md(t){return t&&parseFloat(t.replace(",","."))||0}o(md,"parseTimeUnit");function nL(t){if(t==="Z")return 0;let e=t.match(XP);if(!e)return 0;let r=e[1]==="+"?-1:1,n=parseInt(e[2]),i=e[3]&&parseInt(e[3])||0;return uL(n,i)?r*(n*Jt+i*gt):NaN}o(nL,"parseTimezone");function iL(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(iL,"dayOfISOWeekYear");var oL=[31,null,31,30,31,30,31,31,30,31,30,31];function qS(t){return t%400===0||t%4===0&&t%100!==0}o(qS,"isLeapYearIndex");function sL(t,e,r){return e>=0&&e<=11&&r>=1&&r<=(oL[e]||(qS(t)?29:28))}o(sL,"validateDate");function aL(t,e){return e>=1&&e<=(qS(t)?366:365)}o(aL,"validateDayOfYearDate");function lL(t,e,r){return e>=1&&e<=53&&r>=0&&r<=6}o(lL,"validateWeekDate");function cL(t,e,r){return t===24?e===0&&r===0:r>=0&&r<60&&e>=0&&e<60&&t>=0&&t<25}o(cL,"validateTime");function uL(t,e){return e>=0&&e<=59}o(uL,"validateTimezone");var Yxe=YS;function VS(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(VS,"parseJSON");var Qxe=VS;function wt(t,e,r){let n=ni(t,r)-e;return n<=0&&(n+=7),oi(t,n,r)}o(wt,"previousDay");var tbe=wt;function KS(t,e){return wt(t,5,e)}o(KS,"previousFriday");var obe=KS;function GS(t,e){return wt(t,1,e)}o(GS,"previousMonday");var cbe=GS;function QS(t,e){return wt(t,6,e)}o(QS,"previousSaturday");var hbe=QS;function JS(t,e){return wt(t,0,e)}o(JS,"previousSunday");var ybe=JS;function XS(t,e){return wt(t,4,e)}o(XS,"previousThursday");var Sbe=XS;function ZS(t,e){return wt(t,2,e)}o(ZS,"previousTuesday");var Ebe=ZS;function ev(t,e){return wt(t,3,e)}o(ev,"previousWednesday");var Ibe=ev;function tv(t){return Math.trunc(t*wu)}o(tv,"quartersToMonths");var Lbe=tv;function rv(t){let e=t/vu;return Math.trunc(e)}o(rv,"quartersToYears");var Abe=rv;function nv(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=xt(c)(l/r)*r;return n.setHours(f,0,0,0),n}o(nv,"roundToNearestHours");var Hbe=nv;function iv(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=xt(l)(a/r)*r;return n.setMinutes(u,0,0),n}o(iv,"roundToNearestMinutes");var Gbe=iv;function ov(t){let e=t/qi;return Math.trunc(e)}o(ov,"secondsToHours");var Zbe=ov;function sv(t){return t*os}o(sv,"secondsToMilliseconds");var nwe=sv;function av(t){let e=t/as;return Math.trunc(e)}o(av,"secondsToMinutes");var awe=av;function Es(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=Gu(a);return n.setMonth(e,Math.min(s,l)),n}o(Es,"setMonth");var hwe=Es;function lv(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=Es(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(lv,"set");var bwe=lv;function cv(t,e,r){let n=b(t,r?.in);return n.setDate(e),n}o(cv,"setDate");var kwe=cv;function uv(t,e,r){let n=b(t,r?.in);return n.setMonth(0),n.setDate(e),n}o(uv,"setDayOfYear");var Cwe=uv;function fv(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]);_w(e)}o(fv,"setDefaultOptions");var Nwe=fv;function pv(t,e,r){let n=b(t,r?.in);return n.setHours(e),n}o(pv,"setHours");var Rwe=pv;function hv(t,e,r){let n=b(t,r?.in);return n.setMilliseconds(e),n}o(hv,"setMilliseconds");var Bwe=hv;function mv(t,e,r){let n=b(t,r?.in);return n.setMinutes(e),n}o(mv,"setMinutes");var Hwe=mv;function dv(t,e,r){let n=b(t,r?.in),i=Math.trunc(n.getMonth()/3)+1,s=e-i;return Es(n,n.getMonth()+s*3)}o(dv,"setQuarter");var Kwe=dv;function gv(t,e,r){let n=b(t,r?.in);return n.setSeconds(e),n}o(gv,"setSeconds");var Xwe=gv;function yv(t,e,r){let n=Oe(),i=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=ot(b(t,r?.in),Qi(t,r),r),a=$(r?.in||t,0);a.setFullYear(e,0,i),a.setHours(0,0,0,0);let l=Qi(a,r);return l.setDate(l.getDate()+s),l}o(yv,"setWeekYear");var s0e=yv;function xv(t,e,r){let n=b(t,r?.in);return isNaN(+n)?$(r?.in||t,NaN):(n.setFullYear(e),n)}o(xv,"setYear");var f0e=xv;function bv(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(bv,"startOfDecade");var d0e=bv;function wv(t){return rn(Date.now(),t)}o(wv,"startOfToday");var b0e=wv;function Sv(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(Sv,"startOfTomorrow");var T0e=Sv;function vv(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(vv,"startOfYesterday");var O0e=vv;function Zf(t,e,r){return en(t,-e,r)}o(Zf,"subMonths");var P0e=Zf;function kv(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=Zf(t,i+n*12,r),p=oi(f,a+s*7,r),h=c+l*60,d=(u+h*60)*1e3;return $(r?.in||t,+p-d)}o(kv,"sub");var $0e=kv;function Tv(t,e,r){return Eu(t,-e,r)}o(Tv,"subBusinessDays");var z0e=Tv;function Ev(t,e,r){return Du(t,-e,r)}o(Ev,"subHours");var Y0e=Ev;function Dv(t,e,r){return Qn(t,-e,r)}o(Dv,"subMilliseconds");var Q0e=Dv;function Cv(t,e,r){return ls(t,-e,r)}o(Cv,"subMinutes");var eSe=Cv;function Ov(t,e,r){return cs(t,-e,r)}o(Ov,"subQuarters");var iSe=Ov;function Iv(t,e,r){return Iu(t,-e,r)}o(Iv,"subSeconds");var lSe=Iv;function Mv(t,e,r){return Jn(t,-e,r)}o(Mv,"subWeeks");var pSe=Mv;function Nv(t,e,r){return Mu(t,-e,r)}o(Nv,"subYears");var gSe=Nv;function Pv(t){return Math.trunc(t*7)}o(Pv,"weeksToDays");var wSe=Pv;function Lv(t){return Math.trunc(t*365.2425)}o(Lv,"yearsToDays");var TSe=Lv;function _v(t){return Math.trunc(t*Su)}o(_v,"yearsToMonths");var OSe=_v;function Rv(t){return Math.trunc(t*vu)}o(Rv,"yearsToQuarters");var PSe=Rv;var $v=o(t=>Number.isFinite(t)?t:0,"toZeroIfInfinity");function fL(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($v(t*1e3)%1e3),nanoseconds:Math.trunc($v(t*1e6)%1e3)}}o(fL,"parseNumber");function pL(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(pL,"parseBigint");function bd(t){switch(typeof t){case"number":{if(Number.isFinite(t))return fL(t);break}case"bigint":return pL(t)}throw new TypeError("Expected a finite number or bigint")}o(bd,"parseMilliseconds");var hL=o(t=>t===0||t===0n,"isZero"),mL=o((t,e)=>e===1||e===1n?t:`${t}s`,"pluralize"),dL=1e-7,gL=24n*60n*60n*1000n;function el(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+dL);return(Math.round(h)/10**p).toFixed(p)},"floorDecimals"),a=o((f,p,h,m)=>{if(!((i.length===0||!e.colonNotation)&&hL(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?" "+mL(p,f):h;i.push(m)}},"add"),l=bd(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%gL):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(el,"prettyMilliseconds");var Xi=qn(Fv(),1),Bv=qn(Av(),1);Xi.default.extend(Bv.default);var tl=class{static{o(this,"CronJob")}constructor(e,r,n){this.status="initial",this.nextExecutionUnix=0,this.cronExpression=r,this.jobFunction=n,this.cronParser=new Ha.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()??1/0}start(){this.status="started"}stop(){this.status="stopped"}};var rl=class{static{o(this,"CronJobCollection")}constructor(){this.cronJobSet=new Set}add(e){this.cronJobSet.add(e)}remove(e){this.cronJobSet.delete(e)}getArray(){return[...this.cronJobSet]}isEmpty(){return this.cronJobSet.size===0}get length(){return this.cronJobSet.size}[Symbol.iterator](){return this.cronJobSet.values()}};var wd=class{static{o(this,"CronManager")}constructor(){this.executionTimeout=null,this.status="stopped",this.cronjobs=new rl,this.cycleWakeDeferred=null,this.cycleGeneration=0}wakeCycle(){this.cycleWakeDeferred&&this.cycleWakeDeferred.status==="pending"&&this.cycleWakeDeferred.resolve()}addCronjob(e,r){let n=new tl(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.cycleGeneration++,this.runCronCycle(this.cycleGeneration)}}isCurrentCycle(e){return this.status==="started"&&this.cycleGeneration===e}async runCronCycle(e){for(;this.isCurrentCycle(e);){let r=new Q.Deferred;this.cycleWakeDeferred=r;let n=1/0;for(let i of this.cronjobs.getArray()){i.checkExecution();let s=i.getTimeToNextExecution();s<n&&(n=s)}if(n<1/0&&n>0){let i=new Q.Timeout(n);this.executionTimeout=i,await Promise.race([i.promise,r.promise]),i.cancel()}else{if(n<=0)continue;await r.promise}}this.cycleGeneration===e&&(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 si={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")},Sd=o(t=>{let e=0,r=o(n=>{e=e+n},"addMilliSeconds");return t.years&&r(si.years(t.years)),t.months&&r(si.months(t.months)),t.weeks&&r(si.weeks(t.weeks)),t.days&&r(si.days(t.days)),t.hours&&r(si.hours(t.hours)),t.minutes&&r(si.minutes(t.minutes)),t.seconds&&r(si.seconds(t.seconds)),e},"getMilliSecondsFromUnits"),yL=o(t=>el(t),"getMilliSecondsAsHumanReadableString"),xL=o(t=>Za.formatDistanceToNow(new Date(t)),"getMilliSecondsAsHumanReadableAgoTime");var vd=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=t.parseEuropeanDate(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=t.parseEuropeanDate(e),s=o(u=>`0${u}`.slice(-2),"sliceDate"),a=`${i[3]}-${s(i[2])}-${s(i[1])}T${r}`,c=Xi.default(a).toDate().getTime();return new t(c)}static parseEuropeanDate(e){let r=/(.*)\.(.*)\.(.*)/.exec(e);if(!r)throw new Error(`"${e}" is not a European date like "28.03.2018"`);return r}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 Xi.default(this.getTime()).format(e)}isToday(){return Xi.default(this.getTime()).isToday()}lessTimePassedToNow(e){let r=Sd(e);return Date.now()-this.getTime()<r}moreTimePassedToNow(e){return!this.lessTimePassedToNow(e)}};var kd=class{static{o(this,"HrtMeasurement")}constructor(){this.nanoSeconds=null,this.milliSeconds=null,this._milliStart=null,this._milliDiff=null}start(){this._milliStart=performance.now()}stop(){return this._milliStart===null?(console.log("Hasn't started yet"),this):(this._milliDiff=performance.now()-this._milliStart,this.nanoSeconds=this._milliDiff*1e6,this.milliSeconds=this._milliDiff,this)}reset(){this.nanoSeconds=null,this.milliSeconds=null,this._milliStart=null,this._milliDiff=null}};var Td=class{static{o(this,"Interval")}constructor(e){this.status="initial",this.currentRun=null,this.intervalJobs=[],this.intervalMilliseconds=e}start(){this.endCurrentRun(),this.status="started";let e={timeout:null,stopped:Q.defer()};this.currentRun=e,o(async()=>{for(;this.currentRun===e&&(e.timeout=new Q.Timeout(this.intervalMilliseconds),await Promise.race([e.timeout.promise,e.stopped.promise]),this.currentRun===e);)this.executeIntervalJobs()},"runInterval")()}stop(){this.status="stopped",this.endCurrentRun()}addIntervalJob(e){this.intervalJobs.push(e)}endCurrentRun(){let e=this.currentRun;e&&(this.currentRun=null,e.timeout?.cancel(),e.stopped.resolve())}executeIntervalJobs(){for(let e of this.intervalJobs)e()}};var Cs=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,this.date=e?new Date(e):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 Ed=class{static{o(this,"Timer")}get timeLeft(){let e=this.pausedAt?.change;if(e==null)throw new Error("timer has NOT been paused before. timeLeft is known after .pause()");return this.timeInMilliseconds-e}constructor(e){this.state="initiated",this.startedAt=null,this.pausedAt=null,this.currentTimeout=null,this.completedDeferred=Q.defer(),this.timeInMilliseconds=e,this.completed=this.completedDeferred.promise}start(){if(!this.startedAt)this.startTimeout(this.timeInMilliseconds),this.startedAt=new Cs;else throw new Error("timer has been started before. Please use resume instead")}pause(){this.startedAt&&(this.currentTimeout?.cancel(),this.currentTimeout=null,this.pausedAt=Cs.fromTimeStamp(this.startedAt))}resume(){if(this.startedAt)this.startTimeout(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}startTimeout(e){this.currentTimeout?.cancel();let r=new Q.Timeout(e);this.currentTimeout=r,r.promise.then(()=>{this.completedDeferred.resolve()})}};var tp=qn(Qv(),1);var Cd=class{static{o(this,"AsyncExecutionStack")}executionSlots=[];isProcessing=!1;nonExclusiveMaxConcurrency=1/0;nonExclusiveCurrentCount=0;nonExclusivePendingQueue=[];async getExclusiveExecutionSlot(e,r){let n=Q.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=Q.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 Q.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 Q.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 Od=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 eo=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 Jv=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"),Tn=class t{static{o(this,"ObjectMap")}fastMap=new eo;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=Jv("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 nl=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 Q.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 Q.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 Id=class{static{o(this,"InterestMap")}options;interestObjectMap=new Tn;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 nl(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 Md=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 Nd=class{static{o(this,"LoopTracker")}referenceObjectMap=new Tn;constructor(){}checkAndTrack(e){return this.referenceObjectMap.checkForObject(e)?!1:(this.referenceObjectMap.add(e),!0)}reset(){this.referenceObjectMap.wipe()}destroy(){this.referenceObjectMap.destroy()}};var il=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 Na.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=Q.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 ol=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 Pd=class{static{o(this,"Tree")}symbolTree;constructor(){this.symbolTree=new tp.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 to={};se(to,{base64ToUint8Array:()=>HL,ensurePureUint8Array:()=>YL,isBufferLike:()=>qL,isUint8Array:()=>WL,uInt8ArrayExtras:()=>UL,uInt8ArrayToBase64:()=>zL});var fi={};se(fi,{areUint8ArraysEqual:()=>OL,assertUint8Array:()=>ui,assertUint8ArrayOrArrayBuffer:()=>rk,base64ToString:()=>_L,base64ToUint8Array:()=>sk,compareUint8Arrays:()=>IL,concatUint8Arrays:()=>CL,getUintBE:()=>$L,hexToUint8Array:()=>AL,includes:()=>BL,indexOf:()=>ak,isUint8Array:()=>Ld,stringToBase64:()=>LL,stringToUint8Array:()=>ik,toUint8Array:()=>DL,uint8ArrayToBase64:()=>ok,uint8ArrayToHex:()=>FL,uint8ArrayToString:()=>nk});var SL=Object.prototype.toString,vL="[object Uint8Array]",kL="[object ArrayBuffer]";function Xv(t,e,r){return t?t.constructor===e?!0:SL.call(t)===r:!1}o(Xv,"isType");function Ld(t){return Xv(t,Uint8Array,vL)}o(Ld,"isUint8Array");function TL(t){return Xv(t,ArrayBuffer,kL)}o(TL,"isArrayBuffer");function EL(t){return Ld(t)||TL(t)}o(EL,"isUint8ArrayOrArrayBuffer");function ui(t){if(!Ld(t))throw new TypeError(`Expected \`Uint8Array\`, got \`${typeof t}\``)}o(ui,"assertUint8Array");function rk(t){if(!EL(t))throw new TypeError(`Expected \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof t}\``)}o(rk,"assertUint8ArrayOrArrayBuffer");function DL(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(DL,"toUint8Array");function CL(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)ui(i),r.set(i,n),n+=i.length;return r}o(CL,"concatUint8Arrays");function OL(t,e){if(ui(t),ui(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(OL,"areUint8ArraysEqual");function IL(t,e){ui(t),ui(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(IL,"compareUint8Arrays");var Zv={utf8:new globalThis.TextDecoder("utf8")};function nk(t,e="utf8"){return rk(t),Zv[e]??=new globalThis.TextDecoder(e),Zv[e].decode(t)}o(nk,"uint8ArrayToString");function sl(t){if(typeof t!="string")throw new TypeError(`Expected \`string\`, got \`${typeof t}\``)}o(sl,"assertString");var ML=new globalThis.TextEncoder;function ik(t){return sl(t),ML.encode(t)}o(ik,"stringToUint8Array");function NL(t){return t.replaceAll("+","-").replaceAll("/","_").replace(/=+$/,"")}o(NL,"base64ToBase64Url");function PL(t){let e=t.replaceAll("-","+").replaceAll("_","/"),r=(4-e.length%4)%4;return e+"=".repeat(r)}o(PL,"base64UrlToBase64");var ek=65535;function ok(t,{urlSafe:e=!1}={}){ui(t);let r="";for(let n=0;n<t.length;n+=ek){let i=t.subarray(n,n+ek);r+=globalThis.btoa(String.fromCodePoint.apply(void 0,i))}return e?NL(r):r}o(ok,"uint8ArrayToBase64");function sk(t){return sl(t),Uint8Array.from(globalThis.atob(PL(t)),e=>e.codePointAt(0))}o(sk,"base64ToUint8Array");function LL(t,{urlSafe:e=!1}={}){return sl(t),ok(ik(t),{urlSafe:e})}o(LL,"stringToBase64");function _L(t){return sl(t),nk(sk(t))}o(_L,"base64ToString");var RL=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function FL(t){ui(t);let e="";for(let r=0;r<t.length;r++)e+=RL[t[r]];return e}o(FL,"uint8ArrayToHex");var tk={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 AL(t){if(sl(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=tk[t[n*2]],s=tk[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(AL,"hexToUint8Array");function $L(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($L,"getUintBE");function ak(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(ak,"indexOf");function BL(t,e){return ak(t,e)!==-1}o(BL,"includes");var UL=fi;function zL(t){return fi.uint8ArrayToBase64(t)}o(zL,"uInt8ArrayToBase64");function HL(t){return fi.base64ToUint8Array(t)}o(HL,"base64ToUint8Array");var WL=o(t=>fi.isUint8Array(t),"isUint8Array");function qL(t){return t&&typeof t.byteLength=="number"?!0:typeof Buffer<"u"&&Buffer.isBuffer?Buffer.isBuffer(t):!1}o(qL,"isBufferLike");function YL(t){let e=new Uint8Array(t.length);return e.set(t),e}o(YL,"ensurePureUint8Array");var ul={};se(ul,{Guard:()=>al,GuardError:()=>ll,GuardSet:()=>cl,passGuardsOrReject:()=>VL});var al=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 ll=class extends Error{static{o(this,"GuardError")}constructor(e){super(e),this.name="GuardError"}};var cl=class extends al{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 VL=o(async(t,e)=>{let r=new cl(e);if(!await r.allGuardsPass(t)){let i=await r.getFailedHint(t);throw new ll(`Guards failed:
4
4
  ${i}
5
- `)}},"passGuardsOrReject");var xl={};se(xl,{HttpCache:()=>vp});var Nr={};se(Nr,{TypedrequestCache:()=>Gd,WebStore:()=>dl});var to={};se(to,{Smartenv:()=>Ld});var Ld=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=Q.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 er={};se(er,{Smartjson:()=>Kd,deepEqualJsonLStrings:()=>Z_,deepEqualObjects:()=>Uk,foldDec:()=>X_,parse:()=>mp,parseBase64:()=>J_,parseJsonL:()=>Vd,stableOneWayStringify:()=>K_,stringify:()=>no,stringifyBase64:()=>Q_,stringifyJsonL:()=>V_,stringifyPretty:()=>G_});var an={};se(an,{Base64:()=>cp,Domain:()=>fp,GitRepo:()=>pp,base64:()=>Ms,create:()=>ip,docker:()=>op,encoding:()=>sp,indent:()=>ap,normalize:()=>lp,type:()=>up});var ip={};se(ip,{createCryptoRandomString:()=>O_,createRandomString:()=>C_});var Mr={};se(Mr,{shortId:()=>b_,uni:()=>v_,uniSimple:()=>k_,uuid4:()=>w_,uuid5:()=>S_});var ul={};se(ul,{customAlphabet:()=>KL,customRandom:()=>lk,nanoid:()=>GL,random:()=>ak,urlAlphabet:()=>tp});var tp="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var ak=o(t=>crypto.getRandomValues(new Uint8Array(t)),"random"),lk=o((t,e,r)=>{let n=256-256%t.length;if(n===256){let s=t.length-1;return(a=e)=>{if(!a)return"";let l="";for(;;){let c=r(a),u=a;for(;u--;)if(l+=t[c[u]&s],l.length>=a)return l}}}let i=Math.ceil(1.6*256*e/n);return(s=e)=>{if(!s)return"";let a="";for(;;){let l=r(i),c=i;for(;c--;)if(l[c]<n&&(a+=t[l[c]%t.length],a.length>=s))return a}}},"customRandom"),KL=o((t,e=21)=>lk(t,e|0,ak),"customAlphabet"),GL=o((t=21)=>{let e="",r=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=tp[r[t]&63];return e},"nanoid");var ro={};se(ro,{MAX:()=>ck,NIL:()=>uk,parse:()=>Tn,stringify:()=>pk,v1:()=>rp,v1ToV6:()=>pl,v3:()=>gk,v4:()=>yk,v5:()=>bk,v6:()=>wk,v6ToV1:()=>Bd,v7:()=>vk,validate:()=>fi,version:()=>kk});var ck="ffffffff-ffff-ffff-ffff-ffffffffffff";var uk="00000000-0000-0000-0000-000000000000";var fk=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function QL(t){return typeof t=="string"&&fk.test(t)}o(QL,"validate");var fi=QL;function JL(t){if(!fi(t))throw TypeError("Invalid UUID");let e;return Uint8Array.of((e=parseInt(t.slice(0,8),16))>>>24,e>>>16&255,e>>>8&255,e&255,(e=parseInt(t.slice(9,13),16))>>>8,e&255,(e=parseInt(t.slice(14,18),16))>>>8,e&255,(e=parseInt(t.slice(19,23),16))>>>8,e&255,(e=parseInt(t.slice(24,36),16))/1099511627776&255,e/4294967296&255,e>>>24&255,e>>>16&255,e>>>8&255,e&255)}o(JL,"parse");var Tn=JL;var pt=[];for(let t=0;t<256;++t)pt.push((t+256).toString(16).slice(1));function Nt(t,e=0){return(pt[t[e+0]]+pt[t[e+1]]+pt[t[e+2]]+pt[t[e+3]]+"-"+pt[t[e+4]]+pt[t[e+5]]+"-"+pt[t[e+6]]+pt[t[e+7]]+"-"+pt[t[e+8]]+pt[t[e+9]]+"-"+pt[t[e+10]]+pt[t[e+11]]+pt[t[e+12]]+pt[t[e+13]]+pt[t[e+14]]+pt[t[e+15]]).toLowerCase()}o(Nt,"unsafeStringify");function XL(t,e=0){let r=Nt(t,e);if(!fi(r))throw TypeError("Stringified UUID is invalid");return r}o(XL,"stringify");var pk=XL;var _d,ZL=new Uint8Array(16);function En(){if(!_d){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");_d=crypto.getRandomValues.bind(crypto)}return _d(ZL)}o(En,"rng");var fl={};function e_(t,e,r){let n,i=t?._v6??!1;if(t){let s=Object.keys(t);s.length===1&&s[0]==="_v6"&&(t=void 0)}if(t)n=hk(t.random??t.rng?.()??En(),t.msecs,t.nsecs,t.clockseq,t.node,e,r);else{let s=Date.now(),a=En();t_(fl,s,a),n=hk(a,fl.msecs,fl.nsecs,i?void 0:fl.clockseq,i?void 0:fl.node,e,r)}return e??Nt(n)}o(e_,"v1");function t_(t,e,r){return t.msecs??=-1/0,t.nsecs??=0,e===t.msecs?(t.nsecs++,t.nsecs>=1e4&&(t.node=void 0,t.nsecs=0)):e>t.msecs?t.nsecs=0:e<t.msecs&&(t.node=void 0),t.node||(t.node=r.slice(10,16),t.node[0]|=1,t.clockseq=(r[8]<<8|r[9])&16383),t.msecs=e,t}o(t_,"updateV1State");function hk(t,e,r,n,i,s,a=0){if(t.length<16)throw new Error("Random bytes length must be >= 16");if(!s)s=new Uint8Array(16),a=0;else if(a<0||a+16>s.length)throw new RangeError(`UUID byte range ${a}:${a+15} is out of buffer bounds`);e??=Date.now(),r??=0,n??=(t[8]<<8|t[9])&16383,i??=t.slice(10,16),e+=122192928e5;let l=((e&268435455)*1e4+r)%4294967296;s[a++]=l>>>24&255,s[a++]=l>>>16&255,s[a++]=l>>>8&255,s[a++]=l&255;let c=e/4294967296*1e4&268435455;s[a++]=c>>>8&255,s[a++]=c&255,s[a++]=c>>>24&15|16,s[a++]=c>>>16&255,s[a++]=n>>>8|128,s[a++]=n&255;for(let u=0;u<6;++u)s[a++]=i[u];return s}o(hk,"v1Bytes");var rp=e_;function pl(t){let e=typeof t=="string"?Tn(t):t,r=r_(e);return typeof t=="string"?Nt(r):r}o(pl,"v1ToV6");function r_(t){return Uint8Array.of((t[6]&15)<<4|t[7]>>4&15,(t[7]&15)<<4|(t[4]&240)>>4,(t[4]&15)<<4|(t[5]&240)>>4,(t[5]&15)<<4|(t[0]&240)>>4,(t[0]&15)<<4|(t[1]&240)>>4,(t[1]&15)<<4|(t[2]&240)>>4,96|t[2]&15,t[3],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}o(r_,"_v1ToV6");function n_(t){let e=s_(t),r=o_(e,t.length*8);return i_(r)}o(n_,"md5");function i_(t){let e=new Uint8Array(t.length*4);for(let r=0;r<t.length*4;r++)e[r]=t[r>>2]>>>r%4*8&255;return e}o(i_,"uint32ToUint8");function mk(t){return(t+64>>>9<<4)+14+1}o(mk,"getOutputLength");function o_(t,e){let r=new Uint32Array(mk(e)).fill(0);r.set(t),r[e>>5]|=128<<e%32,r[r.length-1]=e,t=r;let n=1732584193,i=-271733879,s=-1732584194,a=271733878;for(let l=0;l<t.length;l+=16){let c=n,u=i,f=s,p=a;n=St(n,i,s,a,t[l],7,-680876936),a=St(a,n,i,s,t[l+1],12,-389564586),s=St(s,a,n,i,t[l+2],17,606105819),i=St(i,s,a,n,t[l+3],22,-1044525330),n=St(n,i,s,a,t[l+4],7,-176418897),a=St(a,n,i,s,t[l+5],12,1200080426),s=St(s,a,n,i,t[l+6],17,-1473231341),i=St(i,s,a,n,t[l+7],22,-45705983),n=St(n,i,s,a,t[l+8],7,1770035416),a=St(a,n,i,s,t[l+9],12,-1958414417),s=St(s,a,n,i,t[l+10],17,-42063),i=St(i,s,a,n,t[l+11],22,-1990404162),n=St(n,i,s,a,t[l+12],7,1804603682),a=St(a,n,i,s,t[l+13],12,-40341101),s=St(s,a,n,i,t[l+14],17,-1502002290),i=St(i,s,a,n,t[l+15],22,1236535329),n=vt(n,i,s,a,t[l+1],5,-165796510),a=vt(a,n,i,s,t[l+6],9,-1069501632),s=vt(s,a,n,i,t[l+11],14,643717713),i=vt(i,s,a,n,t[l],20,-373897302),n=vt(n,i,s,a,t[l+5],5,-701558691),a=vt(a,n,i,s,t[l+10],9,38016083),s=vt(s,a,n,i,t[l+15],14,-660478335),i=vt(i,s,a,n,t[l+4],20,-405537848),n=vt(n,i,s,a,t[l+9],5,568446438),a=vt(a,n,i,s,t[l+14],9,-1019803690),s=vt(s,a,n,i,t[l+3],14,-187363961),i=vt(i,s,a,n,t[l+8],20,1163531501),n=vt(n,i,s,a,t[l+13],5,-1444681467),a=vt(a,n,i,s,t[l+2],9,-51403784),s=vt(s,a,n,i,t[l+7],14,1735328473),i=vt(i,s,a,n,t[l+12],20,-1926607734),n=kt(n,i,s,a,t[l+5],4,-378558),a=kt(a,n,i,s,t[l+8],11,-2022574463),s=kt(s,a,n,i,t[l+11],16,1839030562),i=kt(i,s,a,n,t[l+14],23,-35309556),n=kt(n,i,s,a,t[l+1],4,-1530992060),a=kt(a,n,i,s,t[l+4],11,1272893353),s=kt(s,a,n,i,t[l+7],16,-155497632),i=kt(i,s,a,n,t[l+10],23,-1094730640),n=kt(n,i,s,a,t[l+13],4,681279174),a=kt(a,n,i,s,t[l],11,-358537222),s=kt(s,a,n,i,t[l+3],16,-722521979),i=kt(i,s,a,n,t[l+6],23,76029189),n=kt(n,i,s,a,t[l+9],4,-640364487),a=kt(a,n,i,s,t[l+12],11,-421815835),s=kt(s,a,n,i,t[l+15],16,530742520),i=kt(i,s,a,n,t[l+2],23,-995338651),n=Tt(n,i,s,a,t[l],6,-198630844),a=Tt(a,n,i,s,t[l+7],10,1126891415),s=Tt(s,a,n,i,t[l+14],15,-1416354905),i=Tt(i,s,a,n,t[l+5],21,-57434055),n=Tt(n,i,s,a,t[l+12],6,1700485571),a=Tt(a,n,i,s,t[l+3],10,-1894986606),s=Tt(s,a,n,i,t[l+10],15,-1051523),i=Tt(i,s,a,n,t[l+1],21,-2054922799),n=Tt(n,i,s,a,t[l+8],6,1873313359),a=Tt(a,n,i,s,t[l+15],10,-30611744),s=Tt(s,a,n,i,t[l+6],15,-1560198380),i=Tt(i,s,a,n,t[l+13],21,1309151649),n=Tt(n,i,s,a,t[l+4],6,-145523070),a=Tt(a,n,i,s,t[l+11],10,-1120210379),s=Tt(s,a,n,i,t[l+2],15,718787259),i=Tt(i,s,a,n,t[l+9],21,-343485551),n=pi(n,c),i=pi(i,u),s=pi(s,f),a=pi(a,p)}return Uint32Array.of(n,i,s,a)}o(o_,"wordsToMd5");function s_(t){if(t.length===0)return new Uint32Array;let e=new Uint32Array(mk(t.length*8)).fill(0);for(let r=0;r<t.length;r++)e[r>>2]|=(t[r]&255)<<r%4*8;return e}o(s_,"uint8ToUint32");function pi(t,e){let r=(t&65535)+(e&65535);return(t>>16)+(e>>16)+(r>>16)<<16|r&65535}o(pi,"safeAdd");function a_(t,e){return t<<e|t>>>32-e}o(a_,"bitRotateLeft");function np(t,e,r,n,i,s){return pi(a_(pi(pi(e,t),pi(n,s)),i),r)}o(np,"md5cmn");function St(t,e,r,n,i,s,a){return np(e&r|~e&n,t,e,i,s,a)}o(St,"md5ff");function vt(t,e,r,n,i,s,a){return np(e&n|r&~n,t,e,i,s,a)}o(vt,"md5gg");function kt(t,e,r,n,i,s,a){return np(e^r^n,t,e,i,s,a)}o(kt,"md5hh");function Tt(t,e,r,n,i,s,a){return np(r^(e|~n),t,e,i,s,a)}o(Tt,"md5ii");var dk=n_;function l_(t){t=unescape(encodeURIComponent(t));let e=new Uint8Array(t.length);for(let r=0;r<t.length;++r)e[r]=t.charCodeAt(r);return e}o(l_,"stringToBytes");var Os="6ba7b810-9dad-11d1-80b4-00c04fd430c8",Is="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function hl(t,e,r,n,i,s){let a=typeof r=="string"?l_(r):r,l=typeof n=="string"?Tn(n):n;if(typeof n=="string"&&(n=Tn(n)),n?.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let c=new Uint8Array(16+a.length);if(c.set(l),c.set(a,l.length),c=e(c),c[6]=c[6]&15|t,c[8]=c[8]&63|128,i){if(s=s||0,s<0||s+16>i.length)throw new RangeError(`UUID byte range ${s}:${s+15} is out of buffer bounds`);for(let u=0;u<16;++u)i[s+u]=c[u];return i}return Nt(c)}o(hl,"v35");function Rd(t,e,r,n){return hl(48,dk,t,e,r,n)}o(Rd,"v3"),Rd.DNS=Os,Rd.URL=Is;var gk=Rd;var c_=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Fd={randomUUID:c_};function u_(t,e,r){if(Fd.randomUUID&&!e&&!t)return Fd.randomUUID();t=t||{};let n=t.random??t.rng?.()??En();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){if(r=r||0,r<0||r+16>e.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let i=0;i<16;++i)e[r+i]=n[i];return e}return Nt(n)}o(u_,"v4");var yk=u_;function f_(t,e,r,n){switch(t){case 0:return e&r^~e&n;case 1:return e^r^n;case 2:return e&r^e&n^r&n;case 3:return e^r^n}}o(f_,"f");function Ad(t,e){return t<<e|t>>>32-e}o(Ad,"ROTL");function p_(t){let e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520],n=new Uint8Array(t.length+1);n.set(t),n[t.length]=128,t=n;let i=t.length/4+2,s=Math.ceil(i/16),a=new Array(s);for(let l=0;l<s;++l){let c=new Uint32Array(16);for(let u=0;u<16;++u)c[u]=t[l*64+u*4]<<24|t[l*64+u*4+1]<<16|t[l*64+u*4+2]<<8|t[l*64+u*4+3];a[l]=c}a[s-1][14]=(t.length-1)*8/Math.pow(2,32),a[s-1][14]=Math.floor(a[s-1][14]),a[s-1][15]=(t.length-1)*8&4294967295;for(let l=0;l<s;++l){let c=new Uint32Array(80);for(let d=0;d<16;++d)c[d]=a[l][d];for(let d=16;d<80;++d)c[d]=Ad(c[d-3]^c[d-8]^c[d-14]^c[d-16],1);let u=r[0],f=r[1],p=r[2],h=r[3],m=r[4];for(let d=0;d<80;++d){let g=Math.floor(d/20),y=Ad(u,5)+f_(g,f,p,h)+m+e[g]+c[d]>>>0;m=h,h=p,p=Ad(f,30)>>>0,f=u,u=y}r[0]=r[0]+u>>>0,r[1]=r[1]+f>>>0,r[2]=r[2]+p>>>0,r[3]=r[3]+h>>>0,r[4]=r[4]+m>>>0}return Uint8Array.of(r[0]>>24,r[0]>>16,r[0]>>8,r[0],r[1]>>24,r[1]>>16,r[1]>>8,r[1],r[2]>>24,r[2]>>16,r[2]>>8,r[2],r[3]>>24,r[3]>>16,r[3]>>8,r[3],r[4]>>24,r[4]>>16,r[4]>>8,r[4])}o(p_,"sha1");var xk=p_;function $d(t,e,r,n){return hl(80,xk,t,e,r,n)}o($d,"v5"),$d.DNS=Os,$d.URL=Is;var bk=$d;function h_(t,e,r){t??={},r??=0;let n=rp({...t,_v6:!0},new Uint8Array(16));if(n=pl(n),e){if(r<0||r+16>e.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let i=0;i<16;i++)e[r+i]=n[i];return e}return Nt(n)}o(h_,"v6");var wk=h_;function Bd(t){let e=typeof t=="string"?Tn(t):t,r=m_(e);return typeof t=="string"?Nt(r):r}o(Bd,"v6ToV1");function m_(t){return Uint8Array.of((t[3]&15)<<4|t[4]>>4&15,(t[4]&15)<<4|(t[5]&240)>>4,(t[5]&15)<<4|t[6]&15,t[7],(t[1]&15)<<4|(t[2]&240)>>4,(t[2]&15)<<4|(t[3]&240)>>4,16|(t[0]&240)>>4,(t[0]&15)<<4|(t[1]&240)>>4,t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}o(m_,"_v6ToV1");var jd={};function d_(t,e,r){let n;if(t)n=Sk(t.random??t.rng?.()??En(),t.msecs,t.seq,e,r);else{let i=Date.now(),s=En();g_(jd,i,s),n=Sk(s,jd.msecs,jd.seq,e,r)}return e??Nt(n)}o(d_,"v7");function g_(t,e,r){return t.msecs??=-1/0,t.seq??=0,e>t.msecs?(t.seq=r[6]<<23|r[7]<<16|r[8]<<8|r[9],t.msecs=e):(t.seq=t.seq+1|0,t.seq===0&&t.msecs++),t}o(g_,"updateV7State");function Sk(t,e,r,n,i=0){if(t.length<16)throw new Error("Random bytes length must be >= 16");if(!n)n=new Uint8Array(16),i=0;else if(i<0||i+16>n.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);return e??=Date.now(),r??=t[6]*127<<24|t[7]<<16|t[8]<<8|t[9],n[i++]=e/1099511627776&255,n[i++]=e/4294967296&255,n[i++]=e/16777216&255,n[i++]=e/65536&255,n[i++]=e/256&255,n[i++]=e&255,n[i++]=112|r>>>28&15,n[i++]=r>>>20&255,n[i++]=128|r>>>14&63,n[i++]=r>>>6&255,n[i++]=r<<2&255|t[10]&3,n[i++]=t[11],n[i++]=t[12],n[i++]=t[13],n[i++]=t[14],n[i++]=t[15],n}o(Sk,"v7Bytes");var vk=d_;function y_(t){if(!fi(t))throw TypeError("Invalid UUID");return parseInt(t.slice(14,15),16)}o(y_,"version");var kk=y_;var b_=o(t=>ul.nanoid(t),"shortId"),w_=o(()=>ro.v4(),"uuid4"),S_=o((t,e=ro.v5.DNS)=>ro.v5(t,e),"uuid5"),v_=o((t="uni",e=24)=>`${t}_${"x".repeat(e).replace(/[xy]/g,r=>{let n=Math.random()*16|0;return(r==="x"?n:n&3|8).toString(16)})}`,"uni"),k_=o((t="uni",e=8)=>`${t}${"x".repeat(e).replace(/[xy]/g,r=>{let n=Math.random()*16|0;return(r==="x"?n:n&3|8).toString(16)})}`,"uniSimple");var E_=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"),D_=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=E_(0,l.length);s+=l[c]}else s+=a;return s},"customRandomatic"),C_=o((t,e,r)=>D_(t,e,r),"createRandomString"),O_=o(()=>Mr.uni(),"createCryptoRandomString");var op={};se(op,{makeEnvObject:()=>I_});var I_=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 sp={};se(sp,{decodeText:()=>P_,decodeUtf8OrWindows1252:()=>L_,decodeWindows1252:()=>Ud,encodeWindows1252:()=>N_,encodingOfLabel:()=>Ok,isValidUtf8:()=>Ck,windows1252ByteOf:()=>Dk});var Tk=[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],M_=new Map(Tk.map((t,e)=>[t,128+e])),Ek=4096,Ud=o(t=>{let e="";for(let r=0;r<t.length;r+=Ek){let n=t.subarray(r,r+Ek);e+=String.fromCharCode(...Array.from(n,i=>i>=128&&i<=159?Tk[i-128]:i))}return e},"decodeWindows1252"),Dk=o(t=>t<=127||t>=160&&t<=255?t:M_.get(t),"windows1252ByteOf"),N_=o(t=>{let e=[],r=[],n=0;for(let i of t){let s=Dk(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"),Ck=o(t=>{try{return new TextDecoder("utf-8",{fatal:!0}).decode(t),!0}catch{return!1}},"isValidUtf8"),Ok=o(t=>{try{return new TextDecoder(t).encoding}catch{return}},"encodingOfLabel"),P_=o((t,e,r={})=>{let n=Ok(e);if(n!==void 0)return n==="windows-1252"?Ud(t):new TextDecoder(n,{fatal:r.fatal??!1}).decode(t)},"decodeText"),L_=o(t=>Ck(t)?{text:new TextDecoder("utf-8").decode(t),encoding:"utf-8"}:{text:Ud(t),encoding:"windows-1252"},"decodeUtf8OrWindows1252");var ap={};se(ap,{indent:()=>R_,indentWithPrefix:()=>F_,normalize:()=>A_});var zd=o(t=>{let e=t.split(`
6
- `);return __(e)},"splitStringAtLineBreak"),Hd=o(t=>{let e="";for(let r of t)e=e+r+`
7
- `;return e},"joinStringWithLineBreaks"),__=o(t=>{let e=/^[\s]*$/;return e.test(t[0])&&t.shift(),e.test(t[t.length-1])&&t.pop(),t},"cleanStringArray"),R_=o((t,e)=>{let r=zd(t);for(let i of r)i=" ".repeat(e)+i;return Hd(r)},"indent"),F_=o((t,e)=>{let r,n=zd(t),i=[];for(let s of n)i.push(e+s);return r=Hd(i),r},"indentWithPrefix"),A_=o(t=>{let e,r=zd(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=Hd(a),e},"normalize");var lp={};se(lp,{replaceAll:()=>Ik,standard:()=>B_});var Ik=o((t,e,r)=>t.replace(new RegExp(e,"g"),r),"replaceAll"),$_=o(t=>{let e=t.split(`
5
+ `)}},"passGuardsOrReject");var bl={};se(bl,{HttpCache:()=>kp});var Nr={};se(Nr,{TypedrequestCache:()=>Qd,WebStore:()=>gl});var ro={};se(ro,{Smartenv:()=>_d});var _d=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=Q.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 er={};se(er,{Smartjson:()=>Gd,deepEqualJsonLStrings:()=>eR,deepEqualObjects:()=>zk,foldDec:()=>Z_,parse:()=>dp,parseBase64:()=>X_,parseJsonL:()=>Kd,stableOneWayStringify:()=>G_,stringify:()=>io,stringifyBase64:()=>J_,stringifyJsonL:()=>K_,stringifyPretty:()=>Q_});var an={};se(an,{Base64:()=>up,Domain:()=>pp,GitRepo:()=>hp,base64:()=>Ns,create:()=>op,docker:()=>sp,encoding:()=>ap,indent:()=>lp,normalize:()=>cp,type:()=>fp});var op={};se(op,{createCryptoRandomString:()=>I_,createRandomString:()=>O_});var Mr={};se(Mr,{shortId:()=>w_,uni:()=>k_,uniSimple:()=>T_,uuid4:()=>S_,uuid5:()=>v_});var fl={};se(fl,{customAlphabet:()=>GL,customRandom:()=>ck,nanoid:()=>QL,random:()=>lk,urlAlphabet:()=>rp});var rp="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var lk=o(t=>crypto.getRandomValues(new Uint8Array(t)),"random"),ck=o((t,e,r)=>{let n=256-256%t.length;if(n===256){let s=t.length-1;return(a=e)=>{if(!a)return"";let l="";for(;;){let c=r(a),u=a;for(;u--;)if(l+=t[c[u]&s],l.length>=a)return l}}}let i=Math.ceil(1.6*256*e/n);return(s=e)=>{if(!s)return"";let a="";for(;;){let l=r(i),c=i;for(;c--;)if(l[c]<n&&(a+=t[l[c]%t.length],a.length>=s))return a}}},"customRandom"),GL=o((t,e=21)=>ck(t,e|0,lk),"customAlphabet"),QL=o((t=21)=>{let e="",r=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=rp[r[t]&63];return e},"nanoid");var no={};se(no,{MAX:()=>uk,NIL:()=>fk,parse:()=>En,stringify:()=>hk,v1:()=>np,v1ToV6:()=>hl,v3:()=>yk,v4:()=>xk,v5:()=>wk,v6:()=>Sk,v6ToV1:()=>jd,v7:()=>kk,validate:()=>pi,version:()=>Tk});var uk="ffffffff-ffff-ffff-ffff-ffffffffffff";var fk="00000000-0000-0000-0000-000000000000";var pk=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function JL(t){return typeof t=="string"&&pk.test(t)}o(JL,"validate");var pi=JL;function XL(t){if(!pi(t))throw TypeError("Invalid UUID");let e;return Uint8Array.of((e=parseInt(t.slice(0,8),16))>>>24,e>>>16&255,e>>>8&255,e&255,(e=parseInt(t.slice(9,13),16))>>>8,e&255,(e=parseInt(t.slice(14,18),16))>>>8,e&255,(e=parseInt(t.slice(19,23),16))>>>8,e&255,(e=parseInt(t.slice(24,36),16))/1099511627776&255,e/4294967296&255,e>>>24&255,e>>>16&255,e>>>8&255,e&255)}o(XL,"parse");var En=XL;var pt=[];for(let t=0;t<256;++t)pt.push((t+256).toString(16).slice(1));function Nt(t,e=0){return(pt[t[e+0]]+pt[t[e+1]]+pt[t[e+2]]+pt[t[e+3]]+"-"+pt[t[e+4]]+pt[t[e+5]]+"-"+pt[t[e+6]]+pt[t[e+7]]+"-"+pt[t[e+8]]+pt[t[e+9]]+"-"+pt[t[e+10]]+pt[t[e+11]]+pt[t[e+12]]+pt[t[e+13]]+pt[t[e+14]]+pt[t[e+15]]).toLowerCase()}o(Nt,"unsafeStringify");function ZL(t,e=0){let r=Nt(t,e);if(!pi(r))throw TypeError("Stringified UUID is invalid");return r}o(ZL,"stringify");var hk=ZL;var Rd,e_=new Uint8Array(16);function Dn(){if(!Rd){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Rd=crypto.getRandomValues.bind(crypto)}return Rd(e_)}o(Dn,"rng");var pl={};function t_(t,e,r){let n,i=t?._v6??!1;if(t){let s=Object.keys(t);s.length===1&&s[0]==="_v6"&&(t=void 0)}if(t)n=mk(t.random??t.rng?.()??Dn(),t.msecs,t.nsecs,t.clockseq,t.node,e,r);else{let s=Date.now(),a=Dn();r_(pl,s,a),n=mk(a,pl.msecs,pl.nsecs,i?void 0:pl.clockseq,i?void 0:pl.node,e,r)}return e??Nt(n)}o(t_,"v1");function r_(t,e,r){return t.msecs??=-1/0,t.nsecs??=0,e===t.msecs?(t.nsecs++,t.nsecs>=1e4&&(t.node=void 0,t.nsecs=0)):e>t.msecs?t.nsecs=0:e<t.msecs&&(t.node=void 0),t.node||(t.node=r.slice(10,16),t.node[0]|=1,t.clockseq=(r[8]<<8|r[9])&16383),t.msecs=e,t}o(r_,"updateV1State");function mk(t,e,r,n,i,s,a=0){if(t.length<16)throw new Error("Random bytes length must be >= 16");if(!s)s=new Uint8Array(16),a=0;else if(a<0||a+16>s.length)throw new RangeError(`UUID byte range ${a}:${a+15} is out of buffer bounds`);e??=Date.now(),r??=0,n??=(t[8]<<8|t[9])&16383,i??=t.slice(10,16),e+=122192928e5;let l=((e&268435455)*1e4+r)%4294967296;s[a++]=l>>>24&255,s[a++]=l>>>16&255,s[a++]=l>>>8&255,s[a++]=l&255;let c=e/4294967296*1e4&268435455;s[a++]=c>>>8&255,s[a++]=c&255,s[a++]=c>>>24&15|16,s[a++]=c>>>16&255,s[a++]=n>>>8|128,s[a++]=n&255;for(let u=0;u<6;++u)s[a++]=i[u];return s}o(mk,"v1Bytes");var np=t_;function hl(t){let e=typeof t=="string"?En(t):t,r=n_(e);return typeof t=="string"?Nt(r):r}o(hl,"v1ToV6");function n_(t){return Uint8Array.of((t[6]&15)<<4|t[7]>>4&15,(t[7]&15)<<4|(t[4]&240)>>4,(t[4]&15)<<4|(t[5]&240)>>4,(t[5]&15)<<4|(t[0]&240)>>4,(t[0]&15)<<4|(t[1]&240)>>4,(t[1]&15)<<4|(t[2]&240)>>4,96|t[2]&15,t[3],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}o(n_,"_v1ToV6");function i_(t){let e=a_(t),r=s_(e,t.length*8);return o_(r)}o(i_,"md5");function o_(t){let e=new Uint8Array(t.length*4);for(let r=0;r<t.length*4;r++)e[r]=t[r>>2]>>>r%4*8&255;return e}o(o_,"uint32ToUint8");function dk(t){return(t+64>>>9<<4)+14+1}o(dk,"getOutputLength");function s_(t,e){let r=new Uint32Array(dk(e)).fill(0);r.set(t),r[e>>5]|=128<<e%32,r[r.length-1]=e,t=r;let n=1732584193,i=-271733879,s=-1732584194,a=271733878;for(let l=0;l<t.length;l+=16){let c=n,u=i,f=s,p=a;n=St(n,i,s,a,t[l],7,-680876936),a=St(a,n,i,s,t[l+1],12,-389564586),s=St(s,a,n,i,t[l+2],17,606105819),i=St(i,s,a,n,t[l+3],22,-1044525330),n=St(n,i,s,a,t[l+4],7,-176418897),a=St(a,n,i,s,t[l+5],12,1200080426),s=St(s,a,n,i,t[l+6],17,-1473231341),i=St(i,s,a,n,t[l+7],22,-45705983),n=St(n,i,s,a,t[l+8],7,1770035416),a=St(a,n,i,s,t[l+9],12,-1958414417),s=St(s,a,n,i,t[l+10],17,-42063),i=St(i,s,a,n,t[l+11],22,-1990404162),n=St(n,i,s,a,t[l+12],7,1804603682),a=St(a,n,i,s,t[l+13],12,-40341101),s=St(s,a,n,i,t[l+14],17,-1502002290),i=St(i,s,a,n,t[l+15],22,1236535329),n=vt(n,i,s,a,t[l+1],5,-165796510),a=vt(a,n,i,s,t[l+6],9,-1069501632),s=vt(s,a,n,i,t[l+11],14,643717713),i=vt(i,s,a,n,t[l],20,-373897302),n=vt(n,i,s,a,t[l+5],5,-701558691),a=vt(a,n,i,s,t[l+10],9,38016083),s=vt(s,a,n,i,t[l+15],14,-660478335),i=vt(i,s,a,n,t[l+4],20,-405537848),n=vt(n,i,s,a,t[l+9],5,568446438),a=vt(a,n,i,s,t[l+14],9,-1019803690),s=vt(s,a,n,i,t[l+3],14,-187363961),i=vt(i,s,a,n,t[l+8],20,1163531501),n=vt(n,i,s,a,t[l+13],5,-1444681467),a=vt(a,n,i,s,t[l+2],9,-51403784),s=vt(s,a,n,i,t[l+7],14,1735328473),i=vt(i,s,a,n,t[l+12],20,-1926607734),n=kt(n,i,s,a,t[l+5],4,-378558),a=kt(a,n,i,s,t[l+8],11,-2022574463),s=kt(s,a,n,i,t[l+11],16,1839030562),i=kt(i,s,a,n,t[l+14],23,-35309556),n=kt(n,i,s,a,t[l+1],4,-1530992060),a=kt(a,n,i,s,t[l+4],11,1272893353),s=kt(s,a,n,i,t[l+7],16,-155497632),i=kt(i,s,a,n,t[l+10],23,-1094730640),n=kt(n,i,s,a,t[l+13],4,681279174),a=kt(a,n,i,s,t[l],11,-358537222),s=kt(s,a,n,i,t[l+3],16,-722521979),i=kt(i,s,a,n,t[l+6],23,76029189),n=kt(n,i,s,a,t[l+9],4,-640364487),a=kt(a,n,i,s,t[l+12],11,-421815835),s=kt(s,a,n,i,t[l+15],16,530742520),i=kt(i,s,a,n,t[l+2],23,-995338651),n=Tt(n,i,s,a,t[l],6,-198630844),a=Tt(a,n,i,s,t[l+7],10,1126891415),s=Tt(s,a,n,i,t[l+14],15,-1416354905),i=Tt(i,s,a,n,t[l+5],21,-57434055),n=Tt(n,i,s,a,t[l+12],6,1700485571),a=Tt(a,n,i,s,t[l+3],10,-1894986606),s=Tt(s,a,n,i,t[l+10],15,-1051523),i=Tt(i,s,a,n,t[l+1],21,-2054922799),n=Tt(n,i,s,a,t[l+8],6,1873313359),a=Tt(a,n,i,s,t[l+15],10,-30611744),s=Tt(s,a,n,i,t[l+6],15,-1560198380),i=Tt(i,s,a,n,t[l+13],21,1309151649),n=Tt(n,i,s,a,t[l+4],6,-145523070),a=Tt(a,n,i,s,t[l+11],10,-1120210379),s=Tt(s,a,n,i,t[l+2],15,718787259),i=Tt(i,s,a,n,t[l+9],21,-343485551),n=hi(n,c),i=hi(i,u),s=hi(s,f),a=hi(a,p)}return Uint32Array.of(n,i,s,a)}o(s_,"wordsToMd5");function a_(t){if(t.length===0)return new Uint32Array;let e=new Uint32Array(dk(t.length*8)).fill(0);for(let r=0;r<t.length;r++)e[r>>2]|=(t[r]&255)<<r%4*8;return e}o(a_,"uint8ToUint32");function hi(t,e){let r=(t&65535)+(e&65535);return(t>>16)+(e>>16)+(r>>16)<<16|r&65535}o(hi,"safeAdd");function l_(t,e){return t<<e|t>>>32-e}o(l_,"bitRotateLeft");function ip(t,e,r,n,i,s){return hi(l_(hi(hi(e,t),hi(n,s)),i),r)}o(ip,"md5cmn");function St(t,e,r,n,i,s,a){return ip(e&r|~e&n,t,e,i,s,a)}o(St,"md5ff");function vt(t,e,r,n,i,s,a){return ip(e&n|r&~n,t,e,i,s,a)}o(vt,"md5gg");function kt(t,e,r,n,i,s,a){return ip(e^r^n,t,e,i,s,a)}o(kt,"md5hh");function Tt(t,e,r,n,i,s,a){return ip(r^(e|~n),t,e,i,s,a)}o(Tt,"md5ii");var gk=i_;function c_(t){t=unescape(encodeURIComponent(t));let e=new Uint8Array(t.length);for(let r=0;r<t.length;++r)e[r]=t.charCodeAt(r);return e}o(c_,"stringToBytes");var Is="6ba7b810-9dad-11d1-80b4-00c04fd430c8",Ms="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function ml(t,e,r,n,i,s){let a=typeof r=="string"?c_(r):r,l=typeof n=="string"?En(n):n;if(typeof n=="string"&&(n=En(n)),n?.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let c=new Uint8Array(16+a.length);if(c.set(l),c.set(a,l.length),c=e(c),c[6]=c[6]&15|t,c[8]=c[8]&63|128,i){if(s=s||0,s<0||s+16>i.length)throw new RangeError(`UUID byte range ${s}:${s+15} is out of buffer bounds`);for(let u=0;u<16;++u)i[s+u]=c[u];return i}return Nt(c)}o(ml,"v35");function Fd(t,e,r,n){return ml(48,gk,t,e,r,n)}o(Fd,"v3"),Fd.DNS=Is,Fd.URL=Ms;var yk=Fd;var u_=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Ad={randomUUID:u_};function f_(t,e,r){if(Ad.randomUUID&&!e&&!t)return Ad.randomUUID();t=t||{};let n=t.random??t.rng?.()??Dn();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){if(r=r||0,r<0||r+16>e.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let i=0;i<16;++i)e[r+i]=n[i];return e}return Nt(n)}o(f_,"v4");var xk=f_;function p_(t,e,r,n){switch(t){case 0:return e&r^~e&n;case 1:return e^r^n;case 2:return e&r^e&n^r&n;case 3:return e^r^n}}o(p_,"f");function $d(t,e){return t<<e|t>>>32-e}o($d,"ROTL");function h_(t){let e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520],n=new Uint8Array(t.length+1);n.set(t),n[t.length]=128,t=n;let i=t.length/4+2,s=Math.ceil(i/16),a=new Array(s);for(let l=0;l<s;++l){let c=new Uint32Array(16);for(let u=0;u<16;++u)c[u]=t[l*64+u*4]<<24|t[l*64+u*4+1]<<16|t[l*64+u*4+2]<<8|t[l*64+u*4+3];a[l]=c}a[s-1][14]=(t.length-1)*8/Math.pow(2,32),a[s-1][14]=Math.floor(a[s-1][14]),a[s-1][15]=(t.length-1)*8&4294967295;for(let l=0;l<s;++l){let c=new Uint32Array(80);for(let d=0;d<16;++d)c[d]=a[l][d];for(let d=16;d<80;++d)c[d]=$d(c[d-3]^c[d-8]^c[d-14]^c[d-16],1);let u=r[0],f=r[1],p=r[2],h=r[3],m=r[4];for(let d=0;d<80;++d){let g=Math.floor(d/20),y=$d(u,5)+p_(g,f,p,h)+m+e[g]+c[d]>>>0;m=h,h=p,p=$d(f,30)>>>0,f=u,u=y}r[0]=r[0]+u>>>0,r[1]=r[1]+f>>>0,r[2]=r[2]+p>>>0,r[3]=r[3]+h>>>0,r[4]=r[4]+m>>>0}return Uint8Array.of(r[0]>>24,r[0]>>16,r[0]>>8,r[0],r[1]>>24,r[1]>>16,r[1]>>8,r[1],r[2]>>24,r[2]>>16,r[2]>>8,r[2],r[3]>>24,r[3]>>16,r[3]>>8,r[3],r[4]>>24,r[4]>>16,r[4]>>8,r[4])}o(h_,"sha1");var bk=h_;function Bd(t,e,r,n){return ml(80,bk,t,e,r,n)}o(Bd,"v5"),Bd.DNS=Is,Bd.URL=Ms;var wk=Bd;function m_(t,e,r){t??={},r??=0;let n=np({...t,_v6:!0},new Uint8Array(16));if(n=hl(n),e){if(r<0||r+16>e.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let i=0;i<16;i++)e[r+i]=n[i];return e}return Nt(n)}o(m_,"v6");var Sk=m_;function jd(t){let e=typeof t=="string"?En(t):t,r=d_(e);return typeof t=="string"?Nt(r):r}o(jd,"v6ToV1");function d_(t){return Uint8Array.of((t[3]&15)<<4|t[4]>>4&15,(t[4]&15)<<4|(t[5]&240)>>4,(t[5]&15)<<4|t[6]&15,t[7],(t[1]&15)<<4|(t[2]&240)>>4,(t[2]&15)<<4|(t[3]&240)>>4,16|(t[0]&240)>>4,(t[0]&15)<<4|(t[1]&240)>>4,t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}o(d_,"_v6ToV1");var Ud={};function g_(t,e,r){let n;if(t)n=vk(t.random??t.rng?.()??Dn(),t.msecs,t.seq,e,r);else{let i=Date.now(),s=Dn();y_(Ud,i,s),n=vk(s,Ud.msecs,Ud.seq,e,r)}return e??Nt(n)}o(g_,"v7");function y_(t,e,r){return t.msecs??=-1/0,t.seq??=0,e>t.msecs?(t.seq=r[6]<<23|r[7]<<16|r[8]<<8|r[9],t.msecs=e):(t.seq=t.seq+1|0,t.seq===0&&t.msecs++),t}o(y_,"updateV7State");function vk(t,e,r,n,i=0){if(t.length<16)throw new Error("Random bytes length must be >= 16");if(!n)n=new Uint8Array(16),i=0;else if(i<0||i+16>n.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);return e??=Date.now(),r??=t[6]*127<<24|t[7]<<16|t[8]<<8|t[9],n[i++]=e/1099511627776&255,n[i++]=e/4294967296&255,n[i++]=e/16777216&255,n[i++]=e/65536&255,n[i++]=e/256&255,n[i++]=e&255,n[i++]=112|r>>>28&15,n[i++]=r>>>20&255,n[i++]=128|r>>>14&63,n[i++]=r>>>6&255,n[i++]=r<<2&255|t[10]&3,n[i++]=t[11],n[i++]=t[12],n[i++]=t[13],n[i++]=t[14],n[i++]=t[15],n}o(vk,"v7Bytes");var kk=g_;function x_(t){if(!pi(t))throw TypeError("Invalid UUID");return parseInt(t.slice(14,15),16)}o(x_,"version");var Tk=x_;var w_=o(t=>fl.nanoid(t),"shortId"),S_=o(()=>no.v4(),"uuid4"),v_=o((t,e=no.v5.DNS)=>no.v5(t,e),"uuid5"),k_=o((t="uni",e=24)=>`${t}_${"x".repeat(e).replace(/[xy]/g,r=>{let n=Math.random()*16|0;return(r==="x"?n:n&3|8).toString(16)})}`,"uni"),T_=o((t="uni",e=8)=>`${t}${"x".repeat(e).replace(/[xy]/g,r=>{let n=Math.random()*16|0;return(r==="x"?n:n&3|8).toString(16)})}`,"uniSimple");var D_=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"),C_=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=D_(0,l.length);s+=l[c]}else s+=a;return s},"customRandomatic"),O_=o((t,e,r)=>C_(t,e,r),"createRandomString"),I_=o(()=>Mr.uni(),"createCryptoRandomString");var sp={};se(sp,{makeEnvObject:()=>M_});var M_=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 ap={};se(ap,{decodeText:()=>L_,decodeUtf8OrWindows1252:()=>__,decodeWindows1252:()=>zd,encodeWindows1252:()=>P_,encodingOfLabel:()=>Ik,isValidUtf8:()=>Ok,windows1252ByteOf:()=>Ck});var Ek=[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],N_=new Map(Ek.map((t,e)=>[t,128+e])),Dk=4096,zd=o(t=>{let e="";for(let r=0;r<t.length;r+=Dk){let n=t.subarray(r,r+Dk);e+=String.fromCharCode(...Array.from(n,i=>i>=128&&i<=159?Ek[i-128]:i))}return e},"decodeWindows1252"),Ck=o(t=>t<=127||t>=160&&t<=255?t:N_.get(t),"windows1252ByteOf"),P_=o(t=>{let e=[],r=[],n=0;for(let i of t){let s=Ck(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"),Ok=o(t=>{try{return new TextDecoder("utf-8",{fatal:!0}).decode(t),!0}catch{return!1}},"isValidUtf8"),Ik=o(t=>{try{return new TextDecoder(t).encoding}catch{return}},"encodingOfLabel"),L_=o((t,e,r={})=>{let n=Ik(e);if(n!==void 0)return n==="windows-1252"?zd(t):new TextDecoder(n,{fatal:r.fatal??!1}).decode(t)},"decodeText"),__=o(t=>Ok(t)?{text:new TextDecoder("utf-8").decode(t),encoding:"utf-8"}:{text:zd(t),encoding:"windows-1252"},"decodeUtf8OrWindows1252");var lp={};se(lp,{indent:()=>F_,indentWithPrefix:()=>A_,normalize:()=>$_});var Hd=o(t=>{let e=t.split(`
6
+ `);return R_(e)},"splitStringAtLineBreak"),Wd=o(t=>{let e="";for(let r of t)e=e+r+`
7
+ `;return e},"joinStringWithLineBreaks"),R_=o(t=>{let e=/^[\s]*$/;return e.test(t[0])&&t.shift(),e.test(t[t.length-1])&&t.pop(),t},"cleanStringArray"),F_=o((t,e)=>{let r=Hd(t);for(let i of r)i=" ".repeat(e)+i;return Wd(r)},"indent"),A_=o((t,e)=>{let r,n=Hd(t),i=[];for(let s of n)i.push(e+s);return r=Wd(i),r},"indentWithPrefix"),$_=o(t=>{let e,r=Hd(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=Wd(a),e},"normalize");var cp={};se(cp,{replaceAll:()=>Mk,standard:()=>j_});var Mk=o((t,e,r)=>t.replace(new RegExp(e,"g"),r),"replaceAll"),B_=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"),B_=o((t,e)=>{let r=t;return(!e||e.stripIndent)&&(r=$_(r)),(!e||e.normalizeNewline)&&(r=r.replace(/\r\n/g,`
10
- `)),(!e||e.replaceTabs)&&(r=Ik(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 up={};se(up,{isBase64:()=>U_,isUtf8:()=>j_});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")},cp=class{static{o(this,"Base64")}constructor(e,r){switch(r){case"string":this.refString=e;break;case"base64":this.refString=Ms.decode(e);break;case"base64uri":this.refString=Ms.decode(e)}}get simpleString(){return this.refString}get base64String(){return Ms.encode(this.refString)}get base64UriString(){return Ms.encodeUri(this.refString)}},Ms={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 j_=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"),U_=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 fp=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 pp=class{static{o(this,"GitRepo")}constructor(e,r){let n=z_(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=Mk(this.host,this.user,this.repo,this.accessToken,"ssh"),this.httpsUrl=Mk(this.host,this.user,this.repo,this.accessToken,"https")}},z_=o(function(t){return/([a-zA-Z0-9\-_\.]*)(?:\/|\:)([a-zA-Z0-9\-_\.]*)(?:\/)([a-zA-Z0-9\-_\.]*)(?:\.git)/.exec(t)},"gitRegex"),Mk=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 Lk=Wn(Pk(),1),Ns=Lk.default;var Rk=o(()=>globalThis.Buffer,"getNodeBuffer");function H_(t){let e=Rk();return e?e.from(t).toString("base64"):btoa(String.fromCharCode(...t))}o(H_,"base64Encode");function W_(t){let e=Rk();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(W_,"base64Decode");function ml(t,e){return JSON.stringify(t,hp,e)}o(ml,"stringify");function Yd(t){return JSON.parse(t,Fk)}o(Yd,"parse");var hp=o((t,e)=>{if(Y_(e)){let r;if("data"in e&&Ak(e.data))r=new Uint8Array(e.data);else if(e instanceof Uint8Array)r=e;else return e;return{type:"EncodedBuffer",data:"base64:"+H_(r)}}return e},"replacer"),Fk=o((t,e)=>{if(q_(e)&&qd(e.data)&&e.data.startsWith("base64:")){let r=e.data.slice(7);return W_(r)}return e},"reviver");function q_(t){return $k(t)&&t.type==="EncodedBuffer"&&qd(t.data)}o(q_,"isEncodedBuffer");function Y_(t){return $k(t)&&t.type==="Buffer"&&(Ak(t.data)||qd(t.data))||t instanceof Uint8Array}o(Y_,"isBufferLike");function Ak(t){return Array.isArray(t)}o(Ak,"isArray");function qd(t){return typeof t=="string"}o(qd,"isString");function $k(t){return typeof t=="object"&&t!==null}o($k,"isObject");var jk=o(t=>{let e=JSON.parse(ml(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):Ns(e,{})},"stableStringify");var mp=Yd,Vd=o(t=>t.split(`
11
- `).reduce((n,i)=>{let s=i.trim();return s.length>0&&n.push(mp(s)),n},[]),"parseJsonL"),V_=o(t=>t.map(e=>no(e)).join(`
12
- `),"stringifyJsonL"),K_=o((t,e,r={})=>{let n=new WeakSet,i=o(l=>{if(l===null||typeof l!="object")return l;let c=hp("",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 Ns(s,a)},"stableOneWayStringify"),no=o((t,e,r=void 0)=>{if(r===void 0&&e===void 0)return jk(t);let n=ml(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 Ns(t,i)},"stringify"),G_=o(t=>{let e=no(t),r=JSON.parse(e);return JSON.stringify(r,null,2)},"stringifyPretty"),Q_=o((...t)=>{let e=no(...t);return an.base64.encodeUri(e)},"stringifyBase64"),J_=o(t=>{let e=an.base64,n=(e.decodeUri||e.decode)(t);return mp(n)},"parseBase64"),Kd=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=mp(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 no(e)}},X_=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=no(t),n=no(e);return r===n},"deepEqualObjects"),Z_=o((t,e)=>{let r=Vd(t),n=Vd(e);return Uk(r,n)},"deepEqualJsonLStrings");var zk={};var dp=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([eR(l),tR(s)]),u]);return p}catch(p){throw i.signal?.aborted?i.signal.reason:p}finally{i.signal?.removeEventListener("abort",f)}}},Wk=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"),eR=o(t=>new Promise((e,r)=>{t.onsuccess=()=>e(t.result),t.onerror=()=>r(gp("IndexedDB request failed",t.error))}),"indexedDbRequestToPromise"),tR=o(t=>new Promise((e,r)=>{t.oncomplete=()=>e(),t.onabort=()=>r(gp("IndexedDB transaction aborted",t.error)),t.onerror=()=>r(gp("IndexedDB transaction failed",t.error))}),"indexedDbTransactionToPromise"),gp=o((t,e)=>e?new Error(`${t}: ${e.message}`,{cause:e}):new Error(t),"createIndexedDbError"),qk=o((t,e)=>{t.objectStoreNames.contains(e)||t.createObjectStore(e)},"ensureObjectStore"),Yk=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(gp(`Failed to open IndexedDB database "${t}"`,a.error)),a.onblocked=()=>l(new Error(`Opening IndexedDB database "${t}" was blocked by another connection`))})},"openNativeDb"),rR=o(async(t,e)=>{let r=await Yk(t,void 0,i=>qk(i,e));if(r.objectStoreNames.contains(e))return new dp(r);let n=r.version+1;if(r.close(),r=await Yk(t,n,i=>qk(i,e)),!r.objectStoreNames.contains(e))throw r.close(),new Error(`Failed to create IndexedDB object store "${e}" in database "${t}"`);return new dp(r)},"openWebStoreDb"),dl=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 Wk(r,e),e?.throwIfAborted()),this.initPromise||(this.initPromise=this.runInit().catch(n=>{throw this.initPromise=void 0,n})),Wk(this.initPromise,e)}async runInit(){let e=new to.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 rR(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 Gd=class{static{o(this,"TypedrequestCache")}constructor(e="default"){this.webstore=new dl({dbName:"trStore",storeName:`trStore-${e}`})}buildKey(e){return er.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 yp=class{static{o(this,"CacheStore")}constructor(e,r){this.lifecycleController=new AbortController,this.closeReason=new Error("HttpCache store is closed"),this.disposed=!1,this.pruneGeneration=0,this.pruneWaiters=new Set,this.activeOwnedOperations=new Set,this.webstore=new Nr.WebStore({dbName:e,storeName:r})}async set(e,r,n){let i=this.getOperationSignal(n.signal);if(!Number.isSafeInteger(n.maxEntries)||n.maxEntries<=0)throw new RangeError("HttpCache maxEntries must be a positive safe integer");await this.webstore.set(e,r,{signal:i}),await this.schedulePrune(n.maxEntries,i)}async get(e,r={}){let n=this.getOperationSignal(r.signal);try{let i=await this.webstore.get(e,{signal:n});return i===void 0?null:Vk(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={}){let n=this.getOperationSignal(r.signal);await this.webstore.delete(e,{signal:n})}async clear(e={}){let r=this.getOperationSignal(e.signal);await this.webstore.clear({signal:r})}responseFromCacheEntry(e){return new Response(e.response,{status:e.status,statusText:e.statusText,headers:new Headers(e.headers)})}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 oR(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}})}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 schedulePrune(e,r){r?.throwIfAborted();let n=++this.pruneGeneration;this.pendingPruneMaxEntries=this.pendingPruneMaxEntries===void 0?e:Math.min(this.pendingPruneMaxEntries,e);let i,s=new Promise((a,l)=>{i={generation:n,resolve:a,reject:l}});this.pruneWaiters.add(i),this.ensurePruneLoop();try{await sR(s,r)}finally{this.pruneWaiters.delete(i)}}ensurePruneLoop(){if(this.pruneLoopPromise)return;let 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}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=[];for(let a of n){if(a.valid&&!iR(a)){i.push(a);continue}r.throwIfAborted(),await this.webstore.delete(a.key,{signal:r})}i.sort((a,l)=>a.timestamp===l.timestamp?a.key.localeCompare(l.key):a.timestamp-l.timestamp);let s=Math.max(0,i.length-e);for(let a of i.slice(0,s))r.throwIfAborted(),await this.webstore.delete(a.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(Vk(s)?{key:i,valid:!0,timestamp:s.timestamp,maxAge:s.maxAge}:{key:i,valid:!1,timestamp:0})}catch{if(e.aborted)throw e.reason}return n}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=e().finally(()=>{this.activeOwnedOperations.delete(r)});return this.activeOwnedOperations.add(r),r}},Vk=o(t=>{if(!t||typeof t!="object")return!1;let e=Reflect.get(t,"headers");return Reflect.get(t,"response")instanceof ArrayBuffer&&typeof e=="object"&&e!==null&&Number.isFinite(Reflect.get(t,"timestamp"))&&typeof Reflect.get(t,"url")=="string"&&Number.isInteger(Reflect.get(t,"status"))&&typeof Reflect.get(t,"statusText")=="string"},"isCacheEntry"),iR=o(t=>t.maxAge!==void 0&&t.maxAge>0&&Date.now()-t.timestamp>=t.maxAge,"isExpired"),oR=o(async(t,e,r,n)=>{e.throwIfAborted();let i=t.body?.getReader();if(!i)return new ArrayBuffer(0);let s=[],a=0,l,c=new Promise((m,d)=>{l=d}),u,f=o(()=>{l(e.reason),n?.aborted||(u=Promise.all([i.cancel(e.reason).catch(()=>{}),r?.cancel(e.reason).catch(()=>{})]).then(()=>{}))},"onAbort");e.addEventListener("abort",f,{once:!0});try{for(;;){let m=await Promise.race([i.read(),c]);if(m.done)break;s.push(m.value),a+=m.value.byteLength}}finally{e.removeEventListener("abort",f),u&&await u;try{i.releaseLock()}catch{}}let p=new Uint8Array(a),h=0;for(let m of s)p.set(m,h),h+=m.byteLength;return p.buffer},"consumeArrayBuffer"),sR=o(async(t,e)=>{if(!e)return t;e.throwIfAborted();let r,n=new Promise((s,a)=>{r=a}),i=o(()=>r(e.reason),"onAbort");e.addEventListener("abort",i,{once:!0});try{return await Promise.race([t,n])}finally{e.removeEventListener("abort",i)}},"awaitWithSignal");var Kk=Symbol.for("@push.rocks/smartrequest/FetchTimeoutError"),tr=class extends Error{static{o(this,"FetchTimeoutError")}constructor(e,r){super(`Request timeout after ${r}ms: ${e}`),this.name="FetchTimeoutError",this.url=e,this.timeoutMs=r,Object.defineProperty(this,Kk,{value:!0})}},io=o(t=>t instanceof Error&&Reflect.get(t,Kk)===!0,"isFetchTimeoutError"),mr=o(t=>{if(t.reason instanceof Error)return t.reason;let e=new Error("The request was aborted");return e.name="AbortError",e},"abortReasonOf"),hi=o(t=>t instanceof Error?t:new Error(String(t)),"toError"),Dn=o(async(t,e)=>{!t?.body||t.bodyUsed||await t.body.cancel(e).catch(()=>{})},"discardResponse"),Gk=o((t,e)=>e?.aborted?Promise.reject(mr(e)):new Promise((r,n)=>{let i=o(()=>{clearTimeout(s),n(mr(e))},"onAbort"),s=setTimeout(()=>{e?.removeEventListener("abort",i),r()},Math.max(0,t));e?.addEventListener("abort",i,{once:!0})}),"abortableDelay");var xp=o(t=>{let e={maxAge:0,etag:t.get("etag")??void 0,lastModified:t.get("last-modified")??void 0,immutable:!1,noCache:!1,noStore:!1,mustRevalidate:!1},r=!1;for(let n of(t.get("cache-control")??"").toLowerCase().split(",").map(i=>i.trim()))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=Number.parseInt(n.slice(8),10);Number.isNaN(i)||(e.maxAge=i*1e3,r=!0)}if(!r){let n=Date.parse(t.get("expires")??"");Number.isNaN(n)||(e.maxAge=Math.max(0,n-Date.now()))}return e},"extractCacheMetadata"),Qk=o((t,e)=>{if(e.noStore)return!1;if(e.immutable)return!0;let r=t.maxAge||e.maxAge||0;return r>0&&Date.now()-t.timestamp<r},"isFresh"),bp=o(t=>t.noCache||t.mustRevalidate,"requiresRevalidation"),Jk=o(t=>{let e={};return t.etag&&(e["if-none-match"]=t.etag),t.lastModified&&(e["if-modified-since"]=t.lastModified),e},"createConditionalHeaders"),Xk=o(t=>{let e={};return t.forEach((r,n)=>{e[n]=r}),e},"headersToObject");var oo=o((t,...e)=>{t.logging&&console.log("[smartrequest/cache]",...e)},"log"),ln=o((t,e,r)=>({response:t,fromCache:e,revalidated:r}),"result"),aR=o((t,e)=>e===void 0?t:Math.min(t,e),"resolveEffectiveMaxAge"),Zk=o((t,e,r)=>Qk(e,r)&&(t.cacheMaxAge===void 0||Date.now()-e.timestamp<t.cacheMaxAge),"isFreshForContext"),gl=o(async(t,e,r)=>{!t?.body||t.bodyUsed||r?.aborted||await t.body.cancel(e).catch(()=>{})},"discard"),yl=o(async(t,e,r,n=!0)=>{if(!e.ok)return;let i=xp(e.headers);if(!i.noStore){i.maxAge=aR(i.maxAge,t.cacheMaxAge);try{let s=await t.cacheStore.cacheEntryFromResponse(t.request.url,e,i,{signal:t.signal,responseSignal:r,preserveResponse:n});await t.cacheStore.set(t.cacheKey,s,{signal:t.signal,maxEntries:t.maxEntries})}catch(s){throw await gl(e,s,r),s}}},"store"),wp=o(t=>t.cacheStore.get(t.cacheKey,{signal:t.signal}),"readEntry"),lR=o(async t=>{let e;try{return e=await t.dispatch(t.request),await yl(t,e,t.request.signal),ln(e,!1,!1)}catch(r){if(await gl(e,r,t.request.signal),t.signal.aborted)throw t.signal.reason;if(io(r)||e)throw r;oo(t,"network failed, trying cache:",t.request.url,r);let n=await wp(t);if(!n)throw r;return ln(t.cacheStore.responseFromCacheEntry(n),!0,!1)}},"networkFirst"),cR=o(async t=>{let e=await wp(t);if(e){let n=xp(new Headers(e.headers));if(Zk(t,e,n)&&!bp(n))return oo(t,"cache hit (fresh):",t.request.url),ln(t.cacheStore.responseFromCacheEntry(e),!0,!1);if(bp(n)&&(e.etag||e.lastModified))return await uR(t,e)}oo(t,"cache miss, fetching:",t.request.url);let r=await t.dispatch(t.request);return await yl(t,r,t.request.signal),ln(r,!1,!1)},"cacheFirst"),uR=o(async(t,e)=>{let r=new Request(t.request,{headers:{...Xk(t.request.headers),...Jk(e)},signal:t.signal}),n;try{return n=await t.dispatch(r),n.status===304?(oo(t,"cache revalidated (304):",t.request.url),await gl(n,"304 answered from the cache",r.signal),e.timestamp=Date.now(),await t.cacheStore.set(t.cacheKey,e,{signal:t.signal,maxEntries:t.maxEntries}),ln(t.cacheStore.responseFromCacheEntry(e),!0,!0)):(await yl(t,n,r.signal),ln(n,!1,!0))}catch(i){if(await gl(n,i,r.signal),t.signal.aborted)throw t.signal.reason;if(io(i)||n)throw i;return oo(t,"revalidation failed, using cache:",t.request.url,i),ln(t.cacheStore.responseFromCacheEntry(e),!0,!1)}},"revalidate"),fR=o(async t=>{let e=await wp(t);if(!e){let n=await t.dispatch(t.request);return await yl(t,n,t.request.signal),ln(n,!1,!1)}let r=xp(new Headers(e.headers));if(!Zk(t,e,r)||bp(r)){let n=new Request(t.request);t.scheduleBackgroundRevalidation(async i=>{let s={...t,request:new Request(n,{signal:i}),signal:i},a;try{a=await s.dispatch(s.request),await yl(s,a,s.request.signal,!1),oo(t,"background revalidation complete:",t.request.url)}catch(l){i.aborted||oo(t,"background revalidation failed:",t.request.url,l)}finally{await gl(a,"background response discarded",s.request.signal)}})}return ln(t.cacheStore.responseFromCacheEntry(e),!0,!1)},"staleWhileRevalidate"),pR=o(async t=>{let e=await wp(t);if(!e)throw new Error(`Cache miss for ${t.request.url} (cache-only)`);return ln(t.cacheStore.responseFromCacheEntry(e),!0,!1)},"cacheOnly"),e1={"network-first":lR,"cache-first":cR,"stale-while-revalidate":fR,"cache-only":pR};var Sp=class{static{o(this,"CacheManager")}constructor(e,r){this.cacheStore=e,this.maxEntries=r,this.lifecycleController=new AbortController,this.closeReason=new Error("HttpCache is closed"),this.disposed=!1,this.backgroundRevalidations=new Map}async execute(e,r,n){if(this.disposed)throw this.closeReason;if(e.signal.throwIfAborted(),r.cacheMaxAge!==void 0&&(!Number.isSafeInteger(r.cacheMaxAge)||r.cacheMaxAge<0))throw new RangeError("cacheMaxAge must be a non-negative safe integer");let i=hR(e,r),s=new AbortController,a=setTimeout(()=>s.abort(new tr(e.url,r.timeout)),Math.max(0,r.timeout)),l={request:e,cacheKey:i,cacheStore:this.cacheStore,dispatch:n,logging:r.logging,signal:AbortSignal.any([e.signal,this.lifecycleController.signal,s.signal]),cacheMaxAge:r.cacheMaxAge,maxEntries:this.maxEntries,scheduleBackgroundRevalidation:o(c=>this.scheduleBackgroundRevalidation(i,e.url,r.timeout,c),"scheduleBackgroundRevalidation")};try{return await e1[r.cacheStrategy](l)}finally{clearTimeout(a)}}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}scheduleBackgroundRevalidation(e,r,n,i){if(this.disposed||this.backgroundRevalidations.has(e))return;let s=new AbortController,a=setTimeout(()=>s.abort(new tr(r,n)),Math.max(0,n)),l=i(AbortSignal.any([this.lifecycleController.signal,s.signal])).catch(()=>{}).finally(()=>{clearTimeout(a),this.backgroundRevalidations.get(e)===l&&this.backgroundRevalidations.delete(e)});this.backgroundRevalidations.set(e,l)}},hR=o((t,e)=>{if(typeof e.cacheKey=="function")return e.cacheKey(t);if(typeof e.cacheKey=="string")return e.cacheKey;if(t.method==="GET")return t.url;throw new TypeError(`cacheStrategy '${e.cacheStrategy}' for a ${t.method} request needs a cacheKey`)},"cacheKeyOf");var vp=class t{static{o(this,"HttpCache")}static{this.defaultDbName="smartrequest-cache"}static{this.defaultStoreName="cache"}static{this.defaultMaxEntries=256}constructor(e={}){let r=e.maxEntries??t.defaultMaxEntries;if(!Number.isSafeInteger(r)||r<=0)throw new RangeError("HttpCache maxEntries must be a positive safe integer");this.store=new yp(e.dbName??t.defaultDbName,e.storeName??t.defaultStoreName),this.manager=new Sp(this.store,r)}execute(e,r,n){return this.manager.execute(e,r,n)}has(e){return this.store.has(e)}delete(e){return this.store.delete(e)}clear(){return this.store.clear()}close(){return this.manager.close()}};var Ls={};se(Ls,{FetchTimeoutError:()=>tr,SmartFetch:()=>Ep,isFetchTimeoutError:()=>io});var t1=o(async(t,e,r,n)=>{let i=new AbortController,s=new tr(e.url,n),a=setTimeout(()=>i.abort(s),Math.max(0,n));try{return await t(e,{...r,signal:AbortSignal.any([e.signal,i.signal])})}catch(l){throw i.signal.aborted&&!e.signal.aborted?s:l}finally{clearTimeout(a)}},"fetchWithTimeout"),r1=o(async(t,e)=>{if(e.signal?.aborted){let p=mr(e.signal);throw await t.body?.cancel(p).catch(()=>{}),p}if(e.bodyTimeoutMs!==void 0&&e.bodyTimeoutMs<=0){let p=new tr(e.url,e.reportedTimeoutMs??e.bodyTimeoutMs);throw await t.body?.cancel(p).catch(()=>{}),p}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=new Promise((p,h)=>{i=h}),a=o(p=>{n||(n=p,r.cancel(p).catch(()=>{}),i(p))},"terminate"),l=e.signal,c=o(()=>a(mr(l)),"onAbort");l?.addEventListener("abort",c,{once:!0});let u;if(e.bodyTimeoutMs!==void 0){let p=e.reportedTimeoutMs??e.bodyTimeoutMs;u=setTimeout(()=>{a(new tr(e.url,p))},e.bodyTimeoutMs)}let f=o(async()=>{let p=new TextDecoder,h="";for(;;){let m;try{m=await r.read()}catch(d){throw n??d}if(n)throw n;if(m.done)break;h+=p.decode(m.value,{stream:!0})}return h+=p.decode(),JSON.parse(h)},"readBody");try{return await Promise.race([f(),s])}finally{clearTimeout(u),l?.removeEventListener("abort",c);try{r.releaseLock()}catch{}}},"consumeJsonWithTimeout");var mR=[408,429,500,502,503,504],dR=o((t,e,r,n)=>{switch(t){case"linear":return Math.min(r*e,n);case"constant":return Math.min(r,n);case"exponential":return Math.min(r*2**(e-1),n)}},"backoffDelay"),Ps=class{static{o(this,"RetryManager")}constructor(e={},r){if(this.signal=r,this.maxAttempts=e.maxAttempts??3,!Number.isSafeInteger(this.maxAttempts)||this.maxAttempts<1)throw new RangeError("retry maxAttempts must be a positive safe integer");this.backoff=e.backoff??"exponential",this.initialDelay=e.initialDelay??1e3,this.maxDelay=e.maxDelay??3e4,this.retryOn=e.retryOn??mR,this.onRetry=e.onRetry}async execute(e){for(let r=1;;r++){this.throwIfAborted();let n;try{n=await e()}catch(i){if(this.signal?.aborted)throw mr(this.signal);let s=hi(i);if(r>=this.maxAttempts||!this.shouldRetryError(s))throw s;await this.waitBeforeRetry(r,s);continue}if(r>=this.maxAttempts||!this.shouldRetryResponse(n))return n;await Dn(n,`Retrying after HTTP ${n.status}`),await this.waitBeforeRetry(r,new Error(`HTTP ${n.status}`))}}async executeWithFallbacks(e,r){if(e.length===0)throw new Error("No URLs provided for fallback execution");let n=[],i;for(let s of e){this.throwIfAborted();try{let a=await this.execute(()=>r(s));if(a.status<400||a.status<500&&a.status!==408)return a;await Dn(a,`Trying fallback after HTTP ${a.status}`),i=new Error(`Request failed with status ${a.status}`)}catch(a){if(this.signal?.aborted)throw mr(this.signal);i=hi(a)}n.push(s)}throw new Error(`All URLs failed: ${n.join(", ")}. Last error: ${i?.message??"unknown error"}`)}shouldRetryResponse(e){return typeof this.retryOn=="function"?this.retryOn(e,void 0):this.retryOn.includes(e.status)}shouldRetryError(e){return e instanceof TypeError||io(e)?!0:typeof this.retryOn=="function"?this.retryOn(void 0,e):!1}async waitBeforeRetry(e,r){let n=dR(this.backoff,e,this.initialDelay,this.maxDelay),i=n+n*.1*Math.random();this.onRetry?.(e,r,i),await Gk(i,this.signal)}throwIfAborted(){if(this.signal?.aborted)throw mr(this.signal)}};var kp=class{static{o(this,"InterceptorChain")}constructor(){this.request=[],this.response=[],this.error=[]}addRequestInterceptor(e){this.request.push(e)}addResponseInterceptor(e){this.response.push(e)}addErrorInterceptor(e){this.error.push(e)}removeRequestInterceptor(e){Qd(this.request,e)}removeResponseInterceptor(e){Qd(this.response,e)}removeErrorInterceptor(e){Qd(this.error,e)}clear(){this.request.length=0,this.response.length=0,this.error.length=0}async processRequest(e,r){let n=e;for(let i of[...this.request,...r?.request??[]])n=await i(n);return n}async processResponse(e,r){let n=e;for(let i of[...this.response,...r?.response??[]])n=await i(n);return n}async processError(e,r){let n=e;for(let i of[...this.error,...r?.error??[]])try{n=await i(n)}catch(s){n=hi(s)}return n}},Qd=o((t,e)=>{let r=t.indexOf(e);r>-1&&t.splice(r,1)},"removeFrom");var Tp=class{static{o(this,"RequestDeduplicator")}constructor(){this.inFlight=new Map}keyOf(e){if(e.method!=="GET"&&e.method!=="HEAD")return;let r=[...e.headers].sort(([n],[i])=>n<i?-1:n>i?1:0);return JSON.stringify([e.method,e.url,r])}execute(e,r,n){if(r.aborted)return Promise.reject(mr(r));let i=this.inFlight.get(e)??this.start(e,n);return new Promise((s,a)=>{let l=o(()=>{i.participants.delete(c);let u=mr(r);a(u),i.participants.size===0&&(this.detach(e,i),i.controller.abort(u))},"onAbort"),c={resolve:o(u=>{r.removeEventListener("abort",l),s(u)},"resolve"),reject:o(u=>{r.removeEventListener("abort",l),a(u)},"reject")};i.participants.add(c),r.addEventListener("abort",l,{once:!0})})}start(e,r){let n={controller:new AbortController,participants:new Set};this.inFlight.set(e,n);let i=o(s=>{this.detach(e,n);let a=[...n.participants];n.participants.clear();for(let l of a)l.reject(s)},"rejectAll");return r(n.controller.signal).then(s=>{if(this.detach(e,n),n.participants.size===0){Dn(s.response,"every deduplicated caller aborted");return}let a=[...n.participants],l=[],c;try{c=a.map((u,f)=>{if(f===a.length-1)return s;let p=s.response.clone();return l.push(p),Object.freeze({response:p,metadata:s.metadata})})}catch(u){for(let f of[s.response,...l])Dn(f,u);i(u);return}n.participants.clear(),a.forEach((u,f)=>{u.resolve(c[f])})},i),n}detach(e,r){this.inFlight.get(e)===r&&this.inFlight.delete(e)}};var n1=6e4,gR=new Set(["body","headers","method","signal","window","credentials","mode","cache","redirect","referrer","referrerPolicy","integrity","keepalive","retry","fallbackUrls","timeout","interceptors","deduplicate","logging","cacheStrategy","cacheKey","cacheMaxAge"]),Ep=class{static{o(this,"SmartFetch")}constructor(e={}){this.interceptors=new kp,this.deduplicator=new Tp,this.httpCache=e.httpCache,this.fetchFunction=e.fetch??((r,n)=>globalThis.fetch(r,n)),this.defaults={...e.defaults}}addRequestInterceptor(e){this.interceptors.addRequestInterceptor(e)}addResponseInterceptor(e){this.interceptors.addResponseInterceptor(e)}addErrorInterceptor(e){this.interceptors.addErrorInterceptor(e)}removeRequestInterceptor(e){this.interceptors.removeRequestInterceptor(e)}removeResponseInterceptor(e){this.interceptors.removeResponseInterceptor(e)}removeErrorInterceptor(e){this.interceptors.removeErrorInterceptor(e)}clearInterceptors(){this.interceptors.clear()}async fetch(e,r={}){return(await this.fetchWithMetadata(e,r)).response}async fetchWithMetadata(e,r={}){let n=this.withDefaults(r,e instanceof Request?e.headers:void 0),i=this.planCache(n);try{let s=new Request(e,n);s=await this.interceptors.processRequest(s,n.interceptors);let a=n.deduplicate?this.deduplicator.keyOf(s):void 0;if(a===void 0)return await this.send(s,n,i);let l=s;return await this.deduplicator.execute(a,l.signal,c=>this.send(new Request(l,{signal:c}),n,i))}catch(s){throw await this.interceptors.processError(hi(s),n.interceptors)}}async getJson(e,r={}){return(await this.getJsonWithMetadata(e,r)).data}async getJsonWithMetadata(e,r={}){return await this.requestJson(e,"GET",void 0,r)}async postJson(e,r,n={}){return(await this.postJsonWithMetadata(e,r,n)).data}async postJsonWithMetadata(e,r,n={}){return await this.requestJson(e,"POST",r,n)}async putJson(e,r,n={}){return(await this.putJsonWithMetadata(e,r,n)).data}async putJsonWithMetadata(e,r,n={}){return await this.requestJson(e,"PUT",r,n)}async deleteJson(e,r={}){return(await this.deleteJsonWithMetadata(e,r)).data}async deleteJsonWithMetadata(e,r={}){return await this.requestJson(e,"DELETE",void 0,r)}withDefaults(e,r){let n=new Headers(this.defaults.headers);for(let i of[r,new Headers(e.headers)])i?.forEach((s,a)=>n.set(a,s));return{...this.defaults,...e,headers:n}}planCache(e){if(e.timeout!==void 0&&(!Number.isSafeInteger(e.timeout)||e.timeout<0))throw new RangeError("SmartFetch timeout must be a non-negative safe integer");let r=e.cacheStrategy??"network-only";if(r!=="network-only"){if(!this.httpCache)throw new TypeError(`cacheStrategy '${r}' needs a cache: new SmartFetch({ httpCache: new HttpCache() })`);if(e.fallbackUrls?.length)throw new TypeError(`fallbackUrls cannot be combined with cacheStrategy '${r}'`);return{httpCache:this.httpCache,cacheStrategy:r}}}async send(e,r,n){if(n&&e.method!=="GET"&&r.cacheKey===void 0)throw new TypeError(`cacheStrategy '${n.cacheStrategy}' for a ${e.method} request needs a cacheKey`);let i=e.body===null?null:await e.arrayBuffer(),s=r.timeout??n1,a=xR(r),l=o(h=>bR(e,h,i),"build"),c=o(h=>t1(this.fetchFunction,h,a,s),"dispatch"),u=yR(r.retry),f;if(r.fallbackUrls?.length)f={response:await new Ps(u??{maxAttempts:1},e.signal).executeWithFallbacks([e.url,...r.fallbackUrls],d=>c(l(d))),fromCache:!1,revalidated:!1};else if(n){let h,m=o(async()=>(h=await n.httpCache.execute(l(e.url),{cacheStrategy:n.cacheStrategy,cacheKey:r.cacheKey,cacheMaxAge:r.cacheMaxAge,timeout:s,logging:r.logging??!1},c),h.response),"attempt");u?await new Ps(u,e.signal).execute(m):await m(),f=h}else{let h=o(()=>c(l(e.url)),"attempt");f={response:u?await new Ps(u,e.signal).execute(h):await h(),fromCache:!1,revalidated:!1}}let p=await this.interceptors.processResponse(f.response,r.interceptors);return Object.freeze({response:p,metadata:Object.freeze({fromCache:f.fromCache,revalidated:f.revalidated})})}async requestJson(e,r,n,i){let s=this.withDefaults(i),a=s.timeout??n1,l=!s.retry&&!s.fallbackUrls?.length,c=l?performance.now()+a:void 0,u=l?new AbortController:void 0,f=u?s.signal?AbortSignal.any([s.signal,u.signal]):u.signal:s.signal??void 0,p=u?setTimeout(()=>u.abort(new tr(e,a)),Math.max(0,a)):void 0,h=new Headers(s.headers);h.has("accept")||h.set("accept","application/json"),n!==void 0&&!h.has("content-type")&&h.set("content-type","application/json");try{let m=await this.fetchWithMetadata(e,{...i,method:r,headers:h,...n===void 0?{}:{body:JSON.stringify(n)},signal:f}),d=m.response;if(f?.aborted)throw await Dn(d,f.reason),hi(f.reason);if(!d.ok)throw await Dn(d,`HTTP ${d.status}`),new Error(`HTTP ${d.status}: ${d.statusText}`);let g=await r1(d,{bodyTimeoutMs:c===void 0?a:c-performance.now(),reportedTimeoutMs:a,signal:f,url:e});return Object.freeze({data:g,response:d,metadata:m.metadata})}catch(m){throw f?.aborted&&f.reason instanceof Error?f.reason:m}finally{clearTimeout(p)}}},yR=o(t=>t===!0?{}:t||void 0,"retryOptionsOf"),xR=o(t=>{let e={};for(let[r,n]of Object.entries(t))!gR.has(r)&&n!==void 0&&(e[r]=n);return e},"transportInitOf"),bR=o((t,e,r)=>new Request(e,{method:t.method,headers:t.headers,body:r,signal:t.signal,credentials:t.credentials,cache:t.cache,redirect:t.redirect,referrer:t.referrer,referrerPolicy:t.referrerPolicy,integrity:t.integrity,keepalive:t.keepalive,...t.mode==="navigate"?{}:{mode:t.mode}}),"rebuildRequest");var wR=1e4,i1=new WeakSet,o1=new WeakMap,Jd=o(t=>{i1.add(t)},"authorizeVirtualStreamApplicationUse"),so=class extends Error{static{o(this,"VirtualStreamClosedError")}constructor(e="VirtualStream is closed",r){super(e,r),this.name="VirtualStreamClosedError"}},ao=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"}},Cp=class extends Error{static{o(this,"VirtualStreamLifecycleContractError")}constructor(e){super(`VirtualStream endpoint closed before terminal ${e} produced a receipt`),this.name="VirtualStreamLifecycleContractError"}},Cn=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=o1.get(e);if(r&&r!==this)throw new Error("VirtualStream is already owned by another activation scope");r||o1.set(e,this),this.trackedStreams.add(e),this.hasAuthorizedTrackedStreams&&Jd(e),this.published&&e.publishActivation()}authorizeApplicationUse(){if(!(this.settled||this.hasAuthorizedTrackedStreams)){this.hasAuthorizedTrackedStreams=!0;for(let e of this.trackedStreams)Jd(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)))}},Pr=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||eo.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 Cn,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||eo.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(eo.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()+wR;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 ao(0,e);return r}static async openVirtualStreamWithTimeout(e,r,n,i,s){let a=new ao(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&&Jd(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 so("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(!i1.has(this))throw new Error("VirtualStream application use is not authorized")}assertApplicationOperation(e){if(this.assertApplicationOperationsAllowed(),this.assertNotClosed(),this.terminalPromise)throw new so("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 so("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 so(`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 Cp(r)}})();return this.terminalPromise=u,u}};var dr=class extends Error{static{o(this,"TypedResponseError")}constructor(e,r){super(e),this.name="TypedResponseError",this.errorText=e,this.errorData=r??{}}};var _s=Object.freeze({redacted:!0});var s1=Object.freeze(["onOutgoingRequest","onIncomingResponse","onIncomingRequest","onOutgoingResponse"]),a1=Symbol.for("@api.global/typedrequest:global-hooks:3.8"),l1=o(t=>({payloadProjector:t?.payloadProjector,errorProjector:t?.errorProjector}),"copyProjectionOptions"),Ip=o((t={})=>({hooks:t,projectedRegistrationsByPhase:{}}),"createTypedRouterHookRegistrationState"),SR=o(t=>s1.filter(e=>Object.hasOwn(t,e)).map(e=>[e,t[e]]),"getSuppliedHookEntries"),Mp=o((t,e,r)=>{let n=SR(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:l1(r)}}},"mergeTypedRouterHookRegistrations"),Np=o((t,e)=>{t.hooks=e;for(let r of s1)delete t.projectedRegistrationsByPhase[r]},"replaceTypedRouterHookRegistrations"),Rs=o(()=>{let t=globalThis[a1];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:Ip(),subscribers:new Map};return globalThis[a1]=e,e},"getRealmGlobalHookState"),u1=o(()=>Rs().legacy.hooks,"getLegacyGlobalHooks"),f1=o(t=>{Np(Rs().legacy,t)},"replaceLegacyGlobalHooks"),p1=o((t,e)=>{Mp(Rs().legacy,t,e)},"mergeLegacyGlobalHooks"),h1=o((t,e)=>{let r=Rs(),n=Symbol("typedrequest-hook-subscriber"),i=Ip();Mp(i,t,e),r.subscribers.set(n,i);let s=!1;return()=>{s||(s=!0,r.subscribers.delete(n))}},"addGlobalHookSubscriber"),m1=o(()=>{let t=Rs();Np(t.legacy,{}),t.subscribers.clear()},"clearGlobalHookRegistrations"),Op=o(t=>{try{console.error(`TypedRequest hook projection failed (${t})`)}catch{}},"logProjectionFailure"),Xd=o(t=>{try{console.error(`TypedRequest hook callback failed (${t})`)}catch{}},"logCallbackFailure"),vR=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{Op(e);return}},"createMetadata"),c1=o(t=>typeof SharedArrayBuffer>"u"?!1:t instanceof SharedArrayBuffer||Object.prototype.toString.call(t)==="[object SharedArrayBuffer]","isSharedArrayBuffer"),Fs=o((t,e=new Set)=>{if(!(t===null||typeof t!="object"&&typeof t!="function")){if(c1(t))throw new TypeError("TypedRequest hook projections cannot contain SharedArrayBuffer");if(ArrayBuffer.isView(t)){if(c1(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)Fs(r,e),Fs(n,e);return}if(t instanceof Set){for(let r of t)Fs(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");Fs(n.value,e)}}}}},"assertNoSharedArrayBuffer"),kR=o((t,e,r,n)=>{if(!e||!r.payloadProjector)return{payload:_s,payloadRedacted:!0};try{let i=r.payloadProjector(t,e);Fs(i);let s=structuredClone(i);return Fs(s),s!==null&&(typeof s=="object"||typeof s=="function")&&Object.freeze(s),{payload:s,payloadRedacted:!1}}catch{return Op(n),{payload:_s,payloadRedacted:!0}}},"snapshotPayload"),TR=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{Op(n);return}},"snapshotError"),ER=o((t,e,r)=>{let n=vR(t,r),i=kR(t.payload,n,e,r),s=TR(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{Op(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:_s,payloadRedacted:!0};try{return Object.freeze(l)}catch{return l}}},"projectLogEntry"),Zd=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?l1(n.projectionOptions):{}}}catch{Xd(e);return}},"snapshotDispatchRecipient"),eg=o((t,e,r)=>{let n=ER(r,t.projectionOptions,e);try{let i=t.callback(n);i&&typeof i.then=="function"&&Promise.resolve(i).catch(()=>{Xd(e)})}catch{Xd(e)}},"dispatchToRecipient"),As=o((t,e,r)=>{let n=Rs();if(n.subscribers.size===0){let a=Zd(n.legacy,t),l=r?Zd(r,t):void 0;if(!a&&!l)return;a&&eg(a,t,e),l&&eg(l,t,e);return}let s=[n.legacy,...Array.from(n.subscribers.values()),...r?[r]:[]].map(a=>Zd(a,t)).filter(a=>!!a);for(let a of s)eg(a,t,e)},"dispatchTypedRequestHook");var Pp=class{static{o(this,"TypedTools")}constructor(e){this.localData={},this.abortSignal=e??new AbortController().signal}async passGuards(e,r){let n=new cl.GuardSet(e);if(!await n.allGuardsPass(r)){let s=await n.getFailedHint(r);throw new dr(`guard failed: ${s}`,{failedHint:s})}}};var vMe=16,kMe=1024,d1=Symbol.for("@api.global/typedrequest:global-error-reporter"),tg=o(()=>{let t=globalThis[d1];if(t&&typeof t=="object")return t;let e={reporter:void 0};return globalThis[d1]=e,e},"getRealmGlobalErrorReporterState"),DR=o(()=>tg().reporter,"getGlobalTypedRequestErrorReporter"),y1=o(t=>{let e=tg();e.reporter=t;let r=!1;return()=>{r||(r=!0,e.reporter===t&&(e.reporter=void 0))}},"setGlobalTypedRequestErrorReporter"),x1=o(()=>{tg().reporter=void 0},"clearGlobalTypedRequestErrorReporter"),lo=o(t=>{let e=t.replace(/[\u0000-\u001f\u007f]/g," ");return e.length<=1024?e:`${e.slice(0,1024)}...[truncated]`},"sanitizeLogText"),CR=o(t=>{try{let e=t.name;if(typeof e=="string"&&e.length>0)return lo(e)}catch{}try{let e=t.constructor?.name;if(typeof e=="string"&&e.length>0)return lo(e)}catch{}return"Error"},"readErrorName"),OR=o(t=>{try{let e=t.message;return typeof e=="string"?lo(e):""}catch{return""}},"readErrorMessage"),IR=o(t=>{if(t instanceof Error)return{name:CR(t),message:OR(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=lo(i))}catch{}return{name:"NonErrorThrowable",message:`<non-Error ${n} thrown>`}}let r="";try{r=lo(String(t))}catch{}return{name:`NonErrorThrowable(${e})`,message:r}},"describeThrowable"),MR=o(t=>{if(!(t===null||typeof t!="object"&&typeof t!="function"))try{return t.cause}catch{return}},"readCause"),NR=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(IR(n));let i=MR(n);if(i===void 0)break;n=i}return e},"buildChain"),PR=o(t=>{if(t instanceof Error)try{return typeof t.stack=="string"?t.stack:void 0}catch{return}},"readStack"),g1=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"),LR=o(t=>t.map(e=>e.message.length>0?`${e.name}: ${e.message}`:e.name).join(" <- caused by: "),"renderChain"),_R=o(t=>{let e=lo(String(t.method)),r=NR(t.error),n=typeof t.correlationId=="string"&&t.correlationId.length>0?lo(t.correlationId):void 0,i=n?` [correlation ${n}]`:"",s=`${g1(t.origin,e)}${i}: ${LR(r)}`,a=PR(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"),rg=o(t=>{try{console.error(t.formatted)}catch{}},"printDefaultReport"),$s=o(t=>{let e;try{e=_R(t)}catch{try{console.error(`${g1(t.origin,String(t.method))}: <error description unavailable>`)}catch{}return}let r=DR();if(!r){rg(e);return}try{let n=r(e);n&&typeof n.then=="function"&&Promise.resolve(n).catch(()=>{rg(e)})}catch{rg(e)}},"reportTypedRequestError");var ng=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 Pp(r);e.localData&&(i.localData=e.localData);let s=await this.handlerFunction(e.request,i).catch(a=>{a instanceof dr?n=a:($s({origin:"handler",method:this.method,correlationId:e.correlation?.id,error:a}),n=new dr(t.internalErrorMessage))});return n?(e.response=null,e.error={text:n.errorText,data:n.errorData}):e.response=s===void 0?null:s,e?.correlation?.phase&&(e.correlation.phase="response"),e}};var RR=[],b1=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=b1(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&&$s({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 Lp(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(Lp,"getTypedRequestResponseInterestKey");var ig=class t{static{o(this,"TypedRouter")}constructor(){this.hookRegistrationState=Ip(),this.routerMap=new hr.ObjectMap,this.fallbackRouterMap=new hr.ObjectMap,this.fallbackParentRouters=new Set,this.handlerMap=new hr.ObjectMap,this.middlewares=[],this.requestScopes=[],this.fireEventInterestMap=new hr.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 u1()}static set globalHooks(e){f1(e)}static setGlobalHooks(e,r){p1(e,r)}static addGlobalHooks(e,r){return h1(e,r)}static clearGlobalHooks(){m1()}static setGlobalErrorReporter(e){return y1(e)}static clearGlobalErrorReporter(){x1()}get hooks(){return this.hookRegistrationState.hooks}set hooks(e){Np(this.hookRegistrationState,e)}setHooks(e,r){Mp(this.hookRegistrationState,e,r)}callHook(e,r){As(e,r,this.hookRegistrationState)}setErrorFromCaughtError(e,r,n){if(r instanceof dr){e.error={text:r.errorText,data:r.errorData??{}};return}$s({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??RR}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=Lp(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 Cn,f=new Cn,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,Pr.encodePayloadForNetwork(e,{side:"responding",virtualStreamTransport:c,activationScope:f})),"encodeResponse");try{if(e=await Pr.decodePayloadFromNetworkAsync(e,{side:"responding",virtualStreamTransport:c,activationScope:u,abortSignal:l}),e.response=null,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 z of x.middlewares)await z(e)}catch(z){E={value:z},this.setErrorFromCaughtError(e,z,"middleware"),e.correlation.phase="response",P=!0;return}u.authorizeApplicationUse(),e=await y.addResponse(e,l),P=!0}catch(z){throw L={error:z},z}},"runMiddlewareAndHandler"),A=this.collectRequestScopes(T);if(A.length===0)await D();else{let z=Object.freeze({entryRouter:this,owningRouter:x,method:e.method,localData:s,abortSignal:l}),C;try{await b1(A,0,D,e,z)}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");$s({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 F=!!e.error;return e=await m(),F&&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}),F||(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 og=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=Lp(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 _p=new xl.HttpCache,FR=new Ls.SmartFetch({httpCache:_p}),Rp=2147483647,Fp=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}},Ap=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}},$p=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 Cn,l={method:this.method,request:e,response:null,requestInstanceId:Mr.uni(),correlation:{id:Mr.uni(),phase:"request"}};try{this.assertActive(i);let c=Pr.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||As("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||As("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 dr(p.text,p.data);let h=f.response;if(!this.urlEndPoint&&this.typedTarget.options.supportsAbortSignal!==!0&&Pr.containsNetworkDescriptor(h))throw new Error("VirtualStreams require TypedTarget AbortSignal transport support");try{h=await Pr.decodePayloadFromNetworkAsync(h,{side:"requesting",activationScope:a,virtualStreamTransport:this.typedTarget?.options.virtualStreamTransport,openDeadlineAt:i.deadlineAt,abortSignal:i.abortSignal})}catch(m){throw m instanceof ao&&i.deadlineAt!==void 0&&m.deadlineAt===i.deadlineAt?this.createTimeoutError(i):m}return this.assertActive(i),a.authorizeApplicationUse(),this.skipHooks||As("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 FR.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 _p.delete(r.cacheKey),r.abortSignal?.aborted?this.getAbortReason(r):r.timeoutMs!==void 0&&(this.hasDeadlineExpired(r)||Ls.isFetchTimeoutError(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 _p.delete(r.cacheKey),l}r.cacheKey&&!this.isReusableCachedHttpEnvelope(s)&&await _p.delete(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 Ap(this.method,r.maxRetries);n+=1,await this.waitForRetry(s.retry.waitForMs,r),e.requestInstanceId=Mr.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>Rp))throw new RangeError(`TypedRequest timeoutMs must be a positive safe integer no greater than ${Rp}`);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 Fp(this.method,e.timeoutMs)}async waitForRetry(e,r){if(!Number.isSafeInteger(e)||e<=0||e>Rp)throw new RangeError(`TypedRequest retry waitForMs must be a positive safe integer no greater than ${Rp}`);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 Q.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")&&!Pr.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 w1(t){return t&&typeof t.then=="function"}o(w1,"isPromise");var S1=Promise.resolve(!1),aNe=Promise.resolve(!0),cn=Promise.resolve();function Bp(t,e){return t||(t=0),new Promise(function(r){return setTimeout(function(){return r(e)},t)})}o(Bp,"sleep");function v1(t,e){return Math.floor(Math.random()*(e-t+1)+t)}o(v1,"randomInt");function bl(){return Math.random().toString(36).substring(2)}o(bl,"randomToken");var sg=0;function On(){var t=Date.now()*1e3;return t<=sg&&(t=sg+1),sg=t,t}o(On,"microSeconds");function lNe(){return typeof navigator<"u"&&typeof navigator.locks<"u"&&typeof navigator.locks.request=="function"}o(lNe,"supportsWebLockAPI");var AR=On,$R="native";function BR(t){var e={time:On(),messagesCallback:null,bc:new BroadcastChannel(t),subFns:[]};return e.bc.onmessage=function(r){e.messagesCallback&&e.messagesCallback(r.data)},e}o(BR,"create");function jR(t){t.bc.close(),t.subFns=[]}o(jR,"close");function UR(t,e){try{return t.bc.postMessage(e,!1),cn}catch(r){return Promise.reject(r)}}o(UR,"postMessage");function zR(t,e){t.messagesCallback=e}o(zR,"onMessage");function HR(){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(HR,"canBeUsed");function WR(){return 150}o(WR,"averageResponseTime");var k1={create:BR,close:jR,onMessage:zR,postMessage:UR,canBeUsed:HR,type:$R,averageResponseTime:WR,microSeconds:AR};var Bs=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<ag()-this.ttl?(this.map.delete(e),!1):!0}add(e){this.map.delete(e),this.map.set(e,ag()),this._to||(this._to=!0,setTimeout(()=>{this._to=!1,qR(this)},0))}clear(){this.map.clear()}};function qR(t){let e=ag()-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(qR,"removeTooOldValues");function ag(){return Date.now()}o(ag,"now");function co(){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(co,"fillOptionsWithDefaults");var YR=On,VR="pubkey.broadcast-channel-0-",Lr="messages",wl={durability:"relaxed"},KR="idb";function T1(){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(T1,"getIdb");function jp(t){t.commit&&t.commit()}o(jp,"commitIndexedDBTransaction");function GR(t){var e=T1(),r=VR+t,n=e.open(r);return n.onupgradeneeded=function(i){var s=i.target.result;s.createObjectStore(Lr,{keyPath:"id",autoIncrement:!0})},new Promise(function(i,s){n.onerror=function(a){return s(a)},n.onsuccess=function(){i(n.result)}})}o(GR,"createDatabase");function QR(t,e,r){var n=Date.now(),i={uuid:e,time:n,data:r},s=t.transaction([Lr],"readwrite",wl);return new Promise(function(a,l){s.oncomplete=function(){return a()},s.onerror=function(u){return l(u)};var c=s.objectStore(Lr);c.add(i),jp(s)})}o(QR,"writeMessage");function SNe(t){var e=t.transaction(Lr,"readonly",wl),r=e.objectStore(Lr),n=[];return new Promise(function(i){r.openCursor().onsuccess=function(s){var a=s.target.result;a?(n.push(a.value),a.continue()):(jp(e),i(n))}})}o(SNe,"getAllMessages");function JR(t,e){var r=t.transaction(Lr,"readonly",wl),n=r.objectStore(Lr),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()):(jp(r),c(i))}})}o(JR,"getMessagesHigherThan");function XR(t,e){if(t.closed)return Promise.resolve([]);var r=t.db.transaction(Lr,"readwrite",wl),n=r.objectStore(Lr);return Promise.all(e.map(function(i){var s=n.delete(i);return new Promise(function(a){s.onsuccess=function(){return a()}})}))}o(XR,"removeMessagesById");function ZR(t,e){var r=Date.now()-e,n=t.transaction(Lr,"readonly",wl),i=n.objectStore(Lr),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()):(jp(n),a(s))}else a(s)}})}o(ZR,"getOldMessages");function e2(t){return ZR(t.db,t.options.idb.ttl).then(function(e){return XR(t,e.map(function(r){return r.id}))})}o(e2,"cleanOldMessages");function t2(t,e){return e=co(e),GR(t).then(function(r){var n={closed:!1,lastCursorId:0,channelName:t,options:e,uuid:bl(),eMIs:new Bs(e.idb.ttl*2),writeBlockPromise:cn,messagesCallback:null,readQueuePromises:[],db:r};return r.onclose=function(){n.closed=!0,e.idb.onclose&&e.idb.onclose()},E1(n),n})}o(t2,"create");function E1(t){t.closed||D1(t).then(function(){return Bp(t.options.idb.fallbackInterval)}).then(function(){return E1(t)})}o(E1,"_readLoop");function r2(t,e){return!(t.uuid===e.uuid||e.eMIs.has(t.id)||t.data.time<e.messagesCallbackTime)}o(r2,"_filterMessage");function D1(t){return t.closed?cn:t.messagesCallback?JR(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 r2(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))}),cn}):cn}o(D1,"readNewMessages");function n2(t){t.closed=!0,t.db.close()}o(n2,"close");function i2(t,e){return t.writeBlockPromise=t.writeBlockPromise.then(function(){return QR(t.db,t.uuid,e)}).then(function(){v1(0,10)===0&&e2(t)}),t.writeBlockPromise}o(i2,"postMessage");function o2(t,e,r){t.messagesCallbackTime=r,t.messagesCallback=e,D1(t)}o(o2,"onMessage");function s2(){return!!T1()}o(s2,"canBeUsed");function a2(t){return t.idb.fallbackInterval*2}o(a2,"averageResponseTime");var C1={create:t2,close:n2,onMessage:o2,postMessage:i2,canBeUsed:s2,type:KR,averageResponseTime:a2,microSeconds:YR};var l2=On,c2="pubkey.broadcastChannel-",u2="localstorage";function O1(){var t;if(typeof window>"u")return null;try{t=window.localStorage,t=window["ie8-eventlistener/storage"]||window.localStorage}catch{}return t}o(O1,"getLocalStorage");function I1(t){return c2+t}o(I1,"storageKey");function f2(t,e){return new Promise(function(r){Bp().then(function(){var n=I1(t.channelName),i={token:bl(),time:Date.now(),data:e,uuid:t.uuid},s=JSON.stringify(i);O1().setItem(n,s);var a=document.createEvent("Event");a.initEvent("storage",!0,!0),a.key=n,a.newValue=s,window.dispatchEvent(a),r()})})}o(f2,"postMessage");function p2(t,e){var r=I1(t),n=o(function(s){s.key===r&&e(JSON.parse(s.newValue))},"listener");return window.addEventListener("storage",n),n}o(p2,"addStorageEventListener");function h2(t){window.removeEventListener("storage",t)}o(h2,"removeStorageEventListener");function m2(t,e){if(e=co(e),!M1())throw new Error("BroadcastChannel: localstorage cannot be used");var r=bl(),n=new Bs(e.localstorage.removeTimeout),i={channelName:t,uuid:r,eMIs:n};return i.listener=p2(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(m2,"create");function d2(t){h2(t.listener)}o(d2,"close");function g2(t,e,r){t.messagesCallbackTime=r,t.messagesCallback=e}o(g2,"onMessage");function M1(){var t=O1();if(!t)return!1;try{var e="__broadcastchannel_check";t.setItem(e,"works"),t.removeItem(e)}catch{return!1}return!0}o(M1,"canBeUsed");function y2(){var t=120,e=navigator.userAgent.toLowerCase();return e.includes("safari")&&!e.includes("chrome")?t*2:t}o(y2,"averageResponseTime");var N1={create:m2,close:d2,onMessage:g2,postMessage:f2,canBeUsed:M1,type:u2,averageResponseTime:y2,microSeconds:l2};var P1=On,x2="simulate",lg=new Set;function b2(t){var e={time:P1(),name:t,messagesCallback:null};return lg.add(e),e}o(b2,"create");function w2(t){lg.delete(t)}o(w2,"close");var L1=5;function S2(t,e){return new Promise(function(r){return setTimeout(function(){var n=Array.from(lg);n.forEach(function(i){i.name===t.name&&i!==t&&i.messagesCallback&&i.time<e.time&&i.messagesCallback(e)}),r()},L1)})}o(S2,"postMessage");function v2(t,e){t.messagesCallback=e}o(v2,"onMessage");function k2(){return!0}o(k2,"canBeUsed");function T2(){return L1}o(T2,"averageResponseTime");var _1={create:b2,close:w2,onMessage:v2,postMessage:S2,canBeUsed:k2,type:x2,averageResponseTime:T2,microSeconds:P1};var R1=[k1,C1,N1];function cg(t){var e=[].concat(t.methods,R1).filter(Boolean);if(t.type){if(t.type==="simulate")return _1;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(R1.map(function(i){return i.type})))}o(cg,"chooseMethod");var fg=new Set,E2=0,uo=o(function(e,r){this.id=E2++,fg.add(this),this.name=e,ug&&(r=ug),this.options=co(r),this.method=cg(this.options),this._iL=!1,this._onML=null,this._addEL={message:[],internal:[]},this._uMP=new Set,this._befC=[],this._prepP=null,O2(this)},"BroadcastChannel");uo._pubkey=!0;function D2(t){t=co(t);var e=cg(t);return e.type==="node"?e.clearNodeFolder().then(function(){return!0}):S1}o(D2,"clearNodeFolder");var ug;function C2(t){ug=t}o(C2,"enforceOptions"),uo.prototype={postMessage:o(function(e){if(this.closed)throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed "+JSON.stringify(e));return F1(this,"message",e)},"postMessage"),postInternal:o(function(e){return F1(this,"internal",e)},"postInternal"),set onmessage(t){var e=this.method.microSeconds(),r={time:e,fn:t};B1(this,"message",this._onML),t&&typeof t=="function"?(this._onML=r,$1(this,"message",r)):this._onML=null},addEventListener:o(function(e,r){var n=this.method.microSeconds(),i={time:n,fn:r};$1(this,e,i)},"addEventListener"),removeEventListener:o(function(e,r){var n=this._addEL[e].find(function(i){return i.fn===r});B1(this,e,n)},"removeEventListener"),close:o(function(){var e=this;if(!this.closed){fg.delete(this),this.closed=!0;var r=this._prepP?this._prepP:cn;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 F1(t,e,r){var n=t.method.microSeconds(),i={time:n,type:e,data:r},s=t._prepP?t._prepP:cn;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(F1,"_post");function O2(t){var e=t.method.create(t.name,t.options);w1(e)?(t._prepP=e,e.then(function(r){t._state=r})):t._state=e}o(O2,"_prepareChannel");function A1(t){return t._addEL.message.length>0||t._addEL.internal.length>0}o(A1,"_hasMessageListeners");function $1(t,e,r){t._addEL[e].push(r),I2(t)}o($1,"_addListenerObject");function B1(t,e,r){t._addEL[e]=t._addEL[e].filter(function(n){return n!==r}),M2(t)}o(B1,"_removeListenerObject");function I2(t){if(!t._iL&&A1(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(I2,"_startListening");function M2(t){if(t._iL&&!A1(t)){t._iL=!1;var e=t.method.microSeconds();t.method.onMessage(t._state,null,e)}}o(M2,"_stopListening");var P2=o(t=>"ref"in t&&typeof t.ref=="function"&&"unref"in t&&typeof t.unref=="function","isProcessHolding"),L2=o((t,e)=>{if(typeof globalThis.BroadcastChannel=="function"){let n=new globalThis.BroadcastChannel(t);n.onmessage=s=>{e(s.data)};let i=P2(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 uo(t);return r.onmessage=n=>{e(n)},{post:o(n=>r.postMessage(n),"post"),close:o(()=>r.close(),"close"),holdProcess:o(()=>{},"holdProcess")}},"openChannel"),j1=o(t=>typeof t=="object"&&t!==null,"isObject"),U1=o((t,e)=>Object.prototype.hasOwnProperty.call(t,e),"hasOwn"),_2=o(t=>{if(!j1(t)||!U1(t,"deesCommsEvent"))return null;let e=t.deesCommsEvent;return!j1(e)||typeof e.name!="string"||typeof e.uniqueEventId!="string"||!U1(e,"payload")?"malformed":{name:e.name,uniqueEventId:e.uniqueEventId,payload:e.payload}},"eventOf"),R2=o(()=>{let t=globalThis.crypto.getRandomValues(new Uint8Array(16));return Array.from(t,e=>e.toString(16).padStart(2,"0")).join("")},"createEventId"),pg=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 jt.TypedRouter,this.typedtarget=new jt.TypedTarget({postMethodWithTypedRouter:o(async r=>{await this.postMessage(r)},"postMethodWithTypedRouter"),typedRouterRef:this.typedrouter}),this.channelName=e.channelName??t.defaultChannelName,this.channel=L2(this.channelName,r=>{this.receive(r)})}createTypedRequest(e){return new jt.TypedRequest(this.typedtarget,e)}async postMessage(e){this.assertOpen(),await this.channel.post(e)}async createTypedHandler(e,r){this.typedrouter.addTypedHandler(new jt.TypedHandler(e,r)),this.hasTypedHandlers=!0,this.holdProcessWhileListened()}async broadcast(e,r){let n={deesCommsEvent:{name:e,uniqueEventId:R2(),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=_2(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 wc={};se(wc,{SmartMarkdown:()=>rb,parseCommentFrontmatter:()=>VC,parseFrontmatter:()=>YC,parseMarkdown:()=>jC,stringifyFrontmatter:()=>KC});var z1=typeof self=="object"?self:globalThis,F2=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 z1[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 z1[s](a),i)},"unpair");return n},"deserializer"),qp=o(t=>F2(new Map,t)(0),"deserialize");var Us="",{toString:A2}={},{keys:$2}=Object,Tl=o(t=>{let e=typeof t;if(e!=="object"||!t)return[0,e];let r=A2.call(t).slice(8,-1);switch(r){case"Array":return[1,Us];case"Object":return[2,Us];case"Date":return[3,Us];case"RegExp":return[4,Us];case"Map":return[5,Us];case"Set":return[6,Us];case"DataView":return[1,r]}return r.includes("Array")?[1,r]:r.includes("Error")?[7,r]:[2,r]},"typeOf"),Yp=o(([t,e])=>t===0&&(e==="function"||e==="symbol"),"shouldSkip"),B2=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]=Tl(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 $2(a))(t||!Yp(Tl(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||!(Yp(Tl(h))||Yp(Tl(m))))&&f.push([s(h),s(m)]);return p}case 6:{let f=[],p=i([l,f],a);for(let h of a)(t||!Yp(Tl(h)))&&f.push(s(h));return p}}let{message:u}=a;return i([l,{name:c,message:u}],a)},"pair");return s},"serializer"),Vp=o((t,{json:e,lossy:r}={})=>{let n=[];return B2(!(e||r),!!e,new Map,n)(t),n},"serialize");var mi=typeof structuredClone=="function"?(t,e)=>e&&("json"in e||"lossy"in e)?qp(Vp(t,e)):structuredClone(t):(t,e)=>qp(Vp(t,e));var Kp=H1("end"),Gp=H1("start");function H1(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(H1,"point");function El(t){let e=Gp(t),r=Kp(t);if(e&&r)return{start:e,end:r}}o(El,"position");var fo=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Qp={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...fo,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...fo],h2:[["className","sr-only"]],img:[...fo,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...fo,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...fo],table:[...fo],ul:[...fo,["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 di={}.hasOwnProperty;function gg(t,e){let r={type:"root",children:[]},n={schema:e?{...Qp,...e}:Qp,stack:[]},i=W1(n,t);return i&&(Array.isArray(i)?i.length===1?r=i[0]:r.children=i:r=i),r}o(gg,"sanitize");function W1(t,e){if(e&&typeof e=="object"){let r=e;switch(typeof r.type=="string"?r.type:""){case"comment":return j2(t,r);case"doctype":return U2(t,r);case"element":return z2(t,r);case"root":return H2(t,r);case"text":return W2(t,r);default:}}}o(W1,"transform");function j2(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 Dl(s,e),s}}o(j2,"comment");function U2(t,e){if(t.schema.allowDoctypes){let r={type:"doctype"};return Dl(r,e),r}}o(U2,"doctype");function z2(t,e){let r=typeof e.tagName=="string"?e.tagName:"";t.stack.push(r);let n=q1(t,e.children),i=q2(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&&di.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 Dl(a,e),a}o(z2,"element");function H2(t,e){let n={type:"root",children:q1(t,e.children)};return Dl(n,e),n}o(H2,"root");function W2(t,e){let n={type:"text",value:typeof e.value=="string"?e.value:""};return Dl(n,e),n}o(W2,"text");function q1(t,e){let r=[];if(Array.isArray(e)){let n=e,i=-1;for(;++i<n.length;){let s=W1(t,n[i]);s&&(Array.isArray(s)?r.push(...s):r.push(s))}}return r}o(q1,"children");function q2(t,e){let r=t.stack[t.stack.length-1],n=t.schema.attributes,i=t.schema.required,s=n&&di.call(n,r)?n[r]:void 0,a=n&&di.call(n,"*")?n["*"]:void 0,l=e&&typeof e=="object"?e:{},c={},u;for(u in l)if(di.call(l,u)){let f=l[u],p=Y1(t,K1(s,u),u,f);p==null&&(p=Y1(t,K1(a,u),u,f)),p!=null&&(c[u]=p)}if(i&&di.call(i,r)){let f=i[r];for(u in f)di.call(f,u)&&!di.call(c,u)&&(c[u]=f[u])}return c}o(q2,"properties");function Y1(t,e,r,n){return e?Array.isArray(n)?Y2(t,e,r,n):V1(t,e,r,n):void 0}o(Y1,"propertyValue");function Y2(t,e,r,n){let i=-1,s=[];for(;++i<n.length;){let a=V1(t,e,r,n[i]);(typeof a=="number"||typeof a=="string")&&s.push(a)}return s}o(Y2,"propertyValueMany");function V1(t,e,r,n){if(!(typeof n!="boolean"&&typeof n!="number"&&typeof n!="string")&&V2(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(V1,"propertyValuePrimitive");function V2(t,e,r){let n=t.schema.protocols&&di.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(V2,"safeProtocol");function Dl(t,e){let r=El(e);e.data&&(t.data=mi(e.data)),r&&(t.position=r)}o(Dl,"patch");function K1(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(K1,"findDefinition");function G1(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(G1,"blockquote");function Q1(t,e){let r={type:"element",tagName:"br",properties:{},children:[]};return t.patch(e,r),[t.applyData(e,r),{type:"text",value:`
13
- `}]}o(Q1,"hardBreak");function J1(t,e){let r=e.value?e.value+`
14
- `:"",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(J1,"code");function X1(t,e){let r={type:"element",tagName:"del",properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}o(X1,"strikethrough");function Z1(t,e){let r={type:"element",tagName:"em",properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}o(Z1,"emphasis");var tt=gi(/[A-Za-z]/),ze=gi(/[\dA-Za-z]/),eT=gi(/[#-'*+\--9=?A-Z^-~]/);function po(t){return t!==null&&(t<32||t===127)}o(po,"asciiControl");var Cl=gi(/\d/),tT=gi(/[\dA-Fa-f]/),rT=gi(/[!-/:-@[-`{-~]/);function V(t){return t!==null&&t<-2}o(V,"markdownLineEnding");function ge(t){return t!==null&&(t<0||t===32)}o(ge,"markdownLineEndingOrSpace");function ee(t){return t===-2||t===-1||t===32}o(ee,"markdownSpace");var ho=gi(/\p{P}|\p{S}/u),un=gi(/\s/);function gi(t){return e;function e(r){return r!==null&&r>-1&&t.test(String.fromCharCode(r))}}o(gi,"regexCheck");var K2={'"':"quot","&":"amp","<":"lt",">":"gt"};function Jp(t){return t.replace(/["&<>]/g,e);function e(r){return"&"+K2[r]+";"}}o(Jp,"encode");function fn(t,e){let r=Jp(rr(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 rr(t){let e=[],r=-1,n=0,i=0;for(;++r<t.length;){let s=t.charCodeAt(r),a="";if(s===37&&ze(t.charCodeAt(r+1))&&ze(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(rr,"normalizeUri");function nT(t,e){let r=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",n=String(e.identifier).toUpperCase(),i=rr(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(nT,"footnoteReference");function iT(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(iT,"heading");function oT(t,e){if(t.options.allowDangerousHtml){let r={type:"raw",value:e.value};return t.patch(e,r),t.applyData(e,r)}}o(oT,"html");function Xp(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(Xp,"revert");function sT(t,e){let r=String(e.identifier).toUpperCase(),n=t.definitionById.get(r);if(!n)return Xp(t,e);let i={src:rr(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(sT,"imageReference");function aT(t,e){let r={src:rr(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(aT,"image");function lT(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(lT,"inlineCode");function cT(t,e){let r=String(e.identifier).toUpperCase(),n=t.definitionById.get(r);if(!n)return Xp(t,e);let i={href:rr(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(cT,"linkReference");function uT(t,e){let r={href:rr(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(uT,"link");function pT(t,e,r){let n=t.all(e),i=r?G2(r):fT(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:`
9
+ `)},"stripIndent"),j_=o((t,e)=>{let r=t;return(!e||e.stripIndent)&&(r=B_(r)),(!e||e.normalizeNewline)&&(r=r.replace(/\r\n/g,`
10
+ `)),(!e||e.replaceTabs)&&(r=Mk(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 fp={};se(fp,{isBase64:()=>z_,isUtf8:()=>U_});var qd={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")},up=class{static{o(this,"Base64")}constructor(e,r){switch(r){case"string":this.refString=e;break;case"base64":this.refString=Ns.decode(e);break;case"base64uri":this.refString=Ns.decode(e)}}get simpleString(){return this.refString}get base64String(){return Ns.encode(this.refString)}get base64UriString(){return Ns.encodeUri(this.refString)}},Ns={encode:o(t=>qd.encode(t),"encode"),encodeUri:o(t=>qd.encode(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,""),"encodeUri"),decode:o(t=>qd.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 U_=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"),z_=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 pp=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 hp=class{static{o(this,"GitRepo")}constructor(e,r){let n=H_(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=Nk(this.host,this.user,this.repo,this.accessToken,"ssh"),this.httpsUrl=Nk(this.host,this.user,this.repo,this.accessToken,"https")}},H_=o(function(t){return/([a-zA-Z0-9\-_\.]*)(?:\/|\:)([a-zA-Z0-9\-_\.]*)(?:\/)([a-zA-Z0-9\-_\.]*)(?:\.git)/.exec(t)},"gitRegex"),Nk=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 _k=qn(Lk(),1),Ps=_k.default;var Fk=o(()=>globalThis.Buffer,"getNodeBuffer");function W_(t){let e=Fk();return e?e.from(t).toString("base64"):btoa(String.fromCharCode(...t))}o(W_,"base64Encode");function q_(t){let e=Fk();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(q_,"base64Decode");function dl(t,e){return JSON.stringify(t,mp,e)}o(dl,"stringify");function Vd(t){return JSON.parse(t,Ak)}o(Vd,"parse");var mp=o((t,e)=>{if(V_(e)){let r;if("data"in e&&$k(e.data))r=new Uint8Array(e.data);else if(e instanceof Uint8Array)r=e;else return e;return{type:"EncodedBuffer",data:"base64:"+W_(r)}}return e},"replacer"),Ak=o((t,e)=>{if(Y_(e)&&Yd(e.data)&&e.data.startsWith("base64:")){let r=e.data.slice(7);return q_(r)}return e},"reviver");function Y_(t){return Bk(t)&&t.type==="EncodedBuffer"&&Yd(t.data)}o(Y_,"isEncodedBuffer");function V_(t){return Bk(t)&&t.type==="Buffer"&&($k(t.data)||Yd(t.data))||t instanceof Uint8Array}o(V_,"isBufferLike");function $k(t){return Array.isArray(t)}o($k,"isArray");function Yd(t){return typeof t=="string"}o(Yd,"isString");function Bk(t){return typeof t=="object"&&t!==null}o(Bk,"isObject");var Uk=o(t=>{let e=JSON.parse(dl(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):Ps(e,{})},"stableStringify");var dp=Vd,Kd=o(t=>t.split(`
11
+ `).reduce((n,i)=>{let s=i.trim();return s.length>0&&n.push(dp(s)),n},[]),"parseJsonL"),K_=o(t=>t.map(e=>io(e)).join(`
12
+ `),"stringifyJsonL"),G_=o((t,e,r={})=>{let n=new WeakSet,i=o(l=>{if(l===null||typeof l!="object")return l;let c=mp("",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 Ps(s,a)},"stableOneWayStringify"),io=o((t,e,r=void 0)=>{if(r===void 0&&e===void 0)return Uk(t);let n=dl(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 Ps(t,i)},"stringify"),Q_=o(t=>{let e=io(t),r=JSON.parse(e);return JSON.stringify(r,null,2)},"stringifyPretty"),J_=o((...t)=>{let e=io(...t);return an.base64.encodeUri(e)},"stringifyBase64"),X_=o(t=>{let e=an.base64,n=(e.decodeUri||e.decode)(t);return dp(n)},"parseBase64"),Gd=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=dp(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 io(e)}},Z_=o(()=>(t,e)=>{let r=String(e.name);e.addInitializer(function(){this.saveableProperties||(this.saveableProperties=[]),this.saveableProperties.includes(r)||this.saveableProperties.push(r)})},"foldDec"),zk=o((t,e)=>{let r=io(t),n=io(e);return r===n},"deepEqualObjects"),eR=o((t,e)=>{let r=Kd(t),n=Kd(e);return zk(r,n)},"deepEqualJsonLStrings");var Hk={};var gp=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([tR(l),rR(s)]),u]);return p}catch(p){throw i.signal?.aborted?i.signal.reason:p}finally{i.signal?.removeEventListener("abort",f)}}},qk=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"),tR=o(t=>new Promise((e,r)=>{t.onsuccess=()=>e(t.result),t.onerror=()=>r(yp("IndexedDB request failed",t.error))}),"indexedDbRequestToPromise"),rR=o(t=>new Promise((e,r)=>{t.oncomplete=()=>e(),t.onabort=()=>r(yp("IndexedDB transaction aborted",t.error)),t.onerror=()=>r(yp("IndexedDB transaction failed",t.error))}),"indexedDbTransactionToPromise"),yp=o((t,e)=>e?new Error(`${t}: ${e.message}`,{cause:e}):new Error(t),"createIndexedDbError"),Yk=o((t,e)=>{t.objectStoreNames.contains(e)||t.createObjectStore(e)},"ensureObjectStore"),Vk=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(yp(`Failed to open IndexedDB database "${t}"`,a.error)),a.onblocked=()=>l(new Error(`Opening IndexedDB database "${t}" was blocked by another connection`))})},"openNativeDb"),nR=o(async(t,e)=>{let r=await Vk(t,void 0,i=>Yk(i,e));if(r.objectStoreNames.contains(e))return new gp(r);let n=r.version+1;if(r.close(),r=await Vk(t,n,i=>Yk(i,e)),!r.objectStoreNames.contains(e))throw r.close(),new Error(`Failed to create IndexedDB object store "${e}" in database "${t}"`);return new gp(r)},"openWebStoreDb"),gl=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 qk(r,e),e?.throwIfAborted()),this.initPromise||(this.initPromise=this.runInit().catch(n=>{throw this.initPromise=void 0,n})),qk(this.initPromise,e)}async runInit(){let e=new ro.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 nR(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 Qd=class{static{o(this,"TypedrequestCache")}constructor(e="default"){this.webstore=new gl({dbName:"trStore",storeName:`trStore-${e}`})}buildKey(e){return er.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 xp=class{static{o(this,"CacheStore")}constructor(e,r){this.lifecycleController=new AbortController,this.closeReason=new Error("HttpCache store is closed"),this.disposed=!1,this.pruneGeneration=0,this.pruneWaiters=new Set,this.activeOwnedOperations=new Set,this.webstore=new Nr.WebStore({dbName:e,storeName:r})}async set(e,r,n){let i=this.getOperationSignal(n.signal);if(!Number.isSafeInteger(n.maxEntries)||n.maxEntries<=0)throw new RangeError("HttpCache maxEntries must be a positive safe integer");await this.webstore.set(e,r,{signal:i}),await this.schedulePrune(n.maxEntries,i)}async get(e,r={}){let n=this.getOperationSignal(r.signal);try{let i=await this.webstore.get(e,{signal:n});return i===void 0?null:Kk(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={}){let n=this.getOperationSignal(r.signal);await this.webstore.delete(e,{signal:n})}async clear(e={}){let r=this.getOperationSignal(e.signal);await this.webstore.clear({signal:r})}responseFromCacheEntry(e){return new Response(e.response,{status:e.status,statusText:e.statusText,headers:new Headers(e.headers)})}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 sR(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}})}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 schedulePrune(e,r){r?.throwIfAborted();let n=++this.pruneGeneration;this.pendingPruneMaxEntries=this.pendingPruneMaxEntries===void 0?e:Math.min(this.pendingPruneMaxEntries,e);let i,s=new Promise((a,l)=>{i={generation:n,resolve:a,reject:l}});this.pruneWaiters.add(i),this.ensurePruneLoop();try{await aR(s,r)}finally{this.pruneWaiters.delete(i)}}ensurePruneLoop(){if(this.pruneLoopPromise)return;let 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}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=[];for(let a of n){if(a.valid&&!oR(a)){i.push(a);continue}r.throwIfAborted(),await this.webstore.delete(a.key,{signal:r})}i.sort((a,l)=>a.timestamp===l.timestamp?a.key.localeCompare(l.key):a.timestamp-l.timestamp);let s=Math.max(0,i.length-e);for(let a of i.slice(0,s))r.throwIfAborted(),await this.webstore.delete(a.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(Kk(s)?{key:i,valid:!0,timestamp:s.timestamp,maxAge:s.maxAge}:{key:i,valid:!1,timestamp:0})}catch{if(e.aborted)throw e.reason}return n}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=e().finally(()=>{this.activeOwnedOperations.delete(r)});return this.activeOwnedOperations.add(r),r}},Kk=o(t=>{if(!t||typeof t!="object")return!1;let e=Reflect.get(t,"headers");return Reflect.get(t,"response")instanceof ArrayBuffer&&typeof e=="object"&&e!==null&&Number.isFinite(Reflect.get(t,"timestamp"))&&typeof Reflect.get(t,"url")=="string"&&Number.isInteger(Reflect.get(t,"status"))&&typeof Reflect.get(t,"statusText")=="string"},"isCacheEntry"),oR=o(t=>t.maxAge!==void 0&&t.maxAge>0&&Date.now()-t.timestamp>=t.maxAge,"isExpired"),sR=o(async(t,e,r,n)=>{e.throwIfAborted();let i=t.body?.getReader();if(!i)return new ArrayBuffer(0);let s=[],a=0,l,c=new Promise((m,d)=>{l=d}),u,f=o(()=>{l(e.reason),n?.aborted||(u=Promise.all([i.cancel(e.reason).catch(()=>{}),r?.cancel(e.reason).catch(()=>{})]).then(()=>{}))},"onAbort");e.addEventListener("abort",f,{once:!0});try{for(;;){let m=await Promise.race([i.read(),c]);if(m.done)break;s.push(m.value),a+=m.value.byteLength}}finally{e.removeEventListener("abort",f),u&&await u;try{i.releaseLock()}catch{}}let p=new Uint8Array(a),h=0;for(let m of s)p.set(m,h),h+=m.byteLength;return p.buffer},"consumeArrayBuffer"),aR=o(async(t,e)=>{if(!e)return t;e.throwIfAborted();let r,n=new Promise((s,a)=>{r=a}),i=o(()=>r(e.reason),"onAbort");e.addEventListener("abort",i,{once:!0});try{return await Promise.race([t,n])}finally{e.removeEventListener("abort",i)}},"awaitWithSignal");var Gk=Symbol.for("@push.rocks/smartrequest/FetchTimeoutError"),tr=class extends Error{static{o(this,"FetchTimeoutError")}constructor(e,r){super(`Request timeout after ${r}ms: ${e}`),this.name="FetchTimeoutError",this.url=e,this.timeoutMs=r,Object.defineProperty(this,Gk,{value:!0})}},oo=o(t=>t instanceof Error&&Reflect.get(t,Gk)===!0,"isFetchTimeoutError"),mr=o(t=>{if(t.reason instanceof Error)return t.reason;let e=new Error("The request was aborted");return e.name="AbortError",e},"abortReasonOf"),mi=o(t=>t instanceof Error?t:new Error(String(t)),"toError"),Cn=o(async(t,e)=>{!t?.body||t.bodyUsed||await t.body.cancel(e).catch(()=>{})},"discardResponse"),Qk=o((t,e)=>e?.aborted?Promise.reject(mr(e)):new Promise((r,n)=>{let i=o(()=>{clearTimeout(s),n(mr(e))},"onAbort"),s=setTimeout(()=>{e?.removeEventListener("abort",i),r()},Math.max(0,t));e?.addEventListener("abort",i,{once:!0})}),"abortableDelay");var bp=o(t=>{let e={maxAge:0,etag:t.get("etag")??void 0,lastModified:t.get("last-modified")??void 0,immutable:!1,noCache:!1,noStore:!1,mustRevalidate:!1},r=!1;for(let n of(t.get("cache-control")??"").toLowerCase().split(",").map(i=>i.trim()))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=Number.parseInt(n.slice(8),10);Number.isNaN(i)||(e.maxAge=i*1e3,r=!0)}if(!r){let n=Date.parse(t.get("expires")??"");Number.isNaN(n)||(e.maxAge=Math.max(0,n-Date.now()))}return e},"extractCacheMetadata"),Jk=o((t,e)=>{if(e.noStore)return!1;if(e.immutable)return!0;let r=t.maxAge||e.maxAge||0;return r>0&&Date.now()-t.timestamp<r},"isFresh"),wp=o(t=>t.noCache||t.mustRevalidate,"requiresRevalidation"),Xk=o(t=>{let e={};return t.etag&&(e["if-none-match"]=t.etag),t.lastModified&&(e["if-modified-since"]=t.lastModified),e},"createConditionalHeaders"),Zk=o(t=>{let e={};return t.forEach((r,n)=>{e[n]=r}),e},"headersToObject");var so=o((t,...e)=>{t.logging&&console.log("[smartrequest/cache]",...e)},"log"),ln=o((t,e,r)=>({response:t,fromCache:e,revalidated:r}),"result"),lR=o((t,e)=>e===void 0?t:Math.min(t,e),"resolveEffectiveMaxAge"),e1=o((t,e,r)=>Jk(e,r)&&(t.cacheMaxAge===void 0||Date.now()-e.timestamp<t.cacheMaxAge),"isFreshForContext"),yl=o(async(t,e,r)=>{!t?.body||t.bodyUsed||r?.aborted||await t.body.cancel(e).catch(()=>{})},"discard"),xl=o(async(t,e,r,n=!0)=>{if(!e.ok)return;let i=bp(e.headers);if(!i.noStore){i.maxAge=lR(i.maxAge,t.cacheMaxAge);try{let s=await t.cacheStore.cacheEntryFromResponse(t.request.url,e,i,{signal:t.signal,responseSignal:r,preserveResponse:n});await t.cacheStore.set(t.cacheKey,s,{signal:t.signal,maxEntries:t.maxEntries})}catch(s){throw await yl(e,s,r),s}}},"store"),Sp=o(t=>t.cacheStore.get(t.cacheKey,{signal:t.signal}),"readEntry"),cR=o(async t=>{let e;try{return e=await t.dispatch(t.request),await xl(t,e,t.request.signal),ln(e,!1,!1)}catch(r){if(await yl(e,r,t.request.signal),t.signal.aborted)throw t.signal.reason;if(oo(r)||e)throw r;so(t,"network failed, trying cache:",t.request.url,r);let n=await Sp(t);if(!n)throw r;return ln(t.cacheStore.responseFromCacheEntry(n),!0,!1)}},"networkFirst"),uR=o(async t=>{let e=await Sp(t);if(e){let n=bp(new Headers(e.headers));if(e1(t,e,n)&&!wp(n))return so(t,"cache hit (fresh):",t.request.url),ln(t.cacheStore.responseFromCacheEntry(e),!0,!1);if(wp(n)&&(e.etag||e.lastModified))return await fR(t,e)}so(t,"cache miss, fetching:",t.request.url);let r=await t.dispatch(t.request);return await xl(t,r,t.request.signal),ln(r,!1,!1)},"cacheFirst"),fR=o(async(t,e)=>{let r=new Request(t.request,{headers:{...Zk(t.request.headers),...Xk(e)},signal:t.signal}),n;try{return n=await t.dispatch(r),n.status===304?(so(t,"cache revalidated (304):",t.request.url),await yl(n,"304 answered from the cache",r.signal),e.timestamp=Date.now(),await t.cacheStore.set(t.cacheKey,e,{signal:t.signal,maxEntries:t.maxEntries}),ln(t.cacheStore.responseFromCacheEntry(e),!0,!0)):(await xl(t,n,r.signal),ln(n,!1,!0))}catch(i){if(await yl(n,i,r.signal),t.signal.aborted)throw t.signal.reason;if(oo(i)||n)throw i;return so(t,"revalidation failed, using cache:",t.request.url,i),ln(t.cacheStore.responseFromCacheEntry(e),!0,!1)}},"revalidate"),pR=o(async t=>{let e=await Sp(t);if(!e){let n=await t.dispatch(t.request);return await xl(t,n,t.request.signal),ln(n,!1,!1)}let r=bp(new Headers(e.headers));if(!e1(t,e,r)||wp(r)){let n=new Request(t.request);t.scheduleBackgroundRevalidation(async i=>{let s={...t,request:new Request(n,{signal:i}),signal:i},a;try{a=await s.dispatch(s.request),await xl(s,a,s.request.signal,!1),so(t,"background revalidation complete:",t.request.url)}catch(l){i.aborted||so(t,"background revalidation failed:",t.request.url,l)}finally{await yl(a,"background response discarded",s.request.signal)}})}return ln(t.cacheStore.responseFromCacheEntry(e),!0,!1)},"staleWhileRevalidate"),hR=o(async t=>{let e=await Sp(t);if(!e)throw new Error(`Cache miss for ${t.request.url} (cache-only)`);return ln(t.cacheStore.responseFromCacheEntry(e),!0,!1)},"cacheOnly"),t1={"network-first":cR,"cache-first":uR,"stale-while-revalidate":pR,"cache-only":hR};var vp=class{static{o(this,"CacheManager")}constructor(e,r){this.cacheStore=e,this.maxEntries=r,this.lifecycleController=new AbortController,this.closeReason=new Error("HttpCache is closed"),this.disposed=!1,this.backgroundRevalidations=new Map}async execute(e,r,n){if(this.disposed)throw this.closeReason;if(e.signal.throwIfAborted(),r.cacheMaxAge!==void 0&&(!Number.isSafeInteger(r.cacheMaxAge)||r.cacheMaxAge<0))throw new RangeError("cacheMaxAge must be a non-negative safe integer");let i=mR(e,r),s=new AbortController,a=setTimeout(()=>s.abort(new tr(e.url,r.timeout)),Math.max(0,r.timeout)),l={request:e,cacheKey:i,cacheStore:this.cacheStore,dispatch:n,logging:r.logging,signal:AbortSignal.any([e.signal,this.lifecycleController.signal,s.signal]),cacheMaxAge:r.cacheMaxAge,maxEntries:this.maxEntries,scheduleBackgroundRevalidation:o(c=>this.scheduleBackgroundRevalidation(i,e.url,r.timeout,c),"scheduleBackgroundRevalidation")};try{return await t1[r.cacheStrategy](l)}finally{clearTimeout(a)}}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}scheduleBackgroundRevalidation(e,r,n,i){if(this.disposed||this.backgroundRevalidations.has(e))return;let s=new AbortController,a=setTimeout(()=>s.abort(new tr(r,n)),Math.max(0,n)),l=i(AbortSignal.any([this.lifecycleController.signal,s.signal])).catch(()=>{}).finally(()=>{clearTimeout(a),this.backgroundRevalidations.get(e)===l&&this.backgroundRevalidations.delete(e)});this.backgroundRevalidations.set(e,l)}},mR=o((t,e)=>{if(typeof e.cacheKey=="function")return e.cacheKey(t);if(typeof e.cacheKey=="string")return e.cacheKey;if(t.method==="GET")return t.url;throw new TypeError(`cacheStrategy '${e.cacheStrategy}' for a ${t.method} request needs a cacheKey`)},"cacheKeyOf");var kp=class t{static{o(this,"HttpCache")}static{this.defaultDbName="smartrequest-cache"}static{this.defaultStoreName="cache"}static{this.defaultMaxEntries=256}constructor(e={}){let r=e.maxEntries??t.defaultMaxEntries;if(!Number.isSafeInteger(r)||r<=0)throw new RangeError("HttpCache maxEntries must be a positive safe integer");this.store=new xp(e.dbName??t.defaultDbName,e.storeName??t.defaultStoreName),this.manager=new vp(this.store,r)}execute(e,r,n){return this.manager.execute(e,r,n)}has(e){return this.store.has(e)}delete(e){return this.store.delete(e)}clear(){return this.store.clear()}close(){return this.manager.close()}};var _s={};se(_s,{FetchTimeoutError:()=>tr,SmartFetch:()=>Dp,isFetchTimeoutError:()=>oo});var r1=o(async(t,e,r,n)=>{let i=new AbortController,s=new tr(e.url,n),a=setTimeout(()=>i.abort(s),Math.max(0,n));try{return await t(e,{...r,signal:AbortSignal.any([e.signal,i.signal])})}catch(l){throw i.signal.aborted&&!e.signal.aborted?s:l}finally{clearTimeout(a)}},"fetchWithTimeout"),n1=o(async(t,e)=>{if(e.signal?.aborted){let p=mr(e.signal);throw await t.body?.cancel(p).catch(()=>{}),p}if(e.bodyTimeoutMs!==void 0&&e.bodyTimeoutMs<=0){let p=new tr(e.url,e.reportedTimeoutMs??e.bodyTimeoutMs);throw await t.body?.cancel(p).catch(()=>{}),p}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=new Promise((p,h)=>{i=h}),a=o(p=>{n||(n=p,r.cancel(p).catch(()=>{}),i(p))},"terminate"),l=e.signal,c=o(()=>a(mr(l)),"onAbort");l?.addEventListener("abort",c,{once:!0});let u;if(e.bodyTimeoutMs!==void 0){let p=e.reportedTimeoutMs??e.bodyTimeoutMs;u=setTimeout(()=>{a(new tr(e.url,p))},e.bodyTimeoutMs)}let f=o(async()=>{let p=new TextDecoder,h="";for(;;){let m;try{m=await r.read()}catch(d){throw n??d}if(n)throw n;if(m.done)break;h+=p.decode(m.value,{stream:!0})}return h+=p.decode(),JSON.parse(h)},"readBody");try{return await Promise.race([f(),s])}finally{clearTimeout(u),l?.removeEventListener("abort",c);try{r.releaseLock()}catch{}}},"consumeJsonWithTimeout");var dR=[408,429,500,502,503,504],gR=o((t,e,r,n)=>{switch(t){case"linear":return Math.min(r*e,n);case"constant":return Math.min(r,n);case"exponential":return Math.min(r*2**(e-1),n)}},"backoffDelay"),Ls=class{static{o(this,"RetryManager")}constructor(e={},r){if(this.signal=r,this.maxAttempts=e.maxAttempts??3,!Number.isSafeInteger(this.maxAttempts)||this.maxAttempts<1)throw new RangeError("retry maxAttempts must be a positive safe integer");this.backoff=e.backoff??"exponential",this.initialDelay=e.initialDelay??1e3,this.maxDelay=e.maxDelay??3e4,this.retryOn=e.retryOn??dR,this.onRetry=e.onRetry}async execute(e){for(let r=1;;r++){this.throwIfAborted();let n;try{n=await e()}catch(i){if(this.signal?.aborted)throw mr(this.signal);let s=mi(i);if(r>=this.maxAttempts||!this.shouldRetryError(s))throw s;await this.waitBeforeRetry(r,s);continue}if(r>=this.maxAttempts||!this.shouldRetryResponse(n))return n;await Cn(n,`Retrying after HTTP ${n.status}`),await this.waitBeforeRetry(r,new Error(`HTTP ${n.status}`))}}async executeWithFallbacks(e,r){if(e.length===0)throw new Error("No URLs provided for fallback execution");let n=[],i;for(let s of e){this.throwIfAborted();try{let a=await this.execute(()=>r(s));if(a.status<400||a.status<500&&a.status!==408)return a;await Cn(a,`Trying fallback after HTTP ${a.status}`),i=new Error(`Request failed with status ${a.status}`)}catch(a){if(this.signal?.aborted)throw mr(this.signal);i=mi(a)}n.push(s)}throw new Error(`All URLs failed: ${n.join(", ")}. Last error: ${i?.message??"unknown error"}`)}shouldRetryResponse(e){return typeof this.retryOn=="function"?this.retryOn(e,void 0):this.retryOn.includes(e.status)}shouldRetryError(e){return e instanceof TypeError||oo(e)?!0:typeof this.retryOn=="function"?this.retryOn(void 0,e):!1}async waitBeforeRetry(e,r){let n=gR(this.backoff,e,this.initialDelay,this.maxDelay),i=n+n*.1*Math.random();this.onRetry?.(e,r,i),await Qk(i,this.signal)}throwIfAborted(){if(this.signal?.aborted)throw mr(this.signal)}};var Tp=class{static{o(this,"InterceptorChain")}constructor(){this.request=[],this.response=[],this.error=[]}addRequestInterceptor(e){this.request.push(e)}addResponseInterceptor(e){this.response.push(e)}addErrorInterceptor(e){this.error.push(e)}removeRequestInterceptor(e){Jd(this.request,e)}removeResponseInterceptor(e){Jd(this.response,e)}removeErrorInterceptor(e){Jd(this.error,e)}clear(){this.request.length=0,this.response.length=0,this.error.length=0}async processRequest(e,r){let n=e;for(let i of[...this.request,...r?.request??[]])n=await i(n);return n}async processResponse(e,r){let n=e;for(let i of[...this.response,...r?.response??[]])n=await i(n);return n}async processError(e,r){let n=e;for(let i of[...this.error,...r?.error??[]])try{n=await i(n)}catch(s){n=mi(s)}return n}},Jd=o((t,e)=>{let r=t.indexOf(e);r>-1&&t.splice(r,1)},"removeFrom");var Ep=class{static{o(this,"RequestDeduplicator")}constructor(){this.inFlight=new Map}keyOf(e){if(e.method!=="GET"&&e.method!=="HEAD")return;let r=[...e.headers].sort(([n],[i])=>n<i?-1:n>i?1:0);return JSON.stringify([e.method,e.url,r])}execute(e,r,n){if(r.aborted)return Promise.reject(mr(r));let i=this.inFlight.get(e)??this.start(e,n);return new Promise((s,a)=>{let l=o(()=>{i.participants.delete(c);let u=mr(r);a(u),i.participants.size===0&&(this.detach(e,i),i.controller.abort(u))},"onAbort"),c={resolve:o(u=>{r.removeEventListener("abort",l),s(u)},"resolve"),reject:o(u=>{r.removeEventListener("abort",l),a(u)},"reject")};i.participants.add(c),r.addEventListener("abort",l,{once:!0})})}start(e,r){let n={controller:new AbortController,participants:new Set};this.inFlight.set(e,n);let i=o(s=>{this.detach(e,n);let a=[...n.participants];n.participants.clear();for(let l of a)l.reject(s)},"rejectAll");return r(n.controller.signal).then(s=>{if(this.detach(e,n),n.participants.size===0){Cn(s.response,"every deduplicated caller aborted");return}let a=[...n.participants],l=[],c;try{c=a.map((u,f)=>{if(f===a.length-1)return s;let p=s.response.clone();return l.push(p),Object.freeze({response:p,metadata:s.metadata})})}catch(u){for(let f of[s.response,...l])Cn(f,u);i(u);return}n.participants.clear(),a.forEach((u,f)=>{u.resolve(c[f])})},i),n}detach(e,r){this.inFlight.get(e)===r&&this.inFlight.delete(e)}};var i1=6e4,yR=new Set(["body","headers","method","signal","window","credentials","mode","cache","redirect","referrer","referrerPolicy","integrity","keepalive","retry","fallbackUrls","timeout","interceptors","deduplicate","logging","cacheStrategy","cacheKey","cacheMaxAge"]),Dp=class{static{o(this,"SmartFetch")}constructor(e={}){this.interceptors=new Tp,this.deduplicator=new Ep,this.httpCache=e.httpCache,this.fetchFunction=e.fetch??((r,n)=>globalThis.fetch(r,n)),this.defaults={...e.defaults}}addRequestInterceptor(e){this.interceptors.addRequestInterceptor(e)}addResponseInterceptor(e){this.interceptors.addResponseInterceptor(e)}addErrorInterceptor(e){this.interceptors.addErrorInterceptor(e)}removeRequestInterceptor(e){this.interceptors.removeRequestInterceptor(e)}removeResponseInterceptor(e){this.interceptors.removeResponseInterceptor(e)}removeErrorInterceptor(e){this.interceptors.removeErrorInterceptor(e)}clearInterceptors(){this.interceptors.clear()}async fetch(e,r={}){return(await this.fetchWithMetadata(e,r)).response}async fetchWithMetadata(e,r={}){let n=this.withDefaults(r,e instanceof Request?e.headers:void 0),i=this.planCache(n);try{let s=new Request(e,n);s=await this.interceptors.processRequest(s,n.interceptors);let a=n.deduplicate?this.deduplicator.keyOf(s):void 0;if(a===void 0)return await this.send(s,n,i);let l=s;return await this.deduplicator.execute(a,l.signal,c=>this.send(new Request(l,{signal:c}),n,i))}catch(s){throw await this.interceptors.processError(mi(s),n.interceptors)}}async getJson(e,r={}){return(await this.getJsonWithMetadata(e,r)).data}async getJsonWithMetadata(e,r={}){return await this.requestJson(e,"GET",void 0,r)}async postJson(e,r,n={}){return(await this.postJsonWithMetadata(e,r,n)).data}async postJsonWithMetadata(e,r,n={}){return await this.requestJson(e,"POST",r,n)}async putJson(e,r,n={}){return(await this.putJsonWithMetadata(e,r,n)).data}async putJsonWithMetadata(e,r,n={}){return await this.requestJson(e,"PUT",r,n)}async deleteJson(e,r={}){return(await this.deleteJsonWithMetadata(e,r)).data}async deleteJsonWithMetadata(e,r={}){return await this.requestJson(e,"DELETE",void 0,r)}withDefaults(e,r){let n=new Headers(this.defaults.headers);for(let i of[r,new Headers(e.headers)])i?.forEach((s,a)=>n.set(a,s));return{...this.defaults,...e,headers:n}}planCache(e){if(e.timeout!==void 0&&(!Number.isSafeInteger(e.timeout)||e.timeout<0))throw new RangeError("SmartFetch timeout must be a non-negative safe integer");let r=e.cacheStrategy??"network-only";if(r!=="network-only"){if(!this.httpCache)throw new TypeError(`cacheStrategy '${r}' needs a cache: new SmartFetch({ httpCache: new HttpCache() })`);if(e.fallbackUrls?.length)throw new TypeError(`fallbackUrls cannot be combined with cacheStrategy '${r}'`);return{httpCache:this.httpCache,cacheStrategy:r}}}async send(e,r,n){if(n&&e.method!=="GET"&&r.cacheKey===void 0)throw new TypeError(`cacheStrategy '${n.cacheStrategy}' for a ${e.method} request needs a cacheKey`);let i=e.body===null?null:await e.arrayBuffer(),s=r.timeout??i1,a=bR(r),l=o(h=>wR(e,h,i),"build"),c=o(h=>r1(this.fetchFunction,h,a,s),"dispatch"),u=xR(r.retry),f;if(r.fallbackUrls?.length)f={response:await new Ls(u??{maxAttempts:1},e.signal).executeWithFallbacks([e.url,...r.fallbackUrls],d=>c(l(d))),fromCache:!1,revalidated:!1};else if(n){let h,m=o(async()=>(h=await n.httpCache.execute(l(e.url),{cacheStrategy:n.cacheStrategy,cacheKey:r.cacheKey,cacheMaxAge:r.cacheMaxAge,timeout:s,logging:r.logging??!1},c),h.response),"attempt");u?await new Ls(u,e.signal).execute(m):await m(),f=h}else{let h=o(()=>c(l(e.url)),"attempt");f={response:u?await new Ls(u,e.signal).execute(h):await h(),fromCache:!1,revalidated:!1}}let p=await this.interceptors.processResponse(f.response,r.interceptors);return Object.freeze({response:p,metadata:Object.freeze({fromCache:f.fromCache,revalidated:f.revalidated})})}async requestJson(e,r,n,i){let s=this.withDefaults(i),a=s.timeout??i1,l=!s.retry&&!s.fallbackUrls?.length,c=l?performance.now()+a:void 0,u=l?new AbortController:void 0,f=u?s.signal?AbortSignal.any([s.signal,u.signal]):u.signal:s.signal??void 0,p=u?setTimeout(()=>u.abort(new tr(e,a)),Math.max(0,a)):void 0,h=new Headers(s.headers);h.has("accept")||h.set("accept","application/json"),n!==void 0&&!h.has("content-type")&&h.set("content-type","application/json");try{let m=await this.fetchWithMetadata(e,{...i,method:r,headers:h,...n===void 0?{}:{body:JSON.stringify(n)},signal:f}),d=m.response;if(f?.aborted)throw await Cn(d,f.reason),mi(f.reason);if(!d.ok)throw await Cn(d,`HTTP ${d.status}`),new Error(`HTTP ${d.status}: ${d.statusText}`);let g=await n1(d,{bodyTimeoutMs:c===void 0?a:c-performance.now(),reportedTimeoutMs:a,signal:f,url:e});return Object.freeze({data:g,response:d,metadata:m.metadata})}catch(m){throw f?.aborted&&f.reason instanceof Error?f.reason:m}finally{clearTimeout(p)}}},xR=o(t=>t===!0?{}:t||void 0,"retryOptionsOf"),bR=o(t=>{let e={};for(let[r,n]of Object.entries(t))!yR.has(r)&&n!==void 0&&(e[r]=n);return e},"transportInitOf"),wR=o((t,e,r)=>new Request(e,{method:t.method,headers:t.headers,body:r,signal:t.signal,credentials:t.credentials,cache:t.cache,redirect:t.redirect,referrer:t.referrer,referrerPolicy:t.referrerPolicy,integrity:t.integrity,keepalive:t.keepalive,...t.mode==="navigate"?{}:{mode:t.mode}}),"rebuildRequest");var SR=1e4,o1=new WeakSet,s1=new WeakMap,Xd=o(t=>{o1.add(t)},"authorizeVirtualStreamApplicationUse"),ao=class extends Error{static{o(this,"VirtualStreamClosedError")}constructor(e="VirtualStream is closed",r){super(e,r),this.name="VirtualStreamClosedError"}},lo=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"}},Op=class extends Error{static{o(this,"VirtualStreamLifecycleContractError")}constructor(e){super(`VirtualStream endpoint closed before terminal ${e} produced a receipt`),this.name="VirtualStreamLifecycleContractError"}},On=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=s1.get(e);if(r&&r!==this)throw new Error("VirtualStream is already owned by another activation scope");r||s1.set(e,this),this.trackedStreams.add(e),this.hasAuthorizedTrackedStreams&&Xd(e),this.published&&e.publishActivation()}authorizeApplicationUse(){if(!(this.settled||this.hasAuthorizedTrackedStreams)){this.hasAuthorizedTrackedStreams=!0;for(let e of this.trackedStreams)Xd(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)))}},Pr=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||to.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 On,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||to.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(to.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()+SR;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 lo(0,e);return r}static async openVirtualStreamWithTimeout(e,r,n,i,s){let a=new lo(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&&Xd(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 ao("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(!o1.has(this))throw new Error("VirtualStream application use is not authorized")}assertApplicationOperation(e){if(this.assertApplicationOperationsAllowed(),this.assertNotClosed(),this.terminalPromise)throw new ao("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 ao("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 ao(`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 Op(r)}})();return this.terminalPromise=u,u}};var dr=class extends Error{static{o(this,"TypedResponseError")}constructor(e,r){super(e),this.name="TypedResponseError",this.errorText=e,this.errorData=r??{}}};var Rs=Object.freeze({redacted:!0});var a1=Object.freeze(["onOutgoingRequest","onIncomingResponse","onIncomingRequest","onOutgoingResponse"]),l1=Symbol.for("@api.global/typedrequest:global-hooks:3.8"),c1=o(t=>({payloadProjector:t?.payloadProjector,errorProjector:t?.errorProjector}),"copyProjectionOptions"),Mp=o((t={})=>({hooks:t,projectedRegistrationsByPhase:{}}),"createTypedRouterHookRegistrationState"),vR=o(t=>a1.filter(e=>Object.hasOwn(t,e)).map(e=>[e,t[e]]),"getSuppliedHookEntries"),Np=o((t,e,r)=>{let n=vR(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:c1(r)}}},"mergeTypedRouterHookRegistrations"),Pp=o((t,e)=>{t.hooks=e;for(let r of a1)delete t.projectedRegistrationsByPhase[r]},"replaceTypedRouterHookRegistrations"),Fs=o(()=>{let t=globalThis[l1];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:Mp(),subscribers:new Map};return globalThis[l1]=e,e},"getRealmGlobalHookState"),f1=o(()=>Fs().legacy.hooks,"getLegacyGlobalHooks"),p1=o(t=>{Pp(Fs().legacy,t)},"replaceLegacyGlobalHooks"),h1=o((t,e)=>{Np(Fs().legacy,t,e)},"mergeLegacyGlobalHooks"),m1=o((t,e)=>{let r=Fs(),n=Symbol("typedrequest-hook-subscriber"),i=Mp();Np(i,t,e),r.subscribers.set(n,i);let s=!1;return()=>{s||(s=!0,r.subscribers.delete(n))}},"addGlobalHookSubscriber"),d1=o(()=>{let t=Fs();Pp(t.legacy,{}),t.subscribers.clear()},"clearGlobalHookRegistrations"),Ip=o(t=>{try{console.error(`TypedRequest hook projection failed (${t})`)}catch{}},"logProjectionFailure"),Zd=o(t=>{try{console.error(`TypedRequest hook callback failed (${t})`)}catch{}},"logCallbackFailure"),kR=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{Ip(e);return}},"createMetadata"),u1=o(t=>typeof SharedArrayBuffer>"u"?!1:t instanceof SharedArrayBuffer||Object.prototype.toString.call(t)==="[object SharedArrayBuffer]","isSharedArrayBuffer"),As=o((t,e=new Set)=>{if(!(t===null||typeof t!="object"&&typeof t!="function")){if(u1(t))throw new TypeError("TypedRequest hook projections cannot contain SharedArrayBuffer");if(ArrayBuffer.isView(t)){if(u1(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)As(r,e),As(n,e);return}if(t instanceof Set){for(let r of t)As(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");As(n.value,e)}}}}},"assertNoSharedArrayBuffer"),TR=o((t,e,r,n)=>{if(!e||!r.payloadProjector)return{payload:Rs,payloadRedacted:!0};try{let i=r.payloadProjector(t,e);As(i);let s=structuredClone(i);return As(s),s!==null&&(typeof s=="object"||typeof s=="function")&&Object.freeze(s),{payload:s,payloadRedacted:!1}}catch{return Ip(n),{payload:Rs,payloadRedacted:!0}}},"snapshotPayload"),ER=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{Ip(n);return}},"snapshotError"),DR=o((t,e,r)=>{let n=kR(t,r),i=TR(t.payload,n,e,r),s=ER(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{Ip(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:Rs,payloadRedacted:!0};try{return Object.freeze(l)}catch{return l}}},"projectLogEntry"),eg=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?c1(n.projectionOptions):{}}}catch{Zd(e);return}},"snapshotDispatchRecipient"),tg=o((t,e,r)=>{let n=DR(r,t.projectionOptions,e);try{let i=t.callback(n);i&&typeof i.then=="function"&&Promise.resolve(i).catch(()=>{Zd(e)})}catch{Zd(e)}},"dispatchToRecipient"),$s=o((t,e,r)=>{let n=Fs();if(n.subscribers.size===0){let a=eg(n.legacy,t),l=r?eg(r,t):void 0;if(!a&&!l)return;a&&tg(a,t,e),l&&tg(l,t,e);return}let s=[n.legacy,...Array.from(n.subscribers.values()),...r?[r]:[]].map(a=>eg(a,t)).filter(a=>!!a);for(let a of s)tg(a,t,e)},"dispatchTypedRequestHook");var Lp=class{static{o(this,"TypedTools")}constructor(e){this.localData={},this.abortSignal=e??new AbortController().signal}async passGuards(e,r){let n=new ul.GuardSet(e);if(!await n.allGuardsPass(r)){let s=await n.getFailedHint(r);throw new dr(`guard failed: ${s}`,{failedHint:s})}}};var kMe=16,TMe=1024,g1=Symbol.for("@api.global/typedrequest:global-error-reporter"),rg=o(()=>{let t=globalThis[g1];if(t&&typeof t=="object")return t;let e={reporter:void 0};return globalThis[g1]=e,e},"getRealmGlobalErrorReporterState"),CR=o(()=>rg().reporter,"getGlobalTypedRequestErrorReporter"),x1=o(t=>{let e=rg();e.reporter=t;let r=!1;return()=>{r||(r=!0,e.reporter===t&&(e.reporter=void 0))}},"setGlobalTypedRequestErrorReporter"),b1=o(()=>{rg().reporter=void 0},"clearGlobalTypedRequestErrorReporter"),co=o(t=>{let e=t.replace(/[\u0000-\u001f\u007f]/g," ");return e.length<=1024?e:`${e.slice(0,1024)}...[truncated]`},"sanitizeLogText"),OR=o(t=>{try{let e=t.name;if(typeof e=="string"&&e.length>0)return co(e)}catch{}try{let e=t.constructor?.name;if(typeof e=="string"&&e.length>0)return co(e)}catch{}return"Error"},"readErrorName"),IR=o(t=>{try{let e=t.message;return typeof e=="string"?co(e):""}catch{return""}},"readErrorMessage"),MR=o(t=>{if(t instanceof Error)return{name:OR(t),message:IR(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=co(i))}catch{}return{name:"NonErrorThrowable",message:`<non-Error ${n} thrown>`}}let r="";try{r=co(String(t))}catch{}return{name:`NonErrorThrowable(${e})`,message:r}},"describeThrowable"),NR=o(t=>{if(!(t===null||typeof t!="object"&&typeof t!="function"))try{return t.cause}catch{return}},"readCause"),PR=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(MR(n));let i=NR(n);if(i===void 0)break;n=i}return e},"buildChain"),LR=o(t=>{if(t instanceof Error)try{return typeof t.stack=="string"?t.stack:void 0}catch{return}},"readStack"),y1=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"),_R=o(t=>t.map(e=>e.message.length>0?`${e.name}: ${e.message}`:e.name).join(" <- caused by: "),"renderChain"),RR=o(t=>{let e=co(String(t.method)),r=PR(t.error),n=typeof t.correlationId=="string"&&t.correlationId.length>0?co(t.correlationId):void 0,i=n?` [correlation ${n}]`:"",s=`${y1(t.origin,e)}${i}: ${_R(r)}`,a=LR(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"),ng=o(t=>{try{console.error(t.formatted)}catch{}},"printDefaultReport"),Bs=o(t=>{let e;try{e=RR(t)}catch{try{console.error(`${y1(t.origin,String(t.method))}: <error description unavailable>`)}catch{}return}let r=CR();if(!r){ng(e);return}try{let n=r(e);n&&typeof n.then=="function"&&Promise.resolve(n).catch(()=>{ng(e)})}catch{ng(e)}},"reportTypedRequestError");var ig=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 Lp(r);e.localData&&(i.localData=e.localData);let s=await this.handlerFunction(e.request,i).catch(a=>{a instanceof dr?n=a:(Bs({origin:"handler",method:this.method,correlationId:e.correlation?.id,error:a}),n=new dr(t.internalErrorMessage))});return n?(e.response=null,e.error={text:n.errorText,data:n.errorData}):e.response=s===void 0?null:s,e?.correlation?.phase&&(e.correlation.phase="response"),e}};var FR=[],w1=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=w1(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&&Bs({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 _p(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(_p,"getTypedRequestResponseInterestKey");var og=class t{static{o(this,"TypedRouter")}constructor(){this.hookRegistrationState=Mp(),this.routerMap=new hr.ObjectMap,this.fallbackRouterMap=new hr.ObjectMap,this.fallbackParentRouters=new Set,this.handlerMap=new hr.ObjectMap,this.middlewares=[],this.requestScopes=[],this.fireEventInterestMap=new hr.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 f1()}static set globalHooks(e){p1(e)}static setGlobalHooks(e,r){h1(e,r)}static addGlobalHooks(e,r){return m1(e,r)}static clearGlobalHooks(){d1()}static setGlobalErrorReporter(e){return x1(e)}static clearGlobalErrorReporter(){b1()}get hooks(){return this.hookRegistrationState.hooks}set hooks(e){Pp(this.hookRegistrationState,e)}setHooks(e,r){Np(this.hookRegistrationState,e,r)}callHook(e,r){$s(e,r,this.hookRegistrationState)}setErrorFromCaughtError(e,r,n){if(r instanceof dr){e.error={text:r.errorText,data:r.errorData??{}};return}Bs({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??FR}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=_p(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 On,f=new On,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,Pr.encodePayloadForNetwork(e,{side:"responding",virtualStreamTransport:c,activationScope:f})),"encodeResponse");try{if(e=await Pr.decodePayloadFromNetworkAsync(e,{side:"responding",virtualStreamTransport:c,activationScope:u,abortSignal:l}),e.response=null,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 z of x.middlewares)await z(e)}catch(z){E={value:z},this.setErrorFromCaughtError(e,z,"middleware"),e.correlation.phase="response",P=!0;return}u.authorizeApplicationUse(),e=await y.addResponse(e,l),P=!0}catch(z){throw L={error:z},z}},"runMiddlewareAndHandler"),A=this.collectRequestScopes(T);if(A.length===0)await D();else{let z=Object.freeze({entryRouter:this,owningRouter:x,method:e.method,localData:s,abortSignal:l}),C;try{await w1(A,0,D,e,z)}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");Bs({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 F=!!e.error;return e=await m(),F&&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}),F||(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 sg=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=_p(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 Rp=new bl.HttpCache,AR=new _s.SmartFetch({httpCache:Rp}),Fp=2147483647,Ap=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}},$p=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 On,l={method:this.method,request:e,response:null,requestInstanceId:Mr.uni(),correlation:{id:Mr.uni(),phase:"request"}};try{this.assertActive(i);let c=Pr.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||$s("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||$s("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 dr(p.text,p.data);let h=f.response;if(!this.urlEndPoint&&this.typedTarget.options.supportsAbortSignal!==!0&&Pr.containsNetworkDescriptor(h))throw new Error("VirtualStreams require TypedTarget AbortSignal transport support");try{h=await Pr.decodePayloadFromNetworkAsync(h,{side:"requesting",activationScope:a,virtualStreamTransport:this.typedTarget?.options.virtualStreamTransport,openDeadlineAt:i.deadlineAt,abortSignal:i.abortSignal})}catch(m){throw m instanceof lo&&i.deadlineAt!==void 0&&m.deadlineAt===i.deadlineAt?this.createTimeoutError(i):m}return this.assertActive(i),a.authorizeApplicationUse(),this.skipHooks||$s("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 AR.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 Rp.delete(r.cacheKey),r.abortSignal?.aborted?this.getAbortReason(r):r.timeoutMs!==void 0&&(this.hasDeadlineExpired(r)||_s.isFetchTimeoutError(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 Rp.delete(r.cacheKey),l}r.cacheKey&&!this.isReusableCachedHttpEnvelope(s)&&await Rp.delete(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 $p(this.method,r.maxRetries);n+=1,await this.waitForRetry(s.retry.waitForMs,r),e.requestInstanceId=Mr.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>Fp))throw new RangeError(`TypedRequest timeoutMs must be a positive safe integer no greater than ${Fp}`);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 Ap(this.method,e.timeoutMs)}async waitForRetry(e,r){if(!Number.isSafeInteger(e)||e<=0||e>Fp)throw new RangeError(`TypedRequest retry waitForMs must be a positive safe integer no greater than ${Fp}`);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 Q.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")&&!Pr.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 S1(t){return t&&typeof t.then=="function"}o(S1,"isPromise");var v1=Promise.resolve(!1),lNe=Promise.resolve(!0),cn=Promise.resolve();function jp(t,e){return t||(t=0),new Promise(function(r){return setTimeout(function(){return r(e)},t)})}o(jp,"sleep");function k1(t,e){return Math.floor(Math.random()*(e-t+1)+t)}o(k1,"randomInt");function wl(){return Math.random().toString(36).substring(2)}o(wl,"randomToken");var ag=0;function In(){var t=Date.now()*1e3;return t<=ag&&(t=ag+1),ag=t,t}o(In,"microSeconds");function cNe(){return typeof navigator<"u"&&typeof navigator.locks<"u"&&typeof navigator.locks.request=="function"}o(cNe,"supportsWebLockAPI");var $R=In,BR="native";function jR(t){var e={time:In(),messagesCallback:null,bc:new BroadcastChannel(t),subFns:[]};return e.bc.onmessage=function(r){e.messagesCallback&&e.messagesCallback(r.data)},e}o(jR,"create");function UR(t){t.bc.close(),t.subFns=[]}o(UR,"close");function zR(t,e){try{return t.bc.postMessage(e,!1),cn}catch(r){return Promise.reject(r)}}o(zR,"postMessage");function HR(t,e){t.messagesCallback=e}o(HR,"onMessage");function WR(){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(WR,"canBeUsed");function qR(){return 150}o(qR,"averageResponseTime");var T1={create:jR,close:UR,onMessage:HR,postMessage:zR,canBeUsed:WR,type:BR,averageResponseTime:qR,microSeconds:$R};var js=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<lg()-this.ttl?(this.map.delete(e),!1):!0}add(e){this.map.delete(e),this.map.set(e,lg()),this._to||(this._to=!0,setTimeout(()=>{this._to=!1,YR(this)},0))}clear(){this.map.clear()}};function YR(t){let e=lg()-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(YR,"removeTooOldValues");function lg(){return Date.now()}o(lg,"now");function uo(){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(uo,"fillOptionsWithDefaults");var VR=In,KR="pubkey.broadcast-channel-0-",Lr="messages",Sl={durability:"relaxed"},GR="idb";function E1(){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(E1,"getIdb");function Up(t){t.commit&&t.commit()}o(Up,"commitIndexedDBTransaction");function QR(t){var e=E1(),r=KR+t,n=e.open(r);return n.onupgradeneeded=function(i){var s=i.target.result;s.createObjectStore(Lr,{keyPath:"id",autoIncrement:!0})},new Promise(function(i,s){n.onerror=function(a){return s(a)},n.onsuccess=function(){i(n.result)}})}o(QR,"createDatabase");function JR(t,e,r){var n=Date.now(),i={uuid:e,time:n,data:r},s=t.transaction([Lr],"readwrite",Sl);return new Promise(function(a,l){s.oncomplete=function(){return a()},s.onerror=function(u){return l(u)};var c=s.objectStore(Lr);c.add(i),Up(s)})}o(JR,"writeMessage");function vNe(t){var e=t.transaction(Lr,"readonly",Sl),r=e.objectStore(Lr),n=[];return new Promise(function(i){r.openCursor().onsuccess=function(s){var a=s.target.result;a?(n.push(a.value),a.continue()):(Up(e),i(n))}})}o(vNe,"getAllMessages");function XR(t,e){var r=t.transaction(Lr,"readonly",Sl),n=r.objectStore(Lr),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()):(Up(r),c(i))}})}o(XR,"getMessagesHigherThan");function ZR(t,e){if(t.closed)return Promise.resolve([]);var r=t.db.transaction(Lr,"readwrite",Sl),n=r.objectStore(Lr);return Promise.all(e.map(function(i){var s=n.delete(i);return new Promise(function(a){s.onsuccess=function(){return a()}})}))}o(ZR,"removeMessagesById");function e2(t,e){var r=Date.now()-e,n=t.transaction(Lr,"readonly",Sl),i=n.objectStore(Lr),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()):(Up(n),a(s))}else a(s)}})}o(e2,"getOldMessages");function t2(t){return e2(t.db,t.options.idb.ttl).then(function(e){return ZR(t,e.map(function(r){return r.id}))})}o(t2,"cleanOldMessages");function r2(t,e){return e=uo(e),QR(t).then(function(r){var n={closed:!1,lastCursorId:0,channelName:t,options:e,uuid:wl(),eMIs:new js(e.idb.ttl*2),writeBlockPromise:cn,messagesCallback:null,readQueuePromises:[],db:r};return r.onclose=function(){n.closed=!0,e.idb.onclose&&e.idb.onclose()},D1(n),n})}o(r2,"create");function D1(t){t.closed||C1(t).then(function(){return jp(t.options.idb.fallbackInterval)}).then(function(){return D1(t)})}o(D1,"_readLoop");function n2(t,e){return!(t.uuid===e.uuid||e.eMIs.has(t.id)||t.data.time<e.messagesCallbackTime)}o(n2,"_filterMessage");function C1(t){return t.closed?cn:t.messagesCallback?XR(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 n2(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))}),cn}):cn}o(C1,"readNewMessages");function i2(t){t.closed=!0,t.db.close()}o(i2,"close");function o2(t,e){return t.writeBlockPromise=t.writeBlockPromise.then(function(){return JR(t.db,t.uuid,e)}).then(function(){k1(0,10)===0&&t2(t)}),t.writeBlockPromise}o(o2,"postMessage");function s2(t,e,r){t.messagesCallbackTime=r,t.messagesCallback=e,C1(t)}o(s2,"onMessage");function a2(){return!!E1()}o(a2,"canBeUsed");function l2(t){return t.idb.fallbackInterval*2}o(l2,"averageResponseTime");var O1={create:r2,close:i2,onMessage:s2,postMessage:o2,canBeUsed:a2,type:GR,averageResponseTime:l2,microSeconds:VR};var c2=In,u2="pubkey.broadcastChannel-",f2="localstorage";function I1(){var t;if(typeof window>"u")return null;try{t=window.localStorage,t=window["ie8-eventlistener/storage"]||window.localStorage}catch{}return t}o(I1,"getLocalStorage");function M1(t){return u2+t}o(M1,"storageKey");function p2(t,e){return new Promise(function(r){jp().then(function(){var n=M1(t.channelName),i={token:wl(),time:Date.now(),data:e,uuid:t.uuid},s=JSON.stringify(i);I1().setItem(n,s);var a=document.createEvent("Event");a.initEvent("storage",!0,!0),a.key=n,a.newValue=s,window.dispatchEvent(a),r()})})}o(p2,"postMessage");function h2(t,e){var r=M1(t),n=o(function(s){s.key===r&&e(JSON.parse(s.newValue))},"listener");return window.addEventListener("storage",n),n}o(h2,"addStorageEventListener");function m2(t){window.removeEventListener("storage",t)}o(m2,"removeStorageEventListener");function d2(t,e){if(e=uo(e),!N1())throw new Error("BroadcastChannel: localstorage cannot be used");var r=wl(),n=new js(e.localstorage.removeTimeout),i={channelName:t,uuid:r,eMIs:n};return i.listener=h2(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(d2,"create");function g2(t){m2(t.listener)}o(g2,"close");function y2(t,e,r){t.messagesCallbackTime=r,t.messagesCallback=e}o(y2,"onMessage");function N1(){var t=I1();if(!t)return!1;try{var e="__broadcastchannel_check";t.setItem(e,"works"),t.removeItem(e)}catch{return!1}return!0}o(N1,"canBeUsed");function x2(){var t=120,e=navigator.userAgent.toLowerCase();return e.includes("safari")&&!e.includes("chrome")?t*2:t}o(x2,"averageResponseTime");var P1={create:d2,close:g2,onMessage:y2,postMessage:p2,canBeUsed:N1,type:f2,averageResponseTime:x2,microSeconds:c2};var L1=In,b2="simulate",cg=new Set;function w2(t){var e={time:L1(),name:t,messagesCallback:null};return cg.add(e),e}o(w2,"create");function S2(t){cg.delete(t)}o(S2,"close");var _1=5;function v2(t,e){return new Promise(function(r){return setTimeout(function(){var n=Array.from(cg);n.forEach(function(i){i.name===t.name&&i!==t&&i.messagesCallback&&i.time<e.time&&i.messagesCallback(e)}),r()},_1)})}o(v2,"postMessage");function k2(t,e){t.messagesCallback=e}o(k2,"onMessage");function T2(){return!0}o(T2,"canBeUsed");function E2(){return _1}o(E2,"averageResponseTime");var R1={create:w2,close:S2,onMessage:k2,postMessage:v2,canBeUsed:T2,type:b2,averageResponseTime:E2,microSeconds:L1};var F1=[T1,O1,P1];function ug(t){var e=[].concat(t.methods,F1).filter(Boolean);if(t.type){if(t.type==="simulate")return R1;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(F1.map(function(i){return i.type})))}o(ug,"chooseMethod");var pg=new Set,D2=0,fo=o(function(e,r){this.id=D2++,pg.add(this),this.name=e,fg&&(r=fg),this.options=uo(r),this.method=ug(this.options),this._iL=!1,this._onML=null,this._addEL={message:[],internal:[]},this._uMP=new Set,this._befC=[],this._prepP=null,I2(this)},"BroadcastChannel");fo._pubkey=!0;function C2(t){t=uo(t);var e=ug(t);return e.type==="node"?e.clearNodeFolder().then(function(){return!0}):v1}o(C2,"clearNodeFolder");var fg;function O2(t){fg=t}o(O2,"enforceOptions"),fo.prototype={postMessage:o(function(e){if(this.closed)throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed "+JSON.stringify(e));return A1(this,"message",e)},"postMessage"),postInternal:o(function(e){return A1(this,"internal",e)},"postInternal"),set onmessage(t){var e=this.method.microSeconds(),r={time:e,fn:t};j1(this,"message",this._onML),t&&typeof t=="function"?(this._onML=r,B1(this,"message",r)):this._onML=null},addEventListener:o(function(e,r){var n=this.method.microSeconds(),i={time:n,fn:r};B1(this,e,i)},"addEventListener"),removeEventListener:o(function(e,r){var n=this._addEL[e].find(function(i){return i.fn===r});j1(this,e,n)},"removeEventListener"),close:o(function(){var e=this;if(!this.closed){pg.delete(this),this.closed=!0;var r=this._prepP?this._prepP:cn;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 A1(t,e,r){var n=t.method.microSeconds(),i={time:n,type:e,data:r},s=t._prepP?t._prepP:cn;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(A1,"_post");function I2(t){var e=t.method.create(t.name,t.options);S1(e)?(t._prepP=e,e.then(function(r){t._state=r})):t._state=e}o(I2,"_prepareChannel");function $1(t){return t._addEL.message.length>0||t._addEL.internal.length>0}o($1,"_hasMessageListeners");function B1(t,e,r){t._addEL[e].push(r),M2(t)}o(B1,"_addListenerObject");function j1(t,e,r){t._addEL[e]=t._addEL[e].filter(function(n){return n!==r}),N2(t)}o(j1,"_removeListenerObject");function M2(t){if(!t._iL&&$1(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(M2,"_startListening");function N2(t){if(t._iL&&!$1(t)){t._iL=!1;var e=t.method.microSeconds();t.method.onMessage(t._state,null,e)}}o(N2,"_stopListening");var L2=o(t=>"ref"in t&&typeof t.ref=="function"&&"unref"in t&&typeof t.unref=="function","isProcessHolding"),_2=o((t,e)=>{if(typeof globalThis.BroadcastChannel=="function"){let n=new globalThis.BroadcastChannel(t);n.onmessage=s=>{e(s.data)};let i=L2(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 fo(t);return r.onmessage=n=>{e(n)},{post:o(n=>r.postMessage(n),"post"),close:o(()=>r.close(),"close"),holdProcess:o(()=>{},"holdProcess")}},"openChannel"),U1=o(t=>typeof t=="object"&&t!==null,"isObject"),z1=o((t,e)=>Object.prototype.hasOwnProperty.call(t,e),"hasOwn"),R2=o(t=>{if(!U1(t)||!z1(t,"deesCommsEvent"))return null;let e=t.deesCommsEvent;return!U1(e)||typeof e.name!="string"||typeof e.uniqueEventId!="string"||!z1(e,"payload")?"malformed":{name:e.name,uniqueEventId:e.uniqueEventId,payload:e.payload}},"eventOf"),F2=o(()=>{let t=globalThis.crypto.getRandomValues(new Uint8Array(16));return Array.from(t,e=>e.toString(16).padStart(2,"0")).join("")},"createEventId"),hg=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 jt.TypedRouter,this.typedtarget=new jt.TypedTarget({postMethodWithTypedRouter:o(async r=>{await this.postMessage(r)},"postMethodWithTypedRouter"),typedRouterRef:this.typedrouter}),this.channelName=e.channelName??t.defaultChannelName,this.channel=_2(this.channelName,r=>{this.receive(r)})}createTypedRequest(e){return new jt.TypedRequest(this.typedtarget,e)}async postMessage(e){this.assertOpen(),await this.channel.post(e)}async createTypedHandler(e,r){this.typedrouter.addTypedHandler(new jt.TypedHandler(e,r)),this.hasTypedHandlers=!0,this.holdProcessWhileListened()}async broadcast(e,r){let n={deesCommsEvent:{name:e,uniqueEventId:F2(),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=R2(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:()=>nb,parseCommentFrontmatter:()=>KC,parseFrontmatter:()=>VC,parseMarkdown:()=>UC,stringifyFrontmatter:()=>GC});var H1=typeof self=="object"?self:globalThis,A2=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 H1[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 H1[s](a),i)},"unpair");return n},"deserializer"),Yp=o(t=>A2(new Map,t)(0),"deserialize");var zs="",{toString:$2}={},{keys:B2}=Object,El=o(t=>{let e=typeof t;if(e!=="object"||!t)return[0,e];let r=$2.call(t).slice(8,-1);switch(r){case"Array":return[1,zs];case"Object":return[2,zs];case"Date":return[3,zs];case"RegExp":return[4,zs];case"Map":return[5,zs];case"Set":return[6,zs];case"DataView":return[1,r]}return r.includes("Array")?[1,r]:r.includes("Error")?[7,r]:[2,r]},"typeOf"),Vp=o(([t,e])=>t===0&&(e==="function"||e==="symbol"),"shouldSkip"),j2=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]=El(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 B2(a))(t||!Vp(El(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||!(Vp(El(h))||Vp(El(m))))&&f.push([s(h),s(m)]);return p}case 6:{let f=[],p=i([l,f],a);for(let h of a)(t||!Vp(El(h)))&&f.push(s(h));return p}}let{message:u}=a;return i([l,{name:c,message:u}],a)},"pair");return s},"serializer"),Kp=o((t,{json:e,lossy:r}={})=>{let n=[];return j2(!(e||r),!!e,new Map,n)(t),n},"serialize");var di=typeof structuredClone=="function"?(t,e)=>e&&("json"in e||"lossy"in e)?Yp(Kp(t,e)):structuredClone(t):(t,e)=>Yp(Kp(t,e));var Gp=W1("end"),Qp=W1("start");function W1(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(W1,"point");function Dl(t){let e=Qp(t),r=Gp(t);if(e&&r)return{start:e,end:r}}o(Dl,"position");var po=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Jp={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...po,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...po],h2:[["className","sr-only"]],img:[...po,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...po,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...po],table:[...po],ul:[...po,["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 gi={}.hasOwnProperty;function yg(t,e){let r={type:"root",children:[]},n={schema:e?{...Jp,...e}:Jp,stack:[]},i=q1(n,t);return i&&(Array.isArray(i)?i.length===1?r=i[0]:r.children=i:r=i),r}o(yg,"sanitize");function q1(t,e){if(e&&typeof e=="object"){let r=e;switch(typeof r.type=="string"?r.type:""){case"comment":return U2(t,r);case"doctype":return z2(t,r);case"element":return H2(t,r);case"root":return W2(t,r);case"text":return q2(t,r);default:}}}o(q1,"transform");function U2(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 Cl(s,e),s}}o(U2,"comment");function z2(t,e){if(t.schema.allowDoctypes){let r={type:"doctype"};return Cl(r,e),r}}o(z2,"doctype");function H2(t,e){let r=typeof e.tagName=="string"?e.tagName:"";t.stack.push(r);let n=Y1(t,e.children),i=Y2(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&&gi.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 Cl(a,e),a}o(H2,"element");function W2(t,e){let n={type:"root",children:Y1(t,e.children)};return Cl(n,e),n}o(W2,"root");function q2(t,e){let n={type:"text",value:typeof e.value=="string"?e.value:""};return Cl(n,e),n}o(q2,"text");function Y1(t,e){let r=[];if(Array.isArray(e)){let n=e,i=-1;for(;++i<n.length;){let s=q1(t,n[i]);s&&(Array.isArray(s)?r.push(...s):r.push(s))}}return r}o(Y1,"children");function Y2(t,e){let r=t.stack[t.stack.length-1],n=t.schema.attributes,i=t.schema.required,s=n&&gi.call(n,r)?n[r]:void 0,a=n&&gi.call(n,"*")?n["*"]:void 0,l=e&&typeof e=="object"?e:{},c={},u;for(u in l)if(gi.call(l,u)){let f=l[u],p=V1(t,G1(s,u),u,f);p==null&&(p=V1(t,G1(a,u),u,f)),p!=null&&(c[u]=p)}if(i&&gi.call(i,r)){let f=i[r];for(u in f)gi.call(f,u)&&!gi.call(c,u)&&(c[u]=f[u])}return c}o(Y2,"properties");function V1(t,e,r,n){return e?Array.isArray(n)?V2(t,e,r,n):K1(t,e,r,n):void 0}o(V1,"propertyValue");function V2(t,e,r,n){let i=-1,s=[];for(;++i<n.length;){let a=K1(t,e,r,n[i]);(typeof a=="number"||typeof a=="string")&&s.push(a)}return s}o(V2,"propertyValueMany");function K1(t,e,r,n){if(!(typeof n!="boolean"&&typeof n!="number"&&typeof n!="string")&&K2(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(K1,"propertyValuePrimitive");function K2(t,e,r){let n=t.schema.protocols&&gi.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(K2,"safeProtocol");function Cl(t,e){let r=Dl(e);e.data&&(t.data=di(e.data)),r&&(t.position=r)}o(Cl,"patch");function G1(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(G1,"findDefinition");function Q1(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(Q1,"blockquote");function J1(t,e){let r={type:"element",tagName:"br",properties:{},children:[]};return t.patch(e,r),[t.applyData(e,r),{type:"text",value:`
13
+ `}]}o(J1,"hardBreak");function X1(t,e){let r=e.value?e.value+`
14
+ `:"",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(X1,"code");function Z1(t,e){let r={type:"element",tagName:"del",properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}o(Z1,"strikethrough");function eT(t,e){let r={type:"element",tagName:"em",properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}o(eT,"emphasis");var tt=yi(/[A-Za-z]/),ze=yi(/[\dA-Za-z]/),tT=yi(/[#-'*+\--9=?A-Z^-~]/);function ho(t){return t!==null&&(t<32||t===127)}o(ho,"asciiControl");var Ol=yi(/\d/),rT=yi(/[\dA-Fa-f]/),nT=yi(/[!-/:-@[-`{-~]/);function V(t){return t!==null&&t<-2}o(V,"markdownLineEnding");function ge(t){return t!==null&&(t<0||t===32)}o(ge,"markdownLineEndingOrSpace");function ee(t){return t===-2||t===-1||t===32}o(ee,"markdownSpace");var mo=yi(/\p{P}|\p{S}/u),un=yi(/\s/);function yi(t){return e;function e(r){return r!==null&&r>-1&&t.test(String.fromCharCode(r))}}o(yi,"regexCheck");var G2={'"':"quot","&":"amp","<":"lt",">":"gt"};function Xp(t){return t.replace(/["&<>]/g,e);function e(r){return"&"+G2[r]+";"}}o(Xp,"encode");function fn(t,e){let r=Xp(rr(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 rr(t){let e=[],r=-1,n=0,i=0;for(;++r<t.length;){let s=t.charCodeAt(r),a="";if(s===37&&ze(t.charCodeAt(r+1))&&ze(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(rr,"normalizeUri");function iT(t,e){let r=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",n=String(e.identifier).toUpperCase(),i=rr(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(iT,"footnoteReference");function oT(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(oT,"heading");function sT(t,e){if(t.options.allowDangerousHtml){let r={type:"raw",value:e.value};return t.patch(e,r),t.applyData(e,r)}}o(sT,"html");function Zp(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(Zp,"revert");function aT(t,e){let r=String(e.identifier).toUpperCase(),n=t.definitionById.get(r);if(!n)return Zp(t,e);let i={src:rr(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(aT,"imageReference");function lT(t,e){let r={src:rr(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(lT,"image");function cT(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(cT,"inlineCode");function uT(t,e){let r=String(e.identifier).toUpperCase(),n=t.definitionById.get(r);if(!n)return Zp(t,e);let i={href:rr(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(uT,"linkReference");function fT(t,e){let r={href:rr(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(fT,"link");function hT(t,e,r){let n=t.all(e),i=r?Q2(r):pT(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:`
15
15
  `}),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:`
16
- `});let u={type:"element",tagName:"li",properties:s,children:a};return t.patch(e,u),t.applyData(e,u)}o(pT,"listItem");function G2(t){let e=!1;if(t.type==="list"){e=t.spread||!1;let r=t.children,n=-1;for(;!e&&++n<r.length;)e=fT(r[n])}return e}o(G2,"listLoose");function fT(t){let e=t.spread;return e??t.children.length>1}o(fT,"listItemLoose");function hT(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(hT,"list");function mT(t,e){let r={type:"element",tagName:"p",properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}o(mT,"paragraph");function dT(t,e){let r={type:"root",children:t.wrap(t.all(e))};return t.patch(e,r),t.applyData(e,r)}o(dT,"root");function gT(t,e){let r={type:"element",tagName:"strong",properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}o(gT,"strong");function yT(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=Gp(e.children[1]),c=Kp(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(yT,"table");function xT(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(xT,"tableRow");function bT(t,e){let r={type:"element",tagName:"td",properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}o(bT,"tableCell");var CLe=9,OLe=32;function ST(t){let e=String(t),r=/\r?\n|\r/g,n=r.exec(e),i=0,s=[];for(;n;)s.push(wT(e.slice(i,n.index),i>0,!0),n[0]),i=n.index+n[0].length,n=r.exec(e);return s.push(wT(e.slice(i),i>0,!1)),s.join("")}o(ST,"trimLines");function wT(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(wT,"trimLine");function vT(t,e){let r={type:"text",value:ST(String(e.value))};return t.patch(e,r),t.applyData(e,r)}o(vT,"text");function kT(t,e){let r={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(e,r),t.applyData(e,r)}o(kT,"thematicBreak");var yg={blockquote:G1,break:Q1,code:J1,delete:X1,emphasis:Z1,footnoteReference:nT,heading:iT,html:oT,imageReference:sT,image:aT,inlineCode:lT,linkReference:cT,link:uT,listItem:pT,list:hT,paragraph:mT,root:dT,strong:gT,table:yT,tableCell:bT,tableRow:xT,text:vT,thematicBreak:kT,toml:Zp,yaml:Zp,definition:Zp,footnoteDefinition:Zp};function Zp(){}o(Zp,"ignore");function TT(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(TT,"defaultFootnoteBackContent");function ET(t,e){return"Back to reference "+(t+1)+(e>1?"-"+e:"")}o(ET,"defaultFootnoteBackLabel");function DT(t){let e=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",r=t.options.footnoteBackContent||TT,n=t.options.footnoteBackLabel||ET,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=rr(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:{...mi(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
16
+ `});let u={type:"element",tagName:"li",properties:s,children:a};return t.patch(e,u),t.applyData(e,u)}o(hT,"listItem");function Q2(t){let e=!1;if(t.type==="list"){e=t.spread||!1;let r=t.children,n=-1;for(;!e&&++n<r.length;)e=pT(r[n])}return e}o(Q2,"listLoose");function pT(t){let e=t.spread;return e??t.children.length>1}o(pT,"listItemLoose");function mT(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(mT,"list");function dT(t,e){let r={type:"element",tagName:"p",properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}o(dT,"paragraph");function gT(t,e){let r={type:"root",children:t.wrap(t.all(e))};return t.patch(e,r),t.applyData(e,r)}o(gT,"root");function yT(t,e){let r={type:"element",tagName:"strong",properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}o(yT,"strong");function xT(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=Qp(e.children[1]),c=Gp(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(xT,"table");function bT(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(bT,"tableRow");function wT(t,e){let r={type:"element",tagName:"td",properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}o(wT,"tableCell");var OLe=9,ILe=32;function vT(t){let e=String(t),r=/\r?\n|\r/g,n=r.exec(e),i=0,s=[];for(;n;)s.push(ST(e.slice(i,n.index),i>0,!0),n[0]),i=n.index+n[0].length,n=r.exec(e);return s.push(ST(e.slice(i),i>0,!1)),s.join("")}o(vT,"trimLines");function ST(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(ST,"trimLine");function kT(t,e){let r={type:"text",value:vT(String(e.value))};return t.patch(e,r),t.applyData(e,r)}o(kT,"text");function TT(t,e){let r={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(e,r),t.applyData(e,r)}o(TT,"thematicBreak");var xg={blockquote:Q1,break:J1,code:X1,delete:Z1,emphasis:eT,footnoteReference:iT,heading:oT,html:sT,imageReference:aT,image:lT,inlineCode:cT,linkReference:uT,link:fT,listItem:hT,list:mT,paragraph:dT,root:gT,strong:yT,table:xT,tableCell:wT,tableRow:bT,text:kT,thematicBreak:TT,toml:eh,yaml:eh,definition:eh,footnoteDefinition:eh};function eh(){}o(eh,"ignore");function ET(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(ET,"defaultFootnoteBackContent");function DT(t,e){return"Back to reference "+(t+1)+(e>1?"-"+e:"")}o(DT,"defaultFootnoteBackLabel");function CT(t){let e=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",r=t.options.footnoteBackContent||ET,n=t.options.footnoteBackLabel||DT,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=rr(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:{...di(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
17
17
  `},{type:"element",tagName:"ol",properties:{},children:t.wrap(l,!0)},{type:"text",value:`
18
- `}]}}o(DT,"footer");var OT=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&&(!OT(n)||!n.children))throw new Error("Expected parent node");if(n==null!=(r==null))throw new Error("Expected both parent and index");return CT(t)?s.call(i,t,r,n):!1}),"is"),In=o((function(t){if(t==null)return Z2;if(typeof t=="function")return eh(t);if(typeof t=="object")return Array.isArray(t)?Q2(t):J2(t);if(typeof t=="string")return X2(t);throw new Error("Expected function, string, or object as test")}),"convert");function Q2(t){let e=[],r=-1;for(;++r<t.length;)e[r]=In(t[r]);return eh(n);function n(...i){let s=-1;for(;++s<e.length;)if(e[s].apply(this,i))return!0;return!1}}o(Q2,"anyFactory");function J2(t){let e=t;return eh(r);function r(n){let i=n,s;for(s in t)if(i[s]!==e[s])return!1;return!0}}o(J2,"propertiesFactory");function X2(t){return eh(e);function e(r){return r&&r.type===t}}o(X2,"typeFactory");function eh(t){return e;function e(r,n,i){return!!(CT(r)&&t.call(this,r,typeof n=="number"?n:void 0,i||void 0))}}o(eh,"castFactory");function Z2(){return!0}o(Z2,"ok");function CT(t){return t!==null&&typeof t=="object"&&"type"in t}o(CT,"looksLikeANode");var IT=[],th=!0,mo=!1,rh="skip";function Ol(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=IT,d,g,y;if((!e||s(c,u,f[f.length-1]||void 0))&&(m=eF(r(c,f)),m[0]===mo))return m;if("children"in c&&c.children){let x=c;if(x.children&&m[0]!==rh)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]===mo)return d;g=typeof d[1]=="number"?d[1]:g+a}}return m}}o(l,"factory")}o(Ol,"visitParents");function eF(t){return Array.isArray(t)?t:typeof t=="number"?[th,t]:t==null?IT:[t]}o(eF,"toResult");function Il(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),Ol(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(Il,"visit");var xg={}.hasOwnProperty,tF={};function NT(t,e){let r=e||tF,n=new Map,i=new Map,s=new Map,a={...yg,...r.handlers},l={all:u,applyData:nF,definitionById:n,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:a,one:c,options:r,patch:rF,wrap:oF};return Il(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(xg.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=mi(y);return x.children=l.all(f),x}return mi(f)}return(l.options.unknownHandler||iF)(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(NT,"createState");function rF(t,e){t.position&&(e.position=El(t))}o(rF,"patch");function nF(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,mi(s)),"children"in r&&r.children&&i!==null&&i!==void 0&&(r.children=i)}return r}o(nF,"applyData");function iF(t,e){let r=e.data||{},n="value"in e&&!(xg.call(r,"hProperties")||xg.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(iF,"defaultUnknownHandler");function oF(t,e){let r=[],n=-1;for(e&&r.push({type:"text",value:`
18
+ `}]}}o(CT,"footer");var IT=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&&(!IT(n)||!n.children))throw new Error("Expected parent node");if(n==null!=(r==null))throw new Error("Expected both parent and index");return OT(t)?s.call(i,t,r,n):!1}),"is"),Mn=o((function(t){if(t==null)return eF;if(typeof t=="function")return th(t);if(typeof t=="object")return Array.isArray(t)?J2(t):X2(t);if(typeof t=="string")return Z2(t);throw new Error("Expected function, string, or object as test")}),"convert");function J2(t){let e=[],r=-1;for(;++r<t.length;)e[r]=Mn(t[r]);return th(n);function n(...i){let s=-1;for(;++s<e.length;)if(e[s].apply(this,i))return!0;return!1}}o(J2,"anyFactory");function X2(t){let e=t;return th(r);function r(n){let i=n,s;for(s in t)if(i[s]!==e[s])return!1;return!0}}o(X2,"propertiesFactory");function Z2(t){return th(e);function e(r){return r&&r.type===t}}o(Z2,"typeFactory");function th(t){return e;function e(r,n,i){return!!(OT(r)&&t.call(this,r,typeof n=="number"?n:void 0,i||void 0))}}o(th,"castFactory");function eF(){return!0}o(eF,"ok");function OT(t){return t!==null&&typeof t=="object"&&"type"in t}o(OT,"looksLikeANode");var MT=[],rh=!0,go=!1,nh="skip";function Il(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=MT,d,g,y;if((!e||s(c,u,f[f.length-1]||void 0))&&(m=tF(r(c,f)),m[0]===go))return m;if("children"in c&&c.children){let x=c;if(x.children&&m[0]!==nh)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]===go)return d;g=typeof d[1]=="number"?d[1]:g+a}}return m}}o(l,"factory")}o(Il,"visitParents");function tF(t){return Array.isArray(t)?t:typeof t=="number"?[rh,t]:t==null?MT:[t]}o(tF,"toResult");function Ml(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),Il(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(Ml,"visit");var bg={}.hasOwnProperty,rF={};function PT(t,e){let r=e||rF,n=new Map,i=new Map,s=new Map,a={...xg,...r.handlers},l={all:u,applyData:iF,definitionById:n,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:a,one:c,options:r,patch:nF,wrap:sF};return Ml(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(bg.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=di(y);return x.children=l.all(f),x}return di(f)}return(l.options.unknownHandler||oF)(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=NT(d.value)),!Array.isArray(d)&&d.type==="element")){let g=d.children[0];g&&g.type==="text"&&(g.value=NT(g.value))}Array.isArray(d)?p.push(...d):p.push(d)}}}return p}o(u,"all")}o(PT,"createState");function nF(t,e){t.position&&(e.position=Dl(t))}o(nF,"patch");function iF(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,di(s)),"children"in r&&r.children&&i!==null&&i!==void 0&&(r.children=i)}return r}o(iF,"applyData");function oF(t,e){let r=e.data||{},n="value"in e&&!(bg.call(r,"hProperties")||bg.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(oF,"defaultUnknownHandler");function sF(t,e){let r=[],n=-1;for(e&&r.push({type:"text",value:`
19
19
  `});++n<t.length;)n&&r.push({type:"text",value:`
20
20
  `}),r.push(t[n]);return e&&t.length>0&&r.push({type:"text",value:`
21
- `}),r}o(oF,"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=NT(t,e),n=r.one(t,void 0),i=DT(r),s=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return i&&("children"in s,s.children.push({type:"text",value:`
22
- `},i)),s}o(bg,"toHast");var PT=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];var Mn=class{static{o(this,"Schema")}constructor(e,r,n){this.normal=r,this.property=e,n&&(this.space=n)}};Mn.prototype.normal={},Mn.prototype.property={},Mn.prototype.space=void 0;function wg(t,e){let r={},n={};for(let i of t)Object.assign(r,i.property),Object.assign(n,i.normal);return new Mn(r,n,e)}o(wg,"merge");function Hs(t){return t.toLowerCase()}o(Hs,"normalize");var at=class{static{o(this,"Info")}constructor(e,r){this.attribute=r,this.property=e}};at.prototype.attribute="",at.prototype.booleanish=!1,at.prototype.boolean=!1,at.prototype.commaOrSpaceSeparated=!1,at.prototype.commaSeparated=!1,at.prototype.defined=!1,at.prototype.mustUseProperty=!1,at.prototype.number=!1,at.prototype.overloadedBoolean=!1,at.prototype.property="",at.prototype.spaceSeparated=!1,at.prototype.space=void 0;var Ml={};se(Ml,{boolean:()=>ce,booleanish:()=>He,commaOrSpaceSeparated:()=>Ut,commaSeparated:()=>yi,number:()=>H,overloadedBoolean:()=>nh,spaceSeparated:()=>Me});var sF=0,ce=go(),He=go(),nh=go(),H=go(),Me=go(),yi=go(),Ut=go();function go(){return 2**++sF}o(go,"increment");var Sg=Object.keys(Ml),yo=class extends at{static{o(this,"DefinedInfo")}constructor(e,r,n,i){let s=-1;if(super(e,r),LT(this,"space",i),typeof n=="number")for(;++s<Sg.length;){let a=Sg[s];LT(this,Sg[s],(n&Ml[a])===Ml[a])}}};yo.prototype.defined=!0;function LT(t,e,r){r&&(t[e]=r)}o(LT,"mark");function gr(t){let e={},r={};for(let[n,i]of Object.entries(t.properties)){let s=new yo(n,t.transform(t.attributes||{},n),i,t.space);t.mustUseProperty&&t.mustUseProperty.includes(n)&&(s.mustUseProperty=!0),e[n]=s,r[Hs(n)]=n,r[Hs(s.attribute)]=n}return new Mn(e,r,t.space)}o(gr,"create");var vg=gr({properties:{ariaActiveDescendant:null,ariaAtomic:He,ariaAutoComplete:null,ariaBusy:He,ariaChecked:He,ariaColCount:H,ariaColIndex:H,ariaColSpan:H,ariaControls:Me,ariaCurrent:null,ariaDescribedBy:Me,ariaDetails:null,ariaDisabled:He,ariaDropEffect:Me,ariaErrorMessage:null,ariaExpanded:He,ariaFlowTo:Me,ariaGrabbed:He,ariaHasPopup:null,ariaHidden:He,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Me,ariaLevel:H,ariaLive:null,ariaModal:He,ariaMultiLine:He,ariaMultiSelectable:He,ariaOrientation:null,ariaOwns:Me,ariaPlaceholder:null,ariaPosInSet:H,ariaPressed:He,ariaReadOnly:He,ariaRelevant:null,ariaRequired:He,ariaRoleDescription:Me,ariaRowCount:H,ariaRowIndex:H,ariaRowSpan:H,ariaSelected:He,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 ih(t,e){return e in t?t[e]:e}o(ih,"caseSensitiveTransform");function oh(t,e){return ih(t,e.toLowerCase())}o(oh,"caseInsensitiveTransform");var _T=gr({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:yi,acceptCharset:Me,accessKey:Me,action:null,allow:null,allowFullScreen:ce,allowPaymentRequest:ce,allowUserMedia:ce,alt:null,as:null,async:ce,autoCapitalize:null,autoComplete:Me,autoFocus:ce,autoPlay:ce,blocking:Me,capture:null,charSet:null,checked:ce,cite:null,className:Me,cols:H,colSpan:null,content:null,contentEditable:He,controls:ce,controlsList:Me,coords:H|yi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ce,defer:ce,dir:null,dirName:null,disabled:ce,download:nh,draggable:He,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ce,formTarget:null,headers:Me,height:H,hidden:nh,high:H,href:null,hrefLang:null,htmlFor:Me,httpEquiv:Me,id:null,imageSizes:null,imageSrcSet:null,inert:ce,inputMode:null,integrity:null,is:null,isMap:ce,itemId:null,itemProp:Me,itemRef:Me,itemScope:ce,itemType:Me,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:Me,placeholder:null,playsInline:ce,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ce,referrerPolicy:null,rel:Me,required:ce,reversed:ce,rows:H,rowSpan:H,sandbox:Me,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:He,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:He,width:H,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Me,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:He,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:oh});var RT=gr({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:Ut,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:Me,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:yi,g2:yi,glyphName:yi,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:Ut,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:Me,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:H,pointsAtY:H,pointsAtZ:H,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ut,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ut,rev:Ut,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ut,requiredFeatures:Ut,requiredFonts:Ut,requiredFormats:Ut,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:Ut,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:Ut,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:Ut,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:ih});var kg=gr({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 Tg=gr({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:oh});var Eg=gr({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}});var aF=/[A-Z]/g,FT=/-[a-z]/g,lF=/^data[-\w.:]+$/i;function Dg(t,e){let r=Hs(e),n=e,i=at;if(r in t.normal)return t.property[t.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&lF.test(e)){if(e.charAt(4)==="-"){let s=e.slice(5).replace(FT,uF);n="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{let s=e.slice(4);if(!FT.test(s)){let a=s.replace(aF,cF);a.charAt(0)!=="-"&&(a="-"+a),e="data"+a}}i=yo}return new i(n,e)}o(Dg,"find");function cF(t){return"-"+t.toLowerCase()}o(cF,"kebab");function uF(t){return t.charAt(1).toUpperCase()}o(uF,"camelcase");var AT=wg([vg,_T,kg,Tg,Eg],"html"),sh=wg([vg,RT,kg,Tg,Eg],"svg");var $T={}.hasOwnProperty;function ah(t,e){let r=e||{};function n(i,...s){let a=n.invalid,l=n.handlers;if(i&&$T.call(i,t)){let c=String(i[t]);a=$T.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(ah,"zwitch");var fF=/["&'<>`]/g,pF=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,hF=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,mF=/[|\\{}()[\]^$+*?.]/g,BT=new WeakMap;function Cg(t,e){if(t=t.replace(e.subset?dF(e.subset):fF,n),e.subset||e.escapeOnly)return t;return t.replace(pF,r).replace(hF,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(Cg,"core");function dF(t){let e=BT.get(t);return e||(e=gF(t),BT.set(t,e)),e}o(dF,"charactersToExpressionCached");function gF(t){let e=[],r=-1;for(;++r<t.length;)e.push(t[r].replace(mF,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}o(gF,"charactersToExpression");var yF=/[\dA-Fa-f]/;function jT(t,e,r){let n="&#x"+t.toString(16).toUpperCase();return r&&e&&!yF.test(String.fromCharCode(e))?n:n+";"}o(jT,"toHexadecimal");var xF=/\d/;function UT(t,e,r){let n="&#"+String(t);return r&&e&&!xF.test(String.fromCharCode(e))?n:n+";"}o(UT,"toDecimal");var zT=["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 lh={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 HT=["cent","copy","divide","gt","lt","not","para","times"];var WT={}.hasOwnProperty,Og={},ch;for(ch in lh)WT.call(lh,ch)&&(Og[lh[ch]]=ch);var bF=/[^\dA-Za-z]/;function qT(t,e,r,n){let i=String.fromCharCode(t);if(WT.call(Og,i)){let s=Og[i],a="&"+s;return r&&zT.includes(s)&&!HT.includes(s)&&(!n||e&&e!==61&&bF.test(String.fromCharCode(e)))?a:a+";"}return""}o(qT,"toNamed");function YT(t,e,r){let n=jT(t,e,r.omitOptionalSemicolons),i;if((r.useNamedReferences||r.useShortestReferences)&&(i=qT(t,e,r.omitOptionalSemicolons,r.attribute)),(r.useShortestReferences||!i)&&r.useShortestReferences){let s=UT(t,e,r.omitOptionalSemicolons);s.length<n.length&&(n=s)}return i&&(!r.useShortestReferences||i.length<n.length)?i:n}o(YT,"formatSmart");function VT(t){return"&#x"+t.toString(16).toUpperCase()+";"}o(VT,"formatBasic");function Nn(t,e){return Cg(t,Object.assign({format:YT},e))}o(Nn,"stringifyEntities");function w2e(t,e){return Cg(t,Object.assign({format:VT},e))}o(w2e,"stringifyEntitiesLight");var wF=/^>|^->|<!--|-->|--!>|<!-$/g,SF=[">"],vF=["<",">"];function KT(t,e,r,n){return n.settings.bogusComments?"<?"+Nn(t.value,Object.assign({},n.settings.characterReferences,{subset:SF}))+">":"<!--"+t.value.replace(wF,i)+"-->";function i(s){return Nn(s,Object.assign({},n.settings.characterReferences,{subset:vF}))}}o(KT,"comment");function GT(t,e,r,n){return"<!"+(n.settings.upperDoctype?"DOCTYPE":"doctype")+(n.settings.tightDoctype?"":" ")+"html>"}o(GT,"doctype");function Ws(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(Ws,"ccount");function M2e(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(M2e,"parse");function QT(t,e){let r=e||{};return(t[t.length-1]===""?[...t,""]:t).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}o(QT,"stringify");function L2e(t){let e=String(t||"").trim();return e?e.split(/[ \t\n\r\f]+/g):[]}o(L2e,"parse");function JT(t){return t.join(" ").trim()}o(JT,"stringify");var kF=/[ \t\n\f\r]/g;function xo(t){return typeof t=="object"?t.type==="text"?XT(t.value):!1:XT(t)}o(xo,"whitespace");function XT(t){return t.replace(kF,"")===""}o(XT,"empty");var Ve=ZT(1),Ig=ZT(-1),TF=[];function ZT(t){return e;function e(r,n,i){let s=r?r.children:TF,a=(n||0)+t,l=s[a];if(!i)for(;l&&xo(l);)a+=t,l=s[a];return l}}o(ZT,"siblings");var EF={}.hasOwnProperty;function uh(t){return e;function e(r,n,i){return EF.call(t,r.tagName)&&t[r.tagName](r,n,i)}}o(uh,"omission");var Nl=uh({body:CF,caption:Mg,colgroup:Mg,dd:NF,dt:MF,head:Mg,html:DF,li:IF,optgroup:PF,option:LF,p:OF,rp:eE,rt:eE,tbody:RF,td:tE,tfoot:FF,th:tE,thead:_F,tr:AF});function Mg(t,e,r){let n=Ve(r,e,!0);return!n||n.type!=="comment"&&!(n.type==="text"&&xo(n.value.charAt(0)))}o(Mg,"headOrColgroupOrCaption");function DF(t,e,r){let n=Ve(r,e);return!n||n.type!=="comment"}o(DF,"html");function CF(t,e,r){let n=Ve(r,e);return!n||n.type!=="comment"}o(CF,"body");function OF(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(OF,"p");function IF(t,e,r){let n=Ve(r,e);return!n||n.type==="element"&&n.tagName==="li"}o(IF,"li");function MF(t,e,r){let n=Ve(r,e);return!!(n&&n.type==="element"&&(n.tagName==="dt"||n.tagName==="dd"))}o(MF,"dt");function NF(t,e,r){let n=Ve(r,e);return!n||n.type==="element"&&(n.tagName==="dt"||n.tagName==="dd")}o(NF,"dd");function eE(t,e,r){let n=Ve(r,e);return!n||n.type==="element"&&(n.tagName==="rp"||n.tagName==="rt")}o(eE,"rubyElement");function PF(t,e,r){let n=Ve(r,e);return!n||n.type==="element"&&n.tagName==="optgroup"}o(PF,"optgroup");function LF(t,e,r){let n=Ve(r,e);return!n||n.type==="element"&&(n.tagName==="option"||n.tagName==="optgroup")}o(LF,"option");function _F(t,e,r){let n=Ve(r,e);return!!(n&&n.type==="element"&&(n.tagName==="tbody"||n.tagName==="tfoot"))}o(_F,"thead");function RF(t,e,r){let n=Ve(r,e);return!n||n.type==="element"&&(n.tagName==="tbody"||n.tagName==="tfoot")}o(RF,"tbody");function FF(t,e,r){return!Ve(r,e)}o(FF,"tfoot");function AF(t,e,r){let n=Ve(r,e);return!n||n.type==="element"&&n.tagName==="tr"}o(AF,"tr");function tE(t,e,r){let n=Ve(r,e);return!n||n.type==="element"&&(n.tagName==="td"||n.tagName==="th")}o(tE,"cells");var rE=uh({body:jF,colgroup:UF,head:BF,html:$F,tbody:zF});function $F(t){let e=Ve(t,-1);return!e||e.type!=="comment"}o($F,"html");function BF(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(BF,"head");function jF(t){let e=Ve(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&xo(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}o(jF,"body");function UF(t,e,r){let n=Ig(r,e),i=Ve(t,-1,!0);return r&&n&&n.type==="element"&&n.tagName==="colgroup"&&Nl(n,r.children.indexOf(n),r)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}o(UF,"colgroup");function zF(t,e,r){let n=Ig(r,e),i=Ve(t,-1);return r&&n&&n.type==="element"&&(n.tagName==="thead"||n.tagName==="tbody")&&Nl(n,r.children.indexOf(n),r)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}o(zF,"tbody");var fh={name:[[`
21
+ `}),r}o(sF,"wrap");function NT(t){let e=0,r=t.charCodeAt(e);for(;r===9||r===32;)e++,r=t.charCodeAt(e);return t.slice(e)}o(NT,"trimMarkdownSpaceStart");function wg(t,e){let r=PT(t,e),n=r.one(t,void 0),i=CT(r),s=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return i&&("children"in s,s.children.push({type:"text",value:`
22
+ `},i)),s}o(wg,"toHast");var LT=["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 Sg(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(Sg,"merge");function Ws(t){return t.toLowerCase()}o(Ws,"normalize");var at=class{static{o(this,"Info")}constructor(e,r){this.attribute=r,this.property=e}};at.prototype.attribute="",at.prototype.booleanish=!1,at.prototype.boolean=!1,at.prototype.commaOrSpaceSeparated=!1,at.prototype.commaSeparated=!1,at.prototype.defined=!1,at.prototype.mustUseProperty=!1,at.prototype.number=!1,at.prototype.overloadedBoolean=!1,at.prototype.property="",at.prototype.spaceSeparated=!1,at.prototype.space=void 0;var Nl={};se(Nl,{boolean:()=>ce,booleanish:()=>He,commaOrSpaceSeparated:()=>Ut,commaSeparated:()=>xi,number:()=>H,overloadedBoolean:()=>ih,spaceSeparated:()=>Me});var aF=0,ce=yo(),He=yo(),ih=yo(),H=yo(),Me=yo(),xi=yo(),Ut=yo();function yo(){return 2**++aF}o(yo,"increment");var vg=Object.keys(Nl),xo=class extends at{static{o(this,"DefinedInfo")}constructor(e,r,n,i){let s=-1;if(super(e,r),_T(this,"space",i),typeof n=="number")for(;++s<vg.length;){let a=vg[s];_T(this,vg[s],(n&Nl[a])===Nl[a])}}};xo.prototype.defined=!0;function _T(t,e,r){r&&(t[e]=r)}o(_T,"mark");function gr(t){let e={},r={};for(let[n,i]of Object.entries(t.properties)){let s=new xo(n,t.transform(t.attributes||{},n),i,t.space);t.mustUseProperty&&t.mustUseProperty.includes(n)&&(s.mustUseProperty=!0),e[n]=s,r[Ws(n)]=n,r[Ws(s.attribute)]=n}return new Nn(e,r,t.space)}o(gr,"create");var kg=gr({properties:{ariaActiveDescendant:null,ariaAtomic:He,ariaAutoComplete:null,ariaBusy:He,ariaChecked:He,ariaColCount:H,ariaColIndex:H,ariaColSpan:H,ariaControls:Me,ariaCurrent:null,ariaDescribedBy:Me,ariaDetails:null,ariaDisabled:He,ariaDropEffect:Me,ariaErrorMessage:null,ariaExpanded:He,ariaFlowTo:Me,ariaGrabbed:He,ariaHasPopup:null,ariaHidden:He,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Me,ariaLevel:H,ariaLive:null,ariaModal:He,ariaMultiLine:He,ariaMultiSelectable:He,ariaOrientation:null,ariaOwns:Me,ariaPlaceholder:null,ariaPosInSet:H,ariaPressed:He,ariaReadOnly:He,ariaRelevant:null,ariaRequired:He,ariaRoleDescription:Me,ariaRowCount:H,ariaRowIndex:H,ariaRowSpan:H,ariaSelected:He,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 oh(t,e){return e in t?t[e]:e}o(oh,"caseSensitiveTransform");function sh(t,e){return oh(t,e.toLowerCase())}o(sh,"caseInsensitiveTransform");var RT=gr({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:xi,acceptCharset:Me,accessKey:Me,action:null,allow:null,allowFullScreen:ce,allowPaymentRequest:ce,allowUserMedia:ce,alt:null,as:null,async:ce,autoCapitalize:null,autoComplete:Me,autoFocus:ce,autoPlay:ce,blocking:Me,capture:null,charSet:null,checked:ce,cite:null,className:Me,cols:H,colSpan:null,content:null,contentEditable:He,controls:ce,controlsList:Me,coords:H|xi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ce,defer:ce,dir:null,dirName:null,disabled:ce,download:ih,draggable:He,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ce,formTarget:null,headers:Me,height:H,hidden:ih,high:H,href:null,hrefLang:null,htmlFor:Me,httpEquiv:Me,id:null,imageSizes:null,imageSrcSet:null,inert:ce,inputMode:null,integrity:null,is:null,isMap:ce,itemId:null,itemProp:Me,itemRef:Me,itemScope:ce,itemType:Me,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:Me,placeholder:null,playsInline:ce,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ce,referrerPolicy:null,rel:Me,required:ce,reversed:ce,rows:H,rowSpan:H,sandbox:Me,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:He,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:He,width:H,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Me,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:He,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 FT=gr({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:Ut,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:Me,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:xi,g2:xi,glyphName:xi,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:Ut,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:Me,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:H,pointsAtY:H,pointsAtZ:H,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ut,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ut,rev:Ut,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ut,requiredFeatures:Ut,requiredFonts:Ut,requiredFormats:Ut,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:Ut,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:Ut,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:Ut,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:oh});var Tg=gr({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 Eg=gr({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:sh});var Dg=gr({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}});var lF=/[A-Z]/g,AT=/-[a-z]/g,cF=/^data[-\w.:]+$/i;function Cg(t,e){let r=Ws(e),n=e,i=at;if(r in t.normal)return t.property[t.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&cF.test(e)){if(e.charAt(4)==="-"){let s=e.slice(5).replace(AT,fF);n="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{let s=e.slice(4);if(!AT.test(s)){let a=s.replace(lF,uF);a.charAt(0)!=="-"&&(a="-"+a),e="data"+a}}i=xo}return new i(n,e)}o(Cg,"find");function uF(t){return"-"+t.toLowerCase()}o(uF,"kebab");function fF(t){return t.charAt(1).toUpperCase()}o(fF,"camelcase");var $T=Sg([kg,RT,Tg,Eg,Dg],"html"),ah=Sg([kg,FT,Tg,Eg,Dg],"svg");var BT={}.hasOwnProperty;function lh(t,e){let r=e||{};function n(i,...s){let a=n.invalid,l=n.handlers;if(i&&BT.call(i,t)){let c=String(i[t]);a=BT.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(lh,"zwitch");var pF=/["&'<>`]/g,hF=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,mF=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,dF=/[|\\{}()[\]^$+*?.]/g,jT=new WeakMap;function Og(t,e){if(t=t.replace(e.subset?gF(e.subset):pF,n),e.subset||e.escapeOnly)return t;return t.replace(hF,r).replace(mF,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(Og,"core");function gF(t){let e=jT.get(t);return e||(e=yF(t),jT.set(t,e)),e}o(gF,"charactersToExpressionCached");function yF(t){let e=[],r=-1;for(;++r<t.length;)e.push(t[r].replace(dF,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}o(yF,"charactersToExpression");var xF=/[\dA-Fa-f]/;function UT(t,e,r){let n="&#x"+t.toString(16).toUpperCase();return r&&e&&!xF.test(String.fromCharCode(e))?n:n+";"}o(UT,"toHexadecimal");var bF=/\d/;function zT(t,e,r){let n="&#"+String(t);return r&&e&&!bF.test(String.fromCharCode(e))?n:n+";"}o(zT,"toDecimal");var HT=["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 ch={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 WT=["cent","copy","divide","gt","lt","not","para","times"];var qT={}.hasOwnProperty,Ig={},uh;for(uh in ch)qT.call(ch,uh)&&(Ig[ch[uh]]=uh);var wF=/[^\dA-Za-z]/;function YT(t,e,r,n){let i=String.fromCharCode(t);if(qT.call(Ig,i)){let s=Ig[i],a="&"+s;return r&&HT.includes(s)&&!WT.includes(s)&&(!n||e&&e!==61&&wF.test(String.fromCharCode(e)))?a:a+";"}return""}o(YT,"toNamed");function VT(t,e,r){let n=UT(t,e,r.omitOptionalSemicolons),i;if((r.useNamedReferences||r.useShortestReferences)&&(i=YT(t,e,r.omitOptionalSemicolons,r.attribute)),(r.useShortestReferences||!i)&&r.useShortestReferences){let s=zT(t,e,r.omitOptionalSemicolons);s.length<n.length&&(n=s)}return i&&(!r.useShortestReferences||i.length<n.length)?i:n}o(VT,"formatSmart");function KT(t){return"&#x"+t.toString(16).toUpperCase()+";"}o(KT,"formatBasic");function Pn(t,e){return Og(t,Object.assign({format:VT},e))}o(Pn,"stringifyEntities");function S2e(t,e){return Og(t,Object.assign({format:KT},e))}o(S2e,"stringifyEntitiesLight");var SF=/^>|^->|<!--|-->|--!>|<!-$/g,vF=[">"],kF=["<",">"];function GT(t,e,r,n){return n.settings.bogusComments?"<?"+Pn(t.value,Object.assign({},n.settings.characterReferences,{subset:vF}))+">":"<!--"+t.value.replace(SF,i)+"-->";function i(s){return Pn(s,Object.assign({},n.settings.characterReferences,{subset:kF}))}}o(GT,"comment");function QT(t,e,r,n){return"<!"+(n.settings.upperDoctype?"DOCTYPE":"doctype")+(n.settings.tightDoctype?"":" ")+"html>"}o(QT,"doctype");function qs(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(qs,"ccount");function N2e(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(N2e,"parse");function JT(t,e){let r=e||{};return(t[t.length-1]===""?[...t,""]:t).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}o(JT,"stringify");function _2e(t){let e=String(t||"").trim();return e?e.split(/[ \t\n\r\f]+/g):[]}o(_2e,"parse");function XT(t){return t.join(" ").trim()}o(XT,"stringify");var TF=/[ \t\n\f\r]/g;function bo(t){return typeof t=="object"?t.type==="text"?ZT(t.value):!1:ZT(t)}o(bo,"whitespace");function ZT(t){return t.replace(TF,"")===""}o(ZT,"empty");var Ve=eE(1),Mg=eE(-1),EF=[];function eE(t){return e;function e(r,n,i){let s=r?r.children:EF,a=(n||0)+t,l=s[a];if(!i)for(;l&&bo(l);)a+=t,l=s[a];return l}}o(eE,"siblings");var DF={}.hasOwnProperty;function fh(t){return e;function e(r,n,i){return DF.call(t,r.tagName)&&t[r.tagName](r,n,i)}}o(fh,"omission");var Pl=fh({body:OF,caption:Ng,colgroup:Ng,dd:PF,dt:NF,head:Ng,html:CF,li:MF,optgroup:LF,option:_F,p:IF,rp:tE,rt:tE,tbody:FF,td:rE,tfoot:AF,th:rE,thead:RF,tr:$F});function Ng(t,e,r){let n=Ve(r,e,!0);return!n||n.type!=="comment"&&!(n.type==="text"&&bo(n.value.charAt(0)))}o(Ng,"headOrColgroupOrCaption");function CF(t,e,r){let n=Ve(r,e);return!n||n.type!=="comment"}o(CF,"html");function OF(t,e,r){let n=Ve(r,e);return!n||n.type!=="comment"}o(OF,"body");function IF(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(IF,"p");function MF(t,e,r){let n=Ve(r,e);return!n||n.type==="element"&&n.tagName==="li"}o(MF,"li");function NF(t,e,r){let n=Ve(r,e);return!!(n&&n.type==="element"&&(n.tagName==="dt"||n.tagName==="dd"))}o(NF,"dt");function PF(t,e,r){let n=Ve(r,e);return!n||n.type==="element"&&(n.tagName==="dt"||n.tagName==="dd")}o(PF,"dd");function tE(t,e,r){let n=Ve(r,e);return!n||n.type==="element"&&(n.tagName==="rp"||n.tagName==="rt")}o(tE,"rubyElement");function LF(t,e,r){let n=Ve(r,e);return!n||n.type==="element"&&n.tagName==="optgroup"}o(LF,"optgroup");function _F(t,e,r){let n=Ve(r,e);return!n||n.type==="element"&&(n.tagName==="option"||n.tagName==="optgroup")}o(_F,"option");function RF(t,e,r){let n=Ve(r,e);return!!(n&&n.type==="element"&&(n.tagName==="tbody"||n.tagName==="tfoot"))}o(RF,"thead");function FF(t,e,r){let n=Ve(r,e);return!n||n.type==="element"&&(n.tagName==="tbody"||n.tagName==="tfoot")}o(FF,"tbody");function AF(t,e,r){return!Ve(r,e)}o(AF,"tfoot");function $F(t,e,r){let n=Ve(r,e);return!n||n.type==="element"&&n.tagName==="tr"}o($F,"tr");function rE(t,e,r){let n=Ve(r,e);return!n||n.type==="element"&&(n.tagName==="td"||n.tagName==="th")}o(rE,"cells");var nE=fh({body:UF,colgroup:zF,head:jF,html:BF,tbody:HF});function BF(t){let e=Ve(t,-1);return!e||e.type!=="comment"}o(BF,"html");function jF(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(jF,"head");function UF(t){let e=Ve(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&bo(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}o(UF,"body");function zF(t,e,r){let n=Mg(r,e),i=Ve(t,-1,!0);return r&&n&&n.type==="element"&&n.tagName==="colgroup"&&Pl(n,r.children.indexOf(n),r)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}o(zF,"colgroup");function HF(t,e,r){let n=Mg(r,e),i=Ve(t,-1);return r&&n&&n.type==="element"&&(n.tagName==="thead"||n.tagName==="tbody")&&Pl(n,r.children.indexOf(n),r)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}o(HF,"tbody");var ph={name:[[`
23
23
  \f\r &/=>`.split(""),`
24
24
  \f\r "&'/=>\``.split("")],[`\0
25
25
  \f\r "&'/<=>`.split(""),`\0
@@ -27,53 +27,53 @@ ${i}
27
27
  \f\r &>`.split(""),`\0
28
28
  \f\r "&'<=>\``.split("")],[`\0
29
29
  \f\r "&'<=>\``.split(""),`\0
30
- \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function nE(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=sh);let u=HF(n,t.properties),f=n.all(i.space==="html"&&t.tagName==="template"?t.content:t);return n.schema=i,f&&(a=!1),(u||!s||!rE(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||!Nl(t,e,r))&&l.push("</"+t.tagName+">"),l.join("")}o(nE,"element");function HF(t,e){let r=[],n=-1,i;if(e){for(i in e)if(e[i]!==null&&e[i]!==void 0){let s=WF(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(HF,"serializeAttributes");function WF(t,e,r){let n=Dg(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:fh.name[i][s]}));return r===!0||(r=Array.isArray(r)?(n.commaSeparated?QT:JT)(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:fh.unquoted[i][s]}))),l!==r&&(t.settings.quoteSmart&&Ws(r,a)>Ws(r,t.alternative)&&(a=t.alternative),l=a+Nn(r,Object.assign({},t.settings.characterReferences,{subset:(a==="'"?fh.single:fh.double)[i][s],attribute:!0}))+a),c+(l&&"="+l))}o(WF,"serializeAttribute");var qF=["<","&"];function ph(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:qF}))}o(ph,"text");function iE(t,e,r,n){return n.settings.allowDangerousHtml?t.value:ph(t,e,r,n)}o(iE,"raw");function oE(t,e,r,n){return n.all(t)}o(oE,"root");var sE=ah("type",{invalid:YF,unknown:VF,handlers:{comment:KT,doctype:GT,element:nE,raw:iE,root:oE,text:ph}});function YF(t){throw new Error("Expected node, not `"+t+"`")}o(YF,"invalid");function VF(t){let e=t;throw new Error("Cannot compile unknown node `"+e.type+"`")}o(VF,"unknown");var KF={},GF={},QF=[];function Ng(t,e){let r=e||KF,n=r.quote||'"',i=n==='"'?"'":'"';if(n!=='"'&&n!=="'")throw new Error("Invalid quote `"+n+"`, expected `'` or `\"`");return{one:JF,all:XF,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||PT,characterReferences:r.characterReferences||GF,closeSelfClosing:r.closeSelfClosing||!1,closeEmptyElements:r.closeEmptyElements||!1},schema:r.space==="svg"?sh:AT,quote:n,alternative:i}.one(Array.isArray(t)?{type:"root",children:t}:t,void 0,void 0)}o(Ng,"toHtml");function JF(t,e,r){return sE(t,e,r,this)}o(JF,"one");function XF(t){let e=[],r=t&&t.children||QF,n=-1;for(;++n<r.length;)e[n]=this.one(r[n],n,t);return e.join("")}o(XF,"all");var ZF={};function qs(t){let e=this,{handlers:r,sanitize:n,...i}=t||ZF,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:gg(f,a),h=Ng(p,{...i,allowDangerousHtml:s});return u.extname&&(u.extname=".html"),c&&c.type==="root"&&h&&/[^\r\n]/.test(h.charAt(h.length-1))?h+`
31
- `:h}o(l,"compiler")}o(qs,"remarkHtml");var eA={}.hasOwnProperty;function Pg(t,e){let r=-1,n;if(e.extensions)for(;++r<e.extensions.length;)Pg(t,e.extensions[r]);for(n in e)if(eA.call(e,n))switch(n){case"extensions":break;case"unsafe":{aE(t[n],e[n]);break}case"join":{aE(t[n],e[n]);break}case"handlers":{tA(t[n],e[n]);break}default:t.options[n]=e[n]}return t}o(Pg,"configure");function aE(t,e){e&&t.push(...e)}o(aE,"list");function tA(t,e){e&&Object.assign(t,e)}o(tA,"map");function lE(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()),rA);return i(),a}o(lE,"blockquote");function rA(t,e,r){return">"+(r?"":" ")+t}o(rA,"map");function hh(t,e){return cE(t,e.inConstruct,!0)&&!cE(t,e.notInConstruct,!1)}o(hh,"patternInScope");function cE(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(cE,"listInScope");function Lg(t,e,r,n){let i=-1;for(;++i<r.unsafe.length;)if(r.unsafe[i].character===`
32
- `&&hh(r.stack,r.unsafe[i]))return/[ \t]/.test(n.before)?"":" ";return`\\
33
- `}o(Lg,"hardBreak");function uE(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(uE,"longestStreak");function Pl(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(Pl,"formatCodeAsIndented");function fE(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(fE,"checkFence");function pE(t,e,r,n){let i=fE(r),s=t.value||"",a=i==="`"?"GraveAccent":"Tilde";if(Pl(t,r)){let p=r.enter("codeIndented"),h=r.indentLines(s,nA);return p(),h}let l=r.createTracker(n),c=i.repeat(Math.max(uE(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:`
30
+ \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function iE(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=ah);let u=WF(n,t.properties),f=n.all(i.space==="html"&&t.tagName==="template"?t.content:t);return n.schema=i,f&&(a=!1),(u||!s||!nE(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||!Pl(t,e,r))&&l.push("</"+t.tagName+">"),l.join("")}o(iE,"element");function WF(t,e){let r=[],n=-1,i;if(e){for(i in e)if(e[i]!==null&&e[i]!==void 0){let s=qF(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(WF,"serializeAttributes");function qF(t,e,r){let n=Cg(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:ph.name[i][s]}));return r===!0||(r=Array.isArray(r)?(n.commaSeparated?JT:XT)(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:ph.unquoted[i][s]}))),l!==r&&(t.settings.quoteSmart&&qs(r,a)>qs(r,t.alternative)&&(a=t.alternative),l=a+Pn(r,Object.assign({},t.settings.characterReferences,{subset:(a==="'"?ph.single:ph.double)[i][s],attribute:!0}))+a),c+(l&&"="+l))}o(qF,"serializeAttribute");var YF=["<","&"];function hh(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:YF}))}o(hh,"text");function oE(t,e,r,n){return n.settings.allowDangerousHtml?t.value:hh(t,e,r,n)}o(oE,"raw");function sE(t,e,r,n){return n.all(t)}o(sE,"root");var aE=lh("type",{invalid:VF,unknown:KF,handlers:{comment:GT,doctype:QT,element:iE,raw:oE,root:sE,text:hh}});function VF(t){throw new Error("Expected node, not `"+t+"`")}o(VF,"invalid");function KF(t){let e=t;throw new Error("Cannot compile unknown node `"+e.type+"`")}o(KF,"unknown");var GF={},QF={},JF=[];function Pg(t,e){let r=e||GF,n=r.quote||'"',i=n==='"'?"'":'"';if(n!=='"'&&n!=="'")throw new Error("Invalid quote `"+n+"`, expected `'` or `\"`");return{one:XF,all:ZF,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||LT,characterReferences:r.characterReferences||QF,closeSelfClosing:r.closeSelfClosing||!1,closeEmptyElements:r.closeEmptyElements||!1},schema:r.space==="svg"?ah:$T,quote:n,alternative:i}.one(Array.isArray(t)?{type:"root",children:t}:t,void 0,void 0)}o(Pg,"toHtml");function XF(t,e,r){return aE(t,e,r,this)}o(XF,"one");function ZF(t){let e=[],r=t&&t.children||JF,n=-1;for(;++n<r.length;)e[n]=this.one(r[n],n,t);return e.join("")}o(ZF,"all");var eA={};function Ys(t){let e=this,{handlers:r,sanitize:n,...i}=t||eA,s=!1,a;typeof n=="boolean"?s=!n:n&&(a=n),e.compiler=l;function l(c,u){let f=wg(c,{handlers:r,allowDangerousHtml:s}),p=s?f:yg(f,a),h=Pg(p,{...i,allowDangerousHtml:s});return u.extname&&(u.extname=".html"),c&&c.type==="root"&&h&&/[^\r\n]/.test(h.charAt(h.length-1))?h+`
31
+ `:h}o(l,"compiler")}o(Ys,"remarkHtml");var tA={}.hasOwnProperty;function Lg(t,e){let r=-1,n;if(e.extensions)for(;++r<e.extensions.length;)Lg(t,e.extensions[r]);for(n in e)if(tA.call(e,n))switch(n){case"extensions":break;case"unsafe":{lE(t[n],e[n]);break}case"join":{lE(t[n],e[n]);break}case"handlers":{rA(t[n],e[n]);break}default:t.options[n]=e[n]}return t}o(Lg,"configure");function lE(t,e){e&&t.push(...e)}o(lE,"list");function rA(t,e){e&&Object.assign(t,e)}o(rA,"map");function cE(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()),nA);return i(),a}o(cE,"blockquote");function nA(t,e,r){return">"+(r?"":" ")+t}o(nA,"map");function mh(t,e){return uE(t,e.inConstruct,!0)&&!uE(t,e.notInConstruct,!1)}o(mh,"patternInScope");function uE(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(uE,"listInScope");function _g(t,e,r,n){let i=-1;for(;++i<r.unsafe.length;)if(r.unsafe[i].character===`
32
+ `&&mh(r.stack,r.unsafe[i]))return/[ \t]/.test(n.before)?"":" ";return`\\
33
+ `}o(_g,"hardBreak");function fE(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(fE,"longestStreak");function Ll(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(Ll,"formatCodeAsIndented");function pE(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(pE,"checkFence");function hE(t,e,r,n){let i=pE(r),s=t.value||"",a=i==="`"?"GraveAccent":"Tilde";if(Ll(t,r)){let p=r.enter("codeIndented"),h=r.indentLines(s,iA);return p(),h}let l=r.createTracker(n),c=i.repeat(Math.max(fE(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:`
34
34
  `,encode:["`"],...l.current()})),p()}return f+=l.move(`
35
35
  `),s&&(f+=l.move(s+`
36
- `)),f+=l.move(c),u(),f}o(pE,"code");function nA(t,e,r){return(r?"":" ")+t}o(nA,"map");function Ys(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(Ys,"checkQuote");function hE(t,e,r,n){let i=Ys(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?" ":`
37
- `,...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(hE,"definition");function mE(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(mE,"checkEmphasis");function nr(t){return"&#x"+t.toString(16).toUpperCase()+";"}o(nr,"encodeCharacterReference");function Pn(t){if(t===null||ge(t)||un(t))return 1;if(ho(t))return 2}o(Pn,"classifyCharacter");function Vs(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(Vs,"encodeInfo");_g.peek=iA;function _g(t,e,r,n){let i=mE(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=Vs(n.before.charCodeAt(n.before.length-1),u,i);f.inside&&(c=nr(u)+c.slice(1));let p=c.charCodeAt(c.length-1),h=Vs(n.after.charCodeAt(0),p,i);h.inside&&(c=c.slice(0,-1)+nr(p));let m=a.move(i);return s(),r.attentionEncodeSurroundingInfo={after:h.outside,before:f.outside},l+c+m}o(_g,"emphasis");function iA(t,e,r){return r.options.emphasis||"*"}o(iA,"emphasisPeek");var oA={};function bo(t,e){let r=e||oA,n=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,i=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return dE(t,n,i)}o(bo,"toString");function dE(t,e,r){if(sA(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 gE(t.children,e,r)}return Array.isArray(t)?gE(t,e,r):""}o(dE,"one");function gE(t,e,r){let n=[],i=-1;for(;++i<t.length;)n[i]=dE(t[i],e,r);return n.join("")}o(gE,"all");function sA(t){return!!(t&&typeof t=="object")}o(sA,"node");function mh(t,e){let r=!1;return Il(t,function(n){if("value"in n&&/\r?\n|\r/.test(n.value)||n.type==="break")return r=!0,mo}),!!((!t.depth||t.depth<3)&&bo(t)&&(e.options.setext||r))}o(mh,"formatHeadingAsSetext");function yE(t,e,r,n){let i=Math.max(Math.min(6,t.depth||1),1),s=r.createTracker(n);if(mh(t,r)){let f=r.enter("headingSetext"),p=r.enter("phrasing"),h=r.containerPhrasing(t,{...s.current(),before:`
36
+ `)),f+=l.move(c),u(),f}o(hE,"code");function iA(t,e,r){return(r?"":" ")+t}o(iA,"map");function Vs(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(Vs,"checkQuote");function mE(t,e,r,n){let i=Vs(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?" ":`
37
+ `,...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(mE,"definition");function dE(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(dE,"checkEmphasis");function nr(t){return"&#x"+t.toString(16).toUpperCase()+";"}o(nr,"encodeCharacterReference");function Ln(t){if(t===null||ge(t)||un(t))return 1;if(mo(t))return 2}o(Ln,"classifyCharacter");function Ks(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(Ks,"encodeInfo");Rg.peek=oA;function Rg(t,e,r,n){let i=dE(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=Ks(n.before.charCodeAt(n.before.length-1),u,i);f.inside&&(c=nr(u)+c.slice(1));let p=c.charCodeAt(c.length-1),h=Ks(n.after.charCodeAt(0),p,i);h.inside&&(c=c.slice(0,-1)+nr(p));let m=a.move(i);return s(),r.attentionEncodeSurroundingInfo={after:h.outside,before:f.outside},l+c+m}o(Rg,"emphasis");function oA(t,e,r){return r.options.emphasis||"*"}o(oA,"emphasisPeek");var sA={};function wo(t,e){let r=e||sA,n=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,i=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return gE(t,n,i)}o(wo,"toString");function gE(t,e,r){if(aA(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 yE(t.children,e,r)}return Array.isArray(t)?yE(t,e,r):""}o(gE,"one");function yE(t,e,r){let n=[],i=-1;for(;++i<t.length;)n[i]=gE(t[i],e,r);return n.join("")}o(yE,"all");function aA(t){return!!(t&&typeof t=="object")}o(aA,"node");function dh(t,e){let r=!1;return Ml(t,function(n){if("value"in n&&/\r?\n|\r/.test(n.value)||n.type==="break")return r=!0,go}),!!((!t.depth||t.depth<3)&&wo(t)&&(e.options.setext||r))}o(dh,"formatHeadingAsSetext");function xE(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:`
38
38
  `,after:`
39
39
  `});return p(),f(),h+`
40
40
  `+(i===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
41
41
  `))+1))}let a="#".repeat(i),l=r.enter("headingAtx"),c=r.enter("phrasing");s.move(a+" ");let u=r.containerPhrasing(t,{before:"# ",after:`
42
- `,...s.current()});return/^[\t ]/.test(u)&&(u=nr(u.charCodeAt(0))+u.slice(1)),u=u?a+" "+u:a,r.options.closeAtx&&(u+=" "+a),c(),l(),u}o(yE,"heading");Rg.peek=aA;function Rg(t){return t.value||""}o(Rg,"html");function aA(){return"<"}o(aA,"htmlPeek");Fg.peek=lA;function Fg(t,e,r,n){let i=Ys(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(Fg,"image");function lA(){return"!"}o(lA,"imagePeek");Ag.peek=cA;function Ag(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(Ag,"imageReference");function cA(){return"!"}o(cA,"imageReferencePeek");$g.peek=uA;function $g(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($g,"inlineCode");function uA(){return"`"}o(uA,"inlineCodePeek");function Bg(t,e){let r=bo(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(Bg,"formatLinkAsAutolink");jg.peek=fA;function jg(t,e,r,n){let i=Ys(r),s=i==='"'?"Quote":"Apostrophe",a=r.createTracker(n),l,c;if(Bg(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(jg,"link");function fA(t,e,r){return Bg(t,r)?"<":"["}o(fA,"linkPeek");Ug.peek=pA;function Ug(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(Ug,"linkReference");function pA(){return"["}o(pA,"linkReferencePeek");function Ks(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(Ks,"checkBullet");function xE(t){let e=Ks(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(xE,"checkBulletOther");function bE(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(bE,"checkBulletOrdered");function dh(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(dh,"checkRule");function wE(t,e,r,n){let i=r.enter("list"),s=r.bulletCurrent,a=t.ordered?bE(r):Ks(r),l=t.ordered?a==="."?")":".":xE(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),dh(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(wE,"list");function SE(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(SE,"checkListItemIndent");function vE(t,e,r,n){let i=SE(r),s=r.bulletCurrent||Ks(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(vE,"listItem");function kE(t,e,r,n){let i=r.enter("paragraph"),s=r.enter("phrasing"),a=r.containerPhrasing(t,n);return s(),i(),a}o(kE,"paragraph");var zg=In(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function TE(t,e,r,n){return(t.children.some(function(a){return zg(a)})?r.containerPhrasing:r.containerFlow).call(r,t,n)}o(TE,"root");function EE(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(EE,"checkStrong");Hg.peek=hA;function Hg(t,e,r,n){let i=EE(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=Vs(n.before.charCodeAt(n.before.length-1),u,i);f.inside&&(c=nr(u)+c.slice(1));let p=c.charCodeAt(c.length-1),h=Vs(n.after.charCodeAt(0),p,i);h.inside&&(c=c.slice(0,-1)+nr(p));let m=a.move(i+i);return s(),r.attentionEncodeSurroundingInfo={after:h.outside,before:f.outside},l+c+m}o(Hg,"strong");function hA(t,e,r){return r.options.strong||"*"}o(hA,"strongPeek");function DE(t,e,r,n){return r.safe(t.value,n)}o(DE,"text");function CE(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(CE,"checkRuleRepetition");function OE(t,e,r){let n=(dh(r)+(r.options.ruleSpaces?" ":"")).repeat(CE(r));return r.options.ruleSpaces?n.slice(0,-1):n}o(OE,"thematicBreak");var wo={blockquote:lE,break:Lg,code:pE,definition:hE,emphasis:_g,hardBreak:Lg,heading:yE,html:Rg,image:Fg,imageReference:Ag,inlineCode:$g,link:jg,linkReference:Ug,list:wE,listItem:vE,paragraph:kE,root:TE,strong:Hg,text:DE,thematicBreak:OE};var IE=[mA];function mA(t,e,r,n){if(e.type==="code"&&Pl(e,n)&&(t.type==="list"||t.type===e.type&&Pl(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"&&mh(e,n))?void 0:r.spread?1:0}o(mA,"joinDefaults");var So=["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:`
43
- `,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:So},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r
44
- ]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:So},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r
45
- *])`},{character:"*",inConstruct:"phrasing",notInConstruct:So},{atBreak:!0,character:"+",after:`(?:[ \r
42
+ `,...s.current()});return/^[\t ]/.test(u)&&(u=nr(u.charCodeAt(0))+u.slice(1)),u=u?a+" "+u:a,r.options.closeAtx&&(u+=" "+a),c(),l(),u}o(xE,"heading");Fg.peek=lA;function Fg(t){return t.value||""}o(Fg,"html");function lA(){return"<"}o(lA,"htmlPeek");Ag.peek=cA;function Ag(t,e,r,n){let i=Vs(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(Ag,"image");function cA(){return"!"}o(cA,"imagePeek");$g.peek=uA;function $g(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($g,"imageReference");function uA(){return"!"}o(uA,"imageReferencePeek");Bg.peek=fA;function Bg(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(Bg,"inlineCode");function fA(){return"`"}o(fA,"inlineCodePeek");function jg(t,e){let r=wo(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(jg,"formatLinkAsAutolink");Ug.peek=pA;function Ug(t,e,r,n){let i=Vs(r),s=i==='"'?"Quote":"Apostrophe",a=r.createTracker(n),l,c;if(jg(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(Ug,"link");function pA(t,e,r){return jg(t,r)?"<":"["}o(pA,"linkPeek");zg.peek=hA;function zg(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(zg,"linkReference");function hA(){return"["}o(hA,"linkReferencePeek");function Gs(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(Gs,"checkBullet");function bE(t){let e=Gs(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(bE,"checkBulletOther");function wE(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(wE,"checkBulletOrdered");function gh(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(gh,"checkRule");function SE(t,e,r,n){let i=r.enter("list"),s=r.bulletCurrent,a=t.ordered?wE(r):Gs(r),l=t.ordered?a==="."?")":".":bE(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),gh(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(SE,"list");function vE(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(vE,"checkListItemIndent");function kE(t,e,r,n){let i=vE(r),s=r.bulletCurrent||Gs(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(kE,"listItem");function TE(t,e,r,n){let i=r.enter("paragraph"),s=r.enter("phrasing"),a=r.containerPhrasing(t,n);return s(),i(),a}o(TE,"paragraph");var Hg=Mn(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function EE(t,e,r,n){return(t.children.some(function(a){return Hg(a)})?r.containerPhrasing:r.containerFlow).call(r,t,n)}o(EE,"root");function DE(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(DE,"checkStrong");Wg.peek=mA;function Wg(t,e,r,n){let i=DE(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=Ks(n.before.charCodeAt(n.before.length-1),u,i);f.inside&&(c=nr(u)+c.slice(1));let p=c.charCodeAt(c.length-1),h=Ks(n.after.charCodeAt(0),p,i);h.inside&&(c=c.slice(0,-1)+nr(p));let m=a.move(i+i);return s(),r.attentionEncodeSurroundingInfo={after:h.outside,before:f.outside},l+c+m}o(Wg,"strong");function mA(t,e,r){return r.options.strong||"*"}o(mA,"strongPeek");function CE(t,e,r,n){return r.safe(t.value,n)}o(CE,"text");function OE(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(OE,"checkRuleRepetition");function IE(t,e,r){let n=(gh(r)+(r.options.ruleSpaces?" ":"")).repeat(OE(r));return r.options.ruleSpaces?n.slice(0,-1):n}o(IE,"thematicBreak");var So={blockquote:cE,break:_g,code:hE,definition:mE,emphasis:Rg,hardBreak:_g,heading:xE,html:Fg,image:Ag,imageReference:$g,inlineCode:Bg,link:Ug,linkReference:zg,list:SE,listItem:kE,paragraph:TE,root:EE,strong:Wg,text:CE,thematicBreak:IE};var ME=[dA];function dA(t,e,r,n){if(e.type==="code"&&Ll(e,n)&&(t.type==="list"||t.type===e.type&&Ll(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(dA,"joinDefaults");var vo=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],NE=[{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:`
43
+ `,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:vo},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r
44
+ ]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:vo},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r
45
+ *])`},{character:"*",inConstruct:"phrasing",notInConstruct:vo},{atBreak:!0,character:"+",after:`(?:[ \r
46
46
  ])`},{atBreak:!0,character:"-",after:`(?:[ \r
47
47
  -])`},{atBreak:!0,before:"\\d+",character:".",after:`(?:[ \r
48
- ]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:So},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:So},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:So},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:So},{atBreak:!0,character:"~"}];var NE=document.createElement("i");function xi(t){let e="&"+t+";";NE.innerHTML=e;let r=NE.textContent;return r.charCodeAt(r.length-1)===59&&t!=="semi"||r===e?!1:r}o(xi,"decodeNamedCharacterReference");function Gs(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(Gs,"decodeNumericCharacterReference");var dA=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function gh(t){return t.replace(dA,gA)}o(gh,"decodeString");function gA(t,e,r){if(e)return e;if(r.charCodeAt(0)===35){let i=r.charCodeAt(1),s=i===120||i===88;return Gs(r.slice(s?2:1),s?16:10)}return xi(r)||t}o(gA,"decode");function PE(t){return t.label||!t.identifier?t.label||"":gh(t.identifier)}o(PE,"association");function LE(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(LE,"compilePattern");function _E(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===`
49
- `)&&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=nr(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)+nr(l.charCodeAt(0))),m.after&&(c=p)),u.move(h),s.push(h),l=h.slice(-1)}return n.pop(),s.join("")}o(_E,"containerPhrasing");function RE(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:`
48
+ ]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:vo},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:vo},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:vo},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:vo},{atBreak:!0,character:"~"}];var PE=document.createElement("i");function bi(t){let e="&"+t+";";PE.innerHTML=e;let r=PE.textContent;return r.charCodeAt(r.length-1)===59&&t!=="semi"||r===e?!1:r}o(bi,"decodeNamedCharacterReference");function Qs(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(Qs,"decodeNumericCharacterReference");var gA=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function yh(t){return t.replace(gA,yA)}o(yh,"decodeString");function yA(t,e,r){if(e)return e;if(r.charCodeAt(0)===35){let i=r.charCodeAt(1),s=i===120||i===88;return Qs(r.slice(s?2:1),s?16:10)}return bi(r)||t}o(yA,"decode");function LE(t){return t.label||!t.identifier?t.label||"":yh(t.identifier)}o(LE,"association");function _E(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(_E,"compilePattern");function RE(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===`
49
+ `)&&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=nr(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)+nr(l.charCodeAt(0))),m.after&&(c=p)),u.move(h),s.push(h),l=h.slice(-1)}return n.pop(),s.join("")}o(RE,"containerPhrasing");function FE(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:`
50
50
  `,after:`
51
- `,...s.current()}))),c.type!=="list"&&(e.bulletLastUsed=void 0),l<i.length-1&&a.push(s.move(yA(c,i[l+1],t,e)))}return n.pop(),a.join("")}o(RE,"containerFlow");function yA(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`
51
+ `,...s.current()}))),c.type!=="list"&&(e.bulletLastUsed=void 0),l<i.length-1&&a.push(s.move(xA(c,i[l+1],t,e)))}return n.pop(),a.join("")}o(FE,"containerFlow");function xA(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`
52
52
  `.repeat(1+s);if(s===!1)return`
53
53
 
54
54
  <!---->
55
55
 
56
56
  `}return`
57
57
 
58
- `}o(yA,"between");var xA=/\r?\n|\r/g;function FE(t,e){let r=[],n=0,i=0,s;for(;s=xA.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(FE,"indentLines");function $E(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(!hh(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(bA);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(AE(n.slice(c,f),"\\")),c=f,/[!-/:-@[-`{-~]/.test(n.charAt(f))&&(!r.encode||!r.encode.includes(n.charAt(f)))?s.push("\\"):(s.push(nr(n.charCodeAt(f))),c++))}return s.push(AE(n.slice(c,u),r.after)),s.join("")}o($E,"safe");function bA(t,e){return t-e}o(bA,"numerical");function AE(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(AE,"escapeBackslashes");function BE(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(BE,"track");function Wg(t,e){let r=e||{},n={associationId:PE,containerPhrasing:kA,containerFlow:TA,createTracker:BE,compilePattern:LE,enter:s,handlers:{...wo},handle:void 0,indentLines:FE,indexStack:[],join:[...IE],options:{},safe:EA,stack:[],unsafe:[...ME]};Pg(n,r),n.options.tightDefinitions&&n.join.push(vA),n.handle=ah("type",{invalid:wA,unknown:SA,handlers:n.handlers});let i=n.handle(t,void 0,n,{before:`
58
+ `}o(xA,"between");var bA=/\r?\n|\r/g;function AE(t,e){let r=[],n=0,i=0,s;for(;s=bA.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(AE,"indentLines");function BE(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(!mh(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(wA);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($E(n.slice(c,f),"\\")),c=f,/[!-/:-@[-`{-~]/.test(n.charAt(f))&&(!r.encode||!r.encode.includes(n.charAt(f)))?s.push("\\"):(s.push(nr(n.charCodeAt(f))),c++))}return s.push($E(n.slice(c,u),r.after)),s.join("")}o(BE,"safe");function wA(t,e){return t-e}o(wA,"numerical");function $E(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($E,"escapeBackslashes");function jE(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(jE,"track");function qg(t,e){let r=e||{},n={associationId:LE,containerPhrasing:TA,containerFlow:EA,createTracker:jE,compilePattern:_E,enter:s,handlers:{...So},handle:void 0,indentLines:AE,indexStack:[],join:[...ME],options:{},safe:DA,stack:[],unsafe:[...NE]};Lg(n,r),n.options.tightDefinitions&&n.join.push(kA),n.handle=lh("type",{invalid:SA,unknown:vA,handlers:n.handlers});let i=n.handle(t,void 0,n,{before:`
59
59
  `,after:`
60
60
  `,now:{line:1,column:1},lineShift:0});return i&&i.charCodeAt(i.length-1)!==10&&i.charCodeAt(i.length-1)!==13&&(i+=`
61
- `),i;function s(a){return n.stack.push(a),l;function l(){n.stack.pop()}o(l,"exit")}o(s,"enter")}o(Wg,"toMarkdown");function wA(t){throw new Error("Cannot handle value `"+t+"`, expected node")}o(wA,"invalid");function SA(t){let e=t;throw new Error("Cannot handle unknown node `"+e.type+"`")}o(SA,"unknown");function vA(t,e){if(t.type==="definition"&&t.type===e.type)return 0}o(vA,"joinDefinition");function kA(t,e){return _E(t,this,e)}o(kA,"containerPhrasingBound");function TA(t,e){return RE(t,this,e)}o(TA,"containerFlowBound");function EA(t,e){return $E(this,t,e)}o(EA,"safeBound");function Qs(t){let e=this;e.compiler=r;function r(n){return Wg(n,{...e.data("settings"),...t,extensions:e.data("toMarkdownExtensions")||[]})}o(r,"compiler")}o(Qs,"remarkStringify");function DA(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(DA,"extend");function qg(t,e){return Array(e+1).join(t)}o(qg,"repeat");function jE(t){return t.replace(/^\n*/,"")}o(jE,"trimLeadingNewlines");function UE(t){for(var e=t.length;e>0&&t[e-1]===`
62
- `;)e--;return t.substring(0,e)}o(UE,"trimTrailingNewlines");function zE(t){return UE(jE(t))}o(zE,"trimNewlines");var CA=["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 Yg(t){return Vg(t,CA)}o(Yg,"isBlock");var HE=["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"];function WE(t){return Vg(t,HE)}o(WE,"isVoid");function OA(t){return YE(t,HE)}o(OA,"hasVoid");var qE=["A","TABLE","THEAD","TBODY","TFOOT","TH","TD","IFRAME","SCRIPT","AUDIO","VIDEO"];function IA(t){return Vg(t,qE)}o(IA,"isMeaningfulWhenBlank");function MA(t){return YE(t,qE)}o(MA,"hasMeaningfulWhenBlank");function Vg(t,e){return e.indexOf(t.nodeName)>=0}o(Vg,"is");function YE(t,e){return t.getElementsByTagName&&e.some(function(r){return t.getElementsByTagName(r).length})}o(YE,"has");var NA=[[/\\/g,"\\\\"],[/\*/g,"\\*"],[/^-/g,"\\-"],[/^\+ /g,"\\+ "],[/^(=+)/g,"\\$1"],[/^(#{1,6}) /g,"\\$1 "],[/`/g,"\\`"],[/^~~~/g,"\\~~~"],[/\[/g,"\\["],[/\]/g,"\\]"],[/^>/g,"\\>"],[/_/g,"\\_"],[/^(\d+)\. /g,"$1\\. "]];function VE(t){return NA.reduce(function(e,r){return e.replace(r[0],r[1])},t)}o(VE,"escapeMarkdown");var Et={};Et.paragraph={filter:"p",replacement:o(function(t){return`
61
+ `),i;function s(a){return n.stack.push(a),l;function l(){n.stack.pop()}o(l,"exit")}o(s,"enter")}o(qg,"toMarkdown");function SA(t){throw new Error("Cannot handle value `"+t+"`, expected node")}o(SA,"invalid");function vA(t){let e=t;throw new Error("Cannot handle unknown node `"+e.type+"`")}o(vA,"unknown");function kA(t,e){if(t.type==="definition"&&t.type===e.type)return 0}o(kA,"joinDefinition");function TA(t,e){return RE(t,this,e)}o(TA,"containerPhrasingBound");function EA(t,e){return FE(t,this,e)}o(EA,"containerFlowBound");function DA(t,e){return BE(this,t,e)}o(DA,"safeBound");function Js(t){let e=this;e.compiler=r;function r(n){return qg(n,{...e.data("settings"),...t,extensions:e.data("toMarkdownExtensions")||[]})}o(r,"compiler")}o(Js,"remarkStringify");function CA(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(CA,"extend");function Yg(t,e){return Array(e+1).join(t)}o(Yg,"repeat");function UE(t){return t.replace(/^\n*/,"")}o(UE,"trimLeadingNewlines");function zE(t){for(var e=t.length;e>0&&t[e-1]===`
62
+ `;)e--;return t.substring(0,e)}o(zE,"trimTrailingNewlines");function HE(t){return zE(UE(t))}o(HE,"trimNewlines");var OA=["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 Vg(t){return Kg(t,OA)}o(Vg,"isBlock");var WE=["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"];function qE(t){return Kg(t,WE)}o(qE,"isVoid");function IA(t){return VE(t,WE)}o(IA,"hasVoid");var YE=["A","TABLE","THEAD","TBODY","TFOOT","TH","TD","IFRAME","SCRIPT","AUDIO","VIDEO"];function MA(t){return Kg(t,YE)}o(MA,"isMeaningfulWhenBlank");function NA(t){return VE(t,YE)}o(NA,"hasMeaningfulWhenBlank");function Kg(t,e){return e.indexOf(t.nodeName)>=0}o(Kg,"is");function VE(t,e){return t.getElementsByTagName&&e.some(function(r){return t.getElementsByTagName(r).length})}o(VE,"has");var PA=[[/\\/g,"\\\\"],[/\*/g,"\\*"],[/^-/g,"\\-"],[/^\+ /g,"\\+ "],[/^(=+)/g,"\\$1"],[/^(#{1,6}) /g,"\\$1 "],[/`/g,"\\`"],[/^~~~/g,"\\~~~"],[/\[/g,"\\["],[/\]/g,"\\]"],[/^>/g,"\\>"],[/_/g,"\\_"],[/^(\d+)\. /g,"$1\\. "]];function KE(t){return PA.reduce(function(e,r){return e.replace(r[0],r[1])},t)}o(KE,"escapeMarkdown");var Et={};Et.paragraph={filter:"p",replacement:o(function(t){return`
63
63
 
64
64
  `+t+`
65
65
 
66
66
  `},"replacement")},Et.lineBreak={filter:"br",replacement:o(function(t,e,r){return r.br+`
67
- `},"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=qg(n===1?"=":"-",t.length);return`
67
+ `},"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=Yg(n===1?"=":"-",t.length);return`
68
68
 
69
69
  `+t+`
70
70
  `+i+`
71
71
 
72
72
  `}else return`
73
73
 
74
- `+qg("#",n)+" "+t+`
74
+ `+Yg("#",n)+" "+t+`
75
75
 
76
- `},"replacement")},Et.blockquote={filter:"blockquote",replacement:o(function(t){return t=zE(t).replace(/^/gm,"> "),`
76
+ `},"replacement")},Et.blockquote={filter:"blockquote",replacement:o(function(t){return t=HE(t).replace(/^/gm,"> "),`
77
77
 
78
78
  `+t+`
79
79
 
@@ -82,7 +82,7 @@ ${i}
82
82
 
83
83
  `+t+`
84
84
 
85
- `},"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=zE(t)+(l?`
85
+ `},"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=HE(t)+(l?`
86
86
  `:""),t=t.replace(/\n/gm,`
87
87
  `+" ".repeat(n.length)),n+t+(e.nextSibling?`
88
88
  `:"")},"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`
@@ -90,7 +90,7 @@ ${i}
90
90
  `+e.firstChild.textContent.replace(/\n/g,`
91
91
  `)+`
92
92
 
93
- `},"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=qg(a,l);return`
93
+ `},"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=Yg(a,l);return`
94
94
 
95
95
  `+f+i+`
96
96
  `+s.replace(/\n$/,"")+`
@@ -100,13 +100,13 @@ ${i}
100
100
 
101
101
  `+r.hr+`
102
102
 
103
- `},"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=Kg(e.getAttribute("href")),n=Gg(yh(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=Kg(e.getAttribute("href")),i=yh(e.getAttribute("title"));i&&(i=' "'+Gg(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=`
103
+ `},"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=Gg(e.getAttribute("href")),n=Qg(xh(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=Gg(e.getAttribute("href")),i=xh(e.getAttribute("title"));i&&(i=' "'+Qg(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=`
104
104
 
105
105
  `+this.references.join(`
106
106
  `)+`
107
107
 
108
- `,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=VE(yh(e.getAttribute("alt"))),n=Kg(e.getAttribute("src")||""),i=yh(e.getAttribute("title")),s=i?' "'+Gg(i)+'"':"";return n?"!["+r+"]("+n+s+")":""},"replacement")};function yh(t){return t?t.replace(/(\n+\s*)+/g,`
109
- `):""}o(yh,"cleanAttribute");function Kg(t){var e=t.replace(/([<>()])/g,"\\$1");return e.indexOf(" ")>=0?"<"+e+">":e}o(Kg,"escapeLinkDestination");function Gg(t){return t.replace(/"/g,'\\"')}o(Gg,"escapeLinkTitle");function KE(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(KE,"Rules"),KE.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=Qg(this.array,t,this.options))||(e=Qg(this._keep,t,this.options))||(e=Qg(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 Qg(t,e,r){for(var n=0;n<t.length;n++){var i=t[n];if(PA(i,e,r))return i}}o(Qg,"findRule");function PA(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(PA,"filterValue");function LA(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=GE(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=Jg(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=Jg(c);continue}var f=GE(l,c,i);l=c,c=f}s&&(s.data=s.data.replace(/ $/,""),s.data||Jg(s))}}o(LA,"collapseWhitespace");function Jg(t){var e=t.nextSibling||t.parentNode;return t.parentNode.removeChild(t),e}o(Jg,"remove");function GE(t,e,r){return t&&t.parentNode===e||r(e)?e.nextSibling||e.parentNode:e.firstChild||e.nextSibling||e.parentNode}o(GE,"next");var Xg=typeof window<"u"?window:{};function _A(){var t=Xg.DOMParser,e=!1;try{new t().parseFromString("","text/html")&&(e=!0)}catch{}return e}o(_A,"canParseHTMLNatively");function RA(){var t=o(function(){},"Parser");return FA()?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(RA,"createHTMLParser");function FA(){var t=!1;try{document.implementation.createHTMLDocument("").open()}catch{Xg.ActiveXObject&&(t=!0)}return t}o(FA,"shouldUseActiveX");var AA=_A()?Xg.DOMParser:RA();function $A(t,e){var r;if(typeof t=="string"){var n=BA().parseFromString('<x-turndown id="turndown-root">'+t+"</x-turndown>","text/html");r=n.getElementById("turndown-root")}else r=t.cloneNode(!0);return LA({element:r,isBlock:Yg,isVoid:WE,isPre:e.preformattedCode?jA:null}),r}o($A,"RootNode");var Zg;function BA(){return Zg=Zg||new AA,Zg}o(BA,"htmlParser");function jA(t){return t.nodeName==="PRE"||t.nodeName==="CODE"}o(jA,"isPreOrCode");function UA(t,e){return t.isBlock=Yg(t),t.isCode=t.nodeName==="CODE"||t.parentNode.isCode,t.isBlank=zA(t),t.flankingWhitespace=HA(t,e),t}o(UA,"Node");function zA(t){return!WE(t)&&!IA(t)&&/^\s*$/i.test(t.textContent)&&!OA(t)&&!MA(t)}o(zA,"isBlank");function HA(t,e){if(t.isBlock||e.preformattedCode&&t.isCode)return{leading:"",trailing:""};var r=WA(t.textContent);return r.leadingAscii&&QE("left",t,e)&&(r.leading=r.leadingNonAscii),r.trailingAscii&&QE("right",t,e)&&(r.trailing=r.trailingNonAscii),{leading:r.leading,trailing:r.trailing}}o(HA,"flankingWhitespace");function WA(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(WA,"edgeWhitespace");function QE(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&&!Yg(n)&&(s=i.test(n.textContent))),s}o(QE,"isFlankedByWhitespace");var qA=Array.prototype.reduce;function bi(t){if(!(this instanceof bi))return new bi(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?`
108
+ `,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=KE(xh(e.getAttribute("alt"))),n=Gg(e.getAttribute("src")||""),i=xh(e.getAttribute("title")),s=i?' "'+Qg(i)+'"':"";return n?"!["+r+"]("+n+s+")":""},"replacement")};function xh(t){return t?t.replace(/(\n+\s*)+/g,`
109
+ `):""}o(xh,"cleanAttribute");function Gg(t){var e=t.replace(/([<>()])/g,"\\$1");return e.indexOf(" ")>=0?"<"+e+">":e}o(Gg,"escapeLinkDestination");function Qg(t){return t.replace(/"/g,'\\"')}o(Qg,"escapeLinkTitle");function GE(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(GE,"Rules"),GE.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=Jg(this.array,t,this.options))||(e=Jg(this._keep,t,this.options))||(e=Jg(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 Jg(t,e,r){for(var n=0;n<t.length;n++){var i=t[n];if(LA(i,e,r))return i}}o(Jg,"findRule");function LA(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(LA,"filterValue");function _A(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=QE(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=Xg(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=Xg(c);continue}var f=QE(l,c,i);l=c,c=f}s&&(s.data=s.data.replace(/ $/,""),s.data||Xg(s))}}o(_A,"collapseWhitespace");function Xg(t){var e=t.nextSibling||t.parentNode;return t.parentNode.removeChild(t),e}o(Xg,"remove");function QE(t,e,r){return t&&t.parentNode===e||r(e)?e.nextSibling||e.parentNode:e.firstChild||e.nextSibling||e.parentNode}o(QE,"next");var Zg=typeof window<"u"?window:{};function RA(){var t=Zg.DOMParser,e=!1;try{new t().parseFromString("","text/html")&&(e=!0)}catch{}return e}o(RA,"canParseHTMLNatively");function FA(){var t=o(function(){},"Parser");return AA()?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(FA,"createHTMLParser");function AA(){var t=!1;try{document.implementation.createHTMLDocument("").open()}catch{Zg.ActiveXObject&&(t=!0)}return t}o(AA,"shouldUseActiveX");var $A=RA()?Zg.DOMParser:FA();function BA(t,e){var r;if(typeof t=="string"){var n=jA().parseFromString('<x-turndown id="turndown-root">'+t+"</x-turndown>","text/html");r=n.getElementById("turndown-root")}else r=t.cloneNode(!0);return _A({element:r,isBlock:Vg,isVoid:qE,isPre:e.preformattedCode?UA:null}),r}o(BA,"RootNode");var ey;function jA(){return ey=ey||new $A,ey}o(jA,"htmlParser");function UA(t){return t.nodeName==="PRE"||t.nodeName==="CODE"}o(UA,"isPreOrCode");function zA(t,e){return t.isBlock=Vg(t),t.isCode=t.nodeName==="CODE"||t.parentNode.isCode,t.isBlank=HA(t),t.flankingWhitespace=WA(t,e),t}o(zA,"Node");function HA(t){return!qE(t)&&!MA(t)&&/^\s*$/i.test(t.textContent)&&!IA(t)&&!NA(t)}o(HA,"isBlank");function WA(t,e){if(t.isBlock||e.preformattedCode&&t.isCode)return{leading:"",trailing:""};var r=qA(t.textContent);return r.leadingAscii&&JE("left",t,e)&&(r.leading=r.leadingNonAscii),r.trailingAscii&&JE("right",t,e)&&(r.trailing=r.trailingNonAscii),{leading:r.leading,trailing:r.trailing}}o(WA,"flankingWhitespace");function qA(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(qA,"edgeWhitespace");function JE(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&&!Vg(n)&&(s=i.test(n.textContent))),s}o(JE,"isFlankedByWhitespace");var YA=Array.prototype.reduce;function wi(t){if(!(this instanceof wi))return new wi(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?`
110
110
 
111
111
  `:""},"blankReplacement"),keepReplacement:o(function(r,n){return n.isBlock?`
112
112
 
@@ -116,57 +116,57 @@ ${i}
116
116
 
117
117
  `+r+`
118
118
 
119
- `:r},"defaultReplacement")};this.options=DA({},e,t),this.rules=new KE(this.options)}o(bi,"TurndownService"),bi.prototype={turndown:o(function(t){if(!KA(t))throw new TypeError(t+" is not a string, or an element/document/fragment node.");if(t==="")return"";var e=JE.call(this,new $A(t,this.options));return YA.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 VE(t)},"escape")};function JE(t){var e=this;return qA.call(t.childNodes,function(r,n){n=new UA(n,e.options);var i="";return n.nodeType===3?i=n.isCode?n.nodeValue:e.escape(n.nodeValue):n.nodeType===1&&(i=VA.call(e,n)),XE(r,i)},"")}o(JE,"process");function YA(t){var e=this;return this.rules.forEach(function(r){typeof r.append=="function"&&(t=XE(t,r.append(e.options)))}),t.replace(/^[\t\r\n]+/,"").replace(/[\t\r\n\s]+$/,"")}o(YA,"postProcess");function VA(t){var e=this.rules.forNode(t),r=JE.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(VA,"replacementForNode");function XE(t,e){var r=UE(t),n=jE(e),i=Math.max(t.length-r.length,e.length-n.length),s=`
119
+ `:r},"defaultReplacement")};this.options=CA({},e,t),this.rules=new GE(this.options)}o(wi,"TurndownService"),wi.prototype={turndown:o(function(t){if(!GA(t))throw new TypeError(t+" is not a string, or an element/document/fragment node.");if(t==="")return"";var e=XE.call(this,new BA(t,this.options));return VA.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 KE(t)},"escape")};function XE(t){var e=this;return YA.call(t.childNodes,function(r,n){n=new zA(n,e.options);var i="";return n.nodeType===3?i=n.isCode?n.nodeValue:e.escape(n.nodeValue):n.nodeType===1&&(i=KA.call(e,n)),ZE(r,i)},"")}o(XE,"process");function VA(t){var e=this;return this.rules.forEach(function(r){typeof r.append=="function"&&(t=ZE(t,r.append(e.options)))}),t.replace(/^[\t\r\n]+/,"").replace(/[\t\r\n\s]+$/,"")}o(VA,"postProcess");function KA(t){var e=this.rules.forNode(t),r=XE.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(KA,"replacementForNode");function ZE(t,e){var r=zE(t),n=UE(e),i=Math.max(t.length-r.length,e.length-n.length),s=`
120
120
 
121
- `.substring(0,i);return r+s+n}o(XE,"join");function KA(t){return t!=null&&(typeof t=="string"||t.nodeType&&(t.nodeType===1||t.nodeType===9||t.nodeType===11))}o(KA,"canConvert");var oy={};se(oy,{gfm:()=>tD,highlightedCodeBlock:()=>ty,strikethrough:()=>ry,tables:()=>ny,taskListItems:()=>iy});var ZE=/highlight-(?:text|source)-([a-z0-9]+)/;function ty(t){t.addRule("highlightedCodeBlock",{filter:o(function(e){var r=e.firstChild;return e.nodeName==="DIV"&&ZE.test(e.className)&&r&&r.nodeName==="PRE"},"filter"),replacement:o(function(e,r,n){var i=r.className||"",s=(i.match(ZE)||[null,""])[1];return`
121
+ `.substring(0,i);return r+s+n}o(ZE,"join");function GA(t){return t!=null&&(typeof t=="string"||t.nodeType&&(t.nodeType===1||t.nodeType===9||t.nodeType===11))}o(GA,"canConvert");var sy={};se(sy,{gfm:()=>rD,highlightedCodeBlock:()=>ry,strikethrough:()=>ny,tables:()=>iy,taskListItems:()=>oy});var eD=/highlight-(?:text|source)-([a-z0-9]+)/;function ry(t){t.addRule("highlightedCodeBlock",{filter:o(function(e){var r=e.firstChild;return e.nodeName==="DIV"&&eD.test(e.className)&&r&&r.nodeName==="PRE"},"filter"),replacement:o(function(e,r,n){var i=r.className||"",s=(i.match(eD)||[null,""])[1];return`
122
122
 
123
123
  `+n.fence+s+`
124
124
  `+r.firstChild.textContent+`
125
125
  `+n.fence+`
126
126
 
127
- `},"replacement")})}o(ty,"highlightedCodeBlock");function ry(t){t.addRule("strikethrough",{filter:["del","s","strike"],replacement:o(function(e){return"~"+e+"~"},"replacement")})}o(ry,"strikethrough");var GA=Array.prototype.indexOf,QA=Array.prototype.every,Js={};Js.tableCell={filter:["th","td"],replacement:o(function(t,e){return eD(t,e)},"replacement")},Js.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+=eD(s,e.childNodes[i])}return`
127
+ `},"replacement")})}o(ry,"highlightedCodeBlock");function ny(t){t.addRule("strikethrough",{filter:["del","s","strike"],replacement:o(function(e){return"~"+e+"~"},"replacement")})}o(ny,"strikethrough");var QA=Array.prototype.indexOf,JA=Array.prototype.every,Xs={};Xs.tableCell={filter:["th","td"],replacement:o(function(t,e){return tD(t,e)},"replacement")},Xs.tableRow={filter:"tr",replacement:o(function(t,e){var r="",n={left:":--",right:"--:",center:":-:"};if(ty(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+=tD(s,e.childNodes[i])}return`
128
128
  `+t+(r?`
129
- `+r:"")},"replacement")},Js.table={filter:o(function(t){return t.nodeName==="TABLE"&&ey(t.rows[0])},"filter"),replacement:o(function(t){return t=t.replace(`
129
+ `+r:"")},"replacement")},Xs.table={filter:o(function(t){return t.nodeName==="TABLE"&&ty(t.rows[0])},"filter"),replacement:o(function(t){return t=t.replace(`
130
130
 
131
131
  `,`
132
132
  `),`
133
133
 
134
134
  `+t+`
135
135
 
136
- `},"replacement")},Js.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"||JA(e))&&QA.call(t.childNodes,function(r){return r.nodeName==="TH"})}o(ey,"isHeadingRow");function JA(t){var e=t.previousSibling;return t.nodeName==="TBODY"&&(!e||e.nodeName==="THEAD"&&/^\s*$/i.test(e.textContent))}o(JA,"isFirstTbody");function eD(t,e){var r=GA.call(e.parentNode.childNodes,e),n=" ";return r===0&&(n="| "),n+t+" |"}o(eD,"cell");function ny(t){t.keep(function(r){return r.nodeName==="TABLE"&&!ey(r.rows[0])});for(var e in Js)t.addRule(e,Js[e])}o(ny,"tables");function iy(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(iy,"taskListItems");function tD(t){t.use([ty,ry,ny,iy])}o(tD,"gfm");var sy=oy;var ga={};se(ga,{getYamlDocFromString:()=>L$,objectToYamlString:()=>P$,yamlStringToObject:()=>N$});var Mo={};se(Mo,{Alias:()=>xr,CST:()=>oc,Composer:()=>$n,Document:()=>vr,Lexer:()=>Ti,LineCounter:()=>Ei,Pair:()=>Ae,Parser:()=>jn,Scalar:()=>G,Schema:()=>Si,YAMLError:()=>vi,YAMLMap:()=>$e,YAMLParseError:()=>Pt,YAMLSeq:()=>rt,YAMLWarning:()=>ki,default:()=>I$,isAlias:()=>Ht,isCollection:()=>ve,isDocument:()=>Wt,isMap:()=>qt,isNode:()=>ye,isPair:()=>me,isScalar:()=>ae,isSeq:()=>Yt,parse:()=>Vh,parseAllDocuments:()=>Yh,parseDocument:()=>sc,stringify:()=>Kh,visit:()=>ir,visitAsync:()=>vo});var Wy={};se(Wy,{Alias:()=>xr,CST:()=>oc,Composer:()=>$n,Document:()=>vr,Lexer:()=>Ti,LineCounter:()=>Ei,Pair:()=>Ae,Parser:()=>jn,Scalar:()=>G,Schema:()=>Si,YAMLError:()=>vi,YAMLMap:()=>$e,YAMLParseError:()=>Pt,YAMLSeq:()=>rt,YAMLWarning:()=>ki,isAlias:()=>Ht,isCollection:()=>ve,isDocument:()=>Wt,isMap:()=>qt,isNode:()=>ye,isPair:()=>me,isScalar:()=>ae,isSeq:()=>Yt,parse:()=>Vh,parseAllDocuments:()=>Yh,parseDocument:()=>sc,stringify:()=>Kh,visit:()=>ir,visitAsync:()=>vo});var Ll=Symbol.for("yaml.alias"),_l=Symbol.for("yaml.document"),yr=Symbol.for("yaml.map"),xh=Symbol.for("yaml.pair"),zt=Symbol.for("yaml.scalar"),pn=Symbol.for("yaml.seq"),Dt=Symbol.for("yaml.node.type"),Ht=o(t=>!!t&&typeof t=="object"&&t[Dt]===Ll,"isAlias"),Wt=o(t=>!!t&&typeof t=="object"&&t[Dt]===_l,"isDocument"),qt=o(t=>!!t&&typeof t=="object"&&t[Dt]===yr,"isMap"),me=o(t=>!!t&&typeof t=="object"&&t[Dt]===xh,"isPair"),ae=o(t=>!!t&&typeof t=="object"&&t[Dt]===zt,"isScalar"),Yt=o(t=>!!t&&typeof t=="object"&&t[Dt]===pn,"isSeq");function ve(t){if(t&&typeof t=="object")switch(t[Dt]){case yr:case pn:return!0}return!1}o(ve,"isCollection");function ye(t){if(t&&typeof t=="object")switch(t[Dt]){case Ll:case yr:case zt:case pn:return!0}return!1}o(ye,"isNode");var Rl=o(t=>(ae(t)||ve(t))&&!!t.anchor,"hasAnchor");var Vt=Symbol("break visit"),nD=Symbol("skip children"),hn=Symbol("remove node");function ir(t,e){let r=iD(e);Wt(t)?Xs(null,t.contents,r,Object.freeze([t]))===hn&&(t.contents=null):Xs(null,t,r,Object.freeze([]))}o(ir,"visit"),ir.BREAK=Vt,ir.SKIP=nD,ir.REMOVE=hn;function Xs(t,e,r,n){let i=oD(t,e,r,n);if(ye(i)||me(i))return sD(t,n,i),Xs(t,i,r,n);if(typeof i!="symbol"){if(ve(e)){n=Object.freeze(n.concat(e));for(let s=0;s<e.items.length;++s){let a=Xs(s,e.items[s],r,n);if(typeof a=="number")s=a-1;else{if(a===Vt)return Vt;a===hn&&(e.items.splice(s,1),s-=1)}}}else if(me(e)){n=Object.freeze(n.concat(e));let s=Xs("key",e.key,r,n);if(s===Vt)return Vt;s===hn&&(e.key=null);let a=Xs("value",e.value,r,n);if(a===Vt)return Vt;a===hn&&(e.value=null)}}return i}o(Xs,"visit_");async function vo(t,e){let r=iD(e);Wt(t)?await Zs(null,t.contents,r,Object.freeze([t]))===hn&&(t.contents=null):await Zs(null,t,r,Object.freeze([]))}o(vo,"visitAsync"),vo.BREAK=Vt,vo.SKIP=nD,vo.REMOVE=hn;async function Zs(t,e,r,n){let i=await oD(t,e,r,n);if(ye(i)||me(i))return sD(t,n,i),Zs(t,i,r,n);if(typeof i!="symbol"){if(ve(e)){n=Object.freeze(n.concat(e));for(let s=0;s<e.items.length;++s){let a=await Zs(s,e.items[s],r,n);if(typeof a=="number")s=a-1;else{if(a===Vt)return Vt;a===hn&&(e.items.splice(s,1),s-=1)}}}else if(me(e)){n=Object.freeze(n.concat(e));let s=await Zs("key",e.key,r,n);if(s===Vt)return Vt;s===hn&&(e.key=null);let a=await Zs("value",e.value,r,n);if(a===Vt)return Vt;a===hn&&(e.value=null)}}return i}o(Zs,"visitAsync_");function iD(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(iD,"initVisitor");function oD(t,e,r,n){if(typeof r=="function")return r(t,e,n);if(qt(e))return r.Map?.(t,e,n);if(Yt(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(Ht(e))return r.Alias?.(t,e,n)}o(oD,"callVisitor");function sD(t,e,r){let n=e[e.length-1];if(ve(n))n.items[t]=r;else if(me(n))t==="key"?n.key=r:n.value=r;else if(Wt(n))n.contents=r;else{let i=Ht(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}o(sD,"replaceNode");var XA={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},ZA=o(t=>t.replace(/[!,[\]{}]/g,e=>XA[e]),"escapeTagName"),_r=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+ZA(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&&ye(e.contents)){let s={};ir(e.contents,(a,l)=>{ye(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(`
137
- `)}};_r.defaultYaml={explicit:!1,version:"1.2"},_r.defaultTags={"!!":"tag:yaml.org,2002:"};function Fl(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(Fl,"anchorIsValid");function bh(t){let e=new Set;return ir(t,{Value(r,n){n.anchor&&e.add(n.anchor)}}),e}o(bh,"anchorNames");function wh(t,e){for(let r=1;;++r){let n=`${t}${r}`;if(!e.has(n))return n}}o(wh,"findNewAnchor");function ay(t,e){let r=[],n=new Map,i=null;return{onAnchor:o(s=>{r.push(s),i??(i=bh(t));let a=wh(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)||ve(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(ay,"createNodeAnchors");function Ln(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=Ln(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=Ln(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=Ln(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=Ln(t,n,i,s);a===void 0?delete n[i]:a!==s&&(n[i]=a)}return t.call(e,r,n)}o(Ln,"applyReviver");function Qe(t,e,r){if(Array.isArray(t))return t.map((n,i)=>Qe(n,String(i),r));if(t&&typeof t.toJSON=="function"){if(!r||!Rl(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(Qe,"toJS");var _n=class{static{o(this,"NodeBase")}constructor(e){Object.defineProperty(this,Dt,{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(!Wt(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=Qe(this,"",a);if(typeof i=="function")for(let{count:c,res:u}of a.anchors.values())i(u,c);return typeof s=="function"?Ln(s,{"":l},"",l):l}};var xr=class extends _n{static{o(this,"Alias")}constructor(e){super(Ll),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=[],ir(e,{Node:o((s,a)=>{(Ht(a)||Rl(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||(Qe(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=Sh(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(Fl(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 Sh(t,e,r){if(Ht(e)){let n=e.resolve(t),i=r&&n&&r.get(n);return i?i.count*i.aliasCount:0}else if(ve(e)){let n=0;for(let i of e.items){let s=Sh(t,i,r);s>n&&(n=s)}return n}else if(me(e)){let n=Sh(t,e.key,r),i=Sh(t,e.value,r);return Math.max(n,i)}return 1}o(Sh,"getAliasCount");var Al=o(t=>!t||typeof t!="function"&&typeof t!="object","isScalarValue"),G=class extends _n{static{o(this,"Scalar")}constructor(e){super(zt),this.value=e}toJSON(e,r){return r?.keep?this.value:Qe(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 e$="tag:yaml.org,2002:";function t$(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(t$,"findTagObject");function mn(t,e,r){if(Wt(t)&&(t=t.contents),ye(t))return t;if(me(t)){let p=r.schema[yr].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 xr(c.anchor);c={anchor:null,node:null},l.set(t,c)}e?.startsWith("!!")&&(e=e$+e.slice(2));let u=t$(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[yr]:Symbol.iterator in Object(t)?a[pn]:a[yr]}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(mn,"createNode");function ea(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 mn(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(ea,"collectionFromPath");var To=o(t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done,"isEmptyPath"),ko=class extends _n{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=>ye(n)||me(n)?n.clone(e):n),this.range&&(r.range=this.range.slice()),r}addIn(e,r){if(To(e))this.add(r);else{let[n,...i]=e,s=this.get(n,!0);if(ve(s))s.addIn(i,r);else if(s===void 0&&this.schema)this.set(n,ea(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(ve(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:ve(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 ve(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(ve(s))s.setIn(i,r);else if(s===void 0&&this.schema)this.set(n,ea(this.schema,i,r));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}};var ly=o(t=>t.replace(/^(?!$)(?: $)?/gm,"#"),"stringifyComment");function or(t,e){return/^\n+$/.test(t)?t.substring(1):e?t.replace(/^(?! *$)/gm,e):t}o(or,"indentComment");var Rr=o((t,e,r)=>t.endsWith(`
136
+ `},"replacement")},Xs.tableSection={filter:["thead","tbody","tfoot"],replacement:o(function(t){return t},"replacement")};function ty(t){var e=t.parentNode;return e.nodeName==="THEAD"||e.firstChild===t&&(e.nodeName==="TABLE"||XA(e))&&JA.call(t.childNodes,function(r){return r.nodeName==="TH"})}o(ty,"isHeadingRow");function XA(t){var e=t.previousSibling;return t.nodeName==="TBODY"&&(!e||e.nodeName==="THEAD"&&/^\s*$/i.test(e.textContent))}o(XA,"isFirstTbody");function tD(t,e){var r=QA.call(e.parentNode.childNodes,e),n=" ";return r===0&&(n="| "),n+t+" |"}o(tD,"cell");function iy(t){t.keep(function(r){return r.nodeName==="TABLE"&&!ty(r.rows[0])});for(var e in Xs)t.addRule(e,Xs[e])}o(iy,"tables");function oy(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(oy,"taskListItems");function rD(t){t.use([ry,ny,iy,oy])}o(rD,"gfm");var ay=sy;var ya={};se(ya,{getYamlDocFromString:()=>_$,objectToYamlString:()=>L$,yamlStringToObject:()=>P$});var No={};se(No,{Alias:()=>xr,CST:()=>sc,Composer:()=>Bn,Document:()=>vr,Lexer:()=>Ei,LineCounter:()=>Di,Pair:()=>Ae,Parser:()=>Un,Scalar:()=>G,Schema:()=>vi,YAMLError:()=>ki,YAMLMap:()=>$e,YAMLParseError:()=>Pt,YAMLSeq:()=>rt,YAMLWarning:()=>Ti,default:()=>M$,isAlias:()=>Ht,isCollection:()=>ve,isDocument:()=>Wt,isMap:()=>qt,isNode:()=>ye,isPair:()=>me,isScalar:()=>ae,isSeq:()=>Yt,parse:()=>Kh,parseAllDocuments:()=>Vh,parseDocument:()=>ac,stringify:()=>Gh,visit:()=>ir,visitAsync:()=>ko});var qy={};se(qy,{Alias:()=>xr,CST:()=>sc,Composer:()=>Bn,Document:()=>vr,Lexer:()=>Ei,LineCounter:()=>Di,Pair:()=>Ae,Parser:()=>Un,Scalar:()=>G,Schema:()=>vi,YAMLError:()=>ki,YAMLMap:()=>$e,YAMLParseError:()=>Pt,YAMLSeq:()=>rt,YAMLWarning:()=>Ti,isAlias:()=>Ht,isCollection:()=>ve,isDocument:()=>Wt,isMap:()=>qt,isNode:()=>ye,isPair:()=>me,isScalar:()=>ae,isSeq:()=>Yt,parse:()=>Kh,parseAllDocuments:()=>Vh,parseDocument:()=>ac,stringify:()=>Gh,visit:()=>ir,visitAsync:()=>ko});var _l=Symbol.for("yaml.alias"),Rl=Symbol.for("yaml.document"),yr=Symbol.for("yaml.map"),bh=Symbol.for("yaml.pair"),zt=Symbol.for("yaml.scalar"),pn=Symbol.for("yaml.seq"),Dt=Symbol.for("yaml.node.type"),Ht=o(t=>!!t&&typeof t=="object"&&t[Dt]===_l,"isAlias"),Wt=o(t=>!!t&&typeof t=="object"&&t[Dt]===Rl,"isDocument"),qt=o(t=>!!t&&typeof t=="object"&&t[Dt]===yr,"isMap"),me=o(t=>!!t&&typeof t=="object"&&t[Dt]===bh,"isPair"),ae=o(t=>!!t&&typeof t=="object"&&t[Dt]===zt,"isScalar"),Yt=o(t=>!!t&&typeof t=="object"&&t[Dt]===pn,"isSeq");function ve(t){if(t&&typeof t=="object")switch(t[Dt]){case yr:case pn:return!0}return!1}o(ve,"isCollection");function ye(t){if(t&&typeof t=="object")switch(t[Dt]){case _l:case yr:case zt:case pn:return!0}return!1}o(ye,"isNode");var Fl=o(t=>(ae(t)||ve(t))&&!!t.anchor,"hasAnchor");var Vt=Symbol("break visit"),iD=Symbol("skip children"),hn=Symbol("remove node");function ir(t,e){let r=oD(e);Wt(t)?Zs(null,t.contents,r,Object.freeze([t]))===hn&&(t.contents=null):Zs(null,t,r,Object.freeze([]))}o(ir,"visit"),ir.BREAK=Vt,ir.SKIP=iD,ir.REMOVE=hn;function Zs(t,e,r,n){let i=sD(t,e,r,n);if(ye(i)||me(i))return aD(t,n,i),Zs(t,i,r,n);if(typeof i!="symbol"){if(ve(e)){n=Object.freeze(n.concat(e));for(let s=0;s<e.items.length;++s){let a=Zs(s,e.items[s],r,n);if(typeof a=="number")s=a-1;else{if(a===Vt)return Vt;a===hn&&(e.items.splice(s,1),s-=1)}}}else if(me(e)){n=Object.freeze(n.concat(e));let s=Zs("key",e.key,r,n);if(s===Vt)return Vt;s===hn&&(e.key=null);let a=Zs("value",e.value,r,n);if(a===Vt)return Vt;a===hn&&(e.value=null)}}return i}o(Zs,"visit_");async function ko(t,e){let r=oD(e);Wt(t)?await ea(null,t.contents,r,Object.freeze([t]))===hn&&(t.contents=null):await ea(null,t,r,Object.freeze([]))}o(ko,"visitAsync"),ko.BREAK=Vt,ko.SKIP=iD,ko.REMOVE=hn;async function ea(t,e,r,n){let i=await sD(t,e,r,n);if(ye(i)||me(i))return aD(t,n,i),ea(t,i,r,n);if(typeof i!="symbol"){if(ve(e)){n=Object.freeze(n.concat(e));for(let s=0;s<e.items.length;++s){let a=await ea(s,e.items[s],r,n);if(typeof a=="number")s=a-1;else{if(a===Vt)return Vt;a===hn&&(e.items.splice(s,1),s-=1)}}}else if(me(e)){n=Object.freeze(n.concat(e));let s=await ea("key",e.key,r,n);if(s===Vt)return Vt;s===hn&&(e.key=null);let a=await ea("value",e.value,r,n);if(a===Vt)return Vt;a===hn&&(e.value=null)}}return i}o(ea,"visitAsync_");function oD(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(oD,"initVisitor");function sD(t,e,r,n){if(typeof r=="function")return r(t,e,n);if(qt(e))return r.Map?.(t,e,n);if(Yt(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(Ht(e))return r.Alias?.(t,e,n)}o(sD,"callVisitor");function aD(t,e,r){let n=e[e.length-1];if(ve(n))n.items[t]=r;else if(me(n))t==="key"?n.key=r:n.value=r;else if(Wt(n))n.contents=r;else{let i=Ht(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}o(aD,"replaceNode");var ZA={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},e$=o(t=>t.replace(/[!,[\]{}]/g,e=>ZA[e]),"escapeTagName"),_r=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+e$(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&&ye(e.contents)){let s={};ir(e.contents,(a,l)=>{ye(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(`
137
+ `)}};_r.defaultYaml={explicit:!1,version:"1.2"},_r.defaultTags={"!!":"tag:yaml.org,2002:"};function Al(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(Al,"anchorIsValid");function wh(t){let e=new Set;return ir(t,{Value(r,n){n.anchor&&e.add(n.anchor)}}),e}o(wh,"anchorNames");function Sh(t,e){for(let r=1;;++r){let n=`${t}${r}`;if(!e.has(n))return n}}o(Sh,"findNewAnchor");function ly(t,e){let r=[],n=new Map,i=null;return{onAnchor:o(s=>{r.push(s),i??(i=wh(t));let a=Sh(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)||ve(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(ly,"createNodeAnchors");function _n(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=_n(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=_n(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=_n(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=_n(t,n,i,s);a===void 0?delete n[i]:a!==s&&(n[i]=a)}return t.call(e,r,n)}o(_n,"applyReviver");function Qe(t,e,r){if(Array.isArray(t))return t.map((n,i)=>Qe(n,String(i),r));if(t&&typeof t.toJSON=="function"){if(!r||!Fl(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(Qe,"toJS");var Rn=class{static{o(this,"NodeBase")}constructor(e){Object.defineProperty(this,Dt,{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(!Wt(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=Qe(this,"",a);if(typeof i=="function")for(let{count:c,res:u}of a.anchors.values())i(u,c);return typeof s=="function"?_n(s,{"":l},"",l):l}};var xr=class extends Rn{static{o(this,"Alias")}constructor(e){super(_l),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=[],ir(e,{Node:o((s,a)=>{(Ht(a)||Fl(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||(Qe(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=vh(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(Al(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 vh(t,e,r){if(Ht(e)){let n=e.resolve(t),i=r&&n&&r.get(n);return i?i.count*i.aliasCount:0}else if(ve(e)){let n=0;for(let i of e.items){let s=vh(t,i,r);s>n&&(n=s)}return n}else if(me(e)){let n=vh(t,e.key,r),i=vh(t,e.value,r);return Math.max(n,i)}return 1}o(vh,"getAliasCount");var $l=o(t=>!t||typeof t!="function"&&typeof t!="object","isScalarValue"),G=class extends Rn{static{o(this,"Scalar")}constructor(e){super(zt),this.value=e}toJSON(e,r){return r?.keep?this.value:Qe(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 t$="tag:yaml.org,2002:";function r$(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(r$,"findTagObject");function mn(t,e,r){if(Wt(t)&&(t=t.contents),ye(t))return t;if(me(t)){let p=r.schema[yr].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 xr(c.anchor);c={anchor:null,node:null},l.set(t,c)}e?.startsWith("!!")&&(e=t$+e.slice(2));let u=r$(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[yr]:Symbol.iterator in Object(t)?a[pn]:a[yr]}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(mn,"createNode");function ta(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 mn(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(ta,"collectionFromPath");var Eo=o(t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done,"isEmptyPath"),To=class extends Rn{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=>ye(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(ve(s))s.addIn(i,r);else if(s===void 0&&this.schema)this.set(n,ta(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(ve(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:ve(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 ve(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(ve(s))s.setIn(i,r);else if(s===void 0&&this.schema)this.set(n,ta(this.schema,i,r));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}};var cy=o(t=>t.replace(/^(?!$)(?: $)?/gm,"#"),"stringifyComment");function or(t,e){return/^\n+$/.test(t)?t.substring(1):e?t.replace(/^(?! *$)/gm,e):t}o(or,"indentComment");var Rr=o((t,e,r)=>t.endsWith(`
138
138
  `)?or(r,e):r.includes(`
139
139
  `)?`
140
- `+or(r,e):(t.endsWith(" ")?"":" ")+r,"lineComment");var vh="flow",$l="block",ta="quoted";function ra(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===$l&&(g=aD(t,g,e.length),g!==-1&&(p=g+c));for(let E;E=t[g+=1];){if(r===ta&&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===`
141
- `)r===$l&&(g=aD(t,g,e.length)),p=g+e.length+c,h=void 0;else{if(E===" "&&m&&m!==" "&&m!==`
140
+ `+or(r,e):(t.endsWith(" ")?"":" ")+r,"lineComment");var kh="flow",Bl="block",ra="quoted";function na(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===Bl&&(g=lD(t,g,e.length),g!==-1&&(p=g+c));for(let E;E=t[g+=1];){if(r===ra&&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===`
141
+ `)r===Bl&&(g=lD(t,g,e.length)),p=g+e.length+c,h=void 0;else{if(E===" "&&m&&m!==" "&&m!==`
142
142
  `&&m!==" "){let L=t[g+1];L&&L!==" "&&L!==`
143
- `&&L!==" "&&(h=g)}if(g>=p)if(h)u.push(h),p=h+c,h=void 0;else if(r===ta){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=`
144
- ${e}${t.slice(0,P)}`:(r===ta&&f[L]&&(T+=`${t[L]}\\`),T+=`
145
- ${e}${t.slice(L+1,P)}`)}return T}o(ra,"foldFlowLines");function aD(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!==`
146
- `);n=e,i=e+1,s=t[i]}return n}o(aD,"consumeMoreIndentedLines");var kh=o((t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),"getFoldOptions"),Th=o(t=>/^(%|---|\.\.\.)/m.test(t),"containsDocumentMarker");function r$(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]===`
147
- `){if(s-a>n)return!0;if(a=s+1,i-a<=n)return!1}return!0}o(r$,"lineLengthOverLimit");function Bl(t,e){let r=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return r;let{implicitKey:n}=e,i=e.options.doubleQuotedMinMultiLineLength,s=e.indent||(Th(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)+`
143
+ `&&L!==" "&&(h=g)}if(g>=p)if(h)u.push(h),p=h+c,h=void 0;else if(r===ra){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=`
144
+ ${e}${t.slice(0,P)}`:(r===ra&&f[L]&&(T+=`${t[L]}\\`),T+=`
145
+ ${e}${t.slice(L+1,P)}`)}return T}o(na,"foldFlowLines");function lD(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!==`
146
+ `);n=e,i=e+1,s=t[i]}return n}o(lD,"consumeMoreIndentedLines");var Th=o((t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),"getFoldOptions"),Eh=o(t=>/^(%|---|\.\.\.)/m.test(t),"containsDocumentMarker");function n$(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]===`
147
+ `){if(s-a>n)return!0;if(a=s+1,i-a<=n)return!1}return!0}o(n$,"lineLengthOverLimit");function jl(t,e){let r=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return r;let{implicitKey:n}=e,i=e.options.doubleQuotedMinMultiLineLength,s=e.indent||(Eh(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)+`
148
148
 
149
149
  `;r[c+2]==="\\"&&r[c+3]==="n"&&r[c+4]!=='"';)a+=`
150
- `,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:ra(a,s,ta,kh(e,!1))}o(Bl,"doubleQuotedString");function cy(t,e){if(e.options.singleQuote===!1||e.implicitKey&&t.includes(`
151
- `)||/[ \t]\n|\n[ \t]/.test(t))return Bl(t,e);let r=e.indent||(Th(t)?" ":""),n="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
152
- ${r}`)+"'";return e.implicitKey?n:ra(n,r,vh,kh(e,!1))}o(cy,"singleQuotedString");function na(t,e){let{singleQuote:r}=e.options,n;if(r===!1)n=Bl;else{let i=t.includes('"'),s=t.includes("'");i&&!s?n=cy:s&&!i?n=Bl:n=r?cy:Bl}return n(t,e)}o(na,"quotedString");var uy;try{uy=new RegExp(`(^|(?<!
150
+ `,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:na(a,s,ra,Th(e,!1))}o(jl,"doubleQuotedString");function uy(t,e){if(e.options.singleQuote===!1||e.implicitKey&&t.includes(`
151
+ `)||/[ \t]\n|\n[ \t]/.test(t))return jl(t,e);let r=e.indent||(Eh(t)?" ":""),n="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
152
+ ${r}`)+"'";return e.implicitKey?n:na(n,r,kh,Th(e,!1))}o(uy,"singleQuotedString");function ia(t,e){let{singleQuote:r}=e.options,n;if(r===!1)n=jl;else{let i=t.includes('"'),s=t.includes("'");i&&!s?n=uy:s&&!i?n=jl:n=r?uy:jl}return n(t,e)}o(ia,"quotedString");var fy;try{fy=new RegExp(`(^|(?<!
153
153
  ))
154
154
  +(?!
155
- |$)`,"g")}catch{uy=/\n+(?!\n|$)/g}function Eh({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 na(r,n);let u=n.indent||(n.forceBlockIndent||Th(r)?" ":""),f=a==="literal"?!0:a==="folded"||e===G.BLOCK_FOLDED?!1:e===G.BLOCK_LITERAL?!0:!r$(r,c,u.length);if(!r)return f?`|
155
+ |$)`,"g")}catch{fy=/\n+(?!\n|$)/g}function Dh({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 ia(r,n);let u=n.indent||(n.forceBlockIndent||Eh(r)?" ":""),f=a==="literal"?!0:a==="folded"||e===G.BLOCK_FOLDED?!1:e===G.BLOCK_LITERAL?!0:!n$(r,c,u.length);if(!r)return f?`|
156
156
  `:`>
157
157
  `;let p,h;for(h=r.length;h>0;--h){let P=r[h-1];if(P!==`
158
158
  `&&P!==" "&&P!==" ")break}let m=r.substring(h),d=m.indexOf(`
159
159
  `);d===-1?p="-":r===m||d!==m.length-1?(p="+",s&&s()):p="",m&&(r=r.slice(0,-m.length),m[m.length-1]===`
160
- `&&(m=m.slice(0,-1)),m=m.replace(uy,`$&${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===`
160
+ `&&(m=m.slice(0,-1)),m=m.replace(fy,`$&${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===`
161
161
  `)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,`
162
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${u}`),D=!1,A=kh(n,!0);a!=="folded"&&e!==G.BLOCK_FOLDED&&(A.onOverflow=()=>{D=!0});let F=ra(`${T}${P}${m}`,u,$l,A);if(!D)return`>${L}
162
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${u}`),D=!1,A=Th(n,!0);a!=="folded"&&e!==G.BLOCK_FOLDED&&(A.onOverflow=()=>{D=!0});let F=na(`${T}${P}${m}`,u,Bl,A);if(!D)return`>${L}
163
163
  ${u}${F}`}return r=r.replace(/\n+/g,`$&${u}`),`|${L}
164
- ${u}${T}${r}${m}`}o(Eh,"blockString");function n$(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(`
165
- `)||f&&/[[\]{},]/.test(s))return na(s,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return l||f||!s.includes(`
166
- `)?na(s,e):Eh(t,e,r,n);if(!l&&!f&&i!==G.PLAIN&&s.includes(`
167
- `))return Eh(t,e,r,n);if(Th(s)){if(c==="")return e.forceBlockIndent=!0,Eh(t,e,r,n);if(l&&c===u)return na(s,e)}let p=s.replace(/\n+/g,`$&
168
- ${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 na(s,e)}return l?p:ra(p,c,vh,kh(e,!1))}o(n$,"plainString");function dn(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?na(a.value,e):Eh(a,e,r,n);case G.QUOTE_DOUBLE:return Bl(a.value,e);case G.QUOTE_SINGLE:return cy(a.value,e);case G.PLAIN:return n$(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(dn,"stringifyString");function jl(t,e){let r=Object.assign({blockQuote:!0,commentString:ly,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(jl,"createStringifyContext");function i$(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(i$,"getTagObject");function o$(t,e,{anchors:r,doc:n}){if(!n.directives)return"";let i=[],s=(ae(t)||ve(t))&&t.anchor;s&&Fl(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(o$,"stringifyProps");function gn(t,e,r,n){if(me(t))return t.toString(e,r,n);if(Ht(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=ye(t)?t:e.doc.createNode(t,{onTagObj:o(c=>i=c,"onTagObj")});i??(i=i$(e.doc.schema.tags,s));let a=o$(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)?dn(s,e,r,n):s.toString(e,r,n);return a?ae(s)||l[0]==="{"||l[0]==="["?`${a} ${l}`:`${a}
169
- ${e.indent}${l}`:l}o(gn,"stringify");function fy({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=ye(t)&&t.comment||null;if(p){if(h)throw new Error("With simple keys, key nodes cannot have comments");if(ve(t)||!ye(t)&&typeof t=="object"){let A="With simple keys, collection cannot be used as a key value";throw new Error(A)}}let m=!p&&(!t||h&&e==null&&!r.inFlow||ve(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=gn(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+=Rr(y,r.indent,u(h)):g&&i&&i(),y;d&&(h=null),m?(h&&(y+=Rr(y,r.indent,u(h))),y=`? ${y}
164
+ ${u}${T}${r}${m}`}o(Dh,"blockString");function i$(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(`
165
+ `)||f&&/[[\]{},]/.test(s))return ia(s,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return l||f||!s.includes(`
166
+ `)?ia(s,e):Dh(t,e,r,n);if(!l&&!f&&i!==G.PLAIN&&s.includes(`
167
+ `))return Dh(t,e,r,n);if(Eh(s)){if(c==="")return e.forceBlockIndent=!0,Dh(t,e,r,n);if(l&&c===u)return ia(s,e)}let p=s.replace(/\n+/g,`$&
168
+ ${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 ia(s,e)}return l?p:na(p,c,kh,Th(e,!1))}o(i$,"plainString");function dn(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?ia(a.value,e):Dh(a,e,r,n);case G.QUOTE_DOUBLE:return jl(a.value,e);case G.QUOTE_SINGLE:return uy(a.value,e);case G.PLAIN:return i$(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(dn,"stringifyString");function Ul(t,e){let r=Object.assign({blockQuote:!0,commentString:cy,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(Ul,"createStringifyContext");function o$(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(o$,"getTagObject");function s$(t,e,{anchors:r,doc:n}){if(!n.directives)return"";let i=[],s=(ae(t)||ve(t))&&t.anchor;s&&Al(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(s$,"stringifyProps");function gn(t,e,r,n){if(me(t))return t.toString(e,r,n);if(Ht(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=ye(t)?t:e.doc.createNode(t,{onTagObj:o(c=>i=c,"onTagObj")});i??(i=o$(e.doc.schema.tags,s));let a=s$(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)?dn(s,e,r,n):s.toString(e,r,n);return a?ae(s)||l[0]==="{"||l[0]==="["?`${a} ${l}`:`${a}
169
+ ${e.indent}${l}`:l}o(gn,"stringify");function py({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=ye(t)&&t.comment||null;if(p){if(h)throw new Error("With simple keys, key nodes cannot have comments");if(ve(t)||!ye(t)&&typeof t=="object"){let A="With simple keys, collection cannot be used as a key value";throw new Error(A)}}let m=!p&&(!t||h&&e==null&&!r.inFlow||ve(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=gn(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+=Rr(y,r.indent,u(h)):g&&i&&i(),y;d&&(h=null),m?(h&&(y+=Rr(y,r.indent,u(h))),y=`? ${y}
170
170
  ${l}:`):(y=`${y}:`,h&&(y+=Rr(y,r.indent,u(h))));let x,T,E;ye(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&&Yt(e)&&!e.flow&&!e.tag&&!e.anchor&&(r.indent=r.indent.substring(2));let L=!1,P=gn(e,r,()=>L=!0,()=>g=!0),D=" ";if(h||x||T){if(D=x?`
171
171
  `:"",T){let A=u(T);D+=`
172
172
  ${or(A,r.indent)}`}P===""&&!r.inFlow?D===`
@@ -176,32 +176,32 @@ ${or(A,r.indent)}`}P===""&&!r.inFlow?D===`
176
176
  ${r.indent}`}else if(!m&&ve(e)){let A=P[0],F=P.indexOf(`
177
177
  `),z=F!==-1,C=r.inFlow??e.flow??e.items.length===0;if(z||!C){let le=!1;if(z&&(A==="&"||A==="!")){let j=P.indexOf(" ");A==="&"&&j!==-1&&j<F&&P[j+1]==="!"&&(j=P.indexOf(" ",j+1)),(j===-1||F<j)&&(le=!0)}le||(D=`
178
178
  ${r.indent}`)}}else(P===""||P[0]===`
179
- `)&&(D="");return y+=D+P,r.inFlow?L&&n&&n():E&&!L?y+=Rr(y,r.indent,u(E)):g&&i&&i(),y}o(fy,"stringifyPair");function s$(t,...e){t==="debug"&&console.log(...e)}o(s$,"debug");function Ul(t,e){(t==="debug"||t==="warn")&&console.warn(e)}o(Ul,"warn");var Dh="<<",br={identify:o(t=>t===Dh||typeof t=="symbol"&&t.description===Dh,"identify"),default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:o(()=>Object.assign(new G(Symbol(Dh)),{addToJSMap:Ch}),"resolve"),stringify:o(()=>Dh,"stringify")},hy=o((t,e)=>(br.identify(e)||ae(e)&&(!e.type||e.type===G.PLAIN)&&br.identify(e.value))&&t?.doc.schema.tags.some(r=>r.tag===br.tag&&r.default),"isMergeKey");function Ch(t,e,r){let n=lD(t,r);if(Yt(n))for(let i of n.items)py(t,e,i);else if(Array.isArray(n))for(let i of n)py(t,e,i);else py(t,e,n)}o(Ch,"addMergeToJSMap");function py(t,e,r){let n=lD(t,r);if(!qt(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(py,"mergeValue");function lD(t,e){return t&&Ht(e)?e.resolve(t.doc,t):e}o(lD,"resolveAliasValue");function zl(t,e,{key:r,value:n}){if(ye(r)&&r.addToJSMap)r.addToJSMap(t,e,n);else if(hy(t,r))Ch(t,e,n);else{let i=Qe(r,"",t);if(e instanceof Map)e.set(i,Qe(n,i,t));else if(e instanceof Set)e.add(i);else{let s=a$(r,i,t),a=Qe(n,s,t);s in e?Object.defineProperty(e,s,{value:a,writable:!0,enumerable:!0,configurable:!0}):e[s]=a}}return e}o(zl,"addPairToJSMap");function a$(t,e,r){if(e===null)return"";if(typeof e!="object")return String(e);if(ye(t)&&r?.doc){let n=jl(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)+'..."'),Ul(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(a$,"stringifyKey");function Eo(t,e,r){let n=mn(t,void 0,r),i=mn(e,void 0,r);return new Ae(n,i)}o(Eo,"createPair");var Ae=class t{static{o(this,"Pair")}constructor(e,r=null){Object.defineProperty(this,Dt,{value:xh}),this.key=e,this.value=r}clone(e){let{key:r,value:n}=this;return ye(r)&&(r=r.clone(e)),ye(n)&&(n=n.clone(e)),new t(r,n)}toJSON(e,r){let n=r?.mapAsMap?new Map:{};return zl(r,n,this)}toString(e,r,n){return e?.doc?fy(this,e,r,n):JSON.stringify(this)}};function Hl(t,e,r){return(e.inFlow??t.flow?c$:l$)(t,e,r)}o(Hl,"stringifyCollection");function l$({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(ye(g))!p&&g.spaceBefore&&h.push(""),Oh(r,h,g.commentBefore,p),g.comment&&(y=g.comment);else if(me(g)){let T=ye(g.key)?g.key:null;T&&(!p&&T.spaceBefore&&h.push(""),Oh(r,h,T.commentBefore,p))}p=!1;let x=gn(g,f,()=>y=null,()=>p=!0);y&&(x+=Rr(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?`
179
+ `)&&(D="");return y+=D+P,r.inFlow?L&&n&&n():E&&!L?y+=Rr(y,r.indent,u(E)):g&&i&&i(),y}o(py,"stringifyPair");function a$(t,...e){t==="debug"&&console.log(...e)}o(a$,"debug");function zl(t,e){(t==="debug"||t==="warn")&&console.warn(e)}o(zl,"warn");var Ch="<<",br={identify:o(t=>t===Ch||typeof t=="symbol"&&t.description===Ch,"identify"),default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:o(()=>Object.assign(new G(Symbol(Ch)),{addToJSMap:Oh}),"resolve"),stringify:o(()=>Ch,"stringify")},my=o((t,e)=>(br.identify(e)||ae(e)&&(!e.type||e.type===G.PLAIN)&&br.identify(e.value))&&t?.doc.schema.tags.some(r=>r.tag===br.tag&&r.default),"isMergeKey");function Oh(t,e,r){let n=cD(t,r);if(Yt(n))for(let i of n.items)hy(t,e,i);else if(Array.isArray(n))for(let i of n)hy(t,e,i);else hy(t,e,n)}o(Oh,"addMergeToJSMap");function hy(t,e,r){let n=cD(t,r);if(!qt(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(hy,"mergeValue");function cD(t,e){return t&&Ht(e)?e.resolve(t.doc,t):e}o(cD,"resolveAliasValue");function Hl(t,e,{key:r,value:n}){if(ye(r)&&r.addToJSMap)r.addToJSMap(t,e,n);else if(my(t,r))Oh(t,e,n);else{let i=Qe(r,"",t);if(e instanceof Map)e.set(i,Qe(n,i,t));else if(e instanceof Set)e.add(i);else{let s=l$(r,i,t),a=Qe(n,s,t);s in e?Object.defineProperty(e,s,{value:a,writable:!0,enumerable:!0,configurable:!0}):e[s]=a}}return e}o(Hl,"addPairToJSMap");function l$(t,e,r){if(e===null)return"";if(typeof e!="object")return String(e);if(ye(t)&&r?.doc){let n=Ul(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)+'..."'),zl(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(l$,"stringifyKey");function Do(t,e,r){let n=mn(t,void 0,r),i=mn(e,void 0,r);return new Ae(n,i)}o(Do,"createPair");var Ae=class t{static{o(this,"Pair")}constructor(e,r=null){Object.defineProperty(this,Dt,{value:bh}),this.key=e,this.value=r}clone(e){let{key:r,value:n}=this;return ye(r)&&(r=r.clone(e)),ye(n)&&(n=n.clone(e)),new t(r,n)}toJSON(e,r){let n=r?.mapAsMap?new Map:{};return Hl(r,n,this)}toString(e,r,n){return e?.doc?py(this,e,r,n):JSON.stringify(this)}};function Wl(t,e,r){return(e.inFlow??t.flow?u$:c$)(t,e,r)}o(Wl,"stringifyCollection");function c$({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(ye(g))!p&&g.spaceBefore&&h.push(""),Ih(r,h,g.commentBefore,p),g.comment&&(y=g.comment);else if(me(g)){let T=ye(g.key)?g.key:null;T&&(!p&&T.spaceBefore&&h.push(""),Ih(r,h,T.commentBefore,p))}p=!1;let x=gn(g,f,()=>y=null,()=>p=!0);y&&(x+=Rr(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?`
180
180
  ${c}${g}`:`
181
181
  `}}return t?(m+=`
182
- `+or(u(t),c),l&&l()):p&&a&&a(),m}o(l$,"stringifyBlockCollection");function c$({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(ye(g))g.spaceBefore&&p.push(""),Oh(e,p,g.commentBefore,!1),g.comment&&(y=g.comment);else if(me(g)){let T=ye(g.key)?g.key:null;T&&(T.spaceBefore&&p.push(""),Oh(e,p,T.commentBefore,!1),T.comment&&(u=!0));let E=ye(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=gn(g,c,()=>y=null);u||(u=p.length>f||x.includes(`
182
+ `+or(u(t),c),l&&l()):p&&a&&a(),m}o(c$,"stringifyBlockCollection");function u$({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(ye(g))g.spaceBefore&&p.push(""),Ih(e,p,g.commentBefore,!1),g.comment&&(y=g.comment);else if(me(g)){let T=ye(g.key)?g.key:null;T&&(T.spaceBefore&&p.push(""),Ih(e,p,T.commentBefore,!1),T.comment&&(u=!0));let E=ye(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=gn(g,c,()=>y=null);u||(u=p.length>f||x.includes(`
183
183
  `)),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+=Rr(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?`
184
184
  ${s}${i}${g}`:`
185
185
  `;return`${d}
186
- ${i}${m}`}else return`${h}${a}${p.join(" ")}${a}${m}`}o(c$,"stringifyFlowCollection");function Oh({indent:t,options:{commentString:e}},r,n,i){if(n&&i&&(n=n.replace(/^\n+/,"")),n){let s=or(e(n),t);r.push(s.trimStart())}}o(Oh,"addCommentBefore");function Rn(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(Rn,"findPair");var $e=class extends ko{static{o(this,"YAMLMap")}static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(yr,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 Ae(e,e?.value):n=new Ae(e.key,e.value);let i=Rn(this.items,n.key),s=this.schema?.sortMapEntries;if(i){if(!r)throw new Error(`Key ${n.key} already set`);ae(i.value)&&Al(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=Rn(this.items,e);return r?this.items.splice(this.items.indexOf(r),1).length>0:!1}get(e,r){let i=Rn(this.items,e)?.value;return(!r&&ae(i)?i.value:i)??void 0}has(e){return!!Rn(this.items,e)}set(e,r){this.add(new Ae(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)zl(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})),Hl(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:r})}};var wr={collection:"map",default:!0,nodeClass:$e,tag:"tag:yaml.org,2002:map",resolve(t,e){return qt(t)||e("Expected a mapping for this tag"),t},createNode:o((t,e,r)=>$e.from(t,e,r),"createNode")};var rt=class extends ko{static{o(this,"YAMLSeq")}static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(pn,e),this.items=[]}add(e){this.items.push(e)}delete(e){let r=Ih(e);return typeof r!="number"?!1:this.items.splice(r,1).length>0}get(e,r){let n=Ih(e);if(typeof n!="number")return;let i=this.items[n];return!r&&ae(i)?i.value:i}has(e){let r=Ih(e);return typeof r=="number"&&r<this.items.length}set(e,r){let n=Ih(e);if(typeof n!="number")throw new Error(`Expected a valid index, not ${e}.`);let i=this.items[n];ae(i)&&Al(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(Qe(s,String(i++),r));return n}toString(e,r,n){return e?Hl(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(mn(l,void 0,n))}}return s}};function Ih(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(Ih,"asItemIndex");var Sr={collection:"seq",default:!0,nodeClass:rt,tag:"tag:yaml.org,2002:seq",resolve(t,e){return Yt(t)||e("Expected a sequence for this tag"),t},createNode:o((t,e,r)=>rt.from(t,e,r),"createNode")};var Fn={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),dn(t,e,r,n)}};var wi={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"&&wi.test.test(t)?t:e.options.nullStr,"stringify")};var ia={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&&ia.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 ht({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(ht,"stringifyNumber");var Wl={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:ht},ql={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():ht(t)}},Yl={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:ht};var Mh=o(t=>typeof t=="bigint"||Number.isInteger(t),"intIdentify"),my=o((t,e,r,{intAsBigInt:n})=>n?BigInt(t):parseInt(t.substring(e),r),"intResolve");function cD(t,e,r){let{value:n}=t;return Mh(n)&&n>=0?r+n.toString(e):ht(t)}o(cD,"intStringify");var Vl={identify:o(t=>Mh(t)&&t>=0,"identify"),default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:o((t,e,r)=>my(t,2,8,r),"resolve"),stringify:o(t=>cD(t,8,"0o"),"stringify")},Kl={identify:Mh,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:o((t,e,r)=>my(t,0,10,r),"resolve"),stringify:ht},Gl={identify:o(t=>Mh(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)=>my(t,2,16,r),"resolve"),stringify:o(t=>cD(t,16,"0x"),"stringify")};var dy=[wr,Sr,Fn,wi,ia,Vl,Kl,Gl,Wl,ql,Yl];function uD(t){return typeof t=="bigint"||Number.isInteger(t)}o(uD,"intIdentify");var Nh=o(({value:t})=>JSON.stringify(t),"stringifyJSON"),u$=[{identify:o(t=>typeof t=="string","identify"),default:!0,tag:"tag:yaml.org,2002:str",resolve:o(t=>t,"resolve"),stringify:Nh},{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:Nh},{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:Nh},{identify:uD,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})=>uD(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:Nh}],f$={default:!0,tag:"",test:/^/,resolve(t,e){return e(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},gy=[wr,Sr].concat(u$,f$);var oa={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?`
187
- `:" ")}return dn({comment:t,type:e,value:l},n,i,s)}};function Ph(t,e){if(Yt(t))for(let r=0;r<t.items.length;++r){let n=t.items[r];if(!me(n)){if(qt(n)){n.items.length>1&&e("Each pair must have its own sequence indicator");let i=n.items[0]||new Ae(new G(null));if(n.commentBefore&&(i.key.commentBefore=i.key.commentBefore?`${n.commentBefore}
186
+ ${i}${m}`}else return`${h}${a}${p.join(" ")}${a}${m}`}o(u$,"stringifyFlowCollection");function Ih({indent:t,options:{commentString:e}},r,n,i){if(n&&i&&(n=n.replace(/^\n+/,"")),n){let s=or(e(n),t);r.push(s.trimStart())}}o(Ih,"addCommentBefore");function Fn(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(Fn,"findPair");var $e=class extends To{static{o(this,"YAMLMap")}static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(yr,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(Do(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 Ae(e,e?.value):n=new Ae(e.key,e.value);let i=Fn(this.items,n.key),s=this.schema?.sortMapEntries;if(i){if(!r)throw new Error(`Key ${n.key} already set`);ae(i.value)&&$l(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=Fn(this.items,e);return r?this.items.splice(this.items.indexOf(r),1).length>0:!1}get(e,r){let i=Fn(this.items,e)?.value;return(!r&&ae(i)?i.value:i)??void 0}has(e){return!!Fn(this.items,e)}set(e,r){this.add(new Ae(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)Hl(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 wr={collection:"map",default:!0,nodeClass:$e,tag:"tag:yaml.org,2002:map",resolve(t,e){return qt(t)||e("Expected a mapping for this tag"),t},createNode:o((t,e,r)=>$e.from(t,e,r),"createNode")};var rt=class extends To{static{o(this,"YAMLSeq")}static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(pn,e),this.items=[]}add(e){this.items.push(e)}delete(e){let r=Mh(e);return typeof r!="number"?!1:this.items.splice(r,1).length>0}get(e,r){let n=Mh(e);if(typeof n!="number")return;let i=this.items[n];return!r&&ae(i)?i.value:i}has(e){let r=Mh(e);return typeof r=="number"&&r<this.items.length}set(e,r){let n=Mh(e);if(typeof n!="number")throw new Error(`Expected a valid index, not ${e}.`);let i=this.items[n];ae(i)&&$l(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(Qe(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(mn(l,void 0,n))}}return s}};function Mh(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(Mh,"asItemIndex");var Sr={collection:"seq",default:!0,nodeClass:rt,tag:"tag:yaml.org,2002:seq",resolve(t,e){return Yt(t)||e("Expected a sequence for this tag"),t},createNode:o((t,e,r)=>rt.from(t,e,r),"createNode")};var An={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),dn(t,e,r,n)}};var Si={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"&&Si.test.test(t)?t:e.options.nullStr,"stringify")};var oa={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&&oa.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 ht({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(ht,"stringifyNumber");var ql={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:ht},Yl={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():ht(t)}},Vl={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:ht};var Nh=o(t=>typeof t=="bigint"||Number.isInteger(t),"intIdentify"),dy=o((t,e,r,{intAsBigInt:n})=>n?BigInt(t):parseInt(t.substring(e),r),"intResolve");function uD(t,e,r){let{value:n}=t;return Nh(n)&&n>=0?r+n.toString(e):ht(t)}o(uD,"intStringify");var Kl={identify:o(t=>Nh(t)&&t>=0,"identify"),default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:o((t,e,r)=>dy(t,2,8,r),"resolve"),stringify:o(t=>uD(t,8,"0o"),"stringify")},Gl={identify:Nh,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:o((t,e,r)=>dy(t,0,10,r),"resolve"),stringify:ht},Ql={identify:o(t=>Nh(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)=>dy(t,2,16,r),"resolve"),stringify:o(t=>uD(t,16,"0x"),"stringify")};var gy=[wr,Sr,An,Si,oa,Kl,Gl,Ql,ql,Yl,Vl];function fD(t){return typeof t=="bigint"||Number.isInteger(t)}o(fD,"intIdentify");var Ph=o(({value:t})=>JSON.stringify(t),"stringifyJSON"),f$=[{identify:o(t=>typeof t=="string","identify"),default:!0,tag:"tag:yaml.org,2002:str",resolve:o(t=>t,"resolve"),stringify:Ph},{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:Ph},{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:Ph},{identify:fD,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})=>fD(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:Ph}],p$={default:!0,tag:"",test:/^/,resolve(t,e){return e(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},yy=[wr,Sr].concat(f$,p$);var sa={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?`
187
+ `:" ")}return dn({comment:t,type:e,value:l},n,i,s)}};function Lh(t,e){if(Yt(t))for(let r=0;r<t.items.length;++r){let n=t.items[r];if(!me(n)){if(qt(n)){n.items.length>1&&e("Each pair must have its own sequence indicator");let i=n.items[0]||new Ae(new G(null));if(n.commentBefore&&(i.key.commentBefore=i.key.commentBefore?`${n.commentBefore}
188
188
  ${i.key.commentBefore}`:n.commentBefore),n.comment){let s=i.value??i.key;s.comment=s.comment?`${n.comment}
189
- ${s.comment}`:n.comment}n=i}t.items[r]=me(n)?n:new Ae(n)}}else e("Expected a sequence for this tag");return t}o(Ph,"resolvePairs");function Lh(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(Lh,"createPairs");var sa={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Ph,createNode:Lh};var Do=class t extends rt{static{o(this,"YAMLOMap")}constructor(){super(),this.add=$e.prototype.add.bind(this),this.delete=$e.prototype.delete.bind(this),this.get=$e.prototype.get.bind(this),this.has=$e.prototype.has.bind(this),this.set=$e.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=Qe(i.key,"",r),a=Qe(i.value,s,r)):s=Qe(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=Lh(e,r,n),s=new this;return s.items=i.items,s}};Do.tag="tag:yaml.org,2002:omap";var aa={collection:"seq",identify:o(t=>t instanceof Map,"identify"),nodeClass:Do,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){let r=Ph(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 Do,r)},createNode:o((t,e,r)=>Do.from(t,e,r),"createNode")};function fD({value:t,source:e},r){return e&&(t?_h:Rh).test.test(e)?e:t?r.options.trueStr:r.options.falseStr}o(fD,"boolStringify");var _h={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:fD},Rh={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:fD};var yy={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:ht},xy={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():ht(t)}},by={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:ht};var Ql=o(t=>typeof t=="bigint"||Number.isInteger(t),"intIdentify");function Fh(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(Fh,"intResolve");function wy(t,e,r){let{value:n}=t;if(Ql(n)){let i=n.toString(e);return n<0?"-"+r+i.substr(1):r+i}return ht(t)}o(wy,"intStringify");var Sy={identify:Ql,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:o((t,e,r)=>Fh(t,2,2,r),"resolve"),stringify:o(t=>wy(t,2,"0b"),"stringify")},vy={identify:Ql,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:o((t,e,r)=>Fh(t,1,8,r),"resolve"),stringify:o(t=>wy(t,8,"0"),"stringify")},ky={identify:Ql,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:o((t,e,r)=>Fh(t,0,10,r),"resolve"),stringify:ht},Ty={identify:Ql,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:o((t,e,r)=>Fh(t,2,16,r),"resolve"),stringify:o(t=>wy(t,16,"0x"),"stringify")};var Co=class t extends $e{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 Ae(e.key,null):r=new Ae(e,null),Rn(this.items,r.key)||this.items.push(r)}get(e,r){let n=Rn(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=Rn(this.items,e);n&&!r?this.items.splice(this.items.indexOf(n),1):!n&&r&&this.items.push(new Ae(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}};Co.tag="tag:yaml.org,2002:set";var la={collection:"map",identify:o(t=>t instanceof Set,"identify"),nodeClass:Co,default:!1,tag:"tag:yaml.org,2002:set",createNode:o((t,e,r)=>Co.from(t,e,r),"createNode"),resolve(t,e){if(qt(t)){if(t.hasAllNullValues(!0))return Object.assign(new Co,t);e("Set items must all have null values")}else e("Expected a mapping for this tag");return t}};function Ey(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(Ey,"parseSexagesimal");function pD(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 ht(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(pD,"stringifySexagesimal");var Jl={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})=>Ey(t,r),"resolve"),stringify:pD},Xl={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=>Ey(t,!1),"resolve"),stringify:pD},Oo={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(Oo.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=Ey(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 Ah=[wr,Sr,Fn,wi,_h,Rh,Sy,vy,ky,Ty,yy,xy,by,oa,br,aa,sa,la,Jl,Xl,Oo];var hD=new Map([["core",dy],["failsafe",[wr,Sr,Fn]],["json",gy],["yaml11",Ah],["yaml-1.1",Ah]]),mD={binary:oa,bool:ia,float:Yl,floatExp:ql,floatNaN:Wl,floatTime:Xl,int:Kl,intHex:Gl,intOct:Vl,intTime:Jl,map:wr,merge:br,null:wi,omap:aa,pairs:sa,seq:Sr,set:la,timestamp:Oo},Dy={"tag:yaml.org,2002:binary":oa,"tag:yaml.org,2002:merge":br,"tag:yaml.org,2002:omap":aa,"tag:yaml.org,2002:pairs":sa,"tag:yaml.org,2002:set":la,"tag:yaml.org,2002:timestamp":Oo};function Zl(t,e,r){let n=hD.get(e);if(n&&!t)return r&&!n.includes(br)?n.concat(br):n.slice();let i=n;if(!i)if(Array.isArray(t))i=[];else{let s=Array.from(hD.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(br)),i.reduce((s,a)=>{let l=typeof a=="string"?mD[a]:a;if(!l){let c=JSON.stringify(a),u=Object.keys(mD).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(Zl,"getTags");var p$=o((t,e)=>t.key<e.key?-1:t.key>e.key?1:0,"sortMapEntriesByKey"),Si=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)?Zl(e,"compat"):e?Zl(null,e):null,this.name=typeof s=="string"&&s||"core",this.knownTags=i?Dy:{},this.tags=Zl(r,this.name,n),this.toStringOptions=l??null,Object.defineProperty(this,yr,{value:wr}),Object.defineProperty(this,zt,{value:Fn}),Object.defineProperty(this,pn,{value:Sr}),this.sortMapEntries=typeof a=="function"?a:a===!0?p$:null}clone(){let e=Object.create(t.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};function Cy(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=jl(t,e),{commentString:s}=i.options;if(t.commentBefore){r.length!==1&&r.unshift("");let c=s(t.commentBefore);r.unshift(or(c,""))}let a=!1,l=null;if(t.contents){if(ye(t.contents)){if(t.contents.spaceBefore&&n&&r.push(""),t.contents.commentBefore){let f=s(t.contents.commentBefore);r.push(or(f,""))}i.forceBlockIndent=!!t.comment,l=t.contents.comment}let c=l?void 0:()=>a=!0,u=gn(t.contents,i,()=>l=null,c);l&&(u+=Rr(u,"",s(l))),(u[0]==="|"||u[0]===">")&&r[r.length-1]==="---"?r[r.length-1]=`--- ${u}`:r.push(u)}else r.push(gn(t.contents,i));if(t.directives?.docEnd)if(t.comment){let c=s(t.comment);c.includes(`
189
+ ${s.comment}`:n.comment}n=i}t.items[r]=me(n)?n:new Ae(n)}}else e("Expected a sequence for this tag");return t}o(Lh,"resolvePairs");function _h(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(Do(l,c,r))}return i}o(_h,"createPairs");var aa={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Lh,createNode:_h};var Co=class t extends rt{static{o(this,"YAMLOMap")}constructor(){super(),this.add=$e.prototype.add.bind(this),this.delete=$e.prototype.delete.bind(this),this.get=$e.prototype.get.bind(this),this.has=$e.prototype.has.bind(this),this.set=$e.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=Qe(i.key,"",r),a=Qe(i.value,s,r)):s=Qe(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=_h(e,r,n),s=new this;return s.items=i.items,s}};Co.tag="tag:yaml.org,2002:omap";var la={collection:"seq",identify:o(t=>t instanceof Map,"identify"),nodeClass:Co,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){let r=Lh(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 Co,r)},createNode:o((t,e,r)=>Co.from(t,e,r),"createNode")};function pD({value:t,source:e},r){return e&&(t?Rh:Fh).test.test(e)?e:t?r.options.trueStr:r.options.falseStr}o(pD,"boolStringify");var Rh={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:pD},Fh={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:pD};var xy={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:ht},by={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():ht(t)}},wy={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:ht};var Jl=o(t=>typeof t=="bigint"||Number.isInteger(t),"intIdentify");function Ah(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(Ah,"intResolve");function Sy(t,e,r){let{value:n}=t;if(Jl(n)){let i=n.toString(e);return n<0?"-"+r+i.substr(1):r+i}return ht(t)}o(Sy,"intStringify");var vy={identify:Jl,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:o((t,e,r)=>Ah(t,2,2,r),"resolve"),stringify:o(t=>Sy(t,2,"0b"),"stringify")},ky={identify:Jl,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:o((t,e,r)=>Ah(t,1,8,r),"resolve"),stringify:o(t=>Sy(t,8,"0"),"stringify")},Ty={identify:Jl,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:o((t,e,r)=>Ah(t,0,10,r),"resolve"),stringify:ht},Ey={identify:Jl,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:o((t,e,r)=>Ah(t,2,16,r),"resolve"),stringify:o(t=>Sy(t,16,"0x"),"stringify")};var Oo=class t extends $e{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 Ae(e.key,null):r=new Ae(e,null),Fn(this.items,r.key)||this.items.push(r)}get(e,r){let n=Fn(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=Fn(this.items,e);n&&!r?this.items.splice(this.items.indexOf(n),1):!n&&r&&this.items.push(new Ae(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(Do(a,null,n));return s}};Oo.tag="tag:yaml.org,2002:set";var ca={collection:"map",identify:o(t=>t instanceof Set,"identify"),nodeClass:Oo,default:!1,tag:"tag:yaml.org,2002:set",createNode:o((t,e,r)=>Oo.from(t,e,r),"createNode"),resolve(t,e){if(qt(t)){if(t.hasAllNullValues(!0))return Object.assign(new Oo,t);e("Set items must all have null values")}else e("Expected a mapping for this tag");return t}};function Dy(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(Dy,"parseSexagesimal");function hD(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 ht(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(hD,"stringifySexagesimal");var Xl={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})=>Dy(t,r),"resolve"),stringify:hD},Zl={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=>Dy(t,!1),"resolve"),stringify:hD},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=Dy(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 $h=[wr,Sr,An,Si,Rh,Fh,vy,ky,Ty,Ey,xy,by,wy,sa,br,la,aa,ca,Xl,Zl,Io];var mD=new Map([["core",gy],["failsafe",[wr,Sr,An]],["json",yy],["yaml11",$h],["yaml-1.1",$h]]),dD={binary:sa,bool:oa,float:Vl,floatExp:Yl,floatNaN:ql,floatTime:Zl,int:Gl,intHex:Ql,intOct:Kl,intTime:Xl,map:wr,merge:br,null:Si,omap:la,pairs:aa,seq:Sr,set:ca,timestamp:Io},Cy={"tag:yaml.org,2002:binary":sa,"tag:yaml.org,2002:merge":br,"tag:yaml.org,2002:omap":la,"tag:yaml.org,2002:pairs":aa,"tag:yaml.org,2002:set":ca,"tag:yaml.org,2002:timestamp":Io};function ec(t,e,r){let n=mD.get(e);if(n&&!t)return r&&!n.includes(br)?n.concat(br):n.slice();let i=n;if(!i)if(Array.isArray(t))i=[];else{let s=Array.from(mD.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(br)),i.reduce((s,a)=>{let l=typeof a=="string"?dD[a]:a;if(!l){let c=JSON.stringify(a),u=Object.keys(dD).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(ec,"getTags");var h$=o((t,e)=>t.key<e.key?-1:t.key>e.key?1:0,"sortMapEntriesByKey"),vi=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)?ec(e,"compat"):e?ec(null,e):null,this.name=typeof s=="string"&&s||"core",this.knownTags=i?Cy:{},this.tags=ec(r,this.name,n),this.toStringOptions=l??null,Object.defineProperty(this,yr,{value:wr}),Object.defineProperty(this,zt,{value:An}),Object.defineProperty(this,pn,{value:Sr}),this.sortMapEntries=typeof a=="function"?a:a===!0?h$:null}clone(){let e=Object.create(t.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};function Oy(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=Ul(t,e),{commentString:s}=i.options;if(t.commentBefore){r.length!==1&&r.unshift("");let c=s(t.commentBefore);r.unshift(or(c,""))}let a=!1,l=null;if(t.contents){if(ye(t.contents)){if(t.contents.spaceBefore&&n&&r.push(""),t.contents.commentBefore){let f=s(t.contents.commentBefore);r.push(or(f,""))}i.forceBlockIndent=!!t.comment,l=t.contents.comment}let c=l?void 0:()=>a=!0,u=gn(t.contents,i,()=>l=null,c);l&&(u+=Rr(u,"",s(l))),(u[0]==="|"||u[0]===">")&&r[r.length-1]==="---"?r[r.length-1]=`--- ${u}`:r.push(u)}else r.push(gn(t.contents,i));if(t.directives?.docEnd)if(t.comment){let c=s(t.comment);c.includes(`
190
190
  `)?(r.push("..."),r.push(or(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(or(s(c),"")))}return r.join(`
191
191
  `)+`
192
- `}o(Cy,"stringifyDocument");var vr=class t{static{o(this,"Document")}constructor(e,r,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Dt,{value:_l});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 _r({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,i,n)}clone(){let e=Object.create(t.prototype,{[Dt]:{value:_l}});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=ye(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){ca(this.contents)&&this.contents.add(e)}addIn(e,r){ca(this.contents)&&this.contents.addIn(e,r)}createAlias(e,r){if(!e.anchor){let n=bh(this);e.anchor=!r||n.has(r)?wh(r||"a",n):r}return new xr(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}=ay(this,a||"a"),d={aliasDuplicateObjects:s??!0,keepUndefined:c??!1,onAnchor:p,onTagObj:u,replacer:i,schema:this.schema,sourceObjects:m},g=mn(e,f,d);return l&&ve(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 Ae(i,s)}delete(e){return ca(this.contents)?this.contents.delete(e):!1}deleteIn(e){return To(e)?this.contents==null?!1:(this.contents=null,!0):ca(this.contents)?this.contents.deleteIn(e):!1}get(e,r){return ve(this.contents)?this.contents.get(e,r):void 0}getIn(e,r){return To(e)?!r&&ae(this.contents)?this.contents.value:this.contents:ve(this.contents)?this.contents.getIn(e,r):void 0}has(e){return ve(this.contents)?this.contents.has(e):!1}hasIn(e){return To(e)?this.contents!==void 0:ve(this.contents)?this.contents.hasIn(e):!1}set(e,r){this.contents==null?this.contents=ea(this.schema,[e],r):ca(this.contents)&&this.contents.set(e,r)}setIn(e,r){To(e)?this.contents=r:this.contents==null?this.contents=ea(this.schema,Array.from(e),r):ca(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 _r({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 _r({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 Si(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=Qe(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"?Ln(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 Cy(this,e)}};function ca(t){if(ve(t))return!0;throw new Error("Expected a YAML collection as document contents")}o(ca,"assertCollection");var vi=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}},Pt=class extends vi{static{o(this,"YAMLParseError")}constructor(e,r,n){super("YAMLParseError",e,r,n)}},ki=class extends vi{static{o(this,"YAMLWarning")}constructor(e,r,n){super("YAMLWarning",e,r,n)}},ua=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
192
+ `}o(Oy,"stringifyDocument");var vr=class t{static{o(this,"Document")}constructor(e,r,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Dt,{value:Rl});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 _r({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,i,n)}clone(){let e=Object.create(t.prototype,{[Dt]:{value:Rl}});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=ye(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){ua(this.contents)&&this.contents.add(e)}addIn(e,r){ua(this.contents)&&this.contents.addIn(e,r)}createAlias(e,r){if(!e.anchor){let n=wh(this);e.anchor=!r||n.has(r)?Sh(r||"a",n):r}return new xr(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}=ly(this,a||"a"),d={aliasDuplicateObjects:s??!0,keepUndefined:c??!1,onAnchor:p,onTagObj:u,replacer:i,schema:this.schema,sourceObjects:m},g=mn(e,f,d);return l&&ve(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 Ae(i,s)}delete(e){return ua(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Eo(e)?this.contents==null?!1:(this.contents=null,!0):ua(this.contents)?this.contents.deleteIn(e):!1}get(e,r){return ve(this.contents)?this.contents.get(e,r):void 0}getIn(e,r){return Eo(e)?!r&&ae(this.contents)?this.contents.value:this.contents:ve(this.contents)?this.contents.getIn(e,r):void 0}has(e){return ve(this.contents)?this.contents.has(e):!1}hasIn(e){return Eo(e)?this.contents!==void 0:ve(this.contents)?this.contents.hasIn(e):!1}set(e,r){this.contents==null?this.contents=ta(this.schema,[e],r):ua(this.contents)&&this.contents.set(e,r)}setIn(e,r){Eo(e)?this.contents=r:this.contents==null?this.contents=ta(this.schema,Array.from(e),r):ua(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 _r({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 _r({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 vi(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=Qe(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"?_n(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 Oy(this,e)}};function ua(t){if(ve(t))return!0;throw new Error("Expected a YAML collection as document contents")}o(ua,"assertCollection");var ki=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}},Pt=class extends ki{static{o(this,"YAMLParseError")}constructor(e,r,n){super("YAMLParseError",e,r,n)}},Ti=class extends ki{static{o(this,"YAMLWarning")}constructor(e,r,n){super("YAMLWarning",e,r,n)}},fa=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
193
193
  `),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+=`:
194
194
 
195
195
  ${a}
196
196
  ${u}
197
- `}},"prettifyError");function Fr(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 F of t)switch(d&&(F.type!=="space"&&F.type!=="newline"&&F.type!=="comma"&&s(F.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),d=!1),g&&(u&&F.type!=="comment"&&F.type!=="newline"&&s(g,"TAB_AS_INDENT","Tabs are not allowed as indentation"),g=null),F.type){case"space":!e&&(r!=="doc-start"||n?.type!=="flow-collection")&&F.source.includes(" ")&&(g=F),f=!0;break;case"comment":{f||s(F,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let z=F.source.substring(1)||" ";p?p+=h+z:p=z,h="",u=!1;break}case"newline":u?p?p+=F.source:(!L||r!=="seq-item-ind")&&(c=!0):h+=F.source,u=!0,m=!0,(y||x)&&(T=F),f=!0;break;case"anchor":y&&s(F,"MULTIPLE_ANCHORS","A node can have at most one anchor"),F.source.endsWith(":")&&s(F.offset+F.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),y=F,P??(P=F.offset),u=!1,f=!1,d=!0;break;case"tag":{x&&s(F,"MULTIPLE_TAGS","A node can have at most one tag"),x=F,P??(P=F.offset),u=!1,f=!1,d=!0;break}case r:(y||x)&&s(F,"BAD_PROP_ORDER",`Anchors and tags must be after the ${F.source} indicator`),L&&s(F,"UNEXPECTED_TOKEN",`Unexpected ${F.source} in ${e??"collection"}`),L=F,u=r==="seq-item-ind"||r==="explicit-key-ind",f=!1;break;case"comma":if(e){E&&s(F,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),E=F,u=!1,f=!1;break}default:s(F,"UNEXPECTED_TOKEN",`Unexpected ${F.type} token`),u=!1,f=!1}let D=t[t.length-1],A=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:A,start:P??A}}o(Fr,"resolveProps");function An(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(`
198
- `))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(An(e.key)||An(e.value))return!0}return!1;default:return!0}}o(An,"containsNewline");function fa(t,e,r){if(e?.type==="flow-collection"){let n=e.end[0];n.indent===t&&(n.source==="]"||n.source==="}")&&An(e)&&r(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}o(fa,"flowIndentCheck");function ec(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(ec,"mapIncludes");var dD="All mapping items must start at the same column";function Oy({composeNode:t,composeEmptyNode:e},r,n,i,s){let a=s?.nodeClass??$e,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=Fr(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",dD)),!g.anchor&&!g.tag&&!m){u=g.end,g.comment&&(l.comment?l.comment+=`
199
- `+g.comment:l.comment=g.comment);continue}(g.newlineAfterProp||An(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",dD);r.atKey=!0;let x=g.end,T=h?t(r,h,g,i):e(r,x,p,null,g,i);r.schema.compat&&fa(n.indent,h,i),r.atKey=!1,ec(r,l.items,T)&&i(x,"DUPLICATE_KEY","Map keys must be unique");let E=Fr(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&&fa(n.indent,d,i),c=L.range[2];let P=new Ae(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+=`
200
- `+E.comment:T.comment=E.comment);let L=new Ae(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(Oy,"resolveBlockMap");function Iy({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=Fr(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&&fa(n.indent,p,i),c=m.range[2],l.items.push(m)}return l.range=[n.offset,c,u??c],l}o(Iy,"resolveBlockSeq");function Ar(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(Ar,"resolveEnd");var My="Block collections are not allowed within flow collections",Ny=o(t=>t&&(t.type==="block-map"||t.type==="block-seq"),"isBlock");function Py({composeNode:t,composeEmptyNode:e},r,n,i,s){let a=n.start.source==="{",l=a?"flow map":"flow sequence",c=s?.nodeClass??(a?$e: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=Fr(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+=`
201
- `+D.comment:u.comment=D.comment),p=D.end;continue}!a&&r.options.strict&&An(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 A="";e:for(let F of T)switch(F.type){case"comma":case"space":break;case"comment":A=F.source.substring(1);break e;default:break e}if(A){let F=u.items[u.items.length-1];me(F)&&(F=F.value??F.key),F.comment?F.comment+=`
202
- `+A:F.comment=A,D.comment=D.comment.substring(A.length+1)}}if(!a&&!L&&!D.found){let A=P?t(r,P,D,i):e(r,D.end,L,null,D,i);u.items.push(A),p=A.range[2],Ny(P)&&i(A.range,"BLOCK_IN_FLOW",My)}else{r.atKey=!0;let A=D.end,F=E?t(r,E,D,i):e(r,A,T,null,D,i);Ny(E)&&i(F.range,"BLOCK_IN_FLOW",My),r.atKey=!1;let z=Fr(L??[],{flow:l,indicator:"map-value-ind",next:P,offset:F.range[2],onError:i,parentIndent:n.indent,startOnNewline:!1});if(z.found){if(!a&&!D.found&&r.options.strict){if(L)for(let j of L){if(j===z.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<z.found.offset-1024&&i(z.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(z.start,"MISSING_CHAR",`Missing , or : between ${l} items`));let C=P?t(r,P,z,i):z.found?e(r,z.end,L,null,z,i):null;C?Ny(P)&&i(C.range,"BLOCK_IN_FLOW",My):z.comment&&(F.comment?F.comment+=`
203
- `+z.comment:F.comment=z.comment);let le=new Ae(F,C);if(r.options.keepSourceTokens&&(le.srcToken=x),a){let j=u;ec(r,j.items,F)&&i(A,"DUPLICATE_KEY","Map keys must be unique"),j.items.push(le)}else{let j=new $e(r.schema);j.flow=!0,j.items.push(le);let N=(C??F).range;j.range=[F.range[0],N[1],N[2]],u.items.push(j)}p=C?C.range[2]:z.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=Ar(d,g,r.options.strict,i);y.comment&&(u.comment?u.comment+=`
204
- `+y.comment:u.comment=y.comment),u.range=[n.offset,g,y.offset]}else u.range=[n.offset,g,g];return u}o(Py,"resolveFlowCollection");function Ly(t,e,r,n,i,s){let a=r.type==="block-map"?Oy(t,e,r,n,s):r.type==="block-seq"?Iy(t,e,r,n,s):Py(t,e,r,n,s),l=a.constructor;return i==="!"||i===l.tagName?(a.tag=l.tagName,a):(i&&(a.tag=i),a)}o(Ly,"resolveCollection");function _y(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===$e.tagName&&l==="map"||a===rt.tagName&&l==="seq")return Ly(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),Ly(t,e,r,i,a)}let u=Ly(t,e,r,i,a,c),f=c.resolve?.(u,h=>i(s,"TAG_RESOLVE_FAILED",h),e.options)??u,p=ye(f)?f:new G(f);return p.range=u.range,p.tag=a,c?.format&&(p.format=c.format),p}o(_y,"composeCollection");function tc(t,e,r){let n=e.offset,i=h$(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?m$(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?`
197
+ `}},"prettifyError");function Fr(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 F of t)switch(d&&(F.type!=="space"&&F.type!=="newline"&&F.type!=="comma"&&s(F.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),d=!1),g&&(u&&F.type!=="comment"&&F.type!=="newline"&&s(g,"TAB_AS_INDENT","Tabs are not allowed as indentation"),g=null),F.type){case"space":!e&&(r!=="doc-start"||n?.type!=="flow-collection")&&F.source.includes(" ")&&(g=F),f=!0;break;case"comment":{f||s(F,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let z=F.source.substring(1)||" ";p?p+=h+z:p=z,h="",u=!1;break}case"newline":u?p?p+=F.source:(!L||r!=="seq-item-ind")&&(c=!0):h+=F.source,u=!0,m=!0,(y||x)&&(T=F),f=!0;break;case"anchor":y&&s(F,"MULTIPLE_ANCHORS","A node can have at most one anchor"),F.source.endsWith(":")&&s(F.offset+F.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),y=F,P??(P=F.offset),u=!1,f=!1,d=!0;break;case"tag":{x&&s(F,"MULTIPLE_TAGS","A node can have at most one tag"),x=F,P??(P=F.offset),u=!1,f=!1,d=!0;break}case r:(y||x)&&s(F,"BAD_PROP_ORDER",`Anchors and tags must be after the ${F.source} indicator`),L&&s(F,"UNEXPECTED_TOKEN",`Unexpected ${F.source} in ${e??"collection"}`),L=F,u=r==="seq-item-ind"||r==="explicit-key-ind",f=!1;break;case"comma":if(e){E&&s(F,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),E=F,u=!1,f=!1;break}default:s(F,"UNEXPECTED_TOKEN",`Unexpected ${F.type} token`),u=!1,f=!1}let D=t[t.length-1],A=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:A,start:P??A}}o(Fr,"resolveProps");function $n(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(`
198
+ `))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($n(e.key)||$n(e.value))return!0}return!1;default:return!0}}o($n,"containsNewline");function pa(t,e,r){if(e?.type==="flow-collection"){let n=e.end[0];n.indent===t&&(n.source==="]"||n.source==="}")&&$n(e)&&r(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}o(pa,"flowIndentCheck");function tc(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(tc,"mapIncludes");var gD="All mapping items must start at the same column";function Iy({composeNode:t,composeEmptyNode:e},r,n,i,s){let a=s?.nodeClass??$e,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=Fr(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",gD)),!g.anchor&&!g.tag&&!m){u=g.end,g.comment&&(l.comment?l.comment+=`
199
+ `+g.comment:l.comment=g.comment);continue}(g.newlineAfterProp||$n(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",gD);r.atKey=!0;let x=g.end,T=h?t(r,h,g,i):e(r,x,p,null,g,i);r.schema.compat&&pa(n.indent,h,i),r.atKey=!1,tc(r,l.items,T)&&i(x,"DUPLICATE_KEY","Map keys must be unique");let E=Fr(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&&pa(n.indent,d,i),c=L.range[2];let P=new Ae(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+=`
200
+ `+E.comment:T.comment=E.comment);let L=new Ae(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(Iy,"resolveBlockMap");function My({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=Fr(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&&pa(n.indent,p,i),c=m.range[2],l.items.push(m)}return l.range=[n.offset,c,u??c],l}o(My,"resolveBlockSeq");function Ar(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(Ar,"resolveEnd");var Ny="Block collections are not allowed within flow collections",Py=o(t=>t&&(t.type==="block-map"||t.type==="block-seq"),"isBlock");function Ly({composeNode:t,composeEmptyNode:e},r,n,i,s){let a=n.start.source==="{",l=a?"flow map":"flow sequence",c=s?.nodeClass??(a?$e: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=Fr(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+=`
201
+ `+D.comment:u.comment=D.comment),p=D.end;continue}!a&&r.options.strict&&$n(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 A="";e:for(let F of T)switch(F.type){case"comma":case"space":break;case"comment":A=F.source.substring(1);break e;default:break e}if(A){let F=u.items[u.items.length-1];me(F)&&(F=F.value??F.key),F.comment?F.comment+=`
202
+ `+A:F.comment=A,D.comment=D.comment.substring(A.length+1)}}if(!a&&!L&&!D.found){let A=P?t(r,P,D,i):e(r,D.end,L,null,D,i);u.items.push(A),p=A.range[2],Py(P)&&i(A.range,"BLOCK_IN_FLOW",Ny)}else{r.atKey=!0;let A=D.end,F=E?t(r,E,D,i):e(r,A,T,null,D,i);Py(E)&&i(F.range,"BLOCK_IN_FLOW",Ny),r.atKey=!1;let z=Fr(L??[],{flow:l,indicator:"map-value-ind",next:P,offset:F.range[2],onError:i,parentIndent:n.indent,startOnNewline:!1});if(z.found){if(!a&&!D.found&&r.options.strict){if(L)for(let j of L){if(j===z.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<z.found.offset-1024&&i(z.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(z.start,"MISSING_CHAR",`Missing , or : between ${l} items`));let C=P?t(r,P,z,i):z.found?e(r,z.end,L,null,z,i):null;C?Py(P)&&i(C.range,"BLOCK_IN_FLOW",Ny):z.comment&&(F.comment?F.comment+=`
203
+ `+z.comment:F.comment=z.comment);let le=new Ae(F,C);if(r.options.keepSourceTokens&&(le.srcToken=x),a){let j=u;tc(r,j.items,F)&&i(A,"DUPLICATE_KEY","Map keys must be unique"),j.items.push(le)}else{let j=new $e(r.schema);j.flow=!0,j.items.push(le);let N=(C??F).range;j.range=[F.range[0],N[1],N[2]],u.items.push(j)}p=C?C.range[2]:z.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=Ar(d,g,r.options.strict,i);y.comment&&(u.comment?u.comment+=`
204
+ `+y.comment:u.comment=y.comment),u.range=[n.offset,g,y.offset]}else u.range=[n.offset,g,g];return u}o(Ly,"resolveFlowCollection");function _y(t,e,r,n,i,s){let a=r.type==="block-map"?Iy(t,e,r,n,s):r.type==="block-seq"?My(t,e,r,n,s):Ly(t,e,r,n,s),l=a.constructor;return i==="!"||i===l.tagName?(a.tag=l.tagName,a):(i&&(a.tag=i),a)}o(_y,"resolveCollection");function Ry(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===$e.tagName&&l==="map"||a===rt.tagName&&l==="seq")return _y(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),_y(t,e,r,i,a)}let u=_y(t,e,r,i,a,c),f=c.resolve?.(u,h=>i(s,"TAG_RESOLVE_FAILED",h),e.options)??u,p=ye(f)?f:new G(f);return p.range=u.range,p.tag=a,c?.format&&(p.format=c.format),p}o(Ry,"composeCollection");function rc(t,e,r){let n=e.offset,i=m$(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?d$(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?`
205
205
  `.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)+`
206
206
  `;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=`
207
207
  `):y.length>c||x[0]===" "?(h===" "?h=`
@@ -216,92 +216,92 @@ ${u}
216
216
  `+a[g][0].slice(c);p[p.length-1]!==`
217
217
  `&&(p+=`
218
218
  `);break;default:p+=`
219
- `}let d=n+i.length+e.source.length;return{value:p,type:s,comment:i.comment,range:[n,d,d]}}o(tc,"resolveBlockScalar");function h$({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(h$,"parseBlockScalarHeader");function m$(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(m$,"splitLines");function rc(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=d$(s,u);break;case"single-quoted-scalar":l=G.QUOTE_SINGLE,c=g$(s,u);break;case"double-quoted-scalar":l=G.QUOTE_DOUBLE,c=y$(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=Ar(a,f,e,r);return{value:c,type:l,comment:p.comment,range:[n,f,p.offset]}}o(rc,"resolveFlowScalar");function d$(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}`),gD(t)}o(d$,"plainValue");function g$(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),gD(t.slice(1,-1)).replace(/''/g,"'")}o(g$,"singleQuotedValue");function gD(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===`
219
+ `}let d=n+i.length+e.source.length;return{value:p,type:s,comment:i.comment,range:[n,d,d]}}o(rc,"resolveBlockScalar");function m$({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(m$,"parseBlockScalarHeader");function d$(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(d$,"splitLines");function nc(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=g$(s,u);break;case"single-quoted-scalar":l=G.QUOTE_SINGLE,c=y$(s,u);break;case"double-quoted-scalar":l=G.QUOTE_DOUBLE,c=x$(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=Ar(a,f,e,r);return{value:c,type:l,comment:p.comment,range:[n,f,p.offset]}}o(nc,"resolveFlowScalar");function g$(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}`),yD(t)}o(g$,"plainValue");function y$(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),yD(t.slice(1,-1)).replace(/''/g,"'")}o(y$,"singleQuotedValue");function yD(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===`
220
220
  `?s+=a:a=`
221
- `:(s+=a+u,a=" "),l=e.lastIndex}let c=/[ \t]*(.*)/sy;return c.lastIndex=l,r=c.exec(t),s+a+(r?.[1]??"")}o(gD,"unfoldLines");function y$(t,e){let r="";for(let n=1;n<t.length-1;++n){let i=t[n];if(!(i==="\r"&&t[n+1]===`
221
+ `:(s+=a+u,a=" "),l=e.lastIndex}let c=/[ \t]*(.*)/sy;return c.lastIndex=l,r=c.exec(t),s+a+(r?.[1]??"")}o(yD,"unfoldLines");function x$(t,e){let r="";for(let n=1;n<t.length-1;++n){let i=t[n];if(!(i==="\r"&&t[n+1]===`
222
222
  `))if(i===`
223
- `){let{fold:s,offset:a}=x$(t,n);r+=s,n=a}else if(i==="\\"){let s=t[++n],a=b$[s];if(a)r+=a;else if(s===`
223
+ `){let{fold:s,offset:a}=b$(t,n);r+=s,n=a}else if(i==="\\"){let s=t[++n],a=w$[s];if(a)r+=a;else if(s===`
224
224
  `)for(s=t[n+1];s===" "||s===" ";)s=t[++n+1];else if(s==="\r"&&t[n+1]===`
225
- `)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+=w$(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!==`
225
+ `)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+=S$(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!==`
226
226
  `&&!(a==="\r"&&t[n+2]===`
227
- `)&&(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(y$,"doubleQuotedValue");function x$(t,e){let r="",n=t[e+1];for(;(n===" "||n===" "||n===`
227
+ `)&&(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(x$,"doubleQuotedValue");function b$(t,e){let r="",n=t[e+1];for(;(n===" "||n===" "||n===`
228
228
  `||n==="\r")&&!(n==="\r"&&t[e+2]!==`
229
229
  `);)n===`
230
230
  `&&(r+=`
231
- `),e+=1,n=t[e+1];return r||(r=" "),{fold:r,offset:e}}o(x$,"foldNewline");var b$={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
232
- `,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function w$(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(w$,"parseCharCode");function $h(t,e,r,n){let{value:i,type:s,comment:a,range:l}=e.type==="block-scalar"?tc(t,e,n):rc(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[zt]:c?u=S$(t.schema,i,c,r,n):e.type==="scalar"?u=v$(t,i,e,n):u=t.schema[zt];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($h,"composeScalar");function S$(t,e,r,n,i){if(r==="!")return t[zt];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[zt])}o(S$,"findScalarTagByName");function v$({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[zt];if(r.compat){let l=r.compat.find(c=>c.default&&c.test?.test(n))??r[zt];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(v$,"findScalarTagByTest");function Ry(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(Ry,"emptyScalarPosition");var k$={composeNode:Bh,composeEmptyNode:nc};function Bh(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=T$(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=$h(t,e,c,n),l&&(u.anchor=l.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{u=_y(k$,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=nc(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(Bh,"composeNode");function nc(t,e,r,n,{spaceBefore:i,comment:s,anchor:a,tag:l,end:c},u){let f={type:"scalar",offset:Ry(e,r,n),indent:-1,source:""},p=$h(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(nc,"composeEmptyNode");function T$({options:t},{offset:e,source:r,end:n},i){let s=new xr(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=Ar(n,a,t.strict,i);return s.range=[e,a,l.offset],l.comment&&(s.comment=l.comment),s}o(T$,"composeAlias");function Fy(t,e,{offset:r,start:n,value:i,end:s},a){let l=Object.assign({_directives:e},t),c=new vr(void 0,l),u={atKey:!1,atRoot:!0,directives:c.directives,options:c.options,schema:c.schema},f=Fr(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?Bh(u,i,f,a):nc(u,f.end,n,null,f,a);let p=c.contents.range[2],h=Ar(s,p,!1,a);return h.comment&&(c.comment=h.comment),c.range=[r,p,h.offset],c}o(Fy,"composeDoc");function ic(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(ic,"getErrorPos");function yD(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?`
231
+ `),e+=1,n=t[e+1];return r||(r=" "),{fold:r,offset:e}}o(b$,"foldNewline");var w$={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
232
+ `,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function S$(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(S$,"parseCharCode");function Bh(t,e,r,n){let{value:i,type:s,comment:a,range:l}=e.type==="block-scalar"?rc(t,e,n):nc(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[zt]:c?u=v$(t.schema,i,c,r,n):e.type==="scalar"?u=k$(t,i,e,n):u=t.schema[zt];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(Bh,"composeScalar");function v$(t,e,r,n,i){if(r==="!")return t[zt];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[zt])}o(v$,"findScalarTagByName");function k$({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[zt];if(r.compat){let l=r.compat.find(c=>c.default&&c.test?.test(n))??r[zt];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(k$,"findScalarTagByTest");function Fy(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(Fy,"emptyScalarPosition");var T$={composeNode:jh,composeEmptyNode:ic};function jh(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=E$(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=Bh(t,e,c,n),l&&(u.anchor=l.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{u=Ry(T$,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=ic(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(jh,"composeNode");function ic(t,e,r,n,{spaceBefore:i,comment:s,anchor:a,tag:l,end:c},u){let f={type:"scalar",offset:Fy(e,r,n),indent:-1,source:""},p=Bh(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(ic,"composeEmptyNode");function E$({options:t},{offset:e,source:r,end:n},i){let s=new xr(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=Ar(n,a,t.strict,i);return s.range=[e,a,l.offset],l.comment&&(s.comment=l.comment),s}o(E$,"composeAlias");function Ay(t,e,{offset:r,start:n,value:i,end:s},a){let l=Object.assign({_directives:e},t),c=new vr(void 0,l),u={atKey:!1,atRoot:!0,directives:c.directives,options:c.options,schema:c.schema},f=Fr(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?jh(u,i,f,a):ic(u,f.end,n,null,f,a);let p=c.contents.range[2],h=Ar(s,p,!1,a);return h.comment&&(c.comment=h.comment),c.range=[r,p,h.offset],c}o(Ay,"composeDoc");function oc(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(oc,"getErrorPos");function xD(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?`
233
233
 
234
234
  `:`
235
- `)+(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(yD,"parsePrelude");var $n=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=ic(r);s?this.warnings.push(new ki(a,n,i)):this.errors.push(new Pt(a,n,i))},this.directives=new _r({version:e.version||"1.2"}),this.options=e}decorate(e,r){let{comment:n,afterEmptyLine:i}=yD(this.prelude);if(n){let s=e.contents;if(r)e.comment=e.comment?`${e.comment}
235
+ `)+(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(xD,"parsePrelude");var Bn=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=oc(r);s?this.warnings.push(new Ti(a,n,i)):this.errors.push(new Pt(a,n,i))},this.directives=new _r({version:e.version||"1.2"}),this.options=e}decorate(e,r){let{comment:n,afterEmptyLine:i}=xD(this.prelude);if(n){let s=e.contents;if(r)e.comment=e.comment?`${e.comment}
236
236
  ${n}`:n;else if(i||e.directives.docStart||!s)e.commentBefore=n;else if(ve(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}
237
237
  ${l}`:n}else{let a=s.commentBefore;s.commentBefore=a?`${n}
238
- ${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:yD(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=ic(e);s[0]+=r,this.onError(s,"BAD_DIRECTIVE",n,i)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let r=Fy(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 Pt(ic(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 Pt(ic(e),"UNEXPECTED_TOKEN",n));break}this.doc.directives.docEnd=!0;let r=Ar(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}
239
- ${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.push(new Pt(ic(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 vr(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 oc={};se(oc,{BOM:()=>pa,DOCUMENT:()=>ha,FLOW_END:()=>ma,SCALAR:()=>Io,createScalarToken:()=>By,isCollection:()=>SD,isScalar:()=>vD,prettyToken:()=>kD,resolveAsScalar:()=>$y,setScalarValue:()=>jy,stringify:()=>Uy,tokenType:()=>zh,visit:()=>Bn});function $y(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 Pt([l,l+1],s,a)},"_onError");switch(t.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return rc(t,e,n);case"block-scalar":return tc({options:{strict:e}},t,n)}}return null}o($y,"resolveAsScalar");function By(t,e){let{implicitKey:r=!1,indent:n,inFlow:i=!1,offset:s=-1,type:a="PLAIN"}=e,l=dn({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:`
238
+ ${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:xD(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=oc(e);s[0]+=r,this.onError(s,"BAD_DIRECTIVE",n,i)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let r=Ay(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 Pt(oc(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 Pt(oc(e),"UNEXPECTED_TOKEN",n));break}this.doc.directives.docEnd=!0;let r=Ar(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}
239
+ ${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.push(new Pt(oc(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 vr(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 sc={};se(sc,{BOM:()=>ha,DOCUMENT:()=>ma,FLOW_END:()=>da,SCALAR:()=>Mo,createScalarToken:()=>jy,isCollection:()=>vD,isScalar:()=>kD,prettyToken:()=>TD,resolveAsScalar:()=>By,setScalarValue:()=>Uy,stringify:()=>zy,tokenType:()=>Hh,visit:()=>jn});function By(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 Pt([l,l+1],s,a)},"_onError");switch(t.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return nc(t,e,n);case"block-scalar":return rc({options:{strict:e}},t,n)}}return null}o(By,"resolveAsScalar");function jy(t,e){let{implicitKey:r=!1,indent:n,inFlow:i=!1,offset:s=-1,type:a="PLAIN"}=e,l=dn({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:`
240
240
  `}];switch(l[0]){case"|":case">":{let u=l.indexOf(`
241
241
  `),f=l.substring(0,u),p=l.substring(u+1)+`
242
- `,h=[{type:"block-scalar-header",offset:s,indent:n,source:f}];return xD(h,c)||h.push({type:"newline",offset:-1,indent:n,source:`
243
- `}),{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(By,"createScalarToken");function jy(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=dn({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">":E$(t,c);break;case'"':Ay(t,c,"double-quoted-scalar");break;case"'":Ay(t,c,"single-quoted-scalar");break;default:Ay(t,c,"scalar")}}o(jy,"setScalarValue");function E$(t,e){let r=e.indexOf(`
242
+ `,h=[{type:"block-scalar-header",offset:s,indent:n,source:f}];return bD(h,c)||h.push({type:"newline",offset:-1,indent:n,source:`
243
+ `}),{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(jy,"createScalarToken");function Uy(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=dn({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">":D$(t,c);break;case'"':$y(t,c,"double-quoted-scalar");break;case"'":$y(t,c,"single-quoted-scalar");break;default:$y(t,c,"scalar")}}o(Uy,"setScalarValue");function D$(t,e){let r=e.indexOf(`
244
244
  `),n=e.substring(0,r),i=e.substring(r+1)+`
245
- `;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}];xD(l,"end"in t?t.end:void 0)||l.push({type:"newline",offset:-1,indent:a,source:`
246
- `});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(E$,"setBlockScalarValue");function xD(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(xD,"addEndtoBlockProps");function Ay(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:`
247
- `};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(Ay,"setFlowScalarValue");var Uy=o(t=>"type"in t?jh(t):Uh(t),"stringify");function jh(t){switch(t.type){case"block-scalar":{let e="";for(let r of t.props)e+=jh(r);return e+t.source}case"block-map":case"block-seq":{let e="";for(let r of t.items)e+=Uh(r);return e}case"flow-collection":{let e=t.start.source;for(let r of t.items)e+=Uh(r);for(let r of t.end)e+=r.source;return e}case"document":{let e=Uh(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(jh,"stringifyToken");function Uh({start:t,key:e,sep:r,value:n}){let i="";for(let s of t)i+=s.source;if(e&&(i+=jh(e)),r)for(let s of r)i+=s.source;return n&&(i+=jh(n)),i}o(Uh,"stringifyItem");var zy=Symbol("break visit"),D$=Symbol("skip children"),bD=Symbol("remove item");function Bn(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),wD(Object.freeze([]),t,e)}o(Bn,"visit"),Bn.BREAK=zy,Bn.SKIP=D$,Bn.REMOVE=bD,Bn.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},Bn.parentCollection=(t,e)=>{let r=Bn.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 wD(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=wD(Object.freeze(t.concat([[i,a]])),s.items[a],r);if(typeof l=="number")a=l-1;else{if(l===zy)return zy;l===bD&&(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(wD,"_visit");var pa="\uFEFF",ha="",ma="",Io="",SD=o(t=>!!t&&"items"in t,"isCollection"),vD=o(t=>!!t&&(t.type==="scalar"||t.type==="single-quoted-scalar"||t.type==="double-quoted-scalar"||t.type==="block-scalar"),"isScalar");function kD(t){switch(t){case pa:return"<BOM>";case ha:return"<DOC>";case ma:return"<FLOW_END>";case Io:return"<SCALAR>";default:return JSON.stringify(t)}}o(kD,"prettyToken");function zh(t){switch(t){case pa:return"byte-order-mark";case ha:return"doc-mode";case ma:return"flow-error-end";case Io:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
245
+ `;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}];bD(l,"end"in t?t.end:void 0)||l.push({type:"newline",offset:-1,indent:a,source:`
246
+ `});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(D$,"setBlockScalarValue");function bD(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(bD,"addEndtoBlockProps");function $y(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:`
247
+ `};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($y,"setFlowScalarValue");var zy=o(t=>"type"in t?Uh(t):zh(t),"stringify");function Uh(t){switch(t.type){case"block-scalar":{let e="";for(let r of t.props)e+=Uh(r);return e+t.source}case"block-map":case"block-seq":{let e="";for(let r of t.items)e+=zh(r);return e}case"flow-collection":{let e=t.start.source;for(let r of t.items)e+=zh(r);for(let r of t.end)e+=r.source;return e}case"document":{let e=zh(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(Uh,"stringifyToken");function zh({start:t,key:e,sep:r,value:n}){let i="";for(let s of t)i+=s.source;if(e&&(i+=Uh(e)),r)for(let s of r)i+=s.source;return n&&(i+=Uh(n)),i}o(zh,"stringifyItem");var Hy=Symbol("break visit"),C$=Symbol("skip children"),wD=Symbol("remove item");function jn(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),SD(Object.freeze([]),t,e)}o(jn,"visit"),jn.BREAK=Hy,jn.SKIP=C$,jn.REMOVE=wD,jn.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},jn.parentCollection=(t,e)=>{let r=jn.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 SD(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=SD(Object.freeze(t.concat([[i,a]])),s.items[a],r);if(typeof l=="number")a=l-1;else{if(l===Hy)return Hy;l===wD&&(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(SD,"_visit");var ha="\uFEFF",ma="",da="",Mo="",vD=o(t=>!!t&&"items"in t,"isCollection"),kD=o(t=>!!t&&(t.type==="scalar"||t.type==="single-quoted-scalar"||t.type==="double-quoted-scalar"||t.type==="block-scalar"),"isScalar");function TD(t){switch(t){case ha:return"<BOM>";case ma:return"<DOC>";case da:return"<FLOW_END>";case Mo:return"<SCALAR>";default:return JSON.stringify(t)}}o(TD,"prettyToken");function Hh(t){switch(t){case ha:return"byte-order-mark";case ma:return"doc-mode";case da:return"flow-error-end";case Mo:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
248
248
  `:case`\r
249
- `: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(zh,"tokenType");function $r(t){switch(t){case void 0:case" ":case`
250
- `:case"\r":case" ":return!0;default:return!1}}o($r,"isEmpty");var TD=new Set("0123456789ABCDEFabcdef"),C$=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Hh=new Set(",[]{}"),O$=new Set(` ,[]{}
251
- \r `),Hy=o(t=>!t||O$.has(t),"isNotAnchorChar"),Ti=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===`
249
+ `: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(Hh,"tokenType");function $r(t){switch(t){case void 0:case" ":case`
250
+ `:case"\r":case" ":return!0;default:return!1}}o($r,"isEmpty");var ED=new Set("0123456789ABCDEFabcdef"),O$=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Wh=new Set(",[]{}"),I$=new Set(` ,[]{}
251
+ \r `),Wy=o(t=>!t||I$.has(t),"isNotAnchorChar"),Ei=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===`
252
252
  `?!0:r==="\r"?this.buffer[e+1]===`
253
253
  `:!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===`
254
254
  `||!i&&!this.atEnd)return e+n+1}return r===`
255
255
  `||n>=this.indentNext||!r&&!this.atEnd?e+n:-1}if(r==="-"||r==="."){let n=this.buffer.substr(e,3);if((n==="---"||n==="...")&&$r(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(`
256
- `,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]===pa&&(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 ha,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==="...")&&$r(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&&!$r(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===":")&&$r(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(Hy),"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("..."))&&$r(i[3]))&&!(n===this.indentNext-1&&this.flowLevel===1&&(i[0]==="]"||i[0]==="}")))return this.flowLevel=0,yield ma,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(Hy),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let a=this.charAt(1);if(this.flowKey||$r(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(`
256
+ `,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]===ha&&(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 ma,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==="...")&&$r(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&&!$r(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===":")&&$r(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(Wy),"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("..."))&&$r(i[3]))&&!(n===this.indentNext-1&&this.flowLevel===1&&(i[0]==="]"||i[0]==="}")))return this.flowLevel=0,yield da,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(Wy),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let a=this.charAt(1);if(this.flowKey||$r(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(`
257
257
  `,this.pos);if(i!==-1){for(;i!==-1;){let s=this.continueScalar(i+1);if(s===-1)break;i=n.indexOf(`
258
258
  `,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=>$r(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`
259
259
  `:e=s,r=0;break;case"\r":{let a=this.buffer[s+1];if(!a&&!this.atEnd)return this.setNext("block-scalar");if(a===`
260
260
  `)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(`
261
261
  `,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===`
262
262
  `;)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===`
263
- `&&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($r(s)||e&&Hh.has(s))break;r=n}else if($r(i)){let s=this.buffer[n+1];if(i==="\r"&&(s===`
263
+ `&&s>=this.pos&&s+1+r>l)e=s;else break}while(!0);return yield Mo,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($r(s)||e&&Wh.has(s))break;r=n}else if($r(i)){let s=this.buffer[n+1];if(i==="\r"&&(s===`
264
264
  `?(n+=1,i=`
265
- `,s=this.buffer[n+1]):r=n),s==="#"||e&&Hh.has(s))break;if(i===`
266
- `){let a=this.continueScalar(n+1);if(a===-1)break;n=Math.max(n,a-2)}}else{if(e&&Hh.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(Hy),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let r=this.flowLevel>0,n=this.charAt(1);if($r(n)||r&&Hh.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(;!$r(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(C$.has(r))r=this.buffer[++e];else if(r==="%"&&TD.has(this.buffer[e+1])&&TD.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===`
265
+ `,s=this.buffer[n+1]):r=n),s==="#"||e&&Wh.has(s))break;if(i===`
266
+ `){let a=this.continueScalar(n+1);if(a===-1)break;n=Math.max(n,a-2)}}else{if(e&&Wh.has(i))break;r=n}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield Mo,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(Wy),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let r=this.flowLevel>0,n=this.charAt(1);if($r(n)||r&&Wh.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(;!$r(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(O$.has(r))r=this.buffer[++e];else if(r==="%"&&ED.has(this.buffer[e+1])&&ED.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===`
267
267
  `?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
268
- `?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 Ei=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 Di(t,e){for(let r=0;r<t.length;++r)if(t[r].type===e)return!0;return!1}o(Di,"includesToken");function ED(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(ED,"findNonEmptyIndex");function DD(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(DD,"isFlowToken");function Wh(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(Wh,"getPrevProps");function da(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(da,"getFirstKeyStartProps");function qh(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(qh,"arrayPushArray");function CD(t){if(t.start.type==="flow-seq-start")for(let e of t.items)e.sep&&!e.value&&!Di(e.start,"explicit-key-ind")&&!Di(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,DD(e.value)?e.value.end?qh(e.value.end,e.sep):e.value.end=e.sep:qh(e.start,e.sep),delete e.sep)}o(CD,"fixFlowSeqItems");var jn=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 Ti,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=zh(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"&&CD(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&&ED(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":{ED(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=Wh(this.peek(2)),n=da(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(`
268
+ `?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 Di=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 DD(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(DD,"findNonEmptyIndex");function CD(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(CD,"isFlowToken");function qh(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(qh,"getPrevProps");function ga(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(ga,"getFirstKeyStartProps");function Yh(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(Yh,"arrayPushArray");function OD(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,CD(e.value)?e.value.end?Yh(e.value.end,e.sep):e.value.end=e.sep:Yh(e.start,e.sep),delete e.sep)}o(OD,"fixFlowSeqItems");var Un=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 Ei,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=Hh(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"&&OD(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&&DD(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":{DD(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=qh(this.peek(2)),n=ga(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(`
269
269
  `)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
270
- `,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)){qh(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(Di(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(DD(r.key)&&!Di(r.sep,"newline")){let a=da(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(Di(r.start,"newline"))Object.assign(r,{key:null,sep:[this.sourceToken]});else{let a=da(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]}):Di(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&&!Di(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)){qh(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||Di(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=Wh(n),s=da(i);CD(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(`
270
+ `,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)){Yh(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(CD(r.key)&&!Ci(r.sep,"newline")){let a=ga(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=ga(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)){Yh(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=qh(n),s=ga(i);OD(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(`
271
271
  `)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
272
- `,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=Wh(e),n=da(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=Wh(e),n=da(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 OD(t){let e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new Ei||null,prettyErrors:e}}o(OD,"parseOptions");function Yh(t,e={}){let{lineCounter:r,prettyErrors:n}=OD(e),i=new jn(r?.addNewLine),s=new $n(e),a=Array.from(s.compose(i.parse(t)));if(n&&r)for(let l of a)l.errors.forEach(ua(t,r)),l.warnings.forEach(ua(t,r));return a.length>0?a:Object.assign([],{empty:!0},s.streamInfo())}o(Yh,"parseAllDocuments");function sc(t,e={}){let{lineCounter:r,prettyErrors:n}=OD(e),i=new jn(r?.addNewLine),s=new $n(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 Pt(l.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return n&&r&&(a.errors.forEach(ua(t,r)),a.warnings.forEach(ua(t,r))),a}o(sc,"parseDocument");function Vh(t,e,r){let n;typeof e=="function"?n=e:r===void 0&&e&&typeof e=="object"&&(r=e);let i=sc(t,r);if(!i)return null;if(i.warnings.forEach(s=>Ul(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(Vh,"parse");function Kh(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 Wt(t)&&!n?t.toString(r):new vr(t,n,r).toString(r)}o(Kh,"stringify");var I$=Wy;var N$=o(async t=>Mo.parse(t),"yamlStringToObject"),P$=o(async t=>Mo.stringify(t),"objectToYamlString"),L$=o(async t=>Mo.parseDocument(t),"getYamlDocFromString");function qy(t){if(t)throw t}o(qy,"bail");function ac(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(ac,"isPlainObject");function Yy(){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?$D(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(Yy,"trough");function $D(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($D,"wrap");function Ci(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?BD(t.position):"start"in t||"end"in t?BD(t):"line"in t||"column"in t?Vy(t):""}o(Ci,"stringifyPosition");function Vy(t){return jD(t&&t.line)+":"+jD(t&&t.column)}o(Vy,"point");function BD(t){return Vy(t&&t.start)+"-"+Vy(t&&t.end)}o(BD,"position");function jD(t){return t&&typeof t=="number"?t:1}o(jD,"index");var lt=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=Ci(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}};lt.prototype.file="",lt.prototype.name="",lt.prototype.reason="",lt.prototype.message="",lt.prototype.stack="",lt.prototype.column=void 0,lt.prototype.line=void 0,lt.prototype.ancestors=void 0,lt.prototype.cause=void 0,lt.prototype.fatal=void 0,lt.prototype.place=void 0,lt.prototype.ruleId=void 0,lt.prototype.source=void 0;var Br={basename:_$,dirname:R$,extname:F$,join:A$,sep:"/"};function _$(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');lc(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(_$,"basename");function R$(t){if(lc(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(R$,"dirname");function F$(t){lc(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(F$,"extname");function A$(...t){let e=-1,r;for(;++e<t.length;)lc(t[e]),t[e]&&(r=r===void 0?t[e]:r+"/"+t[e]);return r===void 0?".":$$(r)}o(A$,"join");function $$(t){lc(t);let e=t.codePointAt(0)===47,r=B$(t,!e);return r.length===0&&!e&&(r="."),r.length>0&&t.codePointAt(t.length-1)===47&&(r+="/"),e?"/"+r:r}o($$,"normalize");function B$(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(B$,"normalizeString");function lc(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}o(lc,"assertPath");var UD={cwd:j$};function j$(){return"/"}o(j$,"cwd");function ya(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}o(ya,"isUrl");function zD(t){if(typeof t=="string")t=new URL(t);else if(!ya(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 U$(t)}o(zD,"urlToPath");function U$(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(U$,"getPathFromURLPosix");var Ky=["history","path","basename","stem","extname","dirname"],cc=class{static{o(this,"VFile")}constructor(e){let r;e?ya(e)?r={path:e}:typeof e=="string"||z$(e)?r={value:e}:r=e:r={},this.cwd="cwd"in r?"":UD.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Ky.length;){let s=Ky[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)Ky.includes(i)||(this[i]=r[i])}get basename(){return typeof this.path=="string"?Br.basename(this.path):void 0}set basename(e){Qy(e,"basename"),Gy(e,"basename"),this.path=Br.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?Br.dirname(this.path):void 0}set dirname(e){HD(this.basename,"dirname"),this.path=Br.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?Br.extname(this.path):void 0}set extname(e){if(Gy(e,"extname"),HD(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=Br.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){ya(e)&&(e=zD(e)),Qy(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?Br.basename(this.path,this.extname):void 0}set stem(e){Qy(e,"stem"),Gy(e,"stem"),this.path=Br.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 lt(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 Gy(t,e){if(t&&t.includes(Br.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+Br.sep+"`")}o(Gy,"assertPart");function Qy(t,e){if(!t)throw new Error("`"+e+"` cannot be empty")}o(Qy,"assertNonEmpty");function HD(t,e){if(!t)throw new Error("Setting `"+e+"` requires `path` to be set too")}o(HD,"assertPath");function z$(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}o(z$,"isUint8Array");var WD=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 Jh=Wn(AD(),1),H$={}.hasOwnProperty,Jy=class t extends WD{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=Yy()}copy(){let e=new t,r=-1;for(;++r<this.attachers.length;){let n=this.attachers[r];e.use(...n)}return e.data((0,Jh.default)(!0,{},this.namespace)),e}data(e,r){return typeof e=="string"?arguments.length===2?(ex("data",this.frozen),this.namespace[e]=r,this):H$.call(this.namespace,e)&&this.namespace[e]||void 0:e?(ex("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=Qh(e),n=this.parser||this.Parser;return Xy("parse",n),n(String(r),r)}process(e,r){let n=this;return this.freeze(),Xy("process",this.parser||this.Parser),Zy("process",this.compiler||this.Compiler),r?i(void 0,r):new Promise(i);function i(s,a){let l=Qh(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);q$(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(),Xy("processSync",this.parser||this.Parser),Zy("processSync",this.compiler||this.Compiler),this.process(e,i),YD("processSync","process",r),n;function i(s,a){r=!0,qy(s),n=a}o(i,"realDone")}run(e,r,n){qD(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=Qh(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),YD("runSync","run",n),i;function s(a,l){qy(a),i=l,n=!0}o(s,"realDone")}stringify(e,r){this.freeze();let n=Qh(r),i=this.compiler||this.Compiler;return Zy("stringify",i),qD(e),i(e,n)}use(e,...r){let n=this.attachers,i=this.namespace;if(ex("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,Jh.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];ac(g)&&ac(m)&&(m=(0,Jh.default)(!0,g,m)),n[h]=[u,m,...d]}}}},uc=new Jy().freeze();function Xy(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}o(Xy,"assertParser");function Zy(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}o(Zy,"assertCompiler");function ex(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(ex,"assertUnfrozen");function qD(t){if(!ac(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}o(qD,"assertNode");function YD(t,e,r){if(!r)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}o(YD,"assertDone");function Qh(t){return W$(t)?t:new cc(t)}o(Qh,"vfile");function W$(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}o(W$,"looksLikeAVFile");function q$(t){return typeof t=="string"||Y$(t)}o(q$,"looksLikeAValue");function Y$(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}o(Y$,"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 Je(t,e){return t.length>0?(Ke(t,t.length,0,e),t):e}o(Je,"push");var tx={}.hasOwnProperty;function Xh(t){let e={},r=-1;for(;++r<t.length;)V$(e,t[r]);return e}o(Xh,"combineExtensions");function V$(t,e){let r;for(r in e){let i=(tx.call(t,r)?t[r]:void 0)||(t[r]={}),s=e[r],a;if(s)for(a in s){tx.call(i,a)||(i[a]=[]);let l=s[a];K$(i[a],Array.isArray(l)?l:l?[l]:[])}}}o(V$,"syntaxExtension");function K$(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(K$,"constructs");function Zh(t){let e={},r=-1;for(;++r<t.length;)G$(e,t[r]);return e}o(Zh,"combineHtmlExtensions");function G$(t,e){let r;for(r in e){let i=(tx.call(t,r)?t[r]:void 0)||(t[r]={}),s=e[r],a;if(s)for(a in s)i[a]=s[a]}}o(G$,"htmlExtension");function We(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}o(We,"normalizeIdentifier");var VD={}.hasOwnProperty,KD=/^(https?|ircs?|mailto|xmpp)$/i,Q$=/^https?$/i;function rx(t){let e=t||{},r=!0,n={},i=[[]],s=[],a=[],c=Zh([{enter:{blockQuote:U,codeFenced:ue,codeFencedFenceInfo:y,codeFencedFenceMeta:y,codeIndented:ke,codeText:It,content:zr,definition:Pe,definitionDestinationString:_t,definitionLabelString:y,definitionTitleString:y,emphasis:Fi,htmlFlow:Qt,htmlText:lr,image:Re,label:y,link:Ye,listItemMarker:le,listItemValue:C,listOrdered:F,listUnordered:z,paragraph:K,reference:y,resource:I,resourceDestinationString:M,resourceTitleString:y,setextHeading:ar,strong:Ai},exit:{atxHeading:je,atxHeadingSequence:Gt,autolinkEmail:jO,autolinkProtocol:BO,blockQuote:W,characterEscapeValue:q,characterReferenceMarkerHexadecimal:Gb,characterReferenceMarkerNumeric:Gb,characterReferenceValue:$O,codeFenced:k,codeFencedFence:xe,codeFencedFenceInfo:w,codeFencedFenceMeta:A,codeFlowValue:fe,codeIndented:k,codeText:Hn,codeTextData:q,data:q,definition:Tr,definitionDestinationString:it,definitionLabelString:Te,definitionTitleString:Ot,emphasis:Er,hardBreakEscape:Ee,hardBreakTrailing:Ee,htmlFlow:Wr,htmlFlowData:q,htmlText:Wr,htmlTextData:q,image:_e,label:O,labelText:Kt,lineEnding:oe,link:_e,listOrdered:j,listUnordered:N,paragraph:Z,reference:A,referenceString:v,resource:A,resourceDestinationString:B,resourceTitleString:re,setextHeading:_,setextHeadingLineSequence:Hr,setextHeadingText:Rt,strong:FO,thematicBreak:AO}},...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,mt=0,Dr=[],qr=[],Sn=[];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"?Dr.push(ne):m(Y.slice(Dr.pop(),ne))),Y[ne][1].type==="definition"&&(Y[ne][0]==="enter"?(Sn=Je(Sn,Y.slice(mt,ne)),mt=ne):(qr=Je(qr,Y.slice(mt,ne+1)),mt=ne+1));qr=Je(qr,Sn),qr=Je(qr,Y.slice(mt)),ne=-1;let Yr=qr;for(c.enter.null&&c.enter.null.call(f);++ne<Y.length;){let Qb=c[Yr[ne][0]],Jb=Yr[ne][1].type,Xb=Qb[Jb];VD.call(Qb,Jb)&&Xb&&Xb.call({sliceSerialize:Yr[ne][2].sliceSerialize,...f},Yr[ne][1])}return c.exit.null&&c.exit.null.call(f),i[0].join("")}function m(Y){let ne=Y.length,mt=0,Dr=0,qr=!1,Sn;for(;++mt<ne;){let Yr=Y[mt];if(Yr[1]._container)Sn=void 0,Yr[0]==="enter"?Dr++:Dr--;else switch(Yr[1].type){case"listItemPrefix":{Yr[0]==="exit"&&(Sn=!0);break}case"linePrefix":break;case"lineEndingBlank":{Yr[0]==="enter"&&!Dr&&(Sn?Sn=void 0:qr=!0);break}default:Sn=void 0}}Y[0][1]._loose=qr}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 L(){E(p||`
273
- `)}function P(){let Y=i[i.length-1],ne=Y[Y.length-1],mt=ne?ne.charCodeAt(ne.length-1):null;mt===10||mt===13||mt===null||L()}function D(Y){return g("ignoreEncode")?Y:Jp(Y)}function A(){x()}function F(Y){a.push(!Y._loose),P(),T("<ol"),d("expectFirstItem",!0)}function z(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(),L(),T("</ol>")}function N(){R(),a.pop(),L(),T("</ul>")}function R(){g("lastWasTag")&&!g("slurpAllLineEndings")&&P(),T("</li>"),d("slurpAllLineEndings")}function U(){a.push(!1),P(),T("<blockquote>")}function W(){a.pop(),P(),T("</blockquote>"),d("slurpAllLineEndings")}function K(){a[a.length-1]||(P(),T("<p>")),d("slurpAllLineEndings")}function Z(){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 Re(){s.push({image:!0}),r=void 0}function Ye(){s.push({})}function Kt(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 I(){y(),s[s.length-1].destination=""}function M(){y(),d("ignoreEncode",!0)}function B(){s[s.length-1].destination=x(),d("ignoreEncode")}function re(){s[s.length-1].title=x()}function _e(){let Y=s.length-1,ne=s[Y],mt=ne.referenceId||ne.labelId,Dr=ne.destination===void 0?n[We(mt)]:ne;for(r=!0;Y--;)if(s[Y].image){r=void 0;break}ne.image?(T('<img src="'+fn(Dr.destination,e.allowDangerousProtocol?void 0:Q$)+'" alt="'),E(ne.label),T('"')):T('<a href="'+fn(Dr.destination,e.allowDangerousProtocol?void 0:KD)+'"'),T(Dr.title?' title="'+Dr.title+'"':""),ne.image?T(" />"):(T(">"),E(ne.label),T("</a>")),s.pop()}function Pe(){y(),s.push({})}function Te(Y){x(),s[s.length-1].labelId=this.sliceSerialize(Y)}function _t(){y(),d("ignoreEncode",!0)}function it(){s[s.length-1].destination=x(),d("ignoreEncode")}function Ot(){s[s.length-1].title=x()}function Tr(){let Y=s[s.length-1],ne=We(Y.labelId);x(),VD.call(n,ne)||(n[ne]=s[s.length-1]),s.pop()}function zr(){d("slurpAllLineEndings",!0)}function Gt(Y){g("headingRank")||(d("headingRank",this.sliceSerialize(Y).length),P(),T("<h"+g("headingRank")+">"))}function ar(){y(),d("slurpAllLineEndings")}function Rt(){d("slurpAllLineEndings",!0)}function je(){T("</h"+g("headingRank")+">"),d("headingRank")}function Hr(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 Qt(){P(),lr()}function Wr(){d("ignoreEncode")}function lr(){e.allowDangerousHtml&&d("ignoreEncode",!0)}function Fi(){T("<em>")}function Ai(){T("<strong>")}function It(){d("inCodeText",!0),T("<code>")}function Hn(){d("inCodeText"),T("</code>")}function Er(){T("</em>")}function FO(){T("</strong>")}function AO(){P(),T("<hr />")}function Gb(Y){d("characterReferenceType",Y.type)}function $O(Y){let ne=this.sliceSerialize(Y),mt=g("characterReferenceType")?Gs(ne,g("characterReferenceType")==="characterReferenceMarkerNumeric"?10:16):xi(ne);E(D(mt)),d("characterReferenceType")}function BO(Y){let ne=this.sliceSerialize(Y);T('<a href="'+fn(ne,e.allowDangerousProtocol?void 0:KD)+'">'),E(D(ne)),T("</a>")}function jO(Y){let ne=this.sliceSerialize(Y);T('<a href="'+fn("mailto:"+ne)+'">'),E(D(ne)),T("</a>")}}o(rx,"compile");function ie(t,e,r,n){let i=n?n-1:Number.POSITIVE_INFINITY,s=0;return a;function a(c){return ee(c)?(t.enter(r),l(c)):e(c)}function l(c){return ee(c)&&s++<i?(t.consume(c),l):(t.exit(r),e(c))}}o(ie,"factorySpace");var GD={tokenize:J$};function J$(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(J$,"initializeContent");var JD={tokenize:X$},QD={tokenize:Z$};function X$(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 A=L;for(;A<e.events.length;)e.events[A][1].end={...D},A++;return Ke(e.events,P+1,0,e.events.slice(L)),e.events.length=A,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(QD,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(QD,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 A=e.events.length,F=A,z,C;for(;F--;)if(e.events[F][0]==="exit"&&e.events[F][1].type==="chunkFlow"){if(z){C=e.events[F][1].end;break}z=!0}for(x(n),D=A;D<e.events.length;)e.events[D][1].end={...C},D++;Ke(e.events,F+1,0,e.events.slice(A)),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(X$,"initializeDocument");function Z$(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(Z$,"tokenizeContainer");function Oi(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(Oi,"resolveAll");var fc={name:"attention",resolveAll:eB,tokenize:tB};function eB(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=Je(u,[["enter",t[n][1],e],["exit",t[n][1],e]])),u=Je(u,[["enter",i,e],["enter",a,e],["exit",a,e],["enter",s,e]]),u=Je(u,Oi(e.parser.constructs.insideSpan.null,t.slice(n+1,r),e)),u=Je(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=Je(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(eB,"resolveAllAttention");function tB(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(tB,"tokenizeAttention");function XD(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}o(XD,"movePoint");var nx={name:"autolink",tokenize:rB};function rB(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 tt(m)?(t.consume(m),a):m===64?r(m):u(m)}function a(m){return m===43||m===45||m===46||ze(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||ze(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||po(m)?r(m):(t.consume(m),c)}function u(m){return m===64?(t.consume(m),f):eT(m)?(t.consume(m),u):r(m)}function f(m){return ze(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||ze(m))&&n++<63){let d=m===45?h:p;return t.consume(m),d}return r(m)}}o(rB,"tokenizeAutolink");var yn={partial:!0,tokenize:nB};function nB(t,e,r){return n;function n(s){return ee(s)?ie(t,i,"linePrefix")(s):i(s)}function i(s){return s===null||V(s)?e(s):r(s)}}o(nB,"tokenizeBlankLine");var em={continuation:{tokenize:oB},exit:sB,name:"blockQuote",tokenize:iB};function iB(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 ee(a)?(t.enter("blockQuotePrefixWhitespace"),t.consume(a),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),e):(t.exit("blockQuotePrefix"),e(a))}}o(iB,"tokenizeBlockQuoteStart");function oB(t,e,r){let n=this;return i;function i(a){return ee(a)?ie(t,s,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):s(a)}function s(a){return t.attempt(em,e,r)(a)}}o(oB,"tokenizeBlockQuoteContinuation");function sB(t){t.exit("blockQuote")}o(sB,"exit");var tm={name:"characterEscape",tokenize:aB};function aB(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 rT(s)?(t.enter("characterEscapeValue"),t.consume(s),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):r(s)}}o(aB,"tokenizeCharacterEscape");var rm={name:"characterReference",tokenize:lB};function lB(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=ze,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=tT,f):(t.enter("characterReferenceValue"),s=7,a=Cl,f(p))}function f(p){if(p===59&&i){let h=t.exit("characterReferenceValue");return a===ze&&!xi(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(lB,"tokenizeCharacterReference");var ZD={partial:!0,tokenize:uB},nm={concrete:!0,name:"codeFenced",tokenize:cB};function cB(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 A=n.events[n.events.length-1];return s=A&&A[1].type==="linePrefix"?A[2].sliceSerialize(A[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"),ee(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(ZD,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)):ee(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,L,y)(D)}function y(D){return t.enter("lineEnding"),t.consume(D),t.exit("lineEnding"),x}function x(D){return s>0&&ee(D)?ie(t,T,"linePrefix",s+1)(D):T(D)}function T(D){return D===null||V(D)?t.check(ZD,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,A,F){let z=0;return C;function C(U){return D.enter("lineEnding"),D.consume(U),D.exit("lineEnding"),le}function le(U){return D.enter("codeFencedFence"),ee(U)?ie(D,j,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):j(U)}function j(U){return U===l?(D.enter("codeFencedFenceSequence"),N(U)):F(U)}function N(U){return U===l?(z++,D.consume(U),N):z>=a?(D.exit("codeFencedFenceSequence"),ee(U)?ie(D,R,"whitespace")(U):R(U)):F(U)}function R(U){return U===null||V(U)?(D.exit("codeFencedFence"),A(U)):F(U)}}}o(cB,"tokenizeCodeFenced");function uB(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(uB,"tokenizeNonLazyContinuation");var pc={name:"codeIndented",tokenize:pB},fB={partial:!0,tokenize:hB};function pB(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(fB,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(pB,"tokenizeCodeIndented");function hB(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(hB,"tokenizeFurtherStart");var ix={name:"codeText",previous:dB,resolve:mB,tokenize:gB};function mB(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(mB,"resolveCodeText");function dB(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}o(dB,"previous");function gB(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(gB,"tokenizeCodeText");var mc=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&&hc(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),hc(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),hc(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);hc(this.right,r.reverse())}else{let r=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);hc(this.left,r.reverse())}}};function hc(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(hc,"chunkedPush");function im(t){let e={},r=-1,n,i,s,a,l,c,u,f=new mc(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,yB(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(im,"subtokenize");function yB(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(yB,"subcontent");var ox={resolve:bB,tokenize:wB},xB={partial:!0,tokenize:SB};function bB(t){return im(t),t}o(bB,"resolveContent");function wB(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(xB,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(wB,"tokenizeContent");function SB(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(SB,"tokenizeContinuation");function om(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||po(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||ge(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||po(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(om,"factoryDestination");function sm(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=!ee(m)),m===92?h:p)}function h(m){return m===91||m===92||m===93?(t.consume(m),l++,p):p(m)}}o(sm,"factoryLabel");function am(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(am,"factoryTitle");function No(t,e){let r;return n;function n(i){return V(i)?(t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),r=!0,n):ee(i)?ie(t,n,r?"linePrefix":"lineSuffix")(i):e(i)}}o(No,"factoryWhitespace");var sx={name:"definition",tokenize:kB},vB={partial:!0,tokenize:TB};function kB(t,e,r){let n=this,i;return s;function s(m){return t.enter("definition"),a(m)}function a(m){return sm.call(n,t,l,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function l(m){return i=We(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 ge(m)?No(t,u)(m):u(m)}function u(m){return om(t,f,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function f(m){return t.attempt(vB,p,p)(m)}function p(m){return ee(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(kB,"tokenizeDefinition");function TB(t,e,r){return n;function n(l){return ge(l)?No(t,i)(l):r(l)}function i(l){return am(t,s,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function s(l){return ee(l)?ie(t,a,"whitespace")(l):a(l)}function a(l){return l===null||V(l)?e(l):r(l)}}o(TB,"tokenizeTitleBefore");var ax={name:"hardBreakEscape",tokenize:EB};function EB(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(EB,"tokenizeHardBreakEscape");var lx={name:"headingAtx",resolve:DB,tokenize:CB};function DB(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(DB,"resolveHeadingAtx");function CB(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||ge(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)):ee(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||ge(f)?(t.exit("atxHeadingText"),l(f)):(t.consume(f),u)}}o(CB,"tokenizeHeadingAtx");var eC=["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"],cx=["pre","script","style","textarea"];var ux={concrete:!0,name:"htmlFlow",resolveTo:MB,tokenize:NB},OB={partial:!0,tokenize:LB},IB={partial:!0,tokenize:PB};function MB(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(MB,"resolveToHtmlFlow");function NB(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):tt(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):tt(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 Re="CDATA[";return k===Re.charCodeAt(l++)?(t.consume(k),l===Re.length?n.interrupt?e:j:d):r(k)}function g(k){return tt(k)?(t.consume(k),a=String.fromCharCode(k),y):r(k)}function y(k){if(k===null||k===47||k===62||ge(k)){let Re=k===47,Ye=a.toLowerCase();return!Re&&!s&&cx.includes(Ye)?(i=1,n.interrupt?e(k):j(k)):eC.includes(a.toLowerCase())?(i=6,Re?(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||ze(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 ee(k)?(t.consume(k),T):C(k)}function E(k){return k===47?(t.consume(k),C):k===58||k===95||tt(k)?(t.consume(k),L):ee(k)?(t.consume(k),E):C(k)}function L(k){return k===45||k===46||k===58||k===95||ze(k)?(t.consume(k),L):P(k)}function P(k){return k===61?(t.consume(k),D):ee(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,A):ee(k)?(t.consume(k),D):F(k)}function A(k){return k===c?(t.consume(k),c=null,z):k===null||V(k)?r(k):(t.consume(k),A)}function F(k){return k===null||k===34||k===39||k===47||k===60||k===61||k===62||k===96||ge(k)?P(k):(t.consume(k),F)}function z(k){return k===47||k===62||ee(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):ee(k)?(t.consume(k),le):r(k)}function j(k){return k===45&&i===2?(t.consume(k),W):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(OB,ke,N)(k)):k===null||V(k)?(t.exit("htmlFlowData"),N(k)):(t.consume(k),j)}function N(k){return t.check(IB,R,ke)(k)}function R(k){return t.enter("lineEnding"),t.consume(k),t.exit("lineEnding"),U}function U(k){return k===null||V(k)?N(k):(t.enter("htmlFlowData"),j(k))}function W(k){return k===45?(t.consume(k),w):j(k)}function K(k){return k===47?(t.consume(k),a="",Z):j(k)}function Z(k){if(k===62){let Re=a.toLowerCase();return cx.includes(Re)?(t.consume(k),xe):j(k)}return tt(k)&&a.length<8?(t.consume(k),a+=String.fromCharCode(k),Z):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(NB,"tokenizeHtmlFlow");function PB(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(PB,"tokenizeNonLazyContinuationStart");function LB(t,e,r){return n;function n(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),t.attempt(yn,e,r)}}o(LB,"tokenizeBlankLineBefore");var fx={name:"htmlText",tokenize:_B};function _B(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):tt(w)?(t.consume(w),F):r(w)}function u(w){return w===45?(t.consume(w),f):w===91?(t.consume(w),s=0,d):tt(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?W(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?W(w):w===93?(t.consume(w),x):g(w)}function T(w){return w===null||w===62?W(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?W(w):E(w)}function P(w){return tt(w)?(t.consume(w),D):r(w)}function D(w){return w===45||ze(w)?(t.consume(w),D):A(w)}function A(w){return V(w)?(a=A,K(w)):ee(w)?(t.consume(w),A):W(w)}function F(w){return w===45||ze(w)?(t.consume(w),F):w===47||w===62||ge(w)?z(w):r(w)}function z(w){return w===47?(t.consume(w),W):w===58||w===95||tt(w)?(t.consume(w),C):V(w)?(a=z,K(w)):ee(w)?(t.consume(w),z):W(w)}function C(w){return w===45||w===46||w===58||w===95||ze(w)?(t.consume(w),C):le(w)}function le(w){return w===61?(t.consume(w),j):V(w)?(a=le,K(w)):ee(w)?(t.consume(w),le):z(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)):ee(w)?(t.consume(w),j):(t.consume(w),R)}function N(w){return w===i?(t.consume(w),i=void 0,U):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||ge(w)?z(w):(t.consume(w),R)}function U(w){return w===47||w===62||ge(w)?z(w):r(w)}function W(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"),Z}function Z(w){return ee(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(_B,"tokenizeHtmlText");var Po={name:"labelEnd",resolveAll:$B,resolveTo:BB,tokenize:jB},RB={tokenize:UB},FB={tokenize:zB},AB={tokenize:HB};function $B(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($B,"resolveAllLabelEnd");function BB(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=Je(l,t.slice(s+1,s+n+3)),l=Je(l,[["enter",f,e]]),l=Je(l,Oi(e.parser.constructs.insideSpan.null,t.slice(s+n+4,a-3),e)),l=Je(l,[["exit",f,e],t[a-2],t[a-1],["exit",u,e]]),l=Je(l,t.slice(a+1)),l=Je(l,[["exit",c,e]]),Ke(t,s,t.length,l),t}o(BB,"resolveToLabelEnd");function jB(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(We(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(RB,f,a?f:p)(h):h===91?t.attempt(FB,f,a?u:p)(h):a?f(h):p(h)}function u(h){return t.attempt(AB,f,p)(h)}function f(h){return e(h)}function p(h){return s._balanced=!0,r(h)}}o(jB,"tokenizeLabelEnd");function UB(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 ge(p)?No(t,s)(p):s(p)}function s(p){return p===41?f(p):om(t,a,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function a(p){return ge(p)?No(t,c)(p):f(p)}function l(p){return r(p)}function c(p){return p===34||p===39||p===40?am(t,u,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):f(p)}function u(p){return ge(p)?No(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(UB,"tokenizeResource");function zB(t,e,r){let n=this;return i;function i(l){return sm.call(n,t,s,a,"reference","referenceMarker","referenceString")(l)}function s(l){return n.parser.defined.includes(We(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?e(l):r(l)}function a(l){return r(l)}}o(zB,"tokenizeReferenceFull");function HB(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(HB,"tokenizeReferenceCollapsed");var px={name:"labelStartImage",resolveAll:Po.resolveAll,tokenize:WB};function WB(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(WB,"tokenizeLabelStartImage");var hx={name:"labelStartLink",resolveAll:Po.resolveAll,tokenize:qB};function qB(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(qB,"tokenizeLabelStartLink");var dc={name:"lineEnding",tokenize:YB};function YB(t,e){return r;function r(n){return t.enter("lineEnding"),t.consume(n),t.exit("lineEnding"),ie(t,e,"linePrefix")}}o(YB,"tokenizeLineEnding");var Lo={name:"thematicBreak",tokenize:VB};function VB(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"),ee(u)?ie(t,l,"whitespace")(u):l(u))}}o(VB,"tokenizeThematicBreak");var Ct={continuation:{tokenize:JB},exit:ZB,name:"list",tokenize:QB},KB={partial:!0,tokenize:ej},GB={partial:!0,tokenize:XB};function QB(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:Cl(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(Lo,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 Cl(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(yn,n.interrupt?r:f,t.attempt(KB,h,p))}function f(m){return n.containerState.initialBlankLine=!0,s++,h(m)}function p(m){return ee(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(QB,"tokenizeListStart");function JB(t,e,r){let n=this;return n.containerState._closeFlow=void 0,t.check(yn,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||!ee(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(GB,e,a)(l))}o(s,"notBlank");function a(l){return n.containerState._closeFlow=!0,n.interrupt=void 0,ie(t,t.attempt(Ct,e,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}o(a,"notInCurrentItem")}o(JB,"tokenizeListContinuation");function XB(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(XB,"tokenizeIndent");function ZB(t){t.exit(this.containerState.type)}o(ZB,"tokenizeListEnd");function ej(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!ee(s)&&a&&a[1].type==="listItemPrefixWhitespace"?e(s):r(s)}}o(ej,"tokenizeListItemPrefixWhitespace");var lm={name:"setextUnderline",resolveTo:tj,tokenize:rj};function tj(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(tj,"resolveToSetextUnderline");function rj(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"),ee(u)?ie(t,c,"lineSuffix")(u):c(u))}function c(u){return u===null||V(u)?(t.exit("setextHeadingLine"),e(u)):r(u)}}o(rj,"tokenizeSetextUnderline");var tC={tokenize:nj};function nj(t){let e=this,r=t.attempt(yn,n,t.attempt(this.parser.constructs.flowInitial,i,ie(t,t.attempt(this.parser.constructs.flow,i,t.attempt(ox,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(nj,"initializeFlow");var iC={resolveAll:nC()},oC=rC("string"),sC=rC("text");function rC(t){return{resolveAll:nC(t==="text"?ij: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(rC,"initializeFactory");function nC(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(nC,"createResolver");function ij(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(ij,"resolveAllLineSuffixes");var mx={};se(mx,{attentionMarkers:()=>pj,contentInitial:()=>sj,disable:()=>hj,document:()=>oj,flow:()=>lj,flowInitial:()=>aj,insideSpan:()=>fj,string:()=>cj,text:()=>uj});var oj={42:Ct,43:Ct,45:Ct,48:Ct,49:Ct,50:Ct,51:Ct,52:Ct,53:Ct,54:Ct,55:Ct,56:Ct,57:Ct,62:em},sj={91:sx},aj={[-2]:pc,[-1]:pc,32:pc},lj={35:lx,42:Lo,45:[lm,Lo],60:ux,61:lm,95:Lo,96:nm,126:nm},cj={38:rm,92:tm},uj={[-5]:dc,[-4]:dc,[-3]:dc,33:px,38:rm,42:fc,60:[nx,fx],91:hx,92:[ax,tm],93:Po,95:fc,96:ix},fj={null:[fc,iC]},pj={null:[42,95]},hj={null:[]};function aC(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:z(A),check:z(F),consume:L,enter:P,exit:D,interrupt:z(F,{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=Je(a,N),T(),a[a.length-1]!==null?[]:(C(e,0),f.events=Oi(s,f.events,f),f.events)}o(m,"write");function d(N,R){return dj(g(N),R)}o(d,"sliceSerialize");function g(N){return mj(a,N)}o(g,"sliceStream");function y(){let{_bufferIndex:N,_index:R,line:U,column:W,offset:K}=n;return{_bufferIndex:N,_index:R,line:U,column:W,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 U=R||{};return U.type=N,U.start=y(),f.events.push(["enter",U,f]),l.push(U),U}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 A(N,R){C(N,R.from)}o(A,"onsuccessfulconstruct");function F(N,R){R.restore()}o(F,"onsuccessfulcheck");function z(N,R){return U;function U(W,K,Z){let ue,w,xe,ke;return Array.isArray(W)?Re(W):"tokenize"in W?Re([W]):k(W);function k(v){return I;function I(M){let B=M!==null&&v[M],re=M!==null&&v.null,_e=[...Array.isArray(B)?B:B?[B]:[],...Array.isArray(re)?re:re?[re]:[]];return Re(_e)(M)}}function Re(v){return ue=v,w=0,v.length===0?Z:Ye(v[w])}function Ye(v){return I;function I(M){return ke=le(),xe=v,v.partial||(f.currentConstruct=v),v.name&&f.parser.constructs.disable.null.includes(v.name)?O(M):v.tokenize.call(R?Object.assign(Object.create(f),R):f,u,Kt,O)(M)}}function Kt(v){return c=!0,N(xe,ke),K}function O(v){return c=!0,ke.restore(),++w<ue.length?Ye(ue[w]):Z}}}o(z,"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,U=f.currentConstruct,W=f.events.length,K=Array.from(l);return{from:W,restore:Z};function Z(){n=N,f.previous=R,f.currentConstruct=U,f.events.length=W,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(aC,"createTokenizer");function mj(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(mj,"sliceChunks");function dj(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
+ `,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=qh(e),n=ga(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=qh(e),n=ga(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 ID(t){let e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new Di||null,prettyErrors:e}}o(ID,"parseOptions");function Vh(t,e={}){let{lineCounter:r,prettyErrors:n}=ID(e),i=new Un(r?.addNewLine),s=new Bn(e),a=Array.from(s.compose(i.parse(t)));if(n&&r)for(let l of a)l.errors.forEach(fa(t,r)),l.warnings.forEach(fa(t,r));return a.length>0?a:Object.assign([],{empty:!0},s.streamInfo())}o(Vh,"parseAllDocuments");function ac(t,e={}){let{lineCounter:r,prettyErrors:n}=ID(e),i=new Un(r?.addNewLine),s=new Bn(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 Pt(l.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return n&&r&&(a.errors.forEach(fa(t,r)),a.warnings.forEach(fa(t,r))),a}o(ac,"parseDocument");function Kh(t,e,r){let n;typeof e=="function"?n=e:r===void 0&&e&&typeof e=="object"&&(r=e);let i=ac(t,r);if(!i)return null;if(i.warnings.forEach(s=>zl(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(Kh,"parse");function Gh(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 Wt(t)&&!n?t.toString(r):new vr(t,n,r).toString(r)}o(Gh,"stringify");var M$=qy;var P$=o(async t=>No.parse(t),"yamlStringToObject"),L$=o(async t=>No.stringify(t),"objectToYamlString"),_$=o(async t=>No.parseDocument(t),"getYamlDocFromString");function Yy(t){if(t)throw t}o(Yy,"bail");function lc(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(lc,"isPlainObject");function Vy(){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?BD(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(Vy,"trough");function BD(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(BD,"wrap");function Oi(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?jD(t.position):"start"in t||"end"in t?jD(t):"line"in t||"column"in t?Ky(t):""}o(Oi,"stringifyPosition");function Ky(t){return UD(t&&t.line)+":"+UD(t&&t.column)}o(Ky,"point");function jD(t){return Ky(t&&t.start)+"-"+Ky(t&&t.end)}o(jD,"position");function UD(t){return t&&typeof t=="number"?t:1}o(UD,"index");var lt=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=Oi(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}};lt.prototype.file="",lt.prototype.name="",lt.prototype.reason="",lt.prototype.message="",lt.prototype.stack="",lt.prototype.column=void 0,lt.prototype.line=void 0,lt.prototype.ancestors=void 0,lt.prototype.cause=void 0,lt.prototype.fatal=void 0,lt.prototype.place=void 0,lt.prototype.ruleId=void 0,lt.prototype.source=void 0;var Br={basename:R$,dirname:F$,extname:A$,join:$$,sep:"/"};function R$(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');cc(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(R$,"basename");function F$(t){if(cc(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(F$,"dirname");function A$(t){cc(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(A$,"extname");function $$(...t){let e=-1,r;for(;++e<t.length;)cc(t[e]),t[e]&&(r=r===void 0?t[e]:r+"/"+t[e]);return r===void 0?".":B$(r)}o($$,"join");function B$(t){cc(t);let e=t.codePointAt(0)===47,r=j$(t,!e);return r.length===0&&!e&&(r="."),r.length>0&&t.codePointAt(t.length-1)===47&&(r+="/"),e?"/"+r:r}o(B$,"normalize");function j$(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(j$,"normalizeString");function cc(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}o(cc,"assertPath");var zD={cwd:U$};function U$(){return"/"}o(U$,"cwd");function xa(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}o(xa,"isUrl");function HD(t){if(typeof t=="string")t=new URL(t);else if(!xa(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 z$(t)}o(HD,"urlToPath");function z$(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(z$,"getPathFromURLPosix");var Gy=["history","path","basename","stem","extname","dirname"],uc=class{static{o(this,"VFile")}constructor(e){let r;e?xa(e)?r={path:e}:typeof e=="string"||H$(e)?r={value:e}:r=e:r={},this.cwd="cwd"in r?"":zD.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Gy.length;){let s=Gy[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)Gy.includes(i)||(this[i]=r[i])}get basename(){return typeof this.path=="string"?Br.basename(this.path):void 0}set basename(e){Jy(e,"basename"),Qy(e,"basename"),this.path=Br.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?Br.dirname(this.path):void 0}set dirname(e){WD(this.basename,"dirname"),this.path=Br.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?Br.extname(this.path):void 0}set extname(e){if(Qy(e,"extname"),WD(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=Br.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){xa(e)&&(e=HD(e)),Jy(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?Br.basename(this.path,this.extname):void 0}set stem(e){Jy(e,"stem"),Qy(e,"stem"),this.path=Br.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 lt(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 Qy(t,e){if(t&&t.includes(Br.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+Br.sep+"`")}o(Qy,"assertPart");function Jy(t,e){if(!t)throw new Error("`"+e+"` cannot be empty")}o(Jy,"assertNonEmpty");function WD(t,e){if(!t)throw new Error("Setting `"+e+"` requires `path` to be set too")}o(WD,"assertPath");function H$(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}o(H$,"isUint8Array");var qD=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 Xh=qn($D(),1),W$={}.hasOwnProperty,Xy=class t extends qD{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=Vy()}copy(){let e=new t,r=-1;for(;++r<this.attachers.length;){let n=this.attachers[r];e.use(...n)}return e.data((0,Xh.default)(!0,{},this.namespace)),e}data(e,r){return typeof e=="string"?arguments.length===2?(tx("data",this.frozen),this.namespace[e]=r,this):W$.call(this.namespace,e)&&this.namespace[e]||void 0:e?(tx("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=Jh(e),n=this.parser||this.Parser;return Zy("parse",n),n(String(r),r)}process(e,r){let n=this;return this.freeze(),Zy("process",this.parser||this.Parser),ex("process",this.compiler||this.Compiler),r?i(void 0,r):new Promise(i);function i(s,a){let l=Jh(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);Y$(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(),Zy("processSync",this.parser||this.Parser),ex("processSync",this.compiler||this.Compiler),this.process(e,i),VD("processSync","process",r),n;function i(s,a){r=!0,Yy(s),n=a}o(i,"realDone")}run(e,r,n){YD(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=Jh(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),VD("runSync","run",n),i;function s(a,l){Yy(a),i=l,n=!0}o(s,"realDone")}stringify(e,r){this.freeze();let n=Jh(r),i=this.compiler||this.Compiler;return ex("stringify",i),YD(e),i(e,n)}use(e,...r){let n=this.attachers,i=this.namespace;if(tx("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,Xh.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];lc(g)&&lc(m)&&(m=(0,Xh.default)(!0,g,m)),n[h]=[u,m,...d]}}}},fc=new Xy().freeze();function Zy(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}o(Zy,"assertParser");function ex(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}o(ex,"assertCompiler");function tx(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(tx,"assertUnfrozen");function YD(t){if(!lc(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}o(YD,"assertNode");function VD(t,e,r){if(!r)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}o(VD,"assertDone");function Jh(t){return q$(t)?t:new uc(t)}o(Jh,"vfile");function q$(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}o(q$,"looksLikeAVFile");function Y$(t){return typeof t=="string"||V$(t)}o(Y$,"looksLikeAValue");function V$(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}o(V$,"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 Je(t,e){return t.length>0?(Ke(t,t.length,0,e),t):e}o(Je,"push");var rx={}.hasOwnProperty;function Zh(t){let e={},r=-1;for(;++r<t.length;)K$(e,t[r]);return e}o(Zh,"combineExtensions");function K$(t,e){let r;for(r in e){let i=(rx.call(t,r)?t[r]:void 0)||(t[r]={}),s=e[r],a;if(s)for(a in s){rx.call(i,a)||(i[a]=[]);let l=s[a];G$(i[a],Array.isArray(l)?l:l?[l]:[])}}}o(K$,"syntaxExtension");function G$(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(G$,"constructs");function em(t){let e={},r=-1;for(;++r<t.length;)Q$(e,t[r]);return e}o(em,"combineHtmlExtensions");function Q$(t,e){let r;for(r in e){let i=(rx.call(t,r)?t[r]:void 0)||(t[r]={}),s=e[r],a;if(s)for(a in s)i[a]=s[a]}}o(Q$,"htmlExtension");function We(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}o(We,"normalizeIdentifier");var KD={}.hasOwnProperty,GD=/^(https?|ircs?|mailto|xmpp)$/i,J$=/^https?$/i;function nx(t){let e=t||{},r=!0,n={},i=[[]],s=[],a=[],c=em([{enter:{blockQuote:U,codeFenced:ue,codeFencedFenceInfo:y,codeFencedFenceMeta:y,codeIndented:ke,codeText:It,content:zr,definition:Pe,definitionDestinationString:_t,definitionLabelString:y,definitionTitleString:y,emphasis:Ai,htmlFlow:Qt,htmlText:lr,image:Re,label:y,link:Ye,listItemMarker:le,listItemValue:C,listOrdered:F,listUnordered:z,paragraph:K,reference:y,resource:I,resourceDestinationString:M,resourceTitleString:y,setextHeading:ar,strong:$i},exit:{atxHeading:je,atxHeadingSequence:Gt,autolinkEmail:UO,autolinkProtocol:jO,blockQuote:W,characterEscapeValue:q,characterReferenceMarkerHexadecimal:Qb,characterReferenceMarkerNumeric:Qb,characterReferenceValue:BO,codeFenced:k,codeFencedFence:xe,codeFencedFenceInfo:w,codeFencedFenceMeta:A,codeFlowValue:fe,codeIndented:k,codeText:Wn,codeTextData:q,data:q,definition:Tr,definitionDestinationString:it,definitionLabelString:Te,definitionTitleString:Ot,emphasis:Er,hardBreakEscape:Ee,hardBreakTrailing:Ee,htmlFlow:Wr,htmlFlowData:q,htmlText:Wr,htmlTextData:q,image:_e,label:O,labelText:Kt,lineEnding:oe,link:_e,listOrdered:j,listUnordered:N,paragraph:Z,reference:A,referenceString:v,resource:A,resourceDestinationString:B,resourceTitleString:re,setextHeading:_,setextHeadingLineSequence:Hr,setextHeadingText:Rt,strong:AO,thematicBreak:$O}},...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,mt=0,Dr=[],qr=[],vn=[];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"?Dr.push(ne):m(Y.slice(Dr.pop(),ne))),Y[ne][1].type==="definition"&&(Y[ne][0]==="enter"?(vn=Je(vn,Y.slice(mt,ne)),mt=ne):(qr=Je(qr,Y.slice(mt,ne+1)),mt=ne+1));qr=Je(qr,vn),qr=Je(qr,Y.slice(mt)),ne=-1;let Yr=qr;for(c.enter.null&&c.enter.null.call(f);++ne<Y.length;){let Jb=c[Yr[ne][0]],Xb=Yr[ne][1].type,Zb=Jb[Xb];KD.call(Jb,Xb)&&Zb&&Zb.call({sliceSerialize:Yr[ne][2].sliceSerialize,...f},Yr[ne][1])}return c.exit.null&&c.exit.null.call(f),i[0].join("")}function m(Y){let ne=Y.length,mt=0,Dr=0,qr=!1,vn;for(;++mt<ne;){let Yr=Y[mt];if(Yr[1]._container)vn=void 0,Yr[0]==="enter"?Dr++:Dr--;else switch(Yr[1].type){case"listItemPrefix":{Yr[0]==="exit"&&(vn=!0);break}case"linePrefix":break;case"lineEndingBlank":{Yr[0]==="enter"&&!Dr&&(vn?vn=void 0:qr=!0);break}default:vn=void 0}}Y[0][1]._loose=qr}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 L(){E(p||`
273
+ `)}function P(){let Y=i[i.length-1],ne=Y[Y.length-1],mt=ne?ne.charCodeAt(ne.length-1):null;mt===10||mt===13||mt===null||L()}function D(Y){return g("ignoreEncode")?Y:Xp(Y)}function A(){x()}function F(Y){a.push(!Y._loose),P(),T("<ol"),d("expectFirstItem",!0)}function z(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(),L(),T("</ol>")}function N(){R(),a.pop(),L(),T("</ul>")}function R(){g("lastWasTag")&&!g("slurpAllLineEndings")&&P(),T("</li>"),d("slurpAllLineEndings")}function U(){a.push(!1),P(),T("<blockquote>")}function W(){a.pop(),P(),T("</blockquote>"),d("slurpAllLineEndings")}function K(){a[a.length-1]||(P(),T("<p>")),d("slurpAllLineEndings")}function Z(){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 Re(){s.push({image:!0}),r=void 0}function Ye(){s.push({})}function Kt(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 I(){y(),s[s.length-1].destination=""}function M(){y(),d("ignoreEncode",!0)}function B(){s[s.length-1].destination=x(),d("ignoreEncode")}function re(){s[s.length-1].title=x()}function _e(){let Y=s.length-1,ne=s[Y],mt=ne.referenceId||ne.labelId,Dr=ne.destination===void 0?n[We(mt)]:ne;for(r=!0;Y--;)if(s[Y].image){r=void 0;break}ne.image?(T('<img src="'+fn(Dr.destination,e.allowDangerousProtocol?void 0:J$)+'" alt="'),E(ne.label),T('"')):T('<a href="'+fn(Dr.destination,e.allowDangerousProtocol?void 0:GD)+'"'),T(Dr.title?' title="'+Dr.title+'"':""),ne.image?T(" />"):(T(">"),E(ne.label),T("</a>")),s.pop()}function Pe(){y(),s.push({})}function Te(Y){x(),s[s.length-1].labelId=this.sliceSerialize(Y)}function _t(){y(),d("ignoreEncode",!0)}function it(){s[s.length-1].destination=x(),d("ignoreEncode")}function Ot(){s[s.length-1].title=x()}function Tr(){let Y=s[s.length-1],ne=We(Y.labelId);x(),KD.call(n,ne)||(n[ne]=s[s.length-1]),s.pop()}function zr(){d("slurpAllLineEndings",!0)}function Gt(Y){g("headingRank")||(d("headingRank",this.sliceSerialize(Y).length),P(),T("<h"+g("headingRank")+">"))}function ar(){y(),d("slurpAllLineEndings")}function Rt(){d("slurpAllLineEndings",!0)}function je(){T("</h"+g("headingRank")+">"),d("headingRank")}function Hr(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 Qt(){P(),lr()}function Wr(){d("ignoreEncode")}function lr(){e.allowDangerousHtml&&d("ignoreEncode",!0)}function Ai(){T("<em>")}function $i(){T("<strong>")}function It(){d("inCodeText",!0),T("<code>")}function Wn(){d("inCodeText"),T("</code>")}function Er(){T("</em>")}function AO(){T("</strong>")}function $O(){P(),T("<hr />")}function Qb(Y){d("characterReferenceType",Y.type)}function BO(Y){let ne=this.sliceSerialize(Y),mt=g("characterReferenceType")?Qs(ne,g("characterReferenceType")==="characterReferenceMarkerNumeric"?10:16):bi(ne);E(D(mt)),d("characterReferenceType")}function jO(Y){let ne=this.sliceSerialize(Y);T('<a href="'+fn(ne,e.allowDangerousProtocol?void 0:GD)+'">'),E(D(ne)),T("</a>")}function UO(Y){let ne=this.sliceSerialize(Y);T('<a href="'+fn("mailto:"+ne)+'">'),E(D(ne)),T("</a>")}}o(nx,"compile");function ie(t,e,r,n){let i=n?n-1:Number.POSITIVE_INFINITY,s=0;return a;function a(c){return ee(c)?(t.enter(r),l(c)):e(c)}function l(c){return ee(c)&&s++<i?(t.consume(c),l):(t.exit(r),e(c))}}o(ie,"factorySpace");var QD={tokenize:X$};function X$(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(X$,"initializeContent");var XD={tokenize:Z$},JD={tokenize:eB};function Z$(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 A=L;for(;A<e.events.length;)e.events[A][1].end={...D},A++;return Ke(e.events,P+1,0,e.events.slice(L)),e.events.length=A,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(JD,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(JD,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 A=e.events.length,F=A,z,C;for(;F--;)if(e.events[F][0]==="exit"&&e.events[F][1].type==="chunkFlow"){if(z){C=e.events[F][1].end;break}z=!0}for(x(n),D=A;D<e.events.length;)e.events[D][1].end={...C},D++;Ke(e.events,F+1,0,e.events.slice(A)),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(Z$,"initializeDocument");function eB(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(eB,"tokenizeContainer");function Ii(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(Ii,"resolveAll");var pc={name:"attention",resolveAll:tB,tokenize:rB};function tB(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};ZD(p,-c),ZD(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=Je(u,[["enter",t[n][1],e],["exit",t[n][1],e]])),u=Je(u,[["enter",i,e],["enter",a,e],["exit",a,e],["enter",s,e]]),u=Je(u,Ii(e.parser.constructs.insideSpan.null,t.slice(n+1,r),e)),u=Je(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=Je(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(tB,"resolveAllAttention");function rB(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(rB,"tokenizeAttention");function ZD(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}o(ZD,"movePoint");var ix={name:"autolink",tokenize:nB};function nB(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 tt(m)?(t.consume(m),a):m===64?r(m):u(m)}function a(m){return m===43||m===45||m===46||ze(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||ze(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||ho(m)?r(m):(t.consume(m),c)}function u(m){return m===64?(t.consume(m),f):tT(m)?(t.consume(m),u):r(m)}function f(m){return ze(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||ze(m))&&n++<63){let d=m===45?h:p;return t.consume(m),d}return r(m)}}o(nB,"tokenizeAutolink");var yn={partial:!0,tokenize:iB};function iB(t,e,r){return n;function n(s){return ee(s)?ie(t,i,"linePrefix")(s):i(s)}function i(s){return s===null||V(s)?e(s):r(s)}}o(iB,"tokenizeBlankLine");var tm={continuation:{tokenize:sB},exit:aB,name:"blockQuote",tokenize:oB};function oB(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 ee(a)?(t.enter("blockQuotePrefixWhitespace"),t.consume(a),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),e):(t.exit("blockQuotePrefix"),e(a))}}o(oB,"tokenizeBlockQuoteStart");function sB(t,e,r){let n=this;return i;function i(a){return ee(a)?ie(t,s,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):s(a)}function s(a){return t.attempt(tm,e,r)(a)}}o(sB,"tokenizeBlockQuoteContinuation");function aB(t){t.exit("blockQuote")}o(aB,"exit");var rm={name:"characterEscape",tokenize:lB};function lB(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 nT(s)?(t.enter("characterEscapeValue"),t.consume(s),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):r(s)}}o(lB,"tokenizeCharacterEscape");var nm={name:"characterReference",tokenize:cB};function cB(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=ze,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=rT,f):(t.enter("characterReferenceValue"),s=7,a=Ol,f(p))}function f(p){if(p===59&&i){let h=t.exit("characterReferenceValue");return a===ze&&!bi(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(cB,"tokenizeCharacterReference");var eC={partial:!0,tokenize:fB},im={concrete:!0,name:"codeFenced",tokenize:uB};function uB(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 A=n.events[n.events.length-1];return s=A&&A[1].type==="linePrefix"?A[2].sliceSerialize(A[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"),ee(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(eC,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)):ee(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,L,y)(D)}function y(D){return t.enter("lineEnding"),t.consume(D),t.exit("lineEnding"),x}function x(D){return s>0&&ee(D)?ie(t,T,"linePrefix",s+1)(D):T(D)}function T(D){return D===null||V(D)?t.check(eC,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,A,F){let z=0;return C;function C(U){return D.enter("lineEnding"),D.consume(U),D.exit("lineEnding"),le}function le(U){return D.enter("codeFencedFence"),ee(U)?ie(D,j,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):j(U)}function j(U){return U===l?(D.enter("codeFencedFenceSequence"),N(U)):F(U)}function N(U){return U===l?(z++,D.consume(U),N):z>=a?(D.exit("codeFencedFenceSequence"),ee(U)?ie(D,R,"whitespace")(U):R(U)):F(U)}function R(U){return U===null||V(U)?(D.exit("codeFencedFence"),A(U)):F(U)}}}o(uB,"tokenizeCodeFenced");function fB(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(fB,"tokenizeNonLazyContinuation");var hc={name:"codeIndented",tokenize:hB},pB={partial:!0,tokenize:mB};function hB(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(pB,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(hB,"tokenizeCodeIndented");function mB(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(mB,"tokenizeFurtherStart");var ox={name:"codeText",previous:gB,resolve:dB,tokenize:yB};function dB(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(dB,"resolveCodeText");function gB(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}o(gB,"previous");function yB(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(yB,"tokenizeCodeText");var dc=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&&mc(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),mc(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),mc(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);mc(this.right,r.reverse())}else{let r=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);mc(this.left,r.reverse())}}};function mc(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(mc,"chunkedPush");function om(t){let e={},r=-1,n,i,s,a,l,c,u,f=new dc(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,xB(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(om,"subtokenize");function xB(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(xB,"subcontent");var sx={resolve:wB,tokenize:SB},bB={partial:!0,tokenize:vB};function wB(t){return om(t),t}o(wB,"resolveContent");function SB(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(bB,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(SB,"tokenizeContent");function vB(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(vB,"tokenizeContinuation");function sm(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||ho(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||ge(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||ho(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(sm,"factoryDestination");function am(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=!ee(m)),m===92?h:p)}function h(m){return m===91||m===92||m===93?(t.consume(m),l++,p):p(m)}}o(am,"factoryLabel");function lm(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(lm,"factoryTitle");function Po(t,e){let r;return n;function n(i){return V(i)?(t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),r=!0,n):ee(i)?ie(t,n,r?"linePrefix":"lineSuffix")(i):e(i)}}o(Po,"factoryWhitespace");var ax={name:"definition",tokenize:TB},kB={partial:!0,tokenize:EB};function TB(t,e,r){let n=this,i;return s;function s(m){return t.enter("definition"),a(m)}function a(m){return am.call(n,t,l,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function l(m){return i=We(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 ge(m)?Po(t,u)(m):u(m)}function u(m){return sm(t,f,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function f(m){return t.attempt(kB,p,p)(m)}function p(m){return ee(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(TB,"tokenizeDefinition");function EB(t,e,r){return n;function n(l){return ge(l)?Po(t,i)(l):r(l)}function i(l){return lm(t,s,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function s(l){return ee(l)?ie(t,a,"whitespace")(l):a(l)}function a(l){return l===null||V(l)?e(l):r(l)}}o(EB,"tokenizeTitleBefore");var lx={name:"hardBreakEscape",tokenize:DB};function DB(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(DB,"tokenizeHardBreakEscape");var cx={name:"headingAtx",resolve:CB,tokenize:OB};function CB(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(CB,"resolveHeadingAtx");function OB(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||ge(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)):ee(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||ge(f)?(t.exit("atxHeadingText"),l(f)):(t.consume(f),u)}}o(OB,"tokenizeHeadingAtx");var tC=["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"],ux=["pre","script","style","textarea"];var fx={concrete:!0,name:"htmlFlow",resolveTo:NB,tokenize:PB},IB={partial:!0,tokenize:_B},MB={partial:!0,tokenize:LB};function NB(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(NB,"resolveToHtmlFlow");function PB(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):tt(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):tt(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 Re="CDATA[";return k===Re.charCodeAt(l++)?(t.consume(k),l===Re.length?n.interrupt?e:j:d):r(k)}function g(k){return tt(k)?(t.consume(k),a=String.fromCharCode(k),y):r(k)}function y(k){if(k===null||k===47||k===62||ge(k)){let Re=k===47,Ye=a.toLowerCase();return!Re&&!s&&ux.includes(Ye)?(i=1,n.interrupt?e(k):j(k)):tC.includes(a.toLowerCase())?(i=6,Re?(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||ze(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 ee(k)?(t.consume(k),T):C(k)}function E(k){return k===47?(t.consume(k),C):k===58||k===95||tt(k)?(t.consume(k),L):ee(k)?(t.consume(k),E):C(k)}function L(k){return k===45||k===46||k===58||k===95||ze(k)?(t.consume(k),L):P(k)}function P(k){return k===61?(t.consume(k),D):ee(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,A):ee(k)?(t.consume(k),D):F(k)}function A(k){return k===c?(t.consume(k),c=null,z):k===null||V(k)?r(k):(t.consume(k),A)}function F(k){return k===null||k===34||k===39||k===47||k===60||k===61||k===62||k===96||ge(k)?P(k):(t.consume(k),F)}function z(k){return k===47||k===62||ee(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):ee(k)?(t.consume(k),le):r(k)}function j(k){return k===45&&i===2?(t.consume(k),W):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(IB,ke,N)(k)):k===null||V(k)?(t.exit("htmlFlowData"),N(k)):(t.consume(k),j)}function N(k){return t.check(MB,R,ke)(k)}function R(k){return t.enter("lineEnding"),t.consume(k),t.exit("lineEnding"),U}function U(k){return k===null||V(k)?N(k):(t.enter("htmlFlowData"),j(k))}function W(k){return k===45?(t.consume(k),w):j(k)}function K(k){return k===47?(t.consume(k),a="",Z):j(k)}function Z(k){if(k===62){let Re=a.toLowerCase();return ux.includes(Re)?(t.consume(k),xe):j(k)}return tt(k)&&a.length<8?(t.consume(k),a+=String.fromCharCode(k),Z):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(PB,"tokenizeHtmlFlow");function LB(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(LB,"tokenizeNonLazyContinuationStart");function _B(t,e,r){return n;function n(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),t.attempt(yn,e,r)}}o(_B,"tokenizeBlankLineBefore");var px={name:"htmlText",tokenize:RB};function RB(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):tt(w)?(t.consume(w),F):r(w)}function u(w){return w===45?(t.consume(w),f):w===91?(t.consume(w),s=0,d):tt(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?W(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?W(w):w===93?(t.consume(w),x):g(w)}function T(w){return w===null||w===62?W(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?W(w):E(w)}function P(w){return tt(w)?(t.consume(w),D):r(w)}function D(w){return w===45||ze(w)?(t.consume(w),D):A(w)}function A(w){return V(w)?(a=A,K(w)):ee(w)?(t.consume(w),A):W(w)}function F(w){return w===45||ze(w)?(t.consume(w),F):w===47||w===62||ge(w)?z(w):r(w)}function z(w){return w===47?(t.consume(w),W):w===58||w===95||tt(w)?(t.consume(w),C):V(w)?(a=z,K(w)):ee(w)?(t.consume(w),z):W(w)}function C(w){return w===45||w===46||w===58||w===95||ze(w)?(t.consume(w),C):le(w)}function le(w){return w===61?(t.consume(w),j):V(w)?(a=le,K(w)):ee(w)?(t.consume(w),le):z(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)):ee(w)?(t.consume(w),j):(t.consume(w),R)}function N(w){return w===i?(t.consume(w),i=void 0,U):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||ge(w)?z(w):(t.consume(w),R)}function U(w){return w===47||w===62||ge(w)?z(w):r(w)}function W(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"),Z}function Z(w){return ee(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(RB,"tokenizeHtmlText");var Lo={name:"labelEnd",resolveAll:BB,resolveTo:jB,tokenize:UB},FB={tokenize:zB},AB={tokenize:HB},$B={tokenize:WB};function BB(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(BB,"resolveAllLabelEnd");function jB(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=Je(l,t.slice(s+1,s+n+3)),l=Je(l,[["enter",f,e]]),l=Je(l,Ii(e.parser.constructs.insideSpan.null,t.slice(s+n+4,a-3),e)),l=Je(l,[["exit",f,e],t[a-2],t[a-1],["exit",u,e]]),l=Je(l,t.slice(a+1)),l=Je(l,[["exit",c,e]]),Ke(t,s,t.length,l),t}o(jB,"resolveToLabelEnd");function UB(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(We(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(FB,f,a?f:p)(h):h===91?t.attempt(AB,f,a?u:p)(h):a?f(h):p(h)}function u(h){return t.attempt($B,f,p)(h)}function f(h){return e(h)}function p(h){return s._balanced=!0,r(h)}}o(UB,"tokenizeLabelEnd");function zB(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 ge(p)?Po(t,s)(p):s(p)}function s(p){return p===41?f(p):sm(t,a,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function a(p){return ge(p)?Po(t,c)(p):f(p)}function l(p){return r(p)}function c(p){return p===34||p===39||p===40?lm(t,u,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):f(p)}function u(p){return ge(p)?Po(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(zB,"tokenizeResource");function HB(t,e,r){let n=this;return i;function i(l){return am.call(n,t,s,a,"reference","referenceMarker","referenceString")(l)}function s(l){return n.parser.defined.includes(We(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?e(l):r(l)}function a(l){return r(l)}}o(HB,"tokenizeReferenceFull");function WB(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(WB,"tokenizeReferenceCollapsed");var hx={name:"labelStartImage",resolveAll:Lo.resolveAll,tokenize:qB};function qB(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(qB,"tokenizeLabelStartImage");var mx={name:"labelStartLink",resolveAll:Lo.resolveAll,tokenize:YB};function YB(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(YB,"tokenizeLabelStartLink");var gc={name:"lineEnding",tokenize:VB};function VB(t,e){return r;function r(n){return t.enter("lineEnding"),t.consume(n),t.exit("lineEnding"),ie(t,e,"linePrefix")}}o(VB,"tokenizeLineEnding");var _o={name:"thematicBreak",tokenize:KB};function KB(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"),ee(u)?ie(t,l,"whitespace")(u):l(u))}}o(KB,"tokenizeThematicBreak");var Ct={continuation:{tokenize:XB},exit:ej,name:"list",tokenize:JB},GB={partial:!0,tokenize:tj},QB={partial:!0,tokenize:ZB};function JB(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:Ol(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(_o,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 Ol(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(yn,n.interrupt?r:f,t.attempt(GB,h,p))}function f(m){return n.containerState.initialBlankLine=!0,s++,h(m)}function p(m){return ee(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(JB,"tokenizeListStart");function XB(t,e,r){let n=this;return n.containerState._closeFlow=void 0,t.check(yn,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||!ee(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(QB,e,a)(l))}o(s,"notBlank");function a(l){return n.containerState._closeFlow=!0,n.interrupt=void 0,ie(t,t.attempt(Ct,e,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}o(a,"notInCurrentItem")}o(XB,"tokenizeListContinuation");function ZB(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(ZB,"tokenizeIndent");function ej(t){t.exit(this.containerState.type)}o(ej,"tokenizeListEnd");function tj(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!ee(s)&&a&&a[1].type==="listItemPrefixWhitespace"?e(s):r(s)}}o(tj,"tokenizeListItemPrefixWhitespace");var cm={name:"setextUnderline",resolveTo:rj,tokenize:nj};function rj(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(rj,"resolveToSetextUnderline");function nj(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"),ee(u)?ie(t,c,"lineSuffix")(u):c(u))}function c(u){return u===null||V(u)?(t.exit("setextHeadingLine"),e(u)):r(u)}}o(nj,"tokenizeSetextUnderline");var rC={tokenize:ij};function ij(t){let e=this,r=t.attempt(yn,n,t.attempt(this.parser.constructs.flowInitial,i,ie(t,t.attempt(this.parser.constructs.flow,i,t.attempt(sx,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(ij,"initializeFlow");var oC={resolveAll:iC()},sC=nC("string"),aC=nC("text");function nC(t){return{resolveAll:iC(t==="text"?oj: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(nC,"initializeFactory");function iC(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(iC,"createResolver");function oj(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(oj,"resolveAllLineSuffixes");var dx={};se(dx,{attentionMarkers:()=>hj,contentInitial:()=>aj,disable:()=>mj,document:()=>sj,flow:()=>cj,flowInitial:()=>lj,insideSpan:()=>pj,string:()=>uj,text:()=>fj});var sj={42:Ct,43:Ct,45:Ct,48:Ct,49:Ct,50:Ct,51:Ct,52:Ct,53:Ct,54:Ct,55:Ct,56:Ct,57:Ct,62:tm},aj={91:ax},lj={[-2]:hc,[-1]:hc,32:hc},cj={35:cx,42:_o,45:[cm,_o],60:fx,61:cm,95:_o,96:im,126:im},uj={38:nm,92:rm},fj={[-5]:gc,[-4]:gc,[-3]:gc,33:hx,38:nm,42:pc,60:[ix,px],91:mx,92:[lx,rm],93:Lo,95:pc,96:ox},pj={null:[pc,oC]},hj={null:[42,95]},mj={null:[]};function lC(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:z(A),check:z(F),consume:L,enter:P,exit:D,interrupt:z(F,{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=Je(a,N),T(),a[a.length-1]!==null?[]:(C(e,0),f.events=Ii(s,f.events,f),f.events)}o(m,"write");function d(N,R){return gj(g(N),R)}o(d,"sliceSerialize");function g(N){return dj(a,N)}o(g,"sliceStream");function y(){let{_bufferIndex:N,_index:R,line:U,column:W,offset:K}=n;return{_bufferIndex:N,_index:R,line:U,column:W,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 U=R||{};return U.type=N,U.start=y(),f.events.push(["enter",U,f]),l.push(U),U}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 A(N,R){C(N,R.from)}o(A,"onsuccessfulconstruct");function F(N,R){R.restore()}o(F,"onsuccessfulcheck");function z(N,R){return U;function U(W,K,Z){let ue,w,xe,ke;return Array.isArray(W)?Re(W):"tokenize"in W?Re([W]):k(W);function k(v){return I;function I(M){let B=M!==null&&v[M],re=M!==null&&v.null,_e=[...Array.isArray(B)?B:B?[B]:[],...Array.isArray(re)?re:re?[re]:[]];return Re(_e)(M)}}function Re(v){return ue=v,w=0,v.length===0?Z:Ye(v[w])}function Ye(v){return I;function I(M){return ke=le(),xe=v,v.partial||(f.currentConstruct=v),v.name&&f.parser.constructs.disable.null.includes(v.name)?O(M):v.tokenize.call(R?Object.assign(Object.create(f),R):f,u,Kt,O)(M)}}function Kt(v){return c=!0,N(xe,ke),K}function O(v){return c=!0,ke.restore(),++w<ue.length?Ye(ue[w]):Z}}}o(z,"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,U=f.currentConstruct,W=f.events.length,K=Array.from(l);return{from:W,restore:Z};function Z(){n=N,f.previous=R,f.currentConstruct=U,f.events.length=W,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(lC,"createTokenizer");function dj(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(dj,"sliceChunks");function gj(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(dj,"serializeChunks");function gc(t){let n={constructs:Xh([mx,...(t||{}).extensions||[]]),content:i(GD),defined:[],document:i(JD),flow:i(tC),lazy:{},string:i(oC),text:i(sC)};return n;function i(s){return a;function a(l){return aC(n,s,l)}}}o(gc,"parse");function yc(t){for(;!im(t););return t}o(yc,"postprocess");var lC=/[\0\t\n\r]/g;function xc(){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(lC.lastIndex=p,u=lC.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(xc,"preprocess");function JYe(t,e,r){return typeof e!="string"&&(r=e,e=void 0),rx(r)(yc(gc(r).document().write(xc()(t,e,!0))))}o(JYe,"micromark");var cC={}.hasOwnProperty;function dx(t,e,r){return e&&typeof e=="object"&&(r=e,e=void 0),gj(r)(yc(gc(r).document().write(xc()(t,e,!0))))}o(dx,"fromMarkdown");function gj(t){let e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Tr),autolinkProtocol:z,autolinkEmail:z,atxHeading:s(Te),blockQuote:s(M),characterEscape:z,characterReference:z,codeFenced:s(B),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(B,a),codeText:s(re,a),codeTextData:z,data:z,codeFlowValue:z,definition:s(_e),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(Pe),hardBreakEscape:s(_t),hardBreakTrailing:s(_t),htmlFlow:s(it,a),htmlFlowData:z,htmlText:s(it,a),htmlTextData:z,image:s(Ot),label:a,link:s(Tr),listItem:s(Gt),listItemValue:h,listOrdered:s(zr,p),listUnordered:s(zr),paragraph:s(ar),reference:k,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(Te),strong:s(Rt),thematicBreak:s(Hr)},exit:{atxHeading:c(),atxHeadingSequence:P,autolink:c(),autolinkEmail:I,autolinkProtocol:v,blockQuote:c(),characterEscapeValue:C,characterReferenceMarkerHexadecimal:Ye,characterReferenceMarkerNumeric:Ye,characterReferenceValue:Kt,characterReference:O,codeFenced:c(y),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:d,codeFlowValue:C,codeIndented:c(x),codeText:c(U),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:Z,lineEnding:le,link:c(W),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:Re,resourceDestinationString:w,resourceTitleString:xe,resource:ke,setextHeading:c(F),setextHeadingLineSequence:A,setextHeadingText:D,strong:c(),thematicBreak:c()}};uC(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 Qt=fe.pop();Ee=i(_,Qt,Ee)}for(Ee=-1;++Ee<_.length;){let Qt=e[_[Ee][0]];cC.call(Qt,_[Ee][1].type)&&Qt[_[Ee][1].type].call(Object.assign({sliceSerialize:_[Ee][2].sliceSerialize},oe),_[Ee][1])}if(oe.tokenStack.length>0){let Qt=oe.tokenStack[oe.tokenStack.length-1];(Qt[1]||fC).call(oe,void 0,Qt[0])}for(q.position={start:Ii(_.length>0?_[0][1].start:{line:1,column:1,offset:0}),end:Ii(_.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,Qt=!1,Wr,lr,Fi,Ai;for(;++fe<=oe;){let It=_[fe];switch(It[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{It[0]==="enter"?Ee++:Ee--,Ai=void 0;break}case"lineEndingBlank":{It[0]==="enter"&&(Wr&&!Ai&&!Ee&&!Fi&&(Fi=fe),Ai=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ai=void 0}if(!Ee&&It[0]==="enter"&&It[1].type==="listItemPrefix"||Ee===-1&&It[0]==="exit"&&(It[1].type==="listUnordered"||It[1].type==="listOrdered")){if(Wr){let Hn=fe;for(lr=void 0;Hn--;){let Er=_[Hn];if(Er[1].type==="lineEnding"||Er[1].type==="lineEndingBlank"){if(Er[0]==="exit")continue;lr&&(_[lr][1].type="lineEndingBlank",Qt=!0),Er[1].type="lineEnding",lr=Hn}else if(!(Er[1].type==="linePrefix"||Er[1].type==="blockQuotePrefix"||Er[1].type==="blockQuotePrefixWhitespace"||Er[1].type==="blockQuoteMarker"||Er[1].type==="listItemIndent"))break}Fi&&(!lr||Fi<lr)&&(Wr._spread=!0),Wr.end=Object.assign({},lr?_[lr][1].start:It[1].end),_.splice(lr||fe,0,["exit",Wr,It[2]]),fe++,oe++}if(It[1].type==="listItemPrefix"){let Hn={type:"listItem",_spread:!1,start:Object.assign({},It[1].start),end:void 0};Wr=Hn,_.splice(fe,0,["enter",Hn,It[2]]),fe++,oe++,Fi=void 0,Ai=!0}}}return _[q][1]._spread=Qt,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:Ii(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]||fC).call(this,_,fe[0]));else throw new Error("Cannot close `"+_.type+"` ("+Ci({start:_.start,end:_.end})+"): it\u2019s not open");oe.position.end=Ii(_.end)}function f(){return bo(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=We(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 A(_){let q=this.stack[this.stack.length-1];q.depth=this.sliceSerialize(_).codePointAt(0)===61?1:2}function F(){this.data.setextHeadingSlurpLineEnding=void 0}function z(_){let oe=this.stack[this.stack.length-1].children,fe=oe[oe.length-1];(!fe||fe.type!=="text")&&(fe=je(),fe.position={start:Ii(_.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=Ii(_.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=Ii(_.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(q.type)&&(z.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 U(){let _=this.resume(),q=this.stack[this.stack.length-1];q.value=_}function W(){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 Z(_){let q=this.sliceSerialize(_),oe=this.stack[this.stack.length-2];oe.label=gh(q),oe.identifier=We(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 Re(_){let q=this.resume(),oe=this.stack[this.stack.length-1];oe.label=q,oe.identifier=We(this.sliceSerialize(_)).toLowerCase(),this.data.referenceType="full"}function Ye(_){this.data.characterReferenceType=_.type}function Kt(_){let q=this.sliceSerialize(_),oe=this.data.characterReferenceType,fe;oe?(fe=Gs(q,oe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):fe=xi(q);let Ee=this.stack[this.stack.length-1];Ee.value+=fe}function O(_){let q=this.stack.pop();q.position.end=Ii(_.end)}function v(_){C.call(this,_);let q=this.stack[this.stack.length-1];q.url=this.sliceSerialize(_)}function I(_){C.call(this,_);let q=this.stack[this.stack.length-1];q.url="mailto:"+this.sliceSerialize(_)}function M(){return{type:"blockquote",children:[]}}function B(){return{type:"code",lang:null,meta:null,value:""}}function re(){return{type:"inlineCode",value:""}}function _e(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Pe(){return{type:"emphasis",children:[]}}function Te(){return{type:"heading",depth:0,children:[]}}function _t(){return{type:"break"}}function it(){return{type:"html",value:""}}function Ot(){return{type:"image",title:null,url:"",alt:null}}function Tr(){return{type:"link",title:null,url:"",children:[]}}function zr(_){return{type:"list",ordered:_.type==="listOrdered",start:null,spread:_._spread,children:[]}}function Gt(_){return{type:"listItem",spread:_._spread,checked:null,children:[]}}function ar(){return{type:"paragraph",children:[]}}function Rt(){return{type:"strong",children:[]}}function je(){return{type:"text",value:""}}function Hr(){return{type:"thematicBreak"}}}o(gj,"compiler");function Ii(t){return{line:t.line,column:t.column,offset:t.offset}}o(Ii,"point");function uC(t,e){let r=-1;for(;++r<e.length;){let n=e[r];Array.isArray(n)?uC(t,n):yj(t,n)}}o(uC,"configure");function yj(t,e){let r;for(r in e)if(cC.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(yj,"extension");function fC(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+Ci({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+Ci({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+Ci({start:e.start,end:e.end})+") is still open")}o(fC,"defaultOnError");function xa(t){let e=this;e.parser=r;function r(n){return dx(n,{...e.data("settings"),...t,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}o(r,"parser")}o(xa,"remarkParse");function gx(t,e,r){let i=In((r||{}).ignore||[]),s=xj(e),a=-1;for(;++a<s.length;)Ol(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(gx,"findAndReplace");function xj(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([bj(i[0]),wj(i[1])])}return e}o(xj,"toPairs");function bj(t){return typeof t=="string"?new RegExp($i(t),"g"):t}o(bj,"toExpression");function wj(t){return typeof t=="function"?t:function(){return t}}o(wj,"toFunction");var yx="phrasing",xx=["autolink","link","image","label"];function wx(){return{transforms:[Dj],enter:{literalAutolink:Sj,literalAutolinkEmail:bx,literalAutolinkHttp:bx,literalAutolinkWww:bx},exit:{literalAutolink:Ej,literalAutolinkEmail:Tj,literalAutolinkHttp:vj,literalAutolinkWww:kj}}}o(wx,"gfmAutolinkLiteralFromMarkdown");function Sx(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:yx,notInConstruct:xx},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:yx,notInConstruct:xx},{character:":",before:"[ps]",after:"\\/",inConstruct:yx,notInConstruct:xx}]}}o(Sx,"gfmAutolinkLiteralToMarkdown");function Sj(t){this.enter({type:"link",title:null,url:"",children:[]},t)}o(Sj,"enterLiteralAutolink");function bx(t){this.config.enter.autolinkProtocol.call(this,t)}o(bx,"enterLiteralAutolinkValue");function vj(t){this.config.exit.autolinkProtocol.call(this,t)}o(vj,"exitLiteralAutolinkHttp");function kj(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(kj,"exitLiteralAutolinkWww");function Tj(t){this.config.exit.autolinkEmail.call(this,t)}o(Tj,"exitLiteralAutolinkEmail");function Ej(t){this.exit(t)}o(Ej,"exitLiteralAutolink");function Dj(t){gx(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Cj],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Oj]],{ignore:["link","linkReference"]})}o(Dj,"transformGfmAutolinkLiterals");function Cj(t,e,r,n,i){let s="";if(!pC(i)||(/^w/i.test(e)&&(r=e+r,e="",s="http://"),!Ij(r)))return!1;let a=Mj(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(Cj,"findUrl");function Oj(t,e,r,n){return!pC(n,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+r,children:[{type:"text",value:e+"@"+r}]}}o(Oj,"findEmail");function Ij(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(Ij,"isCorrectDomain");function Mj(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=Ws(t,"("),s=Ws(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(Mj,"splitUrl");function pC(t,e){let r=t.input.charCodeAt(t.index-1);return(t.index===0||un(r)||ho(r))&&(!e||r!==47)}o(pC,"previous");hC.peek=Bj;function Nj(){this.buffer()}o(Nj,"enterFootnoteCallString");function Pj(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}o(Pj,"enterFootnoteCall");function Lj(){this.buffer()}o(Lj,"enterFootnoteDefinitionLabelString");function _j(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}o(_j,"enterFootnoteDefinition");function Rj(t){let e=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=We(this.sliceSerialize(t)).toLowerCase(),r.label=e}o(Rj,"exitFootnoteCallString");function Fj(t){this.exit(t)}o(Fj,"exitFootnoteCall");function Aj(t){let e=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=We(this.sliceSerialize(t)).toLowerCase(),r.label=e}o(Aj,"exitFootnoteDefinitionLabelString");function $j(t){this.exit(t)}o($j,"exitFootnoteDefinition");function Bj(){return"["}o(Bj,"footnoteReferencePeek");function hC(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(hC,"footnoteReference");function vx(){return{enter:{gfmFootnoteCallString:Nj,gfmFootnoteCall:Pj,gfmFootnoteDefinitionLabelString:Lj,gfmFootnoteDefinition:_j},exit:{gfmFootnoteCallString:Rj,gfmFootnoteCall:Fj,gfmFootnoteDefinitionLabelString:Aj,gfmFootnoteDefinition:$j}}}o(vx,"gfmFootnoteFromMarkdown");function kx(t){let e=!1;return t&&t.firstLineBlank&&(e=!0),{handlers:{footnoteDefinition:r,footnoteReference:hC},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?mC:jj))),u(),c}o(r,"footnoteDefinition")}o(kx,"gfmFootnoteToMarkdown");function jj(t,e,r){return e===0?t:mC(t,e,r)}o(jj,"mapExceptFirst");function mC(t,e,r){return(r?"":" ")+t}o(mC,"mapAll");var Uj=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];dC.peek=Wj;function Tx(){return{canContainEols:["delete"],enter:{strikethrough:zj},exit:{strikethrough:Hj}}}o(Tx,"gfmStrikethroughFromMarkdown");function Ex(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Uj}],handlers:{delete:dC}}}o(Ex,"gfmStrikethroughToMarkdown");function zj(t){this.enter({type:"delete",children:[]},t)}o(zj,"enterStrikethrough");function Hj(t){this.exit(t)}o(Hj,"exitStrikethrough");function dC(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(dC,"handleDelete");function Wj(){return"~"}o(Wj,"peekDelete");function qj(t){return t.length}o(qj,"defaultStringLength");function yC(t,e){let r=e||{},n=(r.align||[]).concat(),i=r.stringLength||qj,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=Yj(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]=gC(n[p]);else{let g=gC(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(yC,"markdownTable");function Yj(t){return t==null?"":String(t)}o(Yj,"serialize");function gC(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(gC,"toAlignment");function Cx(){return{enter:{table:Vj,tableData:xC,tableHeader:xC,tableRow:Gj},exit:{codeText:Qj,table:Kj,tableData:Dx,tableHeader:Dx,tableRow:Dx}}}o(Cx,"gfmTableFromMarkdown");function Vj(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(Vj,"enterTable");function Kj(t){this.exit(t),this.data.inTable=void 0}o(Kj,"exitTable");function Gj(t){this.enter({type:"tableRow",children:[]},t)}o(Gj,"enterRow");function Dx(t){this.exit(t)}o(Dx,"exit");function xC(t){this.enter({type:"tableCell",children:[]},t)}o(xC,"enterCell");function Qj(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,Jj));let r=this.stack[this.stack.length-1];r.type,r.value=e,this.exit(t)}o(Qj,"exitCodeText");function Jj(t,e){return e==="|"?e:t}o(Jj,"replace");function Ox(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(gj,"serializeChunks");function yc(t){let n={constructs:Zh([dx,...(t||{}).extensions||[]]),content:i(QD),defined:[],document:i(XD),flow:i(rC),lazy:{},string:i(sC),text:i(aC)};return n;function i(s){return a;function a(l){return lC(n,s,l)}}}o(yc,"parse");function xc(t){for(;!om(t););return t}o(xc,"postprocess");var cC=/[\0\t\n\r]/g;function bc(){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(cC.lastIndex=p,u=cC.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(bc,"preprocess");function XYe(t,e,r){return typeof e!="string"&&(r=e,e=void 0),nx(r)(xc(yc(r).document().write(bc()(t,e,!0))))}o(XYe,"micromark");var uC={}.hasOwnProperty;function gx(t,e,r){return e&&typeof e=="object"&&(r=e,e=void 0),yj(r)(xc(yc(r).document().write(bc()(t,e,!0))))}o(gx,"fromMarkdown");function yj(t){let e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Tr),autolinkProtocol:z,autolinkEmail:z,atxHeading:s(Te),blockQuote:s(M),characterEscape:z,characterReference:z,codeFenced:s(B),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(B,a),codeText:s(re,a),codeTextData:z,data:z,codeFlowValue:z,definition:s(_e),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(Pe),hardBreakEscape:s(_t),hardBreakTrailing:s(_t),htmlFlow:s(it,a),htmlFlowData:z,htmlText:s(it,a),htmlTextData:z,image:s(Ot),label:a,link:s(Tr),listItem:s(Gt),listItemValue:h,listOrdered:s(zr,p),listUnordered:s(zr),paragraph:s(ar),reference:k,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(Te),strong:s(Rt),thematicBreak:s(Hr)},exit:{atxHeading:c(),atxHeadingSequence:P,autolink:c(),autolinkEmail:I,autolinkProtocol:v,blockQuote:c(),characterEscapeValue:C,characterReferenceMarkerHexadecimal:Ye,characterReferenceMarkerNumeric:Ye,characterReferenceValue:Kt,characterReference:O,codeFenced:c(y),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:d,codeFlowValue:C,codeIndented:c(x),codeText:c(U),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:Z,lineEnding:le,link:c(W),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:Re,resourceDestinationString:w,resourceTitleString:xe,resource:ke,setextHeading:c(F),setextHeadingLineSequence:A,setextHeadingText:D,strong:c(),thematicBreak:c()}};fC(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 Qt=fe.pop();Ee=i(_,Qt,Ee)}for(Ee=-1;++Ee<_.length;){let Qt=e[_[Ee][0]];uC.call(Qt,_[Ee][1].type)&&Qt[_[Ee][1].type].call(Object.assign({sliceSerialize:_[Ee][2].sliceSerialize},oe),_[Ee][1])}if(oe.tokenStack.length>0){let Qt=oe.tokenStack[oe.tokenStack.length-1];(Qt[1]||pC).call(oe,void 0,Qt[0])}for(q.position={start:Mi(_.length>0?_[0][1].start:{line:1,column:1,offset:0}),end:Mi(_.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,Qt=!1,Wr,lr,Ai,$i;for(;++fe<=oe;){let It=_[fe];switch(It[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{It[0]==="enter"?Ee++:Ee--,$i=void 0;break}case"lineEndingBlank":{It[0]==="enter"&&(Wr&&!$i&&!Ee&&!Ai&&(Ai=fe),$i=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:$i=void 0}if(!Ee&&It[0]==="enter"&&It[1].type==="listItemPrefix"||Ee===-1&&It[0]==="exit"&&(It[1].type==="listUnordered"||It[1].type==="listOrdered")){if(Wr){let Wn=fe;for(lr=void 0;Wn--;){let Er=_[Wn];if(Er[1].type==="lineEnding"||Er[1].type==="lineEndingBlank"){if(Er[0]==="exit")continue;lr&&(_[lr][1].type="lineEndingBlank",Qt=!0),Er[1].type="lineEnding",lr=Wn}else if(!(Er[1].type==="linePrefix"||Er[1].type==="blockQuotePrefix"||Er[1].type==="blockQuotePrefixWhitespace"||Er[1].type==="blockQuoteMarker"||Er[1].type==="listItemIndent"))break}Ai&&(!lr||Ai<lr)&&(Wr._spread=!0),Wr.end=Object.assign({},lr?_[lr][1].start:It[1].end),_.splice(lr||fe,0,["exit",Wr,It[2]]),fe++,oe++}if(It[1].type==="listItemPrefix"){let Wn={type:"listItem",_spread:!1,start:Object.assign({},It[1].start),end:void 0};Wr=Wn,_.splice(fe,0,["enter",Wn,It[2]]),fe++,oe++,Ai=void 0,$i=!0}}}return _[q][1]._spread=Qt,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:Mi(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]||pC).call(this,_,fe[0]));else throw new Error("Cannot close `"+_.type+"` ("+Oi({start:_.start,end:_.end})+"): it\u2019s not open");oe.position.end=Mi(_.end)}function f(){return wo(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=We(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 A(_){let q=this.stack[this.stack.length-1];q.depth=this.sliceSerialize(_).codePointAt(0)===61?1:2}function F(){this.data.setextHeadingSlurpLineEnding=void 0}function z(_){let oe=this.stack[this.stack.length-1].children,fe=oe[oe.length-1];(!fe||fe.type!=="text")&&(fe=je(),fe.position={start:Mi(_.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=Mi(_.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=Mi(_.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(q.type)&&(z.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 U(){let _=this.resume(),q=this.stack[this.stack.length-1];q.value=_}function W(){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 Z(_){let q=this.sliceSerialize(_),oe=this.stack[this.stack.length-2];oe.label=yh(q),oe.identifier=We(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 Re(_){let q=this.resume(),oe=this.stack[this.stack.length-1];oe.label=q,oe.identifier=We(this.sliceSerialize(_)).toLowerCase(),this.data.referenceType="full"}function Ye(_){this.data.characterReferenceType=_.type}function Kt(_){let q=this.sliceSerialize(_),oe=this.data.characterReferenceType,fe;oe?(fe=Qs(q,oe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):fe=bi(q);let Ee=this.stack[this.stack.length-1];Ee.value+=fe}function O(_){let q=this.stack.pop();q.position.end=Mi(_.end)}function v(_){C.call(this,_);let q=this.stack[this.stack.length-1];q.url=this.sliceSerialize(_)}function I(_){C.call(this,_);let q=this.stack[this.stack.length-1];q.url="mailto:"+this.sliceSerialize(_)}function M(){return{type:"blockquote",children:[]}}function B(){return{type:"code",lang:null,meta:null,value:""}}function re(){return{type:"inlineCode",value:""}}function _e(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Pe(){return{type:"emphasis",children:[]}}function Te(){return{type:"heading",depth:0,children:[]}}function _t(){return{type:"break"}}function it(){return{type:"html",value:""}}function Ot(){return{type:"image",title:null,url:"",alt:null}}function Tr(){return{type:"link",title:null,url:"",children:[]}}function zr(_){return{type:"list",ordered:_.type==="listOrdered",start:null,spread:_._spread,children:[]}}function Gt(_){return{type:"listItem",spread:_._spread,checked:null,children:[]}}function ar(){return{type:"paragraph",children:[]}}function Rt(){return{type:"strong",children:[]}}function je(){return{type:"text",value:""}}function Hr(){return{type:"thematicBreak"}}}o(yj,"compiler");function Mi(t){return{line:t.line,column:t.column,offset:t.offset}}o(Mi,"point");function fC(t,e){let r=-1;for(;++r<e.length;){let n=e[r];Array.isArray(n)?fC(t,n):xj(t,n)}}o(fC,"configure");function xj(t,e){let r;for(r in e)if(uC.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(xj,"extension");function pC(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+Oi({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+Oi({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+Oi({start:e.start,end:e.end})+") is still open")}o(pC,"defaultOnError");function ba(t){let e=this;e.parser=r;function r(n){return gx(n,{...e.data("settings"),...t,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}o(r,"parser")}o(ba,"remarkParse");function yx(t,e,r){let i=Mn((r||{}).ignore||[]),s=bj(e),a=-1;for(;++a<s.length;)Il(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(yx,"findAndReplace");function bj(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([wj(i[0]),Sj(i[1])])}return e}o(bj,"toPairs");function wj(t){return typeof t=="string"?new RegExp(Bi(t),"g"):t}o(wj,"toExpression");function Sj(t){return typeof t=="function"?t:function(){return t}}o(Sj,"toFunction");var xx="phrasing",bx=["autolink","link","image","label"];function Sx(){return{transforms:[Cj],enter:{literalAutolink:vj,literalAutolinkEmail:wx,literalAutolinkHttp:wx,literalAutolinkWww:wx},exit:{literalAutolink:Dj,literalAutolinkEmail:Ej,literalAutolinkHttp:kj,literalAutolinkWww:Tj}}}o(Sx,"gfmAutolinkLiteralFromMarkdown");function vx(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:xx,notInConstruct:bx},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:xx,notInConstruct:bx},{character:":",before:"[ps]",after:"\\/",inConstruct:xx,notInConstruct:bx}]}}o(vx,"gfmAutolinkLiteralToMarkdown");function vj(t){this.enter({type:"link",title:null,url:"",children:[]},t)}o(vj,"enterLiteralAutolink");function wx(t){this.config.enter.autolinkProtocol.call(this,t)}o(wx,"enterLiteralAutolinkValue");function kj(t){this.config.exit.autolinkProtocol.call(this,t)}o(kj,"exitLiteralAutolinkHttp");function Tj(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(Tj,"exitLiteralAutolinkWww");function Ej(t){this.config.exit.autolinkEmail.call(this,t)}o(Ej,"exitLiteralAutolinkEmail");function Dj(t){this.exit(t)}o(Dj,"exitLiteralAutolink");function Cj(t){yx(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Oj],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Ij]],{ignore:["link","linkReference"]})}o(Cj,"transformGfmAutolinkLiterals");function Oj(t,e,r,n,i){let s="";if(!hC(i)||(/^w/i.test(e)&&(r=e+r,e="",s="http://"),!Mj(r)))return!1;let a=Nj(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(Oj,"findUrl");function Ij(t,e,r,n){return!hC(n,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+r,children:[{type:"text",value:e+"@"+r}]}}o(Ij,"findEmail");function Mj(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(Mj,"isCorrectDomain");function Nj(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=qs(t,"("),s=qs(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(Nj,"splitUrl");function hC(t,e){let r=t.input.charCodeAt(t.index-1);return(t.index===0||un(r)||mo(r))&&(!e||r!==47)}o(hC,"previous");mC.peek=jj;function Pj(){this.buffer()}o(Pj,"enterFootnoteCallString");function Lj(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}o(Lj,"enterFootnoteCall");function _j(){this.buffer()}o(_j,"enterFootnoteDefinitionLabelString");function Rj(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}o(Rj,"enterFootnoteDefinition");function Fj(t){let e=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=We(this.sliceSerialize(t)).toLowerCase(),r.label=e}o(Fj,"exitFootnoteCallString");function Aj(t){this.exit(t)}o(Aj,"exitFootnoteCall");function $j(t){let e=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=We(this.sliceSerialize(t)).toLowerCase(),r.label=e}o($j,"exitFootnoteDefinitionLabelString");function Bj(t){this.exit(t)}o(Bj,"exitFootnoteDefinition");function jj(){return"["}o(jj,"footnoteReferencePeek");function mC(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(mC,"footnoteReference");function kx(){return{enter:{gfmFootnoteCallString:Pj,gfmFootnoteCall:Lj,gfmFootnoteDefinitionLabelString:_j,gfmFootnoteDefinition:Rj},exit:{gfmFootnoteCallString:Fj,gfmFootnoteCall:Aj,gfmFootnoteDefinitionLabelString:$j,gfmFootnoteDefinition:Bj}}}o(kx,"gfmFootnoteFromMarkdown");function Tx(t){let e=!1;return t&&t.firstLineBlank&&(e=!0),{handlers:{footnoteDefinition:r,footnoteReference:mC},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?dC:Uj))),u(),c}o(r,"footnoteDefinition")}o(Tx,"gfmFootnoteToMarkdown");function Uj(t,e,r){return e===0?t:dC(t,e,r)}o(Uj,"mapExceptFirst");function dC(t,e,r){return(r?"":" ")+t}o(dC,"mapAll");var zj=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];gC.peek=qj;function Ex(){return{canContainEols:["delete"],enter:{strikethrough:Hj},exit:{strikethrough:Wj}}}o(Ex,"gfmStrikethroughFromMarkdown");function Dx(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:zj}],handlers:{delete:gC}}}o(Dx,"gfmStrikethroughToMarkdown");function Hj(t){this.enter({type:"delete",children:[]},t)}o(Hj,"enterStrikethrough");function Wj(t){this.exit(t)}o(Wj,"exitStrikethrough");function gC(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(gC,"handleDelete");function qj(){return"~"}o(qj,"peekDelete");function Yj(t){return t.length}o(Yj,"defaultStringLength");function xC(t,e){let r=e||{},n=(r.align||[]).concat(),i=r.stringLength||Yj,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=Vj(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]=yC(n[p]);else{let g=yC(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(xC,"markdownTable");function Vj(t){return t==null?"":String(t)}o(Vj,"serialize");function yC(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(yC,"toAlignment");function Ox(){return{enter:{table:Kj,tableData:bC,tableHeader:bC,tableRow:Qj},exit:{codeText:Jj,table:Gj,tableData:Cx,tableHeader:Cx,tableRow:Cx}}}o(Ox,"gfmTableFromMarkdown");function Kj(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(Kj,"enterTable");function Gj(t){this.exit(t),this.data.inTable=void 0}o(Gj,"exitTable");function Qj(t){this.enter({type:"tableRow",children:[]},t)}o(Qj,"enterRow");function Cx(t){this.exit(t)}o(Cx,"exit");function bC(t){this.enter({type:"tableCell",children:[]},t)}o(bC,"enterCell");function Jj(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,Xj));let r=this.stack[this.stack.length-1];r.type,r.value=e,this.exit(t)}o(Jj,"exitCodeText");function Xj(t,e){return e==="|"?e:t}o(Xj,"replace");function Ix(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 yC(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=wo.inlineCode(m,d,g);return g.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}o(Ox,"gfmTableToMarkdown");function Ix(){return{exit:{taskListCheckValueChecked:bC,taskListCheckValueUnchecked:bC,paragraph:Xj}}}o(Ix,"gfmTaskListItemFromMarkdown");function Mx(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Zj}}}o(Mx,"gfmTaskListItemToMarkdown");function bC(t){let e=this.stack[this.stack.length-2];e.type,e.checked=t.type==="taskListCheckValueChecked"}o(bC,"exitCheck");function Xj(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(Xj,"exitParagraphWithTaskListItem");function Zj(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=wo.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(Zj,"listItemWithTaskListItem");function Nx(){return[wx(),vx(),Tx(),Cx(),Ix()]}o(Nx,"gfmFromMarkdown");function Px(t){return{extensions:[Sx(),kx(t),Ex(),Ox(t),Mx()]}}o(Px,"gfmToMarkdown");var eU={tokenize:oU,partial:!0},wC={tokenize:sU,partial:!0},SC={tokenize:aU,partial:!0},vC={tokenize:lU,partial:!0},tU={tokenize:cU,partial:!0},kC={name:"wwwAutolink",tokenize:nU,previous:EC},TC={name:"protocolAutolink",tokenize:iU,previous:DC},Un={name:"emailAutolink",tokenize:rU,previous:CC},xn={};function Rx(){return{text:xn}}o(Rx,"gfmAutolinkLiteral");for(var _o=48;_o<123;)xn[_o]=Un,_o++,_o===58?_o=65:_o===91&&(_o=97);xn[43]=Un,xn[45]=Un,xn[46]=Un,xn[95]=Un,xn[72]=[Un,TC],xn[104]=[Un,TC],xn[87]=[Un,kC],xn[119]=[Un,kC];function rU(t,e,r){let n=this,i,s;return a;function a(p){return!Lx(p)||!CC.call(n,n.previous)||_x(n.events)?r(p):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),l(p))}function l(p){return Lx(p)?(t.consume(p),l):p===64?(t.consume(p),c):r(p)}function c(p){return p===46?t.check(tU,f,u)(p):p===45||p===95||ze(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&&tt(n.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(p)):r(p)}}o(rU,"tokenizeEmailAutolink");function nU(t,e,r){let n=this;return i;function i(a){return a!==87&&a!==119||!EC.call(n,n.previous)||_x(n.events)?r(a):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(eU,t.attempt(wC,t.attempt(SC,s),r),r)(a))}function s(a){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(a)}}o(nU,"tokenizeWwwAutolink");function iU(t,e,r){let n=this,i="",s=!1;return a;function a(p){return(p===72||p===104)&&DC.call(n,n.previous)&&!_x(n.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),i+=String.fromCodePoint(p),t.consume(p),l):r(p)}function l(p){if(tt(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||po(p)||ge(p)||un(p)||ho(p)?r(p):t.attempt(wC,t.attempt(SC,f),r)(p)}function f(p){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(p)}}o(iU,"tokenizeProtocolAutolink");function oU(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(oU,"tokenizeWwwPrefix");function sU(t,e,r){let n,i,s;return a;function a(u){return u===46||u===95?t.check(vC,c,l)(u):u===null||ge(u)||un(u)||u!==45&&ho(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(sU,"tokenizeDomain");function aU(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(vC,e,s)(a):a===null||ge(a)||un(a)?e(a):(t.consume(a),i)}function s(a){return a===41&&n++,t.consume(a),i}}o(aU,"tokenizePath");function lU(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||ge(l)||un(l)?e(l):r(l)}function i(l){return l===null||l===40||l===91||ge(l)||un(l)?e(l):n(l)}function s(l){return tt(l)?a(l):r(l)}function a(l){return l===59?(t.consume(l),n):tt(l)?(t.consume(l),a):r(l)}}o(lU,"tokenizeTrail");function cU(t,e,r){return n;function n(s){return t.consume(s),i}function i(s){return ze(s)?r(s):e(s)}}o(cU,"tokenizeEmailDomainDotTrail");function EC(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||ge(t)}o(EC,"previousWww");function DC(t){return!tt(t)}o(DC,"previousProtocol");function CC(t){return!(t===47||Lx(t))}o(CC,"previousEmail");function Lx(t){return t===43||t===45||t===46||t===95||ze(t)}o(Lx,"gfmAtext");function _x(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(_x,"previousUnbalanced");function Ax(){return{exit:{literalAutolinkEmail:fU,literalAutolinkHttp:pU,literalAutolinkWww:uU}}}o(Ax,"gfmAutolinkLiteralHtml");function uU(t){Fx.call(this,t,"http://")}o(uU,"literalAutolinkWww");function fU(t){Fx.call(this,t,"mailto:")}o(fU,"literalAutolinkEmail");function pU(t){Fx.call(this,t)}o(pU,"literalAutolinkHttp");function Fx(t,e){let r=this.sliceSerialize(t);this.tag('<a href="'+fn((e||"")+r)+'">'),this.raw(this.encode(r)),this.tag("</a>")}o(Fx,"anchorFromToken");var hU={tokenize:wU,partial:!0};function $x(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:yU,continuation:{tokenize:xU},exit:bU}},text:{91:{name:"gfmFootnoteCall",tokenize:gU},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:mU,resolveTo:dU}}}}o($x,"gfmFootnote");function mU(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=We(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(mU,"tokenizePotentialGfmFootnoteCall");function dU(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(dU,"resolveToPotentialGfmFootnoteCall");function gU(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||ge(p))return r(p);if(p===93){t.exit("chunkString");let h=t.exit("gfmFootnoteCallString");return i.includes(We(n.sliceSerialize(h)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(p),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):r(p)}return ge(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(gU,"tokenizeGfmFootnoteCall");function yU(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||ge(d))return r(d);if(d===93){t.exit("chunkString");let g=t.exit("gfmFootnoteDefinitionLabelString");return s=We(n.sliceSerialize(g)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(d),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),h}return ge(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(yU,"tokenizeDefinitionStart");function xU(t,e,r){return t.check(yn,e,t.attempt(hU,e,r))}o(xU,"tokenizeDefinitionContinuation");function bU(t){t.exit("gfmFootnoteDefinition")}o(bU,"gfmFootnoteDefinitionEnd");function wU(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(wU,"tokenizeIndent");var SU={}.hasOwnProperty,vU={};function OC(t,e){return"Back to reference "+(t+1)+(e>1?"-"+e:"")}o(OC,"defaultBackLabel");function Bx(t){let e=t||vU,r=e.label||"Footnotes",n=e.labelTagName||"h2",i=e.labelAttributes===null||e.labelAttributes===void 0?'class="sr-only"':e.labelAttributes,s=e.backLabel||OC,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={}),SU.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(We(this.sliceSerialize(l))),this.resume(),this.buffer()},gfmFootnoteCallString(l){let c=this.getData("gfmFootnoteCallOrder"),u=this.getData("gfmFootnoteCallCounts"),f=We(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(Bx,"gfmFootnoteHtml");function jx(){return{enter:{strikethrough(){this.tag("<del>")}},exit:{strikethrough(){this.tag("</del>")}}}}o(jx,"gfmStrikethroughHtml");function Ux(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,Oi(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(Ux,"gfmStrikethrough");var zx={none:"",left:' align="left"',right:' align="right"',center:' align="center"'};function Hx(){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=zx[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=zx[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,kU)),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"+zx[t[e]]+"></td>"),e++;this.setData("tableColumn",e),this.lineEndingIfNeeded(),this.tag("</tr>")}}}}o(Hx,"gfmTableHtml");function kU(t,e){return e==="|"?e:t}o(kU,"replace");var cm=class{static{o(this,"EditMap")}constructor(){this.map=[]}add(e,r,n){TU(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 TU(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(TU,"addImplementation");function IC(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(IC,"gfmTableAlign");function Wx(){return{flow:{null:{name:"table",tokenize:EU,resolveAll:DU}}}}o(Wx,"gfmTable");function EU(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):ee(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||ge(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,ee(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 ee(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)?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 ee(C)?ie(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"),A(C)}function A(C){return C===124?(t.enter("tableCellDivider"),t.consume(C),t.exit("tableCellDivider"),A):C===null||V(C)?(t.exit("tableRow"),e(C)):ee(C)?ie(t,A,"whitespace")(C):(t.enter("data"),F(C))}function F(C){return C===null||C===124||ge(C)?(t.exit("data"),A(C)):(t.consume(C),C===92?z:F)}function z(C){return C===92||C===124?(t.consume(C),F):F(C)}}o(EU,"tokenizeTable");function DU(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 cm;for(;++r<t.length;){let m=t[r],d=m[1];m[0]==="enter"?d.type==="tableHead"?(l=!1,c!==0&&(MC(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=um(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=um(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=um(h,e,s,i,r,p)):a[1]!==0&&(p=um(h,e,a,i,r,p)),i=0):i&&(d.type==="data"||d.type==="tableDelimiterMarker"||d.type==="tableDelimiterFiller")&&(a[3]=r)}for(c!==0&&MC(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=IC(e.events,r))}return t}o(DU,"resolveTable");function um(t,e,r,n,i,s){let a=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",l="tableContent";r[0]!==0&&(s.end=Object.assign({},ba(e.events,r[0])),t.add(r[0],0,[["exit",s,e]]));let c=ba(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=ba(e.events,r[2]),f=ba(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({},ba(e.events,i)),t.add(i,0,[["exit",s,e]]),s=void 0),s}o(um,"flushCell");function MC(t,e,r,n,i){let s=[],a=ba(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(MC,"flushTableEnd");function ba(t,e){let r=t[e],n=r[0]==="enter"?"start":"end";return r[1][n]}o(ba,"getPoint");var NC=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|title|textarea|xmp)(?=[\t\n\f\r />])/gi,CU=new RegExp("^"+NC.source,"i");function qx(){return{exit:{htmlFlowData(t){PC.call(this,t,NC)},htmlTextData(t){PC.call(this,t,CU)}}}}o(qx,"gfmTagfilterHtml");function PC(t,e){let r=this.sliceSerialize(t);this.options.allowDangerousHtml&&(r=r.replace(e,"&lt;$1$2")),this.raw(this.encode(r))}o(PC,"exitHtmlData");function Yx(){return{enter:{taskListCheck(){this.tag('<input type="checkbox" disabled="" ')}},exit:{taskListCheck(){this.tag("/>")},taskListCheckValueChecked(){this.tag('checked="" ')}}}}o(Yx,"gfmTaskListItemHtml");var OU={name:"tasklistCheck",tokenize:IU};function Vx(){return{text:{91:OU}}}o(Vx,"gfmTaskListItem");function IU(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 ge(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):ee(c)?t.check({tokenize:MU},e,r)(c):r(c)}}o(IU,"tokenizeTasklistCheck");function MU(t,e,r){return ie(t,n,"whitespace");function n(i){return i===null?r(i):e(i)}}o(MU,"spaceThenNonSpace");function LC(t){return Xh([Rx(),$x(),Ux(t),Wx(),Vx()])}o(LC,"gfm");function O7e(t){return Zh([Ax(),Bx(t),jx(),Hx(),qx(),Yx()])}o(O7e,"gfmHtml");var NU={};function wa(t){let e=this,r=t||NU,n=e.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),s=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),a=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(LC(r)),s.push(Nx()),a.push(Px(r))}o(wa,"remarkGfm");var RC=Wn(_C(),1),bc=Object.assign(Ro(Error),{eval:Ro(EvalError),range:Ro(RangeError),reference:Ro(ReferenceError),syntax:Ro(SyntaxError),type:Ro(TypeError),uri:Ro(URIError)});function Ro(t){return e.displayName=t.displayName||t.name,e;function e(r,...n){let i=r&&(0,RC.default)(r,...n);return new t(i)}o(e,"FormattedError")}o(Ro,"create");var fm={}.hasOwnProperty,FC={yaml:"-",toml:"+"};function Sa(t){let e=[],r=-1,n=Array.isArray(t)?t:t?[t]:["yaml"];for(;++r<n.length;)e[r]=PU(n[r]);return e}o(Sa,"toMatters");function PU(t){let e=t;if(typeof e=="string"){if(!fm.call(FC,e))throw bc("Missing matter definition for `%s`",e);e={type:e,marker:FC[e]}}else if(typeof e!="object")throw bc("Expected matter to be an object, not `%j`",e);if(!fm.call(e,"type"))throw bc("Missing `type` in matter `%j`",e);if(!fm.call(e,"fence")&&!fm.call(e,"marker"))throw bc("Missing `marker` or `fence` in matter `%j`",e);return e}o(PU,"matter");function Qx(t){let e=Sa(t),r={},n=-1;for(;++n<e.length;){let i=e[n],s=Gx(i,"open").charCodeAt(0),a=LU(i),l=r[s];Array.isArray(l)?l.push(a):r[s]=[a]}return{flow:r}}o(Qx,"frontmatter");function LU(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(A){let F=d.now();return F.column===1&&(F.line===1||e)&&(l=Gx(t,"open"),c=0,A===l.charCodeAt(c))?(p.enter(r),p.enter(n),p.enter(i),y(A)):m(A)}function y(A){return c===l.length?(p.exit(i),ee(A)?(p.enter("whitespace"),x(A)):T(A)):A===l.charCodeAt(c++)?(p.consume(A),y):m(A)}function x(A){return ee(A)?(p.consume(A),x):(p.exit("whitespace"),T(A))}function T(A){return V(A)?(p.exit(n),p.enter("lineEnding"),p.consume(A),p.exit("lineEnding"),l=Gx(t,"close"),c=0,p.attempt(a,D,E)):m(A)}function E(A){return A===null||V(A)?P(A):(p.enter(s),L(A))}function L(A){return A===null||V(A)?(p.exit(s),P(A)):(p.consume(A),L)}function P(A){return A===null?m(A):(p.enter("lineEnding"),p.consume(A),p.exit("lineEnding"),p.attempt(a,D,E))}function D(A){return p.exit(r),h(A)}}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),ee(E)?(p.enter("whitespace"),x(E)):T(E)):E===l.charCodeAt(d++)?(p.consume(E),y):m(E)}function x(E){return ee(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(LU,"createConstruct");function Gx(t,e){return t.marker?AC(t.marker,e).repeat(3):AC(t.fence,e)}o(Gx,"fence");function AC(t,e){return typeof t=="string"?t:t[e]}o(AC,"pick");function Xx(t){let e=Sa(t),r={},n={},i=-1;for(;++i<e.length;){let s=e[i];r[s.type]=_U(s),n[s.type]=RU,n[s.type+"Value"]=FU}return{enter:r,exit:n}}o(Xx,"frontmatterFromMarkdown");function _U(t){return e;function e(r){this.enter({type:t.type,value:""},r),this.buffer()}}o(_U,"opener");function RU(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(RU,"close");function FU(t){this.config.enter.data.call(this,t),this.config.exit.data.call(this,t)}o(FU,"value");function Zx(t){let e=[],r={},n=Sa(t),i=-1;for(;++i<n.length;){let s=n[i];r[s.type]=AU(s);let a=Jx(s,"open");e.push({atBreak:!0,character:a.charAt(0),after:$i(a.charAt(1))})}return{unsafe:e,handlers:r}}o(Zx,"frontmatterToMarkdown");function AU(t){let e=Jx(t,"open"),r=Jx(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 xC(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=So.inlineCode(m,d,g);return g.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}o(Ix,"gfmTableToMarkdown");function Mx(){return{exit:{taskListCheckValueChecked:wC,taskListCheckValueUnchecked:wC,paragraph:Zj}}}o(Mx,"gfmTaskListItemFromMarkdown");function Nx(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:eU}}}o(Nx,"gfmTaskListItemToMarkdown");function wC(t){let e=this.stack[this.stack.length-2];e.type,e.checked=t.type==="taskListCheckValueChecked"}o(wC,"exitCheck");function Zj(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(Zj,"exitParagraphWithTaskListItem");function eU(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=So.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(eU,"listItemWithTaskListItem");function Px(){return[Sx(),kx(),Ex(),Ox(),Mx()]}o(Px,"gfmFromMarkdown");function Lx(t){return{extensions:[vx(),Tx(t),Dx(),Ix(t),Nx()]}}o(Lx,"gfmToMarkdown");var tU={tokenize:sU,partial:!0},SC={tokenize:aU,partial:!0},vC={tokenize:lU,partial:!0},kC={tokenize:cU,partial:!0},rU={tokenize:uU,partial:!0},TC={name:"wwwAutolink",tokenize:iU,previous:DC},EC={name:"protocolAutolink",tokenize:oU,previous:CC},zn={name:"emailAutolink",tokenize:nU,previous:OC},xn={};function Fx(){return{text:xn}}o(Fx,"gfmAutolinkLiteral");for(var Ro=48;Ro<123;)xn[Ro]=zn,Ro++,Ro===58?Ro=65:Ro===91&&(Ro=97);xn[43]=zn,xn[45]=zn,xn[46]=zn,xn[95]=zn,xn[72]=[zn,EC],xn[104]=[zn,EC],xn[87]=[zn,TC],xn[119]=[zn,TC];function nU(t,e,r){let n=this,i,s;return a;function a(p){return!_x(p)||!OC.call(n,n.previous)||Rx(n.events)?r(p):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),l(p))}function l(p){return _x(p)?(t.consume(p),l):p===64?(t.consume(p),c):r(p)}function c(p){return p===46?t.check(rU,f,u)(p):p===45||p===95||ze(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&&tt(n.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(p)):r(p)}}o(nU,"tokenizeEmailAutolink");function iU(t,e,r){let n=this;return i;function i(a){return a!==87&&a!==119||!DC.call(n,n.previous)||Rx(n.events)?r(a):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(tU,t.attempt(SC,t.attempt(vC,s),r),r)(a))}function s(a){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(a)}}o(iU,"tokenizeWwwAutolink");function oU(t,e,r){let n=this,i="",s=!1;return a;function a(p){return(p===72||p===104)&&CC.call(n,n.previous)&&!Rx(n.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),i+=String.fromCodePoint(p),t.consume(p),l):r(p)}function l(p){if(tt(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||ho(p)||ge(p)||un(p)||mo(p)?r(p):t.attempt(SC,t.attempt(vC,f),r)(p)}function f(p){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(p)}}o(oU,"tokenizeProtocolAutolink");function sU(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(sU,"tokenizeWwwPrefix");function aU(t,e,r){let n,i,s;return a;function a(u){return u===46||u===95?t.check(kC,c,l)(u):u===null||ge(u)||un(u)||u!==45&&mo(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(aU,"tokenizeDomain");function lU(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(kC,e,s)(a):a===null||ge(a)||un(a)?e(a):(t.consume(a),i)}function s(a){return a===41&&n++,t.consume(a),i}}o(lU,"tokenizePath");function cU(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||ge(l)||un(l)?e(l):r(l)}function i(l){return l===null||l===40||l===91||ge(l)||un(l)?e(l):n(l)}function s(l){return tt(l)?a(l):r(l)}function a(l){return l===59?(t.consume(l),n):tt(l)?(t.consume(l),a):r(l)}}o(cU,"tokenizeTrail");function uU(t,e,r){return n;function n(s){return t.consume(s),i}function i(s){return ze(s)?r(s):e(s)}}o(uU,"tokenizeEmailDomainDotTrail");function DC(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||ge(t)}o(DC,"previousWww");function CC(t){return!tt(t)}o(CC,"previousProtocol");function OC(t){return!(t===47||_x(t))}o(OC,"previousEmail");function _x(t){return t===43||t===45||t===46||t===95||ze(t)}o(_x,"gfmAtext");function Rx(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(Rx,"previousUnbalanced");function $x(){return{exit:{literalAutolinkEmail:pU,literalAutolinkHttp:hU,literalAutolinkWww:fU}}}o($x,"gfmAutolinkLiteralHtml");function fU(t){Ax.call(this,t,"http://")}o(fU,"literalAutolinkWww");function pU(t){Ax.call(this,t,"mailto:")}o(pU,"literalAutolinkEmail");function hU(t){Ax.call(this,t)}o(hU,"literalAutolinkHttp");function Ax(t,e){let r=this.sliceSerialize(t);this.tag('<a href="'+fn((e||"")+r)+'">'),this.raw(this.encode(r)),this.tag("</a>")}o(Ax,"anchorFromToken");var mU={tokenize:SU,partial:!0};function Bx(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:xU,continuation:{tokenize:bU},exit:wU}},text:{91:{name:"gfmFootnoteCall",tokenize:yU},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:dU,resolveTo:gU}}}}o(Bx,"gfmFootnote");function dU(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=We(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(dU,"tokenizePotentialGfmFootnoteCall");function gU(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(gU,"resolveToPotentialGfmFootnoteCall");function yU(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||ge(p))return r(p);if(p===93){t.exit("chunkString");let h=t.exit("gfmFootnoteCallString");return i.includes(We(n.sliceSerialize(h)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(p),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):r(p)}return ge(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(yU,"tokenizeGfmFootnoteCall");function xU(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||ge(d))return r(d);if(d===93){t.exit("chunkString");let g=t.exit("gfmFootnoteDefinitionLabelString");return s=We(n.sliceSerialize(g)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(d),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),h}return ge(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(xU,"tokenizeDefinitionStart");function bU(t,e,r){return t.check(yn,e,t.attempt(mU,e,r))}o(bU,"tokenizeDefinitionContinuation");function wU(t){t.exit("gfmFootnoteDefinition")}o(wU,"gfmFootnoteDefinitionEnd");function SU(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(SU,"tokenizeIndent");var vU={}.hasOwnProperty,kU={};function IC(t,e){return"Back to reference "+(t+1)+(e>1?"-"+e:"")}o(IC,"defaultBackLabel");function jx(t){let e=t||kU,r=e.label||"Footnotes",n=e.labelTagName||"h2",i=e.labelAttributes===null||e.labelAttributes===void 0?'class="sr-only"':e.labelAttributes,s=e.backLabel||IC,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={}),vU.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(We(this.sliceSerialize(l))),this.resume(),this.buffer()},gfmFootnoteCallString(l){let c=this.getData("gfmFootnoteCallOrder"),u=this.getData("gfmFootnoteCallCounts"),f=We(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(jx,"gfmFootnoteHtml");function Ux(){return{enter:{strikethrough(){this.tag("<del>")}},exit:{strikethrough(){this.tag("</del>")}}}}o(Ux,"gfmStrikethroughHtml");function zx(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,Ii(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(zx,"gfmStrikethrough");var Hx={none:"",left:' align="left"',right:' align="right"',center:' align="center"'};function Wx(){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=Hx[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=Hx[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,TU)),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"+Hx[t[e]]+"></td>"),e++;this.setData("tableColumn",e),this.lineEndingIfNeeded(),this.tag("</tr>")}}}}o(Wx,"gfmTableHtml");function TU(t,e){return e==="|"?e:t}o(TU,"replace");var um=class{static{o(this,"EditMap")}constructor(){this.map=[]}add(e,r,n){EU(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 EU(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(EU,"addImplementation");function MC(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(MC,"gfmTableAlign");function qx(){return{flow:{null:{name:"table",tokenize:DU,resolveAll:CU}}}}o(qx,"gfmTable");function DU(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):ee(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||ge(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,ee(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 ee(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)?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 ee(C)?ie(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"),A(C)}function A(C){return C===124?(t.enter("tableCellDivider"),t.consume(C),t.exit("tableCellDivider"),A):C===null||V(C)?(t.exit("tableRow"),e(C)):ee(C)?ie(t,A,"whitespace")(C):(t.enter("data"),F(C))}function F(C){return C===null||C===124||ge(C)?(t.exit("data"),A(C)):(t.consume(C),C===92?z:F)}function z(C){return C===92||C===124?(t.consume(C),F):F(C)}}o(DU,"tokenizeTable");function CU(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 um;for(;++r<t.length;){let m=t[r],d=m[1];m[0]==="enter"?d.type==="tableHead"?(l=!1,c!==0&&(NC(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=fm(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=fm(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=fm(h,e,s,i,r,p)):a[1]!==0&&(p=fm(h,e,a,i,r,p)),i=0):i&&(d.type==="data"||d.type==="tableDelimiterMarker"||d.type==="tableDelimiterFiller")&&(a[3]=r)}for(c!==0&&NC(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=MC(e.events,r))}return t}o(CU,"resolveTable");function fm(t,e,r,n,i,s){let a=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",l="tableContent";r[0]!==0&&(s.end=Object.assign({},wa(e.events,r[0])),t.add(r[0],0,[["exit",s,e]]));let c=wa(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=wa(e.events,r[2]),f=wa(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({},wa(e.events,i)),t.add(i,0,[["exit",s,e]]),s=void 0),s}o(fm,"flushCell");function NC(t,e,r,n,i){let s=[],a=wa(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(NC,"flushTableEnd");function wa(t,e){let r=t[e],n=r[0]==="enter"?"start":"end";return r[1][n]}o(wa,"getPoint");var PC=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|title|textarea|xmp)(?=[\t\n\f\r />])/gi,OU=new RegExp("^"+PC.source,"i");function Yx(){return{exit:{htmlFlowData(t){LC.call(this,t,PC)},htmlTextData(t){LC.call(this,t,OU)}}}}o(Yx,"gfmTagfilterHtml");function LC(t,e){let r=this.sliceSerialize(t);this.options.allowDangerousHtml&&(r=r.replace(e,"&lt;$1$2")),this.raw(this.encode(r))}o(LC,"exitHtmlData");function Vx(){return{enter:{taskListCheck(){this.tag('<input type="checkbox" disabled="" ')}},exit:{taskListCheck(){this.tag("/>")},taskListCheckValueChecked(){this.tag('checked="" ')}}}}o(Vx,"gfmTaskListItemHtml");var IU={name:"tasklistCheck",tokenize:MU};function Kx(){return{text:{91:IU}}}o(Kx,"gfmTaskListItem");function MU(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 ge(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):ee(c)?t.check({tokenize:NU},e,r)(c):r(c)}}o(MU,"tokenizeTasklistCheck");function NU(t,e,r){return ie(t,n,"whitespace");function n(i){return i===null?r(i):e(i)}}o(NU,"spaceThenNonSpace");function _C(t){return Zh([Fx(),Bx(),zx(t),qx(),Kx()])}o(_C,"gfm");function I7e(t){return em([$x(),jx(t),Ux(),Wx(),Yx(),Vx()])}o(I7e,"gfmHtml");var PU={};function Sa(t){let e=this,r=t||PU,n=e.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),s=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),a=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(_C(r)),s.push(Px()),a.push(Lx(r))}o(Sa,"remarkGfm");var FC=qn(RC(),1),wc=Object.assign(Fo(Error),{eval:Fo(EvalError),range:Fo(RangeError),reference:Fo(ReferenceError),syntax:Fo(SyntaxError),type:Fo(TypeError),uri:Fo(URIError)});function Fo(t){return e.displayName=t.displayName||t.name,e;function e(r,...n){let i=r&&(0,FC.default)(r,...n);return new t(i)}o(e,"FormattedError")}o(Fo,"create");var pm={}.hasOwnProperty,AC={yaml:"-",toml:"+"};function va(t){let e=[],r=-1,n=Array.isArray(t)?t:t?[t]:["yaml"];for(;++r<n.length;)e[r]=LU(n[r]);return e}o(va,"toMatters");function LU(t){let e=t;if(typeof e=="string"){if(!pm.call(AC,e))throw wc("Missing matter definition for `%s`",e);e={type:e,marker:AC[e]}}else if(typeof e!="object")throw wc("Expected matter to be an object, not `%j`",e);if(!pm.call(e,"type"))throw wc("Missing `type` in matter `%j`",e);if(!pm.call(e,"fence")&&!pm.call(e,"marker"))throw wc("Missing `marker` or `fence` in matter `%j`",e);return e}o(LU,"matter");function Jx(t){let e=va(t),r={},n=-1;for(;++n<e.length;){let i=e[n],s=Qx(i,"open").charCodeAt(0),a=_U(i),l=r[s];Array.isArray(l)?l.push(a):r[s]=[a]}return{flow:r}}o(Jx,"frontmatter");function _U(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(A){let F=d.now();return F.column===1&&(F.line===1||e)&&(l=Qx(t,"open"),c=0,A===l.charCodeAt(c))?(p.enter(r),p.enter(n),p.enter(i),y(A)):m(A)}function y(A){return c===l.length?(p.exit(i),ee(A)?(p.enter("whitespace"),x(A)):T(A)):A===l.charCodeAt(c++)?(p.consume(A),y):m(A)}function x(A){return ee(A)?(p.consume(A),x):(p.exit("whitespace"),T(A))}function T(A){return V(A)?(p.exit(n),p.enter("lineEnding"),p.consume(A),p.exit("lineEnding"),l=Qx(t,"close"),c=0,p.attempt(a,D,E)):m(A)}function E(A){return A===null||V(A)?P(A):(p.enter(s),L(A))}function L(A){return A===null||V(A)?(p.exit(s),P(A)):(p.consume(A),L)}function P(A){return A===null?m(A):(p.enter("lineEnding"),p.consume(A),p.exit("lineEnding"),p.attempt(a,D,E))}function D(A){return p.exit(r),h(A)}}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),ee(E)?(p.enter("whitespace"),x(E)):T(E)):E===l.charCodeAt(d++)?(p.consume(E),y):m(E)}function x(E){return ee(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(_U,"createConstruct");function Qx(t,e){return t.marker?$C(t.marker,e).repeat(3):$C(t.fence,e)}o(Qx,"fence");function $C(t,e){return typeof t=="string"?t:t[e]}o($C,"pick");function Zx(t){let e=va(t),r={},n={},i=-1;for(;++i<e.length;){let s=e[i];r[s.type]=RU(s),n[s.type]=FU,n[s.type+"Value"]=AU}return{enter:r,exit:n}}o(Zx,"frontmatterFromMarkdown");function RU(t){return e;function e(r){this.enter({type:t.type,value:""},r),this.buffer()}}o(RU,"opener");function FU(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(FU,"close");function AU(t){this.config.enter.data.call(this,t),this.config.exit.data.call(this,t)}o(AU,"value");function eb(t){let e=[],r={},n=va(t),i=-1;for(;++i<n.length;){let s=n[i];r[s.type]=$U(s);let a=Xx(s,"open");e.push({atBreak:!0,character:a.charAt(0),after:Bi(a.charAt(1))})}return{unsafe:e,handlers:r}}o(eb,"frontmatterToMarkdown");function $U(t){let e=Xx(t,"open"),r=Xx(t,"close");return n;function n(i){return e+(i.value?`
280
280
  `+i.value:"")+`
281
- `+r}}o(AU,"handler");function Jx(t,e){return t.marker?$C(t.marker,e).repeat(3):$C(t.fence,e)}o(Jx,"fence");function $C(t,e){return typeof t=="string"?t:t[e]}o($C,"pick");var $U="yaml";function va(t){let e=this,r=t||$U,n=e.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),s=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),a=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(Qx(r)),s.push(Xx(r)),a.push(Zx(r))}o(va,"remarkFrontmatter");var eb=o((t=["yaml","toml"])=>uc().use(xa).use(wa).use(va,t),"createMarkdownProcessor"),jC=o(t=>{if(typeof t!="string")throw new TypeError("Markdown source must be a string.");return eb().parse(t)},"parseMarkdown");var UC=/^---[ \t]*$/,zC="\uFEFF",BU=o(t=>t,"readLineAsIs"),HC=o(t=>t.endsWith("\r")?t.slice(0,-1):t,"withoutCarriageReturn"),jU=o(async t=>{let e=await ga.yamlStringToObject(t);return e==null?{}:typeof e!="object"||Array.isArray(e)?null:e},"parseFrontmatterYaml"),WC=o(async(t,e)=>{if(typeof t!="string")throw new TypeError("Frontmatter source must be a string.");let n=(t.startsWith(zC)?t.slice(zC.length):t).split(`
282
- `),i=e(HC(n[0]));if(i===null||!UC.test(i))return null;let s=[];for(let a=1;a<n.length;a++){let l=e(HC(n[a]));if(l===null)return null;if(UC.test(l)){let c=await jU(s.join(`
281
+ `+r}}o($U,"handler");function Xx(t,e){return t.marker?BC(t.marker,e).repeat(3):BC(t.fence,e)}o(Xx,"fence");function BC(t,e){return typeof t=="string"?t:t[e]}o(BC,"pick");var BU="yaml";function ka(t){let e=this,r=t||BU,n=e.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),s=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),a=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(Jx(r)),s.push(Zx(r)),a.push(eb(r))}o(ka,"remarkFrontmatter");var tb=o((t=["yaml","toml"])=>fc().use(ba).use(Sa).use(ka,t),"createMarkdownProcessor"),UC=o(t=>{if(typeof t!="string")throw new TypeError("Markdown source must be a string.");return tb().parse(t)},"parseMarkdown");var zC=/^---[ \t]*$/,HC="\uFEFF",jU=o(t=>t,"readLineAsIs"),WC=o(t=>t.endsWith("\r")?t.slice(0,-1):t,"withoutCarriageReturn"),UU=o(async t=>{let e=await ya.yamlStringToObject(t);return e==null?{}:typeof e!="object"||Array.isArray(e)?null:e},"parseFrontmatterYaml"),qC=o(async(t,e)=>{if(typeof t!="string")throw new TypeError("Frontmatter source must be a string.");let n=(t.startsWith(HC)?t.slice(HC.length):t).split(`
282
+ `),i=e(WC(n[0]));if(i===null||!zC.test(i))return null;let s=[];for(let a=1;a<n.length;a++){let l=e(WC(n[a]));if(l===null)return null;if(zC.test(l)){let c=await UU(s.join(`
283
283
  `));return c===null?null:{data:c,content:n.slice(a+1).join(`
284
- `)}}s.push(l)}return null},"readBlock"),tb=o(async t=>WC(t,BU),"readFrontmatterBlock"),qC=o((t,e)=>t??{data:{},content:e},"orWholeSource"),YC=o(async t=>qC(await tb(t),t),"parseFrontmatter"),VC=o(async(t,e)=>{if(typeof e!="string"||e.trim()==="")throw new TypeError("Comment prefix must be a non-blank string.");let r=e.trimEnd(),n=await WC(t,i=>i.startsWith(e)?i.slice(e.length):i===r?"":null);return qC(n,t)},"parseCommentFrontmatter"),KC=o(async(t,e)=>`---
285
- ${Object.keys(e).length===0?"":await ga.objectToYamlString(e)}---
286
- ${t}`,"stringifyFrontmatter");var pm=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=await tb(e);this.frontmatterData=r?r.data:{};let n=await eb(r?[]:["toml"]).use(Qs).use(qs).process(r?r.content:e);this.html=n.toString()}};var rb=class t{static{o(this,"SmartMarkdown")}static async easyMarkdownToHtml(e){return(await new t().getMdParsedResultFromMarkdown(e)).html}constructor(){}async getMdParsedResultFromMarkdown(e){return await pm.createFromMarkdownString(e)}htmlToMarkdown(e){let r=new bi({headingStyle:"atx",codeBlockStyle:"fenced"});return r.use(sy.gfm),r.turndown(e)}};var Fo={};se(Fo,{SmartRouter:()=>cb});var lb=Wn(tO(),1);var mm=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 FKe=o(t=>{console.log(`%c[Router]%c ${t}`,"color: rgb(255, 105, 100);","color: inherit")},"routeLog"),cb=class t{static{o(this,"SmartRouter")}constructor(e,r=""){this.options={debug:!1},this.queryParams=new mm,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:lb.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 Ao={};se(Ao,{Smartstate:()=>db,StateAction:()=>kc,StatePart:()=>Tc,StateProcess:()=>ka,attachContextProvider:()=>f4,computed:()=>mb});var vc={};se(vc,{createSha256Hasher:()=>hb,sha256FromBuffer:()=>sO,sha256FromStream:()=>a4,sha256FromString:()=>s4,sha256FromStringSync:()=>o4});var JU=Symbol.for("nodejs.util.inspect.custom"),Sc=class extends Error{static{o(this,"SmartCryptoError")}constructor(e){super(`SmartCrypto operation failed (${e}).`),this.name="SmartCryptoError",this.code=e,Object.defineProperty(this,"cause",{configurable:!1,enumerable:!1,value:void 0,writable:!1})}toJSON(){return{name:"SmartCryptoError",code:this.code,message:this.message}}[JU](){return this.toJSON()}},qe=o(t=>new Sc(t),"createSmartCryptoError");var XU=/^[A-Za-z0-9_-]*$/,ZU=o(()=>{if(!globalThis.crypto?.subtle||typeof globalThis.crypto.getRandomValues!="function")throw qe("CRYPTO_OPERATION_FAILED");return globalThis.crypto},"getWebCrypto"),HKe=o((t,e="INVALID_ARGUMENT")=>{if(!(t instanceof Uint8Array))throw qe(e);return new Uint8Array(t)},"requireUint8Array"),WKe=o((t,e,r)=>{if(t.byteLength!==e)throw t.fill(0),qe(r);return t},"requireLength"),ub=o(t=>{if(t instanceof Uint8Array)return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);throw qe("INVALID_ARGUMENT")},"requireHashInput"),fb=o(t=>{if(typeof t!="string")throw qe("INVALID_ARGUMENT");return t},"requireString"),rO=o(t=>{let e="";for(let r of t)e+=r.toString(16).padStart(2,"0");return e},"encodeHex"),nO=o(async(t,e)=>{if(typeof t?.getReader!="function")throw qe("INVALID_ARGUMENT");let r=t.getReader();try{for(;;){let{value:n,done:i}=await r.read();if(i)return e.digest();if(!(n instanceof Uint8Array)){let s=qe("INVALID_ARGUMENT");throw await r.cancel(s),s}e.update(n)}}finally{r.releaseLock()}},"hashReadableStream"),e4=o(t=>{let e=new Uint8Array(t.byteLength);return e.set(t),e.buffer},"toArrayBuffer"),qKe=o((...t)=>{let e=t.reduce((i,s)=>i+s.byteLength,0),r=new Uint8Array(e),n=0;for(let i of t)r.set(i,n),n+=i.byteLength;return r},"concatBytes"),iO=o(async t=>{let e=e4(t);try{return new Uint8Array(await ZU().subtle.digest("SHA-256",e))}finally{new Uint8Array(e).fill(0)}},"sha256"),YKe=o((t,e)=>{if(t.byteLength!==e.byteLength)return!1;let r=0;for(let n=0;n<t.byteLength;n++)r|=t[n]^e[n];return r===0},"bytesEqual"),VKe=o(t=>{let e=0;for(let r of t)e|=r;return e===0},"isAllZero"),t4=o(t=>{let e="";for(let n=0;n<t.byteLength;n+=32768)e+=String.fromCharCode(...t.subarray(n,n+32768));return btoa(e)},"encodeBase64"),r4=o(t=>t4(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/g,""),"encodeBase64Url"),KKe=o((t,e,r)=>{if(typeof t!="string")throw qe("INVALID_ENVELOPE");let n=Math.ceil(e*4/3);if(t.length>n)throw qe("SIZE_LIMIT_EXCEEDED");if(!XU.test(t)||t.length%4===1)throw qe("INVALID_ENVELOPE");try{let i=(4-t.length%4)%4,s=t.replace(/-/g,"+").replace(/_/g,"/")+"=".repeat(i),a=atob(s);if(a.length>e)throw qe("SIZE_LIMIT_EXCEEDED");if(r!==void 0&&a.length!==r)throw qe("INVALID_ENVELOPE");let l=new Uint8Array(a.length);for(let c=0;c<a.length;c++)l[c]=a.charCodeAt(c);if(r4(l)!==t)throw qe("INVALID_ENVELOPE");return l}catch(i){throw i instanceof Sc?i:qe("INVALID_ENVELOPE")}},"decodeCanonicalBase64Url"),GKe=o((t,e)=>{if(t===null||typeof t!="object"||Array.isArray(t))throw qe("INVALID_ENVELOPE");let r=Object.getPrototypeOf(t);if(r!==Object.prototype&&r!==null)throw qe("INVALID_ENVELOPE");let n=Reflect.ownKeys(t);if(n.some(s=>typeof s!="string"))throw qe("INVALID_ENVELOPE");let i=n;if(i.length!==e.length||[...i].sort().some((s,a)=>s!==[...e].sort()[a]))throw qe("INVALID_ENVELOPE");for(let s of i){let a=Object.getOwnPropertyDescriptor(t,s);if(!a?.enumerable||!("value"in a))throw qe("INVALID_ENVELOPE")}return t},"requirePlainDataObject");var n4=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]),i4=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),bn=o((t,e)=>t>>>e|t<<32-e,"rotateRight"),oO=new TextEncoder,pb=class{static{o(this,"Sha256Hasher")}constructor(){this.state=new Uint32Array(i4),this.block=new Uint8Array(64),this.words=new Uint32Array(64),this.blockLength=0,this.totalBytesHigh=0,this.totalBytesLow=0,this.finalized=!1}update(e){this.requireOpen();let r=ub(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(){this.requireOpen(),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),this.state.fill(0),a}requireOpen(){if(this.finalized)throw qe("INVALID_STATE")}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=bn(m,7)^bn(m,18)^m>>>3,y=bn(d,17)^bn(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=bn(c,6)^bn(c,11)^bn(c,25),d=c&u^~c&f,g=p+m+d+n4[h]+n[h]>>>0,y=bn(i,2)^bn(i,13)^bn(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}},hb=o(()=>new pb,"createSha256Hasher"),o4=o(t=>hb().update(oO.encode(fb(t))).digest(),"sha256FromStringSync"),sO=o(async t=>rO(await iO(ub(t))),"sha256FromBuffer"),s4=o(async t=>await sO(oO.encode(fb(t))),"sha256FromString"),a4=o(async t=>await nO(t,hb()),"sha256FromStream");var kc=class{static{o(this,"StateAction")}constructor(e,r){this.statePartRef=e,this.actionDef=r}trigger(e){return this.statePartRef.dispatchAction(this,e)}};function c4(){return typeof document>"u"?Aa(!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(c4,"createVisibilityObservable");var ka=class{static{o(this,"StateProcess")}constructor(e,r){this.statusSubject=new Go("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"?c4():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 aO=o(t=>{let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null},"isPlainObject"),dm=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&&(!aO(s)||!aO(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 u4(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(u4,"fromAbortSignal");var Tc=class t{static{o(this,"StatePart")}static{this.MAX_NESTED_DISPATCH_DEPTH=10}constructor(e,r){this.state=new Go(void 0),this.disposed=!1,this.cumulativeDeferred=Q.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 Nr.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=>vc.sha256FromStringSync(er.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),es(dm));if(n)return a=a.pipe(ts(u4(r.signal))),a;let l=a.pipe(uu({bufferSize:1,refCount:!0}));return e?this.selectorCache.set(e,l):this.defaultSelectObservable=l,l}createAction(e){return new kc(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=Q.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 ka(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 ka(this,{producer:o(()=>rd(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 mb(t,e){return td(t.map(r=>r.select())).pipe(Xr(r=>e(...r)),es(dm))}o(mb,"computed");var db=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 mb(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 Tc(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 f4(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(f4,"attachContextProvider");var $o={};se($o,{Smarturl:()=>gb});var gb=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 Nb={};se(Nb,{JsonLdTag:()=>Bo,MetaTag:()=>kr,OpengraphTag:()=>Lt,Title:()=>Mb,WebSetup:()=>Ec});var Ib={};se(Ib,{business:()=>bb,code:()=>wb,container:()=>Sb,content:()=>kb,database:()=>yb,descriptors:()=>vb,finance:()=>xb,general:()=>Tb,network:()=>gm,saas:()=>Db,storage:()=>Cb,website:()=>Ob});var bb={};var yb={};var xb={};var wb={};var Sb={};var vb={};var kb={};var Tb={};var gm={};se(gm,{ICnameDescriptor:()=>Eb});var Eb=class{static{o(this,"ICnameDescriptor")}};var Db={};var Cb={};var Ob={};var Li=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 Bo=class t extends Li{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 Lt=class t extends Li{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 Ta=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(Bo.createCompanyJsonLd(e)),this.addTag(new Lt("og:type","business.business")),this.addTag(new Lt("og:title",e.name)),this.addTag(new Lt("og:url",e.website??"")),this.addTag(new Lt("og:image",e.logoUrl??"")),this.addTag(new Lt("business:contact_data:street_address",`${e.address.streetName} ${e.address.houseNumber}`)),this.addTag(new Lt("business:contact_data:locality",e.address.postalCode)),this.addTag(new Lt("business:contact_data:region",e.address.city)),this.addTag(new Lt("business:contact_data:postal_code",e.address.postalCode)),this.addTag(new Lt("business:contact_data:country_name",e.address.country))}addNewsArticleInfo(e){this.addTag(Bo.createNewsArticleJsonLd(e)),this.addTag(Lt.createNewsArticleOgTags(e))}addProductInfo(e,r){this.addTag(Bo.createProductJsonLd(e,r)),this.addTag(Lt.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 kr=class extends Li{static{o(this,"MetaTag")}constructor(e,r){super();let n=document.createElement("meta");n.name=e,n.content=r,this.elementRef=n}};var ym=class{static{o(this,"TagManager")}constructor(){this.globalLevel=new Ta(this,"global"),this.baseLevel=new Ta(this,"base")}async setup(e){switch(this.globalLevel.addTag(new kr("google","notranslate")),this.globalLevel.addTag(new kr("revisit-after","1 days")),e.twitterHandle&&(this.globalLevel.addTag(new kr("twitter:card","summary_large_image")),this.globalLevel.addTag(new kr("twitter:site",e.twitterHandle)),this.globalLevel.addTag(new kr("twitter:creator",e.twitterHandle))),this.baseLevel.title=e.title,e.description&&this.baseLevel.addTag(new kr("description",e.description)),e.canonicalDomain&&this.baseLevel.addTag(new kr("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 Ta(this,"subpage");return r.title=e.title,e.description&&r.addTag(new kr("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 Ec=class{static{o(this,"WebSetup")}constructor(e){this.tagManager=new ym,this.readyDeferred=Q.defer(),this.readyForSmartssrDeferred=Q.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 h4="1.3.17";function lO(t,e,r){return Math.max(t,Math.min(e,r))}o(lO,"clamp");function m4(t,e,r){return(1-r)*t+r*e}o(m4,"lerp");function d4(t,e,r,n){return m4(t,e,1-Math.exp(-r*n))}o(d4,"damp");function g4(t,e){return(t%e+e)%e}o(g4,"modulo");var y4=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=lO(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=d4(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 x4(t,e){let r;return function(...n){let i=this;clearTimeout(r),r=setTimeout(()=>{r=void 0,t.apply(i,n)},e)}}o(x4,"debounce");var b4=class{static{o(this,"Dimensions")}constructor(t,e,{autoResize:r=!0,debounce:n=250}={}){this.wrapper=t,this.content=e,r&&(this.debouncedResize=x4(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}}},cO=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={}}},uO=100/6,_i={passive:!1},w4=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,_i),this.element.addEventListener("touchstart",this.onTouchStart,_i),this.element.addEventListener("touchmove",this.onTouchMove,_i),this.element.addEventListener("touchend",this.onTouchEnd,_i)}touchStart={x:0,y:0};lastDelta={x:0,y:0};window={width:0,height:0};emitter=new cO;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,_i),this.element.removeEventListener("touchstart",this.onTouchStart,_i),this.element.removeEventListener("touchmove",this.onTouchMove,_i),this.element.removeEventListener("touchend",this.onTouchEnd,_i)}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?uO:n===2?this.window.width:1,s=n===1?uO: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")},fO=o(t=>Math.min(1,1.001-Math.pow(2,-10*t)),"defaultEasing"),Dc=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 y4;emitter=new cO;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:A=!1,naiveDimensions:F=A,stopInertiaOnNavigate:z=!1}={}){window.lenisVersion=h4,(!t||t===document.documentElement)&&(t=window),typeof l=="number"&&typeof c!="function"?c=fO: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:F,stopInertiaOnNavigate:z},this.dimensions=new b4(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 w4(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=lO(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=fO: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,A=P.overflowY;if(s=["auto","overlay","scroll"].includes(D),a=["auto","overlay","scroll"].includes(A),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?g4(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 Ea=Wn(pO(),1),S4={ObjectMap:kn,Stringmap:nl,FastMap:Zi};var qb={};se(qb,{containerContextStyles:()=>j4,cssForConstraint:()=>$4,cssForConstraintContainer:()=>B4,cssForContainer:()=>LO,cssForDesktop:()=>U4,cssForNotebook:()=>z4,cssForPhablet:()=>W4,cssForPhone:()=>q4,cssForTablet:()=>H4,cssForViewport:()=>Yo,desktop:()=>OO,notebook:()=>IO,phablet:()=>NO,phone:()=>PO,tablet:()=>MO});var bm=globalThis,Cc=bm.ShadowRoot&&(bm.ShadyCSS===void 0||bm.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,_b=Symbol(),hO=new WeakMap,Da=class{static{o(this,"n")}constructor(e,r,n){if(this._$cssResult$=!0,n!==_b)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(Cc&&e===void 0){let n=r!==void 0&&r.length===1;n&&(e=hO.get(r)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&hO.set(r,e))}return e}toString(){return this.cssText}},sr=o(t=>new Da(typeof t=="string"?t:t+"",void 0,_b),"r"),Ur=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 Da(r,t,_b)},"i"),wm=o((t,e)=>{if(Cc)t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of e){let n=document.createElement("style"),i=bm.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,t.appendChild(n)}},"S"),Oc=Cc?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let r="";for(let n of e.cssRules)r+=n.cssText;return sr(r)})(t):t;var{is:v4,defineProperty:k4,getOwnPropertyDescriptor:T4,getOwnPropertyNames:E4,getOwnPropertySymbols:D4,getPrototypeOf:C4}=Object,Sm=globalThis,mO=Sm.trustedTypes,O4=mO?mO.emptyScript:"",I4=Sm.reactiveElementPolyfillSupport,Ic=o((t,e)=>t,"d"),vm={toAttribute(t,e){switch(e){case Boolean:t=t?O4: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}},Rb=o((t,e)=>!v4(t,e),"f"),dO={attribute:!0,type:String,converter:vm,reflect:!1,useDefault:!1,hasChanged:Rb};Symbol.metadata??=Symbol("metadata"),Sm.litPropertyMetadata??=new WeakMap;var wn=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=dO){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&&k4(this.prototype,e,i)}}static getPropertyDescriptor(e,r,n){let{get:i,set:s}=T4(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)??dO}static _$Ei(){if(this.hasOwnProperty(Ic("elementProperties")))return;let e=C4(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Ic("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Ic("properties"))){let r=this.properties,n=[...E4(r),...D4(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(Oc(i))}else e!==void 0&&r.push(Oc(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 wm(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:vm).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:vm;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??Rb)(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){}};wn.elementStyles=[],wn.shadowRootOptions={mode:"open"},wn[Ic("elementProperties")]=new Map,wn[Ic("finalized")]=new Map,I4?.({ReactiveElement:wn}),(Sm.reactiveElementVersions??=[]).push("2.1.2");var Fb=globalThis,gO=o(t=>t,"i"),km=Fb.trustedTypes,yO=km?km.createPolicy("lit-html",{createHTML:o(t=>t,"createHTML")}):void 0,Ab="$lit$",zn=`lit$${Math.random().toFixed(9).slice(2)}$`,$b="?"+zn,M4=`<${$b}>`,jo=document,Mc=o(()=>jo.createComment(""),"c"),Nc=o(t=>t===null||typeof t!="object"&&typeof t!="function","a"),Bb=Array.isArray,xO=o(t=>Bb(t)||typeof t?.[Symbol.iterator]=="function","d"),jb=`[
287
- \f\r]`,Pc=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,bO=/-->/g,wO=/>/g,Uo=RegExp(`>|${jb}(?:([^\\s"'>=/]+)(${jb}*=${jb}*(?:[^
288
- \f\r"'\`<>=]|("|')|))|$)`,"g"),SO=/'/g,vO=/"/g,kO=/^(?:script|style|textarea|title)$/i,Ub=o(t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),"x"),zb=Ub(1),N4=Ub(2),P4=Ub(3),Ri=Symbol.for("lit-noChange"),nt=Symbol.for("lit-nothing"),TO=new WeakMap,zo=jo.createTreeWalker(jo,129);function EO(t,e){if(!Bb(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return yO!==void 0?yO.createHTML(e):e}o(EO,"V");var DO=o((t,e)=>{let r=t.length-1,n=[],i,s=e===2?"<svg>":e===3?"<math>":"",a=Pc;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===Pc?f[1]==="!--"?a=bO:f[1]!==void 0?a=wO:f[2]!==void 0?(kO.test(f[2])&&(i=RegExp("</"+f[2],"g")),a=Uo):f[3]!==void 0&&(a=Uo):a===Uo?f[0]===">"?(a=i??Pc,p=-1):f[1]===void 0?p=-2:(p=a.lastIndex-f[2].length,u=f[1],a=f[3]===void 0?Uo:f[3]==='"'?vO:SO):a===vO||a===SO?a=Uo:a===bO||a===wO?a=Pc:(a=Uo,i=void 0);let m=a===Uo&&t[l+1].startsWith("/>")?" ":"";s+=a===Pc?c+M4:p>=0?(n.push(u),c.slice(0,p)+Ab+c.slice(p)+zn+m):c+zn+(p===-2?l:m)}return[EO(t,s+(t[r]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),n]},"N"),Lc=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]=DO(e,r);if(this.el=t.createElement(u,n),zo.currentNode=this.el.content,r===2||r===3){let p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(i=zo.nextNode())!==null&&c.length<l;){if(i.nodeType===1){if(i.hasAttributes())for(let p of i.getAttributeNames())if(p.endsWith(Ab)){let h=f[a++],m=i.getAttribute(p).split(zn),d=/([.?@])?(.*)/.exec(h);c.push({type:1,index:s,name:d[2],strings:m,ctor:d[1]==="."?Em:d[1]==="?"?Dm:d[1]==="@"?Cm:Wo}),i.removeAttribute(p)}else p.startsWith(zn)&&(c.push({type:6,index:s}),i.removeAttribute(p));if(kO.test(i.tagName)){let p=i.textContent.split(zn),h=p.length-1;if(h>0){i.textContent=km?km.emptyScript:"";for(let m=0;m<h;m++)i.append(p[m],Mc()),zo.nextNode(),c.push({type:2,index:++s});i.append(p[h],Mc())}}}else if(i.nodeType===8)if(i.data===$b)c.push({type:2,index:s});else{let p=-1;for(;(p=i.data.indexOf(zn,p+1))!==-1;)c.push({type:7,index:s}),p+=zn.length-1}s++}}static createElement(e,r){let n=jo.createElement("template");return n.innerHTML=e,n}};function Ho(t,e,r=t,n){if(e===Ri)return e;let i=n!==void 0?r._$Co?.[n]:r._$Cl,s=Nc(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=Ho(t,i._$AS(t,e.values),i,n)),e}o(Ho,"M");var Tm=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??jo).importNode(r,!0);zo.currentNode=i;let s=zo.nextNode(),a=0,l=0,c=n[0];for(;c!==void 0;){if(a===c.index){let u;c.type===2?u=new Ca(s,s.nextSibling,this,e):c.type===1?u=new c.ctor(s,c.name,c.strings,this,e):c.type===6&&(u=new Om(s,this,e)),this._$AV.push(u),c=n[++l]}a!==c?.index&&(s=zo.nextNode(),a++)}return zo.currentNode=jo,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++}},Ca=class t{static{o(this,"k")}get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,r,n,i){this.type=2,this._$AH=nt,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=Ho(this,e,r),Nc(e)?e===nt||e==null||e===""?(this._$AH!==nt&&this._$AR(),this._$AH=nt):e!==this._$AH&&e!==Ri&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):xO(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!==nt&&Nc(this._$AH)?this._$AA.nextSibling.data=e:this.T(jo.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=Lc.createElement(EO(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===i)this._$AH.p(r);else{let s=new Tm(i,this),a=s.u(this.options);s.p(r),this.T(a),this._$AH=s}}_$AC(e){let r=TO.get(e.strings);return r===void 0&&TO.set(e.strings,r=new Lc(e)),r}k(e){Bb(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(Mc()),this.O(Mc()),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=gO(e).nextSibling;gO(e).remove(),e=n}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},Wo=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=nt,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=nt}_$AI(e,r=this,n,i){let s=this.strings,a=!1;if(s===void 0)e=Ho(this,e,r,0),a=!Nc(e)||e!==this._$AH&&e!==Ri,a&&(this._$AH=e);else{let l=e,c,u;for(e=s[0],c=0;c<s.length-1;c++)u=Ho(this,l[n+c],r,c),u===Ri&&(u=this._$AH[c]),a||=!Nc(u)||u!==this._$AH[c],u===nt?e=nt:e!==nt&&(e+=(u??"")+s[c+1]),this._$AH[c]=u}a&&!i&&this.j(e)}j(e){e===nt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Em=class extends Wo{static{o(this,"I")}constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===nt?void 0:e}},Dm=class extends Wo{static{o(this,"L")}constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==nt)}},Cm=class extends Wo{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=Ho(this,e,r,0)??nt)===Ri)return;let n=this._$AH,i=e===nt&&n!==nt||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,s=e!==nt&&(n===nt||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)}},Om=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){Ho(this,e)}},L4={M:Ab,P:zn,A:$b,C:1,L:DO,R:Tm,D:xO,V:Ho,I:Ca,H:Wo,N:Dm,U:Cm,B:Em,F:Om},_4=Fb.litHtmlPolyfillSupport;_4?.(Lc,Ca),(Fb.litHtmlVersions??=[]).push("3.3.2");var Hb=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 Ca(e.insertBefore(Mc(),s),s,void 0,r??{})}return i._$AI(t),i},"D");var Wb=globalThis,qo=class extends wn{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=Hb(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Ri}};qo._$litElement$=!0,qo.finalized=!0,Wb.litElementHydrateSupport?.({LitElement:qo});var R4=Wb.litElementPolyfillSupport;R4?.({LitElement:qo});var F4={_$AK:o((t,e,r)=>{t._$AK(e,r)},"_$AK"),_$AL:o(t=>t._$AL,"_$AL")};(Wb.litElementVersions??=[]).push("4.2.2");var A4=!1;var OO=1600,IO=1240,MO=1024,NO=600,PO=400,CO=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"),Yo=o((t,e)=>sr(`
284
+ `)}}s.push(l)}return null},"readBlock"),rb=o(async t=>qC(t,jU),"readFrontmatterBlock"),YC=o((t,e)=>t??{data:{},content:e},"orWholeSource"),VC=o(async t=>YC(await rb(t),t),"parseFrontmatter"),KC=o(async(t,e)=>{if(typeof e!="string"||e.trim()==="")throw new TypeError("Comment prefix must be a non-blank string.");let r=e.trimEnd(),n=await qC(t,i=>i.startsWith(e)?i.slice(e.length):i===r?"":null);return YC(n,t)},"parseCommentFrontmatter"),GC=o(async(t,e)=>`---
285
+ ${Object.keys(e).length===0?"":await ya.objectToYamlString(e)}---
286
+ ${t}`,"stringifyFrontmatter");var hm=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=await rb(e);this.frontmatterData=r?r.data:{};let n=await tb(r?[]:["toml"]).use(Js).use(Ys).process(r?r.content:e);this.html=n.toString()}};var nb=class t{static{o(this,"SmartMarkdown")}static async easyMarkdownToHtml(e){return(await new t().getMdParsedResultFromMarkdown(e)).html}constructor(){}async getMdParsedResultFromMarkdown(e){return await hm.createFromMarkdownString(e)}htmlToMarkdown(e){let r=new wi({headingStyle:"atx",codeBlockStyle:"fenced"});return r.use(ay.gfm),r.turndown(e)}};var Ao={};se(Ao,{SmartRouter:()=>ub});var cb=qn(rO(),1);var dm=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 AKe=o(t=>{console.log(`%c[Router]%c ${t}`,"color: rgb(255, 105, 100);","color: inherit")},"routeLog"),ub=class t{static{o(this,"SmartRouter")}constructor(e,r=""){this.options={debug:!1},this.queryParams=new dm,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:cb.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 $o={};se($o,{Smartstate:()=>gb,StateAction:()=>Tc,StatePart:()=>Ec,StateProcess:()=>Ta,attachContextProvider:()=>p4,computed:()=>db});var kc={};se(kc,{createSha256Hasher:()=>mb,sha256FromBuffer:()=>aO,sha256FromStream:()=>l4,sha256FromString:()=>a4,sha256FromStringSync:()=>s4});var XU=Symbol.for("nodejs.util.inspect.custom"),vc=class extends Error{static{o(this,"SmartCryptoError")}constructor(e){super(`SmartCrypto operation failed (${e}).`),this.name="SmartCryptoError",this.code=e,Object.defineProperty(this,"cause",{configurable:!1,enumerable:!1,value:void 0,writable:!1})}toJSON(){return{name:"SmartCryptoError",code:this.code,message:this.message}}[XU](){return this.toJSON()}},qe=o(t=>new vc(t),"createSmartCryptoError");var ZU=/^[A-Za-z0-9_-]*$/,e4=o(()=>{if(!globalThis.crypto?.subtle||typeof globalThis.crypto.getRandomValues!="function")throw qe("CRYPTO_OPERATION_FAILED");return globalThis.crypto},"getWebCrypto"),WKe=o((t,e="INVALID_ARGUMENT")=>{if(!(t instanceof Uint8Array))throw qe(e);return new Uint8Array(t)},"requireUint8Array"),qKe=o((t,e,r)=>{if(t.byteLength!==e)throw t.fill(0),qe(r);return t},"requireLength"),fb=o(t=>{if(t instanceof Uint8Array)return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);throw qe("INVALID_ARGUMENT")},"requireHashInput"),pb=o(t=>{if(typeof t!="string")throw qe("INVALID_ARGUMENT");return t},"requireString"),nO=o(t=>{let e="";for(let r of t)e+=r.toString(16).padStart(2,"0");return e},"encodeHex"),iO=o(async(t,e)=>{if(typeof t?.getReader!="function")throw qe("INVALID_ARGUMENT");let r=t.getReader();try{for(;;){let{value:n,done:i}=await r.read();if(i)return e.digest();if(!(n instanceof Uint8Array)){let s=qe("INVALID_ARGUMENT");throw await r.cancel(s),s}e.update(n)}}finally{r.releaseLock()}},"hashReadableStream"),t4=o(t=>{let e=new Uint8Array(t.byteLength);return e.set(t),e.buffer},"toArrayBuffer"),YKe=o((...t)=>{let e=t.reduce((i,s)=>i+s.byteLength,0),r=new Uint8Array(e),n=0;for(let i of t)r.set(i,n),n+=i.byteLength;return r},"concatBytes"),oO=o(async t=>{let e=t4(t);try{return new Uint8Array(await e4().subtle.digest("SHA-256",e))}finally{new Uint8Array(e).fill(0)}},"sha256"),VKe=o((t,e)=>{if(t.byteLength!==e.byteLength)return!1;let r=0;for(let n=0;n<t.byteLength;n++)r|=t[n]^e[n];return r===0},"bytesEqual"),KKe=o(t=>{let e=0;for(let r of t)e|=r;return e===0},"isAllZero"),r4=o(t=>{let e="";for(let n=0;n<t.byteLength;n+=32768)e+=String.fromCharCode(...t.subarray(n,n+32768));return btoa(e)},"encodeBase64"),n4=o(t=>r4(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/g,""),"encodeBase64Url"),GKe=o((t,e,r)=>{if(typeof t!="string")throw qe("INVALID_ENVELOPE");let n=Math.ceil(e*4/3);if(t.length>n)throw qe("SIZE_LIMIT_EXCEEDED");if(!ZU.test(t)||t.length%4===1)throw qe("INVALID_ENVELOPE");try{let i=(4-t.length%4)%4,s=t.replace(/-/g,"+").replace(/_/g,"/")+"=".repeat(i),a=atob(s);if(a.length>e)throw qe("SIZE_LIMIT_EXCEEDED");if(r!==void 0&&a.length!==r)throw qe("INVALID_ENVELOPE");let l=new Uint8Array(a.length);for(let c=0;c<a.length;c++)l[c]=a.charCodeAt(c);if(n4(l)!==t)throw qe("INVALID_ENVELOPE");return l}catch(i){throw i instanceof vc?i:qe("INVALID_ENVELOPE")}},"decodeCanonicalBase64Url"),QKe=o((t,e)=>{if(t===null||typeof t!="object"||Array.isArray(t))throw qe("INVALID_ENVELOPE");let r=Object.getPrototypeOf(t);if(r!==Object.prototype&&r!==null)throw qe("INVALID_ENVELOPE");let n=Reflect.ownKeys(t);if(n.some(s=>typeof s!="string"))throw qe("INVALID_ENVELOPE");let i=n;if(i.length!==e.length||[...i].sort().some((s,a)=>s!==[...e].sort()[a]))throw qe("INVALID_ENVELOPE");for(let s of i){let a=Object.getOwnPropertyDescriptor(t,s);if(!a?.enumerable||!("value"in a))throw qe("INVALID_ENVELOPE")}return t},"requirePlainDataObject");var i4=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]),o4=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),bn=o((t,e)=>t>>>e|t<<32-e,"rotateRight"),sO=new TextEncoder,hb=class{static{o(this,"Sha256Hasher")}constructor(){this.state=new Uint32Array(o4),this.block=new Uint8Array(64),this.words=new Uint32Array(64),this.blockLength=0,this.totalBytesHigh=0,this.totalBytesLow=0,this.finalized=!1}update(e){this.requireOpen();let r=fb(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(){this.requireOpen(),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),this.state.fill(0),a}requireOpen(){if(this.finalized)throw qe("INVALID_STATE")}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=bn(m,7)^bn(m,18)^m>>>3,y=bn(d,17)^bn(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=bn(c,6)^bn(c,11)^bn(c,25),d=c&u^~c&f,g=p+m+d+i4[h]+n[h]>>>0,y=bn(i,2)^bn(i,13)^bn(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}},mb=o(()=>new hb,"createSha256Hasher"),s4=o(t=>mb().update(sO.encode(pb(t))).digest(),"sha256FromStringSync"),aO=o(async t=>nO(await oO(fb(t))),"sha256FromBuffer"),a4=o(async t=>await aO(sO.encode(pb(t))),"sha256FromString"),l4=o(async t=>await iO(t,mb()),"sha256FromStream");var Tc=class{static{o(this,"StateAction")}constructor(e,r){this.statePartRef=e,this.actionDef=r}trigger(e){return this.statePartRef.dispatchAction(this,e)}};function u4(){return typeof document>"u"?$a(!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(u4,"createVisibilityObservable");var Ta=class{static{o(this,"StateProcess")}constructor(e,r){this.statusSubject=new Qo("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"?u4():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 lO=o(t=>{let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null},"isPlainObject"),gm=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&&(!lO(s)||!lO(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 f4(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(f4,"fromAbortSignal");var Ec=class t{static{o(this,"StatePart")}static{this.MAX_NESTED_DISPATCH_DEPTH=10}constructor(e,r){this.state=new Qo(void 0),this.disposed=!1,this.cumulativeDeferred=Q.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 Nr.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=>kc.sha256FromStringSync(er.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),ts(gm));if(n)return a=a.pipe(rs(f4(r.signal))),a;let l=a.pipe(fu({bufferSize:1,refCount:!0}));return e?this.selectorCache.set(e,l):this.defaultSelectObservable=l,l}createAction(e){return new Tc(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=Q.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 Ta(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 Ta(this,{producer:o(()=>nd(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 db(t,e){return rd(t.map(r=>r.select())).pipe(Xr(r=>e(...r)),ts(gm))}o(db,"computed");var gb=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 db(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 Ec(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 p4(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(p4,"attachContextProvider");var Bo={};se(Bo,{Smarturl:()=>yb});var yb=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 Pb={};se(Pb,{JsonLdTag:()=>jo,MetaTag:()=>kr,OpengraphTag:()=>Lt,Title:()=>Nb,WebSetup:()=>Dc});var Mb={};se(Mb,{business:()=>wb,code:()=>Sb,container:()=>vb,content:()=>Tb,database:()=>xb,descriptors:()=>kb,finance:()=>bb,general:()=>Eb,network:()=>ym,saas:()=>Cb,storage:()=>Ob,website:()=>Ib});var wb={};var xb={};var bb={};var Sb={};var vb={};var kb={};var Tb={};var Eb={};var ym={};se(ym,{ICnameDescriptor:()=>Db});var Db=class{static{o(this,"ICnameDescriptor")}};var Cb={};var Ob={};var Ib={};var _i=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 jo=class t extends _i{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 Lt=class t extends _i{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 Ea=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(jo.createCompanyJsonLd(e)),this.addTag(new Lt("og:type","business.business")),this.addTag(new Lt("og:title",e.name)),this.addTag(new Lt("og:url",e.website??"")),this.addTag(new Lt("og:image",e.logoUrl??"")),this.addTag(new Lt("business:contact_data:street_address",`${e.address.streetName} ${e.address.houseNumber}`)),this.addTag(new Lt("business:contact_data:locality",e.address.postalCode)),this.addTag(new Lt("business:contact_data:region",e.address.city)),this.addTag(new Lt("business:contact_data:postal_code",e.address.postalCode)),this.addTag(new Lt("business:contact_data:country_name",e.address.country))}addNewsArticleInfo(e){this.addTag(jo.createNewsArticleJsonLd(e)),this.addTag(Lt.createNewsArticleOgTags(e))}addProductInfo(e,r){this.addTag(jo.createProductJsonLd(e,r)),this.addTag(Lt.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 kr=class extends _i{static{o(this,"MetaTag")}constructor(e,r){super();let n=document.createElement("meta");n.name=e,n.content=r,this.elementRef=n}};var xm=class{static{o(this,"TagManager")}constructor(){this.globalLevel=new Ea(this,"global"),this.baseLevel=new Ea(this,"base")}async setup(e){switch(this.globalLevel.addTag(new kr("google","notranslate")),this.globalLevel.addTag(new kr("revisit-after","1 days")),e.twitterHandle&&(this.globalLevel.addTag(new kr("twitter:card","summary_large_image")),this.globalLevel.addTag(new kr("twitter:site",e.twitterHandle)),this.globalLevel.addTag(new kr("twitter:creator",e.twitterHandle))),this.baseLevel.title=e.title,e.description&&this.baseLevel.addTag(new kr("description",e.description)),e.canonicalDomain&&this.baseLevel.addTag(new kr("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 Ea(this,"subpage");return r.title=e.title,e.description&&r.addTag(new kr("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 Dc=class{static{o(this,"WebSetup")}constructor(e){this.tagManager=new xm,this.readyDeferred=Q.defer(),this.readyForSmartssrDeferred=Q.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 Nb=class{static{o(this,"Title")}};var m4="1.3.17";function cO(t,e,r){return Math.max(t,Math.min(e,r))}o(cO,"clamp");function d4(t,e,r){return(1-r)*t+r*e}o(d4,"lerp");function g4(t,e,r,n){return d4(t,e,1-Math.exp(-r*n))}o(g4,"damp");function y4(t,e){return(t%e+e)%e}o(y4,"modulo");var x4=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=cO(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=g4(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 b4(t,e){let r;return function(...n){let i=this;clearTimeout(r),r=setTimeout(()=>{r=void 0,t.apply(i,n)},e)}}o(b4,"debounce");var w4=class{static{o(this,"Dimensions")}constructor(t,e,{autoResize:r=!0,debounce:n=250}={}){this.wrapper=t,this.content=e,r&&(this.debouncedResize=b4(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}}},uO=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={}}},fO=100/6,Ri={passive:!1},S4=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,Ri),this.element.addEventListener("touchstart",this.onTouchStart,Ri),this.element.addEventListener("touchmove",this.onTouchMove,Ri),this.element.addEventListener("touchend",this.onTouchEnd,Ri)}touchStart={x:0,y:0};lastDelta={x:0,y:0};window={width:0,height:0};emitter=new uO;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,Ri),this.element.removeEventListener("touchstart",this.onTouchStart,Ri),this.element.removeEventListener("touchmove",this.onTouchMove,Ri),this.element.removeEventListener("touchend",this.onTouchEnd,Ri)}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?fO:n===2?this.window.width:1,s=n===1?fO: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")},pO=o(t=>Math.min(1,1.001-Math.pow(2,-10*t)),"defaultEasing"),Cc=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 x4;emitter=new uO;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:A=!1,naiveDimensions:F=A,stopInertiaOnNavigate:z=!1}={}){window.lenisVersion=m4,(!t||t===document.documentElement)&&(t=window),typeof l=="number"&&typeof c!="function"?c=pO: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:F,stopInertiaOnNavigate:z},this.dimensions=new w4(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 S4(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=cO(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=pO: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,A=P.overflowY;if(s=["auto","overlay","scroll"].includes(D),a=["auto","overlay","scroll"].includes(A),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?y4(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=qn(hO(),1),v4={ObjectMap:Tn,Stringmap:il,FastMap:eo};var Yb={};se(Yb,{containerContextStyles:()=>U4,cssForConstraint:()=>B4,cssForConstraintContainer:()=>j4,cssForContainer:()=>_O,cssForDesktop:()=>z4,cssForNotebook:()=>H4,cssForPhablet:()=>q4,cssForPhone:()=>Y4,cssForTablet:()=>W4,cssForViewport:()=>Vo,desktop:()=>IO,notebook:()=>MO,phablet:()=>PO,phone:()=>LO,tablet:()=>NO});var wm=globalThis,Oc=wm.ShadowRoot&&(wm.ShadyCSS===void 0||wm.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Rb=Symbol(),mO=new WeakMap,Ca=class{static{o(this,"n")}constructor(e,r,n){if(this._$cssResult$=!0,n!==Rb)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(Oc&&e===void 0){let n=r!==void 0&&r.length===1;n&&(e=mO.get(r)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&mO.set(r,e))}return e}toString(){return this.cssText}},sr=o(t=>new Ca(typeof t=="string"?t:t+"",void 0,Rb),"r"),Ur=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 Ca(r,t,Rb)},"i"),Sm=o((t,e)=>{if(Oc)t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of e){let n=document.createElement("style"),i=wm.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,t.appendChild(n)}},"S"),Ic=Oc?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let r="";for(let n of e.cssRules)r+=n.cssText;return sr(r)})(t):t;var{is:k4,defineProperty:T4,getOwnPropertyDescriptor:E4,getOwnPropertyNames:D4,getOwnPropertySymbols:C4,getPrototypeOf:O4}=Object,vm=globalThis,dO=vm.trustedTypes,I4=dO?dO.emptyScript:"",M4=vm.reactiveElementPolyfillSupport,Mc=o((t,e)=>t,"d"),km={toAttribute(t,e){switch(e){case Boolean:t=t?I4: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}},Fb=o((t,e)=>!k4(t,e),"f"),gO={attribute:!0,type:String,converter:km,reflect:!1,useDefault:!1,hasChanged:Fb};Symbol.metadata??=Symbol("metadata"),vm.litPropertyMetadata??=new WeakMap;var wn=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=gO){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&&T4(this.prototype,e,i)}}static getPropertyDescriptor(e,r,n){let{get:i,set:s}=E4(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)??gO}static _$Ei(){if(this.hasOwnProperty(Mc("elementProperties")))return;let e=O4(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=[...D4(r),...C4(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(Ic(i))}else e!==void 0&&r.push(Ic(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:km).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:km;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??Fb)(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){}};wn.elementStyles=[],wn.shadowRootOptions={mode:"open"},wn[Mc("elementProperties")]=new Map,wn[Mc("finalized")]=new Map,M4?.({ReactiveElement:wn}),(vm.reactiveElementVersions??=[]).push("2.1.2");var Ab=globalThis,yO=o(t=>t,"i"),Tm=Ab.trustedTypes,xO=Tm?Tm.createPolicy("lit-html",{createHTML:o(t=>t,"createHTML")}):void 0,$b="$lit$",Hn=`lit$${Math.random().toFixed(9).slice(2)}$`,Bb="?"+Hn,N4=`<${Bb}>`,Uo=document,Nc=o(()=>Uo.createComment(""),"c"),Pc=o(t=>t===null||typeof t!="object"&&typeof t!="function","a"),jb=Array.isArray,bO=o(t=>jb(t)||typeof t?.[Symbol.iterator]=="function","d"),Ub=`[
287
+ \f\r]`,Lc=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,wO=/-->/g,SO=/>/g,zo=RegExp(`>|${Ub}(?:([^\\s"'>=/]+)(${Ub}*=${Ub}*(?:[^
288
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),vO=/'/g,kO=/"/g,TO=/^(?:script|style|textarea|title)$/i,zb=o(t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),"x"),Hb=zb(1),P4=zb(2),L4=zb(3),Fi=Symbol.for("lit-noChange"),nt=Symbol.for("lit-nothing"),EO=new WeakMap,Ho=Uo.createTreeWalker(Uo,129);function DO(t,e){if(!jb(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return xO!==void 0?xO.createHTML(e):e}o(DO,"V");var CO=o((t,e)=>{let r=t.length-1,n=[],i,s=e===2?"<svg>":e===3?"<math>":"",a=Lc;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===Lc?f[1]==="!--"?a=wO:f[1]!==void 0?a=SO:f[2]!==void 0?(TO.test(f[2])&&(i=RegExp("</"+f[2],"g")),a=zo):f[3]!==void 0&&(a=zo):a===zo?f[0]===">"?(a=i??Lc,p=-1):f[1]===void 0?p=-2:(p=a.lastIndex-f[2].length,u=f[1],a=f[3]===void 0?zo:f[3]==='"'?kO:vO):a===kO||a===vO?a=zo:a===wO||a===SO?a=Lc:(a=zo,i=void 0);let m=a===zo&&t[l+1].startsWith("/>")?" ":"";s+=a===Lc?c+N4:p>=0?(n.push(u),c.slice(0,p)+$b+c.slice(p)+Hn+m):c+Hn+(p===-2?l:m)}return[DO(t,s+(t[r]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),n]},"N"),_c=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]=CO(e,r);if(this.el=t.createElement(u,n),Ho.currentNode=this.el.content,r===2||r===3){let p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(i=Ho.nextNode())!==null&&c.length<l;){if(i.nodeType===1){if(i.hasAttributes())for(let p of i.getAttributeNames())if(p.endsWith($b)){let h=f[a++],m=i.getAttribute(p).split(Hn),d=/([.?@])?(.*)/.exec(h);c.push({type:1,index:s,name:d[2],strings:m,ctor:d[1]==="."?Dm:d[1]==="?"?Cm:d[1]==="@"?Om:qo}),i.removeAttribute(p)}else p.startsWith(Hn)&&(c.push({type:6,index:s}),i.removeAttribute(p));if(TO.test(i.tagName)){let p=i.textContent.split(Hn),h=p.length-1;if(h>0){i.textContent=Tm?Tm.emptyScript:"";for(let m=0;m<h;m++)i.append(p[m],Nc()),Ho.nextNode(),c.push({type:2,index:++s});i.append(p[h],Nc())}}}else if(i.nodeType===8)if(i.data===Bb)c.push({type:2,index:s});else{let p=-1;for(;(p=i.data.indexOf(Hn,p+1))!==-1;)c.push({type:7,index:s}),p+=Hn.length-1}s++}}static createElement(e,r){let n=Uo.createElement("template");return n.innerHTML=e,n}};function Wo(t,e,r=t,n){if(e===Fi)return e;let i=n!==void 0?r._$Co?.[n]:r._$Cl,s=Pc(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=Wo(t,i._$AS(t,e.values),i,n)),e}o(Wo,"M");var Em=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??Uo).importNode(r,!0);Ho.currentNode=i;let s=Ho.nextNode(),a=0,l=0,c=n[0];for(;c!==void 0;){if(a===c.index){let u;c.type===2?u=new Oa(s,s.nextSibling,this,e):c.type===1?u=new c.ctor(s,c.name,c.strings,this,e):c.type===6&&(u=new Im(s,this,e)),this._$AV.push(u),c=n[++l]}a!==c?.index&&(s=Ho.nextNode(),a++)}return Ho.currentNode=Uo,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++}},Oa=class t{static{o(this,"k")}get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,r,n,i){this.type=2,this._$AH=nt,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=Wo(this,e,r),Pc(e)?e===nt||e==null||e===""?(this._$AH!==nt&&this._$AR(),this._$AH=nt):e!==this._$AH&&e!==Fi&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):bO(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!==nt&&Pc(this._$AH)?this._$AA.nextSibling.data=e:this.T(Uo.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=_c.createElement(DO(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===i)this._$AH.p(r);else{let s=new Em(i,this),a=s.u(this.options);s.p(r),this.T(a),this._$AH=s}}_$AC(e){let r=EO.get(e.strings);return r===void 0&&EO.set(e.strings,r=new _c(e)),r}k(e){jb(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(Nc()),this.O(Nc()),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=yO(e).nextSibling;yO(e).remove(),e=n}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},qo=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=nt,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=nt}_$AI(e,r=this,n,i){let s=this.strings,a=!1;if(s===void 0)e=Wo(this,e,r,0),a=!Pc(e)||e!==this._$AH&&e!==Fi,a&&(this._$AH=e);else{let l=e,c,u;for(e=s[0],c=0;c<s.length-1;c++)u=Wo(this,l[n+c],r,c),u===Fi&&(u=this._$AH[c]),a||=!Pc(u)||u!==this._$AH[c],u===nt?e=nt:e!==nt&&(e+=(u??"")+s[c+1]),this._$AH[c]=u}a&&!i&&this.j(e)}j(e){e===nt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Dm=class extends qo{static{o(this,"I")}constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===nt?void 0:e}},Cm=class extends qo{static{o(this,"L")}constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==nt)}},Om=class extends qo{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=Wo(this,e,r,0)??nt)===Fi)return;let n=this._$AH,i=e===nt&&n!==nt||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,s=e!==nt&&(n===nt||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)}},Im=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){Wo(this,e)}},_4={M:$b,P:Hn,A:Bb,C:1,L:CO,R:Em,D:bO,V:Wo,I:Oa,H:qo,N:Cm,U:Om,B:Dm,F:Im},R4=Ab.litHtmlPolyfillSupport;R4?.(_c,Oa),(Ab.litHtmlVersions??=[]).push("3.3.2");var Wb=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 Oa(e.insertBefore(Nc(),s),s,void 0,r??{})}return i._$AI(t),i},"D");var qb=globalThis,Yo=class extends wn{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=Wb(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Fi}};Yo._$litElement$=!0,Yo.finalized=!0,qb.litElementHydrateSupport?.({LitElement:Yo});var F4=qb.litElementPolyfillSupport;F4?.({LitElement:Yo});var A4={_$AK:o((t,e,r)=>{t._$AK(e,r)},"_$AK"),_$AL:o(t=>t._$AL,"_$AL")};(qb.litElementVersions??=[]).push("4.2.2");var $4=!1;var IO=1600,MO=1240,NO=1024,PO=600,LO=400,OO=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"),Vo=o((t,e)=>sr(`
289
289
  @container wccToolsViewport ${e} {
290
290
  ${t.cssText}
291
291
  }
292
292
  @media ${e} {
293
293
  ${t.cssText}
294
294
  }
295
- `),"cssForViewport"),LO=o((t,e,r)=>sr(`
295
+ `),"cssForViewport"),_O=o((t,e,r)=>sr(`
296
296
  @container ${r} ${e} {
297
297
  ${t.cssText}
298
298
  }
299
- `),"cssForContainer"),$4=o(t=>e=>Yo(e,CO(t)),"cssForConstraint"),B4=o((t,e)=>r=>LO(r,CO(t),e),"cssForConstraintContainer"),j4=o(t=>Ur`
299
+ `),"cssForContainer"),B4=o(t=>e=>Vo(e,OO(t)),"cssForConstraint"),j4=o((t,e)=>r=>_O(r,OO(t),e),"cssForConstraintContainer"),U4=o(t=>Ur`
300
300
  :host {
301
301
  container-type: inline-size;
302
302
  container-name: ${sr(t)};
303
303
  }
304
- `,"containerContextStyles"),U4=o(t=>Yo(t,`(min-width: ${OO}px)`),"cssForDesktop"),z4=o(t=>Yo(t,`(max-width: ${IO}px)`),"cssForNotebook"),H4=o(t=>Yo(t,`(max-width: ${MO}px)`),"cssForTablet"),W4=o(t=>Yo(t,`(max-width: ${NO}px)`),"cssForPhablet"),q4=o(t=>Yo(t,`(max-width: ${PO}px)`),"cssForPhone");var Im=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 Ea.default({});async toElement(e,r){this.sweetScroller.toElement(e,r),r?.duration&&await Q.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=Q.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 Dc({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 Mm=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 Oa=(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))(Oa||{}),Nm=class{constructor(e){this.domNode=e;this.startListening()}domNode;static{o(this,"Keyboard")}mapCombosToHandlers=new Map;pressedKeys=new Set;listening=!1;keyEnum=Oa;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 Oa[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 Oa[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 Oa[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=Oa[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 _c=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 Ec({metaObject:{title:""}});smartstate=new Ao.Smartstate;domToolsStatePart=this.smartstate.getStatePart("domtools",{virtualViewport:"native",jwt:""});router=new Fo.SmartRouter({debug:!1});convenience={typedrequest:jt,smartjson:er,smartpromise:Q,smarturl:$o};deesComms=new Sl.DeesComms;scroller=new Im(this);themeManager=new Mm(this);keyboard=null;disposed=!1;domToolsReady=Q.defer();domReady=Q.defer();globalStylesReady=Q.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 Nm(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=Q.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=Q.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 Pm=(()=>{let t=navigator.userAgent.indexOf("Mac OS X")===-1?Ur``.cssText:"";return Ur`
304
+ `,"containerContextStyles"),z4=o(t=>Vo(t,`(min-width: ${IO}px)`),"cssForDesktop"),H4=o(t=>Vo(t,`(max-width: ${MO}px)`),"cssForNotebook"),W4=o(t=>Vo(t,`(max-width: ${NO}px)`),"cssForTablet"),q4=o(t=>Vo(t,`(max-width: ${PO}px)`),"cssForPhablet"),Y4=o(t=>Vo(t,`(max-width: ${LO}px)`),"cssForPhone");var Mm=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 Q.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=Q.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 Cc({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 Nm=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 Ia=(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))(Ia||{}),Pm=class{constructor(e){this.domNode=e;this.startListening()}domNode;static{o(this,"Keyboard")}mapCombosToHandlers=new Map;pressedKeys=new Set;listening=!1;keyEnum=Ia;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 Ia[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 Ia[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 Ia[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=Ia[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 Sn=globalThis,Rc=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(Sn.deesDomTools&&!Sn.deesDomTools.disposed)return await Sn.deesDomTools.initializationPromise,Sn.deesDomTools;if(!t.initializationPromise){let r=new t(e);Sn.deesDomTools=r,t.initializationPromise=r.initializationPromise.then(()=>r).catch(n=>{throw Sn.deesDomTools===r&&(Sn.deesDomTools=void 0),t.initializationPromise=null,n})}return await t.initializationPromise}static getGlobalDomToolsSync(){let e=Sn.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 Dc({metaObject:{title:""}});smartstate=new $o.Smartstate;domToolsStatePart=this.smartstate.getStatePart("domtools",{virtualViewport:"native",jwt:""});router=new Ao.SmartRouter({debug:!1});convenience={typedrequest:jt,smartjson:er,smartpromise:Q,smarturl:Bo};deesComms=new vl.DeesComms;scroller=new Mm(this);themeManager=new Nm(this);keyboard=null;disposed=!1;domToolsReady=Q.defer();domReady=Q.defer();globalStylesReady=Q.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=Q.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=Q.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,Sn.deesDomTools===this&&(Sn.deesDomTools=void 0,t.initializationPromise=null)}}};var Lm=(()=>{let t=navigator.userAgent.indexOf("Mac OS X")===-1?Ur``.cssText:"";return Ur`
305
305
  /* width */
306
306
  ::-webkit-scrollbar {
307
307
  width: 0px;
@@ -309,7 +309,7 @@ ${t}`,"stringifyFrontmatter");var pm=class t{static{o(this,"MdParsedResult")}con
309
309
  body {
310
310
  scrollbar-width: none;
311
311
  }
312
- `.cssText})(),_O=Ur`
312
+ `.cssText})(),RO=Ur`
313
313
  /*
314
314
  @font-face {
315
315
  font-family: 'Material Icons';
@@ -327,37 +327,37 @@ ${t}`,"stringifyFrontmatter");var pm=class t{static{o(this,"MdParsedResult")}con
327
327
  }
328
328
 
329
329
  /* scroll bar styles */
330
- ${sr(Pm)}
331
- `.cssText;var Y4=["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"],V4=[...Y4,":not(xhtml|*)"].map(t=>`:where(${t})`).join(", "),RO=Ur`
330
+ ${sr(Lm)}
331
+ `.cssText;var V4=["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"],K4=[...V4,":not(xhtml|*)"].map(t=>`:where(${t})`).join(", "),FO=Ur`
332
332
  @namespace xhtml url('http://www.w3.org/1999/xhtml');
333
333
 
334
334
  * {
335
335
  box-sizing: border-box;
336
336
  }
337
337
 
338
- ${sr(V4)} {
338
+ ${sr(K4)} {
339
339
  transition: background 0.1s, color 0.1s;
340
340
  }
341
- `.cssText,K4=Ur`
342
- ${sr(RO)}
341
+ `.cssText,G4=Ur`
342
+ ${sr(FO)}
343
343
 
344
344
  :host {
345
345
  box-sizing: border-box;
346
346
  font-family: 'Geist Sans', 'Inter', sans-serif;
347
347
  }
348
348
 
349
- ${sr(Pm)}
350
- `,G4=zb`
349
+ ${sr(Lm)}
350
+ `,Q4=Hb`
351
351
  <style>
352
- ${RO}
352
+ ${FO}
353
353
 
354
354
  :host {
355
355
  font-family: 'Geist Sans', 'Inter', sans-serif;
356
356
  }
357
357
 
358
- ${Pm}
358
+ ${Lm}
359
359
  </style>
360
- `,Q4=o(async(t,e={})=>{let r=await _c.setupDomTools(e);return await r.runOnce("elementBasicSetup",async()=>{await r.setGlobalStyles(_O)}),r.globalStylesReady.status==="pending"&&r.globalStylesReady.resolve(),await r.globalStylesReady.promise,r},"setup");var Vb={};se(Vb,{cssGridColumns:()=>J4});var J4=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 Kb={};se(Kb,{SweetScroll:()=>Ea.default,smartmarkdown:()=>wc,smartpromise:()=>Q,smartrouter:()=>Fo,smartrx:()=>Ne,smartstate:()=>Ao,smartstring:()=>an,smarturl:()=>$o,typedrequest:()=>jt});export{_c as DomTools,$p as TypedRequest,qb as breakpoints,Vb as css,Yb as elementBasic,Kb as plugins};
360
+ `,J4=o(async(t,e={})=>{let r=await Rc.setupDomTools(e);return await r.runOnce("elementBasicSetup",async()=>{await r.setGlobalStyles(RO)}),r.globalStylesReady.status==="pending"&&r.globalStylesReady.resolve(),await r.globalStylesReady.promise,r},"setup");var Kb={};se(Kb,{cssGridColumns:()=>X4});var X4=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 Gb={};se(Gb,{SweetScroll:()=>Da.default,smartmarkdown:()=>Sc,smartpromise:()=>Q,smartrouter:()=>Ao,smartrx:()=>Ne,smartstate:()=>$o,smartstring:()=>an,smarturl:()=>Bo,typedrequest:()=>jt});export{Rc as DomTools,Bp as TypedRequest,Yb as breakpoints,Kb as css,Vb as elementBasic,Gb as plugins};
361
361
  /*! Bundled license information:
362
362
 
363
363
  sweet-scroll/sweet-scroll.js: