![]() Server : Apache/2 System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64 User : gositeme ( 1004) PHP Version : 8.2.29 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname Directory : /home/gositeme/domains/lavocat.quebec/public_html/_next/static/chunks/ |
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4706],{86:(e,t,r)=>{"use strict";var n=r(29563);Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=n(r(51062)),o=n(r(91362)),a=n(r(62353));async function s(e){let{options:t,query:r,body:n}=e,{url:s,callbacks:c,logger:u,provider:l}=t;if(!l.type)return{status:500,text:`Error: Type not specified for ${l.name}`};if("oauth"===l.type)try{return await (0,i.default)({options:t,query:r})}catch(e){return u.error("SIGNIN_OAUTH_ERROR",{error:e,providerId:l.id}),{redirect:`${s}/error?error=OAuthSignin`}}if("email"===l.type){var d;let e=null==n?void 0:n.email;if(!e)return{redirect:`${s}/error?error=EmailSignin`};let r=null!=(d=l.normalizeIdentifier)?d:e=>{let[t,r]=e.toLowerCase().trim().split("@");return r=r.split(",")[0],`${t}@${r}`};try{e=r(null==n?void 0:n.email)}catch(e){return u.error("SIGNIN_EMAIL_ERROR",{error:e,providerId:l.id}),{redirect:`${s}/error?error=EmailSignin`}}let i=await (0,a.default)({email:e,adapter:t.adapter}),f={providerAccountId:e,userId:e,type:"email",provider:l.id};try{let e=await c.signIn({user:i,account:f,email:{verificationRequest:!0}});if(!e)return{redirect:`${s}/error?error=AccessDenied`};if("string"==typeof e)return{redirect:e}}catch(e){return{redirect:`${s}/error?${new URLSearchParams({error:e})}`}}try{return{redirect:await (0,o.default)(e,t)}}catch(e){return u.error("SIGNIN_EMAIL_ERROR",{error:e,providerId:l.id}),{redirect:`${s}/error?error=EmailSignin`}}}return{redirect:`${s}/signin`}}},320:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorageInstance",{enumerable:!0,get:function(){return n}});let n=(0,r(55786).createAsyncLocalStorage)()},1035:(e,t,r)=>{"use strict";var n=r(29563);Object.defineProperty(t,"__esModule",{value:!0}),t.AuthHandler=g;var i=p(r(5861)),o=r(57735),a=p(r(1240)),s=n(r(88984)),c=r(81343),u=r(58291),l=r(3883),d=r(53441);function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(f=function(e){return e?r:t})(e)}function p(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=f(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&({}).hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}async function h(e){try{return await e.json()}catch(e){}}async function y(e){var t,r,n,i;if(e instanceof Request){let t=new URL(e.url),a=t.pathname.split("/").slice(3),s=Object.fromEntries(e.headers),c=Object.fromEntries(t.searchParams);return c.nextauth=a,{action:a[0],method:e.method,headers:s,body:await h(e),cookies:(0,d.parse)(null!=(r=e.headers.get("cookie"))?r:""),providerId:a[1],error:null!=(n=t.searchParams.get("error"))?n:a[1],origin:(0,o.detectOrigin)(null!=(i=s["x-forwarded-host"])?i:s.host,s["x-forwarded-proto"]),query:c}}let{headers:a}=e,s=null!=(t=null==a?void 0:a["x-forwarded-host"])?t:null==a?void 0:a.host;return e.origin=(0,o.detectOrigin)(s,null==a?void 0:a["x-forwarded-proto"]),e}async function g(e){var t,r,n,o,d,f,p;let{options:h,req:g}=e,m=await y(g);(0,i.setLogger)(h.logger,h.debug);let b=(0,u.assertConfig)({options:h,req:m});if(Array.isArray(b))b.forEach(i.default.warn);else if(b instanceof Error){if(i.default.error(b.code,b),!["signin","signout","error","verify-request"].includes(m.action)||"GET"!==m.method)return{status:500,headers:[{key:"Content-Type",value:"application/json"}],body:{message:"There is a problem with the server configuration. Check the server logs for more information."}};let{pages:e,theme:t}=h,r=(null==e?void 0:e.error)&&(null==(d=m.query)||null==(d=d.callbackUrl)?void 0:d.startsWith(e.error));return!(null!=e&&e.error)||r?(r&&i.default.error("AUTH_ON_ERROR_PAGE_ERROR",Error(`The error page ${null==e?void 0:e.error} should not require authentication`)),(0,s.default)({theme:t}).error({error:"configuration"})):{redirect:`${e.error}?error=Configuration`}}let{action:w,providerId:v,error:_,method:E="GET"}=m,{options:S,cookies:A}=await (0,c.init)({authOptions:h,action:w,providerId:v,origin:m.origin,callbackUrl:null!=(t=null==(r=m.body)?void 0:r.callbackUrl)?t:null==(n=m.query)?void 0:n.callbackUrl,csrfToken:null==(o=m.body)?void 0:o.csrfToken,cookies:m.cookies,isPost:"POST"===E}),x=new l.SessionStore(S.cookies.sessionToken,m,S.logger);if("GET"===E){let e=(0,s.default)({...S,query:m.query,cookies:A}),{pages:t}=S;switch(w){case"providers":return await a.providers(S.providers);case"session":{let e=await a.session({options:S,sessionStore:x});return e.cookies&&A.push(...e.cookies),{...e,cookies:A}}case"csrf":return{headers:[{key:"Content-Type",value:"application/json"}],body:{csrfToken:S.csrfToken},cookies:A};case"signin":if(t.signIn){let e=`${t.signIn}${t.signIn.includes("?")?"&":"?"}callbackUrl=${encodeURIComponent(S.callbackUrl)}`;return _&&(e=`${e}&error=${encodeURIComponent(_)}`),{redirect:e,cookies:A}}return e.signin();case"signout":if(t.signOut)return{redirect:t.signOut,cookies:A};return e.signout();case"callback":if(S.provider){let e=await a.callback({body:m.body,query:m.query,headers:m.headers,cookies:m.cookies,method:E,options:S,sessionStore:x});return e.cookies&&A.push(...e.cookies),{...e,cookies:A}}break;case"verify-request":if(t.verifyRequest)return{redirect:t.verifyRequest,cookies:A};return e.verifyRequest();case"error":if(["Signin","OAuthSignin","OAuthCallback","OAuthCreateAccount","EmailCreateAccount","Callback","OAuthAccountNotLinked","EmailSignin","CredentialsSignin","SessionRequired"].includes(_))return{redirect:`${S.url}/signin?error=${_}`,cookies:A};if(t.error)return{redirect:`${t.error}${t.error.includes("?")?"&":"?"}error=${_}`,cookies:A};return e.error({error:_})}}else if("POST"===E)switch(w){case"signin":if(S.csrfTokenVerified&&S.provider){let e=await a.signin({query:m.query,body:m.body,options:S});return e.cookies&&A.push(...e.cookies),{...e,cookies:A}}return{redirect:`${S.url}/signin?csrf=true`,cookies:A};case"signout":if(S.csrfTokenVerified){let e=await a.signout({options:S,sessionStore:x});return e.cookies&&A.push(...e.cookies),{...e,cookies:A}}return{redirect:`${S.url}/signout?csrf=true`,cookies:A};case"callback":if(S.provider){if("credentials"===S.provider.type&&!S.csrfTokenVerified)return{redirect:`${S.url}/signin?csrf=true`,cookies:A};let e=await a.callback({body:m.body,query:m.query,headers:m.headers,cookies:m.cookies,method:E,options:S,sessionStore:x});return e.cookies&&A.push(...e.cookies),{...e,cookies:A}}break;case"_log":if(h.logger)try{let{code:e,level:t,...r}=null!=(f=m.body)?f:{};i.default[t](e,r)}catch(e){i.default.error("LOGGER_ERROR",e)}return{};case"session":if(S.csrfTokenVerified){let e=await a.session({options:S,sessionStore:x,newSession:null==(p=m.body)?void 0:p.data,isUpdate:!0});return e.cookies&&A.push(...e.cookies),{...e,cookies:A}}return{status:400,body:{},cookies:A}}return{status:400,body:`Error: This action with HTTP ${E} is not supported by NextAuth.js`}}},1240:(e,t,r)=>{"use strict";var n=r(29563);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"callback",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"providers",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"session",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"signin",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"signout",{enumerable:!0,get:function(){return a.default}});var i=n(r(23463)),o=n(r(86)),a=n(r(73411)),s=n(r(4328)),c=n(r(93910))},3004:(e,t,r)=>{t.OAuth=r(79919).OAuth,t.OAuthEcho=r(79919).OAuthEcho,t.OAuth2=r(63991).OAuth2},3305:(e,t,r)=>{var n="/";!function(){var t={452:function(e){"use strict";e.exports=r(48041)}},i={};function o(e){var r=i[e];if(void 0!==r)return r.exports;var n=i[e]={exports:{}},a=!0;try{t[e](n,n.exports,o),a=!1}finally{a&&delete i[e]}return n.exports}o.ab=n+"/";var a={};!function(){var e,t=a,r=(e=o(452))&&"object"==typeof e&&"default"in e?e.default:e,n=/https?|ftp|gopher|file/;function i(e){"string"==typeof e&&(e=w(e));var t=function(e,t,r){var n=e.auth,i=e.hostname,o=e.protocol||"",a=e.pathname||"",s=e.hash||"",c=e.query||"",u=!1;n=n?encodeURIComponent(n).replace(/%3A/i,":")+"@":"",e.host?u=n+e.host:i&&(u=n+(~i.indexOf(":")?"["+i+"]":i),e.port&&(u+=":"+e.port)),c&&"object"==typeof c&&(c=t.encode(c));var l=e.search||c&&"?"+c||"";return o&&":"!==o.substr(-1)&&(o+=":"),e.slashes||(!o||r.test(o))&&!1!==u?(u="//"+(u||""),a&&"/"!==a[0]&&(a="/"+a)):u||(u=""),s&&"#"!==s[0]&&(s="#"+s),l&&"?"!==l[0]&&(l="?"+l),{protocol:o,host:u,pathname:a=a.replace(/[?#]/g,encodeURIComponent),search:l=l.replace("#","%23"),hash:s}}(e,r,n);return""+t.protocol+t.host+t.pathname+t.search+t.hash}var s="http://",c="w.w",u=s+c,l=/^([a-z0-9.+-]*:\/\/\/)([a-z0-9.+-]:\/*)?/i,d=/https?|ftp|gopher|file/;function f(e,t){var r="string"==typeof e?w(e):e;e="object"==typeof e?i(e):e;var n=w(t),o="";r.protocol&&!r.slashes&&(o=r.protocol,e=e.replace(r.protocol,""),o+="/"===t[0]||"/"===e[0]?"/":""),o&&n.protocol&&(o="",n.slashes||(o=n.protocol,t=t.replace(n.protocol,"")));var a=e.match(l);a&&!n.protocol&&(e=e.substr((o=a[1]+(a[2]||"")).length),/^\/\/[^/]/.test(t)&&(o=o.slice(0,-1)));var c=new URL(e,u+"/"),f=new URL(t,c).toString().replace(u,""),p=n.protocol||r.protocol;return p+=r.slashes||n.slashes?"//":"",!o&&p?f=f.replace(s,p):o&&(f=f.replace(s,"")),d.test(f)||~t.indexOf(".")||"/"===e.slice(-1)||"/"===t.slice(-1)||"/"!==f.slice(-1)||(f=f.slice(0,-1)),o&&(f=o+("/"===f[0]?f.substr(1):f)),f}function p(){}p.prototype.parse=w,p.prototype.format=i,p.prototype.resolve=f,p.prototype.resolveObject=f;var h=/^https?|ftp|gopher|file/,y=/^(.*?)([#?].*)/,g=/^([a-z0-9.+-]*:)(\/{0,3})(.*)/i,m=/^([a-z0-9.+-]*:)?\/\/\/*/i,b=/^([a-z0-9.+-]*:)(\/{0,2})\[(.*)\]$/i;function w(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=!1),e&&"object"==typeof e&&e instanceof p)return e;var o=(e=e.trim()).match(y);e=o?o[1].replace(/\\/g,"/")+o[2]:e.replace(/\\/g,"/"),b.test(e)&&"/"!==e.slice(-1)&&(e+="/");var a=!/(^javascript)/.test(e)&&e.match(g),s=m.test(e),l="";a&&(h.test(a[1])||(l=a[1].toLowerCase(),e=""+a[2]+a[3]),a[2]||(s=!1,h.test(a[1])?(l=a[1],e=""+a[3]):e="//"+a[3]),3!==a[2].length&&1!==a[2].length||(l=a[1],e="/"+a[3]));var d,f=(o?o[1]:e).match(/^https?:\/\/[^/]+(:[0-9]+)(?=\/|$)/),w=f&&f[1],v=new p,_="",E="";try{d=new URL(e)}catch(t){_=t,l||n||!/^\/\//.test(e)||/^\/\/.+[@.]/.test(e)||(E="/",e=e.substr(1));try{d=new URL(e,u)}catch(e){return v.protocol=l,v.href=l,v}}v.slashes=s&&!E,v.host=d.host===c?"":d.host,v.hostname=d.hostname===c?"":d.hostname.replace(/(\[|\])/g,""),v.protocol=_?l||null:d.protocol,v.search=d.search.replace(/\\/g,"%5C"),v.hash=d.hash.replace(/\\/g,"%5C");var S=e.split("#");!v.search&&~S[0].indexOf("?")&&(v.search="?"),v.hash||""!==S[1]||(v.hash="#"),v.query=t?r.decode(d.search.substr(1)):v.search.substr(1),v.pathname=E+(a?function(e){return e.replace(/['^|`]/g,function(e){return"%"+e.charCodeAt().toString(16).toUpperCase()}).replace(/((?:%[0-9A-F]{2})+)/g,function(e,t){try{return decodeURIComponent(t).split("").map(function(e){var t=e.charCodeAt();return t>256||/^[a-z0-9]$/i.test(e)?e:"%"+t.toString(16).toUpperCase()}).join("")}catch(e){return t}})}(d.pathname):d.pathname),"about:"===v.protocol&&"blank"===v.pathname&&(v.protocol="",v.pathname=""),_&&"/"!==e[0]&&(v.pathname=v.pathname.substr(1)),l&&!h.test(l)&&"/"!==e.slice(-1)&&"/"===v.pathname&&(v.pathname=""),v.path=v.pathname+v.search,v.auth=[d.username,d.password].map(decodeURIComponent).filter(Boolean).join(":"),v.port=d.port,w&&!v.host.endsWith(w)&&(v.host+=w,v.port=w.slice(1)),v.href=E?""+v.pathname+v.search+v.hash:i(v);var A=/^(file)/.test(v.href)?["host","hostname"]:[];return Object.keys(v).forEach(function(e){~A.indexOf(e)||(v[e]=v[e]||null)}),v}t.parse=w,t.format=i,t.resolve=f,t.resolveObject=function(e,t){return w(f(e,t))},t.Url=p}(),e.exports=a}()},3883:(e,t)=>{"use strict";function r(e,t){i(e,t),t.add(e)}function n(e,t,r){i(e,t),t.set(e,r)}function i(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")}function o(e,t){return e.get(s(e,t))}function a(e,t,r){return e.set(s(e,t),r),r}function s(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw TypeError("Private element is not present on this object")}Object.defineProperty(t,"__esModule",{value:!0}),t.SessionStore=void 0,t.defaultCookies=d;let c=4096,u=163,l=3933;function d(e){let t=e?"__Secure-":"";return{sessionToken:{name:`${t}next-auth.session-token`,options:{httpOnly:!0,sameSite:"lax",path:"/",secure:e}},callbackUrl:{name:`${t}next-auth.callback-url`,options:{httpOnly:!0,sameSite:"lax",path:"/",secure:e}},csrfToken:{name:`${e?"__Host-":""}next-auth.csrf-token`,options:{httpOnly:!0,sameSite:"lax",path:"/",secure:e}},pkceCodeVerifier:{name:`${t}next-auth.pkce.code_verifier`,options:{httpOnly:!0,sameSite:"lax",path:"/",secure:e,maxAge:900}},state:{name:`${t}next-auth.state`,options:{httpOnly:!0,sameSite:"lax",path:"/",secure:e,maxAge:900}},nonce:{name:`${t}next-auth.nonce`,options:{httpOnly:!0,sameSite:"lax",path:"/",secure:e}}}}var f=new WeakMap,p=new WeakMap,h=new WeakMap,y=new WeakSet;class g{constructor(e,t,i){r(this,y),n(this,f,{}),n(this,p,void 0),n(this,h,void 0),a(h,this,i),a(p,this,e);let{cookies:s}=t,{name:c}=e;if("function"==typeof(null==s?void 0:s.getAll))for(let{name:e,value:t}of s.getAll())e.startsWith(c)&&(o(f,this)[e]=t);else if(s instanceof Map)for(let e of s.keys())e.startsWith(c)&&(o(f,this)[e]=s.get(e));else for(let e in s)e.startsWith(c)&&(o(f,this)[e]=s[e])}get value(){return Object.keys(o(f,this)).sort((e,t)=>{var r,n;return parseInt(null!=(r=e.split(".").pop())?r:"0")-parseInt(null!=(n=t.split(".").pop())?n:"0")}).map(e=>o(f,this)[e]).join("")}chunk(e,t){let r=s(y,this,b).call(this);for(let n of s(y,this,m).call(this,{name:o(p,this).name,value:e,options:{...o(p,this).options,...t}}))r[n.name]=n;return Object.values(r)}clean(){return Object.values(s(y,this,b).call(this))}}function m(e){let t=Math.ceil(e.value.length/l);if(1===t)return o(f,this)[e.name]=e.value,[e];let r=[];for(let n=0;n<t;n++){let t=`${e.name}.${n}`,i=e.value.substr(n*l,l);r.push({...e,name:t,value:i}),o(f,this)[t]=i}return o(h,this).debug("CHUNKING_SESSION_COOKIE",{message:`Session cookie exceeds allowed ${c} bytes.`,emptyCookieSize:u,valueSize:e.value.length,chunks:r.map(e=>e.value.length+u)}),r}function b(){let e={};for(let r in o(f,this)){var t;null==(t=o(f,this))||delete t[r],e[r]={name:r,value:"",options:{...o(p,this).options,maxAge:0}}}return e}t.SessionStore=g},4022:(e,t,r)=>{var n=r(65364);let{inspect:i}=r(68994),{RPError:o,OPError:a}=r(79391),s=r(71807);class c{#e;#t;#r;#n;#i;#o;#a;#s;#c;constructor({client:e,exchangeBody:t,clientAssertionPayload:r,response:n,maxAge:i,DPoP:a}){if(["verification_uri","user_code","device_code"].forEach(e=>{if("string"!=typeof n[e]||!n[e])throw new o(`expected ${e} string to be returned by Device Authorization Response, got %j`,n[e])}),!Number.isSafeInteger(n.expires_in))throw new o("expected expires_in number to be returned by Device Authorization Response, got %j",n.expires_in);this.#o=s()+n.expires_in,this.#t=e,this.#n=a,this.#s=i,this.#i=t,this.#r=r,this.#c=n,this.#a=1e3*n.interval||5e3}abort(){this.#e=!0}async poll({signal:e}={}){let t;if(e&&e.aborted||this.#e)throw new o("polling aborted");if(this.expired())throw new o("the device code %j has expired and the device authorization session has concluded",this.device_code);await new Promise(e=>setTimeout(e,this.#a));try{t=await this.#t.grant({...this.#i,grant_type:"urn:ietf:params:oauth:grant-type:device_code",device_code:this.device_code},{clientAssertionPayload:this.#r,DPoP:this.#n})}catch(t){switch(t instanceof a&&t.error){case"slow_down":this.#a+=5e3;case"authorization_pending":return this.poll({signal:e});default:throw t}}return"id_token"in t&&(await this.#t.decryptIdToken(t),await this.#t.validateIdToken(t,void 0,"token",this.#s)),t}get device_code(){return this.#c.device_code}get user_code(){return this.#c.user_code}get verification_uri(){return this.#c.verification_uri}get verification_uri_complete(){return this.#c.verification_uri_complete}get expires_in(){return Math.max.apply(null,[this.#o-s(),0])}expired(){return 0===this.expires_in}[i.custom](){return`${this.constructor.name} ${i(this.#c,{depth:1/0,colors:n.stdout.isTTY,compact:!1,sorted:!0})}`}}e.exports=c},4328:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=r(41362);async function i(e){var t,r,i,o,a,s;let{options:c,sessionStore:u,newSession:l,isUpdate:d}=e,{adapter:f,jwt:p,events:h,callbacks:y,logger:g,session:{strategy:m,maxAge:b}}=c,w={body:{},headers:[{key:"Content-Type",value:"application/json"}],cookies:[]},v=u.value;if(!v)return w;if("jwt"===m)try{let e=await p.decode({...p,token:v});if(!e)throw Error("JWT invalid");let i=await y.jwt({token:e,...d&&{trigger:"update"},session:l}),o=(0,n.fromDate)(b),a=await y.session({session:{user:{name:null==e?void 0:e.name,email:null==e?void 0:e.email,image:null==e?void 0:e.picture},expires:o.toISOString()},token:i});w.body=a;let s=await p.encode({...p,token:i,maxAge:c.session.maxAge}),f=u.chunk(s,{expires:o});null==(t=w.cookies)||t.push(...f),await (null==(r=h.session)?void 0:r.call(h,{session:a,token:i}))}catch(e){g.error("JWT_SESSION_ERROR",e),null==(i=w.cookies)||i.push(...u.clean())}else try{let{getSessionAndUser:e,deleteSession:t,updateSession:r}=f,i=await e(v);if(i&&i.session.expires.valueOf()<Date.now()&&(await t(v),i=null),i){let{user:e,session:t}=i,s=c.session.updateAge,u=t.expires.valueOf()-1e3*b+1e3*s,f=(0,n.fromDate)(b);u<=Date.now()&&await r({sessionToken:v,expires:f});let p=await y.session({session:{user:{name:e.name,email:e.email,image:e.image},expires:t.expires.toISOString()},user:e,newSession:l,...d?{trigger:"update"}:{}});w.body=p,null==(o=w.cookies)||o.push({name:c.cookies.sessionToken.name,value:v,options:{...c.cookies.sessionToken.options,expires:f}}),await (null==(a=h.session)?void 0:a.call(h,{session:p}))}else v&&(null==(s=w.cookies)||s.push(...u.clean()))}catch(e){g.error("SESSION_ERROR",e)}return w}},6326:(e,t,r)=>{let n=r(79289);function i(e,...t){for(let r of t)if(n(r))for(let[t,o]of Object.entries(r))"__proto__"!==t&&"constructor"!==t&&(n(e[t])&&n(o)?e[t]=i(e[t],o):void 0!==o&&(e[t]=o));return e}e.exports=i},9277:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workUnitAsyncStorageInstance",{enumerable:!0,get:function(){return n}});let n=(0,r(55786).createAsyncLocalStorage)()},9391:e=>{let t=/(\w+)=("[^"]*")/g;e.exports=e=>{let r={};try{for(;null!==t.exec(e);)RegExp.$1&&RegExp.$2&&(r[RegExp.$1]=RegExp.$2.slice(1,-1))}catch(e){}return r}},10490:(e,t,r)=>{let n=r(93298),i=r(71807);class o{constructor(e){Object.assign(this,e);let{constructor:t,...r}=Object.getOwnPropertyDescriptors(this.constructor.prototype);Object.defineProperties(this,r)}set expires_in(e){this.expires_at=i()+Number(e)}get expires_in(){return Math.max.apply(null,[this.expires_at-i(),0])}expired(){return 0===this.expires_in}claims(){if(!this.id_token)throw TypeError("id_token not present in TokenSet");return JSON.parse(n.decode(this.id_token.split(".")[1]))}}e.exports=o},12602:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{METADATA_BOUNDARY_NAME:function(){return r},OUTLET_BOUNDARY_NAME:function(){return i},VIEWPORT_BOUNDARY_NAME:function(){return n}});let r="__next_metadata_boundary__",n="__next_viewport_boundary__",i="__next_outlet_boundary__"},13466:e=>{let t=Symbol();e.exports={CLOCK_TOLERANCE:Symbol(),HTTP_OPTIONS:t}},15773:(e,t,r)=>{"use strict";var n=r(31059).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;if(!e)return"utf8";for(;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function a(e){var t=o(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw Error("Unknown encoding: "+e);return t||e}function s(e){var t;switch(this.encoding=a(e),this.encoding){case"utf16le":this.text=h,this.end=y,t=4;break;case"utf8":this.fillLast=d,t=4;break;case"base64":this.text=g,this.end=m,t=3;break;default:this.write=b,this.end=w;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function c(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function u(e,t,r){var n=t.length-1;if(n<r)return 0;var i=c(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||-2===i?0:(i=c(t[n]))>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||-2===i?0:(i=c(t[n]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}function l(e,t,r){if((192&t[0])!=128)return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if((192&t[1])!=128)return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&(192&t[2])!=128)return e.lastNeed=2,"�"}}function d(e){var t=this.lastTotal-this.lastNeed,r=l(this,e,t);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length)}function f(e,t){var r=u(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)}function p(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t}function h(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function y(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function g(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function m(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function b(e){return e.toString(this.encoding)}function w(e){return e&&e.length?this.write(e):""}t.StringDecoder=s,s.prototype.write=function(e){var t,r;if(0===e.length)return"";if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},s.prototype.end=p,s.prototype.text=f,s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},16436:(e,t,r)=>{let{createHash:n,randomBytes:i}=r(63426),o=r(93298),a=(e=32)=>o.encode(i(e));e.exports={random:a,state:a,nonce:a,codeVerifier:a,codeChallenge:e=>o.encode(n("sha256").update(e).digest())}},16791:(e,t,r)=>{"use strict";function n(e){var t=this;if(t instanceof n||(t=new n),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach(function(e){t.push(e)});else if(arguments.length>0)for(var r=0,i=arguments.length;r<i;r++)t.push(arguments[r]);return t}function i(e,t,r){var n=t===e.head?new s(r,null,t,e):new s(r,t,t.next,e);return null===n.next&&(e.tail=n),null===n.prev&&(e.head=n),e.length++,n}function o(e,t){e.tail=new s(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function a(e,t){e.head=new s(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function s(e,t,r,n){if(!(this instanceof s))return new s(e,t,r,n);this.list=n,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}e.exports=n,n.Node=s,n.create=n,n.prototype.removeNode=function(e){if(e.list!==this)throw Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},n.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},n.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},n.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)o(this,arguments[e]);return this.length},n.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)a(this,arguments[e]);return this.length},n.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},n.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},n.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,n=0;null!==r;n++)e.call(t,r.value,n,this),r=r.next},n.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,n=this.length-1;null!==r;n--)e.call(t,r.value,n,this),r=r.prev},n.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},n.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},n.prototype.map=function(e,t){t=t||this;for(var r=new n,i=this.head;null!==i;)r.push(e.call(t,i.value,this)),i=i.next;return r},n.prototype.mapReverse=function(e,t){t=t||this;for(var r=new n,i=this.tail;null!==i;)r.push(e.call(t,i.value,this)),i=i.prev;return r},n.prototype.reduce=function(e,t){var r,n=this.head;if(arguments.length>1)r=t;else if(this.head)n=this.head.next,r=this.head.value;else throw TypeError("Reduce of empty list with no initial value");for(var i=0;null!==n;i++)r=e(r,n.value,i),n=n.next;return r},n.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else if(this.tail)n=this.tail.prev,r=this.tail.value;else throw TypeError("Reduce of empty list with no initial value");for(var i=this.length-1;null!==n;i--)r=e(r,n.value,i),n=n.prev;return r},n.prototype.toArray=function(){for(var e=Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},n.prototype.toArrayReverse=function(){for(var e=Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},n.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=0,o=this.head;null!==o&&i<e;i++)o=o.next;for(;null!==o&&i<t;i++,o=o.next)r.push(o.value);return r},n.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=this.length,o=this.tail;null!==o&&i>t;i--)o=o.prev;for(;null!==o&&i>e;i--,o=o.prev)r.push(o.value);return r},n.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,o=this.head;null!==o&&n<e;n++)o=o.next;for(var a=[],n=0;o&&n<t;n++)a.push(o.value),o=this.removeNode(o);null===o&&(o=this.tail),o!==this.head&&o!==this.tail&&(o=o.prev);for(var n=0;n<r.length;n++)o=i(this,o,r[n]);return a},n.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=t,this.tail=e,this};try{r(95281)(n)}catch(e){}},18707:(e,t,r)=>{let n;var i=r(82909).Buffer;let o=r(34322),a=r(48041),s=r(40939),c=r(58184),{once:u}=r(95284),{URL:l}=r(3305),d=r(77421),f=r(56106),{RPError:p}=r(79391),h=r(86355),{deep:y}=r(53412),{HTTP_OPTIONS:g}=r(13466),m=/^[\x21\x23-\x5B\x5D-\x7E]+$/,b=["agent","ca","cert","crl","headers","key","lookup","passphrase","pfx","timeout"],w=(e,t)=>{n=y({},e.length?h(t,...e):t,n)};function v(e,t,r){r&&(e.removeHeader("content-type"),e.setHeader("content-type",r)),t&&(e.removeHeader("content-length"),e.setHeader("content-length",i.byteLength(t)),e.write(t)),e.end()}w([],{headers:{"User-Agent":`${f.name}/${f.version} (${f.homepage})`,"Accept-Encoding":"identity"},timeout:3500});let _=new d({max:100});e.exports=async function(e,{accessToken:t,mTLS:r=!1,DPoP:d}={}){let f,w,E,S,A,x,k;try{f=new l(e.url),delete e.url,o(/^(https?:)$/.test(f.protocol))}catch(e){throw TypeError("only valid absolute URLs can be requested")}let P=this[g],R=e,O=`${f.origin}${f.pathname}`;if(d&&"dpopProof"in this&&(R.headers=R.headers||{},R.headers.DPoP=await this.dpopProof({htu:`${f.origin}${f.pathname}`,htm:e.method||"GET",nonce:_.get(O)},d,t)),P&&(w=h(P.call(this,f,y({},R,n)),...b)),R=y({},w,R,n),r&&!R.pfx&&!(R.key&&R.cert))throw TypeError("mutual-TLS certificate and key not set");if(R.searchParams)for(let[e,t]of Object.entries(R.searchParams))f.searchParams.delete(e),f.searchParams.set(e,t);for(let[e,t]of({form:S,responseType:E,json:A,body:x,...R}=R,Object.entries(R.headers||{})))void 0===t&&delete R.headers[e];let T=("https:"===f.protocol?c.request:s.request)(f.href,R);return(async()=>{if(A?v(T,JSON.stringify(A),"application/json"):S?v(T,a.stringify(S),"application/x-www-form-urlencoded"):x?v(T,x):v(T),[k]=await Promise.race([u(T,"response"),u(T,"timeout")]),!k)throw T.destroy(),new p(`outgoing request timed out after ${R.timeout}ms`);let e=[];for await(let t of k)e.push(t);if(e.length)switch(E){case"json":Object.defineProperty(k,"body",{get(){let t=i.concat(e);try{t=JSON.parse(t)}catch(e){throw Object.defineProperty(e,"response",{value:k}),e}finally{Object.defineProperty(k,"body",{value:t,configurable:!0})}return t},configurable:!0});break;case void 0:case"buffer":Object.defineProperty(k,"body",{get(){let t=i.concat(e);return Object.defineProperty(k,"body",{value:t,configurable:!0}),t},configurable:!0});break;default:throw TypeError("unsupported responseType request option")}return k})().catch(e=>{throw k&&Object.defineProperty(e,"response",{value:k}),e}).finally(()=>{let e=k&&k.headers["dpop-nonce"];e&&m.test(e)&&_.set(O,e)})},e.exports.setDefaults=w.bind(void 0,b)},18736:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{Postpone:function(){return x},abortAndThrowOnSynchronousRequestDataAccess:function(){return S},abortOnSynchronousPlatformIOAccess:function(){return _},accessedDynamicData:function(){return j},annotateDynamicAccess:function(){return W},consumeDynamicAccess:function(){return D},createDynamicTrackingState:function(){return p},createDynamicValidationState:function(){return h},createHangingInputAbortSignal:function(){return M},createPostponedAbortSignal:function(){return U},formatDynamicAPIAccesses:function(){return H},getFirstDynamicReason:function(){return y},isDynamicPostpone:function(){return R},isPrerenderInterruptedError:function(){return I},markCurrentScopeAsDynamic:function(){return g},postponeWithTracking:function(){return k},throwIfDisallowedDynamic:function(){return z},throwToInterruptStaticGeneration:function(){return b},trackAllowedDynamicAccess:function(){return J},trackDynamicDataInDynamicRender:function(){return w},trackFallbackParamAccessed:function(){return m},trackSynchronousPlatformIOAccessInDev:function(){return E},trackSynchronousRequestDataAccessInDev:function(){return A},useDynamicRouteParams:function(){return L}});let n=d(r(14232)),i=r(85959),o=r(30941),a=r(20368),s=r(57049),c=r(61303),u=r(12602),l=r(96820);function d(e){return e&&e.__esModule?e:{default:e}}let f="function"==typeof n.default.unstable_postpone;function p(e){return{isDebugDynamicAccesses:e,dynamicAccesses:[],syncDynamicExpression:void 0,syncDynamicErrorWithStack:null}}function h(){return{hasSuspendedDynamic:!1,hasDynamicMetadata:!1,hasDynamicViewport:!1,hasSyncDynamicErrors:!1,dynamicErrors:[]}}function y(e){var t;return null==(t=e.dynamicAccesses[0])?void 0:t.expression}function g(e,t,r){if((!t||"cache"!==t.type&&"unstable-cache"!==t.type)&&!e.forceDynamic&&!e.forceStatic){if(e.dynamicShouldError)throw Object.defineProperty(new o.StaticGenBailoutError(`Route ${e.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${r}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E553",enumerable:!1,configurable:!0});if(t){if("prerender-ppr"===t.type)k(e.route,r,t.dynamicTracking);else if("prerender-legacy"===t.type){t.revalidate=0;let n=Object.defineProperty(new i.DynamicServerError(`Route ${e.route} couldn't be rendered statically because it used ${r}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`),"__NEXT_ERROR_CODE",{value:"E550",enumerable:!1,configurable:!0});throw e.dynamicUsageDescription=r,e.dynamicUsageStack=n.stack,n}}}}function m(e,t){let r=a.workUnitAsyncStorage.getStore();r&&"prerender-ppr"===r.type&&k(e.route,t,r.dynamicTracking)}function b(e,t,r){let n=Object.defineProperty(new i.DynamicServerError(`Route ${t.route} couldn't be rendered statically because it used \`${e}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`),"__NEXT_ERROR_CODE",{value:"E558",enumerable:!1,configurable:!0});throw r.revalidate=0,t.dynamicUsageDescription=e,t.dynamicUsageStack=n.stack,n}function w(e,t){t&&"cache"!==t.type&&"unstable-cache"!==t.type&&("prerender"===t.type||"prerender-legacy"===t.type)&&(t.revalidate=0)}function v(e,t,r){let n=C(`Route ${e} needs to bail out of prerendering at this point because it used ${t}.`);r.controller.abort(n);let i=r.dynamicTracking;i&&i.dynamicAccesses.push({stack:i.isDebugDynamicAccesses?Error().stack:void 0,expression:t})}function _(e,t,r,n){let i=n.dynamicTracking;i&&null===i.syncDynamicErrorWithStack&&(i.syncDynamicExpression=t,i.syncDynamicErrorWithStack=r),v(e,t,n)}function E(e){e.prerenderPhase=!1}function S(e,t,r,n){if(!1===n.controller.signal.aborted){let i=n.dynamicTracking;i&&null===i.syncDynamicErrorWithStack&&(i.syncDynamicExpression=t,i.syncDynamicErrorWithStack=r,!0===n.validating&&(i.syncDynamicLogged=!0)),v(e,t,n)}throw C(`Route ${e} needs to bail out of prerendering at this point because it used ${t}.`)}let A=E;function x({reason:e,route:t}){let r=a.workUnitAsyncStorage.getStore();k(t,e,r&&"prerender-ppr"===r.type?r.dynamicTracking:null)}function k(e,t,r){N(),r&&r.dynamicAccesses.push({stack:r.isDebugDynamicAccesses?Error().stack:void 0,expression:t}),n.default.unstable_postpone(P(e,t))}function P(e,t){return`Route ${e} needs to bail out of prerendering at this point because it used ${t}. React throws this special object to indicate where. It should not be caught by your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`}function R(e){return"object"==typeof e&&null!==e&&"string"==typeof e.message&&O(e.message)}function O(e){return e.includes("needs to bail out of prerendering at this point because it used")&&e.includes("Learn more: https://nextjs.org/docs/messages/ppr-caught-error")}if(!1===O(P("%%%","^^^")))throw Object.defineProperty(Error("Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js"),"__NEXT_ERROR_CODE",{value:"E296",enumerable:!1,configurable:!0});let T="NEXT_PRERENDER_INTERRUPTED";function C(e){let t=Object.defineProperty(Error(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t.digest=T,t}function I(e){return"object"==typeof e&&null!==e&&e.digest===T&&"name"in e&&"message"in e&&e instanceof Error}function j(e){return e.length>0}function D(e,t){return e.dynamicAccesses.push(...t.dynamicAccesses),e.dynamicAccesses}function H(e){return e.filter(e=>"string"==typeof e.stack&&e.stack.length>0).map(({expression:e,stack:t})=>(t=t.split("\n").slice(4).filter(e=>!(e.includes("node_modules/next/")||e.includes(" (<anonymous>)")||e.includes(" (node:"))).join("\n"),`Dynamic API Usage Debug - ${e}:
${t}`))}function N(){if(!f)throw Object.defineProperty(Error("Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js"),"__NEXT_ERROR_CODE",{value:"E224",enumerable:!1,configurable:!0})}function U(e){N();let t=new AbortController;try{n.default.unstable_postpone(e)}catch(e){t.abort(e)}return t.signal}function M(e){let t=new AbortController;return e.cacheSignal?e.cacheSignal.inputReady().then(()=>{t.abort()}):(0,l.scheduleOnNextTick)(()=>t.abort()),t.signal}function W(e,t){let r=t.dynamicTracking;r&&r.dynamicAccesses.push({stack:r.isDebugDynamicAccesses?Error().stack:void 0,expression:e})}function L(e){let t=s.workAsyncStorage.getStore();if(t&&t.isStaticGeneration&&t.fallbackRouteParams&&t.fallbackRouteParams.size>0){let r=a.workUnitAsyncStorage.getStore();r&&("prerender"===r.type?n.default.use((0,c.makeHangingPromise)(r.renderSignal,e)):"prerender-ppr"===r.type?k(t.route,e,r.dynamicTracking):"prerender-legacy"===r.type&&b(e,t,r))}}let F=/\n\s+at Suspense \(<anonymous>\)/,B=RegExp(`\\n\\s+at ${u.METADATA_BOUNDARY_NAME}[\\n\\s]`),K=RegExp(`\\n\\s+at ${u.VIEWPORT_BOUNDARY_NAME}[\\n\\s]`),$=RegExp(`\\n\\s+at ${u.OUTLET_BOUNDARY_NAME}[\\n\\s]`);function J(e,t,r,n,i){if(!$.test(t)){if(B.test(t)){r.hasDynamicMetadata=!0;return}if(K.test(t)){r.hasDynamicViewport=!0;return}if(F.test(t)){r.hasSuspendedDynamic=!0;return}else if(n.syncDynamicErrorWithStack||i.syncDynamicErrorWithStack){r.hasSyncDynamicErrors=!0;return}else{let n=q(`Route "${e}": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a "use cache" above it. We don't have the exact line number added to error messages yet but you can see which component in the stack below. See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense`,t);r.dynamicErrors.push(n);return}}}function q(e,t){let r=Object.defineProperty(Error(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return r.stack="Error: "+e+t,r}function z(e,t,r,n){let i,a,s;if(r.syncDynamicErrorWithStack?(i=r.syncDynamicErrorWithStack,a=r.syncDynamicExpression,s=!0===r.syncDynamicLogged):n.syncDynamicErrorWithStack?(i=n.syncDynamicErrorWithStack,a=n.syncDynamicExpression,s=!0===n.syncDynamicLogged):(i=null,a=void 0,s=!1),t.hasSyncDynamicErrors&&i)throw s||console.error(i),new o.StaticGenBailoutError;let c=t.dynamicErrors;if(c.length){for(let e=0;e<c.length;e++)console.error(c[e]);throw new o.StaticGenBailoutError}if(!t.hasSuspendedDynamic){if(t.hasDynamicMetadata){if(i)throw console.error(i),Object.defineProperty(new o.StaticGenBailoutError(`Route "${e}" has a \`generateMetadata\` that could not finish rendering before ${a} was used. Follow the instructions in the error for this expression to resolve.`),"__NEXT_ERROR_CODE",{value:"E608",enumerable:!1,configurable:!0});throw Object.defineProperty(new o.StaticGenBailoutError(`Route "${e}" has a \`generateMetadata\` that depends on Request data (\`cookies()\`, etc...) or external data (\`fetch(...)\`, etc...) but the rest of the route was static or only used cached data (\`"use cache"\`). If you expected this route to be prerenderable update your \`generateMetadata\` to not use Request data and only use cached external data. Otherwise, add \`await connection()\` somewhere within this route to indicate explicitly it should not be prerendered.`),"__NEXT_ERROR_CODE",{value:"E534",enumerable:!1,configurable:!0})}else if(t.hasDynamicViewport){if(i)throw console.error(i),Object.defineProperty(new o.StaticGenBailoutError(`Route "${e}" has a \`generateViewport\` that could not finish rendering before ${a} was used. Follow the instructions in the error for this expression to resolve.`),"__NEXT_ERROR_CODE",{value:"E573",enumerable:!1,configurable:!0});throw Object.defineProperty(new o.StaticGenBailoutError(`Route "${e}" has a \`generateViewport\` that depends on Request data (\`cookies()\`, etc...) or external data (\`fetch(...)\`, etc...) but the rest of the route was static or only used cached data (\`"use cache"\`). If you expected this route to be prerenderable update your \`generateViewport\` to not use Request data and only use cached external data. Otherwise, add \`await connection()\` somewhere within this route to indicate explicitly it should not be prerendered.`),"__NEXT_ERROR_CODE",{value:"E590",enumerable:!1,configurable:!0})}}}},18769:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{RequestCookies:function(){return n.RequestCookies},ResponseCookies:function(){return n.ResponseCookies},stringifyCookie:function(){return n.stringifyCookie}});let n=r(77820)},19366:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ACTION_HEADER:function(){return n},FLIGHT_HEADERS:function(){return d},NEXT_DID_POSTPONE_HEADER:function(){return h},NEXT_HMR_REFRESH_HASH_COOKIE:function(){return c},NEXT_HMR_REFRESH_HEADER:function(){return s},NEXT_IS_PRERENDER_HEADER:function(){return m},NEXT_REWRITTEN_PATH_HEADER:function(){return y},NEXT_REWRITTEN_QUERY_HEADER:function(){return g},NEXT_ROUTER_PREFETCH_HEADER:function(){return o},NEXT_ROUTER_SEGMENT_PREFETCH_HEADER:function(){return a},NEXT_ROUTER_STALE_TIME_HEADER:function(){return p},NEXT_ROUTER_STATE_TREE_HEADER:function(){return i},NEXT_RSC_UNION_QUERY:function(){return f},NEXT_URL:function(){return u},RSC_CONTENT_TYPE_HEADER:function(){return l},RSC_HEADER:function(){return r}});let r="RSC",n="Next-Action",i="Next-Router-State-Tree",o="Next-Router-Prefetch",a="Next-Router-Segment-Prefetch",s="Next-HMR-Refresh",c="__next_hmr_refresh_hash__",u="Next-Url",l="text/x-component",d=[r,i,o,s,a],f="_rsc",p="x-nextjs-stale-time",h="x-nextjs-postponed",y="x-nextjs-rewritten-path",g="x-nextjs-rewritten-query",m="x-nextjs-prerender";("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},19908:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{isRequestAPICallableInsideAfter:function(){return c},throwForSearchParamsAccessInUseCache:function(){return s},throwWithStaticGenerationBailoutError:function(){return o},throwWithStaticGenerationBailoutErrorWithDynamicError:function(){return a}});let n=r(30941),i=r(44538);function o(e,t){throw Object.defineProperty(new n.StaticGenBailoutError(`Route ${e} couldn't be rendered statically because it used ${t}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E576",enumerable:!1,configurable:!0})}function a(e,t){throw Object.defineProperty(new n.StaticGenBailoutError(`Route ${e} with \`dynamic = "error"\` couldn't be rendered statically because it used ${t}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E543",enumerable:!1,configurable:!0})}function s(e){let t=Object.defineProperty(Error(`Route ${e.route} used "searchParams" inside "use cache". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use "searchParams" outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E634",enumerable:!1,configurable:!0});throw e.invalidUsageError??=t,t}function c(){let e=i.afterTaskAsyncStorage.getStore();return(null==e?void 0:e.rootTaskSpawnPhase)==="action"}},20368:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getDraftModeProviderForCacheScope:function(){return l},getExpectedRequestStore:function(){return o},getHmrRefreshHash:function(){return u},getPrerenderResumeDataCache:function(){return s},getRenderResumeDataCache:function(){return c},throwForMissingRequestStore:function(){return a},workUnitAsyncStorage:function(){return n.workUnitAsyncStorageInstance}});let n=r(9277),i=r(19366);function o(e){let t=n.workUnitAsyncStorageInstance.getStore();switch(!t&&a(e),t.type){case"request":default:return t;case"prerender":case"prerender-ppr":case"prerender-legacy":throw Object.defineProperty(Error(`\`${e}\` cannot be called inside a prerender. This is a bug in Next.js.`),"__NEXT_ERROR_CODE",{value:"E401",enumerable:!1,configurable:!0});case"cache":throw Object.defineProperty(Error(`\`${e}\` cannot be called inside "use cache". Call it outside and pass an argument instead. Read more: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E37",enumerable:!1,configurable:!0});case"unstable-cache":throw Object.defineProperty(Error(`\`${e}\` cannot be called inside unstable_cache. Call it outside and pass an argument instead. Read more: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E69",enumerable:!1,configurable:!0})}}function a(e){throw Object.defineProperty(Error(`\`${e}\` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E251",enumerable:!1,configurable:!0})}function s(e){return"prerender"===e.type||"prerender-ppr"===e.type?e.prerenderResumeDataCache:null}function c(e){return"prerender-legacy"!==e.type&&"cache"!==e.type&&"unstable-cache"!==e.type?"request"===e.type?e.renderResumeDataCache:e.prerenderResumeDataCache:null}function u(e,t){var r;if(e.dev)return"cache"===t.type||"prerender"===t.type?t.hmrRefreshHash:"request"===t.type?null==(r=t.cookies.get(i.NEXT_HMR_REFRESH_HASH_COOKIE))?void 0:r.value:void 0}function l(e,t){if(e.isDraftMode)switch(t.type){case"cache":case"unstable-cache":case"request":return t.draftMode}}},21426:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>C,render:()=>A,renderToStaticMarkup:()=>A,renderToString:()=>A,shallowRender:()=>E});var n=r(63780),i=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|^--/i,o=/^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/,a=/[\s\n\\/='"\0<>]/,s=/^xlink:?./,c=/["&<]/;function u(e){if(!1===c.test(e+=""))return e;for(var t=0,r=0,n="",i="";r<e.length;r++){switch(e.charCodeAt(r)){case 34:i=""";break;case 38:i="&";break;case 60:i="<";break;default:continue}r!==t&&(n+=e.slice(t,r)),n+=i,t=r+1}return r!==t&&(n+=e.slice(t,r)),n}var l=function(e,t){return String(e).replace(/(\n+)/g,"$1"+(t||" "))},d=function(e,t,r){return String(e).length>(t||40)||!r&&-1!==String(e).indexOf("\n")||-1!==String(e).indexOf("<")},f={},p=/([A-Z])/g;function h(e){var t="";for(var r in e){var n=e[r];null!=n&&""!==n&&(t&&(t+=" "),t+="-"==r[0]?r:f[r]||(f[r]=r.replace(p,"-$1").toLowerCase()),t="number"==typeof n&&!1===i.test(r)?t+": "+n+"px;":t+": "+n+";")}return t||void 0}function y(e,t){return Array.isArray(t)?t.reduce(y,e):null!=t&&!1!==t&&e.push(t),e}function g(){this.__d=!0}function m(e,t){return{__v:e,context:t,props:e.props,setState:g,forceUpdate:g,__d:!0,__h:[]}}function b(e,t){var r=e.contextType,n=r&&t[r.__c];return null!=r?n?n.props.value:r.__:t}var w=[];function v(e,t,r,i,c,f){if(null==e||"boolean"==typeof e)return"";if("object"!=typeof e)return"function"==typeof e?"":u(e);var p=r.pretty,g=p&&"string"==typeof p?p:" ";if(Array.isArray(e)){for(var _="",E=0;E<e.length;E++)p&&E>0&&(_+="\n"),_+=v(e[E],t,r,i,c,f);return _}if(void 0!==e.constructor)return"";var S,A=e.type,x=e.props,k=!1;if("function"==typeof A){if(k=!0,!r.shallow||!i&&!1!==r.renderRootComponent){if(A===n.Fragment){var P=[];return y(P,e.props.children),v(P,t,r,!1!==r.shallowHighOrder,c,f)}var R,O=e.__c=m(e,t);n.options.__b&&n.options.__b(e);var T=n.options.__r;if(A.prototype&&"function"==typeof A.prototype.render){var C=b(A,t);(O=e.__c=new A(x,C)).__v=e,O._dirty=O.__d=!0,O.props=x,null==O.state&&(O.state={}),null==O._nextState&&null==O.__s&&(O._nextState=O.__s=O.state),O.context=C,A.getDerivedStateFromProps?O.state=Object.assign({},O.state,A.getDerivedStateFromProps(O.props,O.state)):O.componentWillMount&&(O.componentWillMount(),O.state=O._nextState!==O.state?O._nextState:O.__s!==O.state?O.__s:O.state),T&&T(e),R=O.render(O.props,O.state,O.context)}else for(var I=b(A,t),j=0;O.__d&&j++<25;)O.__d=!1,T&&T(e),R=A.call(e.__c,x,I);return O.getChildContext&&(t=Object.assign({},t,O.getChildContext())),n.options.diffed&&n.options.diffed(e),v(R,t,r,!1!==r.shallowHighOrder,c,f)}A=(S=A).displayName||S!==Function&&S.name||function(e){var t=(Function.prototype.toString.call(e).match(/^\s*function\s+([^( ]+)/)||"")[1];if(!t){for(var r=-1,n=w.length;n--;)if(w[n]===e){r=n;break}r<0&&(r=w.push(e)-1),t="UnnamedComponent"+r}return t}(S)}var D,H,N="<"+A;if(x){var U=Object.keys(x);r&&!0===r.sortAttributes&&U.sort();for(var M=0;M<U.length;M++){var W=U[M],L=x[W];if("children"!==W){if(!a.test(W)&&(r&&r.allAttributes||"key"!==W&&"ref"!==W&&"__self"!==W&&"__source"!==W)){if("defaultValue"===W)W="value";else if("defaultChecked"===W)W="checked";else if("defaultSelected"===W)W="selected";else if("className"===W){if(void 0!==x.class)continue;W="class"}else c&&s.test(W)&&(W=W.toLowerCase().replace(/^xlink:?/,"xlink:"));if("htmlFor"===W){if(x.for)continue;W="for"}"style"===W&&L&&"object"==typeof L&&(L=h(L)),"a"===W[0]&&"r"===W[1]&&"boolean"==typeof L&&(L=String(L));var F=r.attributeHook&&r.attributeHook(W,L,t,r,k);if(F||""===F)N+=F;else if("dangerouslySetInnerHTML"===W)H=L&&L.__html;else if("textarea"===A&&"value"===W)D=L;else if((L||0===L||""===L)&&"function"!=typeof L){if(!(!0!==L&&""!==L||(L=W,r&&r.xml))){N=N+" "+W;continue}if("value"===W){if("select"===A){f=L;continue}"option"===A&&f==L&&void 0===x.selected&&(N+=" selected")}N=N+" "+W+'="'+u(L)+'"'}}}else D=L}}if(p){var B=N.replace(/\n\s*/," ");B===N||~B.indexOf("\n")?p&&~N.indexOf("\n")&&(N+="\n"):N=B}if(N+=">",a.test(A))throw Error(A+" is not a valid HTML tag name in "+N);var K,$=o.test(A)||r.voidElements&&r.voidElements.test(A),J=[];if(H)p&&d(H)&&(H="\n"+g+l(H,g)),N+=H;else if(null!=D&&y(K=[],D).length){for(var q=p&&~N.indexOf("\n"),z=!1,G=0;G<K.length;G++){var V=K[G];if(null!=V&&!1!==V){var X=v(V,t,r,!0,"svg"===A||"foreignObject"!==A&&c,f);if(p&&!q&&d(X)&&(q=!0),X)if(p){var Y=X.length>0&&"<"!=X[0];z&&Y?J[J.length-1]+=X:J.push(X),z=Y}else J.push(X)}}if(p&&q)for(var Z=J.length;Z--;)J[Z]="\n"+g+l(J[Z],g)}if(J.length||H)N+=J.join("");else if(r&&r.xml)return N.substring(0,N.length-1)+" />";return!$||K||H?(p&&~N.indexOf("\n")&&(N+="\n"),N=N+"</"+A+">"):N=N.replace(/>$/," />"),N}var _={shallow:!0};A.render=A;var E=function(e,t){return A(e,t,_)},S=[];function A(e,t,r){t=t||{};var i=n.options.__s;n.options.__s=!0;var o,a=(0,n.h)(n.Fragment,null);return a.__k=[e],o=r&&(r.pretty||r.voidElements||r.sortAttributes||r.shallow||r.allAttributes||r.xml||r.attributeHook)?v(e,t,r):T(e,t,!1,void 0,a),n.options.__c&&n.options.__c(e,S),n.options.__s=i,S.length=0,o}function x(e){return null==e||"boolean"==typeof e?null:"string"==typeof e||"number"==typeof e||"bigint"==typeof e?(0,n.h)(null,null,e):e}function k(e,t){return"className"===e?"class":"htmlFor"===e?"for":"defaultValue"===e?"value":"defaultChecked"===e?"checked":"defaultSelected"===e?"selected":t&&s.test(e)?e.toLowerCase().replace(/^xlink:?/,"xlink:"):e}function P(e,t){return"style"===e&&null!=t&&"object"==typeof t?h(t):"a"===e[0]&&"r"===e[1]&&"boolean"==typeof t?String(t):t}var R=Array.isArray,O=Object.assign;function T(e,t,r,i,s){if(null==e||!0===e||!1===e||""===e)return"";if("object"!=typeof e)return"function"==typeof e?"":u(e);if(R(e)){var c="";s.__k=e;for(var l=0;l<e.length;l++)c+=T(e[l],t,r,i,s),e[l]=x(e[l]);return c}if(void 0!==e.constructor)return"";e.__=s,n.options.__b&&n.options.__b(e);var d=e.type,f=e.props;if("function"==typeof d){if(d===n.Fragment)p=f.children;else{var p=d.prototype&&"function"==typeof d.prototype.render?function(e,t){var r=e.type,i=b(r,t),o=new r(e.props,i);e.__c=o,o.__v=e,o.__d=!0,o.props=e.props,null==o.state&&(o.state={}),null==o.__s&&(o.__s=o.state),o.context=i,r.getDerivedStateFromProps?o.state=O({},o.state,r.getDerivedStateFromProps(o.props,o.state)):o.componentWillMount&&(o.componentWillMount(),o.state=o.__s!==o.state?o.__s:o.state);var a=n.options.__r;return a&&a(e),o.render(o.props,o.state,o.context)}(e,t):function(e,t){var r,i=m(e,t),o=b(e.type,t);e.__c=i;for(var a=n.options.__r,s=0;i.__d&&s++<25;)i.__d=!1,a&&a(e),r=e.type.call(i,e.props,o);return r}(e,t),h=e.__c;h.getChildContext&&(t=O({},t,h.getChildContext()))}var y=T(p=null!=p&&p.type===n.Fragment&&null==p.key?p.props.children:p,t,r,i,e);return n.options.diffed&&n.options.diffed(e),e.__=void 0,n.options.unmount&&n.options.unmount(e),y}var g,w,v="<";if(v+=d,f)for(var _ in g=f.children,f){var E=f[_];if(!("key"===_||"ref"===_||"__self"===_||"__source"===_||"children"===_||"className"===_&&"class"in f||"htmlFor"===_&&"for"in f||a.test(_))){if(E=P(_=k(_,r),E),"dangerouslySetInnerHTML"===_)w=E&&E.__html;else if("textarea"===d&&"value"===_)g=E;else if((E||0===E||""===E)&&"function"!=typeof E){if(!0===E||""===E){E=_,v=v+" "+_;continue}if("value"===_){if("select"===d){i=E;continue}"option"!==d||i!=E||"selected"in f||(v+=" selected")}v=v+" "+_+'="'+u(E)+'"'}}}var S=v;if(v+=">",a.test(d))throw Error(d+" is not a valid HTML tag name in "+v);var A="",C=!1;if(w)A+=w,C=!0;else if("string"==typeof g)A+=u(g),C=!0;else if(R(g)){e.__k=g;for(var I=0;I<g.length;I++){var j=g[I];if(g[I]=x(j),null!=j&&!1!==j){var D=T(j,t,"svg"===d||"foreignObject"!==d&&r,i,e);D&&(A+=D,C=!0)}}}else if(null!=g&&!1!==g&&!0!==g){e.__k=[x(g)];var H=T(g,t,"svg"===d||"foreignObject"!==d&&r,i,e);H&&(A+=H,C=!0)}if(n.options.diffed&&n.options.diffed(e),e.__=void 0,n.options.unmount&&n.options.unmount(e),C)v+=A;else if(o.test(d))return S+" />";return v+"</"+d+">"}A.shallowRender=E;let C=A},21962:(e,t)=>{"use strict";var r;r={value:!0},t.A=function e(e){return{id:"credentials",name:"Credentials",type:"credentials",credentials:{},authorize:()=>null,options:e}}},23463:(e,t,r)=>{"use strict";var n=r(29563);Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var i=n(r(41446)),o=n(r(48579)),a=r(41362),s=n(r(62353));async function c(e){var t,r,n,c,u,l;let{options:d,query:f,body:p,method:h,headers:y,sessionStore:g}=e,{provider:m,adapter:b,url:w,callbackUrl:v,pages:_,jwt:E,events:S,callbacks:A,session:{strategy:x,maxAge:k},logger:P}=d,R=[],O="jwt"===x;if("oauth"===m.type)try{let{profile:n,account:a,OAuthProfile:s,cookies:c}=await (0,i.default)({query:f,body:p,method:h,options:d,cookies:e.cookies});c.length&&R.push(...c);try{if(P.debug("OAUTH_CALLBACK_RESPONSE",{profile:n,account:a,OAuthProfile:s}),!n||!a||!s)return{redirect:`${w}/signin`,cookies:R};let e=n;if(b){let{getUserByAccount:t}=b,r=await t({providerAccountId:a.providerAccountId,provider:m.id});r&&(e=r)}try{let t=await A.signIn({user:e,account:a,profile:s});if(!t)return{redirect:`${w}/error?error=AccessDenied`,cookies:R};if("string"==typeof t)return{redirect:t,cookies:R}}catch(e){return{redirect:`${w}/error?error=${encodeURIComponent(e.message)}`,cookies:R}}let{user:i,session:c,isNewUser:u}=await (0,o.default)({sessionToken:g.value,profile:n,account:a,options:d});if(O){let e={name:i.name,email:i.email,picture:i.image,sub:null==(r=i.id)?void 0:r.toString()},t=await A.jwt({token:e,user:i,account:a,profile:s,isNewUser:u,trigger:u?"signUp":"signIn"}),n=await E.encode({...E,token:t}),o=new Date;o.setTime(o.getTime()+1e3*k);let c=g.chunk(n,{expires:o});R.push(...c)}else R.push({name:d.cookies.sessionToken.name,value:c.sessionToken,options:{...d.cookies.sessionToken.options,expires:c.expires}});if(await (null==(t=S.signIn)?void 0:t.call(S,{user:i,account:a,profile:n,isNewUser:u})),u&&_.newUser)return{redirect:`${_.newUser}${_.newUser.includes("?")?"&":"?"}callbackUrl=${encodeURIComponent(v)}`,cookies:R};return{redirect:v,cookies:R}}catch(e){if("AccountNotLinkedError"===e.name)return{redirect:`${w}/error?error=OAuthAccountNotLinked`,cookies:R};if("CreateUserError"===e.name)return{redirect:`${w}/error?error=OAuthCreateAccount`,cookies:R};return P.error("OAUTH_CALLBACK_HANDLER_ERROR",e),{redirect:`${w}/error?error=Callback`,cookies:R}}}catch(e){if("OAuthCallbackError"===e.name)return P.error("OAUTH_CALLBACK_ERROR",{error:e,providerId:m.id}),{redirect:`${w}/error?error=OAuthCallback`,cookies:R};return P.error("OAUTH_CALLBACK_ERROR",e),{redirect:`${w}/error?error=Callback`,cookies:R}}if("email"===m.type)try{let e=null==f?void 0:f.token,t=null==f?void 0:f.email;if(!e)return{redirect:`${w}/error?error=configuration`,cookies:R};let r=await b.useVerificationToken({identifier:t,token:(0,a.hashToken)(e,d)});if(!r||r.expires.valueOf()<Date.now()||t&&r.identifier!==t)return{redirect:`${w}/error?error=Verification`,cookies:R};let i=await (0,s.default)({email:r.identifier,adapter:b}),u={providerAccountId:i.email,type:"email",provider:m.id};try{let e=await A.signIn({user:i,account:u});if(!e)return{redirect:`${w}/error?error=AccessDenied`,cookies:R};if("string"==typeof e)return{redirect:e,cookies:R}}catch(e){return{redirect:`${w}/error?error=${encodeURIComponent(e.message)}`,cookies:R}}let{user:l,session:p,isNewUser:h}=await (0,o.default)({sessionToken:g.value,profile:i,account:u,options:d});if(O){let e={name:l.name,email:l.email,picture:l.image,sub:null==(c=l.id)?void 0:c.toString()},t=await A.jwt({token:e,user:l,account:u,isNewUser:h,trigger:h?"signUp":"signIn"}),r=await E.encode({...E,token:t}),n=new Date;n.setTime(n.getTime()+1e3*k);let i=g.chunk(r,{expires:n});R.push(...i)}else R.push({name:d.cookies.sessionToken.name,value:p.sessionToken,options:{...d.cookies.sessionToken.options,expires:p.expires}});if(await (null==(n=S.signIn)?void 0:n.call(S,{user:l,account:u,isNewUser:h})),h&&_.newUser)return{redirect:`${_.newUser}${_.newUser.includes("?")?"&":"?"}callbackUrl=${encodeURIComponent(v)}`,cookies:R};return{redirect:v,cookies:R}}catch(e){if("CreateUserError"===e.name)return{redirect:`${w}/error?error=EmailCreateAccount`,cookies:R};return P.error("CALLBACK_EMAIL_ERROR",e),{redirect:`${w}/error?error=Callback`,cookies:R}}if("credentials"===m.type&&"POST"===h){let e,t=p;try{if(!(e=await m.authorize(t,{query:f,body:p,headers:y,method:h})))return{status:401,redirect:`${w}/error?${new URLSearchParams({error:"CredentialsSignin",provider:m.id})}`,cookies:R}}catch(e){return{status:401,redirect:`${w}/error?error=${encodeURIComponent(e.message)}`,cookies:R}}let r={providerAccountId:e.id,type:"credentials",provider:m.id};try{let n=await A.signIn({user:e,account:r,credentials:t});if(!n)return{status:403,redirect:`${w}/error?error=AccessDenied`,cookies:R};if("string"==typeof n)return{redirect:n,cookies:R}}catch(e){return{redirect:`${w}/error?error=${encodeURIComponent(e.message)}`,cookies:R}}let n={name:e.name,email:e.email,picture:e.image,sub:null==(u=e.id)?void 0:u.toString()},i=await A.jwt({token:n,user:e,account:r,isNewUser:!1,trigger:"signIn"}),o=await E.encode({...E,token:i}),a=new Date;a.setTime(a.getTime()+1e3*k);let s=g.chunk(o,{expires:a});return R.push(...s),await (null==(l=S.signIn)?void 0:l.call(S,{user:e,account:r})),{redirect:v,cookies:R}}return{status:500,body:`Error: Callback for provider type ${m.type} not supported`,cookies:R}}},29005:e=>{let t=/^\d+$/;function r(e){if(e.includes("://"))return!0;let r=e.replace(/(\/|\?)/g,"#").split("#")[0];if(r.includes(":")){let e=r.indexOf(":"),n=r.slice(e+1);if(!t.test(n))return!0}return!1}function n(e){if(!e.includes("@"))return!1;let t=e.split("@"),r=t[t.length-1];return!(r.includes(":")||r.includes("/")||r.includes("?"))}e.exports=function(e){let t;if("string"!=typeof e)throw TypeError("input must be a string");return(t=r(e)?e:n(e)?`acct:${e}`:`https://${e}`).split("#")[0]}},29338:(e,t,r)=>{let n=r(3305),{format:i}=r(68994),o=r(85418),{RPError:a,OPError:s}=r(79391),{BaseClient:c}=r(47099),{random:u,codeChallenge:l}=r(16436),d=r(86355),{resolveResponseType:f,resolveRedirectUri:p}=r(78425);function h(e,t,r={}){e?this.error(e):t?this.success(t,r):this.fail(r)}function y({client:e,params:t={},passReqToCallback:r=!1,sessionKey:i,usePKCE:a=!0,extras:s={}}={},u){if(!(e instanceof c))throw TypeError("client must be an instance of openid-client Client");if("function"!=typeof u)throw TypeError("verify callback must be a function");if(!e.issuer||!e.issuer.issuer)throw TypeError("client must have an issuer with an identifier");if(this._client=e,this._issuer=e.issuer,this._verify=u,this._passReqToCallback=r,this._usePKCE=a,this._key=i||`oidc:${n.parse(this._issuer.issuer).hostname}`,this._params=o(t),delete this._params.state,delete this._params.nonce,this._extras=o(s),this._params.response_type||(this._params.response_type=f.call(e)),this._params.redirect_uri||(this._params.redirect_uri=p.call(e)),this._params.scope||(this._params.scope="openid"),!0===this._usePKCE){let e=!!Array.isArray(this._issuer.code_challenge_methods_supported)&&this._issuer.code_challenge_methods_supported;if(e&&e.includes("S256"))this._usePKCE="S256";else if(e&&e.includes("plain"))this._usePKCE="plain";else if(e)throw TypeError("neither code_challenge_method supported by the client is supported by the issuer");else this._usePKCE="S256"}else if("string"==typeof this._usePKCE&&!["plain","S256"].includes(this._usePKCE))throw TypeError(`${this._usePKCE} is not valid/implemented PKCE code_challenge_method`);this.name=n.parse(e.issuer.issuer).hostname}y.prototype.authenticate=function(e,t){(async()=>{let r=this._client;if(!e.session)throw TypeError("authentication requires session support");let n=r.callbackParams(e),o=this._key,{0:s,length:c}=Object.keys(n);if(0===c||1===c&&"iss"===s){let n={state:u(),...this._params,...t};if(!n.nonce&&n.response_type.includes("id_token")&&(n.nonce=u()),e.session[o]=d(n,"nonce","state","max_age","response_type"),this._usePKCE&&n.response_type.includes("code")){let t=u();switch(e.session[o].code_verifier=t,this._usePKCE){case"S256":n.code_challenge=l(t),n.code_challenge_method="S256";break;case"plain":n.code_challenge=t}}this.redirect(r.authorizationUrl(n));return}let f=e.session[o];if(0===Object.keys(f||{}).length)throw Error(i('did not find expected authorization request details in session, req.session["%s"] is %j',o,f));let{state:p,nonce:y,max_age:g,code_verifier:m,response_type:b}=f;try{delete e.session[o]}catch(e){}let w={redirect_uri:this._params.redirect_uri,...t},v={state:p,nonce:y,max_age:g,code_verifier:m,response_type:b},_=await r.callback(w.redirect_uri,n,v,this._extras),E=this._passReqToCallback,S=this._verify.length>(E?3:2)&&r.issuer.userinfo_endpoint,A=[_,h.bind(this)];if(S){if(!_.access_token)throw new a({message:"expected access_token to be returned when asking for userinfo in verify callback",tokenset:_});let e=await r.userinfo(_);A.splice(1,0,e)}E&&A.unshift(e),this._verify(...A)})().catch(e=>{e instanceof s&&"server_error"!==e.error&&!e.error.startsWith("invalid")||e instanceof a?this.fail(e):this.error(e)})},e.exports=y},30941:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{StaticGenBailoutError:function(){return n},isStaticGenBailoutError:function(){return i}});let r="NEXT_STATIC_GEN_BAILOUT";class n extends Error{constructor(...e){super(...e),this.code=r}}function i(e){return"object"==typeof e&&null!==e&&"code"in e&&e.code===r}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},31059:(e,t,r)=>{var n=r(82909),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return n.SlowBuffer(e)}},32166:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=r(63780);function i(e){var t;let{url:r,error:i="default",theme:o}=e,a=`${r}/signin`,s={default:{status:200,heading:"Error",message:(0,n.h)("p",null,(0,n.h)("a",{className:"site",href:null==r?void 0:r.origin},null==r?void 0:r.host))},configuration:{status:500,heading:"Server error",message:(0,n.h)("div",null,(0,n.h)("p",null,"There is a problem with the server configuration."),(0,n.h)("p",null,"Check the server logs for more information."))},accessdenied:{status:403,heading:"Access Denied",message:(0,n.h)("div",null,(0,n.h)("p",null,"You do not have permission to sign in."),(0,n.h)("p",null,(0,n.h)("a",{className:"button",href:a},"Sign in")))},verification:{status:403,heading:"Unable to sign in",message:(0,n.h)("div",null,(0,n.h)("p",null,"The sign in link is no longer valid."),(0,n.h)("p",null,"It may have been used already or it may have expired.")),signin:(0,n.h)("a",{className:"button",href:a},"Sign in")}},{status:c,heading:u,message:l,signin:d}=null!=(t=s[i.toLowerCase()])?t:s.default;return{status:c,html:(0,n.h)("div",{className:"error"},(null==o?void 0:o.brandColor)&&(0,n.h)("style",{dangerouslySetInnerHTML:{__html:`
:root {
--brand-color: ${null==o?void 0:o.brandColor}
}
`}}),(0,n.h)("div",{className:"card"},(null==o?void 0:o.logo)&&(0,n.h)("img",{src:o.logo,alt:"Logo",className:"logo"}),(0,n.h)("h1",null,u),(0,n.h)("div",{className:"message"},l),d))}}},32545:(e,t,r)=>{var n="/",i=r(65364);!function(){var t={782:function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},646:function(e){"use strict";let t={};function r(e,r,n){function i(e,t,n){return"string"==typeof r?r:r(e,t,n)}n||(n=Error);class o extends n{constructor(e,t,r){super(i(e,t,r))}}o.prototype.name=n.name,o.prototype.code=e,t[e]=o}function n(e,t){if(!Array.isArray(e))return`of ${t} ${String(e)}`;{let r=e.length;return(e=e.map(e=>String(e)),r>2)?`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]:2===r?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}}function i(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function o(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function a(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}r("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),r("ERR_INVALID_ARG_TYPE",function(e,t,r){let s,c;if("string"==typeof t&&i(t,"not ")?(s="must not be",t=t.replace(/^not /,"")):s="must be",o(e," argument"))c=`The ${e} ${s} ${n(t,"type")}`;else{let r=a(e,".")?"property":"argument";c=`The "${e}" ${r} ${s} ${n(t,"type")}`}return c+`. Received type ${typeof r}`},TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},403:function(e,t,r){"use strict";var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=l;var o=r(709),a=r(337);r(782)(l,o);for(var s=n(a.prototype),c=0;c<s.length;c++){var u=s[c];l.prototype[u]||(l.prototype[u]=a.prototype[u])}function l(e){if(!(this instanceof l))return new l(e);o.call(this,e),a.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",d)))}function d(){this._writableState.ended||i.nextTick(f,this)}function f(e){e.end()}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(l.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(l.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},889:function(e,t,r){"use strict";e.exports=i;var n=r(170);function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}r(782)(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},709:function(e,t,n){"use strict";e.exports=O,O.ReadableState=R,n(361).EventEmitter;var o,a,s,c,u,l=function(e,t){return e.listeners(t).length},d=n(678),f=n(300).Buffer,p=r.g.Uint8Array||function(){};function h(e){return f.from(e)}function y(e){return f.isBuffer(e)||e instanceof p}var g=n(837);a=g&&g.debuglog?g.debuglog("stream"):function(){};var m=n(379),b=n(25),w=n(776).getHighWaterMark,v=n(646).q,_=v.ERR_INVALID_ARG_TYPE,E=v.ERR_STREAM_PUSH_AFTER_EOF,S=v.ERR_METHOD_NOT_IMPLEMENTED,A=v.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(782)(O,d);var x=b.errorOrDestroy,k=["error","close","destroy","pause","resume"];function P(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}function R(e,t,r){o=o||n(403),e=e||{},"boolean"!=typeof r&&(r=t instanceof o),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=w(this,e,"readableHighWaterMark",r),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(s||(s=n(704).s),this.decoder=new s(e.encoding),this.encoding=e.encoding)}function O(e){if(o=o||n(403),!(this instanceof O))return new O(e);var t=this instanceof o;this._readableState=new R(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),d.call(this)}function T(e,t,r,n,i){a("readableAddChunk",t);var o,s=e._readableState;if(null===t)s.reading=!1,N(e,s);else if(i||(o=I(s,t)),o)x(e,o);else if(s.objectMode||t&&t.length>0)if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===f.prototype||(t=h(t)),n)s.endEmitted?x(e,new A):C(e,s,t,!0);else if(s.ended)x(e,new E);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?C(e,s,t,!1):W(e,s)):C(e,s,t,!1)}else n||(s.reading=!1,W(e,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function C(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&U(e)),W(e,t)}function I(e,t){var r;return y(t)||"string"==typeof t||void 0===t||e.objectMode||(r=new _("chunk",["string","Buffer","Uint8Array"],t)),r}Object.defineProperty(O.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),O.prototype.destroy=b.destroy,O.prototype._undestroy=b.undestroy,O.prototype._destroy=function(e,t){t(e)},O.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=f.from(e,t),t=""),r=!0),T(this,e,t,!1,r)},O.prototype.unshift=function(e){return T(this,e,null,!0,!1)},O.prototype.isPaused=function(){return!1===this._readableState.flowing},O.prototype.setEncoding=function(e){s||(s=n(704).s);var t=new s(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";null!==r;)i+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var j=0x40000000;function D(e){return e>=j?e=j:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function H(e,t){if(e<=0||0===t.length&&t.ended)return 0;if(t.objectMode)return 1;if(e!=e)if(t.flowing&&t.length)return t.buffer.head.data.length;else return t.length;return(e>t.highWaterMark&&(t.highWaterMark=D(e)),e<=t.length)?e:t.ended?t.length:(t.needReadable=!0,0)}function N(e,t){if(a("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?U(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,M(e)))}}function U(e){var t=e._readableState;a("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(a("emitReadable",t.flowing),t.emittedReadable=!0,i.nextTick(M,e))}function M(e){var t=e._readableState;a("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,q(e)}function W(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(L,e,t))}function L(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(a("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function F(e){return function(){var t=e._readableState;a("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&l(e,"data")&&(t.flowing=!0,q(e))}}function B(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function K(e){a("readable nexttick read 0"),e.read(0)}function $(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(J,e,t))}function J(e,t){a("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),q(e),t.flowing&&!t.reading&&e.read(0)}function q(e){var t=e._readableState;for(a("flow",t.flowing);t.flowing&&null!==e.read(););}function z(e,t){var r;return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r)}function G(e){var t=e._readableState;a("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,i.nextTick(V,t,e))}function V(e,t){if(a("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function X(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return -1}O.prototype.read=function(e){a("read",e),e=parseInt(e,10);var t,r=this._readableState,n=e;if(0!==e&&(r.emittedReadable=!1),0===e&&r.needReadable&&((0!==r.highWaterMark?r.length>=r.highWaterMark:r.length>0)||r.ended))return a("read: emitReadable",r.length,r.ended),0===r.length&&r.ended?G(this):U(this),null;if(0===(e=H(e,r))&&r.ended)return 0===r.length&&G(this),null;var i=r.needReadable;return a("need readable",i),(0===r.length||r.length-e<r.highWaterMark)&&a("length less than watermark",i=!0),r.ended||r.reading?a("reading or ended",i=!1):i&&(a("do read"),r.reading=!0,r.sync=!0,0===r.length&&(r.needReadable=!0),this._read(r.highWaterMark),r.sync=!1,r.reading||(e=H(n,r))),null===(t=e>0?z(e,r):null)?(r.needReadable=r.length<=r.highWaterMark,e=0):(r.length-=e,r.awaitDrain=0),0===r.length&&(r.ended||(r.needReadable=!0),n!==e&&r.ended&&G(this)),null!==t&&this.emit("data",t),t},O.prototype._read=function(e){x(this,new S("_read()"))},O.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,a("pipe count=%d opts=%j",n.pipesCount,t);var o=t&&!1===t.end||e===i.stdout||e===i.stderr?m:c;function s(e,t){a("onunpipe"),e===r&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,f())}function c(){a("onend"),e.end()}n.endEmitted?i.nextTick(o):r.once("end",o),e.on("unpipe",s);var u=F(r);e.on("drain",u);var d=!1;function f(){a("cleanup"),e.removeListener("close",y),e.removeListener("finish",g),e.removeListener("drain",u),e.removeListener("error",h),e.removeListener("unpipe",s),r.removeListener("end",c),r.removeListener("end",m),r.removeListener("data",p),d=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&u()}function p(t){a("ondata");var i=e.write(t);a("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==X(n.pipes,e))&&!d&&(a("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function h(t){a("onerror",t),m(),e.removeListener("error",h),0===l(e,"error")&&x(e,t)}function y(){e.removeListener("finish",g),m()}function g(){a("onfinish"),e.removeListener("close",y),m()}function m(){a("unpipe"),r.unpipe(e)}return r.on("data",p),P(e,"error",h),e.once("close",y),e.once("finish",g),e.emit("pipe",r),n.flowing||(a("pipe resume"),r.resume()),e},O.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=X(t.pipes,e);return -1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},O.prototype.on=function(e,t){var r=d.prototype.on.call(this,e,t),n=this._readableState;return"data"===e?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"!==e||n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,a("on readable",n.length,n.reading),n.length?U(this):n.reading||i.nextTick(K,this)),r},O.prototype.addListener=O.prototype.on,O.prototype.removeListener=function(e,t){var r=d.prototype.removeListener.call(this,e,t);return"readable"===e&&i.nextTick(B,this),r},O.prototype.removeAllListeners=function(e){var t=d.prototype.removeAllListeners.apply(this,arguments);return("readable"===e||void 0===e)&&i.nextTick(B,this),t},O.prototype.resume=function(){var e=this._readableState;return e.flowing||(a("resume"),e.flowing=!e.readableListening,$(this,e)),e.paused=!1,this},O.prototype.pause=function(){return a("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(a("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},O.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",function(){if(a("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(i){if(a("wrapped data"),r.decoder&&(i=r.decoder.write(i)),!r.objectMode||null!=i)(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))}),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<k.length;o++)e.on(k[o],this.emit.bind(this,k[o]));return this._read=function(t){a("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(O.prototype[Symbol.asyncIterator]=function(){return void 0===c&&(c=n(871)),c(this)}),Object.defineProperty(O.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(O.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(O.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),O._fromList=z,Object.defineProperty(O.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(O.from=function(e,t){return void 0===u&&(u=n(727)),u(O,e,t)})},170:function(e,t,r){"use strict";e.exports=l;var n=r(646).q,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,c=r(403);function u(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function l(e){if(!(this instanceof l))return new l(e);c.call(this,e),this._transformState={afterTransform:u.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",d)}function d(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?f(this,null,null):this._flush(function(t,r){f(e,t,r)})}function f(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new s;if(e._transformState.transforming)throw new a;return e.push(null)}r(782)(l,c),l.prototype.push=function(e,t){return this._transformState.needTransform=!1,c.prototype.push.call(this,e,t)},l.prototype._transform=function(e,t,r){r(new i("_transform()"))},l.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},l.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},l.prototype._destroy=function(e,t){c.prototype._destroy.call(this,e,function(e){t(e)})}},337:function(e,t,n){"use strict";function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){J(t,e)}}e.exports=R,R.WritableState=P;var a,s,c={deprecate:n(769)},u=n(678),l=n(300).Buffer,d=r.g.Uint8Array||function(){};function f(e){return l.from(e)}function p(e){return l.isBuffer(e)||e instanceof d}var h=n(25),y=n(776).getHighWaterMark,g=n(646).q,m=g.ERR_INVALID_ARG_TYPE,b=g.ERR_METHOD_NOT_IMPLEMENTED,w=g.ERR_MULTIPLE_CALLBACK,v=g.ERR_STREAM_CANNOT_PIPE,_=g.ERR_STREAM_DESTROYED,E=g.ERR_STREAM_NULL_VALUES,S=g.ERR_STREAM_WRITE_AFTER_END,A=g.ERR_UNKNOWN_ENCODING,x=h.errorOrDestroy;function k(){}function P(e,t,r){a=a||n(403),e=e||{},"boolean"!=typeof r&&(r=t instanceof a),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=y(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=!1===e.decodeStrings;this.decodeStrings=!i,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){N(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function R(e){var t=this instanceof(a=a||n(403));if(!t&&!s.call(R,this))return new R(e);this._writableState=new P(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),u.call(this)}function O(e,t){var r=new S;x(e,r),i.nextTick(t,r)}function T(e,t,r,n){var o;return null===r?o=new E:"string"==typeof r||t.objectMode||(o=new m("chunk",["string","Buffer"],r)),!o||(x(e,o),i.nextTick(n,o),!1)}function C(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=l.from(t,r)),t}function I(e,t,r,n,i,o){if(!r){var a=C(t,n,i);n!==a&&(r=!0,i="buffer",n=a)}var s=t.objectMode?1:n.length;t.length+=s;var c=t.length<t.highWaterMark;if(c||(t.needDrain=!0),t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else j(e,t,!1,s,n,i,o);return c}function j(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new _("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function D(e,t,r,n,o){--t.pendingcb,r?(i.nextTick(o,n),i.nextTick(K,e,t),e._writableState.errorEmitted=!0,x(e,n)):(o(n),e._writableState.errorEmitted=!0,x(e,n),K(e,t))}function H(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function N(e,t){var r=e._writableState,n=r.sync,o=r.writecb;if("function"!=typeof o)throw new w;if(H(r),t)D(e,r,n,t,o);else{var a=L(r)||e.destroyed;a||r.corked||r.bufferProcessing||!r.bufferedRequest||W(e,r),n?i.nextTick(U,e,r,a,o):U(e,r,a,o)}}function U(e,t,r,n){r||M(e,t),t.pendingcb--,n(),K(e,t)}function M(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function W(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=Array(t.bufferedRequestCount),i=t.corkedRequestsFree;i.entry=r;for(var a=0,s=!0;r;)n[a]=r,r.isBuf||(s=!1),r=r.next,a+=1;n.allBuffers=s,j(e,t,!0,t.length,n,"",i.finish),t.pendingcb++,t.lastBufferedRequest=null,i.next?(t.corkedRequestsFree=i.next,i.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,u=r.encoding,l=r.callback,d=t.objectMode?1:c.length;if(j(e,t,!1,d,c,u,l),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function L(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function F(e,t){e._final(function(r){t.pendingcb--,r&&x(e,r),t.prefinished=!0,e.emit("prefinish"),K(e,t)})}function B(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,i.nextTick(F,e,t)))}function K(e,t){var r=L(t);if(r&&(B(e,t),0===t.pendingcb)&&(t.finished=!0,e.emit("finish"),t.autoDestroy)){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}function $(e,t,r){t.ending=!0,K(e,t),r&&(t.finished?i.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function J(e,t,r){var n=e.entry;for(e.entry=null;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}n(782)(R,u),P.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(P.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(s=Function.prototype[Symbol.hasInstance],Object.defineProperty(R,Symbol.hasInstance,{value:function(e){return!!s.call(this,e)||this===R&&e&&e._writableState instanceof P}})):s=function(e){return e instanceof this},R.prototype.pipe=function(){x(this,new v)},R.prototype.write=function(e,t,r){var n=this._writableState,i=!1,o=!n.objectMode&&p(e);return o&&!l.isBuffer(e)&&(e=f(e)),"function"==typeof t&&(r=t,t=null),o?t="buffer":t||(t=n.defaultEncoding),"function"!=typeof r&&(r=k),n.ending?O(this,r):(o||T(this,n,e,r))&&(n.pendingcb++,i=I(this,n,o,e,t,r)),i},R.prototype.cork=function(){this._writableState.corked++},R.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||W(this,e))},R.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new A(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(R.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(R.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),R.prototype._write=function(e,t,r){r(new b("_write()"))},R.prototype._writev=null,R.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||$(this,n,r),this},Object.defineProperty(R.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(R.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),R.prototype.destroy=h.destroy,R.prototype._undestroy=h.undestroy,R.prototype._destroy=function(e,t){t(e)}},871:function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o,a=r(698),s=Symbol("lastResolve"),c=Symbol("lastReject"),u=Symbol("error"),l=Symbol("ended"),d=Symbol("lastPromise"),f=Symbol("handlePromise"),p=Symbol("stream");function h(e,t){return{value:e,done:t}}function y(e){var t=e[s];if(null!==t){var r=e[p].read();null!==r&&(e[d]=null,e[s]=null,e[c]=null,t(h(r,!1)))}}function g(e){i.nextTick(y,e)}function m(e,t){return function(r,n){e.then(function(){if(t[l])return void r(h(void 0,!0));t[f](r,n)},n)}}var b=Object.getPrototypeOf(function(){}),w=Object.setPrototypeOf((n(o={get stream(){return this[p]},next:function(){var e,t=this,r=this[u];if(null!==r)return Promise.reject(r);if(this[l])return Promise.resolve(h(void 0,!0));if(this[p].destroyed)return new Promise(function(e,r){i.nextTick(function(){t[u]?r(t[u]):e(h(void 0,!0))})});var n=this[d];if(n)e=new Promise(m(n,this));else{var o=this[p].read();if(null!==o)return Promise.resolve(h(o,!1));e=new Promise(this[f])}return this[d]=e,e}},Symbol.asyncIterator,function(){return this}),n(o,"return",function(){var e=this;return new Promise(function(t,r){e[p].destroy(null,function(e){if(e)return void r(e);t(h(void 0,!0))})})}),o),b);e.exports=function(e){var t,r=Object.create(w,(n(t={},p,{value:e,writable:!0}),n(t,s,{value:null,writable:!0}),n(t,c,{value:null,writable:!0}),n(t,u,{value:null,writable:!0}),n(t,l,{value:e._readableState.endEmitted,writable:!0}),n(t,f,{value:function(e,t){var n=r[p].read();n?(r[d]=null,r[s]=null,r[c]=null,e(h(n,!1))):(r[s]=e,r[c]=t)},writable:!0}),t));return r[d]=null,a(e,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[c];null!==t&&(r[d]=null,r[s]=null,r[c]=null,t(e)),r[u]=e;return}var n=r[s];null!==n&&(r[d]=null,r[s]=null,r[c]=null,n(h(void 0,!0))),r[l]=!0}),e.on("readable",g.bind(null,r)),r}},379:function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach(function(t){o(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),e}var u=r(300).Buffer,l=r(837).inspect,d=l&&l.custom||"inspect";function f(e,t,r){u.prototype.copy.call(e,t,r)}e.exports=function(){function e(){a(this,e),this.head=null,this.tail=null,this.length=0}return c(e,[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return u.alloc(0);for(var t=u.allocUnsafe(e>>>0),r=this.head,n=0;r;)f(r.data,t,n),n+=r.data.length,r=r.next;return t}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var i=t.data,o=e>i.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=u.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:d,value:function(e,t){return l(this,i({},t,{depth:0,customInspect:!1}))}}]),e}()},25:function(e){"use strict";function t(e,t){n(e,t),r(e)}function r(e){(!e._writableState||e._writableState.emitClose)&&(!e._readableState||e._readableState.emitClose)&&e.emit("close")}function n(e,t){e.emit("error",t)}e.exports={destroy:function(e,o){var a=this,s=this._readableState&&this._readableState.destroyed,c=this._writableState&&this._writableState.destroyed;return s||c?o?o(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,i.nextTick(n,this,e)):i.nextTick(n,this,e)):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!o&&e?a._writableState?a._writableState.errorEmitted?i.nextTick(r,a):(a._writableState.errorEmitted=!0,i.nextTick(t,a,e)):i.nextTick(t,a,e):o?(i.nextTick(r,a),o(e)):i.nextTick(r,a)})),this},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}},698:function(e,t,r){"use strict";var n=r(646).q.ERR_STREAM_PREMATURE_CLOSE;function i(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}function o(){}function a(e){return e.setHeader&&"function"==typeof e.abort}function s(e,t,r){if("function"==typeof t)return s(e,null,t);t||(t={}),r=i(r||o);var c=t.readable||!1!==t.readable&&e.readable,u=t.writable||!1!==t.writable&&e.writable,l=function(){e.writable||f()},d=e._writableState&&e._writableState.finished,f=function(){u=!1,d=!0,c||r.call(e)},p=e._readableState&&e._readableState.endEmitted,h=function(){c=!1,p=!0,u||r.call(e)},y=function(t){r.call(e,t)},g=function(){var t;return c&&!p?(e._readableState&&e._readableState.ended||(t=new n),r.call(e,t)):u&&!d?(e._writableState&&e._writableState.ended||(t=new n),r.call(e,t)):void 0},m=function(){e.req.on("finish",f)};return a(e)?(e.on("complete",f),e.on("abort",g),e.req?m():e.on("request",m)):u&&!e._writableState&&(e.on("end",l),e.on("close",l)),e.on("end",h),e.on("finish",f),!1!==t.error&&e.on("error",y),e.on("close",g),function(){e.removeListener("complete",f),e.removeListener("abort",g),e.removeListener("request",m),e.req&&e.req.removeListener("finish",f),e.removeListener("end",l),e.removeListener("close",l),e.removeListener("finish",f),e.removeListener("end",h),e.removeListener("error",y),e.removeListener("close",g)}}e.exports=s},727:function(e,t,r){"use strict";function n(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(e){r(e);return}s.done?t(c):Promise.resolve(c).then(n,i)}function i(e){return function(){var t=this,r=arguments;return new Promise(function(i,o){var a=e.apply(t,r);function s(e){n(a,i,o,s,c,"next",e)}function c(e){n(a,i,o,s,c,"throw",e)}s(void 0)})}}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach(function(t){s(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var c=r(646).q.ERR_INVALID_ARG_TYPE;e.exports=function(e,t,r){if(t&&"function"==typeof t.next)n=t;else if(t&&t[Symbol.asyncIterator])n=t[Symbol.asyncIterator]();else if(t&&t[Symbol.iterator])n=t[Symbol.iterator]();else throw new c("iterable",["Iterable"],t);var n,o=new e(a({objectMode:!0},r)),s=!1;function u(){return l.apply(this,arguments)}function l(){return(l=i(function*(){try{var e=yield n.next(),t=e.value;e.done?o.push(null):o.push((yield t))?u():s=!1}catch(e){o.destroy(e)}})).apply(this,arguments)}return o._read=function(){s||(s=!0,u())},o}},442:function(e,t,r){"use strict";function n(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var i,o=r(646).q,a=o.ERR_MISSING_ARGS,s=o.ERR_STREAM_DESTROYED;function c(e){if(e)throw e}function u(e){return e.setHeader&&"function"==typeof e.abort}function l(e,t,o,a){a=n(a);var c=!1;e.on("close",function(){c=!0}),void 0===i&&(i=r(698)),i(e,{readable:t,writable:o},function(e){if(e)return a(e);c=!0,a()});var l=!1;return function(t){if(!c&&!l){if(l=!0,u(e))return e.abort();if("function"==typeof e.destroy)return e.destroy();a(t||new s("pipe"))}}}function d(e){e()}function f(e,t){return e.pipe(t)}function p(e){return e.length&&"function"==typeof e[e.length-1]?e.pop():c}e.exports=function(){for(var e,t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=p(r);if(Array.isArray(r[0])&&(r=r[0]),r.length<2)throw new a("streams");var o=r.map(function(t,n){var a=n<r.length-1;return l(t,a,n>0,function(t){e||(e=t),t&&o.forEach(d),a||(o.forEach(d),i(e))})});return r.reduce(f)}},776:function(e,t,r){"use strict";var n=r(646).q.ERR_INVALID_OPT_VALUE;function i(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}e.exports={getHighWaterMark:function(e,t,r,o){var a=i(t,o,r);if(null!=a){if(!(isFinite(a)&&Math.floor(a)===a)||a<0)throw new n(o?r:"highWaterMark",a);return Math.floor(a)}return e.objectMode?16:16384}}},678:function(e,t,r){e.exports=r(781)},55:function(e,t,r){var n=r(300),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return n.SlowBuffer(e)}},173:function(e,t,r){e.exports=i;var n=r(361).EventEmitter;function i(){n.call(this)}r(782)(i,n),i.Readable=r(709),i.Writable=r(337),i.Duplex=r(403),i.Transform=r(170),i.PassThrough=r(889),i.finished=r(698),i.pipeline=r(442),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",s),r.on("close",c));var a=!1;function s(){a||(a=!0,e.end())}function c(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){if(l(),0===n.listenerCount(this,"error"))throw e}function l(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",s),r.removeListener("close",c),r.removeListener("error",u),e.removeListener("error",u),r.removeListener("end",l),r.removeListener("close",l),e.removeListener("close",l)}return r.on("error",u),e.on("error",u),r.on("end",l),r.on("close",l),e.on("close",l),e.emit("pipe",r),e}},704:function(e,t,r){"use strict";var n=r(55).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;if(!e)return"utf8";for(;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function a(e){var t=o(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw Error("Unknown encoding: "+e);return t||e}function s(e){var t;switch(this.encoding=a(e),this.encoding){case"utf16le":this.text=h,this.end=y,t=4;break;case"utf8":this.fillLast=d,t=4;break;case"base64":this.text=g,this.end=m,t=3;break;default:this.write=b,this.end=w;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function c(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function u(e,t,r){var n=t.length-1;if(n<r)return 0;var i=c(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||-2===i?0:(i=c(t[n]))>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||-2===i?0:(i=c(t[n]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}function l(e,t,r){if((192&t[0])!=128)return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if((192&t[1])!=128)return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&(192&t[2])!=128)return e.lastNeed=2,"�"}}function d(e){var t=this.lastTotal-this.lastNeed,r=l(this,e,t);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length)}function f(e,t){var r=u(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)}function p(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t}function h(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function y(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function g(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function m(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function b(e){return e.toString(this.encoding)}function w(e){return e&&e.length?this.write(e):""}t.s=s,s.prototype.write=function(e){var t,r;if(0===e.length)return"";if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},s.prototype.end=p,s.prototype.text=f,s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},769:function(e){function t(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function e(e,r){if(t("noDeprecation"))return e;var n=!1;return function(){if(!n){if(t("throwDeprecation"))throw Error(r);t("traceDeprecation")?console.trace(r):console.warn(r),n=!0}return e.apply(this,arguments)}}},300:function(e){"use strict";e.exports=r(82909)},361:function(e){"use strict";e.exports=r(95284)},781:function(e){"use strict";e.exports=r(95284).EventEmitter},837:function(e){"use strict";e.exports=r(68994)}},o={};function a(e){var r=o[e];if(void 0!==r)return r.exports;var n=o[e]={exports:{}},i=!0;try{t[e](n,n.exports,a),i=!1}finally{i&&delete o[e]}return n.exports}a.ab=n+"/",e.exports=a(173)}()},34322:(e,t,r)=>{var n="/",i=r(65364),o=r(82909).Buffer;!function(){var t={992:function(e){e.exports=function(e,r,n){if(e.filter)return e.filter(r,n);if(null==e||"function"!=typeof r)throw TypeError();for(var i=[],o=0;o<e.length;o++)if(t.call(e,o)){var a=e[o];r.call(n,a,o,e)&&i.push(a)}return i};var t=Object.prototype.hasOwnProperty},167:function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var a,s,c=r(23).codes,u=c.ERR_AMBIGUOUS_ARGUMENT,l=c.ERR_INVALID_ARG_TYPE,d=c.ERR_INVALID_ARG_VALUE,f=c.ERR_INVALID_RETURN_VALUE,p=c.ERR_MISSING_ARGS,h=r(404),y=r(177).inspect,g=r(177).types,m=g.isPromise,b=g.isRegExp,w=Object.assign?Object.assign:r(604).assign,v=Object.is?Object.is:r(208);function _(){var e=r(176);a=e.isDeepEqual,s=e.isDeepStrictEqual}var E=!1,S=e.exports=R,A={};function x(e){if(e.message instanceof Error)throw e.message;throw new h(e)}function k(e,t,r,n,o){var a,s=arguments.length;if(0===s?a="Failed":1===s?(r=e,e=void 0):(!1===E&&(E=!0,(i.emitWarning?i.emitWarning:console.warn.bind(console))("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")),2===s&&(n="!=")),r instanceof Error)throw r;var c={actual:e,expected:t,operator:void 0===n?"fail":n,stackStartFn:o||k};void 0!==r&&(c.message=r);var u=new h(c);throw a&&(u.message=a,u.generatedMessage=!0),u}function P(e,t,r,n){if(!r){var i=!1;if(0===t)i=!0,n="No value argument passed to `assert.ok()`";else if(n instanceof Error)throw n;var o=new h({actual:r,expected:!0,message:n,operator:"==",stackStartFn:e});throw o.generatedMessage=i,o}}function R(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];P.apply(void 0,[R,t.length].concat(t))}function O(e,t,r){if(arguments.length<2)throw new p("actual","expected");void 0===a&&_(),s(e,t)&&x({actual:e,expected:t,message:r,operator:"notDeepStrictEqual",stackStartFn:O})}S.fail=k,S.AssertionError=h,S.ok=R,S.equal=function e(t,r,n){if(arguments.length<2)throw new p("actual","expected");t!=r&&x({actual:t,expected:r,message:n,operator:"==",stackStartFn:e})},S.notEqual=function e(t,r,n){if(arguments.length<2)throw new p("actual","expected");t==r&&x({actual:t,expected:r,message:n,operator:"!=",stackStartFn:e})},S.deepEqual=function e(t,r,n){if(arguments.length<2)throw new p("actual","expected");void 0===a&&_(),a(t,r)||x({actual:t,expected:r,message:n,operator:"deepEqual",stackStartFn:e})},S.notDeepEqual=function e(t,r,n){if(arguments.length<2)throw new p("actual","expected");void 0===a&&_(),a(t,r)&&x({actual:t,expected:r,message:n,operator:"notDeepEqual",stackStartFn:e})},S.deepStrictEqual=function e(t,r,n){if(arguments.length<2)throw new p("actual","expected");void 0===a&&_(),s(t,r)||x({actual:t,expected:r,message:n,operator:"deepStrictEqual",stackStartFn:e})},S.notDeepStrictEqual=O,S.strictEqual=function e(t,r,n){if(arguments.length<2)throw new p("actual","expected");v(t,r)||x({actual:t,expected:r,message:n,operator:"strictEqual",stackStartFn:e})},S.notStrictEqual=function e(t,r,n){if(arguments.length<2)throw new p("actual","expected");v(t,r)&&x({actual:t,expected:r,message:n,operator:"notStrictEqual",stackStartFn:e})};var T=function e(t,r,n){var i=this;o(this,e),r.forEach(function(e){e in t&&(void 0!==n&&"string"==typeof n[e]&&b(t[e])&&t[e].test(n[e])?i[e]=n[e]:i[e]=t[e])})};function C(e,t,r,n,i,o){if(!(r in e)||!s(e[r],t[r])){if(!n){var a=new h({actual:new T(e,i),expected:new T(t,i,e),operator:"deepStrictEqual",stackStartFn:o});throw a.actual=e,a.expected=t,a.operator=o.name,a}x({actual:e,expected:t,message:n,operator:o.name,stackStartFn:o})}}function I(e,t,r,i){if("function"!=typeof t){if(b(t))return t.test(e);if(2==arguments.length)throw new l("expected",["Function","RegExp"],t);if("object"!==n(e)||null===e){var o=new h({actual:e,expected:t,message:r,operator:"deepStrictEqual",stackStartFn:i});throw o.operator=i.name,o}var s=Object.keys(t);if(t instanceof Error)s.push("name","message");else if(0===s.length)throw new d("error",t,"may not be an empty object");return void 0===a&&_(),s.forEach(function(n){"string"==typeof e[n]&&b(t[n])&&t[n].test(e[n])||C(e,t,n,r,s,i)}),!0}return void 0!==t.prototype&&e instanceof t||!Error.isPrototypeOf(t)&&!0===t.call({},e)}function j(e){if("function"!=typeof e)throw new l("fn","Function",e);try{e()}catch(e){return e}return A}function D(e){return m(e)||null!==e&&"object"===n(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function H(e){return Promise.resolve().then(function(){var t;if("function"==typeof e){if(!D(t=e()))throw new f("instance of Promise","promiseFn",t)}else if(D(e))t=e;else throw new l("promiseFn",["Function","Promise"],e);return Promise.resolve().then(function(){return t}).then(function(){return A}).catch(function(e){return e})})}function N(e,t,r,i){if("string"==typeof r){if(4==arguments.length)throw new l("error",["Object","Error","Function","RegExp"],r);if("object"===n(t)&&null!==t){if(t.message===r)throw new u("error/message",'The error message "'.concat(t.message,'" is identical to the message.'))}else if(t===r)throw new u("error/message",'The error "'.concat(t,'" is identical to the message.'));i=r,r=void 0}else if(null!=r&&"object"!==n(r)&&"function"!=typeof r)throw new l("error",["Object","Error","Function","RegExp"],r);if(t===A){var o="";r&&r.name&&(o+=" (".concat(r.name,")")),o+=i?": ".concat(i):".";var a="rejects"===e.name?"rejection":"exception";x({actual:void 0,expected:r,operator:e.name,message:"Missing expected ".concat(a).concat(o),stackStartFn:e})}if(r&&!I(t,r,i,e))throw t}function U(e,t,r,n){if(t!==A){if("string"==typeof r&&(n=r,r=void 0),!r||I(t,r)){var i=n?": ".concat(n):".",o="doesNotReject"===e.name?"rejection":"exception";x({actual:t,expected:r,operator:e.name,message:"Got unwanted ".concat(o).concat(i,"\n")+'Actual message: "'.concat(t&&t.message,'"'),stackStartFn:e})}throw t}}function M(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];P.apply(void 0,[M,t.length].concat(t))}S.throws=function e(t){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];N.apply(void 0,[e,j(t)].concat(n))},S.rejects=function e(t){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return H(t).then(function(t){return N.apply(void 0,[e,t].concat(n))})},S.doesNotThrow=function e(t){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];U.apply(void 0,[e,j(t)].concat(n))},S.doesNotReject=function e(t){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return H(t).then(function(t){return U.apply(void 0,[e,t].concat(n))})},S.ifError=function e(t){if(null!=t){var r="ifError got unwanted exception: ";"object"===n(t)&&"string"==typeof t.message?0===t.message.length&&t.constructor?r+=t.constructor.name:r+=t.message:r+=y(t);var i=new h({actual:t,expected:null,operator:"ifError",message:r,stackStartFn:e}),o=t.stack;if("string"==typeof o){var a=o.split("\n");a.shift();for(var s=i.stack.split("\n"),c=0;c<a.length;c++){var u=s.indexOf(a[c]);if(-1!==u){s=s.slice(0,u);break}}i.stack="".concat(s.join("\n"),"\n").concat(a.join("\n"))}throw i}},S.strict=w(M,S,{equal:S.strictEqual,deepEqual:S.deepStrictEqual,notEqual:S.notStrictEqual,notDeepEqual:S.notDeepStrictEqual}),S.strict.strict=S.strict},404:function(e,t,r){"use strict";function n(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){o(e,t,r[t])})}return e}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),e}function u(e,t){return t&&("object"===b(t)||"function"==typeof t)?t:l(e)}function l(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&g(e,t)}function f(e){var t="function"==typeof Map?new Map:void 0;return(f=function(e){if(null===e||!y(e))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return h(e,arguments,m(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),g(r,e)})(e)}function p(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function h(e,t,r){return(h=p()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&g(i,r.prototype),i}).apply(null,arguments)}function y(e){return -1!==Function.toString.call(e).indexOf("[native code]")}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function b(e){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var w=r(177).inspect,v=r(23).codes.ERR_INVALID_ARG_TYPE;function _(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function E(e,t){if(t=Math.floor(t),0==e.length||0==t)return"";var r=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+e.substring(0,r-e.length)}var S="",A="",x="",k="",P={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},R=10;function O(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach(function(t){r[t]=e[t]}),Object.defineProperty(r,"message",{value:e.message}),r}function T(e){return w(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function C(e,t,r){var n="",o="",a=0,s="",c=!1,u=T(e),l=u.split("\n"),d=T(t).split("\n"),f=0,p="";if("strictEqual"===r&&"object"===b(e)&&"object"===b(t)&&null!==e&&null!==t&&(r="strictEqualObject"),1===l.length&&1===d.length&&l[0]!==d[0]){var h=l[0].length+d[0].length;if(h<=R){if(("object"!==b(e)||null===e)&&("object"!==b(t)||null===t)&&(0!==e||0!==t))return"".concat(P[r],"\n\n")+"".concat(l[0]," !== ").concat(d[0],"\n")}else if("strictEqualObject"!==r&&h<(i.stderr&&i.stderr.isTTY?i.stderr.columns:80)){for(;l[0][f]===d[0][f];)f++;f>2&&(p="\n ".concat(E(" ",f),"^"),f=0)}}for(var y=l[l.length-1],g=d[d.length-1];y===g&&(f++<2?s="\n ".concat(y).concat(s):n=y,l.pop(),d.pop(),0!==l.length&&0!==d.length);)y=l[l.length-1],g=d[d.length-1];var m=Math.max(l.length,d.length);if(0===m){var w=u.split("\n");if(w.length>30)for(w[26]="".concat(S,"...").concat(k);w.length>27;)w.pop();return"".concat(P.notIdentical,"\n\n").concat(w.join("\n"),"\n")}f>3&&(s="\n".concat(S,"...").concat(k).concat(s),c=!0),""!==n&&(s="\n ".concat(n).concat(s),n="");var v=0,O=P[r]+"\n".concat(A,"+ actual").concat(k," ").concat(x,"- expected").concat(k),C=" ".concat(S,"...").concat(k," Lines skipped");for(f=0;f<m;f++){var I=f-a;if(l.length<f+1)I>1&&f>2&&(I>4?(o+="\n".concat(S,"...").concat(k),c=!0):I>3&&(o+="\n ".concat(d[f-2]),v++),o+="\n ".concat(d[f-1]),v++),a=f,n+="\n".concat(x,"-").concat(k," ").concat(d[f]),v++;else if(d.length<f+1)I>1&&f>2&&(I>4?(o+="\n".concat(S,"...").concat(k),c=!0):I>3&&(o+="\n ".concat(l[f-2]),v++),o+="\n ".concat(l[f-1]),v++),a=f,o+="\n".concat(A,"+").concat(k," ").concat(l[f]),v++;else{var j=d[f],D=l[f],H=D!==j&&(!_(D,",")||D.slice(0,-1)!==j);H&&_(j,",")&&j.slice(0,-1)===D&&(H=!1,D+=","),H?(I>1&&f>2&&(I>4?(o+="\n".concat(S,"...").concat(k),c=!0):I>3&&(o+="\n ".concat(l[f-2]),v++),o+="\n ".concat(l[f-1]),v++),a=f,o+="\n".concat(A,"+").concat(k," ").concat(D),n+="\n".concat(x,"-").concat(k," ").concat(j),v+=2):(o+=n,n="",(1===I||0===f)&&(o+="\n ".concat(D),v++))}if(v>20&&f<m-2)return"".concat(O).concat(C,"\n").concat(o,"\n").concat(S,"...").concat(k).concat(n,"\n")+"".concat(S,"...").concat(k)}return"".concat(O).concat(c?C:"","\n").concat(o).concat(n).concat(s).concat(p)}e.exports=function(e){function t(e){if(a(this,t),"object"!==b(e)||null===e)throw new v("options","Object",e);var r,n=e.message,o=e.operator,s=e.stackStartFn,c=e.actual,d=e.expected,f=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=n)r=u(this,m(t).call(this,String(n)));else if(i.stderr&&i.stderr.isTTY&&(i.stderr&&i.stderr.getColorDepth&&1!==i.stderr.getColorDepth()?(S="\x1b[34m",A="\x1b[32m",k="\x1b[39m",x="\x1b[31m"):(S="",A="",k="",x="")),"object"===b(c)&&null!==c&&"object"===b(d)&&null!==d&&"stack"in c&&c instanceof Error&&"stack"in d&&d instanceof Error&&(c=O(c),d=O(d)),"deepStrictEqual"===o||"strictEqual"===o)r=u(this,m(t).call(this,C(c,d,o)));else if("notDeepStrictEqual"===o||"notStrictEqual"===o){var p=P[o],h=T(c).split("\n");if("notStrictEqual"===o&&"object"===b(c)&&null!==c&&(p=P.notStrictEqualObject),h.length>30)for(h[26]="".concat(S,"...").concat(k);h.length>27;)h.pop();r=1===h.length?u(this,m(t).call(this,"".concat(p," ").concat(h[0]))):u(this,m(t).call(this,"".concat(p,"\n\n").concat(h.join("\n"),"\n")))}else{var y=T(c),g="",w=P[o];"notDeepEqual"===o||"notEqual"===o?(y="".concat(P[o],"\n\n").concat(y)).length>1024&&(y="".concat(y.slice(0,1021),"...")):(g="".concat(T(d)),y.length>512&&(y="".concat(y.slice(0,509),"...")),g.length>512&&(g="".concat(g.slice(0,509),"...")),"deepEqual"===o||"equal"===o?y="".concat(w,"\n\n").concat(y,"\n\nshould equal\n\n"):g=" ".concat(o," ").concat(g)),r=u(this,m(t).call(this,"".concat(y).concat(g)))}return Error.stackTraceLimit=f,r.generatedMessage=!n,Object.defineProperty(l(r),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),r.code="ERR_ASSERTION",r.actual=c,r.expected=d,r.operator=o,Error.captureStackTrace&&Error.captureStackTrace(l(r),s),r.stack,r.name="AssertionError",u(r)}return d(t,e),c(t,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:w.custom,value:function(e,t){return w(this,n({},t,{customInspect:!1,depth:0}))}}]),t}(f(Error))},23:function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function o(e,t){return t&&("object"===n(t)||"function"==typeof t)?t:a(e)}function a(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l,d,f={};function p(e,t,r){function n(e,r,n){return"string"==typeof t?t:t(e,r,n)}r||(r=Error);var a=function(t){function r(t,a,c){var u;return i(this,r),(u=o(this,s(r).call(this,n(t,a,c)))).code=e,u}return c(r,t),r}(r);f[e]=a}function h(e,t){if(!Array.isArray(e))return"of ".concat(t," ").concat(String(e));var r=e.length;return(e=e.map(function(e){return String(e)}),r>2)?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}function y(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function g(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function m(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}p("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),p("ERR_INVALID_ARG_TYPE",function(e,t,i){if(void 0===l&&(l=r(167)),l("string"==typeof e,"'name' must be a string"),"string"==typeof t&&y(t,"not ")?(o="must not be",t=t.replace(/^not /,"")):o="must be",g(e," argument"))a="The ".concat(e," ").concat(o," ").concat(h(t,"type"));else{var o,a,s=m(e,".")?"property":"argument";a='The "'.concat(e,'" ').concat(s," ").concat(o," ").concat(h(t,"type"))}return a+". Received type ".concat(n(i))},TypeError),p("ERR_INVALID_ARG_VALUE",function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===d&&(d=r(177));var i=d.inspect(t);return i.length>128&&(i="".concat(i.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(n,". Received ").concat(i)},TypeError,RangeError),p("ERR_INVALID_RETURN_VALUE",function(e,t,r){var i;return i=r&&r.constructor&&r.constructor.name?"instance of ".concat(r.constructor.name):"type ".concat(n(r)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(i,".")},TypeError),p("ERR_MISSING_ARGS",function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];void 0===l&&(l=r(167)),l(t.length>0,"At least one arg needs to be specified");var i="The ",o=t.length;switch(t=t.map(function(e){return'"'.concat(e,'"')}),o){case 1:i+="".concat(t[0]," argument");break;case 2:i+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:i+=t.slice(0,o-1).join(", "),i+=", and ".concat(t[o-1]," arguments")}return"".concat(i," must be specified")},TypeError),e.exports.codes=f},176:function(e,t,r){"use strict";function n(e,t){return a(e)||o(e,t)||i()}function i(){throw TypeError("Invalid attempt to destructure non-iterable instance")}function o(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}function a(e){if(Array.isArray(e))return e}function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var c=void 0!==/a/g.flags,u=function(e){var t=[];return e.forEach(function(e){return t.push(e)}),t},l=function(e){var t=[];return e.forEach(function(e,r){return t.push([r,e])}),t},d=Object.is?Object.is:r(208),f=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},p=Number.isNaN?Number.isNaN:r(718);function h(e){return e.call.bind(e)}var y=h(Object.prototype.hasOwnProperty),g=h(Object.prototype.propertyIsEnumerable),m=h(Object.prototype.toString),b=r(177).types,w=b.isAnyArrayBuffer,v=b.isArrayBufferView,_=b.isDate,E=b.isMap,S=b.isRegExp,A=b.isSet,x=b.isNativeError,k=b.isBoxedPrimitive,P=b.isNumberObject,R=b.isStringObject,O=b.isBooleanObject,T=b.isBigIntObject,C=b.isSymbolObject,I=b.isFloat32Array,j=b.isFloat64Array;function D(e){if(0===e.length||e.length>10)return!0;for(var t=0;t<e.length;t++){var r=e.charCodeAt(t);if(r<48||r>57)return!0}return 10===e.length&&e>=0x100000000}function H(e){return Object.keys(e).filter(D).concat(f(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function N(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:+(n<r)}var U=void 0,M=!0,W=!1,L=0,F=1,B=2,K=3;function $(e,t){return c?e.source===t.source&&e.flags===t.flags:RegExp.prototype.toString.call(e)===RegExp.prototype.toString.call(t)}function J(e,t){if(e.byteLength!==t.byteLength)return!1;for(var r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0}function q(e,t){return e.byteLength===t.byteLength&&0===N(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function z(e,t){return e.byteLength===t.byteLength&&0===N(new Uint8Array(e),new Uint8Array(t))}function G(e,t){return P(e)?P(t)&&d(Number.prototype.valueOf.call(e),Number.prototype.valueOf.call(t)):R(e)?R(t)&&String.prototype.valueOf.call(e)===String.prototype.valueOf.call(t):O(e)?O(t)&&Boolean.prototype.valueOf.call(e)===Boolean.prototype.valueOf.call(t):T(e)?T(t)&&BigInt.prototype.valueOf.call(e)===BigInt.prototype.valueOf.call(t):C(t)&&Symbol.prototype.valueOf.call(e)===Symbol.prototype.valueOf.call(t)}function V(e,t,r,n){if(e===t)return 0!==e||!r||d(e,t);if(r){if("object"!==s(e))return"number"==typeof e&&p(e)&&p(t);if("object"!==s(t)||null===e||null===t||Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1}else{if(null===e||"object"!==s(e))return(null===t||"object"!==s(t))&&e==t;if(null===t||"object"!==s(t))return!1}var i=m(e);if(i!==m(t))return!1;if(Array.isArray(e)){if(e.length!==t.length)return!1;var o=H(e,U),a=H(t,U);return o.length===a.length&&Y(e,t,r,n,F,o)}if("[object Object]"===i&&(!E(e)&&E(t)||!A(e)&&A(t)))return!1;if(_(e)){if(!_(t)||Date.prototype.getTime.call(e)!==Date.prototype.getTime.call(t))return!1}else if(S(e)){if(!S(t)||!$(e,t))return!1}else if(x(e)||e instanceof Error){if(e.message!==t.message||e.name!==t.name)return!1}else if(v(e)){if(!r&&(I(e)||j(e))){if(!J(e,t))return!1}else if(!q(e,t))return!1;var c=H(e,U),u=H(t,U);return c.length===u.length&&Y(e,t,r,n,L,c)}else if(A(e))return!!A(t)&&e.size===t.size&&Y(e,t,r,n,B);else if(E(e))return!!E(t)&&e.size===t.size&&Y(e,t,r,n,K);else if(w(e)){if(!z(e,t))return!1}else if(k(e)&&!G(e,t))return!1;return Y(e,t,r,n,L)}function X(e,t){return t.filter(function(t){return g(e,t)})}function Y(e,t,r,n,i,o){if(5==arguments.length){o=Object.keys(e);var a=Object.keys(t);if(o.length!==a.length)return!1}for(var s=0;s<o.length;s++)if(!y(t,o[s]))return!1;if(r&&5==arguments.length){var c=f(e);if(0!==c.length){var u=0;for(s=0;s<c.length;s++){var l=c[s];if(g(e,l)){if(!g(t,l))return!1;o.push(l),u++}else if(g(t,l))return!1}var d=f(t);if(c.length!==d.length&&X(t,d).length!==u)return!1}else{var p=f(t);if(0!==p.length&&0!==X(t,p).length)return!1}}if(0===o.length&&(i===L||i===F&&0===e.length||0===e.size))return!0;if(void 0===n)n={val1:new Map,val2:new Map,position:0};else{var h=n.val1.get(e);if(void 0!==h){var m=n.val2.get(t);if(void 0!==m)return h===m}n.position++}n.val1.set(e,n.position),n.val2.set(t,n.position);var b=eo(e,t,r,o,n,i);return n.val1.delete(e),n.val2.delete(t),b}function Z(e,t,r,n){for(var i=u(e),o=0;o<i.length;o++){var a=i[o];if(V(t,a,r,n))return e.delete(a),!0}return!1}function Q(e){switch(s(e)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":e*=1;case"number":if(p(e))return!1}return!0}function ee(e,t,r){var n=Q(r);return null!=n?n:t.has(n)&&!e.has(n)}function et(e,t,r,n,i){var o=Q(r);if(null!=o)return o;var a=t.get(o);return(void 0!==a||!!t.has(o))&&!!V(n,a,!1,i)&&!e.has(o)&&V(n,a,!1,i)}function er(e,t,r,n){for(var i=null,o=u(e),a=0;a<o.length;a++){var c=o[a];if("object"===s(c)&&null!==c)null===i&&(i=new Set),i.add(c);else if(!t.has(c)){if(r||!ee(e,t,c))return!1;null===i&&(i=new Set),i.add(c)}}if(null!==i){for(var l=u(t),d=0;d<l.length;d++){var f=l[d];if("object"===s(f)&&null!==f){if(!Z(i,f,r,n))return!1}else if(!r&&!e.has(f)&&!Z(i,f,r,n))return!1}return 0===i.size}return!0}function en(e,t,r,n,i,o){for(var a=u(e),s=0;s<a.length;s++){var c=a[s];if(V(r,c,i,o)&&V(n,t.get(c),i,o))return e.delete(c),!0}return!1}function ei(e,t,r,i){for(var o=null,a=l(e),c=0;c<a.length;c++){var u=n(a[c],2),d=u[0],f=u[1];if("object"===s(d)&&null!==d)null===o&&(o=new Set),o.add(d);else{var p=t.get(d);if(void 0===p&&!t.has(d)||!V(f,p,r,i)){if(r||!et(e,t,d,f,i))return!1;null===o&&(o=new Set),o.add(d)}}}if(null!==o){for(var h=l(t),y=0;y<h.length;y++){var g=n(h[y],2),d=g[0],m=g[1];if("object"===s(d)&&null!==d){if(!en(o,e,d,m,r,i))return!1}else if(!r&&(!e.has(d)||!V(e.get(d),m,!1,i))&&!en(o,e,d,m,!1,i))return!1}return 0===o.size}return!0}function eo(e,t,r,n,i,o){var a=0;if(o===B){if(!er(e,t,r,i))return!1}else if(o===K){if(!ei(e,t,r,i))return!1}else if(o===F)for(;a<e.length;a++)if(y(e,a)){if(!y(t,a)||!V(e[a],t[a],r,i))return!1}else{if(y(t,a))return!1;for(var s=Object.keys(e);a<s.length;a++){var c=s[a];if(!y(t,c)||!V(e[c],t[c],r,i))return!1}if(s.length!==Object.keys(t).length)return!1;return!0}for(a=0;a<n.length;a++){var u=n[a];if(!V(e[u],t[u],r,i))return!1}return!0}e.exports={isDeepEqual:function(e,t){return V(e,t,W)},isDeepStrictEqual:function(e,t){return V(e,t,M)}}},256:function(e,t,r){"use strict";var n=r(192),i=r(139),o=i(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&o(e,".prototype.")>-1?i(r):r}},139:function(e,t,r){"use strict";var n=r(212),i=r(192),o=i("%Function.prototype.apply%"),a=i("%Function.prototype.call%"),s=i("%Reflect.apply%",!0)||n.call(a,o),c=i("%Object.getOwnPropertyDescriptor%",!0),u=i("%Object.defineProperty%",!0),l=i("%Math.max%");if(u)try{u({},"a",{value:1})}catch(e){u=null}e.exports=function(e){var t=s(n,a,arguments);return c&&u&&c(t,"length").configurable&&u(t,"length",{value:1+l(0,e.length-(arguments.length-1))}),t};var d=function(){return s(n,o,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},69:function(e,t,r){"use strict";var n=r(935),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,a=Array.prototype.concat,s=Object.defineProperty,c=function(e){return"function"==typeof e&&"[object Function]"===o.call(e)},u=function(){var e={};try{for(var t in s(e,"x",{enumerable:!1,value:e}),e)return!1;return e.x===e}catch(e){return!1}},l=s&&u(),d=function(e,t,r,n){(!(t in e)||c(n)&&n())&&(l?s(e,t,{configurable:!0,enumerable:!1,value:r,writable:!0}):e[t]=r)},f=function(e,t){var r=arguments.length>2?arguments[2]:{},o=n(t);i&&(o=a.call(o,Object.getOwnPropertySymbols(t)));for(var s=0;s<o.length;s+=1)d(e,o[s],t[o[s]],r[o[s]])};f.supportsDescriptors=!!l,e.exports=f},181:function(e){"use strict";e.exports=EvalError},545:function(e){"use strict";e.exports=Error},22:function(e){"use strict";e.exports=RangeError},803:function(e){"use strict";e.exports=ReferenceError},182:function(e){"use strict";e.exports=SyntaxError},202:function(e){"use strict";e.exports=TypeError},284:function(e){"use strict";e.exports=URIError},604:function(e){"use strict";function t(e,t){if(null==e)throw TypeError("Cannot convert first argument to object");for(var r=Object(e),n=1;n<arguments.length;n++){var i=arguments[n];if(null!=i)for(var o=Object.keys(Object(i)),a=0,s=o.length;a<s;a++){var c=o[a],u=Object.getOwnPropertyDescriptor(i,c);void 0!==u&&u.enumerable&&(r[c]=i[c])}}return r}function r(){Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:t})}e.exports={assign:t,polyfill:r}},144:function(e){var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;e.exports=function(e,n,i){if("[object Function]"!==r.call(n))throw TypeError("iterator must be a function");var o=e.length;if(o===+o)for(var a=0;a<o;a++)n.call(i,e[a],a,e);else for(var s in e)t.call(e,s)&&n.call(i,e[s],s,e)}},136:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",r=Object.prototype.toString,n=Math.max,i="[object Function]",o=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var i=0;i<t.length;i+=1)r[i+e.length]=t[i];return r},a=function(e,t){for(var r=[],n=t||0,i=0;n<e.length;n+=1,i+=1)r[i]=e[n];return r},s=function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r};e.exports=function(e){var c,u=this;if("function"!=typeof u||r.apply(u)!==i)throw TypeError(t+u);for(var l=a(arguments,1),d=function(){if(this instanceof c){var t=u.apply(this,o(l,arguments));return Object(t)===t?t:this}return u.apply(e,o(l,arguments))},f=n(0,u.length-l.length),p=[],h=0;h<f;h++)p[h]="$"+h;if(c=Function("binder","return function ("+s(p,",")+"){ return binder.apply(this,arguments); }")(d),u.prototype){var y=function(){};y.prototype=u.prototype,c.prototype=new y,y.prototype=null}return c}},212:function(e,t,r){"use strict";var n=r(136);e.exports=Function.prototype.bind||n},192:function(e,t,r){"use strict";var n,i=r(545),o=r(181),a=r(22),s=r(803),c=r(182),u=r(202),l=r(284),d=Function,f=function(e){try{return d('"use strict"; return ('+e+").constructor;")()}catch(e){}},p=Object.getOwnPropertyDescriptor;if(p)try{p({},"")}catch(e){p=null}var h=function(){throw new u},y=p?function(){try{return arguments.callee,h}catch(e){try{return p(arguments,"callee").get}catch(e){return h}}}():h,g=r(115)(),m=r(14)(),b=Object.getPrototypeOf||(m?function(e){return e.__proto__}:null),w={},v="undefined"!=typeof Uint8Array&&b?b(Uint8Array):n,_={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":g&&b?b([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":w,"%AsyncGenerator%":w,"%AsyncGeneratorFunction%":w,"%AsyncIteratorPrototype%":w,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":o,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":d,"%GeneratorFunction%":w,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&b?b(b([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&b?b((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":a,"%ReferenceError%":s,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&b?b((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&b?b(""[Symbol.iterator]()):n,"%Symbol%":g?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":y,"%TypedArray%":v,"%TypeError%":u,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":l,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(b)try{null.error}catch(e){var E=b(b(e));_["%Error.prototype%"]=E}var S=function e(t){var r;if("%AsyncFunction%"===t)r=f("async function () {}");else if("%GeneratorFunction%"===t)r=f("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=f("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&b&&(r=b(i.prototype))}return _[t]=r,r},A={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},x=r(212),k=r(270),P=x.call(Function.call,Array.prototype.concat),R=x.call(Function.apply,Array.prototype.splice),O=x.call(Function.call,String.prototype.replace),T=x.call(Function.call,String.prototype.slice),C=x.call(Function.call,RegExp.prototype.exec),I=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,j=/\\(\\)?/g,D=function(e){var t=T(e,0,1),r=T(e,-1);if("%"===t&&"%"!==r)throw new c("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new c("invalid intrinsic syntax, expected opening `%`");var n=[];return O(e,I,function(e,t,r,i){n[n.length]=r?O(i,j,"$1"):t||e}),n},H=function(e,t){var r,n=e;if(k(A,n)&&(n="%"+(r=A[n])[0]+"%"),k(_,n)){var i=_[n];if(i===w&&(i=S(n)),void 0===i&&!t)throw new u("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new c("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new u("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new u('"allowMissing" argument must be a boolean');if(null===C(/^%?[^%]*%?$/,e))throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=D(e),n=r.length>0?r[0]:"",i=H("%"+n+"%",t),o=i.name,a=i.value,s=!1,l=i.alias;l&&(n=l[0],R(r,P([0,1],l)));for(var d=1,f=!0;d<r.length;d+=1){var h=r[d],y=T(h,0,1),g=T(h,-1);if(('"'===y||"'"===y||"`"===y||'"'===g||"'"===g||"`"===g)&&y!==g)throw new c("property names with quotes must have matching quotes");if("constructor"!==h&&f||(s=!0),n+="."+h,k(_,o="%"+n+"%"))a=_[o];else if(null!=a){if(!(h in a)){if(!t)throw new u("base intrinsic for "+e+" exists, but the property is not available.");return}if(p&&d+1>=r.length){var m=p(a,h);a=(f=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:a[h]}else f=k(a,h),a=a[h];f&&!s&&(_[o]=a)}}return a}},14:function(e){"use strict";var t={__proto__:null,foo:{}},r=Object;e.exports=function(){return({__proto__:t}).foo===t.foo&&!(t instanceof r)}},942:function(e,t,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(773);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},773:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t||"[object Symbol]"!==Object.prototype.toString.call(t)||"[object Symbol]"!==Object.prototype.toString.call(r))return!1;var n=42;for(t in e[t]=n,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==n||!0!==o.enumerable)return!1}return!0}},115:function(e,t,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(832);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},832:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t||"[object Symbol]"!==Object.prototype.toString.call(t)||"[object Symbol]"!==Object.prototype.toString.call(r))return!1;var n=42;for(t in e[t]=n,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==n||!0!==o.enumerable)return!1}return!0}},270:function(e,t,r){"use strict";var n=Function.prototype.call,i=Object.prototype.hasOwnProperty;e.exports=r(212).call(n,i)},782:function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},157:function(e){"use strict";var t="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,r=Object.prototype.toString,n=function(e){return(!t||!e||"object"!=typeof e||!(Symbol.toStringTag in e))&&"[object Arguments]"===r.call(e)},i=function(e){return!!n(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==r.call(e)&&"[object Function]"===r.call(e.callee)},o=function(){return n(arguments)}();n.isLegacyArguments=i,e.exports=o?n:i},391:function(e){"use strict";var t=Object.prototype.toString,r=Function.prototype.toString,n=/^\s*(?:function)?\*/,i="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,o=Object.getPrototypeOf,a=function(){if(!i)return!1;try{return Function("return function*() {}")()}catch(e){}}(),s=a?o(a):{};e.exports=function(e){return"function"==typeof e&&(!!n.test(r.call(e))||(i?o(e)===s:"[object GeneratorFunction]"===t.call(e)))}},460:function(e){"use strict";e.exports=function(e){return e!=e}},718:function(e,t,r){"use strict";var n=r(139),i=r(69),o=r(460),a=r(625),s=r(171),c=n(a(),Number);i(c,{getPolyfill:a,implementation:o,shim:s}),e.exports=c},625:function(e,t,r){"use strict";var n=r(460);e.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:n}},171:function(e,t,r){"use strict";var n=r(69),i=r(625);e.exports=function(){var e=i();return n(Number,{isNaN:e},{isNaN:function(){return Number.isNaN!==e}}),e}},994:function(e,t,n){"use strict";var i=n(144),o=n(349),a=n(256),s=a("Object.prototype.toString"),c=n(942)()&&"symbol"==typeof Symbol.toStringTag,u=o(),l=a("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r<e.length;r+=1)if(e[r]===t)return r;return -1},d=a("String.prototype.slice"),f={},p=n(24),h=Object.getPrototypeOf;c&&p&&h&&i(u,function(e){var t=new r.g[e];if(!(Symbol.toStringTag in t))throw EvalError("this engine has support for Symbol.toStringTag, but "+e+" does not have the property! Please report this.");var n=h(t),i=p(n,Symbol.toStringTag);i||(i=p(h(n),Symbol.toStringTag)),f[e]=i.get});var y=function(e){var t=!1;return i(f,function(r,n){if(!t)try{t=r.call(e)===n}catch(e){}}),t};e.exports=function(e){return!!e&&"object"==typeof e&&(c?!!p&&y(e):l(u,d(s(e),8,-1))>-1)}},208:function(e){"use strict";var t=function(e){return e!=e};e.exports=function(e,r){return 0===e&&0===r?1/e==1/r:!!(e===r||t(e)&&t(r))}},579:function(e,t,r){"use strict";var n;if(!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,a=r(412),s=Object.prototype.propertyIsEnumerable,c=!s.call({toString:null},"toString"),u=s.call(function(){},"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],d=function(e){var t=e.constructor;return t&&t.prototype===e},f={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},p=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!f["$"+e]&&i.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{d(window[e])}catch(e){return!0}}catch(e){return!0}return!1}(),h=function(e){if("undefined"==typeof window||!p)return d(e);try{return d(e)}catch(e){return!1}};n=function(e){var t=null!==e&&"object"==typeof e,r="[object Function]"===o.call(e),n=a(e),s=t&&"[object String]"===o.call(e),d=[];if(!t&&!r&&!n)throw TypeError("Object.keys called on a non-object");var f=u&&r;if(s&&e.length>0&&!i.call(e,0))for(var p=0;p<e.length;++p)d.push(String(p));if(n&&e.length>0)for(var y=0;y<e.length;++y)d.push(String(y));else for(var g in e)!(f&&"prototype"===g)&&i.call(e,g)&&d.push(String(g));if(c)for(var m=h(e),b=0;b<l.length;++b)!(m&&"constructor"===l[b])&&i.call(e,l[b])&&d.push(l[b]);return d}}e.exports=n},935:function(e,t,r){"use strict";var n=Array.prototype.slice,i=r(412),o=Object.keys,a=o?function(e){return o(e)}:r(579),s=Object.keys;a.shim=function(){return Object.keys?!function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2)&&(Object.keys=function(e){return i(e)?s(n.call(e)):s(e)}):Object.keys=a,Object.keys||a},e.exports=a},412:function(e){"use strict";var t=Object.prototype.toString;e.exports=function(e){var r=t.call(e),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===t.call(e.callee)),n}},369:function(e){e.exports=function(e){return e instanceof o}},584:function(e,t,r){"use strict";var n=r(157),i=r(391),o=r(490),a=r(994);function s(e){return e.call.bind(e)}var c="undefined"!=typeof BigInt,u="undefined"!=typeof Symbol,l=s(Object.prototype.toString),d=s(Number.prototype.valueOf),f=s(String.prototype.valueOf),p=s(Boolean.prototype.valueOf);if(c)var h=s(BigInt.prototype.valueOf);if(u)var y=s(Symbol.prototype.valueOf);function g(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function m(e){return"[object Map]"===l(e)}function b(e){return"[object Set]"===l(e)}function w(e){return"[object WeakMap]"===l(e)}function v(e){return"[object WeakSet]"===l(e)}function _(e){return"[object ArrayBuffer]"===l(e)}function E(e){return"undefined"!=typeof ArrayBuffer&&(_.working?_(e):e instanceof ArrayBuffer)}function S(e){return"[object DataView]"===l(e)}function A(e){return"undefined"!=typeof DataView&&(S.working?S(e):e instanceof DataView)}t.isArgumentsObject=n,t.isGeneratorFunction=i,t.isTypedArray=a,t.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},t.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):a(e)||A(e)},t.isUint8Array=function(e){return"Uint8Array"===o(e)},t.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===o(e)},t.isUint16Array=function(e){return"Uint16Array"===o(e)},t.isUint32Array=function(e){return"Uint32Array"===o(e)},t.isInt8Array=function(e){return"Int8Array"===o(e)},t.isInt16Array=function(e){return"Int16Array"===o(e)},t.isInt32Array=function(e){return"Int32Array"===o(e)},t.isFloat32Array=function(e){return"Float32Array"===o(e)},t.isFloat64Array=function(e){return"Float64Array"===o(e)},t.isBigInt64Array=function(e){return"BigInt64Array"===o(e)},t.isBigUint64Array=function(e){return"BigUint64Array"===o(e)},m.working="undefined"!=typeof Map&&m(new Map),t.isMap=function(e){return"undefined"!=typeof Map&&(m.working?m(e):e instanceof Map)},b.working="undefined"!=typeof Set&&b(new Set),t.isSet=function(e){return"undefined"!=typeof Set&&(b.working?b(e):e instanceof Set)},w.working="undefined"!=typeof WeakMap&&w(new WeakMap),t.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(w.working?w(e):e instanceof WeakMap)},v.working="undefined"!=typeof WeakSet&&v(new WeakSet),t.isWeakSet=function(e){return v(e)},_.working="undefined"!=typeof ArrayBuffer&&_(new ArrayBuffer),t.isArrayBuffer=E,S.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&S(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=A;var x="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function k(e){return"[object SharedArrayBuffer]"===l(e)}function P(e){return void 0!==x&&(void 0===k.working&&(k.working=k(new x)),k.working?k(e):e instanceof x)}function R(e){return g(e,d)}function O(e){return g(e,f)}function T(e){return g(e,p)}function C(e){return c&&g(e,h)}function I(e){return u&&g(e,y)}t.isSharedArrayBuffer=P,t.isAsyncFunction=function(e){return"[object AsyncFunction]"===l(e)},t.isMapIterator=function(e){return"[object Map Iterator]"===l(e)},t.isSetIterator=function(e){return"[object Set Iterator]"===l(e)},t.isGeneratorObject=function(e){return"[object Generator]"===l(e)},t.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===l(e)},t.isNumberObject=R,t.isStringObject=O,t.isBooleanObject=T,t.isBigIntObject=C,t.isSymbolObject=I,t.isBoxedPrimitive=function(e){return R(e)||O(e)||T(e)||C(e)||I(e)},t.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(E(e)||P(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw Error(e+" is not supported in userland")}})})},177:function(e,t,r){var n=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++)r[t[n]]=Object.getOwnPropertyDescriptor(e,t[n]);return r},o=/%[sdj%]/g;t.format=function(e){if(!S(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(u(arguments[r]));return t.join(" ")}for(var r=1,n=arguments,i=n.length,a=String(e).replace(o,function(e){if("%%"===e)return"%";if(r>=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),s=n[r];r<i;s=n[++r])_(s)||!k(s)?a+=" "+s:a+=" "+u(s);return a},t.deprecate=function(e,r){if(void 0!==i&&!0===i.noDeprecation)return e;if(void 0===i)return function(){return t.deprecate(e,r).apply(this,arguments)};var n=!1;return function(){if(!n){if(i.throwDeprecation)throw Error(r);i.traceDeprecation?console.trace(r):console.error(r),n=!0}return e.apply(this,arguments)}};var a={},s=/^$/;if(i.env.NODE_DEBUG){var c=i.env.NODE_DEBUG;s=RegExp("^"+(c=c.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase())+"$","i")}function u(e,r){var n={seen:[],stylize:d};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),v(r)?n.showHidden=r:r&&t._extend(n,r),A(n.showHidden)&&(n.showHidden=!1),A(n.depth)&&(n.depth=2),A(n.colors)&&(n.colors=!1),A(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=l),p(n,e,n.depth)}function l(e,t){var r=u.styles[t];return r?"\x1b["+u.colors[r][0]+"m"+e+"\x1b["+u.colors[r][1]+"m":e}function d(e,t){return e}function f(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}function p(e,r,n){if(e.customInspect&&r&&O(r.inspect)&&r.inspect!==t.inspect&&!(r.constructor&&r.constructor.prototype===r)){var i,o=r.inspect(n,e);return S(o)||(o=p(e,o,n)),o}var a=h(e,r);if(a)return a;var s=Object.keys(r),c=f(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(r)),R(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return y(r);if(0===s.length){if(O(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(x(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(P(r))return e.stylize(Date.prototype.toString.call(r),"date");if(R(r))return y(r)}var l="",d=!1,v=["{","}"];if(w(r)&&(d=!0,v=["[","]"]),O(r)&&(l=" [Function"+(r.name?": "+r.name:"")+"]"),x(r)&&(l=" "+RegExp.prototype.toString.call(r)),P(r)&&(l=" "+Date.prototype.toUTCString.call(r)),R(r)&&(l=" "+y(r)),0===s.length&&(!d||0==r.length))return v[0]+l+v[1];if(n<0)if(x(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");else return e.stylize("[Object]","special");return e.seen.push(r),i=d?g(e,r,n,c,s):s.map(function(t){return m(e,r,n,c,t,d)}),e.seen.pop(),b(i,l,v)}function h(e,t){if(A(t))return e.stylize("undefined","undefined");if(S(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return E(t)?e.stylize(""+t,"number"):v(t)?e.stylize(""+t,"boolean"):_(t)?e.stylize("null","null"):void 0}function y(e){return"["+Error.prototype.toString.call(e)+"]"}function g(e,t,r,n,i){for(var o=[],a=0,s=t.length;a<s;++a)D(t,String(a))?o.push(m(e,t,r,n,String(a),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(m(e,t,r,n,i,!0))}),o}function m(e,t,r,n,i,o){var a,s,c;if((c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),D(n,i)||(a="["+i+"]"),!s&&(0>e.seen.indexOf(c.value)?(s=_(r)?p(e,c.value,null):p(e,c.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n")):s=e.stylize("[Circular]","special")),A(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function b(e,t,r){var n=0;return e.reduce(function(e,t){return n++,t.indexOf("\n")>=0&&n++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function w(e){return Array.isArray(e)}function v(e){return"boolean"==typeof e}function _(e){return null===e}function E(e){return"number"==typeof e}function S(e){return"string"==typeof e}function A(e){return void 0===e}function x(e){return k(e)&&"[object RegExp]"===T(e)}function k(e){return"object"==typeof e&&null!==e}function P(e){return k(e)&&"[object Date]"===T(e)}function R(e){return k(e)&&("[object Error]"===T(e)||e instanceof Error)}function O(e){return"function"==typeof e}function T(e){return Object.prototype.toString.call(e)}function C(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(!a[e=e.toUpperCase()])if(s.test(e)){var r=i.pid;a[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else a[e]=function(){};return a[e]},t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=r(584),t.isArray=w,t.isBoolean=v,t.isNull=_,t.isNullOrUndefined=function(e){return null==e},t.isNumber=E,t.isString=S,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=A,t.isRegExp=x,t.types.isRegExp=x,t.isObject=k,t.isDate=P,t.types.isDate=P,t.isError=R,t.types.isNativeError=R,t.isFunction=O,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(369);var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function j(){var e=new Date,t=[C(e.getHours()),C(e.getMinutes()),C(e.getSeconds())].join(":");return[e.getDate(),I[e.getMonth()],t].join(" ")}function D(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",j(),t.format.apply(t,arguments))},t.inherits=r(782),t._extend=function(e,t){if(!t||!k(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var H="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function N(e,t){if(!e){var r=Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw TypeError('The "original" argument must be of type Function');if(H&&e[H]){var t=e[H];if("function"!=typeof t)throw TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,H,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise(function(e,n){t=e,r=n}),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push(function(e,n){e?r(e):t(n)});try{e.apply(this,i)}catch(e){r(e)}return n}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),H&&Object.defineProperty(t,H,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,n(e))},t.promisify.custom=H,t.callbackify=function(e){if("function"!=typeof e)throw TypeError('The "original" argument must be of type Function');function t(){for(var t=[],r=0;r<arguments.length;r++)t.push(arguments[r]);var n=t.pop();if("function"!=typeof n)throw TypeError("The last argument must be of type Function");var o=this,a=function(){return n.apply(o,arguments)};e.apply(this,t).then(function(e){i.nextTick(a.bind(null,null,e))},function(e){i.nextTick(N.bind(null,e,a))})}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,n(e)),t}},490:function(e,t,n){"use strict";var i=n(144),o=n(349),a=n(256),s=a("Object.prototype.toString"),c=n(942)()&&"symbol"==typeof Symbol.toStringTag,u=o(),l=a("String.prototype.slice"),d={},f=n(24),p=Object.getPrototypeOf;c&&f&&p&&i(u,function(e){if("function"==typeof r.g[e]){var t=new r.g[e];if(!(Symbol.toStringTag in t))throw EvalError("this engine has support for Symbol.toStringTag, but "+e+" does not have the property! Please report this.");var n=p(t),i=f(n,Symbol.toStringTag);i||(i=f(p(n),Symbol.toStringTag)),d[e]=i.get}});var h=function(e){var t=!1;return i(d,function(r,n){if(!t)try{var i=r.call(e);i===n&&(t=i)}catch(e){}}),t},y=n(994);e.exports=function(e){return!!y(e)&&(c?h(e):l(s(e),8,-1))}},349:function(e,t,n){"use strict";var i=n(992);e.exports=function(){return i(["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],function(e){return"function"==typeof r.g[e]})}},24:function(e,t,r){"use strict";var n=r(192)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}e.exports=n}},a={};function s(e){var r=a[e];if(void 0!==r)return r.exports;var n=a[e]={exports:{}},i=!0;try{t[e](n,n.exports,s),i=!1}finally{i&&delete a[e]}return n.exports}s.ab=n+"/",e.exports=s(167)}()},34341:(e,t,r)=>{let n=r(53168),i=r(77421),{RPError:o}=r(79391),{assertIssuerConfiguration:a}=r(52492),s=r(75402),{keystores:c}=r(86159),u=r(79435),l=r(18707),d=new WeakMap,f=new WeakMap,p=e=>(f.has(e)||f.set(e,new i({max:100})),f.get(e));async function h(e=!1){a(this,"jwks_uri");let t=c.get(this),r=p(this);return e||!t?(d.has(this)||(r.reset(),d.set(this,(async()=>{let e=u(await l.call(this,{method:"GET",responseType:"json",url:this.jwks_uri,headers:{Accept:"application/json, application/jwk-set+json"}}).finally(()=>{d.delete(this)})),t=s.fromJWKS(e,{onlyPublic:!0});return r.set("throttle",!0,6e4),c.set(this,t),t})())),d.get(this)):t}async function y({kid:e,kty:t,alg:r,use:i},{allowMulti:a=!1}={}){let s=p(this),c={kid:e,kty:t,alg:r,use:i},u=n(c,{algorithm:"sha256",ignoreUnknown:!0,unorderedArrays:!0,unorderedSets:!0,respectType:!1}),l=s.get(u)||s.get("throttle"),d=await h.call(this,!l),f=d.all(c);if(delete c.use,0===f.length)throw new o({printf:["no valid key found in issuer's jwks_uri for key parameters %j",c],jwks:d});if(!a&&f.length>1&&!e)throw new o({printf:["multiple matching keys found in issuer's jwks_uri for key parameters %j, kid must be provided in this case",c],jwks:d});return s.set(u,!0),f}e.exports.queryKeyStore=y,e.exports.keystore=h},38870:module=>{var __dirname="/";!function(){var __webpack_modules__={950:function(__unused_webpack_module,exports){var indexOf=function(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0;r<e.length;r++)if(e[r]===t)return r;return -1},Object_keys=function(e){if(Object.keys)return Object.keys(e);var t=[];for(var r in e)t.push(r);return t},forEach=function(e,t){if(e.forEach)return e.forEach(t);for(var r=0;r<e.length;r++)t(e[r],r,e)},defineProp=function(){try{return Object.defineProperty({},"_",{}),function(e,t,r){Object.defineProperty(e,t,{writable:!0,enumerable:!1,configurable:!0,value:r})}}catch(e){return function(e,t,r){e[t]=r}}}(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function Context(){}Context.prototype={};var Script=exports.Script=function(e){if(!(this instanceof Script))return new Script(e);this.code=e};Script.prototype.runInContext=function(e){if(!(e instanceof Context))throw TypeError("needs a 'context' argument.");var t=document.createElement("iframe");t.style||(t.style={}),t.style.display="none",document.body.appendChild(t);var r=t.contentWindow,n=r.eval,i=r.execScript;!n&&i&&(i.call(r,"null"),n=r.eval),forEach(Object_keys(e),function(t){r[t]=e[t]}),forEach(globals,function(t){e[t]&&(r[t]=e[t])});var o=Object_keys(r),a=n.call(r,this.code);return forEach(Object_keys(r),function(t){(t in e||-1===indexOf(o,t))&&(e[t]=r[t])}),forEach(globals,function(t){t in e||defineProp(e,t,r[t])}),document.body.removeChild(t),a},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInNewContext=function(e){var t=Script.createContext(e),r=this.runInContext(t);return e&&forEach(Object_keys(t),function(r){e[r]=t[r]}),r},forEach(Object_keys(Script.prototype),function(e){exports[e]=Script[e]=function(t){var r=Script(t);return r[e].apply(r,[].slice.call(arguments,1))}}),exports.isContext=function(e){return e instanceof Context},exports.createScript=function(e){return exports.Script(e)},exports.createContext=Script.createContext=function(e){var t=new Context;return"object"==typeof e&&forEach(Object_keys(e),function(r){t[r]=e[r]}),t}}};"undefined"!=typeof __nccwpck_require__&&(__nccwpck_require__.ab=__dirname+"/");var __nested_webpack_exports__={};__webpack_modules__[950](0,__nested_webpack_exports__),module.exports=__nested_webpack_exports__}()},40164:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>l,hkdf:()=>l});let n=()=>{if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;throw Error("unable to locate global object")},i=async(e,t,r,i,o)=>{let{crypto:{subtle:a}}=n();return new Uint8Array(await a.deriveBits({name:"HKDF",hash:`SHA-${e.substr(3)}`,salt:r,info:i},await a.importKey("raw",t,"HKDF",!1,["deriveBits"]),o<<3))};function o(e){switch(e){case"sha256":case"sha384":case"sha512":case"sha1":return e;default:throw TypeError('unsupported "digest" value')}}function a(e,t){if("string"==typeof e)return new TextEncoder().encode(e);if(!(e instanceof Uint8Array))throw TypeError(`"${t}"" must be an instance of Uint8Array or a string`);return e}function s(e){let t=a(e,"ikm");if(!t.byteLength)throw TypeError('"ikm" must be at least one byte in length');return t}function c(e){let t=a(e,"info");if(t.byteLength>1024)throw TypeError('"info" must not contain more than 1024 bytes');return t}function u(e,t){if("number"!=typeof e||!Number.isInteger(e)||e<1)throw TypeError('"keylen" must be a positive integer');if(e>255*(parseInt(t.substr(3),10)>>3||20))throw TypeError('"keylen" too large');return e}async function l(e,t,r,n,l){return i(o(e),s(t),a(r,"salt"),c(n),u(l,e))}},40658:(e,t,r)=>{"use strict";var n;n={value:!0},Object.defineProperty(t,"cookies",{enumerable:!0,get:function(){return p}});let i=r(63234),o=r(18769),a=r(57049),s=r(20368),c=r(18736),u=r(30941),l=r(61303),d=r(49961),f=(r(96820),r(19908));function p(){let e="cookies",t=a.workAsyncStorage.getStore(),r=s.workUnitAsyncStorage.getStore();if(t){if(r&&"after"===r.phase&&!(0,f.isRequestAPICallableInsideAfter)())throw Object.defineProperty(Error(`Route ${t.route} used "cookies" inside "after(...)". This is not supported. If you need this data inside an "after" callback, use "cookies" outside of the callback. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E88",enumerable:!1,configurable:!0});if(t.forceStatic)return m(h());if(r){if("cache"===r.type)throw Object.defineProperty(Error(`Route ${t.route} used "cookies" inside "use cache". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use "cookies" outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E398",enumerable:!1,configurable:!0});else if("unstable-cache"===r.type)throw Object.defineProperty(Error(`Route ${t.route} used "cookies" inside a function cached with "unstable_cache(...)". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use "cookies" outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E157",enumerable:!1,configurable:!0})}if(t.dynamicShouldError)throw Object.defineProperty(new u.StaticGenBailoutError(`Route ${t.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`cookies\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E549",enumerable:!1,configurable:!0});if(r)if("prerender"===r.type)return g(t.route,r);else"prerender-ppr"===r.type?(0,c.postponeWithTracking)(t.route,e,r.dynamicTracking):"prerender-legacy"===r.type&&(0,c.throwToInterruptStaticGeneration)(e,t,r);(0,c.trackDynamicDataInDynamicRender)(t,r)}let n=(0,s.getExpectedRequestStore)(e);return m((0,i.areCookiesMutableInCurrentPhase)(n)?n.userspaceMutableCookies:n.cookies)}function h(){return i.RequestCookiesAdapter.seal(new o.RequestCookies(new Headers({})))}let y=new WeakMap;function g(e,t){let r=y.get(t);if(r)return r;let n=(0,l.makeHangingPromise)(t.renderSignal,"`cookies()`");return y.set(t,n),Object.defineProperties(n,{[Symbol.iterator]:{value:function(){let r="`cookies()[Symbol.iterator]()`",n=v(e,r);(0,c.abortAndThrowOnSynchronousRequestDataAccess)(e,r,n,t)}},size:{get(){let r="`cookies().size`",n=v(e,r);(0,c.abortAndThrowOnSynchronousRequestDataAccess)(e,r,n,t)}},get:{value:function(){let r;r=0==arguments.length?"`cookies().get()`":`\`cookies().get(${b(arguments[0])})\``;let n=v(e,r);(0,c.abortAndThrowOnSynchronousRequestDataAccess)(e,r,n,t)}},getAll:{value:function(){let r;r=0==arguments.length?"`cookies().getAll()`":`\`cookies().getAll(${b(arguments[0])})\``;let n=v(e,r);(0,c.abortAndThrowOnSynchronousRequestDataAccess)(e,r,n,t)}},has:{value:function(){let r;r=0==arguments.length?"`cookies().has()`":`\`cookies().has(${b(arguments[0])})\``;let n=v(e,r);(0,c.abortAndThrowOnSynchronousRequestDataAccess)(e,r,n,t)}},set:{value:function(){let r;if(0==arguments.length)r="`cookies().set()`";else{let e=arguments[0];r=e?`\`cookies().set(${b(e)}, ...)\``:"`cookies().set(...)`"}let n=v(e,r);(0,c.abortAndThrowOnSynchronousRequestDataAccess)(e,r,n,t)}},delete:{value:function(){let r;r=0==arguments.length?"`cookies().delete()`":1==arguments.length?`\`cookies().delete(${b(arguments[0])})\``:`\`cookies().delete(${b(arguments[0])}, ...)\``;let n=v(e,r);(0,c.abortAndThrowOnSynchronousRequestDataAccess)(e,r,n,t)}},clear:{value:function(){let r="`cookies().clear()`",n=v(e,r);(0,c.abortAndThrowOnSynchronousRequestDataAccess)(e,r,n,t)}},toString:{value:function(){let r="`cookies().toString()`",n=v(e,r);(0,c.abortAndThrowOnSynchronousRequestDataAccess)(e,r,n,t)}}}),n}function m(e){let t=y.get(e);if(t)return t;let r=Promise.resolve(e);return y.set(e,r),Object.defineProperties(r,{[Symbol.iterator]:{value:e[Symbol.iterator]?e[Symbol.iterator].bind(e):_.bind(e)},size:{get:()=>e.size},get:{value:e.get.bind(e)},getAll:{value:e.getAll.bind(e)},has:{value:e.has.bind(e)},set:{value:e.set.bind(e)},delete:{value:e.delete.bind(e)},clear:{value:"function"==typeof e.clear?e.clear.bind(e):E.bind(e,r)},toString:{value:e.toString.bind(e)}}),r}function b(e){return"object"==typeof e&&null!==e&&"string"==typeof e.name?`'${e.name}'`:"string"==typeof e?`'${e}'`:"..."}let w=(0,d.createDedupedByCallsiteServerErrorLoggerDev)(v);function v(e,t){let r=e?`Route "${e}" `:"This route ";return Object.defineProperty(Error(`${r}used ${t}. \`cookies()\` should be awaited before using its value. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`),"__NEXT_ERROR_CODE",{value:"E223",enumerable:!1,configurable:!0})}function _(){return this.getAll().map(e=>[e.name,e]).values()}function E(e){for(let e of this.getAll())this.delete(e.name);return e}},40939:(e,t,r)=>{var n="/",i=r(65364),o=r(82909).Buffer;!function(){var t={523:function(e){e.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},782:function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},646:function(e){"use strict";let t={};function r(e,r,n){function i(e,t,n){return"string"==typeof r?r:r(e,t,n)}n||(n=Error);class o extends n{constructor(e,t,r){super(i(e,t,r))}}o.prototype.name=n.name,o.prototype.code=e,t[e]=o}function n(e,t){if(!Array.isArray(e))return`of ${t} ${String(e)}`;{let r=e.length;return(e=e.map(e=>String(e)),r>2)?`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]:2===r?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}}function i(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function o(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function a(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}r("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),r("ERR_INVALID_ARG_TYPE",function(e,t,r){let s,c;if("string"==typeof t&&i(t,"not ")?(s="must not be",t=t.replace(/^not /,"")):s="must be",o(e," argument"))c=`The ${e} ${s} ${n(t,"type")}`;else{let r=a(e,".")?"property":"argument";c=`The "${e}" ${r} ${s} ${n(t,"type")}`}return c+`. Received type ${typeof r}`},TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},403:function(e,t,r){"use strict";var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=l;var o=r(709),a=r(337);r(782)(l,o);for(var s=n(a.prototype),c=0;c<s.length;c++){var u=s[c];l.prototype[u]||(l.prototype[u]=a.prototype[u])}function l(e){if(!(this instanceof l))return new l(e);o.call(this,e),a.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",d)))}function d(){this._writableState.ended||i.nextTick(f,this)}function f(e){e.end()}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(l.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(l.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},889:function(e,t,r){"use strict";e.exports=i;var n=r(170);function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}r(782)(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},709:function(e,t,n){"use strict";e.exports=O,O.ReadableState=R,n(361).EventEmitter;var o,a,s,c,u,l=function(e,t){return e.listeners(t).length},d=n(678),f=n(300).Buffer,p=r.g.Uint8Array||function(){};function h(e){return f.from(e)}function y(e){return f.isBuffer(e)||e instanceof p}var g=n(837);a=g&&g.debuglog?g.debuglog("stream"):function(){};var m=n(379),b=n(25),w=n(776).getHighWaterMark,v=n(646).q,_=v.ERR_INVALID_ARG_TYPE,E=v.ERR_STREAM_PUSH_AFTER_EOF,S=v.ERR_METHOD_NOT_IMPLEMENTED,A=v.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(782)(O,d);var x=b.errorOrDestroy,k=["error","close","destroy","pause","resume"];function P(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}function R(e,t,r){o=o||n(403),e=e||{},"boolean"!=typeof r&&(r=t instanceof o),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=w(this,e,"readableHighWaterMark",r),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(s||(s=n(704).s),this.decoder=new s(e.encoding),this.encoding=e.encoding)}function O(e){if(o=o||n(403),!(this instanceof O))return new O(e);var t=this instanceof o;this._readableState=new R(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),d.call(this)}function T(e,t,r,n,i){a("readableAddChunk",t);var o,s=e._readableState;if(null===t)s.reading=!1,N(e,s);else if(i||(o=I(s,t)),o)x(e,o);else if(s.objectMode||t&&t.length>0)if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===f.prototype||(t=h(t)),n)s.endEmitted?x(e,new A):C(e,s,t,!0);else if(s.ended)x(e,new E);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?C(e,s,t,!1):W(e,s)):C(e,s,t,!1)}else n||(s.reading=!1,W(e,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function C(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&U(e)),W(e,t)}function I(e,t){var r;return y(t)||"string"==typeof t||void 0===t||e.objectMode||(r=new _("chunk",["string","Buffer","Uint8Array"],t)),r}Object.defineProperty(O.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),O.prototype.destroy=b.destroy,O.prototype._undestroy=b.undestroy,O.prototype._destroy=function(e,t){t(e)},O.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=f.from(e,t),t=""),r=!0),T(this,e,t,!1,r)},O.prototype.unshift=function(e){return T(this,e,null,!0,!1)},O.prototype.isPaused=function(){return!1===this._readableState.flowing},O.prototype.setEncoding=function(e){s||(s=n(704).s);var t=new s(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";null!==r;)i+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var j=0x40000000;function D(e){return e>=j?e=j:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function H(e,t){if(e<=0||0===t.length&&t.ended)return 0;if(t.objectMode)return 1;if(e!=e)if(t.flowing&&t.length)return t.buffer.head.data.length;else return t.length;return(e>t.highWaterMark&&(t.highWaterMark=D(e)),e<=t.length)?e:t.ended?t.length:(t.needReadable=!0,0)}function N(e,t){if(a("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?U(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,M(e)))}}function U(e){var t=e._readableState;a("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(a("emitReadable",t.flowing),t.emittedReadable=!0,i.nextTick(M,e))}function M(e){var t=e._readableState;a("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,q(e)}function W(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(L,e,t))}function L(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(a("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function F(e){return function(){var t=e._readableState;a("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&l(e,"data")&&(t.flowing=!0,q(e))}}function B(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function K(e){a("readable nexttick read 0"),e.read(0)}function $(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(J,e,t))}function J(e,t){a("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),q(e),t.flowing&&!t.reading&&e.read(0)}function q(e){var t=e._readableState;for(a("flow",t.flowing);t.flowing&&null!==e.read(););}function z(e,t){var r;return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r)}function G(e){var t=e._readableState;a("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,i.nextTick(V,t,e))}function V(e,t){if(a("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function X(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return -1}O.prototype.read=function(e){a("read",e),e=parseInt(e,10);var t,r=this._readableState,n=e;if(0!==e&&(r.emittedReadable=!1),0===e&&r.needReadable&&((0!==r.highWaterMark?r.length>=r.highWaterMark:r.length>0)||r.ended))return a("read: emitReadable",r.length,r.ended),0===r.length&&r.ended?G(this):U(this),null;if(0===(e=H(e,r))&&r.ended)return 0===r.length&&G(this),null;var i=r.needReadable;return a("need readable",i),(0===r.length||r.length-e<r.highWaterMark)&&a("length less than watermark",i=!0),r.ended||r.reading?a("reading or ended",i=!1):i&&(a("do read"),r.reading=!0,r.sync=!0,0===r.length&&(r.needReadable=!0),this._read(r.highWaterMark),r.sync=!1,r.reading||(e=H(n,r))),null===(t=e>0?z(e,r):null)?(r.needReadable=r.length<=r.highWaterMark,e=0):(r.length-=e,r.awaitDrain=0),0===r.length&&(r.ended||(r.needReadable=!0),n!==e&&r.ended&&G(this)),null!==t&&this.emit("data",t),t},O.prototype._read=function(e){x(this,new S("_read()"))},O.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,a("pipe count=%d opts=%j",n.pipesCount,t);var o=t&&!1===t.end||e===i.stdout||e===i.stderr?m:c;function s(e,t){a("onunpipe"),e===r&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,f())}function c(){a("onend"),e.end()}n.endEmitted?i.nextTick(o):r.once("end",o),e.on("unpipe",s);var u=F(r);e.on("drain",u);var d=!1;function f(){a("cleanup"),e.removeListener("close",y),e.removeListener("finish",g),e.removeListener("drain",u),e.removeListener("error",h),e.removeListener("unpipe",s),r.removeListener("end",c),r.removeListener("end",m),r.removeListener("data",p),d=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&u()}function p(t){a("ondata");var i=e.write(t);a("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==X(n.pipes,e))&&!d&&(a("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function h(t){a("onerror",t),m(),e.removeListener("error",h),0===l(e,"error")&&x(e,t)}function y(){e.removeListener("finish",g),m()}function g(){a("onfinish"),e.removeListener("close",y),m()}function m(){a("unpipe"),r.unpipe(e)}return r.on("data",p),P(e,"error",h),e.once("close",y),e.once("finish",g),e.emit("pipe",r),n.flowing||(a("pipe resume"),r.resume()),e},O.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=X(t.pipes,e);return -1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},O.prototype.on=function(e,t){var r=d.prototype.on.call(this,e,t),n=this._readableState;return"data"===e?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"!==e||n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,a("on readable",n.length,n.reading),n.length?U(this):n.reading||i.nextTick(K,this)),r},O.prototype.addListener=O.prototype.on,O.prototype.removeListener=function(e,t){var r=d.prototype.removeListener.call(this,e,t);return"readable"===e&&i.nextTick(B,this),r},O.prototype.removeAllListeners=function(e){var t=d.prototype.removeAllListeners.apply(this,arguments);return("readable"===e||void 0===e)&&i.nextTick(B,this),t},O.prototype.resume=function(){var e=this._readableState;return e.flowing||(a("resume"),e.flowing=!e.readableListening,$(this,e)),e.paused=!1,this},O.prototype.pause=function(){return a("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(a("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},O.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",function(){if(a("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(i){if(a("wrapped data"),r.decoder&&(i=r.decoder.write(i)),!r.objectMode||null!=i)(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))}),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<k.length;o++)e.on(k[o],this.emit.bind(this,k[o]));return this._read=function(t){a("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(O.prototype[Symbol.asyncIterator]=function(){return void 0===c&&(c=n(871)),c(this)}),Object.defineProperty(O.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(O.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(O.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),O._fromList=z,Object.defineProperty(O.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(O.from=function(e,t){return void 0===u&&(u=n(727)),u(O,e,t)})},170:function(e,t,r){"use strict";e.exports=l;var n=r(646).q,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,c=r(403);function u(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function l(e){if(!(this instanceof l))return new l(e);c.call(this,e),this._transformState={afterTransform:u.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",d)}function d(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?f(this,null,null):this._flush(function(t,r){f(e,t,r)})}function f(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new s;if(e._transformState.transforming)throw new a;return e.push(null)}r(782)(l,c),l.prototype.push=function(e,t){return this._transformState.needTransform=!1,c.prototype.push.call(this,e,t)},l.prototype._transform=function(e,t,r){r(new i("_transform()"))},l.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},l.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},l.prototype._destroy=function(e,t){c.prototype._destroy.call(this,e,function(e){t(e)})}},337:function(e,t,n){"use strict";function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){J(t,e)}}e.exports=R,R.WritableState=P;var a,s,c={deprecate:n(769)},u=n(678),l=n(300).Buffer,d=r.g.Uint8Array||function(){};function f(e){return l.from(e)}function p(e){return l.isBuffer(e)||e instanceof d}var h=n(25),y=n(776).getHighWaterMark,g=n(646).q,m=g.ERR_INVALID_ARG_TYPE,b=g.ERR_METHOD_NOT_IMPLEMENTED,w=g.ERR_MULTIPLE_CALLBACK,v=g.ERR_STREAM_CANNOT_PIPE,_=g.ERR_STREAM_DESTROYED,E=g.ERR_STREAM_NULL_VALUES,S=g.ERR_STREAM_WRITE_AFTER_END,A=g.ERR_UNKNOWN_ENCODING,x=h.errorOrDestroy;function k(){}function P(e,t,r){a=a||n(403),e=e||{},"boolean"!=typeof r&&(r=t instanceof a),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=y(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=!1===e.decodeStrings;this.decodeStrings=!i,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){N(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function R(e){var t=this instanceof(a=a||n(403));if(!t&&!s.call(R,this))return new R(e);this._writableState=new P(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),u.call(this)}function O(e,t){var r=new S;x(e,r),i.nextTick(t,r)}function T(e,t,r,n){var o;return null===r?o=new E:"string"==typeof r||t.objectMode||(o=new m("chunk",["string","Buffer"],r)),!o||(x(e,o),i.nextTick(n,o),!1)}function C(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=l.from(t,r)),t}function I(e,t,r,n,i,o){if(!r){var a=C(t,n,i);n!==a&&(r=!0,i="buffer",n=a)}var s=t.objectMode?1:n.length;t.length+=s;var c=t.length<t.highWaterMark;if(c||(t.needDrain=!0),t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else j(e,t,!1,s,n,i,o);return c}function j(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new _("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function D(e,t,r,n,o){--t.pendingcb,r?(i.nextTick(o,n),i.nextTick(K,e,t),e._writableState.errorEmitted=!0,x(e,n)):(o(n),e._writableState.errorEmitted=!0,x(e,n),K(e,t))}function H(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function N(e,t){var r=e._writableState,n=r.sync,o=r.writecb;if("function"!=typeof o)throw new w;if(H(r),t)D(e,r,n,t,o);else{var a=L(r)||e.destroyed;a||r.corked||r.bufferProcessing||!r.bufferedRequest||W(e,r),n?i.nextTick(U,e,r,a,o):U(e,r,a,o)}}function U(e,t,r,n){r||M(e,t),t.pendingcb--,n(),K(e,t)}function M(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function W(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=Array(t.bufferedRequestCount),i=t.corkedRequestsFree;i.entry=r;for(var a=0,s=!0;r;)n[a]=r,r.isBuf||(s=!1),r=r.next,a+=1;n.allBuffers=s,j(e,t,!0,t.length,n,"",i.finish),t.pendingcb++,t.lastBufferedRequest=null,i.next?(t.corkedRequestsFree=i.next,i.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,u=r.encoding,l=r.callback,d=t.objectMode?1:c.length;if(j(e,t,!1,d,c,u,l),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function L(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function F(e,t){e._final(function(r){t.pendingcb--,r&&x(e,r),t.prefinished=!0,e.emit("prefinish"),K(e,t)})}function B(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,i.nextTick(F,e,t)))}function K(e,t){var r=L(t);if(r&&(B(e,t),0===t.pendingcb)&&(t.finished=!0,e.emit("finish"),t.autoDestroy)){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}function $(e,t,r){t.ending=!0,K(e,t),r&&(t.finished?i.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function J(e,t,r){var n=e.entry;for(e.entry=null;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}n(782)(R,u),P.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(P.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(s=Function.prototype[Symbol.hasInstance],Object.defineProperty(R,Symbol.hasInstance,{value:function(e){return!!s.call(this,e)||this===R&&e&&e._writableState instanceof P}})):s=function(e){return e instanceof this},R.prototype.pipe=function(){x(this,new v)},R.prototype.write=function(e,t,r){var n=this._writableState,i=!1,o=!n.objectMode&&p(e);return o&&!l.isBuffer(e)&&(e=f(e)),"function"==typeof t&&(r=t,t=null),o?t="buffer":t||(t=n.defaultEncoding),"function"!=typeof r&&(r=k),n.ending?O(this,r):(o||T(this,n,e,r))&&(n.pendingcb++,i=I(this,n,o,e,t,r)),i},R.prototype.cork=function(){this._writableState.corked++},R.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||W(this,e))},R.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new A(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(R.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(R.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),R.prototype._write=function(e,t,r){r(new b("_write()"))},R.prototype._writev=null,R.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||$(this,n,r),this},Object.defineProperty(R.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(R.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),R.prototype.destroy=h.destroy,R.prototype._undestroy=h.undestroy,R.prototype._destroy=function(e,t){t(e)}},871:function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o,a=r(698),s=Symbol("lastResolve"),c=Symbol("lastReject"),u=Symbol("error"),l=Symbol("ended"),d=Symbol("lastPromise"),f=Symbol("handlePromise"),p=Symbol("stream");function h(e,t){return{value:e,done:t}}function y(e){var t=e[s];if(null!==t){var r=e[p].read();null!==r&&(e[d]=null,e[s]=null,e[c]=null,t(h(r,!1)))}}function g(e){i.nextTick(y,e)}function m(e,t){return function(r,n){e.then(function(){if(t[l])return void r(h(void 0,!0));t[f](r,n)},n)}}var b=Object.getPrototypeOf(function(){}),w=Object.setPrototypeOf((n(o={get stream(){return this[p]},next:function(){var e,t=this,r=this[u];if(null!==r)return Promise.reject(r);if(this[l])return Promise.resolve(h(void 0,!0));if(this[p].destroyed)return new Promise(function(e,r){i.nextTick(function(){t[u]?r(t[u]):e(h(void 0,!0))})});var n=this[d];if(n)e=new Promise(m(n,this));else{var o=this[p].read();if(null!==o)return Promise.resolve(h(o,!1));e=new Promise(this[f])}return this[d]=e,e}},Symbol.asyncIterator,function(){return this}),n(o,"return",function(){var e=this;return new Promise(function(t,r){e[p].destroy(null,function(e){if(e)return void r(e);t(h(void 0,!0))})})}),o),b);e.exports=function(e){var t,r=Object.create(w,(n(t={},p,{value:e,writable:!0}),n(t,s,{value:null,writable:!0}),n(t,c,{value:null,writable:!0}),n(t,u,{value:null,writable:!0}),n(t,l,{value:e._readableState.endEmitted,writable:!0}),n(t,f,{value:function(e,t){var n=r[p].read();n?(r[d]=null,r[s]=null,r[c]=null,e(h(n,!1))):(r[s]=e,r[c]=t)},writable:!0}),t));return r[d]=null,a(e,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[c];null!==t&&(r[d]=null,r[s]=null,r[c]=null,t(e)),r[u]=e;return}var n=r[s];null!==n&&(r[d]=null,r[s]=null,r[c]=null,n(h(void 0,!0))),r[l]=!0}),e.on("readable",g.bind(null,r)),r}},379:function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach(function(t){o(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),e}var u=r(300).Buffer,l=r(837).inspect,d=l&&l.custom||"inspect";function f(e,t,r){u.prototype.copy.call(e,t,r)}e.exports=function(){function e(){a(this,e),this.head=null,this.tail=null,this.length=0}return c(e,[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return u.alloc(0);for(var t=u.allocUnsafe(e>>>0),r=this.head,n=0;r;)f(r.data,t,n),n+=r.data.length,r=r.next;return t}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var i=t.data,o=e>i.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=u.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:d,value:function(e,t){return l(this,i({},t,{depth:0,customInspect:!1}))}}]),e}()},25:function(e){"use strict";function t(e,t){n(e,t),r(e)}function r(e){(!e._writableState||e._writableState.emitClose)&&(!e._readableState||e._readableState.emitClose)&&e.emit("close")}function n(e,t){e.emit("error",t)}e.exports={destroy:function(e,o){var a=this,s=this._readableState&&this._readableState.destroyed,c=this._writableState&&this._writableState.destroyed;return s||c?o?o(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,i.nextTick(n,this,e)):i.nextTick(n,this,e)):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!o&&e?a._writableState?a._writableState.errorEmitted?i.nextTick(r,a):(a._writableState.errorEmitted=!0,i.nextTick(t,a,e)):i.nextTick(t,a,e):o?(i.nextTick(r,a),o(e)):i.nextTick(r,a)})),this},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}},698:function(e,t,r){"use strict";var n=r(646).q.ERR_STREAM_PREMATURE_CLOSE;function i(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}function o(){}function a(e){return e.setHeader&&"function"==typeof e.abort}function s(e,t,r){if("function"==typeof t)return s(e,null,t);t||(t={}),r=i(r||o);var c=t.readable||!1!==t.readable&&e.readable,u=t.writable||!1!==t.writable&&e.writable,l=function(){e.writable||f()},d=e._writableState&&e._writableState.finished,f=function(){u=!1,d=!0,c||r.call(e)},p=e._readableState&&e._readableState.endEmitted,h=function(){c=!1,p=!0,u||r.call(e)},y=function(t){r.call(e,t)},g=function(){var t;return c&&!p?(e._readableState&&e._readableState.ended||(t=new n),r.call(e,t)):u&&!d?(e._writableState&&e._writableState.ended||(t=new n),r.call(e,t)):void 0},m=function(){e.req.on("finish",f)};return a(e)?(e.on("complete",f),e.on("abort",g),e.req?m():e.on("request",m)):u&&!e._writableState&&(e.on("end",l),e.on("close",l)),e.on("end",h),e.on("finish",f),!1!==t.error&&e.on("error",y),e.on("close",g),function(){e.removeListener("complete",f),e.removeListener("abort",g),e.removeListener("request",m),e.req&&e.req.removeListener("finish",f),e.removeListener("end",l),e.removeListener("close",l),e.removeListener("finish",f),e.removeListener("end",h),e.removeListener("error",y),e.removeListener("close",g)}}e.exports=s},727:function(e,t,r){"use strict";function n(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(e){r(e);return}s.done?t(c):Promise.resolve(c).then(n,i)}function i(e){return function(){var t=this,r=arguments;return new Promise(function(i,o){var a=e.apply(t,r);function s(e){n(a,i,o,s,c,"next",e)}function c(e){n(a,i,o,s,c,"throw",e)}s(void 0)})}}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach(function(t){s(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var c=r(646).q.ERR_INVALID_ARG_TYPE;e.exports=function(e,t,r){if(t&&"function"==typeof t.next)n=t;else if(t&&t[Symbol.asyncIterator])n=t[Symbol.asyncIterator]();else if(t&&t[Symbol.iterator])n=t[Symbol.iterator]();else throw new c("iterable",["Iterable"],t);var n,o=new e(a({objectMode:!0},r)),s=!1;function u(){return l.apply(this,arguments)}function l(){return(l=i(function*(){try{var e=yield n.next(),t=e.value;e.done?o.push(null):o.push((yield t))?u():s=!1}catch(e){o.destroy(e)}})).apply(this,arguments)}return o._read=function(){s||(s=!0,u())},o}},442:function(e,t,r){"use strict";function n(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var i,o=r(646).q,a=o.ERR_MISSING_ARGS,s=o.ERR_STREAM_DESTROYED;function c(e){if(e)throw e}function u(e){return e.setHeader&&"function"==typeof e.abort}function l(e,t,o,a){a=n(a);var c=!1;e.on("close",function(){c=!0}),void 0===i&&(i=r(698)),i(e,{readable:t,writable:o},function(e){if(e)return a(e);c=!0,a()});var l=!1;return function(t){if(!c&&!l){if(l=!0,u(e))return e.abort();if("function"==typeof e.destroy)return e.destroy();a(t||new s("pipe"))}}}function d(e){e()}function f(e,t){return e.pipe(t)}function p(e){return e.length&&"function"==typeof e[e.length-1]?e.pop():c}e.exports=function(){for(var e,t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=p(r);if(Array.isArray(r[0])&&(r=r[0]),r.length<2)throw new a("streams");var o=r.map(function(t,n){var a=n<r.length-1;return l(t,a,n>0,function(t){e||(e=t),t&&o.forEach(d),a||(o.forEach(d),i(e))})});return r.reduce(f)}},776:function(e,t,r){"use strict";var n=r(646).q.ERR_INVALID_OPT_VALUE;function i(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}e.exports={getHighWaterMark:function(e,t,r,o){var a=i(t,o,r);if(null!=a){if(!(isFinite(a)&&Math.floor(a)===a)||a<0)throw new n(o?r:"highWaterMark",a);return Math.floor(a)}return e.objectMode?16:16384}}},678:function(e,t,r){e.exports=r(781)},726:function(e,t,r){var n=r(781);"disable"===i.env.READABLE_STREAM&&n?(e.exports=n.Readable,Object.assign(e.exports,n),e.exports.Stream=n):((t=e.exports=r(709)).Stream=n||t,t.Readable=t,t.Writable=r(337),t.Duplex=r(403),t.Transform=r(170),t.PassThrough=r(889),t.finished=r(698),t.pipeline=r(442))},55:function(e,t,r){var n=r(300),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return n.SlowBuffer(e)}},813:function(e,t,n){var i=n(450),o=n(254),a=n(911),s=n(523),c=n(310),u=t;u.request=function(e,t){e="string"==typeof e?c.parse(e):a(e);var n=-1===r.g.location.protocol.search(/^https?:$/)?"http:":"",o=e.protocol||n,s=e.hostname||e.host,u=e.port,l=e.path||"/";s&&-1!==s.indexOf(":")&&(s="["+s+"]"),e.url=(s?o+"//"+s:"")+(u?":"+u:"")+l,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var d=new i(e);return t&&d.on("response",t),d},u.get=function(e,t){var r=u.request(e,t);return r.end(),r},u.ClientRequest=i,u.IncomingMessage=o.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=s,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]},301:function(e,t){var n;function i(){if(void 0!==n)return n;if(r.g.XMLHttpRequest){n=new r.g.XMLHttpRequest;try{n.open("GET",r.g.XDomainRequest?"/":"https://example.com")}catch(e){n=null}}else n=null;return n}function o(e){var t=i();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}function a(e){return"function"==typeof e}t.fetch=a(r.g.fetch)&&a(r.g.ReadableStream),t.writableStream=a(r.g.WritableStream),t.abortController=a(r.g.AbortController),t.arraybuffer=t.fetch||o("arraybuffer"),t.msstream=!t.fetch&&o("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&o("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||!!i()&&a(i().overrideMimeType),n=null},450:function(e,t,n){var a=n(301),s=n(782),c=n(254),u=n(726),l=c.IncomingMessage,d=c.readyStates;function f(e,t){return a.fetch&&t?"fetch":a.mozchunkedarraybuffer?"moz-chunked-arraybuffer":a.msstream?"ms-stream":a.arraybuffer&&e?"arraybuffer":"text"}var p=e.exports=function(e){var t,r=this;u.Writable.call(r),r._opts=e,r._body=[],r._headers={},e.auth&&r.setHeader("Authorization","Basic "+o.from(e.auth).toString("base64")),Object.keys(e.headers).forEach(function(t){r.setHeader(t,e.headers[t])});var n=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!a.abortController)n=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!a.overrideMimeType;else if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw Error("Invalid value for opts.mode");else t=!0;r._mode=f(t,n),r._fetchTimer=null,r.on("finish",function(){r._onFinish()})};function h(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}}s(p,u.Writable),p.prototype.setHeader=function(e,t){var r=this,n=e.toLowerCase();-1===y.indexOf(n)&&(r._headers[n]={name:e,value:t})},p.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},p.prototype.removeHeader=function(e){var t=this;delete t._headers[e.toLowerCase()]},p.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts,n=e._headers,o=null;"GET"!==t.method&&"HEAD"!==t.method&&(o=new Blob(e._body,{type:(n["content-type"]||{}).value||""}));var s=[];if(Object.keys(n).forEach(function(e){var t=n[e].name,r=n[e].value;Array.isArray(r)?r.forEach(function(e){s.push([t,e])}):s.push([t,r])}),"fetch"===e._mode){var c=null;if(a.abortController){var u=new AbortController;c=u.signal,e._fetchAbortController=u,"requestTimeout"in t&&0!==t.requestTimeout&&(e._fetchTimer=r.g.setTimeout(function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()},t.requestTimeout))}r.g.fetch(e._opts.url,{method:e._opts.method,headers:s,body:o||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:c}).then(function(t){e._fetchResponse=t,e._connect()},function(t){r.g.clearTimeout(e._fetchTimer),e._destroyed||e.emit("error",t)})}else{var l=e._xhr=new r.g.XMLHttpRequest;try{l.open(e._opts.method,e._opts.url,!0)}catch(t){i.nextTick(function(){e.emit("error",t)});return}"responseType"in l&&(l.responseType=e._mode),"withCredentials"in l&&(l.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in l&&l.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(l.timeout=t.requestTimeout,l.ontimeout=function(){e.emit("requestTimeout")}),s.forEach(function(e){l.setRequestHeader(e[0],e[1])}),e._response=null,l.onreadystatechange=function(){switch(l.readyState){case d.LOADING:case d.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(l.onprogress=function(){e._onXHRProgress()}),l.onerror=function(){e._destroyed||e.emit("error",Error("XHR error"))};try{l.send(o)}catch(t){i.nextTick(function(){e.emit("error",t)});return}}}},p.prototype._onXHRProgress=function(){var e=this;h(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress())},p.prototype._connect=function(){var e=this;e._destroyed||(e._response=new l(e._xhr,e._fetchResponse,e._mode,e._fetchTimer),e._response.on("error",function(t){e.emit("error",t)}),e.emit("response",e._response))},p.prototype._write=function(e,t,r){var n=this;n._body.push(e),r()},p.prototype.abort=p.prototype.destroy=function(){var e=this;e._destroyed=!0,r.g.clearTimeout(e._fetchTimer),e._response&&(e._response._destroyed=!0),e._xhr?e._xhr.abort():e._fetchAbortController&&e._fetchAbortController.abort()},p.prototype.end=function(e,t,r){var n=this;"function"==typeof e&&(r=e,e=void 0),u.Writable.prototype.end.call(n,e,t,r)},p.prototype.flushHeaders=function(){},p.prototype.setTimeout=function(){},p.prototype.setNoDelay=function(){},p.prototype.setSocketKeepAlive=function(){};var y=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]},254:function(e,t,n){var a=n(301),s=n(782),c=n(726),u=t.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},l=t.IncomingMessage=function(e,t,n,s){var u=this;if(c.Readable.call(u),u._mode=n,u.headers={},u.rawHeaders=[],u.trailers={},u.rawTrailers=[],u.on("end",function(){i.nextTick(function(){u.emit("close")})}),"fetch"===n){if(u._fetchResponse=t,u.url=t.url,u.statusCode=t.status,u.statusMessage=t.statusText,t.headers.forEach(function(e,t){u.headers[t.toLowerCase()]=e,u.rawHeaders.push(t,e)}),a.writableStream){var l=new WritableStream({write:function(e){return new Promise(function(t,r){u._destroyed?r():u.push(o.from(e))?t():u._resumeFetch=t})},close:function(){r.g.clearTimeout(s),u._destroyed||u.push(null)},abort:function(e){u._destroyed||u.emit("error",e)}});try{t.body.pipeTo(l).catch(function(e){r.g.clearTimeout(s),u._destroyed||u.emit("error",e)});return}catch(e){}}var d=t.body.getReader();function f(){d.read().then(function(e){if(!u._destroyed){if(e.done){r.g.clearTimeout(s),u.push(null);return}u.push(o.from(e.value)),f()}}).catch(function(e){r.g.clearTimeout(s),u._destroyed||u.emit("error",e)})}f()}else if(u._xhr=e,u._pos=0,u.url=e.responseURL,u.statusCode=e.status,u.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach(function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var r=t[1].toLowerCase();"set-cookie"===r?(void 0===u.headers[r]&&(u.headers[r]=[]),u.headers[r].push(t[2])):void 0!==u.headers[r]?u.headers[r]+=", "+t[2]:u.headers[r]=t[2],u.rawHeaders.push(t[1],t[2])}}),u._charset="x-user-defined",!a.overrideMimeType){var p=u.rawHeaders["mime-type"];if(p){var h=p.match(/;\s*charset=([^;])(;|$)/);h&&(u._charset=h[1].toLowerCase())}u._charset||(u._charset="utf-8")}};s(l,c.Readable),l.prototype._read=function(){var e=this,t=e._resumeFetch;t&&(e._resumeFetch=null,t())},l.prototype._onXHRProgress=function(){var e=this,t=e._xhr,n=null;switch(e._mode){case"text":if((n=t.responseText).length>e._pos){var i=n.substr(e._pos);if("x-user-defined"===e._charset){for(var a=o.alloc(i.length),s=0;s<i.length;s++)a[s]=255&i.charCodeAt(s);e.push(a)}else e.push(i,e._charset);e._pos=n.length}break;case"arraybuffer":if(t.readyState!==u.DONE||!t.response)break;n=t.response,e.push(o.from(new Uint8Array(n)));break;case"moz-chunked-arraybuffer":if(n=t.response,t.readyState!==u.LOADING||!n)break;e.push(o.from(new Uint8Array(n)));break;case"ms-stream":if(n=t.response,t.readyState!==u.LOADING)break;var c=new r.g.MSStreamReader;c.onprogress=function(){c.result.byteLength>e._pos&&(e.push(o.from(new Uint8Array(c.result.slice(e._pos)))),e._pos=c.result.byteLength)},c.onload=function(){e.push(null)},c.readAsArrayBuffer(n)}e._xhr.readyState===u.DONE&&"ms-stream"!==e._mode&&e.push(null)}},704:function(e,t,r){"use strict";var n=r(55).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;if(!e)return"utf8";for(;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function a(e){var t=o(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw Error("Unknown encoding: "+e);return t||e}function s(e){var t;switch(this.encoding=a(e),this.encoding){case"utf16le":this.text=h,this.end=y,t=4;break;case"utf8":this.fillLast=d,t=4;break;case"base64":this.text=g,this.end=m,t=3;break;default:this.write=b,this.end=w;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function c(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function u(e,t,r){var n=t.length-1;if(n<r)return 0;var i=c(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||-2===i?0:(i=c(t[n]))>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||-2===i?0:(i=c(t[n]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}function l(e,t,r){if((192&t[0])!=128)return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if((192&t[1])!=128)return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&(192&t[2])!=128)return e.lastNeed=2,"�"}}function d(e){var t=this.lastTotal-this.lastNeed,r=l(this,e,t);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length)}function f(e,t){var r=u(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)}function p(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t}function h(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function y(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function g(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function m(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function b(e){return e.toString(this.encoding)}function w(e){return e&&e.length?this.write(e):""}t.s=s,s.prototype.write=function(e){var t,r;if(0===e.length)return"";if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},s.prototype.end=p,s.prototype.text=f,s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},769:function(e){function t(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function e(e,r){if(t("noDeprecation"))return e;var n=!1;return function(){if(!n){if(t("throwDeprecation"))throw Error(r);t("traceDeprecation")?console.trace(r):console.warn(r),n=!0}return e.apply(this,arguments)}}},911:function(e){e.exports=r;var t=Object.prototype.hasOwnProperty;function r(){for(var e={},r=0;r<arguments.length;r++){var n=arguments[r];for(var i in n)t.call(n,i)&&(e[i]=n[i])}return e}},300:function(e){"use strict";e.exports=r(82909)},361:function(e){"use strict";e.exports=r(95284)},781:function(e){"use strict";e.exports=r(32545)},310:function(e){"use strict";e.exports=r(3305)},837:function(e){"use strict";e.exports=r(68994)}},a={};function s(e){var r=a[e];if(void 0!==r)return r.exports;var n=a[e]={exports:{}},i=!0;try{t[e](n,n.exports,s),i=!1}finally{i&&delete a[e]}return n.exports}s.ab=n+"/",e.exports=s(813)}()},41362:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createSecret=a,t.fromDate=i,t.hashToken=o;var n=r(63426);function i(e,t=Date.now()){return new Date(t+1e3*e)}function o(e,t){var r;let{provider:i,secret:o}=t;return(0,n.createHash)("sha256").update(`${e}${null!=(r=i.secret)?r:o}`).digest("hex")}function a(e){var t;let{authOptions:r,url:i}=e;return null!=(t=r.secret)?t:(0,n.createHash)("sha256").update(JSON.stringify({...i,...r})).digest("hex")}},41446:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var n=r(89632),i=r(89918),o=r(68782),a=u(r(57260)),s=r(42226);function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(c=function(e){return e?r:t})(e)}function u(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=c(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&({}).hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}async function l(e){var t,r,c,u,l,f;let{options:p,query:h,body:y,method:g,cookies:m}=e,{logger:b,provider:w}=p,v=null!=(t=null==y?void 0:y.error)?t:null==h?void 0:h.error;if(v){let e=Error(v);throw b.error("OAUTH_CALLBACK_HANDLER_ERROR",{error:e,error_description:null==h?void 0:h.error_description,providerId:w.id}),b.debug("OAUTH_CALLBACK_HANDLER_ERROR",{body:y}),e}if(null!=(r=w.version)&&r.startsWith("1."))try{let e=await (0,o.oAuth1Client)(p),{oauth_token:t,oauth_verifier:r}=null!=h?h:{},n=await e.getOAuthAccessToken(t,o.oAuth1TokenStore.get(t),r),i=await e.get(w.profileUrl,n.oauth_token,n.oauth_token_secret);return"string"==typeof i&&(i=JSON.parse(i)),{...await d({profile:i,tokens:n,provider:w,logger:b}),cookies:[]}}catch(e){throw b.error("OAUTH_V1_GET_ACCESS_TOKEN_ERROR",e),e}null!=h&&h.oauth_token&&o.oAuth1TokenStore.delete(h.oauth_token);try{let e,t,r=await (0,i.openidClient)(p),o={},s=[];await a.state.use(m,s,p,o),await a.pkce.use(m,s,p,o),await a.nonce.use(m,s,p,o);let v={...r.callbackParams({url:`http://n?${new URLSearchParams(h)}`,body:y,method:g}),...null==(c=w.token)?void 0:c.params};if(null!=(u=w.token)&&u.request){let t=await w.token.request({provider:w,params:v,checks:o,client:r});e=new n.TokenSet(t.tokens)}else e=w.idToken?await r.callback(w.callbackUrl,v,o):await r.oauthCallback(w.callbackUrl,v,o);return Array.isArray(e.scope)&&(e.scope=e.scope.join(" ")),t=null!=(l=w.userinfo)&&l.request?await w.userinfo.request({provider:w,tokens:e,client:r}):w.idToken?e.claims():await r.userinfo(e,{params:null==(f=w.userinfo)?void 0:f.params}),{...await d({profile:t,provider:w,tokens:e,logger:b}),cookies:s}}catch(e){throw new s.OAuthCallbackError(e)}}async function d({profile:e,tokens:t,provider:r,logger:n}){try{var i;n.debug("PROFILE_DATA",{OAuthProfile:e});let o=await r.profile(e,t);if(o.email=null==(i=o.email)?void 0:i.toLowerCase(),!o.id)throw TypeError(`Profile id is missing in ${r.name} OAuth profile response`);return{profile:o,account:{provider:r.id,type:r.type,providerAccountId:o.id.toString(),...t},OAuthProfile:e}}catch(t){n.error("OAUTH_PARSE_PROFILE_ERROR",{error:t,OAuthProfile:e})}}},41776:(e,t,r)=>{"use strict";r.r(t),r.d(t,{CompactEncrypt:()=>tP,CompactSign:()=>tT,EmbeddedJWK:()=>tW,EncryptJWT:()=>tH,FlattenedEncrypt:()=>to,FlattenedSign:()=>tO,GeneralEncrypt:()=>ts,GeneralSign:()=>tI,SignJWT:()=>tD,UnsecuredJWT:()=>tY,base64url:()=>i,calculateJwkThumbprint:()=>tU,calculateJwkThumbprintUri:()=>tM,compactDecrypt:()=>e8,compactVerify:()=>tf,createLocalJWKSet:()=>tq,createRemoteJWKSet:()=>tX,cryptoRuntime:()=>t8,decodeJwt:()=>t1,decodeProtectedHeader:()=>t0,errors:()=>n,exportJWK:()=>tr,exportPKCS8:()=>tt,exportSPKI:()=>te,flattenedDecrypt:()=>e4,flattenedVerify:()=>td,generalDecrypt:()=>e9,generalVerify:()=>tp,generateKeyPair:()=>t3,generateSecret:()=>t4,importJWK:()=>eG,importPKCS8:()=>ez,importSPKI:()=>eJ,importX509:()=>eq,jwtDecrypt:()=>tk,jwtVerify:()=>tx});var n={};r.r(n),r.d(n,{JOSEAlgNotAllowed:()=>x,JOSEError:()=>E,JOSENotSupported:()=>k,JWEDecompressionFailed:()=>R,JWEDecryptionFailed:()=>P,JWEInvalid:()=>O,JWKInvalid:()=>I,JWKSInvalid:()=>j,JWKSMultipleMatchingKeys:()=>H,JWKSNoMatchingKey:()=>D,JWKSTimeout:()=>N,JWSInvalid:()=>T,JWSSignatureVerificationFailed:()=>U,JWTClaimValidationFailed:()=>S,JWTExpired:()=>A,JWTInvalid:()=>C});var i={};r.r(i),r.d(i,{decode:()=>tQ,encode:()=>tZ});let o=crypto,a=e=>e instanceof CryptoKey,s=async(e,t)=>{let r=`SHA-${e.slice(-3)}`;return new Uint8Array(await o.subtle.digest(r,t))},c=new TextEncoder,u=new TextDecoder,l=0x100000000;function d(...e){let t=new Uint8Array(e.reduce((e,{length:t})=>e+t,0)),r=0;return e.forEach(e=>{t.set(e,r),r+=e.length}),t}function f(e,t){return d(c.encode(e),new Uint8Array([0]),t)}function p(e,t,r){if(t<0||t>=l)throw RangeError(`value must be >= 0 and <= ${l-1}. Received ${t}`);e.set([t>>>24,t>>>16,t>>>8,255&t],r)}function h(e){let t=Math.floor(e/l),r=e%l,n=new Uint8Array(8);return p(n,t,0),p(n,r,4),n}function y(e){let t=new Uint8Array(4);return p(t,e),t}function g(e){return d(y(e.length),e)}async function m(e,t,r){let n=Math.ceil((t>>3)/32),i=new Uint8Array(32*n);for(let t=0;t<n;t++){let n=new Uint8Array(4+e.length+r.length);n.set(y(t+1)),n.set(e,4),n.set(r,4+e.length),i.set(await s("sha256",n),32*t)}return i.slice(0,t>>3)}let b=e=>{let t=e;"string"==typeof t&&(t=c.encode(t));let r=32768,n=[];for(let e=0;e<t.length;e+=r)n.push(String.fromCharCode.apply(null,t.subarray(e,e+r)));return btoa(n.join(""))},w=e=>b(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"),v=e=>{let t=atob(e),r=new Uint8Array(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return r},_=e=>{let t=e;t instanceof Uint8Array&&(t=u.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return v(t)}catch(e){throw TypeError("The input to be decoded is not correctly encoded.")}};class E extends Error{static get code(){return"ERR_JOSE_GENERIC"}constructor(e){var t;super(e),this.code="ERR_JOSE_GENERIC",this.name=this.constructor.name,null==(t=Error.captureStackTrace)||t.call(Error,this,this.constructor)}}class S extends E{static get code(){return"ERR_JWT_CLAIM_VALIDATION_FAILED"}constructor(e,t="unspecified",r="unspecified"){super(e),this.code="ERR_JWT_CLAIM_VALIDATION_FAILED",this.claim=t,this.reason=r}}class A extends E{static get code(){return"ERR_JWT_EXPIRED"}constructor(e,t="unspecified",r="unspecified"){super(e),this.code="ERR_JWT_EXPIRED",this.claim=t,this.reason=r}}class x extends E{constructor(){super(...arguments),this.code="ERR_JOSE_ALG_NOT_ALLOWED"}static get code(){return"ERR_JOSE_ALG_NOT_ALLOWED"}}class k extends E{constructor(){super(...arguments),this.code="ERR_JOSE_NOT_SUPPORTED"}static get code(){return"ERR_JOSE_NOT_SUPPORTED"}}class P extends E{constructor(){super(...arguments),this.code="ERR_JWE_DECRYPTION_FAILED",this.message="decryption operation failed"}static get code(){return"ERR_JWE_DECRYPTION_FAILED"}}class R extends E{constructor(){super(...arguments),this.code="ERR_JWE_DECOMPRESSION_FAILED",this.message="decompression operation failed"}static get code(){return"ERR_JWE_DECOMPRESSION_FAILED"}}class O extends E{constructor(){super(...arguments),this.code="ERR_JWE_INVALID"}static get code(){return"ERR_JWE_INVALID"}}class T extends E{constructor(){super(...arguments),this.code="ERR_JWS_INVALID"}static get code(){return"ERR_JWS_INVALID"}}class C extends E{constructor(){super(...arguments),this.code="ERR_JWT_INVALID"}static get code(){return"ERR_JWT_INVALID"}}class I extends E{constructor(){super(...arguments),this.code="ERR_JWK_INVALID"}static get code(){return"ERR_JWK_INVALID"}}class j extends E{constructor(){super(...arguments),this.code="ERR_JWKS_INVALID"}static get code(){return"ERR_JWKS_INVALID"}}class D extends E{constructor(){super(...arguments),this.code="ERR_JWKS_NO_MATCHING_KEY",this.message="no applicable key found in the JSON Web Key Set"}static get code(){return"ERR_JWKS_NO_MATCHING_KEY"}}class H extends E{constructor(){super(...arguments),this.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS",this.message="multiple matching keys found in the JSON Web Key Set"}static get code(){return"ERR_JWKS_MULTIPLE_MATCHING_KEYS"}}Symbol.asyncIterator;class N extends E{constructor(){super(...arguments),this.code="ERR_JWKS_TIMEOUT",this.message="request timed out"}static get code(){return"ERR_JWKS_TIMEOUT"}}class U extends E{constructor(){super(...arguments),this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED",this.message="signature verification failed"}static get code(){return"ERR_JWS_SIGNATURE_VERIFICATION_FAILED"}}let M=o.getRandomValues.bind(o);function W(e){switch(e){case"A128GCM":case"A128GCMKW":case"A192GCM":case"A192GCMKW":case"A256GCM":case"A256GCMKW":return 96;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return 128;default:throw new k(`Unsupported JWE Algorithm: ${e}`)}}let L=e=>M(new Uint8Array(W(e)>>3)),F=(e,t)=>{if(t.length<<3!==W(e))throw new O("Invalid Initialization Vector length")},B=(e,t)=>{let r=e.byteLength<<3;if(r!==t)throw new O(`Invalid Content Encryption Key length. Expected ${t} bits, got ${r} bits`)},K=(e,t)=>{if(!(e instanceof Uint8Array))throw TypeError("First argument must be a buffer");if(!(t instanceof Uint8Array))throw TypeError("Second argument must be a buffer");if(e.length!==t.length)throw TypeError("Input buffers must have the same length");let r=e.length,n=0,i=-1;for(;++i<r;)n|=e[i]^t[i];return 0===n};function $(e,t="algorithm.name"){return TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`)}function J(e,t){return e.name===t}function q(e){return parseInt(e.name.slice(4),10)}function z(e){switch(e){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw Error("unreachable")}}function G(e,t){if(t.length&&!t.some(t=>e.usages.includes(t))){let e="CryptoKey does not support this operation, its usages must include ";if(t.length>2){let r=t.pop();e+=`one of ${t.join(", ")}, or ${r}.`}else 2===t.length?e+=`one of ${t[0]} or ${t[1]}.`:e+=`${t[0]}.`;throw TypeError(e)}}function V(e,t,...r){switch(t){case"HS256":case"HS384":case"HS512":{if(!J(e.algorithm,"HMAC"))throw $("HMAC");let r=parseInt(t.slice(2),10);if(q(e.algorithm.hash)!==r)throw $(`SHA-${r}`,"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!J(e.algorithm,"RSASSA-PKCS1-v1_5"))throw $("RSASSA-PKCS1-v1_5");let r=parseInt(t.slice(2),10);if(q(e.algorithm.hash)!==r)throw $(`SHA-${r}`,"algorithm.hash");break}case"PS256":case"PS384":case"PS512":{if(!J(e.algorithm,"RSA-PSS"))throw $("RSA-PSS");let r=parseInt(t.slice(2),10);if(q(e.algorithm.hash)!==r)throw $(`SHA-${r}`,"algorithm.hash");break}case"EdDSA":if("Ed25519"!==e.algorithm.name&&"Ed448"!==e.algorithm.name)throw $("Ed25519 or Ed448");break;case"ES256":case"ES384":case"ES512":{if(!J(e.algorithm,"ECDSA"))throw $("ECDSA");let r=z(t);if(e.algorithm.namedCurve!==r)throw $(r,"algorithm.namedCurve");break}default:throw TypeError("CryptoKey does not support this operation")}G(e,r)}function X(e,t,...r){switch(t){case"A128GCM":case"A192GCM":case"A256GCM":{if(!J(e.algorithm,"AES-GCM"))throw $("AES-GCM");let r=parseInt(t.slice(1,4),10);if(e.algorithm.length!==r)throw $(r,"algorithm.length");break}case"A128KW":case"A192KW":case"A256KW":{if(!J(e.algorithm,"AES-KW"))throw $("AES-KW");let r=parseInt(t.slice(1,4),10);if(e.algorithm.length!==r)throw $(r,"algorithm.length");break}case"ECDH":switch(e.algorithm.name){case"ECDH":case"X25519":case"X448":break;default:throw $("ECDH, X25519, or X448")}break;case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":if(!J(e.algorithm,"PBKDF2"))throw $("PBKDF2");break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":{if(!J(e.algorithm,"RSA-OAEP"))throw $("RSA-OAEP");let r=parseInt(t.slice(9),10)||1;if(q(e.algorithm.hash)!==r)throw $(`SHA-${r}`,"algorithm.hash");break}default:throw TypeError("CryptoKey does not support this operation")}G(e,r)}function Y(e,t,...r){if(r.length>2){let t=r.pop();e+=`one of type ${r.join(", ")}, or ${t}.`}else 2===r.length?e+=`one of type ${r[0]} or ${r[1]}.`:e+=`of type ${r[0]}.`;return null==t?e+=` Received ${t}`:"function"==typeof t&&t.name?e+=` Received function ${t.name}`:"object"==typeof t&&null!=t&&t.constructor&&t.constructor.name&&(e+=` Received an instance of ${t.constructor.name}`),e}let Z=(e,...t)=>Y("Key must be ",e,...t);function Q(e,t,...r){return Y(`Key for the ${e} algorithm must be `,t,...r)}let ee=e=>a(e),et=["CryptoKey"];async function er(e,t,r,n,i,a){let s,c;if(!(t instanceof Uint8Array))throw TypeError(Z(t,"Uint8Array"));let u=parseInt(e.slice(1,4),10),l=await o.subtle.importKey("raw",t.subarray(u>>3),"AES-CBC",!1,["decrypt"]),f=await o.subtle.importKey("raw",t.subarray(0,u>>3),{hash:`SHA-${u<<1}`,name:"HMAC"},!1,["sign"]),p=d(a,n,r,h(a.length<<3)),y=new Uint8Array((await o.subtle.sign("HMAC",f,p)).slice(0,u>>3));try{s=K(i,y)}catch(e){}if(!s)throw new P;try{c=new Uint8Array(await o.subtle.decrypt({iv:n,name:"AES-CBC"},l,r))}catch(e){}if(!c)throw new P;return c}async function en(e,t,r,n,i,a){let s;t instanceof Uint8Array?s=await o.subtle.importKey("raw",t,"AES-GCM",!1,["decrypt"]):(X(t,e,"decrypt"),s=t);try{return new Uint8Array(await o.subtle.decrypt({additionalData:a,iv:n,name:"AES-GCM",tagLength:128},s,d(r,i)))}catch(e){throw new P}}let ei=async(e,t,r,n,i,o)=>{if(!a(t)&&!(t instanceof Uint8Array))throw TypeError(Z(t,...et,"Uint8Array"));switch(F(e,n),e){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return t instanceof Uint8Array&&B(t,parseInt(e.slice(-3),10)),er(e,t,r,n,i,o);case"A128GCM":case"A192GCM":case"A256GCM":return t instanceof Uint8Array&&B(t,parseInt(e.slice(1,4),10)),en(e,t,r,n,i,o);default:throw new k("Unsupported JWE Content Encryption Algorithm")}},eo=async()=>{throw new k('JWE "zip" (Compression Algorithm) Header Parameter is not supported by your javascript runtime. You need to use the `inflateRaw` decrypt option to provide Inflate Raw implementation.')},ea=async()=>{throw new k('JWE "zip" (Compression Algorithm) Header Parameter is not supported by your javascript runtime. You need to use the `deflateRaw` encrypt option to provide Deflate Raw implementation.')},es=(...e)=>{let t,r=e.filter(Boolean);if(0===r.length||1===r.length)return!0;for(let e of r){let r=Object.keys(e);if(!t||0===t.size){t=new Set(r);continue}for(let e of r){if(t.has(e))return!1;t.add(e)}}return!0};function ec(e){return"object"==typeof e&&null!==e}function eu(e){if(!ec(e)||"[object Object]"!==Object.prototype.toString.call(e))return!1;if(null===Object.getPrototypeOf(e))return!0;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}let el=[{hash:"SHA-256",name:"HMAC"},!0,["sign"]];function ed(e,t){if(e.algorithm.length!==parseInt(t.slice(1,4),10))throw TypeError(`Invalid key size for alg: ${t}`)}function ef(e,t,r){if(a(e))return X(e,t,r),e;if(e instanceof Uint8Array)return o.subtle.importKey("raw",e,"AES-KW",!0,[r]);throw TypeError(Z(e,...et,"Uint8Array"))}let ep=async(e,t,r)=>{let n=await ef(t,e,"wrapKey");ed(n,e);let i=await o.subtle.importKey("raw",r,...el);return new Uint8Array(await o.subtle.wrapKey("raw",i,n,"AES-KW"))},eh=async(e,t,r)=>{let n=await ef(t,e,"unwrapKey");ed(n,e);let i=await o.subtle.unwrapKey("raw",r,n,"AES-KW",...el);return new Uint8Array(await o.subtle.exportKey("raw",i))};async function ey(e,t,r,n,i=new Uint8Array(0),s=new Uint8Array(0)){let u;if(!a(e))throw TypeError(Z(e,...et));if(X(e,"ECDH"),!a(t))throw TypeError(Z(t,...et));X(t,"ECDH","deriveBits");let l=d(g(c.encode(r)),g(i),g(s),y(n));return u="X25519"===e.algorithm.name?256:"X448"===e.algorithm.name?448:Math.ceil(parseInt(e.algorithm.namedCurve.substr(-3),10)/8)<<3,m(new Uint8Array(await o.subtle.deriveBits({name:e.algorithm.name,public:e},t,u)),n,l)}async function eg(e){if(!a(e))throw TypeError(Z(e,...et));return o.subtle.generateKey(e.algorithm,!0,["deriveBits"])}function em(e){if(!a(e))throw TypeError(Z(e,...et));return["P-256","P-384","P-521"].includes(e.algorithm.namedCurve)||"X25519"===e.algorithm.name||"X448"===e.algorithm.name}function eb(e){if(!(e instanceof Uint8Array)||e.length<8)throw new O("PBES2 Salt Input must be 8 or more octets")}function ew(e,t){if(e instanceof Uint8Array)return o.subtle.importKey("raw",e,"PBKDF2",!1,["deriveBits"]);if(a(e))return X(e,t,"deriveBits","deriveKey"),e;throw TypeError(Z(e,...et,"Uint8Array"))}async function ev(e,t,r,n){eb(e);let i=f(t,e),a=parseInt(t.slice(13,16),10),s={hash:`SHA-${t.slice(8,11)}`,iterations:r,name:"PBKDF2",salt:i},c={length:a,name:"AES-KW"},u=await ew(n,t);if(u.usages.includes("deriveBits"))return new Uint8Array(await o.subtle.deriveBits(s,u,a));if(u.usages.includes("deriveKey"))return o.subtle.deriveKey(s,u,c,!1,["wrapKey","unwrapKey"]);throw TypeError('PBKDF2 key "usages" must include "deriveBits" or "deriveKey"')}let e_=async(e,t,r,n=2048,i=M(new Uint8Array(16)))=>{let o=await ev(i,e,n,t);return{encryptedKey:await ep(e.slice(-6),o,r),p2c:n,p2s:w(i)}},eE=async(e,t,r,n,i)=>{let o=await ev(i,e,n,t);return eh(e.slice(-6),o,r)};function eS(e){switch(e){case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":return"RSA-OAEP";default:throw new k(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}let eA=(e,t)=>{if(e.startsWith("RS")||e.startsWith("PS")){let{modulusLength:r}=t.algorithm;if("number"!=typeof r||r<2048)throw TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}},ex=async(e,t,r)=>{if(!a(t))throw TypeError(Z(t,...et));if(X(t,e,"encrypt","wrapKey"),eA(e,t),t.usages.includes("encrypt"))return new Uint8Array(await o.subtle.encrypt(eS(e),t,r));if(t.usages.includes("wrapKey")){let n=await o.subtle.importKey("raw",r,...el);return new Uint8Array(await o.subtle.wrapKey("raw",n,t,eS(e)))}throw TypeError('RSA-OAEP key "usages" must include "encrypt" or "wrapKey" for this operation')},ek=async(e,t,r)=>{if(!a(t))throw TypeError(Z(t,...et));if(X(t,e,"decrypt","unwrapKey"),eA(e,t),t.usages.includes("decrypt"))return new Uint8Array(await o.subtle.decrypt(eS(e),t,r));if(t.usages.includes("unwrapKey")){let n=await o.subtle.unwrapKey("raw",r,t,eS(e),...el);return new Uint8Array(await o.subtle.exportKey("raw",n))}throw TypeError('RSA-OAEP key "usages" must include "decrypt" or "unwrapKey" for this operation')};function eP(e){switch(e){case"A128GCM":return 128;case"A192GCM":return 192;case"A256GCM":case"A128CBC-HS256":return 256;case"A192CBC-HS384":return 384;case"A256CBC-HS512":return 512;default:throw new k(`Unsupported JWE Algorithm: ${e}`)}}let eR=e=>M(new Uint8Array(eP(e)>>3)),eO=(e,t)=>{let r=(e.match(/.{1,64}/g)||[]).join("\n");return`-----BEGIN ${t}-----
${r}
-----END ${t}-----`},eT=async(e,t,r)=>{if(!a(r))throw TypeError(Z(r,...et));if(!r.extractable)throw TypeError("CryptoKey is not extractable");if(r.type!==e)throw TypeError(`key is not a ${e} key`);return eO(b(new Uint8Array(await o.subtle.exportKey(t,r))),`${e.toUpperCase()} KEY`)},eC=e=>eT("public","spki",e),eI=e=>eT("private","pkcs8",e),ej=(e,t,r=0)=>{0===r&&(t.unshift(t.length),t.unshift(6));let n=e.indexOf(t[0],r);if(-1===n)return!1;let i=e.subarray(n,n+t.length);return i.length===t.length&&(i.every((e,r)=>e===t[r])||ej(e,t,n+1))},eD=e=>{switch(!0){case ej(e,[42,134,72,206,61,3,1,7]):return"P-256";case ej(e,[43,129,4,0,34]):return"P-384";case ej(e,[43,129,4,0,35]):return"P-521";case ej(e,[43,101,110]):return"X25519";case ej(e,[43,101,111]):return"X448";case ej(e,[43,101,112]):return"Ed25519";case ej(e,[43,101,113]):return"Ed448";default:throw new k("Invalid or unsupported EC Key Curve or OKP Key Sub Type")}},eH=async(e,t,r,n,i)=>{var a;let s,c,u=new Uint8Array(atob(r.replace(e,"")).split("").map(e=>e.charCodeAt(0))),l="spki"===t;switch(n){case"PS256":case"PS384":case"PS512":s={name:"RSA-PSS",hash:`SHA-${n.slice(-3)}`},c=l?["verify"]:["sign"];break;case"RS256":case"RS384":case"RS512":s={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${n.slice(-3)}`},c=l?["verify"]:["sign"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":s={name:"RSA-OAEP",hash:`SHA-${parseInt(n.slice(-3),10)||1}`},c=l?["encrypt","wrapKey"]:["decrypt","unwrapKey"];break;case"ES256":s={name:"ECDSA",namedCurve:"P-256"},c=l?["verify"]:["sign"];break;case"ES384":s={name:"ECDSA",namedCurve:"P-384"},c=l?["verify"]:["sign"];break;case"ES512":s={name:"ECDSA",namedCurve:"P-521"},c=l?["verify"]:["sign"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{let e=eD(u);s=e.startsWith("P-")?{name:"ECDH",namedCurve:e}:{name:e},c=l?[]:["deriveBits"];break}case"EdDSA":s={name:eD(u)},c=l?["verify"]:["sign"];break;default:throw new k('Invalid or unsupported "alg" (Algorithm) value')}return o.subtle.importKey(t,u,s,null!=(a=null==i?void 0:i.extractable)&&a,c)},eN=(e,t,r)=>eH(/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g,"pkcs8",e,t,r),eU=(e,t,r)=>eH(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g,"spki",e,t,r);function eM(e){let t=[],r=0;for(;r<e.length;){let n=eW(e.subarray(r));t.push(n),r+=n.byteLength}return t}function eW(e){let t=0,r=31&e[0];if(t++,31===r){for(r=0;e[t]>=128;)r=128*r+e[t]-128,t++;r=128*r+e[t]-128,t++}let n=0;if(e[t]<128)n=e[t],t++;else if(128===n){for(n=0;0!==e[t+n]||0!==e[t+n+1];){if(n>e.byteLength)throw TypeError("invalid indefinite form length");n++}let r=t+n+2;return{byteLength:r,contents:e.subarray(t,t+n),raw:e.subarray(0,r)}}else{let r=127&e[t];t++,n=0;for(let i=0;i<r;i++)n=256*n+e[t],t++}let i=t+n;return{byteLength:i,contents:e.subarray(t,i),raw:e.subarray(0,i)}}function eL(e){let t=eM(eM(eW(e).contents)[0].contents);return b(t[160===t[0].raw[0]?6:5].raw)}function eF(e){return eO(eL(v(e.replace(/(?:-----(?:BEGIN|END) CERTIFICATE-----|\s)/g,""))),"PUBLIC KEY")}let eB=(e,t,r)=>{let n;try{n=eF(e)}catch(e){throw TypeError("Failed to parse the X.509 certificate",{cause:e})}return eU(n,t,r)};function eK(e){let t,r;switch(e.kty){case"oct":switch(e.alg){case"HS256":case"HS384":case"HS512":t={name:"HMAC",hash:`SHA-${e.alg.slice(-3)}`},r=["sign","verify"];break;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":throw new k(`${e.alg} keys cannot be imported as CryptoKey instances`);case"A128GCM":case"A192GCM":case"A256GCM":case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":t={name:"AES-GCM"},r=["encrypt","decrypt"];break;case"A128KW":case"A192KW":case"A256KW":t={name:"AES-KW"},r=["wrapKey","unwrapKey"];break;case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":t={name:"PBKDF2"},r=["deriveBits"];break;default:throw new k('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"RSA":switch(e.alg){case"PS256":case"PS384":case"PS512":t={name:"RSA-PSS",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RS256":case"RS384":case"RS512":t={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":t={name:"RSA-OAEP",hash:`SHA-${parseInt(e.alg.slice(-3),10)||1}`},r=e.d?["decrypt","unwrapKey"]:["encrypt","wrapKey"];break;default:throw new k('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"EC":switch(e.alg){case"ES256":t={name:"ECDSA",namedCurve:"P-256"},r=e.d?["sign"]:["verify"];break;case"ES384":t={name:"ECDSA",namedCurve:"P-384"},r=e.d?["sign"]:["verify"];break;case"ES512":t={name:"ECDSA",namedCurve:"P-521"},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:"ECDH",namedCurve:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new k('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"OKP":switch(e.alg){case"EdDSA":t={name:e.crv},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new k('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;default:throw new k('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:t,keyUsages:r}}let e$=async e=>{var t,r;if(!e.alg)throw TypeError('"alg" argument is required when "jwk.alg" is not present');let{algorithm:n,keyUsages:i}=eK(e),a=[n,null!=(t=e.ext)&&t,null!=(r=e.key_ops)?r:i];if("PBKDF2"===n.name)return o.subtle.importKey("raw",_(e.k),...a);let s={...e};return delete s.alg,delete s.use,o.subtle.importKey("jwk",s,...a)};async function eJ(e,t,r){if("string"!=typeof e||0!==e.indexOf("-----BEGIN PUBLIC KEY-----"))throw TypeError('"spki" must be SPKI formatted string');return eU(e,t,r)}async function eq(e,t,r){if("string"!=typeof e||0!==e.indexOf("-----BEGIN CERTIFICATE-----"))throw TypeError('"x509" must be X.509 formatted string');return eB(e,t,r)}async function ez(e,t,r){if("string"!=typeof e||0!==e.indexOf("-----BEGIN PRIVATE KEY-----"))throw TypeError('"pkcs8" must be PKCS#8 formatted string');return eN(e,t,r)}async function eG(e,t,r){var n;if(!eu(e))throw TypeError("JWK must be an object");switch(t||(t=e.alg),e.kty){case"oct":if("string"!=typeof e.k||!e.k)throw TypeError('missing "k" (Key Value) Parameter value');if(null!=r||(r=!0!==e.ext),r)return e$({...e,alg:t,ext:null!=(n=e.ext)&&n});return _(e.k);case"RSA":if(void 0!==e.oth)throw new k('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');case"EC":case"OKP":return e$({...e,alg:t});default:throw new k('Unsupported "kty" (Key Type) Parameter value')}}let eV=(e,t)=>{if(!(t instanceof Uint8Array)){if(!ee(t))throw TypeError(Q(e,t,...et,"Uint8Array"));if("secret"!==t.type)throw TypeError(`${et.join(" or ")} instances for symmetric algorithms must be of type "secret"`)}},eX=(e,t,r)=>{if(!ee(t))throw TypeError(Q(e,t,...et));if("secret"===t.type)throw TypeError(`${et.join(" or ")} instances for asymmetric algorithms must not be of type "secret"`);if("sign"===r&&"public"===t.type)throw TypeError(`${et.join(" or ")} instances for asymmetric algorithm signing must be of type "private"`);if("decrypt"===r&&"public"===t.type)throw TypeError(`${et.join(" or ")} instances for asymmetric algorithm decryption must be of type "private"`);if(t.algorithm&&"verify"===r&&"private"===t.type)throw TypeError(`${et.join(" or ")} instances for asymmetric algorithm verifying must be of type "public"`);if(t.algorithm&&"encrypt"===r&&"private"===t.type)throw TypeError(`${et.join(" or ")} instances for asymmetric algorithm encryption must be of type "public"`)},eY=(e,t,r)=>{e.startsWith("HS")||"dir"===e||e.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(e)?eV(e,t):eX(e,t,r)};async function eZ(e,t,r,n,i){if(!(r instanceof Uint8Array))throw TypeError(Z(r,"Uint8Array"));let a=parseInt(e.slice(1,4),10),s=await o.subtle.importKey("raw",r.subarray(a>>3),"AES-CBC",!1,["encrypt"]),c=await o.subtle.importKey("raw",r.subarray(0,a>>3),{hash:`SHA-${a<<1}`,name:"HMAC"},!1,["sign"]),u=new Uint8Array(await o.subtle.encrypt({iv:n,name:"AES-CBC"},s,t)),l=d(i,n,u,h(i.length<<3));return{ciphertext:u,tag:new Uint8Array((await o.subtle.sign("HMAC",c,l)).slice(0,a>>3))}}async function eQ(e,t,r,n,i){let a;r instanceof Uint8Array?a=await o.subtle.importKey("raw",r,"AES-GCM",!1,["encrypt"]):(X(r,e,"encrypt"),a=r);let s=new Uint8Array(await o.subtle.encrypt({additionalData:i,iv:n,name:"AES-GCM",tagLength:128},a,t)),c=s.slice(-16);return{ciphertext:s.slice(0,-16),tag:c}}let e0=async(e,t,r,n,i)=>{if(!a(r)&&!(r instanceof Uint8Array))throw TypeError(Z(r,...et,"Uint8Array"));switch(F(e,n),e){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return r instanceof Uint8Array&&B(r,parseInt(e.slice(-3),10)),eZ(e,t,r,n,i);case"A128GCM":case"A192GCM":case"A256GCM":return r instanceof Uint8Array&&B(r,parseInt(e.slice(1,4),10)),eQ(e,t,r,n,i);default:throw new k("Unsupported JWE Content Encryption Algorithm")}};async function e1(e,t,r,n){let i=e.slice(0,7);n||(n=L(i));let{ciphertext:o,tag:a}=await e0(i,r,t,n,new Uint8Array(0));return{encryptedKey:o,iv:w(n),tag:w(a)}}async function e2(e,t,r,n,i){return ei(e.slice(0,7),t,r,n,i,new Uint8Array(0))}let e5=async function(e,t,r,n,i){switch(eY(e,t,"decrypt"),e){case"dir":if(void 0!==r)throw new O("Encountered unexpected JWE Encrypted Key");return t;case"ECDH-ES":if(void 0!==r)throw new O("Encountered unexpected JWE Encrypted Key");case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{let i,o;if(!eu(n.epk))throw new O('JOSE Header "epk" (Ephemeral Public Key) missing or invalid');if(!em(t))throw new k("ECDH with the provided key is not allowed or not supported by your javascript runtime");let a=await eG(n.epk,e);if(void 0!==n.apu){if("string"!=typeof n.apu)throw new O('JOSE Header "apu" (Agreement PartyUInfo) invalid');try{i=_(n.apu)}catch(e){throw new O("Failed to base64url decode the apu")}}if(void 0!==n.apv){if("string"!=typeof n.apv)throw new O('JOSE Header "apv" (Agreement PartyVInfo) invalid');try{o=_(n.apv)}catch(e){throw new O("Failed to base64url decode the apv")}}let s=await ey(a,t,"ECDH-ES"===e?n.enc:e,"ECDH-ES"===e?eP(n.enc):parseInt(e.slice(-5,-2),10),i,o);if("ECDH-ES"===e)return s;if(void 0===r)throw new O("JWE Encrypted Key missing");return eh(e.slice(-6),s,r)}case"RSA1_5":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":if(void 0===r)throw new O("JWE Encrypted Key missing");return ek(e,t,r);case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{let o;if(void 0===r)throw new O("JWE Encrypted Key missing");if("number"!=typeof n.p2c)throw new O('JOSE Header "p2c" (PBES2 Count) missing or invalid');let a=(null==i?void 0:i.maxPBES2Count)||1e4;if(n.p2c>a)throw new O('JOSE Header "p2c" (PBES2 Count) out is of acceptable bounds');if("string"!=typeof n.p2s)throw new O('JOSE Header "p2s" (PBES2 Salt) missing or invalid');try{o=_(n.p2s)}catch(e){throw new O("Failed to base64url decode the p2s")}return eE(e,t,r,n.p2c,o)}case"A128KW":case"A192KW":case"A256KW":if(void 0===r)throw new O("JWE Encrypted Key missing");return eh(e,t,r);case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":{let i,o;if(void 0===r)throw new O("JWE Encrypted Key missing");if("string"!=typeof n.iv)throw new O('JOSE Header "iv" (Initialization Vector) missing or invalid');if("string"!=typeof n.tag)throw new O('JOSE Header "tag" (Authentication Tag) missing or invalid');try{i=_(n.iv)}catch(e){throw new O("Failed to base64url decode the iv")}try{o=_(n.tag)}catch(e){throw new O("Failed to base64url decode the tag")}return e2(e,t,r,i,o)}default:throw new k('Invalid or unsupported "alg" (JWE Algorithm) header value')}},e6=function(e,t,r,n,i){let o;if(void 0!==i.crit&&void 0===n.crit)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!n||void 0===n.crit)return new Set;if(!Array.isArray(n.crit)||0===n.crit.length||n.crit.some(e=>"string"!=typeof e||0===e.length))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');for(let a of(o=void 0!==r?new Map([...Object.entries(r),...t.entries()]):t,n.crit)){if(!o.has(a))throw new k(`Extension Header Parameter "${a}" is not recognized`);if(void 0===i[a])throw new e(`Extension Header Parameter "${a}" is missing`);if(o.get(a)&&void 0===n[a])throw new e(`Extension Header Parameter "${a}" MUST be integrity protected`)}return new Set(n.crit)},e3=(e,t)=>{if(void 0!==t&&(!Array.isArray(t)||t.some(e=>"string"!=typeof e)))throw TypeError(`"${e}" option must be an array of strings`);if(t)return new Set(t)};async function e4(e,t,r){var n;let i,o,a,s,l,f,p;if(!eu(e))throw new O("Flattened JWE must be an object");if(void 0===e.protected&&void 0===e.header&&void 0===e.unprotected)throw new O("JOSE Header missing");if("string"!=typeof e.iv)throw new O("JWE Initialization Vector missing or incorrect type");if("string"!=typeof e.ciphertext)throw new O("JWE Ciphertext missing or incorrect type");if("string"!=typeof e.tag)throw new O("JWE Authentication Tag missing or incorrect type");if(void 0!==e.protected&&"string"!=typeof e.protected)throw new O("JWE Protected Header incorrect type");if(void 0!==e.encrypted_key&&"string"!=typeof e.encrypted_key)throw new O("JWE Encrypted Key incorrect type");if(void 0!==e.aad&&"string"!=typeof e.aad)throw new O("JWE AAD incorrect type");if(void 0!==e.header&&!eu(e.header))throw new O("JWE Shared Unprotected Header incorrect type");if(void 0!==e.unprotected&&!eu(e.unprotected))throw new O("JWE Per-Recipient Unprotected Header incorrect type");if(e.protected)try{let t=_(e.protected);i=JSON.parse(u.decode(t))}catch(e){throw new O("JWE Protected Header is invalid")}if(!es(i,e.header,e.unprotected))throw new O("JWE Protected, JWE Unprotected Header, and JWE Per-Recipient Unprotected Header Parameter names must be disjoint");let h={...i,...e.header,...e.unprotected};if(e6(O,new Map,null==r?void 0:r.crit,i,h),void 0!==h.zip){if(!i||!i.zip)throw new O('JWE "zip" (Compression Algorithm) Header MUST be integrity protected');if("DEF"!==h.zip)throw new k('Unsupported JWE "zip" (Compression Algorithm) Header Parameter value')}let{alg:y,enc:g}=h;if("string"!=typeof y||!y)throw new O("missing JWE Algorithm (alg) in JWE Header");if("string"!=typeof g||!g)throw new O("missing JWE Encryption Algorithm (enc) in JWE Header");let m=r&&e3("keyManagementAlgorithms",r.keyManagementAlgorithms),b=r&&e3("contentEncryptionAlgorithms",r.contentEncryptionAlgorithms);if(m&&!m.has(y))throw new x('"alg" (Algorithm) Header Parameter not allowed');if(b&&!b.has(g))throw new x('"enc" (Encryption Algorithm) Header Parameter not allowed');if(void 0!==e.encrypted_key)try{o=_(e.encrypted_key)}catch(e){throw new O("Failed to base64url decode the encrypted_key")}let w=!1;"function"==typeof t&&(t=await t(i,e),w=!0);try{a=await e5(y,t,o,h,r)}catch(e){if(e instanceof TypeError||e instanceof O||e instanceof k)throw e;a=eR(g)}try{s=_(e.iv)}catch(e){throw new O("Failed to base64url decode the iv")}try{l=_(e.tag)}catch(e){throw new O("Failed to base64url decode the tag")}let v=c.encode(null!=(n=e.protected)?n:"");f=void 0!==e.aad?d(v,c.encode("."),c.encode(e.aad)):v;try{p=_(e.ciphertext)}catch(e){throw new O("Failed to base64url decode the ciphertext")}let E=await ei(g,a,p,s,l,f);"DEF"===h.zip&&(E=await ((null==r?void 0:r.inflateRaw)||eo)(E));let S={plaintext:E};if(void 0!==e.protected&&(S.protectedHeader=i),void 0!==e.aad)try{S.additionalAuthenticatedData=_(e.aad)}catch(e){throw new O("Failed to base64url decode the aad")}return(void 0!==e.unprotected&&(S.sharedUnprotectedHeader=e.unprotected),void 0!==e.header&&(S.unprotectedHeader=e.header),w)?{...S,key:t}:S}async function e8(e,t,r){if(e instanceof Uint8Array&&(e=u.decode(e)),"string"!=typeof e)throw new O("Compact JWE must be a string or Uint8Array");let{0:n,1:i,2:o,3:a,4:s,length:c}=e.split(".");if(5!==c)throw new O("Invalid Compact JWE");let l=await e4({ciphertext:a,iv:o||void 0,protected:n||void 0,tag:s||void 0,encrypted_key:i||void 0},t,r),d={plaintext:l.plaintext,protectedHeader:l.protectedHeader};return"function"==typeof t?{...d,key:l.key}:d}async function e9(e,t,r){if(!eu(e))throw new O("General JWE must be an object");if(!Array.isArray(e.recipients)||!e.recipients.every(eu))throw new O("JWE Recipients missing or incorrect type");if(!e.recipients.length)throw new O("JWE Recipients has no members");for(let n of e.recipients)try{return await e4({aad:e.aad,ciphertext:e.ciphertext,encrypted_key:n.encrypted_key,header:n.header,iv:e.iv,protected:e.protected,tag:e.tag,unprotected:e.unprotected},t,r)}catch(e){}throw new P}let e7=async e=>{if(e instanceof Uint8Array)return{kty:"oct",k:w(e)};if(!a(e))throw TypeError(Z(e,...et,"Uint8Array"));if(!e.extractable)throw TypeError("non-extractable CryptoKey cannot be exported as a JWK");let{ext:t,key_ops:r,alg:n,use:i,...s}=await o.subtle.exportKey("jwk",e);return s};async function te(e){return eC(e)}async function tt(e){return eI(e)}async function tr(e){return e7(e)}let tn=async function(e,t,r,n,i={}){let o,a,s;switch(eY(e,r,"encrypt"),e){case"dir":s=r;break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{if(!em(r))throw new k("ECDH with the provided key is not allowed or not supported by your javascript runtime");let{apu:c,apv:u}=i,{epk:l}=i;l||(l=(await eg(r)).privateKey);let{x:d,y:f,crv:p,kty:h}=await tr(l),y=await ey(r,l,"ECDH-ES"===e?t:e,"ECDH-ES"===e?eP(t):parseInt(e.slice(-5,-2),10),c,u);if(a={epk:{x:d,crv:p,kty:h}},"EC"===h&&(a.epk.y=f),c&&(a.apu=w(c)),u&&(a.apv=w(u)),"ECDH-ES"===e){s=y;break}s=n||eR(t);let g=e.slice(-6);o=await ep(g,y,s);break}case"RSA1_5":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":s=n||eR(t),o=await ex(e,r,s);break;case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{s=n||eR(t);let{p2c:c,p2s:u}=i;({encryptedKey:o,...a}=await e_(e,r,s,c,u));break}case"A128KW":case"A192KW":case"A256KW":s=n||eR(t),o=await ep(e,r,s);break;case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":{s=n||eR(t);let{iv:c}=i;({encryptedKey:o,...a}=await e1(e,r,s,c));break}default:throw new k('Invalid or unsupported "alg" (JWE Algorithm) header value')}return{cek:s,encryptedKey:o,parameters:a}},ti=Symbol();class to{constructor(e){if(!(e instanceof Uint8Array))throw TypeError("plaintext must be an instance of Uint8Array");this._plaintext=e}setKeyManagementParameters(e){if(this._keyManagementParameters)throw TypeError("setKeyManagementParameters can only be called once");return this._keyManagementParameters=e,this}setProtectedHeader(e){if(this._protectedHeader)throw TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setSharedUnprotectedHeader(e){if(this._sharedUnprotectedHeader)throw TypeError("setSharedUnprotectedHeader can only be called once");return this._sharedUnprotectedHeader=e,this}setUnprotectedHeader(e){if(this._unprotectedHeader)throw TypeError("setUnprotectedHeader can only be called once");return this._unprotectedHeader=e,this}setAdditionalAuthenticatedData(e){return this._aad=e,this}setContentEncryptionKey(e){if(this._cek)throw TypeError("setContentEncryptionKey can only be called once");return this._cek=e,this}setInitializationVector(e){if(this._iv)throw TypeError("setInitializationVector can only be called once");return this._iv=e,this}async encrypt(e,t){let r,n,i,o,a,s,l;if(!this._protectedHeader&&!this._unprotectedHeader&&!this._sharedUnprotectedHeader)throw new O("either setProtectedHeader, setUnprotectedHeader, or sharedUnprotectedHeader must be called before #encrypt()");if(!es(this._protectedHeader,this._unprotectedHeader,this._sharedUnprotectedHeader))throw new O("JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint");let f={...this._protectedHeader,...this._unprotectedHeader,...this._sharedUnprotectedHeader};if(e6(O,new Map,null==t?void 0:t.crit,this._protectedHeader,f),void 0!==f.zip){if(!this._protectedHeader||!this._protectedHeader.zip)throw new O('JWE "zip" (Compression Algorithm) Header MUST be integrity protected');if("DEF"!==f.zip)throw new k('Unsupported JWE "zip" (Compression Algorithm) Header Parameter value')}let{alg:p,enc:h}=f;if("string"!=typeof p||!p)throw new O('JWE "alg" (Algorithm) Header Parameter missing or invalid');if("string"!=typeof h||!h)throw new O('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid');if("dir"===p){if(this._cek)throw TypeError("setContentEncryptionKey cannot be called when using Direct Encryption")}else if("ECDH-ES"===p&&this._cek)throw TypeError("setContentEncryptionKey cannot be called when using Direct Key Agreement");{let i;({cek:n,encryptedKey:r,parameters:i}=await tn(p,h,e,this._cek,this._keyManagementParameters)),i&&(t&&ti in t?this._unprotectedHeader?this._unprotectedHeader={...this._unprotectedHeader,...i}:this.setUnprotectedHeader(i):this._protectedHeader?this._protectedHeader={...this._protectedHeader,...i}:this.setProtectedHeader(i))}if(this._iv||(this._iv=L(h)),o=this._protectedHeader?c.encode(w(JSON.stringify(this._protectedHeader))):c.encode(""),this._aad?(a=w(this._aad),i=d(o,c.encode("."),c.encode(a))):i=o,"DEF"===f.zip){let e=await ((null==t?void 0:t.deflateRaw)||ea)(this._plaintext);({ciphertext:s,tag:l}=await e0(h,e,n,this._iv,i))}else({ciphertext:s,tag:l}=await e0(h,this._plaintext,n,this._iv,i));let y={ciphertext:w(s),iv:w(this._iv),tag:w(l)};return r&&(y.encrypted_key=w(r)),a&&(y.aad=a),this._protectedHeader&&(y.protected=u.decode(o)),this._sharedUnprotectedHeader&&(y.unprotected=this._sharedUnprotectedHeader),this._unprotectedHeader&&(y.header=this._unprotectedHeader),y}}class ta{constructor(e,t,r){this.parent=e,this.key=t,this.options=r}setUnprotectedHeader(e){if(this.unprotectedHeader)throw TypeError("setUnprotectedHeader can only be called once");return this.unprotectedHeader=e,this}addRecipient(...e){return this.parent.addRecipient(...e)}encrypt(...e){return this.parent.encrypt(...e)}done(){return this.parent}}class ts{constructor(e){this._recipients=[],this._plaintext=e}addRecipient(e,t){let r=new ta(this,e,{crit:null==t?void 0:t.crit});return this._recipients.push(r),r}setProtectedHeader(e){if(this._protectedHeader)throw TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setSharedUnprotectedHeader(e){if(this._unprotectedHeader)throw TypeError("setSharedUnprotectedHeader can only be called once");return this._unprotectedHeader=e,this}setAdditionalAuthenticatedData(e){return this._aad=e,this}async encrypt(e){var t,r,n;let i;if(!this._recipients.length)throw new O("at least one recipient must be added");if(e={deflateRaw:null==e?void 0:e.deflateRaw},1===this._recipients.length){let[t]=this._recipients,r=await new to(this._plaintext).setAdditionalAuthenticatedData(this._aad).setProtectedHeader(this._protectedHeader).setSharedUnprotectedHeader(this._unprotectedHeader).setUnprotectedHeader(t.unprotectedHeader).encrypt(t.key,{...t.options,...e}),n={ciphertext:r.ciphertext,iv:r.iv,recipients:[{}],tag:r.tag};return r.aad&&(n.aad=r.aad),r.protected&&(n.protected=r.protected),r.unprotected&&(n.unprotected=r.unprotected),r.encrypted_key&&(n.recipients[0].encrypted_key=r.encrypted_key),r.header&&(n.recipients[0].header=r.header),n}for(let e=0;e<this._recipients.length;e++){let t=this._recipients[e];if(!es(this._protectedHeader,this._unprotectedHeader,t.unprotectedHeader))throw new O("JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint");let r={...this._protectedHeader,...this._unprotectedHeader,...t.unprotectedHeader},{alg:n}=r;if("string"!=typeof n||!n)throw new O('JWE "alg" (Algorithm) Header Parameter missing or invalid');if("dir"===n||"ECDH-ES"===n)throw new O('"dir" and "ECDH-ES" alg may only be used with a single recipient');if("string"!=typeof r.enc||!r.enc)throw new O('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid');if(i){if(i!==r.enc)throw new O('JWE "enc" (Encryption Algorithm) Header Parameter must be the same for all recipients')}else i=r.enc;if(e6(O,new Map,t.options.crit,this._protectedHeader,r),void 0!==r.zip&&(!this._protectedHeader||!this._protectedHeader.zip))throw new O('JWE "zip" (Compression Algorithm) Header MUST be integrity protected')}let o=eR(i),a={ciphertext:"",iv:"",recipients:[],tag:""};for(let s=0;s<this._recipients.length;s++){let c=this._recipients[s],u={};a.recipients.push(u);let l=({...this._protectedHeader,...this._unprotectedHeader,...c.unprotectedHeader}).alg.startsWith("PBES2")?2048+s:void 0;if(0===s){let t=await new to(this._plaintext).setAdditionalAuthenticatedData(this._aad).setContentEncryptionKey(o).setProtectedHeader(this._protectedHeader).setSharedUnprotectedHeader(this._unprotectedHeader).setUnprotectedHeader(c.unprotectedHeader).setKeyManagementParameters({p2c:l}).encrypt(c.key,{...c.options,...e,[ti]:!0});a.ciphertext=t.ciphertext,a.iv=t.iv,a.tag=t.tag,t.aad&&(a.aad=t.aad),t.protected&&(a.protected=t.protected),t.unprotected&&(a.unprotected=t.unprotected),u.encrypted_key=t.encrypted_key,t.header&&(u.header=t.header);continue}let{encryptedKey:d,parameters:f}=await tn((null==(t=c.unprotectedHeader)?void 0:t.alg)||(null==(r=this._protectedHeader)?void 0:r.alg)||(null==(n=this._unprotectedHeader)?void 0:n.alg),i,c.key,o,{p2c:l});u.encrypted_key=w(d),(c.unprotectedHeader||f)&&(u.header={...c.unprotectedHeader,...f})}return a}}function tc(e,t){let r=`SHA-${e.slice(-3)}`;switch(e){case"HS256":case"HS384":case"HS512":return{hash:r,name:"HMAC"};case"PS256":case"PS384":case"PS512":return{hash:r,name:"RSA-PSS",saltLength:e.slice(-3)>>3};case"RS256":case"RS384":case"RS512":return{hash:r,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:r,name:"ECDSA",namedCurve:t.namedCurve};case"EdDSA":return{name:t.name};default:throw new k(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}function tu(e,t,r){if(a(t))return V(t,e,r),t;if(t instanceof Uint8Array){if(!e.startsWith("HS"))throw TypeError(Z(t,...et));return o.subtle.importKey("raw",t,{hash:`SHA-${e.slice(-3)}`,name:"HMAC"},!1,[r])}throw TypeError(Z(t,...et,"Uint8Array"))}let tl=async(e,t,r,n)=>{let i=await tu(e,t,"verify");eA(e,i);let a=tc(e,i.algorithm);try{return await o.subtle.verify(a,i,r,n)}catch(e){return!1}};async function td(e,t,r){var n;let i,o;if(!eu(e))throw new T("Flattened JWS must be an object");if(void 0===e.protected&&void 0===e.header)throw new T('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==e.protected&&"string"!=typeof e.protected)throw new T("JWS Protected Header incorrect type");if(void 0===e.payload)throw new T("JWS Payload missing");if("string"!=typeof e.signature)throw new T("JWS Signature missing or incorrect type");if(void 0!==e.header&&!eu(e.header))throw new T("JWS Unprotected Header incorrect type");let a={};if(e.protected)try{let t=_(e.protected);a=JSON.parse(u.decode(t))}catch(e){throw new T("JWS Protected Header is invalid")}if(!es(a,e.header))throw new T("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let s={...a,...e.header},l=e6(T,new Map([["b64",!0]]),null==r?void 0:r.crit,a,s),f=!0;if(l.has("b64")&&"boolean"!=typeof(f=a.b64))throw new T('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:p}=s;if("string"!=typeof p||!p)throw new T('JWS "alg" (Algorithm) Header Parameter missing or invalid');let h=r&&e3("algorithms",r.algorithms);if(h&&!h.has(p))throw new x('"alg" (Algorithm) Header Parameter not allowed');if(f){if("string"!=typeof e.payload)throw new T("JWS Payload must be a string")}else if("string"!=typeof e.payload&&!(e.payload instanceof Uint8Array))throw new T("JWS Payload must be a string or an Uint8Array instance");let y=!1;"function"==typeof t&&(t=await t(a,e),y=!0),eY(p,t,"verify");let g=d(c.encode(null!=(n=e.protected)?n:""),c.encode("."),"string"==typeof e.payload?c.encode(e.payload):e.payload);try{i=_(e.signature)}catch(e){throw new T("Failed to base64url decode the signature")}if(!await tl(p,t,i,g))throw new U;if(f)try{o=_(e.payload)}catch(e){throw new T("Failed to base64url decode the payload")}else o="string"==typeof e.payload?c.encode(e.payload):e.payload;let m={payload:o};return(void 0!==e.protected&&(m.protectedHeader=a),void 0!==e.header&&(m.unprotectedHeader=e.header),y)?{...m,key:t}:m}async function tf(e,t,r){if(e instanceof Uint8Array&&(e=u.decode(e)),"string"!=typeof e)throw new T("Compact JWS must be a string or Uint8Array");let{0:n,1:i,2:o,length:a}=e.split(".");if(3!==a)throw new T("Invalid Compact JWS");let s=await td({payload:i,protected:n,signature:o},t,r),c={payload:s.payload,protectedHeader:s.protectedHeader};return"function"==typeof t?{...c,key:s.key}:c}async function tp(e,t,r){if(!eu(e))throw new T("General JWS must be an object");if(!Array.isArray(e.signatures)||!e.signatures.every(eu))throw new T("JWS Signatures missing or incorrect type");for(let n of e.signatures)try{return await td({header:n.header,payload:e.payload,protected:n.protected,signature:n.signature},t,r)}catch(e){}throw new U}let th=e=>Math.floor(e.getTime()/1e3),ty=60,tg=3600,tm=86400,tb=604800,tw=0x1e187e0,tv=/^(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)$/i,t_=e=>{let t=tv.exec(e);if(!t)throw TypeError("Invalid time period format");let r=parseFloat(t[1]);switch(t[2].toLowerCase()){case"sec":case"secs":case"second":case"seconds":case"s":return Math.round(r);case"minute":case"minutes":case"min":case"mins":case"m":return Math.round(r*ty);case"hour":case"hours":case"hr":case"hrs":case"h":return Math.round(r*tg);case"day":case"days":case"d":return Math.round(r*tm);case"week":case"weeks":case"w":return Math.round(r*tb);default:return Math.round(r*tw)}},tE=e=>e.toLowerCase().replace(/^application\//,""),tS=(e,t)=>"string"==typeof e?t.includes(e):!!Array.isArray(e)&&t.some(Set.prototype.has.bind(new Set(e))),tA=(e,t,r={})=>{let n,i,{typ:o}=r;if(o&&("string"!=typeof e.typ||tE(e.typ)!==tE(o)))throw new S('unexpected "typ" JWT header value',"typ","check_failed");try{n=JSON.parse(u.decode(t))}catch(e){}if(!eu(n))throw new C("JWT Claims Set must be a top-level JSON object");let{requiredClaims:a=[],issuer:s,subject:c,audience:l,maxTokenAge:d}=r;for(let e of(void 0!==d&&a.push("iat"),void 0!==l&&a.push("aud"),void 0!==c&&a.push("sub"),void 0!==s&&a.push("iss"),new Set(a.reverse())))if(!(e in n))throw new S(`missing required "${e}" claim`,e,"missing");if(s&&!(Array.isArray(s)?s:[s]).includes(n.iss))throw new S('unexpected "iss" claim value',"iss","check_failed");if(c&&n.sub!==c)throw new S('unexpected "sub" claim value',"sub","check_failed");if(l&&!tS(n.aud,"string"==typeof l?[l]:l))throw new S('unexpected "aud" claim value',"aud","check_failed");switch(typeof r.clockTolerance){case"string":i=t_(r.clockTolerance);break;case"number":i=r.clockTolerance;break;case"undefined":i=0;break;default:throw TypeError("Invalid clockTolerance option type")}let{currentDate:f}=r,p=th(f||new Date);if((void 0!==n.iat||d)&&"number"!=typeof n.iat)throw new S('"iat" claim must be a number',"iat","invalid");if(void 0!==n.nbf){if("number"!=typeof n.nbf)throw new S('"nbf" claim must be a number',"nbf","invalid");if(n.nbf>p+i)throw new S('"nbf" claim timestamp check failed',"nbf","check_failed")}if(void 0!==n.exp){if("number"!=typeof n.exp)throw new S('"exp" claim must be a number',"exp","invalid");if(n.exp<=p-i)throw new A('"exp" claim timestamp check failed',"exp","check_failed")}if(d){let e=p-n.iat;if(e-i>("number"==typeof d?d:t_(d)))throw new A('"iat" claim timestamp check failed (too far in the past)',"iat","check_failed");if(e<0-i)throw new S('"iat" claim timestamp check failed (it should be in the past)',"iat","check_failed")}return n};async function tx(e,t,r){var n;let i=await tf(e,t,r);if((null==(n=i.protectedHeader.crit)?void 0:n.includes("b64"))&&!1===i.protectedHeader.b64)throw new C("JWTs MUST NOT use unencoded payload");let o={payload:tA(i.protectedHeader,i.payload,r),protectedHeader:i.protectedHeader};return"function"==typeof t?{...o,key:i.key}:o}async function tk(e,t,r){let n=await e8(e,t,r),i=tA(n.protectedHeader,n.plaintext,r),{protectedHeader:o}=n;if(void 0!==o.iss&&o.iss!==i.iss)throw new S('replicated "iss" claim header parameter mismatch',"iss","mismatch");if(void 0!==o.sub&&o.sub!==i.sub)throw new S('replicated "sub" claim header parameter mismatch',"sub","mismatch");if(void 0!==o.aud&&JSON.stringify(o.aud)!==JSON.stringify(i.aud))throw new S('replicated "aud" claim header parameter mismatch',"aud","mismatch");let a={payload:i,protectedHeader:o};return"function"==typeof t?{...a,key:n.key}:a}class tP{constructor(e){this._flattened=new to(e)}setContentEncryptionKey(e){return this._flattened.setContentEncryptionKey(e),this}setInitializationVector(e){return this._flattened.setInitializationVector(e),this}setProtectedHeader(e){return this._flattened.setProtectedHeader(e),this}setKeyManagementParameters(e){return this._flattened.setKeyManagementParameters(e),this}async encrypt(e,t){let r=await this._flattened.encrypt(e,t);return[r.protected,r.encrypted_key,r.iv,r.ciphertext,r.tag].join(".")}}let tR=async(e,t,r)=>{let n=await tu(e,t,"sign");return eA(e,n),new Uint8Array(await o.subtle.sign(tc(e,n.algorithm),n,r))};class tO{constructor(e){if(!(e instanceof Uint8Array))throw TypeError("payload must be an instance of Uint8Array");this._payload=e}setProtectedHeader(e){if(this._protectedHeader)throw TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setUnprotectedHeader(e){if(this._unprotectedHeader)throw TypeError("setUnprotectedHeader can only be called once");return this._unprotectedHeader=e,this}async sign(e,t){let r;if(!this._protectedHeader&&!this._unprotectedHeader)throw new T("either setProtectedHeader or setUnprotectedHeader must be called before #sign()");if(!es(this._protectedHeader,this._unprotectedHeader))throw new T("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let n={...this._protectedHeader,...this._unprotectedHeader},i=e6(T,new Map([["b64",!0]]),null==t?void 0:t.crit,this._protectedHeader,n),o=!0;if(i.has("b64")&&"boolean"!=typeof(o=this._protectedHeader.b64))throw new T('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:a}=n;if("string"!=typeof a||!a)throw new T('JWS "alg" (Algorithm) Header Parameter missing or invalid');eY(a,e,"sign");let s=this._payload;o&&(s=c.encode(w(s)));let l=d(r=this._protectedHeader?c.encode(w(JSON.stringify(this._protectedHeader))):c.encode(""),c.encode("."),s),f={signature:w(await tR(a,e,l)),payload:""};return o&&(f.payload=u.decode(s)),this._unprotectedHeader&&(f.header=this._unprotectedHeader),this._protectedHeader&&(f.protected=u.decode(r)),f}}class tT{constructor(e){this._flattened=new tO(e)}setProtectedHeader(e){return this._flattened.setProtectedHeader(e),this}async sign(e,t){let r=await this._flattened.sign(e,t);if(void 0===r.payload)throw TypeError("use the flattened module for creating JWS with b64: false");return`${r.protected}.${r.payload}.${r.signature}`}}class tC{constructor(e,t,r){this.parent=e,this.key=t,this.options=r}setProtectedHeader(e){if(this.protectedHeader)throw TypeError("setProtectedHeader can only be called once");return this.protectedHeader=e,this}setUnprotectedHeader(e){if(this.unprotectedHeader)throw TypeError("setUnprotectedHeader can only be called once");return this.unprotectedHeader=e,this}addSignature(...e){return this.parent.addSignature(...e)}sign(...e){return this.parent.sign(...e)}done(){return this.parent}}class tI{constructor(e){this._signatures=[],this._payload=e}addSignature(e,t){let r=new tC(this,e,t);return this._signatures.push(r),r}async sign(){if(!this._signatures.length)throw new T("at least one signature must be added");let e={signatures:[],payload:""};for(let t=0;t<this._signatures.length;t++){let r=this._signatures[t],n=new tO(this._payload);n.setProtectedHeader(r.protectedHeader),n.setUnprotectedHeader(r.unprotectedHeader);let{payload:i,...o}=await n.sign(r.key,r.options);if(0===t)e.payload=i;else if(e.payload!==i)throw new T("inconsistent use of JWS Unencoded Payload (RFC7797)");e.signatures.push(o)}return e}}class tj{constructor(e){if(!eu(e))throw TypeError("JWT Claims Set MUST be an object");this._payload=e}setIssuer(e){return this._payload={...this._payload,iss:e},this}setSubject(e){return this._payload={...this._payload,sub:e},this}setAudience(e){return this._payload={...this._payload,aud:e},this}setJti(e){return this._payload={...this._payload,jti:e},this}setNotBefore(e){return"number"==typeof e?this._payload={...this._payload,nbf:e}:this._payload={...this._payload,nbf:th(new Date)+t_(e)},this}setExpirationTime(e){return"number"==typeof e?this._payload={...this._payload,exp:e}:this._payload={...this._payload,exp:th(new Date)+t_(e)},this}setIssuedAt(e){return void 0===e?this._payload={...this._payload,iat:th(new Date)}:this._payload={...this._payload,iat:e},this}}class tD extends tj{setProtectedHeader(e){return this._protectedHeader=e,this}async sign(e,t){var r;let n=new tT(c.encode(JSON.stringify(this._payload)));if(n.setProtectedHeader(this._protectedHeader),Array.isArray(null==(r=this._protectedHeader)?void 0:r.crit)&&this._protectedHeader.crit.includes("b64")&&!1===this._protectedHeader.b64)throw new C("JWTs MUST NOT use unencoded payload");return n.sign(e,t)}}class tH extends tj{setProtectedHeader(e){if(this._protectedHeader)throw TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setKeyManagementParameters(e){if(this._keyManagementParameters)throw TypeError("setKeyManagementParameters can only be called once");return this._keyManagementParameters=e,this}setContentEncryptionKey(e){if(this._cek)throw TypeError("setContentEncryptionKey can only be called once");return this._cek=e,this}setInitializationVector(e){if(this._iv)throw TypeError("setInitializationVector can only be called once");return this._iv=e,this}replicateIssuerAsHeader(){return this._replicateIssuerAsHeader=!0,this}replicateSubjectAsHeader(){return this._replicateSubjectAsHeader=!0,this}replicateAudienceAsHeader(){return this._replicateAudienceAsHeader=!0,this}async encrypt(e,t){let r=new tP(c.encode(JSON.stringify(this._payload)));return this._replicateIssuerAsHeader&&(this._protectedHeader={...this._protectedHeader,iss:this._payload.iss}),this._replicateSubjectAsHeader&&(this._protectedHeader={...this._protectedHeader,sub:this._payload.sub}),this._replicateAudienceAsHeader&&(this._protectedHeader={...this._protectedHeader,aud:this._payload.aud}),r.setProtectedHeader(this._protectedHeader),this._iv&&r.setInitializationVector(this._iv),this._cek&&r.setContentEncryptionKey(this._cek),this._keyManagementParameters&&r.setKeyManagementParameters(this._keyManagementParameters),r.encrypt(e,t)}}let tN=(e,t)=>{if("string"!=typeof e||!e)throw new I(`${t} missing or invalid`)};async function tU(e,t){let r;if(!eu(e))throw TypeError("JWK must be an object");if(null!=t||(t="sha256"),"sha256"!==t&&"sha384"!==t&&"sha512"!==t)throw TypeError('digestAlgorithm must one of "sha256", "sha384", or "sha512"');switch(e.kty){case"EC":tN(e.crv,'"crv" (Curve) Parameter'),tN(e.x,'"x" (X Coordinate) Parameter'),tN(e.y,'"y" (Y Coordinate) Parameter'),r={crv:e.crv,kty:e.kty,x:e.x,y:e.y};break;case"OKP":tN(e.crv,'"crv" (Subtype of Key Pair) Parameter'),tN(e.x,'"x" (Public Key) Parameter'),r={crv:e.crv,kty:e.kty,x:e.x};break;case"RSA":tN(e.e,'"e" (Exponent) Parameter'),tN(e.n,'"n" (Modulus) Parameter'),r={e:e.e,kty:e.kty,n:e.n};break;case"oct":tN(e.k,'"k" (Key Value) Parameter'),r={k:e.k,kty:e.kty};break;default:throw new k('"kty" (Key Type) Parameter missing or unsupported')}let n=c.encode(JSON.stringify(r));return w(await s(t,n))}async function tM(e,t){null!=t||(t="sha256");let r=await tU(e,t);return`urn:ietf:params:oauth:jwk-thumbprint:sha-${t.slice(-3)}:${r}`}async function tW(e,t){let r={...e,...null==t?void 0:t.header};if(!eu(r.jwk))throw new T('"jwk" (JSON Web Key) Header Parameter must be a JSON object');let n=await eG({...r.jwk,ext:!0},r.alg,!0);if(n instanceof Uint8Array||"public"!==n.type)throw new T('"jwk" (JSON Web Key) Header Parameter must be a public key');return n}function tL(e){switch("string"==typeof e&&e.slice(0,2)){case"RS":case"PS":return"RSA";case"ES":return"EC";case"Ed":return"OKP";default:throw new k('Unsupported "alg" value for a JSON Web Key Set')}}function tF(e){return e&&"object"==typeof e&&Array.isArray(e.keys)&&e.keys.every(tB)}function tB(e){return eu(e)}function tK(e){return"function"==typeof structuredClone?structuredClone(e):JSON.parse(JSON.stringify(e))}class t${constructor(e){if(this._cached=new WeakMap,!tF(e))throw new j("JSON Web Key Set malformed");this._jwks=tK(e)}async getKey(e,t){let{alg:r,kid:n}={...e,...null==t?void 0:t.header},i=tL(r),o=this._jwks.keys.filter(e=>{let t=i===e.kty;if(t&&"string"==typeof n&&(t=n===e.kid),t&&"string"==typeof e.alg&&(t=r===e.alg),t&&"string"==typeof e.use&&(t="sig"===e.use),t&&Array.isArray(e.key_ops)&&(t=e.key_ops.includes("verify")),t&&"EdDSA"===r&&(t="Ed25519"===e.crv||"Ed448"===e.crv),t)switch(r){case"ES256":t="P-256"===e.crv;break;case"ES256K":t="secp256k1"===e.crv;break;case"ES384":t="P-384"===e.crv;break;case"ES512":t="P-521"===e.crv}return t}),{0:a,length:s}=o;if(0===s)throw new D;if(1!==s){let e=new H,{_cached:t}=this;throw e[Symbol.asyncIterator]=async function*(){for(let e of o)try{yield await tJ(t,e,r)}catch(e){continue}},e}return tJ(this._cached,a,r)}}async function tJ(e,t,r){let n=e.get(t)||e.set(t,{}).get(t);if(void 0===n[r]){let e=await eG({...t,ext:!0},r);if(e instanceof Uint8Array||"public"!==e.type)throw new j("JSON Web Key Set members must be public keys");n[r]=e}return n[r]}function tq(e){let t=new t$(e);return async function(e,r){return t.getKey(e,r)}}let tz=async(e,t,r)=>{let n,i,o=!1;"function"==typeof AbortController&&(n=new AbortController,i=setTimeout(()=>{o=!0,n.abort()},t));let a=await fetch(e.href,{signal:n?n.signal:void 0,redirect:"manual",headers:r.headers}).catch(e=>{if(o)throw new N;throw e});if(void 0!==i&&clearTimeout(i),200!==a.status)throw new E("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await a.json()}catch(e){throw new E("Failed to parse the JSON Web Key Set HTTP response as JSON")}};function tG(){return"undefined"!=typeof WebSocketPair||"undefined"!=typeof navigator&&"Cloudflare-Workers"===navigator.userAgent||"undefined"!=typeof EdgeRuntime&&"vercel"===EdgeRuntime}class tV extends t${constructor(e,t){if(super({keys:[]}),this._jwks=void 0,!(e instanceof URL))throw TypeError("url must be an instance of URL");this._url=new URL(e.href),this._options={agent:null==t?void 0:t.agent,headers:null==t?void 0:t.headers},this._timeoutDuration="number"==typeof(null==t?void 0:t.timeoutDuration)?null==t?void 0:t.timeoutDuration:5e3,this._cooldownDuration="number"==typeof(null==t?void 0:t.cooldownDuration)?null==t?void 0:t.cooldownDuration:3e4,this._cacheMaxAge="number"==typeof(null==t?void 0:t.cacheMaxAge)?null==t?void 0:t.cacheMaxAge:6e5}coolingDown(){return"number"==typeof this._jwksTimestamp&&Date.now()<this._jwksTimestamp+this._cooldownDuration}fresh(){return"number"==typeof this._jwksTimestamp&&Date.now()<this._jwksTimestamp+this._cacheMaxAge}async getKey(e,t){this._jwks&&this.fresh()||await this.reload();try{return await super.getKey(e,t)}catch(r){if(r instanceof D&&!1===this.coolingDown())return await this.reload(),super.getKey(e,t);throw r}}async reload(){this._pendingFetch&&tG()&&(this._pendingFetch=void 0),this._pendingFetch||(this._pendingFetch=tz(this._url,this._timeoutDuration,this._options).then(e=>{if(!tF(e))throw new j("JSON Web Key Set malformed");this._jwks={keys:e.keys},this._jwksTimestamp=Date.now(),this._pendingFetch=void 0}).catch(e=>{throw this._pendingFetch=void 0,e})),await this._pendingFetch}}function tX(e,t){let r=new tV(e,t);return async function(e,t){return r.getKey(e,t)}}class tY extends tj{encode(){let e=w(JSON.stringify({alg:"none"})),t=w(JSON.stringify(this._payload));return`${e}.${t}.`}static decode(e,t){let r;if("string"!=typeof e)throw new C("Unsecured JWT must be a string");let{0:n,1:i,2:o,length:a}=e.split(".");if(3!==a||""!==o)throw new C("Invalid Unsecured JWT");try{if(r=JSON.parse(u.decode(_(n))),"none"!==r.alg)throw Error()}catch(e){throw new C("Invalid Unsecured JWT")}return{payload:tA(r,_(i),t),header:r}}}let tZ=w,tQ=_;function t0(e){let t;if("string"==typeof e){let r=e.split(".");(3===r.length||5===r.length)&&([t]=r)}else if("object"==typeof e&&e)if("protected"in e)t=e.protected;else throw TypeError("Token does not contain a Protected Header");try{if("string"!=typeof t||!t)throw Error();let e=JSON.parse(u.decode(tQ(t)));if(!eu(e))throw Error();return e}catch(e){throw TypeError("Invalid Token or Protected Header formatting")}}function t1(e){let t,r;if("string"!=typeof e)throw new C("JWTs must use Compact JWS serialization, JWT must be a string");let{1:n,length:i}=e.split(".");if(5===i)throw new C("Only JWTs using Compact JWS serialization can be decoded");if(3!==i)throw new C("Invalid JWT");if(!n)throw new C("JWTs must contain a payload");try{t=tQ(n)}catch(e){throw new C("Failed to base64url decode the payload")}try{r=JSON.parse(u.decode(t))}catch(e){throw new C("Failed to parse the decoded payload as JSON")}if(!eu(r))throw new C("Invalid JWT Claims Set");return r}async function t2(e,t){var r;let n,i,a;switch(e){case"HS256":case"HS384":case"HS512":n=parseInt(e.slice(-3),10),i={name:"HMAC",hash:`SHA-${n}`,length:n},a=["sign","verify"];break;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return M(new Uint8Array((n=parseInt(e.slice(-3),10))>>3));case"A128KW":case"A192KW":case"A256KW":i={name:"AES-KW",length:n=parseInt(e.slice(1,4),10)},a=["wrapKey","unwrapKey"];break;case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":case"A128GCM":case"A192GCM":case"A256GCM":i={name:"AES-GCM",length:n=parseInt(e.slice(1,4),10)},a=["encrypt","decrypt"];break;default:throw new k('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}return o.subtle.generateKey(i,null!=(r=null==t?void 0:t.extractable)&&r,a)}function t5(e){var t;let r=null!=(t=null==e?void 0:e.modulusLength)?t:2048;if("number"!=typeof r||r<2048)throw new k("Invalid or unsupported modulusLength option provided, 2048 bits or larger keys must be used");return r}async function t6(e,t){var r,n,i;let a,s;switch(e){case"PS256":case"PS384":case"PS512":a={name:"RSA-PSS",hash:`SHA-${e.slice(-3)}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:t5(t)},s=["sign","verify"];break;case"RS256":case"RS384":case"RS512":a={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.slice(-3)}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:t5(t)},s=["sign","verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":a={name:"RSA-OAEP",hash:`SHA-${parseInt(e.slice(-3),10)||1}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:t5(t)},s=["decrypt","unwrapKey","encrypt","wrapKey"];break;case"ES256":a={name:"ECDSA",namedCurve:"P-256"},s=["sign","verify"];break;case"ES384":a={name:"ECDSA",namedCurve:"P-384"},s=["sign","verify"];break;case"ES512":a={name:"ECDSA",namedCurve:"P-521"},s=["sign","verify"];break;case"EdDSA":s=["sign","verify"];let c=null!=(r=null==t?void 0:t.crv)?r:"Ed25519";switch(c){case"Ed25519":case"Ed448":a={name:c};break;default:throw new k("Invalid or unsupported crv option provided")}break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{s=["deriveKey","deriveBits"];let e=null!=(n=null==t?void 0:t.crv)?n:"P-256";switch(e){case"P-256":case"P-384":case"P-521":a={name:"ECDH",namedCurve:e};break;case"X25519":case"X448":a={name:e};break;default:throw new k("Invalid or unsupported crv option provided, supported values are P-256, P-384, P-521, X25519, and X448")}break}default:throw new k('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}return o.subtle.generateKey(a,null!=(i=null==t?void 0:t.extractable)&&i,s)}async function t3(e,t){return t6(e,t)}async function t4(e,t){return t2(e,t)}let t8="WebCryptoAPI"},43225:function(e,t,r){e=r.nmd(e);var n,i,o,a=r(65364);!function(r,a){i=[],void 0===(o="function"==typeof(n=a)?n.apply(t,i):n)||(e.exports=o)}(0,function(){"use strict";var t={},n=null;function i(t){if(e&&e.exports)try{return r(63426).randomBytes(t)}catch(e){}try{var i;return(self.crypto||self.msCrypto).getRandomValues(i=new Uint32Array(t)),Array.prototype.slice.call(i)}catch(e){}if(!n)throw Error("Neither WebCryptoAPI nor a crypto module is available. Use bcrypt.setRandomFallback to set an alternative");return n(t)}var o=!1;try{i(1),o=!0}catch(e){}function s(e,t){for(var r=0,n=0,i=0,o=e.length;i<o;++i)e.charCodeAt(i)===t.charCodeAt(i)?++r:++n;return!(r<0)&&0===n}n=null,t.setRandomFallback=function(e){n=e},t.genSaltSync=function(e,t){if("number"!=typeof(e=e||m))throw Error("Illegal arguments: "+typeof e+", "+typeof t);e<4?e=4:e>31&&(e=31);var r=[];return r.push("$2a$"),e<10&&r.push("0"),r.push(e.toString()),r.push("$"),r.push(p(i(g),g)),r.join("")},t.genSalt=function(e,r,n){if("function"==typeof r&&(n=r,r=void 0),"function"==typeof e&&(n=e,e=void 0),void 0===e)e=m;else if("number"!=typeof e)throw Error("illegal arguments: "+typeof e);function i(r){c(function(){try{r(null,t.genSaltSync(e))}catch(e){r(e)}})}if(!n)return new Promise(function(e,t){i(function(r,n){if(r)return void t(r);e(n)})});if("function"!=typeof n)throw Error("Illegal callback: "+typeof n);i(n)},t.hashSync=function(e,r){if(void 0===r&&(r=m),"number"==typeof r&&(r=t.genSaltSync(r)),"string"!=typeof e||"string"!=typeof r)throw Error("Illegal arguments: "+typeof e+", "+typeof r);return R(e,r)},t.hash=function(e,r,n,i){function o(n){"string"==typeof e&&"number"==typeof r?t.genSalt(r,function(t,r){R(e,r,n,i)}):"string"==typeof e&&"string"==typeof r?R(e,r,n,i):c(n.bind(this,Error("Illegal arguments: "+typeof e+", "+typeof r)))}if(!n)return new Promise(function(e,t){o(function(r,n){if(r)return void t(r);e(n)})});if("function"!=typeof n)throw Error("Illegal callback: "+typeof n);o(n)},t.compareSync=function(e,r){if("string"!=typeof e||"string"!=typeof r)throw Error("Illegal arguments: "+typeof e+", "+typeof r);return 60===r.length&&s(t.hashSync(e,r.substr(0,r.length-31)),r)},t.compare=function(e,r,n,i){function o(n){return"string"!=typeof e||"string"!=typeof r?void c(n.bind(this,Error("Illegal arguments: "+typeof e+", "+typeof r))):60!==r.length?void c(n.bind(this,null,!1)):void t.hash(e,r.substr(0,29),function(e,t){e?n(e):n(null,s(t,r))},i)}if(!n)return new Promise(function(e,t){o(function(r,n){if(r)return void t(r);e(n)})});if("function"!=typeof n)throw Error("Illegal callback: "+typeof n);o(n)},t.getRounds=function(e){if("string"!=typeof e)throw Error("Illegal arguments: "+typeof e);return parseInt(e.split("$")[2],10)},t.getSalt=function(e){if("string"!=typeof e)throw Error("Illegal arguments: "+typeof e);if(60!==e.length)throw Error("Illegal hash length: "+e.length+" != 60");return e.substring(0,29)};var c=void 0!==a&&a&&"function"==typeof a.nextTick?"function"==typeof setImmediate?setImmediate:a.nextTick:setTimeout;function u(e){var t=[],r=0;return y.encodeUTF16toUTF8(function(){return r>=e.length?null:e.charCodeAt(r++)},function(e){t.push(e)}),t}var l="./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),d=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,1,54,55,56,57,58,59,60,61,62,63,-1,-1,-1,-1,-1,-1,-1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,-1,-1,-1,-1,-1,-1,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,-1,-1,-1,-1,-1],f=String.fromCharCode;function p(e,t){var r,n,i=0,o=[];if(t<=0||t>e.length)throw Error("Illegal len: "+t);for(;i<t;){if(r=255&e[i++],o.push(l[r>>2&63]),r=(3&r)<<4,i>=t||(r|=(n=255&e[i++])>>4&15,o.push(l[63&r]),r=(15&n)<<2,i>=t)){o.push(l[63&r]);break}r|=(n=255&e[i++])>>6&3,o.push(l[63&r]),o.push(l[63&n])}return o.join("")}function h(e,t){var r,n,i,o,a,s=0,c=e.length,u=0,l=[];if(t<=0)throw Error("Illegal len: "+t);for(;s<c-1&&u<t&&(r=(a=e.charCodeAt(s++))<d.length?d[a]:-1,n=(a=e.charCodeAt(s++))<d.length?d[a]:-1,-1!=r&&-1!=n)&&(o=r<<2>>>0|(48&n)>>4,l.push(f(o)),!(++u>=t||s>=c||-1==(i=(a=e.charCodeAt(s++))<d.length?d[a]:-1)||(o=(15&n)<<4>>>0|(60&i)>>2,l.push(f(o)),++u>=t||s>=c)));){;o=(3&i)<<6>>>0|((a=e.charCodeAt(s++))<d.length?d[a]:-1),l.push(f(o)),++u}var p=[];for(s=0;s<u;s++)p.push(l[s].charCodeAt(0));return p}var y=function(){var e={};return e.MAX_CODEPOINT=1114111,e.encodeUTF8=function(e,t){var r=null;for("number"==typeof e&&(r=e,e=function(){return null});null!==r||null!==(r=e());)r<128?t(127&r):(r<2048?t(r>>6&31|192):(r<65536?t(r>>12&15|224):(t(r>>18&7|240),t(r>>12&63|128)),t(r>>6&63|128)),t(63&r|128)),r=null},e.decodeUTF8=function(e,t){for(var r,n,i,o,a=function(e){var t=Error((e=e.slice(0,e.indexOf(null))).toString());throw t.name="TruncatedError",t.bytes=e,t};null!==(r=e());)if((128&r)==0)t(r);else if((224&r)==192)null===(n=e())&&a([r,n]),t((31&r)<<6|63&n);else if((240&r)==224)(null===(n=e())||null===(i=e()))&&a([r,n,i]),t((15&r)<<12|(63&n)<<6|63&i);else if((248&r)==240)(null===(n=e())||null===(i=e())||null===(o=e()))&&a([r,n,i,o]),t((7&r)<<18|(63&n)<<12|(63&i)<<6|63&o);else throw RangeError("Illegal starting byte: "+r)},e.UTF16toUTF8=function(e,t){for(var r,n=null;null!==(r=null!==n?n:e());){if(r>=55296&&r<=57343&&null!==(n=e())&&n>=56320&&n<=57343){t((r-55296)*1024+n-56320+65536),n=null;continue}t(r)}null!==n&&t(n)},e.UTF8toUTF16=function(e,t){var r=null;for("number"==typeof e&&(r=e,e=function(){return null});null!==r||null!==(r=e());)r<=65535?t(r):(t(((r-=65536)>>10)+55296),t(r%1024+56320)),r=null},e.encodeUTF16toUTF8=function(t,r){e.UTF16toUTF8(t,function(t){e.encodeUTF8(t,r)})},e.decodeUTF8toUTF16=function(t,r){e.decodeUTF8(t,function(t){e.UTF8toUTF16(t,r)})},e.calculateCodePoint=function(e){return e<128?1:e<2048?2:e<65536?3:4},e.calculateUTF8=function(t){for(var r,n=0;null!==(r=t());)n+=e.calculateCodePoint(r);return n},e.calculateUTF16asUTF8=function(t){var r=0,n=0;return e.UTF16toUTF8(t,function(t){++r,n+=e.calculateCodePoint(t)}),[r,n]},e}();Date.now=Date.now||function(){return+new Date};var g=16,m=10,b=16,w=100,v=[0x243f6a88,0x85a308d3,0x13198a2e,0x3707344,0xa4093822,0x299f31d0,0x82efa98,0xec4e6c89,0x452821e6,0x38d01377,0xbe5466cf,0x34e90c6c,0xc0ac29b7,0xc97c50dd,0x3f84d5b5,0xb5470917,0x9216d5d9,0x8979fb1b],_=[0xd1310ba6,0x98dfb5ac,0x2ffd72db,0xd01adfb7,0xb8e1afed,0x6a267e96,0xba7c9045,0xf12c7f99,0x24a19947,0xb3916cf7,0x801f2e2,0x858efc16,0x636920d8,0x71574e69,0xa458fea3,0xf4933d7e,0xd95748f,0x728eb658,0x718bcd58,0x82154aee,0x7b54a41d,0xc25a59b5,0x9c30d539,0x2af26013,0xc5d1b023,0x286085f0,0xca417918,0xb8db38ef,0x8e79dcb0,0x603a180e,0x6c9e0e8b,0xb01e8a3e,0xd71577c1,0xbd314b27,0x78af2fda,0x55605c60,0xe65525f3,0xaa55ab94,0x57489862,0x63e81440,0x55ca396a,0x2aab10b6,0xb4cc5c34,0x1141e8ce,0xa15486af,0x7c72e993,0xb3ee1411,0x636fbc2a,0x2ba9c55d,0x741831f6,0xce5c3e16,0x9b87931e,0xafd6ba33,0x6c24cf5c,0x7a325381,0x28958677,0x3b8f4898,0x6b4bb9af,0xc4bfe81b,0x66282193,0x61d809cc,0xfb21a991,0x487cac60,0x5dec8032,0xef845d5d,0xe98575b1,0xdc262302,0xeb651b88,0x23893e81,0xd396acc5,0xf6d6ff3,0x83f44239,0x2e0b4482,0xa4842004,0x69c8f04a,0x9e1f9b5e,0x21c66842,0xf6e96c9a,0x670c9c61,0xabd388f0,0x6a51a0d2,0xd8542f68,0x960fa728,0xab5133a3,0x6eef0b6c,0x137a3be4,0xba3bf050,0x7efb2a98,0xa1f1651d,0x39af0176,0x66ca593e,0x82430e88,0x8cee8619,0x456f9fb4,0x7d84a5c3,0x3b8b5ebe,0xe06f75d8,0x85c12073,0x401a449f,0x56c16aa6,0x4ed3aa62,0x363f7706,0x1bfedf72,0x429b023d,0x37d0d724,0xd00a1248,0xdb0fead3,0x49f1c09b,0x75372c9,0x80991b7b,0x25d479d8,0xf6e8def7,0xe3fe501a,0xb6794c3b,0x976ce0bd,0x4c006ba,0xc1a94fb6,0x409f60c4,0x5e5c9ec2,0x196a2463,0x68fb6faf,0x3e6c53b5,0x1339b2eb,0x3b52ec6f,0x6dfc511f,0x9b30952c,0xcc814544,0xaf5ebd09,0xbee3d004,0xde334afd,0x660f2807,0x192e4bb3,0xc0cba857,0x45c8740f,0xd20b5f39,0xb9d3fbdb,0x5579c0bd,0x1a60320a,0xd6a100c6,0x402c7279,0x679f25fe,0xfb1fa3cc,0x8ea5e9f8,0xdb3222f8,0x3c7516df,0xfd616b15,0x2f501ec8,0xad0552ab,0x323db5fa,0xfd238760,0x53317b48,0x3e00df82,0x9e5c57bb,0xca6f8ca0,0x1a87562e,0xdf1769db,0xd542a8f6,0x287effc3,0xac6732c6,0x8c4f5573,0x695b27b0,0xbbca58c8,0xe1ffa35d,0xb8f011a0,0x10fa3d98,0xfd2183b8,0x4afcb56c,0x2dd1d35b,0x9a53e479,0xb6f84565,0xd28e49bc,0x4bfb9790,0xe1ddf2da,0xa4cb7e33,0x62fb1341,0xcee4c6e8,0xef20cada,0x36774c01,0xd07e9efe,0x2bf11fb4,0x95dbda4d,0xae909198,0xeaad8e71,0x6b93d5a0,0xd08ed1d0,0xafc725e0,0x8e3c5b2f,0x8e7594b7,0x8ff6e2fb,0xf2122b64,0x8888b812,0x900df01c,0x4fad5ea0,0x688fc31c,0xd1cff191,0xb3a8c1ad,0x2f2f2218,0xbe0e1777,0xea752dfe,0x8b021fa1,0xe5a0cc0f,0xb56f74e8,0x18acf3d6,0xce89e299,0xb4a84fe0,0xfd13e0b7,0x7cc43b81,0xd2ada8d9,0x165fa266,0x80957705,0x93cc7314,0x211a1477,0xe6ad2065,0x77b5fa86,0xc75442f5,0xfb9d35cf,0xebcdaf0c,0x7b3e89a0,0xd6411bd3,0xae1e7e49,2428461,0x2071b35e,0x226800bb,0x57b8e0af,0x2464369b,0xf009b91e,0x5563911d,0x59dfa6aa,0x78c14389,0xd95a537f,0x207d5ba2,0x2e5b9c5,0x83260376,0x6295cfa9,0x11c81968,0x4e734a41,0xb3472dca,0x7b14a94a,0x1b510052,0x9a532915,0xd60f573f,0xbc9bc6e4,0x2b60a476,0x81e67400,0x8ba6fb5,0x571be91f,0xf296ec6b,0x2a0dd915,0xb6636521,0xe7b9f9b6,0xff34052e,0xc5855664,0x53b02d5d,0xa99f8fa1,0x8ba4799,0x6e85076a,0x4b7a70e9,0xb5b32944,0xdb75092e,0xc4192623,290971e4,0x49a7df7d,0x9cee60b8,0x8fedb266,0xecaa8c71,0x699a17ff,0x5664526c,0xc2b19ee1,0x193602a5,0x75094c29,0xa0591340,0xe4183a3e,0x3f54989a,0x5b429d65,0x6b8fe4d6,0x99f73fd6,0xa1d29c07,0xefe830f5,0x4d2d38e6,0xf0255dc1,0x4cdd2086,0x8470eb26,0x6382e9c6,0x21ecc5e,0x9686b3f,0x3ebaefc9,0x3c971814,0x6b6a70a1,0x687f3584,0x52a0e286,0xb79c5305,0xaa500737,0x3e07841c,0x7fdeae5c,0x8e7d44ec,0x5716f2b8,0xb03ada37,0xf0500c0d,0xf01c1f04,0x200b3ff,0xae0cf51a,0x3cb574b2,0x25837a58,0xdc0921bd,0xd19113f9,0x7ca92ff6,0x94324773,0x22f54701,0x3ae5e581,0x37c2dadc,0xc8b57634,0x9af3dda7,0xa9446146,0xfd0030e,0xecc8c73e,0xa4751e41,0xe238cd99,0x3bea0e2f,0x3280bba1,0x183eb331,0x4e548b38,0x4f6db908,0x6f420d03,0xf60a04bf,0x2cb81290,0x24977c79,0x5679b072,0xbcaf89af,0xde9a771f,0xd9930810,0xb38bae12,0xdccf3f2e,0x5512721f,0x2e6b7124,0x501adde6,0x9f84cd87,0x7a584718,0x7408da17,0xbc9f9abc,0xe94b7d8c,0xec7aec3a,0xdb851dfa,0x63094366,0xc464c3d2,0xef1c1847,0x3215d908,0xdd433b37,0x24c2ba16,0x12a14d43,0x2a65c451,0x50940002,0x133ae4dd,0x71dff89e,0x10314e55,0x81ac77d6,0x5f11199b,0x43556f1,0xd7a3c76b,0x3c11183b,0x5924a509,0xf28fe6ed,0x97f1fbfa,0x9ebabf2c,0x1e153c6e,0x86e34570,0xeae96fb1,0x860e5e0a,0x5a3e2ab3,0x771fe71c,0x4e3d06fa,0x2965dcb9,0x99e71d0f,0x803e89d6,0x5266c825,0x2e4cc978,0x9c10b36a,0xc6150eba,0x94e2ea78,0xa5fc3c53,0x1e0a2df4,0xf2f74ea7,0x361d2b3d,0x1939260f,0x19c27960,0x5223a708,0xf71312b6,0xebadfe6e,0xeac31f66,0xe3bc4595,0xa67bc883,0xb17f37d1,0x18cff28,0xc332ddef,0xbe6c5aa5,0x65582185,0x68ab9802,0xeecea50f,0xdb2f953b,0x2aef7dad,0x5b6e2f84,0x1521b628,0x29076170,0xecdd4775,0x619f1510,0x13cca830,0xeb61bd96,0x334fe1e,0xaa0363cf,0xb5735c90,0x4c70a239,0xd59e9e0b,0xcbaade14,0xeecc86bc,0x60622ca7,0x9cab5cab,0xb2f3846e,0x648b1eaf,0x19bdf0ca,0xa02369b9,0x655abb50,0x40685a32,0x3c2ab4b3,0x319ee9d5,0xc021b8f7,0x9b540b19,0x875fa099,0x95f7997e,0x623d7da8,0xf837889a,0x97e32d77,0x11ed935f,0x16681281,0xe358829,0xc7e61fd6,0x96dedfa1,0x7858ba99,0x57f584a5,0x1b227263,0x9b83c3ff,0x1ac24696,0xcdb30aeb,0x532e3054,0x8fd948e4,0x6dbc3128,0x58ebf2ef,0x34c6ffea,0xfe28ed61,0xee7c3c73,0x5d4a14d9,0xe864b7e3,0x42105d14,0x203e13e0,0x45eee2b6,0xa3aaabea,0xdb6c4f15,0xfacb4fd0,0xc742f442,0xef6abbb5,0x654f3b1d,0x41cd2105,0xd81e799e,0x86854dc7,0xe44b476a,0x3d816250,0xcf62a1f2,0x5b8d2646,0xfc8883a0,0xc1c7b6a3,0x7f1524c3,0x69cb7492,0x47848a0b,0x5692b285,0x95bbf00,0xad19489d,0x1462b174,0x23820e00,0x58428d2a,0xc55f5ea,0x1dadf43e,0x233f7061,0x3372f092,0x8d937e41,0xd65fecf1,0x6c223bdb,0x7cde3759,0xcbee7460,0x4085f2a7,0xce77326e,0xa6078084,0x19f8509e,0xe8efd855,0x61d99735,0xa969a7aa,0xc50c06c2,0x5a04abfc,0x800bcadc,0x9e447a2e,0xc3453484,0xfdd56705,0xe1e9ec9,0xdb73dbd3,0x105588cd,0x675fda79,0xe3674340,0xc5c43465,0x713e38d8,0x3d28f89e,0xf16dff20,0x153e21e7,0x8fb03d4a,0xe6e39f2b,0xdb83adf7,0xe93d5a68,0x948140f7,0xf64c261c,0x94692934,0x411520f7,0x7602d4f7,0xbcf46b2e,0xd4a20068,0xd4082471,0x3320f46a,0x43b7d4b7,0x500061af,0x1e39f62e,0x97244546,0x14214f74,0xbf8b8840,0x4d95fc1d,0x96b591af,0x70f4ddd3,0x66a02f45,0xbfbc09ec,0x3bd9785,0x7fac6dd0,0x31cb8504,0x96eb27b3,0x55fd3941,0xda2547e6,0xabca0a9a,0x28507825,0x530429f4,0xa2c86da,0xe9b66dfb,0x68dc1462,0xd7486900,0x680ec0a4,0x27a18dee,0x4f3ffea2,0xe887ad8c,0xb58ce006,0x7af4d6b6,0xaace1e7c,0xd3375fec,0xce78a399,0x406b2a42,0x20fe9e35,0xd9f385b9,0xee39d7ab,0x3b124e8b,0x1dc9faf7,0x4b6d1856,0x26a36631,0xeae397b2,0x3a6efa74,0xdd5b4332,0x6841e7f7,0xca7820fb,0xfb0af54e,0xd8feb397,0x454056ac,0xba489527,0x55533a3a,0x20838d87,0xfe6ba9b7,0xd096954b,0x55a867bc,0xa1159a58,0xcca92963,0x99e1db33,0xa62a4a56,0x3f3125f9,0x5ef47e1c,0x9029317c,0xfdf8e802,0x4272f70,0x80bb155c,0x5282ce3,0x95c11548,0xe4c66d22,0x48c1133f,0xc70f86dc,0x7f9c9ee,0x41041f0f,0x404779a4,0x5d886e17,0x325f51eb,0xd59bc0d1,0xf2bcc18f,0x41113564,0x257b7834,0x602a9c60,0xdff8e8a3,0x1f636c1b,0xe12b4c2,0x2e1329e,0xaf664fd1,0xcad18115,0x6b2395e0,0x333e92e1,0x3b240b62,0xeebeb922,0x85b2a20e,0xe6ba0d99,0xde720c8c,0x2da2f728,0xd0127845,0x95b794fd,0x647d0862,0xe7ccf5f0,0x5449a36f,0x877d48fa,0xc39dfd27,0xf33e8d1e,0xa476341,0x992eff74,0x3a6f6eab,0xf4f8fd37,0xa812dc60,0xa1ebddf8,0x991be14c,0xdb6e6b0d,0xc67b5510,0x6d672c37,0x2765d43b,0xdcd0e804,0xf1290dc7,0xcc00ffa3,0xb5390f92,0x690fed0b,0x667b9ffb,0xcedb7d9c,0xa091cf0b,0xd9155ea3,0xbb132f88,0x515bad24,0x7b9479bf,0x763bd6eb,0x37392eb3,0xcc115979,0x8026e297,0xf42e312d,0x6842ada7,0xc66a2b3b,0x12754ccc,0x782ef11c,0x6a124237,0xb79251e7,0x6a1bbe6,0x4bfb6350,0x1a6b1018,0x11caedfa,0x3d25bdd8,0xe2e1c3c9,0x44421659,0xa121386,0xd90cec6e,0xd5abea2a,0x64af674e,0xda86a85f,0xbebfe988,0x64e4c3fe,0x9dbc8057,0xf0f7c086,0x60787bf8,0x6003604d,0xd1fd8346,0xf6381fb0,0x7745ae04,0xd736fccc,0x83426b33,0xf01eab71,0xb0804187,0x3c005e5f,0x77a057be,0xbde8ae24,0x55464299,0xbf582e61,0x4e58f48f,0xf2ddfda2,0xf474ef38,0x8789bdc2,0x5366f9c3,0xc8b38e74,0xb475f255,0x46fcd9b9,0x7aeb2661,0x8b1ddf84,0x846a0e79,0x915f95e2,0x466e598e,0x20b45770,0x8cd55591,0xc902de4c,0xb90bace1,0xbb8205d0,0x11a86248,0x7574a99e,0xb77f19b6,0xe0a9dc09,0x662d09a1,0xc4324633,0xe85a1f02,0x9f0be8c,0x4a99a025,0x1d6efe10,0x1ab93d1d,0xba5a4df,0xa186f20f,0x2868f169,0xdcb7da83,0x573906fe,0xa1e2ce9b,0x4fcd7f52,0x50115e01,0xa70683fa,0xa002b5c4,0xde6d027,0x9af88c27,0x773f8641,0xc3604c06,0x61a806b5,0xf0177a28,0xc0f586e0,6314154,0x30dc7d62,0x11e69ed7,0x2338ea63,0x53c2dd94,0xc2c21634,0xbbcbee56,0x90bcb6de,0xebfc7da1,0xce591d76,0x6f05e409,0x4b7c0188,0x39720a3d,0x7c927c24,0x86e3725f,0x724d9db9,0x1ac15bb4,0xd39eb8fc,0xed545578,0x8fca5b5,0xd83d7cd3,0x4dad0fc4,0x1e50ef5e,0xb161e6f8,0xa28514d9,0x6c51133c,0x6fd5c7e7,0x56e14ec4,0x362abfce,0xddc6c837,0xd79a3234,0x92638212,0x670efa8e,0x406000e0,0x3a39ce37,0xd3faf5cf,0xabc27737,0x5ac52d1b,0x5cb0679e,0x4fa33742,0xd3822740,0x99bc9bbe,0xd5118e9d,0xbf0f7315,0xd62d1c7e,0xc700c47b,0xb78c1b6b,0x21a19045,0xb26eb1be,0x6a366eb4,0x5748ab2f,0xbc946e79,0xc6a376d2,0x6549c2c8,0x530ff8ee,0x468dde7d,0xd5730a1d,0x4cd04dc6,0x2939bbdb,0xa9ba4650,0xac9526e8,0xbe5ee304,0xa1fad5f0,0x6a2d519a,0x63ef8ce2,0x9a86ee22,0xc089c2b8,0x43242ef6,0xa51e03aa,0x9cf2d0a4,0x83c061ba,0x9be96a4d,0x8fe51550,0xba645bd6,0x2826a2f9,0xa73a3ae1,0x4ba99586,0xef5562e9,0xc72fefd3,0xf752f7da,0x3f046f69,0x77fa0a59,0x80e4a915,0x87b08601,0x9b09e6ad,0x3b3ee593,0xe990fd5a,0x9e34d797,0x2cf0b7d9,0x22b8b51,0x96d5ac3a,0x17da67d,0xd1cf3ed6,0x7c7d2d28,0x1f9f25cf,0xadf2b89b,0x5ad6b472,0x5a88f54c,0xe029ac71,0xe019a5e6,0x47b0acfd,0xed93fa9b,0xe8d3c48d,0x283b57cc,0xf8d56629,0x79132e28,0x785f0191,0xed756055,0xf7960e44,0xe3d35e8c,0x15056dd4,0x88f46dba,0x3a16125,0x564f0bd,0xc3eb9e15,0x3c9057a2,0x97271aec,0xa93a072a,0x1b3f6d9b,0x1e6321f5,0xf59c66fb,0x26dcf319,0x7533d928,0xb155fdf5,0x3563482,0x8aba3cbb,0x28517711,0xc20ad9f8,0xabcc5167,0xccad925f,0x4de81751,0x3830dc8e,0x379d5862,0x9320f991,0xea7a90c2,0xfb3e7bce,0x5121ce64,0x774fbe32,0xa8b6e37e,0xc3293d46,0x48de5369,0x6413e680,0xa2ae0810,0xdd6db224,0x69852dfd,0x9072166,0xb39a460a,0x6445c0dd,0x586cdecf,0x1c20c8ae,0x5bbef7dd,0x1b588d40,0xccd2017f,0x6bb4e3bb,0xdda26a7e,0x3a59ff45,0x3e350a44,0xbcb4cdd5,0x72eacea8,0xfa6484bb,0x8d6612ae,0xbf3c6f47,0xd29be463,0x542f5d9e,0xaec2771b,0xf64e6370,0x740e0d8d,0xe75b1357,0xf8721671,0xaf537d5d,0x4040cb08,0x4eb4e2cc,0x34d2466a,0x115af84,3786409e3,0x95983a1d,0x6b89fb4,0xce6ea048,0x6f3f3b82,0x3520ab82,0x11a1d4b,0x277227f8,0x611560b1,0xe7933fdc,0xbb3a792b,0x344525bd,0xa08839e1,0x51ce794b,0x2f32c9b7,0xa01fbac9,0xe01cc87e,0xbcc7d1f6,0xcf0111c3,0xa1e8aac7,0x1a908749,0xd44fbd9a,0xd0dadecb,0xd50ada38,0x339c32a,0xc6913667,0x8df9317c,0xe0b12b4f,0xf79e59b7,0x43f5bb3a,0xf2d519ff,0x27d9459c,0xbf97222c,0x15e6fc2a,0xf91fc71,0x9b941525,0xfae59361,0xceb69ceb,0xc2a86459,0x12baa8d1,0xb6c1075e,0xe3056a0c,0x10d25065,0xcb03a442,0xe0ec6e0e,0x1698db3b,0x4c98a0be,0x3278e964,0x9f1f9532,0xe0d392df,0xd3a0342b,0x8971f21e,0x1b0a7441,0x4ba3348c,0xc5be7120,0xc37632d8,0xdf359f8d,0x9b992f2e,0xe60b6f47,0xfe3f11d,0xe54cda54,0x1edad891,0xce6279cf,0xcd3e7e6f,0x1618b166,0xfd2c1d05,0x848fd2c5,0xf6fb2299,0xf523f357,0xa6327623,0x93a83531,0x56cccd02,0xacf08162,0x5a75ebb5,0x6e163697,0x88d273cc,0xde966292,0x81b949d0,0x4c50901b,0x71c65614,0xe6c6c7bd,0x327a140a,0x45e1d006,0xc3f27b9a,0xc9aa53fd,0x62a80f00,0xbb25bfe2,0x35bdd2f6,0x71126905,0xb2040222,0xb6cbcf7c,0xcd769c2b,0x53113ec0,0x1640e3d3,0x38abbd60,0x2547adf0,0xba38209c,0xf746ce76,0x77afa1c5,0x20756060,0x85cbfe4e,0x8ae88dd8,0x7aaaf9b0,0x4cf9aa7e,0x1948c25c,0x2fb8a8c,0x1c36ae4,0xd6ebe1f9,0x90d4f869,0xa65cdea0,0x3f09252d,0xc208e69f,0xb74e6132,0xce77e25b,0x578fdfe3,0x3ac372e6],E=[0x4f727068,0x65616e42,0x65686f6c,0x64657253,0x63727944,0x6f756274];function S(e,t,r,n){var i,o=e[t],a=e[t+1];return o^=r[0],a^=(i=(n[o>>>24]+n[256|o>>16&255]^n[512|o>>8&255])+n[768|255&o])^r[1],o^=(i=(n[a>>>24]+n[256|a>>16&255]^n[512|a>>8&255])+n[768|255&a])^r[2],a^=(i=(n[o>>>24]+n[256|o>>16&255]^n[512|o>>8&255])+n[768|255&o])^r[3],o^=(i=(n[a>>>24]+n[256|a>>16&255]^n[512|a>>8&255])+n[768|255&a])^r[4],a^=(i=(n[o>>>24]+n[256|o>>16&255]^n[512|o>>8&255])+n[768|255&o])^r[5],o^=(i=(n[a>>>24]+n[256|a>>16&255]^n[512|a>>8&255])+n[768|255&a])^r[6],a^=(i=(n[o>>>24]+n[256|o>>16&255]^n[512|o>>8&255])+n[768|255&o])^r[7],o^=(i=(n[a>>>24]+n[256|a>>16&255]^n[512|a>>8&255])+n[768|255&a])^r[8],a^=(i=(n[o>>>24]+n[256|o>>16&255]^n[512|o>>8&255])+n[768|255&o])^r[9],o^=(i=(n[a>>>24]+n[256|a>>16&255]^n[512|a>>8&255])+n[768|255&a])^r[10],a^=(i=(n[o>>>24]+n[256|o>>16&255]^n[512|o>>8&255])+n[768|255&o])^r[11],o^=(i=(n[a>>>24]+n[256|a>>16&255]^n[512|a>>8&255])+n[768|255&a])^r[12],a^=(i=(n[o>>>24]+n[256|o>>16&255]^n[512|o>>8&255])+n[768|255&o])^r[13],o^=(i=(n[a>>>24]+n[256|a>>16&255]^n[512|a>>8&255])+n[768|255&a])^r[14],a^=(i=(n[o>>>24]+n[256|o>>16&255]^n[512|o>>8&255])+n[768|255&o])^r[15],o^=(i=(n[a>>>24]+n[256|a>>16&255]^n[512|a>>8&255])+n[768|255&a])^r[16],e[t]=a^r[b+1],e[t+1]=o,e}function A(e,t){for(var r=0,n=0;r<4;++r)n=n<<8|255&e[t],t=(t+1)%e.length;return{key:n,offp:t}}function x(e,t,r){for(var n,i=0,o=[0,0],a=t.length,s=r.length,c=0;c<a;c++)i=(n=A(e,i)).offp,t[c]=t[c]^n.key;for(c=0;c<a;c+=2)o=S(o,0,t,r),t[c]=o[0],t[c+1]=o[1];for(c=0;c<s;c+=2)o=S(o,0,t,r),r[c]=o[0],r[c+1]=o[1]}function k(e,t,r,n){for(var i,o=0,a=[0,0],s=r.length,c=n.length,u=0;u<s;u++)o=(i=A(t,o)).offp,r[u]=r[u]^i.key;for(u=0,o=0;u<s;u+=2)o=(i=A(e,o)).offp,a[0]^=i.key,o=(i=A(e,o)).offp,a[1]^=i.key,a=S(a,0,r,n),r[u]=a[0],r[u+1]=a[1];for(u=0;u<c;u+=2)o=(i=A(e,o)).offp,a[0]^=i.key,o=(i=A(e,o)).offp,a[1]^=i.key,a=S(a,0,r,n),n[u]=a[0],n[u+1]=a[1]}function P(e,t,r,n,i){var o,a,s=E.slice(),u=s.length;if(r<4||r>31){if(a=Error("Illegal number of rounds (4-31): "+r),n)return void c(n.bind(this,a));throw a}if(t.length!==g){if(a=Error("Illegal salt length: "+t.length+" != "+g),n)return void c(n.bind(this,a));throw a}r=1<<r>>>0;var l,d,f,p=0;function h(){if(i&&i(p/r),p<r)for(var o=Date.now();p<r&&(p+=1,x(e,l,d),x(t,l,d),!(Date.now()-o>w)););else{for(p=0;p<64;p++)for(f=0;f<u>>1;f++)S(s,f<<1,l,d);var a=[];for(p=0;p<u;p++)a.push((s[p]>>24&255)>>>0),a.push((s[p]>>16&255)>>>0),a.push((s[p]>>8&255)>>>0),a.push((255&s[p])>>>0);return n?void n(null,a):a}n&&c(h)}if(Int32Array?(l=new Int32Array(v),d=new Int32Array(_)):(l=v.slice(),d=_.slice()),k(t,e,l,d),void 0!==n)h();else for(;;)if(void 0!==(o=h()))return o||[]}function R(e,t,r,n){if("string"!=typeof e||"string"!=typeof t){if(i=Error("Invalid string / salt: Not a string"),r)return void c(r.bind(this,i));throw i}if("$"!==t.charAt(0)||"2"!==t.charAt(1)){if(i=Error("Invalid salt version: "+t.substring(0,2)),r)return void c(r.bind(this,i));throw i}if("$"===t.charAt(2))o="\0",a=3;else{if("a"!==(o=t.charAt(2))&&"b"!==o&&"y"!==o||"$"!==t.charAt(3)){if(i=Error("Invalid salt revision: "+t.substring(2,4)),r)return void c(r.bind(this,i));throw i}a=4}if(t.charAt(a+2)>"$"){if(i=Error("Missing salt rounds"),r)return void c(r.bind(this,i));throw i}var i,o,a,s=10*parseInt(t.substring(a,a+1),10)+parseInt(t.substring(a+1,a+2),10),l=t.substring(a+3,a+25),d=u(e+=o>="a"?"\0":""),f=h(l,g);function y(e){var t=[];return t.push("$2"),o>="a"&&t.push(o),t.push("$"),s<10&&t.push("0"),t.push(s.toString()),t.push("$"),t.push(p(f,f.length)),t.push(p(e,4*E.length-1)),t.join("")}if(void 0===r)return y(P(d,f,s));P(d,f,s,function(e,t){e?r(e,null):r(null,y(t))},n)}return t.encodeBase64=p,t.decodeBase64=h,t})},44538:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"afterTaskAsyncStorage",{enumerable:!0,get:function(){return n.afterTaskAsyncStorageInstance}});let n=r(78491)},45123:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=r(63780);function i(e){let{url:t,csrfToken:r,theme:i}=e;return(0,n.h)("div",{className:"signout"},i.brandColor&&(0,n.h)("style",{dangerouslySetInnerHTML:{__html:`
:root {
--brand-color: ${i.brandColor}
}
`}}),i.buttonText&&(0,n.h)("style",{dangerouslySetInnerHTML:{__html:`
:root {
--button-text-color: ${i.buttonText}
}
`}}),(0,n.h)("div",{className:"card"},i.logo&&(0,n.h)("img",{src:i.logo,alt:"Logo",className:"logo"}),(0,n.h)("h1",null,"Signout"),(0,n.h)("p",null,"Are you sure you want to sign out?"),(0,n.h)("form",{action:`${t}/signout`,method:"POST"},(0,n.h)("input",{type:"hidden",name:"csrfToken",value:r}),(0,n.h)("button",{id:"submitButton",type:"submit"},"Sign out"))))}},46209:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=r(87435);function i(e){let{url:t,providerId:r}=e,i=e.providers.map(({options:e,...r})=>{var i,a;if("oauth"===r.type){let i=o(r),s=o(e,!0),c=null!=(a=null==s?void 0:s.id)?a:r.id;return(0,n.merge)(i,{...s,signinUrl:`${t}/signin/${c}`,callbackUrl:`${t}/callback/${c}`})}let s=null!=(i=null==e?void 0:e.id)?i:r.id;return(0,n.merge)(r,{...e,signinUrl:`${t}/signin/${s}`,callbackUrl:`${t}/callback/${s}`})});return{providers:i,provider:i.find(({id:e})=>e===r)}}function o(e,t=!1){var r,n,i,a,s;if(!e)return;let c=Object.entries(e).reduce((e,[t,r])=>{if(["authorization","token","userinfo"].includes(t)&&"string"==typeof r){var n;let i=new URL(r);e[t]={url:`${i.origin}${i.pathname}`,params:Object.fromEntries(null!=(n=i.searchParams)?n:[])}}else e[t]=r;return e},{});return t||null!=(r=c.version)&&r.startsWith("1.")||(c.idToken=!!(null!=(n=null!=(i=c.idToken)?i:null==(a=c.wellKnown)?void 0:a.includes("openid-configuration"))?n:null==(s=c.authorization)||null==(s=s.params)||null==(s=s.scope)?void 0:s.includes("openid")),c.checks||(c.checks=["state"])),c}},47099:(e,t,r)=>{let n;var i=r(65364),o=r(82909).Buffer;let{inspect:a}=r(68994),s=r(40939),c=r(63426),{strict:u}=r(34322),l=r(48041),d=r(3305),{URL:f,URLSearchParams:p}=r(3305),h=r(90633),y=r(60247),g=r(47848),m=r(93022),b=r(93298),w=r(53412),v=r(9391),{assertSigningAlgValuesSupport:_,assertIssuerConfiguration:E}=r(52492),S=r(86355),A=r(79289),x=r(79435),k=r(10490),{OPError:P,RPError:R}=r(79391),O=r(71807),{random:T}=r(16436),C=r(18707),{CLOCK_TOLERANCE:I}=r(13466),{keystores:j}=r(86159),D=r(75402),H=r(85418),{authenticatedPost:N,resolveResponseType:U,resolveRedirectUri:M}=r(78425),{queryKeyStore:W}=r(34341),L=r(4022),[F,B]=i.version.slice(1).split(".").map(e=>parseInt(e,10)),K=F>=17||16===F&&B>=9,$=Symbol(),J=Symbol(),q=Symbol();function z(e){return S(e,"access_token","code","error_description","error_uri","error","expires_in","id_token","iss","response","session_state","state","token_type")}function G(e,t="Bearer"){return`${t} ${e}`}function V(e){let t=d.parse(e);return t.search?l.parse(t.search.substring(1)):{}}function X(e,t,r){if(void 0===e[r])throw new R({message:`missing required JWT property ${r}`,jwt:t})}function Y(e){let t={client_id:this.client_id,scope:"openid",response_type:U.call(this),redirect_uri:M.call(this),...e};return Object.entries(t).forEach(([e,r])=>{null==r?delete t[e]:"claims"===e&&"object"==typeof r?t[e]=JSON.stringify(r):"resource"===e&&Array.isArray(r)?t[e]=r:"string"!=typeof r&&(t[e]=String(r))}),t}function Z(e){if(!A(e)||!Array.isArray(e.keys)||e.keys.some(e=>!A(e)||!("kty"in e)))throw TypeError("jwks must be a JSON Web Key Set formatted object");return D.fromJWKS(e,{onlyPrivate:!0})}function Q(e,t){try{let r=e.issuer.token_endpoint_auth_methods_supported;!r.includes(t.token_endpoint_auth_method)&&r.includes("client_secret_post")&&(t.token_endpoint_auth_method="client_secret_post")}catch(e){}}function ee(e,t,r){if(t.token_endpoint_auth_method||Q(e,r),t.redirect_uri){if(t.redirect_uris)throw TypeError("provide a redirect_uri or redirect_uris, not both");r.redirect_uris=[t.redirect_uri],delete r.redirect_uri}if(t.response_type){if(t.response_types)throw TypeError("provide a response_type or response_types, not both");r.response_types=[t.response_type],delete r.response_type}}function et(e,t,r){if(!t[`${e}_endpoint`])return;let n=r.token_endpoint_auth_method,i=r.token_endpoint_auth_signing_alg,o=`${e}_endpoint_auth_method`,a=`${e}_endpoint_auth_signing_alg`;void 0===r[o]&&void 0===r[a]&&(void 0!==n&&(r[o]=n),void 0!==i&&(r[a]=i))}class er{#u;#l;#d;#f;constructor(e,t,r={},n,i){if(this.#u=new Map,this.#l=e,this.#d=t,"string"!=typeof r.client_id||!r.client_id)throw TypeError("client_id is required");let o={grant_types:["authorization_code"],id_token_signed_response_alg:"RS256",authorization_signed_response_alg:"RS256",response_types:["code"],token_endpoint_auth_method:"client_secret_basic",...this.fapi1()?{grant_types:["authorization_code","implicit"],id_token_signed_response_alg:"PS256",authorization_signed_response_alg:"PS256",response_types:["code id_token"],tls_client_certificate_bound_access_tokens:!0,token_endpoint_auth_method:void 0}:void 0,...this.fapi2()?{id_token_signed_response_alg:"PS256",authorization_signed_response_alg:"PS256",token_endpoint_auth_method:void 0}:void 0,...r};if(this.fapi())switch(o.token_endpoint_auth_method){case"self_signed_tls_client_auth":case"tls_client_auth":break;case"private_key_jwt":if(!n)throw TypeError("jwks is required");break;case void 0:throw TypeError("token_endpoint_auth_method is required");default:throw TypeError("invalid or unsupported token_endpoint_auth_method")}if(this.fapi2()&&(o.tls_client_certificate_bound_access_tokens&&o.dpop_bound_access_tokens||!o.tls_client_certificate_bound_access_tokens&&!o.dpop_bound_access_tokens))throw TypeError("either tls_client_certificate_bound_access_tokens or dpop_bound_access_tokens must be set to true");if(ee(this,r,o),_("token",this.issuer,o),["introspection","revocation"].forEach(e=>{et(e,this.issuer,o),_(e,this.issuer,o)}),Object.entries(o).forEach(([e,t])=>{this.#u.set(e,t),this[e]||Object.defineProperty(this,e,{get(){return this.#u.get(e)},enumerable:!0})}),void 0!==n){let e=Z.call(this,n);j.set(this,e)}null!=i&&i.additionalAuthorizedParties&&(this.#f=H(i.additionalAuthorizedParties)),this[I]=0}authorizationUrl(e={}){if(!A(e))throw TypeError("params must be a plain object");E(this.issuer,"authorization_endpoint");let t=new f(this.issuer.authorization_endpoint);for(let[r,n]of Object.entries(Y.call(this,e)))if(Array.isArray(n))for(let e of(t.searchParams.delete(r),n))t.searchParams.append(r,e);else t.searchParams.set(r,n);return t.href.replace(/\+/g,"%20")}authorizationPost(e={}){if(!A(e))throw TypeError("params must be a plain object");let t=Y.call(this,e),r=Object.keys(t).map(e=>`<input type="hidden" name="${e}" value="${t[e]}"/>`).join("\n");return`<!DOCTYPE html>
<head>
<title>Requesting Authorization</title>
</head>
<body onload="javascript:document.forms[0].submit()">
<form method="post" action="${this.issuer.authorization_endpoint}">
${r}
</form>
</body>
</html>`}endSessionUrl(e={}){let t;E(this.issuer,"end_session_endpoint");let{0:r,length:n}=this.post_logout_redirect_uris||[],{post_logout_redirect_uri:i=1===n?r:void 0}=e;if({id_token_hint:t,...e}=e,t instanceof k){if(!t.id_token)throw TypeError("id_token not present in TokenSet");t=t.id_token}let o=d.parse(this.issuer.end_session_endpoint),a=w(V(this.issuer.end_session_endpoint),e,{post_logout_redirect_uri:i,client_id:this.client_id},{id_token_hint:t});return Object.entries(a).forEach(([e,t])=>{null==t&&delete a[e]}),o.search=null,o.query=a,d.format(o)}callbackParams(e){let t=e instanceof s.IncomingMessage||e&&e.method&&e.url;if("string"!=typeof e&&!t)throw TypeError("#callbackParams only accepts string urls, http.IncomingMessage or a lookalike");if(!t)return z(V(e));switch(e.method){case"GET":return z(V(e.url));case"POST":if(void 0===e.body)throw TypeError("incoming message body missing, include a body parser prior to this method call");switch(typeof e.body){case"object":case"string":if(o.isBuffer(e.body))return z(l.parse(e.body.toString("utf-8")));if("string"==typeof e.body)return z(l.parse(e.body));return z(e.body);default:throw TypeError("invalid IncomingMessage body object")}default:throw TypeError("invalid IncomingMessage method")}}async callback(e,t,r={},{exchangeBody:n,clientAssertionPayload:i,DPoP:o}={}){let a=z(t);if(!r.jarm||"response"in t){if("response"in t){let e=await this.decryptJARM(a.response);a=await this.validateJARM(e)}}else throw new R({message:"expected a JARM response",checks:r,params:a});if(this.default_max_age&&!r.max_age&&(r.max_age=this.default_max_age),a.state&&!r.state)throw TypeError("checks.state argument is missing");if(!a.state&&r.state)throw new R({message:"state missing from the response",checks:r,params:a});if(r.state!==a.state)throw new R({printf:["state mismatch, expected %s, got: %s",r.state,a.state],checks:r,params:a});if("iss"in a){if(E(this.issuer,"issuer"),a.iss!==this.issuer.issuer)throw new R({printf:["iss mismatch, expected %s, got: %s",this.issuer.issuer,a.iss],params:a})}else if(this.issuer.authorization_response_iss_parameter_supported&&!("id_token"in a)&&!("response"in t))throw new R({message:"iss missing from the response",params:a});if(a.error)throw new P(a);let s={code:["code"],id_token:["id_token"],token:["access_token","token_type"]};if(r.response_type){for(let e of r.response_type.split(" "))if("none"===e){if(a.code||a.id_token||a.access_token)throw new R({message:'unexpected params encountered for "none" response',checks:r,params:a})}else for(let t of s[e])if(!a[t])throw new R({message:`${t} missing from response`,checks:r,params:a})}if(a.id_token){let e=new k(a);if(await this.decryptIdToken(e),await this.validateIdToken(e,r.nonce,"authorization",r.max_age,r.state),!a.code)return e}if(a.code){let t=await this.grant({...n,grant_type:"authorization_code",code:a.code,redirect_uri:e,code_verifier:r.code_verifier},{clientAssertionPayload:i,DPoP:o});return await this.decryptIdToken(t),await this.validateIdToken(t,r.nonce,"token",r.max_age),a.session_state&&(t.session_state=a.session_state),t}return new k(a)}async oauthCallback(e,t,r={},{exchangeBody:n,clientAssertionPayload:i,DPoP:o}={}){let a=z(t);if(!r.jarm||"response"in t){if("response"in t){let e=await this.decryptJARM(a.response);a=await this.validateJARM(e)}}else throw new R({message:"expected a JARM response",checks:r,params:a});if(a.state&&!r.state)throw TypeError("checks.state argument is missing");if(!a.state&&r.state)throw new R({message:"state missing from the response",checks:r,params:a});if(r.state!==a.state)throw new R({printf:["state mismatch, expected %s, got: %s",r.state,a.state],checks:r,params:a});if("iss"in a){if(E(this.issuer,"issuer"),a.iss!==this.issuer.issuer)throw new R({printf:["iss mismatch, expected %s, got: %s",this.issuer.issuer,a.iss],params:a})}else if(this.issuer.authorization_response_iss_parameter_supported&&!("id_token"in a)&&!("response"in t))throw new R({message:"iss missing from the response",params:a});if(a.error)throw new P(a);if("string"==typeof a.id_token&&a.id_token.length)throw new R({message:"id_token detected in the response, you must use client.callback() instead of client.oauthCallback()",params:a});delete a.id_token;let s={code:["code"],token:["access_token","token_type"]};if(r.response_type)for(let e of r.response_type.split(" ")){if("none"===e&&(a.code||a.id_token||a.access_token))throw new R({message:'unexpected params encountered for "none" response',checks:r,params:a});if(s[e]){for(let t of s[e])if(!a[t])throw new R({message:`${t} missing from response`,checks:r,params:a})}}if(a.code){let t=await this.grant({...n,grant_type:"authorization_code",code:a.code,redirect_uri:e,code_verifier:r.code_verifier},{clientAssertionPayload:i,DPoP:o});if("string"==typeof t.id_token&&t.id_token.length)throw new R({message:"id_token detected in the response, you must use client.callback() instead of client.oauthCallback()",params:a});return delete t.id_token,t}return new k(a)}async decryptIdToken(e){if(!this.id_token_encrypted_response_alg)return e;let t=e;if(t instanceof k){if(!t.id_token)throw TypeError("id_token not present in TokenSet");t=t.id_token}let r=this.id_token_encrypted_response_alg,n=this.id_token_encrypted_response_enc,i=await this.decryptJWE(t,r,n);return e instanceof k?(e.id_token=i,e):i}async validateJWTUserinfo(e){let t=this.userinfo_signed_response_alg;return this.validateJWT(e,t,[])}async decryptJARM(e){if(!this.authorization_encrypted_response_alg)return e;let t=this.authorization_encrypted_response_alg,r=this.authorization_encrypted_response_enc;return this.decryptJWE(e,t,r)}async decryptJWTUserinfo(e){if(!this.userinfo_encrypted_response_alg)return e;let t=this.userinfo_encrypted_response_alg,r=this.userinfo_encrypted_response_enc;return this.decryptJWE(e,t,r)}async decryptJWE(e,t,r="A128CBC-HS256"){let n,i=JSON.parse(b.decode(e.split(".")[0]));if(i.alg!==t)throw new R({printf:["unexpected JWE alg received, expected %s, got: %s",t,i.alg],jwt:e});if(i.enc!==r)throw new R({printf:["unexpected JWE enc received, expected %s, got: %s",r,i.enc],jwt:e});let o=e=>new TextDecoder().decode(e.plaintext);if(t.match(/^(?:RSA|ECDH)/)){let t=await j.get(this),r=h.decodeProtectedHeader(e);for(let i of t.all({...r,use:"enc"}))if(n=await h.compactDecrypt(e,await i.keyObject(r.alg)).then(o,()=>{}))break}else n=await h.compactDecrypt(e,this.secretForAlg("dir"===t?r:t)).then(o,()=>{});if(!n)throw new R({message:"failed to decrypt JWE",jwt:e});return n}async validateIdToken(e,t,r,n,i){let o=e,a=this.id_token_signed_response_alg;if(o instanceof k){if(!o.id_token)throw TypeError("id_token not present in TokenSet");o=o.id_token}o=String(o);let s=O(),{protected:c,payload:u,key:l}=await this.validateJWT(o,a);if("number"==typeof n||n!==q&&this.require_auth_time){if(!u.auth_time)throw new R({message:"missing required JWT property auth_time",jwt:o});if("number"!=typeof u.auth_time)throw new R({message:"JWT auth_time claim must be a JSON numeric value",jwt:o})}if("number"==typeof n&&u.auth_time+n<s-this[I])throw new R({printf:["too much time has elapsed since the last End-User authentication, max_age %i, auth_time: %i, now %i",n,u.auth_time,s-this[I]],now:s,tolerance:this[I],auth_time:u.auth_time,jwt:o});if(t!==J&&(u.nonce||void 0!==t)&&u.nonce!==t)throw new R({printf:["nonce mismatch, expected %s, got: %s",t,u.nonce],jwt:o});if("authorization"===r){if(!u.at_hash&&e.access_token)throw new R({message:"missing required property at_hash",jwt:o});if(!u.c_hash&&e.code)throw new R({message:"missing required property c_hash",jwt:o});if(this.fapi1()&&!u.s_hash&&(e.state||i))throw new R({message:"missing required property s_hash",jwt:o});if(u.s_hash){if(!i)throw TypeError('cannot verify s_hash, "checks.state" property not provided');try{y.validate({claim:"s_hash",source:"state"},u.s_hash,i,c.alg,l.jwk&&l.jwk.crv)}catch(e){throw new R({message:e.message,jwt:o})}}}if(this.fapi()&&u.iat<s-3600)throw new R({printf:["JWT issued too far in the past, now %i, iat %i",s,u.iat],now:s,tolerance:this[I],iat:u.iat,jwt:o});if(e.access_token&&void 0!==u.at_hash)try{y.validate({claim:"at_hash",source:"access_token"},u.at_hash,e.access_token,c.alg,l.jwk&&l.jwk.crv)}catch(e){throw new R({message:e.message,jwt:o})}if(e.code&&void 0!==u.c_hash)try{y.validate({claim:"c_hash",source:"code"},u.c_hash,e.code,c.alg,l.jwk&&l.jwk.crv)}catch(e){throw new R({message:e.message,jwt:o})}return e}async validateJWT(e,t,r=["iss","sub","aud","exp","iat"]){let n,i,o,a="https://self-issued.me"===this.issuer.issuer,s=O();try{({header:n,payload:i}=m(e,{complete:!0}))}catch(t){throw new R({printf:["failed to decode JWT (%s: %s)",t.name,t.message],jwt:e})}if(n.alg!==t)throw new R({printf:["unexpected JWT alg received, expected %s, got: %s",t,n.alg],jwt:e});if(a&&(r=[...r,"sub_jwk"]),r.forEach(X.bind(void 0,i,e)),void 0!==i.iss){let t=this.issuer.issuer;if(this.#d&&(t=this.issuer.issuer.replace("{tenantid}",i.tid)),i.iss!==t)throw new R({printf:["unexpected iss value, expected %s, got: %s",t,i.iss],jwt:e})}if(void 0!==i.iat&&"number"!=typeof i.iat)throw new R({message:"JWT iat claim must be a JSON numeric value",jwt:e});if(void 0!==i.nbf){if("number"!=typeof i.nbf)throw new R({message:"JWT nbf claim must be a JSON numeric value",jwt:e});if(i.nbf>s+this[I])throw new R({printf:["JWT not active yet, now %i, nbf %i",s+this[I],i.nbf],now:s,tolerance:this[I],nbf:i.nbf,jwt:e})}if(void 0!==i.exp){if("number"!=typeof i.exp)throw new R({message:"JWT exp claim must be a JSON numeric value",jwt:e});if(s-this[I]>=i.exp)throw new R({printf:["JWT expired, now %i, exp %i",s-this[I],i.exp],now:s,tolerance:this[I],exp:i.exp,jwt:e})}if(void 0!==i.aud){if(Array.isArray(i.aud)){if(i.aud.length>1&&!i.azp)throw new R({message:"missing required JWT property azp",jwt:e});if(!i.aud.includes(this.client_id))throw new R({printf:["aud is missing the client_id, expected %s to be included in %j",this.client_id,i.aud],jwt:e})}else if(i.aud!==this.client_id)throw new R({printf:["aud mismatch, expected %s, got: %s",this.client_id,i.aud],jwt:e})}if(void 0!==i.azp){let t=this.#f;if(!(t="string"==typeof t?[this.client_id,t]:Array.isArray(t)?[this.client_id,...t]:[this.client_id]).includes(i.azp))throw new R({printf:["azp mismatch, got: %s",i.azp],jwt:e})}if(a){try{u(A(i.sub_jwk));let e=await h.importJWK(i.sub_jwk,n.alg);u.equal(e.type,"public"),o=[{keyObject:()=>e}]}catch(t){throw new R({message:"failed to use sub_jwk claim as an asymmetric JSON Web Key",jwt:e})}if(await h.calculateJwkThumbprint(i.sub_jwk)!==i.sub)throw new R({message:"failed to match the subject with sub_jwk",jwt:e})}else n.alg.startsWith("HS")?o=[this.secretForAlg(n.alg)]:"none"!==n.alg&&(o=await W.call(this.issuer,{...n,use:"sig"}));if(!o&&"none"===n.alg)return{protected:n,payload:i};for(let t of o){let r=await h.compactVerify(e,t instanceof Uint8Array?t:await t.keyObject(n.alg)).catch(()=>{});if(r)return{payload:i,protected:r.protectedHeader,key:t}}throw new R({message:"failed to validate JWT signature",jwt:e})}async refresh(e,{exchangeBody:t,clientAssertionPayload:r,DPoP:n}={}){let i=e;if(i instanceof k){if(!i.refresh_token)throw TypeError("refresh_token not present in TokenSet");i=i.refresh_token}let o=await this.grant({...t,grant_type:"refresh_token",refresh_token:String(i)},{clientAssertionPayload:r,DPoP:n});if(o.id_token&&(await this.decryptIdToken(o),await this.validateIdToken(o,J,"token",q),e instanceof k&&e.id_token)){let t=e.claims().sub,r=o.claims().sub;if(r!==t)throw new R({printf:["sub mismatch, expected %s, got: %s",t,r],jwt:o.id_token})}return o}async requestResource(e,t,{method:r,headers:n,body:i,DPoP:o,tokenType:a=o?"DPoP":t instanceof k?t.token_type:"Bearer"}={},s){if(t instanceof k){if(!t.access_token)throw TypeError("access_token not present in TokenSet");t=t.access_token}if(t){if("string"!=typeof t)throw TypeError("invalid access token provided")}else throw TypeError("no access token provided");let c={headers:{Authorization:G(t,a),...n},body:i},u=!!this.tls_client_certificate_bound_access_tokens,l=await C.call(this,{...c,responseType:"buffer",method:r,url:e},{accessToken:t,mTLS:u,DPoP:o}),d=l.headers["www-authenticate"];return s!==$&&d&&d.toLowerCase().startsWith("dpop ")&&"use_dpop_nonce"===v(d).error?this.requestResource(e,t,{method:r,headers:n,body:i,DPoP:o,tokenType:a}):l}async userinfo(e,{method:t="GET",via:r="header",tokenType:n,params:i,DPoP:o}={}){let a;E(this.issuer,"userinfo_endpoint");let s={tokenType:n,method:String(t).toUpperCase(),DPoP:o};if("GET"!==s.method&&"POST"!==s.method)throw TypeError("#userinfo() method can only be POST or a GET");if("body"===r&&"POST"!==s.method)throw TypeError("can only send body on POST");let c=!!(this.userinfo_signed_response_alg||this.userinfo_encrypted_response_alg);c?s.headers={Accept:"application/jwt"}:s.headers={Accept:"application/json"},this.tls_client_certificate_bound_access_tokens&&this.issuer.mtls_endpoint_aliases&&(a=this.issuer.mtls_endpoint_aliases.userinfo_endpoint),a=new f(a||this.issuer.userinfo_endpoint),"body"===r&&(s.headers.Authorization=void 0,s.headers["Content-Type"]="application/x-www-form-urlencoded",s.body=new p,s.body.append("access_token",e instanceof k?e.access_token:e)),i&&("GET"===s.method?Object.entries(i).forEach(([e,t])=>{a.searchParams.append(e,t)}):s.body?Object.entries(i).forEach(([e,t])=>{s.body.append(e,t)}):(s.body=new p,s.headers["Content-Type"]="application/x-www-form-urlencoded",Object.entries(i).forEach(([e,t])=>{s.body.append(e,t)}))),s.body&&(s.body=s.body.toString());let l=await this.requestResource(a,e,s),d=x(l,{bearer:!0});if(c){if(!/^application\/jwt/.test(l.headers["content-type"]))throw new R({message:"expected application/jwt response from the userinfo_endpoint",response:l});let e=l.body.toString(),t=await this.decryptJWTUserinfo(e);if(this.userinfo_signed_response_alg)({payload:d}=await this.validateJWTUserinfo(t));else try{d=JSON.parse(t),u(A(d))}catch(e){throw new R({message:"failed to parse userinfo JWE payload as JSON",jwt:t})}}else try{d=JSON.parse(l.body)}catch(e){throw Object.defineProperty(e,"response",{value:l}),e}if(e instanceof k&&e.id_token){let t=e.claims().sub;if(d.sub!==t)throw new R({printf:["userinfo sub mismatch, expected %s, got: %s",t,d.sub],body:d,jwt:e.id_token})}return d}encryptionSecret(e){let t=e<=256?"sha256":e<=384?"sha384":e<=512&&"sha512";if(!t)throw Error("unsupported symmetric encryption key derivation");return c.createHash(t).update(this.client_secret).digest().slice(0,e/8)}secretForAlg(e){if(!this.client_secret)throw TypeError("client_secret is required");return/^A(\d{3})(?:GCM)?KW$/.test(e)?this.encryptionSecret(parseInt(RegExp.$1,10)):/^A(\d{3})(?:GCM|CBC-HS(\d{3}))$/.test(e)?this.encryptionSecret(parseInt(RegExp.$2||RegExp.$1,10)):new TextEncoder().encode(this.client_secret)}async grant(e,{clientAssertionPayload:t,DPoP:r}={},n){let i;E(this.issuer,"token_endpoint");let o=await N.call(this,"token",{form:e,responseType:"json"},{clientAssertionPayload:t,DPoP:r});try{i=x(o)}catch(i){if(n!==$&&i instanceof P&&"use_dpop_nonce"===i.error)return this.grant(e,{clientAssertionPayload:t,DPoP:r},$);throw i}return new k(i)}async deviceAuthorization(e={},{exchangeBody:t,clientAssertionPayload:r,DPoP:n}={}){E(this.issuer,"device_authorization_endpoint"),E(this.issuer,"token_endpoint");let i=Y.call(this,{client_id:this.client_id,redirect_uri:null,response_type:null,...e}),o=x(await N.call(this,"device_authorization",{responseType:"json",form:i},{clientAssertionPayload:r,endpointAuthMethod:"token"}));return new L({client:this,exchangeBody:t,clientAssertionPayload:r,response:o,maxAge:e.max_age,DPoP:n})}async revoke(e,t,{revokeBody:r,clientAssertionPayload:n}={}){if(E(this.issuer,"revocation_endpoint"),void 0!==t&&"string"!=typeof t)throw TypeError("hint must be a string");let i={...r,token:e};t&&(i.token_type_hint=t),x(await N.call(this,"revocation",{form:i},{clientAssertionPayload:n}),{body:!1})}async introspect(e,t,{introspectBody:r,clientAssertionPayload:n}={}){if(E(this.issuer,"introspection_endpoint"),void 0!==t&&"string"!=typeof t)throw TypeError("hint must be a string");let i={...r,token:e};return t&&(i.token_type_hint=t),x(await N.call(this,"introspection",{form:i,responseType:"json"},{clientAssertionPayload:n}))}static async register(e,t={}){let{initialAccessToken:r,jwks:n,...i}=t;return E(this.issuer,"registration_endpoint"),void 0===n||e.jwks||e.jwks_uri||(e.jwks=(await Z.call(this,n)).toJWKS()),new this(x(await C.call(this,{headers:{Accept:"application/json",...r?{Authorization:G(r)}:void 0},responseType:"json",json:e,url:this.issuer.registration_endpoint,method:"POST"}),{statusCode:201,bearer:!0}),n,i)}get metadata(){return H(Object.fromEntries(this.#u.entries()))}static async fromUri(e,t,r,n){return new this(x(await C.call(this,{method:"GET",url:e,responseType:"json",headers:{Authorization:G(t),Accept:"application/json"}}),{bearer:!0}),r,n)}async requestObject(e={},{sign:t=this.request_object_signing_alg||"none",encrypt:{alg:r=this.request_object_encryption_alg,enc:n=this.request_object_encryption_enc||"A128CBC-HS256"}={}}={}){let i,o;if(!A(e))throw TypeError("requestObject must be a plain object");let a=O(),s={alg:t,typ:"oauth-authz-req+jwt"},c=JSON.stringify(w({},e,{iss:this.client_id,aud:this.issuer.issuer,client_id:this.client_id,jti:T(),iat:a,exp:a+300,...this.fapi()?{nbf:a}:void 0}));if("none"===t)i=[b.encode(JSON.stringify(s)),b.encode(c),""].join(".");else{let e=t.startsWith("HS");if(e)o=this.secretForAlg(t);else{let e=await j.get(this);if(!e)throw TypeError(`no keystore present for client, cannot sign using alg ${t}`);if(!(o=e.get({alg:t,use:"sig"})))throw TypeError(`no key to sign with found for alg ${t}`)}i=await new h.CompactSign(new TextEncoder().encode(c)).setProtectedHeader({...s,kid:e?void 0:o.jwk.kid}).sign(e?o:await o.keyObject(t))}if(!r)return i;let u={alg:r,enc:n,cty:"oauth-authz-req+jwt"};return u.alg.match(/^(RSA|ECDH)/)?[o]=await W.call(this.issuer,{alg:u.alg,use:"enc"},{allowMulti:!0}):o=this.secretForAlg("dir"===u.alg?u.enc:u.alg),new h.CompactEncrypt(new TextEncoder().encode(i)).setProtectedHeader({...u,kid:o instanceof Uint8Array?void 0:o.jwk.kid}).encrypt(o instanceof Uint8Array?o:await o.keyObject(u.alg))}async pushedAuthorizationRequest(e={},{clientAssertionPayload:t}={}){E(this.issuer,"pushed_authorization_request_endpoint");let r={..."request"in e?e:Y.call(this,e),client_id:this.client_id},n=await N.call(this,"pushed_authorization_request",{responseType:"json",form:r},{clientAssertionPayload:t,endpointAuthMethod:"token"}),i=x(n,{statusCode:201});if(!("expires_in"in i))throw new R({message:"expected expires_in in Pushed Authorization Successful Response",response:n});if("number"!=typeof i.expires_in)throw new R({message:"invalid expires_in value in Pushed Authorization Successful Response",response:n});if(!("request_uri"in i))throw new R({message:"expected request_uri in Pushed Authorization Successful Response",response:n});if("string"!=typeof i.request_uri)throw new R({message:"invalid request_uri value in Pushed Authorization Successful Response",response:n});return i}get issuer(){return this.#l}[a.custom](){return`${this.constructor.name} ${a(this.metadata,{depth:1/0,colors:i.stdout.isTTY,compact:!1,sorted:!0})}`}fapi(){return this.fapi1()||this.fapi2()}fapi1(){return"FAPI1Client"===this.constructor.name}fapi2(){return"FAPI2Client"===this.constructor.name}async validateJARM(e){let t=this.authorization_signed_response_alg,{payload:r}=await this.validateJWT(e,t,["iss","exp","aud"]);return z(r)}async dpopProof(e,t,r){let i;if(!A(e))throw TypeError("payload must be a plain object");if(g(t))i=t;else if("CryptoKey"===t[Symbol.toStringTag])i=t;else if("node:crypto"===h.cryptoRuntime)i=c.createPrivateKey(t);else throw TypeError("unrecognized crypto runtime");if("private"!==i.type)throw TypeError('"DPoP" option must be a private key');let o=n.call(this,i,t);if(!o)throw TypeError("could not determine DPoP JWS Algorithm");return new h.SignJWT({ath:r?b.encode(c.createHash("sha256").update(r).digest()):void 0,...e}).setProtectedHeader({alg:o,typ:"dpop+jwt",jwk:await es(i,t)}).setIssuedAt().setJti(T()).sign(i)}}function en(e){switch(e.algorithm.name){case"Ed25519":case"Ed448":return"EdDSA";case"ECDSA":switch(e.algorithm.namedCurve){case"P-256":return"ES256";case"P-384":return"ES384";case"P-521":return"ES512"}break;case"RSASSA-PKCS1-v1_5":return`RS${e.algorithm.hash.name.slice(4)}`;case"RSA-PSS":return`PS${e.algorithm.hash.name.slice(4)}`;default:throw TypeError("unsupported DPoP private key")}}if("node:crypto"===h.cryptoRuntime){n=function(e,t){if("CryptoKey"===t[Symbol.toStringTag])return en(e);switch(e.asymmetricKeyType){case"ed25519":case"ed448":return"EdDSA";case"ec":return eo(e,t);case"rsa":case K&&"rsa-pss":return ei(e,t,this.issuer.dpop_signing_alg_values_supported);default:throw TypeError("unsupported DPoP private key")}};let e=/^(?:RS|PS)(?:256|384|512)$/;function ei(t,r,n){if("object"==typeof r&&"jwk"===r.format&&r.key&&r.key.alg)return r.key.alg;if(Array.isArray(n)){let r=n.filter(RegExp.prototype.test.bind(e));return"rsa-pss"===t.asymmetricKeyType&&(r=r.filter(e=>e.startsWith("PS"))),["PS256","PS384","PS512","RS256","RS384","RS384"].find(e=>r.includes(e))}return"PS256"}let t=o.from([42,134,72,206,61,3,1,7]),r=o.from([43,129,4,0,34]),i=o.from([43,129,4,0,35]),a=o.from([43,129,4,0,10]);function eo(e,n){switch("object"==typeof n&&"object"==typeof n.key&&n.key.crv){case"P-256":return"ES256";case"secp256k1":return"ES256K";case"P-384":return"ES384";case"P-512":return"ES512"}let o=e.export({format:"der",type:"pkcs8"}),s=o[1]<128?17:18,c=o[s],u=o.slice(s+1,s+1+c);if(u.equals(t))return"ES256";if(u.equals(r))return"ES384";if(u.equals(i))return"ES512";if(u.equals(a))return"ES256K";throw TypeError("unsupported DPoP private key curve")}}else n=en;let ea=new WeakMap;async function es(e,t){if("node:crypto"===h.cryptoRuntime&&"object"==typeof t&&"object"==typeof t.key&&"jwk"===t.format)return S(t.key,"kty","crv","x","y","e","n");if(ea.has(t))return ea.get(t);let r=S(await h.exportJWK(e),"kty","crv","x","y","e","n");return(g(t)||"WebCryptoAPI"===h.cryptoRuntime)&&ea.set(t,r),r}e.exports=(e,t=!1)=>class extends er{constructor(...r){super(e,t,...r)}static get issuer(){return e}},e.exports.BaseClient=er},47848:(e,t,r)=>{let n=r(68994),i=r(63426);e.exports=n.types.isKeyObject||(e=>e&&e instanceof i.KeyObject)},48041:e=>{var t="/";!function(){"use strict";var r={815:function(e){function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,n,i,o){n=n||"&",i=i||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(n);var c=1e3;o&&"number"==typeof o.maxKeys&&(c=o.maxKeys);var u=e.length;c>0&&u>c&&(u=c);for(var l=0;l<u;++l){var d,f,p,h,y=e[l].replace(s,"%20"),g=y.indexOf(i);g>=0?(d=y.substr(0,g),f=y.substr(g+1)):(d=y,f=""),p=decodeURIComponent(d),h=decodeURIComponent(f),t(a,p)?r(a[p])?a[p].push(h):a[p]=[a[p],h]:a[p]=h}return a};var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},577:function(e){var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,o,a,s){return(o=o||"&",a=a||"=",null===e&&(e=void 0),"object"==typeof e)?n(i(e),function(i){var s=encodeURIComponent(t(i))+a;return r(e[i])?n(e[i],function(e){return s+encodeURIComponent(t(e))}).join(o):s+encodeURIComponent(t(e[i]))}).join(o):s?encodeURIComponent(t(s))+a+encodeURIComponent(t(e)):""};var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function n(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n<e.length;n++)r.push(t(e[n],n));return r}var i=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}}},n={};function i(e){var t=n[e];if(void 0!==t)return t.exports;var o=n[e]={exports:{}},a=!0;try{r[e](o,o.exports,i),a=!1}finally{a&&delete n[e]}return o.exports}i.ab=t+"/";var o={};!function(){var e=o;e.decode=e.parse=i(815),e.encode=e.stringify=i(577)}(),e.exports=o}()},48454:e=>{e.exports.isAnEarlyCloseHost=function(e){return e&&e.match(".*google(apis)?.com$")}},48579:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var n=r(42226),i=r(41362);async function o(e){var t,r,o,a,s,c;let{sessionToken:u,profile:l,account:d,options:f}=e;if(!(null!=d&&d.providerAccountId)||!d.type)throw Error("Missing or invalid provider account");if(!["email","oauth"].includes(d.type))throw Error("Provider not supported");let{adapter:p,jwt:h,events:y,session:{strategy:g,generateSessionToken:m}}=f;if(!p)return{user:l,account:d};let b=l,{createUser:w,updateUser:v,getUser:_,getUserByAccount:E,getUserByEmail:S,linkAccount:A,createSession:x,getSessionAndUser:k,deleteSession:P}=p,R=null,O=null,T=!1,C="jwt"===g;if(u)if(C)try{(R=await h.decode({...h,token:u}))&&"sub"in R&&R.sub&&(O=await _(R.sub))}catch(e){}else{let e=await k(u);e&&(R=e.session,O=e.user)}if("email"===d.type){let e=await S(b.email);if(e)(null==(t=O)?void 0:t.id)!==e.id&&!C&&u&&await P(u),O=await v({id:e.id,emailVerified:new Date}),await (null==(r=y.updateUser)?void 0:r.call(y,{user:O}));else{let{id:e,...t}={...b,emailVerified:new Date};O=await w(t),await (null==(o=y.createUser)?void 0:o.call(y,{user:O})),T=!0}return{session:R=C?{}:await x({sessionToken:await m(),userId:O.id,expires:(0,i.fromDate)(f.session.maxAge)}),user:O,isNewUser:T}}if("oauth"===d.type){let e=await E({providerAccountId:d.providerAccountId,provider:d.provider});if(e){if(O){if(e.id===O.id)return{session:R,user:O,isNewUser:T};throw new n.AccountNotLinkedError("The account is already associated with another user")}return{session:R=C?{}:await x({sessionToken:await m(),userId:e.id,expires:(0,i.fromDate)(f.session.maxAge)}),user:e,isNewUser:T}}{if(O)return await A({...d,userId:O.id}),await (null==(c=y.linkAccount)?void 0:c.call(y,{user:O,account:d,profile:b})),{session:R,user:O,isNewUser:T};let e=b.email?await S(b.email):null;if(e){let t=f.provider;if(null!=t&&t.allowDangerousEmailAccountLinking)O=e;else throw new n.AccountNotLinkedError("Another account already exists with the same e-mail address")}else{let{id:e,...t}={...b,emailVerified:null};O=await w(t)}return await (null==(a=y.createUser)?void 0:a.call(y,{user:O})),await A({...d,userId:O.id}),await (null==(s=y.linkAccount)?void 0:s.call(y,{user:O,account:d,profile:b})),{session:R=C?{}:await x({sessionToken:await m(),userId:O.id,expires:(0,i.fromDate)(f.session.maxAge)}),user:O,isNewUser:!0}}}throw Error("Unsupported account type")}},49961:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createDedupedByCallsiteServerErrorLoggerDev",{enumerable:!0,get:function(){return u}});let n=o(r(14232));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}function o(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,r&&r.set(e,n),n}let a={current:null},s="function"==typeof n.cache?n.cache:e=>e,c=console.warn;function u(e){return function(...t){c(e(...t))}}s(e=>{try{c(a.current)}finally{a.current=null}})},51062:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var n=r(89918),i=r(68782),o=s(r(57260));function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}function s(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&({}).hasOwnProperty.call(e,o)){var s=i?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(n,o,s):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}async function c({options:e,query:t}){var r,a,s;let{logger:c,provider:u}=e,l={};if("string"==typeof u.authorization){let e=Object.fromEntries(new URL(u.authorization).searchParams);l={...l,...e}}else l={...l,...null==(a=u.authorization)?void 0:a.params};if(l={...l,...t},null!=(r=u.version)&&r.startsWith("1.")){let t=(0,i.oAuth1Client)(e),r=await t.getOAuthRequestToken(l),n=`${null==(s=u.authorization)?void 0:s.url}?${new URLSearchParams({oauth_token:r.oauth_token,oauth_token_secret:r.oauth_token_secret,...r.params})}`;return i.oAuth1TokenStore.set(r.oauth_token,r.oauth_token_secret),c.debug("GET_AUTHORIZATION_URL",{url:n,provider:u}),{redirect:n}}let d=await (0,n.openidClient)(e),f=l,p=[];await o.state.create(e,p,f),await o.pkce.create(e,p,f),await o.nonce.create(e,p,f);let h=d.authorizationUrl(f);return c.debug("GET_AUTHORIZATION_URL",{url:h,cookies:p,provider:u}),{redirect:h,cookies:p}}},52492:e=>{e.exports={assertSigningAlgValuesSupport:function(e,t,r){if(!t[`${e}_endpoint`])return;let n=`${e}_endpoint_auth_method`,i=`${e}_endpoint_auth_signing_alg`,o=`${e}_endpoint_auth_signing_alg_values_supported`;if(r[n]&&r[n].endsWith("_jwt")&&!r[i]&&!t[o])throw TypeError(`${o} must be configured on the issuer if ${i} is not defined on a client`)},assertIssuerConfiguration:function(e,t){if(!e[t])throw TypeError(`${t} must be configured on the issuer`)}}},53168:e=>{!function(t){e.exports=t()}(function(){return(function e(t,r,n){function i(a,s){if(!r[a]){if(!t[a]){var c=void 0;if(!s&&c)return require(a,!0);if(o)return o(a,!0);throw Error("Cannot find module '"+a+"'")}var u=r[a]={exports:{}};t[a][0].call(u.exports,function(e){return i(t[a][1][e]||e)},u,u.exports,e,t,r,n)}return r[a].exports}for(var o=void 0,a=0;a<n.length;a++)i(n[a]);return i})({1:[function(e,t,r){(function(n,i,o,a,s,c,u,l,d){"use strict";var f=e("crypto");function p(e,t){return function(e,t){if(void 0===(r="passthrough"!==t.algorithm?f.createHash(t.algorithm):new w).write&&(r.write=r.update,r.end=r.update),b(t,r).dispatch(e),r.update||r.end(""),r.digest)return r.digest("buffer"===t.encoding?void 0:t.encoding);var r,n=r.read();return"buffer"!==t.encoding?n.toString(t.encoding):n}(e,t=g(e,t))}(r=t.exports=p).sha1=function(e){return p(e)},r.keys=function(e){return p(e,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})},r.MD5=function(e){return p(e,{algorithm:"md5",encoding:"hex"})},r.keysMD5=function(e){return p(e,{algorithm:"md5",encoding:"hex",excludeValues:!0})};var h=f.getHashes?f.getHashes().slice():["sha1","md5"];h.push("passthrough");var y=["buffer","hex","binary","base64"];function g(e,t){var r={};if(r.algorithm=(t=t||{}).algorithm||"sha1",r.encoding=t.encoding||"hex",r.excludeValues=!!t.excludeValues,r.algorithm=r.algorithm.toLowerCase(),r.encoding=r.encoding.toLowerCase(),r.ignoreUnknown=!0===t.ignoreUnknown,r.respectType=!1!==t.respectType,r.respectFunctionNames=!1!==t.respectFunctionNames,r.respectFunctionProperties=!1!==t.respectFunctionProperties,r.unorderedArrays=!0===t.unorderedArrays,r.unorderedSets=!1!==t.unorderedSets,r.unorderedObjects=!1!==t.unorderedObjects,r.replacer=t.replacer||void 0,r.excludeKeys=t.excludeKeys||void 0,void 0===e)throw Error("Object argument required.");for(var n=0;n<h.length;++n)h[n].toLowerCase()===r.algorithm.toLowerCase()&&(r.algorithm=h[n]);if(-1===h.indexOf(r.algorithm))throw Error('Algorithm "'+r.algorithm+'" not supported. supported values: '+h.join(", "));if(-1===y.indexOf(r.encoding)&&"passthrough"!==r.algorithm)throw Error('Encoding "'+r.encoding+'" not supported. supported values: '+y.join(", "));return r}function m(e){if("function"==typeof e)return null!=/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i.exec(Function.prototype.toString.call(e))}function b(e,t,r){function n(e){return t.update?t.update(e,"utf8"):t.write(e,"utf8")}return r=r||[],{dispatch:function(t){return e.replacer&&(t=e.replacer(t)),this["_"+(null===t?"null":typeof t)](t)},_object:function(t){var i,a=Object.prototype.toString.call(t),s=/\[object (.*)\]/i.exec(a);if(s=(s=s?s[1]:"unknown:["+a+"]").toLowerCase(),0<=(i=r.indexOf(t)))return this.dispatch("[CIRCULAR:"+i+"]");if(r.push(t),void 0!==o&&o.isBuffer&&o.isBuffer(t))return n("buffer:"),n(t);if("object"===s||"function"===s||"asyncfunction"===s){var c=Object.keys(t);e.unorderedObjects&&(c=c.sort()),!1===e.respectType||m(t)||c.splice(0,0,"prototype","__proto__","constructor"),e.excludeKeys&&(c=c.filter(function(t){return!e.excludeKeys(t)})),n("object:"+c.length+":");var u=this;return c.forEach(function(r){u.dispatch(r),n(":"),e.excludeValues||u.dispatch(t[r]),n(",")})}if(!this["_"+s]){if(e.ignoreUnknown)return n("["+s+"]");throw Error('Unknown object type "'+s+'"')}this["_"+s](t)},_array:function(t,i){i=void 0!==i?i:!1!==e.unorderedArrays;var o=this;if(n("array:"+t.length+":"),!i||t.length<=1)return t.forEach(function(e){return o.dispatch(e)});var a=[],s=t.map(function(t){var n=new w,i=r.slice();return b(e,n,i).dispatch(t),a=a.concat(i.slice(r.length)),n.read().toString()});return r=r.concat(a),s.sort(),this._array(s,!1)},_date:function(e){return n("date:"+e.toJSON())},_symbol:function(e){return n("symbol:"+e.toString())},_error:function(e){return n("error:"+e.toString())},_boolean:function(e){return n("bool:"+e.toString())},_string:function(e){n("string:"+e.length+":"),n(e.toString())},_function:function(t){n("fn:"),m(t)?this.dispatch("[native]"):this.dispatch(t.toString()),!1!==e.respectFunctionNames&&this.dispatch("function-name:"+String(t.name)),e.respectFunctionProperties&&this._object(t)},_number:function(e){return n("number:"+e.toString())},_xml:function(e){return n("xml:"+e.toString())},_null:function(){return n("Null")},_undefined:function(){return n("Undefined")},_regexp:function(e){return n("regex:"+e.toString())},_uint8array:function(e){return n("uint8array:"),this.dispatch(Array.prototype.slice.call(e))},_uint8clampedarray:function(e){return n("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(e))},_int8array:function(e){return n("uint8array:"),this.dispatch(Array.prototype.slice.call(e))},_uint16array:function(e){return n("uint16array:"),this.dispatch(Array.prototype.slice.call(e))},_int16array:function(e){return n("uint16array:"),this.dispatch(Array.prototype.slice.call(e))},_uint32array:function(e){return n("uint32array:"),this.dispatch(Array.prototype.slice.call(e))},_int32array:function(e){return n("uint32array:"),this.dispatch(Array.prototype.slice.call(e))},_float32array:function(e){return n("float32array:"),this.dispatch(Array.prototype.slice.call(e))},_float64array:function(e){return n("float64array:"),this.dispatch(Array.prototype.slice.call(e))},_arraybuffer:function(e){return n("arraybuffer:"),this.dispatch(new Uint8Array(e))},_url:function(e){return n("url:"+e.toString())},_map:function(t){n("map:");var r=Array.from(t);return this._array(r,!1!==e.unorderedSets)},_set:function(t){n("set:");var r=Array.from(t);return this._array(r,!1!==e.unorderedSets)},_file:function(e){return n("file:"),this.dispatch([e.name,e.size,e.type,e.lastModfied])},_blob:function(){if(e.ignoreUnknown)return n("[blob]");throw Error('Hashing Blob objects is currently not supported\n(see https://github.com/puleos/object-hash/issues/26)\nUse "options.replacer" or "options.ignoreUnknown"\n')},_domwindow:function(){return n("domwindow")},_bigint:function(e){return n("bigint:"+e.toString())},_process:function(){return n("process")},_timer:function(){return n("timer")},_pipe:function(){return n("pipe")},_tcp:function(){return n("tcp")},_udp:function(){return n("udp")},_tty:function(){return n("tty")},_statwatcher:function(){return n("statwatcher")},_securecontext:function(){return n("securecontext")},_connection:function(){return n("connection")},_zlib:function(){return n("zlib")},_context:function(){return n("context")},_nodescript:function(){return n("nodescript")},_httpparser:function(){return n("httpparser")},_dataview:function(){return n("dataview")},_signal:function(){return n("signal")},_fsevent:function(){return n("fsevent")},_tlswrap:function(){return n("tlswrap")}}}function w(){return{buf:"",write:function(e){this.buf+=e},end:function(e){this.buf+=e},read:function(){return this.buf}}}r.writeToStream=function(e,t,r){return void 0===r&&(r=t,t={}),b(t=g(e,t),r).dispatch(e)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/fake_7eac155c.js","/")},{buffer:3,crypto:5,lYpoI2:10}],2:[function(e,t,r){(function(e,t,n,i,o,a,s,c,u){!function(e){"use strict";var t="undefined"!=typeof Uint8Array?Uint8Array:Array,r=43,n=47,i=48,o=97,a=65,s=45,c=95;function u(e){var t=e.charCodeAt(0);return t===r||t===s?62:t===n||t===c?63:t<i?-1:t<i+10?t-i+26+26:t<a+26?t-a:t<o+26?t-o+26:void 0}e.toByteArray=function(e){if(0<e.length%4)throw Error("Invalid string. Length must be a multiple of 4");var r,n,i=e.length,o="="===e.charAt(i-2)?2:+("="===e.charAt(i-1)),a=new t(3*e.length/4-o),s=0<o?e.length-4:e.length,c=0;function l(e){a[c++]=e}for(r=0;r<s;r+=4)l((0xff0000&(n=u(e.charAt(r))<<18|u(e.charAt(r+1))<<12|u(e.charAt(r+2))<<6|u(e.charAt(r+3))))>>16),l((65280&n)>>8),l(255&n);return 2==o?l(255&(n=u(e.charAt(r))<<2|u(e.charAt(r+1))>>4)):1==o&&(l((n=u(e.charAt(r))<<10|u(e.charAt(r+1))<<4|u(e.charAt(r+2))>>2)>>8&255),l(255&n)),a},e.fromByteArray=function(e){var t,r,n,i,o=e.length%3,a="";function s(e){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e)}for(t=0,n=e.length-o;t<n;t+=3)a+=s((i=r=(e[t]<<16)+(e[t+1]<<8)+e[t+2])>>18&63)+s(i>>12&63)+s(i>>6&63)+s(63&i);switch(o){case 1:a+=s((r=e[e.length-1])>>2),a+=s(r<<4&63),a+="==";break;case 2:a+=s((r=(e[e.length-2]<<8)+e[e.length-1])>>10),a+=s(r>>4&63),a+=s(r<<2&63),a+="="}return a}}(void 0===r?this.base64js={}:r)}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:10}],3:[function(e,t,r){(function(t,n,i,o,a,s,c,u,l){var d=e("base64-js"),f=e("ieee754");function i(e,t,r){if(!(this instanceof i))return new i(e,t,r);var n,o,a,s,c,u=typeof e;if("base64"===t&&"string"==u)for(e=(n=e).trim?n.trim():n.replace(/^\s+|\s+$/g,"");e.length%4!=0;)e+="=";if("number"==u)o=T(e);else if("string"==u)o=i.byteLength(e,t);else{if("object"!=u)throw Error("First argument needs to be a number, array or string.");o=T(e.length)}if(i._useTypedArrays?a=i._augment(new Uint8Array(o)):((a=this).length=o,a._isBuffer=!0),i._useTypedArrays&&"number"==typeof e.byteLength)a._set(e);else if(C(c=e)||i.isBuffer(c)||c&&"object"==typeof c&&"number"==typeof c.length)for(s=0;s<o;s++)i.isBuffer(e)?a[s]=e.readUInt8(s):a[s]=e[s];else if("string"==u)a.write(e,0,t);else if("number"==u&&!i._useTypedArrays&&!r)for(s=0;s<o;s++)a[s]=0;return a}function p(e,t,r,n){return i._charsWritten=H(function(e){for(var t=[],r=0;r<e.length;r++)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function h(e,t,r,n){return i._charsWritten=H(function(e){for(var t,r,n=[],i=0;i<e.length;i++)r=(t=e.charCodeAt(i))>>8,n.push(t%256),n.push(r);return n}(t),e,r,n)}function y(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;i++)n+=String.fromCharCode(e[i]);return n}function g(e,t,r,n){n||(L("boolean"==typeof r,"missing or invalid endian"),L(null!=t,"missing offset"),L(t+1<e.length,"Trying to read beyond buffer length"));var i,o=e.length;if(!(o<=t))return r?(i=e[t],t+1<o&&(i|=e[t+1]<<8)):(i=e[t]<<8,t+1<o&&(i|=e[t+1])),i}function m(e,t,r,n){n||(L("boolean"==typeof r,"missing or invalid endian"),L(null!=t,"missing offset"),L(t+3<e.length,"Trying to read beyond buffer length"));var i,o=e.length;if(!(o<=t))return r?(t+2<o&&(i=e[t+2]<<16),t+1<o&&(i|=e[t+1]<<8),i|=e[t],t+3<o&&(i+=e[t+3]<<24>>>0)):(t+1<o&&(i=e[t+1]<<16),t+2<o&&(i|=e[t+2]<<8),t+3<o&&(i|=e[t+3]),i+=e[t]<<24>>>0),i}function b(e,t,r,n){if(n||(L("boolean"==typeof r,"missing or invalid endian"),L(null!=t,"missing offset"),L(t+1<e.length,"Trying to read beyond buffer length")),!(e.length<=t)){var i=g(e,t,r,!0);return 32768&i?-1*(65535-i+1):i}}function w(e,t,r,n){if(n||(L("boolean"==typeof r,"missing or invalid endian"),L(null!=t,"missing offset"),L(t+3<e.length,"Trying to read beyond buffer length")),!(e.length<=t)){var i=m(e,t,r,!0);return 0x80000000&i?-1*(0xffffffff-i+1):i}}function v(e,t,r,n){return n||(L("boolean"==typeof r,"missing or invalid endian"),L(t+3<e.length,"Trying to read beyond buffer length")),f.read(e,t,r,23,4)}function _(e,t,r,n){return n||(L("boolean"==typeof r,"missing or invalid endian"),L(t+7<e.length,"Trying to read beyond buffer length")),f.read(e,t,r,52,8)}function E(e,t,r,n,i){i||(L(null!=t,"missing value"),L("boolean"==typeof n,"missing or invalid endian"),L(null!=r,"missing offset"),L(r+1<e.length,"trying to write beyond buffer length"),U(t,65535));var o=e.length;if(!(o<=r))for(var a=0,s=Math.min(o-r,2);a<s;a++)e[r+a]=(t&255<<8*(n?a:1-a))>>>8*(n?a:1-a)}function S(e,t,r,n,i){i||(L(null!=t,"missing value"),L("boolean"==typeof n,"missing or invalid endian"),L(null!=r,"missing offset"),L(r+3<e.length,"trying to write beyond buffer length"),U(t,0xffffffff));var o=e.length;if(!(o<=r))for(var a=0,s=Math.min(o-r,4);a<s;a++)e[r+a]=t>>>8*(n?a:3-a)&255}function A(e,t,r,n,i){i||(L(null!=t,"missing value"),L("boolean"==typeof n,"missing or invalid endian"),L(null!=r,"missing offset"),L(r+1<e.length,"Trying to write beyond buffer length"),M(t,32767,-32768)),e.length<=r||E(e,0<=t?t:65535+t+1,r,n,i)}function x(e,t,r,n,i){i||(L(null!=t,"missing value"),L("boolean"==typeof n,"missing or invalid endian"),L(null!=r,"missing offset"),L(r+3<e.length,"Trying to write beyond buffer length"),M(t,0x7fffffff,-0x80000000)),e.length<=r||S(e,0<=t?t:0xffffffff+t+1,r,n,i)}function k(e,t,r,n,i){i||(L(null!=t,"missing value"),L("boolean"==typeof n,"missing or invalid endian"),L(null!=r,"missing offset"),L(r+3<e.length,"Trying to write beyond buffer length"),W(t,34028234663852886e22,-34028234663852886e22)),e.length<=r||f.write(e,t,r,n,23,4)}function P(e,t,r,n,i){i||(L(null!=t,"missing value"),L("boolean"==typeof n,"missing or invalid endian"),L(null!=r,"missing offset"),L(r+7<e.length,"Trying to write beyond buffer length"),W(t,17976931348623157e292,-17976931348623157e292)),e.length<=r||f.write(e,t,r,n,52,8)}r.Buffer=i,r.SlowBuffer=i,r.INSPECT_MAX_BYTES=50,i.poolSize=8192,i._useTypedArrays=function(){try{var e=new ArrayBuffer(0),t=new Uint8Array(e);return t.foo=function(){return 42},42===t.foo()&&"function"==typeof t.subarray}catch(e){return!1}}(),i.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},i.isBuffer=function(e){return!(null==e||!e._isBuffer)},i.byteLength=function(e,t){var r;switch(e+="",t||"utf8"){case"hex":r=e.length/2;break;case"utf8":case"utf-8":r=j(e).length;break;case"ascii":case"binary":case"raw":r=e.length;break;case"base64":r=D(e).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":r=2*e.length;break;default:throw Error("Unknown encoding")}return r},i.concat=function(e,t){if(L(C(e),"Usage: Buffer.concat(list, [totalLength])\nlist should be an Array."),0===e.length)return new i(0);if(1===e.length)return e[0];if("number"!=typeof t)for(o=t=0;o<e.length;o++)t+=e[o].length;for(var r=new i(t),n=0,o=0;o<e.length;o++){var a=e[o];a.copy(r,n),n+=a.length}return r},i.prototype.write=function(e,t,r,n){isFinite(t)?isFinite(r)||(n=r,r=void 0):(o=n,n=t,t=r,r=o),t=Number(t)||0;var o,a,s,c,u,l,d,f,y,g,m=this.length-t;switch((!r||m<(r=Number(r)))&&(r=m),n=String(n||"utf8").toLowerCase()){case"hex":a=function(e,t,r,n){r=Number(r)||0;var o=e.length-r;(!n||o<(n=Number(n)))&&(n=o);var a=t.length;L(a%2==0,"Invalid hex string"),a/2<n&&(n=a/2);for(var s=0;s<n;s++){var c=parseInt(t.substr(2*s,2),16);L(!isNaN(c),"Invalid hex string"),e[r+s]=c}return i._charsWritten=2*s,s}(this,e,t,r);break;case"utf8":case"utf-8":d=this,f=e,y=t,g=r,a=i._charsWritten=H(j(f),d,y,g);break;case"ascii":case"binary":a=p(this,e,t,r);break;case"base64":s=this,c=e,u=t,l=r,a=i._charsWritten=H(D(c),s,u,l);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":a=h(this,e,t,r);break;default:throw Error("Unknown encoding")}return a},i.prototype.toString=function(e,t,r){var n,i,o,a,s=this;if(e=String(e||"utf8").toLowerCase(),t=Number(t)||0,(r=void 0!==r?Number(r):r=s.length)===t)return"";switch(e){case"hex":n=function(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||n<r)&&(r=n);for(var i="",o=t;o<r;o++)i+=I(e[o]);return i}(s,t,r);break;case"utf8":case"utf-8":n=function(e,t,r){var n="",i="";r=Math.min(e.length,r);for(var o=t;o<r;o++)e[o]<=127?(n+=N(i)+String.fromCharCode(e[o]),i=""):i+="%"+e[o].toString(16);return n+N(i)}(s,t,r);break;case"ascii":case"binary":n=y(s,t,r);break;case"base64":i=s,a=r,n=0===(o=t)&&a===i.length?d.fromByteArray(i):d.fromByteArray(i.slice(o,a));break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":n=function(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}(s,t,r);break;default:throw Error("Unknown encoding")}return n},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},i.prototype.copy=function(e,t,r,n){if(r=r||0,n||0===n||(n=this.length),t=t||0,n!==r&&0!==e.length&&0!==this.length){L(r<=n,"sourceEnd < sourceStart"),L(0<=t&&t<e.length,"targetStart out of bounds"),L(0<=r&&r<this.length,"sourceStart out of bounds"),L(0<=n&&n<=this.length,"sourceEnd out of bounds"),n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var o=n-r;if(o<100||!i._useTypedArrays)for(var a=0;a<o;a++)e[a+t]=this[a+r];else e._set(this.subarray(r,r+o),t)}},i.prototype.slice=function(e,t){var r=this.length;if(e=O(e,r,0),t=O(t,r,r),i._useTypedArrays)return i._augment(this.subarray(e,t));for(var n=t-e,o=new i(n,void 0,!0),a=0;a<n;a++)o[a]=this[a+e];return o},i.prototype.get=function(e){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(e)},i.prototype.set=function(e,t){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(e,t)},i.prototype.readUInt8=function(e,t){if(t||(L(null!=e,"missing offset"),L(e<this.length,"Trying to read beyond buffer length")),!(e>=this.length))return this[e]},i.prototype.readUInt16LE=function(e,t){return g(this,e,!0,t)},i.prototype.readUInt16BE=function(e,t){return g(this,e,!1,t)},i.prototype.readUInt32LE=function(e,t){return m(this,e,!0,t)},i.prototype.readUInt32BE=function(e,t){return m(this,e,!1,t)},i.prototype.readInt8=function(e,t){if(t||(L(null!=e,"missing offset"),L(e<this.length,"Trying to read beyond buffer length")),!(e>=this.length))return 128&this[e]?-1*(255-this[e]+1):this[e]},i.prototype.readInt16LE=function(e,t){return b(this,e,!0,t)},i.prototype.readInt16BE=function(e,t){return b(this,e,!1,t)},i.prototype.readInt32LE=function(e,t){return w(this,e,!0,t)},i.prototype.readInt32BE=function(e,t){return w(this,e,!1,t)},i.prototype.readFloatLE=function(e,t){return v(this,e,!0,t)},i.prototype.readFloatBE=function(e,t){return v(this,e,!1,t)},i.prototype.readDoubleLE=function(e,t){return _(this,e,!0,t)},i.prototype.readDoubleBE=function(e,t){return _(this,e,!1,t)},i.prototype.writeUInt8=function(e,t,r){r||(L(null!=e,"missing value"),L(null!=t,"missing offset"),L(t<this.length,"trying to write beyond buffer length"),U(e,255)),t>=this.length||(this[t]=e)},i.prototype.writeUInt16LE=function(e,t,r){E(this,e,t,!0,r)},i.prototype.writeUInt16BE=function(e,t,r){E(this,e,t,!1,r)},i.prototype.writeUInt32LE=function(e,t,r){S(this,e,t,!0,r)},i.prototype.writeUInt32BE=function(e,t,r){S(this,e,t,!1,r)},i.prototype.writeInt8=function(e,t,r){r||(L(null!=e,"missing value"),L(null!=t,"missing offset"),L(t<this.length,"Trying to write beyond buffer length"),M(e,127,-128)),t>=this.length||(0<=e?this.writeUInt8(e,t,r):this.writeUInt8(255+e+1,t,r))},i.prototype.writeInt16LE=function(e,t,r){A(this,e,t,!0,r)},i.prototype.writeInt16BE=function(e,t,r){A(this,e,t,!1,r)},i.prototype.writeInt32LE=function(e,t,r){x(this,e,t,!0,r)},i.prototype.writeInt32BE=function(e,t,r){x(this,e,t,!1,r)},i.prototype.writeFloatLE=function(e,t,r){k(this,e,t,!0,r)},i.prototype.writeFloatBE=function(e,t,r){k(this,e,t,!1,r)},i.prototype.writeDoubleLE=function(e,t,r){P(this,e,t,!0,r)},i.prototype.writeDoubleBE=function(e,t,r){P(this,e,t,!1,r)},i.prototype.fill=function(e,t,r){if(e=e||0,t=t||0,r=r||this.length,"string"==typeof e&&(e=e.charCodeAt(0)),L("number"==typeof e&&!isNaN(e),"value is not a number"),L(t<=r,"end < start"),r!==t&&0!==this.length){L(0<=t&&t<this.length,"start out of bounds"),L(0<=r&&r<=this.length,"end out of bounds");for(var n=t;n<r;n++)this[n]=e}},i.prototype.inspect=function(){for(var e=[],t=this.length,n=0;n<t;n++)if(e[n]=I(this[n]),n===r.INSPECT_MAX_BYTES){e[n+1]="...";break}return"<Buffer "+e.join(" ")+">"},i.prototype.toArrayBuffer=function(){if("undefined"==typeof Uint8Array)throw Error("Buffer.toArrayBuffer not supported in this browser");if(i._useTypedArrays)return new i(this).buffer;for(var e=new Uint8Array(this.length),t=0,r=e.length;t<r;t+=1)e[t]=this[t];return e.buffer};var R=i.prototype;function O(e,t,r){return"number"!=typeof e?r:t<=(e=~~e)?t:0<=e||0<=(e+=t)?e:0}function T(e){return(e=~~Math.ceil(+e))<0?0:e}function C(e){return(Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)})(e)}function I(e){return e<16?"0"+e.toString(16):e.toString(16)}function j(e){for(var t=[],r=0;r<e.length;r++){var n=e.charCodeAt(r);if(n<=127)t.push(e.charCodeAt(r));else{var i=r;55296<=n&&n<=57343&&r++;for(var o=encodeURIComponent(e.slice(i,r+1)).substr(1).split("%"),a=0;a<o.length;a++)t.push(parseInt(o[a],16))}}return t}function D(e){return d.toByteArray(e)}function H(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);i++)t[i+r]=e[i];return i}function N(e){try{return decodeURIComponent(e)}catch(e){return String.fromCharCode(65533)}}function U(e,t){L("number"==typeof e,"cannot write a non-number as a number"),L(0<=e,"specified a negative value for writing an unsigned value"),L(e<=t,"value is larger than maximum value for type"),L(Math.floor(e)===e,"value has a fractional component")}function M(e,t,r){L("number"==typeof e,"cannot write a non-number as a number"),L(e<=t,"value larger than maximum allowed value"),L(r<=e,"value smaller than minimum allowed value"),L(Math.floor(e)===e,"value has a fractional component")}function W(e,t,r){L("number"==typeof e,"cannot write a non-number as a number"),L(e<=t,"value larger than maximum allowed value"),L(r<=e,"value smaller than minimum allowed value")}function L(e,t){if(!e)throw Error(t||"Failed assertion")}i._augment=function(e){return e._isBuffer=!0,e._get=e.get,e._set=e.set,e.get=R.get,e.set=R.set,e.write=R.write,e.toString=R.toString,e.toLocaleString=R.toString,e.toJSON=R.toJSON,e.copy=R.copy,e.slice=R.slice,e.readUInt8=R.readUInt8,e.readUInt16LE=R.readUInt16LE,e.readUInt16BE=R.readUInt16BE,e.readUInt32LE=R.readUInt32LE,e.readUInt32BE=R.readUInt32BE,e.readInt8=R.readInt8,e.readInt16LE=R.readInt16LE,e.readInt16BE=R.readInt16BE,e.readInt32LE=R.readInt32LE,e.readInt32BE=R.readInt32BE,e.readFloatLE=R.readFloatLE,e.readFloatBE=R.readFloatBE,e.readDoubleLE=R.readDoubleLE,e.readDoubleBE=R.readDoubleBE,e.writeUInt8=R.writeUInt8,e.writeUInt16LE=R.writeUInt16LE,e.writeUInt16BE=R.writeUInt16BE,e.writeUInt32LE=R.writeUInt32LE,e.writeUInt32BE=R.writeUInt32BE,e.writeInt8=R.writeInt8,e.writeInt16LE=R.writeInt16LE,e.writeInt16BE=R.writeInt16BE,e.writeInt32LE=R.writeInt32LE,e.writeInt32BE=R.writeInt32BE,e.writeFloatLE=R.writeFloatLE,e.writeFloatBE=R.writeFloatBE,e.writeDoubleLE=R.writeDoubleLE,e.writeDoubleBE=R.writeDoubleBE,e.fill=R.fill,e.inspect=R.inspect,e.toArrayBuffer=R.toArrayBuffer,e}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/buffer/index.js","/node_modules/gulp-browserify/node_modules/buffer")},{"base64-js":2,buffer:3,ieee754:11,lYpoI2:10}],4:[function(e,t,r){(function(r,n,i,o,a,s,c,u,l){var i=e("buffer").Buffer,d=4,f=new i(4);f.fill(0),t.exports={hash:function(e,t,r,n){return i.isBuffer(e)||(e=new i(e)),function(e,t,r){for(var n=new i(t),o=r?n.writeInt32BE:n.writeInt32LE,a=0;a<e.length;a++)o.call(n,e[a],4*a,!0);return n}(t(function(e,t){var r;e.length%d!=0&&(r=e.length+(d-e.length%d),e=i.concat([e,f],r));for(var n=[],o=t?e.readInt32BE:e.readInt32LE,a=0;a<e.length;a+=d)n.push(o.call(e,a));return n}(e,n),8*e.length),r,n)}}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/helpers.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:10}],5:[function(e,t,r){(function(t,n,i,o,a,s,c,u,l){var i=e("buffer").Buffer,d=e("./sha"),f=e("./sha256"),p=e("./rng"),h={sha1:d,sha256:f,md5:e("./md5")},y=64,g=new i(64);function m(e,t){var r=h[e=e||"sha1"],n=[];return r||b("algorithm:",e,"is not yet supported"),{update:function(e){return i.isBuffer(e)||(e=new i(e)),n.push(e),e.length,this},digest:function(e){var o=i.concat(n),a=t?function(e,t,r){i.isBuffer(t)||(t=new i(t)),i.isBuffer(r)||(r=new i(r)),t.length>y?t=e(t):t.length<y&&(t=i.concat([t,g],y));for(var n=new i(y),o=new i(y),a=0;a<y;a++)n[a]=54^t[a],o[a]=92^t[a];var s=e(i.concat([n,r]));return e(i.concat([o,s]))}(r,t,o):r(o);return n=null,e?a.toString(e):a}}}function b(){var e=[].slice.call(arguments).join(" ");throw Error([e,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join("\n"))}g.fill(0),r.createHash=function(e){return m(e)},r.createHmac=m,r.randomBytes=function(e,t){if(!t||!t.call)return new i(p(e));try{t.call(this,void 0,new i(p(e)))}catch(e){t(e)}},function(e,t){for(var r in e)t(e[r],r)}(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],function(e){r[e]=function(){b("sorry,",e,"is not implemented yet")}})}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/index.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./md5":6,"./rng":7,"./sha":8,"./sha256":9,buffer:3,lYpoI2:10}],6:[function(e,t,r){(function(r,n,i,o,a,s,c,u,l){var d=e("./helpers");function f(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;for(var r=0x67452301,n=-0x10325477,i=-0x67452302,o=0x10325476,a=0;a<e.length;a+=16){var s=r,c=n,u=i,l=o,r=h(r,n,i,o,e[a+0],7,-0x28955b88),o=h(o,r,n,i,e[a+1],12,-0x173848aa),i=h(i,o,r,n,e[a+2],17,0x242070db),n=h(n,i,o,r,e[a+3],22,-0x3e423112);r=h(r,n,i,o,e[a+4],7,-0xa83f051),o=h(o,r,n,i,e[a+5],12,0x4787c62a),i=h(i,o,r,n,e[a+6],17,-0x57cfb9ed),n=h(n,i,o,r,e[a+7],22,-0x2b96aff),r=h(r,n,i,o,e[a+8],7,0x698098d8),o=h(o,r,n,i,e[a+9],12,-0x74bb0851),i=h(i,o,r,n,e[a+10],17,-42063),n=h(n,i,o,r,e[a+11],22,-0x76a32842),r=h(r,n,i,o,e[a+12],7,0x6b901122),o=h(o,r,n,i,e[a+13],12,-0x2678e6d),i=h(i,o,r,n,e[a+14],17,-0x5986bc72),r=y(r,n=h(n,i,o,r,e[a+15],22,0x49b40821),i,o,e[a+1],5,-0x9e1da9e),o=y(o,r,n,i,e[a+6],9,-0x3fbf4cc0),i=y(i,o,r,n,e[a+11],14,0x265e5a51),n=y(n,i,o,r,e[a+0],20,-0x16493856),r=y(r,n,i,o,e[a+5],5,-0x29d0efa3),o=y(o,r,n,i,e[a+10],9,0x2441453),i=y(i,o,r,n,e[a+15],14,-0x275e197f),n=y(n,i,o,r,e[a+4],20,-0x182c0438),r=y(r,n,i,o,e[a+9],5,0x21e1cde6),o=y(o,r,n,i,e[a+14],9,-0x3cc8f82a),i=y(i,o,r,n,e[a+3],14,-0xb2af279),n=y(n,i,o,r,e[a+8],20,0x455a14ed),r=y(r,n,i,o,e[a+13],5,-0x561c16fb),o=y(o,r,n,i,e[a+2],9,-0x3105c08),i=y(i,o,r,n,e[a+7],14,0x676f02d9),r=g(r,n=y(n,i,o,r,e[a+12],20,-0x72d5b376),i,o,e[a+5],4,-378558),o=g(o,r,n,i,e[a+8],11,-0x788e097f),i=g(i,o,r,n,e[a+11],16,0x6d9d6122),n=g(n,i,o,r,e[a+14],23,-0x21ac7f4),r=g(r,n,i,o,e[a+1],4,-0x5b4115bc),o=g(o,r,n,i,e[a+4],11,0x4bdecfa9),i=g(i,o,r,n,e[a+7],16,-0x944b4a0),n=g(n,i,o,r,e[a+10],23,-0x41404390),r=g(r,n,i,o,e[a+13],4,0x289b7ec6),o=g(o,r,n,i,e[a+0],11,-0x155ed806),i=g(i,o,r,n,e[a+3],16,-0x2b10cf7b),n=g(n,i,o,r,e[a+6],23,0x4881d05),r=g(r,n,i,o,e[a+9],4,-0x262b2fc7),o=g(o,r,n,i,e[a+12],11,-0x1924661b),i=g(i,o,r,n,e[a+15],16,0x1fa27cf8),r=m(r,n=g(n,i,o,r,e[a+2],23,-0x3b53a99b),i,o,e[a+0],6,-0xbd6ddbc),o=m(o,r,n,i,e[a+7],10,0x432aff97),i=m(i,o,r,n,e[a+14],15,-0x546bdc59),n=m(n,i,o,r,e[a+5],21,-0x36c5fc7),r=m(r,n,i,o,e[a+12],6,0x655b59c3),o=m(o,r,n,i,e[a+3],10,-0x70f3336e),i=m(i,o,r,n,e[a+10],15,-1051523),n=m(n,i,o,r,e[a+1],21,-0x7a7ba22f),r=m(r,n,i,o,e[a+8],6,0x6fa87e4f),o=m(o,r,n,i,e[a+15],10,-0x1d31920),i=m(i,o,r,n,e[a+6],15,-0x5cfebcec),n=m(n,i,o,r,e[a+13],21,0x4e0811a1),r=m(r,n,i,o,e[a+4],6,-0x8ac817e),o=m(o,r,n,i,e[a+11],10,-0x42c50dcb),i=m(i,o,r,n,e[a+2],15,0x2ad7d2bb),n=m(n,i,o,r,e[a+9],21,-0x14792c6f),r=b(r,s),n=b(n,c),i=b(i,u),o=b(o,l)}return[r,n,i,o]}function p(e,t,r,n,i,o){var a,s;return b((a=b(b(t,e),b(n,o)))<<(s=i)|a>>>32-s,r)}function h(e,t,r,n,i,o,a){return p(t&r|~t&n,e,t,i,o,a)}function y(e,t,r,n,i,o,a){return p(t&n|r&~n,e,t,i,o,a)}function g(e,t,r,n,i,o,a){return p(t^r^n,e,t,i,o,a)}function m(e,t,r,n,i,o,a){return p(r^(t|~n),e,t,i,o,a)}function b(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}t.exports=function(e){return d.hash(e,f,16)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:10}],7:[function(e,t,r){(function(e,r,n,i,o,a,s,c,u){var l,d;d=function(e){for(var t,r=Array(e),n=0;n<e;n++)0==(3&n)&&(t=0x100000000*Math.random()),r[n]=t>>>((3&n)<<3)&255;return r},t.exports=l||d}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:10}],8:[function(e,t,r){(function(r,n,i,o,a,s,c,u,l){var d=e("./helpers");function f(e,t){e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(var r,n,i,o,a,s=Array(80),c=0x67452301,u=-0x10325477,l=-0x67452302,d=0x10325476,f=-0x3c2d1e10,y=0;y<e.length;y+=16){for(var g=c,m=u,b=l,w=d,v=f,_=0;_<80;_++){s[_]=_<16?e[y+_]:h(s[_-3]^s[_-8]^s[_-14]^s[_-16],1);var E=p(p(h(c,5),(i=u,o=l,a=d,(n=_)<20?i&o|~i&a:!(n<40)&&n<60?i&o|i&a|o&a:i^o^a)),p(p(f,s[_]),(r=_)<20?0x5a827999:r<40?0x6ed9eba1:r<60?-0x70e44324:-0x359d3e2a)),f=d,d=l,l=h(u,30),u=c,c=E}c=p(c,g),u=p(u,m),l=p(l,b),d=p(d,w),f=p(f,v)}return[c,u,l,d,f]}function p(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function h(e,t){return e<<t|e>>>32-t}t.exports=function(e){return d.hash(e,f,20,!0)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:10}],9:[function(e,t,r){(function(r,n,i,o,a,s,c,u,l){function d(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function f(e,t){return e>>>t|e<<32-t}function p(e,t){var r,n,i,o,a,s,c,u,l,p,h=[0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2],y=[0x6a09e667,0xbb67ae85,0x3c6ef372,0xa54ff53a,0x510e527f,0x9b05688c,0x1f83d9ab,0x5be0cd19],g=Array(64);e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(var m,b,w,v,_,E,S,A,x=0;x<e.length;x+=16){r=y[0],n=y[1],i=y[2],o=y[3],a=y[4],s=y[5],c=y[6],u=y[7];for(var k=0;k<64;k++)g[k]=k<16?e[k+x]:d(d(d(f(A=g[k-2],17)^f(A,19)^A>>>10,g[k-7]),f(S=g[k-15],7)^f(S,18)^S>>>3),g[k-16]),l=d(d(d(d(u,f(E=a,6)^f(E,11)^f(E,25)),(_=a)&s^~_&c),h[k]),g[k]),p=d(f(v=r,2)^f(v,13)^f(v,22),(m=r)&(b=n)^m&(w=i)^b&w),u=c,c=s,s=a,a=d(o,l),o=i,i=n,n=r,r=d(l,p);y[0]=d(r,y[0]),y[1]=d(n,y[1]),y[2]=d(i,y[2]),y[3]=d(o,y[3]),y[4]=d(a,y[4]),y[5]=d(s,y[5]),y[6]=d(c,y[6]),y[7]=d(u,y[7])}return y}var h=e("./helpers");t.exports=function(e){return h.hash(e,p,32,!0)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:10}],10:[function(e,t,r){(function(e,r,n,i,o,a,s,c,u){function l(){}(e=t.exports={}).nextTick=function(){var e="undefined"!=typeof window&&window.setImmediate,t="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(e)return function(e){return window.setImmediate(e)};if(t){var r=[];return window.addEventListener("message",function(e){var t=e.source;t!==window&&null!==t||"process-tick"!==e.data||(e.stopPropagation(),0<r.length&&r.shift()())},!0),function(e){r.push(e),window.postMessage("process-tick","*")}}return function(e){setTimeout(e,0)}}(),e.title="browser",e.browser=!0,e.env={},e.argv=[],e.on=l,e.addListener=l,e.once=l,e.off=l,e.removeListener=l,e.removeAllListeners=l,e.emit=l,e.binding=function(e){throw Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(e){throw Error("process.chdir is not supported")}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/process/browser.js","/node_modules/gulp-browserify/node_modules/process")},{buffer:3,lYpoI2:10}],11:[function(e,t,r){(function(e,t,n,i,o,a,s,c,u){r.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,c=(1<<s)-1,u=c>>1,l=-7,d=r?i-1:0,f=r?-1:1,p=e[t+d];for(d+=f,o=p&(1<<-l)-1,p>>=-l,l+=s;0<l;o=256*o+e[t+d],d+=f,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;0<l;a=256*a+e[t+d],d+=f,l-=8);if(0===o)o=1-u;else{if(o===c)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),o-=u}return(p?-1:1)*a*Math.pow(2,o-n)},r.write=function(e,t,r,n,i,o){var a,s,c,u=8*o-i-1,l=(1<<u)-1,d=l>>1,f=5960464477539062e-23*(23===i),p=n?0:o-1,h=n?1:-1,y=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||t===1/0?(s=+!!isNaN(t),a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),2<=(t+=1<=a+d?f/c:f*Math.pow(2,1-d))*c&&(a++,c/=2),l<=a+d?(s=0,a=l):1<=a+d?(s=(t*c-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));8<=i;e[r+p]=255&s,p+=h,s/=256,i-=8);for(a=a<<i|s,u+=i;0<u;e[r+p]=255&a,p+=h,a/=256,u-=8);e[r+p-h]|=128*y}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/ieee754/index.js","/node_modules/ieee754")},{buffer:3,lYpoI2:10}]},{},[1])(1)})},53412:(e,t,r)=>{let n=r(79289);function i(e,t,...r){for(let o of r)if(n(o))for(let[r,a]of Object.entries(o))"__proto__"!==r&&"constructor"!==r&&(void 0===t[r]&&void 0!==a&&(t[r]=a),e&&n(t[r])&&n(a)&&i(!0,t[r],a));return t}e.exports=i.bind(void 0,!1),e.exports.deep=i.bind(void 0,!0)},53441:(e,t)=>{"use strict";t.parse=c,t.serialize=d;var r=Object.prototype.toString,n=Object.prototype.hasOwnProperty,i=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,o=/^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/,a=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,s=/^[\u0020-\u003A\u003D-\u007E]*$/;function c(e,t){if("string"!=typeof e)throw TypeError("argument str must be a string");var r={},i=e.length;if(i<2)return r;var o=t&&t.decode||f,a=0,s=0,c=0;do{if(-1===(s=e.indexOf("=",a)))break;if(-1===(c=e.indexOf(";",a)))c=i;else if(s>c){a=e.lastIndexOf(";",s-1)+1;continue}var d=u(e,a,s),p=l(e,s,d),y=e.slice(d,p);if(!n.call(r,y)){var g=u(e,s+1,c),m=l(e,c,g);34===e.charCodeAt(g)&&34===e.charCodeAt(m-1)&&(g++,m--);var b=e.slice(g,m);r[y]=h(b,o)}a=c+1}while(a<i);return r}function u(e,t,r){do{var n=e.charCodeAt(t);if(32!==n&&9!==n)return t}while(++t<r);return r}function l(e,t,r){for(;t>r;){var n=e.charCodeAt(--t);if(32!==n&&9!==n)return t+1}return r}function d(e,t,r){var n=r&&r.encode||encodeURIComponent;if("function"!=typeof n)throw TypeError("option encode is invalid");if(!i.test(e))throw TypeError("argument name is invalid");var c=n(t);if(!o.test(c))throw TypeError("argument val is invalid");var u=e+"="+c;if(!r)return u;if(null!=r.maxAge){var l=Math.floor(r.maxAge);if(!isFinite(l))throw TypeError("option maxAge is invalid");u+="; Max-Age="+l}if(r.domain){if(!a.test(r.domain))throw TypeError("option domain is invalid");u+="; Domain="+r.domain}if(r.path){if(!s.test(r.path))throw TypeError("option path is invalid");u+="; Path="+r.path}if(r.expires){var d=r.expires;if(!p(d)||isNaN(d.valueOf()))throw TypeError("option expires is invalid");u+="; Expires="+d.toUTCString()}if(r.httpOnly&&(u+="; HttpOnly"),r.secure&&(u+="; Secure"),r.partitioned&&(u+="; Partitioned"),r.priority)switch("string"==typeof r.priority?r.priority.toLowerCase():r.priority){case"low":u+="; Priority=Low";break;case"medium":u+="; Priority=Medium";break;case"high":u+="; Priority=High";break;default:throw TypeError("option priority is invalid")}if(r.sameSite)switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:case"strict":u+="; SameSite=Strict";break;case"lax":u+="; SameSite=Lax";break;case"none":u+="; SameSite=None";break;default:throw TypeError("option sameSite is invalid")}return u}function f(e){return -1!==e.indexOf("%")?decodeURIComponent(e):e}function p(e){return"[object Date]"===r.call(e)}function h(e,t){try{return t(e)}catch(t){return e}}},53992:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBody=o,t.setCookie=i,t.toResponse=a;var n=r(53441);function i(e,t){var r;let i=null!=(r=e.getHeader("Set-Cookie"))?r:[];Array.isArray(i)||(i=[i]);let{name:o,value:a,options:s}=t,c=(0,n.serialize)(o,a,s);i.push(c),e.setHeader("Set-Cookie",i)}async function o(e){if(!("body"in e)||!e.body||"POST"!==e.method)return;let t=e.headers.get("content-type");return null!=t&&t.includes("application/json")?await e.json():null!=t&&t.includes("application/x-www-form-urlencoded")?Object.fromEntries(new URLSearchParams(await e.text())):void 0}function a(e){var t,r,i;let o=new Headers(null==(t=e.headers)?void 0:t.reduce((e,{key:t,value:r})=>(e[t]=r,e),{}));null==(r=e.cookies)||r.forEach(e=>{let{name:t,value:r,options:i}=e,a=(0,n.serialize)(t,r,i);o.has("Set-Cookie")?o.append("Set-Cookie",a):o.set("Set-Cookie",a)});let a=e.body;"application/json"===o.get("content-type")?a=JSON.stringify(e.body):"application/x-www-form-urlencoded"===o.get("content-type")&&(a=new URLSearchParams(e.body).toString());let s=new Response(a,{headers:o,status:e.redirect?302:null!=(i=e.status)?i:200});return e.redirect&&s.headers.set("Location",e.redirect),s}},55786:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{bindSnapshot:function(){return a},createAsyncLocalStorage:function(){return o},createSnapshot:function(){return s}});let r=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class n{disable(){throw r}getStore(){}run(){throw r}exit(){throw r}enterWith(){throw r}static bind(e){return e}}let i="undefined"!=typeof globalThis&&globalThis.AsyncLocalStorage;function o(){return i?new i:new n}function a(e){return i?i.bind(e):n.bind(e)}function s(){return i?i.snapshot():function(e,...t){return e(...t)}}},56106:e=>{"use strict";e.exports=JSON.parse('{"name":"openid-client","version":"5.7.1","description":"OpenID Connect Relying Party (RP, Client) implementation for Node.js runtime, supports passportjs","keywords":["auth","authentication","basic","certified","client","connect","dynamic","electron","hybrid","identity","implicit","oauth","oauth2","oidc","openid","passport","relying party","strategy"],"homepage":"https://github.com/panva/openid-client","repository":"panva/openid-client","funding":{"url":"https://github.com/sponsors/panva"},"license":"MIT","author":"Filip Skokan <panva.ip@gmail.com>","exports":{"types":"./types/index.d.ts","import":"./lib/index.mjs","require":"./lib/index.js"},"main":"./lib/index.js","types":"./types/index.d.ts","files":["lib","types/index.d.ts"],"scripts":{"format":"npx prettier --loglevel silent --write ./lib ./test ./certification ./types","test":"mocha test/**/*.test.js"},"dependencies":{"jose":"^4.15.9","lru-cache":"^6.0.0","object-hash":"^2.2.0","oidc-token-hash":"^5.0.3"},"devDependencies":{"@types/node":"^16.18.106","@types/passport":"^1.0.16","base64url":"^3.0.1","chai":"^4.5.0","mocha":"^10.7.3","nock":"^13.5.5","prettier":"^2.8.8","readable-mock-req":"^0.2.2","sinon":"^9.2.4","timekeeper":"^2.3.1"},"standard-version":{"scripts":{"postchangelog":"sed -i \'\' -e \'s/### \\\\[/## [/g\' CHANGELOG.md"},"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Fixes"},{"type":"chore","hidden":true},{"type":"docs","hidden":true},{"type":"style","hidden":true},{"type":"refactor","section":"Refactor","hidden":false},{"type":"perf","section":"Performance","hidden":false},{"type":"test","hidden":true}]}}')},57049:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorage",{enumerable:!0,get:function(){return n.workAsyncStorageInstance}});let n=r(320)},57260:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pkce=t.nonce=t.PKCE_CODE_CHALLENGE_METHOD=void 0,t.signCookie=s,t.state=void 0;var n=r(89632),i=a(r(61075));function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}function a(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&({}).hasOwnProperty.call(e,a)){var s=i?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,r&&r.set(e,n),n}async function s(e,t,r,n){let{cookies:o,logger:a}=n;a.debug(`CREATE_${e.toUpperCase()}`,{value:t,maxAge:r});let{name:s}=o[e],c=new Date;return c.setTime(c.getTime()+1e3*r),{name:s,value:await i.encode({...n.jwt,maxAge:r,token:{value:t},salt:s}),options:{...o[e].options,expires:c}}}let c=900,u=t.PKCE_CODE_CHALLENGE_METHOD="S256";t.pkce={async create(e,t,r){var i,o;if(!(null!=(i=e.provider)&&null!=(i=i.checks)&&i.includes("pkce")))return;let a=n.generators.codeVerifier();r.code_challenge=n.generators.codeChallenge(a),r.code_challenge_method=u;let l=null!=(o=e.cookies.pkceCodeVerifier.options.maxAge)?o:c;t.push(await s("pkceCodeVerifier",a,l,e))},async use(e,t,r,n){var o;if(!(null!=(o=r.provider)&&null!=(o=o.checks)&&o.includes("pkce")))return;let a=null==e?void 0:e[r.cookies.pkceCodeVerifier.name];if(!a)throw TypeError("PKCE code_verifier cookie was missing.");let{name:s}=r.cookies.pkceCodeVerifier,c=await i.decode({...r.jwt,token:a,salt:s});if(!(null!=c&&c.value))throw TypeError("PKCE code_verifier value could not be parsed.");t.push({name:s,value:"",options:{...r.cookies.pkceCodeVerifier.options,maxAge:0}}),n.code_verifier=c.value}};let l=900;t.state={async create(e,t,r){var i,o;if(!(null!=(i=e.provider.checks)&&i.includes("state")))return;let a=n.generators.state();r.state=a;let c=null!=(o=e.cookies.state.options.maxAge)?o:l;t.push(await s("state",a,c,e))},async use(e,t,r,n){var o;if(!(null!=(o=r.provider.checks)&&o.includes("state")))return;let a=null==e?void 0:e[r.cookies.state.name];if(!a)throw TypeError("State cookie was missing.");let{name:s}=r.cookies.state,c=await i.decode({...r.jwt,token:a,salt:s});if(!(null!=c&&c.value))throw TypeError("State value could not be parsed.");t.push({name:s,value:"",options:{...r.cookies.state.options,maxAge:0}}),n.state=c.value}};let d=900;t.nonce={async create(e,t,r){var i,o;if(!(null!=(i=e.provider.checks)&&i.includes("nonce")))return;let a=n.generators.nonce();r.nonce=a;let c=null!=(o=e.cookies.nonce.options.maxAge)?o:d;t.push(await s("nonce",a,c,e))},async use(e,t,r,n){var o;if(!(null!=(o=r.provider)&&null!=(o=o.checks)&&o.includes("nonce")))return;let a=null==e?void 0:e[r.cookies.nonce.name];if(!a)throw TypeError("Nonce cookie was missing.");let{name:s}=r.cookies.nonce,c=await i.decode({...r.jwt,token:a,salt:s});if(!(null!=c&&c.value))throw TypeError("Nonce value could not be parsed.");t.push({name:s,value:"",options:{...r.cookies.nonce.options,maxAge:0}}),n.nonce=c.value}}},57735:(e,t,r)=>{"use strict";var n=r(65364);function i(e,t){var r;return(null!=(r=n.env.VERCEL)?r:n.env.AUTH_TRUST_HOST)?`${"http"===t?"http":"https"}://${e}`:n.env.NEXTAUTH_URL}Object.defineProperty(t,"__esModule",{value:!0}),t.detectOrigin=i},58184:(e,t,r)=>{var n="/";!function(){var t={528:function(e,t,r){var n=r(685),i=r(310),o=e.exports;for(var a in n)n.hasOwnProperty(a)&&(o[a]=n[a]);function s(e){if("string"==typeof e&&(e=i.parse(e)),e.protocol||(e.protocol="https:"),"https:"!==e.protocol)throw Error('Protocol "'+e.protocol+'" not supported. Expected "https:"');return e}o.request=function(e,t){return e=s(e),n.request.call(this,e,t)},o.get=function(e,t){return e=s(e),n.get.call(this,e,t)}},685:function(e){"use strict";e.exports=r(40939)},310:function(e){"use strict";e.exports=r(3305)}},i={};function o(e){var r=i[e];if(void 0!==r)return r.exports;var n=i[e]={exports:{}},a=!0;try{t[e](n,n.exports,o),a=!1}finally{a&&delete i[e]}return n.exports}o.ab=n+"/",e.exports=o(528)}()},58291:(e,t,r)=>{"use strict";var n=r(29563);Object.defineProperty(t,"__esModule",{value:!0}),t.assertConfig=u;var i=r(42226),o=n(r(40316)),a=r(3883);let s=!1;function c(e,t){try{return/^https?:/.test(new URL(e,e.startsWith("/")?t:void 0).protocol)}catch(e){return!1}}function u(e){var t,r,n,u,l,d,f;let p,h,y,{options:g,req:m}=e,b=[];if(!s&&(m.origin||b.push("NEXTAUTH_URL"),g.secret,g.debug&&b.push("DEBUG_ENABLED")),!g.secret)return new i.MissingSecret("Please define a `secret` in production.");if(!(null!=(t=m.query)&&t.nextauth)&&!m.action)return new i.MissingAPIRoute("Cannot find [...nextauth].{js,ts} in `/pages/api/auth`. Make sure the filename is written correctly.");let w=null==(r=m.query)?void 0:r.callbackUrl,v=(0,o.default)(m.origin);if(w&&!c(w,v.base))return new i.InvalidCallbackUrl(`Invalid callback URL. Received: ${w}`);let{callbackUrl:_}=(0,a.defaultCookies)(null!=(n=g.useSecureCookies)?n:v.base.startsWith("https://")),E=null==(u=m.cookies)?void 0:u[null!=(l=null==(d=g.cookies)||null==(d=d.callbackUrl)?void 0:d.name)?l:_.name];if(E&&!c(E,v.base))return new i.InvalidCallbackUrl(`Invalid callback URL. Received: ${E}`);for(let e of g.providers)"credentials"===e.type?p=!0:"email"===e.type?h=!0:"twitter"===e.id&&"2.0"===e.version&&(y=!0);if(p){let e=(null==(f=g.session)?void 0:f.strategy)==="database",t=!g.providers.some(e=>"credentials"!==e.type);if(e&&t)return new i.UnsupportedStrategy("Signin in with credentials only supported if JWT strategy is enabled");if(g.providers.some(e=>"credentials"===e.type&&!e.authorize))return new i.MissingAuthorize("Must define an authorize() handler to use credentials authentication provider")}if(h){let{adapter:e}=g;if(!e)return new i.MissingAdapter("E-mail login requires an adapter.");let t=["createVerificationToken","useVerificationToken","getUserByEmail"].filter(t=>!e[t]);if(t.length)return new i.MissingAdapterMethods(`Required adapter methods were missing: ${t.join(", ")}`)}return s||(y&&b.push("TWITTER_OAUTH_2_BETA"),s=!0),b}},60106:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});let{Decimal:n,objectEnumValues:i,makeStrictEnum:o,Public:a,getRuntime:s,skip:c}=r(88267),u={};t.Prisma=u,t.$Enums={},u.prismaVersion={client:"6.15.0",engine:"85179d7826409ee107a6ba334b5e305ae3fba9fb"},u.PrismaClientKnownRequestError=()=>{let e=s().prettyName;throw Error(`PrismaClientKnownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${e}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`)},u.PrismaClientUnknownRequestError=()=>{let e=s().prettyName;throw Error(`PrismaClientUnknownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${e}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`)},u.PrismaClientRustPanicError=()=>{let e=s().prettyName;throw Error(`PrismaClientRustPanicError is unable to run in this browser environment, or has been bundled for the browser (running in ${e}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`)},u.PrismaClientInitializationError=()=>{let e=s().prettyName;throw Error(`PrismaClientInitializationError is unable to run in this browser environment, or has been bundled for the browser (running in ${e}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`)},u.PrismaClientValidationError=()=>{let e=s().prettyName;throw Error(`PrismaClientValidationError is unable to run in this browser environment, or has been bundled for the browser (running in ${e}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`)},u.Decimal=n,u.sql=()=>{let e=s().prettyName;throw Error(`sqltag is unable to run in this browser environment, or has been bundled for the browser (running in ${e}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`)},u.empty=()=>{let e=s().prettyName;throw Error(`empty is unable to run in this browser environment, or has been bundled for the browser (running in ${e}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`)},u.join=()=>{let e=s().prettyName;throw Error(`join is unable to run in this browser environment, or has been bundled for the browser (running in ${e}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`)},u.raw=()=>{let e=s().prettyName;throw Error(`raw is unable to run in this browser environment, or has been bundled for the browser (running in ${e}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`)},u.validator=a.validator,u.getExtensionContext=()=>{let e=s().prettyName;throw Error(`Extensions.getExtensionContext is unable to run in this browser environment, or has been bundled for the browser (running in ${e}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`)},u.defineExtension=()=>{let e=s().prettyName;throw Error(`Extensions.defineExtension is unable to run in this browser environment, or has been bundled for the browser (running in ${e}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`)},u.DbNull=i.instances.DbNull,u.JsonNull=i.instances.JsonNull,u.AnyNull=i.instances.AnyNull,u.NullTypes={DbNull:i.classes.DbNull,JsonNull:i.classes.JsonNull,AnyNull:i.classes.AnyNull},t.Prisma.TransactionIsolationLevel=o({Serializable:"Serializable"}),t.Prisma.UserScalarFieldEnum={id:"id",email:"email",name:"name",password:"password",role:"role",createdAt:"createdAt",updatedAt:"updatedAt",resetPasswordToken:"resetPasswordToken",resetPasswordTokenExpiry:"resetPasswordTokenExpiry",reminders:"reminders",username:"username",profilePicture:"profilePicture",bio:"bio",title:"title",specialization:"specialization",barNumber:"barNumber",yearsOfExperience:"yearsOfExperience",education:"education",certifications:"certifications",officeLocation:"officeLocation",workPhone:"workPhone",linkedinUrl:"linkedinUrl",websiteUrl:"websiteUrl",availability:"availability",timezone:"timezone",pronouns:"pronouns",isProfilePublic:"isProfilePublic",lastActive:"lastActive",hourlyRate:"hourlyRate",proBono:"proBono",boldnessRating:"boldnessRating",transparencyRating:"transparencyRating",winRate:"winRate",totalCases:"totalCases",wonCases:"wonCases",lostCases:"lostCases",averageRating:"averageRating",isVerified:"isVerified",xpPoints:"xpPoints",level:"level",currentStreak:"currentStreak",totalBadges:"totalBadges",reviewsWritten:"reviewsWritten",forumPosts:"forumPosts",helpedOthers:"helpedOthers",totalEndorsements:"totalEndorsements",profileViews:"profileViews",observationHours:"observationHours",reformProposals:"reformProposals",wisdomScore:"wisdomScore",civicEngagement:"civicEngagement",accountBalance:"accountBalance",isPaymentVerified:"isPaymentVerified",donationTotal:"donationTotal",subscriptionTier:"subscriptionTier",subscriptionExpiry:"subscriptionExpiry",theme:"theme",gender:"gender",phone:"phone",address:"address",emergencyContact:"emergencyContact",emergencyPhone:"emergencyPhone",dateOfBirth:"dateOfBirth",occupation:"occupation",language:"language",notifications:"notifications",lawFirmId:"lawFirmId",isActive:"isActive",status:"status",experience:"experience",rating:"rating",barreauId:"barreauId",barreauVerifiedAt:"barreauVerifiedAt",verificationStatus:"verificationStatus",specializations:"specializations",regions:"regions",acceptsLegalAid:"acceptsLegalAid",barreauStatus:"barreauStatus",barreauProfileJson:"barreauProfileJson",position:"position",practiceAreas:"practiceAreas",verifiedBy:"verifiedBy",verifiedAt:"verifiedAt",approvedBy:"approvedBy",approvedAt:"approvedAt",verificationNotes:"verificationNotes",showFriends:"showFriends",showEmail:"showEmail",showPhone:"showPhone",showLocation:"showLocation",allowMessages:"allowMessages",showOnlineStatus:"showOnlineStatus"},t.Prisma.UserProfileScalarFieldEnum={id:"id",userId:"userId",availability:"availability",workingHours:"workingHours"},t.Prisma.PermissionScalarFieldEnum={id:"id",role:"role",resource:"resource",action:"action",conditions:"conditions",createdAt:"createdAt",updatedAt:"updatedAt"},t.Prisma.CaseAssignmentScalarFieldEnum={id:"id",registrationId:"registrationId",userId:"userId",role:"role",assignedAt:"assignedAt",assignedBy:"assignedBy",isActive:"isActive",caseId:"caseId"},t.Prisma.RegistrationScalarFieldEnum={id:"id",firstName:"firstName",lastName:"lastName",email:"email",phone:"phone",birthDate:"birthDate",gender:"gender",relationship:"relationship",preferredLanguage:"preferredLanguage",preferredContactMethod:"preferredContactMethod",message:"message",additionalNotes:"additionalNotes",lawyerName:"lawyerName",lawyerEmail:"lawyerEmail",lawyerPhone:"lawyerPhone",lawFirm:"lawFirm",status:"status",createdAt:"createdAt",updatedAt:"updatedAt",userId:"userId",createdBy:"createdBy",reminders:"reminders",previousLegalActions:"previousLegalActions",reasonForJoining:"reasonForJoining",howDidYouHearAboutUs:"howDidYouHearAboutUs",representation:"representation",urgentNeeds:"urgentNeeds",caseId:"caseId"},t.Prisma.AddressScalarFieldEnum={id:"id",street:"street",city:"city",state:"state",postalCode:"postalCode",country:"country",registrationId:"registrationId"},t.Prisma.DetaineeInfoScalarFieldEnum={id:"id",name:"name",facility:"facility",inmateId:"inmateId",incarcerationDate:"incarcerationDate",expectedReleaseDate:"expectedReleaseDate",registrationId:"registrationId"},t.Prisma.SessionScalarFieldEnum={id:"id",sessionToken:"sessionToken",userId:"userId",expires:"expires"},t.Prisma.VerificationTokenScalarFieldEnum={identifier:"identifier",token:"token",expires:"expires"},t.Prisma.FileUploadScalarFieldEnum={id:"id",originalName:"originalName",storedName:"storedName",mimeType:"mimeType",size:"size",path:"path",registrationId:"registrationId",createdAt:"createdAt",updatedAt:"updatedAt"},t.Prisma.DocumentScalarFieldEnum={id:"id",name:"name",title:"title",type:"type",url:"url",filePath:"filePath",fileSize:"fileSize",uploadedBy:"uploadedBy",caseId:"caseId",status:"status",createdAt:"createdAt",updatedAt:"updatedAt",registrationId:"registrationId",userId:"userId",public:"public",description:"description"},t.Prisma.DocumentVersionScalarFieldEnum={id:"id",documentId:"documentId",version:"version",content:"content",createdAt:"createdAt",createdById:"createdById"},t.Prisma.DocumentCommentScalarFieldEnum={id:"id",documentId:"documentId",userId:"userId",content:"content",createdAt:"createdAt"},t.Prisma.DocumentPermissionScalarFieldEnum={id:"id",documentId:"documentId",userId:"userId",canEdit:"canEdit",canComment:"canComment",canView:"canView",grantedById:"grantedById",createdAt:"createdAt"},t.Prisma.ThemeProfileScalarFieldEnum={id:"id",name:"name",colors:"colors",createdAt:"createdAt",userId:"userId"},t.Prisma.ChatRoomScalarFieldEnum={id:"id",name:"name",description:"description",isPublic:"isPublic",type:"type",createdById:"createdById",createdAt:"createdAt",updatedAt:"updatedAt"},t.Prisma.ChatParticipantScalarFieldEnum={id:"id",userId:"userId",chatRoomId:"chatRoomId",role:"role",joinedAt:"joinedAt"},t.Prisma.MessageScalarFieldEnum={id:"id",content:"content",type:"type",fileUrl:"fileUrl",fileName:"fileName",fileSize:"fileSize",mimeType:"mimeType",editedAt:"editedAt",isEdited:"isEdited",replyToId:"replyToId",createdAt:"createdAt",updatedAt:"updatedAt",userId:"userId",chatRoomId:"chatRoomId"},t.Prisma.PrivateChatScalarFieldEnum={id:"id",registrationId:"registrationId",userId:"userId",adminId:"adminId",createdAt:"createdAt",updatedAt:"updatedAt"},t.Prisma.PrivateMessageScalarFieldEnum={id:"id",content:"content",type:"type",fileUrl:"fileUrl",fileName:"fileName",fileSize:"fileSize",mimeType:"mimeType",createdAt:"createdAt",updatedAt:"updatedAt",senderId:"senderId",privateChatId:"privateChatId"},t.Prisma.DirectMessageScalarFieldEnum={id:"id",content:"content",type:"type",fileUrl:"fileUrl",fileName:"fileName",fileSize:"fileSize",mimeType:"mimeType",isRead:"isRead",caseId:"caseId",createdAt:"createdAt",updatedAt:"updatedAt",senderId:"senderId",recipientId:"recipientId"},t.Prisma.StatusNoteScalarFieldEnum={id:"id",content:"content",registrationId:"registrationId",adminId:"adminId",createdAt:"createdAt",updatedAt:"updatedAt"},t.Prisma.TypingStatusScalarFieldEnum={id:"id",userId:"userId",chatRoomId:"chatRoomId",isTyping:"isTyping",updatedAt:"updatedAt"},t.Prisma.MessageReactionScalarFieldEnum={id:"id",messageId:"messageId",userId:"userId",emoji:"emoji",createdAt:"createdAt"},t.Prisma.NewsletterSubscriptionScalarFieldEnum={id:"id",email:"email",language:"language",source:"source",subscriptionDate:"subscriptionDate",isActive:"isActive",confirmedAt:"confirmedAt",unsubscribedAt:"unsubscribedAt",tags:"tags",metadata:"metadata",createdAt:"createdAt",updatedAt:"updatedAt"},t.Prisma.EmailTemplateScalarFieldEnum={id:"id",name:"name",subject:"subject",htmlContent:"htmlContent",textContent:"textContent",thumbnail:"thumbnail",category:"category",isActive:"isActive",createdBy:"createdBy",createdAt:"createdAt",updatedAt:"updatedAt"},t.Prisma.CampaignScalarFieldEnum={id:"id",name:"name",subject:"subject",templateId:"templateId",htmlContent:"htmlContent",textContent:"textContent",status:"status",targetLanguage:"targetLanguage",targetTags:"targetTags",segmentId:"segmentId",scheduledAt:"scheduledAt",sentAt:"sentAt",createdBy:"createdBy",createdAt:"createdAt",updatedAt:"updatedAt",isAbTest:"isAbTest",abTestPercent:"abTestPercent",abTestWinner:"abTestWinner",totalSent:"totalSent",totalOpened:"totalOpened",totalClicked:"totalClicked",totalBounced:"totalBounced",totalUnsubscribed:"totalUnsubscribed"},t.Prisma.CampaignVariantScalarFieldEnum={id:"id",campaignId:"campaignId",variant:"variant",subject:"subject",htmlContent:"htmlContent",textContent:"textContent",sentCount:"sentCount",openCount:"openCount",clickCount:"clickCount"},t.Prisma.CampaignEventScalarFieldEnum={id:"id",campaignId:"campaignId",subscriptionId:"subscriptionId",eventType:"eventType",eventData:"eventData",userAgent:"userAgent",ipAddress:"ipAddress",createdAt:"createdAt"},t.Prisma.SegmentScalarFieldEnum={id:"id",name:"name",description:"description",conditions:"conditions",isActive:"isActive",createdBy:"createdBy",createdAt:"createdAt",updatedAt:"updatedAt"},t.Prisma.SegmentMemberScalarFieldEnum={id:"id",segmentId:"segmentId",subscriptionId:"subscriptionId",addedAt:"addedAt"},t.Prisma.AutomationRuleScalarFieldEnum={id:"id",name:"name",description:"description",triggerType:"triggerType",conditions:"conditions",actions:"actions",isActive:"isActive",createdBy:"createdBy",createdAt:"createdAt",updatedAt:"updatedAt"},t.Prisma.ImpersonationSessionScalarFieldEnum={id:"id",originalUserId:"originalUserId",impersonatedUserId:"impersonatedUserId",createdAt:"createdAt",endedAt:"endedAt",expiresAt:"expiresAt",isActive:"isActive",reason:"reason",ipAddress:"ipAddress",userAgent:"userAgent"},t.Prisma.LegalCaseScalarFieldEnum={id:"id",title:"title",description:"description",caseNumber:"caseNumber",caseType:"caseType",status:"status",jurisdiction:"jurisdiction",court:"court",priority:"priority",budget:"budget",expectedDuration:"expectedDuration",filingDate:"filingDate",applicationDeadline:"applicationDeadline",isAcceptingApplications:"isAcceptingApplications",isPublic:"isPublic",category:"category",legalArea:"legalArea",urgencyLevel:"urgencyLevel",viewCount:"viewCount",supporterCount:"supporterCount",estimatedValue:"estimatedValue",actualValue:"actualValue",startDate:"startDate",expectedEndDate:"expectedEndDate",actualEndDate:"actualEndDate",riskLevel:"riskLevel",publicSummary:"publicSummary",tags:"tags",requiredDocuments:"requiredDocuments",eligibilityCriteria:"eligibilityCriteria",firmName:"firmName",clientId:"clientId",primaryLawyerId:"primaryLawyerId",assistantLawyerId:"assistantLawyerId",secretaryId:"secretaryId",createdAt:"createdAt",updatedAt:"updatedAt",leadLawyerId:"leadLawyerId",createdBy:"createdBy",competitionType:"competitionType",competitionDeadline:"competitionDeadline",minimumBid:"minimumBid",currentHighestBid:"currentHighestBid",totalBidders:"totalBidders",averageBidAmount:"averageBidAmount",logoUrl:"logoUrl"},t.Prisma.CaseUpdateScalarFieldEnum={id:"id",caseId:"caseId",title:"title",description:"description",updateType:"updateType",isPublic:"isPublic",createdAt:"createdAt",createdBy:"createdBy"},t.Prisma.LawFirmScalarFieldEnum={id:"id",name:"name",shortName:"shortName",address:"address",city:"city",province:"province",postalCode:"postalCode",phone:"phone",email:"email",website:"website",barRegistration:"barRegistration",foundedYear:"foundedYear",specializations:"specializations",partnershipType:"partnershipType",contractStart:"contractStart",contractEnd:"contractEnd",isActive:"isActive",createdAt:"createdAt",updatedAt:"updatedAt"},t.Prisma.LawyerRatingScalarFieldEnum={id:"id",lawyerId:"lawyerId",userId:"userId",caseId:"caseId",boldnessScore:"boldnessScore",transparencyScore:"transparencyScore",communicationScore:"communicationScore",resultsScore:"resultsScore",overallScore:"overallScore",review:"review",isPublic:"isPublic",createdAt:"createdAt",updatedAt:"updatedAt"},t.Prisma.CaseOfferScalarFieldEnum={id:"id",caseId:"caseId",lawyerId:"lawyerId",receiverId:"receiverId",clientId:"clientId",offerType:"offerType",message:"message",proposedRate:"proposedRate",estimatedHours:"estimatedHours",status:"status",expiresAt:"expiresAt",collaborationType:"collaborationType",feeSplit:"feeSplit",createdAt:"createdAt",updatedAt:"updatedAt"},t.Prisma.BadgeScalarFieldEnum={id:"id",name:"name",description:"description",icon:"icon",category:"category",requirements:"requirements",xpReward:"xpReward",rarity:"rarity",isActive:"isActive",createdAt:"createdAt"},t.Prisma.UserBadgeScalarFieldEnum={id:"id",userId:"userId",badgeId:"badgeId",earnedAt:"earnedAt",isVisible:"isVisible"},t.Prisma.AchievementScalarFieldEnum={id:"id",name:"name",description:"description",type:"type",target:"target",xpReward:"xpReward",badgeReward:"badgeReward",isRepeatable:"isRepeatable",isActive:"isActive",createdAt:"createdAt"},t.Prisma.UserAchievementScalarFieldEnum={id:"id",userId:"userId",achievementId:"achievementId",currentProgress:"currentProgress",isCompleted:"isCompleted",completedAt:"completedAt",lastUpdated:"lastUpdated"},t.Prisma.BusinessProfileScalarFieldEnum={id:"id",ownerId:"ownerId",businessName:"businessName",businessType:"businessType",industry:"industry",description:"description",logo:"logo",website:"website",phone:"phone",email:"email",address:"address",registrationNumber:"registrationNumber",taxId:"taxId",employeeCount:"employeeCount",annualRevenue:"annualRevenue",isPublic:"isPublic",isVerified:"isVerified",createdAt:"createdAt",updatedAt:"updatedAt",verificationStatus:"verificationStatus",verificationNote:"verificationNote",verifiedAt:"verifiedAt"},t.Prisma.DonationScalarFieldEnum={id:"id",userId:"userId",amount:"amount",currency:"currency",type:"type",targetId:"targetId",message:"message",isAnonymous:"isAnonymous",paymentMethod:"paymentMethod",paymentId:"paymentId",status:"status",createdAt:"createdAt"},t.Prisma.PaymentScalarFieldEnum={id:"id",userId:"userId",amount:"amount",currency:"currency",type:"type",description:"description",paymentMethod:"paymentMethod",stripePaymentIntentId:"stripePaymentIntentId",stripeChargeId:"stripeChargeId",stripeFeeAmount:"stripeFeeAmount",status:"status",failureReason:"failureReason",caseId:"caseId",escrowId:"escrowId",societyDiscount:"societyDiscount",xpEarned:"xpEarned",platformFeeAmount:"platformFeeAmount",lawyerPayoutAmount:"lawyerPayoutAmount",refundAmount:"refundAmount",metadata:"metadata",paymentDate:"paymentDate",createdAt:"createdAt",updatedAt:"updatedAt"},t.Prisma.EscrowAccountScalarFieldEnum={id:"id",caseId:"caseId",clientId:"clientId",lawyerId:"lawyerId",totalAmount:"totalAmount",availableAmount:"availableAmount",heldAmount:"heldAmount",releasedAmount:"releasedAmount",milestoneReleases:"milestoneReleases",autoReleaseDate:"autoReleaseDate",status:"status",disputeReason:"disputeReason",societyFeeDiscount:"societyFeeDiscount",createdAt:"createdAt",updatedAt:"updatedAt",userId:"userId"},t.Prisma.EscrowReleaseScalarFieldEnum={id:"id",escrowId:"escrowId",amount:"amount",releaseType:"releaseType",reason:"reason",approvedBy:"approvedBy",milestoneDescription:"milestoneDescription",milestoneNumber:"milestoneNumber",status:"status",releasedAt:"releasedAt",createdAt:"createdAt"},t.Prisma.TransactionScalarFieldEnum={id:"id",paymentId:"paymentId",userId:"userId",type:"type",amount:"amount",currency:"currency",direction:"direction",balanceBefore:"balanceBefore",balanceAfter:"balanceAfter",referenceId:"referenceId",referenceType:"referenceType",description:"description",metadata:"metadata",transactionDate:"transactionDate",createdAt:"createdAt"},t.Prisma.PaymentRefundScalarFieldEnum={id:"id",paymentId:"paymentId",amount:"amount",reason:"reason",stripeRefundId:"stripeRefundId",status:"status",processedAt:"processedAt",requestedBy:"requestedBy",approvedBy:"approvedBy",metadata:"metadata",createdAt:"createdAt"},t.Prisma.SocietyPricingTierScalarFieldEnum={id:"id",name:"name",track:"track",minDegreeNumber:"minDegreeNumber",minXP:"minXP",minLevel:"minLevel",platformFeeDiscount:"platformFeeDiscount",prioritySupport:"prioritySupport",advancedFeatures:"advancedFeatures",customBranding:"customBranding",baseCommissionRate:"baseCommissionRate",discountedRate:"discountedRate",description:"description",benefits:"benefits",isActive:"isActive",createdAt:"createdAt"},t.Prisma.FinancialSummaryScalarFieldEnum={id:"id",userId:"userId",totalEarnings:"totalEarnings",thisMonthEarnings:"thisMonthEarnings",pendingPayouts:"pendingPayouts",totalCaseFees:"totalCaseFees",totalSpent:"totalSpent",thisMonthSpent:"thisMonthSpent",escrowBalance:"escrowBalance",totalCommissionPaid:"totalCommissionPaid",societyDiscountsSaved:"societyDiscountsSaved",currentTier:"currentTier",nextTierProgress:"nextTierProgress",paymentCount:"paymentCount",refundCount:"refundCount",disputeCount:"disputeCount",lastCalculated:"lastCalculated",createdAt:"createdAt",updatedAt:"updatedAt"},t.Prisma.CourseEnrollmentScalarFieldEnum={id:"id",userId:"userId",courseId:"courseId",enrollmentDate:"enrollmentDate",completionDate:"completionDate",status:"status",progress:"progress",certificateUrl:"certificateUrl"},t.Prisma.MentorSessionScalarFieldEnum={id:"id",mentorId:"mentorId",menteeId:"menteeId",sessionDate:"sessionDate",duration:"duration",notes:"notes",status:"status"},t.Prisma.CourseScalarFieldEnum={id:"id",title:"title",description:"description",category:"category",level:"level",instructor:"instructor",instructorId:"instructorId",duration:"duration",xpReward:"xpReward",badgeReward:"badgeReward",prerequisites:"prerequisites",syllabus:"syllabus",materials:"materials",isPublic:"isPublic",isActive:"isActive",price:"price",createdAt:"createdAt",updatedAt:"updatedAt"},t.Prisma.LawResourceScalarFieldEnum={id:"id",title:"title",type:"type",category:"category",description:"description",author:"author",publisher:"publisher",publicationDate:"publicationDate",isbn:"isbn",url:"url",coverImage:"coverImage",preview:"preview",fullContent:"fullContent",tags:"tags",difficultyLevel:"difficultyLevel",isPublic:"isPublic",isActive:"isActive",viewCount:"viewCount",downloadCount:"downloadCount",createdAt:"createdAt",updatedAt:"updatedAt"},t.Prisma.SocietyDegreeScalarFieldEnum={id:"id",degreeNumber:"degreeNumber",name:"name",title:"title",description:"description",requirements:"requirements",xpRequired:"xpRequired",casesRequired:"casesRequired",winRateRequired:"winRateRequired",clientsRequired:"clientsRequired",proBonoRequired:"proBonoRequired",badgesRequired:"badgesRequired",coursesRequired:"coursesRequired",mentorshipRequired:"mentorshipRequired",track:"track",trackSpecificReqs:"trackSpecificReqs",ceremonialText:"ceremonialText",symbol:"symbol",color:"color",privileges:"privileges",previousDegreeId:"previousDegreeId",timeRequirement:"timeRequirement",lodgeLevel:"lodgeLevel",isSecret:"isSecret",maxMembers:"maxMembers",isActive:"isActive",createdAt:"createdAt"},t.Prisma.UserDegreeScalarFieldEnum={id:"id",userId:"userId",degreeId:"degreeId",achievedAt:"achievedAt",ceremonyCompleted:"ceremonyCompleted",ceremonyDate:"ceremonyDate",presentedBy:"presentedBy",witnessedBy:"witnessedBy",notes:"notes",progressPercentage:"progressPercentage",isCurrentTarget:"isCurrentTarget"},t.Prisma.DegreeCeremonyScalarFieldEnum={id:"id",degreeId:"degreeId",userDegreeId:"userDegreeId",ceremonyDate:"ceremonyDate",conductedBy:"conductedBy",witnesses:"witnesses",location:"location",notes:"notes",isPublic:"isPublic"},t.Prisma.BrotherhoodMentorshipScalarFieldEnum={id:"id",mentorId:"mentorId",menteeId:"menteeId",degreeId:"degreeId",status:"status",startDate:"startDate",endDate:"endDate",sessionsCompleted:"sessionsCompleted",goalSessions:"goalSessions",progressNotes:"progressNotes",wasSuccessful:"wasSuccessful",mentorRating:"mentorRating",menteeRating:"menteeRating"},t.Prisma.MentorshipSessionScalarFieldEnum={id:"id",mentorshipId:"mentorshipId",sessionDate:"sessionDate",duration:"duration",topic:"topic",objectives:"objectives",outcomes:"outcomes",nextSteps:"nextSteps",menteeProgress:"menteeProgress"},t.Prisma.LodgeScalarFieldEnum={id:"id",name:"name",description:"description",lodgeLevel:"lodgeLevel",track:"track",minimumDegree:"minimumDegree",maximumMembers:"maximumMembers",currentMembers:"currentMembers",isSecret:"isSecret",foundedDate:"foundedDate",meetingSchedule:"meetingSchedule",meetingLocation:"meetingLocation"},t.Prisma.LodgeMembershipScalarFieldEnum={id:"id",userId:"userId",lodgeId:"lodgeId",joinedDate:"joinedDate",role:"role",isActive:"isActive",contributions:"contributions"},t.Prisma.CaseSupportScalarFieldEnum={id:"id",userId:"userId",caseId:"caseId",createdAt:"createdAt"},t.Prisma.ClientLawyerRelationshipScalarFieldEnum={id:"id",clientId:"clientId",lawyerId:"lawyerId",caseId:"caseId",relationshipType:"relationshipType",startDate:"startDate",endDate:"endDate",isActive:"isActive",totalHoursWorked:"totalHoursWorked",totalFeePaid:"totalFeePaid",feeStructure:"feeStructure",caseStatus:"caseStatus",outcomeDescription:"outcomeDescription",settlementAmount:"settlementAmount",clientSatisfaction:"clientSatisfaction",wouldRecommend:"wouldRecommend",impactLevel:"impactLevel",clientReview:"clientReview",lawyerNotes:"lawyerNotes",publicTestimonial:"publicTestimonial",isTestimonialPublic:"isTestimonialPublic",createdAt:"createdAt",updatedAt:"updatedAt"},t.Prisma.RelationshipMilestoneScalarFieldEnum={id:"id",relationshipId:"relationshipId",caseId:"caseId",milestoneType:"milestoneType",title:"title",description:"description",date:"date",amount:"amount",isPublic:"isPublic"},t.Prisma.LawyerStatsScalarFieldEnum={id:"id",lawyerId:"lawyerId",totalClients:"totalClients",activeClients:"activeClients",casesWon:"casesWon",casesLost:"casesLost",casesSettled:"casesSettled",casesDismissed:"casesDismissed",winRate:"winRate",totalRevenue:"totalRevenue",averageHourlyRate:"averageHourlyRate",totalProBonoHours:"totalProBonoHours",totalProBonoValue:"totalProBonoValue",averageSatisfaction:"averageSatisfaction",recommendationRate:"recommendationRate",totalTestimonials:"totalTestimonials",lifeChangingCases:"lifeChangingCases",totalSettlementValue:"totalSettlementValue",lastCalculated:"lastCalculated"},t.Prisma.ClientTestimonialScalarFieldEnum={id:"id",clientId:"clientId",lawyerId:"lawyerId",relationshipId:"relationshipId",caseId:"caseId",title:"title",content:"content",beforeSituation:"beforeSituation",afterSituation:"afterSituation",category:"category",impactLevel:"impactLevel",isPublic:"isPublic",isFeatured:"isFeatured",helpfulVotes:"helpfulVotes",views:"views",createdAt:"createdAt",updatedAt:"updatedAt"},t.Prisma.SubscriptionPlanScalarFieldEnum={id:"id",name:"name",description:"description",price:"price",currency:"currency",billingCycle:"billingCycle",features:"features",maxCases:"maxCases",maxUsers:"maxUsers",maxTeamMembers:"maxTeamMembers",advancedAnalytics:"advancedAnalytics",prioritySupport:"prioritySupport",customBranding:"customBranding",apiAccess:"apiAccess",societyDiscount:"societyDiscount",xpMultiplier:"xpMultiplier",isActive:"isActive",sortOrder:"sortOrder",createdAt:"createdAt",updatedAt:"updatedAt"},t.Prisma.UserSubscriptionScalarFieldEnum={id:"id",userId:"userId",planId:"planId",status:"status",currentPeriodStart:"currentPeriodStart",currentPeriodEnd:"currentPeriodEnd",cancelAtPeriodEnd:"cancelAtPeriodEnd",stripeSubscriptionId:"stripeSubscriptionId",stripeCustomerId:"stripeCustomerId",lastPaymentDate:"lastPaymentDate",nextPaymentDate:"nextPaymentDate",amountPaid:"amountPaid",paymentMethodId:"paymentMethodId",amount:"amount",currency:"currency",billingCycle:"billingCycle",metadata:"metadata",createdAt:"createdAt",updatedAt:"updatedAt"},t.Prisma.ConsultationBookingScalarFieldEnum={id:"id",lawyerId:"lawyerId",clientId:"clientId",preferredDate:"preferredDate",preferredTime:"preferredTime",duration:"duration",consultationType:"consultationType",status:"status",message:"message",hourlyRate:"hourlyRate",totalAmount:"totalAmount",meetingLink:"meetingLink",meetingPlatform:"meetingPlatform",notes:"notes",lawyerNotes:"lawyerNotes",clientNotes:"clientNotes",followUpDate:"followUpDate",followUpNotes:"followUpNotes",createdAt:"createdAt",updatedAt:"updatedAt"},t.Prisma.TaskScalarFieldEnum={id:"id",title:"title",description:"description",caseId:"caseId",assignedTo:"assignedTo",assignedBy:"assignedBy",priority:"priority",status:"status",dueDate:"dueDate",completedAt:"completedAt",estimatedHours:"estimatedHours",actualHours:"actualHours",tags:"tags",attachments:"attachments",notes:"notes",createdAt:"createdAt",updatedAt:"updatedAt"},t.Prisma.CalendarEventScalarFieldEnum={id:"id",title:"title",description:"description",eventType:"eventType",date:"date",startTime:"startTime",endTime:"endTime",duration:"duration",priority:"priority",caseId:"caseId",clientId:"clientId",lawyerId:"lawyerId",location:"location",isVirtual:"isVirtual",meetingLink:"meetingLink",courtJurisdiction:"courtJurisdiction",documentsRequired:"documentsRequired",notes:"notes",reminders:"reminders",billingRate:"billingRate",estimatedHours:"estimatedHours",status:"status",linkedEvents:"linkedEvents",aiSuggestions:"aiSuggestions",participants:"participants",createdBy:"createdBy",type:"type",createdAt:"createdAt",updatedAt:"updatedAt"},t.Prisma.DocumentCollaborationScalarFieldEnum={id:"id",documentId:"documentId",caseId:"caseId",title:"title",description:"description",filePath:"filePath",fileType:"fileType",fileSize:"fileSize",version:"version",status:"status",createdBy:"createdBy",assignedTo:"assignedTo",dueDate:"dueDate",completedAt:"completedAt",comments:"comments",changes:"changes",permissions:"permissions",tags:"tags",createdAt:"createdAt",updatedAt:"updatedAt"},t.Prisma.ClientPortalScalarFieldEnum={id:"id",clientId:"clientId",caseId:"caseId",accessToken:"accessToken",isActive:"isActive",lastAccess:"lastAccess",preferences:"preferences",notifications:"notifications",language:"language",theme:"theme",createdAt:"createdAt",updatedAt:"updatedAt"},t.Prisma.AnalyticsTrackingScalarFieldEnum={id:"id",userId:"userId",caseId:"caseId",eventType:"eventType",eventData:"eventData",sessionId:"sessionId",userAgent:"userAgent",ipAddress:"ipAddress",timestamp:"timestamp",metadata:"metadata"},t.Prisma.NotificationScalarFieldEnum={id:"id",userId:"userId",type:"type",title:"title",message:"message",data:"data",isRead:"isRead",isArchived:"isArchived",priority:"priority",scheduledFor:"scheduledFor",sentAt:"sentAt",readAt:"readAt",createdAt:"createdAt",updatedAt:"updatedAt"},t.Prisma.AutomationTaskScalarFieldEnum={id:"id",name:"name",description:"description",type:"type",schedule:"schedule",enabled:"enabled",status:"status",lastRun:"lastRun",nextRun:"nextRun",successCount:"successCount",errorCount:"errorCount",lastError:"lastError",config:"config",createdAt:"createdAt",updatedAt:"updatedAt"},t.Prisma.AutomationLogScalarFieldEnum={id:"id",taskId:"taskId",status:"status",output:"output",error:"error",executionTime:"executionTime",duration:"duration"},t.Prisma.RetainerAgreementScalarFieldEnum={id:"id",lawyerId:"lawyerId",clientId:"clientId",monthlyRate:"monthlyRate",services:"services",startDate:"startDate",message:"message",status:"status",isActive:"isActive",createdAt:"createdAt",updatedAt:"updatedAt"},t.Prisma.SystemSettingsScalarFieldEnum={id:"id",siteName:"siteName",siteDescription:"siteDescription",maintenanceMode:"maintenanceMode",maintenanceMessage:"maintenanceMessage",allowRegistrations:"allowRegistrations",requireEmailVerification:"requireEmailVerification",maxFileUploadSize:"maxFileUploadSize",allowedFileTypes:"allowedFileTypes",defaultLanguage:"defaultLanguage",supportedLanguages:"supportedLanguages",timezone:"timezone",dateFormat:"dateFormat",timeFormat:"timeFormat",currency:"currency",currencySymbol:"currencySymbol",emailSettings:"emailSettings",smtpHost:"smtpHost",smtpPort:"smtpPort",smtpUser:"smtpUser",smtpPassword:"smtpPassword",smtpSecure:"smtpSecure",fromEmail:"fromEmail",fromName:"fromName",logoUrl:"logoUrl",faviconUrl:"faviconUrl",primaryColor:"primaryColor",secondaryColor:"secondaryColor",analyticsEnabled:"analyticsEnabled",analyticsCode:"analyticsCode",socialMediaLinks:"socialMediaLinks",contactEmail:"contactEmail",contactPhone:"contactPhone",address:"address",termsOfService:"termsOfService",privacyPolicy:"privacyPolicy",cookiePolicy:"cookiePolicy",version:"version",lastUpdated:"lastUpdated",updatedBy:"updatedBy",createdAt:"createdAt",updatedAt:"updatedAt"},t.Prisma.CaseCompetitionParticipantScalarFieldEnum={id:"id",lawyerId:"lawyerId",caseId:"caseId",joinedAt:"joinedAt",status:"status",notes:"notes"},t.Prisma.CaseBidScalarFieldEnum={id:"id",caseId:"caseId",lawyerId:"lawyerId",bidAmount:"bidAmount",message:"message",status:"status",createdAt:"createdAt",updatedAt:"updatedAt"},t.Prisma.AssistantProfileScalarFieldEnum={id:"id",userId:"userId",firstName:"firstName",lastName:"lastName",email:"email",phone:"phone",address:"address",city:"city",state:"state",zipCode:"zipCode",country:"country",dateOfBirth:"dateOfBirth",gender:"gender",bio:"bio",experience:"experience",education:"education",certifications:"certifications",languages:"languages",specializations:"specializations",softwareSkills:"softwareSkills",availability:"availability",hourlyRate:"hourlyRate",isPublic:"isPublic",linkedinUrl:"linkedinUrl",websiteUrl:"websiteUrl",profilePicture:"profilePicture",createdAt:"createdAt",updatedAt:"updatedAt"},t.Prisma.ClerkProfileScalarFieldEnum={id:"id",userId:"userId",firstName:"firstName",lastName:"lastName",email:"email",phone:"phone",address:"address",city:"city",state:"state",zipCode:"zipCode",country:"country",dateOfBirth:"dateOfBirth",gender:"gender",bio:"bio",experience:"experience",education:"education",certifications:"certifications",languages:"languages",specializations:"specializations",courtSystems:"courtSystems",filingProcedures:"filingProcedures",availability:"availability",hourlyRate:"hourlyRate",isPublic:"isPublic",linkedinUrl:"linkedinUrl",websiteUrl:"websiteUrl",profilePicture:"profilePicture",createdAt:"createdAt",updatedAt:"updatedAt"},t.Prisma.CaseCommentScalarFieldEnum={id:"id",caseId:"caseId",userId:"userId",parentId:"parentId",content:"content",likes:"likes",isEdited:"isEdited",isDeleted:"isDeleted",createdAt:"createdAt",updatedAt:"updatedAt"},t.Prisma.CommentAttachmentScalarFieldEnum={id:"id",commentId:"commentId",name:"name",url:"url",type:"type",size:"size",createdAt:"createdAt"},t.Prisma.CommentLikeScalarFieldEnum={id:"id",commentId:"commentId",userId:"userId",createdAt:"createdAt"},t.Prisma.CommentReactionScalarFieldEnum={id:"id",commentId:"commentId",userId:"userId",reactionType:"reactionType",createdAt:"createdAt"},t.Prisma.CommentReportScalarFieldEnum={id:"id",commentId:"commentId",reportedBy:"reportedBy",reason:"reason",description:"description",status:"status",reviewedBy:"reviewedBy",reviewedAt:"reviewedAt",createdAt:"createdAt",updatedAt:"updatedAt"},t.Prisma.LawyerRequestScalarFieldEnum={id:"id",caseId:"caseId",lawyerId:"lawyerId",clientId:"clientId",message:"message",proposedRate:"proposedRate",estimatedHours:"estimatedHours",reasoning:"reasoning",status:"status",createdAt:"createdAt",updatedAt:"updatedAt"},t.Prisma.CaseChatMessageScalarFieldEnum={id:"id",caseId:"caseId",content:"content",senderId:"senderId",senderName:"senderName",senderAvatar:"senderAvatar",senderRole:"senderRole",isPublic:"isPublic",reactions:"reactions",createdAt:"createdAt",updatedAt:"updatedAt"},t.Prisma.FriendshipScalarFieldEnum={id:"id",userId:"userId",friendId:"friendId",status:"status",createdAt:"createdAt",updatedAt:"updatedAt"},t.Prisma.SearchAnalyticsScalarFieldEnum={id:"id",userId:"userId",query:"query",filters:"filters",resultCount:"resultCount",clickedResult:"clickedResult",searchTime:"searchTime",userAgent:"userAgent",ipAddress:"ipAddress",timestamp:"timestamp"},t.Prisma.EndorsementScalarFieldEnum={id:"id",endorserId:"endorserId",endorsedUserId:"endorsedUserId",category:"category",message:"message",createdAt:"createdAt"},t.Prisma.UserLevelHistoryScalarFieldEnum={id:"id",userId:"userId",oldLevel:"oldLevel",newLevel:"newLevel",earnedAt:"earnedAt",reason:"reason"},t.Prisma.ReviewScalarFieldEnum={id:"id",lawyerId:"lawyerId",reviewerId:"reviewerId",rating:"rating",comment:"comment",caseType:"caseType",outcome:"outcome",helpfulCount:"helpfulCount",isVerified:"isVerified",createdAt:"createdAt",updatedAt:"updatedAt"},t.Prisma.ForumPostScalarFieldEnum={id:"id",authorId:"authorId",title:"title",content:"content",category:"category",createdAt:"createdAt",updatedAt:"updatedAt"},t.Prisma.TestimonialScalarFieldEnum={id:"id",authorId:"authorId",targetUserId:"targetUserId",content:"content",rating:"rating",category:"category",caseType:"caseType",outcome:"outcome",helpfulCount:"helpfulCount",isVerified:"isVerified",isPublic:"isPublic",createdAt:"createdAt",updatedAt:"updatedAt"},t.Prisma.UserFollowScalarFieldEnum={id:"id",followerId:"followerId",followingId:"followingId",createdAt:"createdAt"},t.Prisma.SortOrder={asc:"asc",desc:"desc"},t.Prisma.NullableJsonNullValueInput={DbNull:u.DbNull,JsonNull:u.JsonNull},t.Prisma.JsonNullValueFilter={DbNull:u.DbNull,JsonNull:u.JsonNull,AnyNull:u.AnyNull},t.Prisma.QueryMode={default:"default",insensitive:"insensitive"},t.Prisma.NullsOrder={first:"first",last:"last"},t.VerificationStatus=t.$Enums.VerificationStatus={PENDING:"PENDING",VERIFIED:"VERIFIED",VERIFIED_BARREAU:"VERIFIED_BARREAU",REJECTED:"REJECTED",SUSPENDED:"SUSPENDED"},t.Prisma.ModelName={User:"User",UserProfile:"UserProfile",Permission:"Permission",CaseAssignment:"CaseAssignment",Registration:"Registration",Address:"Address",DetaineeInfo:"DetaineeInfo",Session:"Session",VerificationToken:"VerificationToken",FileUpload:"FileUpload",Document:"Document",DocumentVersion:"DocumentVersion",DocumentComment:"DocumentComment",DocumentPermission:"DocumentPermission",ThemeProfile:"ThemeProfile",ChatRoom:"ChatRoom",ChatParticipant:"ChatParticipant",Message:"Message",PrivateChat:"PrivateChat",PrivateMessage:"PrivateMessage",DirectMessage:"DirectMessage",StatusNote:"StatusNote",TypingStatus:"TypingStatus",MessageReaction:"MessageReaction",NewsletterSubscription:"NewsletterSubscription",EmailTemplate:"EmailTemplate",Campaign:"Campaign",CampaignVariant:"CampaignVariant",CampaignEvent:"CampaignEvent",Segment:"Segment",SegmentMember:"SegmentMember",AutomationRule:"AutomationRule",ImpersonationSession:"ImpersonationSession",LegalCase:"LegalCase",CaseUpdate:"CaseUpdate",LawFirm:"LawFirm",LawyerRating:"LawyerRating",CaseOffer:"CaseOffer",Badge:"Badge",UserBadge:"UserBadge",Achievement:"Achievement",UserAchievement:"UserAchievement",BusinessProfile:"BusinessProfile",Donation:"Donation",Payment:"Payment",EscrowAccount:"EscrowAccount",EscrowRelease:"EscrowRelease",Transaction:"Transaction",PaymentRefund:"PaymentRefund",SocietyPricingTier:"SocietyPricingTier",FinancialSummary:"FinancialSummary",CourseEnrollment:"CourseEnrollment",MentorSession:"MentorSession",Course:"Course",LawResource:"LawResource",SocietyDegree:"SocietyDegree",UserDegree:"UserDegree",DegreeCeremony:"DegreeCeremony",BrotherhoodMentorship:"BrotherhoodMentorship",MentorshipSession:"MentorshipSession",Lodge:"Lodge",LodgeMembership:"LodgeMembership",CaseSupport:"CaseSupport",ClientLawyerRelationship:"ClientLawyerRelationship",RelationshipMilestone:"RelationshipMilestone",LawyerStats:"LawyerStats",ClientTestimonial:"ClientTestimonial",SubscriptionPlan:"SubscriptionPlan",UserSubscription:"UserSubscription",ConsultationBooking:"ConsultationBooking",Task:"Task",CalendarEvent:"CalendarEvent",DocumentCollaboration:"DocumentCollaboration",ClientPortal:"ClientPortal",AnalyticsTracking:"AnalyticsTracking",Notification:"Notification",AutomationTask:"AutomationTask",AutomationLog:"AutomationLog",RetainerAgreement:"RetainerAgreement",SystemSettings:"SystemSettings",CaseCompetitionParticipant:"CaseCompetitionParticipant",CaseBid:"CaseBid",AssistantProfile:"AssistantProfile",ClerkProfile:"ClerkProfile",CaseComment:"CaseComment",CommentAttachment:"CommentAttachment",CommentLike:"CommentLike",CommentReaction:"CommentReaction",CommentReport:"CommentReport",LawyerRequest:"LawyerRequest",CaseChatMessage:"CaseChatMessage",Friendship:"Friendship",SearchAnalytics:"SearchAnalytics",Endorsement:"Endorsement",UserLevelHistory:"UserLevelHistory",Review:"Review",ForumPost:"ForumPost",Testimonial:"Testimonial",UserFollow:"UserFollow"};class l{constructor(){return new Proxy(this,{get(e,t){let r,n=s();throw Error(r=(n.isEdge?`PrismaClient is not configured to run in ${n.prettyName}. In order to run Prisma Client on edge runtime, either:
- Use Prisma Accelerate: https://pris.ly/d/accelerate
- Use Driver Adapters: https://pris.ly/d/driver-adapters
`:"PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `"+n.prettyName+"`).")+`
If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report`)}})}}t.PrismaClient=l,Object.assign(t,u)},60247:(e,t,r)=>{let n;var i=r(82909).Buffer;let{strict:o}=r(34322),{createHash:a}=r(63426),{format:s}=r(68994);if(i.isEncoding("base64url"))n=e=>e.toString("base64url");else{let e=e=>e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_");n=t=>e(t.toString("base64"))}function c(e,t){switch(e){case"HS256":case"RS256":case"PS256":case"ES256":case"ES256K":return a("sha256");case"HS384":case"RS384":case"PS384":case"ES384":return a("sha384");case"HS512":case"RS512":case"PS512":case"ES512":case"Ed25519":return a("sha512");case"Ed448":return a("shake256",{outputLength:114});case"EdDSA":switch(t){case"Ed25519":return a("sha512");case"Ed448":return a("shake256",{outputLength:114});default:throw TypeError("unrecognized or invalid EdDSA curve provided")}default:throw TypeError("unrecognized or invalid JWS algorithm provided")}}function u(e,t,r){let i=c(t,r).update(e).digest();return n(i.slice(0,i.length/2))}e.exports={validate:function(e,t,r,n,i){let a,c;if("string"!=typeof e.claim||!e.claim)throw TypeError("names.claim must be a non-empty string");if("string"!=typeof e.source||!e.source)throw TypeError("names.source must be a non-empty string");o("string"==typeof t&&t,`${e.claim} must be a non-empty string`),o("string"==typeof r&&r,`${e.source} must be a non-empty string`);try{a=u(r,n,i)}catch(t){c=s("%s could not be validated (%s)",e.claim,t.message)}c=c||s("%s mismatch, expected %s, got: %s",e.claim,a,t),o.equal(a,t,c)},generate:u}},61075:(e,t,r)=>{"use strict";var n=r(65364),i=r(29563);Object.defineProperty(t,"__esModule",{value:!0});var o={encode:!0,decode:!0,getToken:!0};t.decode=h,t.encode=p,t.getToken=y;var a=r(41776),s=i(r(40164)),c=r(98176),u=r(3883),l=r(68306);Object.keys(l).forEach(function(e){!("default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(o,e))&&(e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))});let d=2592e3,f=()=>Date.now()/1e3|0;async function p(e){let{token:t={},secret:r,maxAge:n=d,salt:i=""}=e,o=await g(r,i);return await new a.EncryptJWT(t).setProtectedHeader({alg:"dir",enc:"A256GCM"}).setIssuedAt().setExpirationTime(f()+n).setJti((0,c.v4)()).encrypt(o)}async function h(e){let{token:t,secret:r,salt:n=""}=e;if(!t)return null;let i=await g(r,n),{payload:o}=await (0,a.jwtDecrypt)(t,i,{clockTolerance:15});return o}async function y(e){var t,r,i,o;let{req:a,secureCookie:s=null!=(t=null==(r=n.env.NEXTAUTH_URL)?void 0:r.startsWith("https://"))?t:!!n.env.VERCEL,cookieName:c=s?"__Secure-next-auth.session-token":"next-auth.session-token",raw:l,decode:d=h,logger:f=console,secret:p=null!=(i=n.env.NEXTAUTH_SECRET)?i:n.env.AUTH_SECRET}=e;if(!a)throw Error("Must pass `req` to JWT getToken()");let y=new u.SessionStore({name:c,options:{secure:s}},{cookies:a.cookies,headers:a.headers},f).value,g=a.headers instanceof Headers?a.headers.get("authorization"):null==(o=a.headers)?void 0:o.authorization;if(y||(null==g?void 0:g.split(" ")[0])!=="Bearer"||(y=decodeURIComponent(g.split(" ")[1])),!y)return null;if(l)return y;try{return await d({token:y,secret:p})}catch(e){return null}}async function g(e,t){return await (0,s.default)("sha256",e,t,`NextAuth.js Generated Encryption Key${t?` (${t})`:""}`,32)}},61303:(e,t)=>{"use strict";function r(e){return"object"==typeof e&&null!==e&&"digest"in e&&e.digest===n}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{isHangingPromiseRejectionError:function(){return r},makeHangingPromise:function(){return a}});let n="HANGING_PROMISE_REJECTION";class i extends Error{constructor(e){super(`During prerendering, ${e} rejects when the prerender is complete. Typically these errors are handled by React but if you move ${e} to a different context by using \`setTimeout\`, \`after\`, or similar functions you may observe this error and you should handle it in that context.`),this.expression=e,this.digest=n}}let o=new WeakMap;function a(e,t){if(e.aborted)return Promise.reject(new i(t));{let r=new Promise((r,n)=>{let a=n.bind(null,new i(t)),s=o.get(e);if(s)s.push(a);else{let t=[a];o.set(e,t),e.addEventListener("abort",()=>{for(let e=0;e<t.length;e++)t[e]()},{once:!0})}});return r.catch(s),r}}function s(){}},62353:(e,t)=>{"use strict";async function r({email:e,adapter:t}){let{getUserByEmail:r}=t,n=e?await r(e):null;return n||{id:e,email:e,emailVerified:null}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},62794:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},63234:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{MutableRequestCookiesAdapter:function(){return f},ReadonlyRequestCookiesError:function(){return s},RequestCookiesAdapter:function(){return c},appendMutableCookies:function(){return d},areCookiesMutableInCurrentPhase:function(){return h},getModifiedCookieValues:function(){return l},responseCookiesToRequestCookies:function(){return g},wrapWithMutableAccessCheck:function(){return p}});let n=r(18769),i=r(81176),o=r(57049),a=r(20368);class s extends Error{constructor(){super("Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#options")}static callable(){throw new s}}class c{static seal(e){return new Proxy(e,{get(e,t,r){switch(t){case"clear":case"delete":case"set":return s.callable;default:return i.ReflectAdapter.get(e,t,r)}}})}}let u=Symbol.for("next.mutated.cookies");function l(e){let t=e[u];return t&&Array.isArray(t)&&0!==t.length?t:[]}function d(e,t){let r=l(t);if(0===r.length)return!1;let i=new n.ResponseCookies(e),o=i.getAll();for(let e of r)i.set(e);for(let e of o)i.set(e);return!0}class f{static wrap(e,t){let r=new n.ResponseCookies(new Headers);for(let t of e.getAll())r.set(t);let a=[],s=new Set,c=()=>{let e=o.workAsyncStorage.getStore();if(e&&(e.pathWasRevalidated=!0),a=r.getAll().filter(e=>s.has(e.name)),t){let e=[];for(let t of a){let r=new n.ResponseCookies(new Headers);r.set(t),e.push(r.toString())}t(e)}},l=new Proxy(r,{get(e,t,r){switch(t){case u:return a;case"delete":return function(...t){s.add("string"==typeof t[0]?t[0]:t[0].name);try{return e.delete(...t),l}finally{c()}};case"set":return function(...t){s.add("string"==typeof t[0]?t[0]:t[0].name);try{return e.set(...t),l}finally{c()}};default:return i.ReflectAdapter.get(e,t,r)}}});return l}}function p(e){let t=new Proxy(e,{get(e,r,n){switch(r){case"delete":return function(...r){return y("cookies().delete"),e.delete(...r),t};case"set":return function(...r){return y("cookies().set"),e.set(...r),t};default:return i.ReflectAdapter.get(e,r,n)}}});return t}function h(e){return"action"===e.phase}function y(e){if(!h((0,a.getExpectedRequestStore)(e)))throw new s}function g(e){let t=new n.RequestCookies(new Headers);for(let r of e.getAll())t.set(r);return t}},63780:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Component:()=>k,Fragment:()=>x,cloneElement:()=>V,createContext:()=>X,createElement:()=>E,createRef:()=>A,h:()=>E,hydrate:()=>G,isValidElement:()=>a,options:()=>i,render:()=>z,toChildArray:()=>D});var n,i,o,a,s,c,u,l,d,f,p,h,y,g={},m=[],b=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,w=Array.isArray;function v(e,t){for(var r in t)e[r]=t[r];return e}function _(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function E(e,t,r){var i,o,a,s={};for(a in t)"key"==a?i=t[a]:"ref"==a?o=t[a]:s[a]=t[a];if(arguments.length>2&&(s.children=arguments.length>3?n.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===s[a]&&(s[a]=e.defaultProps[a]);return S(e,s,i,o,null)}function S(e,t,r,n,a){var s={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==a?++o:a,__i:-1,__u:0};return null==a&&null!=i.vnode&&i.vnode(s),s}function A(){return{current:null}}function x(e){return e.children}function k(e,t){this.props=e,this.context=t}function P(e,t){if(null==t)return e.__?P(e.__,e.__i+1):null;for(var r;t<e.__k.length;t++)if(null!=(r=e.__k[t])&&null!=r.__e)return r.__e;return"function"==typeof e.type?P(e):null}function R(e){var t,r;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(r=e.__k[t])&&null!=r.__e){e.__e=e.__c.base=r.__e;break}return R(e)}}function O(e){(!e.__d&&(e.__d=!0)&&s.push(e)&&!T.__r++||c!=i.debounceRendering)&&((c=i.debounceRendering)||u)(T)}function T(){for(var e,t,r,n,o,a,c,u=1;s.length;)s.length>u&&s.sort(l),e=s.shift(),u=s.length,e.__d&&(r=void 0,o=(n=(t=e).__v).__e,a=[],c=[],t.__P&&((r=v({},n)).__v=n.__v+1,i.vnode&&i.vnode(r),W(t.__P,r,n,t.__n,t.__P.namespaceURI,32&n.__u?[o]:null,a,null==o?P(n):o,!!(32&n.__u),c),r.__v=n.__v,r.__.__k[r.__i]=r,F(a,r,c),r.__e!=o&&R(r)));T.__r=0}function C(e,t,r,n,i,o,a,s,c,u,l){var d,f,p,h,y,b,w,v=n&&n.__k||m,_=t.length;for(c=I(r,t,v,c,_),d=0;d<_;d++)null!=(p=r.__k[d])&&(f=-1==p.__i?g:v[p.__i]||g,p.__i=d,b=W(e,p,f,i,o,a,s,c,u,l),h=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&$(f.ref,null,p),l.push(p.ref,p.__c||h,p)),null==y&&null!=h&&(y=h),(w=!!(4&p.__u))||f.__k===p.__k?c=j(p,c,e,w):"function"==typeof p.type&&void 0!==b?c=b:h&&(c=h.nextSibling),p.__u&=-7);return r.__e=y,c}function I(e,t,r,n,i){var o,a,s,c,u,l=r.length,d=l,f=0;for(e.__k=Array(i),o=0;o<i;o++)null!=(a=t[o])&&"boolean"!=typeof a&&"function"!=typeof a?(c=o+f,(a=e.__k[o]="string"==typeof a||"number"==typeof a||"bigint"==typeof a||a.constructor==String?S(null,a,null,null,null):w(a)?S(x,{children:a},null,null,null):null==a.constructor&&a.__b>0?S(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):a).__=e,a.__b=e.__b+1,s=null,-1!=(u=a.__i=H(a,r,c,d))&&(d--,(s=r[u])&&(s.__u|=2)),null==s||null==s.__v?(-1==u&&(i>l?f--:i<l&&f++),"function"!=typeof a.type&&(a.__u|=4)):u!=c&&(u==c-1?f--:u==c+1?f++:(u>c?f--:f++,a.__u|=4))):e.__k[o]=null;if(d)for(o=0;o<l;o++)null!=(s=r[o])&&0==(2&s.__u)&&(s.__e==n&&(n=P(s)),J(s,s));return n}function j(e,t,r,n){var i,o;if("function"==typeof e.type){for(i=e.__k,o=0;i&&o<i.length;o++)i[o]&&(i[o].__=e,t=j(i[o],t,r,n));return t}e.__e!=t&&(n&&(t&&e.type&&!t.parentNode&&(t=P(e)),r.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(null!=t&&8==t.nodeType);return t}function D(e,t){return t=t||[],null==e||"boolean"==typeof e||(w(e)?e.some(function(e){D(e,t)}):t.push(e)),t}function H(e,t,r,n){var i,o,a,s=e.key,c=e.type,u=t[r],l=null!=u&&0==(2&u.__u);if(null===u&&null==e.key||l&&s==u.key&&c==u.type)return r;if(n>+!!l){for(i=r-1,o=r+1;i>=0||o<t.length;)if(null!=(u=t[a=i>=0?i--:o++])&&0==(2&u.__u)&&s==u.key&&c==u.type)return a}return -1}function N(e,t,r){"-"==t[0]?e.setProperty(t,null==r?"":r):e[t]=null==r?"":"number"!=typeof r||b.test(t)?r:r+"px"}function U(e,t,r,n,i){var o,a;e:if("style"==t)if("string"==typeof r)e.style.cssText=r;else{if("string"==typeof n&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||N(e.style,t,"");if(r)for(t in r)n&&r[t]==n[t]||N(e.style,t,r[t])}else if("o"==t[0]&&"n"==t[1])o=t!=(t=t.replace(d,"$1")),t=(a=t.toLowerCase())in e||"onFocusOut"==t||"onFocusIn"==t?a.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=r,r?n?r.u=n.u:(r.u=f,e.addEventListener(t,o?h:p,o)):e.removeEventListener(t,o?h:p,o);else{if("http://www.w3.org/2000/svg"==i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==r?"":r;break e}catch(e){}"function"==typeof r||(null==r||!1===r&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==r?"":r))}}function M(e){return function(t){if(this.l){var r=this.l[t.type+e];if(null==t.t)t.t=f++;else if(t.t<r.u)return;return r(i.event?i.event(t):t)}}}function W(e,t,r,n,o,a,s,c,u,l){var d,f,p,h,y,g,m,b,E,S,A,P,R,O,T,I,j,D=t.type;if(null!=t.constructor)return null;128&r.__u&&(u=!!(32&r.__u),a=[c=t.__e=r.__e]),(d=i.__b)&&d(t);e:if("function"==typeof D)try{if(b=t.props,E="prototype"in D&&D.prototype.render,S=(d=D.contextType)&&n[d.__c],A=d?S?S.props.value:d.__:n,r.__c?m=(f=t.__c=r.__c).__=f.__E:(E?t.__c=f=new D(b,A):(t.__c=f=new k(b,A),f.constructor=D,f.render=q),S&&S.sub(f),f.props=b,f.state||(f.state={}),f.context=A,f.__n=n,p=f.__d=!0,f.__h=[],f._sb=[]),E&&null==f.__s&&(f.__s=f.state),E&&null!=D.getDerivedStateFromProps&&(f.__s==f.state&&(f.__s=v({},f.__s)),v(f.__s,D.getDerivedStateFromProps(b,f.__s))),h=f.props,y=f.state,f.__v=t,p)E&&null==D.getDerivedStateFromProps&&null!=f.componentWillMount&&f.componentWillMount(),E&&null!=f.componentDidMount&&f.__h.push(f.componentDidMount);else{if(E&&null==D.getDerivedStateFromProps&&b!==h&&null!=f.componentWillReceiveProps&&f.componentWillReceiveProps(b,A),!f.__e&&null!=f.shouldComponentUpdate&&!1===f.shouldComponentUpdate(b,f.__s,A)||t.__v==r.__v){for(t.__v!=r.__v&&(f.props=b,f.state=f.__s,f.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(e){e&&(e.__=t)}),P=0;P<f._sb.length;P++)f.__h.push(f._sb[P]);f._sb=[],f.__h.length&&s.push(f);break e}null!=f.componentWillUpdate&&f.componentWillUpdate(b,f.__s,A),E&&null!=f.componentDidUpdate&&f.__h.push(function(){f.componentDidUpdate(h,y,g)})}if(f.context=A,f.props=b,f.__P=e,f.__e=!1,R=i.__r,O=0,E){for(f.state=f.__s,f.__d=!1,R&&R(t),d=f.render(f.props,f.state,f.context),T=0;T<f._sb.length;T++)f.__h.push(f._sb[T]);f._sb=[]}else do f.__d=!1,R&&R(t),d=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++O<25);f.state=f.__s,null!=f.getChildContext&&(n=v(v({},n),f.getChildContext())),E&&!p&&null!=f.getSnapshotBeforeUpdate&&(g=f.getSnapshotBeforeUpdate(h,y)),I=d,null!=d&&d.type===x&&null==d.key&&(I=B(d.props.children)),c=C(e,w(I)?I:[I],t,r,n,o,a,s,c,u,l),f.base=t.__e,t.__u&=-161,f.__h.length&&s.push(f),m&&(f.__E=f.__=null)}catch(e){if(t.__v=null,u||null!=a)if(e.then){for(t.__u|=u?160:128;c&&8==c.nodeType&&c.nextSibling;)c=c.nextSibling;a[a.indexOf(c)]=null,t.__e=c}else{for(j=a.length;j--;)_(a[j]);L(t)}else t.__e=r.__e,t.__k=r.__k,e.then||L(t);i.__e(e,t,r)}else null==a&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):c=t.__e=K(r.__e,t,r,n,o,a,s,u,l);return(d=i.diffed)&&d(t),128&t.__u?void 0:c}function L(e){e&&e.__c&&(e.__c.__e=!0),e&&e.__k&&e.__k.forEach(L)}function F(e,t,r){for(var n=0;n<r.length;n++)$(r[n],r[++n],r[++n]);i.__c&&i.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){i.__e(e,t.__v)}})}function B(e){return"object"!=typeof e||null==e||e.__b&&e.__b>0?e:w(e)?e.map(B):v({},e)}function K(e,t,r,o,a,s,c,u,l){var d,f,p,h,y,m,b,v=r.props,E=t.props,S=t.type;if("svg"==S?a="http://www.w3.org/2000/svg":"math"==S?a="http://www.w3.org/1998/Math/MathML":a||(a="http://www.w3.org/1999/xhtml"),null!=s){for(d=0;d<s.length;d++)if((y=s[d])&&"setAttribute"in y==!!S&&(S?y.localName==S:3==y.nodeType)){e=y,s[d]=null;break}}if(null==e){if(null==S)return document.createTextNode(E);e=document.createElementNS(a,S,E.is&&E),u&&(i.__m&&i.__m(t,s),u=!1),s=null}if(null==S)v===E||u&&e.data==E||(e.data=E);else{if(s=s&&n.call(e.childNodes),v=r.props||g,!u&&null!=s)for(v={},d=0;d<e.attributes.length;d++)v[(y=e.attributes[d]).name]=y.value;for(d in v)if(y=v[d],"children"==d);else if("dangerouslySetInnerHTML"==d)p=y;else if(!(d in E)){if("value"==d&&"defaultValue"in E||"checked"==d&&"defaultChecked"in E)continue;U(e,d,null,y,a)}for(d in E)y=E[d],"children"==d?h=y:"dangerouslySetInnerHTML"==d?f=y:"value"==d?m=y:"checked"==d?b=y:u&&"function"!=typeof y||v[d]===y||U(e,d,y,v[d],a);if(f)u||p&&(f.__html==p.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(p&&(e.innerHTML=""),C("template"==t.type?e.content:e,w(h)?h:[h],t,r,o,"foreignObject"==S?"http://www.w3.org/1999/xhtml":a,s,c,s?s[0]:r.__k&&P(r,0),u,l),null!=s)for(d=s.length;d--;)_(s[d]);u||(d="value","progress"==S&&null==m?e.removeAttribute("value"):null==m||m===e[d]&&("progress"!=S||m)&&("option"!=S||m==v[d])||U(e,d,m,v[d],a),d="checked",null!=b&&b!=e[d]&&U(e,d,b,v[d],a))}return e}function $(e,t,r){try{if("function"==typeof e){var n="function"==typeof e.__u;n&&e.__u(),n&&null==t||(e.__u=e(t))}else e.current=t}catch(e){i.__e(e,r)}}function J(e,t,r){var n,o;if(i.unmount&&i.unmount(e),(n=e.ref)&&(n.current&&n.current!=e.__e||$(n,null,t)),null!=(n=e.__c)){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(e){i.__e(e,t)}n.base=n.__P=null}if(n=e.__k)for(o=0;o<n.length;o++)n[o]&&J(n[o],t,r||"function"!=typeof e.type);r||_(e.__e),e.__c=e.__=e.__e=void 0}function q(e,t,r){return this.constructor(e,r)}function z(e,t,r){var o,a,s,c;t==document&&(t=document.documentElement),i.__&&i.__(e,t),a=(o="function"==typeof r)?null:r&&r.__k||t.__k,s=[],c=[],W(t,e=(!o&&r||t).__k=E(x,null,[e]),a||g,g,t.namespaceURI,!o&&r?[r]:a?null:t.firstChild?n.call(t.childNodes):null,s,!o&&r?r:a?a.__e:t.firstChild,o,c),F(s,e,c)}function G(e,t){z(e,t,G)}function V(e,t,r){var i,o,a,s,c=v({},e.props);for(a in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)"key"==a?i=t[a]:"ref"==a?o=t[a]:c[a]=void 0===t[a]&&null!=s?s[a]:t[a];return arguments.length>2&&(c.children=arguments.length>3?n.call(arguments,2):r),S(e.type,c,i||e.key,o||e.ref,null)}function X(e){function t(e){var r,n;return this.getChildContext||(r=new Set,(n={})[t.__c]=this,this.getChildContext=function(){return n},this.componentWillUnmount=function(){r=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&r.forEach(function(e){e.__e=!0,O(e)})},this.sub=function(e){r.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r&&r.delete(e),t&&t.call(e)}}),e.children}return t.__c="__cC"+y++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}n=m.slice,i={__e:function(e,t,r,n){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,n||{}),a=i.__d),a)return i.__E=i}catch(t){e=t}throw e}},o=0,a=function(e){return null!=e&&null==e.constructor},k.prototype.setState=function(e,t){var r;r=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=v({},this.state),"function"==typeof e&&(e=e(v({},r),this.props)),e&&v(r,e),null!=e&&this.__v&&(t&&this._sb.push(t),O(this))},k.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),O(this))},k.prototype.render=x,s=[],u="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,l=function(e,t){return e.__v.__b-t.__v.__b},T.__r=0,d=/(PointerCapture)$|Capture$/i,f=0,p=M(!1),h=M(!0),y=0},63991:(e,t,r)=>{var n=r(82909).Buffer,i=r(48041),o=(r(63426),r(58184)),a=r(40939),s=r(3305),c=r(48454);t.OAuth2=function(e,t,r,n,i,o){this._clientId=e,this._clientSecret=t,this._baseSite=r,this._authorizeUrl=n||"/oauth/authorize",this._accessTokenUrl=i||"/oauth/access_token",this._accessTokenName="access_token",this._authMethod="Bearer",this._customHeaders=o||{},this._useAuthorizationHeaderForGET=!1,this._agent=void 0},t.OAuth2.prototype.setAgent=function(e){this._agent=e},t.OAuth2.prototype.setAccessTokenName=function(e){this._accessTokenName=e},t.OAuth2.prototype.setAuthMethod=function(e){this._authMethod=e},t.OAuth2.prototype.useAuthorizationHeaderforGET=function(e){this._useAuthorizationHeaderForGET=e},t.OAuth2.prototype._getAccessTokenUrl=function(){return this._baseSite+this._accessTokenUrl},t.OAuth2.prototype.buildAuthHeader=function(e){return this._authMethod+" "+e},t.OAuth2.prototype._chooseHttpLibrary=function(e){var t=o;return"https:"!=e.protocol&&(t=a),t},t.OAuth2.prototype._request=function(e,t,r,o,a,c){var u=s.parse(t,!0);"https:"!=u.protocol||u.port||(u.port=443);var l=this._chooseHttpLibrary(u),d={};for(var f in this._customHeaders)d[f]=this._customHeaders[f];if(r)for(var f in r)d[f]=r[f];d.Host=u.host,d["User-Agent"]||(d["User-Agent"]="Node-oauth"),o?n.isBuffer(o)?d["Content-Length"]=o.length:d["Content-Length"]=n.byteLength(o):d["Content-length"]=0,!a||"Authorization"in d||(u.query||(u.query={}),u.query[this._accessTokenName]=a);var p=i.stringify(u.query);p&&(p="?"+p);var h={host:u.hostname,port:u.port,path:u.pathname+p,method:e,headers:d};this._executeRequest(l,h,o,c)},t.OAuth2.prototype._executeRequest=function(e,t,r,n){var i=c.isAnEarlyCloseHost(t.host),o=!1;function a(e,t){o||(o=!0,e.statusCode>=200&&e.statusCode<=299||301==e.statusCode||302==e.statusCode?n(null,t,e):n({statusCode:e.statusCode,data:t}))}var s="";this._agent&&(t.agent=this._agent);var u=e.request(t);u.on("response",function(e){e.on("data",function(e){s+=e}),e.on("close",function(t){i&&a(e,s)}),e.addListener("end",function(){a(e,s)})}),u.on("error",function(e){o=!0,n(e)}),("POST"==t.method||"PUT"==t.method)&&r&&u.write(r),u.end()},t.OAuth2.prototype.getAuthorizeUrl=function(e){var e=e||{};return e.client_id=this._clientId,this._baseSite+this._authorizeUrl+"?"+i.stringify(e)},t.OAuth2.prototype.getOAuthAccessToken=function(e,t,r){var t=t||{};t.client_id=this._clientId,t.client_secret=this._clientSecret;var n="refresh_token"===t.grant_type?"refresh_token":"code";t[n]=e;var o=i.stringify(t),a={"Content-Type":"application/x-www-form-urlencoded"};this._request("POST",this._getAccessTokenUrl(),a,o,null,function(e,t,n){if(e)r(e);else{try{o=JSON.parse(t)}catch(e){o=i.parse(t)}var o,a=o.access_token,s=o.refresh_token;delete o.refresh_token,r(null,a,s,o)}})},t.OAuth2.prototype.getProtectedResource=function(e,t,r){this._request("GET",e,{},"",t,r)},t.OAuth2.prototype.get=function(e,t,r){if(this._useAuthorizationHeaderForGET){var n={Authorization:this.buildAuthHeader(t)};t=null}else n={};this._request("GET",e,n,"",t,r)}},67696:(e,t,r)=>{e.exports.cookies=r(40658).cookies,e.exports.headers=r(69919).headers,e.exports.draftMode=r(90970).draftMode},68306:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},68782:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.oAuth1Client=i,t.oAuth1TokenStore=void 0;var n=r(3004);function i(e){var t,r;let i=e.provider,o=new n.OAuth(i.requestTokenUrl,i.accessTokenUrl,i.clientId,i.clientSecret,null!=(t=i.version)?t:"1.0",i.callbackUrl,null!=(r=i.encoding)?r:"HMAC-SHA1"),a=o.get.bind(o);o.get=async(...e)=>await new Promise((t,r)=>{a(...e,(e,n)=>{if(e)return r(e);t(n)})});let s=o.getOAuthAccessToken.bind(o);o.getOAuthAccessToken=async(...e)=>await new Promise((t,r)=>{s(...e,(e,n,i)=>{if(e)return r(e);t({oauth_token:n,oauth_token_secret:i})})});let c=o.getOAuthRequestToken.bind(o);return o.getOAuthRequestToken=async(e={})=>await new Promise((t,r)=>{c(e,(e,n,i,o)=>{if(e)return r(e);t({oauth_token:n,oauth_token_secret:i,params:o})})}),o}t.oAuth1TokenStore=new Map},68994:(e,t,r)=>{var n="/",i=r(82909).Buffer,o=r(65364);!function(){var t={992:function(e){e.exports=function(e,r,n){if(e.filter)return e.filter(r,n);if(null==e||"function"!=typeof r)throw TypeError();for(var i=[],o=0;o<e.length;o++)if(t.call(e,o)){var a=e[o];r.call(n,a,o,e)&&i.push(a)}return i};var t=Object.prototype.hasOwnProperty},256:function(e,t,r){"use strict";var n=r(192),i=r(139),o=i(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&o(e,".prototype.")>-1?i(r):r}},139:function(e,t,r){"use strict";var n=r(212),i=r(192),o=i("%Function.prototype.apply%"),a=i("%Function.prototype.call%"),s=i("%Reflect.apply%",!0)||n.call(a,o),c=i("%Object.getOwnPropertyDescriptor%",!0),u=i("%Object.defineProperty%",!0),l=i("%Math.max%");if(u)try{u({},"a",{value:1})}catch(e){u=null}e.exports=function(e){var t=s(n,a,arguments);return c&&u&&c(t,"length").configurable&&u(t,"length",{value:1+l(0,e.length-(arguments.length-1))}),t};var d=function(){return s(n,o,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},181:function(e){"use strict";e.exports=EvalError},545:function(e){"use strict";e.exports=Error},22:function(e){"use strict";e.exports=RangeError},803:function(e){"use strict";e.exports=ReferenceError},182:function(e){"use strict";e.exports=SyntaxError},202:function(e){"use strict";e.exports=TypeError},284:function(e){"use strict";e.exports=URIError},144:function(e){var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;e.exports=function(e,n,i){if("[object Function]"!==r.call(n))throw TypeError("iterator must be a function");var o=e.length;if(o===+o)for(var a=0;a<o;a++)n.call(i,e[a],a,e);else for(var s in e)t.call(e,s)&&n.call(i,e[s],s,e)}},136:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",r=Object.prototype.toString,n=Math.max,i="[object Function]",o=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var i=0;i<t.length;i+=1)r[i+e.length]=t[i];return r},a=function(e,t){for(var r=[],n=t||0,i=0;n<e.length;n+=1,i+=1)r[i]=e[n];return r},s=function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r};e.exports=function(e){var c,u=this;if("function"!=typeof u||r.apply(u)!==i)throw TypeError(t+u);for(var l=a(arguments,1),d=function(){if(this instanceof c){var t=u.apply(this,o(l,arguments));return Object(t)===t?t:this}return u.apply(e,o(l,arguments))},f=n(0,u.length-l.length),p=[],h=0;h<f;h++)p[h]="$"+h;if(c=Function("binder","return function ("+s(p,",")+"){ return binder.apply(this,arguments); }")(d),u.prototype){var y=function(){};y.prototype=u.prototype,c.prototype=new y,y.prototype=null}return c}},212:function(e,t,r){"use strict";var n=r(136);e.exports=Function.prototype.bind||n},192:function(e,t,r){"use strict";var n,i=r(545),o=r(181),a=r(22),s=r(803),c=r(182),u=r(202),l=r(284),d=Function,f=function(e){try{return d('"use strict"; return ('+e+").constructor;")()}catch(e){}},p=Object.getOwnPropertyDescriptor;if(p)try{p({},"")}catch(e){p=null}var h=function(){throw new u},y=p?function(){try{return arguments.callee,h}catch(e){try{return p(arguments,"callee").get}catch(e){return h}}}():h,g=r(115)(),m=r(14)(),b=Object.getPrototypeOf||(m?function(e){return e.__proto__}:null),w={},v="undefined"!=typeof Uint8Array&&b?b(Uint8Array):n,_={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":g&&b?b([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":w,"%AsyncGenerator%":w,"%AsyncGeneratorFunction%":w,"%AsyncIteratorPrototype%":w,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":o,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":d,"%GeneratorFunction%":w,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&b?b(b([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&b?b((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":a,"%ReferenceError%":s,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&b?b((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&b?b(""[Symbol.iterator]()):n,"%Symbol%":g?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":y,"%TypedArray%":v,"%TypeError%":u,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":l,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(b)try{null.error}catch(e){var E=b(b(e));_["%Error.prototype%"]=E}var S=function e(t){var r;if("%AsyncFunction%"===t)r=f("async function () {}");else if("%GeneratorFunction%"===t)r=f("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=f("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&b&&(r=b(i.prototype))}return _[t]=r,r},A={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},x=r(212),k=r(270),P=x.call(Function.call,Array.prototype.concat),R=x.call(Function.apply,Array.prototype.splice),O=x.call(Function.call,String.prototype.replace),T=x.call(Function.call,String.prototype.slice),C=x.call(Function.call,RegExp.prototype.exec),I=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,j=/\\(\\)?/g,D=function(e){var t=T(e,0,1),r=T(e,-1);if("%"===t&&"%"!==r)throw new c("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new c("invalid intrinsic syntax, expected opening `%`");var n=[];return O(e,I,function(e,t,r,i){n[n.length]=r?O(i,j,"$1"):t||e}),n},H=function(e,t){var r,n=e;if(k(A,n)&&(n="%"+(r=A[n])[0]+"%"),k(_,n)){var i=_[n];if(i===w&&(i=S(n)),void 0===i&&!t)throw new u("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new c("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new u("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new u('"allowMissing" argument must be a boolean');if(null===C(/^%?[^%]*%?$/,e))throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=D(e),n=r.length>0?r[0]:"",i=H("%"+n+"%",t),o=i.name,a=i.value,s=!1,l=i.alias;l&&(n=l[0],R(r,P([0,1],l)));for(var d=1,f=!0;d<r.length;d+=1){var h=r[d],y=T(h,0,1),g=T(h,-1);if(('"'===y||"'"===y||"`"===y||'"'===g||"'"===g||"`"===g)&&y!==g)throw new c("property names with quotes must have matching quotes");if("constructor"!==h&&f||(s=!0),n+="."+h,k(_,o="%"+n+"%"))a=_[o];else if(null!=a){if(!(h in a)){if(!t)throw new u("base intrinsic for "+e+" exists, but the property is not available.");return}if(p&&d+1>=r.length){var m=p(a,h);a=(f=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:a[h]}else f=k(a,h),a=a[h];f&&!s&&(_[o]=a)}}return a}},14:function(e){"use strict";var t={__proto__:null,foo:{}},r=Object;e.exports=function(){return({__proto__:t}).foo===t.foo&&!(t instanceof r)}},942:function(e,t,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(773);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},773:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t||"[object Symbol]"!==Object.prototype.toString.call(t)||"[object Symbol]"!==Object.prototype.toString.call(r))return!1;var n=42;for(t in e[t]=n,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==n||!0!==o.enumerable)return!1}return!0}},115:function(e,t,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(832);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},832:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t||"[object Symbol]"!==Object.prototype.toString.call(t)||"[object Symbol]"!==Object.prototype.toString.call(r))return!1;var n=42;for(t in e[t]=n,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==n||!0!==o.enumerable)return!1}return!0}},270:function(e,t,r){"use strict";var n=Function.prototype.call,i=Object.prototype.hasOwnProperty;e.exports=r(212).call(n,i)},782:function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},157:function(e){"use strict";var t="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,r=Object.prototype.toString,n=function(e){return(!t||!e||"object"!=typeof e||!(Symbol.toStringTag in e))&&"[object Arguments]"===r.call(e)},i=function(e){return!!n(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==r.call(e)&&"[object Function]"===r.call(e.callee)},o=function(){return n(arguments)}();n.isLegacyArguments=i,e.exports=o?n:i},391:function(e){"use strict";var t=Object.prototype.toString,r=Function.prototype.toString,n=/^\s*(?:function)?\*/,i="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,o=Object.getPrototypeOf,a=function(){if(!i)return!1;try{return Function("return function*() {}")()}catch(e){}}(),s=a?o(a):{};e.exports=function(e){return"function"==typeof e&&(!!n.test(r.call(e))||(i?o(e)===s:"[object GeneratorFunction]"===t.call(e)))}},994:function(e,t,n){"use strict";var i=n(144),o=n(349),a=n(256),s=a("Object.prototype.toString"),c=n(942)()&&"symbol"==typeof Symbol.toStringTag,u=o(),l=a("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r<e.length;r+=1)if(e[r]===t)return r;return -1},d=a("String.prototype.slice"),f={},p=n(24),h=Object.getPrototypeOf;c&&p&&h&&i(u,function(e){var t=new r.g[e];if(!(Symbol.toStringTag in t))throw EvalError("this engine has support for Symbol.toStringTag, but "+e+" does not have the property! Please report this.");var n=h(t),i=p(n,Symbol.toStringTag);i||(i=p(h(n),Symbol.toStringTag)),f[e]=i.get});var y=function(e){var t=!1;return i(f,function(r,n){if(!t)try{t=r.call(e)===n}catch(e){}}),t};e.exports=function(e){return!!e&&"object"==typeof e&&(c?!!p&&y(e):l(u,d(s(e),8,-1))>-1)}},369:function(e){e.exports=function(e){return e instanceof i}},584:function(e,t,r){"use strict";var n=r(157),i=r(391),o=r(490),a=r(994);function s(e){return e.call.bind(e)}var c="undefined"!=typeof BigInt,u="undefined"!=typeof Symbol,l=s(Object.prototype.toString),d=s(Number.prototype.valueOf),f=s(String.prototype.valueOf),p=s(Boolean.prototype.valueOf);if(c)var h=s(BigInt.prototype.valueOf);if(u)var y=s(Symbol.prototype.valueOf);function g(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function m(e){return"[object Map]"===l(e)}function b(e){return"[object Set]"===l(e)}function w(e){return"[object WeakMap]"===l(e)}function v(e){return"[object WeakSet]"===l(e)}function _(e){return"[object ArrayBuffer]"===l(e)}function E(e){return"undefined"!=typeof ArrayBuffer&&(_.working?_(e):e instanceof ArrayBuffer)}function S(e){return"[object DataView]"===l(e)}function A(e){return"undefined"!=typeof DataView&&(S.working?S(e):e instanceof DataView)}t.isArgumentsObject=n,t.isGeneratorFunction=i,t.isTypedArray=a,t.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},t.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):a(e)||A(e)},t.isUint8Array=function(e){return"Uint8Array"===o(e)},t.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===o(e)},t.isUint16Array=function(e){return"Uint16Array"===o(e)},t.isUint32Array=function(e){return"Uint32Array"===o(e)},t.isInt8Array=function(e){return"Int8Array"===o(e)},t.isInt16Array=function(e){return"Int16Array"===o(e)},t.isInt32Array=function(e){return"Int32Array"===o(e)},t.isFloat32Array=function(e){return"Float32Array"===o(e)},t.isFloat64Array=function(e){return"Float64Array"===o(e)},t.isBigInt64Array=function(e){return"BigInt64Array"===o(e)},t.isBigUint64Array=function(e){return"BigUint64Array"===o(e)},m.working="undefined"!=typeof Map&&m(new Map),t.isMap=function(e){return"undefined"!=typeof Map&&(m.working?m(e):e instanceof Map)},b.working="undefined"!=typeof Set&&b(new Set),t.isSet=function(e){return"undefined"!=typeof Set&&(b.working?b(e):e instanceof Set)},w.working="undefined"!=typeof WeakMap&&w(new WeakMap),t.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(w.working?w(e):e instanceof WeakMap)},v.working="undefined"!=typeof WeakSet&&v(new WeakSet),t.isWeakSet=function(e){return v(e)},_.working="undefined"!=typeof ArrayBuffer&&_(new ArrayBuffer),t.isArrayBuffer=E,S.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&S(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=A;var x="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function k(e){return"[object SharedArrayBuffer]"===l(e)}function P(e){return void 0!==x&&(void 0===k.working&&(k.working=k(new x)),k.working?k(e):e instanceof x)}function R(e){return g(e,d)}function O(e){return g(e,f)}function T(e){return g(e,p)}function C(e){return c&&g(e,h)}function I(e){return u&&g(e,y)}t.isSharedArrayBuffer=P,t.isAsyncFunction=function(e){return"[object AsyncFunction]"===l(e)},t.isMapIterator=function(e){return"[object Map Iterator]"===l(e)},t.isSetIterator=function(e){return"[object Set Iterator]"===l(e)},t.isGeneratorObject=function(e){return"[object Generator]"===l(e)},t.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===l(e)},t.isNumberObject=R,t.isStringObject=O,t.isBooleanObject=T,t.isBigIntObject=C,t.isSymbolObject=I,t.isBoxedPrimitive=function(e){return R(e)||O(e)||T(e)||C(e)||I(e)},t.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(E(e)||P(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw Error(e+" is not supported in userland")}})})},177:function(e,t,r){var n=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++)r[t[n]]=Object.getOwnPropertyDescriptor(e,t[n]);return r},i=/%[sdj%]/g;t.format=function(e){if(!S(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(u(arguments[r]));return t.join(" ")}for(var r=1,n=arguments,o=n.length,a=String(e).replace(i,function(e){if("%%"===e)return"%";if(r>=o)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),s=n[r];r<o;s=n[++r])_(s)||!k(s)?a+=" "+s:a+=" "+u(s);return a},t.deprecate=function(e,r){if(void 0!==o&&!0===o.noDeprecation)return e;if(void 0===o)return function(){return t.deprecate(e,r).apply(this,arguments)};var n=!1;return function(){if(!n){if(o.throwDeprecation)throw Error(r);o.traceDeprecation?console.trace(r):console.error(r),n=!0}return e.apply(this,arguments)}};var a={},s=/^$/;if(o.env.NODE_DEBUG){var c=o.env.NODE_DEBUG;s=RegExp("^"+(c=c.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase())+"$","i")}function u(e,r){var n={seen:[],stylize:d};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),v(r)?n.showHidden=r:r&&t._extend(n,r),A(n.showHidden)&&(n.showHidden=!1),A(n.depth)&&(n.depth=2),A(n.colors)&&(n.colors=!1),A(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=l),p(n,e,n.depth)}function l(e,t){var r=u.styles[t];return r?"\x1b["+u.colors[r][0]+"m"+e+"\x1b["+u.colors[r][1]+"m":e}function d(e,t){return e}function f(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}function p(e,r,n){if(e.customInspect&&r&&O(r.inspect)&&r.inspect!==t.inspect&&!(r.constructor&&r.constructor.prototype===r)){var i,o=r.inspect(n,e);return S(o)||(o=p(e,o,n)),o}var a=h(e,r);if(a)return a;var s=Object.keys(r),c=f(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(r)),R(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return y(r);if(0===s.length){if(O(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(x(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(P(r))return e.stylize(Date.prototype.toString.call(r),"date");if(R(r))return y(r)}var l="",d=!1,v=["{","}"];if(w(r)&&(d=!0,v=["[","]"]),O(r)&&(l=" [Function"+(r.name?": "+r.name:"")+"]"),x(r)&&(l=" "+RegExp.prototype.toString.call(r)),P(r)&&(l=" "+Date.prototype.toUTCString.call(r)),R(r)&&(l=" "+y(r)),0===s.length&&(!d||0==r.length))return v[0]+l+v[1];if(n<0)if(x(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");else return e.stylize("[Object]","special");return e.seen.push(r),i=d?g(e,r,n,c,s):s.map(function(t){return m(e,r,n,c,t,d)}),e.seen.pop(),b(i,l,v)}function h(e,t){if(A(t))return e.stylize("undefined","undefined");if(S(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return E(t)?e.stylize(""+t,"number"):v(t)?e.stylize(""+t,"boolean"):_(t)?e.stylize("null","null"):void 0}function y(e){return"["+Error.prototype.toString.call(e)+"]"}function g(e,t,r,n,i){for(var o=[],a=0,s=t.length;a<s;++a)D(t,String(a))?o.push(m(e,t,r,n,String(a),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(m(e,t,r,n,i,!0))}),o}function m(e,t,r,n,i,o){var a,s,c;if((c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),D(n,i)||(a="["+i+"]"),!s&&(0>e.seen.indexOf(c.value)?(s=_(r)?p(e,c.value,null):p(e,c.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n")):s=e.stylize("[Circular]","special")),A(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function b(e,t,r){var n=0;return e.reduce(function(e,t){return n++,t.indexOf("\n")>=0&&n++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function w(e){return Array.isArray(e)}function v(e){return"boolean"==typeof e}function _(e){return null===e}function E(e){return"number"==typeof e}function S(e){return"string"==typeof e}function A(e){return void 0===e}function x(e){return k(e)&&"[object RegExp]"===T(e)}function k(e){return"object"==typeof e&&null!==e}function P(e){return k(e)&&"[object Date]"===T(e)}function R(e){return k(e)&&("[object Error]"===T(e)||e instanceof Error)}function O(e){return"function"==typeof e}function T(e){return Object.prototype.toString.call(e)}function C(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(!a[e=e.toUpperCase()])if(s.test(e)){var r=o.pid;a[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else a[e]=function(){};return a[e]},t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=r(584),t.isArray=w,t.isBoolean=v,t.isNull=_,t.isNullOrUndefined=function(e){return null==e},t.isNumber=E,t.isString=S,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=A,t.isRegExp=x,t.types.isRegExp=x,t.isObject=k,t.isDate=P,t.types.isDate=P,t.isError=R,t.types.isNativeError=R,t.isFunction=O,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(369);var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function j(){var e=new Date,t=[C(e.getHours()),C(e.getMinutes()),C(e.getSeconds())].join(":");return[e.getDate(),I[e.getMonth()],t].join(" ")}function D(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",j(),t.format.apply(t,arguments))},t.inherits=r(782),t._extend=function(e,t){if(!t||!k(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var H="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function N(e,t){if(!e){var r=Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw TypeError('The "original" argument must be of type Function');if(H&&e[H]){var t=e[H];if("function"!=typeof t)throw TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,H,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise(function(e,n){t=e,r=n}),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push(function(e,n){e?r(e):t(n)});try{e.apply(this,i)}catch(e){r(e)}return n}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),H&&Object.defineProperty(t,H,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,n(e))},t.promisify.custom=H,t.callbackify=function(e){if("function"!=typeof e)throw TypeError('The "original" argument must be of type Function');function t(){for(var t=[],r=0;r<arguments.length;r++)t.push(arguments[r]);var n=t.pop();if("function"!=typeof n)throw TypeError("The last argument must be of type Function");var i=this,a=function(){return n.apply(i,arguments)};e.apply(this,t).then(function(e){o.nextTick(a.bind(null,null,e))},function(e){o.nextTick(N.bind(null,e,a))})}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,n(e)),t}},490:function(e,t,n){"use strict";var i=n(144),o=n(349),a=n(256),s=a("Object.prototype.toString"),c=n(942)()&&"symbol"==typeof Symbol.toStringTag,u=o(),l=a("String.prototype.slice"),d={},f=n(24),p=Object.getPrototypeOf;c&&f&&p&&i(u,function(e){if("function"==typeof r.g[e]){var t=new r.g[e];if(!(Symbol.toStringTag in t))throw EvalError("this engine has support for Symbol.toStringTag, but "+e+" does not have the property! Please report this.");var n=p(t),i=f(n,Symbol.toStringTag);i||(i=f(p(n),Symbol.toStringTag)),d[e]=i.get}});var h=function(e){var t=!1;return i(d,function(r,n){if(!t)try{var i=r.call(e);i===n&&(t=i)}catch(e){}}),t},y=n(994);e.exports=function(e){return!!y(e)&&(c?h(e):l(s(e),8,-1))}},349:function(e,t,n){"use strict";var i=n(992);e.exports=function(){return i(["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],function(e){return"function"==typeof r.g[e]})}},24:function(e,t,r){"use strict";var n=r(192)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}e.exports=n}},a={};function s(e){var r=a[e];if(void 0!==r)return r.exports;var n=a[e]={exports:{}},i=!0;try{t[e](n,n.exports,s),i=!1}finally{i&&delete a[e]}return n.exports}s.ab=n+"/",e.exports=s(177)}()},69919:(e,t,r)=>{"use strict";var n;n={value:!0},Object.defineProperty(t,"headers",{enumerable:!0,get:function(){return f}});let i=r(82919),o=r(57049),a=r(20368),s=r(18736),c=r(30941),u=r(61303),l=r(49961),d=(r(96820),r(19908));function f(){let e=o.workAsyncStorage.getStore(),t=a.workUnitAsyncStorage.getStore();if(e){if(t&&"after"===t.phase&&!(0,d.isRequestAPICallableInsideAfter)())throw Object.defineProperty(Error(`Route ${e.route} used "headers" inside "after(...)". This is not supported. If you need this data inside an "after" callback, use "headers" outside of the callback. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E367",enumerable:!1,configurable:!0});if(e.forceStatic)return y(i.HeadersAdapter.seal(new Headers({})));if(t){if("cache"===t.type)throw Object.defineProperty(Error(`Route ${e.route} used "headers" inside "use cache". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use "headers" outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E304",enumerable:!1,configurable:!0});else if("unstable-cache"===t.type)throw Object.defineProperty(Error(`Route ${e.route} used "headers" inside a function cached with "unstable_cache(...)". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use "headers" outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E127",enumerable:!1,configurable:!0})}if(e.dynamicShouldError)throw Object.defineProperty(new c.StaticGenBailoutError(`Route ${e.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`headers\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E525",enumerable:!1,configurable:!0});if(t)if("prerender"===t.type)return h(e.route,t);else"prerender-ppr"===t.type?(0,s.postponeWithTracking)(e.route,"headers",t.dynamicTracking):"prerender-legacy"===t.type&&(0,s.throwToInterruptStaticGeneration)("headers",e,t);(0,s.trackDynamicDataInDynamicRender)(e,t)}return y((0,a.getExpectedRequestStore)("headers").headers)}let p=new WeakMap;function h(e,t){let r=p.get(t);if(r)return r;let n=(0,u.makeHangingPromise)(t.renderSignal,"`headers()`");return p.set(t,n),Object.defineProperties(n,{append:{value:function(){let r=`\`headers().append(${g(arguments[0])}, ...)\``,n=b(e,r);(0,s.abortAndThrowOnSynchronousRequestDataAccess)(e,r,n,t)}},delete:{value:function(){let r=`\`headers().delete(${g(arguments[0])})\``,n=b(e,r);(0,s.abortAndThrowOnSynchronousRequestDataAccess)(e,r,n,t)}},get:{value:function(){let r=`\`headers().get(${g(arguments[0])})\``,n=b(e,r);(0,s.abortAndThrowOnSynchronousRequestDataAccess)(e,r,n,t)}},has:{value:function(){let r=`\`headers().has(${g(arguments[0])})\``,n=b(e,r);(0,s.abortAndThrowOnSynchronousRequestDataAccess)(e,r,n,t)}},set:{value:function(){let r=`\`headers().set(${g(arguments[0])}, ...)\``,n=b(e,r);(0,s.abortAndThrowOnSynchronousRequestDataAccess)(e,r,n,t)}},getSetCookie:{value:function(){let r="`headers().getSetCookie()`",n=b(e,r);(0,s.abortAndThrowOnSynchronousRequestDataAccess)(e,r,n,t)}},forEach:{value:function(){let r="`headers().forEach(...)`",n=b(e,r);(0,s.abortAndThrowOnSynchronousRequestDataAccess)(e,r,n,t)}},keys:{value:function(){let r="`headers().keys()`",n=b(e,r);(0,s.abortAndThrowOnSynchronousRequestDataAccess)(e,r,n,t)}},values:{value:function(){let r="`headers().values()`",n=b(e,r);(0,s.abortAndThrowOnSynchronousRequestDataAccess)(e,r,n,t)}},entries:{value:function(){let r="`headers().entries()`",n=b(e,r);(0,s.abortAndThrowOnSynchronousRequestDataAccess)(e,r,n,t)}},[Symbol.iterator]:{value:function(){let r="`headers()[Symbol.iterator]()`",n=b(e,r);(0,s.abortAndThrowOnSynchronousRequestDataAccess)(e,r,n,t)}}}),n}function y(e){let t=p.get(e);if(t)return t;let r=Promise.resolve(e);return p.set(e,r),Object.defineProperties(r,{append:{value:e.append.bind(e)},delete:{value:e.delete.bind(e)},get:{value:e.get.bind(e)},has:{value:e.has.bind(e)},set:{value:e.set.bind(e)},getSetCookie:{value:e.getSetCookie.bind(e)},forEach:{value:e.forEach.bind(e)},keys:{value:e.keys.bind(e)},values:{value:e.values.bind(e)},entries:{value:e.entries.bind(e)},[Symbol.iterator]:{value:e[Symbol.iterator].bind(e)}}),r}function g(e){return"string"==typeof e?`'${e}'`:"..."}let m=(0,l.createDedupedByCallsiteServerErrorLoggerDev)(b);function b(e,t){let r=e?`Route "${e}" `:"This route ";return Object.defineProperty(Error(`${r}used ${t}. \`headers()\` should be awaited before using its value. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`),"__NEXT_ERROR_CODE",{value:"E277",enumerable:!1,configurable:!0})}},71807:e=>{e.exports=()=>Math.floor(Date.now()/1e3)},73317:(e,t,r)=>{"use strict";var n=r(65364);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.getServerSession=c,t.unstable_getServerSession=u;var i=r(1035),o=r(53992);async function a(e,t,r){var a,s,c,u,l,d,f,p,h;let{nextauth:y,...g}=e.query;null!=(a=r.secret)||(r.secret=null!=(s=null!=(c=null==(u=r.jwt)?void 0:u.secret)?c:n.env.NEXTAUTH_SECRET)?s:n.env.AUTH_SECRET);let m=await (0,i.AuthHandler)({req:{body:e.body,query:g,cookies:e.cookies,headers:e.headers,method:e.method,action:null==y?void 0:y[0],providerId:null==y?void 0:y[1],error:null!=(l=e.query.error)?l:null==y?void 0:y[1]},options:r});if(t.status(null!=(d=m.status)?d:200),null==(f=m.cookies)||f.forEach(e=>(0,o.setCookie)(t,e)),null==(p=m.headers)||p.forEach(e=>t.setHeader(e.key,e.value)),m.redirect){if((null==(h=e.body)?void 0:h.json)!=="true"){t.status(302).setHeader("Location",m.redirect),t.end();return}return t.json({url:m.redirect})}return t.send(m.body)}async function s(e,t,a){var s,c,u,l;null!=(s=a.secret)||(a.secret=null!=(c=n.env.NEXTAUTH_SECRET)?c:n.env.AUTH_SECRET);let{headers:d,cookies:f}=r(67696),p=null==(u=await t.params)?void 0:u.nextauth,h=Object.fromEntries(e.nextUrl.searchParams),y=await (0,o.getBody)(e),g=await (0,i.AuthHandler)({req:{body:y,query:h,cookies:Object.fromEntries((await f()).getAll().map(e=>[e.name,e.value])),headers:Object.fromEntries(await d()),method:e.method,action:null==p?void 0:p[0],providerId:null==p?void 0:p[1],error:null!=(l=h.error)?l:null==p?void 0:p[1]},options:a}),m=(0,o.toResponse)(g),b=m.headers.get("Location");return(null==y?void 0:y.json)==="true"&&b?(m.headers.delete("Location"),m.headers.set("Content-Type","application/json"),new Response(JSON.stringify({url:b}),{status:g.status,headers:m.headers})):m}async function c(...e){var t,a,s;let u,l,d,f=0===e.length||1===e.length;if(f){d=Object.assign({},e[0],{providers:[]});let{headers:t,cookies:n}=r(67696);u={headers:Object.fromEntries(await t()),cookies:Object.fromEntries((await n()).getAll().map(e=>[e.name,e.value]))},l={getHeader(){},setCookie(){},setHeader(){}}}else u=e[0],l=e[1],d=Object.assign({},e[2],{providers:[]});null!=(a=(t=d).secret)||(t.secret=null!=(s=n.env.NEXTAUTH_SECRET)?s:n.env.AUTH_SECRET);let{body:p,cookies:h,status:y=200}=await (0,i.AuthHandler)({options:d,req:{action:"session",method:"GET",cookies:u.cookies,headers:u.headers}});if(null==h||h.forEach(e=>(0,o.setCookie)(l,e)),p&&"string"!=typeof p&&Object.keys(p).length){if(200===y)return f&&delete p.expires,p;throw Error(p.message)}return null}t.default=function(...e){var t;return 1===e.length?async(t,r)=>null!=r&&r.params?await s(t,r,e[0]):await a(t,r,e[0]):null!=(t=e[1])&&t.params?s(...e):a(...e)};async function u(...e){return await c(...e)}},73411:(e,t)=>{"use strict";async function r(e){var t,r;let{options:n,sessionStore:i}=e,{adapter:o,events:a,jwt:s,callbackUrl:c,logger:u,session:l}=n,d=null==i?void 0:i.value;if(!d)return{redirect:c};if("jwt"===l.strategy)try{let e=await s.decode({...s,token:d});await (null==(t=a.signOut)?void 0:t.call(a,{token:e}))}catch(e){u.error("SIGNOUT_ERROR",e)}else try{let e=await o.deleteSession(d);await (null==(r=a.signOut)?void 0:r.call(a,{session:e}))}catch(e){u.error("SIGNOUT_ERROR",e)}return{redirect:c,cookies:i.clean()}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},74355:e=>{function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},75402:(e,t,r)=>{let n=r(90633),i=r(85418),o=r(79289),a=Symbol(),s=(e,{alg:t,use:r})=>{let n=0;return t&&e.alg&&n++,r&&e.use&&n++,n};function c(e){switch("string"==typeof e&&e.slice(0,2)){case"RS":case"PS":return"RSA";case"ES":return"EC";case"Ed":return"OKP";default:return}}function u(e,t,r,i){if(t)return new Set([t]);switch(r){case"EC":{let t=[];if(("enc"===e||void 0===e)&&(t=t.concat(["ECDH-ES","ECDH-ES+A128KW","ECDH-ES+A192KW","ECDH-ES+A256KW"])),"sig"===e||void 0===e)switch(i){case"P-256":case"P-384":t=t.concat([`ES${i.slice(-3)}`]);break;case"P-521":t=t.concat(["ES512"]);break;case"secp256k1":"node:crypto"===n.cryptoRuntime&&(t=t.concat(["ES256K"]))}return new Set(t)}case"OKP":return new Set(["ECDH-ES","ECDH-ES+A128KW","ECDH-ES+A192KW","ECDH-ES+A256KW"]);case"RSA":{let t=[];return("enc"===e||void 0===e)&&(t=t.concat(["RSA-OAEP","RSA-OAEP-256","RSA-OAEP-384","RSA-OAEP-512"]),"node:crypto"===n.cryptoRuntime&&(t=t.concat(["RSA1_5"]))),("sig"===e||void 0===e)&&(t=t.concat(["PS256","PS384","PS512","RS256","RS384","RS512"])),new Set(t)}default:throw Error("unreachable")}}e.exports=class{#p;constructor(e,t){if(e!==a)throw Error("invalid constructor call");this.#p=t}toJWKS(){return{keys:this.map(({jwk:{d:e,p:t,q:r,dp:n,dq:i,qi:o,...a}})=>a)}}all({alg:e,kid:t,use:r}={}){if(!r||!e)throw Error();let n=c(e),i={alg:e,use:r};return this.filter(i=>{let o=!0;return void 0!==n&&i.jwk.kty!==n&&(o=!1),o&&void 0!==t&&i.jwk.kid!==t&&(o=!1),o&&void 0!==r&&void 0!==i.jwk.use&&i.jwk.use!==r&&(o=!1),o&&i.jwk.alg&&i.jwk.alg!==e?o=!1:i.algorithms.has(e)||(o=!1),o}).sort((e,t)=>s(t,i)-s(e,i))}get(...e){return this.all(...e)[0]}static async fromJWKS(e,{onlyPublic:t=!1,onlyPrivate:r=!1}={}){if(!o(e)||!Array.isArray(e.keys)||e.keys.some(e=>!o(e)||!("kty"in e)))throw TypeError("jwks must be a JSON Web Key Set formatted object");let s=[];for(let o of e.keys){let{kty:e,kid:a,crv:c}=o=i(o),{alg:l,use:d}=o;if("string"==typeof e&&e&&(void 0===d||"sig"===d||"enc"===d)&&("string"==typeof l||void 0===l)&&("string"==typeof a||void 0===a)){if("EC"===e&&"sig"===d)switch(c){case"P-256":l="ES256";break;case"P-384":l="ES384";break;case"P-521":l="ES512"}if("secp256k1"===c&&(d="sig",l="ES256K"),"OKP"===e)switch(c){case"Ed25519":case"Ed448":d="sig",l="EdDSA";break;case"X25519":case"X448":d="enc"}if(l&&!d)switch(!0){case l.startsWith("ECDH"):case l.startsWith("RSA"):d="enc"}if(r&&("oct"===o.kty||!o.d))throw Error("jwks must only contain private keys");t&&(o.d||o.k)||s.push({jwk:{...o,alg:l,use:d},async keyObject(e){if(this[e])return this[e];let t=await n.importJWK(this.jwk,e);return this[e]=t,t},get algorithms(){return Object.defineProperty(this,"algorithms",{value:u(this.jwk.use,this.jwk.alg,this.jwk.kty,this.jwk.crv),enumerable:!0,configurable:!1}),this.algorithms}})}}return new this(a,s)}filter(...e){return this.#p.filter(...e)}find(...e){return this.#p.find(...e)}every(...e){return this.#p.every(...e)}some(...e){return this.#p.some(...e)}map(...e){return this.#p.map(...e)}forEach(...e){return this.#p.forEach(...e)}reduce(...e){return this.#p.reduce(...e)}sort(...e){return this.#p.sort(...e)}*[Symbol.iterator](){for(let e of this.#p)yield e}}},75499:(e,t,r)=>{e.exports=new(r(77421))({max:100})},77292:(e,t,r)=>{e.exports=r(60106)},77421:(e,t,r)=>{"use strict";let n=r(16791),i=Symbol("max"),o=Symbol("length"),a=Symbol("lengthCalculator"),s=Symbol("allowStale"),c=Symbol("maxAge"),u=Symbol("dispose"),l=Symbol("noDisposeOnSet"),d=Symbol("lruList"),f=Symbol("cache"),p=Symbol("updateAgeOnGet"),h=()=>1;class y{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw TypeError("max must be a non-negative number");this[i]=e.max||1/0;let t=e.length||h;if(this[a]="function"!=typeof t?h:t,this[s]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw TypeError("maxAge must be a number");this[c]=e.maxAge||0,this[u]=e.dispose,this[l]=e.noDisposeOnSet||!1,this[p]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw TypeError("max must be a non-negative number");this[i]=e||1/0,b(this)}get max(){return this[i]}set allowStale(e){this[s]=!!e}get allowStale(){return this[s]}set maxAge(e){if("number"!=typeof e)throw TypeError("maxAge must be a non-negative number");this[c]=e,b(this)}get maxAge(){return this[c]}set lengthCalculator(e){"function"!=typeof e&&(e=h),e!==this[a]&&(this[a]=e,this[o]=0,this[d].forEach(e=>{e.length=this[a](e.value,e.key),this[o]+=e.length})),b(this)}get lengthCalculator(){return this[a]}get length(){return this[o]}get itemCount(){return this[d].length}rforEach(e,t){t=t||this;for(let r=this[d].tail;null!==r;){let n=r.prev;_(this,e,r,t),r=n}}forEach(e,t){t=t||this;for(let r=this[d].head;null!==r;){let n=r.next;_(this,e,r,t),r=n}}keys(){return this[d].toArray().map(e=>e.key)}values(){return this[d].toArray().map(e=>e.value)}reset(){this[u]&&this[d]&&this[d].length&&this[d].forEach(e=>this[u](e.key,e.value)),this[f]=new Map,this[d]=new n,this[o]=0}dump(){return this[d].map(e=>!m(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[d]}set(e,t,r){if((r=r||this[c])&&"number"!=typeof r)throw TypeError("maxAge must be a number");let n=r?Date.now():0,s=this[a](t,e);if(this[f].has(e)){if(s>this[i])return w(this,this[f].get(e)),!1;let a=this[f].get(e).value;return this[u]&&!this[l]&&this[u](e,a.value),a.now=n,a.maxAge=r,a.value=t,this[o]+=s-a.length,a.length=s,this.get(e),b(this),!0}let p=new v(e,t,s,n,r);return p.length>this[i]?(this[u]&&this[u](e,t),!1):(this[o]+=p.length,this[d].unshift(p),this[f].set(e,this[d].head),b(this),!0)}has(e){return!!this[f].has(e)&&!m(this,this[f].get(e).value)}get(e){return g(this,e,!0)}peek(e){return g(this,e,!1)}pop(){let e=this[d].tail;return e?(w(this,e),e.value):null}del(e){w(this,this[f].get(e))}load(e){this.reset();let t=Date.now();for(let r=e.length-1;r>=0;r--){let n=e[r],i=n.e||0;if(0===i)this.set(n.k,n.v);else{let e=i-t;e>0&&this.set(n.k,n.v,e)}}}prune(){this[f].forEach((e,t)=>g(this,t,!1))}}let g=(e,t,r)=>{let n=e[f].get(t);if(n){let t=n.value;if(m(e,t)){if(w(e,n),!e[s])return}else r&&(e[p]&&(n.value.now=Date.now()),e[d].unshiftNode(n));return t.value}},m=(e,t)=>{if(!t||!t.maxAge&&!e[c])return!1;let r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[c]&&r>e[c]},b=e=>{if(e[o]>e[i])for(let t=e[d].tail;e[o]>e[i]&&null!==t;){let r=t.prev;w(e,t),t=r}},w=(e,t)=>{if(t){let r=t.value;e[u]&&e[u](r.key,r.value),e[o]-=r.length,e[f].delete(r.key),e[d].removeNode(t)}};class v{constructor(e,t,r,n,i){this.key=e,this.value=t,this.length=r,this.now=n,this.maxAge=i||0}}let _=(e,t,r,n)=>{let i=r.value;m(e,i)&&(w(e,r),e[s]||(i=void 0)),i&&t.call(n,i.value,i.key,e)};e.exports=y},77820:e=>{"use strict";var t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,o=(e,o,a,s)=>{if(o&&"object"==typeof o||"function"==typeof o)for(let c of n(o))i.call(e,c)||c===a||t(e,c,{get:()=>o[c],enumerable:!(s=r(o,c))||s.enumerable});return e},a=e=>o(t({},"__esModule",{value:!0}),e),s={};function c(e){var t;let r=["path"in e&&e.path&&`Path=${e.path}`,"expires"in e&&(e.expires||0===e.expires)&&`Expires=${("number"==typeof e.expires?new Date(e.expires):e.expires).toUTCString()}`,"maxAge"in e&&"number"==typeof e.maxAge&&`Max-Age=${e.maxAge}`,"domain"in e&&e.domain&&`Domain=${e.domain}`,"secure"in e&&e.secure&&"Secure","httpOnly"in e&&e.httpOnly&&"HttpOnly","sameSite"in e&&e.sameSite&&`SameSite=${e.sameSite}`,"partitioned"in e&&e.partitioned&&"Partitioned","priority"in e&&e.priority&&`Priority=${e.priority}`].filter(Boolean),n=`${e.name}=${encodeURIComponent(null!=(t=e.value)?t:"")}`;return 0===r.length?n:`${n}; ${r.join("; ")}`}function u(e){let t=new Map;for(let r of e.split(/; */)){if(!r)continue;let e=r.indexOf("=");if(-1===e){t.set(r,"true");continue}let[n,i]=[r.slice(0,e),r.slice(e+1)];try{t.set(n,decodeURIComponent(null!=i?i:"true"))}catch{}}return t}function l(e){if(!e)return;let[[t,r],...n]=u(e),{domain:i,expires:o,httponly:a,maxage:s,path:c,samesite:l,secure:f,partitioned:h,priority:g}=Object.fromEntries(n.map(([e,t])=>[e.toLowerCase().replace(/-/g,""),t]));return d({name:t,value:decodeURIComponent(r),domain:i,...o&&{expires:new Date(o)},...a&&{httpOnly:!0},..."string"==typeof s&&{maxAge:Number(s)},path:c,...l&&{sameSite:p(l)},...f&&{secure:!0},...g&&{priority:y(g)},...h&&{partitioned:!0}})}function d(e){let t={};for(let r in e)e[r]&&(t[r]=e[r]);return t}((e,r)=>{for(var n in r)t(e,n,{get:r[n],enumerable:!0})})(s,{RequestCookies:()=>m,ResponseCookies:()=>b,parseCookie:()=>u,parseSetCookie:()=>l,stringifyCookie:()=>c}),e.exports=a(s);var f=["strict","lax","none"];function p(e){return e=e.toLowerCase(),f.includes(e)?e:void 0}var h=["low","medium","high"];function y(e){return e=e.toLowerCase(),h.includes(e)?e:void 0}function g(e){if(!e)return[];var t,r,n,i,o,a=[],s=0;function c(){for(;s<e.length&&/\s/.test(e.charAt(s));)s+=1;return s<e.length}function u(){return"="!==(r=e.charAt(s))&&";"!==r&&","!==r}for(;s<e.length;){for(t=s,o=!1;c();)if(","===(r=e.charAt(s))){for(n=s,s+=1,c(),i=s;s<e.length&&u();)s+=1;s<e.length&&"="===e.charAt(s)?(o=!0,s=i,a.push(e.substring(t,n)),t=s):s=n+1}else s+=1;(!o||s>=e.length)&&a.push(e.substring(t,e.length))}return a}var m=class{constructor(e){this._parsed=new Map,this._headers=e;let t=e.get("cookie");if(t)for(let[e,r]of u(t))this._parsed.set(e,{name:e,value:r})}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed);if(!e.length)return r.map(([e,t])=>t);let n="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(([e])=>e===n).map(([e,t])=>t)}has(e){return this._parsed.has(e)}set(...e){let[t,r]=1===e.length?[e[0].name,e[0].value]:e,n=this._parsed;return n.set(t,{name:t,value:r}),this._headers.set("cookie",Array.from(n).map(([e,t])=>c(t)).join("; ")),this}delete(e){let t=this._parsed,r=Array.isArray(e)?e.map(e=>t.delete(e)):t.delete(e);return this._headers.set("cookie",Array.from(t).map(([e,t])=>c(t)).join("; ")),r}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(e=>`${e.name}=${encodeURIComponent(e.value)}`).join("; ")}},b=class{constructor(e){var t,r,n;this._parsed=new Map,this._headers=e;let i=null!=(n=null!=(r=null==(t=e.getSetCookie)?void 0:t.call(e))?r:e.get("set-cookie"))?n:[];for(let e of Array.isArray(i)?i:g(i)){let t=l(e);t&&this._parsed.set(t.name,t)}}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed.values());if(!e.length)return r;let n="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(e=>e.name===n)}has(e){return this._parsed.has(e)}set(...e){let[t,r,n]=1===e.length?[e[0].name,e[0].value,e[0]]:e,i=this._parsed;return i.set(t,v({name:t,value:r,...n})),w(i,this._headers),this}delete(...e){let[t,r]="string"==typeof e[0]?[e[0]]:[e[0].name,e[0]];return this.set({...r,name:t,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(c).join("; ")}};function w(e,t){for(let[,r]of(t.delete("set-cookie"),e)){let e=c(r);t.append("set-cookie",e)}}function v(e={name:"",value:""}){return"number"==typeof e.expires&&(e.expires=new Date(e.expires)),e.maxAge&&(e.expires=new Date(Date.now()+1e3*e.maxAge)),(null===e.path||void 0===e.path)&&(e.path="/"),e}},78425:(e,t,r)=>{var n=r(82909).Buffer;let i=r(90633),{RPError:o}=r(79391),{assertIssuerConfiguration:a}=r(52492),{random:s}=r(16436),c=r(71807),u=r(18707),{keystores:l}=r(86159),d=r(6326),f=e=>encodeURIComponent(e).replace(/%20/g,"+");async function p(e,t){let r=this[`${e}_endpoint_auth_signing_alg`];if(r||a(this.issuer,`${e}_endpoint_auth_signing_alg_values_supported`),"client_secret_jwt"===this[`${e}_endpoint_auth_method`]){if(!r){let t=this.issuer[`${e}_endpoint_auth_signing_alg_values_supported`];r=Array.isArray(t)&&t.find(e=>/^HS(?:256|384|512)/.test(e))}if(!r)throw new o(`failed to determine a JWS Algorithm to use for ${this[`${e}_endpoint_auth_method`]} Client Assertion`);return new i.CompactSign(n.from(JSON.stringify(t))).setProtectedHeader({alg:r}).sign(this.secretForAlg(r))}let s=await l.get(this);if(!s)throw TypeError("no client jwks provided for signing a client assertion with");if(!r){let t=this.issuer[`${e}_endpoint_auth_signing_alg_values_supported`];r=Array.isArray(t)&&t.find(e=>s.get({alg:e,use:"sig"}))}if(!r)throw new o(`failed to determine a JWS Algorithm to use for ${this[`${e}_endpoint_auth_method`]} Client Assertion`);let c=s.get({alg:r,use:"sig"});if(!c)throw new o(`no key found in client jwks to sign a client assertion with using alg ${r}`);return new i.CompactSign(n.from(JSON.stringify(t))).setProtectedHeader({alg:r,kid:c.jwk&&c.jwk.kid}).sign(await c.keyObject(r))}async function h(e,{clientAssertionPayload:t}={}){switch(this[`${e}_endpoint_auth_method`]){case"self_signed_tls_client_auth":case"tls_client_auth":case"none":return{form:{client_id:this.client_id}};case"client_secret_post":if("string"!=typeof this.client_secret)throw TypeError("client_secret_post client authentication method requires a client_secret");return{form:{client_id:this.client_id,client_secret:this.client_secret}};case"private_key_jwt":case"client_secret_jwt":{let r=c(),n=await p.call(this,e,{iat:r,exp:r+60,jti:s(),iss:this.client_id,sub:this.client_id,aud:this.issuer.issuer,...t});return{form:{client_id:this.client_id,client_assertion:n,client_assertion_type:"urn:ietf:params:oauth:client-assertion-type:jwt-bearer"}}}case"client_secret_basic":{if("string"!=typeof this.client_secret)throw TypeError("client_secret_basic client authentication method requires a client_secret");let e=`${f(this.client_id)}:${f(this.client_secret)}`,t=n.from(e).toString("base64");return{headers:{Authorization:`Basic ${t}`}}}default:throw TypeError(`missing, or unsupported, ${e}_endpoint_auth_method`)}}async function y(e,t,{clientAssertionPayload:r,endpointAuthMethod:n=e,DPoP:i}={}){let o,a=d(t,await h.call(this,n,{clientAssertionPayload:r})),s=this[`${n}_endpoint_auth_method`].includes("tls_client_auth")||"token"===e&&this.tls_client_certificate_bound_access_tokens;if(s&&this.issuer.mtls_endpoint_aliases&&(o=this.issuer.mtls_endpoint_aliases[`${e}_endpoint`]),o=o||this.issuer[`${e}_endpoint`],"form"in a)for(let[e,t]of Object.entries(a.form))void 0===t&&delete a.form[e];return u.call(this,{...a,method:"POST",url:o,headers:{..."revocation"!==e?{Accept:"application/json"}:void 0,...a.headers}},{mTLS:s,DPoP:i})}e.exports={resolveResponseType:function(){let{length:e,0:t}=this.response_types;if(1===e)return t},resolveRedirectUri:function(){let{length:e,0:t}=this.redirect_uris||[];if(1===e)return t},authFor:h,authenticatedPost:y}},78491:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"afterTaskAsyncStorageInstance",{enumerable:!0,get:function(){return n}});let n=(0,r(55786).createAsyncLocalStorage)()},79249:(e,t)=>{var r=1,n="=";function i(e,t){return c(a(u(e),u(t)))}function o(e){return d(f(l(e),8*e.length))}function a(e,t){var r=l(e);r.length>16&&(r=f(r,8*e.length));for(var n=Array(16),i=Array(16),o=0;o<16;o++)n[o]=0x36363636^r[o],i[o]=0x5c5c5c5c^r[o];var a=f(n.concat(l(t)),512+8*t.length);return d(f(i.concat(a),672))}function s(e){for(var t,n=r?"0123456789ABCDEF":"0123456789abcdef",i="",o=0;o<e.length;o++)t=e.charCodeAt(o),i+=n.charAt(t>>>4&15)+n.charAt(15&t);return i}function c(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r="",i=e.length,o=0;o<i;o+=3)for(var a=e.charCodeAt(o)<<16|(o+1<i?e.charCodeAt(o+1)<<8:0)|(o+2<i?e.charCodeAt(o+2):0),s=0;s<4;s++)8*o+6*s>8*e.length?r+=n:r+=t.charAt(a>>>6*(3-s)&63);return r}function u(e){for(var t,r,n="",i=-1;++i<e.length;)t=e.charCodeAt(i),r=i+1<e.length?e.charCodeAt(i+1):0,55296<=t&&t<=56319&&56320<=r&&r<=57343&&(t=65536+((1023&t)<<10)+(1023&r),i++),t<=127?n+=String.fromCharCode(t):t<=2047?n+=String.fromCharCode(192|t>>>6&31,128|63&t):t<=65535?n+=String.fromCharCode(224|t>>>12&15,128|t>>>6&63,128|63&t):t<=2097151&&(n+=String.fromCharCode(240|t>>>18&7,128|t>>>12&63,128|t>>>6&63,128|63&t));return n}function l(e){for(var t=Array(e.length>>2),r=0;r<t.length;r++)t[r]=0;for(var r=0;r<8*e.length;r+=8)t[r>>5]|=(255&e.charCodeAt(r/8))<<24-r%32;return t}function d(e){for(var t="",r=0;r<32*e.length;r+=8)t+=String.fromCharCode(e[r>>5]>>>24-r%32&255);return t}function f(e,t){e[t>>5]|=128<<24-t%32,e[(t+64>>9<<4)+15]=t;for(var r=Array(80),n=0x67452301,i=-0x10325477,o=-0x67452302,a=0x10325476,s=-0x3c2d1e10,c=0;c<e.length;c+=16){for(var u=n,l=i,d=o,f=a,m=s,b=0;b<80;b++){b<16?r[b]=e[c+b]:r[b]=g(r[b-3]^r[b-8]^r[b-14]^r[b-16],1);var w=y(y(g(n,5),p(b,i,o,a)),y(y(s,r[b]),h(b)));s=a,a=o,o=g(i,30),i=n,n=w}n=y(n,u),i=y(i,l),o=y(o,d),a=y(a,f),s=y(s,m)}return[n,i,o,a,s]}function p(e,t,r,n){return e<20?t&r|~t&n:e<40?t^r^n:e<60?t&r|t&n|r&n:t^r^n}function h(e){return e<20?0x5a827999:e<40?0x6ed9eba1:e<60?-0x70e44324:-0x359d3e2a}function y(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function g(e,t){return e<<t|e>>>32-t}t.HMACSHA1=function(e,t){return i(e,t)}},79289:e=>{e.exports=e=>!!e&&e.constructor===Object},79391:(e,t,r)=>{let{format:n}=r(68994);class i extends Error{constructor({error_description:e,error:t,error_uri:r,session_state:n,state:i,scope:o},a){super(e?`${t} (${e})`:t),Object.assign(this,{error:t},e&&{error_description:e},r&&{error_uri:r},i&&{state:i},o&&{scope:o},n&&{session_state:n}),a&&Object.defineProperty(this,"response",{value:a}),this.name=this.constructor.name,Error.captureStackTrace(this,this.constructor)}}class o extends Error{constructor(...e){if("string"==typeof e[0])super(n(...e));else{let{message:t,printf:r,response:i,...o}=e[0];r?super(n(...r)):super(t),Object.assign(this,o),i&&Object.defineProperty(this,"response",{value:i})}this.name=this.constructor.name,Error.captureStackTrace(this,this.constructor)}}e.exports={OPError:i,RPError:o}},79435:(e,t,r)=>{var n=r(82909).Buffer;let{STATUS_CODES:i}=r(40939),{format:o}=r(68994),{OPError:a}=r(79391),s=r(9391),c=e=>{let t=s(e.headers["www-authenticate"]);if(t.error)throw new a(t,e)},u=e=>{let t=!1;try{let r;r="object"!=typeof e.body||n.isBuffer(e.body)?JSON.parse(e.body):e.body,(t="string"==typeof r.error&&r.error.length)&&Object.defineProperty(e,"body",{value:r,configurable:!0})}catch(e){}return t};e.exports=function(e,{statusCode:t=200,body:r=!0,bearer:n=!1}={}){if(e.statusCode!==t){if(n&&c(e),u(e))throw new a(e.body,e);throw new a({error:o("expected %i %s, got: %i %s",t,i[t],e.statusCode,i[e.statusCode])},e)}if(r&&!e.body)throw new a({error:o("expected %i %s with body but no body was returned",t,i[t])},e);return e.body}},79919:(e,t,r)=>{var n=r(82909).Buffer,i=r(63426),o=r(79249),a=r(40939),s=r(58184),c=r(3305),u=r(48041),l=r(48454);t.OAuth=function(e,t,r,n,i,o,a,s,c){if(this._isEcho=!1,this._requestUrl=e,this._accessUrl=t,this._consumerKey=r,this._consumerSecret=this._encodeData(n),"RSA-SHA1"==a&&(this._privateKey=n),this._version=i,void 0===o?this._authorize_callback="oob":this._authorize_callback=o,"PLAINTEXT"!=a&&"HMAC-SHA1"!=a&&"RSA-SHA1"!=a)throw Error("Un-supported signature method: "+a);this._signatureMethod=a,this._nonceSize=s||32,this._headers=c||{Accept:"*/*",Connection:"close","User-Agent":"Node authentication"},this._clientOptions=this._defaultClientOptions={requestTokenHttpMethod:"POST",accessTokenHttpMethod:"POST",followRedirects:!0},this._oauthParameterSeperator=","},t.OAuthEcho=function(e,t,r,n,i,o,a,s){if(this._isEcho=!0,this._realm=e,this._verifyCredentials=t,this._consumerKey=r,this._consumerSecret=this._encodeData(n),"RSA-SHA1"==o&&(this._privateKey=n),this._version=i,"PLAINTEXT"!=o&&"HMAC-SHA1"!=o&&"RSA-SHA1"!=o)throw Error("Un-supported signature method: "+o);this._signatureMethod=o,this._nonceSize=a||32,this._headers=s||{Accept:"*/*",Connection:"close","User-Agent":"Node authentication"},this._oauthParameterSeperator=","},t.OAuthEcho.prototype=t.OAuth.prototype,t.OAuth.prototype._getTimestamp=function(){return Math.floor(new Date().getTime()/1e3)},t.OAuth.prototype._encodeData=function(e){return null==e||""==e?"":encodeURIComponent(e).replace(/\!/g,"%21").replace(/\'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")},t.OAuth.prototype._decodeData=function(e){return null!=e&&(e=e.replace(/\+/g," ")),decodeURIComponent(e)},t.OAuth.prototype._getSignature=function(e,t,r,n){var i=this._createSignatureBase(e,t,r);return this._createSignature(i,n)},t.OAuth.prototype._normalizeUrl=function(e){var t=c.parse(e,!0),r="";return t.port&&("http:"==t.protocol&&"80"!=t.port||"https:"==t.protocol&&"443"!=t.port)&&(r=":"+t.port),t.pathname&&""!=t.pathname||(t.pathname="/"),t.protocol+"//"+t.hostname+r+t.pathname},t.OAuth.prototype._isParameterNameAnOAuthParameter=function(e){var t=e.match("^oauth_");return!!t&&"oauth_"===t[0]},t.OAuth.prototype._buildAuthorizationHeaders=function(e){var t="OAuth ";this._isEcho&&(t+='realm="'+this._realm+'",');for(var r=0;r<e.length;r++)this._isParameterNameAnOAuthParameter(e[r][0])&&(t+=""+this._encodeData(e[r][0])+'="'+this._encodeData(e[r][1])+'"'+this._oauthParameterSeperator);return t.substring(0,t.length-this._oauthParameterSeperator.length)},t.OAuth.prototype._makeArrayOfArgumentsHash=function(e){var t=[];for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(Array.isArray(n))for(var i=0;i<n.length;i++)t[t.length]=[r,n[i]];else t[t.length]=[r,n]}return t},t.OAuth.prototype._sortRequestParams=function(e){return e.sort(function(e,t){return e[0]==t[0]?e[1]<t[1]?-1:1:e[0]<t[0]?-1:1}),e},t.OAuth.prototype._normaliseRequestParams=function(e){for(var t=this._makeArrayOfArgumentsHash(e),r=0;r<t.length;r++)t[r][0]=this._encodeData(t[r][0]),t[r][1]=this._encodeData(t[r][1]);t=this._sortRequestParams(t);for(var e="",r=0;r<t.length;r++)e+=t[r][0],e+="=",e+=t[r][1],r<t.length-1&&(e+="&");return e},t.OAuth.prototype._createSignatureBase=function(e,t,r){return t=this._encodeData(this._normalizeUrl(t)),r=this._encodeData(r),e.toUpperCase()+"&"+t+"&"+r},t.OAuth.prototype._createSignature=function(e,t){if(void 0===t)var t="";else t=this._encodeData(t);var r=this._consumerSecret+"&"+t,n="";return"PLAINTEXT"==this._signatureMethod?n=r:"RSA-SHA1"==this._signatureMethod?(r=this._privateKey||"",n=i.createSign("RSA-SHA1").update(e).sign(r,"base64")):n=i.Hmac?i.createHmac("sha1",r).update(e).digest("base64"):o.HMACSHA1(r,e),n},t.OAuth.prototype.NONCE_CHARS=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","0","1","2","3","4","5","6","7","8","9"],t.OAuth.prototype._getNonce=function(e){for(var t,r=[],n=this.NONCE_CHARS,i=n.length,o=0;o<e;o++)t=Math.floor(Math.random()*i),r[o]=n[t];return r.join("")},t.OAuth.prototype._createClient=function(e,t,r,n,i,o){var c,u={host:t,port:e,path:n,method:r,headers:i};return(c=o?s:a).request(u)},t.OAuth.prototype._prepareParameters=function(e,t,r,n,i){var o={oauth_timestamp:this._getTimestamp(),oauth_nonce:this._getNonce(this._nonceSize),oauth_version:this._version,oauth_signature_method:this._signatureMethod,oauth_consumer_key:this._consumerKey};if(e&&(o.oauth_token=e),this._isEcho)l=this._getSignature("GET",this._verifyCredentials,this._normaliseRequestParams(o),t);else{if(i)for(var a in i)i.hasOwnProperty(a)&&(o[a]=i[a]);var s=c.parse(n,!1);if(s.query){var l,d,f=u.parse(s.query);for(var a in f){var p=f[a];if("object"==typeof p)for(d in p)o[a+"["+d+"]"]=p[d];else o[a]=p}}l=this._getSignature(r,n,this._normaliseRequestParams(o),t)}var h=this._sortRequestParams(this._makeArrayOfArgumentsHash(o));return h[h.length]=["oauth_signature",l],h},t.OAuth.prototype._performSecureRequest=function(e,t,r,i,o,a,s,d){var f,p,h=this._prepareParameters(e,t,r,i,o);s||(s="application/x-www-form-urlencoded");var y=c.parse(i,!1);"http:"!=y.protocol||y.port||(y.port=80),"https:"!=y.protocol||y.port||(y.port=443);var g={},m=this._buildAuthorizationHeaders(h);for(var b in this._isEcho?g["X-Verify-Credentials-Authorization"]=m:g.Authorization=m,g.Host=y.host,this._headers)this._headers.hasOwnProperty(b)&&(g[b]=this._headers[b]);for(var b in o)this._isParameterNameAnOAuthParameter(b)&&delete o[b];("POST"==r||"PUT"==r)&&null==a&&null!=o&&(a=u.stringify(o).replace(/\!/g,"%21").replace(/\'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")),a?n.isBuffer(a)?g["Content-length"]=a.length:g["Content-length"]=n.byteLength(a):g["Content-length"]=0,g["Content-Type"]=s,y.pathname&&""!=y.pathname||(y.pathname="/"),f=y.query?y.pathname+"?"+y.query:y.pathname,p="https:"==y.protocol?this._createClient(y.port,y.hostname,r,f,g,!0):this._createClient(y.port,y.hostname,r,f,g);var w=this._clientOptions;if(!d)return("POST"==r||"PUT"==r)&&null!=a&&""!=a&&p.write(a),p;var v="",_=this,E=l.isAnEarlyCloseHost(y.hostname),S=!1,A=function(n){S||(S=!0,n.statusCode>=200&&n.statusCode<=299?d(null,v,n):(301==n.statusCode||302==n.statusCode)&&w.followRedirects&&n.headers&&n.headers.location?_._performSecureRequest(e,t,r,n.headers.location,o,a,s,d):d({statusCode:n.statusCode,data:v},v,n))};p.on("response",function(e){e.setEncoding("utf8"),e.on("data",function(e){v+=e}),e.on("end",function(){A(e)}),e.on("close",function(){E&&A(e)})}),p.on("error",function(e){S||(S=!0,d(e))}),("POST"==r||"PUT"==r)&&null!=a&&""!=a&&p.write(a),p.end()},t.OAuth.prototype.setClientOptions=function(e){var t,r={},n=Object.prototype.hasOwnProperty;for(t in this._defaultClientOptions)n.call(e,t)?r[t]=e[t]:r[t]=this._defaultClientOptions[t];this._clientOptions=r},t.OAuth.prototype.getOAuthAccessToken=function(e,t,r,n){var i={};"function"==typeof r?n=r:i.oauth_verifier=r,this._performSecureRequest(e,t,this._clientOptions.accessTokenHttpMethod,this._accessUrl,i,null,null,function(e,t,r){if(e)n(e);else{var i=u.parse(t),o=i.oauth_token;delete i.oauth_token;var a=i.oauth_token_secret;delete i.oauth_token_secret,n(null,o,a,i)}})},t.OAuth.prototype.getProtectedResource=function(e,t,r,n,i){this._performSecureRequest(r,n,t,e,null,"",null,i)},t.OAuth.prototype.delete=function(e,t,r,n){return this._performSecureRequest(t,r,"DELETE",e,null,"",null,n)},t.OAuth.prototype.get=function(e,t,r,n){return this._performSecureRequest(t,r,"GET",e,null,"",null,n)},t.OAuth.prototype._putOrPost=function(e,t,r,i,o,a,s){var c=null;return"function"==typeof a&&(s=a,a=null),"string"==typeof o||n.isBuffer(o)||(a="application/x-www-form-urlencoded",c=o,o=null),this._performSecureRequest(r,i,e,t,c,o,a,s)},t.OAuth.prototype.put=function(e,t,r,n,i,o){return this._putOrPost("PUT",e,t,r,n,i,o)},t.OAuth.prototype.post=function(e,t,r,n,i,o){return this._putOrPost("POST",e,t,r,n,i,o)},t.OAuth.prototype.getOAuthRequestToken=function(e,t){"function"==typeof e&&(t=e,e={}),this._authorize_callback&&(e.oauth_callback=this._authorize_callback),this._performSecureRequest(null,null,this._clientOptions.requestTokenHttpMethod,this._requestUrl,e,null,null,function(e,r,n){if(e)t(e);else{var i=u.parse(r),o=i.oauth_token,a=i.oauth_token_secret;delete i.oauth_token,delete i.oauth_token_secret,t(null,o,a,i)}})},t.OAuth.prototype.signUrl=function(e,t,r,n){if(void 0===n)var n="GET";for(var i=this._prepareParameters(t,r,n,e,{}),o=c.parse(e,!1),a="",s=0;s<i.length;s++)a+=i[s][0]+"="+this._encodeData(i[s][1])+"&";return a=a.substring(0,a.length-1),o.protocol+"//"+o.host+o.pathname+"?"+a},t.OAuth.prototype.authHeader=function(e,t,r,n){if(void 0===n)var n="GET";var i=this._prepareParameters(t,r,n,e,{});return this._buildAuthorizationHeaders(i)}},80787:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultCallbacks=void 0,t.defaultCallbacks={signIn:()=>!0,redirect:({url:e,baseUrl:t})=>e.startsWith("/")?`${t}${e}`:new URL(e).origin===t?e:t,session:({session:e})=>e,jwt:({token:e})=>e}},81176:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ReflectAdapter",{enumerable:!0,get:function(){return r}});class r{static get(e,t,r){let n=Reflect.get(e,t,r);return"function"==typeof n?n.bind(e):n}static set(e,t,r,n){return Reflect.set(e,t,r,n)}static has(e,t){return Reflect.has(e,t)}static deleteProperty(e,t){return Reflect.deleteProperty(e,t)}}},81343:(e,t,r)=>{"use strict";var n=r(29563);Object.defineProperty(t,"__esModule",{value:!0}),t.init=m;var i=r(63426),o=n(r(5861)),a=r(42226),s=n(r(46209)),c=r(41362),u=g(r(3883)),l=g(r(61075)),d=r(80787),f=r(86459),p=r(99738),h=n(r(40316));function y(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(y=function(e){return e?r:t})(e)}function g(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=y(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&({}).hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}async function m({authOptions:e,providerId:t,action:r,origin:n,cookies:y,callbackUrl:g,csrfToken:m,isPost:b}){var w,v;let _=(0,h.default)(n),E=(0,c.createSecret)({authOptions:e,url:_}),{providers:S,provider:A}=(0,s.default)({providers:e.providers,url:_,providerId:t}),x=2592e3,k={debug:!1,pages:{},theme:{colorScheme:"auto",logo:"",brandColor:"",buttonText:""},...e,url:_,action:r,provider:A,cookies:{...u.defaultCookies(null!=(w=e.useSecureCookies)?w:_.base.startsWith("https://")),...e.cookies},secret:E,providers:S,session:{strategy:e.adapter?"database":"jwt",maxAge:x,updateAge:86400,generateSessionToken:()=>{var e;return null!=(e=null===i.randomUUID||void 0===i.randomUUID?void 0:(0,i.randomUUID)())?e:(0,i.randomBytes)(32).toString("hex")},...e.session},jwt:{secret:E,maxAge:x,encode:l.encode,decode:l.decode,...e.jwt},events:(0,a.eventsErrorHandler)(null!=(v=e.events)?v:{},o.default),adapter:(0,a.adapterErrorHandler)(e.adapter,o.default),callbacks:{...d.defaultCallbacks,...e.callbacks},logger:o.default,callbackUrl:_.origin},P=[],{csrfToken:R,cookie:O,csrfTokenVerified:T}=(0,f.createCSRFToken)({options:k,cookieValue:null==y?void 0:y[k.cookies.csrfToken.name],isPost:b,bodyValue:m});k.csrfToken=R,k.csrfTokenVerified=T,O&&P.push({name:k.cookies.csrfToken.name,value:O,options:k.cookies.csrfToken.options});let{callbackUrl:C,callbackUrlCookie:I}=await (0,p.createCallbackUrl)({options:k,cookieValue:null==y?void 0:y[k.cookies.callbackUrl.name],paramValue:g});return k.callbackUrl=C,I&&P.push({name:k.cookies.callbackUrl.name,value:I,options:k.cookies.callbackUrl.options}),{options:k,cookies:P}}},82919:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{HeadersAdapter:function(){return o},ReadonlyHeadersError:function(){return i}});let n=r(81176);class i extends Error{constructor(){super("Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers")}static callable(){throw new i}}class o extends Headers{constructor(e){super(),this.headers=new Proxy(e,{get(t,r,i){if("symbol"==typeof r)return n.ReflectAdapter.get(t,r,i);let o=r.toLowerCase(),a=Object.keys(e).find(e=>e.toLowerCase()===o);if(void 0!==a)return n.ReflectAdapter.get(t,a,i)},set(t,r,i,o){if("symbol"==typeof r)return n.ReflectAdapter.set(t,r,i,o);let a=r.toLowerCase(),s=Object.keys(e).find(e=>e.toLowerCase()===a);return n.ReflectAdapter.set(t,s??r,i,o)},has(t,r){if("symbol"==typeof r)return n.ReflectAdapter.has(t,r);let i=r.toLowerCase(),o=Object.keys(e).find(e=>e.toLowerCase()===i);return void 0!==o&&n.ReflectAdapter.has(t,o)},deleteProperty(t,r){if("symbol"==typeof r)return n.ReflectAdapter.deleteProperty(t,r);let i=r.toLowerCase(),o=Object.keys(e).find(e=>e.toLowerCase()===i);return void 0===o||n.ReflectAdapter.deleteProperty(t,o)}})}static seal(e){return new Proxy(e,{get(e,t,r){switch(t){case"append":case"delete":case"set":return i.callable;default:return n.ReflectAdapter.get(e,t,r)}}})}merge(e){return Array.isArray(e)?e.join(", "):e}static from(e){return e instanceof Headers?e:new o(e)}append(e,t){let r=this.headers[e];"string"==typeof r?this.headers[e]=[r,t]:Array.isArray(r)?r.push(t):this.headers[e]=t}delete(e){delete this.headers[e]}get(e){let t=this.headers[e];return void 0!==t?this.merge(t):null}has(e){return void 0!==this.headers[e]}set(e,t){this.headers[e]=t}forEach(e,t){for(let[r,n]of this.entries())e.call(t,n,r,this)}*entries(){for(let e of Object.keys(this.headers)){let t=e.toLowerCase(),r=this.get(t);yield[t,r]}}*keys(){for(let e of Object.keys(this.headers)){let t=e.toLowerCase();yield t}}*values(){for(let e of Object.keys(this.headers)){let t=this.get(e);yield t}}[Symbol.iterator](){return this.entries()}}},85418:e=>{e.exports=globalThis.structuredClone||(e=>JSON.parse(JSON.stringify(e)))},85959:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{DynamicServerError:function(){return n},isDynamicServerError:function(){return i}});let r="DYNAMIC_SERVER_USAGE";class n extends Error{constructor(e){super("Dynamic server usage: "+e),this.description=e,this.digest=r}}function i(e){return"object"==typeof e&&null!==e&&"digest"in e&&"string"==typeof e.digest&&e.digest===r}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},86049:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=r(63780);function i(e){let{url:t,theme:r}=e;return(0,n.h)("div",{className:"verify-request"},r.brandColor&&(0,n.h)("style",{dangerouslySetInnerHTML:{__html:`
:root {
--brand-color: ${r.brandColor}
}
`}}),(0,n.h)("div",{className:"card"},r.logo&&(0,n.h)("img",{src:r.logo,alt:"Logo",className:"logo"}),(0,n.h)("h1",null,"Check your email"),(0,n.h)("p",null,"A sign in link has been sent to your email address."),(0,n.h)("p",null,(0,n.h)("a",{className:"site",href:t.origin},t.host))))}},86159:e=>{e.exports.keystores=new WeakMap},86355:e=>{e.exports=function(e,...t){let r={};for(let n of t)void 0!==e[n]&&(r[n]=e[n]);return r}},86459:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createCSRFToken=i;var n=r(63426);function i({options:e,cookieValue:t,isPost:r,bodyValue:i}){if(t){let[o,a]=t.split("|");if(a===(0,n.createHash)("sha256").update(`${o}${e.secret}`).digest("hex"))return{csrfTokenVerified:r&&o===i,csrfToken:o}}let o=(0,n.randomBytes)(32).toString("hex"),a=(0,n.createHash)("sha256").update(`${o}${e.secret}`).digest("hex");return{cookie:`${o}|${a}`,csrfToken:o}}},87435:(e,t)=>{"use strict";function r(e){return e&&"object"==typeof e&&!Array.isArray(e)}function n(e,...t){if(!t.length)return e;let i=t.shift();if(r(e)&&r(i))for(let t in i)r(i[t])?(e[t]||Object.assign(e,{[t]:{}}),n(e[t],i[t])):Object.assign(e,{[t]:i[t]});return n(e,...t)}Object.defineProperty(t,"__esModule",{value:!0}),t.merge=n},88267:e=>{"use strict";var t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,o=e=>{throw TypeError(e)},a=(e,r)=>{for(var n in r)t(e,n,{get:r[n],enumerable:!0})},s=(e,o,a,s)=>{if(o&&"object"==typeof o||"function"==typeof o)for(let c of n(o))i.call(e,c)||c===a||t(e,c,{get:()=>o[c],enumerable:!(s=r(o,c))||s.enumerable});return e},c=e=>s(t({},"__esModule",{value:!0}),e),u=(e,t,r)=>t.has(e)?o("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),l={};a(l,{Decimal:()=>tp,Public:()=>d,getRuntime:()=>H,makeStrictEnum:()=>k,objectEnumValues:()=>S}),e.exports=c(l);var d={};function f(...e){return e=>e}a(d,{validator:()=>f});var p,h=Symbol(),y=new WeakMap,g=class{constructor(e){e===h?y.set(this,"Prisma.".concat(this._getName())):y.set(this,"new Prisma.".concat(this._getNamespace(),".").concat(this._getName(),"()"))}_getName(){return this.constructor.name}toString(){return y.get(this)}},m=class extends g{_getNamespace(){return"NullTypes"}},b=class extends m{constructor(){super(...arguments),u(this,p)}};p=new WeakMap,A(b,"DbNull");var w,v=class extends m{constructor(){super(...arguments),u(this,w)}};w=new WeakMap,A(v,"JsonNull");var _,E=class extends m{constructor(){super(...arguments),u(this,_)}};_=new WeakMap,A(E,"AnyNull");var S={classes:{DbNull:b,JsonNull:v,AnyNull:E},instances:{DbNull:new b(h),JsonNull:new v(h),AnyNull:new E(h)}};function A(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}var x=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function k(e){return new Proxy(e,{get(e,t){if(t in e)return e[t];if(!x.has(t))throw TypeError("Invalid enum value: ".concat(String(t)))}})}var P=()=>{var e,t;return(null==(t=null==(e=globalThis.process)?void 0:e.release)?void 0:t.name)==="node"},R=()=>{var e,t;return!!globalThis.Bun||!!(null!=(t=null==(e=globalThis.process)?void 0:e.versions)&&t.bun)},O=()=>!!globalThis.Deno,T=()=>"object"==typeof globalThis.Netlify,C=()=>"object"==typeof globalThis.EdgeRuntime,I=()=>{var e;return(null==(e=globalThis.navigator)?void 0:e.userAgent)==="Cloudflare-Workers"};function j(){var e;return null!=(e=[[T,"netlify"],[C,"edge-light"],[I,"workerd"],[O,"deno"],[R,"bun"],[P,"node"]].flatMap(e=>e[0]()?[e[1]]:[]).at(0))?e:""}var D={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function H(){let e=j();return{id:e,prettyName:D[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}var N,U,M=9e15,W=1e9,L="0123456789abcdef",F="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",B="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",K={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-9e15,maxE:9e15,crypto:!1},$=!0,J="[DecimalError] ",q=J+"Invalid argument: ",z=J+"Precision limit exceeded",G=J+"crypto unavailable",V="[object Decimal]",X=Math.floor,Y=Math.pow,Z=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Q=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,ee=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,et=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,er=1e7,en=7,ei=0x1fffffffffffff,eo=F.length-1,ea=B.length-1,es={toStringTag:V};function ec(e){var t,r,n,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;t<i;t++)(r=en-(n=e[t]+"").length)&&(o+=ev(r)),o+=n;(r=en-(n=(a=e[t])+"").length)&&(o+=ev(r))}else if(0===a)return"0";for(;a%10==0;)a/=10;return o+a}function eu(e,t,r){if(e!==~~e||e<t||e>r)throw Error(q+e)}function el(e,t,r,n){var i,o,a,s;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=en,i=0):(i=Math.ceil((t+1)/en),t%=en),o=Y(10,en-t),s=e[i]%o|0,null==n?t<3?(0==t?s=s/100|0:1==t&&(s=s/10|0),a=r<4&&99999==s||r>3&&49999==s||5e4==s||0==s):a=(r<4&&s+1==o||r>3&&s+1==o/2)&&(e[i+1]/o/100|0)==Y(10,t-2)-1||(s==o/2||0==s)&&(e[i+1]/o/100|0)==0:t<4?(0==t?s=s/1e3|0:1==t?s=s/100|0:2==t&&(s=s/10|0),a=(n||r<4)&&9999==s||!n&&r>3&&4999==s):a=((n||r<4)&&s+1==o||!n&&r>3&&s+1==o/2)&&(e[i+1]/o/1e3|0)==Y(10,t-3)-1,a}function ed(e,t,r){for(var n,i,o=[0],a=0,s=e.length;a<s;){for(i=o.length;i--;)o[i]*=t;for(o[0]+=L.indexOf(e.charAt(a++)),n=0;n<o.length;n++)o[n]>r-1&&(void 0===o[n+1]&&(o[n+1]=0),o[n+1]+=o[n]/r|0,o[n]%=r)}return o.reverse()}function ef(e,t){var r,n,i;if(t.isZero())return t;(n=t.d.length)<32?i=(1/eC(4,r=Math.ceil(n/3))).toString():(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=eT(e,1,t.times(i),new e(1));for(var o=r;o--;){var a=t.times(t);t=a.times(a).minus(a).times(8).plus(1)}return e.precision-=r,t}es.absoluteValue=es.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),eh(e)},es.ceil=function(){return eh(new this.constructor(this),this.e+1,2)},es.clampedTo=es.clamp=function(e,t){var r=this,n=r.constructor;if(e=new n(e),t=new n(t),!e.s||!t.s)return new n(NaN);if(e.gt(t))throw Error(q+t);return 0>r.cmp(e)?e:r.cmp(t)>0?t:new n(r)},es.comparedTo=es.cmp=function(e){var t,r,n,i,o=this,a=o.d,s=(e=new o.constructor(e)).d,c=o.s,u=e.s;if(!a||!s)return c&&u?c!==u?c:a===s?0:!a^c<0?1:-1:NaN;if(!a[0]||!s[0])return a[0]?c:s[0]?-u:0;if(c!==u)return c;if(o.e!==e.e)return o.e>e.e^c<0?1:-1;for(n=a.length,i=s.length,t=0,r=n<i?n:i;t<r;++t)if(a[t]!==s[t])return a[t]>s[t]^c<0?1:-1;return n===i?0:n>i^c<0?1:-1},es.cosine=es.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+en,n.rounding=1,r=ef(n,eI(n,r)),n.precision=e,n.rounding=t,eh(2==U||3==U?r.neg():r,e,t,!0)):new n(1):new n(NaN)},es.cubeRoot=es.cbrt=function(){var e,t,r,n,i,o,a,s,c,u,l=this,d=l.constructor;if(!l.isFinite()||l.isZero())return new d(l);for($=!1,(o=l.s*Y(l.s*l,1/3))&&Math.abs(o)!=1/0?n=new d(o.toString()):(r=ec(l.d),(o=((e=l.e)-r.length+1)%3)&&(r+=1==o||-2==o?"0":"00"),o=Y(r,1/3),e=X((e+1)/3)-(e%3==(e<0?-1:2)),(n=new d(r=o==1/0?"5e"+e:(r=o.toExponential()).slice(0,r.indexOf("e")+1)+e)).s=l.s),a=(e=d.precision)+3;;)if(n=ep((u=(c=(s=n).times(s).times(s)).plus(l)).plus(l).times(s),u.plus(c),a+2,1),ec(s.d).slice(0,a)===(r=ec(n.d)).slice(0,a))if("9999"!=(r=r.slice(a-3,a+1))&&(i||"4999"!=r)){+r&&(+r.slice(1)||"5"!=r.charAt(0))||(eh(n,e+1,1),t=!n.times(n).times(n).eq(l));break}else{if(!i&&(eh(s,e+1,0),s.times(s).times(s).eq(l))){n=s;break}a+=4,i=1}return $=!0,eh(n,e,d.rounding,t)},es.decimalPlaces=es.dp=function(){var e,t=this.d,r=NaN;if(t){if(r=((e=t.length-1)-X(this.e/en))*en,e=t[e])for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r},es.dividedBy=es.div=function(e){return ep(this,new this.constructor(e))},es.dividedToIntegerBy=es.divToInt=function(e){var t=this,r=t.constructor;return eh(ep(t,new r(e),0,1,1),r.precision,r.rounding)},es.equals=es.eq=function(e){return 0===this.cmp(e)},es.floor=function(){return eh(new this.constructor(this),this.e+1,3)},es.greaterThan=es.gt=function(e){return this.cmp(e)>0},es.greaterThanOrEqualTo=es.gte=function(e){var t=this.cmp(e);return 1==t||0===t},es.hyperbolicCosine=es.cosh=function(){var e,t,r,n,i,o=this,a=o.constructor,s=new a(1);if(!o.isFinite())return new a(o.s?1/0:NaN);if(o.isZero())return s;r=a.precision,n=a.rounding,a.precision=r+Math.max(o.e,o.sd())+4,a.rounding=1,(i=o.d.length)<32?t=(1/eC(4,e=Math.ceil(i/3))).toString():(e=16,t="2.3283064365386962890625e-10"),o=eT(a,1,o.times(t),new a(1),!0);for(var c,u=e,l=new a(8);u--;)c=o.times(o),o=s.minus(c.times(l.minus(c.times(l))));return eh(o,a.precision=r,a.rounding=n,!0)},es.hyperbolicSine=es.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,(n=i.d.length)<3)i=eT(o,2,i,i,!0);else{e=(e=1.4*Math.sqrt(n))>16?16:0|e,i=eT(o,2,i=i.times(1/eC(5,e)),i,!0);for(var a,s=new o(5),c=new o(16),u=new o(20);e--;)a=i.times(i),i=i.times(s.plus(a.times(c.times(a).plus(u))))}return o.precision=t,o.rounding=r,eh(i,t,r,!0)},es.hyperbolicTangent=es.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,ep(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)},es.inverseCosine=es.acos=function(){var e=this,t=e.constructor,r=e.abs().cmp(1),n=t.precision,i=t.rounding;return -1!==r?0===r?e.isNeg()?eb(t,n,i):new t(0):new t(NaN):e.isZero()?eb(t,n+4,i).times(.5):(t.precision=n+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=n,t.rounding=i,e.times(2))},es.inverseHyperbolicCosine=es.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,$=!1,r=r.times(r).minus(1).sqrt().plus(r),$=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)},es.inverseHyperbolicSine=es.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,$=!1,r=r.times(r).plus(1).sqrt().plus(r),$=!0,n.precision=e,n.rounding=t,r.ln())},es.inverseHyperbolicTangent=es.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,Math.max(n=i.sd(),e)<-(2*i.e)-1?eh(new o(i),e,t,!0):(o.precision=r=n-i.e,i=ep(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)},es.inverseSine=es.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,-1!==t?0===t?((e=eb(o,r+4,n).times(.5)).s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))},es.inverseTangent=es.atan=function(){var e,t,r,n,i,o,a,s,c,u=this,l=u.constructor,d=l.precision,f=l.rounding;if(u.isFinite()){if(u.isZero())return new l(u);if(u.abs().eq(1)&&d+4<=ea)return(a=eb(l,d+4,f).times(.25)).s=u.s,a}else{if(!u.s)return new l(NaN);if(d+4<=ea)return(a=eb(l,d+4,f).times(.5)).s=u.s,a}for(l.precision=s=d+10,l.rounding=1,e=r=Math.min(28,s/en+2|0);e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for($=!1,t=Math.ceil(s/en),n=1,c=u.times(u),a=new l(u),i=u;-1!==e;)if(i=i.times(c),o=a.minus(i.div(n+=2)),i=i.times(c),void 0!==(a=o.plus(i.div(n+=2))).d[t])for(e=t;a.d[e]===o.d[e]&&e--;);return r&&(a=a.times(2<<r-1)),$=!0,eh(a,l.precision=d,l.rounding=f,!0)},es.isFinite=function(){return!!this.d},es.isInteger=es.isInt=function(){return!!this.d&&X(this.e/en)>this.d.length-2},es.isNaN=function(){return!this.s},es.isNegative=es.isNeg=function(){return this.s<0},es.isPositive=es.isPos=function(){return this.s>0},es.isZero=function(){return!!this.d&&0===this.d[0]},es.lessThan=es.lt=function(e){return 0>this.cmp(e)},es.lessThanOrEqualTo=es.lte=function(e){return 1>this.cmp(e)},es.logarithm=es.log=function(e){var t,r,n,i,o,a,s,c,u=this,l=u.constructor,d=l.precision,f=l.rounding,p=5;if(null==e)e=new l(10),t=!0;else{if(r=(e=new l(e)).d,e.s<0||!r||!r[0]||e.eq(1))return new l(NaN);t=e.eq(10)}if(r=u.d,u.s<0||!r||!r[0]||u.eq(1))return new l(r&&!r[0]?-1/0:1!=u.s?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10==0;)i/=10;o=1!==i}if($=!1,el((c=ep(a=ex(u,s=d+p),n=t?em(l,s+10):ex(e,s),s,1)).d,i=d,f))do if(s+=10,c=ep(a=ex(u,s),n=t?em(l,s+10):ex(e,s),s,1),!o){+ec(c.d).slice(i+1,i+15)+1==1e14&&(c=eh(c,d+1,0));break}while(el(c.d,i+=10,f));return $=!0,eh(c,d,f)},es.minus=es.sub=function(e){var t,r,n,i,o,a,s,c,u,l,d,f,p=this,h=p.constructor;if(e=new h(e),!p.d||!e.d)return p.s&&e.s?p.d?e.s=-e.s:e=new h(e.d||p.s!==e.s?p:NaN):e=new h(NaN),e;if(p.s!=e.s)return e.s=-e.s,p.plus(e);if(u=p.d,f=e.d,s=h.precision,c=h.rounding,!u[0]||!f[0]){if(f[0])e.s=-e.s;else{if(!u[0])return new h(3===c?-0:0);e=new h(p)}return $?eh(e,s,c):e}if(r=X(e.e/en),l=X(p.e/en),u=u.slice(),o=l-r){for((d=o<0)?(t=u,o=-o,a=f.length):(t=f,r=l,a=u.length),o>(n=Math.max(Math.ceil(s/en),a)+2)&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for((d=(n=u.length)<(a=f.length))&&(a=n),n=0;n<a;n++)if(u[n]!=f[n]){d=u[n]<f[n];break}o=0}for(d&&(t=u,u=f,f=t,e.s=-e.s),a=u.length,n=f.length-a;n>0;--n)u[a++]=0;for(n=f.length;n>o;){if(u[--n]<f[n]){for(i=n;i&&0===u[--i];)u[i]=er-1;--u[i],u[n]+=er}u[n]-=f[n]}for(;0===u[--a];)u.pop();for(;0===u[0];u.shift())--r;return u[0]?(e.d=u,e.e=eg(u,r),$?eh(e,s,c):e):new h(3===c?-0:0)},es.modulo=es.mod=function(e){var t,r=this,n=r.constructor;return e=new n(e),r.d&&e.s&&(!e.d||e.d[0])?e.d&&(!r.d||r.d[0])?($=!1,9==n.modulo?(t=ep(r,e.abs(),0,3,1),t.s*=e.s):t=ep(r,e,0,n.modulo,1),t=t.times(e),$=!0,r.minus(t)):eh(new n(r),n.precision,n.rounding):new n(NaN)},es.naturalExponential=es.exp=function(){return eA(this)},es.naturalLogarithm=es.ln=function(){return ex(this)},es.negated=es.neg=function(){var e=new this.constructor(this);return e.s=-e.s,eh(e)},es.plus=es.add=function(e){var t,r,n,i,o,a,s,c,u,l,d=this,f=d.constructor;if(e=new f(e),!d.d||!e.d)return d.s&&e.s?d.d||(e=new f(e.d||d.s===e.s?d:NaN)):e=new f(NaN),e;if(d.s!=e.s)return e.s=-e.s,d.minus(e);if(u=d.d,l=e.d,s=f.precision,c=f.rounding,!u[0]||!l[0])return l[0]||(e=new f(d)),$?eh(e,s,c):e;if(o=X(d.e/en),n=X(e.e/en),u=u.slice(),i=o-n){for(i<0?(r=u,i=-i,a=l.length):(r=l,n=o,a=u.length),i>(a=(o=Math.ceil(s/en))>a?o+1:a+1)&&(i=a,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for((a=u.length)-(i=l.length)<0&&(i=a,r=l,l=u,u=r),t=0;i;)t=(u[--i]=u[i]+l[i]+t)/er|0,u[i]%=er;for(t&&(u.unshift(t),++n),a=u.length;0==u[--a];)u.pop();return e.d=u,e.e=eg(u,n),$?eh(e,s,c):e},es.precision=es.sd=function(e){var t,r=this;if(void 0!==e&&!!e!==e&&1!==e&&0!==e)throw Error(q+e);return r.d?(t=ew(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t},es.round=function(){var e=this,t=e.constructor;return eh(new t(e),e.e+1,t.rounding)},es.sine=es.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+en,n.rounding=1,r=eO(n,eI(n,r)),n.precision=e,n.rounding=t,eh(U>2?r.neg():r,e,t,!0)):new n(NaN)},es.squareRoot=es.sqrt=function(){var e,t,r,n,i,o,a=this,s=a.d,c=a.e,u=a.s,l=a.constructor;if(1!==u||!s||!s[0])return new l(!u||u<0&&(!s||s[0])?NaN:s?a:1/0);for($=!1,0==(u=Math.sqrt(+a))||u==1/0?(((t=ec(s)).length+c)%2==0&&(t+="0"),u=Math.sqrt(t),c=X((c+1)/2)-(c<0||c%2),n=new l(t=u==1/0?"5e"+c:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+c)):n=new l(u.toString()),r=(c=l.precision)+3;;)if(n=(o=n).plus(ep(a,o,r+2,1)).times(.5),ec(o.d).slice(0,r)===(t=ec(n.d)).slice(0,r))if("9999"!=(t=t.slice(r-3,r+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(eh(n,c+1,1),e=!n.times(n).eq(a));break}else{if(!i&&(eh(o,c+1,0),o.times(o).eq(a))){n=o;break}r+=4,i=1}return $=!0,eh(n,c,l.rounding,e)},es.tangent=es.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,(r=r.sin()).s=1,r=ep(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,eh(2==U||4==U?r.neg():r,e,t,!0)):new n(NaN)},es.times=es.mul=function(e){var t,r,n,i,o,a,s,c,u,l=this,d=l.constructor,f=l.d,p=(e=new d(e)).d;if(e.s*=l.s,!f||!f[0]||!p||!p[0])return new d(!e.s||f&&!f[0]&&!p||p&&!p[0]&&!f?NaN:!f||!p?e.s/0:0*e.s);for(r=X(l.e/en)+X(e.e/en),(c=f.length)<(u=p.length)&&(o=f,f=p,p=o,a=c,c=u,u=a),o=[],n=a=c+u;n--;)o.push(0);for(n=u;--n>=0;){for(t=0,i=c+n;i>n;)s=o[i]+p[n]*f[i-n-1]+t,o[i--]=s%er|0,t=s/er|0;o[i]=(o[i]+t)%er|0}for(;!o[--a];)o.pop();return t?++r:o.shift(),e.d=o,e.e=eg(o,r),$?eh(e,d.precision,d.rounding):e},es.toBinary=function(e,t){return ej(this,2,e,t)},es.toDecimalPlaces=es.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),void 0===e?r:(eu(e,0,W),void 0===t?t=n.rounding:eu(t,0,8),eh(r,e+r.e+1,t))},es.toExponential=function(e,t){var r,n=this,i=n.constructor;return void 0===e?r=ey(n,!0):(eu(e,0,W),void 0===t?t=i.rounding:eu(t,0,8),r=ey(n=eh(new i(n),e+1,t),!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r},es.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return void 0===e?r=ey(i):(eu(e,0,W),void 0===t?t=o.rounding:eu(t,0,8),r=ey(n=eh(new o(i),e+i.e+1,t),!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r},es.toFraction=function(e){var t,r,n,i,o,a,s,c,u,l,d,f,p=this,h=p.d,y=p.constructor;if(!h)return new y(p);if(u=r=new y(1),n=c=new y(0),a=(o=(t=new y(n)).e=ew(h)-p.e-1)%en,t.d[0]=Y(10,a<0?en+a:a),null==e)e=o>0?t:u;else{if(!(s=new y(e)).isInt()||s.lt(u))throw Error(q+s);e=s.gt(t)?o>0?t:u:s}for($=!1,s=new y(ec(h)),l=y.precision,y.precision=o=h.length*en*2;d=ep(s,t,0,1,1),1!=(i=r.plus(d.times(n))).cmp(e);)r=n,n=i,i=u,u=c.plus(d.times(i)),c=i,i=t,t=s.minus(d.times(i)),s=i;return i=ep(e.minus(r),n,0,1,1),c=c.plus(i.times(u)),r=r.plus(i.times(n)),c.s=u.s=p.s,f=1>ep(u,n,o,1).minus(p).abs().cmp(ep(c,r,o,1).minus(p).abs())?[u,n]:[c,r],y.precision=l,$=!0,f},es.toHexadecimal=es.toHex=function(e,t){return ej(this,16,e,t)},es.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),null==e){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),void 0===t?t=n.rounding:eu(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?($=!1,r=ep(r,e,0,t,1).times(e),$=!0,eh(r)):(e.s=r.s,r=e),r},es.toNumber=function(){return+this},es.toOctal=function(e,t){return ej(this,8,e,t)},es.toPower=es.pow=function(e){var t,r,n,i,o,a,s=this,c=s.constructor,u=+(e=new c(e));if(!s.d||!e.d||!s.d[0]||!e.d[0])return new c(Y(+s,u));if((s=new c(s)).eq(1))return s;if(n=c.precision,o=c.rounding,e.eq(1))return eh(s,n,o);if((t=X(e.e/en))>=e.d.length-1&&(r=u<0?-u:u)<=ei)return i=e_(c,s,r,n),e.s<0?new c(1).div(i):eh(i,n,o);if((a=s.s)<0){if(t<e.d.length-1)return new c(NaN);if((1&e.d[t])==0&&(a=1),0==s.e&&1==s.d[0]&&1==s.d.length)return s.s=a,s}return(t=0!=(r=Y(+s,u))&&isFinite(r)?new c(r+"").e:X(u*(Math.log("0."+ec(s.d))/Math.LN10+s.e+1)))>c.maxE+1||t<c.minE-1?new c(t>0?a/0:0):($=!1,c.rounding=s.s=1,r=Math.min(12,(t+"").length),(i=eA(e.times(ex(s,n+r)),n)).d&&el((i=eh(i,n+5,1)).d,n,o)&&(t=n+10,+ec((i=eh(eA(e.times(ex(s,t+r)),t),t+5,1)).d).slice(n+1,n+15)+1==1e14&&(i=eh(i,n+1,0))),i.s=a,$=!0,c.rounding=o,eh(i,n,o))},es.toPrecision=function(e,t){var r,n=this,i=n.constructor;return void 0===e?r=ey(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(eu(e,1,W),void 0===t?t=i.rounding:eu(t,0,8),r=ey(n=eh(new i(n),e,t),e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r},es.toSignificantDigits=es.toSD=function(e,t){var r=this,n=r.constructor;return void 0===e?(e=n.precision,t=n.rounding):(eu(e,1,W),void 0===t?t=n.rounding:eu(t,0,8)),eh(new n(r),e,t)},es.toString=function(){var e=this,t=e.constructor,r=ey(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r},es.truncated=es.trunc=function(){return eh(new this.constructor(this),this.e+1,1)},es.valueOf=es.toJSON=function(){var e=this,t=e.constructor,r=ey(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};var ep=function(){function e(e,t,r){var n,i=0,o=e.length;for(e=e.slice();o--;)n=e[o]*t+i,e[o]=n%r|0,i=n/r|0;return i&&e.unshift(i),e}function t(e,t,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;i<r;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=+(e[r]<t[r]),e[r]=i*n+e[r]-t[r];for(;!e[0]&&e.length>1;)e.shift()}return function(n,i,o,a,s,c){var u,l,d,f,p,h,y,g,m,b,w,v,_,E,S,A,x,k,P,R,O=n.constructor,T=n.s==i.s?1:-1,C=n.d,I=i.d;if(!C||!C[0]||!I||!I[0])return new O(!n.s||!i.s||(C?I&&C[0]==I[0]:!I)?NaN:C&&0==C[0]||!I?0*T:T/0);for(c?(p=1,l=n.e-i.e):(c=er,p=en,l=X(n.e/p)-X(i.e/p)),P=I.length,x=C.length,b=(m=new O(T)).d=[],d=0;I[d]==(C[d]||0);d++);if(I[d]>(C[d]||0)&&l--,null==o?(E=o=O.precision,a=O.rounding):E=s?o+(n.e-i.e)+1:o,E<0)b.push(1),h=!0;else{if(E=E/p+2|0,d=0,1==P){for(f=0,I=I[0],E++;(d<x||f)&&E--;d++)S=f*c+(C[d]||0),b[d]=S/I|0,f=S%I|0;h=f||d<x}else{for((f=c/(I[0]+1)|0)>1&&(I=e(I,f,c),C=e(C,f,c),P=I.length,x=C.length),A=P,v=(w=C.slice(0,P)).length;v<P;)w[v++]=0;(R=I.slice()).unshift(0),k=I[0],I[1]>=c/2&&++k;do f=0,(u=t(I,w,P,v))<0?(_=w[0],P!=v&&(_=_*c+(w[1]||0)),(f=_/k|0)>1?(f>=c&&(f=c-1),g=(y=e(I,f,c)).length,v=w.length,1==(u=t(y,w,g,v))&&(f--,r(y,P<g?R:I,g,c))):(0==f&&(u=f=1),y=I.slice()),(g=y.length)<v&&y.unshift(0),r(w,y,v,c),-1==u&&(v=w.length,(u=t(I,w,P,v))<1&&(f++,r(w,P<v?R:I,v,c))),v=w.length):0===u&&(f++,w=[0]),b[d++]=f,u&&w[0]?w[v++]=C[A]||0:(w=[C[A]],v=1);while((A++<x||void 0!==w[0])&&E--);h=void 0!==w[0]}b[0]||b.shift()}if(1==p)m.e=l,N=h;else{for(d=1,f=b[0];f>=10;f/=10)d++;m.e=d+l*p-1,eh(m,s?o+m.e+1:o,a,h)}return m}}();function eh(e,t,r,n){var i,o,a,s,c,u,l,d,f,p=e.constructor;t:if(null!=t){if(!(d=e.d))return e;for(i=1,s=d[0];s>=10;s/=10)i++;if((o=t-i)<0)o+=en,a=t,c=(l=d[f=0])/Y(10,i-a-1)%10|0;else if((f=Math.ceil((o+1)/en))>=(s=d.length))if(n){for(;s++<=f;)d.push(0);l=c=0,i=1,o%=en,a=o-en+1}else break t;else{for(l=s=d[f],i=1;s>=10;s/=10)i++;o%=en,c=(a=o-en+i)<0?0:l/Y(10,i-a-1)%10|0}if(n=n||t<0||void 0!==d[f+1]||(a<0?l:l%Y(10,i-a-1)),u=r<4?(c||n)&&(0==r||r==(e.s<0?3:2)):c>5||5==c&&(4==r||n||6==r&&(o>0?a>0?l/Y(10,i-a):0:d[f-1])%10&1||r==(e.s<0?8:7)),t<1||!d[0])return d.length=0,u?(t-=e.e+1,d[0]=Y(10,(en-t%en)%en),e.e=-t||0):d[0]=e.e=0,e;if(0==o?(d.length=f,s=1,f--):(d.length=f+1,s=Y(10,en-o),d[f]=a>0?(l/Y(10,i-a)%Y(10,a)|0)*s:0),u)for(;;)if(0==f){for(o=1,a=d[0];a>=10;a/=10)o++;for(a=d[0]+=s,s=1;a>=10;a/=10)s++;o!=s&&(e.e++,d[0]==er&&(d[0]=1));break}else{if(d[f]+=s,d[f]!=er)break;d[f--]=0,s=1}for(o=d.length;0===d[--o];)d.pop()}return $&&(e.e>p.maxE?(e.d=null,e.e=NaN):e.e<p.minE&&(e.e=0,e.d=[0])),e}function ey(e,t,r){if(!e.isFinite())return ek(e);var n,i=e.e,o=ec(e.d),a=o.length;return t?(r&&(n=r-a)>0?o=o.charAt(0)+"."+o.slice(1)+ev(n):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+ev(-i-1)+o,r&&(n=r-a)>0&&(o+=ev(n))):i>=a?(o+=ev(i+1-a),r&&(n=r-i-1)>0&&(o=o+"."+ev(n))):((n=i+1)<a&&(o=o.slice(0,n)+"."+o.slice(n)),r&&(n=r-a)>0&&(i+1===a&&(o+="."),o+=ev(n))),o}function eg(e,t){var r=e[0];for(t*=en;r>=10;r/=10)t++;return t}function em(e,t,r){if(t>eo)throw $=!0,r&&(e.precision=r),Error(z);return eh(new e(F),t,1,!0)}function eb(e,t,r){if(t>ea)throw Error(z);return eh(new e(B),t,r,!0)}function ew(e){var t=e.length-1,r=t*en+1;if(t=e[t]){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function ev(e){for(var t="";e--;)t+="0";return t}function e_(e,t,r,n){var i,o=new e(1),a=Math.ceil(n/en+4);for($=!1;;){if(r%2&&eD((o=o.times(t)).d,a)&&(i=!0),0===(r=X(r/2))){r=o.d.length-1,i&&0===o.d[r]&&++o.d[r];break}eD((t=t.times(t)).d,a)}return $=!0,o}function eE(e){return 1&e.d[e.d.length-1]}function eS(e,t,r){for(var n,i,o=new e(t[0]),a=0;++a<t.length;){if(!(i=new e(t[a])).s){o=i;break}((n=o.cmp(i))===r||0===n&&o.s===r)&&(o=i)}return o}function eA(e,t){var r,n,i,o,a,s,c,u=0,l=0,d=0,f=e.constructor,p=f.rounding,h=f.precision;if(!e.d||!e.d[0]||e.e>17)return new f(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(null==t?($=!1,c=h):c=t,s=new f(.03125);e.e>-2;)e=e.times(s),d+=5;for(c+=n=Math.log(Y(2,d))/Math.LN10*2+5|0,r=o=a=new f(1),f.precision=c;;){if(o=eh(o.times(e),c,1),r=r.times(++l),ec((s=a.plus(ep(o,r,c,1))).d).slice(0,c)===ec(a.d).slice(0,c)){for(i=d;i--;)a=eh(a.times(a),c,1);if(null!=t)return f.precision=h,a;if(!(u<3&&el(a.d,c-n,p,u)))return eh(a,f.precision=h,p,$=!0);f.precision=c+=10,r=o=s=new f(1),l=0,u++}a=s}}function ex(e,t){var r,n,i,o,a,s,c,u,l,d,f,p=1,h=10,y=e,g=y.d,m=y.constructor,b=m.rounding,w=m.precision;if(y.s<0||!g||!g[0]||!y.e&&1==g[0]&&1==g.length)return new m(g&&!g[0]?-1/0:1!=y.s?NaN:g?0:y);if(null==t?($=!1,l=w):l=t,m.precision=l+=h,n=(r=ec(g)).charAt(0),!(15e14>Math.abs(o=y.e)))return u=em(m,l+2,w).times(o+""),y=ex(new m(n+"."+r.slice(1)),l-h).plus(u),m.precision=w,null==t?eh(y,w,b,$=!0):y;for(;n<7&&1!=n||1==n&&r.charAt(1)>3;)n=(r=ec((y=y.times(e)).d)).charAt(0),p++;for(o=y.e,n>1?(y=new m("0."+r),o++):y=new m(n+"."+r.slice(1)),d=y,c=a=y=ep(y.minus(1),y.plus(1),l,1),f=eh(y.times(y),l,1),i=3;;){if(a=eh(a.times(f),l,1),ec((u=c.plus(ep(a,new m(i),l,1))).d).slice(0,l)===ec(c.d).slice(0,l))if(c=c.times(2),0!==o&&(c=c.plus(em(m,l+2,w).times(o+""))),c=ep(c,new m(p),l,1),null!=t)return m.precision=w,c;else{if(!el(c.d,l-h,b,s))return eh(c,m.precision=w,b,$=!0);m.precision=l+=h,u=a=y=ep(d.minus(1),d.plus(1),l,1),f=eh(y.times(y),l,1),i=s=1}c=u,i+=2}}function ek(e){return String(e.s*e.s/0)}function eP(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;48===t.charCodeAt(n);n++);for(i=t.length;48===t.charCodeAt(i-1);--i);if(t=t.slice(n,i)){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%en,r<0&&(n+=en),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=en;n<i;)e.d.push(+t.slice(n,n+=en));n=en-(t=t.slice(n)).length}else n-=i;for(;n--;)t+="0";e.d.push(+t),$&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function eR(e,t){var r,n,i,o,a,s,c,u,l;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),et.test(t))return eP(e,t)}else if("Infinity"===t||"NaN"===t)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(Q.test(t))r=16,t=t.toLowerCase();else if(Z.test(t))r=2;else if(ee.test(t))r=8;else throw Error(q+t);for((o=t.search(/p/i))>0?(c=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),a=(o=t.indexOf("."))>=0,n=e.constructor,a&&(o=(s=(t=t.replace(".","")).length)-o,i=e_(n,new n(r),o,2*o)),o=l=(u=ed(t,r,er)).length-1;0===u[o];--o)u.pop();return o<0?new n(0*e.s):(e.e=eg(u,l),e.d=u,$=!1,a&&(e=ep(e,i,4*s)),c&&(e=e.times(54>Math.abs(c)?Y(2,c):tf.pow(2,c))),$=!0,e)}function eO(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:eT(e,2,t,t);r=(r=1.4*Math.sqrt(n))>16?16:0|r,t=eT(e,2,t=t.times(1/eC(5,r)),t);for(var i,o=new e(5),a=new e(16),s=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(a.times(i).minus(s))));return t}function eT(e,t,r,n,i){var o,a,s,c,u=e.precision,l=Math.ceil(u/en);for($=!1,c=r.times(r),s=new e(n);;){if(a=ep(s.times(c),new e(t++*t++),u,1),s=i?n.plus(a):n.minus(a),n=ep(a.times(c),new e(t++*t++),u,1),void 0!==(a=s.plus(n)).d[l]){for(o=l;a.d[o]===s.d[o]&&o--;);if(-1==o)break}o=s,s=n,n=a,a=o}return $=!0,a.d.length=l+1,a}function eC(e,t){for(var r=e;--t;)r*=e;return r}function eI(e,t){var r,n=t.s<0,i=eb(e,e.precision,1),o=i.times(.5);if((t=t.abs()).lte(o))return U=n?4:1,t;if((r=t.divToInt(i)).isZero())U=n?3:2;else{if((t=t.minus(r.times(i))).lte(o))return U=eE(r)?n?2:3:n?4:1,t;U=eE(r)?n?1:4:n?3:2}return t.minus(i).abs()}function ej(e,t,r,n){var i,o,a,s,c,u,l,d,f,p=e.constructor,h=void 0!==r;if(h?(eu(r,1,W),void 0===n?n=p.rounding:eu(n,0,8)):(r=p.precision,n=p.rounding),e.isFinite()){for(a=(l=ey(e)).indexOf("."),h?(i=2,16==t?r=4*r-3:8==t&&(r=3*r-2)):i=t,a>=0&&(l=l.replace(".",""),(f=new p(1)).e=l.length-a,f.d=ed(ey(f),10,i),f.e=f.d.length),o=c=(d=ed(l,10,i)).length;0==d[--c];)d.pop();if(d[0]){if(a<0?o--:((e=new p(e)).d=d,e.e=o,d=(e=ep(e,f,r,n,0,i)).d,o=e.e,u=N),a=d[r],s=i/2,u=u||void 0!==d[r+1],u=n<4?(void 0!==a||u)&&(0===n||n===(e.s<0?3:2)):a>s||a===s&&(4===n||u||6===n&&1&d[r-1]||n===(e.s<0?8:7)),d.length=r,u)for(;++d[--r]>i-1;)d[r]=0,r||(++o,d.unshift(1));for(c=d.length;!d[c-1];--c);for(a=0,l="";a<c;a++)l+=L.charAt(d[a]);if(h){if(c>1)if(16==t||8==t){for(a=16==t?4:3,--c;c%a;c++)l+="0";for(c=(d=ed(l,i,t)).length;!d[c-1];--c);for(a=1,l="1.";a<c;a++)l+=L.charAt(d[a])}else l=l.charAt(0)+"."+l.slice(1);l=l+(o<0?"p":"p+")+o}else if(o<0){for(;++o;)l="0"+l;l="0."+l}else if(++o>c)for(o-=c;o--;)l+="0";else o<c&&(l=l.slice(0,o)+"."+l.slice(o))}else l=h?"0p+0":"0";l=(16==t?"0x":2==t?"0b":8==t?"0o":"")+l}else l=ek(e);return e.s<0?"-"+l:l}function eD(e,t){if(e.length>t)return e.length=t,!0}function eH(e){return new this(e).abs()}function eN(e){return new this(e).acos()}function eU(e){return new this(e).acosh()}function eM(e,t){return new this(e).plus(t)}function eW(e){return new this(e).asin()}function eL(e){return new this(e).asinh()}function eF(e){return new this(e).atan()}function eB(e){return new this(e).atanh()}function eK(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(r=t.s<0?eb(this,n,i):new this(0)).s=e.s:!e.d||t.isZero()?(r=eb(this,o,1).times(.5)).s=e.s:t.s<0?(this.precision=o,this.rounding=1,r=this.atan(ep(e,t,o,1)),t=eb(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(ep(e,t,o,1)):(r=eb(this,o,1).times(t.s>0?.25:.75)).s=e.s:r=new this(NaN),r}function e$(e){return new this(e).cbrt()}function eJ(e){return eh(e=new this(e),e.e+1,2)}function eq(e,t,r){return new this(e).clamp(t,r)}function ez(e){if(!e||"object"!=typeof e)throw Error(J+"Object expected");var t,r,n,i=!0===e.defaults,o=["precision",1,W,"rounding",0,8,"toExpNeg",-M,0,"toExpPos",0,M,"maxE",0,M,"minE",-M,0,"modulo",0,9];for(t=0;t<o.length;t+=3)if(r=o[t],i&&(this[r]=K[r]),void 0!==(n=e[r]))if(X(n)===n&&n>=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(q+r+": "+n);if(r="crypto",i&&(this[r]=K[r]),void 0!==(n=e[r]))if(!0===n||!1===n||0===n||1===n)if(n)if("u">typeof crypto&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(G);else this[r]=!1;else throw Error(q+r+": "+n);return this}function eG(e){return new this(e).cos()}function eV(e){return new this(e).cosh()}function eX(e){var t,r,n;function i(e){var t,r,n,o=this;if(!(o instanceof i))return new i(e);if(o.constructor=i,e1(e)){o.s=e.s,$?!e.d||e.e>i.maxE?(o.e=NaN,o.d=null):e.e<i.minE?(o.e=0,o.d=[0]):(o.e=e.e,o.d=e.d.slice()):(o.e=e.e,o.d=e.d?e.d.slice():e.d);return}if("number"==(n=typeof e)){if(0===e){o.s=1/e<0?-1:1,o.e=0,o.d=[0];return}if(e<0?(e=-e,o.s=-1):o.s=1,e===~~e&&e<1e7){for(t=0,r=e;r>=10;r/=10)t++;$?t>i.maxE?(o.e=NaN,o.d=null):t<i.minE?(o.e=0,o.d=[0]):(o.e=t,o.d=[e]):(o.e=t,o.d=[e]);return}if(0*e!=0){e||(o.s=NaN),o.e=NaN,o.d=null;return}return eP(o,e.toString())}if("string"===n)return 45===(r=e.charCodeAt(0))?(e=e.slice(1),o.s=-1):(43===r&&(e=e.slice(1)),o.s=1),et.test(e)?eP(o,e):eR(o,e);if("bigint"===n)return e<0?(e=-e,o.s=-1):o.s=1,eP(o,e.toString());throw Error(q+e)}if(i.prototype=es,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.EUCLID=9,i.config=i.set=ez,i.clone=eX,i.isDecimal=e1,i.abs=eH,i.acos=eN,i.acosh=eU,i.add=eM,i.asin=eW,i.asinh=eL,i.atan=eF,i.atanh=eB,i.atan2=eK,i.cbrt=e$,i.ceil=eJ,i.clamp=eq,i.cos=eG,i.cosh=eV,i.div=eY,i.exp=eZ,i.floor=eQ,i.hypot=e0,i.ln=e2,i.log=e5,i.log10=e3,i.log2=e6,i.max=e4,i.min=e8,i.mod=e9,i.mul=e7,i.pow=te,i.random=tt,i.round=tr,i.sign=tn,i.sin=ti,i.sinh=to,i.sqrt=ta,i.sub=ts,i.sum=tc,i.tan=tu,i.tanh=tl,i.trunc=td,void 0===e&&(e={}),e&&!0!==e.defaults)for(n=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return i.config(e),i}function eY(e,t){return new this(e).div(t)}function eZ(e){return new this(e).exp()}function eQ(e){return eh(e=new this(e),e.e+1,3)}function e0(){var e,t,r=new this(0);for($=!1,e=0;e<arguments.length;)if(t=new this(arguments[e++]),t.d)r.d&&(r=r.plus(t.times(t)));else{if(t.s)return $=!0,new this(1/0);r=t}return $=!0,r.sqrt()}function e1(e){return e instanceof tf||e&&e.toStringTag===V||!1}function e2(e){return new this(e).ln()}function e5(e,t){return new this(e).log(t)}function e6(e){return new this(e).log(2)}function e3(e){return new this(e).log(10)}function e4(){return eS(this,arguments,-1)}function e8(){return eS(this,arguments,1)}function e9(e,t){return new this(e).mod(t)}function e7(e,t){return new this(e).mul(t)}function te(e,t){return new this(e).pow(t)}function tt(e){var t,r,n,i,o=0,a=new this(1),s=[];if(void 0===e?e=this.precision:eu(e,1,W),n=Math.ceil(e/en),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(n));o<n;)(i=t[o])>=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:s[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);o<n;)(i=t[o]+(t[o+1]<<8)+(t[o+2]<<16)+((127&t[o+3])<<24))>=214e7?crypto.randomBytes(4).copy(t,o):(s.push(i%1e7),o+=4);o=n/4}else throw Error(G);else for(;o<n;)s[o++]=1e7*Math.random()|0;for(n=s[--o],e%=en,n&&e&&(i=Y(10,en-e),s[o]=(n/i|0)*i);0===s[o];o--)s.pop();if(o<0)r=0,s=[0];else{for(r=-1;0===s[0];r-=en)s.shift();for(n=1,i=s[0];i>=10;i/=10)n++;n<en&&(r-=en-n)}return a.e=r,a.d=s,a}function tr(e){return eh(e=new this(e),e.e+1,this.rounding)}function tn(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN}function ti(e){return new this(e).sin()}function to(e){return new this(e).sinh()}function ta(e){return new this(e).sqrt()}function ts(e,t){return new this(e).sub(t)}function tc(){var e=0,t=arguments,r=new this(t[0]);for($=!1;r.s&&++e<t.length;)r=r.plus(t[e]);return $=!0,eh(r,this.precision,this.rounding)}function tu(e){return new this(e).tan()}function tl(e){return new this(e).tanh()}function td(e){return eh(e=new this(e),e.e+1,1)}es[Symbol.for("nodejs.util.inspect.custom")]=es.toString,es[Symbol.toStringTag]="Decimal";var tf=es.constructor=eX(K);F=new tf(F),B=new tf(B);var tp=tf},88947:(e,t,r)=>{var n=r(65364);let{inspect:i}=r(68994),o=r(3305),{RPError:a}=r(79391),s=r(47099),c=r(75499),u=r(79435),l=r(29005),d=r(18707),f=r(85418),{keystore:p}=r(34341),h=["https://login.microsoftonline.com/common/.well-known/openid-configuration","https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration","https://login.microsoftonline.com/organizations/v2.0/.well-known/openid-configuration","https://login.microsoftonline.com/consumers/v2.0/.well-known/openid-configuration"],y=Symbol(),g={claim_types_supported:["normal"],claims_parameter_supported:!1,grant_types_supported:["authorization_code","implicit"],request_parameter_supported:!1,request_uri_parameter_supported:!0,require_request_uri_registration:!1,response_modes_supported:["query","fragment"],token_endpoint_auth_methods_supported:["client_secret_basic"]};class m{#u;constructor(e={}){let t=e[y];delete e[y],["introspection","revocation"].forEach(t=>{e[`${t}_endpoint`]&&void 0===e[`${t}_endpoint_auth_methods_supported`]&&void 0===e[`${t}_endpoint_auth_signing_alg_values_supported`]&&(e.token_endpoint_auth_methods_supported&&(e[`${t}_endpoint_auth_methods_supported`]=e.token_endpoint_auth_methods_supported),e.token_endpoint_auth_signing_alg_values_supported&&(e[`${t}_endpoint_auth_signing_alg_values_supported`]=e.token_endpoint_auth_signing_alg_values_supported))}),this.#u=new Map,Object.entries(e).forEach(([e,t])=>{this.#u.set(e,t),this[e]||Object.defineProperty(this,e,{get(){return this.#u.get(e)},enumerable:!0})}),c.set(this.issuer,this);let r=s(this,t);Object.defineProperties(this,{Client:{value:r,enumerable:!0},FAPI1Client:{value:class extends r{},enumerable:!0},FAPI2Client:{value:class extends r{},enumerable:!0}})}get metadata(){return f(Object.fromEntries(this.#u.entries()))}static async webfinger(e){let t=l(e),{host:r}=o.parse(t),n=`https://${r}/.well-known/webfinger`,i=u(await d.call(this,{method:"GET",url:n,responseType:"json",searchParams:{resource:t,rel:"http://openid.net/specs/connect/1.0/issuer"},headers:{Accept:"application/json"}})),s=Array.isArray(i.links)&&i.links.find(e=>"object"==typeof e&&"http://openid.net/specs/connect/1.0/issuer"===e.rel&&e.href);if(!s)throw new a({message:"no issuer found in webfinger response",body:i});if("string"!=typeof s.href||!s.href.startsWith("https://"))throw new a({printf:["invalid issuer location %s",s.href],body:i});let f=s.href;if(c.has(f))return c.get(f);let p=await this.discover(f);if(p.issuer!==f)throw c.del(p.issuer),new a("discovered issuer mismatch, expected %s, got: %s",f,p.issuer);return p}static async discover(e){let t=b(e),r=u(await d.call(this,{method:"GET",responseType:"json",url:t,headers:{Accept:"application/json"}}));return new m({...g,...r,[y]:!!h.find(e=>t.startsWith(e))})}async reloadJwksUri(){await p.call(this,!0)}[i.custom](){return`${this.constructor.name} ${i(this.metadata,{depth:1/0,colors:n.stdout.isTTY,compact:!1,sorted:!0})}`}}function b(e){let t=o.parse(e);if(t.pathname.includes("/.well-known/"))return e;{let e;return e=t.pathname.endsWith("/")?`${t.pathname}.well-known/openid-configuration`:`${t.pathname}/.well-known/openid-configuration`,o.format({...t,pathname:e})}}e.exports=m},88984:(e,t,r)=>{"use strict";var n=r(29563);Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=n(r(21426)),o=n(r(93174)),a=n(r(45123)),s=n(r(86049)),c=n(r(32166)),u=n(r(97501));function l(e){let{url:t,theme:r,query:n,cookies:l}=e;function d({html:e,title:t,status:n}){var o;return{cookies:l,status:n,headers:[{key:"Content-Type",value:"text/html"}],body:`<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><style>${(0,u.default)()}</style><title>${t}</title></head><body class="__next-auth-theme-${null!=(o=null==r?void 0:r.colorScheme)?o:"auto"}"><div class="page">${(0,i.default)(e)}</div></body></html>`}}return{signin:t=>d({html:(0,o.default)({csrfToken:e.csrfToken,providers:e.providers,callbackUrl:e.callbackUrl,theme:r,...n,...t}),title:"Sign In"}),signout:n=>d({html:(0,a.default)({csrfToken:e.csrfToken,url:t,theme:r,...n}),title:"Sign Out"}),verifyRequest:e=>d({html:(0,s.default)({url:t,theme:r,...e}),title:"Verify Request"}),error:e=>d({...(0,c.default)({url:t,theme:r,...e}),title:"Error"})}}},89632:(e,t,r)=>{let n=r(88947),{OPError:i,RPError:o}=r(79391),a=r(29338),s=r(10490),{CLOCK_TOLERANCE:c,HTTP_OPTIONS:u}=r(13466),l=r(16436),{setDefaults:d}=r(18707);e.exports={Issuer:n,Strategy:a,TokenSet:s,errors:{OPError:i,RPError:o},custom:{setHttpOptionsDefaults:d,http_options:u,clock_tolerance:c},generators:l}},89918:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.openidClient=i;var n=r(89632);async function i(e){let t,r=e.provider;if(r.httpOptions&&n.custom.setHttpOptionsDefaults(r.httpOptions),r.wellKnown)t=await n.Issuer.discover(r.wellKnown);else{var i,o,a;t=new n.Issuer({issuer:r.issuer,authorization_endpoint:null==(i=r.authorization)?void 0:i.url,token_endpoint:null==(o=r.token)?void 0:o.url,userinfo_endpoint:null==(a=r.userinfo)?void 0:a.url,jwks_uri:r.jwks_endpoint})}let s=new t.Client({client_id:r.clientId,client_secret:r.clientSecret,redirect_uris:[r.callbackUrl],...r.client},r.jwks);return s[n.custom.clock_tolerance]=10,s}},90633:(e,t,r)=>{"use strict";r.r(t),r.d(t,{CompactEncrypt:()=>tP,CompactSign:()=>tT,EmbeddedJWK:()=>tW,EncryptJWT:()=>tH,FlattenedEncrypt:()=>to,FlattenedSign:()=>tO,GeneralEncrypt:()=>ts,GeneralSign:()=>tI,SignJWT:()=>tD,UnsecuredJWT:()=>tY,base64url:()=>i,calculateJwkThumbprint:()=>tU,calculateJwkThumbprintUri:()=>tM,compactDecrypt:()=>e8,compactVerify:()=>tf,createLocalJWKSet:()=>tq,createRemoteJWKSet:()=>tX,cryptoRuntime:()=>t8,decodeJwt:()=>t1,decodeProtectedHeader:()=>t0,errors:()=>n,exportJWK:()=>tr,exportPKCS8:()=>tt,exportSPKI:()=>te,flattenedDecrypt:()=>e4,flattenedVerify:()=>td,generalDecrypt:()=>e9,generalVerify:()=>tp,generateKeyPair:()=>t3,generateSecret:()=>t4,importJWK:()=>eG,importPKCS8:()=>ez,importSPKI:()=>eJ,importX509:()=>eq,jwtDecrypt:()=>tk,jwtVerify:()=>tx});var n={};r.r(n),r.d(n,{JOSEAlgNotAllowed:()=>x,JOSEError:()=>E,JOSENotSupported:()=>k,JWEDecompressionFailed:()=>R,JWEDecryptionFailed:()=>P,JWEInvalid:()=>O,JWKInvalid:()=>I,JWKSInvalid:()=>j,JWKSMultipleMatchingKeys:()=>H,JWKSNoMatchingKey:()=>D,JWKSTimeout:()=>N,JWSInvalid:()=>T,JWSSignatureVerificationFailed:()=>U,JWTClaimValidationFailed:()=>S,JWTExpired:()=>A,JWTInvalid:()=>C});var i={};r.r(i),r.d(i,{decode:()=>tQ,encode:()=>tZ});let o=crypto,a=e=>e instanceof CryptoKey,s=async(e,t)=>{let r=`SHA-${e.slice(-3)}`;return new Uint8Array(await o.subtle.digest(r,t))},c=new TextEncoder,u=new TextDecoder,l=0x100000000;function d(...e){let t=new Uint8Array(e.reduce((e,{length:t})=>e+t,0)),r=0;return e.forEach(e=>{t.set(e,r),r+=e.length}),t}function f(e,t){return d(c.encode(e),new Uint8Array([0]),t)}function p(e,t,r){if(t<0||t>=l)throw RangeError(`value must be >= 0 and <= ${l-1}. Received ${t}`);e.set([t>>>24,t>>>16,t>>>8,255&t],r)}function h(e){let t=Math.floor(e/l),r=e%l,n=new Uint8Array(8);return p(n,t,0),p(n,r,4),n}function y(e){let t=new Uint8Array(4);return p(t,e),t}function g(e){return d(y(e.length),e)}async function m(e,t,r){let n=Math.ceil((t>>3)/32),i=new Uint8Array(32*n);for(let t=0;t<n;t++){let n=new Uint8Array(4+e.length+r.length);n.set(y(t+1)),n.set(e,4),n.set(r,4+e.length),i.set(await s("sha256",n),32*t)}return i.slice(0,t>>3)}let b=e=>{let t=e;"string"==typeof t&&(t=c.encode(t));let r=32768,n=[];for(let e=0;e<t.length;e+=r)n.push(String.fromCharCode.apply(null,t.subarray(e,e+r)));return btoa(n.join(""))},w=e=>b(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"),v=e=>{let t=atob(e),r=new Uint8Array(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return r},_=e=>{let t=e;t instanceof Uint8Array&&(t=u.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return v(t)}catch(e){throw TypeError("The input to be decoded is not correctly encoded.")}};class E extends Error{static get code(){return"ERR_JOSE_GENERIC"}constructor(e){var t;super(e),this.code="ERR_JOSE_GENERIC",this.name=this.constructor.name,null==(t=Error.captureStackTrace)||t.call(Error,this,this.constructor)}}class S extends E{static get code(){return"ERR_JWT_CLAIM_VALIDATION_FAILED"}constructor(e,t="unspecified",r="unspecified"){super(e),this.code="ERR_JWT_CLAIM_VALIDATION_FAILED",this.claim=t,this.reason=r}}class A extends E{static get code(){return"ERR_JWT_EXPIRED"}constructor(e,t="unspecified",r="unspecified"){super(e),this.code="ERR_JWT_EXPIRED",this.claim=t,this.reason=r}}class x extends E{constructor(){super(...arguments),this.code="ERR_JOSE_ALG_NOT_ALLOWED"}static get code(){return"ERR_JOSE_ALG_NOT_ALLOWED"}}class k extends E{constructor(){super(...arguments),this.code="ERR_JOSE_NOT_SUPPORTED"}static get code(){return"ERR_JOSE_NOT_SUPPORTED"}}class P extends E{constructor(){super(...arguments),this.code="ERR_JWE_DECRYPTION_FAILED",this.message="decryption operation failed"}static get code(){return"ERR_JWE_DECRYPTION_FAILED"}}class R extends E{constructor(){super(...arguments),this.code="ERR_JWE_DECOMPRESSION_FAILED",this.message="decompression operation failed"}static get code(){return"ERR_JWE_DECOMPRESSION_FAILED"}}class O extends E{constructor(){super(...arguments),this.code="ERR_JWE_INVALID"}static get code(){return"ERR_JWE_INVALID"}}class T extends E{constructor(){super(...arguments),this.code="ERR_JWS_INVALID"}static get code(){return"ERR_JWS_INVALID"}}class C extends E{constructor(){super(...arguments),this.code="ERR_JWT_INVALID"}static get code(){return"ERR_JWT_INVALID"}}class I extends E{constructor(){super(...arguments),this.code="ERR_JWK_INVALID"}static get code(){return"ERR_JWK_INVALID"}}class j extends E{constructor(){super(...arguments),this.code="ERR_JWKS_INVALID"}static get code(){return"ERR_JWKS_INVALID"}}class D extends E{constructor(){super(...arguments),this.code="ERR_JWKS_NO_MATCHING_KEY",this.message="no applicable key found in the JSON Web Key Set"}static get code(){return"ERR_JWKS_NO_MATCHING_KEY"}}class H extends E{constructor(){super(...arguments),this.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS",this.message="multiple matching keys found in the JSON Web Key Set"}static get code(){return"ERR_JWKS_MULTIPLE_MATCHING_KEYS"}}Symbol.asyncIterator;class N extends E{constructor(){super(...arguments),this.code="ERR_JWKS_TIMEOUT",this.message="request timed out"}static get code(){return"ERR_JWKS_TIMEOUT"}}class U extends E{constructor(){super(...arguments),this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED",this.message="signature verification failed"}static get code(){return"ERR_JWS_SIGNATURE_VERIFICATION_FAILED"}}let M=o.getRandomValues.bind(o);function W(e){switch(e){case"A128GCM":case"A128GCMKW":case"A192GCM":case"A192GCMKW":case"A256GCM":case"A256GCMKW":return 96;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return 128;default:throw new k(`Unsupported JWE Algorithm: ${e}`)}}let L=e=>M(new Uint8Array(W(e)>>3)),F=(e,t)=>{if(t.length<<3!==W(e))throw new O("Invalid Initialization Vector length")},B=(e,t)=>{let r=e.byteLength<<3;if(r!==t)throw new O(`Invalid Content Encryption Key length. Expected ${t} bits, got ${r} bits`)},K=(e,t)=>{if(!(e instanceof Uint8Array))throw TypeError("First argument must be a buffer");if(!(t instanceof Uint8Array))throw TypeError("Second argument must be a buffer");if(e.length!==t.length)throw TypeError("Input buffers must have the same length");let r=e.length,n=0,i=-1;for(;++i<r;)n|=e[i]^t[i];return 0===n};function $(e,t="algorithm.name"){return TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`)}function J(e,t){return e.name===t}function q(e){return parseInt(e.name.slice(4),10)}function z(e){switch(e){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw Error("unreachable")}}function G(e,t){if(t.length&&!t.some(t=>e.usages.includes(t))){let e="CryptoKey does not support this operation, its usages must include ";if(t.length>2){let r=t.pop();e+=`one of ${t.join(", ")}, or ${r}.`}else 2===t.length?e+=`one of ${t[0]} or ${t[1]}.`:e+=`${t[0]}.`;throw TypeError(e)}}function V(e,t,...r){switch(t){case"HS256":case"HS384":case"HS512":{if(!J(e.algorithm,"HMAC"))throw $("HMAC");let r=parseInt(t.slice(2),10);if(q(e.algorithm.hash)!==r)throw $(`SHA-${r}`,"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!J(e.algorithm,"RSASSA-PKCS1-v1_5"))throw $("RSASSA-PKCS1-v1_5");let r=parseInt(t.slice(2),10);if(q(e.algorithm.hash)!==r)throw $(`SHA-${r}`,"algorithm.hash");break}case"PS256":case"PS384":case"PS512":{if(!J(e.algorithm,"RSA-PSS"))throw $("RSA-PSS");let r=parseInt(t.slice(2),10);if(q(e.algorithm.hash)!==r)throw $(`SHA-${r}`,"algorithm.hash");break}case"EdDSA":if("Ed25519"!==e.algorithm.name&&"Ed448"!==e.algorithm.name)throw $("Ed25519 or Ed448");break;case"ES256":case"ES384":case"ES512":{if(!J(e.algorithm,"ECDSA"))throw $("ECDSA");let r=z(t);if(e.algorithm.namedCurve!==r)throw $(r,"algorithm.namedCurve");break}default:throw TypeError("CryptoKey does not support this operation")}G(e,r)}function X(e,t,...r){switch(t){case"A128GCM":case"A192GCM":case"A256GCM":{if(!J(e.algorithm,"AES-GCM"))throw $("AES-GCM");let r=parseInt(t.slice(1,4),10);if(e.algorithm.length!==r)throw $(r,"algorithm.length");break}case"A128KW":case"A192KW":case"A256KW":{if(!J(e.algorithm,"AES-KW"))throw $("AES-KW");let r=parseInt(t.slice(1,4),10);if(e.algorithm.length!==r)throw $(r,"algorithm.length");break}case"ECDH":switch(e.algorithm.name){case"ECDH":case"X25519":case"X448":break;default:throw $("ECDH, X25519, or X448")}break;case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":if(!J(e.algorithm,"PBKDF2"))throw $("PBKDF2");break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":{if(!J(e.algorithm,"RSA-OAEP"))throw $("RSA-OAEP");let r=parseInt(t.slice(9),10)||1;if(q(e.algorithm.hash)!==r)throw $(`SHA-${r}`,"algorithm.hash");break}default:throw TypeError("CryptoKey does not support this operation")}G(e,r)}function Y(e,t,...r){if(r.length>2){let t=r.pop();e+=`one of type ${r.join(", ")}, or ${t}.`}else 2===r.length?e+=`one of type ${r[0]} or ${r[1]}.`:e+=`of type ${r[0]}.`;return null==t?e+=` Received ${t}`:"function"==typeof t&&t.name?e+=` Received function ${t.name}`:"object"==typeof t&&null!=t&&t.constructor&&t.constructor.name&&(e+=` Received an instance of ${t.constructor.name}`),e}let Z=(e,...t)=>Y("Key must be ",e,...t);function Q(e,t,...r){return Y(`Key for the ${e} algorithm must be `,t,...r)}let ee=e=>a(e),et=["CryptoKey"];async function er(e,t,r,n,i,a){let s,c;if(!(t instanceof Uint8Array))throw TypeError(Z(t,"Uint8Array"));let u=parseInt(e.slice(1,4),10),l=await o.subtle.importKey("raw",t.subarray(u>>3),"AES-CBC",!1,["decrypt"]),f=await o.subtle.importKey("raw",t.subarray(0,u>>3),{hash:`SHA-${u<<1}`,name:"HMAC"},!1,["sign"]),p=d(a,n,r,h(a.length<<3)),y=new Uint8Array((await o.subtle.sign("HMAC",f,p)).slice(0,u>>3));try{s=K(i,y)}catch(e){}if(!s)throw new P;try{c=new Uint8Array(await o.subtle.decrypt({iv:n,name:"AES-CBC"},l,r))}catch(e){}if(!c)throw new P;return c}async function en(e,t,r,n,i,a){let s;t instanceof Uint8Array?s=await o.subtle.importKey("raw",t,"AES-GCM",!1,["decrypt"]):(X(t,e,"decrypt"),s=t);try{return new Uint8Array(await o.subtle.decrypt({additionalData:a,iv:n,name:"AES-GCM",tagLength:128},s,d(r,i)))}catch(e){throw new P}}let ei=async(e,t,r,n,i,o)=>{if(!a(t)&&!(t instanceof Uint8Array))throw TypeError(Z(t,...et,"Uint8Array"));switch(F(e,n),e){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return t instanceof Uint8Array&&B(t,parseInt(e.slice(-3),10)),er(e,t,r,n,i,o);case"A128GCM":case"A192GCM":case"A256GCM":return t instanceof Uint8Array&&B(t,parseInt(e.slice(1,4),10)),en(e,t,r,n,i,o);default:throw new k("Unsupported JWE Content Encryption Algorithm")}},eo=async()=>{throw new k('JWE "zip" (Compression Algorithm) Header Parameter is not supported by your javascript runtime. You need to use the `inflateRaw` decrypt option to provide Inflate Raw implementation.')},ea=async()=>{throw new k('JWE "zip" (Compression Algorithm) Header Parameter is not supported by your javascript runtime. You need to use the `deflateRaw` encrypt option to provide Deflate Raw implementation.')},es=(...e)=>{let t,r=e.filter(Boolean);if(0===r.length||1===r.length)return!0;for(let e of r){let r=Object.keys(e);if(!t||0===t.size){t=new Set(r);continue}for(let e of r){if(t.has(e))return!1;t.add(e)}}return!0};function ec(e){return"object"==typeof e&&null!==e}function eu(e){if(!ec(e)||"[object Object]"!==Object.prototype.toString.call(e))return!1;if(null===Object.getPrototypeOf(e))return!0;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}let el=[{hash:"SHA-256",name:"HMAC"},!0,["sign"]];function ed(e,t){if(e.algorithm.length!==parseInt(t.slice(1,4),10))throw TypeError(`Invalid key size for alg: ${t}`)}function ef(e,t,r){if(a(e))return X(e,t,r),e;if(e instanceof Uint8Array)return o.subtle.importKey("raw",e,"AES-KW",!0,[r]);throw TypeError(Z(e,...et,"Uint8Array"))}let ep=async(e,t,r)=>{let n=await ef(t,e,"wrapKey");ed(n,e);let i=await o.subtle.importKey("raw",r,...el);return new Uint8Array(await o.subtle.wrapKey("raw",i,n,"AES-KW"))},eh=async(e,t,r)=>{let n=await ef(t,e,"unwrapKey");ed(n,e);let i=await o.subtle.unwrapKey("raw",r,n,"AES-KW",...el);return new Uint8Array(await o.subtle.exportKey("raw",i))};async function ey(e,t,r,n,i=new Uint8Array(0),s=new Uint8Array(0)){let u;if(!a(e))throw TypeError(Z(e,...et));if(X(e,"ECDH"),!a(t))throw TypeError(Z(t,...et));X(t,"ECDH","deriveBits");let l=d(g(c.encode(r)),g(i),g(s),y(n));return u="X25519"===e.algorithm.name?256:"X448"===e.algorithm.name?448:Math.ceil(parseInt(e.algorithm.namedCurve.substr(-3),10)/8)<<3,m(new Uint8Array(await o.subtle.deriveBits({name:e.algorithm.name,public:e},t,u)),n,l)}async function eg(e){if(!a(e))throw TypeError(Z(e,...et));return o.subtle.generateKey(e.algorithm,!0,["deriveBits"])}function em(e){if(!a(e))throw TypeError(Z(e,...et));return["P-256","P-384","P-521"].includes(e.algorithm.namedCurve)||"X25519"===e.algorithm.name||"X448"===e.algorithm.name}function eb(e){if(!(e instanceof Uint8Array)||e.length<8)throw new O("PBES2 Salt Input must be 8 or more octets")}function ew(e,t){if(e instanceof Uint8Array)return o.subtle.importKey("raw",e,"PBKDF2",!1,["deriveBits"]);if(a(e))return X(e,t,"deriveBits","deriveKey"),e;throw TypeError(Z(e,...et,"Uint8Array"))}async function ev(e,t,r,n){eb(e);let i=f(t,e),a=parseInt(t.slice(13,16),10),s={hash:`SHA-${t.slice(8,11)}`,iterations:r,name:"PBKDF2",salt:i},c={length:a,name:"AES-KW"},u=await ew(n,t);if(u.usages.includes("deriveBits"))return new Uint8Array(await o.subtle.deriveBits(s,u,a));if(u.usages.includes("deriveKey"))return o.subtle.deriveKey(s,u,c,!1,["wrapKey","unwrapKey"]);throw TypeError('PBKDF2 key "usages" must include "deriveBits" or "deriveKey"')}let e_=async(e,t,r,n=2048,i=M(new Uint8Array(16)))=>{let o=await ev(i,e,n,t);return{encryptedKey:await ep(e.slice(-6),o,r),p2c:n,p2s:w(i)}},eE=async(e,t,r,n,i)=>{let o=await ev(i,e,n,t);return eh(e.slice(-6),o,r)};function eS(e){switch(e){case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":return"RSA-OAEP";default:throw new k(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}let eA=(e,t)=>{if(e.startsWith("RS")||e.startsWith("PS")){let{modulusLength:r}=t.algorithm;if("number"!=typeof r||r<2048)throw TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}},ex=async(e,t,r)=>{if(!a(t))throw TypeError(Z(t,...et));if(X(t,e,"encrypt","wrapKey"),eA(e,t),t.usages.includes("encrypt"))return new Uint8Array(await o.subtle.encrypt(eS(e),t,r));if(t.usages.includes("wrapKey")){let n=await o.subtle.importKey("raw",r,...el);return new Uint8Array(await o.subtle.wrapKey("raw",n,t,eS(e)))}throw TypeError('RSA-OAEP key "usages" must include "encrypt" or "wrapKey" for this operation')},ek=async(e,t,r)=>{if(!a(t))throw TypeError(Z(t,...et));if(X(t,e,"decrypt","unwrapKey"),eA(e,t),t.usages.includes("decrypt"))return new Uint8Array(await o.subtle.decrypt(eS(e),t,r));if(t.usages.includes("unwrapKey")){let n=await o.subtle.unwrapKey("raw",r,t,eS(e),...el);return new Uint8Array(await o.subtle.exportKey("raw",n))}throw TypeError('RSA-OAEP key "usages" must include "decrypt" or "unwrapKey" for this operation')};function eP(e){switch(e){case"A128GCM":return 128;case"A192GCM":return 192;case"A256GCM":case"A128CBC-HS256":return 256;case"A192CBC-HS384":return 384;case"A256CBC-HS512":return 512;default:throw new k(`Unsupported JWE Algorithm: ${e}`)}}let eR=e=>M(new Uint8Array(eP(e)>>3)),eO=(e,t)=>{let r=(e.match(/.{1,64}/g)||[]).join("\n");return`-----BEGIN ${t}-----
${r}
-----END ${t}-----`},eT=async(e,t,r)=>{if(!a(r))throw TypeError(Z(r,...et));if(!r.extractable)throw TypeError("CryptoKey is not extractable");if(r.type!==e)throw TypeError(`key is not a ${e} key`);return eO(b(new Uint8Array(await o.subtle.exportKey(t,r))),`${e.toUpperCase()} KEY`)},eC=e=>eT("public","spki",e),eI=e=>eT("private","pkcs8",e),ej=(e,t,r=0)=>{0===r&&(t.unshift(t.length),t.unshift(6));let n=e.indexOf(t[0],r);if(-1===n)return!1;let i=e.subarray(n,n+t.length);return i.length===t.length&&(i.every((e,r)=>e===t[r])||ej(e,t,n+1))},eD=e=>{switch(!0){case ej(e,[42,134,72,206,61,3,1,7]):return"P-256";case ej(e,[43,129,4,0,34]):return"P-384";case ej(e,[43,129,4,0,35]):return"P-521";case ej(e,[43,101,110]):return"X25519";case ej(e,[43,101,111]):return"X448";case ej(e,[43,101,112]):return"Ed25519";case ej(e,[43,101,113]):return"Ed448";default:throw new k("Invalid or unsupported EC Key Curve or OKP Key Sub Type")}},eH=async(e,t,r,n,i)=>{var a;let s,c,u=new Uint8Array(atob(r.replace(e,"")).split("").map(e=>e.charCodeAt(0))),l="spki"===t;switch(n){case"PS256":case"PS384":case"PS512":s={name:"RSA-PSS",hash:`SHA-${n.slice(-3)}`},c=l?["verify"]:["sign"];break;case"RS256":case"RS384":case"RS512":s={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${n.slice(-3)}`},c=l?["verify"]:["sign"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":s={name:"RSA-OAEP",hash:`SHA-${parseInt(n.slice(-3),10)||1}`},c=l?["encrypt","wrapKey"]:["decrypt","unwrapKey"];break;case"ES256":s={name:"ECDSA",namedCurve:"P-256"},c=l?["verify"]:["sign"];break;case"ES384":s={name:"ECDSA",namedCurve:"P-384"},c=l?["verify"]:["sign"];break;case"ES512":s={name:"ECDSA",namedCurve:"P-521"},c=l?["verify"]:["sign"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{let e=eD(u);s=e.startsWith("P-")?{name:"ECDH",namedCurve:e}:{name:e},c=l?[]:["deriveBits"];break}case"EdDSA":s={name:eD(u)},c=l?["verify"]:["sign"];break;default:throw new k('Invalid or unsupported "alg" (Algorithm) value')}return o.subtle.importKey(t,u,s,null!=(a=null==i?void 0:i.extractable)&&a,c)},eN=(e,t,r)=>eH(/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g,"pkcs8",e,t,r),eU=(e,t,r)=>eH(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g,"spki",e,t,r);function eM(e){let t=[],r=0;for(;r<e.length;){let n=eW(e.subarray(r));t.push(n),r+=n.byteLength}return t}function eW(e){let t=0,r=31&e[0];if(t++,31===r){for(r=0;e[t]>=128;)r=128*r+e[t]-128,t++;r=128*r+e[t]-128,t++}let n=0;if(e[t]<128)n=e[t],t++;else if(128===n){for(n=0;0!==e[t+n]||0!==e[t+n+1];){if(n>e.byteLength)throw TypeError("invalid indefinite form length");n++}let r=t+n+2;return{byteLength:r,contents:e.subarray(t,t+n),raw:e.subarray(0,r)}}else{let r=127&e[t];t++,n=0;for(let i=0;i<r;i++)n=256*n+e[t],t++}let i=t+n;return{byteLength:i,contents:e.subarray(t,i),raw:e.subarray(0,i)}}function eL(e){let t=eM(eM(eW(e).contents)[0].contents);return b(t[160===t[0].raw[0]?6:5].raw)}function eF(e){return eO(eL(v(e.replace(/(?:-----(?:BEGIN|END) CERTIFICATE-----|\s)/g,""))),"PUBLIC KEY")}let eB=(e,t,r)=>{let n;try{n=eF(e)}catch(e){throw TypeError("Failed to parse the X.509 certificate",{cause:e})}return eU(n,t,r)};function eK(e){let t,r;switch(e.kty){case"oct":switch(e.alg){case"HS256":case"HS384":case"HS512":t={name:"HMAC",hash:`SHA-${e.alg.slice(-3)}`},r=["sign","verify"];break;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":throw new k(`${e.alg} keys cannot be imported as CryptoKey instances`);case"A128GCM":case"A192GCM":case"A256GCM":case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":t={name:"AES-GCM"},r=["encrypt","decrypt"];break;case"A128KW":case"A192KW":case"A256KW":t={name:"AES-KW"},r=["wrapKey","unwrapKey"];break;case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":t={name:"PBKDF2"},r=["deriveBits"];break;default:throw new k('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"RSA":switch(e.alg){case"PS256":case"PS384":case"PS512":t={name:"RSA-PSS",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RS256":case"RS384":case"RS512":t={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":t={name:"RSA-OAEP",hash:`SHA-${parseInt(e.alg.slice(-3),10)||1}`},r=e.d?["decrypt","unwrapKey"]:["encrypt","wrapKey"];break;default:throw new k('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"EC":switch(e.alg){case"ES256":t={name:"ECDSA",namedCurve:"P-256"},r=e.d?["sign"]:["verify"];break;case"ES384":t={name:"ECDSA",namedCurve:"P-384"},r=e.d?["sign"]:["verify"];break;case"ES512":t={name:"ECDSA",namedCurve:"P-521"},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:"ECDH",namedCurve:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new k('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"OKP":switch(e.alg){case"EdDSA":t={name:e.crv},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new k('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;default:throw new k('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:t,keyUsages:r}}let e$=async e=>{var t,r;if(!e.alg)throw TypeError('"alg" argument is required when "jwk.alg" is not present');let{algorithm:n,keyUsages:i}=eK(e),a=[n,null!=(t=e.ext)&&t,null!=(r=e.key_ops)?r:i];if("PBKDF2"===n.name)return o.subtle.importKey("raw",_(e.k),...a);let s={...e};return delete s.alg,delete s.use,o.subtle.importKey("jwk",s,...a)};async function eJ(e,t,r){if("string"!=typeof e||0!==e.indexOf("-----BEGIN PUBLIC KEY-----"))throw TypeError('"spki" must be SPKI formatted string');return eU(e,t,r)}async function eq(e,t,r){if("string"!=typeof e||0!==e.indexOf("-----BEGIN CERTIFICATE-----"))throw TypeError('"x509" must be X.509 formatted string');return eB(e,t,r)}async function ez(e,t,r){if("string"!=typeof e||0!==e.indexOf("-----BEGIN PRIVATE KEY-----"))throw TypeError('"pkcs8" must be PKCS#8 formatted string');return eN(e,t,r)}async function eG(e,t,r){var n;if(!eu(e))throw TypeError("JWK must be an object");switch(t||(t=e.alg),e.kty){case"oct":if("string"!=typeof e.k||!e.k)throw TypeError('missing "k" (Key Value) Parameter value');if(null!=r||(r=!0!==e.ext),r)return e$({...e,alg:t,ext:null!=(n=e.ext)&&n});return _(e.k);case"RSA":if(void 0!==e.oth)throw new k('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');case"EC":case"OKP":return e$({...e,alg:t});default:throw new k('Unsupported "kty" (Key Type) Parameter value')}}let eV=(e,t)=>{if(!(t instanceof Uint8Array)){if(!ee(t))throw TypeError(Q(e,t,...et,"Uint8Array"));if("secret"!==t.type)throw TypeError(`${et.join(" or ")} instances for symmetric algorithms must be of type "secret"`)}},eX=(e,t,r)=>{if(!ee(t))throw TypeError(Q(e,t,...et));if("secret"===t.type)throw TypeError(`${et.join(" or ")} instances for asymmetric algorithms must not be of type "secret"`);if("sign"===r&&"public"===t.type)throw TypeError(`${et.join(" or ")} instances for asymmetric algorithm signing must be of type "private"`);if("decrypt"===r&&"public"===t.type)throw TypeError(`${et.join(" or ")} instances for asymmetric algorithm decryption must be of type "private"`);if(t.algorithm&&"verify"===r&&"private"===t.type)throw TypeError(`${et.join(" or ")} instances for asymmetric algorithm verifying must be of type "public"`);if(t.algorithm&&"encrypt"===r&&"private"===t.type)throw TypeError(`${et.join(" or ")} instances for asymmetric algorithm encryption must be of type "public"`)},eY=(e,t,r)=>{e.startsWith("HS")||"dir"===e||e.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(e)?eV(e,t):eX(e,t,r)};async function eZ(e,t,r,n,i){if(!(r instanceof Uint8Array))throw TypeError(Z(r,"Uint8Array"));let a=parseInt(e.slice(1,4),10),s=await o.subtle.importKey("raw",r.subarray(a>>3),"AES-CBC",!1,["encrypt"]),c=await o.subtle.importKey("raw",r.subarray(0,a>>3),{hash:`SHA-${a<<1}`,name:"HMAC"},!1,["sign"]),u=new Uint8Array(await o.subtle.encrypt({iv:n,name:"AES-CBC"},s,t)),l=d(i,n,u,h(i.length<<3));return{ciphertext:u,tag:new Uint8Array((await o.subtle.sign("HMAC",c,l)).slice(0,a>>3))}}async function eQ(e,t,r,n,i){let a;r instanceof Uint8Array?a=await o.subtle.importKey("raw",r,"AES-GCM",!1,["encrypt"]):(X(r,e,"encrypt"),a=r);let s=new Uint8Array(await o.subtle.encrypt({additionalData:i,iv:n,name:"AES-GCM",tagLength:128},a,t)),c=s.slice(-16);return{ciphertext:s.slice(0,-16),tag:c}}let e0=async(e,t,r,n,i)=>{if(!a(r)&&!(r instanceof Uint8Array))throw TypeError(Z(r,...et,"Uint8Array"));switch(F(e,n),e){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return r instanceof Uint8Array&&B(r,parseInt(e.slice(-3),10)),eZ(e,t,r,n,i);case"A128GCM":case"A192GCM":case"A256GCM":return r instanceof Uint8Array&&B(r,parseInt(e.slice(1,4),10)),eQ(e,t,r,n,i);default:throw new k("Unsupported JWE Content Encryption Algorithm")}};async function e1(e,t,r,n){let i=e.slice(0,7);n||(n=L(i));let{ciphertext:o,tag:a}=await e0(i,r,t,n,new Uint8Array(0));return{encryptedKey:o,iv:w(n),tag:w(a)}}async function e2(e,t,r,n,i){return ei(e.slice(0,7),t,r,n,i,new Uint8Array(0))}let e5=async function(e,t,r,n,i){switch(eY(e,t,"decrypt"),e){case"dir":if(void 0!==r)throw new O("Encountered unexpected JWE Encrypted Key");return t;case"ECDH-ES":if(void 0!==r)throw new O("Encountered unexpected JWE Encrypted Key");case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{let i,o;if(!eu(n.epk))throw new O('JOSE Header "epk" (Ephemeral Public Key) missing or invalid');if(!em(t))throw new k("ECDH with the provided key is not allowed or not supported by your javascript runtime");let a=await eG(n.epk,e);if(void 0!==n.apu){if("string"!=typeof n.apu)throw new O('JOSE Header "apu" (Agreement PartyUInfo) invalid');try{i=_(n.apu)}catch(e){throw new O("Failed to base64url decode the apu")}}if(void 0!==n.apv){if("string"!=typeof n.apv)throw new O('JOSE Header "apv" (Agreement PartyVInfo) invalid');try{o=_(n.apv)}catch(e){throw new O("Failed to base64url decode the apv")}}let s=await ey(a,t,"ECDH-ES"===e?n.enc:e,"ECDH-ES"===e?eP(n.enc):parseInt(e.slice(-5,-2),10),i,o);if("ECDH-ES"===e)return s;if(void 0===r)throw new O("JWE Encrypted Key missing");return eh(e.slice(-6),s,r)}case"RSA1_5":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":if(void 0===r)throw new O("JWE Encrypted Key missing");return ek(e,t,r);case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{let o;if(void 0===r)throw new O("JWE Encrypted Key missing");if("number"!=typeof n.p2c)throw new O('JOSE Header "p2c" (PBES2 Count) missing or invalid');let a=(null==i?void 0:i.maxPBES2Count)||1e4;if(n.p2c>a)throw new O('JOSE Header "p2c" (PBES2 Count) out is of acceptable bounds');if("string"!=typeof n.p2s)throw new O('JOSE Header "p2s" (PBES2 Salt) missing or invalid');try{o=_(n.p2s)}catch(e){throw new O("Failed to base64url decode the p2s")}return eE(e,t,r,n.p2c,o)}case"A128KW":case"A192KW":case"A256KW":if(void 0===r)throw new O("JWE Encrypted Key missing");return eh(e,t,r);case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":{let i,o;if(void 0===r)throw new O("JWE Encrypted Key missing");if("string"!=typeof n.iv)throw new O('JOSE Header "iv" (Initialization Vector) missing or invalid');if("string"!=typeof n.tag)throw new O('JOSE Header "tag" (Authentication Tag) missing or invalid');try{i=_(n.iv)}catch(e){throw new O("Failed to base64url decode the iv")}try{o=_(n.tag)}catch(e){throw new O("Failed to base64url decode the tag")}return e2(e,t,r,i,o)}default:throw new k('Invalid or unsupported "alg" (JWE Algorithm) header value')}},e6=function(e,t,r,n,i){let o;if(void 0!==i.crit&&void 0===n.crit)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!n||void 0===n.crit)return new Set;if(!Array.isArray(n.crit)||0===n.crit.length||n.crit.some(e=>"string"!=typeof e||0===e.length))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');for(let a of(o=void 0!==r?new Map([...Object.entries(r),...t.entries()]):t,n.crit)){if(!o.has(a))throw new k(`Extension Header Parameter "${a}" is not recognized`);if(void 0===i[a])throw new e(`Extension Header Parameter "${a}" is missing`);if(o.get(a)&&void 0===n[a])throw new e(`Extension Header Parameter "${a}" MUST be integrity protected`)}return new Set(n.crit)},e3=(e,t)=>{if(void 0!==t&&(!Array.isArray(t)||t.some(e=>"string"!=typeof e)))throw TypeError(`"${e}" option must be an array of strings`);if(t)return new Set(t)};async function e4(e,t,r){var n;let i,o,a,s,l,f,p;if(!eu(e))throw new O("Flattened JWE must be an object");if(void 0===e.protected&&void 0===e.header&&void 0===e.unprotected)throw new O("JOSE Header missing");if("string"!=typeof e.iv)throw new O("JWE Initialization Vector missing or incorrect type");if("string"!=typeof e.ciphertext)throw new O("JWE Ciphertext missing or incorrect type");if("string"!=typeof e.tag)throw new O("JWE Authentication Tag missing or incorrect type");if(void 0!==e.protected&&"string"!=typeof e.protected)throw new O("JWE Protected Header incorrect type");if(void 0!==e.encrypted_key&&"string"!=typeof e.encrypted_key)throw new O("JWE Encrypted Key incorrect type");if(void 0!==e.aad&&"string"!=typeof e.aad)throw new O("JWE AAD incorrect type");if(void 0!==e.header&&!eu(e.header))throw new O("JWE Shared Unprotected Header incorrect type");if(void 0!==e.unprotected&&!eu(e.unprotected))throw new O("JWE Per-Recipient Unprotected Header incorrect type");if(e.protected)try{let t=_(e.protected);i=JSON.parse(u.decode(t))}catch(e){throw new O("JWE Protected Header is invalid")}if(!es(i,e.header,e.unprotected))throw new O("JWE Protected, JWE Unprotected Header, and JWE Per-Recipient Unprotected Header Parameter names must be disjoint");let h={...i,...e.header,...e.unprotected};if(e6(O,new Map,null==r?void 0:r.crit,i,h),void 0!==h.zip){if(!i||!i.zip)throw new O('JWE "zip" (Compression Algorithm) Header MUST be integrity protected');if("DEF"!==h.zip)throw new k('Unsupported JWE "zip" (Compression Algorithm) Header Parameter value')}let{alg:y,enc:g}=h;if("string"!=typeof y||!y)throw new O("missing JWE Algorithm (alg) in JWE Header");if("string"!=typeof g||!g)throw new O("missing JWE Encryption Algorithm (enc) in JWE Header");let m=r&&e3("keyManagementAlgorithms",r.keyManagementAlgorithms),b=r&&e3("contentEncryptionAlgorithms",r.contentEncryptionAlgorithms);if(m&&!m.has(y))throw new x('"alg" (Algorithm) Header Parameter not allowed');if(b&&!b.has(g))throw new x('"enc" (Encryption Algorithm) Header Parameter not allowed');if(void 0!==e.encrypted_key)try{o=_(e.encrypted_key)}catch(e){throw new O("Failed to base64url decode the encrypted_key")}let w=!1;"function"==typeof t&&(t=await t(i,e),w=!0);try{a=await e5(y,t,o,h,r)}catch(e){if(e instanceof TypeError||e instanceof O||e instanceof k)throw e;a=eR(g)}try{s=_(e.iv)}catch(e){throw new O("Failed to base64url decode the iv")}try{l=_(e.tag)}catch(e){throw new O("Failed to base64url decode the tag")}let v=c.encode(null!=(n=e.protected)?n:"");f=void 0!==e.aad?d(v,c.encode("."),c.encode(e.aad)):v;try{p=_(e.ciphertext)}catch(e){throw new O("Failed to base64url decode the ciphertext")}let E=await ei(g,a,p,s,l,f);"DEF"===h.zip&&(E=await ((null==r?void 0:r.inflateRaw)||eo)(E));let S={plaintext:E};if(void 0!==e.protected&&(S.protectedHeader=i),void 0!==e.aad)try{S.additionalAuthenticatedData=_(e.aad)}catch(e){throw new O("Failed to base64url decode the aad")}return(void 0!==e.unprotected&&(S.sharedUnprotectedHeader=e.unprotected),void 0!==e.header&&(S.unprotectedHeader=e.header),w)?{...S,key:t}:S}async function e8(e,t,r){if(e instanceof Uint8Array&&(e=u.decode(e)),"string"!=typeof e)throw new O("Compact JWE must be a string or Uint8Array");let{0:n,1:i,2:o,3:a,4:s,length:c}=e.split(".");if(5!==c)throw new O("Invalid Compact JWE");let l=await e4({ciphertext:a,iv:o||void 0,protected:n||void 0,tag:s||void 0,encrypted_key:i||void 0},t,r),d={plaintext:l.plaintext,protectedHeader:l.protectedHeader};return"function"==typeof t?{...d,key:l.key}:d}async function e9(e,t,r){if(!eu(e))throw new O("General JWE must be an object");if(!Array.isArray(e.recipients)||!e.recipients.every(eu))throw new O("JWE Recipients missing or incorrect type");if(!e.recipients.length)throw new O("JWE Recipients has no members");for(let n of e.recipients)try{return await e4({aad:e.aad,ciphertext:e.ciphertext,encrypted_key:n.encrypted_key,header:n.header,iv:e.iv,protected:e.protected,tag:e.tag,unprotected:e.unprotected},t,r)}catch(e){}throw new P}let e7=async e=>{if(e instanceof Uint8Array)return{kty:"oct",k:w(e)};if(!a(e))throw TypeError(Z(e,...et,"Uint8Array"));if(!e.extractable)throw TypeError("non-extractable CryptoKey cannot be exported as a JWK");let{ext:t,key_ops:r,alg:n,use:i,...s}=await o.subtle.exportKey("jwk",e);return s};async function te(e){return eC(e)}async function tt(e){return eI(e)}async function tr(e){return e7(e)}let tn=async function(e,t,r,n,i={}){let o,a,s;switch(eY(e,r,"encrypt"),e){case"dir":s=r;break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{if(!em(r))throw new k("ECDH with the provided key is not allowed or not supported by your javascript runtime");let{apu:c,apv:u}=i,{epk:l}=i;l||(l=(await eg(r)).privateKey);let{x:d,y:f,crv:p,kty:h}=await tr(l),y=await ey(r,l,"ECDH-ES"===e?t:e,"ECDH-ES"===e?eP(t):parseInt(e.slice(-5,-2),10),c,u);if(a={epk:{x:d,crv:p,kty:h}},"EC"===h&&(a.epk.y=f),c&&(a.apu=w(c)),u&&(a.apv=w(u)),"ECDH-ES"===e){s=y;break}s=n||eR(t);let g=e.slice(-6);o=await ep(g,y,s);break}case"RSA1_5":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":s=n||eR(t),o=await ex(e,r,s);break;case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{s=n||eR(t);let{p2c:c,p2s:u}=i;({encryptedKey:o,...a}=await e_(e,r,s,c,u));break}case"A128KW":case"A192KW":case"A256KW":s=n||eR(t),o=await ep(e,r,s);break;case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":{s=n||eR(t);let{iv:c}=i;({encryptedKey:o,...a}=await e1(e,r,s,c));break}default:throw new k('Invalid or unsupported "alg" (JWE Algorithm) header value')}return{cek:s,encryptedKey:o,parameters:a}},ti=Symbol();class to{constructor(e){if(!(e instanceof Uint8Array))throw TypeError("plaintext must be an instance of Uint8Array");this._plaintext=e}setKeyManagementParameters(e){if(this._keyManagementParameters)throw TypeError("setKeyManagementParameters can only be called once");return this._keyManagementParameters=e,this}setProtectedHeader(e){if(this._protectedHeader)throw TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setSharedUnprotectedHeader(e){if(this._sharedUnprotectedHeader)throw TypeError("setSharedUnprotectedHeader can only be called once");return this._sharedUnprotectedHeader=e,this}setUnprotectedHeader(e){if(this._unprotectedHeader)throw TypeError("setUnprotectedHeader can only be called once");return this._unprotectedHeader=e,this}setAdditionalAuthenticatedData(e){return this._aad=e,this}setContentEncryptionKey(e){if(this._cek)throw TypeError("setContentEncryptionKey can only be called once");return this._cek=e,this}setInitializationVector(e){if(this._iv)throw TypeError("setInitializationVector can only be called once");return this._iv=e,this}async encrypt(e,t){let r,n,i,o,a,s,l;if(!this._protectedHeader&&!this._unprotectedHeader&&!this._sharedUnprotectedHeader)throw new O("either setProtectedHeader, setUnprotectedHeader, or sharedUnprotectedHeader must be called before #encrypt()");if(!es(this._protectedHeader,this._unprotectedHeader,this._sharedUnprotectedHeader))throw new O("JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint");let f={...this._protectedHeader,...this._unprotectedHeader,...this._sharedUnprotectedHeader};if(e6(O,new Map,null==t?void 0:t.crit,this._protectedHeader,f),void 0!==f.zip){if(!this._protectedHeader||!this._protectedHeader.zip)throw new O('JWE "zip" (Compression Algorithm) Header MUST be integrity protected');if("DEF"!==f.zip)throw new k('Unsupported JWE "zip" (Compression Algorithm) Header Parameter value')}let{alg:p,enc:h}=f;if("string"!=typeof p||!p)throw new O('JWE "alg" (Algorithm) Header Parameter missing or invalid');if("string"!=typeof h||!h)throw new O('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid');if("dir"===p){if(this._cek)throw TypeError("setContentEncryptionKey cannot be called when using Direct Encryption")}else if("ECDH-ES"===p&&this._cek)throw TypeError("setContentEncryptionKey cannot be called when using Direct Key Agreement");{let i;({cek:n,encryptedKey:r,parameters:i}=await tn(p,h,e,this._cek,this._keyManagementParameters)),i&&(t&&ti in t?this._unprotectedHeader?this._unprotectedHeader={...this._unprotectedHeader,...i}:this.setUnprotectedHeader(i):this._protectedHeader?this._protectedHeader={...this._protectedHeader,...i}:this.setProtectedHeader(i))}if(this._iv||(this._iv=L(h)),o=this._protectedHeader?c.encode(w(JSON.stringify(this._protectedHeader))):c.encode(""),this._aad?(a=w(this._aad),i=d(o,c.encode("."),c.encode(a))):i=o,"DEF"===f.zip){let e=await ((null==t?void 0:t.deflateRaw)||ea)(this._plaintext);({ciphertext:s,tag:l}=await e0(h,e,n,this._iv,i))}else({ciphertext:s,tag:l}=await e0(h,this._plaintext,n,this._iv,i));let y={ciphertext:w(s),iv:w(this._iv),tag:w(l)};return r&&(y.encrypted_key=w(r)),a&&(y.aad=a),this._protectedHeader&&(y.protected=u.decode(o)),this._sharedUnprotectedHeader&&(y.unprotected=this._sharedUnprotectedHeader),this._unprotectedHeader&&(y.header=this._unprotectedHeader),y}}class ta{constructor(e,t,r){this.parent=e,this.key=t,this.options=r}setUnprotectedHeader(e){if(this.unprotectedHeader)throw TypeError("setUnprotectedHeader can only be called once");return this.unprotectedHeader=e,this}addRecipient(...e){return this.parent.addRecipient(...e)}encrypt(...e){return this.parent.encrypt(...e)}done(){return this.parent}}class ts{constructor(e){this._recipients=[],this._plaintext=e}addRecipient(e,t){let r=new ta(this,e,{crit:null==t?void 0:t.crit});return this._recipients.push(r),r}setProtectedHeader(e){if(this._protectedHeader)throw TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setSharedUnprotectedHeader(e){if(this._unprotectedHeader)throw TypeError("setSharedUnprotectedHeader can only be called once");return this._unprotectedHeader=e,this}setAdditionalAuthenticatedData(e){return this._aad=e,this}async encrypt(e){var t,r,n;let i;if(!this._recipients.length)throw new O("at least one recipient must be added");if(e={deflateRaw:null==e?void 0:e.deflateRaw},1===this._recipients.length){let[t]=this._recipients,r=await new to(this._plaintext).setAdditionalAuthenticatedData(this._aad).setProtectedHeader(this._protectedHeader).setSharedUnprotectedHeader(this._unprotectedHeader).setUnprotectedHeader(t.unprotectedHeader).encrypt(t.key,{...t.options,...e}),n={ciphertext:r.ciphertext,iv:r.iv,recipients:[{}],tag:r.tag};return r.aad&&(n.aad=r.aad),r.protected&&(n.protected=r.protected),r.unprotected&&(n.unprotected=r.unprotected),r.encrypted_key&&(n.recipients[0].encrypted_key=r.encrypted_key),r.header&&(n.recipients[0].header=r.header),n}for(let e=0;e<this._recipients.length;e++){let t=this._recipients[e];if(!es(this._protectedHeader,this._unprotectedHeader,t.unprotectedHeader))throw new O("JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint");let r={...this._protectedHeader,...this._unprotectedHeader,...t.unprotectedHeader},{alg:n}=r;if("string"!=typeof n||!n)throw new O('JWE "alg" (Algorithm) Header Parameter missing or invalid');if("dir"===n||"ECDH-ES"===n)throw new O('"dir" and "ECDH-ES" alg may only be used with a single recipient');if("string"!=typeof r.enc||!r.enc)throw new O('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid');if(i){if(i!==r.enc)throw new O('JWE "enc" (Encryption Algorithm) Header Parameter must be the same for all recipients')}else i=r.enc;if(e6(O,new Map,t.options.crit,this._protectedHeader,r),void 0!==r.zip&&(!this._protectedHeader||!this._protectedHeader.zip))throw new O('JWE "zip" (Compression Algorithm) Header MUST be integrity protected')}let o=eR(i),a={ciphertext:"",iv:"",recipients:[],tag:""};for(let s=0;s<this._recipients.length;s++){let c=this._recipients[s],u={};a.recipients.push(u);let l=({...this._protectedHeader,...this._unprotectedHeader,...c.unprotectedHeader}).alg.startsWith("PBES2")?2048+s:void 0;if(0===s){let t=await new to(this._plaintext).setAdditionalAuthenticatedData(this._aad).setContentEncryptionKey(o).setProtectedHeader(this._protectedHeader).setSharedUnprotectedHeader(this._unprotectedHeader).setUnprotectedHeader(c.unprotectedHeader).setKeyManagementParameters({p2c:l}).encrypt(c.key,{...c.options,...e,[ti]:!0});a.ciphertext=t.ciphertext,a.iv=t.iv,a.tag=t.tag,t.aad&&(a.aad=t.aad),t.protected&&(a.protected=t.protected),t.unprotected&&(a.unprotected=t.unprotected),u.encrypted_key=t.encrypted_key,t.header&&(u.header=t.header);continue}let{encryptedKey:d,parameters:f}=await tn((null==(t=c.unprotectedHeader)?void 0:t.alg)||(null==(r=this._protectedHeader)?void 0:r.alg)||(null==(n=this._unprotectedHeader)?void 0:n.alg),i,c.key,o,{p2c:l});u.encrypted_key=w(d),(c.unprotectedHeader||f)&&(u.header={...c.unprotectedHeader,...f})}return a}}function tc(e,t){let r=`SHA-${e.slice(-3)}`;switch(e){case"HS256":case"HS384":case"HS512":return{hash:r,name:"HMAC"};case"PS256":case"PS384":case"PS512":return{hash:r,name:"RSA-PSS",saltLength:e.slice(-3)>>3};case"RS256":case"RS384":case"RS512":return{hash:r,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:r,name:"ECDSA",namedCurve:t.namedCurve};case"EdDSA":return{name:t.name};default:throw new k(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}function tu(e,t,r){if(a(t))return V(t,e,r),t;if(t instanceof Uint8Array){if(!e.startsWith("HS"))throw TypeError(Z(t,...et));return o.subtle.importKey("raw",t,{hash:`SHA-${e.slice(-3)}`,name:"HMAC"},!1,[r])}throw TypeError(Z(t,...et,"Uint8Array"))}let tl=async(e,t,r,n)=>{let i=await tu(e,t,"verify");eA(e,i);let a=tc(e,i.algorithm);try{return await o.subtle.verify(a,i,r,n)}catch(e){return!1}};async function td(e,t,r){var n;let i,o;if(!eu(e))throw new T("Flattened JWS must be an object");if(void 0===e.protected&&void 0===e.header)throw new T('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==e.protected&&"string"!=typeof e.protected)throw new T("JWS Protected Header incorrect type");if(void 0===e.payload)throw new T("JWS Payload missing");if("string"!=typeof e.signature)throw new T("JWS Signature missing or incorrect type");if(void 0!==e.header&&!eu(e.header))throw new T("JWS Unprotected Header incorrect type");let a={};if(e.protected)try{let t=_(e.protected);a=JSON.parse(u.decode(t))}catch(e){throw new T("JWS Protected Header is invalid")}if(!es(a,e.header))throw new T("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let s={...a,...e.header},l=e6(T,new Map([["b64",!0]]),null==r?void 0:r.crit,a,s),f=!0;if(l.has("b64")&&"boolean"!=typeof(f=a.b64))throw new T('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:p}=s;if("string"!=typeof p||!p)throw new T('JWS "alg" (Algorithm) Header Parameter missing or invalid');let h=r&&e3("algorithms",r.algorithms);if(h&&!h.has(p))throw new x('"alg" (Algorithm) Header Parameter not allowed');if(f){if("string"!=typeof e.payload)throw new T("JWS Payload must be a string")}else if("string"!=typeof e.payload&&!(e.payload instanceof Uint8Array))throw new T("JWS Payload must be a string or an Uint8Array instance");let y=!1;"function"==typeof t&&(t=await t(a,e),y=!0),eY(p,t,"verify");let g=d(c.encode(null!=(n=e.protected)?n:""),c.encode("."),"string"==typeof e.payload?c.encode(e.payload):e.payload);try{i=_(e.signature)}catch(e){throw new T("Failed to base64url decode the signature")}if(!await tl(p,t,i,g))throw new U;if(f)try{o=_(e.payload)}catch(e){throw new T("Failed to base64url decode the payload")}else o="string"==typeof e.payload?c.encode(e.payload):e.payload;let m={payload:o};return(void 0!==e.protected&&(m.protectedHeader=a),void 0!==e.header&&(m.unprotectedHeader=e.header),y)?{...m,key:t}:m}async function tf(e,t,r){if(e instanceof Uint8Array&&(e=u.decode(e)),"string"!=typeof e)throw new T("Compact JWS must be a string or Uint8Array");let{0:n,1:i,2:o,length:a}=e.split(".");if(3!==a)throw new T("Invalid Compact JWS");let s=await td({payload:i,protected:n,signature:o},t,r),c={payload:s.payload,protectedHeader:s.protectedHeader};return"function"==typeof t?{...c,key:s.key}:c}async function tp(e,t,r){if(!eu(e))throw new T("General JWS must be an object");if(!Array.isArray(e.signatures)||!e.signatures.every(eu))throw new T("JWS Signatures missing or incorrect type");for(let n of e.signatures)try{return await td({header:n.header,payload:e.payload,protected:n.protected,signature:n.signature},t,r)}catch(e){}throw new U}let th=e=>Math.floor(e.getTime()/1e3),ty=60,tg=3600,tm=86400,tb=604800,tw=0x1e187e0,tv=/^(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)$/i,t_=e=>{let t=tv.exec(e);if(!t)throw TypeError("Invalid time period format");let r=parseFloat(t[1]);switch(t[2].toLowerCase()){case"sec":case"secs":case"second":case"seconds":case"s":return Math.round(r);case"minute":case"minutes":case"min":case"mins":case"m":return Math.round(r*ty);case"hour":case"hours":case"hr":case"hrs":case"h":return Math.round(r*tg);case"day":case"days":case"d":return Math.round(r*tm);case"week":case"weeks":case"w":return Math.round(r*tb);default:return Math.round(r*tw)}},tE=e=>e.toLowerCase().replace(/^application\//,""),tS=(e,t)=>"string"==typeof e?t.includes(e):!!Array.isArray(e)&&t.some(Set.prototype.has.bind(new Set(e))),tA=(e,t,r={})=>{let n,i,{typ:o}=r;if(o&&("string"!=typeof e.typ||tE(e.typ)!==tE(o)))throw new S('unexpected "typ" JWT header value',"typ","check_failed");try{n=JSON.parse(u.decode(t))}catch(e){}if(!eu(n))throw new C("JWT Claims Set must be a top-level JSON object");let{requiredClaims:a=[],issuer:s,subject:c,audience:l,maxTokenAge:d}=r;for(let e of(void 0!==d&&a.push("iat"),void 0!==l&&a.push("aud"),void 0!==c&&a.push("sub"),void 0!==s&&a.push("iss"),new Set(a.reverse())))if(!(e in n))throw new S(`missing required "${e}" claim`,e,"missing");if(s&&!(Array.isArray(s)?s:[s]).includes(n.iss))throw new S('unexpected "iss" claim value',"iss","check_failed");if(c&&n.sub!==c)throw new S('unexpected "sub" claim value',"sub","check_failed");if(l&&!tS(n.aud,"string"==typeof l?[l]:l))throw new S('unexpected "aud" claim value',"aud","check_failed");switch(typeof r.clockTolerance){case"string":i=t_(r.clockTolerance);break;case"number":i=r.clockTolerance;break;case"undefined":i=0;break;default:throw TypeError("Invalid clockTolerance option type")}let{currentDate:f}=r,p=th(f||new Date);if((void 0!==n.iat||d)&&"number"!=typeof n.iat)throw new S('"iat" claim must be a number',"iat","invalid");if(void 0!==n.nbf){if("number"!=typeof n.nbf)throw new S('"nbf" claim must be a number',"nbf","invalid");if(n.nbf>p+i)throw new S('"nbf" claim timestamp check failed',"nbf","check_failed")}if(void 0!==n.exp){if("number"!=typeof n.exp)throw new S('"exp" claim must be a number',"exp","invalid");if(n.exp<=p-i)throw new A('"exp" claim timestamp check failed',"exp","check_failed")}if(d){let e=p-n.iat;if(e-i>("number"==typeof d?d:t_(d)))throw new A('"iat" claim timestamp check failed (too far in the past)',"iat","check_failed");if(e<0-i)throw new S('"iat" claim timestamp check failed (it should be in the past)',"iat","check_failed")}return n};async function tx(e,t,r){var n;let i=await tf(e,t,r);if((null==(n=i.protectedHeader.crit)?void 0:n.includes("b64"))&&!1===i.protectedHeader.b64)throw new C("JWTs MUST NOT use unencoded payload");let o={payload:tA(i.protectedHeader,i.payload,r),protectedHeader:i.protectedHeader};return"function"==typeof t?{...o,key:i.key}:o}async function tk(e,t,r){let n=await e8(e,t,r),i=tA(n.protectedHeader,n.plaintext,r),{protectedHeader:o}=n;if(void 0!==o.iss&&o.iss!==i.iss)throw new S('replicated "iss" claim header parameter mismatch',"iss","mismatch");if(void 0!==o.sub&&o.sub!==i.sub)throw new S('replicated "sub" claim header parameter mismatch',"sub","mismatch");if(void 0!==o.aud&&JSON.stringify(o.aud)!==JSON.stringify(i.aud))throw new S('replicated "aud" claim header parameter mismatch',"aud","mismatch");let a={payload:i,protectedHeader:o};return"function"==typeof t?{...a,key:n.key}:a}class tP{constructor(e){this._flattened=new to(e)}setContentEncryptionKey(e){return this._flattened.setContentEncryptionKey(e),this}setInitializationVector(e){return this._flattened.setInitializationVector(e),this}setProtectedHeader(e){return this._flattened.setProtectedHeader(e),this}setKeyManagementParameters(e){return this._flattened.setKeyManagementParameters(e),this}async encrypt(e,t){let r=await this._flattened.encrypt(e,t);return[r.protected,r.encrypted_key,r.iv,r.ciphertext,r.tag].join(".")}}let tR=async(e,t,r)=>{let n=await tu(e,t,"sign");return eA(e,n),new Uint8Array(await o.subtle.sign(tc(e,n.algorithm),n,r))};class tO{constructor(e){if(!(e instanceof Uint8Array))throw TypeError("payload must be an instance of Uint8Array");this._payload=e}setProtectedHeader(e){if(this._protectedHeader)throw TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setUnprotectedHeader(e){if(this._unprotectedHeader)throw TypeError("setUnprotectedHeader can only be called once");return this._unprotectedHeader=e,this}async sign(e,t){let r;if(!this._protectedHeader&&!this._unprotectedHeader)throw new T("either setProtectedHeader or setUnprotectedHeader must be called before #sign()");if(!es(this._protectedHeader,this._unprotectedHeader))throw new T("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let n={...this._protectedHeader,...this._unprotectedHeader},i=e6(T,new Map([["b64",!0]]),null==t?void 0:t.crit,this._protectedHeader,n),o=!0;if(i.has("b64")&&"boolean"!=typeof(o=this._protectedHeader.b64))throw new T('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:a}=n;if("string"!=typeof a||!a)throw new T('JWS "alg" (Algorithm) Header Parameter missing or invalid');eY(a,e,"sign");let s=this._payload;o&&(s=c.encode(w(s)));let l=d(r=this._protectedHeader?c.encode(w(JSON.stringify(this._protectedHeader))):c.encode(""),c.encode("."),s),f={signature:w(await tR(a,e,l)),payload:""};return o&&(f.payload=u.decode(s)),this._unprotectedHeader&&(f.header=this._unprotectedHeader),this._protectedHeader&&(f.protected=u.decode(r)),f}}class tT{constructor(e){this._flattened=new tO(e)}setProtectedHeader(e){return this._flattened.setProtectedHeader(e),this}async sign(e,t){let r=await this._flattened.sign(e,t);if(void 0===r.payload)throw TypeError("use the flattened module for creating JWS with b64: false");return`${r.protected}.${r.payload}.${r.signature}`}}class tC{constructor(e,t,r){this.parent=e,this.key=t,this.options=r}setProtectedHeader(e){if(this.protectedHeader)throw TypeError("setProtectedHeader can only be called once");return this.protectedHeader=e,this}setUnprotectedHeader(e){if(this.unprotectedHeader)throw TypeError("setUnprotectedHeader can only be called once");return this.unprotectedHeader=e,this}addSignature(...e){return this.parent.addSignature(...e)}sign(...e){return this.parent.sign(...e)}done(){return this.parent}}class tI{constructor(e){this._signatures=[],this._payload=e}addSignature(e,t){let r=new tC(this,e,t);return this._signatures.push(r),r}async sign(){if(!this._signatures.length)throw new T("at least one signature must be added");let e={signatures:[],payload:""};for(let t=0;t<this._signatures.length;t++){let r=this._signatures[t],n=new tO(this._payload);n.setProtectedHeader(r.protectedHeader),n.setUnprotectedHeader(r.unprotectedHeader);let{payload:i,...o}=await n.sign(r.key,r.options);if(0===t)e.payload=i;else if(e.payload!==i)throw new T("inconsistent use of JWS Unencoded Payload (RFC7797)");e.signatures.push(o)}return e}}class tj{constructor(e){if(!eu(e))throw TypeError("JWT Claims Set MUST be an object");this._payload=e}setIssuer(e){return this._payload={...this._payload,iss:e},this}setSubject(e){return this._payload={...this._payload,sub:e},this}setAudience(e){return this._payload={...this._payload,aud:e},this}setJti(e){return this._payload={...this._payload,jti:e},this}setNotBefore(e){return"number"==typeof e?this._payload={...this._payload,nbf:e}:this._payload={...this._payload,nbf:th(new Date)+t_(e)},this}setExpirationTime(e){return"number"==typeof e?this._payload={...this._payload,exp:e}:this._payload={...this._payload,exp:th(new Date)+t_(e)},this}setIssuedAt(e){return void 0===e?this._payload={...this._payload,iat:th(new Date)}:this._payload={...this._payload,iat:e},this}}class tD extends tj{setProtectedHeader(e){return this._protectedHeader=e,this}async sign(e,t){var r;let n=new tT(c.encode(JSON.stringify(this._payload)));if(n.setProtectedHeader(this._protectedHeader),Array.isArray(null==(r=this._protectedHeader)?void 0:r.crit)&&this._protectedHeader.crit.includes("b64")&&!1===this._protectedHeader.b64)throw new C("JWTs MUST NOT use unencoded payload");return n.sign(e,t)}}class tH extends tj{setProtectedHeader(e){if(this._protectedHeader)throw TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setKeyManagementParameters(e){if(this._keyManagementParameters)throw TypeError("setKeyManagementParameters can only be called once");return this._keyManagementParameters=e,this}setContentEncryptionKey(e){if(this._cek)throw TypeError("setContentEncryptionKey can only be called once");return this._cek=e,this}setInitializationVector(e){if(this._iv)throw TypeError("setInitializationVector can only be called once");return this._iv=e,this}replicateIssuerAsHeader(){return this._replicateIssuerAsHeader=!0,this}replicateSubjectAsHeader(){return this._replicateSubjectAsHeader=!0,this}replicateAudienceAsHeader(){return this._replicateAudienceAsHeader=!0,this}async encrypt(e,t){let r=new tP(c.encode(JSON.stringify(this._payload)));return this._replicateIssuerAsHeader&&(this._protectedHeader={...this._protectedHeader,iss:this._payload.iss}),this._replicateSubjectAsHeader&&(this._protectedHeader={...this._protectedHeader,sub:this._payload.sub}),this._replicateAudienceAsHeader&&(this._protectedHeader={...this._protectedHeader,aud:this._payload.aud}),r.setProtectedHeader(this._protectedHeader),this._iv&&r.setInitializationVector(this._iv),this._cek&&r.setContentEncryptionKey(this._cek),this._keyManagementParameters&&r.setKeyManagementParameters(this._keyManagementParameters),r.encrypt(e,t)}}let tN=(e,t)=>{if("string"!=typeof e||!e)throw new I(`${t} missing or invalid`)};async function tU(e,t){let r;if(!eu(e))throw TypeError("JWK must be an object");if(null!=t||(t="sha256"),"sha256"!==t&&"sha384"!==t&&"sha512"!==t)throw TypeError('digestAlgorithm must one of "sha256", "sha384", or "sha512"');switch(e.kty){case"EC":tN(e.crv,'"crv" (Curve) Parameter'),tN(e.x,'"x" (X Coordinate) Parameter'),tN(e.y,'"y" (Y Coordinate) Parameter'),r={crv:e.crv,kty:e.kty,x:e.x,y:e.y};break;case"OKP":tN(e.crv,'"crv" (Subtype of Key Pair) Parameter'),tN(e.x,'"x" (Public Key) Parameter'),r={crv:e.crv,kty:e.kty,x:e.x};break;case"RSA":tN(e.e,'"e" (Exponent) Parameter'),tN(e.n,'"n" (Modulus) Parameter'),r={e:e.e,kty:e.kty,n:e.n};break;case"oct":tN(e.k,'"k" (Key Value) Parameter'),r={k:e.k,kty:e.kty};break;default:throw new k('"kty" (Key Type) Parameter missing or unsupported')}let n=c.encode(JSON.stringify(r));return w(await s(t,n))}async function tM(e,t){null!=t||(t="sha256");let r=await tU(e,t);return`urn:ietf:params:oauth:jwk-thumbprint:sha-${t.slice(-3)}:${r}`}async function tW(e,t){let r={...e,...null==t?void 0:t.header};if(!eu(r.jwk))throw new T('"jwk" (JSON Web Key) Header Parameter must be a JSON object');let n=await eG({...r.jwk,ext:!0},r.alg,!0);if(n instanceof Uint8Array||"public"!==n.type)throw new T('"jwk" (JSON Web Key) Header Parameter must be a public key');return n}function tL(e){switch("string"==typeof e&&e.slice(0,2)){case"RS":case"PS":return"RSA";case"ES":return"EC";case"Ed":return"OKP";default:throw new k('Unsupported "alg" value for a JSON Web Key Set')}}function tF(e){return e&&"object"==typeof e&&Array.isArray(e.keys)&&e.keys.every(tB)}function tB(e){return eu(e)}function tK(e){return"function"==typeof structuredClone?structuredClone(e):JSON.parse(JSON.stringify(e))}class t${constructor(e){if(this._cached=new WeakMap,!tF(e))throw new j("JSON Web Key Set malformed");this._jwks=tK(e)}async getKey(e,t){let{alg:r,kid:n}={...e,...null==t?void 0:t.header},i=tL(r),o=this._jwks.keys.filter(e=>{let t=i===e.kty;if(t&&"string"==typeof n&&(t=n===e.kid),t&&"string"==typeof e.alg&&(t=r===e.alg),t&&"string"==typeof e.use&&(t="sig"===e.use),t&&Array.isArray(e.key_ops)&&(t=e.key_ops.includes("verify")),t&&"EdDSA"===r&&(t="Ed25519"===e.crv||"Ed448"===e.crv),t)switch(r){case"ES256":t="P-256"===e.crv;break;case"ES256K":t="secp256k1"===e.crv;break;case"ES384":t="P-384"===e.crv;break;case"ES512":t="P-521"===e.crv}return t}),{0:a,length:s}=o;if(0===s)throw new D;if(1!==s){let e=new H,{_cached:t}=this;throw e[Symbol.asyncIterator]=async function*(){for(let e of o)try{yield await tJ(t,e,r)}catch(e){continue}},e}return tJ(this._cached,a,r)}}async function tJ(e,t,r){let n=e.get(t)||e.set(t,{}).get(t);if(void 0===n[r]){let e=await eG({...t,ext:!0},r);if(e instanceof Uint8Array||"public"!==e.type)throw new j("JSON Web Key Set members must be public keys");n[r]=e}return n[r]}function tq(e){let t=new t$(e);return async function(e,r){return t.getKey(e,r)}}let tz=async(e,t,r)=>{let n,i,o=!1;"function"==typeof AbortController&&(n=new AbortController,i=setTimeout(()=>{o=!0,n.abort()},t));let a=await fetch(e.href,{signal:n?n.signal:void 0,redirect:"manual",headers:r.headers}).catch(e=>{if(o)throw new N;throw e});if(void 0!==i&&clearTimeout(i),200!==a.status)throw new E("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await a.json()}catch(e){throw new E("Failed to parse the JSON Web Key Set HTTP response as JSON")}};function tG(){return"undefined"!=typeof WebSocketPair||"undefined"!=typeof navigator&&"Cloudflare-Workers"===navigator.userAgent||"undefined"!=typeof EdgeRuntime&&"vercel"===EdgeRuntime}class tV extends t${constructor(e,t){if(super({keys:[]}),this._jwks=void 0,!(e instanceof URL))throw TypeError("url must be an instance of URL");this._url=new URL(e.href),this._options={agent:null==t?void 0:t.agent,headers:null==t?void 0:t.headers},this._timeoutDuration="number"==typeof(null==t?void 0:t.timeoutDuration)?null==t?void 0:t.timeoutDuration:5e3,this._cooldownDuration="number"==typeof(null==t?void 0:t.cooldownDuration)?null==t?void 0:t.cooldownDuration:3e4,this._cacheMaxAge="number"==typeof(null==t?void 0:t.cacheMaxAge)?null==t?void 0:t.cacheMaxAge:6e5}coolingDown(){return"number"==typeof this._jwksTimestamp&&Date.now()<this._jwksTimestamp+this._cooldownDuration}fresh(){return"number"==typeof this._jwksTimestamp&&Date.now()<this._jwksTimestamp+this._cacheMaxAge}async getKey(e,t){this._jwks&&this.fresh()||await this.reload();try{return await super.getKey(e,t)}catch(r){if(r instanceof D&&!1===this.coolingDown())return await this.reload(),super.getKey(e,t);throw r}}async reload(){this._pendingFetch&&tG()&&(this._pendingFetch=void 0),this._pendingFetch||(this._pendingFetch=tz(this._url,this._timeoutDuration,this._options).then(e=>{if(!tF(e))throw new j("JSON Web Key Set malformed");this._jwks={keys:e.keys},this._jwksTimestamp=Date.now(),this._pendingFetch=void 0}).catch(e=>{throw this._pendingFetch=void 0,e})),await this._pendingFetch}}function tX(e,t){let r=new tV(e,t);return async function(e,t){return r.getKey(e,t)}}class tY extends tj{encode(){let e=w(JSON.stringify({alg:"none"})),t=w(JSON.stringify(this._payload));return`${e}.${t}.`}static decode(e,t){let r;if("string"!=typeof e)throw new C("Unsecured JWT must be a string");let{0:n,1:i,2:o,length:a}=e.split(".");if(3!==a||""!==o)throw new C("Invalid Unsecured JWT");try{if(r=JSON.parse(u.decode(_(n))),"none"!==r.alg)throw Error()}catch(e){throw new C("Invalid Unsecured JWT")}return{payload:tA(r,_(i),t),header:r}}}let tZ=w,tQ=_;function t0(e){let t;if("string"==typeof e){let r=e.split(".");(3===r.length||5===r.length)&&([t]=r)}else if("object"==typeof e&&e)if("protected"in e)t=e.protected;else throw TypeError("Token does not contain a Protected Header");try{if("string"!=typeof t||!t)throw Error();let e=JSON.parse(u.decode(tQ(t)));if(!eu(e))throw Error();return e}catch(e){throw TypeError("Invalid Token or Protected Header formatting")}}function t1(e){let t,r;if("string"!=typeof e)throw new C("JWTs must use Compact JWS serialization, JWT must be a string");let{1:n,length:i}=e.split(".");if(5===i)throw new C("Only JWTs using Compact JWS serialization can be decoded");if(3!==i)throw new C("Invalid JWT");if(!n)throw new C("JWTs must contain a payload");try{t=tQ(n)}catch(e){throw new C("Failed to base64url decode the payload")}try{r=JSON.parse(u.decode(t))}catch(e){throw new C("Failed to parse the decoded payload as JSON")}if(!eu(r))throw new C("Invalid JWT Claims Set");return r}async function t2(e,t){var r;let n,i,a;switch(e){case"HS256":case"HS384":case"HS512":n=parseInt(e.slice(-3),10),i={name:"HMAC",hash:`SHA-${n}`,length:n},a=["sign","verify"];break;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return M(new Uint8Array((n=parseInt(e.slice(-3),10))>>3));case"A128KW":case"A192KW":case"A256KW":i={name:"AES-KW",length:n=parseInt(e.slice(1,4),10)},a=["wrapKey","unwrapKey"];break;case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":case"A128GCM":case"A192GCM":case"A256GCM":i={name:"AES-GCM",length:n=parseInt(e.slice(1,4),10)},a=["encrypt","decrypt"];break;default:throw new k('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}return o.subtle.generateKey(i,null!=(r=null==t?void 0:t.extractable)&&r,a)}function t5(e){var t;let r=null!=(t=null==e?void 0:e.modulusLength)?t:2048;if("number"!=typeof r||r<2048)throw new k("Invalid or unsupported modulusLength option provided, 2048 bits or larger keys must be used");return r}async function t6(e,t){var r,n,i;let a,s;switch(e){case"PS256":case"PS384":case"PS512":a={name:"RSA-PSS",hash:`SHA-${e.slice(-3)}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:t5(t)},s=["sign","verify"];break;case"RS256":case"RS384":case"RS512":a={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.slice(-3)}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:t5(t)},s=["sign","verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":a={name:"RSA-OAEP",hash:`SHA-${parseInt(e.slice(-3),10)||1}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:t5(t)},s=["decrypt","unwrapKey","encrypt","wrapKey"];break;case"ES256":a={name:"ECDSA",namedCurve:"P-256"},s=["sign","verify"];break;case"ES384":a={name:"ECDSA",namedCurve:"P-384"},s=["sign","verify"];break;case"ES512":a={name:"ECDSA",namedCurve:"P-521"},s=["sign","verify"];break;case"EdDSA":s=["sign","verify"];let c=null!=(r=null==t?void 0:t.crv)?r:"Ed25519";switch(c){case"Ed25519":case"Ed448":a={name:c};break;default:throw new k("Invalid or unsupported crv option provided")}break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{s=["deriveKey","deriveBits"];let e=null!=(n=null==t?void 0:t.crv)?n:"P-256";switch(e){case"P-256":case"P-384":case"P-521":a={name:"ECDH",namedCurve:e};break;case"X25519":case"X448":a={name:e};break;default:throw new k("Invalid or unsupported crv option provided, supported values are P-256, P-384, P-521, X25519, and X448")}break}default:throw new k('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}return o.subtle.generateKey(a,null!=(i=null==t?void 0:t.extractable)&&i,s)}async function t3(e,t){return t6(e,t)}async function t4(e,t){return t2(e,t)}let t8="WebCryptoAPI"},90970:(e,t,r)=>{"use strict";var n;n={value:!0},Object.defineProperty(t,"draftMode",{enumerable:!0,get:function(){return l}});let i=r(20368),o=r(57049),a=r(18736),s=r(49961),c=r(30941),u=r(85959);function l(){let e="draftMode",t=o.workAsyncStorage.getStore(),r=i.workUnitAsyncStorage.getStore();switch((!t||!r)&&(0,i.throwForMissingRequestStore)(e),r.type){case"request":return d(r.draftMode,t);case"cache":case"unstable-cache":let n=(0,i.getDraftModeProviderForCacheScope)(t,r);if(n)return d(n,t);case"prerender":case"prerender-ppr":case"prerender-legacy":return p(null);default:return r}}function d(e,t){let r,n=f.get(l);return n||(r=p(e),f.set(e,r),r)}let f=new WeakMap;function p(e){let t=new h(e),r=Promise.resolve(t);return Object.defineProperty(r,"isEnabled",{get:()=>t.isEnabled,set(e){Object.defineProperty(r,"isEnabled",{value:e,writable:!0,enumerable:!0})},enumerable:!0,configurable:!0}),r.enable=t.enable.bind(t),r.disable=t.disable.bind(t),r}class h{constructor(e){this._provider=e}get isEnabled(){return null!==this._provider&&this._provider.isEnabled}enable(){m("draftMode().enable()"),null!==this._provider&&this._provider.enable()}disable(){m("draftMode().disable()"),null!==this._provider&&this._provider.disable()}}let y=(0,s.createDedupedByCallsiteServerErrorLoggerDev)(g);function g(e,t){let r=e?`Route "${e}" `:"This route ";return Object.defineProperty(Error(`${r}used ${t}. \`draftMode()\` should be awaited before using its value. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`),"__NEXT_ERROR_CODE",{value:"E377",enumerable:!1,configurable:!0})}function m(e){let t=o.workAsyncStorage.getStore(),r=i.workUnitAsyncStorage.getStore();if(t){if(r){if("cache"===r.type)throw Object.defineProperty(Error(`Route ${t.route} used "${e}" inside "use cache". The enabled status of draftMode can be read in caches but you must not enable or disable draftMode inside a cache. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E246",enumerable:!1,configurable:!0});else if("unstable-cache"===r.type)throw Object.defineProperty(Error(`Route ${t.route} used "${e}" inside a function cached with "unstable_cache(...)". The enabled status of draftMode can be read in caches but you must not enable or disable draftMode inside a cache. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E259",enumerable:!1,configurable:!0});else if("after"===r.phase)throw Object.defineProperty(Error(`Route ${t.route} used "${e}" inside \`after\`. The enabled status of draftMode can be read inside \`after\` but you cannot enable or disable draftMode. See more info here: https://nextjs.org/docs/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E348",enumerable:!1,configurable:!0})}if(t.dynamicShouldError)throw Object.defineProperty(new c.StaticGenBailoutError(`Route ${t.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${e}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E553",enumerable:!1,configurable:!0});if(r){if("prerender"===r.type){let n=Object.defineProperty(Error(`Route ${t.route} used ${e} without first calling \`await connection()\`. See more info here: https://nextjs.org/docs/messages/next-prerender-sync-headers`),"__NEXT_ERROR_CODE",{value:"E126",enumerable:!1,configurable:!0});(0,a.abortAndThrowOnSynchronousRequestDataAccess)(t.route,e,n,r)}else if("prerender-ppr"===r.type)(0,a.postponeWithTracking)(t.route,e,r.dynamicTracking);else if("prerender-legacy"===r.type){r.revalidate=0;let n=Object.defineProperty(new u.DynamicServerError(`Route ${t.route} couldn't be rendered statically because it used \`${e}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`),"__NEXT_ERROR_CODE",{value:"E558",enumerable:!1,configurable:!0});throw t.dynamicUsageDescription=e,t.dynamicUsageStack=n.stack,n}}}}},91362:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var n=r(63426),i=r(41362);async function o(e,t){var r,o,a,s;let{url:c,adapter:u,provider:l,callbackUrl:d,theme:f}=t,p=null!=(r=await (null==(o=l.generateVerificationToken)?void 0:o.call(l)))?r:(0,n.randomBytes)(32).toString("hex"),h=86400,y=new Date(Date.now()+(null!=(a=l.maxAge)?a:h)*1e3),g=new URLSearchParams({callbackUrl:d,token:p,email:e}),m=`${c}/callback/${l.id}?${g}`;return await Promise.all([l.sendVerificationRequest({identifier:e,token:p,expires:y,url:m,provider:l,theme:f}),null==(s=u.createVerificationToken)?void 0:s.call(u,{identifier:e,token:(0,i.hashToken)(p,t),expires:y})]),`${c}/verify-request?${new URLSearchParams({provider:l.id,type:l.type})}`}},93022:(e,t,r)=>{let n=r(93298);e.exports=e=>{if("string"!=typeof e||!e)throw TypeError("JWT must be a string");let{0:t,1:r,2:i,length:o}=e.split(".");if(5===o)throw TypeError("encrypted JWTs cannot be decoded");if(3!==o)throw Error("JWTs must have three components");try{return{header:JSON.parse(n.decode(t)),payload:JSON.parse(n.decode(r)),signature:i}}catch(e){throw Error("JWT is malformed")}}},93174:(e,t,r)=>{"use strict";var n=r(29563);Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=r(63780),o=n(r(74355));function a(e,t=1){if(!e)return;3===(e=e.replace(/^#/,"")).length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);let r=parseInt(e,16),n=r>>16&255,i=r>>8&255,o=255&r;return t=Math.min(Math.max(t,0),1),`rgba(${n}, ${i}, ${o}, ${t})`}function s(e){var t;let{csrfToken:r,providers:n,callbackUrl:s,theme:c,email:u,error:l}=e,d=n.filter(e=>"oauth"===e.type||"email"===e.type||"credentials"===e.type&&!!e.credentials);"undefined"!=typeof document&&c.buttonText&&document.documentElement.style.setProperty("--button-text-color",c.buttonText),"undefined"!=typeof document&&c.brandColor&&document.documentElement.style.setProperty("--brand-color",c.brandColor);let f={Signin:"Try signing in with a different account.",OAuthSignin:"Try signing in with a different account.",OAuthCallback:"Try signing in with a different account.",OAuthCreateAccount:"Try signing in with a different account.",EmailCreateAccount:"Try signing in with a different account.",Callback:"Try signing in with a different account.",OAuthAccountNotLinked:"To confirm your identity, sign in with the same account you used originally.",EmailSignin:"The e-mail could not be sent.",CredentialsSignin:"Sign in failed. Check the details you provided are correct.",SessionRequired:"Please sign in to access this page.",default:"Unable to sign in."},p=l&&(null!=(t=f[l])?t:f.default),h="https://authjs.dev/img/providers";return(0,i.h)("div",{className:"signin"},c.brandColor&&(0,i.h)("style",{dangerouslySetInnerHTML:{__html:`
:root {
--brand-color: ${c.brandColor}
}
`}}),c.buttonText&&(0,i.h)("style",{dangerouslySetInnerHTML:{__html:`
:root {
--button-text-color: ${c.buttonText}
}
`}}),(0,i.h)("div",{className:"card"},c.logo&&(0,i.h)("img",{src:c.logo,alt:"Logo",className:"logo"}),p&&(0,i.h)("div",{className:"error"},(0,i.h)("p",null,p)),d.map((e,t)=>{let n,c,l,f,p,y;if("oauth"===e.type){var g;({bg:n="",text:c="",logo:l="",bgDark:p=n,textDark:y=c,logoDark:f=""}=null!=(g=e.style)?g:{}),l=l.startsWith("/")?`${h}${l}`:l,(f=f.startsWith("/")?`${h}${f}`:f||l)||(f=l)}return(0,i.h)("div",{key:e.id,className:"provider"},"oauth"===e.type&&(0,i.h)("form",{action:e.signinUrl,method:"POST"},(0,i.h)("input",{type:"hidden",name:"csrfToken",value:r}),s&&(0,i.h)("input",{type:"hidden",name:"callbackUrl",value:s}),(0,i.h)("button",{type:"submit",className:"button",style:{"--provider-bg":n,"--provider-dark-bg":p,"--provider-color":c,"--provider-dark-color":y,"--provider-bg-hover":a(n,.8),"--provider-dark-bg-hover":a(p,.8)}},l&&(0,i.h)("img",{loading:"lazy",height:24,width:24,id:"provider-logo",src:`${l.startsWith("/")?h:""}${l}`}),f&&(0,i.h)("img",{loading:"lazy",height:24,width:24,id:"provider-logo-dark",src:`${l.startsWith("/")?h:""}${f}`}),(0,i.h)("span",null,"Sign in with ",e.name))),("email"===e.type||"credentials"===e.type)&&t>0&&"email"!==d[t-1].type&&"credentials"!==d[t-1].type&&(0,i.h)("hr",null),"email"===e.type&&(0,i.h)("form",{action:e.signinUrl,method:"POST"},(0,i.h)("input",{type:"hidden",name:"csrfToken",value:r}),(0,i.h)("label",{className:"section-header",htmlFor:`input-email-for-${e.id}-provider`},"Email"),(0,i.h)("input",{id:`input-email-for-${e.id}-provider`,autoFocus:!0,type:"email",name:"email",value:u,placeholder:"email@example.com",required:!0}),(0,i.h)("button",{id:"submitButton",type:"submit"},"Sign in with ",e.name)),"credentials"===e.type&&(0,i.h)("form",{action:e.callbackUrl,method:"POST"},(0,i.h)("input",{type:"hidden",name:"csrfToken",value:r}),Object.keys(e.credentials).map(t=>{var r,n,a;return(0,i.h)("div",{key:`input-group-${e.id}`},(0,i.h)("label",{className:"section-header",htmlFor:`input-${t}-for-${e.id}-provider`},null!=(r=e.credentials[t].label)?r:t),(0,i.h)("input",(0,o.default)({name:t,id:`input-${t}-for-${e.id}-provider`,type:null!=(n=e.credentials[t].type)?n:"text",placeholder:null!=(a=e.credentials[t].placeholder)?a:""},e.credentials[t])))}),(0,i.h)("button",{type:"submit"},"Sign in with ",e.name)),("email"===e.type||"credentials"===e.type)&&t+1<d.length&&(0,i.h)("hr",null))})))}},93298:(e,t,r)=>{let n;var i=r(82909).Buffer;if(i.isEncoding("base64url"))n=(e,t="utf8")=>i.from(e,t).toString("base64url");else{let e=e=>e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_");n=(t,r="utf8")=>e(i.from(t,r).toString("base64"))}let o=e=>i.from(e,"base64");e.exports.decode=o,e.exports.encode=n},93910:(e,t)=>{"use strict";function r(e){return{headers:[{key:"Content-Type",value:"application/json"}],body:e.reduce((e,{id:t,name:r,type:n,signinUrl:i,callbackUrl:o})=>(e[t]={id:t,name:r,type:n,signinUrl:i,callbackUrl:o},e),{})}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},95281:e=>{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},95284:e=>{var t="/";!function(){"use strict";var r={864:function(e){var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};function i(e){console&&console.warn&&console.warn(e)}t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=b,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var s=10;function c(e){if("function"!=typeof e)throw TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function l(e,t,r,n){if(c(r),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),a=e._events),s=a[t]),void 0===s)s=a[t]=r,++e._eventsCount;else if("function"==typeof s?s=a[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(o=u(e))>0&&s.length>o&&!s.warned){s.warned=!0;var o,a,s,l=Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,i(l)}return e}function d(){if(!this.fired)return(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0==arguments.length)?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=d.bind(n);return i.listener=r,n.wrapFn=i,i}function p(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?m(i):y(i,i.length)}function h(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function y(e,t){for(var r=Array(t),n=0;n<t;++n)r[n]=e[n];return r}function g(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function m(e){for(var t=Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}function b(e,t){return new Promise(function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}v(e,t,o,{once:!0}),"error"!==t&&w(e,i,{once:!0})})}function w(e,t,r){"function"==typeof e.on&&v(e,"error",t,r)}function v(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else if("function"==typeof e.addEventListener)e.addEventListener(t,function i(o){n.once&&e.removeEventListener(t,i),r(o)});else throw TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||o(e))throw RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),a.init=function(){(void 0===this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return u(this)},a.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var a,s=Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var c=o[e];if(void 0===c)return!1;if("function"==typeof c)n(c,this,t);else for(var u=c.length,l=y(c,u),r=0;r<u;++r)n(l[r],this,t);return!0},a.prototype.addListener=function(e,t){return l(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return l(this,e,t,!0)},a.prototype.once=function(e,t){return c(t),this.on(e,f(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return c(t),this.prependListener(e,f(this,e,t)),this},a.prototype.removeListener=function(e,t){var r,n,i,o,a;if(c(t),void 0===(n=this._events)||void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():g(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0==arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0==arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},a.prototype.listeners=function(e){return p(this,e,!0)},a.prototype.rawListeners=function(e){return p(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},a.prototype.listenerCount=h,a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}}},n={};function i(e){var t=n[e];if(void 0!==t)return t.exports;var o=n[e]={exports:{}},a=!0;try{r[e](o,o.exports,i),a=!1}finally{a&&delete n[e]}return o.exports}i.ab=t+"/",e.exports=i(864)}()},96820:(e,t,r)=>{"use strict";var n=r(65364);Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{atLeastOneTask:function(){return a},scheduleImmediate:function(){return o},scheduleOnNextTick:function(){return i},waitAtLeastOneReactRenderTask:function(){return s}});let i=e=>{Promise.resolve().then(()=>{n.nextTick(e)})},o=e=>{setImmediate(e)};function a(){return new Promise(e=>o(e))}function s(){return new Promise(e=>setImmediate(e))}},97501:e=>{e.exports=function(){return':root{--border-width:1px;--border-radius:0.5rem;--color-error:#c94b4b;--color-info:#157efb;--color-info-hover:#0f6ddb;--color-info-text:#fff}.__next-auth-theme-auto,.__next-auth-theme-light{--color-background:#ececec;--color-background-hover:hsla(0,0%,93%,.8);--color-background-card:#fff;--color-text:#000;--color-primary:#444;--color-control-border:#bbb;--color-button-active-background:#f9f9f9;--color-button-active-border:#aaa;--color-separator:#ccc}.__next-auth-theme-dark{--color-background:#161b22;--color-background-hover:rgba(22,27,34,.8);--color-background-card:#0d1117;--color-text:#fff;--color-primary:#ccc;--color-control-border:#555;--color-button-active-background:#060606;--color-button-active-border:#666;--color-separator:#444}@media (prefers-color-scheme:dark){.__next-auth-theme-auto{--color-background:#161b22;--color-background-hover:rgba(22,27,34,.8);--color-background-card:#0d1117;--color-text:#fff;--color-primary:#ccc;--color-control-border:#555;--color-button-active-background:#060606;--color-button-active-border:#666;--color-separator:#444}a.button,button{background-color:var(--provider-dark-bg,var(--color-background));color:var(--provider-dark-color,var(--color-primary))}a.button:hover,button:hover{background-color:var(--provider-dark-bg-hover,var(--color-background-hover))!important}#provider-logo{display:none!important}#provider-logo-dark{display:block!important;width:25px}}html{box-sizing:border-box}*,:after,:before{box-sizing:inherit;margin:0;padding:0}body{background-color:var(--color-background);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;margin:0;padding:0}h1{font-weight:400}h1,p{color:var(--color-text);margin-bottom:1.5rem;padding:0 1rem}form{margin:0;padding:0}label{font-weight:500;margin-bottom:.25rem;text-align:left}input[type],label{color:var(--color-text);display:block}input[type]{background:var(--color-background-card);border:var(--border-width) solid var(--color-control-border);border-radius:var(--border-radius);box-sizing:border-box;font-size:1rem;padding:.5rem 1rem;width:100%}input[type]:focus{box-shadow:none}p{font-size:1.1rem;line-height:2rem}a.button{line-height:1rem;text-decoration:none}a.button:link,a.button:visited{background-color:var(--color-background);color:var(--color-primary)}button span{flex-grow:1}a.button,button{align-items:center;background-color:var(--provider-bg);border-color:rgba(0,0,0,.1);border-radius:var(--border-radius);color:var(--provider-color,var(--color-primary));display:flex;font-size:1.1rem;font-weight:500;justify-content:center;min-height:62px;padding:.75rem 1rem;position:relative;transition:all .1s ease-in-out}a.button:hover,button:hover{background-color:var(--provider-bg-hover,var(--color-background-hover));cursor:pointer}a.button:active,button:active{cursor:pointer}a.button #provider-logo,button #provider-logo{display:block;width:25px}a.button #provider-logo-dark,button #provider-logo-dark{display:none}#submitButton{background-color:var(--brand-color,var(--color-info));color:var(--button-text-color,var(--color-info-text));width:100%}#submitButton:hover{background-color:var(--button-hover-bg,var(--color-info-hover))!important}a.site{color:var(--color-primary);font-size:1rem;line-height:2rem;text-decoration:none}a.site:hover{text-decoration:underline}.page{box-sizing:border-box;display:grid;height:100%;margin:0;padding:0;place-items:center;position:absolute;width:100%}.page>div{text-align:center}.error a.button{margin-top:.5rem;padding-left:2rem;padding-right:2rem}.error .message{margin-bottom:1.5rem}.signin input[type=text]{display:block;margin-left:auto;margin-right:auto}.signin hr{border:0;border-top:1px solid var(--color-separator);display:block;margin:2rem auto 1rem;overflow:visible}.signin hr:before{background:var(--color-background-card);color:#888;content:"or";padding:0 .4rem;position:relative;top:-.7rem}.signin .error{background:#f5f5f5;background:var(--color-error);border-radius:.3rem;font-weight:500}.signin .error p{color:var(--color-info-text);font-size:.9rem;line-height:1.2rem;padding:.5rem 1rem;text-align:left}.signin form,.signin>div{display:block}.signin form input[type],.signin>div input[type]{margin-bottom:.5rem}.signin form button,.signin>div button{width:100%}.signin .provider+.provider{margin-top:1rem}.logo{display:inline-block;margin:1.25rem 0;max-height:70px;max-width:150px}.card{background-color:var(--color-background-card);border-radius:2rem;padding:1.25rem 2rem}.card .header{color:var(--color-primary)}.section-header{color:var(--color-text)}@media screen and (min-width:450px){.card{margin:2rem 0;width:368px}}@media screen and (max-width:450px){.card{margin:1rem 0;width:343px}}'}},98176:(e,t,r)=>{"use strict";r.r(t),r.d(t,{NIL:()=>U,parse:()=>g,stringify:()=>f,v1:()=>y,v3:()=>I,v4:()=>j,v5:()=>N,validate:()=>u,version:()=>M});var n,i,o,a=new Uint8Array(16);function s(){if(!n&&!(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(a)}let c=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,u=function(e){return"string"==typeof e&&c.test(e)};for(var l=[],d=0;d<256;++d)l.push((d+256).toString(16).substr(1));let f=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(l[e[t+0]]+l[e[t+1]]+l[e[t+2]]+l[e[t+3]]+"-"+l[e[t+4]]+l[e[t+5]]+"-"+l[e[t+6]]+l[e[t+7]]+"-"+l[e[t+8]]+l[e[t+9]]+"-"+l[e[t+10]]+l[e[t+11]]+l[e[t+12]]+l[e[t+13]]+l[e[t+14]]+l[e[t+15]]).toLowerCase();if(!u(r))throw TypeError("Stringified UUID is invalid");return r};var p=0,h=0;let y=function(e,t,r){var n=t&&r||0,a=t||Array(16),c=(e=e||{}).node||i,u=void 0!==e.clockseq?e.clockseq:o;if(null==c||null==u){var l=e.random||(e.rng||s)();null==c&&(c=i=[1|l[0],l[1],l[2],l[3],l[4],l[5]]),null==u&&(u=o=(l[6]<<8|l[7])&16383)}var d=void 0!==e.msecs?e.msecs:Date.now(),y=void 0!==e.nsecs?e.nsecs:h+1,g=d-p+(y-h)/1e4;if(g<0&&void 0===e.clockseq&&(u=u+1&16383),(g<0||d>p)&&void 0===e.nsecs&&(y=0),y>=1e4)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");p=d,h=y,o=u;var m=((0xfffffff&(d+=122192928e5))*1e4+y)%0x100000000;a[n++]=m>>>24&255,a[n++]=m>>>16&255,a[n++]=m>>>8&255,a[n++]=255&m;var b=d/0x100000000*1e4&0xfffffff;a[n++]=b>>>8&255,a[n++]=255&b,a[n++]=b>>>24&15|16,a[n++]=b>>>16&255,a[n++]=u>>>8|128,a[n++]=255&u;for(var w=0;w<6;++w)a[n+w]=c[w];return t||f(a)},g=function(e){if(!u(e))throw TypeError("Invalid UUID");var t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/0x10000000000&255,r[11]=t/0x100000000&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r};function m(e){e=unescape(encodeURIComponent(e));for(var t=[],r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var b="6ba7b810-9dad-11d1-80b4-00c04fd430c8",w="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function v(e,t,r){function n(e,n,i,o){if("string"==typeof e&&(e=m(e)),"string"==typeof n&&(n=g(n)),16!==n.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var a=new Uint8Array(16+e.length);if(a.set(n),a.set(e,n.length),(a=r(a))[6]=15&a[6]|t,a[8]=63&a[8]|128,i){o=o||0;for(var s=0;s<16;++s)i[o+s]=a[s];return i}return f(a)}try{n.name=e}catch(e){}return n.DNS=b,n.URL=w,n}function _(e){for(var t=[],r=32*e.length,n="0123456789abcdef",i=0;i<r;i+=8){var o=e[i>>5]>>>i%32&255,a=parseInt(n.charAt(o>>>4&15)+n.charAt(15&o),16);t.push(a)}return t}function E(e){return(e+64>>>9<<4)+14+1}function S(e,t){e[t>>5]|=128<<t%32,e[E(t)-1]=t;for(var r=0x67452301,n=-0x10325477,i=-0x67452302,o=0x10325476,a=0;a<e.length;a+=16){var s=r,c=n,u=i,l=o;r=R(r,n,i,o,e[a],7,-0x28955b88),o=R(o,r,n,i,e[a+1],12,-0x173848aa),i=R(i,o,r,n,e[a+2],17,0x242070db),n=R(n,i,o,r,e[a+3],22,-0x3e423112),r=R(r,n,i,o,e[a+4],7,-0xa83f051),o=R(o,r,n,i,e[a+5],12,0x4787c62a),i=R(i,o,r,n,e[a+6],17,-0x57cfb9ed),n=R(n,i,o,r,e[a+7],22,-0x2b96aff),r=R(r,n,i,o,e[a+8],7,0x698098d8),o=R(o,r,n,i,e[a+9],12,-0x74bb0851),i=R(i,o,r,n,e[a+10],17,-42063),n=R(n,i,o,r,e[a+11],22,-0x76a32842),r=R(r,n,i,o,e[a+12],7,0x6b901122),o=R(o,r,n,i,e[a+13],12,-0x2678e6d),i=R(i,o,r,n,e[a+14],17,-0x5986bc72),n=R(n,i,o,r,e[a+15],22,0x49b40821),r=O(r,n,i,o,e[a+1],5,-0x9e1da9e),o=O(o,r,n,i,e[a+6],9,-0x3fbf4cc0),i=O(i,o,r,n,e[a+11],14,0x265e5a51),n=O(n,i,o,r,e[a],20,-0x16493856),r=O(r,n,i,o,e[a+5],5,-0x29d0efa3),o=O(o,r,n,i,e[a+10],9,0x2441453),i=O(i,o,r,n,e[a+15],14,-0x275e197f),n=O(n,i,o,r,e[a+4],20,-0x182c0438),r=O(r,n,i,o,e[a+9],5,0x21e1cde6),o=O(o,r,n,i,e[a+14],9,-0x3cc8f82a),i=O(i,o,r,n,e[a+3],14,-0xb2af279),n=O(n,i,o,r,e[a+8],20,0x455a14ed),r=O(r,n,i,o,e[a+13],5,-0x561c16fb),o=O(o,r,n,i,e[a+2],9,-0x3105c08),i=O(i,o,r,n,e[a+7],14,0x676f02d9),n=O(n,i,o,r,e[a+12],20,-0x72d5b376),r=T(r,n,i,o,e[a+5],4,-378558),o=T(o,r,n,i,e[a+8],11,-0x788e097f),i=T(i,o,r,n,e[a+11],16,0x6d9d6122),n=T(n,i,o,r,e[a+14],23,-0x21ac7f4),r=T(r,n,i,o,e[a+1],4,-0x5b4115bc),o=T(o,r,n,i,e[a+4],11,0x4bdecfa9),i=T(i,o,r,n,e[a+7],16,-0x944b4a0),n=T(n,i,o,r,e[a+10],23,-0x41404390),r=T(r,n,i,o,e[a+13],4,0x289b7ec6),o=T(o,r,n,i,e[a],11,-0x155ed806),i=T(i,o,r,n,e[a+3],16,-0x2b10cf7b),n=T(n,i,o,r,e[a+6],23,0x4881d05),r=T(r,n,i,o,e[a+9],4,-0x262b2fc7),o=T(o,r,n,i,e[a+12],11,-0x1924661b),i=T(i,o,r,n,e[a+15],16,0x1fa27cf8),n=T(n,i,o,r,e[a+2],23,-0x3b53a99b),r=C(r,n,i,o,e[a],6,-0xbd6ddbc),o=C(o,r,n,i,e[a+7],10,0x432aff97),i=C(i,o,r,n,e[a+14],15,-0x546bdc59),n=C(n,i,o,r,e[a+5],21,-0x36c5fc7),r=C(r,n,i,o,e[a+12],6,0x655b59c3),o=C(o,r,n,i,e[a+3],10,-0x70f3336e),i=C(i,o,r,n,e[a+10],15,-1051523),n=C(n,i,o,r,e[a+1],21,-0x7a7ba22f),r=C(r,n,i,o,e[a+8],6,0x6fa87e4f),o=C(o,r,n,i,e[a+15],10,-0x1d31920),i=C(i,o,r,n,e[a+6],15,-0x5cfebcec),n=C(n,i,o,r,e[a+13],21,0x4e0811a1),r=C(r,n,i,o,e[a+4],6,-0x8ac817e),o=C(o,r,n,i,e[a+11],10,-0x42c50dcb),i=C(i,o,r,n,e[a+2],15,0x2ad7d2bb),n=C(n,i,o,r,e[a+9],21,-0x14792c6f),r=x(r,s),n=x(n,c),i=x(i,u),o=x(o,l)}return[r,n,i,o]}function A(e){if(0===e.length)return[];for(var t=8*e.length,r=new Uint32Array(E(t)),n=0;n<t;n+=8)r[n>>5]|=(255&e[n/8])<<n%32;return r}function x(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function k(e,t){return e<<t|e>>>32-t}function P(e,t,r,n,i,o){return x(k(x(x(t,e),x(n,o)),i),r)}function R(e,t,r,n,i,o,a){return P(t&r|~t&n,e,t,i,o,a)}function O(e,t,r,n,i,o,a){return P(t&n|r&~n,e,t,i,o,a)}function T(e,t,r,n,i,o,a){return P(t^r^n,e,t,i,o,a)}function C(e,t,r,n,i,o,a){return P(r^(t|~n),e,t,i,o,a)}let I=v("v3",48,function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var r=0;r<t.length;++r)e[r]=t.charCodeAt(r)}return _(S(A(e),8*e.length))}),j=function(e,t,r){var n=(e=e||{}).random||(e.rng||s)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var i=0;i<16;++i)t[r+i]=n[i];return t}return f(n)};function D(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:case 3:return t^r^n;case 2:return t&r^t&n^r&n}}function H(e,t){return e<<t|e>>>32-t}let N=v("v5",80,function(e){var t=[0x5a827999,0x6ed9eba1,0x8f1bbcdc,0xca62c1d6],r=[0x67452301,0xefcdab89,0x98badcfe,0x10325476,0xc3d2e1f0];if("string"==typeof e){var n=unescape(encodeURIComponent(e));e=[];for(var i=0;i<n.length;++i)e.push(n.charCodeAt(i))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var o=Math.ceil((e.length/4+2)/16),a=Array(o),s=0;s<o;++s){for(var c=new Uint32Array(16),u=0;u<16;++u)c[u]=e[64*s+4*u]<<24|e[64*s+4*u+1]<<16|e[64*s+4*u+2]<<8|e[64*s+4*u+3];a[s]=c}a[o-1][14]=(e.length-1)*8/0x100000000,a[o-1][14]=Math.floor(a[o-1][14]),a[o-1][15]=(e.length-1)*8|0;for(var l=0;l<o;++l){for(var d=new Uint32Array(80),f=0;f<16;++f)d[f]=a[l][f];for(var p=16;p<80;++p)d[p]=H(d[p-3]^d[p-8]^d[p-14]^d[p-16],1);for(var h=r[0],y=r[1],g=r[2],m=r[3],b=r[4],w=0;w<80;++w){var v=Math.floor(w/20),_=H(h,5)+D(v,y,g,m)+b+t[v]+d[w]>>>0;b=m,m=g,g=H(y,30)>>>0,y=h,h=_}r[0]=r[0]+h>>>0,r[1]=r[1]+y>>>0,r[2]=r[2]+g>>>0,r[3]=r[3]+m>>>0,r[4]=r[4]+b>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,255&r[0],r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,255&r[1],r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,255&r[2],r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,255&r[3],r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,255&r[4]]}),U="00000000-0000-0000-0000-000000000000",M=function(e){if(!u(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}},98877:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={};Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var i=r(62794);Object.keys(i).forEach(function(e){!("default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(n,e))&&(e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))});var o=s(r(73317));function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}function s(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&({}).hasOwnProperty.call(e,o)){var s=i?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(n,o,s):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}Object.keys(o).forEach(function(e){!("default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(n,e))&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))})},99738:(e,t)=>{"use strict";async function r({options:e,paramValue:t,cookieValue:r}){let{url:n,callbacks:i}=e,o=n.origin;return t?o=await i.redirect({url:t,baseUrl:n.origin}):r&&(o=await i.redirect({url:r,baseUrl:n.origin})),{callbackUrl:o,callbackUrlCookie:o!==r?o:void 0}}Object.defineProperty(t,"__esModule",{value:!0}),t.createCallbackUrl=r}}]);