regionclaw 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/README.md +15 -0
  2. package/apps/ui/regionclaw-build/BUILD_ID +1 -1
  3. package/apps/ui/regionclaw-build/app-path-routes-manifest.json +2 -0
  4. package/apps/ui/regionclaw-build/build-manifest.json +2 -2
  5. package/apps/ui/regionclaw-build/prerender-manifest.json +0 -48
  6. package/apps/ui/regionclaw-build/routes-manifest.json +12 -0
  7. package/apps/ui/regionclaw-build/server/app/(app)/dashboard/page.js +3 -3
  8. package/apps/ui/regionclaw-build/server/app/(app)/dashboard/page_client-reference-manifest.js +1 -1
  9. package/apps/ui/regionclaw-build/server/app/_global-error/page.js +3 -3
  10. package/apps/ui/regionclaw-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  11. package/apps/ui/regionclaw-build/server/app/_global-error.html +1 -1
  12. package/apps/ui/regionclaw-build/server/app/_global-error.rsc +1 -1
  13. package/apps/ui/regionclaw-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  14. package/apps/ui/regionclaw-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  15. package/apps/ui/regionclaw-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  16. package/apps/ui/regionclaw-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  17. package/apps/ui/regionclaw-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  18. package/apps/ui/regionclaw-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  19. package/apps/ui/regionclaw-build/server/app/_not-found/page.js +2 -2
  20. package/apps/ui/regionclaw-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  21. package/apps/ui/regionclaw-build/server/app/_not-found.html +1 -1
  22. package/apps/ui/regionclaw-build/server/app/_not-found.rsc +4 -4
  23. package/apps/ui/regionclaw-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
  24. package/apps/ui/regionclaw-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  25. package/apps/ui/regionclaw-build/server/app/_not-found.segments/_index.segment.rsc +4 -4
  26. package/apps/ui/regionclaw-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  27. package/apps/ui/regionclaw-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  28. package/apps/ui/regionclaw-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  29. package/apps/ui/regionclaw-build/server/app/api/auth/[...nextauth]/route.js +1 -1
  30. package/apps/ui/regionclaw-build/server/app/api/auth/first-run/route.js +1 -1
  31. package/apps/ui/regionclaw-build/server/app/api/trpc/[trpc]/route.js +2 -2
  32. package/apps/ui/regionclaw-build/server/app/api/update/run/route.js +1 -0
  33. package/apps/ui/regionclaw-build/server/app/api/update/run/route.js.nft.json +1 -0
  34. package/apps/ui/regionclaw-build/server/app/api/update/run/route_client-reference-manifest.js +1 -0
  35. package/apps/ui/regionclaw-build/server/app/api/update/status/route.js +1 -0
  36. package/apps/ui/regionclaw-build/server/app/api/update/status/route.js.nft.json +1 -0
  37. package/apps/ui/regionclaw-build/server/app/api/update/status/route_client-reference-manifest.js +1 -0
  38. package/apps/ui/regionclaw-build/server/app/favicon.ico/route.js +1 -1
  39. package/apps/ui/regionclaw-build/server/app/login/page.js +2 -2
  40. package/apps/ui/regionclaw-build/server/app/login/page_client-reference-manifest.js +1 -1
  41. package/apps/ui/regionclaw-build/server/app/page.js +2 -2
  42. package/apps/ui/regionclaw-build/server/app/page_client-reference-manifest.js +1 -1
  43. package/apps/ui/regionclaw-build/server/app/setup/page.js +2 -2
  44. package/apps/ui/regionclaw-build/server/app/setup/page_client-reference-manifest.js +1 -1
  45. package/apps/ui/regionclaw-build/server/app-paths-manifest.json +2 -0
  46. package/apps/ui/regionclaw-build/server/chunks/263.js +2 -2
  47. package/apps/ui/regionclaw-build/server/chunks/324.js +1 -1
  48. package/apps/ui/regionclaw-build/server/chunks/902.js +3 -3
  49. package/apps/ui/regionclaw-build/server/middleware-build-manifest.js +1 -1
  50. package/apps/ui/regionclaw-build/server/pages/404.html +1 -1
  51. package/apps/ui/regionclaw-build/server/pages/500.html +1 -1
  52. package/apps/ui/regionclaw-build/static/ZSgRLh43NEMa5560KIFa0/_buildManifest.js +1 -0
  53. package/apps/ui/regionclaw-build/static/chunks/557-16373a4e3e7fff4a.js +1 -0
  54. package/apps/ui/regionclaw-build/static/chunks/609-413da697ed2385f4.js +1 -0
  55. package/apps/ui/regionclaw-build/static/chunks/{777-2c6a164314456938.js → 835-8d09234672e1cdbd.js} +2 -2
  56. package/apps/ui/regionclaw-build/static/chunks/app/(app)/dashboard/page-fdd3dce681b59047.js +1 -0
  57. package/apps/ui/regionclaw-build/static/chunks/app/(app)/layout-16f7ce76f7f41b68.js +1 -0
  58. package/apps/ui/regionclaw-build/static/chunks/app/_global-error/page-fdd3dce681b59047.js +1 -0
  59. package/apps/ui/regionclaw-build/static/chunks/app/api/auth/[...nextauth]/route-fdd3dce681b59047.js +1 -0
  60. package/apps/ui/regionclaw-build/static/chunks/app/api/auth/first-run/route-fdd3dce681b59047.js +1 -0
  61. package/apps/ui/regionclaw-build/static/chunks/app/api/trpc/[trpc]/route-fdd3dce681b59047.js +1 -0
  62. package/apps/ui/regionclaw-build/static/chunks/app/api/update/run/route-fdd3dce681b59047.js +1 -0
  63. package/apps/ui/regionclaw-build/static/chunks/app/api/update/status/route-fdd3dce681b59047.js +1 -0
  64. package/apps/ui/regionclaw-build/static/chunks/app/{layout-87ffd83df9489fc3.js → layout-812a5dd3c2548265.js} +1 -1
  65. package/apps/ui/regionclaw-build/static/chunks/app/page-fdd3dce681b59047.js +1 -0
  66. package/apps/ui/regionclaw-build/static/chunks/next/dist/client/components/builtin/app-error-fdd3dce681b59047.js +1 -0
  67. package/apps/ui/regionclaw-build/static/chunks/next/dist/client/components/builtin/forbidden-fdd3dce681b59047.js +1 -0
  68. package/apps/ui/regionclaw-build/static/chunks/next/dist/client/components/builtin/not-found-fdd3dce681b59047.js +1 -0
  69. package/apps/ui/regionclaw-build/static/chunks/next/dist/client/components/builtin/unauthorized-fdd3dce681b59047.js +1 -0
  70. package/apps/ui/regionclaw-build/types/app/api/update/run/route.ts +351 -0
  71. package/apps/ui/regionclaw-build/types/app/api/update/status/route.ts +351 -0
  72. package/apps/ui/regionclaw-build/types/link.d.ts +2 -0
  73. package/apps/ui/regionclaw-build/types/routes.d.ts +3 -1
  74. package/apps/ui/regionclaw-build/types/validator.ts +18 -0
  75. package/apps/ui/src/app/(app)/layout.tsx +7 -1
  76. package/apps/ui/src/app/api/update/run/route.ts +36 -0
  77. package/apps/ui/src/app/api/update/status/route.ts +24 -0
  78. package/apps/ui/src/components/app-layout-header.tsx +8 -2
  79. package/apps/ui/src/components/app-sidebar.tsx +3 -0
  80. package/apps/ui/src/components/regionclaw-update-banner.tsx +229 -0
  81. package/apps/ui/src/server/regionclaw-meta.ts +3 -0
  82. package/apps/ui/src/server/update-cli.ts +88 -0
  83. package/bin/regionclaw.js +357 -3
  84. package/package.json +1 -1
  85. package/scripts/restart-running-regionclaw.mjs +54 -0
  86. package/apps/ui/regionclaw-build/server/app/index.html +0 -1
  87. package/apps/ui/regionclaw-build/server/app/index.meta +0 -16
  88. package/apps/ui/regionclaw-build/server/app/index.rsc +0 -21
  89. package/apps/ui/regionclaw-build/server/app/index.segments/__PAGE__.segment.rsc +0 -6
  90. package/apps/ui/regionclaw-build/server/app/index.segments/_full.segment.rsc +0 -21
  91. package/apps/ui/regionclaw-build/server/app/index.segments/_head.segment.rsc +0 -6
  92. package/apps/ui/regionclaw-build/server/app/index.segments/_index.segment.rsc +0 -9
  93. package/apps/ui/regionclaw-build/server/app/index.segments/_tree.segment.rsc +0 -5
  94. package/apps/ui/regionclaw-build/server/app/login.html +0 -1
  95. package/apps/ui/regionclaw-build/server/app/login.meta +0 -17
  96. package/apps/ui/regionclaw-build/server/app/login.rsc +0 -23
  97. package/apps/ui/regionclaw-build/server/app/login.segments/_full.segment.rsc +0 -23
  98. package/apps/ui/regionclaw-build/server/app/login.segments/_head.segment.rsc +0 -6
  99. package/apps/ui/regionclaw-build/server/app/login.segments/_index.segment.rsc +0 -9
  100. package/apps/ui/regionclaw-build/server/app/login.segments/_tree.segment.rsc +0 -5
  101. package/apps/ui/regionclaw-build/server/app/login.segments/login/__PAGE__.segment.rsc +0 -6
  102. package/apps/ui/regionclaw-build/server/app/login.segments/login.segment.rsc +0 -5
  103. package/apps/ui/regionclaw-build/static/chunks/314-50a286a8a2defe3e.js +0 -1
  104. package/apps/ui/regionclaw-build/static/chunks/774-b72ba79217cd49b6.js +0 -1
  105. package/apps/ui/regionclaw-build/static/chunks/app/(app)/dashboard/page-ee954e3484be7e8f.js +0 -1
  106. package/apps/ui/regionclaw-build/static/chunks/app/(app)/layout-8c2cbeb73ce3441e.js +0 -1
  107. package/apps/ui/regionclaw-build/static/chunks/app/_global-error/page-ee954e3484be7e8f.js +0 -1
  108. package/apps/ui/regionclaw-build/static/chunks/app/api/auth/[...nextauth]/route-ee954e3484be7e8f.js +0 -1
  109. package/apps/ui/regionclaw-build/static/chunks/app/api/auth/first-run/route-ee954e3484be7e8f.js +0 -1
  110. package/apps/ui/regionclaw-build/static/chunks/app/api/trpc/[trpc]/route-ee954e3484be7e8f.js +0 -1
  111. package/apps/ui/regionclaw-build/static/chunks/app/page-ee954e3484be7e8f.js +0 -1
  112. package/apps/ui/regionclaw-build/static/chunks/next/dist/client/components/builtin/app-error-ee954e3484be7e8f.js +0 -1
  113. package/apps/ui/regionclaw-build/static/chunks/next/dist/client/components/builtin/forbidden-ee954e3484be7e8f.js +0 -1
  114. package/apps/ui/regionclaw-build/static/chunks/next/dist/client/components/builtin/not-found-ee954e3484be7e8f.js +0 -1
  115. package/apps/ui/regionclaw-build/static/chunks/next/dist/client/components/builtin/unauthorized-ee954e3484be7e8f.js +0 -1
  116. package/apps/ui/regionclaw-build/static/tx6PZf8zETvK0EvVfqK73/_buildManifest.js +0 -1
  117. /package/apps/ui/regionclaw-build/static/{tx6PZf8zETvK0EvVfqK73 → ZSgRLh43NEMa5560KIFa0}/_ssgManifest.js +0 -0
@@ -1,4 +1,4 @@
1
- exports.id=902,exports.ids=[902],exports.modules={1025:a=>{a.exports=function(a){if(void 0===a)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return a},a.exports.__esModule=!0,a.exports.default=a.exports},1065:(a,b,c)=>{var d=c(11723),e=(c(55511),c(55591)),f=c(81630),g=c(79551),h=c(69268);b.OAuth2=function(a,b,c,d,e,f){this._clientId=a,this._clientSecret=b,this._baseSite=c,this._authorizeUrl=d||"/oauth/authorize",this._accessTokenUrl=e||"/oauth/access_token",this._accessTokenName="access_token",this._authMethod="Bearer",this._customHeaders=f||{},this._useAuthorizationHeaderForGET=!1,this._agent=void 0},b.OAuth2.prototype.setAgent=function(a){this._agent=a},b.OAuth2.prototype.setAccessTokenName=function(a){this._accessTokenName=a},b.OAuth2.prototype.setAuthMethod=function(a){this._authMethod=a},b.OAuth2.prototype.useAuthorizationHeaderforGET=function(a){this._useAuthorizationHeaderForGET=a},b.OAuth2.prototype._getAccessTokenUrl=function(){return this._baseSite+this._accessTokenUrl},b.OAuth2.prototype.buildAuthHeader=function(a){return this._authMethod+" "+a},b.OAuth2.prototype._chooseHttpLibrary=function(a){var b=e;return"https:"!=a.protocol&&(b=f),b},b.OAuth2.prototype._request=function(a,b,c,e,f,h){var i=g.parse(b,!0);"https:"!=i.protocol||i.port||(i.port=443);var j=this._chooseHttpLibrary(i),k={};for(var l in this._customHeaders)k[l]=this._customHeaders[l];if(c)for(var l in c)k[l]=c[l];k.Host=i.host,k["User-Agent"]||(k["User-Agent"]="Node-oauth"),e?Buffer.isBuffer(e)?k["Content-Length"]=e.length:k["Content-Length"]=Buffer.byteLength(e):k["Content-length"]=0,!f||"Authorization"in k||(i.query||(i.query={}),i.query[this._accessTokenName]=f);var m=d.stringify(i.query);m&&(m="?"+m);var n={host:i.hostname,port:i.port,path:i.pathname+m,method:a,headers:k};this._executeRequest(j,n,e,h)},b.OAuth2.prototype._executeRequest=function(a,b,c,d){var e=h.isAnEarlyCloseHost(b.host),f=!1;function g(a,b){f||(f=!0,a.statusCode>=200&&a.statusCode<=299||301==a.statusCode||302==a.statusCode?d(null,b,a):d({statusCode:a.statusCode,data:b}))}var i="";this._agent&&(b.agent=this._agent);var j=a.request(b);j.on("response",function(a){a.on("data",function(a){i+=a}),a.on("close",function(b){e&&g(a,i)}),a.addListener("end",function(){g(a,i)})}),j.on("error",function(a){f=!0,d(a)}),("POST"==b.method||"PUT"==b.method)&&c&&j.write(c),j.end()},b.OAuth2.prototype.getAuthorizeUrl=function(a){var a=a||{};return a.client_id=this._clientId,this._baseSite+this._authorizeUrl+"?"+d.stringify(a)},b.OAuth2.prototype.getOAuthAccessToken=function(a,b,c){var b=b||{};b.client_id=this._clientId,b.client_secret=this._clientSecret;var e="refresh_token"===b.grant_type?"refresh_token":"code";b[e]=a;var f=d.stringify(b);this._request("POST",this._getAccessTokenUrl(),{"Content-Type":"application/x-www-form-urlencoded"},f,null,function(a,b,e){if(a)c(a);else{try{f=JSON.parse(b)}catch(a){f=d.parse(b)}var f,g=f.access_token,h=f.refresh_token;delete f.refresh_token,c(null,g,h,f)}})},b.OAuth2.prototype.getProtectedResource=function(a,b,c){this._request("GET",a,{},"",b,c)},b.OAuth2.prototype.get=function(a,b,c){if(this._useAuthorizationHeaderForGET){var d={Authorization:this.buildAuthHeader(b)};b=null}else d={};this._request("GET",a,d,"",b,c)}},1293:(a,b,c)=>{var d=c(2826);a.exports=function(a,b){if("function"!=typeof b&&null!==b)throw TypeError("Super expression must either be null or a function");a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),b&&d(a,b)},a.exports.__esModule=!0,a.exports.default=a.exports},2826:a=>{function b(c,d){return a.exports=b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,b){return a.__proto__=b,a},a.exports.__esModule=!0,a.exports.default=a.exports,b(c,d)}a.exports=b,a.exports.__esModule=!0,a.exports.default=a.exports},3410:(a,b,c)=>{var d=c(85407)();a.exports=d;try{regeneratorRuntime=d}catch(a){"object"==typeof globalThis?globalThis.regeneratorRuntime=d:Function("r","regeneratorRuntime = r")(d)}},4861:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=f;var d=c(86460),e=c(60434);async function f(a){var b,c,f,g,h,i;let{sessionToken:j,profile:k,account:l,options:m}=a;if(!(null!=l&&l.providerAccountId)||!l.type)throw Error("Missing or invalid provider account");if(!["email","oauth"].includes(l.type))throw Error("Provider not supported");let{adapter:n,jwt:o,events:p,session:{strategy:q,generateSessionToken:r}}=m;if(!n)return{user:k,account:l};let{createUser:s,updateUser:t,getUser:u,getUserByAccount:v,getUserByEmail:w,linkAccount:x,createSession:y,getSessionAndUser:z,deleteSession:A}=n,B=null,C=null,D=!1,E="jwt"===q;if(j)if(E)try{(B=await o.decode({...o,token:j}))&&"sub"in B&&B.sub&&(C=await u(B.sub))}catch(a){}else{let a=await z(j);a&&(B=a.session,C=a.user)}if("email"===l.type){let a=await w(k.email);if(a)(null==(b=C)?void 0:b.id)!==a.id&&!E&&j&&await A(j),C=await t({id:a.id,emailVerified:new Date}),await (null==(c=p.updateUser)?void 0:c.call(p,{user:C}));else{let{id:a,...b}={...k,emailVerified:new Date};C=await s(b),await (null==(f=p.createUser)?void 0:f.call(p,{user:C})),D=!0}return{session:B=E?{}:await y({sessionToken:await r(),userId:C.id,expires:(0,e.fromDate)(m.session.maxAge)}),user:C,isNewUser:D}}if("oauth"===l.type){let a=await v({providerAccountId:l.providerAccountId,provider:l.provider});if(a){if(C){if(a.id===C.id)return{session:B,user:C,isNewUser:D};throw new d.AccountNotLinkedError("The account is already associated with another user")}return{session:B=E?{}:await y({sessionToken:await r(),userId:a.id,expires:(0,e.fromDate)(m.session.maxAge)}),user:a,isNewUser:D}}{if(C)return await x({...l,userId:C.id}),await (null==(i=p.linkAccount)?void 0:i.call(p,{user:C,account:l,profile:k})),{session:B,user:C,isNewUser:D};let a=k.email?await w(k.email):null;if(a){let b=m.provider;if(null!=b&&b.allowDangerousEmailAccountLinking)C=a;else throw new d.AccountNotLinkedError("Another account already exists with the same e-mail address")}else{let{id:a,...b}={...k,emailVerified:null};C=await s(b)}return await (null==(g=p.createUser)?void 0:g.call(p,{user:C})),await x({...l,userId:C.id}),await (null==(h=p.linkAccount)?void 0:h.call(p,{user:C,account:l,profile:k})),{session:B=E?{}:await y({sessionToken:await r(),userId:C.id,expires:(0,e.fromDate)(m.session.maxAge)}),user:C,isNewUser:!0}}}throw Error("Unsupported account type")}},4888:(a,b)=>{"use strict";function c(a,b="algorithm.name"){return TypeError(`CryptoKey does not support this operation, its ${b} must be ${a}`)}function d(a,b){return a.name===b}function e(a){return parseInt(a.name.slice(4),10)}function f(a,b){if(b.length&&!b.some(b=>a.usages.includes(b))){let a="CryptoKey does not support this operation, its usages must include ";if(b.length>2){let c=b.pop();a+=`one of ${b.join(", ")}, or ${c}.`}else 2===b.length?a+=`one of ${b[0]} or ${b[1]}.`:a+=`${b[0]}.`;throw TypeError(a)}}Object.defineProperty(b,"__esModule",{value:!0}),b.checkEncCryptoKey=b.checkSigCryptoKey=void 0,b.checkSigCryptoKey=function(a,b,...g){switch(b){case"HS256":case"HS384":case"HS512":{if(!d(a.algorithm,"HMAC"))throw c("HMAC");let f=parseInt(b.slice(2),10);if(e(a.algorithm.hash)!==f)throw c(`SHA-${f}`,"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!d(a.algorithm,"RSASSA-PKCS1-v1_5"))throw c("RSASSA-PKCS1-v1_5");let f=parseInt(b.slice(2),10);if(e(a.algorithm.hash)!==f)throw c(`SHA-${f}`,"algorithm.hash");break}case"PS256":case"PS384":case"PS512":{if(!d(a.algorithm,"RSA-PSS"))throw c("RSA-PSS");let f=parseInt(b.slice(2),10);if(e(a.algorithm.hash)!==f)throw c(`SHA-${f}`,"algorithm.hash");break}case"EdDSA":if("Ed25519"!==a.algorithm.name&&"Ed448"!==a.algorithm.name)throw c("Ed25519 or Ed448");break;case"ES256":case"ES384":case"ES512":{if(!d(a.algorithm,"ECDSA"))throw c("ECDSA");let e=function(a){switch(a){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw Error("unreachable")}}(b);if(a.algorithm.namedCurve!==e)throw c(e,"algorithm.namedCurve");break}default:throw TypeError("CryptoKey does not support this operation")}f(a,g)},b.checkEncCryptoKey=function(a,b,...g){switch(b){case"A128GCM":case"A192GCM":case"A256GCM":{if(!d(a.algorithm,"AES-GCM"))throw c("AES-GCM");let e=parseInt(b.slice(1,4),10);if(a.algorithm.length!==e)throw c(e,"algorithm.length");break}case"A128KW":case"A192KW":case"A256KW":{if(!d(a.algorithm,"AES-KW"))throw c("AES-KW");let e=parseInt(b.slice(1,4),10);if(a.algorithm.length!==e)throw c(e,"algorithm.length");break}case"ECDH":switch(a.algorithm.name){case"ECDH":case"X25519":case"X448":break;default:throw c("ECDH, X25519, or X448")}break;case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":if(!d(a.algorithm,"PBKDF2"))throw c("PBKDF2");break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":{if(!d(a.algorithm,"RSA-OAEP"))throw c("RSA-OAEP");let f=parseInt(b.slice(9),10)||1;if(e(a.algorithm.hash)!==f)throw c(`SHA-${f}`,"algorithm.hash");break}default:throw TypeError("CryptoKey does not support this operation")}f(a,g)}},5178:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.jwtVerify=void 0;let d=c(12115),e=c(64377),f=c(14191);b.jwtVerify=async function(a,b,c){var g;let h=await (0,d.compactVerify)(a,b,c);if((null==(g=h.protectedHeader.crit)?void 0:g.includes("b64"))&&!1===h.protectedHeader.b64)throw new f.JWTInvalid("JWTs MUST NOT use unencoded payload");let i={payload:(0,e.default)(h.protectedHeader,h.payload,c),protectedHeader:h.protectedHeader};return"function"==typeof b?{...i,key:h.key}:i}},5421:(a,b,c)=>{"use strict";var d=c(31912);Object.defineProperty(b,"__esModule",{value:!0});var e={encode:!0,decode:!0,getToken:!0};b.decode=l,b.encode=k,b.getToken=m;var f=c(93189),g=d(c(41618)),h=c(86845),i=c(8137),j=c(39644);async function k(a){let{token:b={},secret:c,maxAge:d=2592e3,salt:e=""}=a,g=await n(c,e);return await new f.EncryptJWT(b).setProtectedHeader({alg:"dir",enc:"A256GCM"}).setIssuedAt().setExpirationTime((Date.now()/1e3|0)+d).setJti((0,h.v4)()).encrypt(g)}async function l(a){let{token:b,secret:c,salt:d=""}=a;if(!b)return null;let e=await n(c,d),{payload:g}=await (0,f.jwtDecrypt)(b,e,{clockTolerance:15});return g}async function m(a){var b,c,d,e;let{req:f,secureCookie:g=null!=(b=null==(c=process.env.NEXTAUTH_URL)?void 0:c.startsWith("https://"))?b:!!process.env.VERCEL,cookieName:h=g?"__Secure-next-auth.session-token":"next-auth.session-token",raw:j,decode:k=l,logger:m=console,secret:n=null!=(d=process.env.NEXTAUTH_SECRET)?d:process.env.AUTH_SECRET}=a;if(!f)throw Error("Must pass `req` to JWT getToken()");let o=new i.SessionStore({name:h,options:{secure:g}},{cookies:f.cookies,headers:f.headers},m).value,p=f.headers instanceof Headers?f.headers.get("authorization"):null==(e=f.headers)?void 0:e.authorization;if(o||(null==p?void 0:p.split(" ")[0])!=="Bearer"||(o=decodeURIComponent(p.split(" ")[1])),!o)return null;if(j)return o;try{return await k({token:o,secret:n})}catch(a){return null}}async function n(a,b){return await (0,g.default)("sha256",a,b,`NextAuth.js Generated Encryption Key${b?` (${b})`:""}`,32)}Object.keys(j).forEach(function(a){"default"===a||"__esModule"===a||Object.prototype.hasOwnProperty.call(e,a)||a in b&&b[a]===j[a]||Object.defineProperty(b,a,{enumerable:!0,get:function(){return j[a]}})})},5996:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=a=>Math.floor(a.getTime()/1e3)},7040:(a,b,c)=>{a.exports=c(85208).default},7326:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.EncryptJWT=void 0;let d=c(12831),e=c(38569),f=c(14111);class g extends f.ProduceJWT{setProtectedHeader(a){if(this._protectedHeader)throw TypeError("setProtectedHeader can only be called once");return this._protectedHeader=a,this}setKeyManagementParameters(a){if(this._keyManagementParameters)throw TypeError("setKeyManagementParameters can only be called once");return this._keyManagementParameters=a,this}setContentEncryptionKey(a){if(this._cek)throw TypeError("setContentEncryptionKey can only be called once");return this._cek=a,this}setInitializationVector(a){if(this._iv)throw TypeError("setInitializationVector can only be called once");return this._iv=a,this}replicateIssuerAsHeader(){return this._replicateIssuerAsHeader=!0,this}replicateSubjectAsHeader(){return this._replicateSubjectAsHeader=!0,this}replicateAudienceAsHeader(){return this._replicateAudienceAsHeader=!0,this}async encrypt(a,b){let c=new d.CompactEncrypt(e.encoder.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}),c.setProtectedHeader(this._protectedHeader),this._iv&&c.setInitializationVector(this._iv),this._cek&&c.setContentEncryptionKey(this._cek),this._keyManagementParameters&&c.setKeyManagementParameters(this._keyManagementParameters),c.encrypt(a,b)}}b.EncryptJWT=g},7435:(a,b)=>{function c(a){for(var b,c,d="",e=-1;++e<a.length;)b=a.charCodeAt(e),c=e+1<a.length?a.charCodeAt(e+1):0,55296<=b&&b<=56319&&56320<=c&&c<=57343&&(b=65536+((1023&b)<<10)+(1023&c),e++),b<=127?d+=String.fromCharCode(b):b<=2047?d+=String.fromCharCode(192|b>>>6&31,128|63&b):b<=65535?d+=String.fromCharCode(224|b>>>12&15,128|b>>>6&63,128|63&b):b<=2097151&&(d+=String.fromCharCode(240|b>>>18&7,128|b>>>12&63,128|b>>>6&63,128|63&b));return d}function d(a){for(var b=Array(a.length>>2),c=0;c<b.length;c++)b[c]=0;for(var c=0;c<8*a.length;c+=8)b[c>>5]|=(255&a.charCodeAt(c/8))<<24-c%32;return b}function e(a,b){a[b>>5]|=128<<24-b%32,a[(b+64>>9<<4)+15]=b;for(var c=Array(80),d=0x67452301,e=-0x10325477,h=-0x67452302,i=0x10325476,j=-0x3c2d1e10,k=0;k<a.length;k+=16){for(var l=d,m=e,n=h,o=i,p=j,q=0;q<80;q++){q<16?c[q]=a[k+q]:c[q]=g(c[q-3]^c[q-8]^c[q-14]^c[q-16],1);var r,s,t,u,v,w=f(f(g(d,5),(r=q,s=e,t=h,u=i,r<20?s&t|~s&u:r<40?s^t^u:r<60?s&t|s&u|t&u:s^t^u)),f(f(j,c[q]),(v=q)<20?0x5a827999:v<40?0x6ed9eba1:v<60?-0x70e44324:-0x359d3e2a));j=i,i=h,h=g(e,30),e=d,d=w}d=f(d,l),e=f(e,m),h=f(h,n),i=f(i,o),j=f(j,p)}return[d,e,h,i,j]}function f(a,b){var c=(65535&a)+(65535&b);return(a>>16)+(b>>16)+(c>>16)<<16|65535&c}function g(a,b){return a<<b|a>>>32-b}b.HMACSHA1=function(a,b){return function(a){for(var b="",c=a.length,d=0;d<c;d+=3)for(var e=a.charCodeAt(d)<<16|(d+1<c?a.charCodeAt(d+1)<<8:0)|(d+2<c?a.charCodeAt(d+2):0),f=0;f<4;f++)8*d+6*f>8*a.length?b+="=":b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>>6*(3-f)&63);return b}(function(a,b){var c=d(a);c.length>16&&(c=e(c,8*a.length));for(var f=Array(16),g=Array(16),h=0;h<16;h++)f[h]=0x36363636^c[h],g[h]=0x5c5c5c5c^c[h];for(var i=e(f.concat(d(b)),512+8*b.length),j=e(g.concat(i),672),k="",l=0;l<32*j.length;l+=8)k+=String.fromCharCode(j[l>>5]>>>24-l%32&255);return k}(c(a),c(b)))}},7706:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});let d=c(14191);b.default=function(a,b,c,e,f){let g;if(void 0!==f.crit&&void 0===e.crit)throw new a('"crit" (Critical) Header Parameter MUST be integrity protected');if(!e||void 0===e.crit)return new Set;if(!Array.isArray(e.crit)||0===e.crit.length||e.crit.some(a=>"string"!=typeof a||0===a.length))throw new a('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');for(let h of(g=void 0!==c?new Map([...Object.entries(c),...b.entries()]):b,e.crit)){if(!g.has(h))throw new d.JOSENotSupported(`Extension Header Parameter "${h}" is not recognized`);if(void 0===f[h])throw new a(`Extension Header Parameter "${h}" is missing`);if(g.get(h)&&void 0===e[h])throw new a(`Extension Header Parameter "${h}" MUST be integrity protected`)}return new Set(e.crit)}},7775:(a,b,c)=>{var d=c(36633);a.exports=function(a,b,c,e,f){var g=d(a,b,c,e,f);return g.next().then(function(a){return a.done?a.value:g.next()})},a.exports.__esModule=!0,a.exports.default=a.exports},8137:(a,b)=>{"use strict";function c(a,b,c){d(a,b),b.set(a,c)}function d(a,b){if(b.has(a))throw TypeError("Cannot initialize the same private elements twice on an object")}function e(a,b){return a.get(g(a,b))}function f(a,b,c){return a.set(g(a,b),c),c}function g(a,b,c){if("function"==typeof a?a===b:a.has(b))return arguments.length<3?b:c;throw TypeError("Private element is not present on this object")}Object.defineProperty(b,"__esModule",{value:!0}),b.SessionStore=void 0,b.defaultCookies=function(a){let b=a?"__Secure-":"";return{sessionToken:{name:`${b}next-auth.session-token`,options:{httpOnly:!0,sameSite:"lax",path:"/",secure:a}},callbackUrl:{name:`${b}next-auth.callback-url`,options:{httpOnly:!0,sameSite:"lax",path:"/",secure:a}},csrfToken:{name:`${a?"__Host-":""}next-auth.csrf-token`,options:{httpOnly:!0,sameSite:"lax",path:"/",secure:a}},pkceCodeVerifier:{name:`${b}next-auth.pkce.code_verifier`,options:{httpOnly:!0,sameSite:"lax",path:"/",secure:a,maxAge:900}},state:{name:`${b}next-auth.state`,options:{httpOnly:!0,sameSite:"lax",path:"/",secure:a,maxAge:900}},nonce:{name:`${b}next-auth.nonce`,options:{httpOnly:!0,sameSite:"lax",path:"/",secure:a}}}};var h=new WeakMap,i=new WeakMap,j=new WeakMap,k=new WeakSet;class l{constructor(a,b,g){!function(a,b){d(a,b),b.add(a)}(this,k),c(this,h,{}),c(this,i,void 0),c(this,j,void 0),f(j,this,g),f(i,this,a);const{cookies:l}=b,{name:m}=a;if("function"==typeof(null==l?void 0:l.getAll))for(const{name:a,value:b}of l.getAll())a.startsWith(m)&&(e(h,this)[a]=b);else if(l instanceof Map)for(const a of l.keys())a.startsWith(m)&&(e(h,this)[a]=l.get(a));else for(const a in l)a.startsWith(m)&&(e(h,this)[a]=l[a])}get value(){return Object.keys(e(h,this)).sort((a,b)=>{var c,d;return parseInt(null!=(c=a.split(".").pop())?c:"0")-parseInt(null!=(d=b.split(".").pop())?d:"0")}).map(a=>e(h,this)[a]).join("")}chunk(a,b){let c=g(k,this,n).call(this);for(let d of g(k,this,m).call(this,{name:e(i,this).name,value:a,options:{...e(i,this).options,...b}}))c[d.name]=d;return Object.values(c)}clean(){return Object.values(g(k,this,n).call(this))}}function m(a){let b=Math.ceil(a.value.length/3933);if(1===b)return e(h,this)[a.name]=a.value,[a];let c=[];for(let d=0;d<b;d++){let b=`${a.name}.${d}`,f=a.value.substr(3933*d,3933);c.push({...a,name:b,value:f}),e(h,this)[b]=f}return e(j,this).debug("CHUNKING_SESSION_COOKIE",{message:"Session cookie exceeds allowed 4096 bytes.",emptyCookieSize:163,valueSize:a.value.length,chunks:c.map(a=>a.value.length+163)}),c}function n(){let a={};for(let c in e(h,this)){var b;null==(b=e(h,this))||delete b[c],a[c]={name:c,value:"",options:{...e(i,this).options,maxAge:0}}}return a}b.SessionStore=l},8668:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.GeneralSign=void 0;let d=c(31093),e=c(14191);class f{constructor(a,b,c){this.parent=a,this.key=b,this.options=c}setProtectedHeader(a){if(this.protectedHeader)throw TypeError("setProtectedHeader can only be called once");return this.protectedHeader=a,this}setUnprotectedHeader(a){if(this.unprotectedHeader)throw TypeError("setUnprotectedHeader can only be called once");return this.unprotectedHeader=a,this}addSignature(...a){return this.parent.addSignature(...a)}sign(...a){return this.parent.sign(...a)}done(){return this.parent}}class g{constructor(a){this._signatures=[],this._payload=a}addSignature(a,b){let c=new f(this,a,b);return this._signatures.push(c),c}async sign(){if(!this._signatures.length)throw new e.JWSInvalid("at least one signature must be added");let a={signatures:[],payload:""};for(let b=0;b<this._signatures.length;b++){let c=this._signatures[b],f=new d.FlattenedSign(this._payload);f.setProtectedHeader(c.protectedHeader),f.setUnprotectedHeader(c.unprotectedHeader);let{payload:g,...h}=await f.sign(c.key,c.options);if(0===b)a.payload=g;else if(a.payload!==g)throw new e.JWSInvalid("inconsistent use of JWS Unencoded Payload (RFC7797)");a.signatures.push(h)}return a}}b.GeneralSign=g},8758:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.bitLength=void 0;let d=c(14191),e=c(17071);function f(a){switch(a){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 d.JOSENotSupported(`Unsupported JWE Algorithm: ${a}`)}}b.bitLength=f,b.default=a=>(0,e.default)(new Uint8Array(f(a)>>3))},9066:(a,b,c)=>{let d=c(58872);a.exports=a=>{if("string"!=typeof a||!a)throw TypeError("JWT must be a string");let{0:b,1:c,2:e,length:f}=a.split(".");if(5===f)throw TypeError("encrypted JWTs cannot be decoded");if(3!==f)throw Error("JWTs must have three components");try{return{header:JSON.parse(d.decode(b)),payload:JSON.parse(d.decode(c)),signature:e}}catch(a){throw Error("JWT is malformed")}}},9179:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.unwrap=b.wrap=void 0;let d=c(79428),e=c(55511),f=c(14191),g=c(38569),h=c(63549),i=c(4888),j=c(25092),k=c(72349),l=c(46486),m=c(57944);function n(a,b){if(a.symmetricKeySize<<3!==parseInt(b.slice(1,4),10))throw TypeError(`Invalid key size for alg: ${b}`)}function o(a,b,c){if((0,j.default)(a))return a;if(a instanceof Uint8Array)return(0,e.createSecretKey)(a);if((0,h.isCryptoKey)(a))return(0,i.checkEncCryptoKey)(a,b,c),e.KeyObject.from(a);throw TypeError((0,k.default)(a,...m.types,"Uint8Array"))}b.wrap=(a,b,c)=>{let h=parseInt(a.slice(1,4),10),i=`aes${h}-wrap`;if(!(0,l.default)(i))throw new f.JOSENotSupported(`alg ${a} is not supported either by JOSE or your javascript runtime`);let j=o(b,a,"wrapKey");n(j,a);let k=(0,e.createCipheriv)(i,j,d.Buffer.alloc(8,166));return(0,g.concat)(k.update(c),k.final())},b.unwrap=(a,b,c)=>{let h=parseInt(a.slice(1,4),10),i=`aes${h}-wrap`;if(!(0,l.default)(i))throw new f.JOSENotSupported(`alg ${a} is not supported either by JOSE or your javascript runtime`);let j=o(b,a,"unwrapKey");n(j,a);let k=(0,e.createDecipheriv)(i,j,d.Buffer.alloc(8,166));return(0,g.concat)(k.update(c),k.final())}},9572:(a,b,c)=>{"use strict";Object.defineProperty(b,"r",{enumerable:!0,get:function(){return l}});let d=c(63033),e=c(29294),f=c(30754),g=c(50379),h=c(80618),i=c(8504),j=c(84402),k=c(5575);function l(){let a="draftMode",b=e.workAsyncStorage.getStore(),c=d.workUnitAsyncStorage.getStore();switch((!b||!c)&&(0,d.throwForMissingRequestStore)(a),c.type){case"prerender-runtime":return(0,k.delayUntilRuntimeStage)(c,m(c.draftMode,b));case"request":return m(c.draftMode,b);case"cache":case"private-cache":case"unstable-cache":let f=(0,d.getDraftModeProviderForCacheScope)(b,c);if(f)return m(f,b);case"prerender":case"prerender-ppr":case"prerender-legacy":return m(null,b);case"prerender-client":case"validation-client":{let a="`draftMode`";throw Object.defineProperty(new j.InvariantError(`${a} must not be used within a Client Component. Next.js should be preventing ${a} from being included in Client Components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1046",enumerable:!1,configurable:!0})}case"generate-static-params":throw Object.defineProperty(Error(`Route ${b.route} used \`${a}()\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1132",enumerable:!1,configurable:!0});default:return c}}function m(a,b){let c=o.get(a??n);return c||Promise.resolve(new p(a))}c(16036);let n={},o=new WeakMap;class p{constructor(a){this._provider=a}get isEnabled(){return null!==this._provider&&this._provider.isEnabled}enable(){q("draftMode().enable()",this.enable),null!==this._provider&&this._provider.enable()}disable(){q("draftMode().disable()",this.disable),null!==this._provider&&this._provider.disable()}}function q(a,b){let c=e.workAsyncStorage.getStore(),g=d.workUnitAsyncStorage.getStore();if(c){if((null==g?void 0:g.phase)==="after")throw Object.defineProperty(Error(`Route ${c.route} used "${a}" 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:"E845",enumerable:!1,configurable:!0});if(c.dynamicShouldError)throw Object.defineProperty(new h.StaticGenBailoutError(`Route ${c.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${a}\`. 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(g)switch(g.type){case"cache":case"private-cache":{let d=Object.defineProperty(Error(`Route ${c.route} used "${a}" 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:"E829",enumerable:!1,configurable:!0});throw Error.captureStackTrace(d,b),c.invalidDynamicUsageError??=d,d}case"unstable-cache":throw Object.defineProperty(Error(`Route ${c.route} used "${a}" 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:"E844",enumerable:!1,configurable:!0});case"prerender":case"prerender-runtime":{let b=Object.defineProperty(Error(`Route ${c.route} used ${a} 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});return(0,f.abortAndThrowOnSynchronousRequestDataAccess)(c.route,a,b,g)}case"prerender-client":case"validation-client":let d="`draftMode`";throw Object.defineProperty(new j.InvariantError(`${d} must not be used within a Client Component. Next.js should be preventing ${d} from being included in Client Components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1046",enumerable:!1,configurable:!0});case"prerender-ppr":return(0,f.postponeWithTracking)(c.route,a,g.dynamicTracking);case"prerender-legacy":g.revalidate=0;let e=Object.defineProperty(new i.DynamicServerError(`Route ${c.route} couldn't be rendered statically because it used \`${a}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`),"__NEXT_ERROR_CODE",{value:"E558",enumerable:!1,configurable:!0});throw c.dynamicUsageDescription=a,c.dynamicUsageStack=e.stack,e;case"request":(0,f.trackDynamicDataInDynamicRender)(g);break;case"generate-static-params":throw Object.defineProperty(Error(`Route ${c.route} used \`${a}\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1121",enumerable:!1,configurable:!0})}}}(0,g.createDedupedByCallsiteServerErrorLoggerDev)(function(a,b){let c=a?`Route "${a}" `:"This route ";return Object.defineProperty(Error(`${c}used ${b}. \`draftMode()\` returns a Promise and must be unwrapped with \`await\` or \`React.use()\` before accessing its properties. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`),"__NEXT_ERROR_CODE",{value:"E835",enumerable:!1,configurable:!0})})},10163:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.CompactSign=void 0;let d=c(31093);class e{constructor(a){this._flattened=new d.FlattenedSign(a)}setProtectedHeader(a){return this._flattened.setProtectedHeader(a),this}async sign(a,b){let c=await this._flattened.sign(a,b);if(void 0===c.payload)throw TypeError("use the flattened module for creating JWS with b64: false");return`${c.protected}.${c.payload}.${c.signature}`}}b.CompactSign=e},11211:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});let d=c(55511),e=c(38569);b.default=function(a,b,c,f,g,h){let i=(0,e.concat)(a,b,c,(0,e.uint64be)(a.length<<3)),j=(0,d.createHmac)(`sha${f}`,g);return j.update(i),j.digest().slice(0,h>>3)}},12064:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});let d=c(55511);b.default=(a,b)=>(0,d.createHash)(a).update(b).digest()},12115:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.compactVerify=void 0;let d=c(19317),e=c(14191),f=c(38569);b.compactVerify=async function(a,b,c){if(a instanceof Uint8Array&&(a=f.decoder.decode(a)),"string"!=typeof a)throw new e.JWSInvalid("Compact JWS must be a string or Uint8Array");let{0:g,1:h,2:i,length:j}=a.split(".");if(3!==j)throw new e.JWSInvalid("Invalid Compact JWS");let k=await (0,d.flattenedVerify)({payload:h,protected:g,signature:i},b,c),l={payload:k.payload,protectedHeader:k.protectedHeader};return"function"==typeof b?{...l,key:k.key}:l}},12446:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.decode=b.encode=void 0;let d=c(32706);b.encode=d.encode,b.decode=d.decode},12831:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.CompactEncrypt=void 0;let d=c(22585);class e{constructor(a){this._flattened=new d.FlattenedEncrypt(a)}setContentEncryptionKey(a){return this._flattened.setContentEncryptionKey(a),this}setInitializationVector(a){return this._flattened.setInitializationVector(a),this}setProtectedHeader(a){return this._flattened.setProtectedHeader(a),this}setKeyManagementParameters(a){return this._flattened.setKeyManagementParameters(a),this}async encrypt(a,b){let c=await this._flattened.encrypt(a,b);return[c.protected,c.encrypted_key,c.iv,c.ciphertext,c.tag].join(".")}}b.CompactEncrypt=e},14111:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ProduceJWT=void 0;let d=c(5996),e=c(89879),f=c(17111);class g{constructor(a){if(!(0,e.default)(a))throw TypeError("JWT Claims Set MUST be an object");this._payload=a}setIssuer(a){return this._payload={...this._payload,iss:a},this}setSubject(a){return this._payload={...this._payload,sub:a},this}setAudience(a){return this._payload={...this._payload,aud:a},this}setJti(a){return this._payload={...this._payload,jti:a},this}setNotBefore(a){return"number"==typeof a?this._payload={...this._payload,nbf:a}:this._payload={...this._payload,nbf:(0,d.default)(new Date)+(0,f.default)(a)},this}setExpirationTime(a){return"number"==typeof a?this._payload={...this._payload,exp:a}:this._payload={...this._payload,exp:(0,d.default)(new Date)+(0,f.default)(a)},this}setIssuedAt(a){return void 0===a?this._payload={...this._payload,iat:(0,d.default)(new Date)}:this._payload={...this._payload,iat:a},this}}b.ProduceJWT=g},14191:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.JWSSignatureVerificationFailed=b.JWKSTimeout=b.JWKSMultipleMatchingKeys=b.JWKSNoMatchingKey=b.JWKSInvalid=b.JWKInvalid=b.JWTInvalid=b.JWSInvalid=b.JWEInvalid=b.JWEDecompressionFailed=b.JWEDecryptionFailed=b.JOSENotSupported=b.JOSEAlgNotAllowed=b.JWTExpired=b.JWTClaimValidationFailed=b.JOSEError=void 0;class c extends Error{static get code(){return"ERR_JOSE_GENERIC"}constructor(a){var b;super(a),this.code="ERR_JOSE_GENERIC",this.name=this.constructor.name,null==(b=Error.captureStackTrace)||b.call(Error,this,this.constructor)}}b.JOSEError=c;class d extends c{static get code(){return"ERR_JWT_CLAIM_VALIDATION_FAILED"}constructor(a,b="unspecified",c="unspecified"){super(a),this.code="ERR_JWT_CLAIM_VALIDATION_FAILED",this.claim=b,this.reason=c}}b.JWTClaimValidationFailed=d;class e extends c{static get code(){return"ERR_JWT_EXPIRED"}constructor(a,b="unspecified",c="unspecified"){super(a),this.code="ERR_JWT_EXPIRED",this.claim=b,this.reason=c}}b.JWTExpired=e;class f extends c{constructor(){super(...arguments),this.code="ERR_JOSE_ALG_NOT_ALLOWED"}static get code(){return"ERR_JOSE_ALG_NOT_ALLOWED"}}b.JOSEAlgNotAllowed=f;class g extends c{constructor(){super(...arguments),this.code="ERR_JOSE_NOT_SUPPORTED"}static get code(){return"ERR_JOSE_NOT_SUPPORTED"}}b.JOSENotSupported=g;class h extends c{constructor(){super(...arguments),this.code="ERR_JWE_DECRYPTION_FAILED",this.message="decryption operation failed"}static get code(){return"ERR_JWE_DECRYPTION_FAILED"}}b.JWEDecryptionFailed=h;class i extends c{constructor(){super(...arguments),this.code="ERR_JWE_DECOMPRESSION_FAILED",this.message="decompression operation failed"}static get code(){return"ERR_JWE_DECOMPRESSION_FAILED"}}b.JWEDecompressionFailed=i;class j extends c{constructor(){super(...arguments),this.code="ERR_JWE_INVALID"}static get code(){return"ERR_JWE_INVALID"}}b.JWEInvalid=j;class k extends c{constructor(){super(...arguments),this.code="ERR_JWS_INVALID"}static get code(){return"ERR_JWS_INVALID"}}b.JWSInvalid=k;class l extends c{constructor(){super(...arguments),this.code="ERR_JWT_INVALID"}static get code(){return"ERR_JWT_INVALID"}}b.JWTInvalid=l;class m extends c{constructor(){super(...arguments),this.code="ERR_JWK_INVALID"}static get code(){return"ERR_JWK_INVALID"}}b.JWKInvalid=m;class n extends c{constructor(){super(...arguments),this.code="ERR_JWKS_INVALID"}static get code(){return"ERR_JWKS_INVALID"}}b.JWKSInvalid=n;class o extends c{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"}}b.JWKSNoMatchingKey=o;class p extends c{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"}}b.JWKSMultipleMatchingKeys=p;class q extends c{constructor(){super(...arguments),this.code="ERR_JWKS_TIMEOUT",this.message="request timed out"}static get code(){return"ERR_JWKS_TIMEOUT"}}b.JWKSTimeout=q;class r extends c{constructor(){super(...arguments),this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED",this.message="signature verification failed"}static get code(){return"ERR_JWS_SIGNATURE_VERIFICATION_FAILED"}}b.JWSSignatureVerificationFailed=r},14596:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.openidClient=e;var d=c(61922);async function e(a){let b,c=a.provider;if(c.httpOptions&&d.custom.setHttpOptionsDefaults(c.httpOptions),c.wellKnown)b=await d.Issuer.discover(c.wellKnown);else{var e,f,g;b=new d.Issuer({issuer:c.issuer,authorization_endpoint:null==(e=c.authorization)?void 0:e.url,token_endpoint:null==(f=c.token)?void 0:f.url,userinfo_endpoint:null==(g=c.userinfo)?void 0:g.url,jwks_uri:c.jwks_endpoint})}let h=new b.Client({client_id:c.clientId,client_secret:c.clientSecret,redirect_uris:[c.callbackUrl],...c.client},c.jwks);return h[d.custom.clock_tolerance]=10,h}},15398:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});let d=c(55511),e=c(63549),f=c(4888),g=c(72349),h=c(57944);b.default=function(a,b,c){if(b instanceof Uint8Array){if(!a.startsWith("HS"))throw TypeError((0,g.default)(b,...h.types));return(0,d.createSecretKey)(b)}if(b instanceof d.KeyObject)return b;if((0,e.isCryptoKey)(b))return(0,f.checkSigCryptoKey)(b,a,c),d.KeyObject.from(b);throw TypeError((0,g.default)(b,...h.types,"Uint8Array"))}},16514:(a,b,c)=>{"use strict";var d=c(31912);Object.defineProperty(b,"__esModule",{value:!0}),b.default=h;var e=d(c(22050)),f=d(c(84896)),g=d(c(90967));async function h(a){let{options:b,query:c,body:d}=a,{url:h,callbacks:i,logger:j,provider:k}=b;if(!k.type)return{status:500,text:`Error: Type not specified for ${k.name}`};if("oauth"===k.type)try{return await (0,e.default)({options:b,query:c})}catch(a){return j.error("SIGNIN_OAUTH_ERROR",{error:a,providerId:k.id}),{redirect:`${h}/error?error=OAuthSignin`}}if("email"===k.type){var l;let a=null==d?void 0:d.email;if(!a)return{redirect:`${h}/error?error=EmailSignin`};let c=null!=(l=k.normalizeIdentifier)?l:a=>{var b;let c=a.trim();if(1!==(null!=(b=c.match(/@/g))?b:[]).length||c.includes('"'))throw Error("Invalid email address format.");let[d,e]=c.toLowerCase().split("@");if(!d||!e||!(e=e.split(",")[0]).includes("."))throw Error("Invalid email address format.");return`${d}@${e}`};try{a=c(null==d?void 0:d.email)}catch(a){return j.error("SIGNIN_EMAIL_ERROR",{error:a,providerId:k.id}),{redirect:`${h}/error?error=EmailSignin`}}let e=await (0,g.default)({email:a,adapter:b.adapter}),m={providerAccountId:a,userId:a,type:"email",provider:k.id};try{let a=await i.signIn({user:e,account:m,email:{verificationRequest:!0}});if(!a)return{redirect:`${h}/error?error=AccessDenied`};if("string"==typeof a)return{redirect:a}}catch(a){return{redirect:`${h}/error?${new URLSearchParams({error:a})}`}}try{return{redirect:await (0,f.default)(a,b)}}catch(a){return j.error("SIGNIN_EMAIL_ERROR",{error:a,providerId:k.id}),{redirect:`${h}/error?error=EmailSignin`}}}return{redirect:`${h}/signin`}}},16588:(a,b)=>{var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r={},s=[],t=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,u=Array.isArray;function v(a,b){for(var c in b)a[c]=b[c];return a}function w(a){a&&a.parentNode&&a.parentNode.removeChild(a)}function x(a,b,d){var e,f,g,h={};for(g in b)"key"==g?e=b[g]:"ref"==g?f=b[g]:h[g]=b[g];if(arguments.length>2&&(h.children=arguments.length>3?c.call(arguments,2):d),"function"==typeof a&&null!=a.defaultProps)for(g in a.defaultProps)void 0===h[g]&&(h[g]=a.defaultProps[g]);return y(a,h,e,f,null)}function y(a,b,c,f,g){var h={type:a,props:b,key:c,ref:f,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==g?++e:g,__i:-1,__u:0};return null==g&&null!=d.vnode&&d.vnode(h),h}function z(a){return a.children}function A(a,b){this.props=a,this.context=b}function B(a,b){if(null==b)return a.__?B(a.__,a.__i+1):null;for(var c;b<a.__k.length;b++)if(null!=(c=a.__k[b])&&null!=c.__e)return c.__e;return"function"==typeof a.type?B(a):null}function C(a){(!a.__d&&(a.__d=!0)&&f.push(a)&&!D.__r++||g!=d.debounceRendering)&&((g=d.debounceRendering)||h)(D)}function D(){try{for(var a,b=1;f.length;)f.length>b&&f.sort(i),a=f.shift(),b=f.length,function(a){if(a.__P&&a.__d){var b=a.__v,c=b.__e,e=[],f=[],g=v({},b);g.__v=b.__v+1,d.vnode&&d.vnode(g),I(a.__P,g,b,a.__n,a.__P.namespaceURI,32&b.__u?[c]:null,e,null==c?B(b):c,!!(32&b.__u),f),g.__v=b.__v,g.__.__k[g.__i]=g,K(e,g,f),b.__e=b.__=null,g.__e!=c&&function a(b){if(null!=(b=b.__)&&null!=b.__c)return b.__e=b.__c.base=null,b.__k.some(function(a){if(null!=a&&null!=a.__e)return b.__e=b.__c.base=a.__e}),a(b)}(g)}}(a)}finally{f.length=D.__r=0}}function E(a,b,c,e,f,g,h,i,j,k,l){var m,n,o,p,q,t,v,x=e&&e.__k||s,A=b.length;for(j=function(a,b,c,e,f){var g,h,i,j,k,l=c.length,m=l,n=0;for(a.__k=Array(f),g=0;g<f;g++)null!=(h=b[g])&&"boolean"!=typeof h&&"function"!=typeof h?("string"==typeof h||"number"==typeof h||"bigint"==typeof h||h.constructor==String?h=a.__k[g]=y(null,h,null,null,null):u(h)?h=a.__k[g]=y(z,{children:h},null,null,null):void 0===h.constructor&&h.__b>0?h=a.__k[g]=y(h.type,h.props,h.key,h.ref?h.ref:null,h.__v):a.__k[g]=h,j=g+n,h.__=a,h.__b=a.__b+1,i=null,-1!=(k=h.__i=function(a,b,c,d){var e,f,g,h=a.key,i=a.type,j=b[c],k=null!=j&&0==(2&j.__u);if(null===j&&null==h||k&&h==j.key&&i==j.type)return c;if(d>+!!k){for(e=c-1,f=c+1;e>=0||f<b.length;)if(null!=(j=b[g=e>=0?e--:f++])&&0==(2&j.__u)&&h==j.key&&i==j.type)return g}return -1}(h,c,j,m))&&(m--,(i=c[k])&&(i.__u|=2)),null==i||null==i.__v?(-1==k&&(f>l?n--:f<l&&n++),"function"!=typeof h.type&&(h.__u|=4)):k!=j&&(k==j-1?n--:k==j+1?n++:(k>j?n--:n++,h.__u|=4))):a.__k[g]=null;if(m)for(g=0;g<l;g++)null!=(i=c[g])&&0==(2&i.__u)&&(i.__e==e&&(e=B(i)),function a(b,c,e){var f,g;if(d.unmount&&d.unmount(b),(f=b.ref)&&(f.current&&f.current!=b.__e||L(f,null,c)),null!=(f=b.__c)){if(f.componentWillUnmount)try{f.componentWillUnmount()}catch(a){d.__e(a,c)}f.base=f.__P=null}if(f=b.__k)for(g=0;g<f.length;g++)f[g]&&a(f[g],c,e||"function"!=typeof b.type);e||w(b.__e),b.__c=b.__=b.__e=void 0}(i,i));return e}(c,b,x,j,A),m=0;m<A;m++)null!=(o=c.__k[m])&&(n=-1!=o.__i&&x[o.__i]||r,o.__i=m,t=I(a,o,n,f,g,h,i,j,k,l),p=o.__e,o.ref&&n.ref!=o.ref&&(n.ref&&L(n.ref,null,o),l.push(o.ref,o.__c||p,o)),null==q&&null!=p&&(q=p),(v=!!(4&o.__u))||n.__k===o.__k?(j=function a(b,c,d,e){var f,g;if("function"==typeof b.type){for(f=b.__k,g=0;f&&g<f.length;g++)f[g]&&(f[g].__=b,c=a(f[g],c,d,e));return c}b.__e!=c&&(e&&(c&&b.type&&!c.parentNode&&(c=B(b)),d.insertBefore(b.__e,c||null)),c=b.__e);do c=c&&c.nextSibling;while(null!=c&&8==c.nodeType);return c}(o,j,a,v),v&&n.__e&&(n.__e=null)):"function"==typeof o.type&&void 0!==t?j=t:p&&(j=p.nextSibling),o.__u&=-7);return c.__e=q,j}function F(a,b,c){"-"==b[0]?a.setProperty(b,null==c?"":c):a[b]=null==c?"":"number"!=typeof c||t.test(b)?c:c+"px"}function G(a,b,c,d,e){var f,g;a:if("style"==b)if("string"==typeof c)a.style.cssText=c;else{if("string"==typeof d&&(a.style.cssText=d=""),d)for(b in d)c&&b in c||F(a.style,b,"");if(c)for(b in c)d&&c[b]==d[b]||F(a.style,b,c[b])}else if("o"==b[0]&&"n"==b[1])f=b!=(b=b.replace(m,"$1")),b=(g=b.toLowerCase())in a||"onFocusOut"==b||"onFocusIn"==b?g.slice(2):b.slice(2),a.l||(a.l={}),a.l[b+f]=c,c?d?c[l]=d[l]:(c[l]=n,a.addEventListener(b,f?p:o,f)):a.removeEventListener(b,f?p:o,f);else{if("http://www.w3.org/2000/svg"==e)b=b.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=b&&"height"!=b&&"href"!=b&&"list"!=b&&"form"!=b&&"tabIndex"!=b&&"download"!=b&&"rowSpan"!=b&&"colSpan"!=b&&"role"!=b&&"popover"!=b&&b in a)try{a[b]=null==c?"":c;break a}catch(a){}"function"==typeof c||(null==c||!1===c&&"-"!=b[4]?a.removeAttribute(b):a.setAttribute(b,"popover"==b&&1==c?"":c))}}function H(a){return function(b){if(this.l){var c=this.l[b.type+a];if(null==b[k])b[k]=n++;else if(b[k]<c[l])return;return c(d.event?d.event(b):b)}}}function I(a,b,e,f,g,h,i,j,k,l){var m,n,o,p,q,t,x,y,C,D,F,H,I,K,L,N=b.type;if(void 0!==b.constructor)return null;128&e.__u&&(k=!!(32&e.__u),h=[j=b.__e=e.__e]),(m=d.__b)&&m(b);a:if("function"==typeof N)try{if(y=b.props,C=N.prototype&&N.prototype.render,D=(m=N.contextType)&&f[m.__c],F=m?D?D.props.value:m.__:f,e.__c?x=(n=b.__c=e.__c).__=n.__E:(C?b.__c=n=new N(y,F):(b.__c=n=new A(y,F),n.constructor=N,n.render=M),D&&D.sub(n),n.state||(n.state={}),n.__n=f,o=n.__d=!0,n.__h=[],n._sb=[]),C&&null==n.__s&&(n.__s=n.state),C&&null!=N.getDerivedStateFromProps&&(n.__s==n.state&&(n.__s=v({},n.__s)),v(n.__s,N.getDerivedStateFromProps(y,n.__s))),p=n.props,q=n.state,n.__v=b,o)C&&null==N.getDerivedStateFromProps&&null!=n.componentWillMount&&n.componentWillMount(),C&&null!=n.componentDidMount&&n.__h.push(n.componentDidMount);else{if(C&&null==N.getDerivedStateFromProps&&y!==p&&null!=n.componentWillReceiveProps&&n.componentWillReceiveProps(y,F),b.__v==e.__v||!n.__e&&null!=n.shouldComponentUpdate&&!1===n.shouldComponentUpdate(y,n.__s,F)){b.__v!=e.__v&&(n.props=y,n.state=n.__s,n.__d=!1),b.__e=e.__e,b.__k=e.__k,b.__k.some(function(a){a&&(a.__=b)}),s.push.apply(n.__h,n._sb),n._sb=[],n.__h.length&&i.push(n);break a}null!=n.componentWillUpdate&&n.componentWillUpdate(y,n.__s,F),C&&null!=n.componentDidUpdate&&n.__h.push(function(){n.componentDidUpdate(p,q,t)})}if(n.context=F,n.props=y,n.__P=a,n.__e=!1,H=d.__r,I=0,C)n.state=n.__s,n.__d=!1,H&&H(b),m=n.render(n.props,n.state,n.context),s.push.apply(n.__h,n._sb),n._sb=[];else do n.__d=!1,H&&H(b),m=n.render(n.props,n.state,n.context),n.state=n.__s;while(n.__d&&++I<25);n.state=n.__s,null!=n.getChildContext&&(f=v(v({},f),n.getChildContext())),C&&!o&&null!=n.getSnapshotBeforeUpdate&&(t=n.getSnapshotBeforeUpdate(p,q)),K=null!=m&&m.type===z&&null==m.key?function a(b){return"object"!=typeof b||null==b||b.__b>0?b:u(b)?b.map(a):v({},b)}(m.props.children):m,j=E(a,u(K)?K:[K],b,e,f,g,h,i,j,k,l),n.base=b.__e,b.__u&=-161,n.__h.length&&i.push(n),x&&(n.__E=n.__=null)}catch(a){if(b.__v=null,k||null!=h)if(a.then){for(b.__u|=k?160:128;j&&8==j.nodeType&&j.nextSibling;)j=j.nextSibling;h[h.indexOf(j)]=null,b.__e=j}else{for(L=h.length;L--;)w(h[L]);J(b)}else b.__e=e.__e,b.__k=e.__k,a.then||J(b);d.__e(a,b,e)}else null==h&&b.__v==e.__v?(b.__k=e.__k,b.__e=e.__e):j=b.__e=function(a,b,e,f,g,h,i,j,k){var l,m,n,o,p,q,s,t=e.props||r,v=b.props,x=b.type;if("svg"==x?g="http://www.w3.org/2000/svg":"math"==x?g="http://www.w3.org/1998/Math/MathML":g||(g="http://www.w3.org/1999/xhtml"),null!=h){for(l=0;l<h.length;l++)if((p=h[l])&&"setAttribute"in p==!!x&&(x?p.localName==x:3==p.nodeType)){a=p,h[l]=null;break}}if(null==a){if(null==x)return document.createTextNode(v);a=document.createElementNS(g,x,v.is&&v),j&&(d.__m&&d.__m(b,h),j=!1),h=null}if(null==x)t===v||j&&a.data==v||(a.data=v);else{if(h=h&&c.call(a.childNodes),!j&&null!=h)for(t={},l=0;l<a.attributes.length;l++)t[(p=a.attributes[l]).name]=p.value;for(l in t)p=t[l],"dangerouslySetInnerHTML"==l?n=p:"children"==l||l in v||"value"==l&&"defaultValue"in v||"checked"==l&&"defaultChecked"in v||G(a,l,null,p,g);for(l in v)p=v[l],"children"==l?o=p:"dangerouslySetInnerHTML"==l?m=p:"value"==l?q=p:"checked"==l?s=p:j&&"function"!=typeof p||t[l]===p||G(a,l,p,t[l],g);if(m)j||n&&(m.__html==n.__html||m.__html==a.innerHTML)||(a.innerHTML=m.__html),b.__k=[];else if(n&&(a.innerHTML=""),E("template"==b.type?a.content:a,u(o)?o:[o],b,e,f,"foreignObject"==x?"http://www.w3.org/1999/xhtml":g,h,i,h?h[0]:e.__k&&B(e,0),j,k),null!=h)for(l=h.length;l--;)w(h[l]);j||(l="value","progress"==x&&null==q?a.removeAttribute("value"):null==q||q===a[l]&&("progress"!=x||q)&&("option"!=x||q==t[l])||G(a,l,q,t[l],g),l="checked",null!=s&&s!=a[l]&&G(a,l,s,t[l],g))}return a}(e.__e,b,e,f,g,h,i,k,l);return(m=d.diffed)&&m(b),128&b.__u?void 0:j}function J(a){a&&(a.__c&&(a.__c.__e=!0),a.__k&&a.__k.some(J))}function K(a,b,c){for(var e=0;e<c.length;e++)L(c[e],c[++e],c[++e]);d.__c&&d.__c(b,a),a.some(function(b){try{a=b.__h,b.__h=[],a.some(function(a){a.call(b)})}catch(a){d.__e(a,b.__v)}})}function L(a,b,c){try{if("function"==typeof a){var e="function"==typeof a.__u;e&&a.__u(),e&&null==b||(a.__u=a(b))}else a.current=b}catch(a){d.__e(a,c)}}function M(a,b,c){return this.constructor(a,c)}function N(a,b,e){var f,g,h,i;b==document&&(b=document.documentElement),d.__&&d.__(a,b),g=(f="function"==typeof e)?null:e&&e.__k||b.__k,h=[],i=[],I(b,a=(!f&&e||b).__k=x(z,null,[a]),g||r,r,b.namespaceURI,!f&&e?[e]:g?null:b.firstChild?c.call(b.childNodes):null,h,!f&&e?e:g?g.__e:b.firstChild,f,i),K(h,a,i)}c=s.slice,d={__e:function(a,b,c,d){for(var e,f,g;b=b.__;)if((e=b.__c)&&!e.__)try{if((f=e.constructor)&&null!=f.getDerivedStateFromError&&(e.setState(f.getDerivedStateFromError(a)),g=e.__d),null!=e.componentDidCatch&&(e.componentDidCatch(a,d||{}),g=e.__d),g)return e.__E=e}catch(b){a=b}throw a}},e=0,A.prototype.setState=function(a,b){var c;c=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=v({},this.state),"function"==typeof a&&(a=a(v({},c),this.props)),a&&v(c,a),null!=a&&this.__v&&(b&&this._sb.push(b),C(this))},A.prototype.forceUpdate=function(a){this.__v&&(this.__e=!0,a&&this.__h.push(a),C(this))},A.prototype.render=z,f=[],h="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,i=function(a,b){return a.__v.__b-b.__v.__b},D.__r=0,k="__d"+(j=Math.random().toString(8)),l="__a"+j,m=/(PointerCapture)$|Capture$/i,n=0,o=H(!1),p=H(!0),q=0,b.Component=A,b.Fragment=z,b.cloneElement=function(a,b,d){var e,f,g,h,i=v({},a.props);for(g in a.type&&a.type.defaultProps&&(h=a.type.defaultProps),b)"key"==g?e=b[g]:"ref"==g?f=b[g]:i[g]=void 0===b[g]&&null!=h?h[g]:b[g];return arguments.length>2&&(i.children=arguments.length>3?c.call(arguments,2):d),y(a.type,i,e||a.key,f||a.ref,null)},b.createContext=function(a){function b(a){var c,d;return this.getChildContext||(c=new Set,(d={})[b.__c]=this,this.getChildContext=function(){return d},this.componentWillUnmount=function(){c=null},this.shouldComponentUpdate=function(a){this.props.value!=a.value&&c.forEach(function(a){a.__e=!0,C(a)})},this.sub=function(a){c.add(a);var b=a.componentWillUnmount;a.componentWillUnmount=function(){c&&c.delete(a),b&&b.call(a)}}),a.children}return b.__c="__cC"+q++,b.__=a,b.Provider=b.__l=(b.Consumer=function(a,b){return a.children(b)}).contextType=b,b},b.createElement=x,b.createRef=function(){return{current:null}},b.h=x,b.hydrate=function a(b,c){N(b,c,a)},b.isValidElement=function(a){return null!=a&&void 0===a.constructor},b.options=d,b.render=N,b.toChildArray=function a(b,c){return c=c||[],null==b||"boolean"==typeof b||(u(b)?b.some(function(b){a(b,c)}):c.push(b)),c}},16711:a=>{a.exports=function(a){var b=Object(a),c=[];for(var d in b)c.unshift(d);return function a(){for(;c.length;)if((d=c.pop())in b)return a.value=d,a.done=!1,a;return a.done=!0,a}},a.exports.__esModule=!0,a.exports.default=a.exports},17071:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=void 0;var d=c(55511);Object.defineProperty(b,"default",{enumerable:!0,get:function(){return d.randomFillSync}})},17111:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});let c=/^(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)$/i;b.default=a=>{let b=c.exec(a);if(!b)throw TypeError("Invalid time period format");let d=parseFloat(b[1]);switch(b[2].toLowerCase()){case"sec":case"secs":case"second":case"seconds":case"s":return Math.round(d);case"minute":case"minutes":case"min":case"mins":case"m":return Math.round(60*d);case"hour":case"hours":case"hr":case"hrs":case"h":return Math.round(3600*d);case"day":case"days":case"d":return Math.round(86400*d);case"week":case"weeks":case"w":return Math.round(604800*d);default:return Math.round(0x1e187e0*d)}}},17149:(a,b,c)=>{"use strict";var d=c(31912);Object.defineProperty(b,"__esModule",{value:!0}),b.default=void 0,b.proxyLogger=function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:k,b=arguments.length>1?arguments[1]:void 0;try{if("u"<typeof window)return a;var c={},d=function(a){var d;c[a]=(d=(0,g.default)(e.default.mark(function c(d,g){var h,l;return e.default.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(k[a](d,g),"error"===a&&(g=j(g)),g.client=!0,h="".concat(b,"/_log"),l=new URLSearchParams(function(a){for(var b=1;b<arguments.length;b++){var c=null!=arguments[b]?arguments[b]:{};b%2?i(Object(c),!0).forEach(function(b){(0,f.default)(a,b,c[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(c)):i(Object(c)).forEach(function(b){Object.defineProperty(a,b,Object.getOwnPropertyDescriptor(c,b))})}return a}({level:a,code:d},g)),!navigator.sendBeacon){c.next=8;break}return c.abrupt("return",navigator.sendBeacon(h,l));case 8:return c.next=10,fetch(h,{method:"POST",body:l,keepalive:!0});case 10:return c.abrupt("return",c.sent);case 11:case"end":return c.stop()}},c)})),function(a,b){return d.apply(this,arguments)})};for(var h in a)d(h);return c}catch(a){return k}},b.setLogger=function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},b=arguments.length>1?arguments[1]:void 0;b||(k.debug=function(){}),a.error&&(k.error=a.error),a.warn&&(k.warn=a.warn),a.debug&&(k.debug=a.debug)};var e=d(c(3410)),f=d(c(56127)),g=d(c(89935)),h=c(86460);function i(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function j(a){var b,c;if(a instanceof Error&&!(a instanceof h.UnknownError))return{message:a.message,stack:a.stack,name:a.name};if(null!=(b=a)&&b.error){a.error=j(a.error),a.message=null!=(c=a.message)?c:a.error.message}return a}var k={error:function(a,b){b=j(b),console.error("[next-auth][error][".concat(a,"]"),"\nhttps://next-auth.js.org/errors#".concat(a.toLowerCase()),b.message,b)},warn:function(a){console.warn("[next-auth][warn][".concat(a,"]"),"\nhttps://next-auth.js.org/warnings#".concat(a.toLowerCase()))},debug:function(a,b){console.log("[next-auth][debug][".concat(a,"]"),b)}};b.default=k},17379:(a,b,c)=>{"use strict";var d=c(31912);Object.defineProperty(b,"__esModule",{value:!0}),b.default=i;var e=d(c(60448)),f=d(c(4861)),g=c(60434),h=d(c(90967));async function i(a){var b,c,d,i,j,k;let{options:l,query:m,body:n,method:o,headers:p,sessionStore:q}=a,{provider:r,adapter:s,url:t,callbackUrl:u,pages:v,jwt:w,events:x,callbacks:y,session:{strategy:z,maxAge:A},logger:B}=l,C=[],D="jwt"===z;if("oauth"===r.type)try{let{profile:d,account:g,OAuthProfile:h,cookies:i}=await (0,e.default)({query:m,body:n,method:o,options:l,cookies:a.cookies});i.length&&C.push(...i);try{if(B.debug("OAUTH_CALLBACK_RESPONSE",{profile:d,account:g,OAuthProfile:h}),!d||!g||!h)return{redirect:`${t}/signin`,cookies:C};let a=d;if(s){let{getUserByAccount:b}=s,c=await b({providerAccountId:g.providerAccountId,provider:r.id});c&&(a=c)}try{let b=await y.signIn({user:a,account:g,profile:h});if(!b)return{redirect:`${t}/error?error=AccessDenied`,cookies:C};if("string"==typeof b)return{redirect:b,cookies:C}}catch(a){return{redirect:`${t}/error?error=${encodeURIComponent(a.message)}`,cookies:C}}let{user:e,session:i,isNewUser:j}=await (0,f.default)({sessionToken:q.value,profile:d,account:g,options:l});if(D){let a={name:e.name,email:e.email,picture:e.image,sub:null==(c=e.id)?void 0:c.toString()},b=await y.jwt({token:a,user:e,account:g,profile:h,isNewUser:j,trigger:j?"signUp":"signIn"}),d=await w.encode({...w,token:b}),f=new Date;f.setTime(f.getTime()+1e3*A);let i=q.chunk(d,{expires:f});C.push(...i)}else C.push({name:l.cookies.sessionToken.name,value:i.sessionToken,options:{...l.cookies.sessionToken.options,expires:i.expires}});if(await (null==(b=x.signIn)?void 0:b.call(x,{user:e,account:g,profile:d,isNewUser:j})),j&&v.newUser)return{redirect:`${v.newUser}${v.newUser.includes("?")?"&":"?"}callbackUrl=${encodeURIComponent(u)}`,cookies:C};return{redirect:u,cookies:C}}catch(a){if("AccountNotLinkedError"===a.name)return{redirect:`${t}/error?error=OAuthAccountNotLinked`,cookies:C};if("CreateUserError"===a.name)return{redirect:`${t}/error?error=OAuthCreateAccount`,cookies:C};return B.error("OAUTH_CALLBACK_HANDLER_ERROR",a),{redirect:`${t}/error?error=Callback`,cookies:C}}}catch(a){if("OAuthCallbackError"===a.name)return B.error("OAUTH_CALLBACK_ERROR",{error:a,providerId:r.id}),{redirect:`${t}/error?error=OAuthCallback`,cookies:C};return B.error("OAUTH_CALLBACK_ERROR",a),{redirect:`${t}/error?error=Callback`,cookies:C}}if("email"===r.type)try{let a=null==m?void 0:m.token,b=null==m?void 0:m.email;if(!a)return{redirect:`${t}/error?error=configuration`,cookies:C};let c=await s.useVerificationToken({identifier:b,token:(0,g.hashToken)(a,l)});if(!c||c.expires.valueOf()<Date.now()||b&&c.identifier!==b)return{redirect:`${t}/error?error=Verification`,cookies:C};let e=await (0,h.default)({email:c.identifier,adapter:s}),j={providerAccountId:e.email,type:"email",provider:r.id};try{let a=await y.signIn({user:e,account:j});if(!a)return{redirect:`${t}/error?error=AccessDenied`,cookies:C};if("string"==typeof a)return{redirect:a,cookies:C}}catch(a){return{redirect:`${t}/error?error=${encodeURIComponent(a.message)}`,cookies:C}}let{user:k,session:n,isNewUser:o}=await (0,f.default)({sessionToken:q.value,profile:e,account:j,options:l});if(D){let a={name:k.name,email:k.email,picture:k.image,sub:null==(i=k.id)?void 0:i.toString()},b=await y.jwt({token:a,user:k,account:j,isNewUser:o,trigger:o?"signUp":"signIn"}),c=await w.encode({...w,token:b}),d=new Date;d.setTime(d.getTime()+1e3*A);let e=q.chunk(c,{expires:d});C.push(...e)}else C.push({name:l.cookies.sessionToken.name,value:n.sessionToken,options:{...l.cookies.sessionToken.options,expires:n.expires}});if(await (null==(d=x.signIn)?void 0:d.call(x,{user:k,account:j,isNewUser:o})),o&&v.newUser)return{redirect:`${v.newUser}${v.newUser.includes("?")?"&":"?"}callbackUrl=${encodeURIComponent(u)}`,cookies:C};return{redirect:u,cookies:C}}catch(a){if("CreateUserError"===a.name)return{redirect:`${t}/error?error=EmailCreateAccount`,cookies:C};return B.error("CALLBACK_EMAIL_ERROR",a),{redirect:`${t}/error?error=Callback`,cookies:C}}if("credentials"===r.type&&"POST"===o){let a;try{if(!(a=await r.authorize(n,{query:m,body:n,headers:p,method:o})))return{status:401,redirect:`${t}/error?${new URLSearchParams({error:"CredentialsSignin",provider:r.id})}`,cookies:C}}catch(a){return{status:401,redirect:`${t}/error?error=${encodeURIComponent(a.message)}`,cookies:C}}let b={providerAccountId:a.id,type:"credentials",provider:r.id};try{let c=await y.signIn({user:a,account:b,credentials:n});if(!c)return{status:403,redirect:`${t}/error?error=AccessDenied`,cookies:C};if("string"==typeof c)return{redirect:c,cookies:C}}catch(a){return{redirect:`${t}/error?error=${encodeURIComponent(a.message)}`,cookies:C}}let c={name:a.name,email:a.email,picture:a.image,sub:null==(j=a.id)?void 0:j.toString()},d=await y.jwt({token:c,user:a,account:b,isNewUser:!1,trigger:"signIn"}),e=await w.encode({...w,token:d}),f=new Date;f.setTime(f.getTime()+1e3*A);let g=q.chunk(e,{expires:f});return C.push(...g),await (null==(k=x.signIn)?void 0:k.call(x,{user:a,account:b})),{redirect:u,cookies:C}}return{status:500,body:`Error: Callback for provider type ${r.type} not supported`,cookies:C}}},17600:(a,b,c)=>{b.OAuth=c(51243).OAuth,b.OAuthEcho=c(51243).OAuthEcho,b.OAuth2=c(1065).OAuth2},18016:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.generalVerify=void 0;let d=c(19317),e=c(14191),f=c(89879);b.generalVerify=async function(a,b,c){if(!(0,f.default)(a))throw new e.JWSInvalid("General JWS must be an object");if(!Array.isArray(a.signatures)||!a.signatures.every(f.default))throw new e.JWSInvalid("JWS Signatures missing or incorrect type");for(let e of a.signatures)try{return await (0,d.flattenedVerify)({header:e.header,payload:a.payload,protected:e.protected,signature:e.signature},b,c)}catch{}throw new e.JWSSignatureVerificationFailed}},19276:(a,b)=>{"use strict";b.A=function(a){return{id:"credentials",name:"Credentials",type:"credentials",credentials:{},authorize:()=>null,options:a}}},19317:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.flattenedVerify=void 0;let d=c(32706),e=c(41361),f=c(14191),g=c(38569),h=c(85016),i=c(89879),j=c(20612),k=c(7706),l=c(54096);b.flattenedVerify=async function(a,b,c){var m;let n,o;if(!(0,i.default)(a))throw new f.JWSInvalid("Flattened JWS must be an object");if(void 0===a.protected&&void 0===a.header)throw new f.JWSInvalid('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==a.protected&&"string"!=typeof a.protected)throw new f.JWSInvalid("JWS Protected Header incorrect type");if(void 0===a.payload)throw new f.JWSInvalid("JWS Payload missing");if("string"!=typeof a.signature)throw new f.JWSInvalid("JWS Signature missing or incorrect type");if(void 0!==a.header&&!(0,i.default)(a.header))throw new f.JWSInvalid("JWS Unprotected Header incorrect type");let p={};if(a.protected)try{let b=(0,d.decode)(a.protected);p=JSON.parse(g.decoder.decode(b))}catch{throw new f.JWSInvalid("JWS Protected Header is invalid")}if(!(0,h.default)(p,a.header))throw new f.JWSInvalid("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let q={...p,...a.header},r=(0,k.default)(f.JWSInvalid,new Map([["b64",!0]]),null==c?void 0:c.crit,p,q),s=!0;if(r.has("b64")&&"boolean"!=typeof(s=p.b64))throw new f.JWSInvalid('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:t}=q;if("string"!=typeof t||!t)throw new f.JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid');let u=c&&(0,l.default)("algorithms",c.algorithms);if(u&&!u.has(t))throw new f.JOSEAlgNotAllowed('"alg" (Algorithm) Header Parameter not allowed');if(s){if("string"!=typeof a.payload)throw new f.JWSInvalid("JWS Payload must be a string")}else if("string"!=typeof a.payload&&!(a.payload instanceof Uint8Array))throw new f.JWSInvalid("JWS Payload must be a string or an Uint8Array instance");let v=!1;"function"==typeof b&&(b=await b(p,a),v=!0),(0,j.default)(t,b,"verify");let w=(0,g.concat)(g.encoder.encode(null!=(m=a.protected)?m:""),g.encoder.encode("."),"string"==typeof a.payload?g.encoder.encode(a.payload):a.payload);try{n=(0,d.decode)(a.signature)}catch{throw new f.JWSInvalid("Failed to base64url decode the signature")}if(!await (0,e.default)(t,b,n,w))throw new f.JWSSignatureVerificationFailed;if(s)try{o=(0,d.decode)(a.payload)}catch{throw new f.JWSInvalid("Failed to base64url decode the payload")}else o="string"==typeof a.payload?g.encoder.encode(a.payload):a.payload;let x={payload:o};return(void 0!==a.protected&&(x.protectedHeader=p),void 0!==a.header&&(x.unprotectedHeader=a.header),v)?{...x,key:b}:x}},20025:a=>{"use strict";a.exports=function(a){a.prototype[Symbol.iterator]=function*(){for(let a=this.head;a;a=a.next)yield a.value}}},20226:(a,b,c)=>{var d=c(67796).default,e=c(1025);a.exports=function(a,b){if(b&&("object"==d(b)||"function"==typeof b))return b;if(void 0!==b)throw TypeError("Derived constructors may only return object or undefined");return e(a)},a.exports.__esModule=!0,a.exports.default=a.exports},20612:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});let d=c(72349),e=c(57944);b.default=(a,b,c)=>{if(a.startsWith("HS")||"dir"===a||a.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(a)){if(!(b instanceof Uint8Array)){if(!(0,e.default)(b))throw TypeError((0,d.withAlg)(a,b,...e.types,"Uint8Array"));if("secret"!==b.type)throw TypeError(`${e.types.join(" or ")} instances for symmetric algorithms must be of type "secret"`)}}else{if(!(0,e.default)(b))throw TypeError((0,d.withAlg)(a,b,...e.types));if("secret"===b.type)throw TypeError(`${e.types.join(" or ")} instances for asymmetric algorithms must not be of type "secret"`);if("sign"===c&&"public"===b.type)throw TypeError(`${e.types.join(" or ")} instances for asymmetric algorithm signing must be of type "private"`);if("decrypt"===c&&"public"===b.type)throw TypeError(`${e.types.join(" or ")} instances for asymmetric algorithm decryption must be of type "private"`);if(b.algorithm&&"verify"===c&&"private"===b.type)throw TypeError(`${e.types.join(" or ")} instances for asymmetric algorithm verifying must be of type "public"`);if(b.algorithm&&"encrypt"===c&&"private"===b.type)throw TypeError(`${e.types.join(" or ")} instances for asymmetric algorithm encryption must be of type "public"`)}}},20729:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.detectOrigin=function(a,b){var c;return(null!=(c=process.env.VERCEL)?c:process.env.AUTH_TRUST_HOST)?`${"http"===b?"http":"https"}://${a}`:process.env.NEXTAUTH_URL}},20997:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.generateSecret=void 0;let d=c(93111);b.generateSecret=async function(a,b){return(0,d.generateSecret)(a,b)}},21238:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});let d=c(14191);b.default=function(a){switch(a){case"HS256":return"sha256";case"HS384":return"sha384";case"HS512":return"sha512";default:throw new d.JOSENotSupported(`alg ${a} is not supported either by JOSE or your javascript runtime`)}}},21825:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.createRemoteJWKSet=void 0;let d=c(75108),e=c(14191),f=c(48944);class g extends f.LocalJWKSet{constructor(a,b){if(super({keys:[]}),this._jwks=void 0,!(a instanceof URL))throw TypeError("url must be an instance of URL");this._url=new URL(a.href),this._options={agent:null==b?void 0:b.agent,headers:null==b?void 0:b.headers},this._timeoutDuration="number"==typeof(null==b?void 0:b.timeoutDuration)?null==b?void 0:b.timeoutDuration:5e3,this._cooldownDuration="number"==typeof(null==b?void 0:b.cooldownDuration)?null==b?void 0:b.cooldownDuration:3e4,this._cacheMaxAge="number"==typeof(null==b?void 0:b.cacheMaxAge)?null==b?void 0:b.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(a,b){this._jwks&&this.fresh()||await this.reload();try{return await super.getKey(a,b)}catch(c){if(c instanceof e.JWKSNoMatchingKey&&!1===this.coolingDown())return await this.reload(),super.getKey(a,b);throw c}}async reload(){this._pendingFetch&&("u">typeof WebSocketPair||"u">typeof navigator&&"Cloudflare-Workers"===navigator.userAgent||"u">typeof EdgeRuntime&&"vercel"===EdgeRuntime)&&(this._pendingFetch=void 0),this._pendingFetch||(this._pendingFetch=(0,d.default)(this._url,this._timeoutDuration,this._options).then(a=>{if(!(0,f.isJWKSLike)(a))throw new e.JWKSInvalid("JSON Web Key Set malformed");this._jwks={keys:a.keys},this._jwksTimestamp=Date.now(),this._pendingFetch=void 0}).catch(a=>{throw this._pendingFetch=void 0,a})),await this._pendingFetch}}b.createRemoteJWKSet=function(a,b){let c=new g(a,b);return async function(a,b){return c.getKey(a,b)}}},21865:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});let d=c(14191);b.default=function(a){if(!(a instanceof Uint8Array)||a.length<8)throw new d.JWEInvalid("PBES2 Salt Input must be 8 or more octets")}},22050:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=h;var d=c(14596),e=c(42138),f=function(a){if(a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var b=g(void 0);if(b&&b.has(a))return b.get(a);var c={__proto__:null},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var e in a)if("default"!==e&&({}).hasOwnProperty.call(a,e)){var f=d?Object.getOwnPropertyDescriptor(a,e):null;f&&(f.get||f.set)?Object.defineProperty(c,e,f):c[e]=a[e]}return c.default=a,b&&b.set(a,c),c}(c(31238));function g(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(g=function(a){return a?c:b})(a)}async function h({options:a,query:b}){var c,g,i;let{logger:j,provider:k}=a,l={};if("string"==typeof k.authorization){let a=Object.fromEntries(new URL(k.authorization).searchParams);l={...l,...a}}else l={...l,...null==(g=k.authorization)?void 0:g.params};if(l={...l,...b},null!=(c=k.version)&&c.startsWith("1.")){let b=(0,e.oAuth1Client)(a),c=await b.getOAuthRequestToken(l),d=`${null==(i=k.authorization)?void 0:i.url}?${new URLSearchParams({oauth_token:c.oauth_token,oauth_token_secret:c.oauth_token_secret,...c.params})}`;return e.oAuth1TokenStore.set(c.oauth_token,c.oauth_token_secret),j.debug("GET_AUTHORIZATION_URL",{url:d,provider:k}),{redirect:d}}let m=await (0,d.openidClient)(a),n=l,o=[];await f.state.create(a,o,n),await f.pkce.create(a,o,n),await f.nonce.create(a,o,n);let p=m.authorizationUrl(n);return j.debug("GET_AUTHORIZATION_URL",{url:p,cookies:o,provider:k}),{redirect:p,cookies:o}}},22585:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.FlattenedEncrypt=b.unprotected=void 0;let d=c(32706),e=c(69539),f=c(84373),g=c(8758),h=c(84496),i=c(14191),j=c(85016),k=c(38569),l=c(7706);b.unprotected=Symbol();class m{constructor(a){if(!(a instanceof Uint8Array))throw TypeError("plaintext must be an instance of Uint8Array");this._plaintext=a}setKeyManagementParameters(a){if(this._keyManagementParameters)throw TypeError("setKeyManagementParameters can only be called once");return this._keyManagementParameters=a,this}setProtectedHeader(a){if(this._protectedHeader)throw TypeError("setProtectedHeader can only be called once");return this._protectedHeader=a,this}setSharedUnprotectedHeader(a){if(this._sharedUnprotectedHeader)throw TypeError("setSharedUnprotectedHeader can only be called once");return this._sharedUnprotectedHeader=a,this}setUnprotectedHeader(a){if(this._unprotectedHeader)throw TypeError("setUnprotectedHeader can only be called once");return this._unprotectedHeader=a,this}setAdditionalAuthenticatedData(a){return this._aad=a,this}setContentEncryptionKey(a){if(this._cek)throw TypeError("setContentEncryptionKey can only be called once");return this._cek=a,this}setInitializationVector(a){if(this._iv)throw TypeError("setInitializationVector can only be called once");return this._iv=a,this}async encrypt(a,c){let m,n,o,p,q,r,s;if(!this._protectedHeader&&!this._unprotectedHeader&&!this._sharedUnprotectedHeader)throw new i.JWEInvalid("either setProtectedHeader, setUnprotectedHeader, or sharedUnprotectedHeader must be called before #encrypt()");if(!(0,j.default)(this._protectedHeader,this._unprotectedHeader,this._sharedUnprotectedHeader))throw new i.JWEInvalid("JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint");let t={...this._protectedHeader,...this._unprotectedHeader,...this._sharedUnprotectedHeader};if((0,l.default)(i.JWEInvalid,new Map,null==c?void 0:c.crit,this._protectedHeader,t),void 0!==t.zip){if(!this._protectedHeader||!this._protectedHeader.zip)throw new i.JWEInvalid('JWE "zip" (Compression Algorithm) Header MUST be integrity protected');if("DEF"!==t.zip)throw new i.JOSENotSupported('Unsupported JWE "zip" (Compression Algorithm) Header Parameter value')}let{alg:u,enc:v}=t;if("string"!=typeof u||!u)throw new i.JWEInvalid('JWE "alg" (Algorithm) Header Parameter missing or invalid');if("string"!=typeof v||!v)throw new i.JWEInvalid('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid');if("dir"===u){if(this._cek)throw TypeError("setContentEncryptionKey cannot be called when using Direct Encryption")}else if("ECDH-ES"===u&&this._cek)throw TypeError("setContentEncryptionKey cannot be called when using Direct Key Agreement");{let d;({cek:n,encryptedKey:m,parameters:d}=await (0,h.default)(u,v,a,this._cek,this._keyManagementParameters)),d&&(c&&b.unprotected in c?this._unprotectedHeader?this._unprotectedHeader={...this._unprotectedHeader,...d}:this.setUnprotectedHeader(d):this._protectedHeader?this._protectedHeader={...this._protectedHeader,...d}:this.setProtectedHeader(d))}if(this._iv||(this._iv=(0,g.default)(v)),p=this._protectedHeader?k.encoder.encode((0,d.encode)(JSON.stringify(this._protectedHeader))):k.encoder.encode(""),this._aad?(q=(0,d.encode)(this._aad),o=(0,k.concat)(p,k.encoder.encode("."),k.encoder.encode(q))):o=p,"DEF"===t.zip){let a=await ((null==c?void 0:c.deflateRaw)||f.deflate)(this._plaintext);({ciphertext:r,tag:s}=await (0,e.default)(v,a,n,this._iv,o))}else({ciphertext:r,tag:s}=await (0,e.default)(v,this._plaintext,n,this._iv,o));let w={ciphertext:(0,d.encode)(r),iv:(0,d.encode)(this._iv),tag:(0,d.encode)(s)};return m&&(w.encrypted_key=(0,d.encode)(m)),q&&(w.aad=q),this._protectedHeader&&(w.protected=k.decoder.decode(p)),this._sharedUnprotectedHeader&&(w.unprotected=this._sharedUnprotectedHeader),this._unprotectedHeader&&(w.header=this._unprotectedHeader),w}}b.FlattenedEncrypt=m},22934:a=>{function b(c){return a.exports=b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},a.exports.__esModule=!0,a.exports.default=a.exports,b(c)}a.exports=b,a.exports.__esModule=!0,a.exports.default=a.exports},23123:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.defaultCallbacks=void 0,b.defaultCallbacks={signIn:()=>!0,redirect:({url:a,baseUrl:b})=>a.startsWith("/")?`${b}${a}`:new URL(a).origin===b?a:b,session:({session:a})=>a,jwt:({token:a})=>a}},24497:(a,b,c)=>{var d=c(67796).default;a.exports=function(a){if(null!=a){var b=a["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],c=0;if(b)return b.call(a);if("function"==typeof a.next)return a;if(!isNaN(a.length))return{next:function(){return a&&c>=a.length&&(a=void 0),{value:a&&a[c++],done:!a}}}}throw TypeError(d(a)+" is not iterable")},a.exports.__esModule=!0,a.exports.default=a.exports},24608:(a,b)=>{"use strict";b.parse=function(a,b){if("string"!=typeof a)throw TypeError("argument str must be a string");var c={},e=a.length;if(e<2)return c;var f=b&&b.decode||k,g=0,h=0,l=0;do{if(-1===(h=a.indexOf("=",g)))break;if(-1===(l=a.indexOf(";",g)))l=e;else if(h>l){g=a.lastIndexOf(";",h-1)+1;continue}var m=i(a,g,h),n=j(a,h,m),o=a.slice(m,n);if(!d.call(c,o)){var p=i(a,h+1,l),q=j(a,l,p);34===a.charCodeAt(p)&&34===a.charCodeAt(q-1)&&(p++,q--);var r=a.slice(p,q);c[o]=function(a,b){try{return b(a)}catch(b){return a}}(r,f)}g=l+1}while(g<e);return c},b.serialize=function(a,b,d){var i=d&&d.encode||encodeURIComponent;if("function"!=typeof i)throw TypeError("option encode is invalid");if(!e.test(a))throw TypeError("argument name is invalid");var j=i(b);if(!f.test(j))throw TypeError("argument val is invalid");var k=a+"="+j;if(!d)return k;if(null!=d.maxAge){var l=Math.floor(d.maxAge);if(!isFinite(l))throw TypeError("option maxAge is invalid");k+="; Max-Age="+l}if(d.domain){if(!g.test(d.domain))throw TypeError("option domain is invalid");k+="; Domain="+d.domain}if(d.path){if(!h.test(d.path))throw TypeError("option path is invalid");k+="; Path="+d.path}if(d.expires){var m,n=d.expires;if(m=n,"[object Date]"!==c.call(m)||isNaN(n.valueOf()))throw TypeError("option expires is invalid");k+="; Expires="+n.toUTCString()}if(d.httpOnly&&(k+="; HttpOnly"),d.secure&&(k+="; Secure"),d.partitioned&&(k+="; Partitioned"),d.priority)switch("string"==typeof d.priority?d.priority.toLowerCase():d.priority){case"low":k+="; Priority=Low";break;case"medium":k+="; Priority=Medium";break;case"high":k+="; Priority=High";break;default:throw TypeError("option priority is invalid")}if(d.sameSite)switch("string"==typeof d.sameSite?d.sameSite.toLowerCase():d.sameSite){case!0:case"strict":k+="; SameSite=Strict";break;case"lax":k+="; SameSite=Lax";break;case"none":k+="; SameSite=None";break;default:throw TypeError("option sameSite is invalid")}return k};var c=Object.prototype.toString,d=Object.prototype.hasOwnProperty,e=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,f=/^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/,g=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,h=/^[\u0020-\u003A\u003D-\u007E]*$/;function i(a,b,c){do{var d=a.charCodeAt(b);if(32!==d&&9!==d)return b}while(++b<c);return c}function j(a,b,c){for(;b>c;){var d=a.charCodeAt(--b);if(32!==d&&9!==d)return b+1}return c}function k(a){return -1!==a.indexOf("%")?decodeURIComponent(a):a}},24866:(a,b,c)=>{let d=c(28354),e=c(55511);a.exports=d.types.isKeyObject||(a=>a&&a instanceof e.KeyObject)},25092:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});let d=c(55511),e=c(28354);b.default=e.types.isKeyObject?a=>e.types.isKeyObject(a):a=>null!=a&&a instanceof d.KeyObject},25958:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.jwtDecrypt=void 0;let d=c(52459),e=c(64377),f=c(14191);b.jwtDecrypt=async function(a,b,c){let g=await (0,d.compactDecrypt)(a,b,c),h=(0,e.default)(g.protectedHeader,g.plaintext,c),{protectedHeader:i}=g;if(void 0!==i.iss&&i.iss!==h.iss)throw new f.JWTClaimValidationFailed('replicated "iss" claim header parameter mismatch',"iss","mismatch");if(void 0!==i.sub&&i.sub!==h.sub)throw new f.JWTClaimValidationFailed('replicated "sub" claim header parameter mismatch',"sub","mismatch");if(void 0!==i.aud&&JSON.stringify(i.aud)!==JSON.stringify(h.aud))throw new f.JWTClaimValidationFailed('replicated "aud" claim header parameter mismatch',"aud","mismatch");let j={payload:h,protectedHeader:i};return"function"==typeof b?{...j,key:g.key}:j}},27871:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.exportJWK=b.exportPKCS8=b.exportSPKI=void 0;let d=c(52345),e=c(52345),f=c(36686);b.exportSPKI=async function(a){return(0,d.toSPKI)(a)},b.exportPKCS8=async function(a){return(0,e.toPKCS8)(a)},b.exportJWK=async function(a){return(0,f.default)(a)}},28583:(a,b,c)=>{let{format:d}=c(28354);class e extends Error{constructor({error_description:a,error:b,error_uri:c,session_state:d,state:e,scope:f},g){super(a?`${b} (${a})`:b),Object.assign(this,{error:b},a&&{error_description:a},c&&{error_uri:c},e&&{state:e},f&&{scope:f},d&&{session_state:d}),g&&Object.defineProperty(this,"response",{value:g}),this.name=this.constructor.name,Error.captureStackTrace(this,this.constructor)}}class f extends Error{constructor(...a){if("string"==typeof a[0])super(d(...a));else{const{message:b,printf:c,response:e,...f}=a[0];c?super(d(...c)):super(b),Object.assign(this,f),e&&Object.defineProperty(this,"response",{value:e})}this.name=this.constructor.name,Error.captureStackTrace(this,this.constructor)}}a.exports={OPError:e,RPError:f}},31093:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.FlattenedSign=void 0;let d=c(32706),e=c(43609),f=c(85016),g=c(14191),h=c(38569),i=c(20612),j=c(7706);class k{constructor(a){if(!(a instanceof Uint8Array))throw TypeError("payload must be an instance of Uint8Array");this._payload=a}setProtectedHeader(a){if(this._protectedHeader)throw TypeError("setProtectedHeader can only be called once");return this._protectedHeader=a,this}setUnprotectedHeader(a){if(this._unprotectedHeader)throw TypeError("setUnprotectedHeader can only be called once");return this._unprotectedHeader=a,this}async sign(a,b){let c;if(!this._protectedHeader&&!this._unprotectedHeader)throw new g.JWSInvalid("either setProtectedHeader or setUnprotectedHeader must be called before #sign()");if(!(0,f.default)(this._protectedHeader,this._unprotectedHeader))throw new g.JWSInvalid("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let k={...this._protectedHeader,...this._unprotectedHeader},l=(0,j.default)(g.JWSInvalid,new Map([["b64",!0]]),null==b?void 0:b.crit,this._protectedHeader,k),m=!0;if(l.has("b64")&&"boolean"!=typeof(m=this._protectedHeader.b64))throw new g.JWSInvalid('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:n}=k;if("string"!=typeof n||!n)throw new g.JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid');(0,i.default)(n,a,"sign");let o=this._payload;m&&(o=h.encoder.encode((0,d.encode)(o))),c=this._protectedHeader?h.encoder.encode((0,d.encode)(JSON.stringify(this._protectedHeader))):h.encoder.encode("");let p=(0,h.concat)(c,h.encoder.encode("."),o),q=await (0,e.default)(n,a,p),r={signature:(0,d.encode)(q),payload:""};return m&&(r.payload=h.decoder.decode(o)),this._unprotectedHeader&&(r.header=this._unprotectedHeader),this._protectedHeader&&(r.protected=h.decoder.decode(c)),r}}b.FlattenedSign=k},31238:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.pkce=b.nonce=b.PKCE_CODE_CHALLENGE_METHOD=void 0,b.signCookie=g,b.state=void 0;var d=c(61922),e=function(a){if(a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var b=f(void 0);if(b&&b.has(a))return b.get(a);var c={__proto__:null},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var e in a)if("default"!==e&&({}).hasOwnProperty.call(a,e)){var g=d?Object.getOwnPropertyDescriptor(a,e):null;g&&(g.get||g.set)?Object.defineProperty(c,e,g):c[e]=a[e]}return c.default=a,b&&b.set(a,c),c}(c(5421));function f(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(f=function(a){return a?c:b})(a)}async function g(a,b,c,d){let{cookies:f,logger:g}=d;g.debug(`CREATE_${a.toUpperCase()}`,{value:b,maxAge:c});let{name:h}=f[a],i=new Date;return i.setTime(i.getTime()+1e3*c),{name:h,value:await e.encode({...d.jwt,maxAge:c,token:{value:b},salt:h}),options:{...f[a].options,expires:i}}}let h=b.PKCE_CODE_CHALLENGE_METHOD="S256";b.pkce={async create(a,b,c){var e,f;if(!(null!=(e=a.provider)&&null!=(e=e.checks)&&e.includes("pkce")))return;let i=d.generators.codeVerifier();c.code_challenge=d.generators.codeChallenge(i),c.code_challenge_method=h;let j=null!=(f=a.cookies.pkceCodeVerifier.options.maxAge)?f:900;b.push(await g("pkceCodeVerifier",i,j,a))},async use(a,b,c,d){var f;if(!(null!=(f=c.provider)&&null!=(f=f.checks)&&f.includes("pkce")))return;let g=null==a?void 0:a[c.cookies.pkceCodeVerifier.name];if(!g)throw TypeError("PKCE code_verifier cookie was missing.");let{name:h}=c.cookies.pkceCodeVerifier,i=await e.decode({...c.jwt,token:g,salt:h});if(!(null!=i&&i.value))throw TypeError("PKCE code_verifier value could not be parsed.");b.push({name:h,value:"",options:{...c.cookies.pkceCodeVerifier.options,maxAge:0}}),d.code_verifier=i.value}},b.state={async create(a,b,c){var e,f;if(!(null!=(e=a.provider.checks)&&e.includes("state")))return;let h=d.generators.state();c.state=h;let i=null!=(f=a.cookies.state.options.maxAge)?f:900;b.push(await g("state",h,i,a))},async use(a,b,c,d){var f;if(!(null!=(f=c.provider.checks)&&f.includes("state")))return;let g=null==a?void 0:a[c.cookies.state.name];if(!g)throw TypeError("State cookie was missing.");let{name:h}=c.cookies.state,i=await e.decode({...c.jwt,token:g,salt:h});if(!(null!=i&&i.value))throw TypeError("State value could not be parsed.");b.push({name:h,value:"",options:{...c.cookies.state.options,maxAge:0}}),d.state=i.value}},b.nonce={async create(a,b,c){var e,f;if(!(null!=(e=a.provider.checks)&&e.includes("nonce")))return;let h=d.generators.nonce();c.nonce=h;let i=null!=(f=a.cookies.nonce.options.maxAge)?f:900;b.push(await g("nonce",h,i,a))},async use(a,b,c,d){var f;if(!(null!=(f=c.provider)&&null!=(f=f.checks)&&f.includes("nonce")))return;let g=null==a?void 0:a[c.cookies.nonce.name];if(!g)throw TypeError("Nonce cookie was missing.");let{name:h}=c.cookies.nonce,i=await e.decode({...c.jwt,token:g,salt:h});if(!(null!=i&&i.value))throw TypeError("Nonce value could not be parsed.");b.push({name:h,value:"",options:{...c.cookies.nonce.options,maxAge:0}}),d.nonce=i.value}}},31347:a=>{a.exports.keystores=new WeakMap},31912:a=>{a.exports=function(a){return a&&a.__esModule?a:{default:a}},a.exports.__esModule=!0,a.exports.default=a.exports},32706:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.decode=b.encode=b.encodeBase64=b.decodeBase64=void 0;let d=c(79428),e=c(38569);d.Buffer.isEncoding("base64url")?b.encode=a=>d.Buffer.from(a).toString("base64url"):b.encode=a=>d.Buffer.from(a).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"),b.decodeBase64=a=>d.Buffer.from(a,"base64"),b.encodeBase64=a=>d.Buffer.from(a).toString("base64"),b.decode=a=>{let b;return d.Buffer.from(((b=a)instanceof Uint8Array&&(b=e.decoder.decode(b)),b),"base64")}},34182:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=c(43354).default},34627:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});let d=c(55511);b.default=(a,b,c,e,f)=>{let g=parseInt(a.substr(3),10)>>3||20,h=(0,d.createHmac)(a,c.byteLength?c:new Uint8Array(g)).update(b).digest(),i=Math.ceil(f/g),j=new Uint8Array(g*i+e.byteLength+1),k=0,l=0;for(let b=1;b<=i;b++)j.set(e,l),j[l+e.byteLength]=b,j.set((0,d.createHmac)(a,h).update(j.subarray(k,l+e.byteLength+1)).digest(),l),k=l,l+=g;return j.slice(0,f)}},34672:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.importJWK=b.importPKCS8=b.importX509=b.importSPKI=void 0;let d=c(32706),e=c(52345),f=c(77032),g=c(14191),h=c(89879);b.importSPKI=async function(a,b,c){if("string"!=typeof a||0!==a.indexOf("-----BEGIN PUBLIC KEY-----"))throw TypeError('"spki" must be SPKI formatted string');return(0,e.fromSPKI)(a,b,c)},b.importX509=async function(a,b,c){if("string"!=typeof a||0!==a.indexOf("-----BEGIN CERTIFICATE-----"))throw TypeError('"x509" must be X.509 formatted string');return(0,e.fromX509)(a,b,c)},b.importPKCS8=async function(a,b,c){if("string"!=typeof a||0!==a.indexOf("-----BEGIN PRIVATE KEY-----"))throw TypeError('"pkcs8" must be PKCS#8 formatted string');return(0,e.fromPKCS8)(a,b,c)},b.importJWK=async function(a,b,c){var e;if(!(0,h.default)(a))throw TypeError("JWK must be an object");switch(b||(b=a.alg),a.kty){case"oct":if("string"!=typeof a.k||!a.k)throw TypeError('missing "k" (Key Value) Parameter value');if(null!=c||(c=!0!==a.ext),c)return(0,f.default)({...a,alg:b,ext:null!=(e=a.ext)&&e});return(0,d.decode)(a.k);case"RSA":if(void 0!==a.oth)throw new g.JOSENotSupported('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');case"EC":case"OKP":return(0,f.default)({...a,alg:b});default:throw new g.JOSENotSupported('Unsupported "kty" (Key Type) Parameter value')}}},34752:a=>{a.exports={assertSigningAlgValuesSupport:function(a,b,c){if(!b[`${a}_endpoint`])return;let d=`${a}_endpoint_auth_method`,e=`${a}_endpoint_auth_signing_alg`,f=`${a}_endpoint_auth_signing_alg_values_supported`;if(c[d]&&c[d].endsWith("_jwt")&&!c[e]&&!b[f])throw TypeError(`${f} must be configured on the issuer if ${e} is not defined on a client`)},assertIssuerConfiguration:function(a,b){if(!a[b])throw TypeError(`${b} must be configured on the issuer`)}}},35243:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.setModulusLength=b.weakMap=void 0,b.weakMap=new WeakMap;let c=(a,b)=>{let d=a.readUInt8(1);if((128&d)==0)return 0===b?d:c(a.subarray(2+d),b-1);let e=127&d;d=0;for(let b=0;b<e;b++)d<<=8,d|=a.readUInt8(2+b);return 0===b?d:c(a.subarray(2+d),b-1)};b.setModulusLength=(a,c)=>{b.weakMap.set(a,c)},b.default=(a,d)=>{if(2048>(a=>{var d,e,f,g;let h;if(b.weakMap.has(a))return b.weakMap.get(a);let i=null!=(e=null==(d=a.asymmetricKeyDetails)?void 0:d.modulusLength)?e:(f=a.export({format:"der",type:"pkcs1"}),g=+("private"===a.type),((128&(h=f.readUInt8(1)))==0?c(f.subarray(2),g):c(f.subarray(2+(127&h)),g))-1<<3);return b.weakMap.set(a,i),i})(a))throw TypeError(`${d} requires key modulusLength to be 2048 bits or larger`)}},35551:(a,b,c)=>{"use strict";function d(a){return{createUser:({id:b,...c})=>a.user.create(e(c)),getUser:b=>a.user.findUnique({where:{id:b}}),getUserByEmail:b=>a.user.findUnique({where:{email:b}}),async getUserByAccount(b){let c=await a.account.findUnique({where:{provider_providerAccountId:b},include:{user:!0}});return c?.user??null},updateUser:({id:b,...c})=>a.user.update({where:{id:b},...e(c)}),deleteUser:b=>a.user.delete({where:{id:b}}),linkAccount:b=>a.account.create({data:b}),unlinkAccount:b=>a.account.delete({where:{provider_providerAccountId:b}}),async getSessionAndUser(b){let c=await a.session.findUnique({where:{sessionToken:b},include:{user:!0}});if(!c)return null;let{user:d,...e}=c;return{user:d,session:e}},createSession:b=>a.session.create(e(b)),updateSession:b=>a.session.update({where:{sessionToken:b.sessionToken},...e(b)}),deleteSession:b=>a.session.delete({where:{sessionToken:b}}),async createVerificationToken(b){let c=await a.verificationToken.create(e(b));return"id"in c&&c.id&&delete c.id,c},async useVerificationToken(b){try{let c=await a.verificationToken.delete({where:{identifier_token:b}});return"id"in c&&c.id&&delete c.id,c}catch(a){if(a&&"object"==typeof a&&"code"in a&&"P2025"===a.code)return null;throw a}},getAccount:async(b,c)=>a.account.findFirst({where:{providerAccountId:b,provider:c}}),createAuthenticator:async b=>a.authenticator.create(e(b)),getAuthenticator:async b=>a.authenticator.findUnique({where:{credentialID:b}}),listAuthenticatorsByUserId:async b=>a.authenticator.findMany({where:{userId:b}}),updateAuthenticatorCounter:async(b,c)=>a.authenticator.update({where:{credentialID:b},data:{counter:c}})}}function e(a){let b={};for(let c in a)void 0!==a[c]&&(b[c]=a[c]);return{data:b}}c.d(b,{y:()=>d})},36633:(a,b,c)=>{var d=c(66139),e=c(83545);a.exports=function(a,b,c,f,g){return new e(d().w(a,b,c,f),g||Promise)},a.exports.__esModule=!0,a.exports.default=a.exports},36673:(a,b,c)=>{"use strict";function d(a){var b=this;if(b instanceof d||(b=new d),b.tail=null,b.head=null,b.length=0,a&&"function"==typeof a.forEach)a.forEach(function(a){b.push(a)});else if(arguments.length>0)for(var c=0,e=arguments.length;c<e;c++)b.push(arguments[c]);return b}function e(a,b,c,d){if(!(this instanceof e))return new e(a,b,c,d);this.list=d,this.value=a,b?(b.next=this,this.prev=b):this.prev=null,c?(c.prev=this,this.next=c):this.next=null}a.exports=d,d.Node=e,d.create=d,d.prototype.removeNode=function(a){if(a.list!==this)throw Error("removing node which does not belong to this list");var b=a.next,c=a.prev;return b&&(b.prev=c),c&&(c.next=b),a===this.head&&(this.head=b),a===this.tail&&(this.tail=c),a.list.length--,a.next=null,a.prev=null,a.list=null,b},d.prototype.unshiftNode=function(a){if(a!==this.head){a.list&&a.list.removeNode(a);var b=this.head;a.list=this,a.next=b,b&&(b.prev=a),this.head=a,this.tail||(this.tail=a),this.length++}},d.prototype.pushNode=function(a){if(a!==this.tail){a.list&&a.list.removeNode(a);var b=this.tail;a.list=this,a.prev=b,b&&(b.next=a),this.tail=a,this.head||(this.head=a),this.length++}},d.prototype.push=function(){for(var a,b,c=0,d=arguments.length;c<d;c++){a=this,b=arguments[c],a.tail=new e(b,a.tail,null,a),a.head||(a.head=a.tail),a.length++}return this.length},d.prototype.unshift=function(){for(var a,b,c=0,d=arguments.length;c<d;c++){a=this,b=arguments[c],a.head=new e(b,null,a.head,a),a.tail||(a.tail=a.head),a.length++}return this.length},d.prototype.pop=function(){if(this.tail){var a=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,a}},d.prototype.shift=function(){if(this.head){var a=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,a}},d.prototype.forEach=function(a,b){b=b||this;for(var c=this.head,d=0;null!==c;d++)a.call(b,c.value,d,this),c=c.next},d.prototype.forEachReverse=function(a,b){b=b||this;for(var c=this.tail,d=this.length-1;null!==c;d--)a.call(b,c.value,d,this),c=c.prev},d.prototype.get=function(a){for(var b=0,c=this.head;null!==c&&b<a;b++)c=c.next;if(b===a&&null!==c)return c.value},d.prototype.getReverse=function(a){for(var b=0,c=this.tail;null!==c&&b<a;b++)c=c.prev;if(b===a&&null!==c)return c.value},d.prototype.map=function(a,b){b=b||this;for(var c=new d,e=this.head;null!==e;)c.push(a.call(b,e.value,this)),e=e.next;return c},d.prototype.mapReverse=function(a,b){b=b||this;for(var c=new d,e=this.tail;null!==e;)c.push(a.call(b,e.value,this)),e=e.prev;return c},d.prototype.reduce=function(a,b){var c,d=this.head;if(arguments.length>1)c=b;else if(this.head)d=this.head.next,c=this.head.value;else throw TypeError("Reduce of empty list with no initial value");for(var e=0;null!==d;e++)c=a(c,d.value,e),d=d.next;return c},d.prototype.reduceReverse=function(a,b){var c,d=this.tail;if(arguments.length>1)c=b;else if(this.tail)d=this.tail.prev,c=this.tail.value;else throw TypeError("Reduce of empty list with no initial value");for(var e=this.length-1;null!==d;e--)c=a(c,d.value,e),d=d.prev;return c},d.prototype.toArray=function(){for(var a=Array(this.length),b=0,c=this.head;null!==c;b++)a[b]=c.value,c=c.next;return a},d.prototype.toArrayReverse=function(){for(var a=Array(this.length),b=0,c=this.tail;null!==c;b++)a[b]=c.value,c=c.prev;return a},d.prototype.slice=function(a,b){(b=b||this.length)<0&&(b+=this.length),(a=a||0)<0&&(a+=this.length);var c=new d;if(b<a||b<0)return c;a<0&&(a=0),b>this.length&&(b=this.length);for(var e=0,f=this.head;null!==f&&e<a;e++)f=f.next;for(;null!==f&&e<b;e++,f=f.next)c.push(f.value);return c},d.prototype.sliceReverse=function(a,b){(b=b||this.length)<0&&(b+=this.length),(a=a||0)<0&&(a+=this.length);var c=new d;if(b<a||b<0)return c;a<0&&(a=0),b>this.length&&(b=this.length);for(var e=this.length,f=this.tail;null!==f&&e>b;e--)f=f.prev;for(;null!==f&&e>a;e--,f=f.prev)c.push(f.value);return c},d.prototype.splice=function(a,b,...c){a>this.length&&(a=this.length-1),a<0&&(a=this.length+a);for(var d=0,f=this.head;null!==f&&d<a;d++)f=f.next;for(var g=[],d=0;f&&d<b;d++)g.push(f.value),f=this.removeNode(f);null===f&&(f=this.tail),f!==this.head&&f!==this.tail&&(f=f.prev);for(var d=0;d<c.length;d++)f=function(a,b,c){var d=b===a.head?new e(c,null,b,a):new e(c,b,b.next,a);return null===d.next&&(a.tail=d),null===d.prev&&(a.head=d),a.length++,d}(this,f,c[d]);return g},d.prototype.reverse=function(){for(var a=this.head,b=this.tail,c=a;null!==c;c=c.prev){var d=c.prev;c.prev=c.next,c.next=d}return this.head=b,this.tail=a,this};try{c(20025)(d)}catch(a){}},36686:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});let d=c(55511),e=c(32706),f=c(83766),g=c(14191),h=c(82996),i=c(63549),j=c(25092),k=c(72349),l=c(57944),m=c(92117),n=a=>{let b;if((0,i.isCryptoKey)(a)){if(!a.extractable)throw TypeError("CryptoKey is not extractable");b=d.KeyObject.from(a)}else if((0,j.default)(a))b=a;else if(a instanceof Uint8Array)return{kty:"oct",k:(0,e.encode)(a)};else throw TypeError((0,k.default)(a,...l.types,"Uint8Array"));if(m.jwkExport){if("secret"!==b.type&&!["rsa","ec","ed25519","x25519","ed448","x448"].includes(b.asymmetricKeyType))throw new g.JOSENotSupported("Unsupported key asymmetricKeyType");return b.export({format:"jwk"})}switch(b.type){case"secret":return{kty:"oct",k:(0,e.encode)(b.export())};case"private":case"public":switch(b.asymmetricKeyType){case"rsa":{let a,c=b.export({format:"der",type:"pkcs1"}),d=new f.default(c);"private"===b.type&&d.unsignedInteger();let g=(0,e.encode)(d.unsignedInteger()),h=(0,e.encode)(d.unsignedInteger());return"private"===b.type&&(a={d:(0,e.encode)(d.unsignedInteger()),p:(0,e.encode)(d.unsignedInteger()),q:(0,e.encode)(d.unsignedInteger()),dp:(0,e.encode)(d.unsignedInteger()),dq:(0,e.encode)(d.unsignedInteger()),qi:(0,e.encode)(d.unsignedInteger())}),d.end(),{kty:"RSA",n:g,e:h,...a}}case"ec":{let a,c,f,i=(0,h.default)(b);switch(i){case"secp256k1":a=64,c=33,f=-1;break;case"P-256":a=64,c=36,f=-1;break;case"P-384":a=96,c=35,f=-3;break;case"P-521":a=132,c=35,f=-3;break;default:throw new g.JOSENotSupported("Unsupported curve")}if("public"===b.type){let c=b.export({type:"spki",format:"der"});return{kty:"EC",crv:i,x:(0,e.encode)(c.subarray(-a,-a/2)),y:(0,e.encode)(c.subarray(-a/2))}}let j=b.export({type:"pkcs8",format:"der"});return j.length<100&&(c+=f),{...n((0,d.createPublicKey)(b)),d:(0,e.encode)(j.subarray(c,c+a/2))}}case"ed25519":case"x25519":{let a=(0,h.default)(b);if("public"===b.type){let c=b.export({type:"spki",format:"der"});return{kty:"OKP",crv:a,x:(0,e.encode)(c.subarray(-32))}}let c=b.export({type:"pkcs8",format:"der"});return{...n((0,d.createPublicKey)(b)),d:(0,e.encode)(c.subarray(-32))}}case"ed448":case"x448":{let a=(0,h.default)(b);if("public"===b.type){let c=b.export({type:"spki",format:"der"});return{kty:"OKP",crv:a,x:(0,e.encode)(c.subarray("Ed448"===a?-57:-56))}}let c=b.export({type:"pkcs8",format:"der"});return{...n((0,d.createPublicKey)(b)),d:(0,e.encode)(c.subarray("Ed448"===a?-57:-56))}}default:throw new g.JOSENotSupported("Unsupported key asymmetricKeyType")}default:throw new g.JOSENotSupported("Unsupported key type")}};b.default=n},37210:a=>{a.exports=globalThis.structuredClone||(a=>JSON.parse(JSON.stringify(a)))},37434:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});let d=c(79428),e=c(14191),f=d.Buffer.from([0]),g=d.Buffer.from([2]),h=d.Buffer.from([3]),i=d.Buffer.from([48]),j=d.Buffer.from([4]),k=a=>{if(a<128)return d.Buffer.from([a]);let b=d.Buffer.alloc(5);b.writeUInt32BE(a,1);let c=1;for(;0===b[c];)c++;return b[c-1]=128|5-c,b.slice(c-1)},l=new Map([["P-256",d.Buffer.from("06 08 2A 86 48 CE 3D 03 01 07".replace(/ /g,""),"hex")],["secp256k1",d.Buffer.from("06 05 2B 81 04 00 0A".replace(/ /g,""),"hex")],["P-384",d.Buffer.from("06 05 2B 81 04 00 22".replace(/ /g,""),"hex")],["P-521",d.Buffer.from("06 05 2B 81 04 00 23".replace(/ /g,""),"hex")],["ecPublicKey",d.Buffer.from("06 07 2A 86 48 CE 3D 02 01".replace(/ /g,""),"hex")],["X25519",d.Buffer.from("06 03 2B 65 6E".replace(/ /g,""),"hex")],["X448",d.Buffer.from("06 03 2B 65 6F".replace(/ /g,""),"hex")],["Ed25519",d.Buffer.from("06 03 2B 65 70".replace(/ /g,""),"hex")],["Ed448",d.Buffer.from("06 03 2B 65 71".replace(/ /g,""),"hex")]]);class m{constructor(){this.length=0,this.elements=[]}oidFor(a){let b=l.get(a);if(!b)throw new e.JOSENotSupported("Invalid or unsupported OID");this.elements.push(b),this.length+=b.length}zero(){this.elements.push(g,d.Buffer.from([1]),f),this.length+=3}one(){this.elements.push(g,d.Buffer.from([1]),d.Buffer.from([1])),this.length+=3}unsignedInteger(a){if(128&a[0]){let b=k(a.length+1);this.elements.push(g,b,f,a),this.length+=2+b.length+a.length}else{let b=0;for(;0===a[b]&&(128&a[b+1])==0;)b++;let c=k(a.length-b);this.elements.push(g,k(a.length-b),a.slice(b)),this.length+=1+c.length+a.length-b}}octStr(a){let b=k(a.length);this.elements.push(j,k(a.length),a),this.length+=1+b.length+a.length}bitStr(a){let b=k(a.length+1);this.elements.push(h,k(a.length+1),f,a),this.length+=1+b.length+a.length+1}add(a){this.elements.push(a),this.length+=a.length}end(a=i){let b=k(this.length);return d.Buffer.concat([a,b,...this.elements],1+b.length+this.length)}}b.default=m},37692:(a,b,c)=>{let d=c(58872),e=c(51575);class f{constructor(a){Object.assign(this,a);const{constructor:b,...c}=Object.getOwnPropertyDescriptors(this.constructor.prototype);Object.defineProperties(this,c)}set expires_in(a){this.expires_at=e()+Number(a)}get expires_in(){return Math.max.apply(null,[this.expires_at-e(),0])}expired(){return 0===this.expires_in}claims(){if(!this.id_token)throw TypeError("id_token not present in TokenSet");return JSON.parse(d.decode(this.id_token.split(".")[1]))}}a.exports=f},38020:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ecdhAllowed=b.generateEpk=b.deriveKey=void 0;let d=c(55511),e=c(28354),f=c(82996),g=c(38569),h=c(14191),i=c(63549),j=c(4888),k=c(25092),l=c(72349),m=c(57944),n=(0,e.promisify)(d.generateKeyPair);b.deriveKey=async function(a,b,c,e,f=new Uint8Array(0),h=new Uint8Array(0)){let n,o;if((0,i.isCryptoKey)(a))(0,j.checkEncCryptoKey)(a,"ECDH"),n=d.KeyObject.from(a);else if((0,k.default)(a))n=a;else throw TypeError((0,l.default)(a,...m.types));if((0,i.isCryptoKey)(b))(0,j.checkEncCryptoKey)(b,"ECDH","deriveBits"),o=d.KeyObject.from(b);else if((0,k.default)(b))o=b;else throw TypeError((0,l.default)(b,...m.types));let p=(0,g.concat)((0,g.lengthAndInput)(g.encoder.encode(c)),(0,g.lengthAndInput)(f),(0,g.lengthAndInput)(h),(0,g.uint32be)(e)),q=(0,d.diffieHellman)({privateKey:o,publicKey:n});return(0,g.concatKdf)(q,e,p)},b.generateEpk=async function(a){let b;if((0,i.isCryptoKey)(a))b=d.KeyObject.from(a);else if((0,k.default)(a))b=a;else throw TypeError((0,l.default)(a,...m.types));switch(b.asymmetricKeyType){case"x25519":return n("x25519");case"x448":return n("x448");case"ec":return n("ec",{namedCurve:(0,f.default)(b)});default:throw new h.JOSENotSupported("Invalid or unsupported EPK")}},b.ecdhAllowed=a=>["P-256","P-384","P-521","X25519","X448"].includes((0,f.default)(a))},38569:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.concatKdf=b.lengthAndInput=b.uint32be=b.uint64be=b.p2s=b.concat=b.decoder=b.encoder=void 0;let d=c(12064);function e(...a){let b=new Uint8Array(a.reduce((a,{length:b})=>a+b,0)),c=0;return a.forEach(a=>{b.set(a,c),c+=a.length}),b}function f(a,b,c){if(b<0||b>=0x100000000)throw RangeError(`value must be >= 0 and <= ${0x100000000-1}. Received ${b}`);a.set([b>>>24,b>>>16,b>>>8,255&b],c)}function g(a){let b=new Uint8Array(4);return f(b,a),b}b.encoder=new TextEncoder,b.decoder=new TextDecoder,b.concat=e,b.p2s=function(a,c){return e(b.encoder.encode(a),new Uint8Array([0]),c)},b.uint64be=function(a){let b=Math.floor(a/0x100000000),c=new Uint8Array(8);return f(c,b,0),f(c,a%0x100000000,4),c},b.uint32be=g,b.lengthAndInput=function(a){return e(g(a.length),a)},b.concatKdf=async function(a,b,c){let e=Math.ceil((b>>3)/32),f=new Uint8Array(32*e);for(let b=0;b<e;b++){let e=new Uint8Array(4+a.length+c.length);e.set(g(b+1)),e.set(a,4),e.set(c,4+a.length),f.set(await (0,d.default)("sha256",e),32*b)}return f.slice(0,b>>3)}},39088:a=>{function b(){try{var c=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(a){}return(a.exports=b=function(){return!!c},a.exports.__esModule=!0,a.exports.default=a.exports)()}a.exports=b,a.exports.__esModule=!0,a.exports.default=a.exports},39154:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=function(a){var b;let c=new URL("http://localhost:3000/api/auth");a&&!a.startsWith("http")&&(a=`https://${a}`);let d=new URL(null!=(b=a)?b:c),e=("/"===d.pathname?c.pathname:d.pathname).replace(/\/$/,""),f=`${d.origin}${e}`;return{origin:d.origin,host:d.host,path:e,base:f,toString:()=>f}}},39644:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0})},39981:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=function(a){let{url:b,providerId:c}=a,f=a.providers.map(({options:a,...c})=>{var f,g;if("oauth"===c.type){let f=e(c),h=e(a,!0),i=null!=(g=null==h?void 0:h.id)?g:c.id;return(0,d.merge)(f,{...h,signinUrl:`${b}/signin/${i}`,callbackUrl:`${b}/callback/${i}`})}let h=null!=(f=null==a?void 0:a.id)?f:c.id;return(0,d.merge)(c,{...a,signinUrl:`${b}/signin/${h}`,callbackUrl:`${b}/callback/${h}`})});return{providers:f,provider:f.find(({id:a})=>a===c)}};var d=c(79113);function e(a,b=!1){var c,d,f,g,h;if(!a)return;let i=Object.entries(a).reduce((a,[b,c])=>{if(["authorization","token","userinfo"].includes(b)&&"string"==typeof c){var d;let e=new URL(c);a[b]={url:`${e.origin}${e.pathname}`,params:Object.fromEntries(null!=(d=e.searchParams)?d:[])}}else a[b]=c;return a},{});return b||null!=(c=i.version)&&c.startsWith("1.")||(i.idToken=!!(null!=(d=null!=(f=i.idToken)?f:null==(g=i.wellKnown)?void 0:g.includes("openid-configuration"))?d:null==(h=i.authorization)||null==(h=h.params)||null==(h=h.scope)?void 0:h.includes("openid")),i.checks||(i.checks=["state"])),i}},41361:(a,b,c)=>{"use strict";let d;Object.defineProperty(b,"__esModule",{value:!0});let e=c(55511),f=c(28354),g=c(84749),h=c(51136),i=c(43609),j=c(15398),k=c(92117);d=e.verify.length>4&&k.oneShotCallback?(0,f.promisify)(e.verify):e.verify,b.default=async(a,b,c,f)=>{let k=(0,j.default)(a,b,"verify");if(a.startsWith("HS")){let b=await (0,i.default)(a,k,f);try{return e.timingSafeEqual(c,b)}catch{return!1}}let l=(0,g.default)(a),m=(0,h.default)(a,k);try{return await d(l,f,m,c)}catch{return!1}}},41618:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=b.hkdf=void 0;let d=c(68586);function e(a,b){if("string"==typeof a)return new TextEncoder().encode(a);if(!(a instanceof Uint8Array))throw TypeError(`"${b}"" must be an instance of Uint8Array or a string`);return a}async function f(a,b,c,f,g){return(0,d.default)(function(a){switch(a){case"sha256":case"sha384":case"sha512":case"sha1":return a;default:throw TypeError('unsupported "digest" value')}}(a),function(a){let b=e(a,"ikm");if(!b.byteLength)throw TypeError('"ikm" must be at least one byte in length');return b}(b),e(c,"salt"),function(a){let b=e(a,"info");if(b.byteLength>1024)throw TypeError('"info" must not contain more than 1024 bytes');return b}(f),function(a,b){if("number"!=typeof a||!Number.isInteger(a)||a<1)throw TypeError('"keylen" must be a positive integer');if(a>255*(parseInt(b.substr(3),10)>>3||20))throw TypeError('"keylen" too large');return a}(g,a))}b.hkdf=f,b.default=f},41882:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});let d=c(14191),e=c(8758);b.default=(a,b)=>{if(b.length<<3!==(0,e.bitLength)(a))throw new d.JWEInvalid("Invalid Initialization Vector length")}},42138:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.oAuth1Client=function(a){var b,c;let e=a.provider,f=new d.OAuth(e.requestTokenUrl,e.accessTokenUrl,e.clientId,e.clientSecret,null!=(b=e.version)?b:"1.0",e.callbackUrl,null!=(c=e.encoding)?c:"HMAC-SHA1"),g=f.get.bind(f);f.get=async(...a)=>await new Promise((b,c)=>{g(...a,(a,d)=>{if(a)return c(a);b(d)})});let h=f.getOAuthAccessToken.bind(f);f.getOAuthAccessToken=async(...a)=>await new Promise((b,c)=>{h(...a,(a,d,e)=>{if(a)return c(a);b({oauth_token:d,oauth_token_secret:e})})});let i=f.getOAuthRequestToken.bind(f);return f.getOAuthRequestToken=async(a={})=>await new Promise((b,c)=>{i(a,(a,d,e,f)=>{if(a)return c(a);b({oauth_token:d,oauth_token_secret:e,params:f})})}),f},b.oAuth1TokenStore=void 0;var d=c(17600);b.oAuth1TokenStore=new Map},42828:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=function(a){return{headers:[{key:"Content-Type",value:"application/json"}],body:a.reduce((a,{id:b,name:c,type:d,signinUrl:e,callbackUrl:f})=>(a[b]={id:b,name:c,type:d,signinUrl:e,callbackUrl:f},a),{})}}},43101:(a,b,c)=>{"use strict";var d=c(31912);Object.defineProperty(b,"__esModule",{value:!0}),b.init=r;var e=c(55511),f=d(c(17149)),g=c(86460),h=d(c(39981)),i=c(60434),j=q(c(8137)),k=q(c(5421)),l=c(23123),m=c(56049),n=c(85664),o=d(c(39154));function p(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(p=function(a){return a?c:b})(a)}function q(a,b){if(!b&&a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var c=p(b);if(c&&c.has(a))return c.get(a);var d={__proto__:null},e=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in a)if("default"!==f&&({}).hasOwnProperty.call(a,f)){var g=e?Object.getOwnPropertyDescriptor(a,f):null;g&&(g.get||g.set)?Object.defineProperty(d,f,g):d[f]=a[f]}return d.default=a,c&&c.set(a,d),d}async function r({authOptions:a,providerId:b,action:c,origin:d,cookies:p,callbackUrl:q,csrfToken:s,isPost:t}){var u,v;let w=(0,o.default)(d),x=(0,i.createSecret)({authOptions:a,url:w}),{providers:y,provider:z}=(0,h.default)({providers:a.providers,url:w,providerId:b}),A={debug:!1,pages:{},theme:{colorScheme:"auto",logo:"",brandColor:"",buttonText:""},...a,url:w,action:c,provider:z,cookies:{...j.defaultCookies(null!=(u=a.useSecureCookies)?u:w.base.startsWith("https://")),...a.cookies},secret:x,providers:y,session:{strategy:a.adapter?"database":"jwt",maxAge:2592e3,updateAge:86400,generateSessionToken:()=>{var a;return null!=(a=null===e.randomUUID||void 0===e.randomUUID?void 0:(0,e.randomUUID)())?a:(0,e.randomBytes)(32).toString("hex")},...a.session},jwt:{secret:x,maxAge:2592e3,encode:k.encode,decode:k.decode,...a.jwt},events:(0,g.eventsErrorHandler)(null!=(v=a.events)?v:{},f.default),adapter:(0,g.adapterErrorHandler)(a.adapter,f.default),callbacks:{...l.defaultCallbacks,...a.callbacks},logger:f.default,callbackUrl:w.origin},B=[],{csrfToken:C,cookie:D,csrfTokenVerified:E}=(0,m.createCSRFToken)({options:A,cookieValue:null==p?void 0:p[A.cookies.csrfToken.name],isPost:t,bodyValue:s});A.csrfToken=C,A.csrfTokenVerified=E,D&&B.push({name:A.cookies.csrfToken.name,value:D,options:A.cookies.csrfToken.options});let{callbackUrl:F,callbackUrlCookie:G}=await (0,n.createCallbackUrl)({options:A,cookieValue:null==p?void 0:p[A.cookies.callbackUrl.name],paramValue:q});return A.callbackUrl=F,G&&B.push({name:A.cookies.callbackUrl.name,value:G,options:A.cookies.callbackUrl.options}),{options:A,cookies:B}}},43354:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default="node:crypto"},43609:(a,b,c)=>{"use strict";let d;Object.defineProperty(b,"__esModule",{value:!0});let e=c(55511),f=c(28354),g=c(84749),h=c(21238),i=c(51136),j=c(15398);d=e.sign.length>3?(0,f.promisify)(e.sign):e.sign,b.default=async(a,b,c)=>{let f=(0,j.default)(a,b,"sign");if(a.startsWith("HS")){let b=e.createHmac((0,h.default)(a),f);return b.update(c),b.digest()}return d((0,g.default)(a),c,(0,i.default)(a,f))}},46217:(a,b)=>{"use strict";async function c(a){var b,c;let{options:d,sessionStore:e}=a,{adapter:f,events:g,jwt:h,callbackUrl:i,logger:j,session:k}=d,l=null==e?void 0:e.value;if(!l)return{redirect:i};if("jwt"===k.strategy)try{let a=await h.decode({...h,token:l});await (null==(b=g.signOut)?void 0:b.call(g,{token:a}))}catch(a){j.error("SIGNOUT_ERROR",a)}else try{let a=await f.deleteSession(l);await (null==(c=g.signOut)?void 0:c.call(g,{session:a}))}catch(a){j.error("SIGNOUT_ERROR",a)}return{redirect:i,cookies:e.clean()}}Object.defineProperty(b,"__esModule",{value:!0}),b.default=c},46486:(a,b,c)=>{"use strict";let d;Object.defineProperty(b,"__esModule",{value:!0});let e=c(55511);b.default=a=>(d||(d=new Set((0,e.getCiphers)())),d.has(a))},46855:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});let d=c(14191),e=c(25092);b.default=(a,b)=>{let c;switch(a){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":c=parseInt(a.slice(-3),10);break;case"A128GCM":case"A192GCM":case"A256GCM":c=parseInt(a.slice(1,4),10);break;default:throw new d.JOSENotSupported(`Content Encryption Algorithm ${a} is not supported either by JOSE or your javascript runtime`)}if(b instanceof Uint8Array){let a=b.byteLength<<3;if(a!==c)throw new d.JWEInvalid(`Invalid Content Encryption Key length. Expected ${c} bits, got ${a} bits`);return}if((0,e.default)(b)&&"secret"===b.type){let a=b.symmetricKeySize<<3;if(a!==c)throw new d.JWEInvalid(`Invalid Content Encryption Key length. Expected ${c} bits, got ${a} bits`);return}throw TypeError("Invalid Content Encryption Key type")}},46982:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.EmbeddedJWK=void 0;let d=c(34672),e=c(89879),f=c(14191);b.EmbeddedJWK=async function(a,b){let c={...a,...null==b?void 0:b.header};if(!(0,e.default)(c.jwk))throw new f.JWSInvalid('"jwk" (JSON Web Key) Header Parameter must be a JSON object');let g=await (0,d.importJWK)({...c.jwk,ext:!0},c.alg,!0);if(g instanceof Uint8Array||"public"!==g.type)throw new f.JWSInvalid('"jwk" (JSON Web Key) Header Parameter must be a public key');return g}},48487:(a,b,c)=>{let{STATUS_CODES:d}=c(81630),{format:e}=c(28354),{OPError:f}=c(28583),g=c(79789);a.exports=function(a,{statusCode:b=200,body:c=!0,bearer:h=!1}={}){if(a.statusCode!==b){if(h&&(a=>{let b=g(a.headers["www-authenticate"]);if(b.error)throw new f(b,a)})(a),(a=>{let b=!1;try{let c;c="object"!=typeof a.body||Buffer.isBuffer(a.body)?JSON.parse(a.body):a.body,(b="string"==typeof c.error&&c.error.length)&&Object.defineProperty(a,"body",{value:c,configurable:!0})}catch(a){}return b})(a))throw new f(a.body,a);throw new f({error:e("expected %i %s, got: %i %s",b,d[b],a.statusCode,d[a.statusCode])},a)}if(c&&!a.body)throw new f({error:e("expected %i %s with body but no body was returned",b,d[b])},a);return a.body}},48944:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.createLocalJWKSet=b.LocalJWKSet=b.isJWKSLike=void 0;let d=c(34672),e=c(14191),f=c(89879);function g(a){return a&&"object"==typeof a&&Array.isArray(a.keys)&&a.keys.every(h)}function h(a){return(0,f.default)(a)}b.isJWKSLike=g;class i{constructor(a){if(this._cached=new WeakMap,!g(a))throw new e.JWKSInvalid("JSON Web Key Set malformed");this._jwks=function(a){return"function"==typeof structuredClone?structuredClone(a):JSON.parse(JSON.stringify(a))}(a)}async getKey(a,b){let{alg:c,kid:d}={...a,...null==b?void 0:b.header},f=function(a){switch("string"==typeof a&&a.slice(0,2)){case"RS":case"PS":return"RSA";case"ES":return"EC";case"Ed":return"OKP";default:throw new e.JOSENotSupported('Unsupported "alg" value for a JSON Web Key Set')}}(c),g=this._jwks.keys.filter(a=>{let b=f===a.kty;if(b&&"string"==typeof d&&(b=d===a.kid),b&&"string"==typeof a.alg&&(b=c===a.alg),b&&"string"==typeof a.use&&(b="sig"===a.use),b&&Array.isArray(a.key_ops)&&(b=a.key_ops.includes("verify")),b&&"EdDSA"===c&&(b="Ed25519"===a.crv||"Ed448"===a.crv),b)switch(c){case"ES256":b="P-256"===a.crv;break;case"ES256K":b="secp256k1"===a.crv;break;case"ES384":b="P-384"===a.crv;break;case"ES512":b="P-521"===a.crv}return b}),{0:h,length:i}=g;if(0===i)throw new e.JWKSNoMatchingKey;if(1!==i){let a=new e.JWKSMultipleMatchingKeys,{_cached:b}=this;throw a[Symbol.asyncIterator]=async function*(){for(let a of g)try{yield await j(b,a,c)}catch{continue}},a}return j(this._cached,h,c)}}async function j(a,b,c){let f=a.get(b)||a.set(b,{}).get(b);if(void 0===f[c]){let a=await (0,d.importJWK)({...b,ext:!0},c);if(a instanceof Uint8Array||"public"!==a.type)throw new e.JWKSInvalid("JSON Web Key Set members must be public keys");f[c]=a}return f[c]}b.LocalJWKSet=i,b.createLocalJWKSet=function(a){let b=new i(a);return async function(a,c){return b.getKey(a,c)}}},49800:(a,b,c)=>{"use strict";var d=c(31912);Object.defineProperty(b,"__esModule",{value:!0}),b.default=function(a){var b;let{csrfToken:c,providers:d,callbackUrl:h,theme:i,email:j,error:k}=a,l=d.filter(a=>"oauth"===a.type||"email"===a.type||"credentials"===a.type&&!!a.credentials);"u">typeof document&&i.buttonText&&document.documentElement.style.setProperty("--button-text-color",i.buttonText),"u">typeof document&&i.brandColor&&document.documentElement.style.setProperty("--brand-color",i.brandColor);let m={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."},n=k&&(null!=(b=m[k])?b:m.default),o="https://authjs.dev/img/providers";return(0,e.h)("div",{className:"signin"},i.brandColor&&(0,e.h)("style",{dangerouslySetInnerHTML:{__html:`
1
+ exports.id=902,exports.ids=[902],exports.modules={1025:a=>{a.exports=function(a){if(void 0===a)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return a},a.exports.__esModule=!0,a.exports.default=a.exports},1065:(a,b,c)=>{var d=c(11723),e=(c(55511),c(55591)),f=c(81630),g=c(79551),h=c(69268);b.OAuth2=function(a,b,c,d,e,f){this._clientId=a,this._clientSecret=b,this._baseSite=c,this._authorizeUrl=d||"/oauth/authorize",this._accessTokenUrl=e||"/oauth/access_token",this._accessTokenName="access_token",this._authMethod="Bearer",this._customHeaders=f||{},this._useAuthorizationHeaderForGET=!1,this._agent=void 0},b.OAuth2.prototype.setAgent=function(a){this._agent=a},b.OAuth2.prototype.setAccessTokenName=function(a){this._accessTokenName=a},b.OAuth2.prototype.setAuthMethod=function(a){this._authMethod=a},b.OAuth2.prototype.useAuthorizationHeaderforGET=function(a){this._useAuthorizationHeaderForGET=a},b.OAuth2.prototype._getAccessTokenUrl=function(){return this._baseSite+this._accessTokenUrl},b.OAuth2.prototype.buildAuthHeader=function(a){return this._authMethod+" "+a},b.OAuth2.prototype._chooseHttpLibrary=function(a){var b=e;return"https:"!=a.protocol&&(b=f),b},b.OAuth2.prototype._request=function(a,b,c,e,f,h){var i=g.parse(b,!0);"https:"!=i.protocol||i.port||(i.port=443);var j=this._chooseHttpLibrary(i),k={};for(var l in this._customHeaders)k[l]=this._customHeaders[l];if(c)for(var l in c)k[l]=c[l];k.Host=i.host,k["User-Agent"]||(k["User-Agent"]="Node-oauth"),e?Buffer.isBuffer(e)?k["Content-Length"]=e.length:k["Content-Length"]=Buffer.byteLength(e):k["Content-length"]=0,!f||"Authorization"in k||(i.query||(i.query={}),i.query[this._accessTokenName]=f);var m=d.stringify(i.query);m&&(m="?"+m);var n={host:i.hostname,port:i.port,path:i.pathname+m,method:a,headers:k};this._executeRequest(j,n,e,h)},b.OAuth2.prototype._executeRequest=function(a,b,c,d){var e=h.isAnEarlyCloseHost(b.host),f=!1;function g(a,b){f||(f=!0,a.statusCode>=200&&a.statusCode<=299||301==a.statusCode||302==a.statusCode?d(null,b,a):d({statusCode:a.statusCode,data:b}))}var i="";this._agent&&(b.agent=this._agent);var j=a.request(b);j.on("response",function(a){a.on("data",function(a){i+=a}),a.on("close",function(b){e&&g(a,i)}),a.addListener("end",function(){g(a,i)})}),j.on("error",function(a){f=!0,d(a)}),("POST"==b.method||"PUT"==b.method)&&c&&j.write(c),j.end()},b.OAuth2.prototype.getAuthorizeUrl=function(a){var a=a||{};return a.client_id=this._clientId,this._baseSite+this._authorizeUrl+"?"+d.stringify(a)},b.OAuth2.prototype.getOAuthAccessToken=function(a,b,c){var b=b||{};b.client_id=this._clientId,b.client_secret=this._clientSecret;var e="refresh_token"===b.grant_type?"refresh_token":"code";b[e]=a;var f=d.stringify(b);this._request("POST",this._getAccessTokenUrl(),{"Content-Type":"application/x-www-form-urlencoded"},f,null,function(a,b,e){if(a)c(a);else{try{f=JSON.parse(b)}catch(a){f=d.parse(b)}var f,g=f.access_token,h=f.refresh_token;delete f.refresh_token,c(null,g,h,f)}})},b.OAuth2.prototype.getProtectedResource=function(a,b,c){this._request("GET",a,{},"",b,c)},b.OAuth2.prototype.get=function(a,b,c){if(this._useAuthorizationHeaderForGET){var d={Authorization:this.buildAuthHeader(b)};b=null}else d={};this._request("GET",a,d,"",b,c)}},1293:(a,b,c)=>{var d=c(2826);a.exports=function(a,b){if("function"!=typeof b&&null!==b)throw TypeError("Super expression must either be null or a function");a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),b&&d(a,b)},a.exports.__esModule=!0,a.exports.default=a.exports},2826:a=>{function b(c,d){return a.exports=b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,b){return a.__proto__=b,a},a.exports.__esModule=!0,a.exports.default=a.exports,b(c,d)}a.exports=b,a.exports.__esModule=!0,a.exports.default=a.exports},3410:(a,b,c)=>{var d=c(85407)();a.exports=d;try{regeneratorRuntime=d}catch(a){"object"==typeof globalThis?globalThis.regeneratorRuntime=d:Function("r","regeneratorRuntime = r")(d)}},4861:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=f;var d=c(86460),e=c(60434);async function f(a){var b,c,f,g,h,i;let{sessionToken:j,profile:k,account:l,options:m}=a;if(!(null!=l&&l.providerAccountId)||!l.type)throw Error("Missing or invalid provider account");if(!["email","oauth"].includes(l.type))throw Error("Provider not supported");let{adapter:n,jwt:o,events:p,session:{strategy:q,generateSessionToken:r}}=m;if(!n)return{user:k,account:l};let{createUser:s,updateUser:t,getUser:u,getUserByAccount:v,getUserByEmail:w,linkAccount:x,createSession:y,getSessionAndUser:z,deleteSession:A}=n,B=null,C=null,D=!1,E="jwt"===q;if(j)if(E)try{(B=await o.decode({...o,token:j}))&&"sub"in B&&B.sub&&(C=await u(B.sub))}catch(a){}else{let a=await z(j);a&&(B=a.session,C=a.user)}if("email"===l.type){let a=await w(k.email);if(a)(null==(b=C)?void 0:b.id)!==a.id&&!E&&j&&await A(j),C=await t({id:a.id,emailVerified:new Date}),await (null==(c=p.updateUser)?void 0:c.call(p,{user:C}));else{let{id:a,...b}={...k,emailVerified:new Date};C=await s(b),await (null==(f=p.createUser)?void 0:f.call(p,{user:C})),D=!0}return{session:B=E?{}:await y({sessionToken:await r(),userId:C.id,expires:(0,e.fromDate)(m.session.maxAge)}),user:C,isNewUser:D}}if("oauth"===l.type){let a=await v({providerAccountId:l.providerAccountId,provider:l.provider});if(a){if(C){if(a.id===C.id)return{session:B,user:C,isNewUser:D};throw new d.AccountNotLinkedError("The account is already associated with another user")}return{session:B=E?{}:await y({sessionToken:await r(),userId:a.id,expires:(0,e.fromDate)(m.session.maxAge)}),user:a,isNewUser:D}}{if(C)return await x({...l,userId:C.id}),await (null==(i=p.linkAccount)?void 0:i.call(p,{user:C,account:l,profile:k})),{session:B,user:C,isNewUser:D};let a=k.email?await w(k.email):null;if(a){let b=m.provider;if(null!=b&&b.allowDangerousEmailAccountLinking)C=a;else throw new d.AccountNotLinkedError("Another account already exists with the same e-mail address")}else{let{id:a,...b}={...k,emailVerified:null};C=await s(b)}return await (null==(g=p.createUser)?void 0:g.call(p,{user:C})),await x({...l,userId:C.id}),await (null==(h=p.linkAccount)?void 0:h.call(p,{user:C,account:l,profile:k})),{session:B=E?{}:await y({sessionToken:await r(),userId:C.id,expires:(0,e.fromDate)(m.session.maxAge)}),user:C,isNewUser:!0}}}throw Error("Unsupported account type")}},4888:(a,b)=>{"use strict";function c(a,b="algorithm.name"){return TypeError(`CryptoKey does not support this operation, its ${b} must be ${a}`)}function d(a,b){return a.name===b}function e(a){return parseInt(a.name.slice(4),10)}function f(a,b){if(b.length&&!b.some(b=>a.usages.includes(b))){let a="CryptoKey does not support this operation, its usages must include ";if(b.length>2){let c=b.pop();a+=`one of ${b.join(", ")}, or ${c}.`}else 2===b.length?a+=`one of ${b[0]} or ${b[1]}.`:a+=`${b[0]}.`;throw TypeError(a)}}Object.defineProperty(b,"__esModule",{value:!0}),b.checkEncCryptoKey=b.checkSigCryptoKey=void 0,b.checkSigCryptoKey=function(a,b,...g){switch(b){case"HS256":case"HS384":case"HS512":{if(!d(a.algorithm,"HMAC"))throw c("HMAC");let f=parseInt(b.slice(2),10);if(e(a.algorithm.hash)!==f)throw c(`SHA-${f}`,"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!d(a.algorithm,"RSASSA-PKCS1-v1_5"))throw c("RSASSA-PKCS1-v1_5");let f=parseInt(b.slice(2),10);if(e(a.algorithm.hash)!==f)throw c(`SHA-${f}`,"algorithm.hash");break}case"PS256":case"PS384":case"PS512":{if(!d(a.algorithm,"RSA-PSS"))throw c("RSA-PSS");let f=parseInt(b.slice(2),10);if(e(a.algorithm.hash)!==f)throw c(`SHA-${f}`,"algorithm.hash");break}case"EdDSA":if("Ed25519"!==a.algorithm.name&&"Ed448"!==a.algorithm.name)throw c("Ed25519 or Ed448");break;case"ES256":case"ES384":case"ES512":{if(!d(a.algorithm,"ECDSA"))throw c("ECDSA");let e=function(a){switch(a){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw Error("unreachable")}}(b);if(a.algorithm.namedCurve!==e)throw c(e,"algorithm.namedCurve");break}default:throw TypeError("CryptoKey does not support this operation")}f(a,g)},b.checkEncCryptoKey=function(a,b,...g){switch(b){case"A128GCM":case"A192GCM":case"A256GCM":{if(!d(a.algorithm,"AES-GCM"))throw c("AES-GCM");let e=parseInt(b.slice(1,4),10);if(a.algorithm.length!==e)throw c(e,"algorithm.length");break}case"A128KW":case"A192KW":case"A256KW":{if(!d(a.algorithm,"AES-KW"))throw c("AES-KW");let e=parseInt(b.slice(1,4),10);if(a.algorithm.length!==e)throw c(e,"algorithm.length");break}case"ECDH":switch(a.algorithm.name){case"ECDH":case"X25519":case"X448":break;default:throw c("ECDH, X25519, or X448")}break;case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":if(!d(a.algorithm,"PBKDF2"))throw c("PBKDF2");break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":{if(!d(a.algorithm,"RSA-OAEP"))throw c("RSA-OAEP");let f=parseInt(b.slice(9),10)||1;if(e(a.algorithm.hash)!==f)throw c(`SHA-${f}`,"algorithm.hash");break}default:throw TypeError("CryptoKey does not support this operation")}f(a,g)}},5178:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.jwtVerify=void 0;let d=c(12115),e=c(64377),f=c(14191);b.jwtVerify=async function(a,b,c){var g;let h=await (0,d.compactVerify)(a,b,c);if((null==(g=h.protectedHeader.crit)?void 0:g.includes("b64"))&&!1===h.protectedHeader.b64)throw new f.JWTInvalid("JWTs MUST NOT use unencoded payload");let i={payload:(0,e.default)(h.protectedHeader,h.payload,c),protectedHeader:h.protectedHeader};return"function"==typeof b?{...i,key:h.key}:i}},5421:(a,b,c)=>{"use strict";var d=c(31912);Object.defineProperty(b,"__esModule",{value:!0});var e={encode:!0,decode:!0,getToken:!0};b.decode=l,b.encode=k,b.getToken=m;var f=c(93189),g=d(c(41618)),h=c(86845),i=c(8137),j=c(39644);async function k(a){let{token:b={},secret:c,maxAge:d=2592e3,salt:e=""}=a,g=await n(c,e);return await new f.EncryptJWT(b).setProtectedHeader({alg:"dir",enc:"A256GCM"}).setIssuedAt().setExpirationTime((Date.now()/1e3|0)+d).setJti((0,h.v4)()).encrypt(g)}async function l(a){let{token:b,secret:c,salt:d=""}=a;if(!b)return null;let e=await n(c,d),{payload:g}=await (0,f.jwtDecrypt)(b,e,{clockTolerance:15});return g}async function m(a){var b,c,d,e;let{req:f,secureCookie:g=null!=(b=null==(c=process.env.NEXTAUTH_URL)?void 0:c.startsWith("https://"))?b:!!process.env.VERCEL,cookieName:h=g?"__Secure-next-auth.session-token":"next-auth.session-token",raw:j,decode:k=l,logger:m=console,secret:n=null!=(d=process.env.NEXTAUTH_SECRET)?d:process.env.AUTH_SECRET}=a;if(!f)throw Error("Must pass `req` to JWT getToken()");let o=new i.SessionStore({name:h,options:{secure:g}},{cookies:f.cookies,headers:f.headers},m).value,p=f.headers instanceof Headers?f.headers.get("authorization"):null==(e=f.headers)?void 0:e.authorization;if(o||(null==p?void 0:p.split(" ")[0])!=="Bearer"||(o=decodeURIComponent(p.split(" ")[1])),!o)return null;if(j)return o;try{return await k({token:o,secret:n})}catch(a){return null}}async function n(a,b){return await (0,g.default)("sha256",a,b,`NextAuth.js Generated Encryption Key${b?` (${b})`:""}`,32)}Object.keys(j).forEach(function(a){"default"===a||"__esModule"===a||Object.prototype.hasOwnProperty.call(e,a)||a in b&&b[a]===j[a]||Object.defineProperty(b,a,{enumerable:!0,get:function(){return j[a]}})})},5996:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=a=>Math.floor(a.getTime()/1e3)},7040:(a,b,c)=>{a.exports=c(85208).default},7326:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.EncryptJWT=void 0;let d=c(12831),e=c(38569),f=c(14111);class g extends f.ProduceJWT{setProtectedHeader(a){if(this._protectedHeader)throw TypeError("setProtectedHeader can only be called once");return this._protectedHeader=a,this}setKeyManagementParameters(a){if(this._keyManagementParameters)throw TypeError("setKeyManagementParameters can only be called once");return this._keyManagementParameters=a,this}setContentEncryptionKey(a){if(this._cek)throw TypeError("setContentEncryptionKey can only be called once");return this._cek=a,this}setInitializationVector(a){if(this._iv)throw TypeError("setInitializationVector can only be called once");return this._iv=a,this}replicateIssuerAsHeader(){return this._replicateIssuerAsHeader=!0,this}replicateSubjectAsHeader(){return this._replicateSubjectAsHeader=!0,this}replicateAudienceAsHeader(){return this._replicateAudienceAsHeader=!0,this}async encrypt(a,b){let c=new d.CompactEncrypt(e.encoder.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}),c.setProtectedHeader(this._protectedHeader),this._iv&&c.setInitializationVector(this._iv),this._cek&&c.setContentEncryptionKey(this._cek),this._keyManagementParameters&&c.setKeyManagementParameters(this._keyManagementParameters),c.encrypt(a,b)}}b.EncryptJWT=g},7435:(a,b)=>{function c(a){for(var b,c,d="",e=-1;++e<a.length;)b=a.charCodeAt(e),c=e+1<a.length?a.charCodeAt(e+1):0,55296<=b&&b<=56319&&56320<=c&&c<=57343&&(b=65536+((1023&b)<<10)+(1023&c),e++),b<=127?d+=String.fromCharCode(b):b<=2047?d+=String.fromCharCode(192|b>>>6&31,128|63&b):b<=65535?d+=String.fromCharCode(224|b>>>12&15,128|b>>>6&63,128|63&b):b<=2097151&&(d+=String.fromCharCode(240|b>>>18&7,128|b>>>12&63,128|b>>>6&63,128|63&b));return d}function d(a){for(var b=Array(a.length>>2),c=0;c<b.length;c++)b[c]=0;for(var c=0;c<8*a.length;c+=8)b[c>>5]|=(255&a.charCodeAt(c/8))<<24-c%32;return b}function e(a,b){a[b>>5]|=128<<24-b%32,a[(b+64>>9<<4)+15]=b;for(var c=Array(80),d=0x67452301,e=-0x10325477,h=-0x67452302,i=0x10325476,j=-0x3c2d1e10,k=0;k<a.length;k+=16){for(var l=d,m=e,n=h,o=i,p=j,q=0;q<80;q++){q<16?c[q]=a[k+q]:c[q]=g(c[q-3]^c[q-8]^c[q-14]^c[q-16],1);var r,s,t,u,v,w=f(f(g(d,5),(r=q,s=e,t=h,u=i,r<20?s&t|~s&u:r<40?s^t^u:r<60?s&t|s&u|t&u:s^t^u)),f(f(j,c[q]),(v=q)<20?0x5a827999:v<40?0x6ed9eba1:v<60?-0x70e44324:-0x359d3e2a));j=i,i=h,h=g(e,30),e=d,d=w}d=f(d,l),e=f(e,m),h=f(h,n),i=f(i,o),j=f(j,p)}return[d,e,h,i,j]}function f(a,b){var c=(65535&a)+(65535&b);return(a>>16)+(b>>16)+(c>>16)<<16|65535&c}function g(a,b){return a<<b|a>>>32-b}b.HMACSHA1=function(a,b){return function(a){for(var b="",c=a.length,d=0;d<c;d+=3)for(var e=a.charCodeAt(d)<<16|(d+1<c?a.charCodeAt(d+1)<<8:0)|(d+2<c?a.charCodeAt(d+2):0),f=0;f<4;f++)8*d+6*f>8*a.length?b+="=":b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>>6*(3-f)&63);return b}(function(a,b){var c=d(a);c.length>16&&(c=e(c,8*a.length));for(var f=Array(16),g=Array(16),h=0;h<16;h++)f[h]=0x36363636^c[h],g[h]=0x5c5c5c5c^c[h];for(var i=e(f.concat(d(b)),512+8*b.length),j=e(g.concat(i),672),k="",l=0;l<32*j.length;l+=8)k+=String.fromCharCode(j[l>>5]>>>24-l%32&255);return k}(c(a),c(b)))}},7706:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});let d=c(14191);b.default=function(a,b,c,e,f){let g;if(void 0!==f.crit&&void 0===e.crit)throw new a('"crit" (Critical) Header Parameter MUST be integrity protected');if(!e||void 0===e.crit)return new Set;if(!Array.isArray(e.crit)||0===e.crit.length||e.crit.some(a=>"string"!=typeof a||0===a.length))throw new a('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');for(let h of(g=void 0!==c?new Map([...Object.entries(c),...b.entries()]):b,e.crit)){if(!g.has(h))throw new d.JOSENotSupported(`Extension Header Parameter "${h}" is not recognized`);if(void 0===f[h])throw new a(`Extension Header Parameter "${h}" is missing`);if(g.get(h)&&void 0===e[h])throw new a(`Extension Header Parameter "${h}" MUST be integrity protected`)}return new Set(e.crit)}},7775:(a,b,c)=>{var d=c(36633);a.exports=function(a,b,c,e,f){var g=d(a,b,c,e,f);return g.next().then(function(a){return a.done?a.value:g.next()})},a.exports.__esModule=!0,a.exports.default=a.exports},8137:(a,b)=>{"use strict";function c(a,b,c){d(a,b),b.set(a,c)}function d(a,b){if(b.has(a))throw TypeError("Cannot initialize the same private elements twice on an object")}function e(a,b){return a.get(g(a,b))}function f(a,b,c){return a.set(g(a,b),c),c}function g(a,b,c){if("function"==typeof a?a===b:a.has(b))return arguments.length<3?b:c;throw TypeError("Private element is not present on this object")}Object.defineProperty(b,"__esModule",{value:!0}),b.SessionStore=void 0,b.defaultCookies=function(a){let b=a?"__Secure-":"";return{sessionToken:{name:`${b}next-auth.session-token`,options:{httpOnly:!0,sameSite:"lax",path:"/",secure:a}},callbackUrl:{name:`${b}next-auth.callback-url`,options:{httpOnly:!0,sameSite:"lax",path:"/",secure:a}},csrfToken:{name:`${a?"__Host-":""}next-auth.csrf-token`,options:{httpOnly:!0,sameSite:"lax",path:"/",secure:a}},pkceCodeVerifier:{name:`${b}next-auth.pkce.code_verifier`,options:{httpOnly:!0,sameSite:"lax",path:"/",secure:a,maxAge:900}},state:{name:`${b}next-auth.state`,options:{httpOnly:!0,sameSite:"lax",path:"/",secure:a,maxAge:900}},nonce:{name:`${b}next-auth.nonce`,options:{httpOnly:!0,sameSite:"lax",path:"/",secure:a}}}};var h=new WeakMap,i=new WeakMap,j=new WeakMap,k=new WeakSet;class l{constructor(a,b,g){!function(a,b){d(a,b),b.add(a)}(this,k),c(this,h,{}),c(this,i,void 0),c(this,j,void 0),f(j,this,g),f(i,this,a);const{cookies:l}=b,{name:m}=a;if("function"==typeof(null==l?void 0:l.getAll))for(const{name:a,value:b}of l.getAll())a.startsWith(m)&&(e(h,this)[a]=b);else if(l instanceof Map)for(const a of l.keys())a.startsWith(m)&&(e(h,this)[a]=l.get(a));else for(const a in l)a.startsWith(m)&&(e(h,this)[a]=l[a])}get value(){return Object.keys(e(h,this)).sort((a,b)=>{var c,d;return parseInt(null!=(c=a.split(".").pop())?c:"0")-parseInt(null!=(d=b.split(".").pop())?d:"0")}).map(a=>e(h,this)[a]).join("")}chunk(a,b){let c=g(k,this,n).call(this);for(let d of g(k,this,m).call(this,{name:e(i,this).name,value:a,options:{...e(i,this).options,...b}}))c[d.name]=d;return Object.values(c)}clean(){return Object.values(g(k,this,n).call(this))}}function m(a){let b=Math.ceil(a.value.length/3933);if(1===b)return e(h,this)[a.name]=a.value,[a];let c=[];for(let d=0;d<b;d++){let b=`${a.name}.${d}`,f=a.value.substr(3933*d,3933);c.push({...a,name:b,value:f}),e(h,this)[b]=f}return e(j,this).debug("CHUNKING_SESSION_COOKIE",{message:"Session cookie exceeds allowed 4096 bytes.",emptyCookieSize:163,valueSize:a.value.length,chunks:c.map(a=>a.value.length+163)}),c}function n(){let a={};for(let c in e(h,this)){var b;null==(b=e(h,this))||delete b[c],a[c]={name:c,value:"",options:{...e(i,this).options,maxAge:0}}}return a}b.SessionStore=l},8668:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.GeneralSign=void 0;let d=c(31093),e=c(14191);class f{constructor(a,b,c){this.parent=a,this.key=b,this.options=c}setProtectedHeader(a){if(this.protectedHeader)throw TypeError("setProtectedHeader can only be called once");return this.protectedHeader=a,this}setUnprotectedHeader(a){if(this.unprotectedHeader)throw TypeError("setUnprotectedHeader can only be called once");return this.unprotectedHeader=a,this}addSignature(...a){return this.parent.addSignature(...a)}sign(...a){return this.parent.sign(...a)}done(){return this.parent}}class g{constructor(a){this._signatures=[],this._payload=a}addSignature(a,b){let c=new f(this,a,b);return this._signatures.push(c),c}async sign(){if(!this._signatures.length)throw new e.JWSInvalid("at least one signature must be added");let a={signatures:[],payload:""};for(let b=0;b<this._signatures.length;b++){let c=this._signatures[b],f=new d.FlattenedSign(this._payload);f.setProtectedHeader(c.protectedHeader),f.setUnprotectedHeader(c.unprotectedHeader);let{payload:g,...h}=await f.sign(c.key,c.options);if(0===b)a.payload=g;else if(a.payload!==g)throw new e.JWSInvalid("inconsistent use of JWS Unencoded Payload (RFC7797)");a.signatures.push(h)}return a}}b.GeneralSign=g},8758:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.bitLength=void 0;let d=c(14191),e=c(17071);function f(a){switch(a){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 d.JOSENotSupported(`Unsupported JWE Algorithm: ${a}`)}}b.bitLength=f,b.default=a=>(0,e.default)(new Uint8Array(f(a)>>3))},9066:(a,b,c)=>{let d=c(58872);a.exports=a=>{if("string"!=typeof a||!a)throw TypeError("JWT must be a string");let{0:b,1:c,2:e,length:f}=a.split(".");if(5===f)throw TypeError("encrypted JWTs cannot be decoded");if(3!==f)throw Error("JWTs must have three components");try{return{header:JSON.parse(d.decode(b)),payload:JSON.parse(d.decode(c)),signature:e}}catch(a){throw Error("JWT is malformed")}}},9179:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.unwrap=b.wrap=void 0;let d=c(79428),e=c(55511),f=c(14191),g=c(38569),h=c(63549),i=c(4888),j=c(25092),k=c(72349),l=c(46486),m=c(57944);function n(a,b){if(a.symmetricKeySize<<3!==parseInt(b.slice(1,4),10))throw TypeError(`Invalid key size for alg: ${b}`)}function o(a,b,c){if((0,j.default)(a))return a;if(a instanceof Uint8Array)return(0,e.createSecretKey)(a);if((0,h.isCryptoKey)(a))return(0,i.checkEncCryptoKey)(a,b,c),e.KeyObject.from(a);throw TypeError((0,k.default)(a,...m.types,"Uint8Array"))}b.wrap=(a,b,c)=>{let h=parseInt(a.slice(1,4),10),i=`aes${h}-wrap`;if(!(0,l.default)(i))throw new f.JOSENotSupported(`alg ${a} is not supported either by JOSE or your javascript runtime`);let j=o(b,a,"wrapKey");n(j,a);let k=(0,e.createCipheriv)(i,j,d.Buffer.alloc(8,166));return(0,g.concat)(k.update(c),k.final())},b.unwrap=(a,b,c)=>{let h=parseInt(a.slice(1,4),10),i=`aes${h}-wrap`;if(!(0,l.default)(i))throw new f.JOSENotSupported(`alg ${a} is not supported either by JOSE or your javascript runtime`);let j=o(b,a,"unwrapKey");n(j,a);let k=(0,e.createDecipheriv)(i,j,d.Buffer.alloc(8,166));return(0,g.concat)(k.update(c),k.final())}},9572:(a,b,c)=>{"use strict";Object.defineProperty(b,"r",{enumerable:!0,get:function(){return l}});let d=c(63033),e=c(29294),f=c(30754),g=c(50379),h=c(80618),i=c(8504),j=c(84402),k=c(5575);function l(){let a="draftMode",b=e.workAsyncStorage.getStore(),c=d.workUnitAsyncStorage.getStore();switch((!b||!c)&&(0,d.throwForMissingRequestStore)(a),c.type){case"prerender-runtime":return(0,k.delayUntilRuntimeStage)(c,m(c.draftMode,b));case"request":return m(c.draftMode,b);case"cache":case"private-cache":case"unstable-cache":let f=(0,d.getDraftModeProviderForCacheScope)(b,c);if(f)return m(f,b);case"prerender":case"prerender-ppr":case"prerender-legacy":return m(null,b);case"prerender-client":case"validation-client":{let a="`draftMode`";throw Object.defineProperty(new j.InvariantError(`${a} must not be used within a Client Component. Next.js should be preventing ${a} from being included in Client Components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1046",enumerable:!1,configurable:!0})}case"generate-static-params":throw Object.defineProperty(Error(`Route ${b.route} used \`${a}()\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1132",enumerable:!1,configurable:!0});default:return c}}function m(a,b){let c=o.get(a??n);return c||Promise.resolve(new p(a))}c(16036);let n={},o=new WeakMap;class p{constructor(a){this._provider=a}get isEnabled(){return null!==this._provider&&this._provider.isEnabled}enable(){q("draftMode().enable()",this.enable),null!==this._provider&&this._provider.enable()}disable(){q("draftMode().disable()",this.disable),null!==this._provider&&this._provider.disable()}}function q(a,b){let c=e.workAsyncStorage.getStore(),g=d.workUnitAsyncStorage.getStore();if(c){if((null==g?void 0:g.phase)==="after")throw Object.defineProperty(Error(`Route ${c.route} used "${a}" 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:"E845",enumerable:!1,configurable:!0});if(c.dynamicShouldError)throw Object.defineProperty(new h.StaticGenBailoutError(`Route ${c.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${a}\`. 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(g)switch(g.type){case"cache":case"private-cache":{let d=Object.defineProperty(Error(`Route ${c.route} used "${a}" 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:"E829",enumerable:!1,configurable:!0});throw Error.captureStackTrace(d,b),c.invalidDynamicUsageError??=d,d}case"unstable-cache":throw Object.defineProperty(Error(`Route ${c.route} used "${a}" 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:"E844",enumerable:!1,configurable:!0});case"prerender":case"prerender-runtime":{let b=Object.defineProperty(Error(`Route ${c.route} used ${a} 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});return(0,f.abortAndThrowOnSynchronousRequestDataAccess)(c.route,a,b,g)}case"prerender-client":case"validation-client":let d="`draftMode`";throw Object.defineProperty(new j.InvariantError(`${d} must not be used within a Client Component. Next.js should be preventing ${d} from being included in Client Components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1046",enumerable:!1,configurable:!0});case"prerender-ppr":return(0,f.postponeWithTracking)(c.route,a,g.dynamicTracking);case"prerender-legacy":g.revalidate=0;let e=Object.defineProperty(new i.DynamicServerError(`Route ${c.route} couldn't be rendered statically because it used \`${a}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`),"__NEXT_ERROR_CODE",{value:"E558",enumerable:!1,configurable:!0});throw c.dynamicUsageDescription=a,c.dynamicUsageStack=e.stack,e;case"request":(0,f.trackDynamicDataInDynamicRender)(g);break;case"generate-static-params":throw Object.defineProperty(Error(`Route ${c.route} used \`${a}\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1121",enumerable:!1,configurable:!0})}}}(0,g.createDedupedByCallsiteServerErrorLoggerDev)(function(a,b){let c=a?`Route "${a}" `:"This route ";return Object.defineProperty(Error(`${c}used ${b}. \`draftMode()\` returns a Promise and must be unwrapped with \`await\` or \`React.use()\` before accessing its properties. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`),"__NEXT_ERROR_CODE",{value:"E835",enumerable:!1,configurable:!0})})},10163:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.CompactSign=void 0;let d=c(31093);class e{constructor(a){this._flattened=new d.FlattenedSign(a)}setProtectedHeader(a){return this._flattened.setProtectedHeader(a),this}async sign(a,b){let c=await this._flattened.sign(a,b);if(void 0===c.payload)throw TypeError("use the flattened module for creating JWS with b64: false");return`${c.protected}.${c.payload}.${c.signature}`}}b.CompactSign=e},11211:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});let d=c(55511),e=c(38569);b.default=function(a,b,c,f,g,h){let i=(0,e.concat)(a,b,c,(0,e.uint64be)(a.length<<3)),j=(0,d.createHmac)(`sha${f}`,g);return j.update(i),j.digest().slice(0,h>>3)}},12064:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});let d=c(55511);b.default=(a,b)=>(0,d.createHash)(a).update(b).digest()},12115:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.compactVerify=void 0;let d=c(19317),e=c(14191),f=c(38569);b.compactVerify=async function(a,b,c){if(a instanceof Uint8Array&&(a=f.decoder.decode(a)),"string"!=typeof a)throw new e.JWSInvalid("Compact JWS must be a string or Uint8Array");let{0:g,1:h,2:i,length:j}=a.split(".");if(3!==j)throw new e.JWSInvalid("Invalid Compact JWS");let k=await (0,d.flattenedVerify)({payload:h,protected:g,signature:i},b,c),l={payload:k.payload,protectedHeader:k.protectedHeader};return"function"==typeof b?{...l,key:k.key}:l}},12446:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.decode=b.encode=void 0;let d=c(32706);b.encode=d.encode,b.decode=d.decode},12831:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.CompactEncrypt=void 0;let d=c(22585);class e{constructor(a){this._flattened=new d.FlattenedEncrypt(a)}setContentEncryptionKey(a){return this._flattened.setContentEncryptionKey(a),this}setInitializationVector(a){return this._flattened.setInitializationVector(a),this}setProtectedHeader(a){return this._flattened.setProtectedHeader(a),this}setKeyManagementParameters(a){return this._flattened.setKeyManagementParameters(a),this}async encrypt(a,b){let c=await this._flattened.encrypt(a,b);return[c.protected,c.encrypted_key,c.iv,c.ciphertext,c.tag].join(".")}}b.CompactEncrypt=e},14111:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ProduceJWT=void 0;let d=c(5996),e=c(89879),f=c(17111);class g{constructor(a){if(!(0,e.default)(a))throw TypeError("JWT Claims Set MUST be an object");this._payload=a}setIssuer(a){return this._payload={...this._payload,iss:a},this}setSubject(a){return this._payload={...this._payload,sub:a},this}setAudience(a){return this._payload={...this._payload,aud:a},this}setJti(a){return this._payload={...this._payload,jti:a},this}setNotBefore(a){return"number"==typeof a?this._payload={...this._payload,nbf:a}:this._payload={...this._payload,nbf:(0,d.default)(new Date)+(0,f.default)(a)},this}setExpirationTime(a){return"number"==typeof a?this._payload={...this._payload,exp:a}:this._payload={...this._payload,exp:(0,d.default)(new Date)+(0,f.default)(a)},this}setIssuedAt(a){return void 0===a?this._payload={...this._payload,iat:(0,d.default)(new Date)}:this._payload={...this._payload,iat:a},this}}b.ProduceJWT=g},14191:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.JWSSignatureVerificationFailed=b.JWKSTimeout=b.JWKSMultipleMatchingKeys=b.JWKSNoMatchingKey=b.JWKSInvalid=b.JWKInvalid=b.JWTInvalid=b.JWSInvalid=b.JWEInvalid=b.JWEDecompressionFailed=b.JWEDecryptionFailed=b.JOSENotSupported=b.JOSEAlgNotAllowed=b.JWTExpired=b.JWTClaimValidationFailed=b.JOSEError=void 0;class c extends Error{static get code(){return"ERR_JOSE_GENERIC"}constructor(a){var b;super(a),this.code="ERR_JOSE_GENERIC",this.name=this.constructor.name,null==(b=Error.captureStackTrace)||b.call(Error,this,this.constructor)}}b.JOSEError=c;class d extends c{static get code(){return"ERR_JWT_CLAIM_VALIDATION_FAILED"}constructor(a,b="unspecified",c="unspecified"){super(a),this.code="ERR_JWT_CLAIM_VALIDATION_FAILED",this.claim=b,this.reason=c}}b.JWTClaimValidationFailed=d;class e extends c{static get code(){return"ERR_JWT_EXPIRED"}constructor(a,b="unspecified",c="unspecified"){super(a),this.code="ERR_JWT_EXPIRED",this.claim=b,this.reason=c}}b.JWTExpired=e;class f extends c{constructor(){super(...arguments),this.code="ERR_JOSE_ALG_NOT_ALLOWED"}static get code(){return"ERR_JOSE_ALG_NOT_ALLOWED"}}b.JOSEAlgNotAllowed=f;class g extends c{constructor(){super(...arguments),this.code="ERR_JOSE_NOT_SUPPORTED"}static get code(){return"ERR_JOSE_NOT_SUPPORTED"}}b.JOSENotSupported=g;class h extends c{constructor(){super(...arguments),this.code="ERR_JWE_DECRYPTION_FAILED",this.message="decryption operation failed"}static get code(){return"ERR_JWE_DECRYPTION_FAILED"}}b.JWEDecryptionFailed=h;class i extends c{constructor(){super(...arguments),this.code="ERR_JWE_DECOMPRESSION_FAILED",this.message="decompression operation failed"}static get code(){return"ERR_JWE_DECOMPRESSION_FAILED"}}b.JWEDecompressionFailed=i;class j extends c{constructor(){super(...arguments),this.code="ERR_JWE_INVALID"}static get code(){return"ERR_JWE_INVALID"}}b.JWEInvalid=j;class k extends c{constructor(){super(...arguments),this.code="ERR_JWS_INVALID"}static get code(){return"ERR_JWS_INVALID"}}b.JWSInvalid=k;class l extends c{constructor(){super(...arguments),this.code="ERR_JWT_INVALID"}static get code(){return"ERR_JWT_INVALID"}}b.JWTInvalid=l;class m extends c{constructor(){super(...arguments),this.code="ERR_JWK_INVALID"}static get code(){return"ERR_JWK_INVALID"}}b.JWKInvalid=m;class n extends c{constructor(){super(...arguments),this.code="ERR_JWKS_INVALID"}static get code(){return"ERR_JWKS_INVALID"}}b.JWKSInvalid=n;class o extends c{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"}}b.JWKSNoMatchingKey=o;class p extends c{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"}}b.JWKSMultipleMatchingKeys=p;class q extends c{constructor(){super(...arguments),this.code="ERR_JWKS_TIMEOUT",this.message="request timed out"}static get code(){return"ERR_JWKS_TIMEOUT"}}b.JWKSTimeout=q;class r extends c{constructor(){super(...arguments),this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED",this.message="signature verification failed"}static get code(){return"ERR_JWS_SIGNATURE_VERIFICATION_FAILED"}}b.JWSSignatureVerificationFailed=r},14596:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.openidClient=e;var d=c(61922);async function e(a){let b,c=a.provider;if(c.httpOptions&&d.custom.setHttpOptionsDefaults(c.httpOptions),c.wellKnown)b=await d.Issuer.discover(c.wellKnown);else{var e,f,g;b=new d.Issuer({issuer:c.issuer,authorization_endpoint:null==(e=c.authorization)?void 0:e.url,token_endpoint:null==(f=c.token)?void 0:f.url,userinfo_endpoint:null==(g=c.userinfo)?void 0:g.url,jwks_uri:c.jwks_endpoint})}let h=new b.Client({client_id:c.clientId,client_secret:c.clientSecret,redirect_uris:[c.callbackUrl],...c.client},c.jwks);return h[d.custom.clock_tolerance]=10,h}},15398:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});let d=c(55511),e=c(63549),f=c(4888),g=c(72349),h=c(57944);b.default=function(a,b,c){if(b instanceof Uint8Array){if(!a.startsWith("HS"))throw TypeError((0,g.default)(b,...h.types));return(0,d.createSecretKey)(b)}if(b instanceof d.KeyObject)return b;if((0,e.isCryptoKey)(b))return(0,f.checkSigCryptoKey)(b,a,c),d.KeyObject.from(b);throw TypeError((0,g.default)(b,...h.types,"Uint8Array"))}},16514:(a,b,c)=>{"use strict";var d=c(31912);Object.defineProperty(b,"__esModule",{value:!0}),b.default=h;var e=d(c(22050)),f=d(c(84896)),g=d(c(90967));async function h(a){let{options:b,query:c,body:d}=a,{url:h,callbacks:i,logger:j,provider:k}=b;if(!k.type)return{status:500,text:`Error: Type not specified for ${k.name}`};if("oauth"===k.type)try{return await (0,e.default)({options:b,query:c})}catch(a){return j.error("SIGNIN_OAUTH_ERROR",{error:a,providerId:k.id}),{redirect:`${h}/error?error=OAuthSignin`}}if("email"===k.type){var l;let a=null==d?void 0:d.email;if(!a)return{redirect:`${h}/error?error=EmailSignin`};let c=null!=(l=k.normalizeIdentifier)?l:a=>{var b;let c=a.trim();if(1!==(null!=(b=c.match(/@/g))?b:[]).length||c.includes('"'))throw Error("Invalid email address format.");let[d,e]=c.toLowerCase().split("@");if(!d||!e||!(e=e.split(",")[0]).includes("."))throw Error("Invalid email address format.");return`${d}@${e}`};try{a=c(null==d?void 0:d.email)}catch(a){return j.error("SIGNIN_EMAIL_ERROR",{error:a,providerId:k.id}),{redirect:`${h}/error?error=EmailSignin`}}let e=await (0,g.default)({email:a,adapter:b.adapter}),m={providerAccountId:a,userId:a,type:"email",provider:k.id};try{let a=await i.signIn({user:e,account:m,email:{verificationRequest:!0}});if(!a)return{redirect:`${h}/error?error=AccessDenied`};if("string"==typeof a)return{redirect:a}}catch(a){return{redirect:`${h}/error?${new URLSearchParams({error:a})}`}}try{return{redirect:await (0,f.default)(a,b)}}catch(a){return j.error("SIGNIN_EMAIL_ERROR",{error:a,providerId:k.id}),{redirect:`${h}/error?error=EmailSignin`}}}return{redirect:`${h}/signin`}}},16588:(a,b)=>{var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r={},s=[],t=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,u=Array.isArray;function v(a,b){for(var c in b)a[c]=b[c];return a}function w(a){a&&a.parentNode&&a.parentNode.removeChild(a)}function x(a,b,d){var e,f,g,h={};for(g in b)"key"==g?e=b[g]:"ref"==g?f=b[g]:h[g]=b[g];if(arguments.length>2&&(h.children=arguments.length>3?c.call(arguments,2):d),"function"==typeof a&&null!=a.defaultProps)for(g in a.defaultProps)void 0===h[g]&&(h[g]=a.defaultProps[g]);return y(a,h,e,f,null)}function y(a,b,c,f,g){var h={type:a,props:b,key:c,ref:f,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==g?++e:g,__i:-1,__u:0};return null==g&&null!=d.vnode&&d.vnode(h),h}function z(a){return a.children}function A(a,b){this.props=a,this.context=b}function B(a,b){if(null==b)return a.__?B(a.__,a.__i+1):null;for(var c;b<a.__k.length;b++)if(null!=(c=a.__k[b])&&null!=c.__e)return c.__e;return"function"==typeof a.type?B(a):null}function C(a){(!a.__d&&(a.__d=!0)&&f.push(a)&&!D.__r++||g!=d.debounceRendering)&&((g=d.debounceRendering)||h)(D)}function D(){try{for(var a,b=1;f.length;)f.length>b&&f.sort(i),a=f.shift(),b=f.length,function(a){if(a.__P&&a.__d){var b=a.__v,c=b.__e,e=[],f=[],g=v({},b);g.__v=b.__v+1,d.vnode&&d.vnode(g),I(a.__P,g,b,a.__n,a.__P.namespaceURI,32&b.__u?[c]:null,e,null==c?B(b):c,!!(32&b.__u),f),g.__v=b.__v,g.__.__k[g.__i]=g,K(e,g,f),b.__e=b.__=null,g.__e!=c&&function a(b){if(null!=(b=b.__)&&null!=b.__c)return b.__e=b.__c.base=null,b.__k.some(function(a){if(null!=a&&null!=a.__e)return b.__e=b.__c.base=a.__e}),a(b)}(g)}}(a)}finally{f.length=D.__r=0}}function E(a,b,c,e,f,g,h,i,j,k,l){var m,n,o,p,q,t,v,x=e&&e.__k||s,A=b.length;for(j=function(a,b,c,e,f){var g,h,i,j,k,l=c.length,m=l,n=0;for(a.__k=Array(f),g=0;g<f;g++)null!=(h=b[g])&&"boolean"!=typeof h&&"function"!=typeof h?("string"==typeof h||"number"==typeof h||"bigint"==typeof h||h.constructor==String?h=a.__k[g]=y(null,h,null,null,null):u(h)?h=a.__k[g]=y(z,{children:h},null,null,null):void 0===h.constructor&&h.__b>0?h=a.__k[g]=y(h.type,h.props,h.key,h.ref?h.ref:null,h.__v):a.__k[g]=h,j=g+n,h.__=a,h.__b=a.__b+1,i=null,-1!=(k=h.__i=function(a,b,c,d){var e,f,g,h=a.key,i=a.type,j=b[c],k=null!=j&&0==(2&j.__u);if(null===j&&null==h||k&&h==j.key&&i==j.type)return c;if(d>+!!k){for(e=c-1,f=c+1;e>=0||f<b.length;)if(null!=(j=b[g=e>=0?e--:f++])&&0==(2&j.__u)&&h==j.key&&i==j.type)return g}return -1}(h,c,j,m))&&(m--,(i=c[k])&&(i.__u|=2)),null==i||null==i.__v?(-1==k&&(f>l?n--:f<l&&n++),"function"!=typeof h.type&&(h.__u|=4)):k!=j&&(k==j-1?n--:k==j+1?n++:(k>j?n--:n++,h.__u|=4))):a.__k[g]=null;if(m)for(g=0;g<l;g++)null!=(i=c[g])&&0==(2&i.__u)&&(i.__e==e&&(e=B(i)),function a(b,c,e){var f,g;if(d.unmount&&d.unmount(b),(f=b.ref)&&(f.current&&f.current!=b.__e||L(f,null,c)),null!=(f=b.__c)){if(f.componentWillUnmount)try{f.componentWillUnmount()}catch(a){d.__e(a,c)}f.base=f.__P=null}if(f=b.__k)for(g=0;g<f.length;g++)f[g]&&a(f[g],c,e||"function"!=typeof b.type);e||w(b.__e),b.__c=b.__=b.__e=void 0}(i,i));return e}(c,b,x,j,A),m=0;m<A;m++)null!=(o=c.__k[m])&&(n=-1!=o.__i&&x[o.__i]||r,o.__i=m,t=I(a,o,n,f,g,h,i,j,k,l),p=o.__e,o.ref&&n.ref!=o.ref&&(n.ref&&L(n.ref,null,o),l.push(o.ref,o.__c||p,o)),null==q&&null!=p&&(q=p),(v=!!(4&o.__u))||n.__k===o.__k?(j=function a(b,c,d,e){var f,g;if("function"==typeof b.type){for(f=b.__k,g=0;f&&g<f.length;g++)f[g]&&(f[g].__=b,c=a(f[g],c,d,e));return c}b.__e!=c&&(e&&(c&&b.type&&!c.parentNode&&(c=B(b)),d.insertBefore(b.__e,c||null)),c=b.__e);do c=c&&c.nextSibling;while(null!=c&&8==c.nodeType);return c}(o,j,a,v),v&&n.__e&&(n.__e=null)):"function"==typeof o.type&&void 0!==t?j=t:p&&(j=p.nextSibling),o.__u&=-7);return c.__e=q,j}function F(a,b,c){"-"==b[0]?a.setProperty(b,null==c?"":c):a[b]=null==c?"":"number"!=typeof c||t.test(b)?c:c+"px"}function G(a,b,c,d,e){var f,g;a:if("style"==b)if("string"==typeof c)a.style.cssText=c;else{if("string"==typeof d&&(a.style.cssText=d=""),d)for(b in d)c&&b in c||F(a.style,b,"");if(c)for(b in c)d&&c[b]==d[b]||F(a.style,b,c[b])}else if("o"==b[0]&&"n"==b[1])f=b!=(b=b.replace(m,"$1")),b=(g=b.toLowerCase())in a||"onFocusOut"==b||"onFocusIn"==b?g.slice(2):b.slice(2),a.l||(a.l={}),a.l[b+f]=c,c?d?c[l]=d[l]:(c[l]=n,a.addEventListener(b,f?p:o,f)):a.removeEventListener(b,f?p:o,f);else{if("http://www.w3.org/2000/svg"==e)b=b.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=b&&"height"!=b&&"href"!=b&&"list"!=b&&"form"!=b&&"tabIndex"!=b&&"download"!=b&&"rowSpan"!=b&&"colSpan"!=b&&"role"!=b&&"popover"!=b&&b in a)try{a[b]=null==c?"":c;break a}catch(a){}"function"==typeof c||(null==c||!1===c&&"-"!=b[4]?a.removeAttribute(b):a.setAttribute(b,"popover"==b&&1==c?"":c))}}function H(a){return function(b){if(this.l){var c=this.l[b.type+a];if(null==b[k])b[k]=n++;else if(b[k]<c[l])return;return c(d.event?d.event(b):b)}}}function I(a,b,e,f,g,h,i,j,k,l){var m,n,o,p,q,t,x,y,C,D,F,H,I,K,L,N=b.type;if(void 0!==b.constructor)return null;128&e.__u&&(k=!!(32&e.__u),h=[j=b.__e=e.__e]),(m=d.__b)&&m(b);a:if("function"==typeof N)try{if(y=b.props,C=N.prototype&&N.prototype.render,D=(m=N.contextType)&&f[m.__c],F=m?D?D.props.value:m.__:f,e.__c?x=(n=b.__c=e.__c).__=n.__E:(C?b.__c=n=new N(y,F):(b.__c=n=new A(y,F),n.constructor=N,n.render=M),D&&D.sub(n),n.state||(n.state={}),n.__n=f,o=n.__d=!0,n.__h=[],n._sb=[]),C&&null==n.__s&&(n.__s=n.state),C&&null!=N.getDerivedStateFromProps&&(n.__s==n.state&&(n.__s=v({},n.__s)),v(n.__s,N.getDerivedStateFromProps(y,n.__s))),p=n.props,q=n.state,n.__v=b,o)C&&null==N.getDerivedStateFromProps&&null!=n.componentWillMount&&n.componentWillMount(),C&&null!=n.componentDidMount&&n.__h.push(n.componentDidMount);else{if(C&&null==N.getDerivedStateFromProps&&y!==p&&null!=n.componentWillReceiveProps&&n.componentWillReceiveProps(y,F),b.__v==e.__v||!n.__e&&null!=n.shouldComponentUpdate&&!1===n.shouldComponentUpdate(y,n.__s,F)){b.__v!=e.__v&&(n.props=y,n.state=n.__s,n.__d=!1),b.__e=e.__e,b.__k=e.__k,b.__k.some(function(a){a&&(a.__=b)}),s.push.apply(n.__h,n._sb),n._sb=[],n.__h.length&&i.push(n);break a}null!=n.componentWillUpdate&&n.componentWillUpdate(y,n.__s,F),C&&null!=n.componentDidUpdate&&n.__h.push(function(){n.componentDidUpdate(p,q,t)})}if(n.context=F,n.props=y,n.__P=a,n.__e=!1,H=d.__r,I=0,C)n.state=n.__s,n.__d=!1,H&&H(b),m=n.render(n.props,n.state,n.context),s.push.apply(n.__h,n._sb),n._sb=[];else do n.__d=!1,H&&H(b),m=n.render(n.props,n.state,n.context),n.state=n.__s;while(n.__d&&++I<25);n.state=n.__s,null!=n.getChildContext&&(f=v(v({},f),n.getChildContext())),C&&!o&&null!=n.getSnapshotBeforeUpdate&&(t=n.getSnapshotBeforeUpdate(p,q)),K=null!=m&&m.type===z&&null==m.key?function a(b){return"object"!=typeof b||null==b||b.__b>0?b:u(b)?b.map(a):v({},b)}(m.props.children):m,j=E(a,u(K)?K:[K],b,e,f,g,h,i,j,k,l),n.base=b.__e,b.__u&=-161,n.__h.length&&i.push(n),x&&(n.__E=n.__=null)}catch(a){if(b.__v=null,k||null!=h)if(a.then){for(b.__u|=k?160:128;j&&8==j.nodeType&&j.nextSibling;)j=j.nextSibling;h[h.indexOf(j)]=null,b.__e=j}else{for(L=h.length;L--;)w(h[L]);J(b)}else b.__e=e.__e,b.__k=e.__k,a.then||J(b);d.__e(a,b,e)}else null==h&&b.__v==e.__v?(b.__k=e.__k,b.__e=e.__e):j=b.__e=function(a,b,e,f,g,h,i,j,k){var l,m,n,o,p,q,s,t=e.props||r,v=b.props,x=b.type;if("svg"==x?g="http://www.w3.org/2000/svg":"math"==x?g="http://www.w3.org/1998/Math/MathML":g||(g="http://www.w3.org/1999/xhtml"),null!=h){for(l=0;l<h.length;l++)if((p=h[l])&&"setAttribute"in p==!!x&&(x?p.localName==x:3==p.nodeType)){a=p,h[l]=null;break}}if(null==a){if(null==x)return document.createTextNode(v);a=document.createElementNS(g,x,v.is&&v),j&&(d.__m&&d.__m(b,h),j=!1),h=null}if(null==x)t===v||j&&a.data==v||(a.data=v);else{if(h=h&&c.call(a.childNodes),!j&&null!=h)for(t={},l=0;l<a.attributes.length;l++)t[(p=a.attributes[l]).name]=p.value;for(l in t)p=t[l],"dangerouslySetInnerHTML"==l?n=p:"children"==l||l in v||"value"==l&&"defaultValue"in v||"checked"==l&&"defaultChecked"in v||G(a,l,null,p,g);for(l in v)p=v[l],"children"==l?o=p:"dangerouslySetInnerHTML"==l?m=p:"value"==l?q=p:"checked"==l?s=p:j&&"function"!=typeof p||t[l]===p||G(a,l,p,t[l],g);if(m)j||n&&(m.__html==n.__html||m.__html==a.innerHTML)||(a.innerHTML=m.__html),b.__k=[];else if(n&&(a.innerHTML=""),E("template"==b.type?a.content:a,u(o)?o:[o],b,e,f,"foreignObject"==x?"http://www.w3.org/1999/xhtml":g,h,i,h?h[0]:e.__k&&B(e,0),j,k),null!=h)for(l=h.length;l--;)w(h[l]);j||(l="value","progress"==x&&null==q?a.removeAttribute("value"):null==q||q===a[l]&&("progress"!=x||q)&&("option"!=x||q==t[l])||G(a,l,q,t[l],g),l="checked",null!=s&&s!=a[l]&&G(a,l,s,t[l],g))}return a}(e.__e,b,e,f,g,h,i,k,l);return(m=d.diffed)&&m(b),128&b.__u?void 0:j}function J(a){a&&(a.__c&&(a.__c.__e=!0),a.__k&&a.__k.some(J))}function K(a,b,c){for(var e=0;e<c.length;e++)L(c[e],c[++e],c[++e]);d.__c&&d.__c(b,a),a.some(function(b){try{a=b.__h,b.__h=[],a.some(function(a){a.call(b)})}catch(a){d.__e(a,b.__v)}})}function L(a,b,c){try{if("function"==typeof a){var e="function"==typeof a.__u;e&&a.__u(),e&&null==b||(a.__u=a(b))}else a.current=b}catch(a){d.__e(a,c)}}function M(a,b,c){return this.constructor(a,c)}function N(a,b,e){var f,g,h,i;b==document&&(b=document.documentElement),d.__&&d.__(a,b),g=(f="function"==typeof e)?null:e&&e.__k||b.__k,h=[],i=[],I(b,a=(!f&&e||b).__k=x(z,null,[a]),g||r,r,b.namespaceURI,!f&&e?[e]:g?null:b.firstChild?c.call(b.childNodes):null,h,!f&&e?e:g?g.__e:b.firstChild,f,i),K(h,a,i)}c=s.slice,d={__e:function(a,b,c,d){for(var e,f,g;b=b.__;)if((e=b.__c)&&!e.__)try{if((f=e.constructor)&&null!=f.getDerivedStateFromError&&(e.setState(f.getDerivedStateFromError(a)),g=e.__d),null!=e.componentDidCatch&&(e.componentDidCatch(a,d||{}),g=e.__d),g)return e.__E=e}catch(b){a=b}throw a}},e=0,A.prototype.setState=function(a,b){var c;c=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=v({},this.state),"function"==typeof a&&(a=a(v({},c),this.props)),a&&v(c,a),null!=a&&this.__v&&(b&&this._sb.push(b),C(this))},A.prototype.forceUpdate=function(a){this.__v&&(this.__e=!0,a&&this.__h.push(a),C(this))},A.prototype.render=z,f=[],h="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,i=function(a,b){return a.__v.__b-b.__v.__b},D.__r=0,k="__d"+(j=Math.random().toString(8)),l="__a"+j,m=/(PointerCapture)$|Capture$/i,n=0,o=H(!1),p=H(!0),q=0,b.Component=A,b.Fragment=z,b.cloneElement=function(a,b,d){var e,f,g,h,i=v({},a.props);for(g in a.type&&a.type.defaultProps&&(h=a.type.defaultProps),b)"key"==g?e=b[g]:"ref"==g?f=b[g]:i[g]=void 0===b[g]&&null!=h?h[g]:b[g];return arguments.length>2&&(i.children=arguments.length>3?c.call(arguments,2):d),y(a.type,i,e||a.key,f||a.ref,null)},b.createContext=function(a){function b(a){var c,d;return this.getChildContext||(c=new Set,(d={})[b.__c]=this,this.getChildContext=function(){return d},this.componentWillUnmount=function(){c=null},this.shouldComponentUpdate=function(a){this.props.value!=a.value&&c.forEach(function(a){a.__e=!0,C(a)})},this.sub=function(a){c.add(a);var b=a.componentWillUnmount;a.componentWillUnmount=function(){c&&c.delete(a),b&&b.call(a)}}),a.children}return b.__c="__cC"+q++,b.__=a,b.Provider=b.__l=(b.Consumer=function(a,b){return a.children(b)}).contextType=b,b},b.createElement=x,b.createRef=function(){return{current:null}},b.h=x,b.hydrate=function a(b,c){N(b,c,a)},b.isValidElement=function(a){return null!=a&&void 0===a.constructor},b.options=d,b.render=N,b.toChildArray=function a(b,c){return c=c||[],null==b||"boolean"==typeof b||(u(b)?b.some(function(b){a(b,c)}):c.push(b)),c}},16711:a=>{a.exports=function(a){var b=Object(a),c=[];for(var d in b)c.unshift(d);return function a(){for(;c.length;)if((d=c.pop())in b)return a.value=d,a.done=!1,a;return a.done=!0,a}},a.exports.__esModule=!0,a.exports.default=a.exports},17071:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=void 0;var d=c(55511);Object.defineProperty(b,"default",{enumerable:!0,get:function(){return d.randomFillSync}})},17111:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});let c=/^(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)$/i;b.default=a=>{let b=c.exec(a);if(!b)throw TypeError("Invalid time period format");let d=parseFloat(b[1]);switch(b[2].toLowerCase()){case"sec":case"secs":case"second":case"seconds":case"s":return Math.round(d);case"minute":case"minutes":case"min":case"mins":case"m":return Math.round(60*d);case"hour":case"hours":case"hr":case"hrs":case"h":return Math.round(3600*d);case"day":case"days":case"d":return Math.round(86400*d);case"week":case"weeks":case"w":return Math.round(604800*d);default:return Math.round(0x1e187e0*d)}}},17149:(a,b,c)=>{"use strict";var d=c(31912);Object.defineProperty(b,"__esModule",{value:!0}),b.default=void 0,b.proxyLogger=function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:k,b=arguments.length>1?arguments[1]:void 0;try{if("u"<typeof window)return a;var c={},d=function(a){var d;c[a]=(d=(0,g.default)(e.default.mark(function c(d,g){var h,l;return e.default.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(k[a](d,g),"error"===a&&(g=j(g)),g.client=!0,h="".concat(b,"/_log"),l=new URLSearchParams(function(a){for(var b=1;b<arguments.length;b++){var c=null!=arguments[b]?arguments[b]:{};b%2?i(Object(c),!0).forEach(function(b){(0,f.default)(a,b,c[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(c)):i(Object(c)).forEach(function(b){Object.defineProperty(a,b,Object.getOwnPropertyDescriptor(c,b))})}return a}({level:a,code:d},g)),!navigator.sendBeacon){c.next=8;break}return c.abrupt("return",navigator.sendBeacon(h,l));case 8:return c.next=10,fetch(h,{method:"POST",body:l,keepalive:!0});case 10:return c.abrupt("return",c.sent);case 11:case"end":return c.stop()}},c)})),function(a,b){return d.apply(this,arguments)})};for(var h in a)d(h);return c}catch(a){return k}},b.setLogger=function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},b=arguments.length>1?arguments[1]:void 0;b||(k.debug=function(){}),a.error&&(k.error=a.error),a.warn&&(k.warn=a.warn),a.debug&&(k.debug=a.debug)};var e=d(c(3410)),f=d(c(56127)),g=d(c(89935)),h=c(86460);function i(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function j(a){var b,c;if(a instanceof Error&&!(a instanceof h.UnknownError))return{message:a.message,stack:a.stack,name:a.name};if(null!=(b=a)&&b.error){a.error=j(a.error),a.message=null!=(c=a.message)?c:a.error.message}return a}var k={error:function(a,b){b=j(b),console.error("[next-auth][error][".concat(a,"]"),"\nhttps://next-auth.js.org/errors#".concat(a.toLowerCase()),b.message,b)},warn:function(a){console.warn("[next-auth][warn][".concat(a,"]"),"\nhttps://next-auth.js.org/warnings#".concat(a.toLowerCase()))},debug:function(a,b){console.log("[next-auth][debug][".concat(a,"]"),b)}};b.default=k},17379:(a,b,c)=>{"use strict";var d=c(31912);Object.defineProperty(b,"__esModule",{value:!0}),b.default=i;var e=d(c(60448)),f=d(c(4861)),g=c(60434),h=d(c(90967));async function i(a){var b,c,d,i,j,k;let{options:l,query:m,body:n,method:o,headers:p,sessionStore:q}=a,{provider:r,adapter:s,url:t,callbackUrl:u,pages:v,jwt:w,events:x,callbacks:y,session:{strategy:z,maxAge:A},logger:B}=l,C=[],D="jwt"===z;if("oauth"===r.type)try{let{profile:d,account:g,OAuthProfile:h,cookies:i}=await (0,e.default)({query:m,body:n,method:o,options:l,cookies:a.cookies});i.length&&C.push(...i);try{if(B.debug("OAUTH_CALLBACK_RESPONSE",{profile:d,account:g,OAuthProfile:h}),!d||!g||!h)return{redirect:`${t}/signin`,cookies:C};let a=d;if(s){let{getUserByAccount:b}=s,c=await b({providerAccountId:g.providerAccountId,provider:r.id});c&&(a=c)}try{let b=await y.signIn({user:a,account:g,profile:h});if(!b)return{redirect:`${t}/error?error=AccessDenied`,cookies:C};if("string"==typeof b)return{redirect:b,cookies:C}}catch(a){return{redirect:`${t}/error?error=${encodeURIComponent(a.message)}`,cookies:C}}let{user:e,session:i,isNewUser:j}=await (0,f.default)({sessionToken:q.value,profile:d,account:g,options:l});if(D){let a={name:e.name,email:e.email,picture:e.image,sub:null==(c=e.id)?void 0:c.toString()},b=await y.jwt({token:a,user:e,account:g,profile:h,isNewUser:j,trigger:j?"signUp":"signIn"}),d=await w.encode({...w,token:b}),f=new Date;f.setTime(f.getTime()+1e3*A);let i=q.chunk(d,{expires:f});C.push(...i)}else C.push({name:l.cookies.sessionToken.name,value:i.sessionToken,options:{...l.cookies.sessionToken.options,expires:i.expires}});if(await (null==(b=x.signIn)?void 0:b.call(x,{user:e,account:g,profile:d,isNewUser:j})),j&&v.newUser)return{redirect:`${v.newUser}${v.newUser.includes("?")?"&":"?"}callbackUrl=${encodeURIComponent(u)}`,cookies:C};return{redirect:u,cookies:C}}catch(a){if("AccountNotLinkedError"===a.name)return{redirect:`${t}/error?error=OAuthAccountNotLinked`,cookies:C};if("CreateUserError"===a.name)return{redirect:`${t}/error?error=OAuthCreateAccount`,cookies:C};return B.error("OAUTH_CALLBACK_HANDLER_ERROR",a),{redirect:`${t}/error?error=Callback`,cookies:C}}}catch(a){if("OAuthCallbackError"===a.name)return B.error("OAUTH_CALLBACK_ERROR",{error:a,providerId:r.id}),{redirect:`${t}/error?error=OAuthCallback`,cookies:C};return B.error("OAUTH_CALLBACK_ERROR",a),{redirect:`${t}/error?error=Callback`,cookies:C}}if("email"===r.type)try{let a=null==m?void 0:m.token,b=null==m?void 0:m.email;if(!a)return{redirect:`${t}/error?error=configuration`,cookies:C};let c=await s.useVerificationToken({identifier:b,token:(0,g.hashToken)(a,l)});if(!c||c.expires.valueOf()<Date.now()||b&&c.identifier!==b)return{redirect:`${t}/error?error=Verification`,cookies:C};let e=await (0,h.default)({email:c.identifier,adapter:s}),j={providerAccountId:e.email,type:"email",provider:r.id};try{let a=await y.signIn({user:e,account:j});if(!a)return{redirect:`${t}/error?error=AccessDenied`,cookies:C};if("string"==typeof a)return{redirect:a,cookies:C}}catch(a){return{redirect:`${t}/error?error=${encodeURIComponent(a.message)}`,cookies:C}}let{user:k,session:n,isNewUser:o}=await (0,f.default)({sessionToken:q.value,profile:e,account:j,options:l});if(D){let a={name:k.name,email:k.email,picture:k.image,sub:null==(i=k.id)?void 0:i.toString()},b=await y.jwt({token:a,user:k,account:j,isNewUser:o,trigger:o?"signUp":"signIn"}),c=await w.encode({...w,token:b}),d=new Date;d.setTime(d.getTime()+1e3*A);let e=q.chunk(c,{expires:d});C.push(...e)}else C.push({name:l.cookies.sessionToken.name,value:n.sessionToken,options:{...l.cookies.sessionToken.options,expires:n.expires}});if(await (null==(d=x.signIn)?void 0:d.call(x,{user:k,account:j,isNewUser:o})),o&&v.newUser)return{redirect:`${v.newUser}${v.newUser.includes("?")?"&":"?"}callbackUrl=${encodeURIComponent(u)}`,cookies:C};return{redirect:u,cookies:C}}catch(a){if("CreateUserError"===a.name)return{redirect:`${t}/error?error=EmailCreateAccount`,cookies:C};return B.error("CALLBACK_EMAIL_ERROR",a),{redirect:`${t}/error?error=Callback`,cookies:C}}if("credentials"===r.type&&"POST"===o){let a;try{if(!(a=await r.authorize(n,{query:m,body:n,headers:p,method:o})))return{status:401,redirect:`${t}/error?${new URLSearchParams({error:"CredentialsSignin",provider:r.id})}`,cookies:C}}catch(a){return{status:401,redirect:`${t}/error?error=${encodeURIComponent(a.message)}`,cookies:C}}let b={providerAccountId:a.id,type:"credentials",provider:r.id};try{let c=await y.signIn({user:a,account:b,credentials:n});if(!c)return{status:403,redirect:`${t}/error?error=AccessDenied`,cookies:C};if("string"==typeof c)return{redirect:c,cookies:C}}catch(a){return{redirect:`${t}/error?error=${encodeURIComponent(a.message)}`,cookies:C}}let c={name:a.name,email:a.email,picture:a.image,sub:null==(j=a.id)?void 0:j.toString()},d=await y.jwt({token:c,user:a,account:b,isNewUser:!1,trigger:"signIn"}),e=await w.encode({...w,token:d}),f=new Date;f.setTime(f.getTime()+1e3*A);let g=q.chunk(e,{expires:f});return C.push(...g),await (null==(k=x.signIn)?void 0:k.call(x,{user:a,account:b})),{redirect:u,cookies:C}}return{status:500,body:`Error: Callback for provider type ${r.type} not supported`,cookies:C}}},17600:(a,b,c)=>{b.OAuth=c(51243).OAuth,b.OAuthEcho=c(51243).OAuthEcho,b.OAuth2=c(1065).OAuth2},18016:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.generalVerify=void 0;let d=c(19317),e=c(14191),f=c(89879);b.generalVerify=async function(a,b,c){if(!(0,f.default)(a))throw new e.JWSInvalid("General JWS must be an object");if(!Array.isArray(a.signatures)||!a.signatures.every(f.default))throw new e.JWSInvalid("JWS Signatures missing or incorrect type");for(let e of a.signatures)try{return await (0,d.flattenedVerify)({header:e.header,payload:a.payload,protected:e.protected,signature:e.signature},b,c)}catch{}throw new e.JWSSignatureVerificationFailed}},19276:(a,b)=>{"use strict";b.A=function(a){return{id:"credentials",name:"Credentials",type:"credentials",credentials:{},authorize:()=>null,options:a}}},19317:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.flattenedVerify=void 0;let d=c(32706),e=c(41361),f=c(14191),g=c(38569),h=c(85016),i=c(89879),j=c(20612),k=c(7706),l=c(54096);b.flattenedVerify=async function(a,b,c){var m;let n,o;if(!(0,i.default)(a))throw new f.JWSInvalid("Flattened JWS must be an object");if(void 0===a.protected&&void 0===a.header)throw new f.JWSInvalid('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==a.protected&&"string"!=typeof a.protected)throw new f.JWSInvalid("JWS Protected Header incorrect type");if(void 0===a.payload)throw new f.JWSInvalid("JWS Payload missing");if("string"!=typeof a.signature)throw new f.JWSInvalid("JWS Signature missing or incorrect type");if(void 0!==a.header&&!(0,i.default)(a.header))throw new f.JWSInvalid("JWS Unprotected Header incorrect type");let p={};if(a.protected)try{let b=(0,d.decode)(a.protected);p=JSON.parse(g.decoder.decode(b))}catch{throw new f.JWSInvalid("JWS Protected Header is invalid")}if(!(0,h.default)(p,a.header))throw new f.JWSInvalid("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let q={...p,...a.header},r=(0,k.default)(f.JWSInvalid,new Map([["b64",!0]]),null==c?void 0:c.crit,p,q),s=!0;if(r.has("b64")&&"boolean"!=typeof(s=p.b64))throw new f.JWSInvalid('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:t}=q;if("string"!=typeof t||!t)throw new f.JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid');let u=c&&(0,l.default)("algorithms",c.algorithms);if(u&&!u.has(t))throw new f.JOSEAlgNotAllowed('"alg" (Algorithm) Header Parameter not allowed');if(s){if("string"!=typeof a.payload)throw new f.JWSInvalid("JWS Payload must be a string")}else if("string"!=typeof a.payload&&!(a.payload instanceof Uint8Array))throw new f.JWSInvalid("JWS Payload must be a string or an Uint8Array instance");let v=!1;"function"==typeof b&&(b=await b(p,a),v=!0),(0,j.default)(t,b,"verify");let w=(0,g.concat)(g.encoder.encode(null!=(m=a.protected)?m:""),g.encoder.encode("."),"string"==typeof a.payload?g.encoder.encode(a.payload):a.payload);try{n=(0,d.decode)(a.signature)}catch{throw new f.JWSInvalid("Failed to base64url decode the signature")}if(!await (0,e.default)(t,b,n,w))throw new f.JWSSignatureVerificationFailed;if(s)try{o=(0,d.decode)(a.payload)}catch{throw new f.JWSInvalid("Failed to base64url decode the payload")}else o="string"==typeof a.payload?g.encoder.encode(a.payload):a.payload;let x={payload:o};return(void 0!==a.protected&&(x.protectedHeader=p),void 0!==a.header&&(x.unprotectedHeader=a.header),v)?{...x,key:b}:x}},20025:a=>{"use strict";a.exports=function(a){a.prototype[Symbol.iterator]=function*(){for(let a=this.head;a;a=a.next)yield a.value}}},20226:(a,b,c)=>{var d=c(67796).default,e=c(1025);a.exports=function(a,b){if(b&&("object"==d(b)||"function"==typeof b))return b;if(void 0!==b)throw TypeError("Derived constructors may only return object or undefined");return e(a)},a.exports.__esModule=!0,a.exports.default=a.exports},20612:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});let d=c(72349),e=c(57944);b.default=(a,b,c)=>{if(a.startsWith("HS")||"dir"===a||a.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(a)){if(!(b instanceof Uint8Array)){if(!(0,e.default)(b))throw TypeError((0,d.withAlg)(a,b,...e.types,"Uint8Array"));if("secret"!==b.type)throw TypeError(`${e.types.join(" or ")} instances for symmetric algorithms must be of type "secret"`)}}else{if(!(0,e.default)(b))throw TypeError((0,d.withAlg)(a,b,...e.types));if("secret"===b.type)throw TypeError(`${e.types.join(" or ")} instances for asymmetric algorithms must not be of type "secret"`);if("sign"===c&&"public"===b.type)throw TypeError(`${e.types.join(" or ")} instances for asymmetric algorithm signing must be of type "private"`);if("decrypt"===c&&"public"===b.type)throw TypeError(`${e.types.join(" or ")} instances for asymmetric algorithm decryption must be of type "private"`);if(b.algorithm&&"verify"===c&&"private"===b.type)throw TypeError(`${e.types.join(" or ")} instances for asymmetric algorithm verifying must be of type "public"`);if(b.algorithm&&"encrypt"===c&&"private"===b.type)throw TypeError(`${e.types.join(" or ")} instances for asymmetric algorithm encryption must be of type "public"`)}}},20729:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.detectOrigin=function(a,b){var c;return(null!=(c=process.env.VERCEL)?c:process.env.AUTH_TRUST_HOST)?`${"http"===b?"http":"https"}://${a}`:process.env.NEXTAUTH_URL}},20997:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.generateSecret=void 0;let d=c(93111);b.generateSecret=async function(a,b){return(0,d.generateSecret)(a,b)}},21238:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});let d=c(14191);b.default=function(a){switch(a){case"HS256":return"sha256";case"HS384":return"sha384";case"HS512":return"sha512";default:throw new d.JOSENotSupported(`alg ${a} is not supported either by JOSE or your javascript runtime`)}}},21825:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.createRemoteJWKSet=void 0;let d=c(75108),e=c(14191),f=c(48944);class g extends f.LocalJWKSet{constructor(a,b){if(super({keys:[]}),this._jwks=void 0,!(a instanceof URL))throw TypeError("url must be an instance of URL");this._url=new URL(a.href),this._options={agent:null==b?void 0:b.agent,headers:null==b?void 0:b.headers},this._timeoutDuration="number"==typeof(null==b?void 0:b.timeoutDuration)?null==b?void 0:b.timeoutDuration:5e3,this._cooldownDuration="number"==typeof(null==b?void 0:b.cooldownDuration)?null==b?void 0:b.cooldownDuration:3e4,this._cacheMaxAge="number"==typeof(null==b?void 0:b.cacheMaxAge)?null==b?void 0:b.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(a,b){this._jwks&&this.fresh()||await this.reload();try{return await super.getKey(a,b)}catch(c){if(c instanceof e.JWKSNoMatchingKey&&!1===this.coolingDown())return await this.reload(),super.getKey(a,b);throw c}}async reload(){this._pendingFetch&&("u">typeof WebSocketPair||"u">typeof navigator&&"Cloudflare-Workers"===navigator.userAgent||"u">typeof EdgeRuntime&&"vercel"===EdgeRuntime)&&(this._pendingFetch=void 0),this._pendingFetch||(this._pendingFetch=(0,d.default)(this._url,this._timeoutDuration,this._options).then(a=>{if(!(0,f.isJWKSLike)(a))throw new e.JWKSInvalid("JSON Web Key Set malformed");this._jwks={keys:a.keys},this._jwksTimestamp=Date.now(),this._pendingFetch=void 0}).catch(a=>{throw this._pendingFetch=void 0,a})),await this._pendingFetch}}b.createRemoteJWKSet=function(a,b){let c=new g(a,b);return async function(a,b){return c.getKey(a,b)}}},21865:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});let d=c(14191);b.default=function(a){if(!(a instanceof Uint8Array)||a.length<8)throw new d.JWEInvalid("PBES2 Salt Input must be 8 or more octets")}},22050:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=h;var d=c(14596),e=c(42138),f=function(a){if(a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var b=g(void 0);if(b&&b.has(a))return b.get(a);var c={__proto__:null},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var e in a)if("default"!==e&&({}).hasOwnProperty.call(a,e)){var f=d?Object.getOwnPropertyDescriptor(a,e):null;f&&(f.get||f.set)?Object.defineProperty(c,e,f):c[e]=a[e]}return c.default=a,b&&b.set(a,c),c}(c(31238));function g(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(g=function(a){return a?c:b})(a)}async function h({options:a,query:b}){var c,g,i;let{logger:j,provider:k}=a,l={};if("string"==typeof k.authorization){let a=Object.fromEntries(new URL(k.authorization).searchParams);l={...l,...a}}else l={...l,...null==(g=k.authorization)?void 0:g.params};if(l={...l,...b},null!=(c=k.version)&&c.startsWith("1.")){let b=(0,e.oAuth1Client)(a),c=await b.getOAuthRequestToken(l),d=`${null==(i=k.authorization)?void 0:i.url}?${new URLSearchParams({oauth_token:c.oauth_token,oauth_token_secret:c.oauth_token_secret,...c.params})}`;return e.oAuth1TokenStore.set(c.oauth_token,c.oauth_token_secret),j.debug("GET_AUTHORIZATION_URL",{url:d,provider:k}),{redirect:d}}let m=await (0,d.openidClient)(a),n=l,o=[];await f.state.create(a,o,n),await f.pkce.create(a,o,n),await f.nonce.create(a,o,n);let p=m.authorizationUrl(n);return j.debug("GET_AUTHORIZATION_URL",{url:p,cookies:o,provider:k}),{redirect:p,cookies:o}}},22585:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.FlattenedEncrypt=b.unprotected=void 0;let d=c(32706),e=c(69539),f=c(84373),g=c(8758),h=c(84496),i=c(14191),j=c(85016),k=c(38569),l=c(7706);b.unprotected=Symbol();class m{constructor(a){if(!(a instanceof Uint8Array))throw TypeError("plaintext must be an instance of Uint8Array");this._plaintext=a}setKeyManagementParameters(a){if(this._keyManagementParameters)throw TypeError("setKeyManagementParameters can only be called once");return this._keyManagementParameters=a,this}setProtectedHeader(a){if(this._protectedHeader)throw TypeError("setProtectedHeader can only be called once");return this._protectedHeader=a,this}setSharedUnprotectedHeader(a){if(this._sharedUnprotectedHeader)throw TypeError("setSharedUnprotectedHeader can only be called once");return this._sharedUnprotectedHeader=a,this}setUnprotectedHeader(a){if(this._unprotectedHeader)throw TypeError("setUnprotectedHeader can only be called once");return this._unprotectedHeader=a,this}setAdditionalAuthenticatedData(a){return this._aad=a,this}setContentEncryptionKey(a){if(this._cek)throw TypeError("setContentEncryptionKey can only be called once");return this._cek=a,this}setInitializationVector(a){if(this._iv)throw TypeError("setInitializationVector can only be called once");return this._iv=a,this}async encrypt(a,c){let m,n,o,p,q,r,s;if(!this._protectedHeader&&!this._unprotectedHeader&&!this._sharedUnprotectedHeader)throw new i.JWEInvalid("either setProtectedHeader, setUnprotectedHeader, or sharedUnprotectedHeader must be called before #encrypt()");if(!(0,j.default)(this._protectedHeader,this._unprotectedHeader,this._sharedUnprotectedHeader))throw new i.JWEInvalid("JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint");let t={...this._protectedHeader,...this._unprotectedHeader,...this._sharedUnprotectedHeader};if((0,l.default)(i.JWEInvalid,new Map,null==c?void 0:c.crit,this._protectedHeader,t),void 0!==t.zip){if(!this._protectedHeader||!this._protectedHeader.zip)throw new i.JWEInvalid('JWE "zip" (Compression Algorithm) Header MUST be integrity protected');if("DEF"!==t.zip)throw new i.JOSENotSupported('Unsupported JWE "zip" (Compression Algorithm) Header Parameter value')}let{alg:u,enc:v}=t;if("string"!=typeof u||!u)throw new i.JWEInvalid('JWE "alg" (Algorithm) Header Parameter missing or invalid');if("string"!=typeof v||!v)throw new i.JWEInvalid('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid');if("dir"===u){if(this._cek)throw TypeError("setContentEncryptionKey cannot be called when using Direct Encryption")}else if("ECDH-ES"===u&&this._cek)throw TypeError("setContentEncryptionKey cannot be called when using Direct Key Agreement");{let d;({cek:n,encryptedKey:m,parameters:d}=await (0,h.default)(u,v,a,this._cek,this._keyManagementParameters)),d&&(c&&b.unprotected in c?this._unprotectedHeader?this._unprotectedHeader={...this._unprotectedHeader,...d}:this.setUnprotectedHeader(d):this._protectedHeader?this._protectedHeader={...this._protectedHeader,...d}:this.setProtectedHeader(d))}if(this._iv||(this._iv=(0,g.default)(v)),p=this._protectedHeader?k.encoder.encode((0,d.encode)(JSON.stringify(this._protectedHeader))):k.encoder.encode(""),this._aad?(q=(0,d.encode)(this._aad),o=(0,k.concat)(p,k.encoder.encode("."),k.encoder.encode(q))):o=p,"DEF"===t.zip){let a=await ((null==c?void 0:c.deflateRaw)||f.deflate)(this._plaintext);({ciphertext:r,tag:s}=await (0,e.default)(v,a,n,this._iv,o))}else({ciphertext:r,tag:s}=await (0,e.default)(v,this._plaintext,n,this._iv,o));let w={ciphertext:(0,d.encode)(r),iv:(0,d.encode)(this._iv),tag:(0,d.encode)(s)};return m&&(w.encrypted_key=(0,d.encode)(m)),q&&(w.aad=q),this._protectedHeader&&(w.protected=k.decoder.decode(p)),this._sharedUnprotectedHeader&&(w.unprotected=this._sharedUnprotectedHeader),this._unprotectedHeader&&(w.header=this._unprotectedHeader),w}}b.FlattenedEncrypt=m},22934:a=>{function b(c){return a.exports=b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},a.exports.__esModule=!0,a.exports.default=a.exports,b(c)}a.exports=b,a.exports.__esModule=!0,a.exports.default=a.exports},23123:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.defaultCallbacks=void 0,b.defaultCallbacks={signIn:()=>!0,redirect:({url:a,baseUrl:b})=>a.startsWith("/")?`${b}${a}`:new URL(a).origin===b?a:b,session:({session:a})=>a,jwt:({token:a})=>a}},24497:(a,b,c)=>{var d=c(67796).default;a.exports=function(a){if(null!=a){var b=a["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],c=0;if(b)return b.call(a);if("function"==typeof a.next)return a;if(!isNaN(a.length))return{next:function(){return a&&c>=a.length&&(a=void 0),{value:a&&a[c++],done:!a}}}}throw TypeError(d(a)+" is not iterable")},a.exports.__esModule=!0,a.exports.default=a.exports},24608:(a,b)=>{"use strict";b.parse=function(a,b){if("string"!=typeof a)throw TypeError("argument str must be a string");var c={},e=a.length;if(e<2)return c;var f=b&&b.decode||k,g=0,h=0,l=0;do{if(-1===(h=a.indexOf("=",g)))break;if(-1===(l=a.indexOf(";",g)))l=e;else if(h>l){g=a.lastIndexOf(";",h-1)+1;continue}var m=i(a,g,h),n=j(a,h,m),o=a.slice(m,n);if(!d.call(c,o)){var p=i(a,h+1,l),q=j(a,l,p);34===a.charCodeAt(p)&&34===a.charCodeAt(q-1)&&(p++,q--);var r=a.slice(p,q);c[o]=function(a,b){try{return b(a)}catch(b){return a}}(r,f)}g=l+1}while(g<e);return c},b.serialize=function(a,b,d){var i=d&&d.encode||encodeURIComponent;if("function"!=typeof i)throw TypeError("option encode is invalid");if(!e.test(a))throw TypeError("argument name is invalid");var j=i(b);if(!f.test(j))throw TypeError("argument val is invalid");var k=a+"="+j;if(!d)return k;if(null!=d.maxAge){var l=Math.floor(d.maxAge);if(!isFinite(l))throw TypeError("option maxAge is invalid");k+="; Max-Age="+l}if(d.domain){if(!g.test(d.domain))throw TypeError("option domain is invalid");k+="; Domain="+d.domain}if(d.path){if(!h.test(d.path))throw TypeError("option path is invalid");k+="; Path="+d.path}if(d.expires){var m,n=d.expires;if(m=n,"[object Date]"!==c.call(m)||isNaN(n.valueOf()))throw TypeError("option expires is invalid");k+="; Expires="+n.toUTCString()}if(d.httpOnly&&(k+="; HttpOnly"),d.secure&&(k+="; Secure"),d.partitioned&&(k+="; Partitioned"),d.priority)switch("string"==typeof d.priority?d.priority.toLowerCase():d.priority){case"low":k+="; Priority=Low";break;case"medium":k+="; Priority=Medium";break;case"high":k+="; Priority=High";break;default:throw TypeError("option priority is invalid")}if(d.sameSite)switch("string"==typeof d.sameSite?d.sameSite.toLowerCase():d.sameSite){case!0:case"strict":k+="; SameSite=Strict";break;case"lax":k+="; SameSite=Lax";break;case"none":k+="; SameSite=None";break;default:throw TypeError("option sameSite is invalid")}return k};var c=Object.prototype.toString,d=Object.prototype.hasOwnProperty,e=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,f=/^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/,g=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,h=/^[\u0020-\u003A\u003D-\u007E]*$/;function i(a,b,c){do{var d=a.charCodeAt(b);if(32!==d&&9!==d)return b}while(++b<c);return c}function j(a,b,c){for(;b>c;){var d=a.charCodeAt(--b);if(32!==d&&9!==d)return b+1}return c}function k(a){return -1!==a.indexOf("%")?decodeURIComponent(a):a}},24866:(a,b,c)=>{let d=c(28354),e=c(55511);a.exports=d.types.isKeyObject||(a=>a&&a instanceof e.KeyObject)},25092:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});let d=c(55511),e=c(28354);b.default=e.types.isKeyObject?a=>e.types.isKeyObject(a):a=>null!=a&&a instanceof d.KeyObject},25958:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.jwtDecrypt=void 0;let d=c(52459),e=c(64377),f=c(14191);b.jwtDecrypt=async function(a,b,c){let g=await (0,d.compactDecrypt)(a,b,c),h=(0,e.default)(g.protectedHeader,g.plaintext,c),{protectedHeader:i}=g;if(void 0!==i.iss&&i.iss!==h.iss)throw new f.JWTClaimValidationFailed('replicated "iss" claim header parameter mismatch',"iss","mismatch");if(void 0!==i.sub&&i.sub!==h.sub)throw new f.JWTClaimValidationFailed('replicated "sub" claim header parameter mismatch',"sub","mismatch");if(void 0!==i.aud&&JSON.stringify(i.aud)!==JSON.stringify(h.aud))throw new f.JWTClaimValidationFailed('replicated "aud" claim header parameter mismatch',"aud","mismatch");let j={payload:h,protectedHeader:i};return"function"==typeof b?{...j,key:g.key}:j}},27871:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.exportJWK=b.exportPKCS8=b.exportSPKI=void 0;let d=c(52345),e=c(52345),f=c(36686);b.exportSPKI=async function(a){return(0,d.toSPKI)(a)},b.exportPKCS8=async function(a){return(0,e.toPKCS8)(a)},b.exportJWK=async function(a){return(0,f.default)(a)}},28583:(a,b,c)=>{let{format:d}=c(28354);class e extends Error{constructor({error_description:a,error:b,error_uri:c,session_state:d,state:e,scope:f},g){super(a?`${b} (${a})`:b),Object.assign(this,{error:b},a&&{error_description:a},c&&{error_uri:c},e&&{state:e},f&&{scope:f},d&&{session_state:d}),g&&Object.defineProperty(this,"response",{value:g}),this.name=this.constructor.name,Error.captureStackTrace(this,this.constructor)}}class f extends Error{constructor(...a){if("string"==typeof a[0])super(d(...a));else{const{message:b,printf:c,response:e,...f}=a[0];c?super(d(...c)):super(b),Object.assign(this,f),e&&Object.defineProperty(this,"response",{value:e})}this.name=this.constructor.name,Error.captureStackTrace(this,this.constructor)}}a.exports={OPError:e,RPError:f}},31093:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.FlattenedSign=void 0;let d=c(32706),e=c(43609),f=c(85016),g=c(14191),h=c(38569),i=c(20612),j=c(7706);class k{constructor(a){if(!(a instanceof Uint8Array))throw TypeError("payload must be an instance of Uint8Array");this._payload=a}setProtectedHeader(a){if(this._protectedHeader)throw TypeError("setProtectedHeader can only be called once");return this._protectedHeader=a,this}setUnprotectedHeader(a){if(this._unprotectedHeader)throw TypeError("setUnprotectedHeader can only be called once");return this._unprotectedHeader=a,this}async sign(a,b){let c;if(!this._protectedHeader&&!this._unprotectedHeader)throw new g.JWSInvalid("either setProtectedHeader or setUnprotectedHeader must be called before #sign()");if(!(0,f.default)(this._protectedHeader,this._unprotectedHeader))throw new g.JWSInvalid("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let k={...this._protectedHeader,...this._unprotectedHeader},l=(0,j.default)(g.JWSInvalid,new Map([["b64",!0]]),null==b?void 0:b.crit,this._protectedHeader,k),m=!0;if(l.has("b64")&&"boolean"!=typeof(m=this._protectedHeader.b64))throw new g.JWSInvalid('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:n}=k;if("string"!=typeof n||!n)throw new g.JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid');(0,i.default)(n,a,"sign");let o=this._payload;m&&(o=h.encoder.encode((0,d.encode)(o))),c=this._protectedHeader?h.encoder.encode((0,d.encode)(JSON.stringify(this._protectedHeader))):h.encoder.encode("");let p=(0,h.concat)(c,h.encoder.encode("."),o),q=await (0,e.default)(n,a,p),r={signature:(0,d.encode)(q),payload:""};return m&&(r.payload=h.decoder.decode(o)),this._unprotectedHeader&&(r.header=this._unprotectedHeader),this._protectedHeader&&(r.protected=h.decoder.decode(c)),r}}b.FlattenedSign=k},31238:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.pkce=b.nonce=b.PKCE_CODE_CHALLENGE_METHOD=void 0,b.signCookie=g,b.state=void 0;var d=c(61922),e=function(a){if(a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var b=f(void 0);if(b&&b.has(a))return b.get(a);var c={__proto__:null},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var e in a)if("default"!==e&&({}).hasOwnProperty.call(a,e)){var g=d?Object.getOwnPropertyDescriptor(a,e):null;g&&(g.get||g.set)?Object.defineProperty(c,e,g):c[e]=a[e]}return c.default=a,b&&b.set(a,c),c}(c(5421));function f(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(f=function(a){return a?c:b})(a)}async function g(a,b,c,d){let{cookies:f,logger:g}=d;g.debug(`CREATE_${a.toUpperCase()}`,{value:b,maxAge:c});let{name:h}=f[a],i=new Date;return i.setTime(i.getTime()+1e3*c),{name:h,value:await e.encode({...d.jwt,maxAge:c,token:{value:b},salt:h}),options:{...f[a].options,expires:i}}}let h=b.PKCE_CODE_CHALLENGE_METHOD="S256";b.pkce={async create(a,b,c){var e,f;if(!(null!=(e=a.provider)&&null!=(e=e.checks)&&e.includes("pkce")))return;let i=d.generators.codeVerifier();c.code_challenge=d.generators.codeChallenge(i),c.code_challenge_method=h;let j=null!=(f=a.cookies.pkceCodeVerifier.options.maxAge)?f:900;b.push(await g("pkceCodeVerifier",i,j,a))},async use(a,b,c,d){var f;if(!(null!=(f=c.provider)&&null!=(f=f.checks)&&f.includes("pkce")))return;let g=null==a?void 0:a[c.cookies.pkceCodeVerifier.name];if(!g)throw TypeError("PKCE code_verifier cookie was missing.");let{name:h}=c.cookies.pkceCodeVerifier,i=await e.decode({...c.jwt,token:g,salt:h});if(!(null!=i&&i.value))throw TypeError("PKCE code_verifier value could not be parsed.");b.push({name:h,value:"",options:{...c.cookies.pkceCodeVerifier.options,maxAge:0}}),d.code_verifier=i.value}},b.state={async create(a,b,c){var e,f;if(!(null!=(e=a.provider.checks)&&e.includes("state")))return;let h=d.generators.state();c.state=h;let i=null!=(f=a.cookies.state.options.maxAge)?f:900;b.push(await g("state",h,i,a))},async use(a,b,c,d){var f;if(!(null!=(f=c.provider.checks)&&f.includes("state")))return;let g=null==a?void 0:a[c.cookies.state.name];if(!g)throw TypeError("State cookie was missing.");let{name:h}=c.cookies.state,i=await e.decode({...c.jwt,token:g,salt:h});if(!(null!=i&&i.value))throw TypeError("State value could not be parsed.");b.push({name:h,value:"",options:{...c.cookies.state.options,maxAge:0}}),d.state=i.value}},b.nonce={async create(a,b,c){var e,f;if(!(null!=(e=a.provider.checks)&&e.includes("nonce")))return;let h=d.generators.nonce();c.nonce=h;let i=null!=(f=a.cookies.nonce.options.maxAge)?f:900;b.push(await g("nonce",h,i,a))},async use(a,b,c,d){var f;if(!(null!=(f=c.provider)&&null!=(f=f.checks)&&f.includes("nonce")))return;let g=null==a?void 0:a[c.cookies.nonce.name];if(!g)throw TypeError("Nonce cookie was missing.");let{name:h}=c.cookies.nonce,i=await e.decode({...c.jwt,token:g,salt:h});if(!(null!=i&&i.value))throw TypeError("Nonce value could not be parsed.");b.push({name:h,value:"",options:{...c.cookies.nonce.options,maxAge:0}}),d.nonce=i.value}}},31347:a=>{a.exports.keystores=new WeakMap},31912:a=>{a.exports=function(a){return a&&a.__esModule?a:{default:a}},a.exports.__esModule=!0,a.exports.default=a.exports},32706:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.decode=b.encode=b.encodeBase64=b.decodeBase64=void 0;let d=c(79428),e=c(38569);d.Buffer.isEncoding("base64url")?b.encode=a=>d.Buffer.from(a).toString("base64url"):b.encode=a=>d.Buffer.from(a).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"),b.decodeBase64=a=>d.Buffer.from(a,"base64"),b.encodeBase64=a=>d.Buffer.from(a).toString("base64"),b.decode=a=>{let b;return d.Buffer.from(((b=a)instanceof Uint8Array&&(b=e.decoder.decode(b)),b),"base64")}},34182:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=c(43354).default},34627:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});let d=c(55511);b.default=(a,b,c,e,f)=>{let g=parseInt(a.substr(3),10)>>3||20,h=(0,d.createHmac)(a,c.byteLength?c:new Uint8Array(g)).update(b).digest(),i=Math.ceil(f/g),j=new Uint8Array(g*i+e.byteLength+1),k=0,l=0;for(let b=1;b<=i;b++)j.set(e,l),j[l+e.byteLength]=b,j.set((0,d.createHmac)(a,h).update(j.subarray(k,l+e.byteLength+1)).digest(),l),k=l,l+=g;return j.slice(0,f)}},34672:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.importJWK=b.importPKCS8=b.importX509=b.importSPKI=void 0;let d=c(32706),e=c(52345),f=c(77032),g=c(14191),h=c(89879);b.importSPKI=async function(a,b,c){if("string"!=typeof a||0!==a.indexOf("-----BEGIN PUBLIC KEY-----"))throw TypeError('"spki" must be SPKI formatted string');return(0,e.fromSPKI)(a,b,c)},b.importX509=async function(a,b,c){if("string"!=typeof a||0!==a.indexOf("-----BEGIN CERTIFICATE-----"))throw TypeError('"x509" must be X.509 formatted string');return(0,e.fromX509)(a,b,c)},b.importPKCS8=async function(a,b,c){if("string"!=typeof a||0!==a.indexOf("-----BEGIN PRIVATE KEY-----"))throw TypeError('"pkcs8" must be PKCS#8 formatted string');return(0,e.fromPKCS8)(a,b,c)},b.importJWK=async function(a,b,c){var e;if(!(0,h.default)(a))throw TypeError("JWK must be an object");switch(b||(b=a.alg),a.kty){case"oct":if("string"!=typeof a.k||!a.k)throw TypeError('missing "k" (Key Value) Parameter value');if(null!=c||(c=!0!==a.ext),c)return(0,f.default)({...a,alg:b,ext:null!=(e=a.ext)&&e});return(0,d.decode)(a.k);case"RSA":if(void 0!==a.oth)throw new g.JOSENotSupported('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');case"EC":case"OKP":return(0,f.default)({...a,alg:b});default:throw new g.JOSENotSupported('Unsupported "kty" (Key Type) Parameter value')}}},34752:a=>{a.exports={assertSigningAlgValuesSupport:function(a,b,c){if(!b[`${a}_endpoint`])return;let d=`${a}_endpoint_auth_method`,e=`${a}_endpoint_auth_signing_alg`,f=`${a}_endpoint_auth_signing_alg_values_supported`;if(c[d]&&c[d].endsWith("_jwt")&&!c[e]&&!b[f])throw TypeError(`${f} must be configured on the issuer if ${e} is not defined on a client`)},assertIssuerConfiguration:function(a,b){if(!a[b])throw TypeError(`${b} must be configured on the issuer`)}}},35243:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.setModulusLength=b.weakMap=void 0,b.weakMap=new WeakMap;let c=(a,b)=>{let d=a.readUInt8(1);if((128&d)==0)return 0===b?d:c(a.subarray(2+d),b-1);let e=127&d;d=0;for(let b=0;b<e;b++)d<<=8,d|=a.readUInt8(2+b);return 0===b?d:c(a.subarray(2+d),b-1)};b.setModulusLength=(a,c)=>{b.weakMap.set(a,c)},b.default=(a,d)=>{if(2048>(a=>{var d,e,f,g;let h;if(b.weakMap.has(a))return b.weakMap.get(a);let i=null!=(e=null==(d=a.asymmetricKeyDetails)?void 0:d.modulusLength)?e:(f=a.export({format:"der",type:"pkcs1"}),g=+("private"===a.type),((128&(h=f.readUInt8(1)))==0?c(f.subarray(2),g):c(f.subarray(2+(127&h)),g))-1<<3);return b.weakMap.set(a,i),i})(a))throw TypeError(`${d} requires key modulusLength to be 2048 bits or larger`)}},35551:(a,b,c)=>{"use strict";function d(a){return{createUser:({id:b,...c})=>a.user.create(e(c)),getUser:b=>a.user.findUnique({where:{id:b}}),getUserByEmail:b=>a.user.findUnique({where:{email:b}}),async getUserByAccount(b){let c=await a.account.findUnique({where:{provider_providerAccountId:b},include:{user:!0}});return c?.user??null},updateUser:({id:b,...c})=>a.user.update({where:{id:b},...e(c)}),deleteUser:b=>a.user.delete({where:{id:b}}),linkAccount:b=>a.account.create({data:b}),unlinkAccount:b=>a.account.delete({where:{provider_providerAccountId:b}}),async getSessionAndUser(b){let c=await a.session.findUnique({where:{sessionToken:b},include:{user:!0}});if(!c)return null;let{user:d,...e}=c;return{user:d,session:e}},createSession:b=>a.session.create(e(b)),updateSession:b=>a.session.update({where:{sessionToken:b.sessionToken},...e(b)}),deleteSession:b=>a.session.delete({where:{sessionToken:b}}),async createVerificationToken(b){let c=await a.verificationToken.create(e(b));return"id"in c&&c.id&&delete c.id,c},async useVerificationToken(b){try{let c=await a.verificationToken.delete({where:{identifier_token:b}});return"id"in c&&c.id&&delete c.id,c}catch(a){if(a&&"object"==typeof a&&"code"in a&&"P2025"===a.code)return null;throw a}},getAccount:async(b,c)=>a.account.findFirst({where:{providerAccountId:b,provider:c}}),createAuthenticator:async b=>a.authenticator.create(e(b)),getAuthenticator:async b=>a.authenticator.findUnique({where:{credentialID:b}}),listAuthenticatorsByUserId:async b=>a.authenticator.findMany({where:{userId:b}}),updateAuthenticatorCounter:async(b,c)=>a.authenticator.update({where:{credentialID:b},data:{counter:c}})}}function e(a){let b={};for(let c in a)void 0!==a[c]&&(b[c]=a[c]);return{data:b}}c.d(b,{y:()=>d})},36633:(a,b,c)=>{var d=c(66139),e=c(83545);a.exports=function(a,b,c,f,g){return new e(d().w(a,b,c,f),g||Promise)},a.exports.__esModule=!0,a.exports.default=a.exports},36673:(a,b,c)=>{"use strict";function d(a){var b=this;if(b instanceof d||(b=new d),b.tail=null,b.head=null,b.length=0,a&&"function"==typeof a.forEach)a.forEach(function(a){b.push(a)});else if(arguments.length>0)for(var c=0,e=arguments.length;c<e;c++)b.push(arguments[c]);return b}function e(a,b,c,d){if(!(this instanceof e))return new e(a,b,c,d);this.list=d,this.value=a,b?(b.next=this,this.prev=b):this.prev=null,c?(c.prev=this,this.next=c):this.next=null}a.exports=d,d.Node=e,d.create=d,d.prototype.removeNode=function(a){if(a.list!==this)throw Error("removing node which does not belong to this list");var b=a.next,c=a.prev;return b&&(b.prev=c),c&&(c.next=b),a===this.head&&(this.head=b),a===this.tail&&(this.tail=c),a.list.length--,a.next=null,a.prev=null,a.list=null,b},d.prototype.unshiftNode=function(a){if(a!==this.head){a.list&&a.list.removeNode(a);var b=this.head;a.list=this,a.next=b,b&&(b.prev=a),this.head=a,this.tail||(this.tail=a),this.length++}},d.prototype.pushNode=function(a){if(a!==this.tail){a.list&&a.list.removeNode(a);var b=this.tail;a.list=this,a.prev=b,b&&(b.next=a),this.tail=a,this.head||(this.head=a),this.length++}},d.prototype.push=function(){for(var a,b,c=0,d=arguments.length;c<d;c++){a=this,b=arguments[c],a.tail=new e(b,a.tail,null,a),a.head||(a.head=a.tail),a.length++}return this.length},d.prototype.unshift=function(){for(var a,b,c=0,d=arguments.length;c<d;c++){a=this,b=arguments[c],a.head=new e(b,null,a.head,a),a.tail||(a.tail=a.head),a.length++}return this.length},d.prototype.pop=function(){if(this.tail){var a=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,a}},d.prototype.shift=function(){if(this.head){var a=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,a}},d.prototype.forEach=function(a,b){b=b||this;for(var c=this.head,d=0;null!==c;d++)a.call(b,c.value,d,this),c=c.next},d.prototype.forEachReverse=function(a,b){b=b||this;for(var c=this.tail,d=this.length-1;null!==c;d--)a.call(b,c.value,d,this),c=c.prev},d.prototype.get=function(a){for(var b=0,c=this.head;null!==c&&b<a;b++)c=c.next;if(b===a&&null!==c)return c.value},d.prototype.getReverse=function(a){for(var b=0,c=this.tail;null!==c&&b<a;b++)c=c.prev;if(b===a&&null!==c)return c.value},d.prototype.map=function(a,b){b=b||this;for(var c=new d,e=this.head;null!==e;)c.push(a.call(b,e.value,this)),e=e.next;return c},d.prototype.mapReverse=function(a,b){b=b||this;for(var c=new d,e=this.tail;null!==e;)c.push(a.call(b,e.value,this)),e=e.prev;return c},d.prototype.reduce=function(a,b){var c,d=this.head;if(arguments.length>1)c=b;else if(this.head)d=this.head.next,c=this.head.value;else throw TypeError("Reduce of empty list with no initial value");for(var e=0;null!==d;e++)c=a(c,d.value,e),d=d.next;return c},d.prototype.reduceReverse=function(a,b){var c,d=this.tail;if(arguments.length>1)c=b;else if(this.tail)d=this.tail.prev,c=this.tail.value;else throw TypeError("Reduce of empty list with no initial value");for(var e=this.length-1;null!==d;e--)c=a(c,d.value,e),d=d.prev;return c},d.prototype.toArray=function(){for(var a=Array(this.length),b=0,c=this.head;null!==c;b++)a[b]=c.value,c=c.next;return a},d.prototype.toArrayReverse=function(){for(var a=Array(this.length),b=0,c=this.tail;null!==c;b++)a[b]=c.value,c=c.prev;return a},d.prototype.slice=function(a,b){(b=b||this.length)<0&&(b+=this.length),(a=a||0)<0&&(a+=this.length);var c=new d;if(b<a||b<0)return c;a<0&&(a=0),b>this.length&&(b=this.length);for(var e=0,f=this.head;null!==f&&e<a;e++)f=f.next;for(;null!==f&&e<b;e++,f=f.next)c.push(f.value);return c},d.prototype.sliceReverse=function(a,b){(b=b||this.length)<0&&(b+=this.length),(a=a||0)<0&&(a+=this.length);var c=new d;if(b<a||b<0)return c;a<0&&(a=0),b>this.length&&(b=this.length);for(var e=this.length,f=this.tail;null!==f&&e>b;e--)f=f.prev;for(;null!==f&&e>a;e--,f=f.prev)c.push(f.value);return c},d.prototype.splice=function(a,b,...c){a>this.length&&(a=this.length-1),a<0&&(a=this.length+a);for(var d=0,f=this.head;null!==f&&d<a;d++)f=f.next;for(var g=[],d=0;f&&d<b;d++)g.push(f.value),f=this.removeNode(f);null===f&&(f=this.tail),f!==this.head&&f!==this.tail&&(f=f.prev);for(var d=0;d<c.length;d++)f=function(a,b,c){var d=b===a.head?new e(c,null,b,a):new e(c,b,b.next,a);return null===d.next&&(a.tail=d),null===d.prev&&(a.head=d),a.length++,d}(this,f,c[d]);return g},d.prototype.reverse=function(){for(var a=this.head,b=this.tail,c=a;null!==c;c=c.prev){var d=c.prev;c.prev=c.next,c.next=d}return this.head=b,this.tail=a,this};try{c(20025)(d)}catch(a){}},36686:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});let d=c(55511),e=c(32706),f=c(83766),g=c(14191),h=c(82996),i=c(63549),j=c(25092),k=c(72349),l=c(57944),m=c(92117),n=a=>{let b;if((0,i.isCryptoKey)(a)){if(!a.extractable)throw TypeError("CryptoKey is not extractable");b=d.KeyObject.from(a)}else if((0,j.default)(a))b=a;else if(a instanceof Uint8Array)return{kty:"oct",k:(0,e.encode)(a)};else throw TypeError((0,k.default)(a,...l.types,"Uint8Array"));if(m.jwkExport){if("secret"!==b.type&&!["rsa","ec","ed25519","x25519","ed448","x448"].includes(b.asymmetricKeyType))throw new g.JOSENotSupported("Unsupported key asymmetricKeyType");return b.export({format:"jwk"})}switch(b.type){case"secret":return{kty:"oct",k:(0,e.encode)(b.export())};case"private":case"public":switch(b.asymmetricKeyType){case"rsa":{let a,c=b.export({format:"der",type:"pkcs1"}),d=new f.default(c);"private"===b.type&&d.unsignedInteger();let g=(0,e.encode)(d.unsignedInteger()),h=(0,e.encode)(d.unsignedInteger());return"private"===b.type&&(a={d:(0,e.encode)(d.unsignedInteger()),p:(0,e.encode)(d.unsignedInteger()),q:(0,e.encode)(d.unsignedInteger()),dp:(0,e.encode)(d.unsignedInteger()),dq:(0,e.encode)(d.unsignedInteger()),qi:(0,e.encode)(d.unsignedInteger())}),d.end(),{kty:"RSA",n:g,e:h,...a}}case"ec":{let a,c,f,i=(0,h.default)(b);switch(i){case"secp256k1":a=64,c=33,f=-1;break;case"P-256":a=64,c=36,f=-1;break;case"P-384":a=96,c=35,f=-3;break;case"P-521":a=132,c=35,f=-3;break;default:throw new g.JOSENotSupported("Unsupported curve")}if("public"===b.type){let c=b.export({type:"spki",format:"der"});return{kty:"EC",crv:i,x:(0,e.encode)(c.subarray(-a,-a/2)),y:(0,e.encode)(c.subarray(-a/2))}}let j=b.export({type:"pkcs8",format:"der"});return j.length<100&&(c+=f),{...n((0,d.createPublicKey)(b)),d:(0,e.encode)(j.subarray(c,c+a/2))}}case"ed25519":case"x25519":{let a=(0,h.default)(b);if("public"===b.type){let c=b.export({type:"spki",format:"der"});return{kty:"OKP",crv:a,x:(0,e.encode)(c.subarray(-32))}}let c=b.export({type:"pkcs8",format:"der"});return{...n((0,d.createPublicKey)(b)),d:(0,e.encode)(c.subarray(-32))}}case"ed448":case"x448":{let a=(0,h.default)(b);if("public"===b.type){let c=b.export({type:"spki",format:"der"});return{kty:"OKP",crv:a,x:(0,e.encode)(c.subarray("Ed448"===a?-57:-56))}}let c=b.export({type:"pkcs8",format:"der"});return{...n((0,d.createPublicKey)(b)),d:(0,e.encode)(c.subarray("Ed448"===a?-57:-56))}}default:throw new g.JOSENotSupported("Unsupported key asymmetricKeyType")}default:throw new g.JOSENotSupported("Unsupported key type")}};b.default=n},37210:a=>{a.exports=globalThis.structuredClone||(a=>JSON.parse(JSON.stringify(a)))},37434:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});let d=c(79428),e=c(14191),f=d.Buffer.from([0]),g=d.Buffer.from([2]),h=d.Buffer.from([3]),i=d.Buffer.from([48]),j=d.Buffer.from([4]),k=a=>{if(a<128)return d.Buffer.from([a]);let b=d.Buffer.alloc(5);b.writeUInt32BE(a,1);let c=1;for(;0===b[c];)c++;return b[c-1]=128|5-c,b.slice(c-1)},l=new Map([["P-256",d.Buffer.from("06 08 2A 86 48 CE 3D 03 01 07".replace(/ /g,""),"hex")],["secp256k1",d.Buffer.from("06 05 2B 81 04 00 0A".replace(/ /g,""),"hex")],["P-384",d.Buffer.from("06 05 2B 81 04 00 22".replace(/ /g,""),"hex")],["P-521",d.Buffer.from("06 05 2B 81 04 00 23".replace(/ /g,""),"hex")],["ecPublicKey",d.Buffer.from("06 07 2A 86 48 CE 3D 02 01".replace(/ /g,""),"hex")],["X25519",d.Buffer.from("06 03 2B 65 6E".replace(/ /g,""),"hex")],["X448",d.Buffer.from("06 03 2B 65 6F".replace(/ /g,""),"hex")],["Ed25519",d.Buffer.from("06 03 2B 65 70".replace(/ /g,""),"hex")],["Ed448",d.Buffer.from("06 03 2B 65 71".replace(/ /g,""),"hex")]]);class m{constructor(){this.length=0,this.elements=[]}oidFor(a){let b=l.get(a);if(!b)throw new e.JOSENotSupported("Invalid or unsupported OID");this.elements.push(b),this.length+=b.length}zero(){this.elements.push(g,d.Buffer.from([1]),f),this.length+=3}one(){this.elements.push(g,d.Buffer.from([1]),d.Buffer.from([1])),this.length+=3}unsignedInteger(a){if(128&a[0]){let b=k(a.length+1);this.elements.push(g,b,f,a),this.length+=2+b.length+a.length}else{let b=0;for(;0===a[b]&&(128&a[b+1])==0;)b++;let c=k(a.length-b);this.elements.push(g,k(a.length-b),a.slice(b)),this.length+=1+c.length+a.length-b}}octStr(a){let b=k(a.length);this.elements.push(j,k(a.length),a),this.length+=1+b.length+a.length}bitStr(a){let b=k(a.length+1);this.elements.push(h,k(a.length+1),f,a),this.length+=1+b.length+a.length+1}add(a){this.elements.push(a),this.length+=a.length}end(a=i){let b=k(this.length);return d.Buffer.concat([a,b,...this.elements],1+b.length+this.length)}}b.default=m},37692:(a,b,c)=>{let d=c(58872),e=c(51575);class f{constructor(a){Object.assign(this,a);const{constructor:b,...c}=Object.getOwnPropertyDescriptors(this.constructor.prototype);Object.defineProperties(this,c)}set expires_in(a){this.expires_at=e()+Number(a)}get expires_in(){return Math.max.apply(null,[this.expires_at-e(),0])}expired(){return 0===this.expires_in}claims(){if(!this.id_token)throw TypeError("id_token not present in TokenSet");return JSON.parse(d.decode(this.id_token.split(".")[1]))}}a.exports=f},38020:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ecdhAllowed=b.generateEpk=b.deriveKey=void 0;let d=c(55511),e=c(28354),f=c(82996),g=c(38569),h=c(14191),i=c(63549),j=c(4888),k=c(25092),l=c(72349),m=c(57944),n=(0,e.promisify)(d.generateKeyPair);b.deriveKey=async function(a,b,c,e,f=new Uint8Array(0),h=new Uint8Array(0)){let n,o;if((0,i.isCryptoKey)(a))(0,j.checkEncCryptoKey)(a,"ECDH"),n=d.KeyObject.from(a);else if((0,k.default)(a))n=a;else throw TypeError((0,l.default)(a,...m.types));if((0,i.isCryptoKey)(b))(0,j.checkEncCryptoKey)(b,"ECDH","deriveBits"),o=d.KeyObject.from(b);else if((0,k.default)(b))o=b;else throw TypeError((0,l.default)(b,...m.types));let p=(0,g.concat)((0,g.lengthAndInput)(g.encoder.encode(c)),(0,g.lengthAndInput)(f),(0,g.lengthAndInput)(h),(0,g.uint32be)(e)),q=(0,d.diffieHellman)({privateKey:o,publicKey:n});return(0,g.concatKdf)(q,e,p)},b.generateEpk=async function(a){let b;if((0,i.isCryptoKey)(a))b=d.KeyObject.from(a);else if((0,k.default)(a))b=a;else throw TypeError((0,l.default)(a,...m.types));switch(b.asymmetricKeyType){case"x25519":return n("x25519");case"x448":return n("x448");case"ec":return n("ec",{namedCurve:(0,f.default)(b)});default:throw new h.JOSENotSupported("Invalid or unsupported EPK")}},b.ecdhAllowed=a=>["P-256","P-384","P-521","X25519","X448"].includes((0,f.default)(a))},38569:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.concatKdf=b.lengthAndInput=b.uint32be=b.uint64be=b.p2s=b.concat=b.decoder=b.encoder=void 0;let d=c(12064);function e(...a){let b=new Uint8Array(a.reduce((a,{length:b})=>a+b,0)),c=0;return a.forEach(a=>{b.set(a,c),c+=a.length}),b}function f(a,b,c){if(b<0||b>=0x100000000)throw RangeError(`value must be >= 0 and <= ${0x100000000-1}. Received ${b}`);a.set([b>>>24,b>>>16,b>>>8,255&b],c)}function g(a){let b=new Uint8Array(4);return f(b,a),b}b.encoder=new TextEncoder,b.decoder=new TextDecoder,b.concat=e,b.p2s=function(a,c){return e(b.encoder.encode(a),new Uint8Array([0]),c)},b.uint64be=function(a){let b=Math.floor(a/0x100000000),c=new Uint8Array(8);return f(c,b,0),f(c,a%0x100000000,4),c},b.uint32be=g,b.lengthAndInput=function(a){return e(g(a.length),a)},b.concatKdf=async function(a,b,c){let e=Math.ceil((b>>3)/32),f=new Uint8Array(32*e);for(let b=0;b<e;b++){let e=new Uint8Array(4+a.length+c.length);e.set(g(b+1)),e.set(a,4),e.set(c,4+a.length),f.set(await (0,d.default)("sha256",e),32*b)}return f.slice(0,b>>3)}},39088:a=>{function b(){try{var c=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(a){}return(a.exports=b=function(){return!!c},a.exports.__esModule=!0,a.exports.default=a.exports)()}a.exports=b,a.exports.__esModule=!0,a.exports.default=a.exports},39154:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=function(a){var b;let c=new URL("http://localhost:3000/api/auth");a&&!a.startsWith("http")&&(a=`https://${a}`);let d=new URL(null!=(b=a)?b:c),e=("/"===d.pathname?c.pathname:d.pathname).replace(/\/$/,""),f=`${d.origin}${e}`;return{origin:d.origin,host:d.host,path:e,base:f,toString:()=>f}}},39644:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0})},39981:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=function(a){let{url:b,providerId:c}=a,f=a.providers.map(({options:a,...c})=>{var f,g;if("oauth"===c.type){let f=e(c),h=e(a,!0),i=null!=(g=null==h?void 0:h.id)?g:c.id;return(0,d.merge)(f,{...h,signinUrl:`${b}/signin/${i}`,callbackUrl:`${b}/callback/${i}`})}let h=null!=(f=null==a?void 0:a.id)?f:c.id;return(0,d.merge)(c,{...a,signinUrl:`${b}/signin/${h}`,callbackUrl:`${b}/callback/${h}`})});return{providers:f,provider:f.find(({id:a})=>a===c)}};var d=c(79113);function e(a,b=!1){var c,d,f,g,h;if(!a)return;let i=Object.entries(a).reduce((a,[b,c])=>{if(["authorization","token","userinfo"].includes(b)&&"string"==typeof c){var d;let e=new URL(c);a[b]={url:`${e.origin}${e.pathname}`,params:Object.fromEntries(null!=(d=e.searchParams)?d:[])}}else a[b]=c;return a},{});return b||null!=(c=i.version)&&c.startsWith("1.")||(i.idToken=!!(null!=(d=null!=(f=i.idToken)?f:null==(g=i.wellKnown)?void 0:g.includes("openid-configuration"))?d:null==(h=i.authorization)||null==(h=h.params)||null==(h=h.scope)?void 0:h.includes("openid")),i.checks||(i.checks=["state"])),i}},41361:(a,b,c)=>{"use strict";let d;Object.defineProperty(b,"__esModule",{value:!0});let e=c(55511),f=c(28354),g=c(84749),h=c(51136),i=c(43609),j=c(15398),k=c(92117);d=e.verify.length>4&&k.oneShotCallback?(0,f.promisify)(e.verify):e.verify,b.default=async(a,b,c,f)=>{let k=(0,j.default)(a,b,"verify");if(a.startsWith("HS")){let b=await (0,i.default)(a,k,f);try{return e.timingSafeEqual(c,b)}catch{return!1}}let l=(0,g.default)(a),m=(0,h.default)(a,k);try{return await d(l,f,m,c)}catch{return!1}}},41618:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=b.hkdf=void 0;let d=c(68586);function e(a,b){if("string"==typeof a)return new TextEncoder().encode(a);if(!(a instanceof Uint8Array))throw TypeError(`"${b}"" must be an instance of Uint8Array or a string`);return a}async function f(a,b,c,f,g){return(0,d.default)(function(a){switch(a){case"sha256":case"sha384":case"sha512":case"sha1":return a;default:throw TypeError('unsupported "digest" value')}}(a),function(a){let b=e(a,"ikm");if(!b.byteLength)throw TypeError('"ikm" must be at least one byte in length');return b}(b),e(c,"salt"),function(a){let b=e(a,"info");if(b.byteLength>1024)throw TypeError('"info" must not contain more than 1024 bytes');return b}(f),function(a,b){if("number"!=typeof a||!Number.isInteger(a)||a<1)throw TypeError('"keylen" must be a positive integer');if(a>255*(parseInt(b.substr(3),10)>>3||20))throw TypeError('"keylen" too large');return a}(g,a))}b.hkdf=f,b.default=f},41882:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});let d=c(14191),e=c(8758);b.default=(a,b)=>{if(b.length<<3!==(0,e.bitLength)(a))throw new d.JWEInvalid("Invalid Initialization Vector length")}},42138:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.oAuth1Client=function(a){var b,c;let e=a.provider,f=new d.OAuth(e.requestTokenUrl,e.accessTokenUrl,e.clientId,e.clientSecret,null!=(b=e.version)?b:"1.0",e.callbackUrl,null!=(c=e.encoding)?c:"HMAC-SHA1"),g=f.get.bind(f);f.get=async(...a)=>await new Promise((b,c)=>{g(...a,(a,d)=>{if(a)return c(a);b(d)})});let h=f.getOAuthAccessToken.bind(f);f.getOAuthAccessToken=async(...a)=>await new Promise((b,c)=>{h(...a,(a,d,e)=>{if(a)return c(a);b({oauth_token:d,oauth_token_secret:e})})});let i=f.getOAuthRequestToken.bind(f);return f.getOAuthRequestToken=async(a={})=>await new Promise((b,c)=>{i(a,(a,d,e,f)=>{if(a)return c(a);b({oauth_token:d,oauth_token_secret:e,params:f})})}),f},b.oAuth1TokenStore=void 0;var d=c(17600);b.oAuth1TokenStore=new Map},42828:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=function(a){return{headers:[{key:"Content-Type",value:"application/json"}],body:a.reduce((a,{id:b,name:c,type:d,signinUrl:e,callbackUrl:f})=>(a[b]={id:b,name:c,type:d,signinUrl:e,callbackUrl:f},a),{})}}},43101:(a,b,c)=>{"use strict";var d=c(31912);Object.defineProperty(b,"__esModule",{value:!0}),b.init=r;var e=c(55511),f=d(c(17149)),g=c(86460),h=d(c(39981)),i=c(60434),j=q(c(8137)),k=q(c(5421)),l=c(23123),m=c(56049),n=c(85664),o=d(c(39154));function p(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(p=function(a){return a?c:b})(a)}function q(a,b){if(!b&&a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var c=p(b);if(c&&c.has(a))return c.get(a);var d={__proto__:null},e=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in a)if("default"!==f&&({}).hasOwnProperty.call(a,f)){var g=e?Object.getOwnPropertyDescriptor(a,f):null;g&&(g.get||g.set)?Object.defineProperty(d,f,g):d[f]=a[f]}return d.default=a,c&&c.set(a,d),d}async function r({authOptions:a,providerId:b,action:c,origin:d,cookies:p,callbackUrl:q,csrfToken:s,isPost:t}){var u,v;let w=(0,o.default)(d),x=(0,i.createSecret)({authOptions:a,url:w}),{providers:y,provider:z}=(0,h.default)({providers:a.providers,url:w,providerId:b}),A={debug:!1,pages:{},theme:{colorScheme:"auto",logo:"",brandColor:"",buttonText:""},...a,url:w,action:c,provider:z,cookies:{...j.defaultCookies(null!=(u=a.useSecureCookies)?u:w.base.startsWith("https://")),...a.cookies},secret:x,providers:y,session:{strategy:a.adapter?"database":"jwt",maxAge:2592e3,updateAge:86400,generateSessionToken:()=>{var a;return null!=(a=null===e.randomUUID||void 0===e.randomUUID?void 0:(0,e.randomUUID)())?a:(0,e.randomBytes)(32).toString("hex")},...a.session},jwt:{secret:x,maxAge:2592e3,encode:k.encode,decode:k.decode,...a.jwt},events:(0,g.eventsErrorHandler)(null!=(v=a.events)?v:{},f.default),adapter:(0,g.adapterErrorHandler)(a.adapter,f.default),callbacks:{...l.defaultCallbacks,...a.callbacks},logger:f.default,callbackUrl:w.origin},B=[],{csrfToken:C,cookie:D,csrfTokenVerified:E}=(0,m.createCSRFToken)({options:A,cookieValue:null==p?void 0:p[A.cookies.csrfToken.name],isPost:t,bodyValue:s});A.csrfToken=C,A.csrfTokenVerified=E,D&&B.push({name:A.cookies.csrfToken.name,value:D,options:A.cookies.csrfToken.options});let{callbackUrl:F,callbackUrlCookie:G}=await (0,n.createCallbackUrl)({options:A,cookieValue:null==p?void 0:p[A.cookies.callbackUrl.name],paramValue:q});return A.callbackUrl=F,G&&B.push({name:A.cookies.callbackUrl.name,value:G,options:A.cookies.callbackUrl.options}),{options:A,cookies:B}}},43354:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default="node:crypto"},43549:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c={ActionDidNotRevalidate:function(){return e},ActionDidRevalidateDynamicOnly:function(){return g},ActionDidRevalidateStaticAndDynamic:function(){return f}};for(var d in c)Object.defineProperty(b,d,{enumerable:!0,get:c[d]});let e=0,f=1,g=2},43609:(a,b,c)=>{"use strict";let d;Object.defineProperty(b,"__esModule",{value:!0});let e=c(55511),f=c(28354),g=c(84749),h=c(21238),i=c(51136),j=c(15398);d=e.sign.length>3?(0,f.promisify)(e.sign):e.sign,b.default=async(a,b,c)=>{let f=(0,j.default)(a,b,"sign");if(a.startsWith("HS")){let b=e.createHmac((0,h.default)(a),f);return b.update(c),b.digest()}return d((0,g.default)(a),c,(0,i.default)(a,f))}},46217:(a,b)=>{"use strict";async function c(a){var b,c;let{options:d,sessionStore:e}=a,{adapter:f,events:g,jwt:h,callbackUrl:i,logger:j,session:k}=d,l=null==e?void 0:e.value;if(!l)return{redirect:i};if("jwt"===k.strategy)try{let a=await h.decode({...h,token:l});await (null==(b=g.signOut)?void 0:b.call(g,{token:a}))}catch(a){j.error("SIGNOUT_ERROR",a)}else try{let a=await f.deleteSession(l);await (null==(c=g.signOut)?void 0:c.call(g,{session:a}))}catch(a){j.error("SIGNOUT_ERROR",a)}return{redirect:i,cookies:e.clean()}}Object.defineProperty(b,"__esModule",{value:!0}),b.default=c},46486:(a,b,c)=>{"use strict";let d;Object.defineProperty(b,"__esModule",{value:!0});let e=c(55511);b.default=a=>(d||(d=new Set((0,e.getCiphers)())),d.has(a))},46855:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});let d=c(14191),e=c(25092);b.default=(a,b)=>{let c;switch(a){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":c=parseInt(a.slice(-3),10);break;case"A128GCM":case"A192GCM":case"A256GCM":c=parseInt(a.slice(1,4),10);break;default:throw new d.JOSENotSupported(`Content Encryption Algorithm ${a} is not supported either by JOSE or your javascript runtime`)}if(b instanceof Uint8Array){let a=b.byteLength<<3;if(a!==c)throw new d.JWEInvalid(`Invalid Content Encryption Key length. Expected ${c} bits, got ${a} bits`);return}if((0,e.default)(b)&&"secret"===b.type){let a=b.symmetricKeySize<<3;if(a!==c)throw new d.JWEInvalid(`Invalid Content Encryption Key length. Expected ${c} bits, got ${a} bits`);return}throw TypeError("Invalid Content Encryption Key type")}},46982:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.EmbeddedJWK=void 0;let d=c(34672),e=c(89879),f=c(14191);b.EmbeddedJWK=async function(a,b){let c={...a,...null==b?void 0:b.header};if(!(0,e.default)(c.jwk))throw new f.JWSInvalid('"jwk" (JSON Web Key) Header Parameter must be a JSON object');let g=await (0,d.importJWK)({...c.jwk,ext:!0},c.alg,!0);if(g instanceof Uint8Array||"public"!==g.type)throw new f.JWSInvalid('"jwk" (JSON Web Key) Header Parameter must be a public key');return g}},48487:(a,b,c)=>{let{STATUS_CODES:d}=c(81630),{format:e}=c(28354),{OPError:f}=c(28583),g=c(79789);a.exports=function(a,{statusCode:b=200,body:c=!0,bearer:h=!1}={}){if(a.statusCode!==b){if(h&&(a=>{let b=g(a.headers["www-authenticate"]);if(b.error)throw new f(b,a)})(a),(a=>{let b=!1;try{let c;c="object"!=typeof a.body||Buffer.isBuffer(a.body)?JSON.parse(a.body):a.body,(b="string"==typeof c.error&&c.error.length)&&Object.defineProperty(a,"body",{value:c,configurable:!0})}catch(a){}return b})(a))throw new f(a.body,a);throw new f({error:e("expected %i %s, got: %i %s",b,d[b],a.statusCode,d[a.statusCode])},a)}if(c&&!a.body)throw new f({error:e("expected %i %s with body but no body was returned",b,d[b])},a);return a.body}},48944:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.createLocalJWKSet=b.LocalJWKSet=b.isJWKSLike=void 0;let d=c(34672),e=c(14191),f=c(89879);function g(a){return a&&"object"==typeof a&&Array.isArray(a.keys)&&a.keys.every(h)}function h(a){return(0,f.default)(a)}b.isJWKSLike=g;class i{constructor(a){if(this._cached=new WeakMap,!g(a))throw new e.JWKSInvalid("JSON Web Key Set malformed");this._jwks=function(a){return"function"==typeof structuredClone?structuredClone(a):JSON.parse(JSON.stringify(a))}(a)}async getKey(a,b){let{alg:c,kid:d}={...a,...null==b?void 0:b.header},f=function(a){switch("string"==typeof a&&a.slice(0,2)){case"RS":case"PS":return"RSA";case"ES":return"EC";case"Ed":return"OKP";default:throw new e.JOSENotSupported('Unsupported "alg" value for a JSON Web Key Set')}}(c),g=this._jwks.keys.filter(a=>{let b=f===a.kty;if(b&&"string"==typeof d&&(b=d===a.kid),b&&"string"==typeof a.alg&&(b=c===a.alg),b&&"string"==typeof a.use&&(b="sig"===a.use),b&&Array.isArray(a.key_ops)&&(b=a.key_ops.includes("verify")),b&&"EdDSA"===c&&(b="Ed25519"===a.crv||"Ed448"===a.crv),b)switch(c){case"ES256":b="P-256"===a.crv;break;case"ES256K":b="secp256k1"===a.crv;break;case"ES384":b="P-384"===a.crv;break;case"ES512":b="P-521"===a.crv}return b}),{0:h,length:i}=g;if(0===i)throw new e.JWKSNoMatchingKey;if(1!==i){let a=new e.JWKSMultipleMatchingKeys,{_cached:b}=this;throw a[Symbol.asyncIterator]=async function*(){for(let a of g)try{yield await j(b,a,c)}catch{continue}},a}return j(this._cached,h,c)}}async function j(a,b,c){let f=a.get(b)||a.set(b,{}).get(b);if(void 0===f[c]){let a=await (0,d.importJWK)({...b,ext:!0},c);if(a instanceof Uint8Array||"public"!==a.type)throw new e.JWKSInvalid("JSON Web Key Set members must be public keys");f[c]=a}return f[c]}b.LocalJWKSet=i,b.createLocalJWKSet=function(a){let b=new i(a);return async function(a,c){return b.getKey(a,c)}}},49800:(a,b,c)=>{"use strict";var d=c(31912);Object.defineProperty(b,"__esModule",{value:!0}),b.default=function(a){var b;let{csrfToken:c,providers:d,callbackUrl:h,theme:i,email:j,error:k}=a,l=d.filter(a=>"oauth"===a.type||"email"===a.type||"credentials"===a.type&&!!a.credentials);"u">typeof document&&i.buttonText&&document.documentElement.style.setProperty("--button-text-color",i.buttonText),"u">typeof document&&i.brandColor&&document.documentElement.style.setProperty("--brand-color",i.brandColor);let m={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."},n=k&&(null!=(b=m[k])?b:m.default),o="https://authjs.dev/img/providers";return(0,e.h)("div",{className:"signin"},i.brandColor&&(0,e.h)("style",{dangerouslySetInnerHTML:{__html:`
2
2
  :root {
3
3
  --brand-color: ${i.brandColor}
4
4
  }
@@ -6,7 +6,7 @@ exports.id=902,exports.ids=[902],exports.modules={1025:a=>{a.exports=function(a)
6
6
  :root {
7
7
  --button-text-color: ${i.buttonText}
8
8
  }
9
- `}}),(0,e.h)("div",{className:"card"},i.logo&&(0,e.h)("img",{src:i.logo,alt:"Logo",className:"logo"}),n&&(0,e.h)("div",{className:"error"},(0,e.h)("p",null,n)),l.map((a,b)=>{let d,i,k,m,n,p;if("oauth"===a.type){var q;({bg:d="",text:i="",logo:k="",bgDark:n=d,textDark:p=i,logoDark:m=""}=null!=(q=a.style)?q:{}),k=k.startsWith("/")?`${o}${k}`:k,(m=m.startsWith("/")?`${o}${m}`:m||k)||(m=k)}return(0,e.h)("div",{key:a.id,className:"provider"},"oauth"===a.type&&(0,e.h)("form",{action:a.signinUrl,method:"POST"},(0,e.h)("input",{type:"hidden",name:"csrfToken",value:c}),h&&(0,e.h)("input",{type:"hidden",name:"callbackUrl",value:h}),(0,e.h)("button",{type:"submit",className:"button",style:{"--provider-bg":d,"--provider-dark-bg":n,"--provider-color":i,"--provider-dark-color":p,"--provider-bg-hover":g(d,.8),"--provider-dark-bg-hover":g(n,.8)}},k&&(0,e.h)("img",{loading:"lazy",height:24,width:24,id:"provider-logo",src:`${k.startsWith("/")?o:""}${k}`}),m&&(0,e.h)("img",{loading:"lazy",height:24,width:24,id:"provider-logo-dark",src:`${k.startsWith("/")?o:""}${m}`}),(0,e.h)("span",null,"Sign in with ",a.name))),("email"===a.type||"credentials"===a.type)&&b>0&&"email"!==l[b-1].type&&"credentials"!==l[b-1].type&&(0,e.h)("hr",null),"email"===a.type&&(0,e.h)("form",{action:a.signinUrl,method:"POST"},(0,e.h)("input",{type:"hidden",name:"csrfToken",value:c}),(0,e.h)("label",{className:"section-header",htmlFor:`input-email-for-${a.id}-provider`},"Email"),(0,e.h)("input",{id:`input-email-for-${a.id}-provider`,autoFocus:!0,type:"email",name:"email",value:j,placeholder:"email@example.com",required:!0}),(0,e.h)("button",{id:"submitButton",type:"submit"},"Sign in with ",a.name)),"credentials"===a.type&&(0,e.h)("form",{action:a.callbackUrl,method:"POST"},(0,e.h)("input",{type:"hidden",name:"csrfToken",value:c}),Object.keys(a.credentials).map(b=>{var c,d,g;return(0,e.h)("div",{key:`input-group-${a.id}`},(0,e.h)("label",{className:"section-header",htmlFor:`input-${b}-for-${a.id}-provider`},null!=(c=a.credentials[b].label)?c:b),(0,e.h)("input",(0,f.default)({name:b,id:`input-${b}-for-${a.id}-provider`,type:null!=(d=a.credentials[b].type)?d:"text",placeholder:null!=(g=a.credentials[b].placeholder)?g:""},a.credentials[b])))}),(0,e.h)("button",{type:"submit"},"Sign in with ",a.name)),("email"===a.type||"credentials"===a.type)&&b+1<l.length&&(0,e.h)("hr",null))})))};var e=c(16588),f=d(c(99048));function g(a,b=1){if(!a)return;3===(a=a.replace(/^#/,"")).length&&(a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]);let c=parseInt(a,16);return b=Math.min(Math.max(b,0),1),`rgba(${c>>16&255}, ${c>>8&255}, ${255&c}, ${b})`}},50849:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=void 0,b.getServerSession=h,b.unstable_getServerSession=i;var d=c(81767),e=c(72060);async function f(a,b,c){var f,g,h,i,j,k,l,m;let{nextauth:n,...o}=a.query;null!=c.secret||(c.secret=null!=(f=null!=(g=null==(h=c.jwt)?void 0:h.secret)?g:process.env.NEXTAUTH_SECRET)?f:process.env.AUTH_SECRET);let p=await (0,d.AuthHandler)({req:{body:a.body,query:o,cookies:a.cookies,headers:a.headers,method:a.method,action:null==n?void 0:n[0],providerId:null==n?void 0:n[1],error:null!=(i=a.query.error)?i:null==n?void 0:n[1]},options:c});if(b.status(null!=(j=p.status)?j:200),null==(k=p.cookies)||k.forEach(a=>(0,e.setCookie)(b,a)),null==(l=p.headers)||l.forEach(a=>b.setHeader(a.key,a.value)),p.redirect){if((null==(m=a.body)?void 0:m.json)!=="true"){b.status(302).setHeader("Location",p.redirect),b.end();return}return b.json({url:p.redirect})}return b.send(p.body)}async function g(a,b,f){var g,h,i;null!=f.secret||(f.secret=null!=(g=process.env.NEXTAUTH_SECRET)?g:process.env.AUTH_SECRET);let{headers:j,cookies:k}=c(94538),l=null==(h=await b.params)?void 0:h.nextauth,m=Object.fromEntries(a.nextUrl.searchParams),n=await (0,e.getBody)(a),o=await (0,d.AuthHandler)({req:{body:n,query:m,cookies:Object.fromEntries((await k()).getAll().map(a=>[a.name,a.value])),headers:Object.fromEntries(await j()),method:a.method,action:null==l?void 0:l[0],providerId:null==l?void 0:l[1],error:null!=(i=m.error)?i:null==l?void 0:l[1]},options:f}),p=(0,e.toResponse)(o),q=p.headers.get("Location");return(null==n?void 0:n.json)==="true"&&q?(p.headers.delete("Location"),p.headers.set("Content-Type","application/json"),new Response(JSON.stringify({url:q}),{status:o.status,headers:p.headers})):p}async function h(...a){var b,f;let g,i,j,k=0===a.length||1===a.length;if(k){j=Object.assign({},a[0],{providers:[]});let{headers:b,cookies:d}=c(94538);g={headers:Object.fromEntries(await b()),cookies:Object.fromEntries((await d()).getAll().map(a=>[a.name,a.value]))},i={getHeader(){},setCookie(){},setHeader(){}}}else g=a[0],i=a[1],j=Object.assign({},a[2],{providers:[]});null!=(b=j).secret||(b.secret=null!=(f=process.env.NEXTAUTH_SECRET)?f:process.env.AUTH_SECRET);let{body:l,cookies:m,status:n=200}=await (0,d.AuthHandler)({options:j,req:{action:"session",method:"GET",cookies:g.cookies,headers:g.headers}});if(null==m||m.forEach(a=>(0,e.setCookie)(i,a)),l&&"string"!=typeof l&&Object.keys(l).length){if(200===n)return k&&delete l.expires,l;throw Error(l.message)}return null}async function i(...a){return await h(...a)}b.default=function(...a){var b;return 1===a.length?async(b,c)=>null!=c&&c.params?await g(b,c,a[0]):await f(b,c,a[0]):null!=(b=a[1])&&b.params?g(...a):f(...a)}},50852:a=>{"use strict";a.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}]}}')},51136:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});let d=c(55511),e=c(82996),f=c(14191),g=c(35243),h=c(92117),i={padding:d.constants.RSA_PKCS1_PSS_PADDING,saltLength:d.constants.RSA_PSS_SALTLEN_DIGEST},j=new Map([["ES256","P-256"],["ES256K","secp256k1"],["ES384","P-384"],["ES512","P-521"]]);b.default=function(a,b){switch(a){case"EdDSA":if(!["ed25519","ed448"].includes(b.asymmetricKeyType))throw TypeError("Invalid key for this operation, its asymmetricKeyType must be ed25519 or ed448");return b;case"RS256":case"RS384":case"RS512":if("rsa"!==b.asymmetricKeyType)throw TypeError("Invalid key for this operation, its asymmetricKeyType must be rsa");return(0,g.default)(b,a),b;case h.rsaPssParams&&"PS256":case h.rsaPssParams&&"PS384":case h.rsaPssParams&&"PS512":if("rsa-pss"===b.asymmetricKeyType){let{hashAlgorithm:c,mgf1HashAlgorithm:d,saltLength:e}=b.asymmetricKeyDetails,f=parseInt(a.slice(-3),10);if(void 0!==c&&(c!==`sha${f}`||d!==c))throw TypeError(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${a}`);if(void 0!==e&&e>f>>3)throw TypeError(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${a}`)}else if("rsa"!==b.asymmetricKeyType)throw TypeError("Invalid key for this operation, its asymmetricKeyType must be rsa or rsa-pss");return(0,g.default)(b,a),{key:b,...i};case!h.rsaPssParams&&"PS256":case!h.rsaPssParams&&"PS384":case!h.rsaPssParams&&"PS512":if("rsa"!==b.asymmetricKeyType)throw TypeError("Invalid key for this operation, its asymmetricKeyType must be rsa");return(0,g.default)(b,a),{key:b,...i};case"ES256":case"ES256K":case"ES384":case"ES512":{if("ec"!==b.asymmetricKeyType)throw TypeError("Invalid key for this operation, its asymmetricKeyType must be ec");let c=(0,e.default)(b),d=j.get(a);if(c!==d)throw TypeError(`Invalid key curve for the algorithm, its curve must be ${d}, got ${c}`);return{dsaEncoding:"ieee-p1363",key:b}}default:throw new f.JOSENotSupported(`alg ${a} is not supported either by JOSE or your javascript runtime`)}}},51243:(a,b,c)=>{var d=c(55511),e=c(7435),f=c(81630),g=c(55591),h=c(79551),i=c(11723),j=c(69268);b.OAuth=function(a,b,c,d,e,f,g,h,i){if(this._isEcho=!1,this._requestUrl=a,this._accessUrl=b,this._consumerKey=c,this._consumerSecret=this._encodeData(d),"RSA-SHA1"==g&&(this._privateKey=d),this._version=e,void 0===f?this._authorize_callback="oob":this._authorize_callback=f,"PLAINTEXT"!=g&&"HMAC-SHA1"!=g&&"RSA-SHA1"!=g)throw Error("Un-supported signature method: "+g);this._signatureMethod=g,this._nonceSize=h||32,this._headers=i||{Accept:"*/*",Connection:"close","User-Agent":"Node authentication"},this._clientOptions=this._defaultClientOptions={requestTokenHttpMethod:"POST",accessTokenHttpMethod:"POST",followRedirects:!0},this._oauthParameterSeperator=","},b.OAuthEcho=function(a,b,c,d,e,f,g,h){if(this._isEcho=!0,this._realm=a,this._verifyCredentials=b,this._consumerKey=c,this._consumerSecret=this._encodeData(d),"RSA-SHA1"==f&&(this._privateKey=d),this._version=e,"PLAINTEXT"!=f&&"HMAC-SHA1"!=f&&"RSA-SHA1"!=f)throw Error("Un-supported signature method: "+f);this._signatureMethod=f,this._nonceSize=g||32,this._headers=h||{Accept:"*/*",Connection:"close","User-Agent":"Node authentication"},this._oauthParameterSeperator=","},b.OAuthEcho.prototype=b.OAuth.prototype,b.OAuth.prototype._getTimestamp=function(){return Math.floor(new Date().getTime()/1e3)},b.OAuth.prototype._encodeData=function(a){return null==a||""==a?"":encodeURIComponent(a).replace(/\!/g,"%21").replace(/\'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")},b.OAuth.prototype._decodeData=function(a){return null!=a&&(a=a.replace(/\+/g," ")),decodeURIComponent(a)},b.OAuth.prototype._getSignature=function(a,b,c,d){var e=this._createSignatureBase(a,b,c);return this._createSignature(e,d)},b.OAuth.prototype._normalizeUrl=function(a){var b=h.parse(a,!0),c="";return b.port&&("http:"==b.protocol&&"80"!=b.port||"https:"==b.protocol&&"443"!=b.port)&&(c=":"+b.port),b.pathname&&""!=b.pathname||(b.pathname="/"),b.protocol+"//"+b.hostname+c+b.pathname},b.OAuth.prototype._isParameterNameAnOAuthParameter=function(a){var b=a.match("^oauth_");return!!b&&"oauth_"===b[0]},b.OAuth.prototype._buildAuthorizationHeaders=function(a){var b="OAuth ";this._isEcho&&(b+='realm="'+this._realm+'",');for(var c=0;c<a.length;c++)this._isParameterNameAnOAuthParameter(a[c][0])&&(b+=""+this._encodeData(a[c][0])+'="'+this._encodeData(a[c][1])+'"'+this._oauthParameterSeperator);return b.substring(0,b.length-this._oauthParameterSeperator.length)},b.OAuth.prototype._makeArrayOfArgumentsHash=function(a){var b=[];for(var c in a)if(a.hasOwnProperty(c)){var d=a[c];if(Array.isArray(d))for(var e=0;e<d.length;e++)b[b.length]=[c,d[e]];else b[b.length]=[c,d]}return b},b.OAuth.prototype._sortRequestParams=function(a){return a.sort(function(a,b){return a[0]==b[0]?a[1]<b[1]?-1:1:a[0]<b[0]?-1:1}),a},b.OAuth.prototype._normaliseRequestParams=function(a){for(var b=this._makeArrayOfArgumentsHash(a),c=0;c<b.length;c++)b[c][0]=this._encodeData(b[c][0]),b[c][1]=this._encodeData(b[c][1]);b=this._sortRequestParams(b);for(var a="",c=0;c<b.length;c++)a+=b[c][0],a+="=",a+=b[c][1],c<b.length-1&&(a+="&");return a},b.OAuth.prototype._createSignatureBase=function(a,b,c){return b=this._encodeData(this._normalizeUrl(b)),c=this._encodeData(c),a.toUpperCase()+"&"+b+"&"+c},b.OAuth.prototype._createSignature=function(a,b){if(void 0===b)var b="";else b=this._encodeData(b);var c=this._consumerSecret+"&"+b,f="";return"PLAINTEXT"==this._signatureMethod?f=c:"RSA-SHA1"==this._signatureMethod?(c=this._privateKey||"",f=d.createSign("RSA-SHA1").update(a).sign(c,"base64")):f=d.Hmac?d.createHmac("sha1",c).update(a).digest("base64"):e.HMACSHA1(c,a),f},b.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"],b.OAuth.prototype._getNonce=function(a){for(var b,c=[],d=this.NONCE_CHARS,e=d.length,f=0;f<a;f++)b=Math.floor(Math.random()*e),c[f]=d[b];return c.join("")},b.OAuth.prototype._createClient=function(a,b,c,d,e,h){return(h?g:f).request({host:b,port:a,path:d,method:c,headers:e})},b.OAuth.prototype._prepareParameters=function(a,b,c,d,e){var f={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(a&&(f.oauth_token=a),this._isEcho)k=this._getSignature("GET",this._verifyCredentials,this._normaliseRequestParams(f),b);else{if(e)for(var g in e)e.hasOwnProperty(g)&&(f[g]=e[g]);var j=h.parse(d,!1);if(j.query){var k,l,m=i.parse(j.query);for(var g in m){var n=m[g];if("object"==typeof n)for(l in n)f[g+"["+l+"]"]=n[l];else f[g]=n}}k=this._getSignature(c,d,this._normaliseRequestParams(f),b)}var o=this._sortRequestParams(this._makeArrayOfArgumentsHash(f));return o[o.length]=["oauth_signature",k],o},b.OAuth.prototype._performSecureRequest=function(a,b,c,d,e,f,g,k){var l,m,n=this._prepareParameters(a,b,c,d,e);g||(g="application/x-www-form-urlencoded");var o=h.parse(d,!1);"http:"!=o.protocol||o.port||(o.port=80),"https:"!=o.protocol||o.port||(o.port=443);var p={},q=this._buildAuthorizationHeaders(n);for(var r in this._isEcho?p["X-Verify-Credentials-Authorization"]=q:p.Authorization=q,p.Host=o.host,this._headers)this._headers.hasOwnProperty(r)&&(p[r]=this._headers[r]);for(var r in e)this._isParameterNameAnOAuthParameter(r)&&delete e[r];("POST"==c||"PUT"==c)&&null==f&&null!=e&&(f=i.stringify(e).replace(/\!/g,"%21").replace(/\'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")),f?Buffer.isBuffer(f)?p["Content-length"]=f.length:p["Content-length"]=Buffer.byteLength(f):p["Content-length"]=0,p["Content-Type"]=g,o.pathname&&""!=o.pathname||(o.pathname="/"),l=o.query?o.pathname+"?"+o.query:o.pathname,m="https:"==o.protocol?this._createClient(o.port,o.hostname,c,l,p,!0):this._createClient(o.port,o.hostname,c,l,p);var s=this._clientOptions;if(!k)return("POST"==c||"PUT"==c)&&null!=f&&""!=f&&m.write(f),m;var t="",u=this,v=j.isAnEarlyCloseHost(o.hostname),w=!1,x=function(d){w||(w=!0,d.statusCode>=200&&d.statusCode<=299?k(null,t,d):(301==d.statusCode||302==d.statusCode)&&s.followRedirects&&d.headers&&d.headers.location?u._performSecureRequest(a,b,c,d.headers.location,e,f,g,k):k({statusCode:d.statusCode,data:t},t,d))};m.on("response",function(a){a.setEncoding("utf8"),a.on("data",function(a){t+=a}),a.on("end",function(){x(a)}),a.on("close",function(){v&&x(a)})}),m.on("error",function(a){w||(w=!0,k(a))}),("POST"==c||"PUT"==c)&&null!=f&&""!=f&&m.write(f),m.end()},b.OAuth.prototype.setClientOptions=function(a){var b,c={},d=Object.prototype.hasOwnProperty;for(b in this._defaultClientOptions)d.call(a,b)?c[b]=a[b]:c[b]=this._defaultClientOptions[b];this._clientOptions=c},b.OAuth.prototype.getOAuthAccessToken=function(a,b,c,d){var e={};"function"==typeof c?d=c:e.oauth_verifier=c,this._performSecureRequest(a,b,this._clientOptions.accessTokenHttpMethod,this._accessUrl,e,null,null,function(a,b,c){if(a)d(a);else{var e=i.parse(b),f=e.oauth_token;delete e.oauth_token;var g=e.oauth_token_secret;delete e.oauth_token_secret,d(null,f,g,e)}})},b.OAuth.prototype.getProtectedResource=function(a,b,c,d,e){this._performSecureRequest(c,d,b,a,null,"",null,e)},b.OAuth.prototype.delete=function(a,b,c,d){return this._performSecureRequest(b,c,"DELETE",a,null,"",null,d)},b.OAuth.prototype.get=function(a,b,c,d){return this._performSecureRequest(b,c,"GET",a,null,"",null,d)},b.OAuth.prototype._putOrPost=function(a,b,c,d,e,f,g){var h=null;return"function"==typeof f&&(g=f,f=null),"string"==typeof e||Buffer.isBuffer(e)||(f="application/x-www-form-urlencoded",h=e,e=null),this._performSecureRequest(c,d,a,b,h,e,f,g)},b.OAuth.prototype.put=function(a,b,c,d,e,f){return this._putOrPost("PUT",a,b,c,d,e,f)},b.OAuth.prototype.post=function(a,b,c,d,e,f){return this._putOrPost("POST",a,b,c,d,e,f)},b.OAuth.prototype.getOAuthRequestToken=function(a,b){"function"==typeof a&&(b=a,a={}),this._authorize_callback&&(a.oauth_callback=this._authorize_callback),this._performSecureRequest(null,null,this._clientOptions.requestTokenHttpMethod,this._requestUrl,a,null,null,function(a,c,d){if(a)b(a);else{var e=i.parse(c),f=e.oauth_token,g=e.oauth_token_secret;delete e.oauth_token,delete e.oauth_token_secret,b(null,f,g,e)}})},b.OAuth.prototype.signUrl=function(a,b,c,d){if(void 0===d)var d="GET";for(var e=this._prepareParameters(b,c,d,a,{}),f=h.parse(a,!1),g="",i=0;i<e.length;i++)g+=e[i][0]+"="+this._encodeData(e[i][1])+"&";return g=g.substring(0,g.length-1),f.protocol+"//"+f.host+f.pathname+"?"+g},b.OAuth.prototype.authHeader=function(a,b,c,d){if(void 0===d)var d="GET";var e=this._prepareParameters(b,c,d,a,{});return this._buildAuthorizationHeaders(e)}},51575:a=>{a.exports=()=>Math.floor(Date.now()/1e3)},52345:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.fromX509=b.fromSPKI=b.fromPKCS8=b.toPKCS8=b.toSPKI=void 0;let d=c(55511),e=c(79428),f=c(63549),g=c(25092),h=c(72349),i=c(57944),j=(a,b,c)=>{let e;if((0,f.isCryptoKey)(c)){if(!c.extractable)throw TypeError("CryptoKey is not extractable");e=d.KeyObject.from(c)}else if((0,g.default)(c))e=c;else throw TypeError((0,h.default)(c,...i.types));if(e.type!==a)throw TypeError(`key is not a ${a} key`);return e.export({format:"pem",type:b})};b.toSPKI=a=>j("public","spki",a),b.toPKCS8=a=>j("private","pkcs8",a),b.fromPKCS8=a=>(0,d.createPrivateKey)({key:e.Buffer.from(a.replace(/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g,""),"base64"),type:"pkcs8",format:"der"}),b.fromSPKI=a=>(0,d.createPublicKey)({key:e.Buffer.from(a.replace(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g,""),"base64"),type:"spki",format:"der"}),b.fromX509=a=>(0,d.createPublicKey)({key:a,type:"spki",format:"pem"})},52459:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.compactDecrypt=void 0;let d=c(96225),e=c(14191),f=c(38569);b.compactDecrypt=async function(a,b,c){if(a instanceof Uint8Array&&(a=f.decoder.decode(a)),"string"!=typeof a)throw new e.JWEInvalid("Compact JWE must be a string or Uint8Array");let{0:g,1:h,2:i,3:j,4:k,length:l}=a.split(".");if(5!==l)throw new e.JWEInvalid("Invalid Compact JWE");let m=await (0,d.flattenedDecrypt)({ciphertext:j,iv:i||void 0,protected:g||void 0,tag:k||void 0,encrypted_key:h||void 0},b,c),n={plaintext:m.plaintext,protectedHeader:m.protectedHeader};return"function"==typeof b?{...n,key:m.key}:n}},52503:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=function(a){let{url:b,theme:c}=a;return(0,d.h)("div",{className:"verify-request"},c.brandColor&&(0,d.h)("style",{dangerouslySetInnerHTML:{__html:`
9
+ `}}),(0,e.h)("div",{className:"card"},i.logo&&(0,e.h)("img",{src:i.logo,alt:"Logo",className:"logo"}),n&&(0,e.h)("div",{className:"error"},(0,e.h)("p",null,n)),l.map((a,b)=>{let d,i,k,m,n,p;if("oauth"===a.type){var q;({bg:d="",text:i="",logo:k="",bgDark:n=d,textDark:p=i,logoDark:m=""}=null!=(q=a.style)?q:{}),k=k.startsWith("/")?`${o}${k}`:k,(m=m.startsWith("/")?`${o}${m}`:m||k)||(m=k)}return(0,e.h)("div",{key:a.id,className:"provider"},"oauth"===a.type&&(0,e.h)("form",{action:a.signinUrl,method:"POST"},(0,e.h)("input",{type:"hidden",name:"csrfToken",value:c}),h&&(0,e.h)("input",{type:"hidden",name:"callbackUrl",value:h}),(0,e.h)("button",{type:"submit",className:"button",style:{"--provider-bg":d,"--provider-dark-bg":n,"--provider-color":i,"--provider-dark-color":p,"--provider-bg-hover":g(d,.8),"--provider-dark-bg-hover":g(n,.8)}},k&&(0,e.h)("img",{loading:"lazy",height:24,width:24,id:"provider-logo",src:`${k.startsWith("/")?o:""}${k}`}),m&&(0,e.h)("img",{loading:"lazy",height:24,width:24,id:"provider-logo-dark",src:`${k.startsWith("/")?o:""}${m}`}),(0,e.h)("span",null,"Sign in with ",a.name))),("email"===a.type||"credentials"===a.type)&&b>0&&"email"!==l[b-1].type&&"credentials"!==l[b-1].type&&(0,e.h)("hr",null),"email"===a.type&&(0,e.h)("form",{action:a.signinUrl,method:"POST"},(0,e.h)("input",{type:"hidden",name:"csrfToken",value:c}),(0,e.h)("label",{className:"section-header",htmlFor:`input-email-for-${a.id}-provider`},"Email"),(0,e.h)("input",{id:`input-email-for-${a.id}-provider`,autoFocus:!0,type:"email",name:"email",value:j,placeholder:"email@example.com",required:!0}),(0,e.h)("button",{id:"submitButton",type:"submit"},"Sign in with ",a.name)),"credentials"===a.type&&(0,e.h)("form",{action:a.callbackUrl,method:"POST"},(0,e.h)("input",{type:"hidden",name:"csrfToken",value:c}),Object.keys(a.credentials).map(b=>{var c,d,g;return(0,e.h)("div",{key:`input-group-${a.id}`},(0,e.h)("label",{className:"section-header",htmlFor:`input-${b}-for-${a.id}-provider`},null!=(c=a.credentials[b].label)?c:b),(0,e.h)("input",(0,f.default)({name:b,id:`input-${b}-for-${a.id}-provider`,type:null!=(d=a.credentials[b].type)?d:"text",placeholder:null!=(g=a.credentials[b].placeholder)?g:""},a.credentials[b])))}),(0,e.h)("button",{type:"submit"},"Sign in with ",a.name)),("email"===a.type||"credentials"===a.type)&&b+1<l.length&&(0,e.h)("hr",null))})))};var e=c(16588),f=d(c(99048));function g(a,b=1){if(!a)return;3===(a=a.replace(/^#/,"")).length&&(a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]);let c=parseInt(a,16);return b=Math.min(Math.max(b,0),1),`rgba(${c>>16&255}, ${c>>8&255}, ${255&c}, ${b})`}},50379:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"createDedupedByCallsiteServerErrorLoggerDev",{enumerable:!0,get:function(){return i}});let d=function(a){if(a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var b=e(void 0);if(b&&b.has(a))return b.get(a);var c={__proto__:null},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in a)if("default"!==f&&Object.prototype.hasOwnProperty.call(a,f)){var g=d?Object.getOwnPropertyDescriptor(a,f):null;g&&(g.get||g.set)?Object.defineProperty(c,f,g):c[f]=a[f]}return c.default=a,b&&b.set(a,c),c}(c(15483));function e(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(e=function(a){return a?c:b})(a)}let f={current:null},g="function"==typeof d.cache?d.cache:a=>a,h=console.warn;function i(a){return function(...b){h(a(...b))}}g(a=>{try{h(f.current)}finally{f.current=null}})},50849:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=void 0,b.getServerSession=h,b.unstable_getServerSession=i;var d=c(81767),e=c(72060);async function f(a,b,c){var f,g,h,i,j,k,l,m;let{nextauth:n,...o}=a.query;null!=c.secret||(c.secret=null!=(f=null!=(g=null==(h=c.jwt)?void 0:h.secret)?g:process.env.NEXTAUTH_SECRET)?f:process.env.AUTH_SECRET);let p=await (0,d.AuthHandler)({req:{body:a.body,query:o,cookies:a.cookies,headers:a.headers,method:a.method,action:null==n?void 0:n[0],providerId:null==n?void 0:n[1],error:null!=(i=a.query.error)?i:null==n?void 0:n[1]},options:c});if(b.status(null!=(j=p.status)?j:200),null==(k=p.cookies)||k.forEach(a=>(0,e.setCookie)(b,a)),null==(l=p.headers)||l.forEach(a=>b.setHeader(a.key,a.value)),p.redirect){if((null==(m=a.body)?void 0:m.json)!=="true"){b.status(302).setHeader("Location",p.redirect),b.end();return}return b.json({url:p.redirect})}return b.send(p.body)}async function g(a,b,f){var g,h,i;null!=f.secret||(f.secret=null!=(g=process.env.NEXTAUTH_SECRET)?g:process.env.AUTH_SECRET);let{headers:j,cookies:k}=c(94538),l=null==(h=await b.params)?void 0:h.nextauth,m=Object.fromEntries(a.nextUrl.searchParams),n=await (0,e.getBody)(a),o=await (0,d.AuthHandler)({req:{body:n,query:m,cookies:Object.fromEntries((await k()).getAll().map(a=>[a.name,a.value])),headers:Object.fromEntries(await j()),method:a.method,action:null==l?void 0:l[0],providerId:null==l?void 0:l[1],error:null!=(i=m.error)?i:null==l?void 0:l[1]},options:f}),p=(0,e.toResponse)(o),q=p.headers.get("Location");return(null==n?void 0:n.json)==="true"&&q?(p.headers.delete("Location"),p.headers.set("Content-Type","application/json"),new Response(JSON.stringify({url:q}),{status:o.status,headers:p.headers})):p}async function h(...a){var b,f;let g,i,j,k=0===a.length||1===a.length;if(k){j=Object.assign({},a[0],{providers:[]});let{headers:b,cookies:d}=c(94538);g={headers:Object.fromEntries(await b()),cookies:Object.fromEntries((await d()).getAll().map(a=>[a.name,a.value]))},i={getHeader(){},setCookie(){},setHeader(){}}}else g=a[0],i=a[1],j=Object.assign({},a[2],{providers:[]});null!=(b=j).secret||(b.secret=null!=(f=process.env.NEXTAUTH_SECRET)?f:process.env.AUTH_SECRET);let{body:l,cookies:m,status:n=200}=await (0,d.AuthHandler)({options:j,req:{action:"session",method:"GET",cookies:g.cookies,headers:g.headers}});if(null==m||m.forEach(a=>(0,e.setCookie)(i,a)),l&&"string"!=typeof l&&Object.keys(l).length){if(200===n)return k&&delete l.expires,l;throw Error(l.message)}return null}async function i(...a){return await h(...a)}b.default=function(...a){var b;return 1===a.length?async(b,c)=>null!=c&&c.params?await g(b,c,a[0]):await f(b,c,a[0]):null!=(b=a[1])&&b.params?g(...a):f(...a)}},50852:a=>{"use strict";a.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}]}}')},51136:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});let d=c(55511),e=c(82996),f=c(14191),g=c(35243),h=c(92117),i={padding:d.constants.RSA_PKCS1_PSS_PADDING,saltLength:d.constants.RSA_PSS_SALTLEN_DIGEST},j=new Map([["ES256","P-256"],["ES256K","secp256k1"],["ES384","P-384"],["ES512","P-521"]]);b.default=function(a,b){switch(a){case"EdDSA":if(!["ed25519","ed448"].includes(b.asymmetricKeyType))throw TypeError("Invalid key for this operation, its asymmetricKeyType must be ed25519 or ed448");return b;case"RS256":case"RS384":case"RS512":if("rsa"!==b.asymmetricKeyType)throw TypeError("Invalid key for this operation, its asymmetricKeyType must be rsa");return(0,g.default)(b,a),b;case h.rsaPssParams&&"PS256":case h.rsaPssParams&&"PS384":case h.rsaPssParams&&"PS512":if("rsa-pss"===b.asymmetricKeyType){let{hashAlgorithm:c,mgf1HashAlgorithm:d,saltLength:e}=b.asymmetricKeyDetails,f=parseInt(a.slice(-3),10);if(void 0!==c&&(c!==`sha${f}`||d!==c))throw TypeError(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${a}`);if(void 0!==e&&e>f>>3)throw TypeError(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${a}`)}else if("rsa"!==b.asymmetricKeyType)throw TypeError("Invalid key for this operation, its asymmetricKeyType must be rsa or rsa-pss");return(0,g.default)(b,a),{key:b,...i};case!h.rsaPssParams&&"PS256":case!h.rsaPssParams&&"PS384":case!h.rsaPssParams&&"PS512":if("rsa"!==b.asymmetricKeyType)throw TypeError("Invalid key for this operation, its asymmetricKeyType must be rsa");return(0,g.default)(b,a),{key:b,...i};case"ES256":case"ES256K":case"ES384":case"ES512":{if("ec"!==b.asymmetricKeyType)throw TypeError("Invalid key for this operation, its asymmetricKeyType must be ec");let c=(0,e.default)(b),d=j.get(a);if(c!==d)throw TypeError(`Invalid key curve for the algorithm, its curve must be ${d}, got ${c}`);return{dsaEncoding:"ieee-p1363",key:b}}default:throw new f.JOSENotSupported(`alg ${a} is not supported either by JOSE or your javascript runtime`)}}},51243:(a,b,c)=>{var d=c(55511),e=c(7435),f=c(81630),g=c(55591),h=c(79551),i=c(11723),j=c(69268);b.OAuth=function(a,b,c,d,e,f,g,h,i){if(this._isEcho=!1,this._requestUrl=a,this._accessUrl=b,this._consumerKey=c,this._consumerSecret=this._encodeData(d),"RSA-SHA1"==g&&(this._privateKey=d),this._version=e,void 0===f?this._authorize_callback="oob":this._authorize_callback=f,"PLAINTEXT"!=g&&"HMAC-SHA1"!=g&&"RSA-SHA1"!=g)throw Error("Un-supported signature method: "+g);this._signatureMethod=g,this._nonceSize=h||32,this._headers=i||{Accept:"*/*",Connection:"close","User-Agent":"Node authentication"},this._clientOptions=this._defaultClientOptions={requestTokenHttpMethod:"POST",accessTokenHttpMethod:"POST",followRedirects:!0},this._oauthParameterSeperator=","},b.OAuthEcho=function(a,b,c,d,e,f,g,h){if(this._isEcho=!0,this._realm=a,this._verifyCredentials=b,this._consumerKey=c,this._consumerSecret=this._encodeData(d),"RSA-SHA1"==f&&(this._privateKey=d),this._version=e,"PLAINTEXT"!=f&&"HMAC-SHA1"!=f&&"RSA-SHA1"!=f)throw Error("Un-supported signature method: "+f);this._signatureMethod=f,this._nonceSize=g||32,this._headers=h||{Accept:"*/*",Connection:"close","User-Agent":"Node authentication"},this._oauthParameterSeperator=","},b.OAuthEcho.prototype=b.OAuth.prototype,b.OAuth.prototype._getTimestamp=function(){return Math.floor(new Date().getTime()/1e3)},b.OAuth.prototype._encodeData=function(a){return null==a||""==a?"":encodeURIComponent(a).replace(/\!/g,"%21").replace(/\'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")},b.OAuth.prototype._decodeData=function(a){return null!=a&&(a=a.replace(/\+/g," ")),decodeURIComponent(a)},b.OAuth.prototype._getSignature=function(a,b,c,d){var e=this._createSignatureBase(a,b,c);return this._createSignature(e,d)},b.OAuth.prototype._normalizeUrl=function(a){var b=h.parse(a,!0),c="";return b.port&&("http:"==b.protocol&&"80"!=b.port||"https:"==b.protocol&&"443"!=b.port)&&(c=":"+b.port),b.pathname&&""!=b.pathname||(b.pathname="/"),b.protocol+"//"+b.hostname+c+b.pathname},b.OAuth.prototype._isParameterNameAnOAuthParameter=function(a){var b=a.match("^oauth_");return!!b&&"oauth_"===b[0]},b.OAuth.prototype._buildAuthorizationHeaders=function(a){var b="OAuth ";this._isEcho&&(b+='realm="'+this._realm+'",');for(var c=0;c<a.length;c++)this._isParameterNameAnOAuthParameter(a[c][0])&&(b+=""+this._encodeData(a[c][0])+'="'+this._encodeData(a[c][1])+'"'+this._oauthParameterSeperator);return b.substring(0,b.length-this._oauthParameterSeperator.length)},b.OAuth.prototype._makeArrayOfArgumentsHash=function(a){var b=[];for(var c in a)if(a.hasOwnProperty(c)){var d=a[c];if(Array.isArray(d))for(var e=0;e<d.length;e++)b[b.length]=[c,d[e]];else b[b.length]=[c,d]}return b},b.OAuth.prototype._sortRequestParams=function(a){return a.sort(function(a,b){return a[0]==b[0]?a[1]<b[1]?-1:1:a[0]<b[0]?-1:1}),a},b.OAuth.prototype._normaliseRequestParams=function(a){for(var b=this._makeArrayOfArgumentsHash(a),c=0;c<b.length;c++)b[c][0]=this._encodeData(b[c][0]),b[c][1]=this._encodeData(b[c][1]);b=this._sortRequestParams(b);for(var a="",c=0;c<b.length;c++)a+=b[c][0],a+="=",a+=b[c][1],c<b.length-1&&(a+="&");return a},b.OAuth.prototype._createSignatureBase=function(a,b,c){return b=this._encodeData(this._normalizeUrl(b)),c=this._encodeData(c),a.toUpperCase()+"&"+b+"&"+c},b.OAuth.prototype._createSignature=function(a,b){if(void 0===b)var b="";else b=this._encodeData(b);var c=this._consumerSecret+"&"+b,f="";return"PLAINTEXT"==this._signatureMethod?f=c:"RSA-SHA1"==this._signatureMethod?(c=this._privateKey||"",f=d.createSign("RSA-SHA1").update(a).sign(c,"base64")):f=d.Hmac?d.createHmac("sha1",c).update(a).digest("base64"):e.HMACSHA1(c,a),f},b.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"],b.OAuth.prototype._getNonce=function(a){for(var b,c=[],d=this.NONCE_CHARS,e=d.length,f=0;f<a;f++)b=Math.floor(Math.random()*e),c[f]=d[b];return c.join("")},b.OAuth.prototype._createClient=function(a,b,c,d,e,h){return(h?g:f).request({host:b,port:a,path:d,method:c,headers:e})},b.OAuth.prototype._prepareParameters=function(a,b,c,d,e){var f={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(a&&(f.oauth_token=a),this._isEcho)k=this._getSignature("GET",this._verifyCredentials,this._normaliseRequestParams(f),b);else{if(e)for(var g in e)e.hasOwnProperty(g)&&(f[g]=e[g]);var j=h.parse(d,!1);if(j.query){var k,l,m=i.parse(j.query);for(var g in m){var n=m[g];if("object"==typeof n)for(l in n)f[g+"["+l+"]"]=n[l];else f[g]=n}}k=this._getSignature(c,d,this._normaliseRequestParams(f),b)}var o=this._sortRequestParams(this._makeArrayOfArgumentsHash(f));return o[o.length]=["oauth_signature",k],o},b.OAuth.prototype._performSecureRequest=function(a,b,c,d,e,f,g,k){var l,m,n=this._prepareParameters(a,b,c,d,e);g||(g="application/x-www-form-urlencoded");var o=h.parse(d,!1);"http:"!=o.protocol||o.port||(o.port=80),"https:"!=o.protocol||o.port||(o.port=443);var p={},q=this._buildAuthorizationHeaders(n);for(var r in this._isEcho?p["X-Verify-Credentials-Authorization"]=q:p.Authorization=q,p.Host=o.host,this._headers)this._headers.hasOwnProperty(r)&&(p[r]=this._headers[r]);for(var r in e)this._isParameterNameAnOAuthParameter(r)&&delete e[r];("POST"==c||"PUT"==c)&&null==f&&null!=e&&(f=i.stringify(e).replace(/\!/g,"%21").replace(/\'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")),f?Buffer.isBuffer(f)?p["Content-length"]=f.length:p["Content-length"]=Buffer.byteLength(f):p["Content-length"]=0,p["Content-Type"]=g,o.pathname&&""!=o.pathname||(o.pathname="/"),l=o.query?o.pathname+"?"+o.query:o.pathname,m="https:"==o.protocol?this._createClient(o.port,o.hostname,c,l,p,!0):this._createClient(o.port,o.hostname,c,l,p);var s=this._clientOptions;if(!k)return("POST"==c||"PUT"==c)&&null!=f&&""!=f&&m.write(f),m;var t="",u=this,v=j.isAnEarlyCloseHost(o.hostname),w=!1,x=function(d){w||(w=!0,d.statusCode>=200&&d.statusCode<=299?k(null,t,d):(301==d.statusCode||302==d.statusCode)&&s.followRedirects&&d.headers&&d.headers.location?u._performSecureRequest(a,b,c,d.headers.location,e,f,g,k):k({statusCode:d.statusCode,data:t},t,d))};m.on("response",function(a){a.setEncoding("utf8"),a.on("data",function(a){t+=a}),a.on("end",function(){x(a)}),a.on("close",function(){v&&x(a)})}),m.on("error",function(a){w||(w=!0,k(a))}),("POST"==c||"PUT"==c)&&null!=f&&""!=f&&m.write(f),m.end()},b.OAuth.prototype.setClientOptions=function(a){var b,c={},d=Object.prototype.hasOwnProperty;for(b in this._defaultClientOptions)d.call(a,b)?c[b]=a[b]:c[b]=this._defaultClientOptions[b];this._clientOptions=c},b.OAuth.prototype.getOAuthAccessToken=function(a,b,c,d){var e={};"function"==typeof c?d=c:e.oauth_verifier=c,this._performSecureRequest(a,b,this._clientOptions.accessTokenHttpMethod,this._accessUrl,e,null,null,function(a,b,c){if(a)d(a);else{var e=i.parse(b),f=e.oauth_token;delete e.oauth_token;var g=e.oauth_token_secret;delete e.oauth_token_secret,d(null,f,g,e)}})},b.OAuth.prototype.getProtectedResource=function(a,b,c,d,e){this._performSecureRequest(c,d,b,a,null,"",null,e)},b.OAuth.prototype.delete=function(a,b,c,d){return this._performSecureRequest(b,c,"DELETE",a,null,"",null,d)},b.OAuth.prototype.get=function(a,b,c,d){return this._performSecureRequest(b,c,"GET",a,null,"",null,d)},b.OAuth.prototype._putOrPost=function(a,b,c,d,e,f,g){var h=null;return"function"==typeof f&&(g=f,f=null),"string"==typeof e||Buffer.isBuffer(e)||(f="application/x-www-form-urlencoded",h=e,e=null),this._performSecureRequest(c,d,a,b,h,e,f,g)},b.OAuth.prototype.put=function(a,b,c,d,e,f){return this._putOrPost("PUT",a,b,c,d,e,f)},b.OAuth.prototype.post=function(a,b,c,d,e,f){return this._putOrPost("POST",a,b,c,d,e,f)},b.OAuth.prototype.getOAuthRequestToken=function(a,b){"function"==typeof a&&(b=a,a={}),this._authorize_callback&&(a.oauth_callback=this._authorize_callback),this._performSecureRequest(null,null,this._clientOptions.requestTokenHttpMethod,this._requestUrl,a,null,null,function(a,c,d){if(a)b(a);else{var e=i.parse(c),f=e.oauth_token,g=e.oauth_token_secret;delete e.oauth_token,delete e.oauth_token_secret,b(null,f,g,e)}})},b.OAuth.prototype.signUrl=function(a,b,c,d){if(void 0===d)var d="GET";for(var e=this._prepareParameters(b,c,d,a,{}),f=h.parse(a,!1),g="",i=0;i<e.length;i++)g+=e[i][0]+"="+this._encodeData(e[i][1])+"&";return g=g.substring(0,g.length-1),f.protocol+"//"+f.host+f.pathname+"?"+g},b.OAuth.prototype.authHeader=function(a,b,c,d){if(void 0===d)var d="GET";var e=this._prepareParameters(b,c,d,a,{});return this._buildAuthorizationHeaders(e)}},51575:a=>{a.exports=()=>Math.floor(Date.now()/1e3)},52345:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.fromX509=b.fromSPKI=b.fromPKCS8=b.toPKCS8=b.toSPKI=void 0;let d=c(55511),e=c(79428),f=c(63549),g=c(25092),h=c(72349),i=c(57944),j=(a,b,c)=>{let e;if((0,f.isCryptoKey)(c)){if(!c.extractable)throw TypeError("CryptoKey is not extractable");e=d.KeyObject.from(c)}else if((0,g.default)(c))e=c;else throw TypeError((0,h.default)(c,...i.types));if(e.type!==a)throw TypeError(`key is not a ${a} key`);return e.export({format:"pem",type:b})};b.toSPKI=a=>j("public","spki",a),b.toPKCS8=a=>j("private","pkcs8",a),b.fromPKCS8=a=>(0,d.createPrivateKey)({key:e.Buffer.from(a.replace(/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g,""),"base64"),type:"pkcs8",format:"der"}),b.fromSPKI=a=>(0,d.createPublicKey)({key:e.Buffer.from(a.replace(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g,""),"base64"),type:"spki",format:"der"}),b.fromX509=a=>(0,d.createPublicKey)({key:a,type:"spki",format:"pem"})},52459:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.compactDecrypt=void 0;let d=c(96225),e=c(14191),f=c(38569);b.compactDecrypt=async function(a,b,c){if(a instanceof Uint8Array&&(a=f.decoder.decode(a)),"string"!=typeof a)throw new e.JWEInvalid("Compact JWE must be a string or Uint8Array");let{0:g,1:h,2:i,3:j,4:k,length:l}=a.split(".");if(5!==l)throw new e.JWEInvalid("Invalid Compact JWE");let m=await (0,d.flattenedDecrypt)({ciphertext:j,iv:i||void 0,protected:g||void 0,tag:k||void 0,encrypted_key:h||void 0},b,c),n={plaintext:m.plaintext,protectedHeader:m.protectedHeader};return"function"==typeof b?{...n,key:m.key}:n}},52503:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=function(a){let{url:b,theme:c}=a;return(0,d.h)("div",{className:"verify-request"},c.brandColor&&(0,d.h)("style",{dangerouslySetInnerHTML:{__html:`
10
10
  :root {
11
11
  --brand-color: ${c.brandColor}
12
12
  }
@@ -27,7 +27,7 @@ exports.id=902,exports.ids=[902],exports.modules={1025:a=>{a.exports=function(a)
27
27
  :root {
28
28
  --button-text-color: ${e.buttonText}
29
29
  }
30
- `}}),(0,d.h)("div",{className:"card"},e.logo&&(0,d.h)("img",{src:e.logo,alt:"Logo",className:"logo"}),(0,d.h)("h1",null,"Signout"),(0,d.h)("p",null,"Are you sure you want to sign out?"),(0,d.h)("form",{action:`${b}/signout`,method:"POST"},(0,d.h)("input",{type:"hidden",name:"csrfToken",value:c}),(0,d.h)("button",{id:"submitButton",type:"submit"},"Sign out"))))};var d=c(16588)},82996:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.setCurve=b.weakMap=void 0;let d=c(79428),e=c(55511),f=c(14191),g=c(63549),h=c(25092),i=c(72349),j=c(57944),k=d.Buffer.from([42,134,72,206,61,3,1,7]),l=d.Buffer.from([43,129,4,0,34]),m=d.Buffer.from([43,129,4,0,35]),n=d.Buffer.from([43,129,4,0,10]);b.weakMap=new WeakMap;let o=(a,c)=>{var d;let p;if((0,g.isCryptoKey)(a))p=e.KeyObject.from(a);else if((0,h.default)(a))p=a;else throw TypeError((0,i.default)(a,...j.types));if("secret"===p.type)throw TypeError('only "private" or "public" type keys can be used for this operation');switch(p.asymmetricKeyType){case"ed25519":case"ed448":return`Ed${p.asymmetricKeyType.slice(2)}`;case"x25519":case"x448":return`X${p.asymmetricKeyType.slice(1)}`;case"ec":{if(b.weakMap.has(p))return b.weakMap.get(p);let a=null==(d=p.asymmetricKeyDetails)?void 0:d.namedCurve;if(a||"private"!==p.type){if(!a){let b=p.export({format:"der",type:"spki"}),c=b[1]<128?14:15,d=b[c],e=b.slice(c+1,c+1+d);if(e.equals(k))a="prime256v1";else if(e.equals(l))a="secp384r1";else if(e.equals(m))a="secp521r1";else if(e.equals(n))a="secp256k1";else throw new f.JOSENotSupported("Unsupported key curve for this operation")}}else a=o((0,e.createPublicKey)(p),!0);if(c)return a;let g=(a=>{switch(a){case"prime256v1":return"P-256";case"secp384r1":return"P-384";case"secp521r1":return"P-521";case"secp256k1":return"secp256k1";default:throw new f.JOSENotSupported("Unsupported key curve for this operation")}})(a);return b.weakMap.set(p,g),g}default:throw TypeError("Invalid asymmetric key type for this operation")}};b.setCurve=function(a,c){b.weakMap.set(a,c)},b.default=o},83374:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0})},83545:(a,b,c)=>{var d=c(91830),e=c(86240);a.exports=function a(b,c){var f;this.next||(e(a.prototype),e(a.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),e(this,"_invoke",function(a,e,g){function h(){return new c(function(e,f){!function a(e,f,g,h){try{var i=b[e](f),j=i.value;return j instanceof d?c.resolve(j.v).then(function(b){a("next",b,g,h)},function(b){a("throw",b,g,h)}):c.resolve(j).then(function(a){i.value=a,g(i)},function(b){return a("throw",b,g,h)})}catch(a){h(a)}}(a,g,e,f)})}return f=f?f.then(h,h):h()},!0)},a.exports.__esModule=!0,a.exports.default=a.exports},83727:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.calculateJwkThumbprintUri=b.calculateJwkThumbprint=void 0;let d=c(12064),e=c(32706),f=c(14191),g=c(38569),h=c(89879),i=(a,b)=>{if("string"!=typeof a||!a)throw new f.JWKInvalid(`${b} missing or invalid`)};async function j(a,b){let c;if(!(0,h.default)(a))throw TypeError("JWK must be an object");if(null!=b||(b="sha256"),"sha256"!==b&&"sha384"!==b&&"sha512"!==b)throw TypeError('digestAlgorithm must one of "sha256", "sha384", or "sha512"');switch(a.kty){case"EC":i(a.crv,'"crv" (Curve) Parameter'),i(a.x,'"x" (X Coordinate) Parameter'),i(a.y,'"y" (Y Coordinate) Parameter'),c={crv:a.crv,kty:a.kty,x:a.x,y:a.y};break;case"OKP":i(a.crv,'"crv" (Subtype of Key Pair) Parameter'),i(a.x,'"x" (Public Key) Parameter'),c={crv:a.crv,kty:a.kty,x:a.x};break;case"RSA":i(a.e,'"e" (Exponent) Parameter'),i(a.n,'"n" (Modulus) Parameter'),c={e:a.e,kty:a.kty,n:a.n};break;case"oct":i(a.k,'"k" (Key Value) Parameter'),c={k:a.k,kty:a.kty};break;default:throw new f.JOSENotSupported('"kty" (Key Type) Parameter missing or unsupported')}let j=g.encoder.encode(JSON.stringify(c));return(0,e.encode)(await (0,d.default)(b,j))}b.calculateJwkThumbprint=j,b.calculateJwkThumbprintUri=async function(a,b){null!=b||(b="sha256");let c=await j(a,b);return`urn:ietf:params:oauth:jwk-thumbprint:sha-${b.slice(-3)}:${c}`}},83766:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});class c{constructor(a){if(48!==a[0]||(this.buffer=a,this.offset=1,this.decodeLength()!==a.length-this.offset))throw TypeError()}decodeLength(){let a=this.buffer[this.offset++];if(128&a){let b=-129&a;a=0;for(let c=0;c<b;c++)a=a<<8|this.buffer[this.offset+c];this.offset+=b}return a}unsignedInteger(){if(2!==this.buffer[this.offset++])throw TypeError();let a=this.decodeLength();0===this.buffer[this.offset]&&(this.offset++,a--);let b=this.buffer.slice(this.offset,this.offset+a);return this.offset+=a,b}end(){if(this.offset!==this.buffer.length)throw TypeError()}}b.default=c},84373:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.deflate=b.inflate=void 0;let d=c(28354),e=c(74075),f=c(14191),g=(0,d.promisify)(e.inflateRaw),h=(0,d.promisify)(e.deflateRaw);b.inflate=a=>g(a,{maxOutputLength:25e4}).catch(()=>{throw new f.JWEDecompressionFailed}),b.deflate=a=>h(a)},84406:(a,b,c)=>{var d=c(67796).default,e=c(99051);a.exports=function(a){var b=e(a,"string");return"symbol"==d(b)?b:b+""},a.exports.__esModule=!0,a.exports.default=a.exports},84496:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});let d=c(9179),e=c(38020),f=c(94948),g=c(99968),h=c(32706),i=c(58756),j=c(14191),k=c(27871),l=c(20612),m=c(73783);b.default=async function(a,b,c,n,o={}){let p,q,r;switch((0,l.default)(a,c,"encrypt"),a){case"dir":r=c;break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{if(!e.ecdhAllowed(c))throw new j.JOSENotSupported("ECDH with the provided key is not allowed or not supported by your javascript runtime");let{apu:f,apv:g}=o,{epk:l}=o;l||(l=(await e.generateEpk(c)).privateKey);let{x:m,y:s,crv:t,kty:u}=await (0,k.exportJWK)(l),v=await e.deriveKey(c,l,"ECDH-ES"===a?b:a,"ECDH-ES"===a?(0,i.bitLength)(b):parseInt(a.slice(-5,-2),10),f,g);if(q={epk:{x:m,crv:t,kty:u}},"EC"===u&&(q.epk.y=s),f&&(q.apu=(0,h.encode)(f)),g&&(q.apv=(0,h.encode)(g)),"ECDH-ES"===a){r=v;break}r=n||(0,i.default)(b);let w=a.slice(-6);p=await (0,d.wrap)(w,v,r);break}case"RSA1_5":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":r=n||(0,i.default)(b),p=await (0,g.encrypt)(a,c,r);break;case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{r=n||(0,i.default)(b);let{p2c:d,p2s:e}=o;({encryptedKey:p,...q}=await (0,f.encrypt)(a,c,r,d,e));break}case"A128KW":case"A192KW":case"A256KW":r=n||(0,i.default)(b),p=await (0,d.wrap)(a,c,r);break;case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":{r=n||(0,i.default)(b);let{iv:d}=o;({encryptedKey:p,...q}=await (0,m.wrap)(a,c,r,d));break}default:throw new j.JOSENotSupported('Invalid or unsupported "alg" (JWE Algorithm) header value')}return{cek:r,encryptedKey:p,parameters:q}}},84590:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.GeneralEncrypt=void 0;let d=c(22585),e=c(14191),f=c(58756),g=c(85016),h=c(84496),i=c(32706),j=c(7706);class k{constructor(a,b,c){this.parent=a,this.key=b,this.options=c}setUnprotectedHeader(a){if(this.unprotectedHeader)throw TypeError("setUnprotectedHeader can only be called once");return this.unprotectedHeader=a,this}addRecipient(...a){return this.parent.addRecipient(...a)}encrypt(...a){return this.parent.encrypt(...a)}done(){return this.parent}}class l{constructor(a){this._recipients=[],this._plaintext=a}addRecipient(a,b){let c=new k(this,a,{crit:null==b?void 0:b.crit});return this._recipients.push(c),c}setProtectedHeader(a){if(this._protectedHeader)throw TypeError("setProtectedHeader can only be called once");return this._protectedHeader=a,this}setSharedUnprotectedHeader(a){if(this._unprotectedHeader)throw TypeError("setSharedUnprotectedHeader can only be called once");return this._unprotectedHeader=a,this}setAdditionalAuthenticatedData(a){return this._aad=a,this}async encrypt(a){var b,c,k;let l;if(!this._recipients.length)throw new e.JWEInvalid("at least one recipient must be added");if(a={deflateRaw:null==a?void 0:a.deflateRaw},1===this._recipients.length){let[b]=this._recipients,c=await new d.FlattenedEncrypt(this._plaintext).setAdditionalAuthenticatedData(this._aad).setProtectedHeader(this._protectedHeader).setSharedUnprotectedHeader(this._unprotectedHeader).setUnprotectedHeader(b.unprotectedHeader).encrypt(b.key,{...b.options,...a}),e={ciphertext:c.ciphertext,iv:c.iv,recipients:[{}],tag:c.tag};return c.aad&&(e.aad=c.aad),c.protected&&(e.protected=c.protected),c.unprotected&&(e.unprotected=c.unprotected),c.encrypted_key&&(e.recipients[0].encrypted_key=c.encrypted_key),c.header&&(e.recipients[0].header=c.header),e}for(let a=0;a<this._recipients.length;a++){let b=this._recipients[a];if(!(0,g.default)(this._protectedHeader,this._unprotectedHeader,b.unprotectedHeader))throw new e.JWEInvalid("JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint");let c={...this._protectedHeader,...this._unprotectedHeader,...b.unprotectedHeader},{alg:d}=c;if("string"!=typeof d||!d)throw new e.JWEInvalid('JWE "alg" (Algorithm) Header Parameter missing or invalid');if("dir"===d||"ECDH-ES"===d)throw new e.JWEInvalid('"dir" and "ECDH-ES" alg may only be used with a single recipient');if("string"!=typeof c.enc||!c.enc)throw new e.JWEInvalid('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid');if(l){if(l!==c.enc)throw new e.JWEInvalid('JWE "enc" (Encryption Algorithm) Header Parameter must be the same for all recipients')}else l=c.enc;if((0,j.default)(e.JWEInvalid,new Map,b.options.crit,this._protectedHeader,c),void 0!==c.zip&&(!this._protectedHeader||!this._protectedHeader.zip))throw new e.JWEInvalid('JWE "zip" (Compression Algorithm) Header MUST be integrity protected')}let m=(0,f.default)(l),n={ciphertext:"",iv:"",recipients:[],tag:""};for(let e=0;e<this._recipients.length;e++){let f=this._recipients[e],g={};n.recipients.push(g);let j=({...this._protectedHeader,...this._unprotectedHeader,...f.unprotectedHeader}).alg.startsWith("PBES2")?2048+e:void 0;if(0===e){let b=await new d.FlattenedEncrypt(this._plaintext).setAdditionalAuthenticatedData(this._aad).setContentEncryptionKey(m).setProtectedHeader(this._protectedHeader).setSharedUnprotectedHeader(this._unprotectedHeader).setUnprotectedHeader(f.unprotectedHeader).setKeyManagementParameters({p2c:j}).encrypt(f.key,{...f.options,...a,[d.unprotected]:!0});n.ciphertext=b.ciphertext,n.iv=b.iv,n.tag=b.tag,b.aad&&(n.aad=b.aad),b.protected&&(n.protected=b.protected),b.unprotected&&(n.unprotected=b.unprotected),g.encrypted_key=b.encrypted_key,b.header&&(g.header=b.header);continue}let{encryptedKey:o,parameters:p}=await (0,h.default)((null==(b=f.unprotectedHeader)?void 0:b.alg)||(null==(c=this._protectedHeader)?void 0:c.alg)||(null==(k=this._unprotectedHeader)?void 0:k.alg),l,f.key,m,{p2c:j});g.encrypted_key=(0,i.encode)(o),(f.unprotectedHeader||p)&&(g.header={...f.unprotectedHeader,...p})}return n}}b.GeneralEncrypt=l},84749:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});let d=c(14191);b.default=function(a){switch(a){case"PS256":case"RS256":case"ES256":case"ES256K":return"sha256";case"PS384":case"RS384":case"ES384":return"sha384";case"PS512":case"RS512":case"ES512":return"sha512";case"EdDSA":return;default:throw new d.JOSENotSupported(`alg ${a} is not supported either by JOSE or your javascript runtime`)}}},84896:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=f;var d=c(55511),e=c(60434);async function f(a,b){var c,f,g,h;let{url:i,adapter:j,provider:k,callbackUrl:l,theme:m}=b,n=null!=(c=await (null==(f=k.generateVerificationToken)?void 0:f.call(k)))?c:(0,d.randomBytes)(32).toString("hex"),o=new Date(Date.now()+(null!=(g=k.maxAge)?g:86400)*1e3),p=new URLSearchParams({callbackUrl:l,token:n,email:a}),q=`${i}/callback/${k.id}?${p}`;return await Promise.all([k.sendVerificationRequest({identifier:a,token:n,expires:o,url:q,provider:k,theme:m}),null==(h=j.createVerificationToken)?void 0:h.call(j,{identifier:a,token:(0,e.hashToken)(n,b),expires:o})]),`${i}/verify-request?${new URLSearchParams({provider:k.id,type:k.type})}`}},85016:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=(...a)=>{let b,c=a.filter(Boolean);if(0===c.length||1===c.length)return!0;for(let a of c){let c=Object.keys(a);if(!b||0===b.size){b=new Set(c);continue}for(let a of c){if(b.has(a))return!1;b.add(a)}}return!0}},85208:function(a,b,c){!function(a,b){var c=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|^--/i,d=/^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/,e=/[\s\n\\/='"\0<>]/,f=/^xlink:?./,g=/["&<]/;function h(a){if(!1===g.test(a+=""))return a;for(var b=0,c=0,d="",e="";c<a.length;c++){switch(a.charCodeAt(c)){case 34:e="&quot;";break;case 38:e="&amp;";break;case 60:e="&lt;";break;default:continue}c!==b&&(d+=a.slice(b,c)),d+=e,b=c+1}return c!==b&&(d+=a.slice(b,c)),d}var i=function(a,b){return String(a).replace(/(\n+)/g,"$1"+(b||" "))},j=function(a,b,c){return String(a).length>(b||40)||!c&&-1!==String(a).indexOf("\n")||-1!==String(a).indexOf("<")},k={},l=/([A-Z])/g;function m(a){var b="";for(var d in a){var e=a[d];null!=e&&""!==e&&(b&&(b+=" "),b+="-"==d[0]?d:k[d]||(k[d]=d.replace(l,"-$1").toLowerCase()),b="number"==typeof e&&!1===c.test(d)?b+": "+e+"px;":b+": "+e+";")}return b||void 0}function n(a,b){return Array.isArray(b)?b.reduce(n,a):null!=b&&!1!==b&&a.push(b),a}function o(){this.__d=!0}function p(a,b){return{__v:a,context:b,props:a.props,setState:o,forceUpdate:o,__d:!0,__h:[]}}function q(a,b){var c=a.contextType,d=c&&b[c.__c];return null!=c?d?d.props.value:c.__:b}var r=[],s={shallow:!0};v.render=v;var t=function(a,b){return v(a,b,s)},u=[];function v(a,c,g){c=c||{};var k=b.options.__s;b.options.__s=!0;var l,o=b.h(b.Fragment,null);return o.__k=[a],l=g&&(g.pretty||g.voidElements||g.sortAttributes||g.shallow||g.allAttributes||g.xml||g.attributeHook)?function a(c,g,k,l,o,s){if(null==c||"boolean"==typeof c)return"";if("object"!=typeof c)return"function"==typeof c?"":h(c);var t=k.pretty,u=t&&"string"==typeof t?t:" ";if(Array.isArray(c)){for(var v="",w=0;w<c.length;w++)t&&w>0&&(v+="\n"),v+=a(c[w],g,k,l,o,s);return v}if(void 0!==c.constructor)return"";var x,y=c.type,z=c.props,A=!1;if("function"==typeof y){if(A=!0,!k.shallow||!l&&!1!==k.renderRootComponent){if(y===b.Fragment){var B=[];return n(B,c.props.children),a(B,g,k,!1!==k.shallowHighOrder,o,s)}var C,D=c.__c=p(c,g);b.options.__b&&b.options.__b(c);var E=b.options.__r;if(y.prototype&&"function"==typeof y.prototype.render){var F=q(y,g);(D=c.__c=new y(z,F)).__v=c,D._dirty=D.__d=!0,D.props=z,null==D.state&&(D.state={}),null==D._nextState&&null==D.__s&&(D._nextState=D.__s=D.state),D.context=F,y.getDerivedStateFromProps?D.state=Object.assign({},D.state,y.getDerivedStateFromProps(D.props,D.state)):D.componentWillMount&&(D.componentWillMount(),D.state=D._nextState!==D.state?D._nextState:D.__s!==D.state?D.__s:D.state),E&&E(c),C=D.render(D.props,D.state,D.context)}else for(var G=q(y,g),H=0;D.__d&&H++<25;)D.__d=!1,E&&E(c),C=y.call(c.__c,z,G);return D.getChildContext&&(g=Object.assign({},g,D.getChildContext())),b.options.diffed&&b.options.diffed(c),a(C,g,k,!1!==k.shallowHighOrder,o,s)}y=(x=y).displayName||x!==Function&&x.name||function(a){var b=(Function.prototype.toString.call(a).match(/^\s*function\s+([^( ]+)/)||"")[1];if(!b){for(var c=-1,d=r.length;d--;)if(r[d]===a){c=d;break}c<0&&(c=r.push(a)-1),b="UnnamedComponent"+c}return b}(x)}var I,J,K="<"+y;if(z){var L=Object.keys(z);k&&!0===k.sortAttributes&&L.sort();for(var M=0;M<L.length;M++){var N=L[M],O=z[N];if("children"!==N){if(!e.test(N)&&(k&&k.allAttributes||"key"!==N&&"ref"!==N&&"__self"!==N&&"__source"!==N)){if("defaultValue"===N)N="value";else if("defaultChecked"===N)N="checked";else if("defaultSelected"===N)N="selected";else if("className"===N){if(void 0!==z.class)continue;N="class"}else o&&f.test(N)&&(N=N.toLowerCase().replace(/^xlink:?/,"xlink:"));if("htmlFor"===N){if(z.for)continue;N="for"}"style"===N&&O&&"object"==typeof O&&(O=m(O)),"a"===N[0]&&"r"===N[1]&&"boolean"==typeof O&&(O=String(O));var P=k.attributeHook&&k.attributeHook(N,O,g,k,A);if(P||""===P)K+=P;else if("dangerouslySetInnerHTML"===N)J=O&&O.__html;else if("textarea"===y&&"value"===N)I=O;else if((O||0===O||""===O)&&"function"!=typeof O){if(!(!0!==O&&""!==O||(O=N,k&&k.xml))){K=K+" "+N;continue}if("value"===N){if("select"===y){s=O;continue}"option"===y&&s==O&&void 0===z.selected&&(K+=" selected")}K=K+" "+N+'="'+h(O)+'"'}}}else I=O}}if(t){var Q=K.replace(/\n\s*/," ");Q===K||~Q.indexOf("\n")?t&&~K.indexOf("\n")&&(K+="\n"):K=Q}if(K+=">",e.test(y))throw Error(y+" is not a valid HTML tag name in "+K);var R,S=d.test(y)||k.voidElements&&k.voidElements.test(y),T=[];if(J)t&&j(J)&&(J="\n"+u+i(J,u)),K+=J;else if(null!=I&&n(R=[],I).length){for(var U=t&&~K.indexOf("\n"),V=!1,W=0;W<R.length;W++){var X=R[W];if(null!=X&&!1!==X){var Y=a(X,g,k,!0,"svg"===y||"foreignObject"!==y&&o,s);if(t&&!U&&j(Y)&&(U=!0),Y)if(t){var Z=Y.length>0&&"<"!=Y[0];V&&Z?T[T.length-1]+=Y:T.push(Y),V=Z}else T.push(Y)}}if(t&&U)for(var $=T.length;$--;)T[$]="\n"+u+i(T[$],u)}if(T.length||J)K+=T.join("");else if(k&&k.xml)return K.substring(0,K.length-1)+" />";return!S||R||J?(t&&~K.indexOf("\n")&&(K+="\n"),K=K+"</"+y+">"):K=K.replace(/>$/," />"),K}(a,c,g):function a(c,g,i,j,k){if(null==c||!0===c||!1===c||""===c)return"";if("object"!=typeof c)return"function"==typeof c?"":h(c);if(x(c)){var l="";k.__k=c;for(var n=0;n<c.length;n++)l+=a(c[n],g,i,j,k),c[n]=w(c[n]);return l}if(void 0!==c.constructor)return"";c.__=k,b.options.__b&&b.options.__b(c);var o=c.type,r=c.props;if("function"==typeof o){if(o===b.Fragment)A=r.children;else{var s,t,u,v,z,A=o.prototype&&"function"==typeof o.prototype.render?(s=g,u=q(t=c.type,s),v=new t(c.props,u),c.__c=v,v.__v=c,v.__d=!0,v.props=c.props,null==v.state&&(v.state={}),null==v.__s&&(v.__s=v.state),v.context=u,t.getDerivedStateFromProps?v.state=y({},v.state,t.getDerivedStateFromProps(v.props,v.state)):v.componentWillMount&&(v.componentWillMount(),v.state=v.__s!==v.state?v.__s:v.state),(z=b.options.__r)&&z(c),v.render(v.props,v.state,v.context)):function(a,c){var d,e=p(a,c),f=q(a.type,c);a.__c=e;for(var g=b.options.__r,h=0;e.__d&&h++<25;)e.__d=!1,g&&g(a),d=a.type.call(e,a.props,f);return d}(c,g),B=c.__c;B.getChildContext&&(g=y({},g,B.getChildContext()))}var C=a(A=null!=A&&A.type===b.Fragment&&null==A.key?A.props.children:A,g,i,j,c);return b.options.diffed&&b.options.diffed(c),c.__=void 0,b.options.unmount&&b.options.unmount(c),C}var D,E,F="<";if(F+=o,r)for(var G in D=r.children,r){var H,I,J,K=r[G];if(!("key"===G||"ref"===G||"__self"===G||"__source"===G||"children"===G||"className"===G&&"class"in r||"htmlFor"===G&&"for"in r||e.test(G))){if(I=G="className"===(H=G)?"class":"htmlFor"===H?"for":"defaultValue"===H?"value":"defaultChecked"===H?"checked":"defaultSelected"===H?"selected":i&&f.test(H)?H.toLowerCase().replace(/^xlink:?/,"xlink:"):H,J=K,K="style"===I&&null!=J&&"object"==typeof J?m(J):"a"===I[0]&&"r"===I[1]&&"boolean"==typeof J?String(J):J,"dangerouslySetInnerHTML"===G)E=K&&K.__html;else if("textarea"===o&&"value"===G)D=K;else if((K||0===K||""===K)&&"function"!=typeof K){if(!0===K||""===K){K=G,F=F+" "+G;continue}if("value"===G){if("select"===o){j=K;continue}"option"!==o||j!=K||"selected"in r||(F+=" selected")}F=F+" "+G+'="'+h(K)+'"'}}}var L=F;if(F+=">",e.test(o))throw Error(o+" is not a valid HTML tag name in "+F);var M="",N=!1;if(E)M+=E,N=!0;else if("string"==typeof D)M+=h(D),N=!0;else if(x(D)){c.__k=D;for(var O=0;O<D.length;O++){var P=D[O];if(D[O]=w(P),null!=P&&!1!==P){var Q=a(P,g,"svg"===o||"foreignObject"!==o&&i,j,c);Q&&(M+=Q,N=!0)}}}else if(null!=D&&!1!==D&&!0!==D){c.__k=[w(D)];var R=a(D,g,"svg"===o||"foreignObject"!==o&&i,j,c);R&&(M+=R,N=!0)}if(b.options.diffed&&b.options.diffed(c),c.__=void 0,b.options.unmount&&b.options.unmount(c),N)F+=M;else if(d.test(o))return L+" />";return F+"</"+o+">"}(a,c,!1,void 0,o),b.options.__c&&b.options.__c(a,u),b.options.__s=k,u.length=0,l}function w(a){return null==a||"boolean"==typeof a?null:"string"==typeof a||"number"==typeof a||"bigint"==typeof a?b.h(null,null,a):a}var x=Array.isArray,y=Object.assign;v.shallowRender=t,a.default=v,a.render=v,a.renderToStaticMarkup=v,a.renderToString=v,a.shallowRender=t}(b,c(16588))},85407:(a,b,c)=>{var d=c(91830),e=c(66139),f=c(7775),g=c(36633),h=c(83545),i=c(16711),j=c(24497);function k(){"use strict";var b=e(),c=b.m(k),l=(Object.getPrototypeOf?Object.getPrototypeOf(c):c.__proto__).constructor;function m(a){var b="function"==typeof a&&a.constructor;return!!b&&(b===l||"GeneratorFunction"===(b.displayName||b.name))}var n={throw:1,return:2,break:3,continue:3};function o(a){var b,c;return function(d){b||(b={stop:function(){return c(d.a,2)},catch:function(){return d.v},abrupt:function(a,b){return c(d.a,n[a],b)},delegateYield:function(a,e,f){return b.resultName=e,c(d.d,j(a),f)},finish:function(a){return c(d.f,a)}},c=function(a,c,e){d.p=b.prev,d.n=b.next;try{return a(c,e)}finally{b.next=d.n}}),b.resultName&&(b[b.resultName]=d.v,b.resultName=void 0),b.sent=d.v,b.next=d.n;try{return a.call(this,b)}finally{d.p=b.prev,d.n=b.next}}}return(a.exports=k=function(){return{wrap:function(a,c,d,e){return b.w(o(a),c,d,e&&e.reverse())},isGeneratorFunction:m,mark:b.m,awrap:function(a,b){return new d(a,b)},AsyncIterator:h,async:function(a,b,c,d,e){return(m(b)?g:f)(o(a),b,c,d,e)},keys:i,values:j}},a.exports.__esModule=!0,a.exports.default=a.exports)()}a.exports=k,a.exports.__esModule=!0,a.exports.default=a.exports},85664:(a,b)=>{"use strict";async function c({options:a,paramValue:b,cookieValue:d}){let{url:e,callbacks:f}=a,g=e.origin;return b?g=await f.redirect({url:b,baseUrl:e.origin}):d&&(g=await f.redirect({url:d,baseUrl:e.origin})),{callbackUrl:g,callbackUrlCookie:g!==d?g:void 0}}Object.defineProperty(b,"__esModule",{value:!0}),b.createCallbackUrl=c},86240:a=>{function b(c,d,e,f){var g=Object.defineProperty;try{g({},"",{})}catch(a){g=0}a.exports=b=function(a,c,d,e){function f(c,d){b(a,c,function(a){return this._invoke(c,d,a)})}c?g?g(a,c,{value:d,enumerable:!e,configurable:!e,writable:!e}):a[c]=d:(f("next",0),f("throw",1),f("return",2))},a.exports.__esModule=!0,a.exports.default=a.exports,b(c,d,e,f)}a.exports=b,a.exports.__esModule=!0,a.exports.default=a.exports},86460:(a,b,c)=>{"use strict";var d=c(31912);Object.defineProperty(b,"__esModule",{value:!0}),b.UnsupportedStrategy=b.UnknownError=b.OAuthCallbackError=b.MissingSecret=b.MissingAuthorize=b.MissingAdapterMethods=b.MissingAdapter=b.MissingAPIRoute=b.InvalidCallbackUrl=b.AccountNotLinkedError=void 0,b.adapterErrorHandler=function(a,b){if(a)return Object.keys(a).reduce(function(c,d){return c[d]=(0,f.default)(e.default.mark(function c(){var f,g,h,i,j,k=arguments;return e.default.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:for(c.prev=0,g=Array(f=k.length),h=0;h<f;h++)g[h]=k[h];return b.debug("adapter_".concat(d),{args:g}),i=a[d],c.next=6,i.apply(void 0,g);case 6:return c.abrupt("return",c.sent);case 9:throw c.prev=9,c.t0=c.catch(0),b.error("adapter_error_".concat(d),c.t0),(j=new o(c.t0)).name="".concat(q(d),"Error"),j;case 15:case"end":return c.stop()}},c,null,[[0,9]])})),c},{})},b.capitalize=q,b.eventsErrorHandler=function(a,b){return Object.keys(a).reduce(function(c,d){return c[d]=(0,f.default)(e.default.mark(function c(){var f,g=arguments;return e.default.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.prev=0,f=a[d],c.next=4,f.apply(void 0,g);case 4:return c.abrupt("return",c.sent);case 7:c.prev=7,c.t0=c.catch(0),b.error("".concat(p(d),"_EVENT_ERROR"),c.t0);case 10:case"end":return c.stop()}},c,null,[[0,7]])})),c},{})},b.upperSnake=p;var e=d(c(3410)),f=d(c(89935)),g=d(c(56127)),h=d(c(63157)),i=d(c(64869)),j=d(c(20226)),k=d(c(22934)),l=d(c(1293));function m(a,b,c){return b=(0,k.default)(b),(0,j.default)(a,n()?Reflect.construct(b,c||[],(0,k.default)(a).constructor):b.apply(a,c))}function n(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(a){}return(n=function(){return!!a})()}var o=b.UnknownError=function(a){function b(a){var c,d;return(0,h.default)(this,b),(d=m(this,b,[null!=(c=null==a?void 0:a.message)?c:a])).name="UnknownError",d.code=a.code,a instanceof Error&&(d.stack=a.stack),d}return(0,l.default)(b,a),(0,i.default)(b,[{key:"toJSON",value:function(){return{name:this.name,message:this.message,stack:this.stack}}}])}((0,d(c(61927)).default)(Error));function p(a){return a.replace(/([A-Z])/g,"_$1").toUpperCase()}function q(a){return"".concat(a[0].toUpperCase()).concat(a.slice(1))}b.OAuthCallbackError=function(a){function b(){var a;(0,h.default)(this,b);for(var c=arguments.length,d=Array(c),e=0;e<c;e++)d[e]=arguments[e];return a=m(this,b,[].concat(d)),(0,g.default)(a,"name","OAuthCallbackError"),a}return(0,l.default)(b,a),(0,i.default)(b)}(o),b.AccountNotLinkedError=function(a){function b(){var a;(0,h.default)(this,b);for(var c=arguments.length,d=Array(c),e=0;e<c;e++)d[e]=arguments[e];return a=m(this,b,[].concat(d)),(0,g.default)(a,"name","AccountNotLinkedError"),a}return(0,l.default)(b,a),(0,i.default)(b)}(o),b.MissingAPIRoute=function(a){function b(){var a;(0,h.default)(this,b);for(var c=arguments.length,d=Array(c),e=0;e<c;e++)d[e]=arguments[e];return a=m(this,b,[].concat(d)),(0,g.default)(a,"name","MissingAPIRouteError"),(0,g.default)(a,"code","MISSING_NEXTAUTH_API_ROUTE_ERROR"),a}return(0,l.default)(b,a),(0,i.default)(b)}(o),b.MissingSecret=function(a){function b(){var a;(0,h.default)(this,b);for(var c=arguments.length,d=Array(c),e=0;e<c;e++)d[e]=arguments[e];return a=m(this,b,[].concat(d)),(0,g.default)(a,"name","MissingSecretError"),(0,g.default)(a,"code","NO_SECRET"),a}return(0,l.default)(b,a),(0,i.default)(b)}(o),b.MissingAuthorize=function(a){function b(){var a;(0,h.default)(this,b);for(var c=arguments.length,d=Array(c),e=0;e<c;e++)d[e]=arguments[e];return a=m(this,b,[].concat(d)),(0,g.default)(a,"name","MissingAuthorizeError"),(0,g.default)(a,"code","CALLBACK_CREDENTIALS_HANDLER_ERROR"),a}return(0,l.default)(b,a),(0,i.default)(b)}(o),b.MissingAdapter=function(a){function b(){var a;(0,h.default)(this,b);for(var c=arguments.length,d=Array(c),e=0;e<c;e++)d[e]=arguments[e];return a=m(this,b,[].concat(d)),(0,g.default)(a,"name","MissingAdapterError"),(0,g.default)(a,"code","EMAIL_REQUIRES_ADAPTER_ERROR"),a}return(0,l.default)(b,a),(0,i.default)(b)}(o),b.MissingAdapterMethods=function(a){function b(){var a;(0,h.default)(this,b);for(var c=arguments.length,d=Array(c),e=0;e<c;e++)d[e]=arguments[e];return a=m(this,b,[].concat(d)),(0,g.default)(a,"name","MissingAdapterMethodsError"),(0,g.default)(a,"code","MISSING_ADAPTER_METHODS_ERROR"),a}return(0,l.default)(b,a),(0,i.default)(b)}(o),b.UnsupportedStrategy=function(a){function b(){var a;(0,h.default)(this,b);for(var c=arguments.length,d=Array(c),e=0;e<c;e++)d[e]=arguments[e];return a=m(this,b,[].concat(d)),(0,g.default)(a,"name","UnsupportedStrategyError"),(0,g.default)(a,"code","CALLBACK_CREDENTIALS_JWT_ERROR"),a}return(0,l.default)(b,a),(0,i.default)(b)}(o),b.InvalidCallbackUrl=function(a){function b(){var a;(0,h.default)(this,b);for(var c=arguments.length,d=Array(c),e=0;e<c;e++)d[e]=arguments[e];return a=m(this,b,[].concat(d)),(0,g.default)(a,"name","InvalidCallbackUrl"),(0,g.default)(a,"code","INVALID_CALLBACK_URL_ERROR"),a}return(0,l.default)(b,a),(0,i.default)(b)}(o)},86845:(a,b,c)=>{"use strict";let d,e;c.r(b),c.d(b,{NIL:()=>w,parse:()=>r,stringify:()=>n,v1:()=>q,v3:()=>t,v4:()=>u,v5:()=>v,validate:()=>l,version:()=>x});var f=c(55511),g=c.n(f);let h=new Uint8Array(256),i=h.length;function j(){return i>h.length-16&&(g().randomFillSync(h),i=0),h.slice(i,i+=16)}let k=/^(?:[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,l=function(a){return"string"==typeof a&&k.test(a)},m=[];for(let a=0;a<256;++a)m.push((a+256).toString(16).substr(1));let n=function(a,b=0){let c=(m[a[b+0]]+m[a[b+1]]+m[a[b+2]]+m[a[b+3]]+"-"+m[a[b+4]]+m[a[b+5]]+"-"+m[a[b+6]]+m[a[b+7]]+"-"+m[a[b+8]]+m[a[b+9]]+"-"+m[a[b+10]]+m[a[b+11]]+m[a[b+12]]+m[a[b+13]]+m[a[b+14]]+m[a[b+15]]).toLowerCase();if(!l(c))throw TypeError("Stringified UUID is invalid");return c},o=0,p=0,q=function(a,b,c){let f=b&&c||0,g=b||Array(16),h=(a=a||{}).node||d,i=void 0!==a.clockseq?a.clockseq:e;if(null==h||null==i){let b=a.random||(a.rng||j)();null==h&&(h=d=[1|b[0],b[1],b[2],b[3],b[4],b[5]]),null==i&&(i=e=(b[6]<<8|b[7])&16383)}let k=void 0!==a.msecs?a.msecs:Date.now(),l=void 0!==a.nsecs?a.nsecs:p+1,m=k-o+(l-p)/1e4;if(m<0&&void 0===a.clockseq&&(i=i+1&16383),(m<0||k>o)&&void 0===a.nsecs&&(l=0),l>=1e4)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");o=k,p=l,e=i;let q=((0xfffffff&(k+=122192928e5))*1e4+l)%0x100000000;g[f++]=q>>>24&255,g[f++]=q>>>16&255,g[f++]=q>>>8&255,g[f++]=255&q;let r=k/0x100000000*1e4&0xfffffff;g[f++]=r>>>8&255,g[f++]=255&r,g[f++]=r>>>24&15|16,g[f++]=r>>>16&255,g[f++]=i>>>8|128,g[f++]=255&i;for(let a=0;a<6;++a)g[f+a]=h[a];return b||n(g)},r=function(a){let b;if(!l(a))throw TypeError("Invalid UUID");let c=new Uint8Array(16);return c[0]=(b=parseInt(a.slice(0,8),16))>>>24,c[1]=b>>>16&255,c[2]=b>>>8&255,c[3]=255&b,c[4]=(b=parseInt(a.slice(9,13),16))>>>8,c[5]=255&b,c[6]=(b=parseInt(a.slice(14,18),16))>>>8,c[7]=255&b,c[8]=(b=parseInt(a.slice(19,23),16))>>>8,c[9]=255&b,c[10]=(b=parseInt(a.slice(24,36),16))/0x10000000000&255,c[11]=b/0x100000000&255,c[12]=b>>>24&255,c[13]=b>>>16&255,c[14]=b>>>8&255,c[15]=255&b,c};function s(a,b,c){function d(a,d,e,f){if("string"==typeof a&&(a=function(a){a=unescape(encodeURIComponent(a));let b=[];for(let c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b}(a)),"string"==typeof d&&(d=r(d)),16!==d.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let g=new Uint8Array(16+a.length);if(g.set(d),g.set(a,d.length),(g=c(g))[6]=15&g[6]|b,g[8]=63&g[8]|128,e){f=f||0;for(let a=0;a<16;++a)e[f+a]=g[a];return e}return n(g)}try{d.name=a}catch(a){}return d.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",d.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",d}let t=s("v3",48,function(a){return Array.isArray(a)?a=Buffer.from(a):"string"==typeof a&&(a=Buffer.from(a,"utf8")),g().createHash("md5").update(a).digest()}),u=function(a,b,c){let d=(a=a||{}).random||(a.rng||j)();if(d[6]=15&d[6]|64,d[8]=63&d[8]|128,b){c=c||0;for(let a=0;a<16;++a)b[c+a]=d[a];return b}return n(d)},v=s("v5",80,function(a){return Array.isArray(a)?a=Buffer.from(a):"string"==typeof a&&(a=Buffer.from(a,"utf8")),g().createHash("sha1").update(a).digest()}),w="00000000-0000-0000-0000-000000000000",x=function(a){if(!l(a))throw TypeError("Invalid UUID");return parseInt(a.substr(14,1),16)}},87997:(a,b,c)=>{a.exports=new(c(62629))({max:100})},88540:(a,b,c)=>{var d=c(39088),e=c(2826);a.exports=function(a,b,c){if(d())return Reflect.construct.apply(null,arguments);var f=[null];f.push.apply(f,b);var g=new(a.bind.apply(a,f));return c&&e(g,c.prototype),g},a.exports.__esModule=!0,a.exports.default=a.exports},88573:(a,b,c)=>{"use strict";var d=c(31912);Object.defineProperty(b,"__esModule",{value:!0}),b.assertConfig=function(a){var b,c,d,j,k,l,m;let n,o,p,{options:q,req:r}=a,s=[];if(!h&&(r.origin||s.push("NEXTAUTH_URL"),q.secret,q.debug&&s.push("DEBUG_ENABLED")),!q.secret)return new e.MissingSecret("Please define a `secret` in production.");if(!(null!=(b=r.query)&&b.nextauth)&&!r.action)return new e.MissingAPIRoute("Cannot find [...nextauth].{js,ts} in `/pages/api/auth`. Make sure the filename is written correctly.");let t=null==(c=r.query)?void 0:c.callbackUrl,u=(0,f.default)(r.origin);if(t&&!i(t,u.base))return new e.InvalidCallbackUrl(`Invalid callback URL. Received: ${t}`);let{callbackUrl:v}=(0,g.defaultCookies)(null!=(d=q.useSecureCookies)?d:u.base.startsWith("https://")),w=null==(j=r.cookies)?void 0:j[null!=(k=null==(l=q.cookies)||null==(l=l.callbackUrl)?void 0:l.name)?k:v.name];if(w&&!i(w,u.base))return new e.InvalidCallbackUrl(`Invalid callback URL. Received: ${w}`);for(let a of q.providers)"credentials"===a.type?n=!0:"email"===a.type?o=!0:"twitter"===a.id&&"2.0"===a.version&&(p=!0);if(n){let a=(null==(m=q.session)?void 0:m.strategy)==="database",b=!q.providers.some(a=>"credentials"!==a.type);if(a&&b)return new e.UnsupportedStrategy("Signin in with credentials only supported if JWT strategy is enabled");if(q.providers.some(a=>"credentials"===a.type&&!a.authorize))return new e.MissingAuthorize("Must define an authorize() handler to use credentials authentication provider")}if(o){let{adapter:a}=q;if(!a)return new e.MissingAdapter("E-mail login requires an adapter.");let b=["createVerificationToken","useVerificationToken","getUserByEmail"].filter(b=>!a[b]);if(b.length)return new e.MissingAdapterMethods(`Required adapter methods were missing: ${b.join(", ")}`)}return h||(p&&s.push("TWITTER_OAUTH_2_BETA"),h=!0),s};var e=c(86460),f=d(c(39154)),g=c(8137);let h=!1;function i(a,b){try{return/^https?:/.test(new URL(a,a.startsWith("/")?b:void 0).protocol)}catch(a){return!1}}},89063:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=c(55511).timingSafeEqual},89167:(a,b,c)=>{"use strict";var d=c(55511);function e(a,b){return b=h(a,b),function(a,b){if(void 0===(c="passthrough"!==b.algorithm?d.createHash(b.algorithm):new k).write&&(c.write=c.update,c.end=c.update),j(b,c).dispatch(a),c.update||c.end(""),c.digest)return c.digest("buffer"===b.encoding?void 0:b.encoding);var c,e=c.read();return"buffer"===b.encoding?e:e.toString(b.encoding)}(a,b)}(b=a.exports=e).sha1=function(a){return e(a)},b.keys=function(a){return e(a,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})},b.MD5=function(a){return e(a,{algorithm:"md5",encoding:"hex"})},b.keysMD5=function(a){return e(a,{algorithm:"md5",encoding:"hex",excludeValues:!0})};var f=d.getHashes?d.getHashes().slice():["sha1","md5"];f.push("passthrough");var g=["buffer","hex","binary","base64"];function h(a,b){var c={};if(c.algorithm=(b=b||{}).algorithm||"sha1",c.encoding=b.encoding||"hex",c.excludeValues=!!b.excludeValues,c.algorithm=c.algorithm.toLowerCase(),c.encoding=c.encoding.toLowerCase(),c.ignoreUnknown=!0===b.ignoreUnknown,c.respectType=!1!==b.respectType,c.respectFunctionNames=!1!==b.respectFunctionNames,c.respectFunctionProperties=!1!==b.respectFunctionProperties,c.unorderedArrays=!0===b.unorderedArrays,c.unorderedSets=!1!==b.unorderedSets,c.unorderedObjects=!1!==b.unorderedObjects,c.replacer=b.replacer||void 0,c.excludeKeys=b.excludeKeys||void 0,void 0===a)throw Error("Object argument required.");for(var d=0;d<f.length;++d)f[d].toLowerCase()===c.algorithm.toLowerCase()&&(c.algorithm=f[d]);if(-1===f.indexOf(c.algorithm))throw Error('Algorithm "'+c.algorithm+'" not supported. supported values: '+f.join(", "));if(-1===g.indexOf(c.encoding)&&"passthrough"!==c.algorithm)throw Error('Encoding "'+c.encoding+'" not supported. supported values: '+g.join(", "));return c}function i(a){return"function"==typeof a&&null!=/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i.exec(Function.prototype.toString.call(a))}function j(a,b,c){c=c||[];var d=function(a){return b.update?b.update(a,"utf8"):b.write(a,"utf8")};return{dispatch:function(b){a.replacer&&(b=a.replacer(b));var c=typeof b;return null===b&&(c="null"),this["_"+c](b)},_object:function(b){var e=Object.prototype.toString.call(b),f=/\[object (.*)\]/i.exec(e);f=(f=f?f[1]:"unknown:["+e+"]").toLowerCase();var g=null;if((g=c.indexOf(b))>=0)return this.dispatch("[CIRCULAR:"+g+"]");if(c.push(b),"u">typeof Buffer&&Buffer.isBuffer&&Buffer.isBuffer(b))return d("buffer:"),d(b);if("object"!==f&&"function"!==f&&"asyncfunction"!==f)if(this["_"+f])this["_"+f](b);else if(a.ignoreUnknown)return d("["+f+"]");else throw Error('Unknown object type "'+f+'"');else{var h=Object.keys(b);a.unorderedObjects&&(h=h.sort()),!1===a.respectType||i(b)||h.splice(0,0,"prototype","__proto__","constructor"),a.excludeKeys&&(h=h.filter(function(b){return!a.excludeKeys(b)})),d("object:"+h.length+":");var j=this;return h.forEach(function(c){j.dispatch(c),d(":"),a.excludeValues||j.dispatch(b[c]),d(",")})}},_array:function(b,e){e=void 0!==e?e:!1!==a.unorderedArrays;var f=this;if(d("array:"+b.length+":"),!e||b.length<=1)return b.forEach(function(a){return f.dispatch(a)});var g=[],h=b.map(function(b){var d=new k,e=c.slice();return j(a,d,e).dispatch(b),g=g.concat(e.slice(c.length)),d.read().toString()});return c=c.concat(g),h.sort(),this._array(h,!1)},_date:function(a){return d("date:"+a.toJSON())},_symbol:function(a){return d("symbol:"+a.toString())},_error:function(a){return d("error:"+a.toString())},_boolean:function(a){return d("bool:"+a.toString())},_string:function(a){d("string:"+a.length+":"),d(a.toString())},_function:function(b){d("fn:"),i(b)?this.dispatch("[native]"):this.dispatch(b.toString()),!1!==a.respectFunctionNames&&this.dispatch("function-name:"+String(b.name)),a.respectFunctionProperties&&this._object(b)},_number:function(a){return d("number:"+a.toString())},_xml:function(a){return d("xml:"+a.toString())},_null:function(){return d("Null")},_undefined:function(){return d("Undefined")},_regexp:function(a){return d("regex:"+a.toString())},_uint8array:function(a){return d("uint8array:"),this.dispatch(Array.prototype.slice.call(a))},_uint8clampedarray:function(a){return d("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(a))},_int8array:function(a){return d("uint8array:"),this.dispatch(Array.prototype.slice.call(a))},_uint16array:function(a){return d("uint16array:"),this.dispatch(Array.prototype.slice.call(a))},_int16array:function(a){return d("uint16array:"),this.dispatch(Array.prototype.slice.call(a))},_uint32array:function(a){return d("uint32array:"),this.dispatch(Array.prototype.slice.call(a))},_int32array:function(a){return d("uint32array:"),this.dispatch(Array.prototype.slice.call(a))},_float32array:function(a){return d("float32array:"),this.dispatch(Array.prototype.slice.call(a))},_float64array:function(a){return d("float64array:"),this.dispatch(Array.prototype.slice.call(a))},_arraybuffer:function(a){return d("arraybuffer:"),this.dispatch(new Uint8Array(a))},_url:function(a){return d("url:"+a.toString(),"utf8")},_map:function(b){d("map:");var c=Array.from(b);return this._array(c,!1!==a.unorderedSets)},_set:function(b){d("set:");var c=Array.from(b);return this._array(c,!1!==a.unorderedSets)},_file:function(a){return d("file:"),this.dispatch([a.name,a.size,a.type,a.lastModfied])},_blob:function(){if(a.ignoreUnknown)return d("[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 d("domwindow")},_bigint:function(a){return d("bigint:"+a.toString())},_process:function(){return d("process")},_timer:function(){return d("timer")},_pipe:function(){return d("pipe")},_tcp:function(){return d("tcp")},_udp:function(){return d("udp")},_tty:function(){return d("tty")},_statwatcher:function(){return d("statwatcher")},_securecontext:function(){return d("securecontext")},_connection:function(){return d("connection")},_zlib:function(){return d("zlib")},_context:function(){return d("context")},_nodescript:function(){return d("nodescript")},_httpparser:function(){return d("httpparser")},_dataview:function(){return d("dataview")},_signal:function(){return d("signal")},_fsevent:function(){return d("fsevent")},_tlswrap:function(){return d("tlswrap")}}}function k(){return{buf:"",write:function(a){this.buf+=a},end:function(a){this.buf+=a},read:function(){return this.buf}}}b.writeToStream=function(a,b,c){return void 0===c&&(c=b,b={}),j(b=h(a,b),c).dispatch(a)}},89879:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=function(a){if("object"!=typeof a||null===a||"[object Object]"!==Object.prototype.toString.call(a))return!1;if(null===Object.getPrototypeOf(a))return!0;let b=a;for(;null!==Object.getPrototypeOf(b);)b=Object.getPrototypeOf(b);return Object.getPrototypeOf(a)===b}},89935:a=>{function b(a,b,c,d,e,f,g){try{var h=a[f](g),i=h.value}catch(a){return void c(a)}h.done?b(i):Promise.resolve(i).then(d,e)}a.exports=function(a){return function(){var c=this,d=arguments;return new Promise(function(e,f){var g=a.apply(c,d);function h(a){b(g,e,f,h,i,"next",a)}function i(a){b(g,e,f,h,i,"throw",a)}h(void 0)})}},a.exports.__esModule=!0,a.exports.default=a.exports},90628:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});let d=c(9179),e=c(38020),f=c(94948),g=c(99968),h=c(32706),i=c(14191),j=c(58756),k=c(34672),l=c(20612),m=c(89879),n=c(73783);b.default=async function(a,b,c,o,p){switch((0,l.default)(a,b,"decrypt"),a){case"dir":if(void 0!==c)throw new i.JWEInvalid("Encountered unexpected JWE Encrypted Key");return b;case"ECDH-ES":if(void 0!==c)throw new i.JWEInvalid("Encountered unexpected JWE Encrypted Key");case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{let f,g;if(!(0,m.default)(o.epk))throw new i.JWEInvalid('JOSE Header "epk" (Ephemeral Public Key) missing or invalid');if(!e.ecdhAllowed(b))throw new i.JOSENotSupported("ECDH with the provided key is not allowed or not supported by your javascript runtime");let l=await (0,k.importJWK)(o.epk,a);if(void 0!==o.apu){if("string"!=typeof o.apu)throw new i.JWEInvalid('JOSE Header "apu" (Agreement PartyUInfo) invalid');try{f=(0,h.decode)(o.apu)}catch{throw new i.JWEInvalid("Failed to base64url decode the apu")}}if(void 0!==o.apv){if("string"!=typeof o.apv)throw new i.JWEInvalid('JOSE Header "apv" (Agreement PartyVInfo) invalid');try{g=(0,h.decode)(o.apv)}catch{throw new i.JWEInvalid("Failed to base64url decode the apv")}}let n=await e.deriveKey(l,b,"ECDH-ES"===a?o.enc:a,"ECDH-ES"===a?(0,j.bitLength)(o.enc):parseInt(a.slice(-5,-2),10),f,g);if("ECDH-ES"===a)return n;if(void 0===c)throw new i.JWEInvalid("JWE Encrypted Key missing");return(0,d.unwrap)(a.slice(-6),n,c)}case"RSA1_5":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":if(void 0===c)throw new i.JWEInvalid("JWE Encrypted Key missing");return(0,g.decrypt)(a,b,c);case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{let d;if(void 0===c)throw new i.JWEInvalid("JWE Encrypted Key missing");if("number"!=typeof o.p2c)throw new i.JWEInvalid('JOSE Header "p2c" (PBES2 Count) missing or invalid');let e=(null==p?void 0:p.maxPBES2Count)||1e4;if(o.p2c>e)throw new i.JWEInvalid('JOSE Header "p2c" (PBES2 Count) out is of acceptable bounds');if("string"!=typeof o.p2s)throw new i.JWEInvalid('JOSE Header "p2s" (PBES2 Salt) missing or invalid');try{d=(0,h.decode)(o.p2s)}catch{throw new i.JWEInvalid("Failed to base64url decode the p2s")}return(0,f.decrypt)(a,b,c,o.p2c,d)}case"A128KW":case"A192KW":case"A256KW":if(void 0===c)throw new i.JWEInvalid("JWE Encrypted Key missing");return(0,d.unwrap)(a,b,c);case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":{let d,e;if(void 0===c)throw new i.JWEInvalid("JWE Encrypted Key missing");if("string"!=typeof o.iv)throw new i.JWEInvalid('JOSE Header "iv" (Initialization Vector) missing or invalid');if("string"!=typeof o.tag)throw new i.JWEInvalid('JOSE Header "tag" (Authentication Tag) missing or invalid');try{d=(0,h.decode)(o.iv)}catch{throw new i.JWEInvalid("Failed to base64url decode the iv")}try{e=(0,h.decode)(o.tag)}catch{throw new i.JWEInvalid("Failed to base64url decode the tag")}return(0,n.unwrap)(a,b,c,d,e)}default:throw new i.JOSENotSupported('Invalid or unsupported "alg" (JWE Algorithm) header value')}}},90967:(a,b)=>{"use strict";async function c({email:a,adapter:b}){let{getUserByEmail:d}=b,e=a?await d(a):null;return e||{id:a,email:a,emailVerified:null}}Object.defineProperty(b,"__esModule",{value:!0}),b.default=c},91294:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=e;var d=c(60434);async function e(a){var b,c,e,f,g,h;let{options:i,sessionStore:j,newSession:k,isUpdate:l}=a,{adapter:m,jwt:n,events:o,callbacks:p,logger:q,session:{strategy:r,maxAge:s}}=i,t={body:{},headers:[{key:"Content-Type",value:"application/json"},...l?[]:[{key:"Cache-Control",value:"private, no-cache, no-store"},{key:"Pragma",value:"no-cache"},{key:"Expires",value:"0"}]].filter(Boolean),cookies:[]},u=j.value;if(!u)return t;if("jwt"===r)try{let a=await n.decode({...n,token:u});if(!a)throw Error("JWT invalid");let e=await p.jwt({token:a,...l&&{trigger:"update"},session:k}),f=(0,d.fromDate)(s),g=await p.session({session:{user:{name:null==a?void 0:a.name,email:null==a?void 0:a.email,image:null==a?void 0:a.picture},expires:f.toISOString()},token:e});t.body=g;let h=await n.encode({...n,token:e,maxAge:i.session.maxAge}),m=j.chunk(h,{expires:f});null==(b=t.cookies)||b.push(...m),await (null==(c=o.session)?void 0:c.call(o,{session:g,token:e}))}catch(a){q.error("JWT_SESSION_ERROR",a),null==(e=t.cookies)||e.push(...j.clean())}else try{let{getSessionAndUser:a,deleteSession:b,updateSession:c}=m,e=await a(u);if(e&&e.session.expires.valueOf()<Date.now()&&(await b(u),e=null),e){let{user:a,session:b}=e,h=i.session.updateAge,j=b.expires.valueOf()-1e3*s+1e3*h,m=(0,d.fromDate)(s);j<=Date.now()&&await c({sessionToken:u,expires:m});let n=await p.session({session:{user:{name:a.name,email:a.email,image:a.image},expires:b.expires.toISOString()},user:a,newSession:k,...l?{trigger:"update"}:{}});t.body=n,null==(f=t.cookies)||f.push({name:i.cookies.sessionToken.name,value:u,options:{...i.cookies.sessionToken.options,expires:m}}),await (null==(g=o.session)?void 0:g.call(o,{session:n}))}else u&&(null==(h=t.cookies)||h.push(...j.clean()))}catch(a){q.error("SESSION_ERROR",a)}return t}},91830:a=>{a.exports=function(a,b){this.v=a,this.k=b},a.exports.__esModule=!0,a.exports.default=a.exports},92117:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.jwkImport=b.jwkExport=b.rsaPssParams=b.oneShotCallback=void 0;let[c,d]=process.versions.node.split(".").map(a=>parseInt(a,10));b.oneShotCallback=c>=16||15===c&&d>=13,b.rsaPssParams=!("electron"in process.versions)&&(c>=17||16===c&&d>=9),b.jwkExport=c>=16||15===c&&d>=9,b.jwkImport=c>=16||15===c&&d>=12},92721:(a,b,c)=>{let d=c(93189),{RPError:e}=c(28583),{assertIssuerConfiguration:f}=c(34752),{random:g}=c(80312),h=c(51575),i=c(67325),{keystores:j}=c(31347),k=c(74372),l=a=>encodeURIComponent(a).replace(/%20/g,"+");async function m(a,b){let c=this[`${a}_endpoint_auth_signing_alg`];if(c||f(this.issuer,`${a}_endpoint_auth_signing_alg_values_supported`),"client_secret_jwt"===this[`${a}_endpoint_auth_method`]){if(!c){let b=this.issuer[`${a}_endpoint_auth_signing_alg_values_supported`];c=Array.isArray(b)&&b.find(a=>/^HS(?:256|384|512)/.test(a))}if(!c)throw new e(`failed to determine a JWS Algorithm to use for ${this[`${a}_endpoint_auth_method`]} Client Assertion`);return new d.CompactSign(Buffer.from(JSON.stringify(b))).setProtectedHeader({alg:c}).sign(this.secretForAlg(c))}let g=await j.get(this);if(!g)throw TypeError("no client jwks provided for signing a client assertion with");if(!c){let b=this.issuer[`${a}_endpoint_auth_signing_alg_values_supported`];c=Array.isArray(b)&&b.find(a=>g.get({alg:a,use:"sig"}))}if(!c)throw new e(`failed to determine a JWS Algorithm to use for ${this[`${a}_endpoint_auth_method`]} Client Assertion`);let h=g.get({alg:c,use:"sig"});if(!h)throw new e(`no key found in client jwks to sign a client assertion with using alg ${c}`);return new d.CompactSign(Buffer.from(JSON.stringify(b))).setProtectedHeader({alg:c,kid:h.jwk&&h.jwk.kid}).sign(await h.keyObject(c))}async function n(a,{clientAssertionPayload:b}={}){switch(this[`${a}_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 c=h(),d=await m.call(this,a,{iat:c,exp:c+60,jti:g(),iss:this.client_id,sub:this.client_id,aud:this.issuer.issuer,...b});return{form:{client_id:this.client_id,client_assertion:d,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 a=`${l(this.client_id)}:${l(this.client_secret)}`,b=Buffer.from(a).toString("base64");return{headers:{Authorization:`Basic ${b}`}}}default:throw TypeError(`missing, or unsupported, ${a}_endpoint_auth_method`)}}async function o(a,b,{clientAssertionPayload:c,endpointAuthMethod:d=a,DPoP:e}={}){let f,g=k(b,await n.call(this,d,{clientAssertionPayload:c})),h=this[`${d}_endpoint_auth_method`].includes("tls_client_auth")||"token"===a&&this.tls_client_certificate_bound_access_tokens;if(h&&this.issuer.mtls_endpoint_aliases&&(f=this.issuer.mtls_endpoint_aliases[`${a}_endpoint`]),f=f||this.issuer[`${a}_endpoint`],"form"in g)for(let[a,b]of Object.entries(g.form))void 0===b&&delete g.form[a];return i.call(this,{...g,method:"POST",url:f,headers:{..."revocation"!==a?{Accept:"application/json"}:void 0,...g.headers}},{mTLS:h,DPoP:e})}a.exports={resolveResponseType:function(){let{length:a,0:b}=this.response_types;if(1===a)return b},resolveRedirectUri:function(){let{length:a,0:b}=this.redirect_uris||[];if(1===a)return b},authFor:n,authenticatedPost:o}},93007:a=>{a.exports=a=>!!a&&a.constructor===Object},93111:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.generateKeyPair=b.generateSecret=void 0;let d=c(55511),e=c(28354),f=c(17071),g=c(35243),h=c(14191),i=(0,e.promisify)(d.generateKeyPair);b.generateSecret=async function(a,b){let c;switch(a){case"HS256":case"HS384":case"HS512":case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":c=parseInt(a.slice(-3),10);break;case"A128KW":case"A192KW":case"A256KW":case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":case"A128GCM":case"A192GCM":case"A256GCM":c=parseInt(a.slice(1,4),10);break;default:throw new h.JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}return(0,d.createSecretKey)((0,f.default)(new Uint8Array(c>>3)))},b.generateKeyPair=async function(a,b){var c,d;switch(a){case"RS256":case"RS384":case"RS512":case"PS256":case"PS384":case"PS512":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":case"RSA1_5":{let a=null!=(c=null==b?void 0:b.modulusLength)?c:2048;if("number"!=typeof a||a<2048)throw new h.JOSENotSupported("Invalid or unsupported modulusLength option provided, 2048 bits or larger keys must be used");let d=await i("rsa",{modulusLength:a,publicExponent:65537});return(0,g.setModulusLength)(d.privateKey,a),(0,g.setModulusLength)(d.publicKey,a),d}case"ES256":return i("ec",{namedCurve:"P-256"});case"ES256K":return i("ec",{namedCurve:"secp256k1"});case"ES384":return i("ec",{namedCurve:"P-384"});case"ES512":return i("ec",{namedCurve:"P-521"});case"EdDSA":switch(null==b?void 0:b.crv){case void 0:case"Ed25519":return i("ed25519");case"Ed448":return i("ed448");default:throw new h.JOSENotSupported("Invalid or unsupported crv option provided, supported values are Ed25519 and Ed448")}case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":let e=null!=(d=null==b?void 0:b.crv)?d:"P-256";switch(e){case void 0:case"P-256":case"P-384":case"P-521":return i("ec",{namedCurve:e});case"X25519":return i("x25519");case"X448":return i("x448");default:throw new h.JOSENotSupported("Invalid or unsupported crv option provided, supported values are P-256, P-384, P-521, X25519, and X448")}default:throw new h.JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}}},93189:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.cryptoRuntime=b.base64url=b.generateSecret=b.generateKeyPair=b.errors=b.decodeJwt=b.decodeProtectedHeader=b.importJWK=b.importX509=b.importPKCS8=b.importSPKI=b.exportJWK=b.exportSPKI=b.exportPKCS8=b.UnsecuredJWT=b.createRemoteJWKSet=b.createLocalJWKSet=b.EmbeddedJWK=b.calculateJwkThumbprintUri=b.calculateJwkThumbprint=b.EncryptJWT=b.SignJWT=b.GeneralSign=b.FlattenedSign=b.CompactSign=b.FlattenedEncrypt=b.CompactEncrypt=b.jwtDecrypt=b.jwtVerify=b.generalVerify=b.flattenedVerify=b.compactVerify=b.GeneralEncrypt=b.generalDecrypt=b.flattenedDecrypt=b.compactDecrypt=void 0;var d=c(52459);Object.defineProperty(b,"compactDecrypt",{enumerable:!0,get:function(){return d.compactDecrypt}});var e=c(96225);Object.defineProperty(b,"flattenedDecrypt",{enumerable:!0,get:function(){return e.flattenedDecrypt}});var f=c(55798);Object.defineProperty(b,"generalDecrypt",{enumerable:!0,get:function(){return f.generalDecrypt}});var g=c(84590);Object.defineProperty(b,"GeneralEncrypt",{enumerable:!0,get:function(){return g.GeneralEncrypt}});var h=c(12115);Object.defineProperty(b,"compactVerify",{enumerable:!0,get:function(){return h.compactVerify}});var i=c(19317);Object.defineProperty(b,"flattenedVerify",{enumerable:!0,get:function(){return i.flattenedVerify}});var j=c(18016);Object.defineProperty(b,"generalVerify",{enumerable:!0,get:function(){return j.generalVerify}});var k=c(5178);Object.defineProperty(b,"jwtVerify",{enumerable:!0,get:function(){return k.jwtVerify}});var l=c(25958);Object.defineProperty(b,"jwtDecrypt",{enumerable:!0,get:function(){return l.jwtDecrypt}});var m=c(12831);Object.defineProperty(b,"CompactEncrypt",{enumerable:!0,get:function(){return m.CompactEncrypt}});var n=c(22585);Object.defineProperty(b,"FlattenedEncrypt",{enumerable:!0,get:function(){return n.FlattenedEncrypt}});var o=c(10163);Object.defineProperty(b,"CompactSign",{enumerable:!0,get:function(){return o.CompactSign}});var p=c(31093);Object.defineProperty(b,"FlattenedSign",{enumerable:!0,get:function(){return p.FlattenedSign}});var q=c(8668);Object.defineProperty(b,"GeneralSign",{enumerable:!0,get:function(){return q.GeneralSign}});var r=c(93286);Object.defineProperty(b,"SignJWT",{enumerable:!0,get:function(){return r.SignJWT}});var s=c(7326);Object.defineProperty(b,"EncryptJWT",{enumerable:!0,get:function(){return s.EncryptJWT}});var t=c(83727);Object.defineProperty(b,"calculateJwkThumbprint",{enumerable:!0,get:function(){return t.calculateJwkThumbprint}}),Object.defineProperty(b,"calculateJwkThumbprintUri",{enumerable:!0,get:function(){return t.calculateJwkThumbprintUri}});var u=c(46982);Object.defineProperty(b,"EmbeddedJWK",{enumerable:!0,get:function(){return u.EmbeddedJWK}});var v=c(48944);Object.defineProperty(b,"createLocalJWKSet",{enumerable:!0,get:function(){return v.createLocalJWKSet}});var w=c(21825);Object.defineProperty(b,"createRemoteJWKSet",{enumerable:!0,get:function(){return w.createRemoteJWKSet}});var x=c(95413);Object.defineProperty(b,"UnsecuredJWT",{enumerable:!0,get:function(){return x.UnsecuredJWT}});var y=c(27871);Object.defineProperty(b,"exportPKCS8",{enumerable:!0,get:function(){return y.exportPKCS8}}),Object.defineProperty(b,"exportSPKI",{enumerable:!0,get:function(){return y.exportSPKI}}),Object.defineProperty(b,"exportJWK",{enumerable:!0,get:function(){return y.exportJWK}});var z=c(34672);Object.defineProperty(b,"importSPKI",{enumerable:!0,get:function(){return z.importSPKI}}),Object.defineProperty(b,"importPKCS8",{enumerable:!0,get:function(){return z.importPKCS8}}),Object.defineProperty(b,"importX509",{enumerable:!0,get:function(){return z.importX509}}),Object.defineProperty(b,"importJWK",{enumerable:!0,get:function(){return z.importJWK}});var A=c(98899);Object.defineProperty(b,"decodeProtectedHeader",{enumerable:!0,get:function(){return A.decodeProtectedHeader}});var B=c(58616);Object.defineProperty(b,"decodeJwt",{enumerable:!0,get:function(){return B.decodeJwt}}),b.errors=c(14191);var C=c(62877);Object.defineProperty(b,"generateKeyPair",{enumerable:!0,get:function(){return C.generateKeyPair}});var D=c(20997);Object.defineProperty(b,"generateSecret",{enumerable:!0,get:function(){return D.generateSecret}}),b.base64url=c(12446);var E=c(34182);Object.defineProperty(b,"cryptoRuntime",{enumerable:!0,get:function(){return E.default}})},93286:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.SignJWT=void 0;let d=c(10163),e=c(14191),f=c(38569),g=c(14111);class h extends g.ProduceJWT{setProtectedHeader(a){return this._protectedHeader=a,this}async sign(a,b){var c;let g=new d.CompactSign(f.encoder.encode(JSON.stringify(this._payload)));if(g.setProtectedHeader(this._protectedHeader),Array.isArray(null==(c=this._protectedHeader)?void 0:c.crit)&&this._protectedHeader.crit.includes("b64")&&!1===this._protectedHeader.b64)throw new e.JWTInvalid("JWTs MUST NOT use unencoded payload");return g.sign(a,b)}}b.SignJWT=h},94538:(a,b,c)=>{"use strict";c.r(b),c.d(b,{__esModule:()=>d.B,cookies:()=>d.U,draftMode:()=>f.r,headers:()=>e.b});var d=c(94926),e=c(56499),f=c(9572)},94926:(a,b,c)=>{"use strict";Object.defineProperty(b,"B",{value:!0}),Object.defineProperty(b,"U",{enumerable:!0,get:function(){return n}});let d=c(83850),e=c(87843),f=c(29294),g=c(63033),h=c(30754),i=c(80618),j=c(5575),k=c(50379),l=c(31228),m=c(84402);function n(){let a="cookies",b=f.workAsyncStorage.getStore(),c=g.workUnitAsyncStorage.getStore();if(b){if(c&&"after"===c.phase&&!(0,l.isRequestAPICallableInsideAfter)())throw Object.defineProperty(Error(`Route ${b.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:"E843",enumerable:!1,configurable:!0});if(b.forceStatic)return p(d.RequestCookiesAdapter.seal(new e.RequestCookies(new Headers({}))));if(b.dynamicShouldError)throw Object.defineProperty(new i.StaticGenBailoutError(`Route ${b.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:"E849",enumerable:!1,configurable:!0});if(c)switch(c.type){case"cache":let f=Object.defineProperty(Error(`Route ${b.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:"E831",enumerable:!1,configurable:!0});throw Error.captureStackTrace(f,n),b.invalidDynamicUsageError??=f,f;case"unstable-cache":throw Object.defineProperty(Error(`Route ${b.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:"E846",enumerable:!1,configurable:!0});case"generate-static-params":throw Object.defineProperty(Error(`Route ${b.route} used \`cookies()\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1123",enumerable:!1,configurable:!0});case"prerender":var k=b,q=c;let r=o.get(q);if(r)return r;let s=(0,j.makeHangingPromise)(q.renderSignal,k.route,"`cookies()`");return o.set(q,s),s;case"prerender-client":case"validation-client":let t="`cookies`";throw Object.defineProperty(new m.InvariantError(`${t} must not be used within a Client Component. Next.js should be preventing ${t} from being included in Client Components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1037",enumerable:!1,configurable:!0});case"prerender-ppr":return(0,h.postponeWithTracking)(b.route,a,c.dynamicTracking);case"prerender-legacy":return(0,h.throwToInterruptStaticGeneration)(a,b,c);case"prerender-runtime":return(0,j.delayUntilRuntimeStage)(c,p(c.cookies));case"private-cache":return p(c.cookies);case"request":let u;if((0,h.trackDynamicDataInDynamicRender)(c),u=(0,d.areCookiesMutableInCurrentPhase)(c)?c.userspaceMutableCookies:c.cookies,!c.asyncApiPromises)return p(u);{let a=(0,g.isInEarlyRenderStage)(c);if(u===c.mutableCookies)return a?c.asyncApiPromises.earlyMutableCookies:c.asyncApiPromises.mutableCookies;return a?c.asyncApiPromises.earlyCookies:c.asyncApiPromises.cookies}}}(0,g.throwForMissingRequestStore)(a)}c(44183);let o=new WeakMap;function p(a){let b=o.get(a);if(b)return b;let c=Promise.resolve(a);return o.set(a,c),c}(0,k.createDedupedByCallsiteServerErrorLoggerDev)(function(a,b){let c=a?`Route "${a}" `:"This route ";return Object.defineProperty(Error(`${c}used ${b}. \`cookies()\` returns a Promise and must be unwrapped with \`await\` or \`React.use()\` before accessing its properties. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`),"__NEXT_ERROR_CODE",{value:"E830",enumerable:!1,configurable:!0})})},94948:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.decrypt=b.encrypt=void 0;let d=c(28354),e=c(55511),f=c(17071),g=c(38569),h=c(32706),i=c(9179),j=c(21865),k=c(63549),l=c(4888),m=c(25092),n=c(72349),o=c(57944),p=(0,d.promisify)(e.pbkdf2);function q(a,b){if((0,m.default)(a))return a.export();if(a instanceof Uint8Array)return a;if((0,k.isCryptoKey)(a))return(0,l.checkEncCryptoKey)(a,b,"deriveBits","deriveKey"),e.KeyObject.from(a).export();throw TypeError((0,n.default)(a,...o.types,"Uint8Array"))}b.encrypt=async(a,b,c,d=2048,e=(0,f.default)(new Uint8Array(16)))=>{(0,j.default)(e);let k=(0,g.p2s)(a,e),l=parseInt(a.slice(13,16),10)>>3,m=q(b,a),n=await p(m,k,d,l,`sha${a.slice(8,11)}`);return{encryptedKey:await (0,i.wrap)(a.slice(-6),n,c),p2c:d,p2s:(0,h.encode)(e)}},b.decrypt=async(a,b,c,d,e)=>{(0,j.default)(e);let f=(0,g.p2s)(a,e),h=parseInt(a.slice(13,16),10)>>3,k=q(b,a),l=await p(k,f,d,h,`sha${a.slice(8,11)}`);return(0,i.unwrap)(a.slice(-6),l,c)}},95413:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.UnsecuredJWT=void 0;let d=c(32706),e=c(38569),f=c(14191),g=c(64377),h=c(14111);class i extends h.ProduceJWT{encode(){let a=d.encode(JSON.stringify({alg:"none"})),b=d.encode(JSON.stringify(this._payload));return`${a}.${b}.`}static decode(a,b){let c;if("string"!=typeof a)throw new f.JWTInvalid("Unsecured JWT must be a string");let{0:h,1:i,2:j,length:k}=a.split(".");if(3!==k||""!==j)throw new f.JWTInvalid("Invalid Unsecured JWT");try{if(c=JSON.parse(e.decoder.decode(d.decode(h))),"none"!==c.alg)throw Error()}catch{throw new f.JWTInvalid("Invalid Unsecured JWT")}return{payload:(0,g.default)(c,d.decode(i),b),header:c}}}b.UnsecuredJWT=i},95492:(a,b,c)=>{let d,{strict:e}=c(12412),{createHash:f}=c(55511),{format:g}=c(28354);function h(a,b,c){let e=(function(a,b){switch(a){case"HS256":case"RS256":case"PS256":case"ES256":case"ES256K":return f("sha256");case"HS384":case"RS384":case"PS384":case"ES384":return f("sha384");case"HS512":case"RS512":case"PS512":case"ES512":case"Ed25519":return f("sha512");case"Ed448":return f("shake256",{outputLength:114});case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":return f("shake256",{outputLength:64});case"EdDSA":switch(b){case"Ed25519":return f("sha512");case"Ed448":return f("shake256",{outputLength:114});default:throw TypeError("unrecognized or invalid EdDSA curve provided")}default:throw TypeError("unrecognized or invalid JWS algorithm provided")}})(b,c).update(a).digest();return d(e.slice(0,e.length/2))}d=Buffer.isEncoding("base64url")?a=>a.toString("base64url"):a=>a.toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"),a.exports={validate:function(a,b,c,d,f){let i,j;if("string"!=typeof a.claim||!a.claim)throw TypeError("names.claim must be a non-empty string");if("string"!=typeof a.source||!a.source)throw TypeError("names.source must be a non-empty string");e("string"==typeof b&&b,`${a.claim} must be a non-empty string`),e("string"==typeof c&&c,`${a.source} must be a non-empty string`);try{i=h(c,d,f)}catch(b){j=g("%s could not be validated (%s)",a.claim,b.message)}j=j||g("%s mismatch, expected %s, got: %s",a.claim,i,b),e.equal(i,b,j)},generate:h}},96134:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=function(a){var b;let{url:c,error:e="default",theme:f}=a,g=`${c}/signin`,h={default:{status:200,heading:"Error",message:(0,d.h)("p",null,(0,d.h)("a",{className:"site",href:null==c?void 0:c.origin},null==c?void 0:c.host))},configuration:{status:500,heading:"Server error",message:(0,d.h)("div",null,(0,d.h)("p",null,"There is a problem with the server configuration."),(0,d.h)("p",null,"Check the server logs for more information."))},accessdenied:{status:403,heading:"Access Denied",message:(0,d.h)("div",null,(0,d.h)("p",null,"You do not have permission to sign in."),(0,d.h)("p",null,(0,d.h)("a",{className:"button",href:g},"Sign in")))},verification:{status:403,heading:"Unable to sign in",message:(0,d.h)("div",null,(0,d.h)("p",null,"The sign in link is no longer valid."),(0,d.h)("p",null,"It may have been used already or it may have expired.")),signin:(0,d.h)("a",{className:"button",href:g},"Sign in")}},{status:i,heading:j,message:k,signin:l}=null!=(b=h[e.toLowerCase()])?b:h.default;return{status:i,html:(0,d.h)("div",{className:"error"},(null==f?void 0:f.brandColor)&&(0,d.h)("style",{dangerouslySetInnerHTML:{__html:`
30
+ `}}),(0,d.h)("div",{className:"card"},e.logo&&(0,d.h)("img",{src:e.logo,alt:"Logo",className:"logo"}),(0,d.h)("h1",null,"Signout"),(0,d.h)("p",null,"Are you sure you want to sign out?"),(0,d.h)("form",{action:`${b}/signout`,method:"POST"},(0,d.h)("input",{type:"hidden",name:"csrfToken",value:c}),(0,d.h)("button",{id:"submitButton",type:"submit"},"Sign out"))))};var d=c(16588)},82996:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.setCurve=b.weakMap=void 0;let d=c(79428),e=c(55511),f=c(14191),g=c(63549),h=c(25092),i=c(72349),j=c(57944),k=d.Buffer.from([42,134,72,206,61,3,1,7]),l=d.Buffer.from([43,129,4,0,34]),m=d.Buffer.from([43,129,4,0,35]),n=d.Buffer.from([43,129,4,0,10]);b.weakMap=new WeakMap;let o=(a,c)=>{var d;let p;if((0,g.isCryptoKey)(a))p=e.KeyObject.from(a);else if((0,h.default)(a))p=a;else throw TypeError((0,i.default)(a,...j.types));if("secret"===p.type)throw TypeError('only "private" or "public" type keys can be used for this operation');switch(p.asymmetricKeyType){case"ed25519":case"ed448":return`Ed${p.asymmetricKeyType.slice(2)}`;case"x25519":case"x448":return`X${p.asymmetricKeyType.slice(1)}`;case"ec":{if(b.weakMap.has(p))return b.weakMap.get(p);let a=null==(d=p.asymmetricKeyDetails)?void 0:d.namedCurve;if(a||"private"!==p.type){if(!a){let b=p.export({format:"der",type:"spki"}),c=b[1]<128?14:15,d=b[c],e=b.slice(c+1,c+1+d);if(e.equals(k))a="prime256v1";else if(e.equals(l))a="secp384r1";else if(e.equals(m))a="secp521r1";else if(e.equals(n))a="secp256k1";else throw new f.JOSENotSupported("Unsupported key curve for this operation")}}else a=o((0,e.createPublicKey)(p),!0);if(c)return a;let g=(a=>{switch(a){case"prime256v1":return"P-256";case"secp384r1":return"P-384";case"secp521r1":return"P-521";case"secp256k1":return"secp256k1";default:throw new f.JOSENotSupported("Unsupported key curve for this operation")}})(a);return b.weakMap.set(p,g),g}default:throw TypeError("Invalid asymmetric key type for this operation")}};b.setCurve=function(a,c){b.weakMap.set(a,c)},b.default=o},83374:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0})},83545:(a,b,c)=>{var d=c(91830),e=c(86240);a.exports=function a(b,c){var f;this.next||(e(a.prototype),e(a.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),e(this,"_invoke",function(a,e,g){function h(){return new c(function(e,f){!function a(e,f,g,h){try{var i=b[e](f),j=i.value;return j instanceof d?c.resolve(j.v).then(function(b){a("next",b,g,h)},function(b){a("throw",b,g,h)}):c.resolve(j).then(function(a){i.value=a,g(i)},function(b){return a("throw",b,g,h)})}catch(a){h(a)}}(a,g,e,f)})}return f=f?f.then(h,h):h()},!0)},a.exports.__esModule=!0,a.exports.default=a.exports},83727:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.calculateJwkThumbprintUri=b.calculateJwkThumbprint=void 0;let d=c(12064),e=c(32706),f=c(14191),g=c(38569),h=c(89879),i=(a,b)=>{if("string"!=typeof a||!a)throw new f.JWKInvalid(`${b} missing or invalid`)};async function j(a,b){let c;if(!(0,h.default)(a))throw TypeError("JWK must be an object");if(null!=b||(b="sha256"),"sha256"!==b&&"sha384"!==b&&"sha512"!==b)throw TypeError('digestAlgorithm must one of "sha256", "sha384", or "sha512"');switch(a.kty){case"EC":i(a.crv,'"crv" (Curve) Parameter'),i(a.x,'"x" (X Coordinate) Parameter'),i(a.y,'"y" (Y Coordinate) Parameter'),c={crv:a.crv,kty:a.kty,x:a.x,y:a.y};break;case"OKP":i(a.crv,'"crv" (Subtype of Key Pair) Parameter'),i(a.x,'"x" (Public Key) Parameter'),c={crv:a.crv,kty:a.kty,x:a.x};break;case"RSA":i(a.e,'"e" (Exponent) Parameter'),i(a.n,'"n" (Modulus) Parameter'),c={e:a.e,kty:a.kty,n:a.n};break;case"oct":i(a.k,'"k" (Key Value) Parameter'),c={k:a.k,kty:a.kty};break;default:throw new f.JOSENotSupported('"kty" (Key Type) Parameter missing or unsupported')}let j=g.encoder.encode(JSON.stringify(c));return(0,e.encode)(await (0,d.default)(b,j))}b.calculateJwkThumbprint=j,b.calculateJwkThumbprintUri=async function(a,b){null!=b||(b="sha256");let c=await j(a,b);return`urn:ietf:params:oauth:jwk-thumbprint:sha-${b.slice(-3)}:${c}`}},83766:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});class c{constructor(a){if(48!==a[0]||(this.buffer=a,this.offset=1,this.decodeLength()!==a.length-this.offset))throw TypeError()}decodeLength(){let a=this.buffer[this.offset++];if(128&a){let b=-129&a;a=0;for(let c=0;c<b;c++)a=a<<8|this.buffer[this.offset+c];this.offset+=b}return a}unsignedInteger(){if(2!==this.buffer[this.offset++])throw TypeError();let a=this.decodeLength();0===this.buffer[this.offset]&&(this.offset++,a--);let b=this.buffer.slice(this.offset,this.offset+a);return this.offset+=a,b}end(){if(this.offset!==this.buffer.length)throw TypeError()}}b.default=c},83850:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});var d={MutableRequestCookiesAdapter:function(){return o},ReadonlyRequestCookiesError:function(){return j},RequestCookiesAdapter:function(){return k},appendMutableCookies:function(){return n},areCookiesMutableInCurrentPhase:function(){return q},createCookiesWithMutableAccessCheck:function(){return p},getModifiedCookieValues:function(){return m},responseCookiesToRequestCookies:function(){return s}};for(var e in d)Object.defineProperty(b,e,{enumerable:!0,get:d[e]});let f=c(87843),g=c(16036),h=c(29294),i=c(43549);class j 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 j}}class k{static seal(a){return new Proxy(a,{get(a,b,c){switch(b){case"clear":case"delete":case"set":return j.callable;default:return g.ReflectAdapter.get(a,b,c)}}})}}let l=Symbol.for("next.mutated.cookies");function m(a){let b=a[l];return b&&Array.isArray(b)&&0!==b.length?b:[]}function n(a,b){let c=m(b);if(0===c.length)return!1;let d=new f.ResponseCookies(a),e=d.getAll();for(let a of c)d.set(a);for(let a of e)d.set(a);return!0}class o{static wrap(a,b){let c=new f.ResponseCookies(new Headers);for(let b of a.getAll())c.set(b);let d=[],e=new Set,j=()=>{let a=h.workAsyncStorage.getStore();if(a&&(a.pathWasRevalidated=i.ActionDidRevalidateStaticAndDynamic),d=c.getAll().filter(a=>e.has(a.name)),b){let a=[];for(let b of d){let c=new f.ResponseCookies(new Headers);c.set(b),a.push(c.toString())}b(a)}},k=new Proxy(c,{get(a,b,c){switch(b){case l:return d;case"delete":return function(...b){e.add("string"==typeof b[0]?b[0]:b[0].name);try{return a.delete(...b),k}finally{j()}};case"set":return function(...b){e.add("string"==typeof b[0]?b[0]:b[0].name);try{return a.set(...b),k}finally{j()}};default:return g.ReflectAdapter.get(a,b,c)}}});return k}}function p(a){let b=new Proxy(a.mutableCookies,{get(c,d,e){switch(d){case"delete":return function(...d){return r(a,"cookies().delete"),c.delete(...d),b};case"set":return function(...d){return r(a,"cookies().set"),c.set(...d),b};default:return g.ReflectAdapter.get(c,d,e)}}});return b}function q(a){return"action"===a.phase}function r(a,b){if(!q(a))throw new j}function s(a){let b=new f.RequestCookies(new Headers);for(let c of a.getAll())b.set(c);return b}},84373:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.deflate=b.inflate=void 0;let d=c(28354),e=c(74075),f=c(14191),g=(0,d.promisify)(e.inflateRaw),h=(0,d.promisify)(e.deflateRaw);b.inflate=a=>g(a,{maxOutputLength:25e4}).catch(()=>{throw new f.JWEDecompressionFailed}),b.deflate=a=>h(a)},84406:(a,b,c)=>{var d=c(67796).default,e=c(99051);a.exports=function(a){var b=e(a,"string");return"symbol"==d(b)?b:b+""},a.exports.__esModule=!0,a.exports.default=a.exports},84496:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});let d=c(9179),e=c(38020),f=c(94948),g=c(99968),h=c(32706),i=c(58756),j=c(14191),k=c(27871),l=c(20612),m=c(73783);b.default=async function(a,b,c,n,o={}){let p,q,r;switch((0,l.default)(a,c,"encrypt"),a){case"dir":r=c;break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{if(!e.ecdhAllowed(c))throw new j.JOSENotSupported("ECDH with the provided key is not allowed or not supported by your javascript runtime");let{apu:f,apv:g}=o,{epk:l}=o;l||(l=(await e.generateEpk(c)).privateKey);let{x:m,y:s,crv:t,kty:u}=await (0,k.exportJWK)(l),v=await e.deriveKey(c,l,"ECDH-ES"===a?b:a,"ECDH-ES"===a?(0,i.bitLength)(b):parseInt(a.slice(-5,-2),10),f,g);if(q={epk:{x:m,crv:t,kty:u}},"EC"===u&&(q.epk.y=s),f&&(q.apu=(0,h.encode)(f)),g&&(q.apv=(0,h.encode)(g)),"ECDH-ES"===a){r=v;break}r=n||(0,i.default)(b);let w=a.slice(-6);p=await (0,d.wrap)(w,v,r);break}case"RSA1_5":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":r=n||(0,i.default)(b),p=await (0,g.encrypt)(a,c,r);break;case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{r=n||(0,i.default)(b);let{p2c:d,p2s:e}=o;({encryptedKey:p,...q}=await (0,f.encrypt)(a,c,r,d,e));break}case"A128KW":case"A192KW":case"A256KW":r=n||(0,i.default)(b),p=await (0,d.wrap)(a,c,r);break;case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":{r=n||(0,i.default)(b);let{iv:d}=o;({encryptedKey:p,...q}=await (0,m.wrap)(a,c,r,d));break}default:throw new j.JOSENotSupported('Invalid or unsupported "alg" (JWE Algorithm) header value')}return{cek:r,encryptedKey:p,parameters:q}}},84590:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.GeneralEncrypt=void 0;let d=c(22585),e=c(14191),f=c(58756),g=c(85016),h=c(84496),i=c(32706),j=c(7706);class k{constructor(a,b,c){this.parent=a,this.key=b,this.options=c}setUnprotectedHeader(a){if(this.unprotectedHeader)throw TypeError("setUnprotectedHeader can only be called once");return this.unprotectedHeader=a,this}addRecipient(...a){return this.parent.addRecipient(...a)}encrypt(...a){return this.parent.encrypt(...a)}done(){return this.parent}}class l{constructor(a){this._recipients=[],this._plaintext=a}addRecipient(a,b){let c=new k(this,a,{crit:null==b?void 0:b.crit});return this._recipients.push(c),c}setProtectedHeader(a){if(this._protectedHeader)throw TypeError("setProtectedHeader can only be called once");return this._protectedHeader=a,this}setSharedUnprotectedHeader(a){if(this._unprotectedHeader)throw TypeError("setSharedUnprotectedHeader can only be called once");return this._unprotectedHeader=a,this}setAdditionalAuthenticatedData(a){return this._aad=a,this}async encrypt(a){var b,c,k;let l;if(!this._recipients.length)throw new e.JWEInvalid("at least one recipient must be added");if(a={deflateRaw:null==a?void 0:a.deflateRaw},1===this._recipients.length){let[b]=this._recipients,c=await new d.FlattenedEncrypt(this._plaintext).setAdditionalAuthenticatedData(this._aad).setProtectedHeader(this._protectedHeader).setSharedUnprotectedHeader(this._unprotectedHeader).setUnprotectedHeader(b.unprotectedHeader).encrypt(b.key,{...b.options,...a}),e={ciphertext:c.ciphertext,iv:c.iv,recipients:[{}],tag:c.tag};return c.aad&&(e.aad=c.aad),c.protected&&(e.protected=c.protected),c.unprotected&&(e.unprotected=c.unprotected),c.encrypted_key&&(e.recipients[0].encrypted_key=c.encrypted_key),c.header&&(e.recipients[0].header=c.header),e}for(let a=0;a<this._recipients.length;a++){let b=this._recipients[a];if(!(0,g.default)(this._protectedHeader,this._unprotectedHeader,b.unprotectedHeader))throw new e.JWEInvalid("JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint");let c={...this._protectedHeader,...this._unprotectedHeader,...b.unprotectedHeader},{alg:d}=c;if("string"!=typeof d||!d)throw new e.JWEInvalid('JWE "alg" (Algorithm) Header Parameter missing or invalid');if("dir"===d||"ECDH-ES"===d)throw new e.JWEInvalid('"dir" and "ECDH-ES" alg may only be used with a single recipient');if("string"!=typeof c.enc||!c.enc)throw new e.JWEInvalid('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid');if(l){if(l!==c.enc)throw new e.JWEInvalid('JWE "enc" (Encryption Algorithm) Header Parameter must be the same for all recipients')}else l=c.enc;if((0,j.default)(e.JWEInvalid,new Map,b.options.crit,this._protectedHeader,c),void 0!==c.zip&&(!this._protectedHeader||!this._protectedHeader.zip))throw new e.JWEInvalid('JWE "zip" (Compression Algorithm) Header MUST be integrity protected')}let m=(0,f.default)(l),n={ciphertext:"",iv:"",recipients:[],tag:""};for(let e=0;e<this._recipients.length;e++){let f=this._recipients[e],g={};n.recipients.push(g);let j=({...this._protectedHeader,...this._unprotectedHeader,...f.unprotectedHeader}).alg.startsWith("PBES2")?2048+e:void 0;if(0===e){let b=await new d.FlattenedEncrypt(this._plaintext).setAdditionalAuthenticatedData(this._aad).setContentEncryptionKey(m).setProtectedHeader(this._protectedHeader).setSharedUnprotectedHeader(this._unprotectedHeader).setUnprotectedHeader(f.unprotectedHeader).setKeyManagementParameters({p2c:j}).encrypt(f.key,{...f.options,...a,[d.unprotected]:!0});n.ciphertext=b.ciphertext,n.iv=b.iv,n.tag=b.tag,b.aad&&(n.aad=b.aad),b.protected&&(n.protected=b.protected),b.unprotected&&(n.unprotected=b.unprotected),g.encrypted_key=b.encrypted_key,b.header&&(g.header=b.header);continue}let{encryptedKey:o,parameters:p}=await (0,h.default)((null==(b=f.unprotectedHeader)?void 0:b.alg)||(null==(c=this._protectedHeader)?void 0:c.alg)||(null==(k=this._unprotectedHeader)?void 0:k.alg),l,f.key,m,{p2c:j});g.encrypted_key=(0,i.encode)(o),(f.unprotectedHeader||p)&&(g.header={...f.unprotectedHeader,...p})}return n}}b.GeneralEncrypt=l},84749:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});let d=c(14191);b.default=function(a){switch(a){case"PS256":case"RS256":case"ES256":case"ES256K":return"sha256";case"PS384":case"RS384":case"ES384":return"sha384";case"PS512":case"RS512":case"ES512":return"sha512";case"EdDSA":return;default:throw new d.JOSENotSupported(`alg ${a} is not supported either by JOSE or your javascript runtime`)}}},84896:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=f;var d=c(55511),e=c(60434);async function f(a,b){var c,f,g,h;let{url:i,adapter:j,provider:k,callbackUrl:l,theme:m}=b,n=null!=(c=await (null==(f=k.generateVerificationToken)?void 0:f.call(k)))?c:(0,d.randomBytes)(32).toString("hex"),o=new Date(Date.now()+(null!=(g=k.maxAge)?g:86400)*1e3),p=new URLSearchParams({callbackUrl:l,token:n,email:a}),q=`${i}/callback/${k.id}?${p}`;return await Promise.all([k.sendVerificationRequest({identifier:a,token:n,expires:o,url:q,provider:k,theme:m}),null==(h=j.createVerificationToken)?void 0:h.call(j,{identifier:a,token:(0,e.hashToken)(n,b),expires:o})]),`${i}/verify-request?${new URLSearchParams({provider:k.id,type:k.type})}`}},85016:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=(...a)=>{let b,c=a.filter(Boolean);if(0===c.length||1===c.length)return!0;for(let a of c){let c=Object.keys(a);if(!b||0===b.size){b=new Set(c);continue}for(let a of c){if(b.has(a))return!1;b.add(a)}}return!0}},85208:function(a,b,c){!function(a,b){var c=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|^--/i,d=/^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/,e=/[\s\n\\/='"\0<>]/,f=/^xlink:?./,g=/["&<]/;function h(a){if(!1===g.test(a+=""))return a;for(var b=0,c=0,d="",e="";c<a.length;c++){switch(a.charCodeAt(c)){case 34:e="&quot;";break;case 38:e="&amp;";break;case 60:e="&lt;";break;default:continue}c!==b&&(d+=a.slice(b,c)),d+=e,b=c+1}return c!==b&&(d+=a.slice(b,c)),d}var i=function(a,b){return String(a).replace(/(\n+)/g,"$1"+(b||" "))},j=function(a,b,c){return String(a).length>(b||40)||!c&&-1!==String(a).indexOf("\n")||-1!==String(a).indexOf("<")},k={},l=/([A-Z])/g;function m(a){var b="";for(var d in a){var e=a[d];null!=e&&""!==e&&(b&&(b+=" "),b+="-"==d[0]?d:k[d]||(k[d]=d.replace(l,"-$1").toLowerCase()),b="number"==typeof e&&!1===c.test(d)?b+": "+e+"px;":b+": "+e+";")}return b||void 0}function n(a,b){return Array.isArray(b)?b.reduce(n,a):null!=b&&!1!==b&&a.push(b),a}function o(){this.__d=!0}function p(a,b){return{__v:a,context:b,props:a.props,setState:o,forceUpdate:o,__d:!0,__h:[]}}function q(a,b){var c=a.contextType,d=c&&b[c.__c];return null!=c?d?d.props.value:c.__:b}var r=[],s={shallow:!0};v.render=v;var t=function(a,b){return v(a,b,s)},u=[];function v(a,c,g){c=c||{};var k=b.options.__s;b.options.__s=!0;var l,o=b.h(b.Fragment,null);return o.__k=[a],l=g&&(g.pretty||g.voidElements||g.sortAttributes||g.shallow||g.allAttributes||g.xml||g.attributeHook)?function a(c,g,k,l,o,s){if(null==c||"boolean"==typeof c)return"";if("object"!=typeof c)return"function"==typeof c?"":h(c);var t=k.pretty,u=t&&"string"==typeof t?t:" ";if(Array.isArray(c)){for(var v="",w=0;w<c.length;w++)t&&w>0&&(v+="\n"),v+=a(c[w],g,k,l,o,s);return v}if(void 0!==c.constructor)return"";var x,y=c.type,z=c.props,A=!1;if("function"==typeof y){if(A=!0,!k.shallow||!l&&!1!==k.renderRootComponent){if(y===b.Fragment){var B=[];return n(B,c.props.children),a(B,g,k,!1!==k.shallowHighOrder,o,s)}var C,D=c.__c=p(c,g);b.options.__b&&b.options.__b(c);var E=b.options.__r;if(y.prototype&&"function"==typeof y.prototype.render){var F=q(y,g);(D=c.__c=new y(z,F)).__v=c,D._dirty=D.__d=!0,D.props=z,null==D.state&&(D.state={}),null==D._nextState&&null==D.__s&&(D._nextState=D.__s=D.state),D.context=F,y.getDerivedStateFromProps?D.state=Object.assign({},D.state,y.getDerivedStateFromProps(D.props,D.state)):D.componentWillMount&&(D.componentWillMount(),D.state=D._nextState!==D.state?D._nextState:D.__s!==D.state?D.__s:D.state),E&&E(c),C=D.render(D.props,D.state,D.context)}else for(var G=q(y,g),H=0;D.__d&&H++<25;)D.__d=!1,E&&E(c),C=y.call(c.__c,z,G);return D.getChildContext&&(g=Object.assign({},g,D.getChildContext())),b.options.diffed&&b.options.diffed(c),a(C,g,k,!1!==k.shallowHighOrder,o,s)}y=(x=y).displayName||x!==Function&&x.name||function(a){var b=(Function.prototype.toString.call(a).match(/^\s*function\s+([^( ]+)/)||"")[1];if(!b){for(var c=-1,d=r.length;d--;)if(r[d]===a){c=d;break}c<0&&(c=r.push(a)-1),b="UnnamedComponent"+c}return b}(x)}var I,J,K="<"+y;if(z){var L=Object.keys(z);k&&!0===k.sortAttributes&&L.sort();for(var M=0;M<L.length;M++){var N=L[M],O=z[N];if("children"!==N){if(!e.test(N)&&(k&&k.allAttributes||"key"!==N&&"ref"!==N&&"__self"!==N&&"__source"!==N)){if("defaultValue"===N)N="value";else if("defaultChecked"===N)N="checked";else if("defaultSelected"===N)N="selected";else if("className"===N){if(void 0!==z.class)continue;N="class"}else o&&f.test(N)&&(N=N.toLowerCase().replace(/^xlink:?/,"xlink:"));if("htmlFor"===N){if(z.for)continue;N="for"}"style"===N&&O&&"object"==typeof O&&(O=m(O)),"a"===N[0]&&"r"===N[1]&&"boolean"==typeof O&&(O=String(O));var P=k.attributeHook&&k.attributeHook(N,O,g,k,A);if(P||""===P)K+=P;else if("dangerouslySetInnerHTML"===N)J=O&&O.__html;else if("textarea"===y&&"value"===N)I=O;else if((O||0===O||""===O)&&"function"!=typeof O){if(!(!0!==O&&""!==O||(O=N,k&&k.xml))){K=K+" "+N;continue}if("value"===N){if("select"===y){s=O;continue}"option"===y&&s==O&&void 0===z.selected&&(K+=" selected")}K=K+" "+N+'="'+h(O)+'"'}}}else I=O}}if(t){var Q=K.replace(/\n\s*/," ");Q===K||~Q.indexOf("\n")?t&&~K.indexOf("\n")&&(K+="\n"):K=Q}if(K+=">",e.test(y))throw Error(y+" is not a valid HTML tag name in "+K);var R,S=d.test(y)||k.voidElements&&k.voidElements.test(y),T=[];if(J)t&&j(J)&&(J="\n"+u+i(J,u)),K+=J;else if(null!=I&&n(R=[],I).length){for(var U=t&&~K.indexOf("\n"),V=!1,W=0;W<R.length;W++){var X=R[W];if(null!=X&&!1!==X){var Y=a(X,g,k,!0,"svg"===y||"foreignObject"!==y&&o,s);if(t&&!U&&j(Y)&&(U=!0),Y)if(t){var Z=Y.length>0&&"<"!=Y[0];V&&Z?T[T.length-1]+=Y:T.push(Y),V=Z}else T.push(Y)}}if(t&&U)for(var $=T.length;$--;)T[$]="\n"+u+i(T[$],u)}if(T.length||J)K+=T.join("");else if(k&&k.xml)return K.substring(0,K.length-1)+" />";return!S||R||J?(t&&~K.indexOf("\n")&&(K+="\n"),K=K+"</"+y+">"):K=K.replace(/>$/," />"),K}(a,c,g):function a(c,g,i,j,k){if(null==c||!0===c||!1===c||""===c)return"";if("object"!=typeof c)return"function"==typeof c?"":h(c);if(x(c)){var l="";k.__k=c;for(var n=0;n<c.length;n++)l+=a(c[n],g,i,j,k),c[n]=w(c[n]);return l}if(void 0!==c.constructor)return"";c.__=k,b.options.__b&&b.options.__b(c);var o=c.type,r=c.props;if("function"==typeof o){if(o===b.Fragment)A=r.children;else{var s,t,u,v,z,A=o.prototype&&"function"==typeof o.prototype.render?(s=g,u=q(t=c.type,s),v=new t(c.props,u),c.__c=v,v.__v=c,v.__d=!0,v.props=c.props,null==v.state&&(v.state={}),null==v.__s&&(v.__s=v.state),v.context=u,t.getDerivedStateFromProps?v.state=y({},v.state,t.getDerivedStateFromProps(v.props,v.state)):v.componentWillMount&&(v.componentWillMount(),v.state=v.__s!==v.state?v.__s:v.state),(z=b.options.__r)&&z(c),v.render(v.props,v.state,v.context)):function(a,c){var d,e=p(a,c),f=q(a.type,c);a.__c=e;for(var g=b.options.__r,h=0;e.__d&&h++<25;)e.__d=!1,g&&g(a),d=a.type.call(e,a.props,f);return d}(c,g),B=c.__c;B.getChildContext&&(g=y({},g,B.getChildContext()))}var C=a(A=null!=A&&A.type===b.Fragment&&null==A.key?A.props.children:A,g,i,j,c);return b.options.diffed&&b.options.diffed(c),c.__=void 0,b.options.unmount&&b.options.unmount(c),C}var D,E,F="<";if(F+=o,r)for(var G in D=r.children,r){var H,I,J,K=r[G];if(!("key"===G||"ref"===G||"__self"===G||"__source"===G||"children"===G||"className"===G&&"class"in r||"htmlFor"===G&&"for"in r||e.test(G))){if(I=G="className"===(H=G)?"class":"htmlFor"===H?"for":"defaultValue"===H?"value":"defaultChecked"===H?"checked":"defaultSelected"===H?"selected":i&&f.test(H)?H.toLowerCase().replace(/^xlink:?/,"xlink:"):H,J=K,K="style"===I&&null!=J&&"object"==typeof J?m(J):"a"===I[0]&&"r"===I[1]&&"boolean"==typeof J?String(J):J,"dangerouslySetInnerHTML"===G)E=K&&K.__html;else if("textarea"===o&&"value"===G)D=K;else if((K||0===K||""===K)&&"function"!=typeof K){if(!0===K||""===K){K=G,F=F+" "+G;continue}if("value"===G){if("select"===o){j=K;continue}"option"!==o||j!=K||"selected"in r||(F+=" selected")}F=F+" "+G+'="'+h(K)+'"'}}}var L=F;if(F+=">",e.test(o))throw Error(o+" is not a valid HTML tag name in "+F);var M="",N=!1;if(E)M+=E,N=!0;else if("string"==typeof D)M+=h(D),N=!0;else if(x(D)){c.__k=D;for(var O=0;O<D.length;O++){var P=D[O];if(D[O]=w(P),null!=P&&!1!==P){var Q=a(P,g,"svg"===o||"foreignObject"!==o&&i,j,c);Q&&(M+=Q,N=!0)}}}else if(null!=D&&!1!==D&&!0!==D){c.__k=[w(D)];var R=a(D,g,"svg"===o||"foreignObject"!==o&&i,j,c);R&&(M+=R,N=!0)}if(b.options.diffed&&b.options.diffed(c),c.__=void 0,b.options.unmount&&b.options.unmount(c),N)F+=M;else if(d.test(o))return L+" />";return F+"</"+o+">"}(a,c,!1,void 0,o),b.options.__c&&b.options.__c(a,u),b.options.__s=k,u.length=0,l}function w(a){return null==a||"boolean"==typeof a?null:"string"==typeof a||"number"==typeof a||"bigint"==typeof a?b.h(null,null,a):a}var x=Array.isArray,y=Object.assign;v.shallowRender=t,a.default=v,a.render=v,a.renderToStaticMarkup=v,a.renderToString=v,a.shallowRender=t}(b,c(16588))},85407:(a,b,c)=>{var d=c(91830),e=c(66139),f=c(7775),g=c(36633),h=c(83545),i=c(16711),j=c(24497);function k(){"use strict";var b=e(),c=b.m(k),l=(Object.getPrototypeOf?Object.getPrototypeOf(c):c.__proto__).constructor;function m(a){var b="function"==typeof a&&a.constructor;return!!b&&(b===l||"GeneratorFunction"===(b.displayName||b.name))}var n={throw:1,return:2,break:3,continue:3};function o(a){var b,c;return function(d){b||(b={stop:function(){return c(d.a,2)},catch:function(){return d.v},abrupt:function(a,b){return c(d.a,n[a],b)},delegateYield:function(a,e,f){return b.resultName=e,c(d.d,j(a),f)},finish:function(a){return c(d.f,a)}},c=function(a,c,e){d.p=b.prev,d.n=b.next;try{return a(c,e)}finally{b.next=d.n}}),b.resultName&&(b[b.resultName]=d.v,b.resultName=void 0),b.sent=d.v,b.next=d.n;try{return a.call(this,b)}finally{d.p=b.prev,d.n=b.next}}}return(a.exports=k=function(){return{wrap:function(a,c,d,e){return b.w(o(a),c,d,e&&e.reverse())},isGeneratorFunction:m,mark:b.m,awrap:function(a,b){return new d(a,b)},AsyncIterator:h,async:function(a,b,c,d,e){return(m(b)?g:f)(o(a),b,c,d,e)},keys:i,values:j}},a.exports.__esModule=!0,a.exports.default=a.exports)()}a.exports=k,a.exports.__esModule=!0,a.exports.default=a.exports},85664:(a,b)=>{"use strict";async function c({options:a,paramValue:b,cookieValue:d}){let{url:e,callbacks:f}=a,g=e.origin;return b?g=await f.redirect({url:b,baseUrl:e.origin}):d&&(g=await f.redirect({url:d,baseUrl:e.origin})),{callbackUrl:g,callbackUrlCookie:g!==d?g:void 0}}Object.defineProperty(b,"__esModule",{value:!0}),b.createCallbackUrl=c},86240:a=>{function b(c,d,e,f){var g=Object.defineProperty;try{g({},"",{})}catch(a){g=0}a.exports=b=function(a,c,d,e){function f(c,d){b(a,c,function(a){return this._invoke(c,d,a)})}c?g?g(a,c,{value:d,enumerable:!e,configurable:!e,writable:!e}):a[c]=d:(f("next",0),f("throw",1),f("return",2))},a.exports.__esModule=!0,a.exports.default=a.exports,b(c,d,e,f)}a.exports=b,a.exports.__esModule=!0,a.exports.default=a.exports},86460:(a,b,c)=>{"use strict";var d=c(31912);Object.defineProperty(b,"__esModule",{value:!0}),b.UnsupportedStrategy=b.UnknownError=b.OAuthCallbackError=b.MissingSecret=b.MissingAuthorize=b.MissingAdapterMethods=b.MissingAdapter=b.MissingAPIRoute=b.InvalidCallbackUrl=b.AccountNotLinkedError=void 0,b.adapterErrorHandler=function(a,b){if(a)return Object.keys(a).reduce(function(c,d){return c[d]=(0,f.default)(e.default.mark(function c(){var f,g,h,i,j,k=arguments;return e.default.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:for(c.prev=0,g=Array(f=k.length),h=0;h<f;h++)g[h]=k[h];return b.debug("adapter_".concat(d),{args:g}),i=a[d],c.next=6,i.apply(void 0,g);case 6:return c.abrupt("return",c.sent);case 9:throw c.prev=9,c.t0=c.catch(0),b.error("adapter_error_".concat(d),c.t0),(j=new o(c.t0)).name="".concat(q(d),"Error"),j;case 15:case"end":return c.stop()}},c,null,[[0,9]])})),c},{})},b.capitalize=q,b.eventsErrorHandler=function(a,b){return Object.keys(a).reduce(function(c,d){return c[d]=(0,f.default)(e.default.mark(function c(){var f,g=arguments;return e.default.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.prev=0,f=a[d],c.next=4,f.apply(void 0,g);case 4:return c.abrupt("return",c.sent);case 7:c.prev=7,c.t0=c.catch(0),b.error("".concat(p(d),"_EVENT_ERROR"),c.t0);case 10:case"end":return c.stop()}},c,null,[[0,7]])})),c},{})},b.upperSnake=p;var e=d(c(3410)),f=d(c(89935)),g=d(c(56127)),h=d(c(63157)),i=d(c(64869)),j=d(c(20226)),k=d(c(22934)),l=d(c(1293));function m(a,b,c){return b=(0,k.default)(b),(0,j.default)(a,n()?Reflect.construct(b,c||[],(0,k.default)(a).constructor):b.apply(a,c))}function n(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(a){}return(n=function(){return!!a})()}var o=b.UnknownError=function(a){function b(a){var c,d;return(0,h.default)(this,b),(d=m(this,b,[null!=(c=null==a?void 0:a.message)?c:a])).name="UnknownError",d.code=a.code,a instanceof Error&&(d.stack=a.stack),d}return(0,l.default)(b,a),(0,i.default)(b,[{key:"toJSON",value:function(){return{name:this.name,message:this.message,stack:this.stack}}}])}((0,d(c(61927)).default)(Error));function p(a){return a.replace(/([A-Z])/g,"_$1").toUpperCase()}function q(a){return"".concat(a[0].toUpperCase()).concat(a.slice(1))}b.OAuthCallbackError=function(a){function b(){var a;(0,h.default)(this,b);for(var c=arguments.length,d=Array(c),e=0;e<c;e++)d[e]=arguments[e];return a=m(this,b,[].concat(d)),(0,g.default)(a,"name","OAuthCallbackError"),a}return(0,l.default)(b,a),(0,i.default)(b)}(o),b.AccountNotLinkedError=function(a){function b(){var a;(0,h.default)(this,b);for(var c=arguments.length,d=Array(c),e=0;e<c;e++)d[e]=arguments[e];return a=m(this,b,[].concat(d)),(0,g.default)(a,"name","AccountNotLinkedError"),a}return(0,l.default)(b,a),(0,i.default)(b)}(o),b.MissingAPIRoute=function(a){function b(){var a;(0,h.default)(this,b);for(var c=arguments.length,d=Array(c),e=0;e<c;e++)d[e]=arguments[e];return a=m(this,b,[].concat(d)),(0,g.default)(a,"name","MissingAPIRouteError"),(0,g.default)(a,"code","MISSING_NEXTAUTH_API_ROUTE_ERROR"),a}return(0,l.default)(b,a),(0,i.default)(b)}(o),b.MissingSecret=function(a){function b(){var a;(0,h.default)(this,b);for(var c=arguments.length,d=Array(c),e=0;e<c;e++)d[e]=arguments[e];return a=m(this,b,[].concat(d)),(0,g.default)(a,"name","MissingSecretError"),(0,g.default)(a,"code","NO_SECRET"),a}return(0,l.default)(b,a),(0,i.default)(b)}(o),b.MissingAuthorize=function(a){function b(){var a;(0,h.default)(this,b);for(var c=arguments.length,d=Array(c),e=0;e<c;e++)d[e]=arguments[e];return a=m(this,b,[].concat(d)),(0,g.default)(a,"name","MissingAuthorizeError"),(0,g.default)(a,"code","CALLBACK_CREDENTIALS_HANDLER_ERROR"),a}return(0,l.default)(b,a),(0,i.default)(b)}(o),b.MissingAdapter=function(a){function b(){var a;(0,h.default)(this,b);for(var c=arguments.length,d=Array(c),e=0;e<c;e++)d[e]=arguments[e];return a=m(this,b,[].concat(d)),(0,g.default)(a,"name","MissingAdapterError"),(0,g.default)(a,"code","EMAIL_REQUIRES_ADAPTER_ERROR"),a}return(0,l.default)(b,a),(0,i.default)(b)}(o),b.MissingAdapterMethods=function(a){function b(){var a;(0,h.default)(this,b);for(var c=arguments.length,d=Array(c),e=0;e<c;e++)d[e]=arguments[e];return a=m(this,b,[].concat(d)),(0,g.default)(a,"name","MissingAdapterMethodsError"),(0,g.default)(a,"code","MISSING_ADAPTER_METHODS_ERROR"),a}return(0,l.default)(b,a),(0,i.default)(b)}(o),b.UnsupportedStrategy=function(a){function b(){var a;(0,h.default)(this,b);for(var c=arguments.length,d=Array(c),e=0;e<c;e++)d[e]=arguments[e];return a=m(this,b,[].concat(d)),(0,g.default)(a,"name","UnsupportedStrategyError"),(0,g.default)(a,"code","CALLBACK_CREDENTIALS_JWT_ERROR"),a}return(0,l.default)(b,a),(0,i.default)(b)}(o),b.InvalidCallbackUrl=function(a){function b(){var a;(0,h.default)(this,b);for(var c=arguments.length,d=Array(c),e=0;e<c;e++)d[e]=arguments[e];return a=m(this,b,[].concat(d)),(0,g.default)(a,"name","InvalidCallbackUrl"),(0,g.default)(a,"code","INVALID_CALLBACK_URL_ERROR"),a}return(0,l.default)(b,a),(0,i.default)(b)}(o)},86845:(a,b,c)=>{"use strict";let d,e;c.r(b),c.d(b,{NIL:()=>w,parse:()=>r,stringify:()=>n,v1:()=>q,v3:()=>t,v4:()=>u,v5:()=>v,validate:()=>l,version:()=>x});var f=c(55511),g=c.n(f);let h=new Uint8Array(256),i=h.length;function j(){return i>h.length-16&&(g().randomFillSync(h),i=0),h.slice(i,i+=16)}let k=/^(?:[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,l=function(a){return"string"==typeof a&&k.test(a)},m=[];for(let a=0;a<256;++a)m.push((a+256).toString(16).substr(1));let n=function(a,b=0){let c=(m[a[b+0]]+m[a[b+1]]+m[a[b+2]]+m[a[b+3]]+"-"+m[a[b+4]]+m[a[b+5]]+"-"+m[a[b+6]]+m[a[b+7]]+"-"+m[a[b+8]]+m[a[b+9]]+"-"+m[a[b+10]]+m[a[b+11]]+m[a[b+12]]+m[a[b+13]]+m[a[b+14]]+m[a[b+15]]).toLowerCase();if(!l(c))throw TypeError("Stringified UUID is invalid");return c},o=0,p=0,q=function(a,b,c){let f=b&&c||0,g=b||Array(16),h=(a=a||{}).node||d,i=void 0!==a.clockseq?a.clockseq:e;if(null==h||null==i){let b=a.random||(a.rng||j)();null==h&&(h=d=[1|b[0],b[1],b[2],b[3],b[4],b[5]]),null==i&&(i=e=(b[6]<<8|b[7])&16383)}let k=void 0!==a.msecs?a.msecs:Date.now(),l=void 0!==a.nsecs?a.nsecs:p+1,m=k-o+(l-p)/1e4;if(m<0&&void 0===a.clockseq&&(i=i+1&16383),(m<0||k>o)&&void 0===a.nsecs&&(l=0),l>=1e4)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");o=k,p=l,e=i;let q=((0xfffffff&(k+=122192928e5))*1e4+l)%0x100000000;g[f++]=q>>>24&255,g[f++]=q>>>16&255,g[f++]=q>>>8&255,g[f++]=255&q;let r=k/0x100000000*1e4&0xfffffff;g[f++]=r>>>8&255,g[f++]=255&r,g[f++]=r>>>24&15|16,g[f++]=r>>>16&255,g[f++]=i>>>8|128,g[f++]=255&i;for(let a=0;a<6;++a)g[f+a]=h[a];return b||n(g)},r=function(a){let b;if(!l(a))throw TypeError("Invalid UUID");let c=new Uint8Array(16);return c[0]=(b=parseInt(a.slice(0,8),16))>>>24,c[1]=b>>>16&255,c[2]=b>>>8&255,c[3]=255&b,c[4]=(b=parseInt(a.slice(9,13),16))>>>8,c[5]=255&b,c[6]=(b=parseInt(a.slice(14,18),16))>>>8,c[7]=255&b,c[8]=(b=parseInt(a.slice(19,23),16))>>>8,c[9]=255&b,c[10]=(b=parseInt(a.slice(24,36),16))/0x10000000000&255,c[11]=b/0x100000000&255,c[12]=b>>>24&255,c[13]=b>>>16&255,c[14]=b>>>8&255,c[15]=255&b,c};function s(a,b,c){function d(a,d,e,f){if("string"==typeof a&&(a=function(a){a=unescape(encodeURIComponent(a));let b=[];for(let c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b}(a)),"string"==typeof d&&(d=r(d)),16!==d.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let g=new Uint8Array(16+a.length);if(g.set(d),g.set(a,d.length),(g=c(g))[6]=15&g[6]|b,g[8]=63&g[8]|128,e){f=f||0;for(let a=0;a<16;++a)e[f+a]=g[a];return e}return n(g)}try{d.name=a}catch(a){}return d.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",d.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",d}let t=s("v3",48,function(a){return Array.isArray(a)?a=Buffer.from(a):"string"==typeof a&&(a=Buffer.from(a,"utf8")),g().createHash("md5").update(a).digest()}),u=function(a,b,c){let d=(a=a||{}).random||(a.rng||j)();if(d[6]=15&d[6]|64,d[8]=63&d[8]|128,b){c=c||0;for(let a=0;a<16;++a)b[c+a]=d[a];return b}return n(d)},v=s("v5",80,function(a){return Array.isArray(a)?a=Buffer.from(a):"string"==typeof a&&(a=Buffer.from(a,"utf8")),g().createHash("sha1").update(a).digest()}),w="00000000-0000-0000-0000-000000000000",x=function(a){if(!l(a))throw TypeError("Invalid UUID");return parseInt(a.substr(14,1),16)}},87997:(a,b,c)=>{a.exports=new(c(62629))({max:100})},88540:(a,b,c)=>{var d=c(39088),e=c(2826);a.exports=function(a,b,c){if(d())return Reflect.construct.apply(null,arguments);var f=[null];f.push.apply(f,b);var g=new(a.bind.apply(a,f));return c&&e(g,c.prototype),g},a.exports.__esModule=!0,a.exports.default=a.exports},88573:(a,b,c)=>{"use strict";var d=c(31912);Object.defineProperty(b,"__esModule",{value:!0}),b.assertConfig=function(a){var b,c,d,j,k,l,m;let n,o,p,{options:q,req:r}=a,s=[];if(!h&&(r.origin||s.push("NEXTAUTH_URL"),q.secret,q.debug&&s.push("DEBUG_ENABLED")),!q.secret)return new e.MissingSecret("Please define a `secret` in production.");if(!(null!=(b=r.query)&&b.nextauth)&&!r.action)return new e.MissingAPIRoute("Cannot find [...nextauth].{js,ts} in `/pages/api/auth`. Make sure the filename is written correctly.");let t=null==(c=r.query)?void 0:c.callbackUrl,u=(0,f.default)(r.origin);if(t&&!i(t,u.base))return new e.InvalidCallbackUrl(`Invalid callback URL. Received: ${t}`);let{callbackUrl:v}=(0,g.defaultCookies)(null!=(d=q.useSecureCookies)?d:u.base.startsWith("https://")),w=null==(j=r.cookies)?void 0:j[null!=(k=null==(l=q.cookies)||null==(l=l.callbackUrl)?void 0:l.name)?k:v.name];if(w&&!i(w,u.base))return new e.InvalidCallbackUrl(`Invalid callback URL. Received: ${w}`);for(let a of q.providers)"credentials"===a.type?n=!0:"email"===a.type?o=!0:"twitter"===a.id&&"2.0"===a.version&&(p=!0);if(n){let a=(null==(m=q.session)?void 0:m.strategy)==="database",b=!q.providers.some(a=>"credentials"!==a.type);if(a&&b)return new e.UnsupportedStrategy("Signin in with credentials only supported if JWT strategy is enabled");if(q.providers.some(a=>"credentials"===a.type&&!a.authorize))return new e.MissingAuthorize("Must define an authorize() handler to use credentials authentication provider")}if(o){let{adapter:a}=q;if(!a)return new e.MissingAdapter("E-mail login requires an adapter.");let b=["createVerificationToken","useVerificationToken","getUserByEmail"].filter(b=>!a[b]);if(b.length)return new e.MissingAdapterMethods(`Required adapter methods were missing: ${b.join(", ")}`)}return h||(p&&s.push("TWITTER_OAUTH_2_BETA"),h=!0),s};var e=c(86460),f=d(c(39154)),g=c(8137);let h=!1;function i(a,b){try{return/^https?:/.test(new URL(a,a.startsWith("/")?b:void 0).protocol)}catch(a){return!1}}},89063:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=c(55511).timingSafeEqual},89167:(a,b,c)=>{"use strict";var d=c(55511);function e(a,b){return b=h(a,b),function(a,b){if(void 0===(c="passthrough"!==b.algorithm?d.createHash(b.algorithm):new k).write&&(c.write=c.update,c.end=c.update),j(b,c).dispatch(a),c.update||c.end(""),c.digest)return c.digest("buffer"===b.encoding?void 0:b.encoding);var c,e=c.read();return"buffer"===b.encoding?e:e.toString(b.encoding)}(a,b)}(b=a.exports=e).sha1=function(a){return e(a)},b.keys=function(a){return e(a,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})},b.MD5=function(a){return e(a,{algorithm:"md5",encoding:"hex"})},b.keysMD5=function(a){return e(a,{algorithm:"md5",encoding:"hex",excludeValues:!0})};var f=d.getHashes?d.getHashes().slice():["sha1","md5"];f.push("passthrough");var g=["buffer","hex","binary","base64"];function h(a,b){var c={};if(c.algorithm=(b=b||{}).algorithm||"sha1",c.encoding=b.encoding||"hex",c.excludeValues=!!b.excludeValues,c.algorithm=c.algorithm.toLowerCase(),c.encoding=c.encoding.toLowerCase(),c.ignoreUnknown=!0===b.ignoreUnknown,c.respectType=!1!==b.respectType,c.respectFunctionNames=!1!==b.respectFunctionNames,c.respectFunctionProperties=!1!==b.respectFunctionProperties,c.unorderedArrays=!0===b.unorderedArrays,c.unorderedSets=!1!==b.unorderedSets,c.unorderedObjects=!1!==b.unorderedObjects,c.replacer=b.replacer||void 0,c.excludeKeys=b.excludeKeys||void 0,void 0===a)throw Error("Object argument required.");for(var d=0;d<f.length;++d)f[d].toLowerCase()===c.algorithm.toLowerCase()&&(c.algorithm=f[d]);if(-1===f.indexOf(c.algorithm))throw Error('Algorithm "'+c.algorithm+'" not supported. supported values: '+f.join(", "));if(-1===g.indexOf(c.encoding)&&"passthrough"!==c.algorithm)throw Error('Encoding "'+c.encoding+'" not supported. supported values: '+g.join(", "));return c}function i(a){return"function"==typeof a&&null!=/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i.exec(Function.prototype.toString.call(a))}function j(a,b,c){c=c||[];var d=function(a){return b.update?b.update(a,"utf8"):b.write(a,"utf8")};return{dispatch:function(b){a.replacer&&(b=a.replacer(b));var c=typeof b;return null===b&&(c="null"),this["_"+c](b)},_object:function(b){var e=Object.prototype.toString.call(b),f=/\[object (.*)\]/i.exec(e);f=(f=f?f[1]:"unknown:["+e+"]").toLowerCase();var g=null;if((g=c.indexOf(b))>=0)return this.dispatch("[CIRCULAR:"+g+"]");if(c.push(b),"u">typeof Buffer&&Buffer.isBuffer&&Buffer.isBuffer(b))return d("buffer:"),d(b);if("object"!==f&&"function"!==f&&"asyncfunction"!==f)if(this["_"+f])this["_"+f](b);else if(a.ignoreUnknown)return d("["+f+"]");else throw Error('Unknown object type "'+f+'"');else{var h=Object.keys(b);a.unorderedObjects&&(h=h.sort()),!1===a.respectType||i(b)||h.splice(0,0,"prototype","__proto__","constructor"),a.excludeKeys&&(h=h.filter(function(b){return!a.excludeKeys(b)})),d("object:"+h.length+":");var j=this;return h.forEach(function(c){j.dispatch(c),d(":"),a.excludeValues||j.dispatch(b[c]),d(",")})}},_array:function(b,e){e=void 0!==e?e:!1!==a.unorderedArrays;var f=this;if(d("array:"+b.length+":"),!e||b.length<=1)return b.forEach(function(a){return f.dispatch(a)});var g=[],h=b.map(function(b){var d=new k,e=c.slice();return j(a,d,e).dispatch(b),g=g.concat(e.slice(c.length)),d.read().toString()});return c=c.concat(g),h.sort(),this._array(h,!1)},_date:function(a){return d("date:"+a.toJSON())},_symbol:function(a){return d("symbol:"+a.toString())},_error:function(a){return d("error:"+a.toString())},_boolean:function(a){return d("bool:"+a.toString())},_string:function(a){d("string:"+a.length+":"),d(a.toString())},_function:function(b){d("fn:"),i(b)?this.dispatch("[native]"):this.dispatch(b.toString()),!1!==a.respectFunctionNames&&this.dispatch("function-name:"+String(b.name)),a.respectFunctionProperties&&this._object(b)},_number:function(a){return d("number:"+a.toString())},_xml:function(a){return d("xml:"+a.toString())},_null:function(){return d("Null")},_undefined:function(){return d("Undefined")},_regexp:function(a){return d("regex:"+a.toString())},_uint8array:function(a){return d("uint8array:"),this.dispatch(Array.prototype.slice.call(a))},_uint8clampedarray:function(a){return d("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(a))},_int8array:function(a){return d("uint8array:"),this.dispatch(Array.prototype.slice.call(a))},_uint16array:function(a){return d("uint16array:"),this.dispatch(Array.prototype.slice.call(a))},_int16array:function(a){return d("uint16array:"),this.dispatch(Array.prototype.slice.call(a))},_uint32array:function(a){return d("uint32array:"),this.dispatch(Array.prototype.slice.call(a))},_int32array:function(a){return d("uint32array:"),this.dispatch(Array.prototype.slice.call(a))},_float32array:function(a){return d("float32array:"),this.dispatch(Array.prototype.slice.call(a))},_float64array:function(a){return d("float64array:"),this.dispatch(Array.prototype.slice.call(a))},_arraybuffer:function(a){return d("arraybuffer:"),this.dispatch(new Uint8Array(a))},_url:function(a){return d("url:"+a.toString(),"utf8")},_map:function(b){d("map:");var c=Array.from(b);return this._array(c,!1!==a.unorderedSets)},_set:function(b){d("set:");var c=Array.from(b);return this._array(c,!1!==a.unorderedSets)},_file:function(a){return d("file:"),this.dispatch([a.name,a.size,a.type,a.lastModfied])},_blob:function(){if(a.ignoreUnknown)return d("[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 d("domwindow")},_bigint:function(a){return d("bigint:"+a.toString())},_process:function(){return d("process")},_timer:function(){return d("timer")},_pipe:function(){return d("pipe")},_tcp:function(){return d("tcp")},_udp:function(){return d("udp")},_tty:function(){return d("tty")},_statwatcher:function(){return d("statwatcher")},_securecontext:function(){return d("securecontext")},_connection:function(){return d("connection")},_zlib:function(){return d("zlib")},_context:function(){return d("context")},_nodescript:function(){return d("nodescript")},_httpparser:function(){return d("httpparser")},_dataview:function(){return d("dataview")},_signal:function(){return d("signal")},_fsevent:function(){return d("fsevent")},_tlswrap:function(){return d("tlswrap")}}}function k(){return{buf:"",write:function(a){this.buf+=a},end:function(a){this.buf+=a},read:function(){return this.buf}}}b.writeToStream=function(a,b,c){return void 0===c&&(c=b,b={}),j(b=h(a,b),c).dispatch(a)}},89879:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=function(a){if("object"!=typeof a||null===a||"[object Object]"!==Object.prototype.toString.call(a))return!1;if(null===Object.getPrototypeOf(a))return!0;let b=a;for(;null!==Object.getPrototypeOf(b);)b=Object.getPrototypeOf(b);return Object.getPrototypeOf(a)===b}},89935:a=>{function b(a,b,c,d,e,f,g){try{var h=a[f](g),i=h.value}catch(a){return void c(a)}h.done?b(i):Promise.resolve(i).then(d,e)}a.exports=function(a){return function(){var c=this,d=arguments;return new Promise(function(e,f){var g=a.apply(c,d);function h(a){b(g,e,f,h,i,"next",a)}function i(a){b(g,e,f,h,i,"throw",a)}h(void 0)})}},a.exports.__esModule=!0,a.exports.default=a.exports},90628:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});let d=c(9179),e=c(38020),f=c(94948),g=c(99968),h=c(32706),i=c(14191),j=c(58756),k=c(34672),l=c(20612),m=c(89879),n=c(73783);b.default=async function(a,b,c,o,p){switch((0,l.default)(a,b,"decrypt"),a){case"dir":if(void 0!==c)throw new i.JWEInvalid("Encountered unexpected JWE Encrypted Key");return b;case"ECDH-ES":if(void 0!==c)throw new i.JWEInvalid("Encountered unexpected JWE Encrypted Key");case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{let f,g;if(!(0,m.default)(o.epk))throw new i.JWEInvalid('JOSE Header "epk" (Ephemeral Public Key) missing or invalid');if(!e.ecdhAllowed(b))throw new i.JOSENotSupported("ECDH with the provided key is not allowed or not supported by your javascript runtime");let l=await (0,k.importJWK)(o.epk,a);if(void 0!==o.apu){if("string"!=typeof o.apu)throw new i.JWEInvalid('JOSE Header "apu" (Agreement PartyUInfo) invalid');try{f=(0,h.decode)(o.apu)}catch{throw new i.JWEInvalid("Failed to base64url decode the apu")}}if(void 0!==o.apv){if("string"!=typeof o.apv)throw new i.JWEInvalid('JOSE Header "apv" (Agreement PartyVInfo) invalid');try{g=(0,h.decode)(o.apv)}catch{throw new i.JWEInvalid("Failed to base64url decode the apv")}}let n=await e.deriveKey(l,b,"ECDH-ES"===a?o.enc:a,"ECDH-ES"===a?(0,j.bitLength)(o.enc):parseInt(a.slice(-5,-2),10),f,g);if("ECDH-ES"===a)return n;if(void 0===c)throw new i.JWEInvalid("JWE Encrypted Key missing");return(0,d.unwrap)(a.slice(-6),n,c)}case"RSA1_5":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":if(void 0===c)throw new i.JWEInvalid("JWE Encrypted Key missing");return(0,g.decrypt)(a,b,c);case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{let d;if(void 0===c)throw new i.JWEInvalid("JWE Encrypted Key missing");if("number"!=typeof o.p2c)throw new i.JWEInvalid('JOSE Header "p2c" (PBES2 Count) missing or invalid');let e=(null==p?void 0:p.maxPBES2Count)||1e4;if(o.p2c>e)throw new i.JWEInvalid('JOSE Header "p2c" (PBES2 Count) out is of acceptable bounds');if("string"!=typeof o.p2s)throw new i.JWEInvalid('JOSE Header "p2s" (PBES2 Salt) missing or invalid');try{d=(0,h.decode)(o.p2s)}catch{throw new i.JWEInvalid("Failed to base64url decode the p2s")}return(0,f.decrypt)(a,b,c,o.p2c,d)}case"A128KW":case"A192KW":case"A256KW":if(void 0===c)throw new i.JWEInvalid("JWE Encrypted Key missing");return(0,d.unwrap)(a,b,c);case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":{let d,e;if(void 0===c)throw new i.JWEInvalid("JWE Encrypted Key missing");if("string"!=typeof o.iv)throw new i.JWEInvalid('JOSE Header "iv" (Initialization Vector) missing or invalid');if("string"!=typeof o.tag)throw new i.JWEInvalid('JOSE Header "tag" (Authentication Tag) missing or invalid');try{d=(0,h.decode)(o.iv)}catch{throw new i.JWEInvalid("Failed to base64url decode the iv")}try{e=(0,h.decode)(o.tag)}catch{throw new i.JWEInvalid("Failed to base64url decode the tag")}return(0,n.unwrap)(a,b,c,d,e)}default:throw new i.JOSENotSupported('Invalid or unsupported "alg" (JWE Algorithm) header value')}}},90967:(a,b)=>{"use strict";async function c({email:a,adapter:b}){let{getUserByEmail:d}=b,e=a?await d(a):null;return e||{id:a,email:a,emailVerified:null}}Object.defineProperty(b,"__esModule",{value:!0}),b.default=c},91294:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=e;var d=c(60434);async function e(a){var b,c,e,f,g,h;let{options:i,sessionStore:j,newSession:k,isUpdate:l}=a,{adapter:m,jwt:n,events:o,callbacks:p,logger:q,session:{strategy:r,maxAge:s}}=i,t={body:{},headers:[{key:"Content-Type",value:"application/json"},...l?[]:[{key:"Cache-Control",value:"private, no-cache, no-store"},{key:"Pragma",value:"no-cache"},{key:"Expires",value:"0"}]].filter(Boolean),cookies:[]},u=j.value;if(!u)return t;if("jwt"===r)try{let a=await n.decode({...n,token:u});if(!a)throw Error("JWT invalid");let e=await p.jwt({token:a,...l&&{trigger:"update"},session:k}),f=(0,d.fromDate)(s),g=await p.session({session:{user:{name:null==a?void 0:a.name,email:null==a?void 0:a.email,image:null==a?void 0:a.picture},expires:f.toISOString()},token:e});t.body=g;let h=await n.encode({...n,token:e,maxAge:i.session.maxAge}),m=j.chunk(h,{expires:f});null==(b=t.cookies)||b.push(...m),await (null==(c=o.session)?void 0:c.call(o,{session:g,token:e}))}catch(a){q.error("JWT_SESSION_ERROR",a),null==(e=t.cookies)||e.push(...j.clean())}else try{let{getSessionAndUser:a,deleteSession:b,updateSession:c}=m,e=await a(u);if(e&&e.session.expires.valueOf()<Date.now()&&(await b(u),e=null),e){let{user:a,session:b}=e,h=i.session.updateAge,j=b.expires.valueOf()-1e3*s+1e3*h,m=(0,d.fromDate)(s);j<=Date.now()&&await c({sessionToken:u,expires:m});let n=await p.session({session:{user:{name:a.name,email:a.email,image:a.image},expires:b.expires.toISOString()},user:a,newSession:k,...l?{trigger:"update"}:{}});t.body=n,null==(f=t.cookies)||f.push({name:i.cookies.sessionToken.name,value:u,options:{...i.cookies.sessionToken.options,expires:m}}),await (null==(g=o.session)?void 0:g.call(o,{session:n}))}else u&&(null==(h=t.cookies)||h.push(...j.clean()))}catch(a){q.error("SESSION_ERROR",a)}return t}},91830:a=>{a.exports=function(a,b){this.v=a,this.k=b},a.exports.__esModule=!0,a.exports.default=a.exports},92117:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.jwkImport=b.jwkExport=b.rsaPssParams=b.oneShotCallback=void 0;let[c,d]=process.versions.node.split(".").map(a=>parseInt(a,10));b.oneShotCallback=c>=16||15===c&&d>=13,b.rsaPssParams=!("electron"in process.versions)&&(c>=17||16===c&&d>=9),b.jwkExport=c>=16||15===c&&d>=9,b.jwkImport=c>=16||15===c&&d>=12},92721:(a,b,c)=>{let d=c(93189),{RPError:e}=c(28583),{assertIssuerConfiguration:f}=c(34752),{random:g}=c(80312),h=c(51575),i=c(67325),{keystores:j}=c(31347),k=c(74372),l=a=>encodeURIComponent(a).replace(/%20/g,"+");async function m(a,b){let c=this[`${a}_endpoint_auth_signing_alg`];if(c||f(this.issuer,`${a}_endpoint_auth_signing_alg_values_supported`),"client_secret_jwt"===this[`${a}_endpoint_auth_method`]){if(!c){let b=this.issuer[`${a}_endpoint_auth_signing_alg_values_supported`];c=Array.isArray(b)&&b.find(a=>/^HS(?:256|384|512)/.test(a))}if(!c)throw new e(`failed to determine a JWS Algorithm to use for ${this[`${a}_endpoint_auth_method`]} Client Assertion`);return new d.CompactSign(Buffer.from(JSON.stringify(b))).setProtectedHeader({alg:c}).sign(this.secretForAlg(c))}let g=await j.get(this);if(!g)throw TypeError("no client jwks provided for signing a client assertion with");if(!c){let b=this.issuer[`${a}_endpoint_auth_signing_alg_values_supported`];c=Array.isArray(b)&&b.find(a=>g.get({alg:a,use:"sig"}))}if(!c)throw new e(`failed to determine a JWS Algorithm to use for ${this[`${a}_endpoint_auth_method`]} Client Assertion`);let h=g.get({alg:c,use:"sig"});if(!h)throw new e(`no key found in client jwks to sign a client assertion with using alg ${c}`);return new d.CompactSign(Buffer.from(JSON.stringify(b))).setProtectedHeader({alg:c,kid:h.jwk&&h.jwk.kid}).sign(await h.keyObject(c))}async function n(a,{clientAssertionPayload:b}={}){switch(this[`${a}_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 c=h(),d=await m.call(this,a,{iat:c,exp:c+60,jti:g(),iss:this.client_id,sub:this.client_id,aud:this.issuer.issuer,...b});return{form:{client_id:this.client_id,client_assertion:d,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 a=`${l(this.client_id)}:${l(this.client_secret)}`,b=Buffer.from(a).toString("base64");return{headers:{Authorization:`Basic ${b}`}}}default:throw TypeError(`missing, or unsupported, ${a}_endpoint_auth_method`)}}async function o(a,b,{clientAssertionPayload:c,endpointAuthMethod:d=a,DPoP:e}={}){let f,g=k(b,await n.call(this,d,{clientAssertionPayload:c})),h=this[`${d}_endpoint_auth_method`].includes("tls_client_auth")||"token"===a&&this.tls_client_certificate_bound_access_tokens;if(h&&this.issuer.mtls_endpoint_aliases&&(f=this.issuer.mtls_endpoint_aliases[`${a}_endpoint`]),f=f||this.issuer[`${a}_endpoint`],"form"in g)for(let[a,b]of Object.entries(g.form))void 0===b&&delete g.form[a];return i.call(this,{...g,method:"POST",url:f,headers:{..."revocation"!==a?{Accept:"application/json"}:void 0,...g.headers}},{mTLS:h,DPoP:e})}a.exports={resolveResponseType:function(){let{length:a,0:b}=this.response_types;if(1===a)return b},resolveRedirectUri:function(){let{length:a,0:b}=this.redirect_uris||[];if(1===a)return b},authFor:n,authenticatedPost:o}},93007:a=>{a.exports=a=>!!a&&a.constructor===Object},93111:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.generateKeyPair=b.generateSecret=void 0;let d=c(55511),e=c(28354),f=c(17071),g=c(35243),h=c(14191),i=(0,e.promisify)(d.generateKeyPair);b.generateSecret=async function(a,b){let c;switch(a){case"HS256":case"HS384":case"HS512":case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":c=parseInt(a.slice(-3),10);break;case"A128KW":case"A192KW":case"A256KW":case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":case"A128GCM":case"A192GCM":case"A256GCM":c=parseInt(a.slice(1,4),10);break;default:throw new h.JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}return(0,d.createSecretKey)((0,f.default)(new Uint8Array(c>>3)))},b.generateKeyPair=async function(a,b){var c,d;switch(a){case"RS256":case"RS384":case"RS512":case"PS256":case"PS384":case"PS512":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":case"RSA1_5":{let a=null!=(c=null==b?void 0:b.modulusLength)?c:2048;if("number"!=typeof a||a<2048)throw new h.JOSENotSupported("Invalid or unsupported modulusLength option provided, 2048 bits or larger keys must be used");let d=await i("rsa",{modulusLength:a,publicExponent:65537});return(0,g.setModulusLength)(d.privateKey,a),(0,g.setModulusLength)(d.publicKey,a),d}case"ES256":return i("ec",{namedCurve:"P-256"});case"ES256K":return i("ec",{namedCurve:"secp256k1"});case"ES384":return i("ec",{namedCurve:"P-384"});case"ES512":return i("ec",{namedCurve:"P-521"});case"EdDSA":switch(null==b?void 0:b.crv){case void 0:case"Ed25519":return i("ed25519");case"Ed448":return i("ed448");default:throw new h.JOSENotSupported("Invalid or unsupported crv option provided, supported values are Ed25519 and Ed448")}case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":let e=null!=(d=null==b?void 0:b.crv)?d:"P-256";switch(e){case void 0:case"P-256":case"P-384":case"P-521":return i("ec",{namedCurve:e});case"X25519":return i("x25519");case"X448":return i("x448");default:throw new h.JOSENotSupported("Invalid or unsupported crv option provided, supported values are P-256, P-384, P-521, X25519, and X448")}default:throw new h.JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}}},93189:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.cryptoRuntime=b.base64url=b.generateSecret=b.generateKeyPair=b.errors=b.decodeJwt=b.decodeProtectedHeader=b.importJWK=b.importX509=b.importPKCS8=b.importSPKI=b.exportJWK=b.exportSPKI=b.exportPKCS8=b.UnsecuredJWT=b.createRemoteJWKSet=b.createLocalJWKSet=b.EmbeddedJWK=b.calculateJwkThumbprintUri=b.calculateJwkThumbprint=b.EncryptJWT=b.SignJWT=b.GeneralSign=b.FlattenedSign=b.CompactSign=b.FlattenedEncrypt=b.CompactEncrypt=b.jwtDecrypt=b.jwtVerify=b.generalVerify=b.flattenedVerify=b.compactVerify=b.GeneralEncrypt=b.generalDecrypt=b.flattenedDecrypt=b.compactDecrypt=void 0;var d=c(52459);Object.defineProperty(b,"compactDecrypt",{enumerable:!0,get:function(){return d.compactDecrypt}});var e=c(96225);Object.defineProperty(b,"flattenedDecrypt",{enumerable:!0,get:function(){return e.flattenedDecrypt}});var f=c(55798);Object.defineProperty(b,"generalDecrypt",{enumerable:!0,get:function(){return f.generalDecrypt}});var g=c(84590);Object.defineProperty(b,"GeneralEncrypt",{enumerable:!0,get:function(){return g.GeneralEncrypt}});var h=c(12115);Object.defineProperty(b,"compactVerify",{enumerable:!0,get:function(){return h.compactVerify}});var i=c(19317);Object.defineProperty(b,"flattenedVerify",{enumerable:!0,get:function(){return i.flattenedVerify}});var j=c(18016);Object.defineProperty(b,"generalVerify",{enumerable:!0,get:function(){return j.generalVerify}});var k=c(5178);Object.defineProperty(b,"jwtVerify",{enumerable:!0,get:function(){return k.jwtVerify}});var l=c(25958);Object.defineProperty(b,"jwtDecrypt",{enumerable:!0,get:function(){return l.jwtDecrypt}});var m=c(12831);Object.defineProperty(b,"CompactEncrypt",{enumerable:!0,get:function(){return m.CompactEncrypt}});var n=c(22585);Object.defineProperty(b,"FlattenedEncrypt",{enumerable:!0,get:function(){return n.FlattenedEncrypt}});var o=c(10163);Object.defineProperty(b,"CompactSign",{enumerable:!0,get:function(){return o.CompactSign}});var p=c(31093);Object.defineProperty(b,"FlattenedSign",{enumerable:!0,get:function(){return p.FlattenedSign}});var q=c(8668);Object.defineProperty(b,"GeneralSign",{enumerable:!0,get:function(){return q.GeneralSign}});var r=c(93286);Object.defineProperty(b,"SignJWT",{enumerable:!0,get:function(){return r.SignJWT}});var s=c(7326);Object.defineProperty(b,"EncryptJWT",{enumerable:!0,get:function(){return s.EncryptJWT}});var t=c(83727);Object.defineProperty(b,"calculateJwkThumbprint",{enumerable:!0,get:function(){return t.calculateJwkThumbprint}}),Object.defineProperty(b,"calculateJwkThumbprintUri",{enumerable:!0,get:function(){return t.calculateJwkThumbprintUri}});var u=c(46982);Object.defineProperty(b,"EmbeddedJWK",{enumerable:!0,get:function(){return u.EmbeddedJWK}});var v=c(48944);Object.defineProperty(b,"createLocalJWKSet",{enumerable:!0,get:function(){return v.createLocalJWKSet}});var w=c(21825);Object.defineProperty(b,"createRemoteJWKSet",{enumerable:!0,get:function(){return w.createRemoteJWKSet}});var x=c(95413);Object.defineProperty(b,"UnsecuredJWT",{enumerable:!0,get:function(){return x.UnsecuredJWT}});var y=c(27871);Object.defineProperty(b,"exportPKCS8",{enumerable:!0,get:function(){return y.exportPKCS8}}),Object.defineProperty(b,"exportSPKI",{enumerable:!0,get:function(){return y.exportSPKI}}),Object.defineProperty(b,"exportJWK",{enumerable:!0,get:function(){return y.exportJWK}});var z=c(34672);Object.defineProperty(b,"importSPKI",{enumerable:!0,get:function(){return z.importSPKI}}),Object.defineProperty(b,"importPKCS8",{enumerable:!0,get:function(){return z.importPKCS8}}),Object.defineProperty(b,"importX509",{enumerable:!0,get:function(){return z.importX509}}),Object.defineProperty(b,"importJWK",{enumerable:!0,get:function(){return z.importJWK}});var A=c(98899);Object.defineProperty(b,"decodeProtectedHeader",{enumerable:!0,get:function(){return A.decodeProtectedHeader}});var B=c(58616);Object.defineProperty(b,"decodeJwt",{enumerable:!0,get:function(){return B.decodeJwt}}),b.errors=c(14191);var C=c(62877);Object.defineProperty(b,"generateKeyPair",{enumerable:!0,get:function(){return C.generateKeyPair}});var D=c(20997);Object.defineProperty(b,"generateSecret",{enumerable:!0,get:function(){return D.generateSecret}}),b.base64url=c(12446);var E=c(34182);Object.defineProperty(b,"cryptoRuntime",{enumerable:!0,get:function(){return E.default}})},93286:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.SignJWT=void 0;let d=c(10163),e=c(14191),f=c(38569),g=c(14111);class h extends g.ProduceJWT{setProtectedHeader(a){return this._protectedHeader=a,this}async sign(a,b){var c;let g=new d.CompactSign(f.encoder.encode(JSON.stringify(this._payload)));if(g.setProtectedHeader(this._protectedHeader),Array.isArray(null==(c=this._protectedHeader)?void 0:c.crit)&&this._protectedHeader.crit.includes("b64")&&!1===this._protectedHeader.b64)throw new e.JWTInvalid("JWTs MUST NOT use unencoded payload");return g.sign(a,b)}}b.SignJWT=h},94538:(a,b,c)=>{"use strict";c.r(b),c.d(b,{__esModule:()=>d.B,cookies:()=>d.U,draftMode:()=>f.r,headers:()=>e.b});var d=c(94926),e=c(56499),f=c(9572)},94926:(a,b,c)=>{"use strict";Object.defineProperty(b,"B",{value:!0}),Object.defineProperty(b,"U",{enumerable:!0,get:function(){return n}});let d=c(83850),e=c(87843),f=c(29294),g=c(63033),h=c(30754),i=c(80618),j=c(5575),k=c(50379),l=c(31228),m=c(84402);function n(){let a="cookies",b=f.workAsyncStorage.getStore(),c=g.workUnitAsyncStorage.getStore();if(b){if(c&&"after"===c.phase&&!(0,l.isRequestAPICallableInsideAfter)())throw Object.defineProperty(Error(`Route ${b.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:"E843",enumerable:!1,configurable:!0});if(b.forceStatic)return p(d.RequestCookiesAdapter.seal(new e.RequestCookies(new Headers({}))));if(b.dynamicShouldError)throw Object.defineProperty(new i.StaticGenBailoutError(`Route ${b.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:"E849",enumerable:!1,configurable:!0});if(c)switch(c.type){case"cache":let f=Object.defineProperty(Error(`Route ${b.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:"E831",enumerable:!1,configurable:!0});throw Error.captureStackTrace(f,n),b.invalidDynamicUsageError??=f,f;case"unstable-cache":throw Object.defineProperty(Error(`Route ${b.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:"E846",enumerable:!1,configurable:!0});case"generate-static-params":throw Object.defineProperty(Error(`Route ${b.route} used \`cookies()\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1123",enumerable:!1,configurable:!0});case"prerender":var k=b,q=c;let r=o.get(q);if(r)return r;let s=(0,j.makeHangingPromise)(q.renderSignal,k.route,"`cookies()`");return o.set(q,s),s;case"prerender-client":case"validation-client":let t="`cookies`";throw Object.defineProperty(new m.InvariantError(`${t} must not be used within a Client Component. Next.js should be preventing ${t} from being included in Client Components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1037",enumerable:!1,configurable:!0});case"prerender-ppr":return(0,h.postponeWithTracking)(b.route,a,c.dynamicTracking);case"prerender-legacy":return(0,h.throwToInterruptStaticGeneration)(a,b,c);case"prerender-runtime":return(0,j.delayUntilRuntimeStage)(c,p(c.cookies));case"private-cache":return p(c.cookies);case"request":let u;if((0,h.trackDynamicDataInDynamicRender)(c),u=(0,d.areCookiesMutableInCurrentPhase)(c)?c.userspaceMutableCookies:c.cookies,!c.asyncApiPromises)return p(u);{let a=(0,g.isInEarlyRenderStage)(c);if(u===c.mutableCookies)return a?c.asyncApiPromises.earlyMutableCookies:c.asyncApiPromises.mutableCookies;return a?c.asyncApiPromises.earlyCookies:c.asyncApiPromises.cookies}}}(0,g.throwForMissingRequestStore)(a)}c(44183);let o=new WeakMap;function p(a){let b=o.get(a);if(b)return b;let c=Promise.resolve(a);return o.set(a,c),c}(0,k.createDedupedByCallsiteServerErrorLoggerDev)(function(a,b){let c=a?`Route "${a}" `:"This route ";return Object.defineProperty(Error(`${c}used ${b}. \`cookies()\` returns a Promise and must be unwrapped with \`await\` or \`React.use()\` before accessing its properties. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`),"__NEXT_ERROR_CODE",{value:"E830",enumerable:!1,configurable:!0})})},94948:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.decrypt=b.encrypt=void 0;let d=c(28354),e=c(55511),f=c(17071),g=c(38569),h=c(32706),i=c(9179),j=c(21865),k=c(63549),l=c(4888),m=c(25092),n=c(72349),o=c(57944),p=(0,d.promisify)(e.pbkdf2);function q(a,b){if((0,m.default)(a))return a.export();if(a instanceof Uint8Array)return a;if((0,k.isCryptoKey)(a))return(0,l.checkEncCryptoKey)(a,b,"deriveBits","deriveKey"),e.KeyObject.from(a).export();throw TypeError((0,n.default)(a,...o.types,"Uint8Array"))}b.encrypt=async(a,b,c,d=2048,e=(0,f.default)(new Uint8Array(16)))=>{(0,j.default)(e);let k=(0,g.p2s)(a,e),l=parseInt(a.slice(13,16),10)>>3,m=q(b,a),n=await p(m,k,d,l,`sha${a.slice(8,11)}`);return{encryptedKey:await (0,i.wrap)(a.slice(-6),n,c),p2c:d,p2s:(0,h.encode)(e)}},b.decrypt=async(a,b,c,d,e)=>{(0,j.default)(e);let f=(0,g.p2s)(a,e),h=parseInt(a.slice(13,16),10)>>3,k=q(b,a),l=await p(k,f,d,h,`sha${a.slice(8,11)}`);return(0,i.unwrap)(a.slice(-6),l,c)}},95413:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.UnsecuredJWT=void 0;let d=c(32706),e=c(38569),f=c(14191),g=c(64377),h=c(14111);class i extends h.ProduceJWT{encode(){let a=d.encode(JSON.stringify({alg:"none"})),b=d.encode(JSON.stringify(this._payload));return`${a}.${b}.`}static decode(a,b){let c;if("string"!=typeof a)throw new f.JWTInvalid("Unsecured JWT must be a string");let{0:h,1:i,2:j,length:k}=a.split(".");if(3!==k||""!==j)throw new f.JWTInvalid("Invalid Unsecured JWT");try{if(c=JSON.parse(e.decoder.decode(d.decode(h))),"none"!==c.alg)throw Error()}catch{throw new f.JWTInvalid("Invalid Unsecured JWT")}return{payload:(0,g.default)(c,d.decode(i),b),header:c}}}b.UnsecuredJWT=i},95492:(a,b,c)=>{let d,{strict:e}=c(12412),{createHash:f}=c(55511),{format:g}=c(28354);function h(a,b,c){let e=(function(a,b){switch(a){case"HS256":case"RS256":case"PS256":case"ES256":case"ES256K":return f("sha256");case"HS384":case"RS384":case"PS384":case"ES384":return f("sha384");case"HS512":case"RS512":case"PS512":case"ES512":case"Ed25519":return f("sha512");case"Ed448":return f("shake256",{outputLength:114});case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":return f("shake256",{outputLength:64});case"EdDSA":switch(b){case"Ed25519":return f("sha512");case"Ed448":return f("shake256",{outputLength:114});default:throw TypeError("unrecognized or invalid EdDSA curve provided")}default:throw TypeError("unrecognized or invalid JWS algorithm provided")}})(b,c).update(a).digest();return d(e.slice(0,e.length/2))}d=Buffer.isEncoding("base64url")?a=>a.toString("base64url"):a=>a.toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"),a.exports={validate:function(a,b,c,d,f){let i,j;if("string"!=typeof a.claim||!a.claim)throw TypeError("names.claim must be a non-empty string");if("string"!=typeof a.source||!a.source)throw TypeError("names.source must be a non-empty string");e("string"==typeof b&&b,`${a.claim} must be a non-empty string`),e("string"==typeof c&&c,`${a.source} must be a non-empty string`);try{i=h(c,d,f)}catch(b){j=g("%s could not be validated (%s)",a.claim,b.message)}j=j||g("%s mismatch, expected %s, got: %s",a.claim,i,b),e.equal(i,b,j)},generate:h}},96134:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=function(a){var b;let{url:c,error:e="default",theme:f}=a,g=`${c}/signin`,h={default:{status:200,heading:"Error",message:(0,d.h)("p",null,(0,d.h)("a",{className:"site",href:null==c?void 0:c.origin},null==c?void 0:c.host))},configuration:{status:500,heading:"Server error",message:(0,d.h)("div",null,(0,d.h)("p",null,"There is a problem with the server configuration."),(0,d.h)("p",null,"Check the server logs for more information."))},accessdenied:{status:403,heading:"Access Denied",message:(0,d.h)("div",null,(0,d.h)("p",null,"You do not have permission to sign in."),(0,d.h)("p",null,(0,d.h)("a",{className:"button",href:g},"Sign in")))},verification:{status:403,heading:"Unable to sign in",message:(0,d.h)("div",null,(0,d.h)("p",null,"The sign in link is no longer valid."),(0,d.h)("p",null,"It may have been used already or it may have expired.")),signin:(0,d.h)("a",{className:"button",href:g},"Sign in")}},{status:i,heading:j,message:k,signin:l}=null!=(b=h[e.toLowerCase()])?b:h.default;return{status:i,html:(0,d.h)("div",{className:"error"},(null==f?void 0:f.brandColor)&&(0,d.h)("style",{dangerouslySetInnerHTML:{__html:`
31
31
  :root {
32
32
  --brand-color: ${null==f?void 0:f.brandColor}
33
33
  }