module.exports=[46058,(a,b,c)=>{"use strict";function d(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(d=function(a){return a?c:b})(a)}c._=function(a,b){if(!b&&a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var c=d(b);if(c&&c.has(a))return c.get(a);var e={__proto__:null},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in a)if("default"!==g&&Object.prototype.hasOwnProperty.call(a,g)){var h=f?Object.getOwnPropertyDescriptor(a,g):null;h&&(h.get||h.set)?Object.defineProperty(e,g,h):e[g]=a[g]}return e.default=a,c&&c.set(a,e),e}},18402,a=>{"use strict";a.i(87924);var b=a.i(72131);class c extends Error{constructor(a,b){a instanceof Error?super(void 0,{cause:{err:a,...a.cause,...b}}):"string"==typeof a?(b instanceof Error&&(b={err:b,...b.cause}),super(a,b)):super(void 0,a),this.name=this.constructor.name,this.type=this.constructor.type??"AuthError",this.kind=this.constructor.kind??"error",Error.captureStackTrace?.(this,this.constructor);const c=`https://errors.authjs.dev#${this.type.toLowerCase()}`;this.message+=`${this.message?". ":""}Read more at ${c}`}}class d extends c{}async function e(a,b,c,g={}){let h=`${f(b)}/${a}`;try{let a={headers:{"Content-Type":"application/json",...g?.headers?.cookie?{cookie:g.headers.cookie}:{}}};g?.body&&(a.body=JSON.stringify(g.body),a.method="POST");let b=await fetch(h,a),c=await b.json();if(!b.ok)throw c;return c}catch(a){return c.error(new d(a.message,a)),null}}function f(a){return`${a.baseUrlServer}${a.basePathServer}`}function g(a){let b=new URL("http://localhost:3000/api/auth");a&&!a.startsWith("http")&&(a=`https://${a}`);let c=new URL(a||b),d=("/"===c.pathname?b.pathname:c.pathname).replace(/\/$/,""),e=`${c.origin}${d}`;return{origin:c.origin,host:c.host,path:d,base:e,toString:()=>e}}let h={baseUrl:g(process.env.NEXTAUTH_URL??process.env.VERCEL_URL).origin,basePath:g(process.env.NEXTAUTH_URL).path,baseUrlServer:g(process.env.NEXTAUTH_URL_INTERNAL??process.env.NEXTAUTH_URL??process.env.VERCEL_URL).origin,basePathServer:g(process.env.NEXTAUTH_URL_INTERNAL??process.env.NEXTAUTH_URL).path,_lastSync:0,_session:void 0,_getSession:()=>{}},i=null,j={debug:console.debug,error:console.error,warn:console.warn};async function k(){let a=await e("csrf",h,j);return a?.csrfToken??""}async function l(){return e("providers",h,j)}async function m(a,b,c){let{callbackUrl:d,...e}=b??{},{redirect:g=!0,redirectTo:i=d??window.location.href,...j}=e,m=f(h),n=await l();if(!n){let a=`${m}/error`;window.location.href=a;return}if(!a||!n[a]){let a=`${m}/signin?${new URLSearchParams({callbackUrl:i})}`;window.location.href=a;return}let o=n[a].type;if("webauthn"===o)throw TypeError(`Provider id "${a}" refers to a WebAuthn provider.
Please use \`import { signIn } from "next-auth/webauthn"\` instead.`);let p=`${m}/${"credentials"===o?"callback":"signin"}/${a}`,q=await k(),r=await fetch(`${p}?${new URLSearchParams(c)}`,{method:"post",headers:{"Content-Type":"application/x-www-form-urlencoded","X-Auth-Return-Redirect":"1"},body:new URLSearchParams({...j,csrfToken:q,callbackUrl:i})}),s=await r.json();if(g){let a=s.url??i;window.location.href=a,a.includes("#")&&window.location.reload();return}let t=new URL(s.url).searchParams.get("error")??void 0,u=new URL(s.url).searchParams.get("code")??void 0;return r.ok&&await h._getSession({event:"storage"}),{error:t,code:u,status:r.status,ok:r.ok,url:t?null:s.url}}async function n(a){let{redirect:b=!0,redirectTo:c=a?.callbackUrl??window.location.href}=a??{},d=f(h),e=await k(),g=await fetch(`${d}/signout`,{method:"post",headers:{"Content-Type":"application/x-www-form-urlencoded","X-Auth-Return-Redirect":"1"},body:new URLSearchParams({csrfToken:e,callbackUrl:c})}),j=await g.json();if((null===i&&(i="u"<typeof BroadcastChannel?{postMessage:()=>{},addEventListener:()=>{},removeEventListener:()=>{},name:"next-auth",onmessage:null,onmessageerror:null,close:()=>{},dispatchEvent:()=>!1}:new BroadcastChannel("next-auth")),i).postMessage({event:"session",data:{trigger:"signout"}}),b){let a=j.url??c;window.location.href=a,a.includes("#")&&window.location.reload();return}return await h._getSession({event:"storage"}),j}b.createContext?.(void 0),a.s(["signIn",0,m,"signOut",0,n],18402)},69789,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={actionAsyncStorage:function(){return f.actionAsyncStorage},workAsyncStorage:function(){return g.workAsyncStorage},workUnitAsyncStorage:function(){return h.workUnitAsyncStorage}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(20635),g=a.r(56704),h=a.r(32319);("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},14827,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={createLinkPrefetchPartialError:function(){return g},createUnrenderedSegmentError:function(){return f}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});function f(a,b){let c=`Route "${a}": Could not validate that a segment in your UI has instant navigation.`;if(b.length>0){let a=1===b.length?"Dropped segment":"Dropped segments";c+=`

This segment was dropped from rendering. Issues that would prevent instant navigation will go undetected.

${a}:
${b.map(a=>`  ${a}`).join("\n")}

Ways to fix this:
  - [render] Render the dropped segment
  - [ignore] Set \`export const instant = false\` to opt the dropped segment out of instant-navigation validation

Learn more: https://nextjs.org/docs/messages/instant-unrendered-segment`}return Object.defineProperty(Error(c),"__NEXT_ERROR_CODE",{value:"E1286",enumerable:!1,configurable:!0})}function g(a){return Object.defineProperty(Error(`Next.js encountered dynamic data during prefetching for "${a}".

This will lead to slower, more expensive prefetches.

Ways to fix this:
  - [upgrade] Opt into Partial Prefetching by exporting \`const prefetch = 'partial'\` from the page or layout, or by setting \`partialPrefetching: true\` in next.config to opt the whole app in
  - [disable] Remove \`prefetch={true}\` from the <Link> to use the default prefetch
  - [ignore] Set \`export const instant = false\` to opt the route out of instant-navigation validation

Learn more: https://nextjs.org/docs/messages/instant-link-prefetch-partial`),"__NEXT_ERROR_CODE",{value:"E1435",enumerable:!1,configurable:!0})}},88644,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"InvariantError",{enumerable:!0,get:function(){return d}});class d extends Error{constructor(a,b){super(`Invariant: ${a.endsWith(".")?a:a+"."} This is a bug in Next.js.`,b),Object.defineProperty(this,"__NEXT_ERROR_CODE",{value:"E1179",enumerable:!1,configurable:!0}),this.name="InvariantError"}}},54427,(a,b,c)=>{"use strict";function d(){let a,b,c=new Promise((c,d)=>{a=c,b=d});return{resolve:a,reject:b,promise:c}}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"createPromiseWithResolvers",{enumerable:!0,get:function(){return d}})},39118,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={DEFAULT_SEGMENT_KEY:function(){return l},NOT_FOUND_SEGMENT_KEY:function(){return m},PAGE_SEGMENT_KEY:function(){return k},addSearchParamsIfPageSegment:function(){return i},computeSelectedLayoutSegment:function(){return j},getSegmentValue:function(){return f},getSelectedLayoutSegmentPath:function(){return function a(b,c,d=!0,e=[]){let g;if(d)g=b[1][c];else{let a=b[1];g=a.children??Object.values(a)[0]}if(!g)return e;let h=f(g[0]);return!h||h.startsWith(k)?e:(e.push(h),a(g,c,!1,e))}},isGroupSegment:function(){return g},isParallelRouteSegment:function(){return h}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});function f(a){return Array.isArray(a)?a[1]:a}function g(a){return"("===a[0]&&a.endsWith(")")}function h(a){return a.startsWith("@")&&"@children"!==a}function i(a,b){if(a.includes(k)){let a=JSON.stringify(b);return"{}"!==a?k+"?"+a:k}return a}function j(a,b){if(!a||0===a.length)return null;let c="children"===b?a[0]:a[a.length-1];return c===l?null:c}let k="__PAGE__",l="__DEFAULT__",m="/_not-found"},93482,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(38246),e=a.i(50944),f=a.i(18402);function g(){let a=(0,e.useRouter)(),g="1"===(0,e.useSearchParams)().get("registered"),[h,i]=(0,c.useState)(""),[j,k]=(0,c.useState)(""),[l,m]=(0,c.useState)(null),[n,o]=(0,c.useState)(!1);async function p(b){b.preventDefault(),m(null),o(!0);try{let b=await (0,f.signIn)("credentials",{identifier:h,password:j,redirect:!1});if(b?.error)return void m("Invalid email/phone or password.");a.push("/"),a.refresh()}catch{m("Something went wrong. Please try again.")}finally{o(!1)}}return(0,b.jsxs)("main",{style:{maxWidth:420,margin:"0 auto",padding:"2rem 1rem"},children:[(0,b.jsx)("h1",{children:"Log in"}),g&&(0,b.jsx)("p",{style:{color:"green"},children:"Account created — you can log in now."}),(0,b.jsxs)("form",{onSubmit:p,children:[(0,b.jsxs)("div",{style:{marginBottom:"1rem"},children:[(0,b.jsx)("label",{htmlFor:"identifier",children:"Email or phone number"}),(0,b.jsx)("input",{id:"identifier",name:"identifier",type:"text",required:!0,autoComplete:"username",value:h,onChange:a=>i(a.target.value),style:{display:"block",width:"100%"}})]}),(0,b.jsxs)("div",{style:{marginBottom:"1rem"},children:[(0,b.jsx)("label",{htmlFor:"password",children:"Password"}),(0,b.jsx)("input",{id:"password",name:"password",type:"password",required:!0,autoComplete:"current-password",value:j,onChange:a=>k(a.target.value),style:{display:"block",width:"100%"}})]}),l&&(0,b.jsx)("p",{role:"alert",style:{color:"crimson"},children:l}),(0,b.jsx)("button",{type:"submit",disabled:n,children:n?"Logging in…":"Log in"})]}),(0,b.jsx)("p",{children:(0,b.jsx)(d.default,{href:"/reset/request",children:"Forgot your password?"})}),(0,b.jsxs)("p",{children:["No account yet? ",(0,b.jsx)(d.default,{href:"/register",children:"Register"})]})]})}a.s(["default",0,function(){return(0,b.jsx)(c.Suspense,{fallback:null,children:(0,b.jsx)(g,{})})}])}];

//# sourceMappingURL=_20qw_5_._.js.map