"use strict";vare=require("buffer"),r=require("stream"),t=require("util"),n=require("crypto"),o="undefined"!=typeofglobalThis?globalThis:"undefined"!=typeofwindow?window:"undefined"!=typeofglobal?global:"undefined"!=typeofself?self:{};functioni(e){returne&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}vara={},s={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */!function(r,t){varn=e,o=n.Buffer;functioni(e,r){for(vartine)r[t]=e[t]}functiona(e,r,t){returno(e,r,t)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?r.exports=n:(i(n,t),t.Buffer=a),a.prototype=Object.create(o.prototype),i(o,a),a.from=function(e,r,t){if("number"==typeofe)thrownewTypeError("Argument must not be a number");returno(e,r,t)},a.alloc=function(e,r,t){if("number"!=typeofe)thrownewTypeError("Argument must be a number");varn=o(e);returnvoid0!==r?"string"==typeoft?n.fill(r,t):n.fill(r):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeofe)thrownewTypeError("Argument must be a number");returno(e)},a.allocUnsafeSlow=function(e){if("number"!=typeofe)thrownewTypeError("Argument must be a number");returnn.SlowBuffer(e)}}(s,s.exports);varu=s.exports,c=u.Buffer,f=r;functionl(e){if(this.buffer=null,this.writable=!0,this.readable=!0,!e)returnthis.buffer=c.alloc(0),this;if("function"==typeofe.pipe)returnthis.buffer=c.alloc(0),e.pipe(this),this;if(e.length||"object"==typeofe)returnthis.buffer=e,this.writable=!1,process.nextTick(function(){this.emit("end",e),this.readable=!1,this.emit("close")}.bind(this)),this;thrownewTypeError("Unexpected data type ("+typeofe+")")}t.inherits(l,f),l.prototype.write=function(e){this.buffer=c.concat([this.buffer,c.from(e)]),this.emit("data",e)},l.prototype.end=function(e){e&&this.write(e),this.emit("end",e),this.emit("close"),this.writable=!1,this.readable=!1};varp=l,h=e.Buffer,v=e.SlowBuffer,d=y;functiony(e,r){if(!h.isBuffer(e)||!h.isBuffer(r))return!1;if(e.length!==r.length)return!1;for(vart=0,n=0;n<e.length;n++)t|=e[n]^r[n];return0===t}y.install=function(){h.prototype.equal=v.prototype.equal=function(e){returny(this,e)}};varm=h.prototype.equal,g=v.prototype.equal;functionb(e){return(e/8|0)+(e%8==0?0:1)}y.restore=function(){h.prototype.equal=m,v.prototype.equal=g};varw={ES256:b(256),ES384:b(384),ES512:b(521)};varj=function(e){varr=w[e];if(r)returnr;thrownewError('Unknown algorithm "'+e+'"')},S=u.Buffer,_=j,E=128;functionx(e){if(S.isBuffer(e))returne;if("string"==typeofe)returnS.from(e,"base64");thrownewTypeError("ECDSA signature must be a Base64 string or a Buffer")}functionO(e,r,t){for(varn=0;r+n<t&&0===e[r+n];)++n;returne[r+n]>=E&&--n,n}varA={derToJose:function(e,r){e=x(e);vart=_(r),n=t+1,o=e.length,i=0;if(48!==e[i++])thrownewError('Could not find expected "seq"');vara=e[i++];if(a===(1|E)&&(a=e[i++]),o-i<a)thrownewError('"seq" specified length of "'+a+'", only "'+(o-i)+'" remaining');if(2!==e[i++])thrownewError('Could not find expected "int" for "r"');vars=e[i++];if(o-i-2<s)thrownewError('"r" specified length of "'+s+'", only "'+(o-i-2)+'" available');if(n<s)thrownewError('"r" specified length of "'+s+'", max of "'+n+'" is acceptable');varu=i;if(i+=s,2!==e[i++])thrownewError('Could not find expected "int" for "s"');varc=e[i++];if(o-i!==c)thrownewError('"s" specified length of "'+c+'", expected "'+(o-i)+'"');if(n<c)thrownewError('"s" specified length of "'+c+'", max of "'+n+'" is acceptable');varf=i;if((i+=c)!==o)thrownewError('Expected to consume entire buffer, but "'+(o-i)+'" bytes remain');varl=t-s,p=t-c,h=S.allocUnsafe(l+s+p+c);for(i=0;i<l;++i)h[i]=0;e.copy(h,i,u+Math.max(-l,0),u+s);for(varv=i=t;i<v+p;++i)h[i]=0;returne.copy(h,i,f+Math.max(-p,0),f+c),h=(h=h.toString("base64")).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")},joseToDer:function(e,r){e=x(e);vart=_(r),n=e.length;if(n!==2*t)thrownewTypeError('"'+r+'" signatures must be "'+2*t+'" bytes, saw "'+n+'"');varo=O(e,0,t),i=O(e,t,e.length),a=t-o,s=t-i,u=2+a+1+1+s,c=u<E,f=S.allocUnsafe((c?2:3)+u),l=0;returnf[l++]=48,c?f[l++]=u:(f[l++]=1|E,f[l++]=255&u),f[l++]=2,f[l++]=a,o<0?(f[l++]=0,l+=e.copy(f,l,0,t)):l+=e.copy(f,l,o,t),f[l++]=2,f[l++]=s,i<0?(f[l++]=0,e.copy(f,l,t)):e.copy(f,l,t+i),f}},T=d,k=u.Buffer,P=n,R=A,B=t,$="secret must be a string or buffer",I="key must be a string or a buffer",V="key must be a string, a buffer or an object",N="function"==typeofP.createPublicKey;functionM(e){if(!k.isBuffer(e)&&"string"!=typeofe){if(!N)throwC(I);if("object"!=typeofe)throwC(I);if("string"!=typeofe.type)throwC(I);if("string"!=typeofe.asymmetricKeyType)throwC(I);if("function"!=typeofe.export)throwC(I)}}functionz(e){if(!k.isBuffer(e)&&"string"!=typeofe&&"object"!=typeofe)throwC(V)}functionD(e){returne.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}functionq(e){varr=4-(e=e.toString()).length%4;if(4!==r)for(vart=0;t<r;++t)e+="=";returne.replace(/\-/g,"+").replace(/_/g,"/")}functionC(e){varr=[].slice.call(arguments,1),t=B.format.bind(B,e).apply(null,r);returnnewTypeError(t)}functionH(e){varr;returnr=e,k.isBuffer(r)||"string"==typeofr||(e=JSON.stringify(e)),e}functionU(e){returnfunction(r,t){!function(e){if(!k.isBuffer(e)){if("string"==typeofe)returne;if(!N)throwC($);if("object"!=typeofe)throwC($);if("secret"!==e.type)throwC($);if("function"!=typeofe.export)throwC($)}}(t),r=H(r);varn=P.createHmac("sha"+e,t);returnD((n.update(r),n.digest("base64")))}}functionL(e){returnfunction(r,t,n){varo=U(e)(r,n);returnT(k.from(t),k.from(o))}}functionG(e){returnfunction(r,t){z(t),r=H(r);varn=P.createSign("RSA-SHA"+e);returnD((n.update(r),n.sign(t,"base64")))}}functionK(e){returnfunction(r,t,n){M(n),r=H(r),t=q(t);varo=P.createVerify("RSA-SHA"+e);returno.update(r),o.verify(n,t,"base64")}}functionF(e){returnfunction(r,t){z(t),r=H(r);varn=P.createSign("RSA-SHA"+e);returnD((n.update(r),n.sign({key:t,padding:P.constants.RSA_PKCS1_PSS_PADDING,saltLength:P.constants.RSA_PSS_SALTLEN_DIGEST},"base64")))}}functionJ(e){returnfunction(r,t,n){M(n),r=H(r),t=q(t);varo=P.createVerify("RSA-SHA"+e);returno.update(r),o.verify({key:n,padding:P.constants.RSA_PKCS1_PSS_PADDING,saltLength:P.constants.RSA_PSS_SALTLEN_DIGEST},t,"base64")}}functionW(e){varr=G(e);returnfunction(){vart=r.apply(null,arguments);returnt=R.derToJose(t,"ES"+e)}}functionZ(e){varr=K(e);returnfunction(t,n,o){returnn=R.joseToDer(n,"ES"+e).toString("base64"),r(t,n,o)}}functionX(){returnfunction(){return""}}functionY(){returnfunction(e,r){return""===r}}N&&(I+=" or a KeyObject",$+="or a KeyObject");varQ=function(e){varr={hs:U,rs:G,ps:F,es:W,none:X},t={hs:L,rs:K,ps:J,es:Z,none:Y},n=e.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/i);if(!n)throwC('"%s" is not a valid algorithm.\n Supported algorithms are:\n "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".',e);varo=(n[1]||n[3]).toLowerCase(),i=n[2];return{sign:r[o](i),verify:t[o](i)}},ee=e.Buffer,re=function(e){return"string"==typeofe?e:"number"==typeofe||ee.isBuffer(e)?e.toString():JSON.stringify(e)},te=u.Buffer,ne=p,oe=Q,ie=r,ae=re,se=t;functionue(e,r){returnte.from(e,r).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}functionce(e){varr=e.header,t=e.payload,n=e.secret||e.privateKey,o=e.encoding,i=oe(r.alg),a=function(e,r,t){t=t||"utf8";varn=ue(ae(e),"binary"),o=ue(ae(r),t);returnse.format("%s.%s",n,o)}(r,t,o),s=i.sign(a,n);returnse.format("%s.%s",a,s)}functionfe(e){varr=e.secret||e.privateKey||e.key,t=newne(r);this.readable=!0,this.header=e.header,this.encoding=e.encoding,this.secret=this.privateKey=this.key=t,this.payload=newne(e.payload),this.secret.once("close",function(){!this.payload.writable&&this.readable&&this.sign()}.bind(this)),this.payload.once("close",function(){!this.secret.writable&&this.readable&&this.sign()}.bind(this))}se.inherits(fe,ie),fe.prototype.sign=function(){try{vare=ce({header:this.header,payload:this.payload.buffer,secret:this.secret.buffer,encoding:this.encoding});returnthis.emit("done",e),this.emit("data",e),this.emit("end"),this.readable=!1,e}catch(e){this.readable=!1,this.emit("error",e),this.emit("close")}},fe.sign=ce;varle=fe,pe=u.Buffer,he=p,ve=Q,de=r,ye=re,me=/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;functionge(e){if(function(e){return"[object Object]"===Object.prototype.toString.call(e)}(e))returne;try{returnJSON.parse(e)}catch(e){return}}functionbe(e){varr=e.split(".",1)[0];returnge(pe.from(r,"base64").toString("binary"))}functionwe(e){returne.split(".")[2]}functionje(e){returnme.test(e)&&!!be(e)}functionSe(e,r,t){if(!r){varn=newError("Missing algorithm parameter for jws.verify");thrown.code="MISSING_ALGORITHM",n}varo=we(e=ye(e)),i=function(e){returne.split(".",2).join(".")}(e);returnve(r).verify(i,o,t)}function_e(e,r){if(r=r||{},!je(e=ye(e)))returnnull;vart=be(e);if(!t)returnnull;varn=function(e,r){r=r||"utf8";vart=e.split(".")[1];returnpe.from(t,"base64").toString(r)}(e);return("JWT"===t.typ||r.json)&&(n=JSON.parse(n,r.encoding)),{header:t,payload:n,signature:we(e)}}functionEe(e){varr=(e=e||{}).secret||e.publicKey||e.key,t=newhe(r);this.readable=!0,this.algorithm=e.algorithm,this.encoding=e.encoding,this.secret=this.publicKey=this.key=t,this.signature=newhe(e.signature),this.secret.once("close",function(){!this.signature.writable&&this.readable&&this.verify()}.bind(this)),this.signature.once("close",function(){!this.secret.writable&&this.readable&&this.verify()}.bind(this))}t.inherits(Ee,de),Ee.prototype.verify=function(){try{vare=Se(this.signature.buffer,this.algorithm,this.key.buffer),r=_e(this.signature.buffer,this.encoding);returnthis.emit("done",e,r),this.emit("data",e),this.emit("end"),this.readable=!1,e}catch(e){this.readable=!1,this.emit("error",e),this.emit("close")}},Ee.decode=_e,Ee.isValid=je,Ee.verify=Se;varxe=le,Oe=Ee;a.ALGORITHMS=["HS256","HS384","HS512","RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"],a.sign=xe.sign,a.verify=Oe.verify,a.decode=Oe.decode,a.isValid=Oe.isValid,a.createSign=function(e){returnnewxe(e)},a.createVerify=function(e){returnnewOe(e)};varAe=a,Te=function(e,r){r=r||{};vart=Ae.decode(e,r);if(!t)returnnull;varn=t.payload;if("string"==typeofn)try{varo=JSON.parse(n);null!==o&&"object"==typeofo&&(n=o)}catch(e){}return!0===r.complete?{header:t.header,payload:n,signature:t.signature}:n},ke=function(e,r){Error.call(this,e),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="JsonWebTokenError",this.message=e,r&&(this.inner=r)};(ke.prototype=Object.create(Error.prototype)).constructor=ke;varPe=ke,Re=Pe,Be=function(e,r){Re.call(this,e),this.name="NotBeforeError",this.date=r};(Be.prototype=Object.create(Re.prototype)).constructor=Be;var$e=Be,Ie=Pe,Ve=function(e,r){Ie.call(this,e),this.name="TokenExpiredError",this.expiredAt=r};(Ve.prototype=Object.create(Ie.prototype)).constructor=Ve;varNe=Ve,Me=1e3,ze=60*Me,De=60*ze,qe=24*De,Ce=7*qe,He=365.25*qe;functionUe(e,r,t,n){varo=r>=1.5*t;returnMath.round(e/t)+""+n+(o?"s":"")}varLe=function(e,r){r=r||{};vart=typeofe;if("string"===t&&e.length>0)returnfunction(e){if((e=String(e)).length>100)return;varr=/^(-?(?:\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(!r)return;vart=parseFloat(r[1]);switch((r[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":returnt*He;case"weeks":case"week":case"w":returnt*Ce;case"days":case"day":case"d":returnt*qe;case"hours":case"hour":case"hrs":case"hr":case"h":returnt*De;case"minutes":case"minute":case"mins":case"min":case"m":returnt*ze;case"seconds":case"second":case"secs":case"sec":case"s":returnt*Me;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":returnt;default:return}}(e);if("number"===t&&isFinite(e))returnr.long?function(e){varr=Math.abs(e);if(r>=qe)returnUe(e,r,qe,"day");if(r>=De)returnUe(e,r,De,"hour");if(r>=ze)returnUe(e,r,ze,"minute");if(r>=Me)returnUe(e,r,Me,"second");returne+" ms"}(e):function(e){varr=Math.abs(e);if(r>=qe)returnMath.round(e/qe)+"d";if(r>=De)returnMath.round(e/De)+"h";if(r>=ze)returnMath.round(e/ze)+"m";if(r>=Me)returnMath.round(e/Me)+"s";returne+"ms"}(e);thrownewError("val is not a non-empty string or a valid number. val="+JSON.stringify(e))},Ge=function(e,r){vart=r||Math.floor(Date.now()/1e3);if("string"==typeofe){varn=Le(e);if(void0===n)return;returnMath.floor(t+n/1e3)}return"number"==typeofe?t+e:void0},Ke={exports:{}};!function(e,r){vart;r=Ke.exports=Y,t="object"==typeofprocess&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){vare=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},r.SEMVER_SPEC_VERSION="2.0.0";varn=256,o=Number.MAX_SAFE_INTEGER||9007199254740991,i=n-6,a=r.re=[],s=r.safeRe=[],u=r.src=[],c=0,f="[a-zA-Z0-9-]",l=[["\\s",1],["\\d",n],[f,i]];functionp(e){for(varr=0;r<l.length;r++){vart=l[r][0],n=l[r][1];e=e.split(t+"*").join(t+"{0,"+n+"}").split(t+"+").join(t+"{1,"+n+"}")}returne}varh=c++;u[h]="0|[1-9]\\d*";varv=c++;u[v]="\\d+";vard=c++;u[d]="\\d*[a-zA-Z-]"+f+"*";vary=c++;u[y]="("+u[h]+")\\.("+u[h]+")\\.("+u[h]+")";varm=c++;u[m]="("+u[v]+")\\.("+u[v]+")\\.("+u[v]+")";varg=c++;u[g]="(?:"+u[h]+"|"+u[d]+")";varb=c++;u[b]="(?:"+u[v]+"|"+u[d]+")";varw=c++;u[w]="(?:-("+u[g]+"(?:\\."+u[g]+")*))";varj=c++;u[j]="(?:-?("+u[b]+"(?:\\."+u[b]+")*))";varS=c++;u[S]=f+"+";var_=c++;u[_]="(?:\\+("+u[S]+"(?:\\."+u[S]+")*))";varE=c++,x="v?"+u[y]+u[w]+"?"+u[_]+"?";u[E]="^"+x+"$";varO="[v=\\s]*"+u[m]+u[j]+"?"+u[_]+"?",A=c++;u[A]="^"+O+"$";varT=c++;u[T]="((?:<|>)?=?)";vark=c++;u[k]=u[v]+"|x|X|\\*";varP=c++;u[P]=u[h]+"|x|X|\\*";varR=c++;u[R]="[v=\\s]*("+u[P]+")(?:\\.("+u[P]+")(?:\\.("+u[P]+")(?:"+u[w]+")?"+u[_]+"?)?)?";varB=c++;u[B]="[v=\\s]*("+u[k]+")(?:\\.("+u[k]+")(?:\\.("+u[k]+")(?:"+u[j]+")?"+u[_]+"?)?)?";var$=c++;u[$]="^"+u[T]+"\\s*"+u[R]+"$";varI=c++;u[I]="^"+u[T]+"\\s*"+u[B]+"$";varV=c++;u[V]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";varN=c++;u[N]="(?:~>?)";varM=c++;u[M]="(\\s*)"+u[N]+"\\s+",a[M]=newRegExp(u[M],"g"),s[M]=newRegExp(p(u[M]),"g");varz=c++;u[z]="^"+u[N]+u[R]+"$";varD=c++;u[D]="^"+u[N]+u[B]+"$";varq=c++;u[q]="(?:\\^)";varC=c++;u[C]="(\\s*)"+u[q]+"\\s+",a[C]=newRegExp(u[C],"g"),s[C]=newRegExp(p(u[C]),"g");varH=c++;u[H]="^"+u[q]+u[R]+"$";varU=c++;u[U]="^"+u[q]+u[B]+"$";varL=c++;u[L]="^"+u[T]+"\\s*("+O+")$|^$";varG=c++;u[G]="^"+u[T]+"\\s*("+x+")$|^$";varK=c++;u[K]="(\\s*)"+u[T]+"\\s*("+O+"|"+u[R]+")",a[K]=newRegExp(u[K],"g"),s[K]=newRegExp(p(u[K]),"g");varF=c++;u[F]="^\\s*("+u[R]+")\\s+-\\s+("+u[R]+")\\s*$";varJ=c++;u[J]="^\\s*("+u[B]+")\\s+-\\s+("+u[B]+")\\s*$";varW=c++;u[W]="(<|>)?=?\\s*\\*";for(varZ=0;Z<35;Z++)t(Z,u[Z]),a[Z]||(a[Z]=newRegExp(u[Z]),s[Z]=newRegExp(p(u[Z])));functionX(e,r){if(r&&"object"==typeofr||(r={loose:!!r,includePrerelease:!1}),einstanceofY)returne;if("string"!=typeofe)returnnull;if(e.length>n)returnnull;if(!(r.loose?s[A]:s[E]).test(e))returnnull;try{returnnewY(e,r)}catch(e){returnnull}}functionY(e,r){if(r&&"object"==typeofr||(r={loose:!!r,includePrerelease:!1}),einstanceofY){if(e.loose===r.loose)returne;e=e.version}elseif("string"!=typeofe)thrownewTypeError("Invalid Version: "+e);if(e.length>n)thrownewTypeError("version is longer than "+n+" characters");if(!(thisinstanceofY))returnnewY(e,r);t("SemVer",e,r),this.options=r,this.loose=!!r.loose;vari=e.trim().match(r.loose?s[A]:s[E]);if(!i)thrownewTypeError("Invalid Version: "+e);if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>o||this.major<0)thrownewTypeError("Invalid major version");if(this.minor>o||this.minor<0)thrownewTypeError("Invalid minor version");if(this.patch>o||this.patch<0)thrownewTypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){varr=+e;if(r>=0&&r<o)returnr}returne})):this.prerelease=[],this.build=i[5]?i[5].split("."):[],this.format()}r.parse=X,r.valid=function(e,r){vart=X(e,r);returnt?t.version:null},r.clean=function(e,r){vart=X(e.trim().replace(/^[=v]+/,""),r);returnt?t.version:null},r.SemVer=Y,Y.prototype.format=function(){returnthis.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},Y.prototype.toString=function(){returnthis.version},Y.prototype.compare=function(e){returnt("SemVer.compare",this.version,this.options,e),einstanceofY||(e=newY(e,this.options)),this.compareMain(e)||this.comparePre(e)},Y.prototype.compareMain=function(e){returneinstanceofY||(e=newY(e,this.options)),ee(this.major,e.major)||ee(this.minor,e.minor)||ee(this.patch,e.patch)},Y.prototype.comparePre=function(e){if(einstanceofY||(e=newY(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return1;if(!this.prerelease.length&&!e.prerelease.length)return0;varr=0;do{varn=this.prerelease[r],o=e.prerelease[r];if(t("prerelease compare",r,n,o),void0===n&&void0===o)return0;if(void0===o)return1;if(void0===n)return-1;if(n!==o)returnee(n,o)}while(++r)},Y.prototype.inc=function(e,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r),this.inc("pre",r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",r),this.inc("pre",r);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(vart=this.prerelease.length;--t>=0;)"number"==typeofthis.prerelease[t]&&(this.prerelease[t]++,t=-2);-1===t&&this.prerelease.push(0)}r&&(this.prerelease[0]===r?isNaN(this.prerelease[1])&&(this.prerelease=[r,0]):this.prerelease=[r,0]);break;default:thrownewError("invalid increment argument: "+e)}returnthis.format(),this.raw=this.version,this},r.inc=function(e,r,t,n){"string"==typeoft&&(n=t,t=void0);try{returnnewY(e,t).inc(r,n).version}catch(e){returnnull}},r.diff=function(e,r){if(oe(e,r))returnnull;vart=X(e),n=X(r),o="";if(t.prerelease.length||n.prerelease.length){o="pre";vari="prerelease"}for(varaint)if(("major"===a||"minor"===a||"patch"===a)&&t[a]!==n[a])returno+a;returni},r.compareIdentifiers=ee;varQ=/^[0-9]+$/;functionee(e,r){vart=Q.test(e),n=Q.test(r);returnt&&n&&(e=+e,r=+r),e===r?0:t&&!n?-1:n&&!t?1:e<r?-1:1}functionre(e,r,t){returnnewY(e,t).compare(newY(r,t))}functionte(e,r,t){returnre(e,r,t)>0}functionne(e,r,t){returnre(e,r,t)<0}functionoe(e,r,t){return0===re(e,r,t)}functionie(e,r,t){return0!==re(e,r,t)}functionae(e,r,t){returnre(e,r,t)>=0}functionse(e,r,t){returnre(e,r,t)<=0}functionue(e,r,t,n){switch(r){case"===":return"object"==typeofe&&(e=e.version),"object"==typeoft&&(t=t.version),e===t;case"!==":return"object"==typeofe&&(e=e.version),"object"==typeoft&&(t=t.version),e!==t;case"":case"=":case"==":returnoe(e,t,n);case"!=":returnie(e,t,n);case">":returnte(e,t,n);case">=":returnae(e,t,n);case"<":returnne(e,t,n);case"<=":returnse(e,t,n);default:thrownewTypeError("Invalid operator: "+r)}}functionce(e,r){if(r&&"object"==typeofr||(r={loose:!!r,includePrerelease:!1}),einstanceofce){if(e.loose===!!r.loose)returne;e=e.value}if(!(thisinstanceofce))returnnewce(e,r);e=e.trim().split(/\s+/).join(""),t("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===fe?this.value="":this.value=this.operator+this.semver.version,t("comp",this)}r.rcompareIdentifiers=function(e,r){returnee(r,e)},r.major=function(e,r){returnnewY(e,r).major},r.minor=function(e,r){returnnewY(e,r).minor},r.patch=function(e,r){returnnewY(e,r).patch},r.compare=re,r.compareLoose=function(e,r){returnre(e,r,!0)},r.rcompare=function(e,r,t){returnre(r,e,t)},r.sort=function(e,t){returne.sort((function(e,n){returnr.compare(e,n,t)}))},r.rsort=function(e,t){returne.sort((function(e,n){returnr.rcompare(e,n,t)}))},r.gt=te,r.lt=ne,r.eq=oe,r.neq=ie,r.gte=ae,r.lte=se,r.cmp=ue,r.Comparator=ce;varfe={};functionle(e,r){if(r&&"object"==typeofr||(r={loose:!!r,includePrerelease:!1}),einstanceofle)returne.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:newle(e.raw,r);if(einstanceofce)returnnewle(e.value,r);if(!(thisinstanceofle))returnnewle(e,r);if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().split(/\s+/).join(""),this.set=this.raw.split("||").map((function(e){returnthis.parseRange(e.trim())}),this).filter((function(e){returne.length})),!this.set.length)thrownewTypeError("Invalid SemVer Range: "+this.raw);this.format()}functionpe(e){return!e||"x"===e.toLowerCase()||"*"===e}functionhe(e,r,t,n,o,i,a,s,u,c,f,l,p){return((r=pe(t)?"":pe(n)?">="+t+".0.0":pe(o)?">="+t+"."+n+".0":">="+r)+""+(s=pe(u)?"":pe(c)?"<"+(+u+1)+".0.0":pe(f)?"<"+u+"."+(+c+1)+".0":l?"<="+u+"."+c+"."+f+"-"+l:"<="+s)).trim()}functionve(e,r,n){for(varo=0;o<e.length;o++)if(!e[o].test(r))return!1;if(r.prerelease.length&&!n.includePrerelease){for(o=0;o<e.length;o++)if(t(e[o].semver),e[o].semver!==fe&&e[o].semver.prerelease.length>0){vari=e[o].semver;if(i.major===r.major&&i.minor===r.minor&&i.patch===r.patch)return!0}return!1}return!0}functionde(e,r,t){try{r=newle(r,t)}catch(e){return!1}returnr.test(e)}functionye(e,r,t,n){varo,i,a,s,u;switch(e=newY(e,n),r=newle(r,n),t){case">":o=te,i=se,a=ne,s=">",u=">=";break;case"<":o=ne,i=ae,a=te,s="<",u="<=";break;default:thrownewTypeError('Must provide a hilo val of "<" or ">"')}if(de(e,r,n))return!1;for(varc=0;c<r.set.length;++c){varf=r.set[c],l=null,p=null;if(f.forEach((function(e){e.semver===fe&&(e=newce(">=0.0.0")),l=l||e,p=p||e,o(e.semver,l.semver,n)?l=e:a(e.semver,p.semver,n)&&(p=e)})),l.operator===s||l.operator===u)return!1;if((!p.operator||p.operator===s)&&i(e,p.semver))return!1;if(p.operator===u&&a(e,p.semver))return!1}return!0}ce.prototype.parse=function(e){varr=this.options.loose?s[L]:s[G],t=e.match(r);if(!t)thrownewTypeError("Invalid comparator: "+e);this.operator=t[1],"="===this.operator&&(this.operator=""),t[2]?this.semver=newY(t[2],this.options.loose):this.semver=fe},ce.prototype.toString=function(){returnthis.value},ce.prototype.test=function(e){returnt("Comparator.test",e,this.options.loose),this.semver===fe||("string"==typeofe&&(e=newY(e,this.options)),ue(e,this.operator,this.semver,this.options))},ce.prototype.intersects=function(e,r){if(!(einstanceofce))thrownewTypeError("a Comparator is required");vart;if(r&&"object"==typeofr||(r={loose:!!r,includePrerelease:!1}),""===this.operator)returnt=newle(e.value,r),de(this.value,t,r);if(""===e.operator)returnt=newle(this.value,r),de(e.semver,t,r);varn=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),o=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),i=this.semver.version===e.semver.version,a=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),s=ue(this.semver,"<",e.semver,r)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),u=ue(this.semver,">",e.semver,r)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);returnn||o||i&&a||s||u},r.Range=le,le.prototype.format=function(){returnthis.range=this.set.map((function(e){returne.join("").trim()})).join("||").trim(),this.range},le.prototype.toString=function(){returnthis.range},le.prototype.parseRange=function(e){varr=this.options.loose,n=r?s[J]:s[F];e=e.replace(n,he),t("hyphen replace",e),e=e.replace(s[K],"$1$2$3"),t("comparator trim",e,s[K]),e=(e=e.replace(s[M],"$1~")).replace(s[C],"$1^");varo=r?s[L]:s[G],i=e.split("").map((function(e){returnfunction(e,r){returnt("comp",e,r),e=function(e,r){returne.trim().split(/\s+/).map((function(e){returnfunction(e,r){t("caret",e,r);varn=r.loose?s[U]:s[H];returne.replace(n,(function(r,n,o,i,a){vars;returnt("caret",e,r,n,o,i,a),pe(n)?s="":pe(o)?s=">="+n+".0.0 <"+(+n+1)+".0.0":pe(i)?s="0"===n?">="+n+"."+o+".0 <"+n+"."+(+o+1)+".0":">="+n+"."+o+".0 <"+(+n+1)+".0.0":a?(t("replaceCaret pr",a),s="0"===n?"0"===o?">="+n+"."+o+"."+i+"-"+a+" <"+n+"."+o+"."+(+i+1):">="+n+"."+o+"."+i+"-"+a+" <"+n+"."+(+o+1)+".0":">="+n+"."+o+"."+i+"-"+a+" <"+(+n+1)+".0.0"):(t("no pr"),s="0"===n?"0"===o?">="+n+"."+o+"."+i+" <"+n+"."+o+"."+(+i+1):">="+n+"."+o+"."+i+" <"+n+"."+(+o+1)+".0":">="+n+"."+o+"."+i+" <"+(+n+1)+".0.0"),t("caret return",s),s}))}(e,r)})).join("")}(e,r),t("caret",e),e=function(e,r){returne.trim().split(/\s+/).map((function(e){returnfunction(e,r){varn=r.loose?s[D]:s[z];returne.replace(n,(function(r,n,o,i,a){vars;returnt("tilde",e,r,n,o,i,a),pe(n)?s="":pe(o)?s=">="+n+".0.0 <"+(+n+1)+".0.0":pe(i)?s=">="+n+"."+o+".0 <"+n+"."+(+o+1)+".0":a?(t("replaceTilde pr",a),s=">="+n+"."+o+"."+i+"-"+a+" <"+n+"."+(+o+1)+".0"):s=">="+n+"."+o+"."+i+" <"+n+"."+(+o+1)+".0",t("tilde return",s),s}))}(e,r)})).join("")}(e,r),t("tildes",e),e=function(e,r){returnt("replaceXRanges",e,r),e.split(/\s+/).map((function(e){returnfunction(e,r){e=e.trim();varn=r.loose?s[I]:s[$];returne.replace(n,(function(r,n,o,i,a,s){t("xRange",e,r,n,o,i,a,s);varu=pe(o),c=u||pe(i),f=c||pe(a);return"="===n&&f&&(n=""),u?r=">"===n||"<"===n?"<0.0.0":"*":n&&f?(c&&(i=0),a=0,">"===n?(n=">=",c?(o=+o+1,i=0,a=0):(i=+i+1,a=0)):"<="===n&&(n="<",c?o=+o+1:i=+i+1),r=n+o+"."+i+"."+a):c?r=">="+o+".0.0 <"+(+o+1)+".0.0":f&&(r=">="+o+"."+i+".0 <"+o+"."+(+i+1)+".0"),t("xRange return",r),r}))}(e,r)})).join("")}(e,r),t("xrange",e),e=function(e,r){returnt("replaceStars",e,r),e.trim().replace(s[W],"")}(e,r),t("stars",e),e}(e,this.options)}),this).join("").split(/\s+/);returnthis.options.loose&&(i=i.filter((function(e){return!!e.match(o)}))),i=i.map((function(e){returnnewce(e,this.options)}),this)},le.prototype.intersects=function(e,r){if(!(einstanceofle))thrownewTypeError("a Range is required");returnthis.set.some((function(t){returnt.every((function(t){returne.set.some((function(e){returne.every((function(e){returnt.intersects(e,r)}))}))}))}))},r.toComparators=function(e,r){returnnewle(e,r).set.map((function(e){returne.map((function(e){returne.value})).join("").trim().split("")}))},le.prototype.test=function(e){if(!e)return!1;"string"==typeofe&&(e=newY(e,this.options));for(varr=0;r<this.set.length;r++)if(ve(this.set[r],e,this.options))return!0;return!1},r.satisfies=de,r.maxSatisfying=function(e,r,t){varn=null,o=null;try{vari=newle(r,t)}catch(e){returnnull}returne.forEach((function(e){i.test(e)&&(n&&-1!==o.compare(e)||(o=newY(n=e,t)))})),n},r.minSatisfying=function(e,r,t){varn=null,o=null;try{vari=newle(r,t)}catch(e){returnnull}returne.forEach((function(e){i.test(e)&&(n&&1!==o.compare(e)||(o=newY(n=e,t)))})),n},r.minVersion=function(e,r){e=newle(e,r);vart=newY("0.0.0");if(e.test(t))returnt;if(t=newY("0.0.0-0"),e.test(t))returnt;t=null;for(varn=0;n<e.set.length;++n){e.set[n].forEach((function(e){varr=newY(e.semver.version);switch(e.operator){case">":0===r.prerelease.length?r.patch++:r.prerelease.push(0),r.raw=r.format();case"":case">=":t&&!te(t,r)||(t=r);break;case"<":case"<=":break;default:thrownewError("Unexpected operation: "+e.operator)}}))}if(t&&e.test(t))returnt;returnnull},r.validRange=function(e,r){try{returnnewle(e,r).range||"*"}catch(e){returnnull}},r.ltr=function(e,r,t){returnye(e,r,"<",t)},r.gtr=function(e,r,t){returnye(e,r,">",t)},r.outside=ye,r.prerelease=function(e,r){vart=X(e,r);returnt&&t.prerelease.length?t.prerelease:null},r.intersects=function(e,r,t){returne=newle(e,t),r=newle(r,t),e.intersects(r)},r.coerce=function(e){if(einstanceofY)returne;if("string"!=typeofe)returnnull;varr=e.match(s[V]);if(null==r)returnnull;returnX(r[1]+"."+(r[2]||"0")+"."+(r[3]||"0"))}}(0,Ke.exports);varFe=Ke.exports.satisfies(process.version,"^6.12.0 || >=8.0.0"),Je=Pe,We=$e,Ze=Ne,Xe=Te,Ye=Ge,Qe=a,er=["RS256","RS384","RS512","ES256","ES384","ES512"],rr=["RS256","RS384","RS512"],tr=["HS256","HS384","HS512"];Fe&&(er.splice(3,0,"PS256","PS384","PS512"),rr.splice(3,0,"PS256","PS384","PS512"));varnr=1/0,or=9007199254740991,ir=17976931348623157e292,ar=NaN,sr="[object Arguments]",ur="[object Function]",cr="[object GeneratorFunction]",fr="[object String]",lr="[object Symbol]",pr=/^\s+|\s+$/g,hr=/^[-+]0x[0-9a-f]+$/i,vr=/^0b[01]+$/i,dr=/^0o[0-7]+$/i,yr=/^(?:0|[1-9]\d*)$/,mr=parseInt;functiongr(e){returne!=e}functionbr(e,r){returnfunction(e,r){for(vart=-1,n=e?e.length:0,o=Array(n);++t<n;)o[t]=r(e[t],t,e);returno}(r,(function(r){returne[r]}))}varwr,jr,Sr=Object.prototype,_r=Sr.hasOwnProperty,Er=Sr.toString,xr=Sr.propertyIsEnumerable,Or=(wr=Object.keys,jr=Object,function(e){returnwr(jr(e))}),Ar=Math.max;functionTr(e,r){vart=Rr(e)||function(e){returnfunction(e){returnIr(e)&&Br(e)}(e)&&_r.call(e,"callee")&&(!xr.call(e,"callee")||Er.call(e)==sr)}(e)?function(e,r){for(vart=-1,n=Array(e);++t<e;)n[t]=r(t);returnn}(e.length,String):[],n=t.length,o=!!n;for(variine)!r&&!_r.call(e,i)||o&&("length"==i||Pr(i,n))||t.push(i);returnt}functionkr(e){if(t=(r=e)&&r.constructor,n="function"==typeoft&&t.prototype||Sr,r!==n)returnOr(e);varr,t,n,o=[];for(variinObject(e))_r.call(e,i)&&"constructor"!=i&&o.push(i);returno}functionPr(e,r){return!!(r=null==r?or:r)&&("number"==typeofe||yr.test(e))&&e>-1&&e%1==0&&e<r}varRr=Array.isArray;functionBr(e){returnnull!=e&&function(e){return"number"==typeofe&&e>-1&&e%1==0&&e<=or}(e.length)&&!function(e){varr=$r(e)?Er.call(e):"";returnr==ur||r==cr}(e)}function$r(e){varr=typeofe;return!!e&&("object"==r||"function"==r)}functionIr(e){return!!e&&"object"==typeofe}varVr=function(e,r,t,n){varo;e=Br(e)?e:(o=e)?br(o,function(e){returnBr(e)?Tr(e):kr(e)}(o)):[],t=t&&!n?function(e){varr=function(e){if(!e)return0===e?e:0;if(e=function(e){if("number"==typeofe)returne;if(function(e){return"symbol"==typeofe||Ir(e)&&Er.call(e)==lr}(e))returnar;if($r(e)){varr="function"==typeofe.valueOf?e.valueOf():e;e=$r(r)?r+"":r}if("string"!=typeofe)return0===e?e:+e;e=e.replace(pr,"");vart=vr.test(e);returnt||dr.test(e)?mr(e.slice(2),t?2:8):hr.test(e)?ar:+e}(e),e===nr||e===-nr){return(e<0?-1:1)*ir}returne==e?e:0}(e),t=r%1;returnr==r?t?r-t:r:0}(t):0;vari=e.length;returnt<0&&(t=Ar(i+t,0)),function(e){return"string"==typeofe||!Rr(e)&&Ir(e)&&Er.call(e)==fr}(e)?t<=i&&e.indexOf(r,t)>-1:!!i&&function(e,r,t){if(r!=r)returnfunction(e,r,t,n){for(varo=e.length,i=t+(n?1:-1);n?i--:++i<o;)if(r(e[i],i,e))returni;return-1}(e,gr,t);for(varn=t-1,o=e.length;++n<o;)if(e[n]===r)returnn;return-1}(e,r,t)>-1},Nr=Object.prototype.toString;varMr=function(e){return!0===e||!1===e||function(e){return!!e&&"object"==typeofe}(e)&&"[object Boolean]"==Nr.call(e)},zr=1/0,Dr=17976931348623157e292,qr=NaN,Cr="[object Symbol]",Hr=/^\s+|\s+$/g,Ur=/^[-+]0x[0-9a-f]+$/i,Lr=/^0b[01]+$/i,Gr=/^0o[0-7]+$/i,Kr=parseInt,Fr=Object.prototype.toString;functionJr(e){varr=typeofe;return!!e&&("object"==r||"function"==r)}varWr=function(e){return"number"==typeofe&&e==function(e){varr=function(e){if(!e)return0===e?e:0;if(e=function(e){if("number"==typeofe)returne;if(function(e){return"symbol"==typeofe||function(e){return!!e&&"object"==typeofe}(e)&&Fr.call(e)==Cr}(e))returnqr;if(Jr(e)){varr="function"==typeofe.valueOf?e.valueOf():e;e=Jr(r)?r+"":r}if("string"!=typeofe)return0===e?e:+e;e=e.replace(Hr,"");vart=Lr.test(e);returnt||Gr.test(e)?Kr(e.slice(2),t?2:8):Ur.test(e)?qr:+e}(e),e===zr||e===-zr){return(e<0?-1:1)*Dr}returne==e?e:0}(e),t=r%1;returnr==r?t?r-t:r:0}(e)},Zr=Object.prototype.toString;varXr=function(e){return"number"==typeofe||function(e){return!!e&&"object"==typeofe}(e)&&"[object Number]"==Zr.call(e)};varYr=Function.prototype,Qr=Object.prototype,et=Yr.toString,rt=Qr.hasOwnProperty,tt=et.call(Object),nt=Qr.toString,ot=function(e,r){returnfunction(t){returne(r(t))}}(Object.getPrototypeOf,Object);varit=function(e){if(!function(e){return!!e&&"object"==typeofe}(e)||"[object Object]"!=nt.call(e)||function(e){varr=!1;if(null!=e&&"function"!=typeofe.toString)try{r=!!(e+"")}catch(e){}returnr}(e))return!1;varr=ot(e);if(null===r)return!0;vart=rt.call(r,"constructor")&&r.constructor;return"function"==typeoft&&tinstanceoft&&et.call(t)==tt},at=Object.prototype.toString,st=Array.isArray;varut=function(e){return"string"==typeofe||!st(e)&&function(e){return!!e&&"object"==typeofe}(e)&&"[object String]"==at.call(e)},ct="Expected a function",ft=1/0,lt=17976931348623157e292,pt=NaN,ht="[object Symbol]",vt=/^\s+|\s+$/g,dt=/^[-+]0x[0-9a-f]+$/i,yt=/^0b[01]+$/i,mt=/^0o[0-7]+$/i,gt=parseInt,bt=Object.prototype.toString;functionwt(e,r){vart;if("function"!=typeofr)thrownewTypeError(ct);returne=function(e){varr=function(e){if(!e)return0===e?e:0;if(e=function(e){if("number"==typeofe)returne;if(function(e){return"symbol"==typeofe||function(e){return!!e&&"object"==typeofe}(e)&&bt.call(e)==ht}(e))returnpt;if(jt(e)){varr="function"==typeofe.valueOf?e.valueOf():e;e=jt(r)?r+"":r}if("string"!=typeofe)return0===e?e:+e;e=e.replace(vt,"");vart=yt.test(e);returnt||mt.test(e)?gt(e.slice(2),t?2:8):dt.test(e)?pt:+e}(e),e===ft||e===-ft){return(e<0?-1:1)*lt}returne==e?e:0}(e),t=r%1;returnr==r?t?r-t:r:0}(e),function(){return--e>0&&(t=r.apply(this,arguments)),e<=1&&(r=void0),t}}functionjt(e){varr=typeofe;return!!e&&("object"==r||"function"==r)}varSt=function(e){returnwt(2,e)},_t=Ge,Et=a,xt=Vr,Ot=Mr,At=Wr,Tt=Xr,kt=it,Pt=ut,Rt=St,Bt=["RS256","RS384","RS512","ES256","ES384","ES512","HS256","HS384","HS512","none"];Fe&&Bt.splice(3,0,"PS256","PS384","PS512");var$t={expiresIn:{isValid:function(e){returnAt(e)||Pt(e)&&e},message:'"expiresIn" should be a number of seconds or string representing a timespan'},notBefore:{isValid:function(e){returnAt(e)||Pt(e)&&e},message:'"notBefore" should be a number of seconds or string representing a timespan'},audience:{isValid:function(e){returnPt(e)||Array.isArray(e)},message:'"audience" must be a string or array'},algorithm:{isValid:xt.bind(null,Bt),message:'"algorithm" must be a valid string enum value'},header:{isValid:kt,message:'"header" must be an object'},encoding:{isValid:Pt,message:'"encoding" must be a string'},issuer:{isValid:Pt,message:'"issuer" must be a string'},subject:{isValid:Pt,message:'"subject" must be a string'},jwtid:{isValid:Pt,message:'"jwtid" must be a string'},noTimestamp:{isValid:Ot,message:'"noTimestamp" must be a boolean'},keyid:{isValid:Pt,message:'"keyid" must be a string'},mutatePayload:{isValid:Ot,message:'"mutatePayload" must be a boolean'}},It={iat:{isValid:Tt,message:'"iat" should be a number of seconds'},exp:{isValid:Tt,message:'"exp" should be a number of seconds'},nbf:{isValid:Tt,message:'"nbf" should be a number of seconds'}};functionVt(e,r,t,n){if(!kt(t))thrownewError('Expected "'+n+'" to be a plain object.');Object.keys(t).forEach((function(o){vari=e[o];if(i){if(!i.isValid(t[o]))thrownewError(i.message)}elseif(!r)thrownewError('"'+o+'" is not allowed in "'+n+'"')}))}varNt={audience:"aud",issuer:"iss",subject:"sub",jwtid:"jti"},Mt=["expiresIn","notBefore","noTimestamp","audience","issuer","subject","jwtid"],zt={decode:Te,verify:function(e,r,t,n){varo;if("function"!=typeoft||n||(n=t,t={}),t||(t={}),t=Object.assign({},t),o=n||function(e,r){if(e)throwe;returnr},t.clockTimestamp&&"number"!=typeoft.clockTimestamp)returno(newJe("clockTimestamp must be a number"));if(void0!==t.nonce&&("string"!=typeoft.nonce||""===t.nonce.trim()))returno(newJe("nonce must be a non-empty string"));vari=t.clockTimestamp||Math.floor(Date.now()/1e3);if(!e)returno(newJe("jwt must be provided"));if("string"!=typeofe)returno(newJe("jwt must be a string"));vara,s=e.split(".");if(3!==s.length)returno(newJe("jwt malformed"));try{a=Xe(e,{complete:!0})}catch(e){returno(e)}if(!a)returno(newJe("invalid token"));varu,c=a.header;if("function"==typeofr){if(!n)returno(newJe("verify must be called asynchronous if secret or public key is provided as a callback"));u=r}elseu=function(e,t){returnt(null,r)};returnu(c,(function(r,n){if(r)returno(newJe("error in secret or public key callback: "+r.message));varu,f=""!==s[2].trim();if(!f&&n)returno(newJe("jwt signature is required"));if(f&&!n)returno(newJe("secret or public key must be provided"));if(f||t.algorithms||(t.algorithms=["none"]),t.algorithms||(t.algorithms=~n.toString().indexOf("BEGIN CERTIFICATE")||~n.toString().indexOf("BEGIN PUBLIC KEY")?er:~n.toString().indexOf("BEGIN RSA PUBLIC KEY")?rr:tr),!~t.algorithms.indexOf(a.header.alg))returno(newJe("invalid algorithm"));try{u=Qe.verify(e,a.header.alg,n)}catch(e){returno(e)}if(!u)returno(newJe("invalid signature"));varl=a.payload;if(void0!==l.nbf&&!t.ignoreNotBefore){if("number"!=typeofl.nbf)returno(newJe("invalid nbf value"));if(l.nbf>i+(t.clockTolerance||0))returno(newWe("jwt not active",newDate(1e3*l.nbf)))}if(void0!==l.exp&&!t.ignoreExpiration){if("number"!=typeofl.exp)returno(newJe("invalid exp value"));if(i>=l.exp+(t.clockTolerance||0))returno(newZe("jwt expired",newDate(1e3*l.exp)))}if(t.audience){varp=Array.isArray(t.audience)?t.audience:[t.audience];if(!(Array.isArray(l.aud)?l.aud:[l.aud]).some((function(e){returnp.some((function(r){returnrinstanceofRegExp?r.test(e):r===e}))})))returno(newJe("jwt audience invalid. expected: "+p.join(" or ")))}if(t.issuer&&("string"==typeoft.issuer&&l.iss!==t.issuer||Array.isArray(t.issuer)&&-1===t.issuer.indexOf(l.iss)))returno(newJe("jwt issuer invalid. expected: "+t.issuer));if(t.subject&&l.sub!==t.subject)returno(newJe("jwt subject invalid. expected: "+t.subject));if(t.jwtid&&l.jti!==t.jwtid)returno(newJe("jwt jwtid invalid. expected: "+t.jwtid));if(t.nonce&&l.nonce!==t.nonce)returno(newJe("jwt nonce invalid. expected: "+t.nonce));if(t.maxAge){if("number"!=typeofl.iat)returno(newJe("iat required when maxAge is specified"));varh=Ye(t.maxAge,l.iat);if(void0===h)returno(newJe('"maxAge" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'));if(i>=h+(t.clockTolerance||0))returno(newZe("maxAge exceeded",newDate(1e3*h)))}if(!0===t.complete){varv=a.signature;returno(null,{header:c,payload:l,signature:v})}returno(null,l)}))},sign:function(e,r,t,n){"function"==typeoft?(n=t,t={}):t=t||{};varo="object"==typeofe&&!Buffer.isBuffer(e),i=Object.assign({alg:t.algorithm||"HS256",typ:o?"JWT":void0,kid:t.keyid},t.header);functiona(e){if(n)returnn(e);throwe}if(!r&&"none"!==t.algorithm)returna(newError("secretOrPrivateKey must have a value"));if(void0===e)returna(newError("payload is required"));if(o){try{!function(e){Vt(It,!0,e,"payload")}(e)}catch(e){returna(e)}t.mutatePayload||(e=Object.assign({},e))}else{vars=Mt.filter((function(e){returnvoid0!==t[e]}));if(s.length>0)returna(newError("invalid "+s.join(",")+" option for "+typeofe+" payload"))}if(void0!==e.exp&&void0!==t.expiresIn)returna(newError('Bad "options.expiresIn" option the payload already has an "exp" property.'));if(void0!==e.nbf&&void0!==t.notBefore)returna(newError('Bad "options.notBefore" option the payload already has an "nbf" property.'));try{!function(e){Vt($t,!1,e,"options")}(t)}catch(e){returna(e)}varu=e.iat||Math.floor(Date.now()/1e3);if(t.noTimestamp?deletee.iat:o&&(e.iat=u),void0!==t.notBefore){try{e.nbf=_t(t.notBefore,u)}catch(e){returna(e)}if(void0===e.nbf)returna(newError('"notBefore" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}if(void0!==t.expiresIn&&"object"==typeofe){try{e.exp=_t(t.expiresIn,u)}catch(e){returna(e)}if(void0===e.exp)returna(newError('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}Object.keys(Nt).forEach((function(r){varn=Nt[r];if(void0!==t[r]){if(void0!==e[n])returna(newError('Bad "options.'+r+'" option. The payload already has an "'+n+'" property.'));e[n]=t[r]}}));varc=t.encoding||"utf8";if("function"!=typeofn)returnEt.sign({header:i,payload:e,secret:r,encoding:c});n=n&&Rt(n),Et.createSign({header:i,privateKey:r,payload:e,encoding:c}).once("error",n).once("done",(function(e){n(null,e)}))},JsonWebTokenError:Pe,NotBeforeError:$e,TokenExpiredError:Ne},Dt={exports:{}};!function(e,r){vart="__lodash_hash_undefined__",n=9007199254740991,i="[object Arguments]",a="[object AsyncFunction]",s="[object Function]",u="[object GeneratorFunction]",c="[object Null]",f="[object Object]",l="[object Proxy]",p="[object Undefined]",h=/^\[object .+?Constructor\]$/,v=/^(?:0|[1-9]\d*)$/,d={};d["[object Float32Array]"]=d["[object Float64Array]"]=d["[object Int8Array]"]=d["[object Int16Array]"]=d["[object Int32Array]"]=d["[object Uint8Array]"]=d["[object Uint8ClampedArray]"]=d["[object Uint16Array]"]=d["[object Uint32Array]"]=!0,d[i]=d["[object Array]"]=d["[object ArrayBuffer]"]=d["[object Boolean]"]=d["[object DataView]"]=d["[object Date]"]=d["[object Error]"]=d[s]=d["[object Map]"]=d["[object Number]"]=d[f]=d["[object RegExp]"]=d["[object Set]"]=d["[object String]"]=d["[object WeakMap]"]=!1;vary="object"==typeofo&&o&&o.Object===Object&&o,m="object"==typeofself&&self&&self.Object===Object&&self,g=y||m||Function("return this")(),b=r&&!r.nodeType&&r,w=b&&e&&!e.nodeType&&e,j=w&&w.exports===b,S=j&&y.process,_=function(){try{vare=w&&w.require&&w.require("util").types;returne||S&&S.binding&&S.binding("util")}catch(e){}}(),E=_&&_.isTypedArray;varx,O=Array.prototype,A=Function.prototype,T=Object.prototype,k=g["__core-js_shared__"],P=A.toString,R=T.hasOwnProperty,B=(x=/[^.]+$/.exec(k&&k.keys&&k.keys.IE_PROTO||""))?"Symbol(src)_1."+x:"",$=T.toString,I=P.call(Object),V=RegExp("^"+P.call(R).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),N=j?g.Buffer:void0,M=g.Symbol,z=g.Uint8Array,D=N?N.allocUnsafe:void0,q=function(e,r){returnfunction(t){returne(r(t))}}(Object.getPrototypeOf,Object),C=Object.create,H=T.propertyIsEnumerable,U=O.splice,L=M?M.toStringTag:void0,G=function(){try{vare=me(Object,"defineProperty");returne({},"",{}),e}catch(e){}}(),K=N?N.isBuffer:void0,F=Math.max,J=Date.now,W=me(g,"Map"),Z=me(Object,"create"),X=function(){functione(){}returnfunction(r){if(!ke(r))return{};if(C)returnC(r);e.prototype=r;vart=newe;returne.prototype=void0,t}}();functionY(e){varr=-1,t=null==e?0:e.length;for(this.clear();++r<t;){varn=e[r];this.set(n[0],n[1])}}functionQ(e){varr=-1,t=null==e?0:e.length;for(this.clear();++r<t;){varn=e[r];this.set(n[0],n[1])}}functionee(e){varr=-1,t=null==e?0:e.length;for(this.clear();++r<t;){varn=e[r];this.set(n[0],n[1])}}functionre(e){varr=this.__data__=newQ(e);this.size=r.size}functionte(e,r){vart=Ee(e),n=!t&&_e(e),o=!t&&!n&&Oe(e),i=!t&&!n&&!o&&Re(e),a=t||n||o||i,s=a?function(e,r){for(vart=-1,n=Array(e);++t<e;)n[t]=r(t);returnn}(e.length,String):[],u=s.length;for(varcine)!r&&!R.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ge(c,u))||s.push(c);returns}functionne(e,r,t){(void0!==t&&!Se(e[r],t)||void0===t&&!(rine))&&ae(e,r,t)}functionoe(e,r,t){varn=e[r];R.call(e,r)&&Se(n,t)&&(void0!==t||rine)||ae(e,r,t)}functionie(e,r){for(vart=e.length;t--;)if(Se(e[t][0],r))returnt;return-1}functionae(e,r,t){"__proto__"==r&&G?G(e,r,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[r]=t}Y.prototype.clear=function(){this.__data__=Z?Z(null):{},this.size=0},Y.prototype.delete=function(e){varr=this.has(e)&&deletethis.__data__[e];returnthis.size-=r?1:0,r},Y.prototype.get=function(e){varr=this.__data__;if(Z){varn=r[e];returnn===t?void0:n}returnR.call(r,e)?r[e]:void0},Y.prototype.has=function(e){varr=this.__data__;returnZ?void0!==r[e]:R.call(r,e)},Y.prototype.set=function(e,r){varn=this.__data__;returnthis.size+=this.has(e)?0:1,n[e]=Z&&void0===r?t:r,this},Q.prototype.clear=function(){this.__data__=[],this.size=0},Q.prototype.delete=function(e){varr=this.__data__,t=ie(r,e);return!(t<0)&&(t==r.length-1?r.pop():U.call(r,t,1),--this.size,!0)},Q.prototype.get=function(e){varr=this.__data__,t=ie(r,e);returnt<0?void0:r[t][1]},Q.prototype.has=function(e){returnie(this.__data__,e)>-1},Q.prototype.set=function(e,r){vart=this.__data__,n=ie(t,e);returnn<0?(++this.size,t.push([e,r])):t[n][1]=r,this},ee.prototype.clear=function(){this.size=0,this.__data__={hash:newY,map:new(W||Q),string:newY}},ee.prototype.delete=function(e){varr=ye(this,e).delete(e);returnthis.size-=r?1:0,r},ee.prototype.get=function(e){returnye(this,e).get(e)},ee.prototype.has=function(e){returnye(this,e).has(e)},ee.prototype.set=function(e,r){vart=ye(this,e),n=t.size;returnt.set(e,r),this.size+=t.size==n?0:1,this},re.prototype.clear=function(){this.__data__=newQ,this.size=0},re.prototype.delete=function(e){varr=this.__data__,t=r.delete(e);returnthis.size=r.size,t},re.prototype.get=function(e){returnthis.__data__.get(e)},re.prototype.has=function(e){returnthis.__data__.has(e)},re.prototype.set=function(e,r){vart=this.__data__;if(tinstanceofQ){varn=t.__data__;if(!W||n.length<199)returnn.push([e,r]),this.size=++t.size,this;t=this.__data__=newee(n)}returnt.set(e,r),this.size=t.size,this};varse,ue=function(e,r,t){for(varn=-1,o=Object(e),i=t(e),a=i.length;a--;){vars=i[se?a:++n];if(!1===r(o[s],s,o))break}returne};functionce(e){returnnull==e?void0===e?p:c:L&&LinObject(e)?function(e){varr=R.call(e,L),t=e[L];try{e[L]=void0;varn=!0}catch(e){}varo=$.call(e);n&&(r?e[L]=t:deletee[L]);returno}(e):function(e){return$.call(e)}(e)}functionfe(e){returnPe(e)&&ce(e)==i}functionle(e){return!(!ke(e)||function(e){return!!B&&Bine}(e))&&(Ae(e)?V:h).test(function(e){if(null!=e){try{returnP.call(e)}catch(e){}try{returne+""}catch(e){}}return""}(e))}functionpe(e){if(!ke(e))returnfunction(e){varr=[];if(null!=e)for(vartinObject(e))r.push(t);returnr}(e);varr=be(e),t=[];for(varnine)("constructor"!=n||!r&&R.call(e,n))&&t.push(n);returnt}functionhe(e,r,t,n,o){e!==r&&ue(r,(function(i,a){if(o||(o=newre),ke(i))!function(e,r,t,n,o,i,a){vars=we(e,t),u=we(r,t),c=a.get(u);if(c)returnvoidne(e,t,c);varl=i?i(s,u,t+"",e,r,a):void0,p=void0===l;if(p){varh=Ee(u),v=!h&&Oe(u),d=!h&&!v&&Re(u);l=u,h||v||d?Ee(s)?l=s:Pe(w=s)&&xe(w)?l=function(e,r){vart=-1,n=e.length;r||(r=Array(n));for(;++t<n;)r[t]=e[t];returnr}(s):v?(p=!1,l=function(e,r){if(r)returne.slice();vart=e.length,n=D?D(t):newe.constructor(t);returne.copy(n),n}(u,!0)):d?(p=!1,y=u,m=!0?(g=y.buffer,b=newg.constructor(g.byteLength),newz(b).set(newz(g)),b):y.buffer,l=newy.constructor(m,y.byteOffset,y.length)):l=[]:function(e){if(!Pe(e)||ce(e)!=f)return!1;varr=q(e);if(null===r)return!0;vart=R.call(r,"constructor")&&r.constructor;return"function"==typeoft&&tinstanceoft&&P.call(t)==I}(u)||_e(u)?(l=s,_e(s)?l=function(e){returnfunction(e,r,t,n){varo=!t;t||(t={});vari=-1,a=r.length;for(;++i<a;){vars=r[i],u=n?n(t[s],e[s],s,t,e):void0;void0===u&&(u=e[s]),o?ae(t,s,u):oe(t,s,u)}returnt}(e,Be(e))}(s):ke(s)&&!Ae(s)||(l=function(e){return"function"!=typeofe.constructor||be(e)?{}:X(q(e))}(u))):p=!1}vary,m,g,b;varw;p&&(a.set(u,l),o(l,u,n,i,a),a.delete(u));ne(e,t,l)}(e,r,a,t,he,n,o);else{vars=n?n(we(e,a),i,a+"",e,r,o):void0;void0===s&&(s=i),ne(e,a,s)}}),Be)}functionve(e,r){returnje(function(e,r,t){returnr=F(void0===r?e.length-1:r,0),function(){for(varn=arguments,o=-1,i=F(n.length-r,0),a=Array(i);++o<i;)a[o]=n[r+o];o=-1;for(vars=Array(r+1);++o<r;)s[o]=n[o];returns[r]=t(a),function(e,r,t){switch(t.length){case0:returne.call(r);case1:returne.call(r,t[0]);case2:returne.call(r,t[0],t[1]);case3:returne.call(r,t[0],t[1],t[2])}returne.apply(r,t)}(e,this,s)}}(e,r,Ve),e+"")}varde=G?function(e,r){returnG(e,"toString",{configurable:!0,enumerable:!1,value:(t=r,function(){returnt}),writable:!0});vart}:Ve;functionye(e,r){vart,n,o=e.__data__;return("string"==(n=typeof(t=r))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==t:null===t)?o["string"==typeofr?"string":"hash"]:o.map}functionme(e,r){vart=function(e,r){returnnull==e?void0:e[r]}(e,r);returnle(t)?t:void0}functionge(e,r){vart=typeofe;return!!(r=null==r?n:r)&&("number"==t||"symbol"!=t&&v.test(e))&&e>-1&&e%1==0&&e<r}functionbe(e){varr=e&&e.constructor;returne===("function"==typeofr&&r.prototype||T)}functionwe(e,r){if(("constructor"!==r||"function"!=typeofe[r])&&"__proto__"!=r)returne[r]}varje=function(e){varr=0,t=0;returnfunction(){varn=J(),o=16-(n-t);if(t=n,o>0){if(++r>=800)returnarguments[0]}elser=0;returne.apply(void0,arguments)}}(de);functionSe(e,r){returne===r||e!=e&&r!=r}var_e=fe(function(){returnarguments}())?fe:function(e){returnPe(e)&&R.call(e,"callee")&&!H.call(e,"callee")},Ee=Array.isArray;functionxe(e){returnnull!=e&&Te(e.length)&&!Ae(e)}varOe=K||function(){return!1};functionAe(e){if(!ke(e))return!1;varr=ce(e);returnr==s||r==u||r==a||r==l}functionTe(e){return"number"==typeofe&&e>-1&&e%1==0&&e<=n}functionke(e){varr=typeofe;returnnull!=e&&("object"==r||"function"==r)}functionPe(e){returnnull!=e&&"object"==typeofe}varRe=E?function(e){returnfunction(r){returne(r)}}(E):function(e){returnPe(e)&&Te(e.length)&&!!d[ce(e)]};functionBe(e){returnxe(e)?te(e,!0):pe(e)}var$e,Ie=($e=function(e,r,t){he(e,r,t)},ve((function(e,r){vart=-1,n=r.length,o=n>1?r[n-1]:void0,i=n>2?r[2]:void0;for(o=$e.length>3&&"function"==typeofo?(n--,o):void0,i&&function(e,r,t){if(!ke(t))return!1;varn=typeofr;return!!("number"==n?xe(t)&&ge(r,t.length):"string"==n&&rint)&&Se(t[r],e)}(r[0],r[1],i)&&(o=n<3?void0:o,n=1),e=Object(e);++t<n;){vara=r[t];a&&$e(e,a,t,o)}returne})));functionVe(e){returne}e.exports=Ie}(Dt,Dt.exports);varqt={jwtVerify:zt.verify,merge:i(Dt.exports)};module.exports=qt;