@liflig/cdk-cloudfront-auth 1.10.20 → 1.10.21

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,13 +1,14 @@
1
- var Il=Object.create;var{getPrototypeOf:_l,defineProperty:Ue,getOwnPropertyNames:ii,getOwnPropertyDescriptor:Ol}=Object,Sr=Object.prototype.hasOwnProperty;function si(e){return this[e]}var xl,kl,br=(e,t,r)=>{var n=e!=null&&typeof e==="object";if(n){var i=t?xl??=new WeakMap:kl??=new WeakMap,s=i.get(e);if(s)return s}r=e!=null?Il(_l(e)):{};let o=t||!e||!e.__esModule||!Sr.call(e,"default")?Ue(r,"default",{value:e,enumerable:!0}):r;if(e&&typeof e==="object"||typeof e==="function"){for(let c of ii(e))if(!Sr.call(o,c))Ue(o,c,{get:si.bind(e,c),enumerable:!0})}if(n)i.set(e,o);return o},$l=(e)=>{var t=(ni??=new WeakMap).get(e),r;if(t)return t;if(t=Ue({},"__esModule",{value:!0}),e&&typeof e==="object"||typeof e==="function"){for(var n of ii(e))if(!Sr.call(t,n))Ue(t,n,{get:si.bind(e,n),enumerable:!(r=Ol(e,n))||r.enumerable})}return ni.set(e,t),t},ni,p=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Ll=(e)=>e;function Pl(e,t){this[e]=Ll.bind(null,t)}var Nl=(e,t)=>{for(var r in t)Ue(e,r,{get:t[r],enumerable:!0,configurable:!0,set:Pl.bind(t,r)})};var q=(e,t,r)=>()=>{if(e)try{t=e(e=0)}catch(n){r=[n]}if(r)throw r[0];return t};var we=p(function(Rr,pi){var lt=require("buffer"),Y=lt.Buffer;function hi(e,t){for(var r in e)t[r]=e[r]}if(Y.from&&Y.alloc&&Y.allocUnsafe&&Y.allocUnsafeSlow)pi.exports=lt;else hi(lt,Rr),Rr.Buffer=Ee;function Ee(e,t,r){return Y(e,t,r)}hi(Y,Ee);Ee.from=function(e,t,r){if(typeof e==="number")throw TypeError("Argument must not be a number");return Y(e,t,r)};Ee.alloc=function(e,t,r){if(typeof e!=="number")throw TypeError("Argument must be a number");var n=Y(e);if(t!==void 0)if(typeof r==="string")n.fill(t,r);else n.fill(t);else n.fill(0);return n};Ee.allocUnsafe=function(e){if(typeof e!=="number")throw TypeError("Argument must be a number");return Y(e)};Ee.allocUnsafeSlow=function(e){if(typeof e!=="number")throw TypeError("Argument must be a number");return lt.SlowBuffer(e)}});var Cr=p(function(hw,di){var ft=we().Buffer,Wl=require("stream"),Ml=require("util");function ht(e){if(this.buffer=null,this.writable=!0,this.readable=!0,!e)return this.buffer=ft.alloc(0),this;if(typeof e.pipe==="function")return this.buffer=ft.alloc(0),e.pipe(this),this;if(e.length||typeof e==="object")return this.buffer=e,this.writable=!1,process.nextTick(function(){this.emit("end",e),this.readable=!1,this.emit("close")}.bind(this)),this;throw TypeError("Unexpected data type ("+typeof e+")")}Ml.inherits(ht,Wl);ht.prototype.write=function(t){this.buffer=ft.concat([this.buffer,ft.from(t)]),this.emit("data",t)};ht.prototype.end=function(t){if(t)this.write(t);this.emit("end",t),this.emit("close"),this.writable=!1,this.readable=!1};di.exports=ht});var gi=p(function(pw,mi){function Ir(e){var t=(e/8|0)+(e%8===0?0:1);return t}var Hl={ES256:Ir(256),ES384:Ir(384),ES512:Ir(521)};function zl(e){var t=Hl[e];if(t)return t;throw Error('Unknown algorithm "'+e+'"')}mi.exports=zl});var Ti=p(function(dw,vi){var pt=we().Buffer,Ei=gi(),dt=128,wi=0,Vl=32,Xl=16,Yl=2,Si=Xl|Vl|wi<<6,mt=Yl|wi<<6;function Zl(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function bi(e){if(pt.isBuffer(e))return e;else if(typeof e==="string")return pt.from(e,"base64");throw TypeError("ECDSA signature must be a Base64 string or a Buffer")}function Ql(e,t){e=bi(e);var r=Ei(t),n=r+1,i=e.length,s=0;if(e[s++]!==Si)throw Error('Could not find expected "seq"');var o=e[s++];if(o===(dt|1))o=e[s++];if(i-s<o)throw Error('"seq" specified length of "'+o+'", only "'+(i-s)+'" remaining');if(e[s++]!==mt)throw Error('Could not find expected "int" for "r"');var c=e[s++];if(i-s-2<c)throw Error('"r" specified length of "'+c+'", only "'+(i-s-2)+'" available');if(n<c)throw Error('"r" specified length of "'+c+'", max of "'+n+'" is acceptable');var u=s;if(s+=c,e[s++]!==mt)throw Error('Could not find expected "int" for "s"');var a=e[s++];if(i-s!==a)throw Error('"s" specified length of "'+a+'", expected "'+(i-s)+'"');if(n<a)throw Error('"s" specified length of "'+a+'", max of "'+n+'" is acceptable');var l=s;if(s+=a,s!==i)throw Error('Expected to consume entire buffer, but "'+(i-s)+'" bytes remain');var f=r-c,m=r-a,h=pt.allocUnsafe(f+c+m+a);for(s=0;s<f;++s)h[s]=0;e.copy(h,s,u+Math.max(-f,0),u+c),s=r;for(var g=s;s<g+m;++s)h[s]=0;return e.copy(h,s,l+Math.max(-m,0),l+a),h=h.toString("base64"),h=Zl(h),h}function yi(e,t,r){var n=0;while(t+n<r&&e[t+n]===0)++n;var i=e[t+n]>=dt;if(i)--n;return n}function ef(e,t){e=bi(e);var r=Ei(t),n=e.length;if(n!==r*2)throw TypeError('"'+t+'" signatures must be "'+r*2+'" bytes, saw "'+n+'"');var i=yi(e,0,r),s=yi(e,r,e.length),o=r-i,c=r-s,u=2+o+1+1+c,a=u<dt,l=pt.allocUnsafe((a?2:3)+u),f=0;if(l[f++]=Si,a)l[f++]=u;else l[f++]=dt|1,l[f++]=u&255;if(l[f++]=mt,l[f++]=o,i<0)l[f++]=0,f+=e.copy(l,f,0,r);else f+=e.copy(l,f,i,r);if(l[f++]=mt,l[f++]=c,s<0)l[f++]=0,e.copy(l,f,r);else e.copy(l,f,r+s);return l}vi.exports={derToJose:Ql,joseToDer:ef}});var Ri=p(function(mw,Ai){var Je=require("buffer").Buffer,_r=require("buffer").SlowBuffer;Ai.exports=gt;function gt(e,t){if(!Je.isBuffer(e)||!Je.isBuffer(t))return!1;if(e.length!==t.length)return!1;var r=0;for(var n=0;n<e.length;n++)r|=e[n]^t[n];return r===0}gt.install=function(){Je.prototype.equal=_r.prototype.equal=function(t){return gt(this,t)}};var tf=Je.prototype.equal,rf=_r.prototype.equal;gt.restore=function(){Je.prototype.equal=tf,_r.prototype.equal=rf}});var $r=p(function(gw,Pi){var be=we().Buffer,D=require("crypto"),Ii=Ti(),Ci=require("util"),nf=`"%s" is not a valid algorithm.
1
+ var Gl=Object.create;var{getPrototypeOf:Ml,defineProperty:Ue,getOwnPropertyNames:li,getOwnPropertyDescriptor:Hl}=Object,br=Object.prototype.hasOwnProperty;function fi(e){return this[e]}var zl,Vl,vr=(e,t,r)=>{var n=e!=null&&typeof e==="object";if(n){var i=t?zl??=new WeakMap:Vl??=new WeakMap,s=i.get(e);if(s)return s}r=e!=null?Gl(Ml(e)):{};let o=t||!e||!e.__esModule||!br.call(e,"default")?Ue(r,"default",{value:e,enumerable:!0}):r;if(e&&typeof e==="object"||typeof e==="function"){for(let c of li(e))if(!br.call(o,c))Ue(o,c,{get:fi.bind(e,c),enumerable:!0})}if(n)i.set(e,o);return o},Xl=(e)=>{var t=(ui??=new WeakMap).get(e),r;if(t)return t;if(t=Ue({},"__esModule",{value:!0}),e&&typeof e==="object"||typeof e==="function"){for(var n of li(e))if(!br.call(t,n))Ue(t,n,{get:fi.bind(e,n),enumerable:!(r=Hl(e,n))||r.enumerable})}return ui.set(e,t),t},ui,p=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Yl=(e)=>e;function Zl(e,t){this[e]=Yl.bind(null,t)}var Ql=(e,t)=>{for(var r in t)Ue(e,r,{get:t[r],enumerable:!0,configurable:!0,set:Zl.bind(t,r)})};var q=(e,t,r)=>()=>{if(e)try{t=e(e=0)}catch(n){r=[n]}if(r)throw r[0];return t};var Se=p(function(Cr,wi){var ft=require("buffer"),Y=ft.Buffer;function Ei(e,t){for(var r in e)t[r]=e[r]}if(Y.from&&Y.alloc&&Y.allocUnsafe&&Y.allocUnsafeSlow)wi.exports=ft;else Ei(ft,Cr),Cr.Buffer=we;function we(e,t,r){return Y(e,t,r)}Ei(Y,we);we.from=function(e,t,r){if(typeof e==="number")throw TypeError("Argument must not be a number");return Y(e,t,r)};we.alloc=function(e,t,r){if(typeof e!=="number")throw TypeError("Argument must be a number");var n=Y(e);if(t!==void 0)if(typeof r==="string")n.fill(t,r);else n.fill(t);else n.fill(0);return n};we.allocUnsafe=function(e){if(typeof e!=="number")throw TypeError("Argument must be a number");return Y(e)};we.allocUnsafeSlow=function(e){if(typeof e!=="number")throw TypeError("Argument must be a number");return ft.SlowBuffer(e)}});var Rr=p(function(Fw,Si){var ht=Se().Buffer,lf=require("stream"),ff=require("util");function pt(e){if(this.buffer=null,this.writable=!0,this.readable=!0,!e)return this.buffer=ht.alloc(0),this;if(typeof e.pipe==="function")return this.buffer=ht.alloc(0),e.pipe(this),this;if(e.length||typeof e==="object")return this.buffer=e,this.writable=!1,process.nextTick(function(){this.emit("end",e),this.readable=!1,this.emit("close")}.bind(this)),this;throw TypeError("Unexpected data type ("+typeof e+")")}ff.inherits(pt,lf);pt.prototype.write=function(t){this.buffer=ht.concat([this.buffer,ht.from(t)]),this.emit("data",t)};pt.prototype.end=function(t){if(t)this.write(t);this.emit("end",t),this.emit("close"),this.writable=!1,this.readable=!1};Si.exports=pt});var vi=p(function(jw,bi){function xr(e){var t=(e/8|0)+(e%8===0?0:1);return t}var hf={ES256:xr(256),ES384:xr(384),ES512:xr(521)};function pf(e){var t=hf[e];if(t)return t;throw Error('Unknown algorithm "'+e+'"')}bi.exports=pf});var _i=p(function(Kw,xi){var dt=Se().Buffer,Ai=vi(),mt=128,Ii=0,df=32,mf=16,gf=2,Ci=mf|df|Ii<<6,gt=gf|Ii<<6;function yf(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function Ri(e){if(dt.isBuffer(e))return e;else if(typeof e==="string")return dt.from(e,"base64");throw TypeError("ECDSA signature must be a Base64 string or a Buffer")}function Ef(e,t){e=Ri(e);var r=Ai(t),n=r+1,i=e.length,s=0;if(e[s++]!==Ci)throw Error('Could not find expected "seq"');var o=e[s++];if(o===(mt|1))o=e[s++];if(i-s<o)throw Error('"seq" specified length of "'+o+'", only "'+(i-s)+'" remaining');if(e[s++]!==gt)throw Error('Could not find expected "int" for "r"');var c=e[s++];if(i-s-2<c)throw Error('"r" specified length of "'+c+'", only "'+(i-s-2)+'" available');if(n<c)throw Error('"r" specified length of "'+c+'", max of "'+n+'" is acceptable');var u=s;if(s+=c,e[s++]!==gt)throw Error('Could not find expected "int" for "s"');var a=e[s++];if(i-s!==a)throw Error('"s" specified length of "'+a+'", expected "'+(i-s)+'"');if(n<a)throw Error('"s" specified length of "'+a+'", max of "'+n+'" is acceptable');var l=s;if(s+=a,s!==i)throw Error('Expected to consume entire buffer, but "'+(i-s)+'" bytes remain');var f=r-c,m=r-a,h=dt.allocUnsafe(f+c+m+a);for(s=0;s<f;++s)h[s]=0;e.copy(h,s,u+Math.max(-f,0),u+c),s=r;for(var g=s;s<g+m;++s)h[s]=0;return e.copy(h,s,l+Math.max(-m,0),l+a),h=h.toString("base64"),h=yf(h),h}function Ti(e,t,r){var n=0;while(t+n<r&&e[t+n]===0)++n;var i=e[t+n]>=mt;if(i)--n;return n}function wf(e,t){e=Ri(e);var r=Ai(t),n=e.length;if(n!==r*2)throw TypeError('"'+t+'" signatures must be "'+r*2+'" bytes, saw "'+n+'"');var i=Ti(e,0,r),s=Ti(e,r,e.length),o=r-i,c=r-s,u=2+o+1+1+c,a=u<mt,l=dt.allocUnsafe((a?2:3)+u),f=0;if(l[f++]=Ci,a)l[f++]=u;else l[f++]=mt|1,l[f++]=u&255;if(l[f++]=gt,l[f++]=o,i<0)l[f++]=0,f+=e.copy(l,f,0,r);else f+=e.copy(l,f,i,r);if(l[f++]=gt,l[f++]=c,s<0)l[f++]=0,e.copy(l,f,r);else e.copy(l,f,r+s);return l}xi.exports={derToJose:Ef,joseToDer:wf}});var ki=p(function(Dw,Oi){var We=require("buffer").Buffer,_r=require("buffer").SlowBuffer;Oi.exports=yt;function yt(e,t){if(!We.isBuffer(e)||!We.isBuffer(t))return!1;if(e.length!==t.length)return!1;var r=0;for(var n=0;n<e.length;n++)r|=e[n]^t[n];return r===0}yt.install=function(){We.prototype.equal=_r.prototype.equal=function(t){return yt(this,t)}};var Sf=We.prototype.equal,bf=_r.prototype.equal;yt.restore=function(){We.prototype.equal=Sf,_r.prototype.equal=bf}});var Lr=p(function(Bw,Di){var ve=Se().Buffer,D=require("crypto"),Li=_i(),$i=require("util"),vf=`"%s" is not a valid algorithm.
2
2
  Supported algorithms are:
3
- "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".`,Ge="secret must be a string or buffer",Se="key must be a string or a buffer",sf="key must be a string, a buffer or an object",xr=typeof D.createPublicKey==="function";if(xr)Se+=" or a KeyObject",Ge+="or a KeyObject";function _i(e){if(be.isBuffer(e))return;if(typeof e==="string")return;if(!xr)throw M(Se);if(typeof e!=="object")throw M(Se);if(typeof e.type!=="string")throw M(Se);if(typeof e.asymmetricKeyType!=="string")throw M(Se);if(typeof e.export!=="function")throw M(Se)}function Oi(e){if(be.isBuffer(e))return;if(typeof e==="string")return;if(typeof e==="object")return;throw M(sf)}function of(e){if(be.isBuffer(e))return;if(typeof e==="string")return e;if(!xr)throw M(Ge);if(typeof e!=="object")throw M(Ge);if(e.type!=="secret")throw M(Ge);if(typeof e.export!=="function")throw M(Ge)}function kr(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function xi(e){e=e.toString();var t=4-e.length%4;if(t!==4)for(var r=0;r<t;++r)e+="=";return e.replace(/\-/g,"+").replace(/_/g,"/")}function M(e){var t=[].slice.call(arguments,1),r=Ci.format.bind(Ci,e).apply(null,t);return TypeError(r)}function af(e){return be.isBuffer(e)||typeof e==="string"}function We(e){if(!af(e))e=JSON.stringify(e);return e}function ki(e){return function(r,n){of(n),r=We(r);var i=D.createHmac("sha"+e,n),s=(i.update(r),i.digest("base64"));return kr(s)}}var Or,cf="timingSafeEqual"in D?function(t,r){if(t.byteLength!==r.byteLength)return!1;return D.timingSafeEqual(t,r)}:function(t,r){if(!Or)Or=Ri();return Or(t,r)};function uf(e){return function(r,n,i){var s=ki(e)(r,i);return cf(be.from(n),be.from(s))}}function $i(e){return function(r,n){Oi(n),r=We(r);var i=D.createSign("RSA-SHA"+e),s=(i.update(r),i.sign(n,"base64"));return kr(s)}}function Li(e){return function(r,n,i){_i(i),r=We(r),n=xi(n);var s=D.createVerify("RSA-SHA"+e);return s.update(r),s.verify(i,n,"base64")}}function lf(e){return function(r,n){Oi(n),r=We(r);var i=D.createSign("RSA-SHA"+e),s=(i.update(r),i.sign({key:n,padding:D.constants.RSA_PKCS1_PSS_PADDING,saltLength:D.constants.RSA_PSS_SALTLEN_DIGEST},"base64"));return kr(s)}}function ff(e){return function(r,n,i){_i(i),r=We(r),n=xi(n);var s=D.createVerify("RSA-SHA"+e);return s.update(r),s.verify({key:i,padding:D.constants.RSA_PKCS1_PSS_PADDING,saltLength:D.constants.RSA_PSS_SALTLEN_DIGEST},n,"base64")}}function hf(e){var t=$i(e);return function(){var n=t.apply(null,arguments);return n=Ii.derToJose(n,"ES"+e),n}}function pf(e){var t=Li(e);return function(n,i,s){i=Ii.joseToDer(i,"ES"+e).toString("base64");var o=t(n,i,s);return o}}function df(){return function(){return""}}function mf(){return function(t,r){return r===""}}Pi.exports=function(t){var r={hs:ki,rs:$i,ps:lf,es:hf,none:df},n={hs:uf,rs:Li,ps:ff,es:pf,none:mf},i=t.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/);if(!i)throw M(nf,t);var s=(i[1]||i[3]).toLowerCase(),o=i[2];return{sign:r[s](o),verify:n[s](o)}}});var Lr=p(function(yw,Ni){var gf=require("buffer").Buffer;Ni.exports=function(t){if(typeof t==="string")return t;if(typeof t==="number"||gf.isBuffer(t))return t.toString();return JSON.stringify(t)}});var Bi=p(function(Ew,Di){var yf=we().Buffer,qi=Cr(),Ef=$r(),wf=require("stream"),Fi=Lr(),Pr=require("util");function ji(e,t){return yf.from(e,t).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function Sf(e,t,r){r=r||"utf8";var n=ji(Fi(e),"binary"),i=ji(Fi(t),r);return Pr.format("%s.%s",n,i)}function Ki(e){var{header:t,payload:r}=e,n=e.secret||e.privateKey,i=e.encoding,s=Ef(t.alg),o=Sf(t,r,i),c=s.sign(o,n);return Pr.format("%s.%s",o,c)}function yt(e){var t=e.secret;if(t=t==null?e.privateKey:t,t=t==null?e.key:t,/^hs/i.test(e.header.alg)===!0&&t==null)throw TypeError("secret must be a string or buffer or a KeyObject");var r=new qi(t);this.readable=!0,this.header=e.header,this.encoding=e.encoding,this.secret=this.privateKey=this.key=r,this.payload=new qi(e.payload),this.secret.once("close",function(){if(!this.payload.writable&&this.readable)this.sign()}.bind(this)),this.payload.once("close",function(){if(!this.secret.writable&&this.readable)this.sign()}.bind(this))}Pr.inherits(yt,wf);yt.prototype.sign=function(){try{var t=Ki({header:this.header,payload:this.payload.buffer,secret:this.secret.buffer,encoding:this.encoding});return this.emit("done",t),this.emit("data",t),this.emit("end"),this.readable=!1,t}catch(r){this.readable=!1,this.emit("error",r),this.emit("close")}};yt.sign=Ki;Di.exports=yt});var Yi=p(function(ww,Xi){var Ji=we().Buffer,Ui=Cr(),bf=$r(),vf=require("stream"),Gi=Lr(),Tf=require("util"),Af=/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;function Rf(e){return Object.prototype.toString.call(e)==="[object Object]"}function Cf(e){if(Rf(e))return e;try{return JSON.parse(e)}catch(t){return}}function Wi(e){var t=e.split(".",1)[0];return Cf(Ji.from(t,"base64").toString("binary"))}function If(e){return e.split(".",2).join(".")}function Mi(e){return e.split(".")[2]}function _f(e,t){t=t||"utf8";var r=e.split(".")[1];return Ji.from(r,"base64").toString(t)}function Hi(e){return Af.test(e)&&!!Wi(e)}function zi(e,t,r){if(!t){var n=Error("Missing algorithm parameter for jws.verify");throw n.code="MISSING_ALGORITHM",n}e=Gi(e);var i=Mi(e),s=If(e),o=bf(t);return o.verify(s,i,r)}function Vi(e,t){if(t=t||{},e=Gi(e),!Hi(e))return null;var r=Wi(e);if(!r)return null;var n=_f(e);if(r.typ==="JWT"||t.json)n=JSON.parse(n,t.encoding);return{header:r,payload:n,signature:Mi(e)}}function ve(e){e=e||{};var t=e.secret;if(t=t==null?e.publicKey:t,t=t==null?e.key:t,/^hs/i.test(e.algorithm)===!0&&t==null)throw TypeError("secret must be a string or buffer or a KeyObject");var r=new Ui(t);this.readable=!0,this.algorithm=e.algorithm,this.encoding=e.encoding,this.secret=this.publicKey=this.key=r,this.signature=new Ui(e.signature),this.secret.once("close",function(){if(!this.signature.writable&&this.readable)this.verify()}.bind(this)),this.signature.once("close",function(){if(!this.secret.writable&&this.readable)this.verify()}.bind(this))}Tf.inherits(ve,vf);ve.prototype.verify=function(){try{var t=zi(this.signature.buffer,this.algorithm,this.key.buffer),r=Vi(this.signature.buffer,this.encoding);return this.emit("done",t,r),this.emit("data",t),this.emit("end"),this.readable=!1,t}catch(n){this.readable=!1,this.emit("error",n),this.emit("close")}};ve.decode=Vi;ve.isValid=Hi;ve.verify=zi;Xi.exports=ve});var wt=p(function(re){var Zi=Bi(),Et=Yi(),Of=["HS256","HS384","HS512","RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"];re.ALGORITHMS=Of;re.sign=Zi.sign;re.verify=Et.verify;re.decode=Et.decode;re.isValid=Et.isValid;re.createSign=function(t){return new Zi(t)};re.createVerify=function(t){return new Et(t)}});var Nr=p(function(bw,Qi){var xf=wt();Qi.exports=function(e,t){t=t||{};var r=xf.decode(e,t);if(!r)return null;var n=r.payload;if(typeof n==="string")try{var i=JSON.parse(n);if(i!==null&&typeof i==="object")n=i}catch(s){}if(t.complete===!0)return{header:r.header,payload:n,signature:r.signature};return n}});var Me=p(function(vw,es){var St=function(e,t){if(Error.call(this,e),Error.captureStackTrace)Error.captureStackTrace(this,this.constructor);if(this.name="JsonWebTokenError",this.message=e,t)this.inner=t};St.prototype=Object.create(Error.prototype);St.prototype.constructor=St;es.exports=St});var qr=p(function(Tw,rs){var ts=Me(),bt=function(e,t){ts.call(this,e),this.name="NotBeforeError",this.date=t};bt.prototype=Object.create(ts.prototype);bt.prototype.constructor=bt;rs.exports=bt});var Fr=p(function(Aw,is){var ns=Me(),vt=function(e,t){ns.call(this,e),this.name="TokenExpiredError",this.expiredAt=t};vt.prototype=Object.create(ns.prototype);vt.prototype.constructor=vt;is.exports=vt});var jr=p(function(Rw,ss){var Te=1000,Ae=Te*60,Re=Ae*60,fe=Re*24,kf=fe*7,$f=fe*365.25;ss.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return Lf(e);else if(r==="number"&&isFinite(e))return t.long?Nf(e):Pf(e);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Lf(e){if(e=String(e),e.length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*$f;case"weeks":case"week":case"w":return r*kf;case"days":case"day":case"d":return r*fe;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Re;case"minutes":case"minute":case"mins":case"min":case"m":return r*Ae;case"seconds":case"second":case"secs":case"sec":case"s":return r*Te;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}function Pf(e){var t=Math.abs(e);if(t>=fe)return Math.round(e/fe)+"d";if(t>=Re)return Math.round(e/Re)+"h";if(t>=Ae)return Math.round(e/Ae)+"m";if(t>=Te)return Math.round(e/Te)+"s";return e+"ms"}function Nf(e){var t=Math.abs(e);if(t>=fe)return Tt(e,t,fe,"day");if(t>=Re)return Tt(e,t,Re,"hour");if(t>=Ae)return Tt(e,t,Ae,"minute");if(t>=Te)return Tt(e,t,Te,"second");return e+" ms"}function Tt(e,t,r,n){var i=t>=r*1.5;return Math.round(e/r)+" "+n+(i?"s":"")}});var Kr=p(function(Cw,os){var qf=jr();os.exports=function(e,t){var r=t||Math.floor(Date.now()/1000);if(typeof e==="string"){var n=qf(e);if(typeof n>"u")return;return Math.floor(r+n/1000)}else if(typeof e==="number")return r+e;else return}});var Ce=p(function(Iw,as){var Ff=Number.MAX_SAFE_INTEGER||9007199254740991,jf=["major","premajor","minor","preminor","patch","prepatch","prerelease"];as.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:Ff,RELEASE_TYPES:jf,SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var He=p(function(_w,cs){var Kf=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};cs.exports=Kf});var Ie=p(function(X,us){var{MAX_SAFE_COMPONENT_LENGTH:Dr,MAX_SAFE_BUILD_LENGTH:Df,MAX_LENGTH:Bf}=Ce(),Uf=He();X=us.exports={};var Jf=X.re=[],Gf=X.safeRe=[],y=X.src=[],Wf=X.safeSrc=[],E=X.t={},Mf=0,Br="[a-zA-Z0-9-]",Hf=[["\\s",1],["\\d",Bf],[Br,Df]],zf=(e)=>{for(let[t,r]of Hf)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e},v=(e,t,r)=>{let n=zf(t),i=Mf++;Uf(e,i,t),E[e]=i,y[i]=t,Wf[i]=n,Jf[i]=new RegExp(t,r?"g":void 0),Gf[i]=new RegExp(n,r?"g":void 0)};v("NUMERICIDENTIFIER","0|[1-9]\\d*");v("NUMERICIDENTIFIERLOOSE","\\d+");v("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Br}*`);v("MAINVERSION",`(${y[E.NUMERICIDENTIFIER]})\\.(${y[E.NUMERICIDENTIFIER]})\\.(${y[E.NUMERICIDENTIFIER]})`);v("MAINVERSIONLOOSE",`(${y[E.NUMERICIDENTIFIERLOOSE]})\\.(${y[E.NUMERICIDENTIFIERLOOSE]})\\.(${y[E.NUMERICIDENTIFIERLOOSE]})`);v("PRERELEASEIDENTIFIER",`(?:${y[E.NONNUMERICIDENTIFIER]}|${y[E.NUMERICIDENTIFIER]})`);v("PRERELEASEIDENTIFIERLOOSE",`(?:${y[E.NONNUMERICIDENTIFIER]}|${y[E.NUMERICIDENTIFIERLOOSE]})`);v("PRERELEASE",`(?:-(${y[E.PRERELEASEIDENTIFIER]}(?:\\.${y[E.PRERELEASEIDENTIFIER]})*))`);v("PRERELEASELOOSE",`(?:-?(${y[E.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${y[E.PRERELEASEIDENTIFIERLOOSE]})*))`);v("BUILDIDENTIFIER",`${Br}+`);v("BUILD",`(?:\\+(${y[E.BUILDIDENTIFIER]}(?:\\.${y[E.BUILDIDENTIFIER]})*))`);v("FULLPLAIN",`v?${y[E.MAINVERSION]}${y[E.PRERELEASE]}?${y[E.BUILD]}?`);v("FULL",`^${y[E.FULLPLAIN]}$`);v("LOOSEPLAIN",`[v=\\s]*${y[E.MAINVERSIONLOOSE]}${y[E.PRERELEASELOOSE]}?${y[E.BUILD]}?`);v("LOOSE",`^${y[E.LOOSEPLAIN]}$`);v("GTLT","((?:<|>)?=?)");v("XRANGEIDENTIFIERLOOSE",`${y[E.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);v("XRANGEIDENTIFIER",`${y[E.NUMERICIDENTIFIER]}|x|X|\\*`);v("XRANGEPLAIN",`[v=\\s]*(${y[E.XRANGEIDENTIFIER]})(?:\\.(${y[E.XRANGEIDENTIFIER]})(?:\\.(${y[E.XRANGEIDENTIFIER]})(?:${y[E.PRERELEASE]})?${y[E.BUILD]}?)?)?`);v("XRANGEPLAINLOOSE",`[v=\\s]*(${y[E.XRANGEIDENTIFIERLOOSE]})(?:\\.(${y[E.XRANGEIDENTIFIERLOOSE]})(?:\\.(${y[E.XRANGEIDENTIFIERLOOSE]})(?:${y[E.PRERELEASELOOSE]})?${y[E.BUILD]}?)?)?`);v("XRANGE",`^${y[E.GTLT]}\\s*${y[E.XRANGEPLAIN]}$`);v("XRANGELOOSE",`^${y[E.GTLT]}\\s*${y[E.XRANGEPLAINLOOSE]}$`);v("COERCEPLAIN",`(^|[^\\d])(\\d{1,${Dr}})(?:\\.(\\d{1,${Dr}}))?(?:\\.(\\d{1,${Dr}}))?`);v("COERCE",`${y[E.COERCEPLAIN]}(?:$|[^\\d])`);v("COERCEFULL",y[E.COERCEPLAIN]+`(?:${y[E.PRERELEASE]})?(?:${y[E.BUILD]})?(?:$|[^\\d])`);v("COERCERTL",y[E.COERCE],!0);v("COERCERTLFULL",y[E.COERCEFULL],!0);v("LONETILDE","(?:~>?)");v("TILDETRIM",`(\\s*)${y[E.LONETILDE]}\\s+`,!0);X.tildeTrimReplace="$1~";v("TILDE",`^${y[E.LONETILDE]}${y[E.XRANGEPLAIN]}$`);v("TILDELOOSE",`^${y[E.LONETILDE]}${y[E.XRANGEPLAINLOOSE]}$`);v("LONECARET","(?:\\^)");v("CARETTRIM",`(\\s*)${y[E.LONECARET]}\\s+`,!0);X.caretTrimReplace="$1^";v("CARET",`^${y[E.LONECARET]}${y[E.XRANGEPLAIN]}$`);v("CARETLOOSE",`^${y[E.LONECARET]}${y[E.XRANGEPLAINLOOSE]}$`);v("COMPARATORLOOSE",`^${y[E.GTLT]}\\s*(${y[E.LOOSEPLAIN]})$|^$`);v("COMPARATOR",`^${y[E.GTLT]}\\s*(${y[E.FULLPLAIN]})$|^$`);v("COMPARATORTRIM",`(\\s*)${y[E.GTLT]}\\s*(${y[E.LOOSEPLAIN]}|${y[E.XRANGEPLAIN]})`,!0);X.comparatorTrimReplace="$1$2$3";v("HYPHENRANGE",`^\\s*(${y[E.XRANGEPLAIN]})\\s+-\\s+(${y[E.XRANGEPLAIN]})\\s*$`);v("HYPHENRANGELOOSE",`^\\s*(${y[E.XRANGEPLAINLOOSE]})\\s+-\\s+(${y[E.XRANGEPLAINLOOSE]})\\s*$`);v("STAR","(<|>)?=?\\s*\\*");v("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");v("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var At=p(function(Ow,ls){var Vf=Object.freeze({loose:!0}),Xf=Object.freeze({}),Yf=(e)=>{if(!e)return Xf;if(typeof e!=="object")return Vf;return e};ls.exports=Yf});var Ur=p(function(xw,ps){var fs=/^[0-9]+$/,hs=(e,t)=>{if(typeof e==="number"&&typeof t==="number")return e===t?0:e<t?-1:1;let r=fs.test(e),n=fs.test(t);if(r&&n)e=+e,t=+t;return e===t?0:r&&!n?-1:n&&!r?1:e<t?-1:1},Zf=(e,t)=>hs(t,e);ps.exports={compareIdentifiers:hs,rcompareIdentifiers:Zf}});var P=p(function(kw,ms){var Rt=He(),{MAX_LENGTH:ds,MAX_SAFE_INTEGER:Ct}=Ce(),{safeRe:It,t:_t}=Ie(),Qf=At(),{compareIdentifiers:Jr}=Ur(),eh=(e,t)=>{let r=t.split(".");if(r.length>e.length)return!1;for(let n=0;n<r.length;n++)if(Jr(e[n],r[n])!==0)return!1;return!0};class H{constructor(e,t){if(t=Qf(t),e instanceof H)if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;else e=e.version;else if(typeof e!=="string")throw TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>ds)throw TypeError(`version is longer than ${ds} characters`);Rt("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let r=e.trim().match(t.loose?It[_t.LOOSE]:It[_t.FULL]);if(!r)throw TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>Ct||this.major<0)throw TypeError("Invalid major version");if(this.minor>Ct||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>Ct||this.patch<0)throw TypeError("Invalid patch version");if(!r[4])this.prerelease=[];else this.prerelease=r[4].split(".").map((n)=>{if(/^[0-9]+$/.test(n)){let i=+n;if(i>=0&&i<Ct)return i}return n});this.build=r[5]?r[5].split("."):[],this.format()}format(){if(this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length)this.version+=`-${this.prerelease.join(".")}`;return this.version}toString(){return this.version}compare(e){if(Rt("SemVer.compare",this.version,this.options,e),!(e instanceof H)){if(typeof e==="string"&&e===this.version)return 0;e=new H(e,this.options)}if(e.version===this.version)return 0;return this.compareMain(e)||this.comparePre(e)}compareMain(e){if(!(e instanceof H))e=new H(e,this.options);if(this.major<e.major)return-1;if(this.major>e.major)return 1;if(this.minor<e.minor)return-1;if(this.minor>e.minor)return 1;if(this.patch<e.patch)return-1;if(this.patch>e.patch)return 1;return 0}comparePre(e){if(!(e instanceof H))e=new H(e,this.options);if(this.prerelease.length&&!e.prerelease.length)return-1;else if(!this.prerelease.length&&e.prerelease.length)return 1;else if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let r=this.prerelease[t],n=e.prerelease[t];if(Rt("prerelease compare",t,r,n),r===void 0&&n===void 0)return 0;else if(n===void 0)return 1;else if(r===void 0)return-1;else if(r===n)continue;else return Jr(r,n)}while(++t)}compareBuild(e){if(!(e instanceof H))e=new H(e,this.options);let t=0;do{let r=this.build[t],n=e.build[t];if(Rt("build compare",t,r,n),r===void 0&&n===void 0)return 0;else if(n===void 0)return 1;else if(r===void 0)return-1;else if(r===n)continue;else return Jr(r,n)}while(++t)}inc(e,t,r){if(e.startsWith("pre")){if(!t&&r===!1)throw Error("invalid increment argument: identifier is empty");if(t){let n=`-${t}`.match(this.options.loose?It[_t.PRERELEASELOOSE]:It[_t.PRERELEASE]);if(!n||n[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":if(this.prerelease.length===0)this.inc("patch",t,r);this.inc("pre",t,r);break;case"release":if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":if(this.minor!==0||this.patch!==0||this.prerelease.length===0)this.major++;this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":if(this.patch!==0||this.prerelease.length===0)this.minor++;this.patch=0,this.prerelease=[];break;case"patch":if(this.prerelease.length===0)this.patch++;this.prerelease=[];break;case"pre":{let n=Number(r)?1:0;if(this.prerelease.length===0)this.prerelease=[n];else{let i=this.prerelease.length;while(--i>=0)if(typeof this.prerelease[i]==="number")this.prerelease[i]++,i=-2;if(i===-1){if(t===this.prerelease.join(".")&&r===!1)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(n)}}if(t){let i=[t,n];if(r===!1)i=[t];if(eh(this.prerelease,t)){let s=this.prerelease[t.split(".").length];if(isNaN(s))this.prerelease=i}else this.prerelease=i}break}default:throw Error(`invalid increment argument: ${e}`)}if(this.raw=this.format(),this.build.length)this.raw+=`+${this.build.join(".")}`;return this}}ms.exports=H});var ne=p(function($w,ys){var gs=P(),th=(e,t,r=!1)=>{if(e instanceof gs)return e;try{return new gs(e,t)}catch(n){if(!r)return null;throw n}};ys.exports=th});var ws=p(function(Lw,Es){var rh=ne(),nh=(e,t)=>{let r=rh(e,t);return r?r.version:null};Es.exports=nh});var bs=p(function(Pw,Ss){var ih=ne(),sh=(e,t)=>{let r=ih(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};Ss.exports=sh});var As=p(function(Nw,Ts){var vs=P(),oh=(e,t,r,n,i)=>{if(typeof r==="string")i=n,n=r,r=void 0;try{return new vs(e instanceof vs?e.version:e,r).inc(t,n,i).version}catch(s){return null}};Ts.exports=oh});var Is=p(function(qw,Cs){var Rs=ne(),ah=(e,t)=>{let r=Rs(e,null,!0),n=Rs(t,null,!0),i=r.compare(n);if(i===0)return null;let s=i>0,o=s?r:n,c=s?n:r,u=!!o.prerelease.length;if(!!c.prerelease.length&&!u){if(!c.patch&&!c.minor)return"major";if(c.compareMain(o)===0){if(c.minor&&!c.patch)return"minor";return"patch"}}let l=u?"pre":"";if(r.major!==n.major)return l+"major";if(r.minor!==n.minor)return l+"minor";if(r.patch!==n.patch)return l+"patch";return"prerelease"};Cs.exports=ah});var Os=p(function(Fw,_s){var ch=P(),uh=(e,t)=>new ch(e,t).major;_s.exports=uh});var ks=p(function(jw,xs){var lh=P(),fh=(e,t)=>new lh(e,t).minor;xs.exports=fh});var Ls=p(function(Kw,$s){var hh=P(),ph=(e,t)=>new hh(e,t).patch;$s.exports=ph});var Ns=p(function(Dw,Ps){var dh=ne(),mh=(e,t)=>{let r=dh(e,t);return r&&r.prerelease.length?r.prerelease:null};Ps.exports=mh});var B=p(function(Bw,Fs){var qs=P(),gh=(e,t,r)=>new qs(e,r).compare(new qs(t,r));Fs.exports=gh});var Ks=p(function(Uw,js){var yh=B(),Eh=(e,t,r)=>yh(t,e,r);js.exports=Eh});var Bs=p(function(Jw,Ds){var wh=B(),Sh=(e,t)=>wh(e,t,!0);Ds.exports=Sh});var Ot=p(function(Gw,Js){var Us=P(),bh=(e,t,r)=>{let n=new Us(e,r),i=new Us(t,r);return n.compare(i)||n.compareBuild(i)};Js.exports=bh});var Ws=p(function(Ww,Gs){var vh=Ot(),Th=(e,t)=>e.sort((r,n)=>vh(r,n,t));Gs.exports=Th});var Hs=p(function(Mw,Ms){var Ah=Ot(),Rh=(e,t)=>e.sort((r,n)=>Ah(n,r,t));Ms.exports=Rh});var ze=p(function(Hw,zs){var Ch=B(),Ih=(e,t,r)=>Ch(e,t,r)>0;zs.exports=Ih});var xt=p(function(zw,Vs){var _h=B(),Oh=(e,t,r)=>_h(e,t,r)<0;Vs.exports=Oh});var Gr=p(function(Vw,Xs){var xh=B(),kh=(e,t,r)=>xh(e,t,r)===0;Xs.exports=kh});var Wr=p(function(Xw,Ys){var $h=B(),Lh=(e,t,r)=>$h(e,t,r)!==0;Ys.exports=Lh});var kt=p(function(Yw,Zs){var Ph=B(),Nh=(e,t,r)=>Ph(e,t,r)>=0;Zs.exports=Nh});var $t=p(function(Zw,Qs){var qh=B(),Fh=(e,t,r)=>qh(e,t,r)<=0;Qs.exports=Fh});var Mr=p(function(Qw,eo){var jh=Gr(),Kh=Wr(),Dh=ze(),Bh=kt(),Uh=xt(),Jh=$t(),Gh=(e,t,r,n)=>{switch(t){case"===":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e===r;case"!==":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e!==r;case"":case"=":case"==":return jh(e,r,n);case"!=":return Kh(e,r,n);case">":return Dh(e,r,n);case">=":return Bh(e,r,n);case"<":return Uh(e,r,n);case"<=":return Jh(e,r,n);default:throw TypeError(`Invalid operator: ${t}`)}};eo.exports=Gh});var ro=p(function(eS,to){var Wh=P(),Mh=ne(),{safeRe:Lt,t:Pt}=Ie(),Hh=(e,t)=>{if(e instanceof Wh)return e;if(typeof e==="number")e=String(e);if(typeof e!=="string")return null;t=t||{};let r=null;if(!t.rtl)r=e.match(t.includePrerelease?Lt[Pt.COERCEFULL]:Lt[Pt.COERCE]);else{let u=t.includePrerelease?Lt[Pt.COERCERTLFULL]:Lt[Pt.COERCERTL],a;while((a=u.exec(e))&&(!r||r.index+r[0].length!==e.length)){if(!r||a.index+a[0].length!==r.index+r[0].length)r=a;u.lastIndex=a.index+a[1].length+a[2].length}u.lastIndex=-1}if(r===null)return null;let n=r[2],i=r[3]||"0",s=r[4]||"0",o=t.includePrerelease&&r[5]?`-${r[5]}`:"",c=t.includePrerelease&&r[6]?`+${r[6]}`:"";return Mh(`${n}.${i}.${s}${o}${c}`,t)};to.exports=Hh});var so=p(function(tS,io){var zh=ne(),no=Ce(),Vh=P(),Xh=(e,t,r)=>{if(!no.RELEASE_TYPES.includes(t))return null;let n=Yh(e,r);return n&&Zh(n,t)},Yh=(e,t)=>{let r=e instanceof Vh?e.version:e;return zh(r,t)},Zh=(e,t)=>{if(Qh(t))return e.version;switch(e.prerelease=[],t){case"major":e.minor=0,e.patch=0;break;case"minor":e.patch=0;break}return e.format()},Qh=(e)=>e.startsWith("pre");io.exports=Xh});var co=p(function(rS,ao){class oo{constructor(){this.max=1000,this.map=new Map}get(e){let t=this.map.get(e);if(t===void 0)return;else return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let n=this.map.keys().next().value;this.delete(n)}this.map.set(e,t)}return this}}ao.exports=oo});var U=p(function(nS,ho){var ep=/\s+/g;class Ve{constructor(e,t){if(t=rp(t),e instanceof Ve)if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;else return new Ve(e.raw,t);if(e instanceof Nt)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(ep," "),this.set=this.raw.split("||").map((r)=>this.parseRange(r.trim())).filter((r)=>r.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let r=this.set[0];if(this.set=this.set.filter((n)=>!lo(n[0])),this.set.length===0)this.set=[r];else if(this.set.length>1){for(let n of this.set)if(n.length===1&&fp(n[0])){this.set=[n];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){if(e>0)this.formatted+="||";let t=this.set[e];for(let r=0;r<t.length;r++){if(r>0)this.formatted+=" ";this.formatted+=t[r].toString().trim()}}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){e=e.replace(lp,"");let r=((this.options.includePrerelease&&cp)|(this.options.loose&&up))+":"+e,n=uo.get(r);if(n)return n;let i=this.options.loose,s=i?F[N.HYPHENRANGELOOSE]:F[N.HYPHENRANGE];e=e.replace(s,vp(this.options.includePrerelease)),_("hyphen replace",e),e=e.replace(F[N.COMPARATORTRIM],sp),_("comparator trim",e),e=e.replace(F[N.TILDETRIM],op),_("tilde trim",e),e=e.replace(F[N.CARETTRIM],ap),_("caret trim",e);let o=e.split(" ").map((l)=>hp(l,this.options)).join(" ").split(/\s+/).map((l)=>bp(l,this.options));if(i)o=o.filter((l)=>(_("loose invalid filter",l,this.options),!!l.match(F[N.COMPARATORLOOSE])));_("range list",o);let c=new Map,u=o.map((l)=>new Nt(l,this.options));for(let l of u){if(lo(l))return[l];c.set(l.value,l)}if(c.size>1&&c.has(""))c.delete("");let a=[...c.values()];return uo.set(r,a),a}intersects(e,t){if(!(e instanceof Ve))throw TypeError("a Range is required");return this.set.some((r)=>fo(r,t)&&e.set.some((n)=>fo(n,t)&&r.every((i)=>n.every((s)=>i.intersects(s,t)))))}test(e){if(!e)return!1;if(typeof e==="string")try{e=new np(e,this.options)}catch(t){return!1}for(let t=0;t<this.set.length;t++)if(Tp(this.set[t],e,this.options))return!0;return!1}}ho.exports=Ve;var tp=co(),uo=new tp,rp=At(),Nt=Xe(),_=He(),np=P(),{safeRe:F,src:ip,t:N,comparatorTrimReplace:sp,tildeTrimReplace:op,caretTrimReplace:ap}=Ie(),{FLAG_INCLUDE_PRERELEASE:cp,FLAG_LOOSE:up}=Ce(),lp=new RegExp(ip[N.BUILD],"g"),lo=(e)=>e.value==="<0.0.0-0",fp=(e)=>e.value==="",fo=(e,t)=>{let r=!0,n=e.slice(),i=n.pop();while(r&&n.length)r=n.every((s)=>i.intersects(s,t)),i=n.pop();return r},hp=(e,t)=>(e=e.replace(F[N.BUILD],""),_("comp",e,t),e=gp(e,t),_("caret",e),e=dp(e,t),_("tildes",e),e=Ep(e,t),_("xrange",e),e=Sp(e,t),_("stars",e),e),x=(e)=>!e||e.toLowerCase()==="x"||e==="*",pp=(e,t,r)=>x(e)&&!x(t)||x(t)&&r&&!x(r),dp=(e,t)=>e.trim().split(/\s+/).map((r)=>mp(r,t)).join(" "),mp=(e,t)=>{let r=t.loose?F[N.TILDELOOSE]:F[N.TILDE],n=t.includePrerelease?"-0":"";return e.replace(r,(i,s,o,c,u)=>{_("tilde",e,i,s,o,c,u);let a;if(x(s))a="";else if(x(o))a=`>=${s}.0.0${n} <${+s+1}.0.0-0`;else if(x(c))a=`>=${s}.${o}.0${n} <${s}.${+o+1}.0-0`;else if(u)_("replaceTilde pr",u),a=`>=${s}.${o}.${c}-${u} <${s}.${+o+1}.0-0`;else a=`>=${s}.${o}.${c} <${s}.${+o+1}.0-0`;return _("tilde return",a),a})},gp=(e,t)=>e.trim().split(/\s+/).map((r)=>yp(r,t)).join(" "),yp=(e,t)=>{_("caret",e,t);let r=t.loose?F[N.CARETLOOSE]:F[N.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,(i,s,o,c,u)=>{_("caret",e,i,s,o,c,u);let a;if(x(s))a="";else if(x(o))a=`>=${s}.0.0${n} <${+s+1}.0.0-0`;else if(x(c))if(s==="0")a=`>=${s}.${o}.0${n} <${s}.${+o+1}.0-0`;else a=`>=${s}.${o}.0${n} <${+s+1}.0.0-0`;else if(u)if(_("replaceCaret pr",u),s==="0")if(o==="0")a=`>=${s}.${o}.${c}-${u} <${s}.${o}.${+c+1}-0`;else a=`>=${s}.${o}.${c}-${u} <${s}.${+o+1}.0-0`;else a=`>=${s}.${o}.${c}-${u} <${+s+1}.0.0-0`;else if(_("no pr"),s==="0")if(o==="0")a=`>=${s}.${o}.${c} <${s}.${o}.${+c+1}-0`;else a=`>=${s}.${o}.${c} <${s}.${+o+1}.0-0`;else a=`>=${s}.${o}.${c} <${+s+1}.0.0-0`;return _("caret return",a),a})},Ep=(e,t)=>(_("replaceXRanges",e,t),e.split(/\s+/).map((r)=>wp(r,t)).join(" ")),wp=(e,t)=>{e=e.trim();let r=t.loose?F[N.XRANGELOOSE]:F[N.XRANGE];return e.replace(r,(n,i,s,o,c,u)=>{if(_("xRange",e,n,i,s,o,c,u),pp(s,o,c))return e;let a=x(s),l=a||x(o),f=l||x(c),m=f;if(i==="="&&m)i="";if(u=t.includePrerelease?"-0":"",a)if(i===">"||i==="<")n="<0.0.0-0";else n="*";else if(i&&m){if(l)o=0;if(c=0,i===">")if(i=">=",l)s=+s+1,o=0,c=0;else o=+o+1,c=0;else if(i==="<=")if(i="<",l)s=+s+1;else o=+o+1;if(i==="<")u="-0";n=`${i+s}.${o}.${c}${u}`}else if(l)n=`>=${s}.0.0${u} <${+s+1}.0.0-0`;else if(f)n=`>=${s}.${o}.0${u} <${s}.${+o+1}.0-0`;return _("xRange return",n),n})},Sp=(e,t)=>(_("replaceStars",e,t),e.trim().replace(F[N.STAR],"")),bp=(e,t)=>(_("replaceGTE0",e,t),e.trim().replace(F[t.includePrerelease?N.GTE0PRE:N.GTE0],"")),vp=(e)=>(t,r,n,i,s,o,c,u,a,l,f,m)=>{if(x(n))r="";else if(x(i))r=`>=${n}.0.0${e?"-0":""}`;else if(x(s))r=`>=${n}.${i}.0${e?"-0":""}`;else if(o)r=`>=${r}`;else r=`>=${r}${e?"-0":""}`;if(x(a))u="";else if(x(l))u=`<${+a+1}.0.0-0`;else if(x(f))u=`<${a}.${+l+1}.0-0`;else if(m)u=`<=${a}.${l}.${f}-${m}`;else if(e)u=`<${a}.${l}.${+f+1}-0`;else u=`<=${u}`;return`${r} ${u}`.trim()},Tp=(e,t,r)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let n=0;n<e.length;n++){if(_(e[n].semver),e[n].semver===Nt.ANY)continue;if(e[n].semver.prerelease.length>0){let i=e[n].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}}return!1}return!0}});var Xe=p(function(iS,wo){var Ye=Symbol("SemVer ANY");class qt{static get ANY(){return Ye}constructor(e,t){if(t=po(t),e instanceof qt)if(e.loose===!!t.loose)return e;else e=e.value;if(e=e.trim().split(/\s+/).join(" "),zr("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===Ye)this.value="";else this.value=this.operator+this.semver.version;zr("comp",this)}parse(e){let t=this.options.loose?mo[go.COMPARATORLOOSE]:mo[go.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);if(this.operator=r[1]!==void 0?r[1]:"",this.operator==="=")this.operator="";if(!r[2])this.semver=Ye;else this.semver=new yo(r[2],this.options.loose)}toString(){return this.value}test(e){if(zr("Comparator.test",e,this.options.loose),this.semver===Ye||e===Ye)return!0;if(typeof e==="string")try{e=new yo(e,this.options)}catch(t){return!1}return Hr(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof qt))throw TypeError("a Comparator is required");if(this.operator===""){if(this.value==="")return!0;return new Eo(e.value,t).test(this.value)}else if(e.operator===""){if(e.value==="")return!0;return new Eo(this.value,t).test(e.semver)}if(t=po(t),t.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0"))return!1;if(!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))return!1;if(this.operator.startsWith(">")&&e.operator.startsWith(">"))return!0;if(this.operator.startsWith("<")&&e.operator.startsWith("<"))return!0;if(this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("="))return!0;if(Hr(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))return!0;if(Hr(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">"))return!0;return!1}}wo.exports=qt;var po=At(),{safeRe:mo,t:go}=Ie(),Hr=Mr(),zr=He(),yo=P(),Eo=U()});var Ze=p(function(sS,So){var Ap=U(),Rp=(e,t,r)=>{try{t=new Ap(t,r)}catch(n){return!1}return t.test(e)};So.exports=Rp});var vo=p(function(oS,bo){var Cp=U(),Ip=(e,t)=>new Cp(e,t).set.map((r)=>r.map((n)=>n.value).join(" ").trim().split(" "));bo.exports=Ip});var Ao=p(function(aS,To){var _p=P(),Op=U(),xp=(e,t,r)=>{let n=null,i=null,s=null;try{s=new Op(t,r)}catch(o){return null}return e.forEach((o)=>{if(s.test(o)){if(!n||i.compare(o)===-1)n=o,i=new _p(n,r)}}),n};To.exports=xp});var Co=p(function(cS,Ro){var kp=P(),$p=U(),Lp=(e,t,r)=>{let n=null,i=null,s=null;try{s=new $p(t,r)}catch(o){return null}return e.forEach((o)=>{if(s.test(o)){if(!n||i.compare(o)===1)n=o,i=new kp(n,r)}}),n};Ro.exports=Lp});var Oo=p(function(uS,_o){var Vr=P(),Pp=U(),Io=ze(),Np=(e,t)=>{e=new Pp(e,t);let r=new Vr("0.0.0");if(e.test(r))return r;if(r=new Vr("0.0.0-0"),e.test(r))return r;r=null;for(let n=0;n<e.set.length;++n){let i=e.set[n],s=null;if(i.forEach((o)=>{let c=new Vr(o.semver.version);switch(o.operator){case">":if(c.prerelease.length===0)c.patch++;else c.prerelease.push(0);c.raw=c.format();case"":case">=":if(!s||Io(c,s))s=c;break;case"<":case"<=":break;default:throw Error(`Unexpected operation: ${o.operator}`)}}),s&&(!r||Io(r,s)))r=s}if(r&&e.test(r))return r;return null};_o.exports=Np});var ko=p(function(lS,xo){var qp=U(),Fp=(e,t)=>{try{return new qp(e,t).range||"*"}catch(r){return null}};xo.exports=Fp});var Ft=p(function(fS,No){var jp=P(),Po=Xe(),{ANY:Kp}=Po,Dp=U(),Bp=Ze(),$o=ze(),Lo=xt(),Up=$t(),Jp=kt(),Gp=(e,t,r,n)=>{e=new jp(e,n),t=new Dp(t,n);let i,s,o,c,u;switch(r){case">":i=$o,s=Up,o=Lo,c=">",u=">=";break;case"<":i=Lo,s=Jp,o=$o,c="<",u="<=";break;default:throw TypeError('Must provide a hilo val of "<" or ">"')}if(Bp(e,t,n))return!1;for(let a=0;a<t.set.length;++a){let l=t.set[a],f=null,m=null;if(l.forEach((h)=>{if(h.semver===Kp)h=new Po(">=0.0.0");if(f=f||h,m=m||h,i(h.semver,f.semver,n))f=h;else if(o(h.semver,m.semver,n))m=h}),f.operator===c||f.operator===u)return!1;if((!m.operator||m.operator===c)&&s(e,m.semver))return!1;else if(m.operator===u&&o(e,m.semver))return!1}return!0};No.exports=Gp});var Fo=p(function(hS,qo){var Wp=Ft(),Mp=(e,t,r)=>Wp(e,t,">",r);qo.exports=Mp});var Ko=p(function(pS,jo){var Hp=Ft(),zp=(e,t,r)=>Hp(e,t,"<",r);jo.exports=zp});var Uo=p(function(dS,Bo){var Do=U(),Vp=(e,t,r)=>(e=new Do(e,r),t=new Do(t,r),e.intersects(t,r));Bo.exports=Vp});var Go=p(function(mS,Jo){var Xp=Ze(),Yp=B();Jo.exports=(e,t,r)=>{let n=[],i=null,s=null,o=e.sort((l,f)=>Yp(l,f,r));for(let l of o)if(Xp(l,t,r)){if(s=l,!i)i=l}else{if(s)n.push([i,s]);s=null,i=null}if(i)n.push([i,null]);let c=[];for(let[l,f]of n)if(l===f)c.push(l);else if(!f&&l===o[0])c.push("*");else if(!f)c.push(`>=${l}`);else if(l===o[0])c.push(`<=${f}`);else c.push(`${l} - ${f}`);let u=c.join(" || "),a=typeof t.raw==="string"?t.raw:String(t);return u.length<a.length?u:t}});var Xo=p(function(gS,Vo){var Wo=U(),Zr=Xe(),{ANY:Xr}=Zr,Yr=Ze(),Qr=B(),Zp=(e,t,r={})=>{if(e===t)return!0;e=new Wo(e,r),t=new Wo(t,r);let n=!1;e:for(let i of e.set){for(let s of t.set){let o=ed(i,s,r);if(n=n||o!==null,o)continue e}if(n)return!1}return!0},Qp=[new Zr(">=0.0.0-0")],Mo=[new Zr(">=0.0.0")],ed=(e,t,r)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===Xr)if(t.length===1&&t[0].semver===Xr)return!0;else if(r.includePrerelease)e=Qp;else e=Mo;if(t.length===1&&t[0].semver===Xr)if(r.includePrerelease)return!0;else t=Mo;let n=new Set,i,s;for(let h of e)if(h.operator===">"||h.operator===">=")i=Ho(i,h,r);else if(h.operator==="<"||h.operator==="<=")s=zo(s,h,r);else n.add(h.semver);if(n.size>1)return null;let o;if(i&&s){if(o=Qr(i.semver,s.semver,r),o>0)return null;else if(o===0&&(i.operator!==">="||s.operator!=="<="))return null}for(let h of n){if(i&&!Yr(h,String(i),r))return null;if(s&&!Yr(h,String(s),r))return null;for(let g of t)if(!Yr(h,String(g),r))return!1;return!0}let c,u,a,l,f=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1,m=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;if(f&&f.prerelease.length===1&&s.operator==="<"&&f.prerelease[0]===0)f=!1;for(let h of t){if(l=l||h.operator===">"||h.operator===">=",a=a||h.operator==="<"||h.operator==="<=",i){if(m){if(h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===m.major&&h.semver.minor===m.minor&&h.semver.patch===m.patch)m=!1}if(h.operator===">"||h.operator===">="){if(c=Ho(i,h,r),c===h&&c!==i)return!1}else if(i.operator===">="&&!h.test(i.semver))return!1}if(s){if(f){if(h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===f.major&&h.semver.minor===f.minor&&h.semver.patch===f.patch)f=!1}if(h.operator==="<"||h.operator==="<="){if(u=zo(s,h,r),u===h&&u!==s)return!1}else if(s.operator==="<="&&!h.test(s.semver))return!1}if(!h.operator&&(s||i)&&o!==0)return!1}if(i&&a&&!s&&o!==0)return!1;if(s&&l&&!i&&o!==0)return!1;if(m||f)return!1;return!0},Ho=(e,t,r)=>{if(!e)return t;let n=Qr(e.semver,t.semver,r);return n>0?e:n<0?t:t.operator===">"&&e.operator===">="?t:e},zo=(e,t,r)=>{if(!e)return t;let n=Qr(e.semver,t.semver,r);return n<0?e:n>0?t:t.operator==="<"&&e.operator==="<="?t:e};Vo.exports=Zp});var Dt=p(function(yS,Yo){var _e=Ie(),jt=Ce(),td=P(),Kt=Ur(),rd=ne(),nd=ws(),id=bs(),sd=As(),od=Is(),ad=Os(),cd=ks(),ud=Ls(),ld=Ns(),fd=B(),hd=Ks(),pd=Bs(),dd=Ot(),md=Ws(),gd=Hs(),yd=ze(),Ed=xt(),wd=Gr(),Sd=Wr(),bd=kt(),vd=$t(),Td=Mr(),Ad=ro(),Rd=so(),Cd=Xe(),Id=U(),_d=Ze(),Od=vo(),xd=Ao(),kd=Co(),$d=Oo(),Ld=ko(),Pd=Ft(),Nd=Fo(),qd=Ko(),Fd=Uo(),jd=Go(),Kd=Xo();Yo.exports={parse:rd,valid:nd,clean:id,inc:sd,diff:od,major:ad,minor:cd,patch:ud,prerelease:ld,compare:fd,rcompare:hd,compareLoose:pd,compareBuild:dd,sort:md,rsort:gd,gt:yd,lt:Ed,eq:wd,neq:Sd,gte:bd,lte:vd,cmp:Td,coerce:Ad,truncate:Rd,Comparator:Cd,Range:Id,satisfies:_d,toComparators:Od,maxSatisfying:xd,minSatisfying:kd,minVersion:$d,validRange:Ld,outside:Pd,gtr:Nd,ltr:qd,intersects:Fd,simplifyRange:jd,subset:Kd,SemVer:td,re:_e.re,src:_e.src,tokens:_e.t,SEMVER_SPEC_VERSION:jt.SEMVER_SPEC_VERSION,RELEASE_TYPES:jt.RELEASE_TYPES,compareIdentifiers:Kt.compareIdentifiers,rcompareIdentifiers:Kt.rcompareIdentifiers}});var ea=p(function(ES,Qo){var Zo=Dt();Qo.exports=Zo.satisfies(process.version,">=15.7.0")});var na=p(function(wS,ra){var ta=Dt();ra.exports=ta.satisfies(process.version,">=16.9.0")});var en=p(function(SS,ia){var Dd=ea(),Bd=na(),Ud={ec:["ES256","ES384","ES512"],rsa:["RS256","PS256","RS384","PS384","RS512","PS512"],"rsa-pss":["PS256","PS384","PS512"]},Jd={ES256:"prime256v1",ES384:"secp384r1",ES512:"secp521r1"};ia.exports=function(e,t){if(!e||!t)return;let r=t.asymmetricKeyType;if(!r)return;let n=Ud[r];if(!n)throw Error(`Unknown key type "${r}".`);if(!n.includes(e))throw Error(`"alg" parameter for "${r}" key type must be one of: ${n.join(", ")}.`);if(Dd)switch(r){case"ec":let i=t.asymmetricKeyDetails.namedCurve,s=Jd[e];if(i!==s)throw Error(`"alg" parameter "${e}" requires curve "${s}".`);break;case"rsa-pss":if(Bd){let o=parseInt(e.slice(-3),10),{hashAlgorithm:c,mgf1HashAlgorithm:u,saltLength:a}=t.asymmetricKeyDetails;if(c!==`sha${o}`||u!==c)throw Error(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${e}.`);if(a!==void 0&&a>o>>3)throw Error(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${e}.`)}break}}});var tn=p(function(bS,sa){var Gd=Dt();sa.exports=Gd.satisfies(process.version,"^6.12.0 || >=8.0.0")});var ua=p(function(vS,ca){var R=Me(),Wd=qr(),oa=Fr(),Md=Nr(),Hd=Kr(),zd=en(),Vd=tn(),aa=wt(),{KeyObject:Xd,createSecretKey:Yd,createPublicKey:Zd}=require("crypto"),rn=["RS256","RS384","RS512"],Qd=["ES256","ES384","ES512"],nn=["RS256","RS384","RS512"],em=["HS256","HS384","HS512"];if(Vd)rn.splice(rn.length,0,"PS256","PS384","PS512"),nn.splice(nn.length,0,"PS256","PS384","PS512");ca.exports=function(e,t,r,n){if(typeof r==="function"&&!n)n=r,r={};if(!r)r={};r=Object.assign({},r);let i;if(n)i=n;else i=function(l,f){if(l)throw l;return f};if(r.clockTimestamp&&typeof r.clockTimestamp!=="number")return i(new R("clockTimestamp must be a number"));if(r.nonce!==void 0&&(typeof r.nonce!=="string"||r.nonce.trim()===""))return i(new R("nonce must be a non-empty string"));if(r.allowInvalidAsymmetricKeyTypes!==void 0&&typeof r.allowInvalidAsymmetricKeyTypes!=="boolean")return i(new R("allowInvalidAsymmetricKeyTypes must be a boolean"));let s=r.clockTimestamp||Math.floor(Date.now()/1000);if(!e)return i(new R("jwt must be provided"));if(typeof e!=="string")return i(new R("jwt must be a string"));let o=e.split(".");if(o.length!==3)return i(new R("jwt malformed"));let c;try{c=Md(e,{complete:!0})}catch(l){return i(l)}if(!c)return i(new R("invalid token"));let u=c.header,a;if(typeof t==="function"){if(!n)return i(new R("verify must be called asynchronous if secret or public key is provided as a callback"));a=t}else a=function(l,f){return f(null,t)};return a(u,function(l,f){if(l)return i(new R("error in secret or public key callback: "+l.message));let m=o[2].trim()!=="";if(!m&&f)return i(new R("jwt signature is required"));if(m&&!f)return i(new R("secret or public key must be provided"));if(!m&&!r.algorithms)return i(new R('please specify "none" in "algorithms" to verify unsigned tokens'));if(f!=null&&!(f instanceof Xd))try{f=Zd(f)}catch(d){try{f=Yd(typeof f==="string"?Buffer.from(f):f)}catch(b){return i(new R("secretOrPublicKey is not valid key material"))}}if(!r.algorithms)if(f.type==="secret")r.algorithms=em;else if(["rsa","rsa-pss"].includes(f.asymmetricKeyType))r.algorithms=nn;else if(f.asymmetricKeyType==="ec")r.algorithms=Qd;else r.algorithms=rn;if(r.algorithms.indexOf(c.header.alg)===-1)return i(new R("invalid algorithm"));if(u.alg.startsWith("HS")&&f.type!=="secret")return i(new R(`secretOrPublicKey must be a symmetric key when using ${u.alg}`));else if(/^(?:RS|PS|ES)/.test(u.alg)&&f.type!=="public")return i(new R(`secretOrPublicKey must be an asymmetric key when using ${u.alg}`));if(!r.allowInvalidAsymmetricKeyTypes)try{zd(u.alg,f)}catch(d){return i(d)}let h;try{h=aa.verify(e,c.header.alg,f)}catch(d){return i(d)}if(!h)return i(new R("invalid signature"));let g=c.payload;if(typeof g.nbf<"u"&&!r.ignoreNotBefore){if(typeof g.nbf!=="number")return i(new R("invalid nbf value"));if(g.nbf>s+(r.clockTolerance||0))return i(new Wd("jwt not active",new Date(g.nbf*1000)))}if(typeof g.exp<"u"&&!r.ignoreExpiration){if(typeof g.exp!=="number")return i(new R("invalid exp value"));if(s>=g.exp+(r.clockTolerance||0))return i(new oa("jwt expired",new Date(g.exp*1000)))}if(r.audience){let d=Array.isArray(r.audience)?r.audience:[r.audience];if(!(Array.isArray(g.aud)?g.aud:[g.aud]).some(function(S){return d.some(function(A){return A instanceof RegExp?A.test(S):A===S})}))return i(new R("jwt audience invalid. expected: "+d.join(" or ")))}if(r.issuer){if(typeof r.issuer==="string"&&g.iss!==r.issuer||Array.isArray(r.issuer)&&r.issuer.indexOf(g.iss)===-1)return i(new R("jwt issuer invalid. expected: "+r.issuer))}if(r.subject){if(g.sub!==r.subject)return i(new R("jwt subject invalid. expected: "+r.subject))}if(r.jwtid){if(g.jti!==r.jwtid)return i(new R("jwt jwtid invalid. expected: "+r.jwtid))}if(r.nonce){if(g.nonce!==r.nonce)return i(new R("jwt nonce invalid. expected: "+r.nonce))}if(r.maxAge){if(typeof g.iat!=="number")return i(new R("iat required when maxAge is specified"));let d=Hd(r.maxAge,g.iat);if(typeof d>"u")return i(new R('"maxAge" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'));if(s>=d+(r.clockTolerance||0))return i(new oa("maxAge exceeded",new Date(d*1000)))}if(r.complete===!0){let d=c.signature;return i(null,{header:u,payload:g,signature:d})}return i(null,g)})}});var ma=p(function(TS,da){var la=1/0,ha=9007199254740991,tm=179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,fa=NaN,rm="[object Arguments]",nm="[object Function]",im="[object GeneratorFunction]",sm="[object String]",om="[object Symbol]",am=/^\s+|\s+$/g,cm=/^[-+]0x[0-9a-f]+$/i,um=/^0b[01]+$/i,lm=/^0o[0-7]+$/i,fm=/^(?:0|[1-9]\d*)$/,hm=parseInt;function pm(e,t){var r=-1,n=e?e.length:0,i=Array(n);while(++r<n)i[r]=t(e[r],r,e);return i}function dm(e,t,r,n){var i=e.length,s=r+(n?1:-1);while(n?s--:++s<i)if(t(e[s],s,e))return s;return-1}function mm(e,t,r){if(t!==t)return dm(e,gm,r);var n=r-1,i=e.length;while(++n<i)if(e[n]===t)return n;return-1}function gm(e){return e!==e}function ym(e,t){var r=-1,n=Array(e);while(++r<e)n[r]=t(r);return n}function Em(e,t){return pm(t,function(r){return e[r]})}function wm(e,t){return function(r){return e(t(r))}}var Bt=Object.prototype,{hasOwnProperty:on,toString:Ut,propertyIsEnumerable:Sm}=Bt,bm=wm(Object.keys,Object),vm=Math.max;function Tm(e,t){var r=pa(e)||_m(e)?ym(e.length,String):[],n=r.length,i=!!n;for(var s in e)if((t||on.call(e,s))&&!(i&&(s=="length"||Rm(s,n))))r.push(s);return r}function Am(e){if(!Cm(e))return bm(e);var t=[];for(var r in Object(e))if(on.call(e,r)&&r!="constructor")t.push(r);return t}function Rm(e,t){return t=t==null?ha:t,!!t&&(typeof e=="number"||fm.test(e))&&(e>-1&&e%1==0&&e<t)}function Cm(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Bt;return e===r}function Im(e,t,r,n){e=an(e)?e:jm(e),r=r&&!n?Nm(r):0;var i=e.length;if(r<0)r=vm(i+r,0);return $m(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&mm(e,t,r)>-1}function _m(e){return Om(e)&&on.call(e,"callee")&&(!Sm.call(e,"callee")||Ut.call(e)==rm)}var pa=Array.isArray;function an(e){return e!=null&&km(e.length)&&!xm(e)}function Om(e){return cn(e)&&an(e)}function xm(e){var t=sn(e)?Ut.call(e):"";return t==nm||t==im}function km(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ha}function sn(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function cn(e){return!!e&&typeof e=="object"}function $m(e){return typeof e=="string"||!pa(e)&&cn(e)&&Ut.call(e)==sm}function Lm(e){return typeof e=="symbol"||cn(e)&&Ut.call(e)==om}function Pm(e){if(!e)return e===0?e:0;if(e=qm(e),e===la||e===-la){var t=e<0?-1:1;return t*tm}return e===e?e:0}function Nm(e){var t=Pm(e),r=t%1;return t===t?r?t-r:t:0}function qm(e){if(typeof e=="number")return e;if(Lm(e))return fa;if(sn(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=sn(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(am,"");var r=um.test(e);return r||lm.test(e)?hm(e.slice(2),r?2:8):cm.test(e)?fa:+e}function Fm(e){return an(e)?Tm(e):Am(e)}function jm(e){return e?Em(e,Fm(e)):[]}da.exports=Im});var ya=p(function(AS,ga){var Km="[object Boolean]",Dm=Object.prototype,Bm=Dm.toString;function Um(e){return e===!0||e===!1||Jm(e)&&Bm.call(e)==Km}function Jm(e){return!!e&&typeof e=="object"}ga.exports=Um});var va=p(function(RS,ba){var Ea=1/0,Gm=179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,wa=NaN,Wm="[object Symbol]",Mm=/^\s+|\s+$/g,Hm=/^[-+]0x[0-9a-f]+$/i,zm=/^0b[01]+$/i,Vm=/^0o[0-7]+$/i,Xm=parseInt,Ym=Object.prototype,Zm=Ym.toString;function Qm(e){return typeof e=="number"&&e==ng(e)}function Sa(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function eg(e){return!!e&&typeof e=="object"}function tg(e){return typeof e=="symbol"||eg(e)&&Zm.call(e)==Wm}function rg(e){if(!e)return e===0?e:0;if(e=ig(e),e===Ea||e===-Ea){var t=e<0?-1:1;return t*Gm}return e===e?e:0}function ng(e){var t=rg(e),r=t%1;return t===t?r?t-r:t:0}function ig(e){if(typeof e=="number")return e;if(tg(e))return wa;if(Sa(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Sa(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(Mm,"");var r=zm.test(e);return r||Vm.test(e)?Xm(e.slice(2),r?2:8):Hm.test(e)?wa:+e}ba.exports=Qm});var Aa=p(function(CS,Ta){var sg="[object Number]",og=Object.prototype,ag=og.toString;function cg(e){return!!e&&typeof e=="object"}function ug(e){return typeof e=="number"||cg(e)&&ag.call(e)==sg}Ta.exports=ug});var _a=p(function(IS,Ia){var lg="[object Object]";function fg(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(r){}return t}function hg(e,t){return function(r){return e(t(r))}}var pg=Function.prototype,Ra=Object.prototype,Ca=pg.toString,dg=Ra.hasOwnProperty,mg=Ca.call(Object),gg=Ra.toString,yg=hg(Object.getPrototypeOf,Object);function Eg(e){return!!e&&typeof e=="object"}function wg(e){if(!Eg(e)||gg.call(e)!=lg||fg(e))return!1;var t=yg(e);if(t===null)return!0;var r=dg.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Ca.call(r)==mg}Ia.exports=wg});var xa=p(function(_S,Oa){var Sg="[object String]",bg=Object.prototype,vg=bg.toString,Tg=Array.isArray;function Ag(e){return!!e&&typeof e=="object"}function Rg(e){return typeof e=="string"||!Tg(e)&&Ag(e)&&vg.call(e)==Sg}Oa.exports=Rg});var Na=p(function(OS,Pa){var Cg="Expected a function",ka=1/0,Ig=179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,$a=NaN,_g="[object Symbol]",Og=/^\s+|\s+$/g,xg=/^[-+]0x[0-9a-f]+$/i,kg=/^0b[01]+$/i,$g=/^0o[0-7]+$/i,Lg=parseInt,Pg=Object.prototype,Ng=Pg.toString;function qg(e,t){var r;if(typeof t!="function")throw TypeError(Cg);return e=Bg(e),function(){if(--e>0)r=t.apply(this,arguments);if(e<=1)t=void 0;return r}}function Fg(e){return qg(2,e)}function La(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function jg(e){return!!e&&typeof e=="object"}function Kg(e){return typeof e=="symbol"||jg(e)&&Ng.call(e)==_g}function Dg(e){if(!e)return e===0?e:0;if(e=Ug(e),e===ka||e===-ka){var t=e<0?-1:1;return t*Ig}return e===e?e:0}function Bg(e){var t=Dg(e),r=t%1;return t===t?r?t-r:t:0}function Ug(e){if(typeof e=="number")return e;if(Kg(e))return $a;if(La(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=La(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(Og,"");var r=kg.test(e);return r||$g.test(e)?Lg(e.slice(2),r?2:8):xg.test(e)?$a:+e}Pa.exports=Fg});var Ga=p(function(xS,Ja){var qa=Kr(),Jg=tn(),Gg=en(),Gt=wt(),Ka=ma(),Jt=ya(),Fa=va(),un=Aa(),Da=_a(),ie=xa(),Wg=Na(),{KeyObject:Mg,createSecretKey:Hg,createPrivateKey:zg}=require("crypto"),Ba=["RS256","RS384","RS512","ES256","ES384","ES512","HS256","HS384","HS512","none"];if(Jg)Ba.splice(3,0,"PS256","PS384","PS512");var Vg={expiresIn:{isValid:function(e){return Fa(e)||ie(e)&&e},message:'"expiresIn" should be a number of seconds or string representing a timespan'},notBefore:{isValid:function(e){return Fa(e)||ie(e)&&e},message:'"notBefore" should be a number of seconds or string representing a timespan'},audience:{isValid:function(e){return ie(e)||Array.isArray(e)},message:'"audience" must be a string or array'},algorithm:{isValid:Ka.bind(null,Ba),message:'"algorithm" must be a valid string enum value'},header:{isValid:Da,message:'"header" must be an object'},encoding:{isValid:ie,message:'"encoding" must be a string'},issuer:{isValid:ie,message:'"issuer" must be a string'},subject:{isValid:ie,message:'"subject" must be a string'},jwtid:{isValid:ie,message:'"jwtid" must be a string'},noTimestamp:{isValid:Jt,message:'"noTimestamp" must be a boolean'},keyid:{isValid:ie,message:'"keyid" must be a string'},mutatePayload:{isValid:Jt,message:'"mutatePayload" must be a boolean'},allowInsecureKeySizes:{isValid:Jt,message:'"allowInsecureKeySizes" must be a boolean'},allowInvalidAsymmetricKeyTypes:{isValid:Jt,message:'"allowInvalidAsymmetricKeyTypes" must be a boolean'}},Xg={iat:{isValid:un,message:'"iat" should be a number of seconds'},exp:{isValid:un,message:'"exp" should be a number of seconds'},nbf:{isValid:un,message:'"nbf" should be a number of seconds'}};function Ua(e,t,r,n){if(!Da(r))throw Error('Expected "'+n+'" to be a plain object.');Object.keys(r).forEach(function(i){let s=e[i];if(!s){if(!t)throw Error('"'+i+'" is not allowed in "'+n+'"');return}if(!s.isValid(r[i]))throw Error(s.message)})}function Yg(e){return Ua(Vg,!1,e,"options")}function Zg(e){return Ua(Xg,!0,e,"payload")}var ja={audience:"aud",issuer:"iss",subject:"sub",jwtid:"jti"},Qg=["expiresIn","notBefore","noTimestamp","audience","issuer","subject","jwtid"];Ja.exports=function(e,t,r,n){if(typeof r==="function")n=r,r={};else r=r||{};let i=typeof e==="object"&&!Buffer.isBuffer(e),s=Object.assign({alg:r.algorithm||"HS256",typ:i?"JWT":void 0,kid:r.keyid},r.header);function o(a){if(n)return n(a);throw a}if(!t&&r.algorithm!=="none")return o(Error("secretOrPrivateKey must have a value"));if(t!=null&&!(t instanceof Mg))try{t=zg(t)}catch(a){try{t=Hg(typeof t==="string"?Buffer.from(t):t)}catch(l){return o(Error("secretOrPrivateKey is not valid key material"))}}if(s.alg.startsWith("HS")&&t.type!=="secret")return o(Error(`secretOrPrivateKey must be a symmetric key when using ${s.alg}`));else if(/^(?:RS|PS|ES)/.test(s.alg)){if(t.type!=="private")return o(Error(`secretOrPrivateKey must be an asymmetric key when using ${s.alg}`));if(!r.allowInsecureKeySizes&&!s.alg.startsWith("ES")&&t.asymmetricKeyDetails!==void 0&&t.asymmetricKeyDetails.modulusLength<2048)return o(Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${s.alg}`))}if(typeof e>"u")return o(Error("payload is required"));else if(i){try{Zg(e)}catch(a){return o(a)}if(!r.mutatePayload)e=Object.assign({},e)}else{let a=Qg.filter(function(l){return typeof r[l]<"u"});if(a.length>0)return o(Error("invalid "+a.join(",")+" option for "+typeof e+" payload"))}if(typeof e.exp<"u"&&typeof r.expiresIn<"u")return o(Error('Bad "options.expiresIn" option the payload already has an "exp" property.'));if(typeof e.nbf<"u"&&typeof r.notBefore<"u")return o(Error('Bad "options.notBefore" option the payload already has an "nbf" property.'));try{Yg(r)}catch(a){return o(a)}if(!r.allowInvalidAsymmetricKeyTypes)try{Gg(s.alg,t)}catch(a){return o(a)}let c=e.iat||Math.floor(Date.now()/1000);if(r.noTimestamp)delete e.iat;else if(i)e.iat=c;if(typeof r.notBefore<"u"){try{e.nbf=qa(r.notBefore,c)}catch(a){return o(a)}if(typeof e.nbf>"u")return o(Error('"notBefore" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}if(typeof r.expiresIn<"u"&&typeof e==="object"){try{e.exp=qa(r.expiresIn,c)}catch(a){return o(a)}if(typeof e.exp>"u")return o(Error('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}Object.keys(ja).forEach(function(a){let l=ja[a];if(typeof r[a]<"u"){if(typeof e[l]<"u")return o(Error('Bad "options.'+a+'" option. The payload already has an "'+l+'" property.'));e[l]=r[a]}});let u=r.encoding||"utf8";if(typeof n==="function")n=n&&Wg(n),Gt.createSign({header:s,privateKey:t,payload:e,encoding:u}).once("error",n).once("done",function(a){if(!r.allowInsecureKeySizes&&/^(?:RS|PS)/.test(s.alg)&&a.length<256)return n(Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${s.alg}`));n(null,a)});else{let a=Gt.sign({header:s,payload:e,secret:t,encoding:u});if(!r.allowInsecureKeySizes&&/^(?:RS|PS)/.test(s.alg)&&a.length<256)throw Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${s.alg}`);return a}}});var Ma=p(function(kS,Wa){Wa.exports={decode:Nr(),verify:ua(),sign:Ga(),JsonWebTokenError:Me(),NotBeforeError:qr(),TokenExpiredError:Fr()}});var ln=p(function($S,Ha){function ey(e){r.debug=r,r.default=r,r.coerce=u,r.disable=o,r.enable=i,r.enabled=c,r.humanize=jr(),r.destroy=a,Object.keys(e).forEach((l)=>{r[l]=e[l]}),r.names=[],r.skips=[],r.formatters={};function t(l){let f=0;for(let m=0;m<l.length;m++)f=(f<<5)-f+l.charCodeAt(m),f|=0;return r.colors[Math.abs(f)%r.colors.length]}r.selectColor=t;function r(l){let f,m=null,h,g;function d(...b){if(!d.enabled)return;let w=d,S=Number(new Date),A=S-(f||S);if(w.diff=A,w.prev=f,w.curr=S,f=S,b[0]=r.coerce(b[0]),typeof b[0]!=="string")b.unshift("%O");let T=0;b[0]=b[0].replace(/%([a-zA-Z%])/g,(K,W)=>{if(K==="%%")return"%";T++;let z=r.formatters[W];if(typeof z==="function"){let V=b[T];K=z.call(w,V),b.splice(T,1),T--}return K}),r.formatArgs.call(w,b),(w.log||r.log).apply(w,b)}if(d.namespace=l,d.useColors=r.useColors(),d.color=r.selectColor(l),d.extend=n,d.destroy=r.destroy,Object.defineProperty(d,"enabled",{enumerable:!0,configurable:!1,get:()=>{if(m!==null)return m;if(h!==r.namespaces)h=r.namespaces,g=r.enabled(l);return g},set:(b)=>{m=b}}),typeof r.init==="function")r.init(d);return d}function n(l,f){let m=r(this.namespace+(typeof f>"u"?":":f)+l);return m.log=this.log,m}function i(l){r.save(l),r.namespaces=l,r.names=[],r.skips=[];let f=(typeof l==="string"?l:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let m of f)if(m[0]==="-")r.skips.push(m.slice(1));else r.names.push(m)}function s(l,f){let m=0,h=0,g=-1,d=0;while(m<l.length)if(h<f.length&&(f[h]===l[m]||f[h]==="*"))if(f[h]==="*")g=h,d=m,h++;else m++,h++;else if(g!==-1)h=g+1,d++,m=d;else return!1;while(h<f.length&&f[h]==="*")h++;return h===f.length}function o(){let l=[...r.names,...r.skips.map((f)=>"-"+f)].join(",");return r.enable(""),l}function c(l){for(let f of r.skips)if(s(l,f))return!1;for(let f of r.names)if(s(l,f))return!0;return!1}function u(l){if(l instanceof Error)return l.stack||l.message;return l}function a(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}Ha.exports=ey});var za=p(function(j,Wt){j.formatArgs=ry;j.save=ny;j.load=iy;j.useColors=ty;j.storage=sy();j.destroy=(()=>{let e=!1;return()=>{if(!e)e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}})();j.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function ty(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function ry(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+Wt.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,(i)=>{if(i==="%%")return;if(r++,i==="%c")n=r}),e.splice(n,0,t)}j.log=console.debug||console.log||(()=>{});function ny(e){try{if(e)j.storage.setItem("debug",e);else j.storage.removeItem("debug")}catch(t){}}function iy(){let e;try{e=j.storage.getItem("debug")||j.storage.getItem("DEBUG")}catch(t){}if(!e&&typeof process<"u"&&"env"in process)e=process.env.DEBUG;return e}function sy(){try{return localStorage}catch(e){}}Wt.exports=ln()(j);var{formatters:oy}=Wt.exports;oy.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Xa=p(function(LS,Va){Va.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),i=t.indexOf("--");return n!==-1&&(i===-1||n<i)}});var Qa=p(function(PS,Za){var Ya=require("os"),Mt=require("tty"),J=Xa(),{env:k}=process,se;if(J("no-color")||J("no-colors")||J("color=false")||J("color=never"))se=0;else if(J("color")||J("colors")||J("color=true")||J("color=always"))se=1;if("FORCE_COLOR"in k)if(k.FORCE_COLOR==="true")se=1;else if(k.FORCE_COLOR==="false")se=0;else se=k.FORCE_COLOR.length===0?1:Math.min(parseInt(k.FORCE_COLOR,10),3);function fn(e){if(e===0)return!1;return{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function hn(e,t){if(se===0)return 0;if(J("color=16m")||J("color=full")||J("color=truecolor"))return 3;if(J("color=256"))return 2;if(e&&!t&&se===void 0)return 0;let r=se||0;if(k.TERM==="dumb")return r;if(process.platform==="win32"){let n=Ya.release().split(".");if(Number(n[0])>=10&&Number(n[2])>=10586)return Number(n[2])>=14931?3:2;return 1}if("CI"in k){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((n)=>(n in k))||k.CI_NAME==="codeship")return 1;return r}if("TEAMCITY_VERSION"in k)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(k.TEAMCITY_VERSION)?1:0;if(k.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in k){let n=parseInt((k.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(k.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(k.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(k.TERM))return 1;if("COLORTERM"in k)return 1;return r}function ay(e){let t=hn(e,e&&e.isTTY);return fn(t)}Za.exports={supportsColor:ay,stdout:fn(hn(!0,Mt.isatty(1))),stderr:fn(hn(!0,Mt.isatty(2)))}});var rc=p(function(L,Ht){var ec=require("tty"),oe=require("util");L.init=dy;L.log=fy;L.formatArgs=uy;L.save=hy;L.load=py;L.useColors=cy;L.destroy=oe.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");L.colors=[6,2,3,4,5,1];try{let e=Qa();if(e&&(e.stderr||e).level>=2)L.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}catch(e){}L.inspectOpts=Object.keys(process.env).filter((e)=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(i,s)=>s.toUpperCase()),n=process.env[t];if(/^(yes|on|true|enabled)$/i.test(n))n=!0;else if(/^(no|off|false|disabled)$/i.test(n))n=!1;else if(n==="null")n=null;else n=Number(n);return e[r]=n,e},{});function cy(){return"colors"in L.inspectOpts?Boolean(L.inspectOpts.colors):ec.isatty(process.stderr.fd)}function uy(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,i="\x1B[3"+(n<8?n:"8;5;"+n),s=` ${i};1m${t} \x1B[0m`;e[0]=s+e[0].split(`
3
+ "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".`,Je="secret must be a string or buffer",be="key must be a string or a buffer",Tf="key must be a string, a buffer or an object",kr=typeof D.createPublicKey==="function";if(kr)be+=" or a KeyObject",Je+="or a KeyObject";function Pi(e){if(ve.isBuffer(e))return;if(typeof e==="string")return;if(!kr)throw M(be);if(typeof e!=="object")throw M(be);if(typeof e.type!=="string")throw M(be);if(typeof e.asymmetricKeyType!=="string")throw M(be);if(typeof e.export!=="function")throw M(be)}function Ni(e){if(ve.isBuffer(e))return;if(typeof e==="string")return;if(typeof e==="object")return;throw M(Tf)}function Af(e){if(ve.isBuffer(e))return;if(typeof e==="string")return e;if(!kr)throw M(Je);if(typeof e!=="object")throw M(Je);if(e.type!=="secret")throw M(Je);if(typeof e.export!=="function")throw M(Je)}function $r(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function qi(e){e=e.toString();var t=4-e.length%4;if(t!==4)for(var r=0;r<t;++r)e+="=";return e.replace(/\-/g,"+").replace(/_/g,"/")}function M(e){var t=[].slice.call(arguments,1),r=$i.format.bind($i,e).apply(null,t);return TypeError(r)}function If(e){return ve.isBuffer(e)||typeof e==="string"}function Ge(e){if(!If(e))e=JSON.stringify(e);return e}function Fi(e){return function(r,n){Af(n),r=Ge(r);var i=D.createHmac("sha"+e,n),s=(i.update(r),i.digest("base64"));return $r(s)}}var Or,Cf="timingSafeEqual"in D?function(t,r){if(t.byteLength!==r.byteLength)return!1;return D.timingSafeEqual(t,r)}:function(t,r){if(!Or)Or=ki();return Or(t,r)};function Rf(e){return function(r,n,i){var s=Fi(e)(r,i);return Cf(ve.from(n),ve.from(s))}}function ji(e){return function(r,n){Ni(n),r=Ge(r);var i=D.createSign("RSA-SHA"+e),s=(i.update(r),i.sign(n,"base64"));return $r(s)}}function Ki(e){return function(r,n,i){Pi(i),r=Ge(r),n=qi(n);var s=D.createVerify("RSA-SHA"+e);return s.update(r),s.verify(i,n,"base64")}}function xf(e){return function(r,n){Ni(n),r=Ge(r);var i=D.createSign("RSA-SHA"+e),s=(i.update(r),i.sign({key:n,padding:D.constants.RSA_PKCS1_PSS_PADDING,saltLength:D.constants.RSA_PSS_SALTLEN_DIGEST},"base64"));return $r(s)}}function _f(e){return function(r,n,i){Pi(i),r=Ge(r),n=qi(n);var s=D.createVerify("RSA-SHA"+e);return s.update(r),s.verify({key:i,padding:D.constants.RSA_PKCS1_PSS_PADDING,saltLength:D.constants.RSA_PSS_SALTLEN_DIGEST},n,"base64")}}function Of(e){var t=ji(e);return function(){var n=t.apply(null,arguments);return n=Li.derToJose(n,"ES"+e),n}}function kf(e){var t=Ki(e);return function(n,i,s){i=Li.joseToDer(i,"ES"+e).toString("base64");var o=t(n,i,s);return o}}function $f(){return function(){return""}}function Lf(){return function(t,r){return r===""}}Di.exports=function(t){var r={hs:Fi,rs:ji,ps:xf,es:Of,none:$f},n={hs:Rf,rs:Ki,ps:_f,es:kf,none:Lf},i=t.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/);if(!i)throw M(vf,t);var s=(i[1]||i[3]).toLowerCase(),o=i[2];return{sign:r[s](o),verify:n[s](o)}}});var Pr=p(function(Uw,Bi){var Pf=require("buffer").Buffer;Bi.exports=function(t){if(typeof t==="string")return t;if(typeof t==="number"||Pf.isBuffer(t))return t.toString();return JSON.stringify(t)}});var Hi=p(function(Ww,Mi){var Nf=Se().Buffer,Ui=Rr(),qf=Lr(),Ff=require("stream"),Wi=Pr(),Nr=require("util");function Ji(e,t){return Nf.from(e,t).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function jf(e,t,r){r=r||"utf8";var n=Ji(Wi(e),"binary"),i=Ji(Wi(t),r);return Nr.format("%s.%s",n,i)}function Gi(e){var{header:t,payload:r}=e,n=e.secret||e.privateKey,i=e.encoding,s=qf(t.alg),o=jf(t,r,i),c=s.sign(o,n);return Nr.format("%s.%s",o,c)}function Et(e){var t=e.secret;if(t=t==null?e.privateKey:t,t=t==null?e.key:t,/^hs/i.test(e.header.alg)===!0&&t==null)throw TypeError("secret must be a string or buffer or a KeyObject");var r=new Ui(t);this.readable=!0,this.header=e.header,this.encoding=e.encoding,this.secret=this.privateKey=this.key=r,this.payload=new Ui(e.payload),this.secret.once("close",function(){if(!this.payload.writable&&this.readable)this.sign()}.bind(this)),this.payload.once("close",function(){if(!this.secret.writable&&this.readable)this.sign()}.bind(this))}Nr.inherits(Et,Ff);Et.prototype.sign=function(){try{var t=Gi({header:this.header,payload:this.payload.buffer,secret:this.secret.buffer,encoding:this.encoding});return this.emit("done",t),this.emit("data",t),this.emit("end"),this.readable=!1,t}catch(r){this.readable=!1,this.emit("error",r),this.emit("close")}};Et.sign=Gi;Mi.exports=Et});var ns=p(function(Jw,rs){var Vi=Se().Buffer,zi=Rr(),Kf=Lr(),Df=require("stream"),Xi=Pr(),Bf=require("util"),Uf=/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;function Wf(e){return Object.prototype.toString.call(e)==="[object Object]"}function Jf(e){if(Wf(e))return e;try{return JSON.parse(e)}catch(t){return}}function Yi(e){var t=e.split(".",1)[0];return Jf(Vi.from(t,"base64").toString("binary"))}function Gf(e){return e.split(".",2).join(".")}function Zi(e){return e.split(".")[2]}function Mf(e,t){t=t||"utf8";var r=e.split(".")[1];return Vi.from(r,"base64").toString(t)}function Qi(e){return Uf.test(e)&&!!Yi(e)}function es(e,t,r){if(!t){var n=Error("Missing algorithm parameter for jws.verify");throw n.code="MISSING_ALGORITHM",n}e=Xi(e);var i=Zi(e),s=Gf(e),o=Kf(t);return o.verify(s,i,r)}function ts(e,t){if(t=t||{},e=Xi(e),!Qi(e))return null;var r=Yi(e);if(!r)return null;var n=Mf(e);if(r.typ==="JWT"||t.json)n=JSON.parse(n,t.encoding);return{header:r,payload:n,signature:Zi(e)}}function Te(e){e=e||{};var t=e.secret;if(t=t==null?e.publicKey:t,t=t==null?e.key:t,/^hs/i.test(e.algorithm)===!0&&t==null)throw TypeError("secret must be a string or buffer or a KeyObject");var r=new zi(t);this.readable=!0,this.algorithm=e.algorithm,this.encoding=e.encoding,this.secret=this.publicKey=this.key=r,this.signature=new zi(e.signature),this.secret.once("close",function(){if(!this.signature.writable&&this.readable)this.verify()}.bind(this)),this.signature.once("close",function(){if(!this.secret.writable&&this.readable)this.verify()}.bind(this))}Bf.inherits(Te,Df);Te.prototype.verify=function(){try{var t=es(this.signature.buffer,this.algorithm,this.key.buffer),r=ts(this.signature.buffer,this.encoding);return this.emit("done",t,r),this.emit("data",t),this.emit("end"),this.readable=!1,t}catch(n){this.readable=!1,this.emit("error",n),this.emit("close")}};Te.decode=ts;Te.isValid=Qi;Te.verify=es;rs.exports=Te});var St=p(function(re){var is=Hi(),wt=ns(),Hf=["HS256","HS384","HS512","RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"];re.ALGORITHMS=Hf;re.sign=is.sign;re.verify=wt.verify;re.decode=wt.decode;re.isValid=wt.isValid;re.createSign=function(t){return new is(t)};re.createVerify=function(t){return new wt(t)}});var qr=p(function(Mw,ss){var zf=St();ss.exports=function(e,t){t=t||{};var r=zf.decode(e,t);if(!r)return null;var n=r.payload;if(typeof n==="string")try{var i=JSON.parse(n);if(i!==null&&typeof i==="object")n=i}catch(s){}if(t.complete===!0)return{header:r.header,payload:n,signature:r.signature};return n}});var Me=p(function(Hw,os){var bt=function(e,t){if(Error.call(this,e),Error.captureStackTrace)Error.captureStackTrace(this,this.constructor);if(this.name="JsonWebTokenError",this.message=e,t)this.inner=t};bt.prototype=Object.create(Error.prototype);bt.prototype.constructor=bt;os.exports=bt});var Fr=p(function(zw,cs){var as=Me(),vt=function(e,t){as.call(this,e),this.name="NotBeforeError",this.date=t};vt.prototype=Object.create(as.prototype);vt.prototype.constructor=vt;cs.exports=vt});var jr=p(function(Vw,ls){var us=Me(),Tt=function(e,t){us.call(this,e),this.name="TokenExpiredError",this.expiredAt=t};Tt.prototype=Object.create(us.prototype);Tt.prototype.constructor=Tt;ls.exports=Tt});var Kr=p(function(Xw,fs){var Ae=1000,Ie=Ae*60,Ce=Ie*60,fe=Ce*24,Vf=fe*7,Xf=fe*365.25;fs.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return Yf(e);else if(r==="number"&&isFinite(e))return t.long?Qf(e):Zf(e);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Yf(e){if(e=String(e),e.length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*Xf;case"weeks":case"week":case"w":return r*Vf;case"days":case"day":case"d":return r*fe;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Ce;case"minutes":case"minute":case"mins":case"min":case"m":return r*Ie;case"seconds":case"second":case"secs":case"sec":case"s":return r*Ae;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}function Zf(e){var t=Math.abs(e);if(t>=fe)return Math.round(e/fe)+"d";if(t>=Ce)return Math.round(e/Ce)+"h";if(t>=Ie)return Math.round(e/Ie)+"m";if(t>=Ae)return Math.round(e/Ae)+"s";return e+"ms"}function Qf(e){var t=Math.abs(e);if(t>=fe)return At(e,t,fe,"day");if(t>=Ce)return At(e,t,Ce,"hour");if(t>=Ie)return At(e,t,Ie,"minute");if(t>=Ae)return At(e,t,Ae,"second");return e+" ms"}function At(e,t,r,n){var i=t>=r*1.5;return Math.round(e/r)+" "+n+(i?"s":"")}});var Dr=p(function(Yw,hs){var eh=Kr();hs.exports=function(e,t){var r=t||Math.floor(Date.now()/1000);if(typeof e==="string"){var n=eh(e);if(typeof n>"u")return;return Math.floor(r+n/1000)}else if(typeof e==="number")return r+e;else return}});var he=p(function(Zw,ps){var th=Number.MAX_SAFE_INTEGER||9007199254740991,rh=["\t",`
4
+ `,"\v","\f","\r"," "," "," "," "," "," "," "," "," "," "," "," "," "," ","\u2028","\u2029"," "," "," ","\uFEFF"],nh=["major","premajor","minor","preminor","patch","prepatch","prerelease"];ps.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:th,WHITESPACE_CHARACTERS:rh,RELEASE_TYPES:nh,SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var He=p(function(Qw,ds){var ih=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};ds.exports=ih});var Re=p(function(X,ms){var{MAX_SAFE_COMPONENT_LENGTH:Br,MAX_SAFE_BUILD_LENGTH:sh,MAX_LENGTH:oh}=he(),ah=He();X=ms.exports={};var ch=X.re=[],uh=X.safeRe=[],y=X.src=[],lh=X.safeSrc=[],E=X.t={},fh=0,Ur="[a-zA-Z0-9-]",hh=[["\\s",1],["\\d",oh],[Ur,sh]],ph=(e)=>{for(let[t,r]of hh)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e},v=(e,t,r)=>{let n=ph(t),i=fh++;ah(e,i,t),E[e]=i,y[i]=t,lh[i]=n,ch[i]=new RegExp(t,r?"g":void 0),uh[i]=new RegExp(n,r?"g":void 0)};v("NUMERICIDENTIFIER","0|[1-9]\\d*");v("NUMERICIDENTIFIERLOOSE","\\d+");v("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Ur}*`);v("MAINVERSION",`(${y[E.NUMERICIDENTIFIER]})\\.(${y[E.NUMERICIDENTIFIER]})\\.(${y[E.NUMERICIDENTIFIER]})`);v("MAINVERSIONLOOSE",`(${y[E.NUMERICIDENTIFIERLOOSE]})\\.(${y[E.NUMERICIDENTIFIERLOOSE]})\\.(${y[E.NUMERICIDENTIFIERLOOSE]})`);v("PRERELEASEIDENTIFIER",`(?:${y[E.NONNUMERICIDENTIFIER]}|${y[E.NUMERICIDENTIFIER]})`);v("PRERELEASEIDENTIFIERLOOSE",`(?:${y[E.NONNUMERICIDENTIFIER]}|${y[E.NUMERICIDENTIFIERLOOSE]})`);v("PRERELEASE",`(?:-(${y[E.PRERELEASEIDENTIFIER]}(?:\\.${y[E.PRERELEASEIDENTIFIER]})*))`);v("PRERELEASELOOSE",`(?:-?(${y[E.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${y[E.PRERELEASEIDENTIFIERLOOSE]})*))`);v("BUILDIDENTIFIER",`${Ur}+`);v("BUILD",`(?:\\+(${y[E.BUILDIDENTIFIER]}(?:\\.${y[E.BUILDIDENTIFIER]})*))`);v("FULLPLAIN",`v?${y[E.MAINVERSION]}${y[E.PRERELEASE]}?${y[E.BUILD]}?`);v("FULL",`^${y[E.FULLPLAIN]}$`);v("LOOSEPLAIN",`[v=\\s]*${y[E.MAINVERSIONLOOSE]}${y[E.PRERELEASELOOSE]}?${y[E.BUILD]}?`);v("LOOSE",`^${y[E.LOOSEPLAIN]}$`);v("GTLT","((?:<|>)?=?)");v("XRANGEIDENTIFIERLOOSE",`${y[E.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);v("XRANGEIDENTIFIER",`${y[E.NUMERICIDENTIFIER]}|x|X|\\*`);v("XRANGEPLAIN",`[v=\\s]*(${y[E.XRANGEIDENTIFIER]})(?:\\.(${y[E.XRANGEIDENTIFIER]})(?:\\.(${y[E.XRANGEIDENTIFIER]})(?:${y[E.PRERELEASE]})?${y[E.BUILD]}?)?)?`);v("XRANGEPLAINLOOSE",`[v=\\s]*(${y[E.XRANGEIDENTIFIERLOOSE]})(?:\\.(${y[E.XRANGEIDENTIFIERLOOSE]})(?:\\.(${y[E.XRANGEIDENTIFIERLOOSE]})(?:${y[E.PRERELEASELOOSE]})?${y[E.BUILD]}?)?)?`);v("XRANGE",`^${y[E.GTLT]}\\s*${y[E.XRANGEPLAIN]}$`);v("XRANGELOOSE",`^${y[E.GTLT]}\\s*${y[E.XRANGEPLAINLOOSE]}$`);v("COERCEPLAIN",`(^|[^\\d])(\\d{1,${Br}})(?:\\.(\\d{1,${Br}}))?(?:\\.(\\d{1,${Br}}))?`);v("COERCE",`${y[E.COERCEPLAIN]}(?:$|[^\\d])`);v("COERCEFULL",y[E.COERCEPLAIN]+`(?:${y[E.PRERELEASE]})?(?:${y[E.BUILD]})?(?:$|[^\\d])`);v("COERCERTL",y[E.COERCE],!0);v("COERCERTLFULL",y[E.COERCEFULL],!0);v("LONETILDE","(?:~>?)");v("TILDETRIM",`(\\s*)${y[E.LONETILDE]}\\s+`,!0);X.tildeTrimReplace="$1~";v("TILDE",`^${y[E.LONETILDE]}${y[E.XRANGEPLAIN]}$`);v("TILDELOOSE",`^${y[E.LONETILDE]}${y[E.XRANGEPLAINLOOSE]}$`);v("LONECARET","(?:\\^)");v("CARETTRIM",`(\\s*)${y[E.LONECARET]}\\s+`,!0);X.caretTrimReplace="$1^";v("CARET",`^${y[E.LONECARET]}${y[E.XRANGEPLAIN]}$`);v("CARETLOOSE",`^${y[E.LONECARET]}${y[E.XRANGEPLAINLOOSE]}$`);v("COMPARATORLOOSE",`^${y[E.GTLT]}\\s*(${y[E.LOOSEPLAIN]})$|^$`);v("COMPARATOR",`^${y[E.GTLT]}\\s*(${y[E.FULLPLAIN]})$|^$`);v("COMPARATORTRIM",`(\\s*)${y[E.GTLT]}\\s*(${y[E.LOOSEPLAIN]}|${y[E.XRANGEPLAIN]})`,!0);X.comparatorTrimReplace="$1$2$3";v("HYPHENRANGE",`^\\s*(${y[E.XRANGEPLAIN]})\\s+-\\s+(${y[E.XRANGEPLAIN]})\\s*$`);v("HYPHENRANGELOOSE",`^\\s*(${y[E.XRANGEPLAINLOOSE]})\\s+-\\s+(${y[E.XRANGEPLAINLOOSE]})\\s*$`);v("STAR","(<|>)?=?\\s*\\*");v("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");v("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var It=p(function(eS,gs){var dh=Object.freeze({loose:!0}),mh=Object.freeze({}),gh=(e)=>{if(!e)return mh;if(typeof e!=="object")return dh;return e};gs.exports=gh});var Wr=p(function(tS,ws){var ys=/^[0-9]+$/,Es=(e,t)=>{if(typeof e==="number"&&typeof t==="number")return e===t?0:e<t?-1:1;let r=ys.test(e),n=ys.test(t);if(r&&n)e=+e,t=+t;return e===t?0:r&&!n?-1:n&&!r?1:e<t?-1:1},yh=(e,t)=>Es(t,e);ws.exports={compareIdentifiers:Es,rcompareIdentifiers:yh}});var P=p(function(rS,bs){var Ct=He(),{MAX_LENGTH:Ss,MAX_SAFE_INTEGER:Rt}=he(),{safeRe:xt,t:_t}=Re(),Eh=It(),{compareIdentifiers:Jr}=Wr(),wh=(e,t)=>{let r=t.split(".");if(r.length>e.length)return!1;for(let n=0;n<r.length;n++)if(Jr(e[n],r[n])!==0)return!1;return!0};class H{constructor(e,t){if(t=Eh(t),e instanceof H)if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;else e=e.version;else if(typeof e!=="string")throw TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>Ss)throw TypeError(`version is longer than ${Ss} characters`);Ct("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let r=e.trim().match(t.loose?xt[_t.LOOSE]:xt[_t.FULL]);if(!r)throw TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>Rt||this.major<0)throw TypeError("Invalid major version");if(this.minor>Rt||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>Rt||this.patch<0)throw TypeError("Invalid patch version");if(!r[4])this.prerelease=[];else this.prerelease=r[4].split(".").map((n)=>{if(/^[0-9]+$/.test(n)){let i=+n;if(i>=0&&i<Rt)return i}return n});this.build=r[5]?r[5].split("."):[],this.format()}format(){if(this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length)this.version+=`-${this.prerelease.join(".")}`;return this.version}toString(){return this.version}compare(e){if(Ct("SemVer.compare",this.version,this.options,e),!(e instanceof H)){if(typeof e==="string"&&e===this.version)return 0;e=new H(e,this.options)}if(e.version===this.version)return 0;return this.compareMain(e)||this.comparePre(e)}compareMain(e){if(!(e instanceof H))e=new H(e,this.options);if(this.major<e.major)return-1;if(this.major>e.major)return 1;if(this.minor<e.minor)return-1;if(this.minor>e.minor)return 1;if(this.patch<e.patch)return-1;if(this.patch>e.patch)return 1;return 0}comparePre(e){if(!(e instanceof H))e=new H(e,this.options);if(this.prerelease.length&&!e.prerelease.length)return-1;else if(!this.prerelease.length&&e.prerelease.length)return 1;else if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let r=this.prerelease[t],n=e.prerelease[t];if(Ct("prerelease compare",t,r,n),r===void 0&&n===void 0)return 0;else if(n===void 0)return 1;else if(r===void 0)return-1;else if(r===n)continue;else return Jr(r,n)}while(++t)}compareBuild(e){if(!(e instanceof H))e=new H(e,this.options);let t=0;do{let r=this.build[t],n=e.build[t];if(Ct("build compare",t,r,n),r===void 0&&n===void 0)return 0;else if(n===void 0)return 1;else if(r===void 0)return-1;else if(r===n)continue;else return Jr(r,n)}while(++t)}inc(e,t,r){if(e.startsWith("pre")){if(!t&&r===!1)throw Error("invalid increment argument: identifier is empty");if(t){let n=`-${t}`.match(this.options.loose?xt[_t.PRERELEASELOOSE]:xt[_t.PRERELEASE]);if(!n||n[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":if(this.prerelease.length===0)this.inc("patch",t,r);this.inc("pre",t,r);break;case"release":if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":if(this.minor!==0||this.patch!==0||this.prerelease.length===0)this.major++;this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":if(this.patch!==0||this.prerelease.length===0)this.minor++;this.patch=0,this.prerelease=[];break;case"patch":if(this.prerelease.length===0)this.patch++;this.prerelease=[];break;case"pre":{let n=Number(r)?1:0;if(this.prerelease.length===0)this.prerelease=[n];else{let i=this.prerelease.length;while(--i>=0)if(typeof this.prerelease[i]==="number")this.prerelease[i]++,i=-2;if(i===-1){if(t===this.prerelease.join(".")&&r===!1)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(n)}}if(t){let i=[t,n];if(r===!1)i=[t];if(wh(this.prerelease,t)){let s=this.prerelease[t.split(".").length];if(isNaN(s))this.prerelease=i}else this.prerelease=i}break}default:throw Error(`invalid increment argument: ${e}`)}if(this.raw=this.format(),this.build.length)this.raw+=`+${this.build.join(".")}`;return this}}bs.exports=H});var ne=p(function(nS,Ts){var vs=P(),Sh=(e,t,r=!1)=>{if(e instanceof vs)return e;try{return new vs(e,t)}catch(n){if(!r)return null;throw n}};Ts.exports=Sh});var Is=p(function(iS,As){var bh=ne(),vh=(e,t)=>{let r=bh(e,t);return r?r.version:null};As.exports=vh});var Rs=p(function(sS,Cs){var Th=ne(),Ah=(e,t)=>{let r=Th(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};Cs.exports=Ah});var Os=p(function(oS,_s){var xs=P(),Ih=(e,t,r,n,i)=>{if(typeof r==="string")i=n,n=r,r=void 0;try{return new xs(e instanceof xs?e.version:e,r).inc(t,n,i).version}catch(s){return null}};_s.exports=Ih});var Ls=p(function(aS,$s){var ks=ne(),Ch=(e,t)=>{let r=ks(e,null,!0),n=ks(t,null,!0),i=r.compare(n);if(i===0)return null;let s=i>0,o=s?r:n,c=s?n:r,u=!!o.prerelease.length;if(!!c.prerelease.length&&!u){if(!c.patch&&!c.minor)return"major";if(c.compareMain(o)===0){if(c.minor&&!c.patch)return"minor";return"patch"}}let l=u?"pre":"";if(r.major!==n.major)return l+"major";if(r.minor!==n.minor)return l+"minor";if(r.patch!==n.patch)return l+"patch";return"prerelease"};$s.exports=Ch});var Ns=p(function(cS,Ps){var Rh=P(),xh=(e,t)=>new Rh(e,t).major;Ps.exports=xh});var Fs=p(function(uS,qs){var _h=P(),Oh=(e,t)=>new _h(e,t).minor;qs.exports=Oh});var Ks=p(function(lS,js){var kh=P(),$h=(e,t)=>new kh(e,t).patch;js.exports=$h});var Bs=p(function(fS,Ds){var Lh=ne(),Ph=(e,t)=>{let r=Lh(e,t);return r&&r.prerelease.length?r.prerelease:null};Ds.exports=Ph});var B=p(function(hS,Ws){var Us=P(),Nh=(e,t,r)=>new Us(e,r).compare(new Us(t,r));Ws.exports=Nh});var Gs=p(function(pS,Js){var qh=B(),Fh=(e,t,r)=>qh(t,e,r);Js.exports=Fh});var Hs=p(function(dS,Ms){var jh=B(),Kh=(e,t)=>jh(e,t,!0);Ms.exports=Kh});var Ot=p(function(mS,Vs){var zs=P(),Dh=(e,t,r)=>{let n=new zs(e,r),i=new zs(t,r);return n.compare(i)||n.compareBuild(i)};Vs.exports=Dh});var Ys=p(function(gS,Xs){var Bh=Ot(),Uh=(e,t)=>e.sort((r,n)=>Bh(r,n,t));Xs.exports=Uh});var Qs=p(function(yS,Zs){var Wh=Ot(),Jh=(e,t)=>e.sort((r,n)=>Wh(n,r,t));Zs.exports=Jh});var ze=p(function(ES,eo){var Gh=B(),Mh=(e,t,r)=>Gh(e,t,r)>0;eo.exports=Mh});var kt=p(function(wS,to){var Hh=B(),zh=(e,t,r)=>Hh(e,t,r)<0;to.exports=zh});var Gr=p(function(SS,ro){var Vh=B(),Xh=(e,t,r)=>Vh(e,t,r)===0;ro.exports=Xh});var Mr=p(function(bS,no){var Yh=B(),Zh=(e,t,r)=>Yh(e,t,r)!==0;no.exports=Zh});var $t=p(function(vS,io){var Qh=B(),ep=(e,t,r)=>Qh(e,t,r)>=0;io.exports=ep});var Lt=p(function(TS,so){var tp=B(),rp=(e,t,r)=>tp(e,t,r)<=0;so.exports=rp});var Hr=p(function(AS,oo){var np=Gr(),ip=Mr(),sp=ze(),op=$t(),ap=kt(),cp=Lt(),up=(e,t,r,n)=>{switch(t){case"===":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e===r;case"!==":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e!==r;case"":case"=":case"==":return np(e,r,n);case"!=":return ip(e,r,n);case">":return sp(e,r,n);case">=":return op(e,r,n);case"<":return ap(e,r,n);case"<=":return cp(e,r,n);default:throw TypeError(`Invalid operator: ${t}`)}};oo.exports=up});var co=p(function(IS,ao){var lp=P(),fp=ne(),{safeRe:Pt,t:Nt}=Re(),hp=(e,t)=>{if(e instanceof lp)return e;if(typeof e==="number")e=String(e);if(typeof e!=="string")return null;t=t||{};let r=null;if(!t.rtl)r=e.match(t.includePrerelease?Pt[Nt.COERCEFULL]:Pt[Nt.COERCE]);else{let u=t.includePrerelease?Pt[Nt.COERCERTLFULL]:Pt[Nt.COERCERTL],a;while((a=u.exec(e))&&(!r||r.index+r[0].length!==e.length)){if(!r||a.index+a[0].length!==r.index+r[0].length)r=a;u.lastIndex=a.index+a[1].length+a[2].length}u.lastIndex=-1}if(r===null)return null;let n=r[2],i=r[3]||"0",s=r[4]||"0",o=t.includePrerelease&&r[5]?`-${r[5]}`:"",c=t.includePrerelease&&r[6]?`+${r[6]}`:"";return fp(`${n}.${i}.${s}${o}${c}`,t)};ao.exports=hp});var fo=p(function(CS,lo){var pp=ne(),uo=he(),dp=P(),mp=(e,t,r)=>{if(!uo.RELEASE_TYPES.includes(t))return null;let n=gp(e,r);return n&&yp(n,t)},gp=(e,t)=>{let r=e instanceof dp?e.version:e;return pp(r,t)},yp=(e,t)=>{if(Ep(t))return e.version;switch(e.prerelease=[],t){case"major":e.minor=0,e.patch=0;break;case"minor":e.patch=0;break}return e.format()},Ep=(e)=>e.startsWith("pre");lo.exports=mp});var mo=p(function(RS,po){class ho{constructor(){this.max=1000,this.map=new Map}get(e){let t=this.map.get(e);if(t===void 0)return;else return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let n=this.map.keys().next().value;this.delete(n)}this.map.set(e,t)}return this}}po.exports=ho});var Ro=p(function(xS,Co){var{MAX_LENGTH:Vr,MAX_SAFE_BUILD_LENGTH:wo,WHITESPACE_CHARACTERS:wp}=he(),So=new Uint8Array(65536);for(let e of wp)So[e.charCodeAt(0)]=1;var Xr=(e)=>e!==void 0&&So[e.charCodeAt(0)]===1,go=(e)=>e==="v"||e==="="||Xr(e),Ve=(e)=>e!==void 0&&e>="0"&&e<="9",bo=(e)=>e!==void 0&&(e>="a"&&e<="z"||e>="A"&&e<="Z"),vo=(e)=>Ve(e)||bo(e)||e==="-",Yr=(e)=>Ve(e)||e==="x"||e==="X"||e==="*",To=(e,t,r,n)=>{if(!Ve(e[t]))return t;if(t>=n.start&&t<n.end)return Math.min(t+r,n.end);if(t>=n.previousStart&&t<n.previousEnd)return Math.min(t+r,n.previousEnd);let i=t+1;while(Ve(e[i]))i++;return n.previousStart=n.start,n.previousEnd=n.end,n.start=t,n.end=i,Math.min(t+r,i)},Zr=(e,t,r,n)=>{if(!r&&e[t]==="0")return t+1;return To(e,t,r?Vr:Vr+1,n)},zr=(e,t,r,n)=>{let i=To(e,t,Vr,n);if(bo(e[i])||e[i]==="-"){let s=i+1,o=s+wo;while(s<o&&vo(e[s]))s++;return s}return Zr(e,t,r,n)},Ao=(e,t,r,n)=>{let i=e[t]==="-";if(!r&&!i)return t;let s=t+(i?1:0),o=zr(e,s,r,n);if(o===s){if(!r||!i)return t;o=zr(e,t,r,n)}while(e[o]==="."){let c=zr(e,o+1,r,n);if(c===o+1)break;o=c}return o},yo=(e,t)=>{let r=t;while(r-t<wo&&vo(e[r]))r++;return r},Io=(e,t)=>{if(e[t]!=="+")return t;let r=yo(e,t+1);if(r===t+1)return t;while(e[r]==="."){let n=yo(e,r+1);if(n===r+1)break;r=n}return r},Sp=(e,t,r)=>{let n=t;for(let s=0;s<3;s++){let o=Zr(e,n,!0,r);if(o===n)return t;if(n=o,s<2){if(e[n]!==".")return t;n++}}let i=Ao(e,n,!0,r);return Io(e,i)},Eo=(e,t,r)=>{if(Ve(e[t]))return Zr(e,t,!1,r);return Yr(e[t])?t+1:t},bp=(e,t,r)=>{let n=Eo(e,t,r);for(let s=0;s<2;s++){if(e[n]!==".")return n;let o=Eo(e,n+1,r);if(o===n+1)return n;n=o}let i=Ao(e,n,!1,r);return Io(e,i)},vp=(e,t,r)=>{let n=Sp(e,t,r);return n!==t?n:bp(e,t,r)},Tp=(e,t)=>{let r=t;if(Xr(e[r]))r++;if(e[r]==="<"||e[r]===">")r++;if(e[r]==="=")r++;return Xr(e[r])?r:-1},Ap=(e)=>{let t="",r=0,n=0,i={start:-1,end:-1,previousStart:-1,previousEnd:-1};while(n<e.length){let s=n;if(e[n]==="<"||e[n]===">")n++;else if(!go(e[n])&&!Yr(e[n])){n++;continue}while(n<e.length&&go(e[n]))n++;if(!Yr(e[n]))continue;let o=Tp(e,s);if(o!==-1)t+=e.slice(r,o),r=o+1;n=vp(e,n,i)}return t+e.slice(r)};Co.exports=Ap});var U=p(function(_S,ko){var Ip=/\s+/g;class Xe{constructor(e,t){if(t=Rp(t),e instanceof Xe)if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;else return new Xe(e.raw,t);if(e instanceof qt)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(Ip," "),this.set=this.raw.split("||").map((r)=>this.parseRange(r.trim())).filter((r)=>r.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let r=this.set[0];if(this.set=this.set.filter((n)=>!_o(n[0])),this.set.length===0)this.set=[r];else if(this.set.length>1){for(let n of this.set)if(n.length===1&&qp(n[0])){this.set=[n];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){if(e>0)this.formatted+="||";let t=this.set[e];for(let r=0;r<t.length;r++){if(r>0)this.formatted+=" ";this.formatted+=t[r].toString().trim()}}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){e=e.replace(Np,"");let r=((this.options.includePrerelease&&Lp)|(this.options.loose&&Pp))+":"+e,n=xo.get(r);if(n)return n;let i=this.options.loose,s=i?F[N.HYPHENRANGELOOSE]:F[N.HYPHENRANGE];e=e.replace(s,Hp(this.options.includePrerelease)),x("hyphen replace",e),e=_p(e),x("comparator trim",e),e=e.replace(F[N.TILDETRIM],kp),x("tilde trim",e),e=e.replace(F[N.CARETTRIM],$p),x("caret trim",e);let o=e.split(" ").map((l)=>Fp(l,this.options)).join(" ").split(/\s+/).map((l)=>Mp(l,this.options));if(i)o=o.filter((l)=>(x("loose invalid filter",l,this.options),!!l.match(F[N.COMPARATORLOOSE])));x("range list",o);let c=new Map,u=o.map((l)=>new qt(l,this.options));for(let l of u){if(_o(l))return[l];c.set(l.value,l)}if(c.size>1&&c.has(""))c.delete("");let a=[...c.values()];return xo.set(r,a),a}intersects(e,t){if(!(e instanceof Xe))throw TypeError("a Range is required");return this.set.some((r)=>Oo(r,t)&&e.set.some((n)=>Oo(n,t)&&r.every((i)=>n.every((s)=>i.intersects(s,t)))))}test(e){if(!e)return!1;if(typeof e==="string")try{e=new xp(e,this.options)}catch(t){return!1}for(let t=0;t<this.set.length;t++)if(zp(this.set[t],e,this.options))return!0;return!1}}ko.exports=Xe;var Cp=mo(),xo=new Cp,Rp=It(),qt=Ye(),x=He(),xp=P(),_p=Ro(),{safeRe:F,src:Op,t:N,tildeTrimReplace:kp,caretTrimReplace:$p}=Re(),{FLAG_INCLUDE_PRERELEASE:Lp,FLAG_LOOSE:Pp}=he(),Np=new RegExp(Op[N.BUILD],"g"),_o=(e)=>e.value==="<0.0.0-0",qp=(e)=>e.value==="",Oo=(e,t)=>{let r=!0,n=e.slice(),i=n.pop();while(r&&n.length)r=n.every((s)=>i.intersects(s,t)),i=n.pop();return r},Fp=(e,t)=>(e=e.replace(F[N.BUILD],""),x("comp",e,t),e=Bp(e,t),x("caret",e),e=Kp(e,t),x("tildes",e),e=Wp(e,t),x("xrange",e),e=Gp(e,t),x("stars",e),e),O=(e)=>!e||e.toLowerCase()==="x"||e==="*",jp=(e,t,r)=>O(e)&&!O(t)||O(t)&&r&&!O(r),Kp=(e,t)=>e.trim().split(/\s+/).map((r)=>Dp(r,t)).join(" "),Dp=(e,t)=>{let r=t.loose?F[N.TILDELOOSE]:F[N.TILDE],n=t.includePrerelease?"-0":"";return e.replace(r,(i,s,o,c,u)=>{x("tilde",e,i,s,o,c,u);let a;if(O(s))a="";else if(O(o))a=`>=${s}.0.0${n} <${+s+1}.0.0-0`;else if(O(c))a=`>=${s}.${o}.0${n} <${s}.${+o+1}.0-0`;else if(u)x("replaceTilde pr",u),a=`>=${s}.${o}.${c}-${u} <${s}.${+o+1}.0-0`;else a=`>=${s}.${o}.${c} <${s}.${+o+1}.0-0`;return x("tilde return",a),a})},Bp=(e,t)=>e.trim().split(/\s+/).map((r)=>Up(r,t)).join(" "),Up=(e,t)=>{x("caret",e,t);let r=t.loose?F[N.CARETLOOSE]:F[N.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,(i,s,o,c,u)=>{x("caret",e,i,s,o,c,u);let a;if(O(s))a="";else if(O(o))a=`>=${s}.0.0${n} <${+s+1}.0.0-0`;else if(O(c))if(s==="0")a=`>=${s}.${o}.0${n} <${s}.${+o+1}.0-0`;else a=`>=${s}.${o}.0${n} <${+s+1}.0.0-0`;else if(u)if(x("replaceCaret pr",u),s==="0")if(o==="0")a=`>=${s}.${o}.${c}-${u} <${s}.${o}.${+c+1}-0`;else a=`>=${s}.${o}.${c}-${u} <${s}.${+o+1}.0-0`;else a=`>=${s}.${o}.${c}-${u} <${+s+1}.0.0-0`;else if(x("no pr"),s==="0")if(o==="0")a=`>=${s}.${o}.${c} <${s}.${o}.${+c+1}-0`;else a=`>=${s}.${o}.${c} <${s}.${+o+1}.0-0`;else a=`>=${s}.${o}.${c} <${+s+1}.0.0-0`;return x("caret return",a),a})},Wp=(e,t)=>(x("replaceXRanges",e,t),e.split(/\s+/).map((r)=>Jp(r,t)).join(" ")),Jp=(e,t)=>{e=e.trim();let r=t.loose?F[N.XRANGELOOSE]:F[N.XRANGE];return e.replace(r,(n,i,s,o,c,u)=>{if(x("xRange",e,n,i,s,o,c,u),jp(s,o,c))return e;let a=O(s),l=a||O(o),f=l||O(c),m=f;if(i==="="&&m)i="";if(u=t.includePrerelease?"-0":"",a)if(i===">"||i==="<")n="<0.0.0-0";else n="*";else if(i&&m){if(l)o=0;if(c=0,i===">")if(i=">=",l)s=+s+1,o=0,c=0;else o=+o+1,c=0;else if(i==="<=")if(i="<",l)s=+s+1;else o=+o+1;if(i==="<")u="-0";n=`${i+s}.${o}.${c}${u}`}else if(l)n=`>=${s}.0.0${u} <${+s+1}.0.0-0`;else if(f)n=`>=${s}.${o}.0${u} <${s}.${+o+1}.0-0`;return x("xRange return",n),n})},Gp=(e,t)=>(x("replaceStars",e,t),e.trim().replace(F[N.STAR],"")),Mp=(e,t)=>(x("replaceGTE0",e,t),e.trim().replace(F[t.includePrerelease?N.GTE0PRE:N.GTE0],"")),Hp=(e)=>(t,r,n,i,s,o,c,u,a,l,f,m)=>{if(O(n))r="";else if(O(i))r=`>=${n}.0.0${e?"-0":""}`;else if(O(s))r=`>=${n}.${i}.0${e?"-0":""}`;else if(o)r=`>=${r}`;else r=`>=${r}${e?"-0":""}`;if(O(a))u="";else if(O(l))u=`<${+a+1}.0.0-0`;else if(O(f))u=`<${a}.${+l+1}.0-0`;else if(m)u=`<=${a}.${l}.${f}-${m}`;else if(e)u=`<${a}.${l}.${+f+1}-0`;else u=`<=${u}`;return`${r} ${u}`.trim()},zp=(e,t,r)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let n=0;n<e.length;n++){if(x(e[n].semver),e[n].semver===qt.ANY)continue;if(e[n].semver.prerelease.length>0){let i=e[n].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}}return!1}return!0}});var Ye=p(function(OS,Fo){var Ze=Symbol("SemVer ANY");class Ft{static get ANY(){return Ze}constructor(e,t){if(t=$o(t),e instanceof Ft)if(e.loose===!!t.loose)return e;else e=e.value;if(e=e.trim().split(/\s+/).join(" "),en("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===Ze)this.value="";else this.value=this.operator+this.semver.version;en("comp",this)}parse(e){let t=this.options.loose?Lo[Po.COMPARATORLOOSE]:Lo[Po.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);if(this.operator=r[1]!==void 0?r[1]:"",this.operator==="=")this.operator="";if(!r[2])this.semver=Ze;else this.semver=new No(r[2],this.options.loose)}toString(){return this.value}test(e){if(en("Comparator.test",e,this.options.loose),this.semver===Ze||e===Ze)return!0;if(typeof e==="string")try{e=new No(e,this.options)}catch(t){return!1}return Qr(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Ft))throw TypeError("a Comparator is required");if(this.operator===""){if(this.value==="")return!0;return new qo(e.value,t).test(this.value)}else if(e.operator===""){if(e.value==="")return!0;return new qo(this.value,t).test(e.semver)}if(t=$o(t),t.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0"))return!1;if(!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))return!1;if(this.operator.startsWith(">")&&e.operator.startsWith(">"))return!0;if(this.operator.startsWith("<")&&e.operator.startsWith("<"))return!0;if(this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("="))return!0;if(Qr(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))return!0;if(Qr(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">"))return!0;return!1}}Fo.exports=Ft;var $o=It(),{safeRe:Lo,t:Po}=Re(),Qr=Hr(),en=He(),No=P(),qo=U()});var Qe=p(function(kS,jo){var Vp=U(),Xp=(e,t,r)=>{try{t=new Vp(t,r)}catch(n){return!1}return t.test(e)};jo.exports=Xp});var Do=p(function($S,Ko){var Yp=U(),Zp=(e,t)=>new Yp(e,t).set.map((r)=>r.map((n)=>n.value).join(" ").trim().split(" "));Ko.exports=Zp});var Uo=p(function(LS,Bo){var Qp=P(),ed=U(),td=(e,t,r)=>{let n=null,i=null,s=null;try{s=new ed(t,r)}catch(o){return null}return e.forEach((o)=>{if(s.test(o)){if(!n||i.compare(o)===-1)n=o,i=new Qp(n,r)}}),n};Bo.exports=td});var Jo=p(function(PS,Wo){var rd=P(),nd=U(),id=(e,t,r)=>{let n=null,i=null,s=null;try{s=new nd(t,r)}catch(o){return null}return e.forEach((o)=>{if(s.test(o)){if(!n||i.compare(o)===1)n=o,i=new rd(n,r)}}),n};Wo.exports=id});var Ho=p(function(NS,Mo){var tn=P(),sd=U(),Go=ze(),od=(e,t)=>{e=new sd(e,t);let r=new tn("0.0.0");if(e.test(r))return r;if(r=new tn("0.0.0-0"),e.test(r))return r;r=null;for(let n=0;n<e.set.length;++n){let i=e.set[n],s=null;if(i.forEach((o)=>{let c=new tn(o.semver.version);switch(o.operator){case">":if(c.prerelease.length===0)c.patch++;else c.prerelease.push(0);c.raw=c.format();case"":case">=":if(!s||Go(c,s))s=c;break;case"<":case"<=":break;default:throw Error(`Unexpected operation: ${o.operator}`)}}),s&&(!r||Go(r,s)))r=s}if(r&&e.test(r))return r;return null};Mo.exports=od});var Vo=p(function(qS,zo){var ad=U(),cd=(e,t)=>{try{return new ad(e,t).range||"*"}catch(r){return null}};zo.exports=cd});var jt=p(function(FS,Qo){var ud=P(),Zo=Ye(),{ANY:ld}=Zo,fd=U(),hd=Qe(),Xo=ze(),Yo=kt(),pd=Lt(),dd=$t(),md=(e,t,r,n)=>{e=new ud(e,n),t=new fd(t,n);let i,s,o,c,u;switch(r){case">":i=Xo,s=pd,o=Yo,c=">",u=">=";break;case"<":i=Yo,s=dd,o=Xo,c="<",u="<=";break;default:throw TypeError('Must provide a hilo val of "<" or ">"')}if(hd(e,t,n))return!1;for(let a=0;a<t.set.length;++a){let l=t.set[a],f=null,m=null;if(l.forEach((h)=>{if(h.semver===ld)h=new Zo(">=0.0.0");if(f=f||h,m=m||h,i(h.semver,f.semver,n))f=h;else if(o(h.semver,m.semver,n))m=h}),f.operator===c||f.operator===u)return!1;if((!m.operator||m.operator===c)&&s(e,m.semver))return!1;else if(m.operator===u&&o(e,m.semver))return!1}return!0};Qo.exports=md});var ta=p(function(jS,ea){var gd=jt(),yd=(e,t,r)=>gd(e,t,">",r);ea.exports=yd});var na=p(function(KS,ra){var Ed=jt(),wd=(e,t,r)=>Ed(e,t,"<",r);ra.exports=wd});var oa=p(function(DS,sa){var ia=U(),Sd=(e,t,r)=>(e=new ia(e,r),t=new ia(t,r),e.intersects(t,r));sa.exports=Sd});var ca=p(function(BS,aa){var bd=Qe(),vd=B();aa.exports=(e,t,r)=>{let n=[],i=null,s=null,o=e.sort((l,f)=>vd(l,f,r));for(let l of o)if(bd(l,t,r)){if(s=l,!i)i=l}else{if(s)n.push([i,s]);s=null,i=null}if(i)n.push([i,null]);let c=[];for(let[l,f]of n)if(l===f)c.push(l);else if(!f&&l===o[0])c.push("*");else if(!f)c.push(`>=${l}`);else if(l===o[0])c.push(`<=${f}`);else c.push(`${l} - ${f}`);let u=c.join(" || "),a=typeof t.raw==="string"?t.raw:String(t);return u.length<a.length?u:t}});var da=p(function(US,pa){var ua=U(),sn=Ye(),{ANY:rn}=sn,nn=Qe(),on=B(),Td=(e,t,r={})=>{if(e===t)return!0;e=new ua(e,r),t=new ua(t,r);let n=!1;e:for(let i of e.set){for(let s of t.set){let o=Id(i,s,r);if(n=n||o!==null,o)continue e}if(n)return!1}return!0},Ad=[new sn(">=0.0.0-0")],la=[new sn(">=0.0.0")],Id=(e,t,r)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===rn)if(t.length===1&&t[0].semver===rn)return!0;else if(r.includePrerelease)e=Ad;else e=la;if(t.length===1&&t[0].semver===rn)if(r.includePrerelease)return!0;else t=la;let n=new Set,i,s;for(let h of e)if(h.operator===">"||h.operator===">=")i=fa(i,h,r);else if(h.operator==="<"||h.operator==="<=")s=ha(s,h,r);else n.add(h.semver);if(n.size>1)return null;let o;if(i&&s){if(o=on(i.semver,s.semver,r),o>0)return null;else if(o===0&&(i.operator!==">="||s.operator!=="<="))return null}for(let h of n){if(i&&!nn(h,String(i),r))return null;if(s&&!nn(h,String(s),r))return null;for(let g of t)if(!nn(h,String(g),r))return!1;return!0}let c,u,a,l,f=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1,m=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;if(f&&f.prerelease.length===1&&s.operator==="<"&&f.prerelease[0]===0)f=!1;for(let h of t){if(l=l||h.operator===">"||h.operator===">=",a=a||h.operator==="<"||h.operator==="<=",i){if(m){if(h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===m.major&&h.semver.minor===m.minor&&h.semver.patch===m.patch)m=!1}if(h.operator===">"||h.operator===">="){if(c=fa(i,h,r),c===h&&c!==i)return!1}else if(i.operator===">="&&!h.test(i.semver))return!1}if(s){if(f){if(h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===f.major&&h.semver.minor===f.minor&&h.semver.patch===f.patch)f=!1}if(h.operator==="<"||h.operator==="<="){if(u=ha(s,h,r),u===h&&u!==s)return!1}else if(s.operator==="<="&&!h.test(s.semver))return!1}if(!h.operator&&(s||i)&&o!==0)return!1}if(i&&a&&!s&&o!==0)return!1;if(s&&l&&!i&&o!==0)return!1;if(m||f)return!1;return!0},fa=(e,t,r)=>{if(!e)return t;let n=on(e.semver,t.semver,r);return n>0?e:n<0?t:t.operator===">"&&e.operator===">="?t:e},ha=(e,t,r)=>{if(!e)return t;let n=on(e.semver,t.semver,r);return n<0?e:n>0?t:t.operator==="<"&&e.operator==="<="?t:e};pa.exports=Td});var Bt=p(function(WS,ma){var xe=Re(),Kt=he(),Cd=P(),Dt=Wr(),Rd=ne(),xd=Is(),_d=Rs(),Od=Os(),kd=Ls(),$d=Ns(),Ld=Fs(),Pd=Ks(),Nd=Bs(),qd=B(),Fd=Gs(),jd=Hs(),Kd=Ot(),Dd=Ys(),Bd=Qs(),Ud=ze(),Wd=kt(),Jd=Gr(),Gd=Mr(),Md=$t(),Hd=Lt(),zd=Hr(),Vd=co(),Xd=fo(),Yd=Ye(),Zd=U(),Qd=Qe(),em=Do(),tm=Uo(),rm=Jo(),nm=Ho(),im=Vo(),sm=jt(),om=ta(),am=na(),cm=oa(),um=ca(),lm=da();ma.exports={parse:Rd,valid:xd,clean:_d,inc:Od,diff:kd,major:$d,minor:Ld,patch:Pd,prerelease:Nd,compare:qd,rcompare:Fd,compareLoose:jd,compareBuild:Kd,sort:Dd,rsort:Bd,gt:Ud,lt:Wd,eq:Jd,neq:Gd,gte:Md,lte:Hd,cmp:zd,coerce:Vd,truncate:Xd,Comparator:Yd,Range:Zd,satisfies:Qd,toComparators:em,maxSatisfying:tm,minSatisfying:rm,minVersion:nm,validRange:im,outside:sm,gtr:om,ltr:am,intersects:cm,simplifyRange:um,subset:lm,SemVer:Cd,re:xe.re,src:xe.src,tokens:xe.t,SEMVER_SPEC_VERSION:Kt.SEMVER_SPEC_VERSION,RELEASE_TYPES:Kt.RELEASE_TYPES,compareIdentifiers:Dt.compareIdentifiers,rcompareIdentifiers:Dt.rcompareIdentifiers}});var Ea=p(function(JS,ya){var ga=Bt();ya.exports=ga.satisfies(process.version,">=15.7.0")});var ba=p(function(GS,Sa){var wa=Bt();Sa.exports=wa.satisfies(process.version,">=16.9.0")});var an=p(function(MS,va){var fm=Ea(),hm=ba(),pm={ec:["ES256","ES384","ES512"],rsa:["RS256","PS256","RS384","PS384","RS512","PS512"],"rsa-pss":["PS256","PS384","PS512"]},dm={ES256:"prime256v1",ES384:"secp384r1",ES512:"secp521r1"};va.exports=function(e,t){if(!e||!t)return;let r=t.asymmetricKeyType;if(!r)return;let n=pm[r];if(!n)throw Error(`Unknown key type "${r}".`);if(!n.includes(e))throw Error(`"alg" parameter for "${r}" key type must be one of: ${n.join(", ")}.`);if(fm)switch(r){case"ec":let i=t.asymmetricKeyDetails.namedCurve,s=dm[e];if(i!==s)throw Error(`"alg" parameter "${e}" requires curve "${s}".`);break;case"rsa-pss":if(hm){let o=parseInt(e.slice(-3),10),{hashAlgorithm:c,mgf1HashAlgorithm:u,saltLength:a}=t.asymmetricKeyDetails;if(c!==`sha${o}`||u!==c)throw Error(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${e}.`);if(a!==void 0&&a>o>>3)throw Error(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${e}.`)}break}}});var cn=p(function(HS,Ta){var mm=Bt();Ta.exports=mm.satisfies(process.version,"^6.12.0 || >=8.0.0")});var Ra=p(function(zS,Ca){var I=Me(),gm=Fr(),Aa=jr(),ym=qr(),Em=Dr(),wm=an(),Sm=cn(),Ia=St(),{KeyObject:bm,createSecretKey:vm,createPublicKey:Tm}=require("crypto"),un=["RS256","RS384","RS512"],Am=["ES256","ES384","ES512"],ln=["RS256","RS384","RS512"],Im=["HS256","HS384","HS512"];if(Sm)un.splice(un.length,0,"PS256","PS384","PS512"),ln.splice(ln.length,0,"PS256","PS384","PS512");Ca.exports=function(e,t,r,n){if(typeof r==="function"&&!n)n=r,r={};if(!r)r={};r=Object.assign({},r);let i;if(n)i=n;else i=function(l,f){if(l)throw l;return f};if(r.clockTimestamp&&typeof r.clockTimestamp!=="number")return i(new I("clockTimestamp must be a number"));if(r.nonce!==void 0&&(typeof r.nonce!=="string"||r.nonce.trim()===""))return i(new I("nonce must be a non-empty string"));if(r.allowInvalidAsymmetricKeyTypes!==void 0&&typeof r.allowInvalidAsymmetricKeyTypes!=="boolean")return i(new I("allowInvalidAsymmetricKeyTypes must be a boolean"));let s=r.clockTimestamp||Math.floor(Date.now()/1000);if(!e)return i(new I("jwt must be provided"));if(typeof e!=="string")return i(new I("jwt must be a string"));let o=e.split(".");if(o.length!==3)return i(new I("jwt malformed"));let c;try{c=ym(e,{complete:!0})}catch(l){return i(l)}if(!c)return i(new I("invalid token"));let u=c.header,a;if(typeof t==="function"){if(!n)return i(new I("verify must be called asynchronous if secret or public key is provided as a callback"));a=t}else a=function(l,f){return f(null,t)};return a(u,function(l,f){if(l)return i(new I("error in secret or public key callback: "+l.message));let m=o[2].trim()!=="";if(!m&&f)return i(new I("jwt signature is required"));if(m&&!f)return i(new I("secret or public key must be provided"));if(!m&&!r.algorithms)return i(new I('please specify "none" in "algorithms" to verify unsigned tokens'));if(f!=null&&!(f instanceof bm))try{f=Tm(f)}catch(d){try{f=vm(typeof f==="string"?Buffer.from(f):f)}catch(b){return i(new I("secretOrPublicKey is not valid key material"))}}if(!r.algorithms)if(f.type==="secret")r.algorithms=Im;else if(["rsa","rsa-pss"].includes(f.asymmetricKeyType))r.algorithms=ln;else if(f.asymmetricKeyType==="ec")r.algorithms=Am;else r.algorithms=un;if(r.algorithms.indexOf(c.header.alg)===-1)return i(new I("invalid algorithm"));if(u.alg.startsWith("HS")&&f.type!=="secret")return i(new I(`secretOrPublicKey must be a symmetric key when using ${u.alg}`));else if(/^(?:RS|PS|ES)/.test(u.alg)&&f.type!=="public")return i(new I(`secretOrPublicKey must be an asymmetric key when using ${u.alg}`));if(!r.allowInvalidAsymmetricKeyTypes)try{wm(u.alg,f)}catch(d){return i(d)}let h;try{h=Ia.verify(e,c.header.alg,f)}catch(d){return i(d)}if(!h)return i(new I("invalid signature"));let g=c.payload;if(typeof g.nbf<"u"&&!r.ignoreNotBefore){if(typeof g.nbf!=="number")return i(new I("invalid nbf value"));if(g.nbf>s+(r.clockTolerance||0))return i(new gm("jwt not active",new Date(g.nbf*1000)))}if(typeof g.exp<"u"&&!r.ignoreExpiration){if(typeof g.exp!=="number")return i(new I("invalid exp value"));if(s>=g.exp+(r.clockTolerance||0))return i(new Aa("jwt expired",new Date(g.exp*1000)))}if(r.audience){let d=Array.isArray(r.audience)?r.audience:[r.audience];if(!(Array.isArray(g.aud)?g.aud:[g.aud]).some(function(S){return d.some(function(A){return A instanceof RegExp?A.test(S):A===S})}))return i(new I("jwt audience invalid. expected: "+d.join(" or ")))}if(r.issuer){if(typeof r.issuer==="string"&&g.iss!==r.issuer||Array.isArray(r.issuer)&&r.issuer.indexOf(g.iss)===-1)return i(new I("jwt issuer invalid. expected: "+r.issuer))}if(r.subject){if(g.sub!==r.subject)return i(new I("jwt subject invalid. expected: "+r.subject))}if(r.jwtid){if(g.jti!==r.jwtid)return i(new I("jwt jwtid invalid. expected: "+r.jwtid))}if(r.nonce){if(g.nonce!==r.nonce)return i(new I("jwt nonce invalid. expected: "+r.nonce))}if(r.maxAge){if(typeof g.iat!=="number")return i(new I("iat required when maxAge is specified"));let d=Em(r.maxAge,g.iat);if(typeof d>"u")return i(new I('"maxAge" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'));if(s>=d+(r.clockTolerance||0))return i(new Aa("maxAge exceeded",new Date(d*1000)))}if(r.complete===!0){let d=c.signature;return i(null,{header:u,payload:g,signature:d})}return i(null,g)})}});var La=p(function(VS,$a){var xa=1/0,Oa=9007199254740991,Cm=179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,_a=NaN,Rm="[object Arguments]",xm="[object Function]",_m="[object GeneratorFunction]",Om="[object String]",km="[object Symbol]",$m=/^\s+|\s+$/g,Lm=/^[-+]0x[0-9a-f]+$/i,Pm=/^0b[01]+$/i,Nm=/^0o[0-7]+$/i,qm=/^(?:0|[1-9]\d*)$/,Fm=parseInt;function jm(e,t){var r=-1,n=e?e.length:0,i=Array(n);while(++r<n)i[r]=t(e[r],r,e);return i}function Km(e,t,r,n){var i=e.length,s=r+(n?1:-1);while(n?s--:++s<i)if(t(e[s],s,e))return s;return-1}function Dm(e,t,r){if(t!==t)return Km(e,Bm,r);var n=r-1,i=e.length;while(++n<i)if(e[n]===t)return n;return-1}function Bm(e){return e!==e}function Um(e,t){var r=-1,n=Array(e);while(++r<e)n[r]=t(r);return n}function Wm(e,t){return jm(t,function(r){return e[r]})}function Jm(e,t){return function(r){return e(t(r))}}var Ut=Object.prototype,{hasOwnProperty:hn,toString:Wt,propertyIsEnumerable:Gm}=Ut,Mm=Jm(Object.keys,Object),Hm=Math.max;function zm(e,t){var r=ka(e)||Qm(e)?Um(e.length,String):[],n=r.length,i=!!n;for(var s in e)if((t||hn.call(e,s))&&!(i&&(s=="length"||Xm(s,n))))r.push(s);return r}function Vm(e){if(!Ym(e))return Mm(e);var t=[];for(var r in Object(e))if(hn.call(e,r)&&r!="constructor")t.push(r);return t}function Xm(e,t){return t=t==null?Oa:t,!!t&&(typeof e=="number"||qm.test(e))&&(e>-1&&e%1==0&&e<t)}function Ym(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Ut;return e===r}function Zm(e,t,r,n){e=pn(e)?e:ug(e),r=r&&!n?og(r):0;var i=e.length;if(r<0)r=Hm(i+r,0);return ng(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&Dm(e,t,r)>-1}function Qm(e){return eg(e)&&hn.call(e,"callee")&&(!Gm.call(e,"callee")||Wt.call(e)==Rm)}var ka=Array.isArray;function pn(e){return e!=null&&rg(e.length)&&!tg(e)}function eg(e){return dn(e)&&pn(e)}function tg(e){var t=fn(e)?Wt.call(e):"";return t==xm||t==_m}function rg(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Oa}function fn(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function dn(e){return!!e&&typeof e=="object"}function ng(e){return typeof e=="string"||!ka(e)&&dn(e)&&Wt.call(e)==Om}function ig(e){return typeof e=="symbol"||dn(e)&&Wt.call(e)==km}function sg(e){if(!e)return e===0?e:0;if(e=ag(e),e===xa||e===-xa){var t=e<0?-1:1;return t*Cm}return e===e?e:0}function og(e){var t=sg(e),r=t%1;return t===t?r?t-r:t:0}function ag(e){if(typeof e=="number")return e;if(ig(e))return _a;if(fn(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=fn(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace($m,"");var r=Pm.test(e);return r||Nm.test(e)?Fm(e.slice(2),r?2:8):Lm.test(e)?_a:+e}function cg(e){return pn(e)?zm(e):Vm(e)}function ug(e){return e?Wm(e,cg(e)):[]}$a.exports=Zm});var Na=p(function(XS,Pa){var lg="[object Boolean]",fg=Object.prototype,hg=fg.toString;function pg(e){return e===!0||e===!1||dg(e)&&hg.call(e)==lg}function dg(e){return!!e&&typeof e=="object"}Pa.exports=pg});var Da=p(function(YS,Ka){var qa=1/0,mg=179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,Fa=NaN,gg="[object Symbol]",yg=/^\s+|\s+$/g,Eg=/^[-+]0x[0-9a-f]+$/i,wg=/^0b[01]+$/i,Sg=/^0o[0-7]+$/i,bg=parseInt,vg=Object.prototype,Tg=vg.toString;function Ag(e){return typeof e=="number"&&e==xg(e)}function ja(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Ig(e){return!!e&&typeof e=="object"}function Cg(e){return typeof e=="symbol"||Ig(e)&&Tg.call(e)==gg}function Rg(e){if(!e)return e===0?e:0;if(e=_g(e),e===qa||e===-qa){var t=e<0?-1:1;return t*mg}return e===e?e:0}function xg(e){var t=Rg(e),r=t%1;return t===t?r?t-r:t:0}function _g(e){if(typeof e=="number")return e;if(Cg(e))return Fa;if(ja(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ja(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(yg,"");var r=wg.test(e);return r||Sg.test(e)?bg(e.slice(2),r?2:8):Eg.test(e)?Fa:+e}Ka.exports=Ag});var Ua=p(function(ZS,Ba){var Og="[object Number]",kg=Object.prototype,$g=kg.toString;function Lg(e){return!!e&&typeof e=="object"}function Pg(e){return typeof e=="number"||Lg(e)&&$g.call(e)==Og}Ba.exports=Pg});var Ma=p(function(QS,Ga){var Ng="[object Object]";function qg(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(r){}return t}function Fg(e,t){return function(r){return e(t(r))}}var jg=Function.prototype,Wa=Object.prototype,Ja=jg.toString,Kg=Wa.hasOwnProperty,Dg=Ja.call(Object),Bg=Wa.toString,Ug=Fg(Object.getPrototypeOf,Object);function Wg(e){return!!e&&typeof e=="object"}function Jg(e){if(!Wg(e)||Bg.call(e)!=Ng||qg(e))return!1;var t=Ug(e);if(t===null)return!0;var r=Kg.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Ja.call(r)==Dg}Ga.exports=Jg});var za=p(function(eb,Ha){var Gg="[object String]",Mg=Object.prototype,Hg=Mg.toString,zg=Array.isArray;function Vg(e){return!!e&&typeof e=="object"}function Xg(e){return typeof e=="string"||!zg(e)&&Vg(e)&&Hg.call(e)==Gg}Ha.exports=Xg});var Qa=p(function(tb,Za){var Yg="Expected a function",Va=1/0,Zg=179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,Xa=NaN,Qg="[object Symbol]",ey=/^\s+|\s+$/g,ty=/^[-+]0x[0-9a-f]+$/i,ry=/^0b[01]+$/i,ny=/^0o[0-7]+$/i,iy=parseInt,sy=Object.prototype,oy=sy.toString;function ay(e,t){var r;if(typeof t!="function")throw TypeError(Yg);return e=hy(e),function(){if(--e>0)r=t.apply(this,arguments);if(e<=1)t=void 0;return r}}function cy(e){return ay(2,e)}function Ya(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function uy(e){return!!e&&typeof e=="object"}function ly(e){return typeof e=="symbol"||uy(e)&&oy.call(e)==Qg}function fy(e){if(!e)return e===0?e:0;if(e=py(e),e===Va||e===-Va){var t=e<0?-1:1;return t*Zg}return e===e?e:0}function hy(e){var t=fy(e),r=t%1;return t===t?r?t-r:t:0}function py(e){if(typeof e=="number")return e;if(ly(e))return Xa;if(Ya(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Ya(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(ey,"");var r=ry.test(e);return r||ny.test(e)?iy(e.slice(2),r?2:8):ty.test(e)?Xa:+e}Za.exports=cy});var cc=p(function(rb,ac){var ec=Dr(),dy=cn(),my=an(),Gt=St(),nc=La(),Jt=Na(),tc=Da(),mn=Ua(),ic=Ma(),ie=za(),gy=Qa(),{KeyObject:yy,createSecretKey:Ey,createPrivateKey:wy}=require("crypto"),sc=["RS256","RS384","RS512","ES256","ES384","ES512","HS256","HS384","HS512","none"];if(dy)sc.splice(3,0,"PS256","PS384","PS512");var Sy={expiresIn:{isValid:function(e){return tc(e)||ie(e)&&e},message:'"expiresIn" should be a number of seconds or string representing a timespan'},notBefore:{isValid:function(e){return tc(e)||ie(e)&&e},message:'"notBefore" should be a number of seconds or string representing a timespan'},audience:{isValid:function(e){return ie(e)||Array.isArray(e)},message:'"audience" must be a string or array'},algorithm:{isValid:nc.bind(null,sc),message:'"algorithm" must be a valid string enum value'},header:{isValid:ic,message:'"header" must be an object'},encoding:{isValid:ie,message:'"encoding" must be a string'},issuer:{isValid:ie,message:'"issuer" must be a string'},subject:{isValid:ie,message:'"subject" must be a string'},jwtid:{isValid:ie,message:'"jwtid" must be a string'},noTimestamp:{isValid:Jt,message:'"noTimestamp" must be a boolean'},keyid:{isValid:ie,message:'"keyid" must be a string'},mutatePayload:{isValid:Jt,message:'"mutatePayload" must be a boolean'},allowInsecureKeySizes:{isValid:Jt,message:'"allowInsecureKeySizes" must be a boolean'},allowInvalidAsymmetricKeyTypes:{isValid:Jt,message:'"allowInvalidAsymmetricKeyTypes" must be a boolean'}},by={iat:{isValid:mn,message:'"iat" should be a number of seconds'},exp:{isValid:mn,message:'"exp" should be a number of seconds'},nbf:{isValid:mn,message:'"nbf" should be a number of seconds'}};function oc(e,t,r,n){if(!ic(r))throw Error('Expected "'+n+'" to be a plain object.');Object.keys(r).forEach(function(i){let s=e[i];if(!s){if(!t)throw Error('"'+i+'" is not allowed in "'+n+'"');return}if(!s.isValid(r[i]))throw Error(s.message)})}function vy(e){return oc(Sy,!1,e,"options")}function Ty(e){return oc(by,!0,e,"payload")}var rc={audience:"aud",issuer:"iss",subject:"sub",jwtid:"jti"},Ay=["expiresIn","notBefore","noTimestamp","audience","issuer","subject","jwtid"];ac.exports=function(e,t,r,n){if(typeof r==="function")n=r,r={};else r=r||{};let i=typeof e==="object"&&!Buffer.isBuffer(e),s=Object.assign({alg:r.algorithm||"HS256",typ:i?"JWT":void 0,kid:r.keyid},r.header);function o(a){if(n)return n(a);throw a}if(!t&&r.algorithm!=="none")return o(Error("secretOrPrivateKey must have a value"));if(t!=null&&!(t instanceof yy))try{t=wy(t)}catch(a){try{t=Ey(typeof t==="string"?Buffer.from(t):t)}catch(l){return o(Error("secretOrPrivateKey is not valid key material"))}}if(s.alg.startsWith("HS")&&t.type!=="secret")return o(Error(`secretOrPrivateKey must be a symmetric key when using ${s.alg}`));else if(/^(?:RS|PS|ES)/.test(s.alg)){if(t.type!=="private")return o(Error(`secretOrPrivateKey must be an asymmetric key when using ${s.alg}`));if(!r.allowInsecureKeySizes&&!s.alg.startsWith("ES")&&t.asymmetricKeyDetails!==void 0&&t.asymmetricKeyDetails.modulusLength<2048)return o(Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${s.alg}`))}if(typeof e>"u")return o(Error("payload is required"));else if(i){try{Ty(e)}catch(a){return o(a)}if(!r.mutatePayload)e=Object.assign({},e)}else{let a=Ay.filter(function(l){return typeof r[l]<"u"});if(a.length>0)return o(Error("invalid "+a.join(",")+" option for "+typeof e+" payload"))}if(typeof e.exp<"u"&&typeof r.expiresIn<"u")return o(Error('Bad "options.expiresIn" option the payload already has an "exp" property.'));if(typeof e.nbf<"u"&&typeof r.notBefore<"u")return o(Error('Bad "options.notBefore" option the payload already has an "nbf" property.'));try{vy(r)}catch(a){return o(a)}if(!r.allowInvalidAsymmetricKeyTypes)try{my(s.alg,t)}catch(a){return o(a)}let c=e.iat||Math.floor(Date.now()/1000);if(r.noTimestamp)delete e.iat;else if(i)e.iat=c;if(typeof r.notBefore<"u"){try{e.nbf=ec(r.notBefore,c)}catch(a){return o(a)}if(typeof e.nbf>"u")return o(Error('"notBefore" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}if(typeof r.expiresIn<"u"&&typeof e==="object"){try{e.exp=ec(r.expiresIn,c)}catch(a){return o(a)}if(typeof e.exp>"u")return o(Error('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}Object.keys(rc).forEach(function(a){let l=rc[a];if(typeof r[a]<"u"){if(typeof e[l]<"u")return o(Error('Bad "options.'+a+'" option. The payload already has an "'+l+'" property.'));e[l]=r[a]}});let u=r.encoding||"utf8";if(typeof n==="function")n=n&&gy(n),Gt.createSign({header:s,privateKey:t,payload:e,encoding:u}).once("error",n).once("done",function(a){if(!r.allowInsecureKeySizes&&/^(?:RS|PS)/.test(s.alg)&&a.length<256)return n(Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${s.alg}`));n(null,a)});else{let a=Gt.sign({header:s,payload:e,secret:t,encoding:u});if(!r.allowInsecureKeySizes&&/^(?:RS|PS)/.test(s.alg)&&a.length<256)throw Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${s.alg}`);return a}}});var lc=p(function(nb,uc){uc.exports={decode:qr(),verify:Ra(),sign:cc(),JsonWebTokenError:Me(),NotBeforeError:Fr(),TokenExpiredError:jr()}});var gn=p(function(ib,fc){function Iy(e){r.debug=r,r.default=r,r.coerce=u,r.disable=o,r.enable=i,r.enabled=c,r.humanize=Kr(),r.destroy=a,Object.keys(e).forEach((l)=>{r[l]=e[l]}),r.names=[],r.skips=[],r.formatters={};function t(l){let f=0;for(let m=0;m<l.length;m++)f=(f<<5)-f+l.charCodeAt(m),f|=0;return r.colors[Math.abs(f)%r.colors.length]}r.selectColor=t;function r(l){let f,m=null,h,g;function d(...b){if(!d.enabled)return;let w=d,S=Number(new Date),A=S-(f||S);if(w.diff=A,w.prev=f,w.curr=S,f=S,b[0]=r.coerce(b[0]),typeof b[0]!=="string")b.unshift("%O");let T=0;b[0]=b[0].replace(/%([a-zA-Z%])/g,(K,G)=>{if(K==="%%")return"%";T++;let z=r.formatters[G];if(typeof z==="function"){let V=b[T];K=z.call(w,V),b.splice(T,1),T--}return K}),r.formatArgs.call(w,b),(w.log||r.log).apply(w,b)}if(d.namespace=l,d.useColors=r.useColors(),d.color=r.selectColor(l),d.extend=n,d.destroy=r.destroy,Object.defineProperty(d,"enabled",{enumerable:!0,configurable:!1,get:()=>{if(m!==null)return m;if(h!==r.namespaces)h=r.namespaces,g=r.enabled(l);return g},set:(b)=>{m=b}}),typeof r.init==="function")r.init(d);return d}function n(l,f){let m=r(this.namespace+(typeof f>"u"?":":f)+l);return m.log=this.log,m}function i(l){r.save(l),r.namespaces=l,r.names=[],r.skips=[];let f=(typeof l==="string"?l:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let m of f)if(m[0]==="-")r.skips.push(m.slice(1));else r.names.push(m)}function s(l,f){let m=0,h=0,g=-1,d=0;while(m<l.length)if(h<f.length&&(f[h]===l[m]||f[h]==="*"))if(f[h]==="*")g=h,d=m,h++;else m++,h++;else if(g!==-1)h=g+1,d++,m=d;else return!1;while(h<f.length&&f[h]==="*")h++;return h===f.length}function o(){let l=[...r.names,...r.skips.map((f)=>"-"+f)].join(",");return r.enable(""),l}function c(l){for(let f of r.skips)if(s(l,f))return!1;for(let f of r.names)if(s(l,f))return!0;return!1}function u(l){if(l instanceof Error)return l.stack||l.message;return l}function a(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}fc.exports=Iy});var hc=p(function(j,Mt){j.formatArgs=Ry;j.save=xy;j.load=_y;j.useColors=Cy;j.storage=Oy();j.destroy=(()=>{let e=!1;return()=>{if(!e)e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}})();j.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Cy(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Ry(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+Mt.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,(i)=>{if(i==="%%")return;if(r++,i==="%c")n=r}),e.splice(n,0,t)}j.log=console.debug||console.log||(()=>{});function xy(e){try{if(e)j.storage.setItem("debug",e);else j.storage.removeItem("debug")}catch(t){}}function _y(){let e;try{e=j.storage.getItem("debug")||j.storage.getItem("DEBUG")}catch(t){}if(!e&&typeof process<"u"&&"env"in process)e=process.env.DEBUG;return e}function Oy(){try{return localStorage}catch(e){}}Mt.exports=gn()(j);var{formatters:ky}=Mt.exports;ky.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var dc=p(function(sb,pc){pc.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),i=t.indexOf("--");return n!==-1&&(i===-1||n<i)}});var yc=p(function(ob,gc){var mc=require("os"),Ht=require("tty"),W=dc(),{env:k}=process,se;if(W("no-color")||W("no-colors")||W("color=false")||W("color=never"))se=0;else if(W("color")||W("colors")||W("color=true")||W("color=always"))se=1;if("FORCE_COLOR"in k)if(k.FORCE_COLOR==="true")se=1;else if(k.FORCE_COLOR==="false")se=0;else se=k.FORCE_COLOR.length===0?1:Math.min(parseInt(k.FORCE_COLOR,10),3);function yn(e){if(e===0)return!1;return{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function En(e,t){if(se===0)return 0;if(W("color=16m")||W("color=full")||W("color=truecolor"))return 3;if(W("color=256"))return 2;if(e&&!t&&se===void 0)return 0;let r=se||0;if(k.TERM==="dumb")return r;if(process.platform==="win32"){let n=mc.release().split(".");if(Number(n[0])>=10&&Number(n[2])>=10586)return Number(n[2])>=14931?3:2;return 1}if("CI"in k){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((n)=>(n in k))||k.CI_NAME==="codeship")return 1;return r}if("TEAMCITY_VERSION"in k)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(k.TEAMCITY_VERSION)?1:0;if(k.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in k){let n=parseInt((k.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(k.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(k.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(k.TERM))return 1;if("COLORTERM"in k)return 1;return r}function $y(e){let t=En(e,e&&e.isTTY);return yn(t)}gc.exports={supportsColor:$y,stdout:yn(En(!0,Ht.isatty(1))),stderr:yn(En(!0,Ht.isatty(2)))}});var Sc=p(function(L,zt){var Ec=require("tty"),oe=require("util");L.init=Ky;L.log=qy;L.formatArgs=Py;L.save=Fy;L.load=jy;L.useColors=Ly;L.destroy=oe.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");L.colors=[6,2,3,4,5,1];try{let e=yc();if(e&&(e.stderr||e).level>=2)L.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}catch(e){}L.inspectOpts=Object.keys(process.env).filter((e)=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(i,s)=>s.toUpperCase()),n=process.env[t];if(/^(yes|on|true|enabled)$/i.test(n))n=!0;else if(/^(no|off|false|disabled)$/i.test(n))n=!1;else if(n==="null")n=null;else n=Number(n);return e[r]=n,e},{});function Ly(){return"colors"in L.inspectOpts?Boolean(L.inspectOpts.colors):Ec.isatty(process.stderr.fd)}function Py(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,i="\x1B[3"+(n<8?n:"8;5;"+n),s=` ${i};1m${t} \x1B[0m`;e[0]=s+e[0].split(`
4
5
  `).join(`
5
- `+s),e.push(i+"m+"+Ht.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=ly()+t+" "+e[0]}function ly(){if(L.inspectOpts.hideDate)return"";return new Date().toISOString()+" "}function fy(...e){return process.stderr.write(oe.formatWithOptions(L.inspectOpts,...e)+`
6
- `)}function hy(e){if(e)process.env.DEBUG=e;else delete process.env.DEBUG}function py(){return process.env.DEBUG}function dy(e){e.inspectOpts={};let t=Object.keys(L.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=L.inspectOpts[t[r]]}Ht.exports=ln()(L);var{formatters:tc}=Ht.exports;tc.o=function(e){return this.inspectOpts.colors=this.useColors,oe.inspect(e,this.inspectOpts).split(`
7
- `).map((t)=>t.trim()).join(" ")};tc.O=function(e){return this.inspectOpts.colors=this.useColors,oe.inspect(e,this.inspectOpts)}});var zt=p(function(NS,pn){if(typeof process>"u"||process.type==="renderer"||!1||process.__nwjs)pn.exports=za();else pn.exports=rc()});function dn(e,t=!1){if(Uint8Array.prototype.toBase64)return e.toBase64({alphabet:t?"base64url":"base64",omitPadding:t});let r=32768,n=[];for(let s=0;s<e.length;s+=r)n.push(String.fromCharCode.apply(null,e.subarray(s,s+r)));let i=btoa(n.join(""));return t?i.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"):i}function mn(e,t=!1){if(Uint8Array.fromBase64)return Uint8Array.fromBase64(e,{alphabet:t?"base64url":"base64"});if(t){if(e.includes("+")||e.includes("/"))throw TypeError("Invalid base64url");e=e.replace(/-/g,"+").replace(/_/g,"/")}let r=atob(e),n=new Uint8Array(r.length);for(let i=0;i<r.length;i++)n[i]=r.charCodeAt(i);return n}var nc,Vt;var Qe=q(()=>{nc=new TextDecoder,Vt=new TextDecoder("utf-8",{fatal:!0})});var gn,Z,Q;var Oe=q(()=>{gn=class gn extends Error{static code="ERR_JOSE_GENERIC";code="ERR_JOSE_GENERIC";constructor(e,t){super(e,t),this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}};Z=class Z extends gn{static code="ERR_JOSE_NOT_SUPPORTED";code="ERR_JOSE_NOT_SUPPORTED"};Q=class Q extends gn{static code="ERR_JWT_INVALID";code="ERR_JWT_INVALID"}});function xe(e){try{return mn(typeof e=="string"?e:nc.decode(e),!0)}catch(t){throw TypeError(my,{cause:t})}}var my="The input to be decoded is not correctly encoded.";var Xt=q(()=>{Qe()});function et(e){if(typeof e!="object"||e===null||Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}function ic(e,t,r){let n;try{n=JSON.parse(Vt.decode(xe(e)))}catch(i){throw new t(r,{cause:i})}if(!et(n))throw new t(r);return n}var Yt=q(()=>{Xt();Qe()});function gy(e,t,...r){if(r.length>2){let n=r.pop();e+=`one of type ${r.join(", ")}, or ${n}.`}else r.length===2?e+=`one of type ${r[0]} or ${r[1]}.`:e+=`of type ${r[0]}.`;return t==null?e+=` Received ${t}`:typeof t=="function"&&t.name?e+=` Received function ${t.name}`:typeof t=="object"&&t!=null&&t.constructor?.name&&(e+=` Received an instance of ${t.constructor.name}`),e}function yy(e){return{__proto__:null,...e}}function cc(e){let t=yy(e);if(t.ext!==void 0&&typeof t.ext!="boolean")throw TypeError('"ext" (Extractable) Parameter must be a boolean');if(t.key_ops!==void 0){let r=t.key_ops,n=Array.isArray(r)?[...r]:void 0;if(!n||n.some((i)=>typeof i!="string")||new Set(n).size!==n.length)throw TypeError('"key_ops" (Key Operations) Parameter must be an array of unique strings');t.key_ops=n}return t}function yn(e){if(e!==void 0&&typeof e!="boolean")throw TypeError('"extractable" option must be a boolean');return e}async function En(e,t,r){if(!e.kty.includes(t.kty))throw new Z('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');let n=e.resolve?.({kty:t.kty,crv:t.crv})??e.subtle,i=!!(t.d||t.priv),s={...t,ext:r??t.ext};return s.kty!=="AKP"&&delete s.alg,delete s.use,crypto.subtle.importKey("jwk",s,n,s.ext??!i,t.key_ops??e.usages[i?1:0])}var sc=(e)=>{if(e?.[Symbol.toStringTag]==="CryptoKey")return!0;try{return e instanceof CryptoKey}catch{return!1}},oc=(e)=>e?.[Symbol.toStringTag]==="KeyObject",ac=(e,...t)=>gy("Key must be ",e,...t);var wn=q(()=>{Oe()});function tt(e){let t={__proto__:null};for(let r in e)t[r]={...e[r],alg:r};return t}var Sn=()=>{};function Zt(e){return{kty:["RSA"],mode:"key-encryption",subtle:{name:"RSA-OAEP",hash:`SHA-${e}`},usages:Ey,ops:["wrapKey","unwrapKey"]}}function Qt(e){return{kty:["EC","OKP"],mode:e,subtle:{name:"ECDH"},resolve:({kty:t,crv:r,asymmetricKeyType:n})=>{if(r==="X25519"||n==="x25519")return{name:"X25519"};if(t==="OKP")throw new Z('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');return{name:"ECDH",namedCurve:r}},usages:wy,ops:[void 0,"deriveBits"]}}function ke(e,t=!1){return{kty:["oct"],mode:"key-wrapping",secret:!0,subtle:{name:t?"AES-GCM":"AES-KW",length:e},usages:er,ops:t?["encrypt","decrypt"]:["wrapKey","unwrapKey"]}}function bn(){return{kty:["oct"],mode:"key-wrapping",secret:!0,subtle:{name:"PBKDF2"},usages:er,ops:["deriveBits","deriveBits"]}}function $e(e,t=!1){return{kty:["oct"],secret:!0,subtle:{name:t?"AES-CBC":"AES-GCM",length:e},usages:er,ops:Sy,cekBits:e,ivBits:t?128:96,cbc:t}}var Ey,wy,er,uc,Sy,XS;var lc=q(()=>{Oe();Sn();Ey=[["encrypt","wrapKey"],["decrypt","unwrapKey"]],wy=[[],["deriveBits"]],er=[[],[]];uc=tt({dir:{kty:["oct"],mode:"direct-encryption",secret:!0,subtle:{name:"AES-GCM"},usages:er,ops:["encrypt","decrypt"]},"RSA-OAEP":Zt(1),"RSA-OAEP-256":Zt(256),"RSA-OAEP-384":Zt(384),"RSA-OAEP-512":Zt(512),"ECDH-ES":Qt("direct-key-agreement"),"ECDH-ES+A128KW":Qt("key-agreement-with-key-wrapping"),"ECDH-ES+A192KW":Qt("key-agreement-with-key-wrapping"),"ECDH-ES+A256KW":Qt("key-agreement-with-key-wrapping"),A128KW:ke(128),A192KW:ke(192),A256KW:ke(256),A128GCMKW:ke(128,!0),A192GCMKW:ke(192,!0),A256GCMKW:ke(256,!0),"PBES2-HS256+A128KW":bn(),"PBES2-HS384+A192KW":bn(),"PBES2-HS512+A256KW":bn()}),Sy=["encrypt","decrypt"];XS=tt({A128GCM:$e(128),A192GCM:$e(192),A256GCM:$e(256),"A128CBC-HS256":$e(256,!0),"A192CBC-HS384":$e(384,!0),"A256CBC-HS512":$e(512,!0)})});function vn(e){let t={name:"HMAC",hash:`SHA-${e}`};return{kty:["oct"],secret:!0,subtle:t,signing:t,usages:rt}}function Le(e,t){let r={name:t?"RSA-PSS":"RSASSA-PKCS1-v1_5",hash:`SHA-${e}`};return{kty:["RSA"],subtle:r,signing:t?{...r,saltLength:t}:r,usages:rt,minRsaBits:2048}}function Tn(e,t){return{kty:["EC"],crv:e,subtle:{name:"ECDSA",namedCurve:e},signing:{name:"ECDSA",hash:`SHA-${t}`},usages:rt}}function fc(){let e={name:"Ed25519"};return{kty:["OKP"],crv:"Ed25519",subtle:e,signing:e,usages:rt}}function An(e){let t={name:`ML-DSA-${e}`};return{kty:["AKP"],subtle:t,signing:t,usages:rt}}var rt,hc;var pc=q(()=>{Sn();rt=[["verify"],["sign"]];hc=tt({HS256:vn(256),HS384:vn(384),HS512:vn(512),RS256:Le(256),RS384:Le(384),RS512:Le(512),PS256:Le(256,32),PS384:Le(384,48),PS512:Le(512,64),ES256:Tn("P-256",256),ES384:Tn("P-384",384),ES512:Tn("P-521",512),EdDSA:fc(),Ed25519:fc(),"ML-DSA-44":An(44),"ML-DSA-65":An(65),"ML-DSA-87":An(87)})});function by(e='JWK "alg" (Algorithm) Parameter'){throw new Z(`Invalid or unsupported ${e} value`)}function Rn(e,t){return(typeof e=="string"?hc[e]??uc[e]:void 0)??by(t)}var dc=q(()=>{Oe();pc();lc()});var vy=(e,t)=>{let r=(e.match(/.{1,64}/g)||[]).join(`
6
+ `+s),e.push(i+"m+"+zt.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=Ny()+t+" "+e[0]}function Ny(){if(L.inspectOpts.hideDate)return"";return new Date().toISOString()+" "}function qy(...e){return process.stderr.write(oe.formatWithOptions(L.inspectOpts,...e)+`
7
+ `)}function Fy(e){if(e)process.env.DEBUG=e;else delete process.env.DEBUG}function jy(){return process.env.DEBUG}function Ky(e){e.inspectOpts={};let t=Object.keys(L.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=L.inspectOpts[t[r]]}zt.exports=gn()(L);var{formatters:wc}=zt.exports;wc.o=function(e){return this.inspectOpts.colors=this.useColors,oe.inspect(e,this.inspectOpts).split(`
8
+ `).map((t)=>t.trim()).join(" ")};wc.O=function(e){return this.inspectOpts.colors=this.useColors,oe.inspect(e,this.inspectOpts)}});var Vt=p(function(ab,wn){if(typeof process>"u"||process.type==="renderer"||!1||process.__nwjs)wn.exports=hc();else wn.exports=Sc()});function Sn(e,t=!1){if(Uint8Array.prototype.toBase64)return e.toBase64({alphabet:t?"base64url":"base64",omitPadding:t});let r=32768,n=[];for(let s=0;s<e.length;s+=r)n.push(String.fromCharCode.apply(null,e.subarray(s,s+r)));let i=btoa(n.join(""));return t?i.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"):i}function bn(e,t=!1){if(Uint8Array.fromBase64)return Uint8Array.fromBase64(e,{alphabet:t?"base64url":"base64"});if(t){if(e.includes("+")||e.includes("/"))throw TypeError("Invalid base64url");e=e.replace(/-/g,"+").replace(/_/g,"/")}let r=atob(e),n=new Uint8Array(r.length);for(let i=0;i<r.length;i++)n[i]=r.charCodeAt(i);return n}var bc,Xt;var et=q(()=>{bc=new TextDecoder,Xt=new TextDecoder("utf-8",{fatal:!0})});var vn,Z,Q;var _e=q(()=>{vn=class vn extends Error{static code="ERR_JOSE_GENERIC";code="ERR_JOSE_GENERIC";constructor(e,t){super(e,t),this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}};Z=class Z extends vn{static code="ERR_JOSE_NOT_SUPPORTED";code="ERR_JOSE_NOT_SUPPORTED"};Q=class Q extends vn{static code="ERR_JWT_INVALID";code="ERR_JWT_INVALID"}});function Oe(e){try{return bn(typeof e=="string"?e:bc.decode(e),!0)}catch(t){throw TypeError(Dy,{cause:t})}}var Dy="The input to be decoded is not correctly encoded.";var Yt=q(()=>{et()});function tt(e){if(typeof e!="object"||e===null||Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}function vc(e,t,r){let n;try{n=JSON.parse(Xt.decode(Oe(e)))}catch(i){throw new t(r,{cause:i})}if(!tt(n))throw new t(r);return n}var Zt=q(()=>{Yt();et()});function By(e,t,...r){if(r.length>2){let n=r.pop();e+=`one of type ${r.join(", ")}, or ${n}.`}else r.length===2?e+=`one of type ${r[0]} or ${r[1]}.`:e+=`of type ${r[0]}.`;return t==null?e+=` Received ${t}`:typeof t=="function"&&t.name?e+=` Received function ${t.name}`:typeof t=="object"&&t!=null&&t.constructor?.name&&(e+=` Received an instance of ${t.constructor.name}`),e}function Uy(e){return{__proto__:null,...e}}function Cc(e){let t=Uy(e);if(t.ext!==void 0&&typeof t.ext!="boolean")throw TypeError('"ext" (Extractable) Parameter must be a boolean');if(t.key_ops!==void 0){let r=t.key_ops,n=Array.isArray(r)?[...r]:void 0;if(!n||n.some((i)=>typeof i!="string")||new Set(n).size!==n.length)throw TypeError('"key_ops" (Key Operations) Parameter must be an array of unique strings');t.key_ops=n}return t}function Tn(e){if(e!==void 0&&typeof e!="boolean")throw TypeError('"extractable" option must be a boolean');return e}async function An(e,t,r){if(!e.kty.includes(t.kty))throw new Z('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');let n=e.resolve?.({kty:t.kty,crv:t.crv})??e.subtle,i=!!(t.d||t.priv),s={...t,ext:r??t.ext};return s.kty!=="AKP"&&delete s.alg,delete s.use,crypto.subtle.importKey("jwk",s,n,s.ext??!i,t.key_ops??e.usages[i?1:0])}var Tc=(e)=>{if(e?.[Symbol.toStringTag]==="CryptoKey")return!0;try{return e instanceof CryptoKey}catch{return!1}},Ac=(e)=>e?.[Symbol.toStringTag]==="KeyObject",Ic=(e,...t)=>By("Key must be ",e,...t);var In=q(()=>{_e()});function rt(e){let t={__proto__:null};for(let r in e)t[r]={...e[r],alg:r};return t}var Cn=()=>{};function Qt(e){return{kty:["RSA"],mode:"key-encryption",subtle:{name:"RSA-OAEP",hash:`SHA-${e}`},usages:Wy,ops:["wrapKey","unwrapKey"]}}function er(e){return{kty:["EC","OKP"],mode:e,subtle:{name:"ECDH"},resolve:({kty:t,crv:r,asymmetricKeyType:n})=>{if(r==="X25519"||n==="x25519")return{name:"X25519"};if(t==="OKP")throw new Z('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');return{name:"ECDH",namedCurve:r}},usages:Jy,ops:[void 0,"deriveBits"]}}function ke(e,t=!1){return{kty:["oct"],mode:"key-wrapping",secret:!0,subtle:{name:t?"AES-GCM":"AES-KW",length:e},usages:tr,ops:t?["encrypt","decrypt"]:["wrapKey","unwrapKey"]}}function Rn(){return{kty:["oct"],mode:"key-wrapping",secret:!0,subtle:{name:"PBKDF2"},usages:tr,ops:["deriveBits","deriveBits"]}}function $e(e,t=!1){return{kty:["oct"],secret:!0,subtle:{name:t?"AES-CBC":"AES-GCM",length:e},usages:tr,ops:Gy,cekBits:e,ivBits:t?128:96,cbc:t}}var Wy,Jy,tr,Rc,Gy,vb;var xc=q(()=>{_e();Cn();Wy=[["encrypt","wrapKey"],["decrypt","unwrapKey"]],Jy=[[],["deriveBits"]],tr=[[],[]];Rc=rt({dir:{kty:["oct"],mode:"direct-encryption",secret:!0,subtle:{name:"AES-GCM"},usages:tr,ops:["encrypt","decrypt"]},"RSA-OAEP":Qt(1),"RSA-OAEP-256":Qt(256),"RSA-OAEP-384":Qt(384),"RSA-OAEP-512":Qt(512),"ECDH-ES":er("direct-key-agreement"),"ECDH-ES+A128KW":er("key-agreement-with-key-wrapping"),"ECDH-ES+A192KW":er("key-agreement-with-key-wrapping"),"ECDH-ES+A256KW":er("key-agreement-with-key-wrapping"),A128KW:ke(128),A192KW:ke(192),A256KW:ke(256),A128GCMKW:ke(128,!0),A192GCMKW:ke(192,!0),A256GCMKW:ke(256,!0),"PBES2-HS256+A128KW":Rn(),"PBES2-HS384+A192KW":Rn(),"PBES2-HS512+A256KW":Rn()}),Gy=["encrypt","decrypt"];vb=rt({A128GCM:$e(128),A192GCM:$e(192),A256GCM:$e(256),"A128CBC-HS256":$e(256,!0),"A192CBC-HS384":$e(384,!0),"A256CBC-HS512":$e(512,!0)})});function xn(e){let t={name:"HMAC",hash:`SHA-${e}`};return{kty:["oct"],secret:!0,subtle:t,signing:t,usages:nt}}function Le(e,t){let r={name:t?"RSA-PSS":"RSASSA-PKCS1-v1_5",hash:`SHA-${e}`};return{kty:["RSA"],subtle:r,signing:t?{...r,saltLength:t}:r,usages:nt,minRsaBits:2048}}function _n(e,t){return{kty:["EC"],crv:e,subtle:{name:"ECDSA",namedCurve:e},signing:{name:"ECDSA",hash:`SHA-${t}`},usages:nt}}function _c(){let e={name:"Ed25519"};return{kty:["OKP"],crv:"Ed25519",subtle:e,signing:e,usages:nt}}function On(e){let t={name:`ML-DSA-${e}`};return{kty:["AKP"],subtle:t,signing:t,usages:nt}}var nt,Oc;var kc=q(()=>{Cn();nt=[["verify"],["sign"]];Oc=rt({HS256:xn(256),HS384:xn(384),HS512:xn(512),RS256:Le(256),RS384:Le(384),RS512:Le(512),PS256:Le(256,32),PS384:Le(384,48),PS512:Le(512,64),ES256:_n("P-256",256),ES384:_n("P-384",384),ES512:_n("P-521",512),EdDSA:_c(),Ed25519:_c(),"ML-DSA-44":On(44),"ML-DSA-65":On(65),"ML-DSA-87":On(87)})});function My(e='JWK "alg" (Algorithm) Parameter'){throw new Z(`Invalid or unsupported ${e} value`)}function kn(e,t){return(typeof e=="string"?Oc[e]??Rc[e]:void 0)??My(t)}var $c=q(()=>{_e();kc();xc()});var Hy=(e,t)=>{let r=(e.match(/.{1,64}/g)||[]).join(`
8
9
  `);return`-----BEGIN ${t}-----
9
10
  ${r}
10
- -----END ${t}-----`},Ty=async(e,t,r)=>{if(oc(r)){if(r.type!==e)throw TypeError(`key is not a ${e} key`);return r.export({format:"pem",type:t})}if(!sc(r))throw TypeError(ac(r,"CryptoKey","KeyObject"));if(!r.extractable)throw TypeError("CryptoKey is not extractable");if(r.type!==e)throw TypeError(`key is not a ${e} key`);return vy(dn(new Uint8Array(await crypto.subtle.exportKey(t,r))),`${e.toUpperCase()} KEY`)},mc=(e)=>Ty("public","spki",e);var gc=q(()=>{wn();Qe()});function yc(e){return mc(e)}var Ec=q(()=>{gc()});async function wc(e,t,r){if(!et(e))throw TypeError("JWK must be an object");let n=cc(e),i=yn(r?.extractable),{alg:s}=n;if(t??=s,n.kty!=="oct"&&!t)throw TypeError('"alg" argument is required when "jwk.alg" is not present');switch(n.kty){case"oct":if(typeof n.k!="string")throw TypeError('missing "k" (Key Value) Parameter value');return xe(n.k);case"AKP":{if(typeof s!="string"||!s)throw TypeError('missing "alg" (Algorithm) Parameter value');if(t!==s)throw TypeError("JWK alg and alg option value mismatch");return En(Rn(t),n,i)}case"RSA":case"EC":case"OKP":return En(Rn(t),n,i);default:throw new Z('Unsupported "kty" (Key Type) Parameter value')}}var Sc=q(()=>{Xt();wn();dc();Oe();Yt()});function bc(e){let t;if(typeof e=="string"){let n=e.split(".");(n.length===3||n.length===5)&&([t]=n)}else if(typeof e=="object"&&e)if("protected"in e)t=e.protected;else throw TypeError("Token does not contain a Protected Header");let r="Invalid Token or Protected Header formatting";if(typeof t!="string"||!t)throw TypeError(r);return ic(t,TypeError,r)}var vc=q(()=>{Yt()});function Tc(e){if(typeof e!="string")throw new Q("JWTs must use Compact JWS serialization, JWT must be a string");let{1:t,length:r}=e.split(".");if(r===5)throw new Q("Only JWTs using Compact JWS serialization can be decoded");if(r!==3)throw new Q("Invalid JWT");if(!t)throw new Q("JWTs must contain a payload");let n;try{n=xe(t)}catch(s){throw new Q("Failed to base64url decode the payload",{cause:s})}let i;try{i=JSON.parse(Vt.decode(n))}catch(s){throw new Q("Failed to parse the decoded payload as JSON",{cause:s})}if(!et(i))throw new Q("Invalid JWT Claims Set");return i}var Ac=q(()=>{Xt();Qe();Yt();Oe()});var Cn=q(()=>{Ec();Sc();vc();Ac()});var rr=p(function(Lb,Rc){function tr(e){Error.call(this,e),Error.captureStackTrace(this,this.constructor),this.name="JwksError",this.message=e}tr.prototype=Object.create(Error.prototype);tr.prototype.constructor=tr;Rc.exports=tr});var In=p(function(Pb,Ic){var Cc=(Cn(),{}),Ay=rr();function Ry(e){if(e.alg)return e.alg;if(e.kty==="RSA")return"RS256";if(e.kty==="EC")switch(e.crv){case"P-256":return"ES256";case"P-384":return"ES384";case"P-521":return"ES512"}if(e.kty==="OKP")switch(e.crv){case"Ed25519":case"Ed448":return"EdDSA"}throw new Ay("Unsupported JWK")}async function Cy(e){let t=[];e=e.filter(({use:r})=>r==="sig"||r===void 0).filter(({kty:r})=>r==="RSA"||r==="EC"||r==="OKP");for(let r of e)try{let n=await wc({...r,ext:!0},Ry(r));if(n.type!=="public")continue;let i;switch(n[Symbol.toStringTag]){case"CryptoKey":{let s=await yc(n);i=()=>s;break}case"KeyObject":default:i=()=>n.export({format:"pem",type:"spki"})}t.push({get publicKey(){return i()},get rsaPublicKey(){return i()},getPublicKey(){return i()},...typeof r.kid==="string"&&r.kid?{kid:r.kid}:void 0,...typeof r.alg==="string"&&r.alg?{alg:r.alg}:void 0})}catch(n){continue}return t}Ic.exports={retrieveSigningKeys:Cy}});var _n=p(function(Nb,_c){function nr(e){Error.call(this,e),Error.captureStackTrace(this,this.constructor),this.name="ArgumentError",this.message=e}nr.prototype=Object.create(Error.prototype);nr.prototype.constructor=nr;_c.exports=nr});var xc=p(function(qb,Oc){var Iy=require("http"),_y=require("https"),Oy=_n();Oc.exports.default=(e)=>{if(e.fetcher)return e.fetcher(e.uri);return new Promise((t,r)=>{let n;try{n=new URL(e.uri)}catch(h){throw new Oy("Invalid JWKS URI: The provided URI is not a valid URL.")}let{hostname:i,port:s,protocol:o,pathname:c,search:u}=n,a=c+u,l={hostname:i,path:a,port:s,method:"GET",...e.headers&&{headers:{...e.headers}},...e.timeout&&{timeout:e.timeout},...e.agent&&{agent:e.agent}},m=(o==="https:"?_y:Iy).request(l,(h)=>{let g="";h.setEncoding("utf8"),h.on("data",(d)=>{g+=d}),h.on("end",()=>{if(h.statusCode<200||h.statusCode>=300){let d=h.body&&(h.body.message||h.body)||h.statusMessage||`Http Error ${h.statusCode}`;r({errorMsg:d})}else try{t(g&&JSON.parse(g))}catch(d){r(d)}})});m.on("timeout",()=>m.destroy()).on("error",(h)=>r(h)).end()})}});var or=p(function(sr){var $c=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),xy=$c((e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.tracing=e.metrics=void 0;var t=require("node:diagnostics_channel");e.metrics=(0,t.channel)("lru-cache:metrics"),e.tracing=(0,t.tracingChannel)("lru-cache")}),ky=$c((e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.defaultPerf=void 0,e.defaultPerf=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date});Object.defineProperty(sr,"__esModule",{value:!0});sr.LRUCache=void 0;var O=xy(),$y=ky(),On=()=>O.metrics.hasSubscribers||O.tracing.hasSubscribers,Lc=new Set,kc=typeof process=="object"&&process?process:{},Ly=(e,t,r,n)=>{typeof kc.emitWarning=="function"?kc.emitWarning(e,t,r,n):console.error(`[${r}] ${t}: ${e}`)},Py=(e)=>!Lc.has(e),ae=(e)=>!!e&&e===Math.floor(e)&&e>0&&isFinite(e),Pc=(e)=>ae(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?ir:null:null,ir=class extends Array{constructor(e){super(e),this.fill(0)}},Ny=class e{heap;length;static#a=!1;static create(t){let r=Pc(t);if(!r)return[];e.#a=!0;let n=new e(t,r);return e.#a=!1,n}constructor(t,r){if(!e.#a)throw TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},qy=class e{#a;#f;#g;#O;#y;#N;#q;#E;get perf(){return this.#E}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;backgroundFetchSize;#i;#w;#n;#r;#e;#u;#h;#c;#s;#S;#o;#b;#v;#p;#d;#T;#F;#l;#x;static unsafeExposeInternals(t){return{starts:t.#v,ttls:t.#p,autopurgeTimers:t.#d,sizes:t.#b,keyMap:t.#n,keyList:t.#r,valList:t.#e,next:t.#u,prev:t.#h,get head(){return t.#c},get tail(){return t.#s},free:t.#S,isBackgroundFetch:(r)=>t.#t(r),backgroundFetch:(r,n,i,s)=>t.#D(r,n,i,s),moveToTail:(r)=>t.#P(r),indexes:(r)=>t.#A(r),rindexes:(r)=>t.#R(r),isStale:(r)=>t.#m(r)}}get max(){return this.#a}get maxSize(){return this.#f}get calculatedSize(){return this.#w}get size(){return this.#i}get fetchMethod(){return this.#N}get memoMethod(){return this.#q}get dispose(){return this.#g}get onInsert(){return this.#O}get disposeAfter(){return this.#y}constructor(t){let{max:r=0,ttl:n,ttlResolution:i=1,ttlAutopurge:s,updateAgeOnGet:o,updateAgeOnHas:c,allowStale:u,dispose:a,onInsert:l,disposeAfter:f,noDisposeOnSet:m,noUpdateTTL:h,maxSize:g=0,maxEntrySize:d=0,sizeCalculation:b,fetchMethod:w,memoMethod:S,noDeleteOnFetchRejection:A,noDeleteOnStaleGet:T,allowStaleOnFetchRejection:I,allowStaleOnFetchAbort:K,ignoreFetchAbort:W,backgroundFetchSize:z=1,perf:V}=t;if(this.backgroundFetchSize=z,V!==void 0&&typeof V?.now!="function")throw TypeError("perf option must have a now() method if specified");if(this.#E=V??$y.defaultPerf,r!==0&&!ae(r))throw TypeError("max option must be a nonnegative integer");let le=r?Pc(r):Array;if(!le)throw Error("invalid max value: "+r);if(this.#a=r,this.#f=g,this.maxEntrySize=d||this.#f,this.sizeCalculation=b,this.sizeCalculation){if(!this.#f&&!this.maxEntrySize)throw TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw TypeError("sizeCalculation set to non-function")}if(S!==void 0&&typeof S!="function")throw TypeError("memoMethod must be a function if defined");if(this.#q=S,w!==void 0&&typeof w!="function")throw TypeError("fetchMethod must be a function if specified");if(this.#N=w,this.#F=!!w,this.#n=new Map,this.#r=Array.from({length:r}).fill(void 0),this.#e=Array.from({length:r}).fill(void 0),this.#u=new le(r),this.#h=new le(r),this.#c=0,this.#s=0,this.#S=Ny.create(r),this.#i=0,this.#w=0,typeof a=="function"&&(this.#g=a),typeof l=="function"&&(this.#O=l),typeof f=="function"?(this.#y=f,this.#o=[]):(this.#y=void 0,this.#o=void 0),this.#T=!!this.#g,this.#x=!!this.#O,this.#l=!!this.#y,this.noDisposeOnSet=!!m,this.noUpdateTTL=!!h,this.noDeleteOnFetchRejection=!!A,this.allowStaleOnFetchRejection=!!I,this.allowStaleOnFetchAbort=!!K,this.ignoreFetchAbort=!!W,this.maxEntrySize!==0){if(this.#f!==0&&!ae(this.#f))throw TypeError("maxSize must be a positive integer if specified");if(!ae(this.maxEntrySize))throw TypeError("maxEntrySize must be a positive integer if specified");this.#z()}if(this.allowStale=!!u,this.noDeleteOnStaleGet=!!T,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!c,this.ttlResolution=ae(i)||i===0?i:1,this.ttlAutopurge=!!s,this.ttl=n||0,this.ttl){if(!ae(this.ttl))throw TypeError("ttl must be a positive integer if specified");this.#B()}if(this.#a===0&&this.ttl===0&&this.#f===0)throw TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#a&&!this.#f){let at="LRU_CACHE_UNBOUNDED";Py(at)&&(Lc.add(at),Ly("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",at,e))}}getRemainingTTL(t){return this.#n.has(t)?1/0:0}#B(){let t=new ir(this.#a),r=new ir(this.#a);this.#p=t,this.#v=r;let n=this.ttlAutopurge?Array.from({length:this.#a}):void 0;this.#d=n,this.#U=(u,a,l=this.#E.now())=>{r[u]=a!==0?l:0,t[u]=a,i(u,a)},this.#k=(u)=>{r[u]=t[u]!==0?this.#E.now():0,i(u,t[u])};let i=this.ttlAutopurge?(u,a)=>{if(n?.[u]&&(clearTimeout(n[u]),n[u]=void 0),a&&a!==0&&n){let l=setTimeout(()=>{this.#m(u)?(this.#C(this.#r[u],"expire"),n[u]=void 0):i(u,c(u))},a+1);l.unref&&l.unref(),n[u]=l}}:()=>{};this.#I=(u,a)=>{if(t[a]){let l=t[a],f=r[a];if(!l||!f)return;u.ttl=l,u.start=f,u.now=s||o();let m=u.now-f;u.remainingTTL=l-m}};let s=0,o=()=>{let u=this.#E.now();if(this.ttlResolution>0){s=u;let a=setTimeout(()=>s=0,this.ttlResolution);a.unref&&a.unref()}return u};this.getRemainingTTL=(u)=>{let a=this.#n.get(u);return a===void 0?0:c(a)};let c=(u)=>{let a=t[u],l=r[u];if(!a||!l)return 1/0;let f=(s||o())-l;return a-f};this.#m=(u)=>{let a=r[u],l=t[u];return!!l&&!!a&&(s||o())-a>l}}#k=()=>{};#I=()=>{};#U=()=>{};#m=()=>!1;#z(){let t=new ir(this.#a);this.#w=0,this.#b=t,this.#$=(r)=>{this.#w-=t[r],t[r]=0},this.#J=(r,n,i,s)=>{if(!ae(i)){if(this.#t(n))return this.backgroundFetchSize;if(s){if(typeof s!="function")throw TypeError("sizeCalculation must be a function");if(i=s(n,r),!ae(i))throw TypeError("sizeCalculation return invalid (expect positive integer)")}else throw TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.")}return i},this.#j=(r,n,i)=>{if(t[r]=n,this.#f){let s=this.#f-t[r];for(;this.#w>s;)this.#K(!0)}this.#w+=t[r],i&&(i.entrySize=n,i.totalCalculatedSize=this.#w)}}#$=(t)=>{};#j=(t,r,n)=>{};#J=(t,r,n,i)=>{if(n||i)throw TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#A({allowStale:t=this.allowStale}={}){if(this.#i)for(let r=this.#s;this.#G(r)&&((t||!this.#m(r))&&(yield r),r!==this.#c);)r=this.#h[r]}*#R({allowStale:t=this.allowStale}={}){if(this.#i)for(let r=this.#c;this.#G(r)&&((t||!this.#m(r))&&(yield r),r!==this.#s);)r=this.#u[r]}#G(t){return t!==void 0&&this.#n.get(this.#r[t])===t}*entries(){for(let t of this.#A())this.#e[t]!==void 0&&this.#r[t]!==void 0&&!this.#t(this.#e[t])&&(yield[this.#r[t],this.#e[t]])}*rentries(){for(let t of this.#R())this.#e[t]!==void 0&&this.#r[t]!==void 0&&!this.#t(this.#e[t])&&(yield[this.#r[t],this.#e[t]])}*keys(){for(let t of this.#A()){let r=this.#r[t];r!==void 0&&!this.#t(this.#e[t])&&(yield r)}}*rkeys(){for(let t of this.#R()){let r=this.#r[t];r!==void 0&&!this.#t(this.#e[t])&&(yield r)}}*values(){for(let t of this.#A())this.#e[t]!==void 0&&!this.#t(this.#e[t])&&(yield this.#e[t])}*rvalues(){for(let t of this.#R())this.#e[t]!==void 0&&!this.#t(this.#e[t])&&(yield this.#e[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,r={}){for(let n of this.#A()){let i=this.#e[n],s=this.#t(i)?i.__staleWhileFetching:i;if(s!==void 0&&t(s,this.#r[n],this))return this.#L(this.#r[n],r)}}forEach(t,r=this){for(let n of this.#A()){let i=this.#e[n],s=this.#t(i)?i.__staleWhileFetching:i;s!==void 0&&t.call(r,s,this.#r[n],this)}}rforEach(t,r=this){for(let n of this.#R()){let i=this.#e[n],s=this.#t(i)?i.__staleWhileFetching:i;s!==void 0&&t.call(r,s,this.#r[n],this)}}purgeStale(){let t=!1;for(let r of this.#R({allowStale:!0}))this.#m(r)&&(this.#C(this.#r[r],"expire"),t=!0);return t}info(t){let r=this.#n.get(t);if(r===void 0)return;let n=this.#e[r],i=this.#t(n)?n.__staleWhileFetching:n;if(i===void 0)return;let s={value:i};if(this.#p&&this.#v){let o=this.#p[r],c=this.#v[r];if(o&&c){let u=o-(this.#E.now()-c);s.ttl=u,s.start=Date.now()}}return this.#b&&(s.size=this.#b[r]),s}dump(){let t=[];for(let r of this.#A({allowStale:!0})){let n=this.#r[r],i=this.#e[r],s=this.#t(i)?i.__staleWhileFetching:i;if(s===void 0||n===void 0)continue;let o={value:s};if(this.#p&&this.#v){o.ttl=this.#p[r];let c=this.#E.now()-this.#v[r];o.start=Math.floor(Date.now()-c)}this.#b&&(o.size=this.#b[r]),t.unshift([n,o])}return t}load(t){this.clear();for(let[r,n]of t){if(n.start){let i=Date.now()-n.start;n.start=this.#E.now()-i}this.#_(r,n.value,n)}}set(t,r,n={}){let{status:i=O.metrics.hasSubscribers?{}:void 0}=n;n.status=i,i&&(i.op="set",i.key=t,r!==void 0&&(i.value=r),i.cache=this);let s=this.#_(t,r,n);return i&&O.metrics.hasSubscribers&&O.metrics.publish(i),s}#_(t,r,n,i){let{ttl:s=this.ttl,start:o,noDisposeOnSet:c=this.noDisposeOnSet,sizeCalculation:u=this.sizeCalculation,status:a}=n,l=this.#t(r);if(r===void 0)return a&&(a.set="deleted"),this.delete(t),this;let{noUpdateTTL:f=this.noUpdateTTL}=n;a&&!l&&(a.value=r);let m=this.#J(t,r,n.size||0,u,a);if(this.maxEntrySize&&m>this.maxEntrySize)return this.#C(t,"set"),a&&(a.set="miss",a.maxEntrySizeExceeded=!0),this;let h=this.#i===0?void 0:this.#n.get(t);if(h===void 0)h=this.#i===0?this.#s:this.#S.length!==0?this.#S.pop():this.#i===this.#a?this.#K(!1):this.#i,this.#r[h]=t,this.#e[h]=r,this.#n.set(t,h),this.#u[this.#s]=h,this.#h[h]=this.#s,this.#s=h,this.#i++,this.#j(h,m,a),a&&(a.set="add"),f=!1,this.#x&&!l&&this.#O?.(r,t,"add");else{this.#P(h);let g=this.#e[h];if(r!==g){if(!c)if(this.#t(g)){g!==i&&g.__abortController.abort(Error("replaced"));let{__staleWhileFetching:d}=g;d!==void 0&&d!==r&&(this.#T&&this.#g?.(d,t,"set"),this.#l&&this.#o?.push([d,t,"set"]))}else this.#T&&this.#g?.(g,t,"set"),this.#l&&this.#o?.push([g,t,"set"]);if(this.#$(h),this.#j(h,m,a),this.#e[h]=r,!l){let d=g&&this.#t(g)?g.__staleWhileFetching:g,b=d===void 0?"add":r!==d?"replace":"update";a&&(a.set=b,d!==void 0&&(a.oldValue=d)),this.#x&&this.onInsert?.(r,t,b)}}else l||(a&&(a.set="update"),this.#x&&this.onInsert?.(r,t,"update"))}if(s!==0&&!this.#p&&this.#B(),this.#p&&(f||this.#U(h,s,o),a&&this.#I(a,h)),!c&&this.#l&&this.#o){let g=this.#o,d;for(;d=g?.shift();)this.#y?.(...d)}return this}pop(){try{for(;this.#i;){let t=this.#e[this.#c];if(this.#K(!0),this.#t(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#l&&this.#o){let t=this.#o,r;for(;r=t?.shift();)this.#y?.(...r)}}}#K(t){let r=this.#c,n=this.#r[r],i=this.#e[r],s=this.#t(i);s&&i.__abortController.abort(Error("evicted"));let o=s?i.__staleWhileFetching:i;return(this.#T||this.#l)&&o!==void 0&&(this.#T&&this.#g?.(o,n,"evict"),this.#l&&this.#o?.push([o,n,"evict"])),this.#$(r),this.#d?.[r]&&(clearTimeout(this.#d[r]),this.#d[r]=void 0),t&&(this.#r[r]=void 0,this.#e[r]=void 0,this.#S.push(r)),this.#i===1?(this.#c=this.#s=0,this.#S.length=0):this.#c=this.#u[r],this.#n.delete(n),this.#i--,r}has(t,r={}){let{status:n=O.metrics.hasSubscribers?{}:void 0}=r;r.status=n,n&&(n.op="has",n.key=t,n.cache=this);let i=this.#V(t,r);return O.metrics.hasSubscribers&&O.metrics.publish(n),i}#V(t,r={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:i}=r,s=this.#n.get(t);if(s!==void 0){let o=this.#e[s];if(this.#t(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#m(s))i&&(i.has="stale",this.#I(i,s));else return n&&this.#k(s),i&&(i.has="hit",this.#I(i,s)),!0}else i&&(i.has="miss");return!1}peek(t,r={}){let{status:n=On()?{}:void 0}=r;n&&(n.op="peek",n.key=t,n.cache=this),r.status=n;let i=this.#X(t,r);return O.metrics.hasSubscribers&&O.metrics.publish(n),i}#X(t,r){let{status:n,allowStale:i=this.allowStale}=r,s=this.#n.get(t);if(s===void 0||!i&&this.#m(s)){n&&(n.peek=s===void 0?"miss":"stale");return}let o=this.#e[s],c=this.#t(o)?o.__staleWhileFetching:o;return n&&(c!==void 0?(n.peek="hit",n.value=c):n.peek="miss"),c}#D(t,r,n,i){let s=r===void 0?void 0:this.#e[r];if(this.#t(s))return s;let o=new AbortController,{signal:c}=n;c?.addEventListener("abort",()=>o.abort(c.reason),{signal:o.signal});let u={signal:o.signal,options:n,context:i},a=(d,b=!1)=>{let{aborted:w}=o.signal,S=n.ignoreFetchAbort&&d!==void 0,A=n.ignoreFetchAbort||!!(n.allowStaleOnFetchAbort&&d!==void 0);if(n.status&&(w&&!b?(n.status.fetchAborted=!0,n.status.fetchError=o.signal.reason,S&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),w&&!S&&!b)return f(o.signal.reason,A);let T=h,I=this.#e[r];return(I===h||I===void 0&&S&&b)&&(d===void 0?T.__staleWhileFetching!==void 0?this.#e[r]=T.__staleWhileFetching:this.#C(t,"fetch"):(n.status&&(n.status.fetchUpdated=!0),this.#_(t,d,u.options,T))),d},l=(d)=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=d),f(d,!1)),f=(d,b)=>{let{aborted:w}=o.signal,S=w&&n.allowStaleOnFetchAbort,A=S||n.allowStaleOnFetchRejection,T=A||n.noDeleteOnFetchRejection,I=h;if(this.#e[r]===h&&(!T||!b&&I.__staleWhileFetching===void 0?this.#C(t,"fetch"):S||(this.#e[r]=I.__staleWhileFetching)),A)return n.status&&I.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),I.__staleWhileFetching;if(I.__returned===I)throw d},m=(d,b)=>{let w=this.#N?.(t,s,u);o.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(d(void 0),n.allowStaleOnFetchAbort&&(d=(S)=>a(S,!0)))}),w&&w instanceof Promise?w.then((S)=>d(S===void 0?void 0:S),b):w!==void 0&&d(w)};n.status&&(n.status.fetchDispatched=!0);let h=new Promise(m).then(a,l),g=Object.assign(h,{__abortController:o,__staleWhileFetching:s,__returned:void 0});return r===void 0?(this.#_(t,g,{...u.options,status:void 0}),r=this.#n.get(t)):this.#e[r]=g,g}#t(t){if(!this.#F)return!1;let r=t;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof AbortController}fetch(t,r={}){let n=O.tracing.hasSubscribers,{status:i=On()?{}:void 0}=r;r.status=i,i&&r.context&&(i.context=r.context);let s=this.#W(t,r);return i&&n&&(i.trace=!0,O.tracing.tracePromise(()=>s,i).catch(()=>{})),s}async#W(t,r={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:c=this.noDisposeOnSet,size:u=0,sizeCalculation:a=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:m=this.allowStaleOnFetchRejection,ignoreFetchAbort:h=this.ignoreFetchAbort,allowStaleOnFetchAbort:g=this.allowStaleOnFetchAbort,context:d,forceRefresh:b=!1,status:w,signal:S}=r;if(w&&(w.op="fetch",w.key=t,b&&(w.forceRefresh=!0),w.cache=this),!this.#F)return w&&(w.fetch="get"),this.#L(t,{allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:s,status:w});let A={allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:s,ttl:o,noDisposeOnSet:c,size:u,sizeCalculation:a,noUpdateTTL:l,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:m,allowStaleOnFetchAbort:g,ignoreFetchAbort:h,status:w,signal:S},T=this.#n.get(t);if(T===void 0){w&&(w.fetch="miss");let I=this.#D(t,T,A,d);return I.__returned=I}else{let I=this.#e[T];if(this.#t(I)){let V=n&&I.__staleWhileFetching!==void 0;return w&&(w.fetch="inflight",V&&(w.returnedStale=!0)),V?I.__staleWhileFetching:I.__returned=I}let K=this.#m(T);if(!b&&!K)return w&&(w.fetch="hit"),this.#P(T),i&&this.#k(T),w&&this.#I(w,T),I;let W=this.#D(t,T,A,d),z=W.__staleWhileFetching!==void 0&&n;return w&&(w.fetch=K?"stale":"refresh",z&&K&&(w.returnedStale=!0)),z?W.__staleWhileFetching:W.__returned=W}}forceFetch(t,r={}){let n=O.tracing.hasSubscribers,{status:i=On()?{}:void 0}=r;r.status=i,i&&r.context&&(i.context=r.context);let s=this.#Y(t,r);return i&&n&&(i.trace=!0,O.tracing.tracePromise(()=>s,i).catch(()=>{})),s}async#Y(t,r={}){let n=await this.#W(t,r);if(n===void 0)throw Error("fetch() returned undefined");return n}memo(t,r={}){let{status:n=O.metrics.hasSubscribers?{}:void 0}=r;r.status=n,n&&(n.op="memo",n.key=t,r.context&&(n.context=r.context),n.cache=this);let i=this.#Z(t,r);return n&&(n.value=i),O.metrics.hasSubscribers&&O.metrics.publish(n),i}#Z(t,r={}){let n=this.#q;if(!n)throw Error("no memoMethod provided to constructor");let{context:i,status:s,forceRefresh:o,...c}=r;s&&o&&(s.forceRefresh=!0);let u=this.#L(t,c),a=o||u===void 0;if(s&&(s.memo=a?"miss":"hit",a||(s.value=u)),!a)return u;let l=n(t,u,{options:c,context:i});return s&&(s.value=l),this.#_(t,l,c),l}get(t,r={}){let{status:n=O.metrics.hasSubscribers?{}:void 0}=r;r.status=n,n&&(n.op="get",n.key=t,n.cache=this);let i=this.#L(t,r);return n&&(i!==void 0&&(n.value=i),O.metrics.hasSubscribers&&O.metrics.publish(n)),i}#L(t,r={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:o}=r,c=this.#n.get(t);if(c===void 0){o&&(o.get="miss");return}let u=this.#e[c],a=this.#t(u);return o&&this.#I(o,c),this.#m(c)?a?(o&&(o.get="stale-fetching"),n&&u.__staleWhileFetching!==void 0?(o&&(o.returnedStale=!0),u.__staleWhileFetching):void 0):(s||this.#C(t,"expire"),o&&(o.get="stale"),n?(o&&(o.returnedStale=!0),u):void 0):(o&&(o.get=a?"fetching":"hit"),this.#P(c),i&&this.#k(c),a?u.__staleWhileFetching:u)}#M(t,r){this.#h[r]=t,this.#u[t]=r}#P(t){t!==this.#s&&(t===this.#c?this.#c=this.#u[t]:this.#M(this.#h[t],this.#u[t]),this.#M(this.#s,t),this.#s=t)}delete(t){return this.#C(t,"delete")}#C(t,r){O.metrics.hasSubscribers&&O.metrics.publish({op:"delete",delete:r,key:t,cache:this});let n=!1;if(this.#i!==0){let i=this.#n.get(t);if(i!==void 0)if(this.#d?.[i]&&(clearTimeout(this.#d[i]),this.#d[i]=void 0),n=!0,this.#i===1)this.#H(r);else{this.#$(i);let s=this.#e[i];if(this.#t(s)?s.__abortController.abort(Error("deleted")):(this.#T||this.#l)&&(this.#T&&this.#g?.(s,t,r),this.#l&&this.#o?.push([s,t,r])),this.#n.delete(t),this.#r[i]=void 0,this.#e[i]=void 0,i===this.#s)this.#s=this.#h[i];else if(i===this.#c)this.#c=this.#u[i];else{let o=this.#h[i];this.#u[o]=this.#u[i];let c=this.#u[i];this.#h[c]=this.#h[i]}this.#i--,this.#S.push(i)}}if(this.#l&&this.#o?.length){let i=this.#o,s;for(;s=i?.shift();)this.#y?.(...s)}return n}clear(){return this.#H("delete")}#H(t){for(let r of this.#R({allowStale:!0})){let n=this.#e[r];if(this.#t(n))n.__abortController.abort(Error("deleted"));else{let i=this.#r[r];this.#T&&this.#g?.(n,i,t),this.#l&&this.#o?.push([n,i,t])}}if(this.#n.clear(),this.#e.fill(void 0),this.#r.fill(void 0),this.#p&&this.#v){this.#p.fill(0),this.#v.fill(0);for(let r of this.#d??[])r!==void 0&&clearTimeout(r);this.#d?.fill(void 0)}if(this.#b&&this.#b.fill(0),this.#c=0,this.#s=0,this.#S.length=0,this.#w=0,this.#i=0,this.#l&&this.#o){let r=this.#o,n;for(;n=r?.shift();)this.#y?.(...n)}}};sr.LRUCache=qy});var Gn=p(function(nt,Pe){var Fy=200,Mc="__lodash_hash_undefined__",Hc=9007199254740991,Fn="[object Arguments]",jy="[object Array]",zc="[object Boolean]",Vc="[object Date]",Ky="[object Error]",jn="[object Function]",Xc="[object GeneratorFunction]",ar="[object Map]",Yc="[object Number]",Kn="[object Object]",Nc="[object Promise]",Zc="[object RegExp]",cr="[object Set]",Qc="[object String]",eu="[object Symbol]",kn="[object WeakMap]",tu="[object ArrayBuffer]",ur="[object DataView]",ru="[object Float32Array]",nu="[object Float64Array]",iu="[object Int8Array]",su="[object Int16Array]",ou="[object Int32Array]",au="[object Uint8Array]",cu="[object Uint8ClampedArray]",uu="[object Uint16Array]",lu="[object Uint32Array]",Dy=/[\\^$.*+?()[\]{}|]/g,By=/\w*$/,Uy=/^\[object .+?Constructor\]$/,Jy=/^(?:0|[1-9]\d*)$/,C={};C[Fn]=C[jy]=C[tu]=C[ur]=C[zc]=C[Vc]=C[ru]=C[nu]=C[iu]=C[su]=C[ou]=C[ar]=C[Yc]=C[Kn]=C[Zc]=C[cr]=C[Qc]=C[eu]=C[au]=C[cu]=C[uu]=C[lu]=!0;C[Ky]=C[jn]=C[kn]=!1;var Gy=typeof global=="object"&&global&&global.Object===Object&&global,Wy=typeof self=="object"&&self&&self.Object===Object&&self,ee=Gy||Wy||Function("return this")(),fu=typeof nt=="object"&&nt&&!nt.nodeType&&nt,qc=fu&&typeof Pe=="object"&&Pe&&!Pe.nodeType&&Pe,My=qc&&qc.exports===fu;function Hy(e,t){return e.set(t[0],t[1]),e}function zy(e,t){return e.add(t),e}function Vy(e,t){var r=-1,n=e?e.length:0;while(++r<n)if(t(e[r],r,e)===!1)break;return e}function Xy(e,t){var r=-1,n=t.length,i=e.length;while(++r<n)e[i+r]=t[r];return e}function hu(e,t,r,n){var i=-1,s=e?e.length:0;if(n&&s)r=e[++i];while(++i<s)r=t(r,e[i],i,e);return r}function Yy(e,t){var r=-1,n=Array(e);while(++r<e)n[r]=t(r);return n}function Zy(e,t){return e==null?void 0:e[t]}function pu(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(r){}return t}function Fc(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function Dn(e,t){return function(r){return e(t(r))}}function jc(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Qy=Array.prototype,eE=Function.prototype,lr=Object.prototype,xn=ee["__core-js_shared__"],Kc=function(){var e=/[^.]+$/.exec(xn&&xn.keys&&xn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),du=eE.toString,{hasOwnProperty:ce,toString:fr}=lr,tE=RegExp("^"+du.call(ce).replace(Dy,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Dc=My?ee.Buffer:void 0,{Symbol:Bc,Uint8Array:Uc}=ee,rE=Dn(Object.getPrototypeOf,Object),nE=Object.create,iE=lr.propertyIsEnumerable,sE=Qy.splice,Jc=Object.getOwnPropertySymbols,oE=Dc?Dc.isBuffer:void 0,aE=Dn(Object.keys,Object),$n=Fe(ee,"DataView"),it=Fe(ee,"Map"),Ln=Fe(ee,"Promise"),Pn=Fe(ee,"Set"),Nn=Fe(ee,"WeakMap"),st=Fe(Object,"create"),cE=de($n),uE=de(it),lE=de(Ln),fE=de(Pn),hE=de(Nn),Gc=Bc?Bc.prototype:void 0,Wc=Gc?Gc.valueOf:void 0;function pe(e){var t=-1,r=e?e.length:0;this.clear();while(++t<r){var n=e[t];this.set(n[0],n[1])}}function pE(){this.__data__=st?st(null):{}}function dE(e){return this.has(e)&&delete this.__data__[e]}function mE(e){var t=this.__data__;if(st){var r=t[e];return r===Mc?void 0:r}return ce.call(t,e)?t[e]:void 0}function gE(e){var t=this.__data__;return st?t[e]!==void 0:ce.call(t,e)}function yE(e,t){var r=this.__data__;return r[e]=st&&t===void 0?Mc:t,this}pe.prototype.clear=pE;pe.prototype.delete=dE;pe.prototype.get=mE;pe.prototype.has=gE;pe.prototype.set=yE;function te(e){var t=-1,r=e?e.length:0;this.clear();while(++t<r){var n=e[t];this.set(n[0],n[1])}}function EE(){this.__data__=[]}function wE(e){var t=this.__data__,r=hr(t,e);if(r<0)return!1;var n=t.length-1;if(r==n)t.pop();else sE.call(t,r,1);return!0}function SE(e){var t=this.__data__,r=hr(t,e);return r<0?void 0:t[r][1]}function bE(e){return hr(this.__data__,e)>-1}function vE(e,t){var r=this.__data__,n=hr(r,e);if(n<0)r.push([e,t]);else r[n][1]=t;return this}te.prototype.clear=EE;te.prototype.delete=wE;te.prototype.get=SE;te.prototype.has=bE;te.prototype.set=vE;function Ne(e){var t=-1,r=e?e.length:0;this.clear();while(++t<r){var n=e[t];this.set(n[0],n[1])}}function TE(){this.__data__={hash:new pe,map:new(it||te),string:new pe}}function AE(e){return pr(this,e).delete(e)}function RE(e){return pr(this,e).get(e)}function CE(e){return pr(this,e).has(e)}function IE(e,t){return pr(this,e).set(e,t),this}Ne.prototype.clear=TE;Ne.prototype.delete=AE;Ne.prototype.get=RE;Ne.prototype.has=CE;Ne.prototype.set=IE;function qe(e){this.__data__=new te(e)}function _E(){this.__data__=new te}function OE(e){return this.__data__.delete(e)}function xE(e){return this.__data__.get(e)}function kE(e){return this.__data__.has(e)}function $E(e,t){var r=this.__data__;if(r instanceof te){var n=r.__data__;if(!it||n.length<Fy-1)return n.push([e,t]),this;r=this.__data__=new Ne(n)}return r.set(e,t),this}qe.prototype.clear=_E;qe.prototype.delete=OE;qe.prototype.get=xE;qe.prototype.has=kE;qe.prototype.set=$E;function LE(e,t){var r=Un(e)||n0(e)?Yy(e.length,String):[],n=r.length,i=!!n;for(var s in e)if((t||ce.call(e,s))&&!(i&&(s=="length"||QE(s,n))))r.push(s);return r}function mu(e,t,r){var n=e[t];if(!(ce.call(e,t)&&wu(n,r))||r===void 0&&!(t in e))e[t]=r}function hr(e,t){var r=e.length;while(r--)if(wu(e[r][0],t))return r;return-1}function PE(e,t){return e&&gu(t,Jn(t),e)}function qn(e,t,r,n,i,s,o){var c;if(n)c=s?n(e,i,s,o):n(e);if(c!==void 0)return c;if(!dr(e))return e;var u=Un(e);if(u){if(c=XE(e),!t)return HE(e,c)}else{var a=he(e),l=a==jn||a==Xc;if(s0(e))return DE(e,t);if(a==Kn||a==Fn||l&&!s){if(pu(e))return s?e:{};if(c=YE(l?{}:e),!t)return zE(e,PE(c,e))}else{if(!C[a])return s?e:{};c=ZE(e,a,qn,t)}}o||(o=new qe);var f=o.get(e);if(f)return f;if(o.set(e,c),!u)var m=r?VE(e):Jn(e);return Vy(m||e,function(h,g){if(m)g=h,h=e[g];mu(c,g,qn(h,t,r,n,g,e,o))}),c}function NE(e){return dr(e)?nE(e):{}}function qE(e,t,r){var n=t(e);return Un(e)?n:Xy(n,r(e))}function FE(e){return fr.call(e)}function jE(e){if(!dr(e)||t0(e))return!1;var t=bu(e)||pu(e)?tE:Uy;return t.test(de(e))}function KE(e){if(!Eu(e))return aE(e);var t=[];for(var r in Object(e))if(ce.call(e,r)&&r!="constructor")t.push(r);return t}function DE(e,t){if(t)return e.slice();var r=new e.constructor(e.length);return e.copy(r),r}function Bn(e){var t=new e.constructor(e.byteLength);return new Uc(t).set(new Uc(e)),t}function BE(e,t){var r=t?Bn(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}function UE(e,t,r){var n=t?r(Fc(e),!0):Fc(e);return hu(n,Hy,new e.constructor)}function JE(e){var t=new e.constructor(e.source,By.exec(e));return t.lastIndex=e.lastIndex,t}function GE(e,t,r){var n=t?r(jc(e),!0):jc(e);return hu(n,zy,new e.constructor)}function WE(e){return Wc?Object(Wc.call(e)):{}}function ME(e,t){var r=t?Bn(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function HE(e,t){var r=-1,n=e.length;t||(t=Array(n));while(++r<n)t[r]=e[r];return t}function gu(e,t,r,n){r||(r={});var i=-1,s=t.length;while(++i<s){var o=t[i],c=n?n(r[o],e[o],o,r,e):void 0;mu(r,o,c===void 0?e[o]:c)}return r}function zE(e,t){return gu(e,yu(e),t)}function VE(e){return qE(e,Jn,yu)}function pr(e,t){var r=e.__data__;return e0(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Fe(e,t){var r=Zy(e,t);return jE(r)?r:void 0}var yu=Jc?Dn(Jc,Object):c0,he=FE;if($n&&he(new $n(new ArrayBuffer(1)))!=ur||it&&he(new it)!=ar||Ln&&he(Ln.resolve())!=Nc||Pn&&he(new Pn)!=cr||Nn&&he(new Nn)!=kn)he=function(e){var t=fr.call(e),r=t==Kn?e.constructor:void 0,n=r?de(r):void 0;if(n)switch(n){case cE:return ur;case uE:return ar;case lE:return Nc;case fE:return cr;case hE:return kn}return t};function XE(e){var t=e.length,r=e.constructor(t);if(t&&typeof e[0]=="string"&&ce.call(e,"index"))r.index=e.index,r.input=e.input;return r}function YE(e){return typeof e.constructor=="function"&&!Eu(e)?NE(rE(e)):{}}function ZE(e,t,r,n){var i=e.constructor;switch(t){case tu:return Bn(e);case zc:case Vc:return new i(+e);case ur:return BE(e,n);case ru:case nu:case iu:case su:case ou:case au:case cu:case uu:case lu:return ME(e,n);case ar:return UE(e,n,r);case Yc:case Qc:return new i(e);case Zc:return JE(e);case cr:return GE(e,n,r);case eu:return WE(e)}}function QE(e,t){return t=t==null?Hc:t,!!t&&(typeof e=="number"||Jy.test(e))&&(e>-1&&e%1==0&&e<t)}function e0(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function t0(e){return!!Kc&&Kc in e}function Eu(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||lr;return e===r}function de(e){if(e!=null){try{return du.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function r0(e){return qn(e,!0,!0)}function wu(e,t){return e===t||e!==e&&t!==t}function n0(e){return i0(e)&&ce.call(e,"callee")&&(!iE.call(e,"callee")||fr.call(e)==Fn)}var Un=Array.isArray;function Su(e){return e!=null&&o0(e.length)&&!bu(e)}function i0(e){return a0(e)&&Su(e)}var s0=oE||u0;function bu(e){var t=dr(e)?fr.call(e):"";return t==jn||t==Xc}function o0(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Hc}function dr(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function a0(e){return!!e&&typeof e=="object"}function Jn(e){return Su(e)?LE(e):KE(e)}function c0(){return[]}function u0(){return!1}Pe.exports=r0});var Wn=p(function(mr){Object.defineProperty(mr,"__esModule",{value:!0});mr.deepFreeze=void 0;function vu(e){if(e)Object.freeze(e),Object.getOwnPropertyNames(e).forEach(function(t){if(e.hasOwnProperty(t)&&e[t]!==null&&(typeof e[t]==="object"||typeof e[t]==="function")&&e[t].constructor!==Buffer&&!Object.isFrozen(e[t]))vu(e[t])});return e}mr.deepFreeze=vu});var Cu=p(function(je){var l0=je&&je.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(je,"__esModule",{value:!0});je.syncMemoizer=void 0;var Au=or(),Ru=require("events"),Tu=l0(Gn()),gr=Wn();function f0(e){let t=new Au.LRUCache(e),{load:r,hash:n,bypass:i,itemTTL:s,freeze:o,clone:c}=e,u=new Ru.EventEmitter,a=Object.assign({del:l,reset:()=>t.clear(),keys:()=>[...t.keys()],on:u.on.bind(u),once:u.once.bind(u)},e);if(e.disable)return Object.assign(r,a);function l(){let d=n(...arguments);t.delete(d)}function f(d,...b){u.emit(d,...b)}function m(d){return d&&d.then&&typeof d.then==="function"}function h(d){let b=d;if(c)if(m(b))b=b.then(Tu.default);else b=(0,Tu.default)(b);if(o)if(m(b))b=b.then(gr.deepFreeze);else gr.deepFreeze(b);return b}return Object.assign(function(...d){if(i&&i(...d))return f("miss",...d),r(...d);var b=n(...d),w=t.get(b);if(w)return f("hit",...d),h(w);f("miss",...d);let S=r(...d);if(s)t.set(b,S,{ttl:s(...d.concat([S]))});else t.set(b,S);return h(S)},a)}je.syncMemoizer=f0});var $u=p(function(Ke){var h0=Ke&&Ke.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ke,"__esModule",{value:!0});Ke.asyncMemoizer=void 0;var Iu=or(),_u=require("events"),p0=h0(Gn()),Ou=Wn(),xu=Cu();function ku(e){let t=new Iu.LRUCache(e),{load:r,hash:n,bypass:i,itemTTL:s,freeze:o,clone:c}=e,u=e.queueTTL||1000,a=new Map,l=new _u.EventEmitter,f=Object.assign({del:m,reset:()=>t.clear(),keys:()=>[...t.keys()],on:l.on.bind(l),once:l.once.bind(l)},e);if(e.disable)return Object.assign(r,f);function m(...w){let S=n(...w);t.delete(S)}function h(w,S,A){if(o)A.forEach(Ou.deepFreeze);if(s)t.set(w,A,{ttl:s(...S.concat(A))});else t.set(w,A)}function g(w,S){for(let A of w)if(c)setImmediate(A,...S.map(p0.default));else setImmediate(A,...S)}function d(w,...S){l.emit(w,...S)}function b(...w){let S=w.slice(0,-1),A=w.slice(-1).pop(),T;if(i&&i(...S))return d("miss",...S),r(...w);if(S.length===0&&!n)T="_";else T=n(...S);let I=t.get(T);if(I)return d("hit",...S),g([A],[null].concat(I));let K=a.get(T);if(K&&K.expiresAt>Date.now()){K.queue.push(A),d("queue",...S);return}d("miss",...S);let W=Date.now(),z=[A];a.set(T,{queue:z,expiresAt:W+u});let V=(...le)=>{if(!le[0])h(T,S,le.slice(1));a.delete(T),d("loaded",Date.now()-W,...S),g(z,le)};r(...S,V)}return Object.assign(b,f)}Ke.asyncMemoizer=ku;ku.sync=xu.syncMemoizer});var Nu=p(function(Ub,Pu){var Lu=$u();Pu.exports=Lu.asyncMemoizer});var ju=p(function(Jb,Fu){var Mn=zt()("jwks"),d0=Nu(),{LRUCache:m0}=or(),{promisify:g0,callbackify:qu}=require("util");function y0(e,{cacheMaxEntries:t=5,cacheMaxAge:r=600000,cacheMaxAgeFallback:n,onStaleCacheFallback:i}){Mn(`Configured caching of signing keys. Max: ${t} / Age: ${r}${n?` / Fallback: ${n}`:""}`);let s;if(n){let o=new m0({max:t}),c=e.getSigningKey.bind(e);s=qu(async(u)=>{try{let a=await c(u);return o.set(u,{key:a,fetchedAt:Date.now()}),a}catch(a){if(a.isEndpointUnavailable){let l=o.get(u);if(l&&Date.now()-l.fetchedAt<r+n){if(Mn(`JWKS endpoint unavailable, serving stale signing key for '${u}': ${a.message}`),i)i(a,u,l.key);return l.key}Mn(`JWKS endpoint unavailable and no valid stale entry for '${u}', fallback window expired or key never fetched`)}throw a}})}else s=qu(e.getSigningKey.bind(e));return g0(d0({hash:(o)=>o,load:s,ttl:r,max:t}))}Fu.exports.default=y0});var Hn=p(function(Gb,Du){var Ku=function(e,t,r,n){if(this.bucketSize=e,this.tokensPerInterval=t,typeof r==="string")switch(r){case"sec":case"second":this.interval=1000;break;case"min":case"minute":this.interval=60000;break;case"hr":case"hour":this.interval=3600000;break;case"day":this.interval=86400000;break;default:throw Error("Invaid interval "+r)}else this.interval=r;this.parentBucket=n,this.content=0,this.lastDrip=+new Date};Ku.prototype={bucketSize:1,tokensPerInterval:1,interval:1000,parentBucket:null,content:0,lastDrip:0,removeTokens:function(e,t){var r=this;if(!this.bucketSize)return process.nextTick(t.bind(null,null,e,Number.POSITIVE_INFINITY)),!0;if(e>this.bucketSize)return process.nextTick(t.bind(null,"Requested tokens "+e+" exceeds bucket size "+this.bucketSize,null)),!1;if(this.drip(),e>this.content)return n();if(this.parentBucket)return this.parentBucket.removeTokens(e,function(i,s){if(i)return t(i,null);if(e>r.content)return n();r.content-=e,t(null,Math.min(s,r.content))});else return this.content-=e,process.nextTick(t.bind(null,null,this.content)),!0;function n(){var i=Math.ceil((e-r.content)*(r.interval/r.tokensPerInterval));return setTimeout(function(){r.removeTokens(e,t)},i),!1}},tryRemoveTokens:function(e){if(!this.bucketSize)return!0;if(e>this.bucketSize)return!1;if(this.drip(),e>this.content)return!1;if(this.parentBucket&&!this.parentBucket.tryRemoveTokens(e))return!1;return this.content-=e,!0},drip:function(){if(!this.tokensPerInterval){this.content=this.bucketSize;return}var e=+new Date,t=Math.max(e-this.lastDrip,0);this.lastDrip=e;var r=t*(this.tokensPerInterval/this.interval);this.content=Math.min(this.content+r,this.bucketSize)}};Du.exports=Ku});var Uu=p(function(Wb,Bu){var E0=function(){if(typeof process<"u"&&process.hrtime){var e=process.hrtime(),t=e[0],r=e[1];return t*1000+Math.floor(r/1e6)}return new Date().getTime()};Bu.exports=E0});var Wu=p(function(Mb,Gu){var w0=Hn(),zn=Uu(),Ju=function(e,t,r){this.tokenBucket=new w0(e,e,t,null),this.tokenBucket.content=e,this.curIntervalStart=zn(),this.tokensThisInterval=0,this.fireImmediately=r};Ju.prototype={tokenBucket:null,curIntervalStart:0,tokensThisInterval:0,fireImmediately:!1,removeTokens:function(e,t){if(e>this.tokenBucket.bucketSize)return process.nextTick(t.bind(null,"Requested tokens "+e+" exceeds maximum tokens per interval "+this.tokenBucket.bucketSize,null)),!1;var r=this,n=zn();if(n<this.curIntervalStart||n-this.curIntervalStart>=this.tokenBucket.interval)this.curIntervalStart=n,this.tokensThisInterval=0;if(e>this.tokenBucket.tokensPerInterval-this.tokensThisInterval){if(this.fireImmediately)process.nextTick(t.bind(null,null,-1));else{var i=Math.ceil(this.curIntervalStart+this.tokenBucket.interval-n);setTimeout(function(){r.tokenBucket.removeTokens(e,s)},i)}return!1}return this.tokenBucket.removeTokens(e,s);function s(o,c){if(o)return t(o,null);r.tokensThisInterval+=e,t(null,c)}},tryRemoveTokens:function(e){if(e>this.tokenBucket.bucketSize)return!1;var t=zn();if(t<this.curIntervalStart||t-this.curIntervalStart>=this.tokenBucket.interval)this.curIntervalStart=t,this.tokensThisInterval=0;if(e>this.tokenBucket.tokensPerInterval-this.tokensThisInterval)return!1;var r=this.tokenBucket.tryRemoveTokens(e);if(r)this.tokensThisInterval+=e;return r},getTokensRemaining:function(){return this.tokenBucket.drip(),this.tokenBucket.content}};Gu.exports=Ju});var Mu=p(function(Vn){Vn.RateLimiter=Wu();Vn.TokenBucket=Hn()});var Xn=p(function(zb,Hu){function yr(e){Error.call(this,e),Error.captureStackTrace(this,this.constructor),this.name="JwksRateLimitError",this.message=e}yr.prototype=Object.create(Error.prototype);yr.prototype.constructor=yr;Hu.exports=yr});var Vu=p(function(Vb,zu){var Yn=zt()("jwks"),{RateLimiter:S0}=Mu(),b0=Xn();function v0(e,{jwksRequestsPerMinute:t=10}){let r=e.getSigningKey.bind(e),n=new S0(t,"minute",!0);return Yn(`Configured rate limiting to JWKS endpoint at ${t}/minute`),async(i)=>await new Promise((s,o)=>{n.removeTokens(1,async(c,u)=>{if(c)o(c);if(Yn("Requests to the JWKS endpoint available for the next minute:",u),u<0)Yn("Too many requests to the JWKS endpoint"),o(new b0("Too many requests to the JWKS endpoint"));else try{let a=await r(i);s(a)}catch(a){o(a)}})})}zu.exports.default=v0});var Yu=p(function(Xb,Xu){var T0=In().retrieveSigningKeys;function A0(e,{getKeysInterceptor:t}){let r=e.getSigningKey.bind(e);return async(n)=>{let i=await t(),s;if(i&&i.length)s=await T0(i);if(s&&s.length){let o=s.find((c)=>!n||c.kid===n);if(o)return o}return r(n)}}Xu.exports.default=A0});var Qu=p(function(Yb,Zu){var{callbackify:R0}=require("util"),C0=(e)=>{let t=e.getSigningKey.bind(e);return(r,n)=>{if(n)return R0(t)(r,n);return t(r)}};Zu.exports.default=C0});var tl=p(function(Zb,el){el.exports={request:xc().default,cacheSigningKey:ju().default,rateLimitSigningKey:Vu().default,getKeysInterceptor:Yu().default,callbackSupport:Qu().default}});var Zn=p(function(Qb,rl){function Er(e){Error.call(this,e),Error.captureStackTrace(this,this.constructor),this.name="SigningKeyNotFoundError",this.message=e}Er.prototype=Object.create(Error.prototype);Er.prototype.constructor=Er;rl.exports=Er});var De=p(function(ev,sl){var me=zt()("jwks"),{retrieveSigningKeys:I0}=In(),{request:_0,cacheSigningKey:O0,rateLimitSigningKey:x0,getKeysInterceptor:k0,callbackSupport:$0}=tl(),Qn=rr(),nl=Zn();class il{constructor(e){if(this.options={rateLimit:!1,cache:!0,timeout:30000,...e},this.options.getKeysInterceptor)this.getSigningKey=k0(this,e);if(this.options.rateLimit)this.getSigningKey=x0(this,e);if(this.options.cache)this.getSigningKey=O0(this,e);this.getSigningKey=$0(this,e)}async getKeys(){me(`Fetching keys from '${this.options.jwksUri}'`);try{let e=await _0({uri:this.options.jwksUri,headers:this.options.requestHeaders,agent:this.options.requestAgent,timeout:this.options.timeout,fetcher:this.options.fetcher});return me("Keys:",e.keys),e.keys}catch(e){let{errorMsg:t}=e;me("Failure:",t||e);let r=t?new Qn(t):e;throw r.isEndpointUnavailable=!0,r}}async getSigningKeys(){let e=await this.getKeys();if(!e||!e.length)throw new Qn("The JWKS endpoint did not contain any keys");let t=await I0(e);if(!t.length)throw new Qn("The JWKS endpoint did not contain any signing keys");return me("Signing Keys:",t),t}async getSigningKey(e){me(`Fetching signing key for '${e}'`);let t=await this.getSigningKeys(),r=e!==void 0&&e!==null;if(!r&&t.length>1)throw me("No KID specified and JWKS endpoint returned more than 1 key"),new nl("No KID specified and JWKS endpoint returned more than 1 key");let n=t.find((i)=>!r||i.kid===e);if(n)return n;else throw me(`Unable to find a signing key that matches '${e}'`),new nl(`Unable to find a signing key that matches '${e}'`)}}sl.exports={JwksClient:il}});var Be=p(function(tv,ol){ol.exports={ArgumentError:_n(),JwksError:rr(),JwksRateLimitError:Xn(),SigningKeyNotFoundError:Zn()}});var ot=p(function(rv,al){var L0=["RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512","EdDSA"];al.exports=L0});var ul=p(function(nv,wr){var{ArgumentError:P0}=Be(),{JwksClient:N0}=De(),cl=ot(),q0=(e,t)=>{if(e&&e.name==="SigningKeyNotFoundError")return t(e,null,null);if(e)return t(e,null,null)};wr.exports.hapiJwt2KeyAsync=(e)=>{let t=wr.exports.hapiJwt2Key(e);return function(r){return new Promise((n,i)=>{t(r,(o,c)=>{!c||o?i(o):n({key:c})})})}};wr.exports.hapiJwt2Key=function(e){if(e===null||e===void 0)throw new P0("An options object must be provided when initializing hapiJwt2Key");let t=new N0(e),r=e.handleSigningKeyError||q0;return function(i,s){if(!i||!i.header)return s(Error("Cannot find a signing certificate if there is no header"),null,null);if(!cl.includes(i.header.alg))return s(Error("Unsupported algorithm "+i.header.alg+" supplied."),null,null);t.getSigningKey(i.header.kid).then((o)=>s(null,o.publicKey||o.rsaPublicKey,o)).catch((o)=>r(o,(c)=>s(c,null,null)))}}});var hl=p(function(iv,fl){var{ArgumentError:F0}=Be(),{JwksClient:j0}=De(),ll=ot(),K0=(e,t)=>{if(e&&e.name==="SigningKeyNotFoundError")return t(null);if(e)return t(e)};fl.exports.expressJwtSecret=function(e){if(e===null||e===void 0)throw new F0("An options object must be provided when initializing expressJwtSecret");let t=new j0(e),r=e.handleSigningKeyError||K0,n=async(i,s)=>{if(!s)return;let o=s.header;if(!o||!ll.includes(o.alg))return;try{let c=await t.getSigningKey(o.kid);return c.publicKey||c.rsaPublicKey}catch(c){return new Promise((u,a)=>{r(c,(l)=>{if(!l)return u();a(l)})})}};return function(s,o,c,u){if(arguments.length===4){n(s,{header:o}).then((a)=>{setImmediate(u,null,a)}).catch((a)=>{setImmediate(u,a)});return}return n(s,arguments[1])}}});var ml=p(function(sv,dl){var{ArgumentError:D0}=Be(),{JwksClient:B0}=De(),pl=ot();dl.exports.koaJwtSecret=function(e={}){if(!e.jwksUri)throw new D0("No JWKS provided. Please provide a jwksUri");let t=new B0(e);return function({alg:n,kid:i}={}){return new Promise((s,o)=>{if(!pl.includes(n))return o(Error("Missing / invalid token algorithm"));t.getSigningKey(i).then((c)=>{s(c.publicKey||c.rsaPublicKey)}).catch((c)=>{if(e.handleSigningKeyError)return e.handleSigningKeyError(c).then(o);return o(c)})})}}});var Sl=p(function(ov,wl){var gl=(Cn(),{}),{ArgumentError:yl}=Be(),{JwksClient:U0}=De(),El=ot(),J0=(e,t)=>{if(e&&e.name==="SigningKeyNotFoundError")return t(null);if(e)return t(e)};wl.exports.passportJwtSecret=function(e){if(e===null||e===void 0)throw new yl("An options object must be provided when initializing passportJwtSecret");if(!e.jwksUri)throw new yl("No JWKS provided. Please provide a jwksUri");let t=new U0(e),r=e.handleSigningKeyError||J0;return function(i,s,o){let c;try{c={payload:Tc(s),header:bc(s)}}catch(u){c=null}if(!c||!El.includes(c.header.alg))return o(null,null);t.getSigningKey(c.header.kid).then((u)=>{o(null,u.publicKey||u.rsaPublicKey)}).catch((u)=>{r(u,(a)=>o(a,null))})}}});var vl=p(function(av,G){var{JwksClient:bl}=De(),ue=Be(),{hapiJwt2Key:G0,hapiJwt2KeyAsync:W0}=ul(),{expressJwtSecret:M0}=hl(),{koaJwtSecret:H0}=ml(),{passportJwtSecret:z0}=Sl();G.exports=(e)=>new bl(e);G.exports.JwksClient=bl;G.exports.ArgumentError=ue.ArgumentError;G.exports.JwksError=ue.JwksError;G.exports.JwksRateLimitError=ue.JwksRateLimitError;G.exports.SigningKeyNotFoundError=ue.SigningKeyNotFoundError;G.exports.expressJwtSecret=M0;G.exports.hapiJwt2Key=G0;G.exports.hapiJwt2KeyAsync=W0;G.exports.koaJwtSecret=H0;G.exports.passportJwtSecret=z0});var Q0={};Nl(Q0,{handler:()=>Z0});module.exports=$l(Q0);var oi=`<!DOCTYPE html>
11
+ -----END ${t}-----`},zy=async(e,t,r)=>{if(Ac(r)){if(r.type!==e)throw TypeError(`key is not a ${e} key`);return r.export({format:"pem",type:t})}if(!Tc(r))throw TypeError(Ic(r,"CryptoKey","KeyObject"));if(!r.extractable)throw TypeError("CryptoKey is not extractable");if(r.type!==e)throw TypeError(`key is not a ${e} key`);return Hy(Sn(new Uint8Array(await crypto.subtle.exportKey(t,r))),`${e.toUpperCase()} KEY`)},Lc=(e)=>zy("public","spki",e);var Pc=q(()=>{In();et()});function Nc(e){return Lc(e)}var qc=q(()=>{Pc()});async function Fc(e,t,r){if(!tt(e))throw TypeError("JWK must be an object");let n=Cc(e),i=Tn(r?.extractable),{alg:s}=n;if(t??=s,n.kty!=="oct"&&!t)throw TypeError('"alg" argument is required when "jwk.alg" is not present');switch(n.kty){case"oct":if(typeof n.k!="string")throw TypeError('missing "k" (Key Value) Parameter value');return Oe(n.k);case"AKP":{if(typeof s!="string"||!s)throw TypeError('missing "alg" (Algorithm) Parameter value');if(t!==s)throw TypeError("JWK alg and alg option value mismatch");return An(kn(t),n,i)}case"RSA":case"EC":case"OKP":return An(kn(t),n,i);default:throw new Z('Unsupported "kty" (Key Type) Parameter value')}}var jc=q(()=>{Yt();In();$c();_e();Zt()});function Kc(e){let t;if(typeof e=="string"){let n=e.split(".");(n.length===3||n.length===5)&&([t]=n)}else if(typeof e=="object"&&e)if("protected"in e)t=e.protected;else throw TypeError("Token does not contain a Protected Header");let r="Invalid Token or Protected Header formatting";if(typeof t!="string"||!t)throw TypeError(r);return vc(t,TypeError,r)}var Dc=q(()=>{Zt()});function Bc(e){if(typeof e!="string")throw new Q("JWTs must use Compact JWS serialization, JWT must be a string");let{1:t,length:r}=e.split(".");if(r===5)throw new Q("Only JWTs using Compact JWS serialization can be decoded");if(r!==3)throw new Q("Invalid JWT");if(!t)throw new Q("JWTs must contain a payload");let n;try{n=Oe(t)}catch(s){throw new Q("Failed to base64url decode the payload",{cause:s})}let i;try{i=JSON.parse(Xt.decode(n))}catch(s){throw new Q("Failed to parse the decoded payload as JSON",{cause:s})}if(!tt(i))throw new Q("Invalid JWT Claims Set");return i}var Uc=q(()=>{Yt();et();Zt();_e()});var $n=q(()=>{qc();jc();Dc();Uc()});var nr=p(function(sv,Wc){function rr(e){Error.call(this,e),Error.captureStackTrace(this,this.constructor),this.name="JwksError",this.message=e}rr.prototype=Object.create(Error.prototype);rr.prototype.constructor=rr;Wc.exports=rr});var Ln=p(function(ov,Gc){var Jc=($n(),{}),Vy=nr();function Xy(e){if(e.alg)return e.alg;if(e.kty==="RSA")return"RS256";if(e.kty==="EC")switch(e.crv){case"P-256":return"ES256";case"P-384":return"ES384";case"P-521":return"ES512"}if(e.kty==="OKP")switch(e.crv){case"Ed25519":case"Ed448":return"EdDSA"}throw new Vy("Unsupported JWK")}async function Yy(e){let t=[];e=e.filter(({use:r})=>r==="sig"||r===void 0).filter(({kty:r})=>r==="RSA"||r==="EC"||r==="OKP");for(let r of e)try{let n=await Fc({...r,ext:!0},Xy(r));if(n.type!=="public")continue;let i;switch(n[Symbol.toStringTag]){case"CryptoKey":{let s=await Nc(n);i=()=>s;break}case"KeyObject":default:i=()=>n.export({format:"pem",type:"spki"})}t.push({get publicKey(){return i()},get rsaPublicKey(){return i()},getPublicKey(){return i()},...typeof r.kid==="string"&&r.kid?{kid:r.kid}:void 0,...typeof r.alg==="string"&&r.alg?{alg:r.alg}:void 0})}catch(n){continue}return t}Gc.exports={retrieveSigningKeys:Yy}});var Pn=p(function(av,Mc){function ir(e){Error.call(this,e),Error.captureStackTrace(this,this.constructor),this.name="ArgumentError",this.message=e}ir.prototype=Object.create(Error.prototype);ir.prototype.constructor=ir;Mc.exports=ir});var zc=p(function(cv,Hc){var Zy=require("http"),Qy=require("https"),eE=Pn();Hc.exports.default=(e)=>{if(e.fetcher)return e.fetcher(e.uri);return new Promise((t,r)=>{let n;try{n=new URL(e.uri)}catch(h){throw new eE("Invalid JWKS URI: The provided URI is not a valid URL.")}let{hostname:i,port:s,protocol:o,pathname:c,search:u}=n,a=c+u,l={hostname:i,path:a,port:s,method:"GET",...e.headers&&{headers:{...e.headers}},...e.timeout&&{timeout:e.timeout},...e.agent&&{agent:e.agent}},m=(o==="https:"?Qy:Zy).request(l,(h)=>{let g="";h.setEncoding("utf8"),h.on("data",(d)=>{g+=d}),h.on("end",()=>{if(h.statusCode<200||h.statusCode>=300){let d=h.body&&(h.body.message||h.body)||h.statusMessage||`Http Error ${h.statusCode}`;r({errorMsg:d})}else try{t(g&&JSON.parse(g))}catch(d){r(d)}})});m.on("timeout",()=>m.destroy()).on("error",(h)=>r(h)).end()})}});var ar=p(function(or){var Xc=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),tE=Xc((e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.tracing=e.metrics=void 0;var t=require("node:diagnostics_channel");e.metrics=(0,t.channel)("lru-cache:metrics"),e.tracing=(0,t.tracingChannel)("lru-cache")}),rE=Xc((e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.defaultPerf=void 0,e.defaultPerf=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date});Object.defineProperty(or,"__esModule",{value:!0});or.LRUCache=void 0;var _=tE(),nE=rE(),Nn=()=>_.metrics.hasSubscribers||_.tracing.hasSubscribers,Yc=new Set,Vc=typeof process=="object"&&process?process:{},iE=(e,t,r,n)=>{typeof Vc.emitWarning=="function"?Vc.emitWarning(e,t,r,n):console.error(`[${r}] ${t}: ${e}`)},sE=(e)=>!Yc.has(e),ae=(e)=>!!e&&e===Math.floor(e)&&e>0&&isFinite(e),Zc=(e)=>ae(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?sr:null:null,sr=class extends Array{constructor(e){super(e),this.fill(0)}},oE=class e{heap;length;static#a=!1;static create(t){let r=Zc(t);if(!r)return[];e.#a=!0;let n=new e(t,r);return e.#a=!1,n}constructor(t,r){if(!e.#a)throw TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},aE=class e{#a;#f;#g;#_;#y;#N;#q;#E;get perf(){return this.#E}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;backgroundFetchSize;#i;#w;#n;#r;#e;#u;#h;#c;#s;#S;#o;#b;#v;#p;#d;#T;#F;#l;#O;static unsafeExposeInternals(t){return{starts:t.#v,ttls:t.#p,autopurgeTimers:t.#d,sizes:t.#b,keyMap:t.#n,keyList:t.#r,valList:t.#e,next:t.#u,prev:t.#h,get head(){return t.#c},get tail(){return t.#s},free:t.#S,isBackgroundFetch:(r)=>t.#t(r),backgroundFetch:(r,n,i,s)=>t.#D(r,n,i,s),moveToTail:(r)=>t.#P(r),indexes:(r)=>t.#A(r),rindexes:(r)=>t.#I(r),isStale:(r)=>t.#m(r)}}get max(){return this.#a}get maxSize(){return this.#f}get calculatedSize(){return this.#w}get size(){return this.#i}get fetchMethod(){return this.#N}get memoMethod(){return this.#q}get dispose(){return this.#g}get onInsert(){return this.#_}get disposeAfter(){return this.#y}constructor(t){let{max:r=0,ttl:n,ttlResolution:i=1,ttlAutopurge:s,updateAgeOnGet:o,updateAgeOnHas:c,allowStale:u,dispose:a,onInsert:l,disposeAfter:f,noDisposeOnSet:m,noUpdateTTL:h,maxSize:g=0,maxEntrySize:d=0,sizeCalculation:b,fetchMethod:w,memoMethod:S,noDeleteOnFetchRejection:A,noDeleteOnStaleGet:T,allowStaleOnFetchRejection:R,allowStaleOnFetchAbort:K,ignoreFetchAbort:G,backgroundFetchSize:z=1,perf:V}=t;if(this.backgroundFetchSize=z,V!==void 0&&typeof V?.now!="function")throw TypeError("perf option must have a now() method if specified");if(this.#E=V??nE.defaultPerf,r!==0&&!ae(r))throw TypeError("max option must be a nonnegative integer");let le=r?Zc(r):Array;if(!le)throw Error("invalid max value: "+r);if(this.#a=r,this.#f=g,this.maxEntrySize=d||this.#f,this.sizeCalculation=b,this.sizeCalculation){if(!this.#f&&!this.maxEntrySize)throw TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw TypeError("sizeCalculation set to non-function")}if(S!==void 0&&typeof S!="function")throw TypeError("memoMethod must be a function if defined");if(this.#q=S,w!==void 0&&typeof w!="function")throw TypeError("fetchMethod must be a function if specified");if(this.#N=w,this.#F=!!w,this.#n=new Map,this.#r=Array.from({length:r}).fill(void 0),this.#e=Array.from({length:r}).fill(void 0),this.#u=new le(r),this.#h=new le(r),this.#c=0,this.#s=0,this.#S=oE.create(r),this.#i=0,this.#w=0,typeof a=="function"&&(this.#g=a),typeof l=="function"&&(this.#_=l),typeof f=="function"?(this.#y=f,this.#o=[]):(this.#y=void 0,this.#o=void 0),this.#T=!!this.#g,this.#O=!!this.#_,this.#l=!!this.#y,this.noDisposeOnSet=!!m,this.noUpdateTTL=!!h,this.noDeleteOnFetchRejection=!!A,this.allowStaleOnFetchRejection=!!R,this.allowStaleOnFetchAbort=!!K,this.ignoreFetchAbort=!!G,this.maxEntrySize!==0){if(this.#f!==0&&!ae(this.#f))throw TypeError("maxSize must be a positive integer if specified");if(!ae(this.maxEntrySize))throw TypeError("maxEntrySize must be a positive integer if specified");this.#z()}if(this.allowStale=!!u,this.noDeleteOnStaleGet=!!T,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!c,this.ttlResolution=ae(i)||i===0?i:1,this.ttlAutopurge=!!s,this.ttl=n||0,this.ttl){if(!ae(this.ttl))throw TypeError("ttl must be a positive integer if specified");this.#B()}if(this.#a===0&&this.ttl===0&&this.#f===0)throw TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#a&&!this.#f){let ct="LRU_CACHE_UNBOUNDED";sE(ct)&&(Yc.add(ct),iE("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",ct,e))}}getRemainingTTL(t){return this.#n.has(t)?1/0:0}#B(){let t=new sr(this.#a),r=new sr(this.#a);this.#p=t,this.#v=r;let n=this.ttlAutopurge?Array.from({length:this.#a}):void 0;this.#d=n,this.#U=(u,a,l=this.#E.now())=>{r[u]=a!==0?l:0,t[u]=a,i(u,a)},this.#k=(u)=>{r[u]=t[u]!==0?this.#E.now():0,i(u,t[u])};let i=this.ttlAutopurge?(u,a)=>{if(n?.[u]&&(clearTimeout(n[u]),n[u]=void 0),a&&a!==0&&n){let l=setTimeout(()=>{this.#m(u)?(this.#C(this.#r[u],"expire"),n[u]=void 0):i(u,c(u))},a+1);l.unref&&l.unref(),n[u]=l}}:()=>{};this.#R=(u,a)=>{if(t[a]){let l=t[a],f=r[a];if(!l||!f)return;u.ttl=l,u.start=f,u.now=s||o();let m=u.now-f;u.remainingTTL=l-m}};let s=0,o=()=>{let u=this.#E.now();if(this.ttlResolution>0){s=u;let a=setTimeout(()=>s=0,this.ttlResolution);a.unref&&a.unref()}return u};this.getRemainingTTL=(u)=>{let a=this.#n.get(u);return a===void 0?0:c(a)};let c=(u)=>{let a=t[u],l=r[u];if(!a||!l)return 1/0;let f=(s||o())-l;return a-f};this.#m=(u)=>{let a=r[u],l=t[u];return!!l&&!!a&&(s||o())-a>l}}#k=()=>{};#R=()=>{};#U=()=>{};#m=()=>!1;#z(){let t=new sr(this.#a);this.#w=0,this.#b=t,this.#$=(r)=>{this.#w-=t[r],t[r]=0},this.#W=(r,n,i,s)=>{if(!ae(i)){if(this.#t(n))return this.backgroundFetchSize;if(s){if(typeof s!="function")throw TypeError("sizeCalculation must be a function");if(i=s(n,r),!ae(i))throw TypeError("sizeCalculation return invalid (expect positive integer)")}else throw TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.")}return i},this.#j=(r,n,i)=>{if(t[r]=n,this.#f){let s=this.#f-t[r];for(;this.#w>s;)this.#K(!0)}this.#w+=t[r],i&&(i.entrySize=n,i.totalCalculatedSize=this.#w)}}#$=(t)=>{};#j=(t,r,n)=>{};#W=(t,r,n,i)=>{if(n||i)throw TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#A({allowStale:t=this.allowStale}={}){if(this.#i)for(let r=this.#s;this.#J(r)&&((t||!this.#m(r))&&(yield r),r!==this.#c);)r=this.#h[r]}*#I({allowStale:t=this.allowStale}={}){if(this.#i)for(let r=this.#c;this.#J(r)&&((t||!this.#m(r))&&(yield r),r!==this.#s);)r=this.#u[r]}#J(t){return t!==void 0&&this.#n.get(this.#r[t])===t}*entries(){for(let t of this.#A())this.#e[t]!==void 0&&this.#r[t]!==void 0&&!this.#t(this.#e[t])&&(yield[this.#r[t],this.#e[t]])}*rentries(){for(let t of this.#I())this.#e[t]!==void 0&&this.#r[t]!==void 0&&!this.#t(this.#e[t])&&(yield[this.#r[t],this.#e[t]])}*keys(){for(let t of this.#A()){let r=this.#r[t];r!==void 0&&!this.#t(this.#e[t])&&(yield r)}}*rkeys(){for(let t of this.#I()){let r=this.#r[t];r!==void 0&&!this.#t(this.#e[t])&&(yield r)}}*values(){for(let t of this.#A())this.#e[t]!==void 0&&!this.#t(this.#e[t])&&(yield this.#e[t])}*rvalues(){for(let t of this.#I())this.#e[t]!==void 0&&!this.#t(this.#e[t])&&(yield this.#e[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,r={}){for(let n of this.#A()){let i=this.#e[n],s=this.#t(i)?i.__staleWhileFetching:i;if(s!==void 0&&t(s,this.#r[n],this))return this.#L(this.#r[n],r)}}forEach(t,r=this){for(let n of this.#A()){let i=this.#e[n],s=this.#t(i)?i.__staleWhileFetching:i;s!==void 0&&t.call(r,s,this.#r[n],this)}}rforEach(t,r=this){for(let n of this.#I()){let i=this.#e[n],s=this.#t(i)?i.__staleWhileFetching:i;s!==void 0&&t.call(r,s,this.#r[n],this)}}purgeStale(){let t=!1;for(let r of this.#I({allowStale:!0}))this.#m(r)&&(this.#C(this.#r[r],"expire"),t=!0);return t}info(t){let r=this.#n.get(t);if(r===void 0)return;let n=this.#e[r],i=this.#t(n)?n.__staleWhileFetching:n;if(i===void 0)return;let s={value:i};if(this.#p&&this.#v){let o=this.#p[r],c=this.#v[r];if(o&&c){let u=o-(this.#E.now()-c);s.ttl=u,s.start=Date.now()}}return this.#b&&(s.size=this.#b[r]),s}dump(){let t=[];for(let r of this.#A({allowStale:!0})){let n=this.#r[r],i=this.#e[r],s=this.#t(i)?i.__staleWhileFetching:i;if(s===void 0||n===void 0)continue;let o={value:s};if(this.#p&&this.#v){o.ttl=this.#p[r];let c=this.#E.now()-this.#v[r];o.start=Math.floor(Date.now()-c)}this.#b&&(o.size=this.#b[r]),t.unshift([n,o])}return t}load(t){this.clear();for(let[r,n]of t){if(n.start){let i=Date.now()-n.start;n.start=this.#E.now()-i}this.#x(r,n.value,n)}}set(t,r,n={}){let{status:i=_.metrics.hasSubscribers?{}:void 0}=n;n.status=i,i&&(i.op="set",i.key=t,r!==void 0&&(i.value=r),i.cache=this);let s=this.#x(t,r,n);return i&&_.metrics.hasSubscribers&&_.metrics.publish(i),s}#x(t,r,n,i){let{ttl:s=this.ttl,start:o,noDisposeOnSet:c=this.noDisposeOnSet,sizeCalculation:u=this.sizeCalculation,status:a}=n,l=this.#t(r);if(r===void 0)return a&&(a.set="deleted"),this.delete(t),this;let{noUpdateTTL:f=this.noUpdateTTL}=n;a&&!l&&(a.value=r);let m=this.#W(t,r,n.size||0,u,a);if(this.maxEntrySize&&m>this.maxEntrySize)return this.#C(t,"set"),a&&(a.set="miss",a.maxEntrySizeExceeded=!0),this;let h=this.#i===0?void 0:this.#n.get(t);if(h===void 0)h=this.#i===0?this.#s:this.#S.length!==0?this.#S.pop():this.#i===this.#a?this.#K(!1):this.#i,this.#r[h]=t,this.#e[h]=r,this.#n.set(t,h),this.#u[this.#s]=h,this.#h[h]=this.#s,this.#s=h,this.#i++,this.#j(h,m,a),a&&(a.set="add"),f=!1,this.#O&&!l&&this.#_?.(r,t,"add");else{this.#P(h);let g=this.#e[h];if(r!==g){if(!c)if(this.#t(g)){g!==i&&g.__abortController.abort(Error("replaced"));let{__staleWhileFetching:d}=g;d!==void 0&&d!==r&&(this.#T&&this.#g?.(d,t,"set"),this.#l&&this.#o?.push([d,t,"set"]))}else this.#T&&this.#g?.(g,t,"set"),this.#l&&this.#o?.push([g,t,"set"]);if(this.#$(h),this.#j(h,m,a),this.#e[h]=r,!l){let d=g&&this.#t(g)?g.__staleWhileFetching:g,b=d===void 0?"add":r!==d?"replace":"update";a&&(a.set=b,d!==void 0&&(a.oldValue=d)),this.#O&&this.onInsert?.(r,t,b)}}else l||(a&&(a.set="update"),this.#O&&this.onInsert?.(r,t,"update"))}if(s!==0&&!this.#p&&this.#B(),this.#p&&(f||this.#U(h,s,o),a&&this.#R(a,h)),!c&&this.#l&&this.#o){let g=this.#o,d;for(;d=g?.shift();)this.#y?.(...d)}return this}pop(){try{for(;this.#i;){let t=this.#e[this.#c];if(this.#K(!0),this.#t(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#l&&this.#o){let t=this.#o,r;for(;r=t?.shift();)this.#y?.(...r)}}}#K(t){let r=this.#c,n=this.#r[r],i=this.#e[r],s=this.#t(i);s&&i.__abortController.abort(Error("evicted"));let o=s?i.__staleWhileFetching:i;return(this.#T||this.#l)&&o!==void 0&&(this.#T&&this.#g?.(o,n,"evict"),this.#l&&this.#o?.push([o,n,"evict"])),this.#$(r),this.#d?.[r]&&(clearTimeout(this.#d[r]),this.#d[r]=void 0),t&&(this.#r[r]=void 0,this.#e[r]=void 0,this.#S.push(r)),this.#i===1?(this.#c=this.#s=0,this.#S.length=0):this.#c=this.#u[r],this.#n.delete(n),this.#i--,r}has(t,r={}){let{status:n=_.metrics.hasSubscribers?{}:void 0}=r;r.status=n,n&&(n.op="has",n.key=t,n.cache=this);let i=this.#V(t,r);return _.metrics.hasSubscribers&&_.metrics.publish(n),i}#V(t,r={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:i}=r,s=this.#n.get(t);if(s!==void 0){let o=this.#e[s];if(this.#t(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#m(s))i&&(i.has="stale",this.#R(i,s));else return n&&this.#k(s),i&&(i.has="hit",this.#R(i,s)),!0}else i&&(i.has="miss");return!1}peek(t,r={}){let{status:n=Nn()?{}:void 0}=r;n&&(n.op="peek",n.key=t,n.cache=this),r.status=n;let i=this.#X(t,r);return _.metrics.hasSubscribers&&_.metrics.publish(n),i}#X(t,r){let{status:n,allowStale:i=this.allowStale}=r,s=this.#n.get(t);if(s===void 0||!i&&this.#m(s)){n&&(n.peek=s===void 0?"miss":"stale");return}let o=this.#e[s],c=this.#t(o)?o.__staleWhileFetching:o;return n&&(c!==void 0?(n.peek="hit",n.value=c):n.peek="miss"),c}#D(t,r,n,i){let s=r===void 0?void 0:this.#e[r];if(this.#t(s))return s;let o=new AbortController,{signal:c}=n;c?.addEventListener("abort",()=>o.abort(c.reason),{signal:o.signal});let u={signal:o.signal,options:n,context:i},a=(d,b=!1)=>{let{aborted:w}=o.signal,S=n.ignoreFetchAbort&&d!==void 0,A=n.ignoreFetchAbort||!!(n.allowStaleOnFetchAbort&&d!==void 0);if(n.status&&(w&&!b?(n.status.fetchAborted=!0,n.status.fetchError=o.signal.reason,S&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),w&&!S&&!b)return f(o.signal.reason,A);let T=h,R=this.#e[r];return(R===h||R===void 0&&S&&b)&&(d===void 0?T.__staleWhileFetching!==void 0?this.#e[r]=T.__staleWhileFetching:this.#C(t,"fetch"):(n.status&&(n.status.fetchUpdated=!0),this.#x(t,d,u.options,T))),d},l=(d)=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=d),f(d,!1)),f=(d,b)=>{let{aborted:w}=o.signal,S=w&&n.allowStaleOnFetchAbort,A=S||n.allowStaleOnFetchRejection,T=A||n.noDeleteOnFetchRejection,R=h;if(this.#e[r]===h&&(!T||!b&&R.__staleWhileFetching===void 0?this.#C(t,"fetch"):S||(this.#e[r]=R.__staleWhileFetching)),A)return n.status&&R.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),R.__staleWhileFetching;if(R.__returned===R)throw d},m=(d,b)=>{let w=this.#N?.(t,s,u);o.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(d(void 0),n.allowStaleOnFetchAbort&&(d=(S)=>a(S,!0)))}),w&&w instanceof Promise?w.then((S)=>d(S===void 0?void 0:S),b):w!==void 0&&d(w)};n.status&&(n.status.fetchDispatched=!0);let h=new Promise(m).then(a,l),g=Object.assign(h,{__abortController:o,__staleWhileFetching:s,__returned:void 0});return r===void 0?(this.#x(t,g,{...u.options,status:void 0}),r=this.#n.get(t)):this.#e[r]=g,g}#t(t){if(!this.#F)return!1;let r=t;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof AbortController}fetch(t,r={}){let n=_.tracing.hasSubscribers,{status:i=Nn()?{}:void 0}=r;r.status=i,i&&r.context&&(i.context=r.context);let s=this.#G(t,r);return i&&n&&(i.trace=!0,_.tracing.tracePromise(()=>s,i).catch(()=>{})),s}async#G(t,r={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:c=this.noDisposeOnSet,size:u=0,sizeCalculation:a=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:m=this.allowStaleOnFetchRejection,ignoreFetchAbort:h=this.ignoreFetchAbort,allowStaleOnFetchAbort:g=this.allowStaleOnFetchAbort,context:d,forceRefresh:b=!1,status:w,signal:S}=r;if(w&&(w.op="fetch",w.key=t,b&&(w.forceRefresh=!0),w.cache=this),!this.#F)return w&&(w.fetch="get"),this.#L(t,{allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:s,status:w});let A={allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:s,ttl:o,noDisposeOnSet:c,size:u,sizeCalculation:a,noUpdateTTL:l,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:m,allowStaleOnFetchAbort:g,ignoreFetchAbort:h,status:w,signal:S},T=this.#n.get(t);if(T===void 0){w&&(w.fetch="miss");let R=this.#D(t,T,A,d);return R.__returned=R}else{let R=this.#e[T];if(this.#t(R)){let V=n&&R.__staleWhileFetching!==void 0;return w&&(w.fetch="inflight",V&&(w.returnedStale=!0)),V?R.__staleWhileFetching:R.__returned=R}let K=this.#m(T);if(!b&&!K)return w&&(w.fetch="hit"),this.#P(T),i&&this.#k(T),w&&this.#R(w,T),R;let G=this.#D(t,T,A,d),z=G.__staleWhileFetching!==void 0&&n;return w&&(w.fetch=K?"stale":"refresh",z&&K&&(w.returnedStale=!0)),z?G.__staleWhileFetching:G.__returned=G}}forceFetch(t,r={}){let n=_.tracing.hasSubscribers,{status:i=Nn()?{}:void 0}=r;r.status=i,i&&r.context&&(i.context=r.context);let s=this.#Y(t,r);return i&&n&&(i.trace=!0,_.tracing.tracePromise(()=>s,i).catch(()=>{})),s}async#Y(t,r={}){let n=await this.#G(t,r);if(n===void 0)throw Error("fetch() returned undefined");return n}memo(t,r={}){let{status:n=_.metrics.hasSubscribers?{}:void 0}=r;r.status=n,n&&(n.op="memo",n.key=t,r.context&&(n.context=r.context),n.cache=this);let i=this.#Z(t,r);return n&&(n.value=i),_.metrics.hasSubscribers&&_.metrics.publish(n),i}#Z(t,r={}){let n=this.#q;if(!n)throw Error("no memoMethod provided to constructor");let{context:i,status:s,forceRefresh:o,...c}=r;s&&o&&(s.forceRefresh=!0);let u=this.#L(t,c),a=o||u===void 0;if(s&&(s.memo=a?"miss":"hit",a||(s.value=u)),!a)return u;let l=n(t,u,{options:c,context:i});return s&&(s.value=l),this.#x(t,l,c),l}get(t,r={}){let{status:n=_.metrics.hasSubscribers?{}:void 0}=r;r.status=n,n&&(n.op="get",n.key=t,n.cache=this);let i=this.#L(t,r);return n&&(i!==void 0&&(n.value=i),_.metrics.hasSubscribers&&_.metrics.publish(n)),i}#L(t,r={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:o}=r,c=this.#n.get(t);if(c===void 0){o&&(o.get="miss");return}let u=this.#e[c],a=this.#t(u);return o&&this.#R(o,c),this.#m(c)?a?(o&&(o.get="stale-fetching"),n&&u.__staleWhileFetching!==void 0?(o&&(o.returnedStale=!0),u.__staleWhileFetching):void 0):(s||this.#C(t,"expire"),o&&(o.get="stale"),n?(o&&(o.returnedStale=!0),u):void 0):(o&&(o.get=a?"fetching":"hit"),this.#P(c),i&&this.#k(c),a?u.__staleWhileFetching:u)}#M(t,r){this.#h[r]=t,this.#u[t]=r}#P(t){t!==this.#s&&(t===this.#c?this.#c=this.#u[t]:this.#M(this.#h[t],this.#u[t]),this.#M(this.#s,t),this.#s=t)}delete(t){return this.#C(t,"delete")}#C(t,r){_.metrics.hasSubscribers&&_.metrics.publish({op:"delete",delete:r,key:t,cache:this});let n=!1;if(this.#i!==0){let i=this.#n.get(t);if(i!==void 0)if(this.#d?.[i]&&(clearTimeout(this.#d[i]),this.#d[i]=void 0),n=!0,this.#i===1)this.#H(r);else{this.#$(i);let s=this.#e[i];if(this.#t(s)?s.__abortController.abort(Error("deleted")):(this.#T||this.#l)&&(this.#T&&this.#g?.(s,t,r),this.#l&&this.#o?.push([s,t,r])),this.#n.delete(t),this.#r[i]=void 0,this.#e[i]=void 0,i===this.#s)this.#s=this.#h[i];else if(i===this.#c)this.#c=this.#u[i];else{let o=this.#h[i];this.#u[o]=this.#u[i];let c=this.#u[i];this.#h[c]=this.#h[i]}this.#i--,this.#S.push(i)}}if(this.#l&&this.#o?.length){let i=this.#o,s;for(;s=i?.shift();)this.#y?.(...s)}return n}clear(){return this.#H("delete")}#H(t){for(let r of this.#I({allowStale:!0})){let n=this.#e[r];if(this.#t(n))n.__abortController.abort(Error("deleted"));else{let i=this.#r[r];this.#T&&this.#g?.(n,i,t),this.#l&&this.#o?.push([n,i,t])}}if(this.#n.clear(),this.#e.fill(void 0),this.#r.fill(void 0),this.#p&&this.#v){this.#p.fill(0),this.#v.fill(0);for(let r of this.#d??[])r!==void 0&&clearTimeout(r);this.#d?.fill(void 0)}if(this.#b&&this.#b.fill(0),this.#c=0,this.#s=0,this.#S.length=0,this.#w=0,this.#i=0,this.#l&&this.#o){let r=this.#o,n;for(;n=r?.shift();)this.#y?.(...n)}}};or.LRUCache=aE});var Xn=p(function(it,Pe){var cE=200,lu="__lodash_hash_undefined__",fu=9007199254740991,Wn="[object Arguments]",uE="[object Array]",hu="[object Boolean]",pu="[object Date]",lE="[object Error]",Jn="[object Function]",du="[object GeneratorFunction]",cr="[object Map]",mu="[object Number]",Gn="[object Object]",Qc="[object Promise]",gu="[object RegExp]",ur="[object Set]",yu="[object String]",Eu="[object Symbol]",Fn="[object WeakMap]",wu="[object ArrayBuffer]",lr="[object DataView]",Su="[object Float32Array]",bu="[object Float64Array]",vu="[object Int8Array]",Tu="[object Int16Array]",Au="[object Int32Array]",Iu="[object Uint8Array]",Cu="[object Uint8ClampedArray]",Ru="[object Uint16Array]",xu="[object Uint32Array]",fE=/[\\^$.*+?()[\]{}|]/g,hE=/\w*$/,pE=/^\[object .+?Constructor\]$/,dE=/^(?:0|[1-9]\d*)$/,C={};C[Wn]=C[uE]=C[wu]=C[lr]=C[hu]=C[pu]=C[Su]=C[bu]=C[vu]=C[Tu]=C[Au]=C[cr]=C[mu]=C[Gn]=C[gu]=C[ur]=C[yu]=C[Eu]=C[Iu]=C[Cu]=C[Ru]=C[xu]=!0;C[lE]=C[Jn]=C[Fn]=!1;var mE=typeof global=="object"&&global&&global.Object===Object&&global,gE=typeof self=="object"&&self&&self.Object===Object&&self,ee=mE||gE||Function("return this")(),_u=typeof it=="object"&&it&&!it.nodeType&&it,eu=_u&&typeof Pe=="object"&&Pe&&!Pe.nodeType&&Pe,yE=eu&&eu.exports===_u;function EE(e,t){return e.set(t[0],t[1]),e}function wE(e,t){return e.add(t),e}function SE(e,t){var r=-1,n=e?e.length:0;while(++r<n)if(t(e[r],r,e)===!1)break;return e}function bE(e,t){var r=-1,n=t.length,i=e.length;while(++r<n)e[i+r]=t[r];return e}function Ou(e,t,r,n){var i=-1,s=e?e.length:0;if(n&&s)r=e[++i];while(++i<s)r=t(r,e[i],i,e);return r}function vE(e,t){var r=-1,n=Array(e);while(++r<e)n[r]=t(r);return n}function TE(e,t){return e==null?void 0:e[t]}function ku(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(r){}return t}function tu(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function Mn(e,t){return function(r){return e(t(r))}}function ru(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var AE=Array.prototype,IE=Function.prototype,fr=Object.prototype,qn=ee["__core-js_shared__"],nu=function(){var e=/[^.]+$/.exec(qn&&qn.keys&&qn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),$u=IE.toString,{hasOwnProperty:ce,toString:hr}=fr,CE=RegExp("^"+$u.call(ce).replace(fE,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),iu=yE?ee.Buffer:void 0,{Symbol:su,Uint8Array:ou}=ee,RE=Mn(Object.getPrototypeOf,Object),xE=Object.create,_E=fr.propertyIsEnumerable,OE=AE.splice,au=Object.getOwnPropertySymbols,kE=iu?iu.isBuffer:void 0,$E=Mn(Object.keys,Object),jn=Fe(ee,"DataView"),st=Fe(ee,"Map"),Kn=Fe(ee,"Promise"),Dn=Fe(ee,"Set"),Bn=Fe(ee,"WeakMap"),ot=Fe(Object,"create"),LE=me(jn),PE=me(st),NE=me(Kn),qE=me(Dn),FE=me(Bn),cu=su?su.prototype:void 0,uu=cu?cu.valueOf:void 0;function de(e){var t=-1,r=e?e.length:0;this.clear();while(++t<r){var n=e[t];this.set(n[0],n[1])}}function jE(){this.__data__=ot?ot(null):{}}function KE(e){return this.has(e)&&delete this.__data__[e]}function DE(e){var t=this.__data__;if(ot){var r=t[e];return r===lu?void 0:r}return ce.call(t,e)?t[e]:void 0}function BE(e){var t=this.__data__;return ot?t[e]!==void 0:ce.call(t,e)}function UE(e,t){var r=this.__data__;return r[e]=ot&&t===void 0?lu:t,this}de.prototype.clear=jE;de.prototype.delete=KE;de.prototype.get=DE;de.prototype.has=BE;de.prototype.set=UE;function te(e){var t=-1,r=e?e.length:0;this.clear();while(++t<r){var n=e[t];this.set(n[0],n[1])}}function WE(){this.__data__=[]}function JE(e){var t=this.__data__,r=pr(t,e);if(r<0)return!1;var n=t.length-1;if(r==n)t.pop();else OE.call(t,r,1);return!0}function GE(e){var t=this.__data__,r=pr(t,e);return r<0?void 0:t[r][1]}function ME(e){return pr(this.__data__,e)>-1}function HE(e,t){var r=this.__data__,n=pr(r,e);if(n<0)r.push([e,t]);else r[n][1]=t;return this}te.prototype.clear=WE;te.prototype.delete=JE;te.prototype.get=GE;te.prototype.has=ME;te.prototype.set=HE;function Ne(e){var t=-1,r=e?e.length:0;this.clear();while(++t<r){var n=e[t];this.set(n[0],n[1])}}function zE(){this.__data__={hash:new de,map:new(st||te),string:new de}}function VE(e){return dr(this,e).delete(e)}function XE(e){return dr(this,e).get(e)}function YE(e){return dr(this,e).has(e)}function ZE(e,t){return dr(this,e).set(e,t),this}Ne.prototype.clear=zE;Ne.prototype.delete=VE;Ne.prototype.get=XE;Ne.prototype.has=YE;Ne.prototype.set=ZE;function qe(e){this.__data__=new te(e)}function QE(){this.__data__=new te}function e0(e){return this.__data__.delete(e)}function t0(e){return this.__data__.get(e)}function r0(e){return this.__data__.has(e)}function n0(e,t){var r=this.__data__;if(r instanceof te){var n=r.__data__;if(!st||n.length<cE-1)return n.push([e,t]),this;r=this.__data__=new Ne(n)}return r.set(e,t),this}qe.prototype.clear=QE;qe.prototype.delete=e0;qe.prototype.get=t0;qe.prototype.has=r0;qe.prototype.set=n0;function i0(e,t){var r=zn(e)||x0(e)?vE(e.length,String):[],n=r.length,i=!!n;for(var s in e)if((t||ce.call(e,s))&&!(i&&(s=="length"||A0(s,n))))r.push(s);return r}function Lu(e,t,r){var n=e[t];if(!(ce.call(e,t)&&Fu(n,r))||r===void 0&&!(t in e))e[t]=r}function pr(e,t){var r=e.length;while(r--)if(Fu(e[r][0],t))return r;return-1}function s0(e,t){return e&&Pu(t,Vn(t),e)}function Un(e,t,r,n,i,s,o){var c;if(n)c=s?n(e,i,s,o):n(e);if(c!==void 0)return c;if(!mr(e))return e;var u=zn(e);if(u){if(c=b0(e),!t)return E0(e,c)}else{var a=pe(e),l=a==Jn||a==du;if(O0(e))return f0(e,t);if(a==Gn||a==Wn||l&&!s){if(ku(e))return s?e:{};if(c=v0(l?{}:e),!t)return w0(e,s0(c,e))}else{if(!C[a])return s?e:{};c=T0(e,a,Un,t)}}o||(o=new qe);var f=o.get(e);if(f)return f;if(o.set(e,c),!u)var m=r?S0(e):Vn(e);return SE(m||e,function(h,g){if(m)g=h,h=e[g];Lu(c,g,Un(h,t,r,n,g,e,o))}),c}function o0(e){return mr(e)?xE(e):{}}function a0(e,t,r){var n=t(e);return zn(e)?n:bE(n,r(e))}function c0(e){return hr.call(e)}function u0(e){if(!mr(e)||C0(e))return!1;var t=Ku(e)||ku(e)?CE:pE;return t.test(me(e))}function l0(e){if(!qu(e))return $E(e);var t=[];for(var r in Object(e))if(ce.call(e,r)&&r!="constructor")t.push(r);return t}function f0(e,t){if(t)return e.slice();var r=new e.constructor(e.length);return e.copy(r),r}function Hn(e){var t=new e.constructor(e.byteLength);return new ou(t).set(new ou(e)),t}function h0(e,t){var r=t?Hn(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}function p0(e,t,r){var n=t?r(tu(e),!0):tu(e);return Ou(n,EE,new e.constructor)}function d0(e){var t=new e.constructor(e.source,hE.exec(e));return t.lastIndex=e.lastIndex,t}function m0(e,t,r){var n=t?r(ru(e),!0):ru(e);return Ou(n,wE,new e.constructor)}function g0(e){return uu?Object(uu.call(e)):{}}function y0(e,t){var r=t?Hn(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function E0(e,t){var r=-1,n=e.length;t||(t=Array(n));while(++r<n)t[r]=e[r];return t}function Pu(e,t,r,n){r||(r={});var i=-1,s=t.length;while(++i<s){var o=t[i],c=n?n(r[o],e[o],o,r,e):void 0;Lu(r,o,c===void 0?e[o]:c)}return r}function w0(e,t){return Pu(e,Nu(e),t)}function S0(e){return a0(e,Vn,Nu)}function dr(e,t){var r=e.__data__;return I0(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Fe(e,t){var r=TE(e,t);return u0(r)?r:void 0}var Nu=au?Mn(au,Object):L0,pe=c0;if(jn&&pe(new jn(new ArrayBuffer(1)))!=lr||st&&pe(new st)!=cr||Kn&&pe(Kn.resolve())!=Qc||Dn&&pe(new Dn)!=ur||Bn&&pe(new Bn)!=Fn)pe=function(e){var t=hr.call(e),r=t==Gn?e.constructor:void 0,n=r?me(r):void 0;if(n)switch(n){case LE:return lr;case PE:return cr;case NE:return Qc;case qE:return ur;case FE:return Fn}return t};function b0(e){var t=e.length,r=e.constructor(t);if(t&&typeof e[0]=="string"&&ce.call(e,"index"))r.index=e.index,r.input=e.input;return r}function v0(e){return typeof e.constructor=="function"&&!qu(e)?o0(RE(e)):{}}function T0(e,t,r,n){var i=e.constructor;switch(t){case wu:return Hn(e);case hu:case pu:return new i(+e);case lr:return h0(e,n);case Su:case bu:case vu:case Tu:case Au:case Iu:case Cu:case Ru:case xu:return y0(e,n);case cr:return p0(e,n,r);case mu:case yu:return new i(e);case gu:return d0(e);case ur:return m0(e,n,r);case Eu:return g0(e)}}function A0(e,t){return t=t==null?fu:t,!!t&&(typeof e=="number"||dE.test(e))&&(e>-1&&e%1==0&&e<t)}function I0(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function C0(e){return!!nu&&nu in e}function qu(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||fr;return e===r}function me(e){if(e!=null){try{return $u.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function R0(e){return Un(e,!0,!0)}function Fu(e,t){return e===t||e!==e&&t!==t}function x0(e){return _0(e)&&ce.call(e,"callee")&&(!_E.call(e,"callee")||hr.call(e)==Wn)}var zn=Array.isArray;function ju(e){return e!=null&&k0(e.length)&&!Ku(e)}function _0(e){return $0(e)&&ju(e)}var O0=kE||P0;function Ku(e){var t=mr(e)?hr.call(e):"";return t==Jn||t==du}function k0(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=fu}function mr(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function $0(e){return!!e&&typeof e=="object"}function Vn(e){return ju(e)?i0(e):l0(e)}function L0(){return[]}function P0(){return!1}Pe.exports=R0});var Yn=p(function(gr){Object.defineProperty(gr,"__esModule",{value:!0});gr.deepFreeze=void 0;function Du(e){if(e)Object.freeze(e),Object.getOwnPropertyNames(e).forEach(function(t){if(e.hasOwnProperty(t)&&e[t]!==null&&(typeof e[t]==="object"||typeof e[t]==="function")&&e[t].constructor!==Buffer&&!Object.isFrozen(e[t]))Du(e[t])});return e}gr.deepFreeze=Du});var Ju=p(function(je){var N0=je&&je.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(je,"__esModule",{value:!0});je.syncMemoizer=void 0;var Uu=ar(),Wu=require("events"),Bu=N0(Xn()),yr=Yn();function q0(e){let t=new Uu.LRUCache(e),{load:r,hash:n,bypass:i,itemTTL:s,freeze:o,clone:c}=e,u=new Wu.EventEmitter,a=Object.assign({del:l,reset:()=>t.clear(),keys:()=>[...t.keys()],on:u.on.bind(u),once:u.once.bind(u)},e);if(e.disable)return Object.assign(r,a);function l(){let d=n(...arguments);t.delete(d)}function f(d,...b){u.emit(d,...b)}function m(d){return d&&d.then&&typeof d.then==="function"}function h(d){let b=d;if(c)if(m(b))b=b.then(Bu.default);else b=(0,Bu.default)(b);if(o)if(m(b))b=b.then(yr.deepFreeze);else yr.deepFreeze(b);return b}return Object.assign(function(...d){if(i&&i(...d))return f("miss",...d),r(...d);var b=n(...d),w=t.get(b);if(w)return f("hit",...d),h(w);f("miss",...d);let S=r(...d);if(s)t.set(b,S,{ttl:s(...d.concat([S]))});else t.set(b,S);return h(S)},a)}je.syncMemoizer=q0});var Xu=p(function(Ke){var F0=Ke&&Ke.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ke,"__esModule",{value:!0});Ke.asyncMemoizer=void 0;var Gu=ar(),Mu=require("events"),j0=F0(Xn()),Hu=Yn(),zu=Ju();function Vu(e){let t=new Gu.LRUCache(e),{load:r,hash:n,bypass:i,itemTTL:s,freeze:o,clone:c}=e,u=e.queueTTL||1000,a=new Map,l=new Mu.EventEmitter,f=Object.assign({del:m,reset:()=>t.clear(),keys:()=>[...t.keys()],on:l.on.bind(l),once:l.once.bind(l)},e);if(e.disable)return Object.assign(r,f);function m(...w){let S=n(...w);t.delete(S)}function h(w,S,A){if(o)A.forEach(Hu.deepFreeze);if(s)t.set(w,A,{ttl:s(...S.concat(A))});else t.set(w,A)}function g(w,S){for(let A of w)if(c)setImmediate(A,...S.map(j0.default));else setImmediate(A,...S)}function d(w,...S){l.emit(w,...S)}function b(...w){let S=w.slice(0,-1),A=w.slice(-1).pop(),T;if(i&&i(...S))return d("miss",...S),r(...w);if(S.length===0&&!n)T="_";else T=n(...S);let R=t.get(T);if(R)return d("hit",...S),g([A],[null].concat(R));let K=a.get(T);if(K&&K.expiresAt>Date.now()){K.queue.push(A),d("queue",...S);return}d("miss",...S);let G=Date.now(),z=[A];a.set(T,{queue:z,expiresAt:G+u});let V=(...le)=>{if(!le[0])h(T,S,le.slice(1));a.delete(T),d("loaded",Date.now()-G,...S),g(z,le)};r(...S,V)}return Object.assign(b,f)}Ke.asyncMemoizer=Vu;Vu.sync=zu.syncMemoizer});var Qu=p(function(dv,Zu){var Yu=Xu();Zu.exports=Yu.asyncMemoizer});var rl=p(function(mv,tl){var Zn=Vt()("jwks"),K0=Qu(),{LRUCache:D0}=ar(),{promisify:B0,callbackify:el}=require("util");function U0(e,{cacheMaxEntries:t=5,cacheMaxAge:r=600000,cacheMaxAgeFallback:n,onStaleCacheFallback:i}){Zn(`Configured caching of signing keys. Max: ${t} / Age: ${r}${n?` / Fallback: ${n}`:""}`);let s;if(n){let o=new D0({max:t}),c=e.getSigningKey.bind(e);s=el(async(u)=>{try{let a=await c(u);return o.set(u,{key:a,fetchedAt:Date.now()}),a}catch(a){if(a.isEndpointUnavailable){let l=o.get(u);if(l&&Date.now()-l.fetchedAt<r+n){if(Zn(`JWKS endpoint unavailable, serving stale signing key for '${u}': ${a.message}`),i)i(a,u,l.key);return l.key}Zn(`JWKS endpoint unavailable and no valid stale entry for '${u}', fallback window expired or key never fetched`)}throw a}})}else s=el(e.getSigningKey.bind(e));return B0(K0({hash:(o)=>o,load:s,ttl:r,max:t}))}tl.exports.default=U0});var Qn=p(function(gv,il){var nl=function(e,t,r,n){if(this.bucketSize=e,this.tokensPerInterval=t,typeof r==="string")switch(r){case"sec":case"second":this.interval=1000;break;case"min":case"minute":this.interval=60000;break;case"hr":case"hour":this.interval=3600000;break;case"day":this.interval=86400000;break;default:throw Error("Invaid interval "+r)}else this.interval=r;this.parentBucket=n,this.content=0,this.lastDrip=+new Date};nl.prototype={bucketSize:1,tokensPerInterval:1,interval:1000,parentBucket:null,content:0,lastDrip:0,removeTokens:function(e,t){var r=this;if(!this.bucketSize)return process.nextTick(t.bind(null,null,e,Number.POSITIVE_INFINITY)),!0;if(e>this.bucketSize)return process.nextTick(t.bind(null,"Requested tokens "+e+" exceeds bucket size "+this.bucketSize,null)),!1;if(this.drip(),e>this.content)return n();if(this.parentBucket)return this.parentBucket.removeTokens(e,function(i,s){if(i)return t(i,null);if(e>r.content)return n();r.content-=e,t(null,Math.min(s,r.content))});else return this.content-=e,process.nextTick(t.bind(null,null,this.content)),!0;function n(){var i=Math.ceil((e-r.content)*(r.interval/r.tokensPerInterval));return setTimeout(function(){r.removeTokens(e,t)},i),!1}},tryRemoveTokens:function(e){if(!this.bucketSize)return!0;if(e>this.bucketSize)return!1;if(this.drip(),e>this.content)return!1;if(this.parentBucket&&!this.parentBucket.tryRemoveTokens(e))return!1;return this.content-=e,!0},drip:function(){if(!this.tokensPerInterval){this.content=this.bucketSize;return}var e=+new Date,t=Math.max(e-this.lastDrip,0);this.lastDrip=e;var r=t*(this.tokensPerInterval/this.interval);this.content=Math.min(this.content+r,this.bucketSize)}};il.exports=nl});var ol=p(function(yv,sl){var W0=function(){if(typeof process<"u"&&process.hrtime){var e=process.hrtime(),t=e[0],r=e[1];return t*1000+Math.floor(r/1e6)}return new Date().getTime()};sl.exports=W0});var ul=p(function(Ev,cl){var J0=Qn(),ei=ol(),al=function(e,t,r){this.tokenBucket=new J0(e,e,t,null),this.tokenBucket.content=e,this.curIntervalStart=ei(),this.tokensThisInterval=0,this.fireImmediately=r};al.prototype={tokenBucket:null,curIntervalStart:0,tokensThisInterval:0,fireImmediately:!1,removeTokens:function(e,t){if(e>this.tokenBucket.bucketSize)return process.nextTick(t.bind(null,"Requested tokens "+e+" exceeds maximum tokens per interval "+this.tokenBucket.bucketSize,null)),!1;var r=this,n=ei();if(n<this.curIntervalStart||n-this.curIntervalStart>=this.tokenBucket.interval)this.curIntervalStart=n,this.tokensThisInterval=0;if(e>this.tokenBucket.tokensPerInterval-this.tokensThisInterval){if(this.fireImmediately)process.nextTick(t.bind(null,null,-1));else{var i=Math.ceil(this.curIntervalStart+this.tokenBucket.interval-n);setTimeout(function(){r.tokenBucket.removeTokens(e,s)},i)}return!1}return this.tokenBucket.removeTokens(e,s);function s(o,c){if(o)return t(o,null);r.tokensThisInterval+=e,t(null,c)}},tryRemoveTokens:function(e){if(e>this.tokenBucket.bucketSize)return!1;var t=ei();if(t<this.curIntervalStart||t-this.curIntervalStart>=this.tokenBucket.interval)this.curIntervalStart=t,this.tokensThisInterval=0;if(e>this.tokenBucket.tokensPerInterval-this.tokensThisInterval)return!1;var r=this.tokenBucket.tryRemoveTokens(e);if(r)this.tokensThisInterval+=e;return r},getTokensRemaining:function(){return this.tokenBucket.drip(),this.tokenBucket.content}};cl.exports=al});var ll=p(function(ti){ti.RateLimiter=ul();ti.TokenBucket=Qn()});var ri=p(function(Sv,fl){function Er(e){Error.call(this,e),Error.captureStackTrace(this,this.constructor),this.name="JwksRateLimitError",this.message=e}Er.prototype=Object.create(Error.prototype);Er.prototype.constructor=Er;fl.exports=Er});var pl=p(function(bv,hl){var ni=Vt()("jwks"),{RateLimiter:G0}=ll(),M0=ri();function H0(e,{jwksRequestsPerMinute:t=10}){let r=e.getSigningKey.bind(e),n=new G0(t,"minute",!0);return ni(`Configured rate limiting to JWKS endpoint at ${t}/minute`),async(i)=>await new Promise((s,o)=>{n.removeTokens(1,async(c,u)=>{if(c)o(c);if(ni("Requests to the JWKS endpoint available for the next minute:",u),u<0)ni("Too many requests to the JWKS endpoint"),o(new M0("Too many requests to the JWKS endpoint"));else try{let a=await r(i);s(a)}catch(a){o(a)}})})}hl.exports.default=H0});var ml=p(function(vv,dl){var z0=Ln().retrieveSigningKeys;function V0(e,{getKeysInterceptor:t}){let r=e.getSigningKey.bind(e);return async(n)=>{let i=await t(),s;if(i&&i.length)s=await z0(i);if(s&&s.length){let o=s.find((c)=>!n||c.kid===n);if(o)return o}return r(n)}}dl.exports.default=V0});var yl=p(function(Tv,gl){var{callbackify:X0}=require("util"),Y0=(e)=>{let t=e.getSigningKey.bind(e);return(r,n)=>{if(n)return X0(t)(r,n);return t(r)}};gl.exports.default=Y0});var wl=p(function(Av,El){El.exports={request:zc().default,cacheSigningKey:rl().default,rateLimitSigningKey:pl().default,getKeysInterceptor:ml().default,callbackSupport:yl().default}});var ii=p(function(Iv,Sl){function wr(e){Error.call(this,e),Error.captureStackTrace(this,this.constructor),this.name="SigningKeyNotFoundError",this.message=e}wr.prototype=Object.create(Error.prototype);wr.prototype.constructor=wr;Sl.exports=wr});var De=p(function(Cv,Tl){var ge=Vt()("jwks"),{retrieveSigningKeys:Z0}=Ln(),{request:Q0,cacheSigningKey:ew,rateLimitSigningKey:tw,getKeysInterceptor:rw,callbackSupport:nw}=wl(),si=nr(),bl=ii();class vl{constructor(e){if(this.options={rateLimit:!1,cache:!0,timeout:30000,...e},this.options.getKeysInterceptor)this.getSigningKey=rw(this,e);if(this.options.rateLimit)this.getSigningKey=tw(this,e);if(this.options.cache)this.getSigningKey=ew(this,e);this.getSigningKey=nw(this,e)}async getKeys(){ge(`Fetching keys from '${this.options.jwksUri}'`);try{let e=await Q0({uri:this.options.jwksUri,headers:this.options.requestHeaders,agent:this.options.requestAgent,timeout:this.options.timeout,fetcher:this.options.fetcher});return ge("Keys:",e.keys),e.keys}catch(e){let{errorMsg:t}=e;ge("Failure:",t||e);let r=t?new si(t):e;throw r.isEndpointUnavailable=!0,r}}async getSigningKeys(){let e=await this.getKeys();if(!e||!e.length)throw new si("The JWKS endpoint did not contain any keys");let t=await Z0(e);if(!t.length)throw new si("The JWKS endpoint did not contain any signing keys");return ge("Signing Keys:",t),t}async getSigningKey(e){ge(`Fetching signing key for '${e}'`);let t=await this.getSigningKeys(),r=e!==void 0&&e!==null;if(!r&&t.length>1)throw ge("No KID specified and JWKS endpoint returned more than 1 key"),new bl("No KID specified and JWKS endpoint returned more than 1 key");let n=t.find((i)=>!r||i.kid===e);if(n)return n;else throw ge(`Unable to find a signing key that matches '${e}'`),new bl(`Unable to find a signing key that matches '${e}'`)}}Tl.exports={JwksClient:vl}});var Be=p(function(Rv,Al){Al.exports={ArgumentError:Pn(),JwksError:nr(),JwksRateLimitError:ri(),SigningKeyNotFoundError:ii()}});var at=p(function(xv,Il){var iw=["RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512","EdDSA"];Il.exports=iw});var Rl=p(function(_v,Sr){var{ArgumentError:sw}=Be(),{JwksClient:ow}=De(),Cl=at(),aw=(e,t)=>{if(e&&e.name==="SigningKeyNotFoundError")return t(e,null,null);if(e)return t(e,null,null)};Sr.exports.hapiJwt2KeyAsync=(e)=>{let t=Sr.exports.hapiJwt2Key(e);return function(r){return new Promise((n,i)=>{t(r,(o,c)=>{!c||o?i(o):n({key:c})})})}};Sr.exports.hapiJwt2Key=function(e){if(e===null||e===void 0)throw new sw("An options object must be provided when initializing hapiJwt2Key");let t=new ow(e),r=e.handleSigningKeyError||aw;return function(i,s){if(!i||!i.header)return s(Error("Cannot find a signing certificate if there is no header"),null,null);if(!Cl.includes(i.header.alg))return s(Error("Unsupported algorithm "+i.header.alg+" supplied."),null,null);t.getSigningKey(i.header.kid).then((o)=>s(null,o.publicKey||o.rsaPublicKey,o)).catch((o)=>r(o,(c)=>s(c,null,null)))}}});var Ol=p(function(Ov,_l){var{ArgumentError:cw}=Be(),{JwksClient:uw}=De(),xl=at(),lw=(e,t)=>{if(e&&e.name==="SigningKeyNotFoundError")return t(null);if(e)return t(e)};_l.exports.expressJwtSecret=function(e){if(e===null||e===void 0)throw new cw("An options object must be provided when initializing expressJwtSecret");let t=new uw(e),r=e.handleSigningKeyError||lw,n=async(i,s)=>{if(!s)return;let o=s.header;if(!o||!xl.includes(o.alg))return;try{let c=await t.getSigningKey(o.kid);return c.publicKey||c.rsaPublicKey}catch(c){return new Promise((u,a)=>{r(c,(l)=>{if(!l)return u();a(l)})})}};return function(s,o,c,u){if(arguments.length===4){n(s,{header:o}).then((a)=>{setImmediate(u,null,a)}).catch((a)=>{setImmediate(u,a)});return}return n(s,arguments[1])}}});var Ll=p(function(kv,$l){var{ArgumentError:fw}=Be(),{JwksClient:hw}=De(),kl=at();$l.exports.koaJwtSecret=function(e={}){if(!e.jwksUri)throw new fw("No JWKS provided. Please provide a jwksUri");let t=new hw(e);return function({alg:n,kid:i}={}){return new Promise((s,o)=>{if(!kl.includes(n))return o(Error("Missing / invalid token algorithm"));t.getSigningKey(i).then((c)=>{s(c.publicKey||c.rsaPublicKey)}).catch((c)=>{if(e.handleSigningKeyError)return e.handleSigningKeyError(c).then(o);return o(c)})})}}});var jl=p(function($v,Fl){var Pl=($n(),{}),{ArgumentError:Nl}=Be(),{JwksClient:pw}=De(),ql=at(),dw=(e,t)=>{if(e&&e.name==="SigningKeyNotFoundError")return t(null);if(e)return t(e)};Fl.exports.passportJwtSecret=function(e){if(e===null||e===void 0)throw new Nl("An options object must be provided when initializing passportJwtSecret");if(!e.jwksUri)throw new Nl("No JWKS provided. Please provide a jwksUri");let t=new pw(e),r=e.handleSigningKeyError||dw;return function(i,s,o){let c;try{c={payload:Bc(s),header:Kc(s)}}catch(u){c=null}if(!c||!ql.includes(c.header.alg))return o(null,null);t.getSigningKey(c.header.kid).then((u)=>{o(null,u.publicKey||u.rsaPublicKey)}).catch((u)=>{r(u,(a)=>o(a,null))})}}});var Dl=p(function(Lv,J){var{JwksClient:Kl}=De(),ue=Be(),{hapiJwt2Key:mw,hapiJwt2KeyAsync:gw}=Rl(),{expressJwtSecret:yw}=Ol(),{koaJwtSecret:Ew}=Ll(),{passportJwtSecret:ww}=jl();J.exports=(e)=>new Kl(e);J.exports.JwksClient=Kl;J.exports.ArgumentError=ue.ArgumentError;J.exports.JwksError=ue.JwksError;J.exports.JwksRateLimitError=ue.JwksRateLimitError;J.exports.SigningKeyNotFoundError=ue.SigningKeyNotFoundError;J.exports.expressJwtSecret=yw;J.exports.hapiJwt2Key=mw;J.exports.hapiJwt2KeyAsync=gw;J.exports.koaJwtSecret=Ew;J.exports.passportJwtSecret=ww});var Aw={};Ql(Aw,{handler:()=>Tw});module.exports=Xl(Aw);var hi=`<!DOCTYPE html>
11
12
  <html lang="en">
12
13
  <head>
13
14
  <meta charset="utf-8" />
@@ -27,4 +28,4 @@ ${r}
27
28
  </p>
28
29
  </body>
29
30
  </html>
30
- `;var ci=require("node:fs"),ut=br(require("node:path"),1),ui=require("node:url");var Fl=(()=>{let e=function(){};return e.prototype=Object.create(null),e})();function ct(e,t){let r=new Fl,n=e.length;if(n<2)return r;let i=t?.decode??Dl,s=0;do{let o=Kl(e,s,n);if(o===n)break;let c=jl(e,s,n);if(o>c){s=e.lastIndexOf(";",o-1)+1;continue}let u=ai(e,s,o);if(r[u]===void 0)r[u]=i(ai(e,o+1,c));s=c+1}while(s<n);return r}function jl(e,t,r){let n=e.indexOf(";",t);return n===-1?r:n}function Kl(e,t,r){let n=e.indexOf("=",t);return n===-1?r:n}function ai(e,t,r){if(t===r)return"";let n=t,i=r;do{let s=e.charCodeAt(n);if(s!==32&&s!==9)break}while(++n<i);while(i>n){let s=e.charCodeAt(i-1);if(s!==32&&s!==9)break;i--}return e.slice(n,i)}function Dl(e){if(e.indexOf("%")===-1)return e;try{return decodeURIComponent(e)}catch(t){return e}}var ye={none:0,error:10,warn:20,info:30,debug:40};class vr{logLevel;constructor(e){this.logLevel=e}jsonify(e){return e.map((t)=>{if(typeof t==="object")try{return JSON.stringify(t)}catch{return t}return t})}info(...e){if(this.logLevel>=ye.info)console.log(...this.jsonify(e))}warn(...e){if(this.logLevel>=ye.warn)console.warn(...this.jsonify(e))}error(...e){if(this.logLevel>=ye.error)console.error(...this.jsonify(e))}debug(...e){if(this.logLevel>=ye.debug)console.trace(...this.jsonify(e))}}var Bl=ui.fileURLToPath("file:///home/runner/work/cdk-cloudfront-auth/cdk-cloudfront-auth/src/handlers/util/config.ts"),Ul=ut.dirname(Bl);function Tr(){let t=process.env.LAMBDA_TASK_ROOT||Ul,r=ut.join(t,"config.json");console.log("Loading config from",r);let n=JSON.parse(ci.readFileSync(r,"utf-8")),s=`https://cognito-idp.${/^(\S+?)_\S+$/.exec(n.userPoolId)[1]}.amazonaws.com/${n.userPoolId}`,o=`${s}/.well-known/jwks.json`;return{nonceMaxAge:Number.parseInt(ct(n.cookieSettings.nonce.toLowerCase())["max-age"]??"",10)||86400,...n,tokenIssuer:s,tokenJwksUri:o,logger:new vr(ye[n.logLevel])}}function Jl(e){return Object.entries(e).reduce((t,[r,n])=>Object.assign(t,{[r.toLowerCase()]:[{key:r,value:n}]}),{})}function Ar(e,t){let r=t?.cookies?{"set-cookie":t.cookies.map((n)=>({key:"set-cookie",value:n}))}:{};return{status:"307",statusDescription:"Temporary Redirect",headers:{location:[{key:"location",value:e}],...r}}}function uw(e){return{body:Gl(e),status:e.statusCode??"500",headers:{"content-type":[{key:"Content-Type",value:"text/html; charset=UTF-8"}]}}}function Gl(e){let t={...e,region:process.env.AWS_REGION};return oi.replace(/\${([^}]*)}/g,(r,n)=>t[n]||"")}function li(e,t){if(!t)throw Error("Expected response value");return{...t,headers:{...t.headers??{},...Jl(e.httpHeaders)}}}function fi(e){let t;return async(r)=>{if(!t)t=Tr();t.logger.debug("Handling event:",r);let n=li(t,await e(t,r));return t.logger.debug("Returning response:",n),n}}function lw(e){let t;return async(r)=>{if(!t)t=Tr();t.logger.debug("Handling event:",r);let n=li(t,await e(t,r));return t.logger.debug("Returning response:",n),n}}var ti=br(Ma(),1),Tl=br(vl(),1),ei;function V0(e){return"rsaPublicKey"in e}async function X0(e,t){if(!ei)ei=Tl.default({cache:!0,rateLimit:!0,jwksUri:e});let r=await ei.getSigningKey(t);return V0(r)?r.rsaPublicKey:r.publicKey}async function cv(e,t,r,n){let i=ti.default.decode(e,{complete:!0});if(!i||typeof i==="string")return{validationError:Error("Cannot parse JWT token")};let s=i.header.kid;if(!s)return{validationError:Error("JWT header is missing 'kid' claim")};let o=await X0(t,s);if(o instanceof Error)return{validationError:o};let c={audience:n,issuer:r,ignoreExpiration:!1};return new Promise((u)=>ti.default.verify(e,o,c,(a)=>a?u({validationError:a}):u(void 0)))}function Al(e){let r=e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/");return JSON.parse(Buffer.from(r,"base64").toString())}function Y0(e){if(!e.cookie)return{};return e.cookie.reduce((r,n)=>({...r,...ct(n.value)}),{})}function ge(e,t){if(t.toLowerCase().indexOf("domain")===-1)return`${t}; Domain=.${e}`;return t}function Rl(e,t){let r=Y0(e);if(!r)return{};let n=`CognitoIdentityServiceProvider.${t}`,i=r[`${n}.LastAuthUser`];return{tokenUserName:i,idToken:r[`${n}.${i??""}.idToken`],accessToken:r[`${n}.${i??""}.accessToken`],refreshToken:r[`${n}.${i??""}.refreshToken`],scopes:r[`${n}.${i??""}.tokenScopesString`],nonce:r["spa-auth-edge-nonce"],nonceHmac:r["spa-auth-edge-nonce-hmac"],pkce:r["spa-auth-edge-pkce"]}}function Cl(e){let t=Al(e.tokens.idToken),r=t["cognito:username"],n=`CognitoIdentityServiceProvider.${e.clientId}`,i=`${n}.${r}.idToken`,s=`${n}.${r}.accessToken`,o=`${n}.${r}.refreshToken`,c=`${n}.LastAuthUser`,u=`${n}.${r}.tokenScopesString`,a=e.oauthScopes.join(" "),l=`${n}.${r}.userData`,f=JSON.stringify({UserAttributes:[{Name:"sub",Value:t.sub},{Name:"email",Value:t.email}],Username:r}),m={[i]:`${e.tokens.idToken}; ${ge(e.domainName,e.cookieSettings.idToken)}`,[s]:`${e.tokens.accessToken}; ${ge(e.domainName,e.cookieSettings.accessToken)}`,[o]:`${e.tokens.refreshToken}; ${ge(e.domainName,e.cookieSettings.refreshToken)}`,[c]:`${r}; ${ge(e.domainName,e.cookieSettings.idToken)}`,[u]:`${a}; ${ge(e.domainName,e.cookieSettings.accessToken)}`,[l]:`${encodeURIComponent(f)}; ${ge(e.domainName,e.cookieSettings.idToken)}`,"amplify-signin-with-hostedUI":`true; ${ge(e.domainName,e.cookieSettings.accessToken)}`};if(e.event==="signOut")Object.keys(m).forEach((h)=>m[h]=ri(m[h]));else if(e.event==="refreshFailed")m[o]=ri(m[o]);return["spa-auth-edge-nonce","spa-auth-edge-nonce-hmac","spa-auth-edge-pkce"].forEach((h)=>{m[h]=ri(m[h])}),Object.entries(m).map(([h,g])=>`${h}=${g}`)}function ri(e=""){let t=e.split(";").map((n)=>n.trim()).filter((n)=>!n.toLowerCase().startsWith("max-age")).filter((n)=>!n.toLowerCase().startsWith("expires")),r=`Expires=${new Date(0).toUTCString()}`;return["",...t.slice(1),r].join("; ")}var Z0=fi(async(e,t)=>{let r=t.Records[0].cf.request,n=r.headers.host[0].value,{idToken:i,accessToken:s,refreshToken:o}=Rl(r.headers,e.clientId);if(!i)return Ar(`https://${n}${e.signOutRedirectTo}`);let c=new URLSearchParams({logout_uri:`https://${n}${e.signOutRedirectTo}`,client_id:e.clientId}).toString();return Ar(`https://${e.cognitoAuthDomain}/logout?${c}`,{cookies:Cl({event:"signOut",tokens:{idToken:i,accessToken:s??"",refreshToken:o??""},domainName:n,...e})})});
31
+ `;var di=require("node:fs"),lt=vr(require("node:path"),1),mi=require("node:url");var tf=(()=>{let e=function(){};return e.prototype=Object.create(null),e})();function ut(e,t){let r=new tf,n=e.length;if(n<2)return r;let i=t?.decode??sf,s=0;do{let o=nf(e,s,n);if(o===n)break;let c=rf(e,s,n);if(o>c){s=e.lastIndexOf(";",o-1)+1;continue}let u=pi(e,s,o);if(r[u]===void 0)r[u]=i(pi(e,o+1,c));s=c+1}while(s<n);return r}function rf(e,t,r){let n=e.indexOf(";",t);return n===-1?r:n}function nf(e,t,r){let n=e.indexOf("=",t);return n===-1?r:n}function pi(e,t,r){if(t===r)return"";let n=t,i=r;do{let s=e.charCodeAt(n);if(s!==32&&s!==9)break}while(++n<i);while(i>n){let s=e.charCodeAt(i-1);if(s!==32&&s!==9)break;i--}return e.slice(n,i)}function sf(e){if(e.indexOf("%")===-1)return e;try{return decodeURIComponent(e)}catch(t){return e}}var Ee={none:0,error:10,warn:20,info:30,debug:40};class Tr{logLevel;constructor(e){this.logLevel=e}jsonify(e){return e.map((t)=>{if(typeof t==="object")try{return JSON.stringify(t)}catch{return t}return t})}info(...e){if(this.logLevel>=Ee.info)console.log(...this.jsonify(e))}warn(...e){if(this.logLevel>=Ee.warn)console.warn(...this.jsonify(e))}error(...e){if(this.logLevel>=Ee.error)console.error(...this.jsonify(e))}debug(...e){if(this.logLevel>=Ee.debug)console.trace(...this.jsonify(e))}}var of=mi.fileURLToPath("file:///home/runner/work/cdk-cloudfront-auth/cdk-cloudfront-auth/src/handlers/util/config.ts"),af=lt.dirname(of);function Ar(){let t=process.env.LAMBDA_TASK_ROOT||af,r=lt.join(t,"config.json");console.log("Loading config from",r);let n=JSON.parse(di.readFileSync(r,"utf-8")),s=`https://cognito-idp.${/^(\S+?)_\S+$/.exec(n.userPoolId)[1]}.amazonaws.com/${n.userPoolId}`,o=`${s}/.well-known/jwks.json`;return{nonceMaxAge:Number.parseInt(ut(n.cookieSettings.nonce.toLowerCase())["max-age"]??"",10)||86400,...n,tokenIssuer:s,tokenJwksUri:o,logger:new Tr(Ee[n.logLevel])}}function cf(e){return Object.entries(e).reduce((t,[r,n])=>Object.assign(t,{[r.toLowerCase()]:[{key:r,value:n}]}),{})}function Ir(e,t){let r=t?.cookies?{"set-cookie":t.cookies.map((n)=>({key:"set-cookie",value:n}))}:{};return{status:"307",statusDescription:"Temporary Redirect",headers:{location:[{key:"location",value:e}],...r}}}function Pw(e){return{body:uf(e),status:e.statusCode??"500",headers:{"content-type":[{key:"Content-Type",value:"text/html; charset=UTF-8"}]}}}function uf(e){let t={...e,region:process.env.AWS_REGION};return hi.replace(/\${([^}]*)}/g,(r,n)=>t[n]||"")}function gi(e,t){if(!t)throw Error("Expected response value");return{...t,headers:{...t.headers??{},...cf(e.httpHeaders)}}}function yi(e){let t;return async(r)=>{if(!t)t=Ar();t.logger.debug("Handling event:",r);let n=gi(t,await e(t,r));return t.logger.debug("Returning response:",n),n}}function Nw(e){let t;return async(r)=>{if(!t)t=Ar();t.logger.debug("Handling event:",r);let n=gi(t,await e(t,r));return t.logger.debug("Returning response:",n),n}}var ai=vr(lc(),1),Bl=vr(Dl(),1),oi;function Sw(e){return"rsaPublicKey"in e}async function bw(e,t){if(!oi)oi=Bl.default({cache:!0,rateLimit:!0,jwksUri:e});let r=await oi.getSigningKey(t);return Sw(r)?r.rsaPublicKey:r.publicKey}async function Pv(e,t,r,n){let i=ai.default.decode(e,{complete:!0});if(!i||typeof i==="string")return{validationError:Error("Cannot parse JWT token")};let s=i.header.kid;if(!s)return{validationError:Error("JWT header is missing 'kid' claim")};let o=await bw(t,s);if(o instanceof Error)return{validationError:o};let c={audience:n,issuer:r,ignoreExpiration:!1};return new Promise((u)=>ai.default.verify(e,o,c,(a)=>a?u({validationError:a}):u(void 0)))}function Ul(e){let r=e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/");return JSON.parse(Buffer.from(r,"base64").toString())}function vw(e){if(!e.cookie)return{};return e.cookie.reduce((r,n)=>({...r,...ut(n.value)}),{})}function ye(e,t){if(t.toLowerCase().indexOf("domain")===-1)return`${t}; Domain=.${e}`;return t}function Wl(e,t){let r=vw(e);if(!r)return{};let n=`CognitoIdentityServiceProvider.${t}`,i=r[`${n}.LastAuthUser`];return{tokenUserName:i,idToken:r[`${n}.${i??""}.idToken`],accessToken:r[`${n}.${i??""}.accessToken`],refreshToken:r[`${n}.${i??""}.refreshToken`],scopes:r[`${n}.${i??""}.tokenScopesString`],nonce:r["spa-auth-edge-nonce"],nonceHmac:r["spa-auth-edge-nonce-hmac"],pkce:r["spa-auth-edge-pkce"]}}function Jl(e){let t=Ul(e.tokens.idToken),r=t["cognito:username"],n=`CognitoIdentityServiceProvider.${e.clientId}`,i=`${n}.${r}.idToken`,s=`${n}.${r}.accessToken`,o=`${n}.${r}.refreshToken`,c=`${n}.LastAuthUser`,u=`${n}.${r}.tokenScopesString`,a=e.oauthScopes.join(" "),l=`${n}.${r}.userData`,f=JSON.stringify({UserAttributes:[{Name:"sub",Value:t.sub},{Name:"email",Value:t.email}],Username:r}),m={[i]:`${e.tokens.idToken}; ${ye(e.domainName,e.cookieSettings.idToken)}`,[s]:`${e.tokens.accessToken}; ${ye(e.domainName,e.cookieSettings.accessToken)}`,[o]:`${e.tokens.refreshToken}; ${ye(e.domainName,e.cookieSettings.refreshToken)}`,[c]:`${r}; ${ye(e.domainName,e.cookieSettings.idToken)}`,[u]:`${a}; ${ye(e.domainName,e.cookieSettings.accessToken)}`,[l]:`${encodeURIComponent(f)}; ${ye(e.domainName,e.cookieSettings.idToken)}`,"amplify-signin-with-hostedUI":`true; ${ye(e.domainName,e.cookieSettings.accessToken)}`};if(e.event==="signOut")Object.keys(m).forEach((h)=>m[h]=ci(m[h]));else if(e.event==="refreshFailed")m[o]=ci(m[o]);return["spa-auth-edge-nonce","spa-auth-edge-nonce-hmac","spa-auth-edge-pkce"].forEach((h)=>{m[h]=ci(m[h])}),Object.entries(m).map(([h,g])=>`${h}=${g}`)}function ci(e=""){let t=e.split(";").map((n)=>n.trim()).filter((n)=>!n.toLowerCase().startsWith("max-age")).filter((n)=>!n.toLowerCase().startsWith("expires")),r=`Expires=${new Date(0).toUTCString()}`;return["",...t.slice(1),r].join("; ")}var Tw=yi(async(e,t)=>{let r=t.Records[0].cf.request,n=r.headers.host[0].value,{idToken:i,accessToken:s,refreshToken:o}=Wl(r.headers,e.clientId);if(!i)return Ir(`https://${n}${e.signOutRedirectTo}`);let c=new URLSearchParams({logout_uri:`https://${n}${e.signOutRedirectTo}`,client_id:e.clientId}).toString();return Ir(`https://${e.cognitoAuthDomain}/logout?${c}`,{cookies:Jl({event:"signOut",tokens:{idToken:i,accessToken:s??"",refreshToken:o??""},domainName:n,...e})})});