1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7d1b90c4-4cf6-40b7-ae8c-d3c23a71503a",e._sentryDebugIdIdentifier="sentry-dbid-7d1b90c4-4cf6-40b7-ae8c-d3c23a71503a")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1242],{37142:(e,t,a)=>{"use strict";a.d(t,{C:()=>i,M:()=>s});class i extends Error{constructor(e,t,a,i){super(a||t),this.status=e,this.code=t,this.data=i}}async function n(e,t){let a=await fetch(`${e}`,{credentials:"include",headers:{"Content-Type":"application/json",...t?.headers||{}},...t}),n=await a.text(),s=n?JSON.parse(n):{};if(!a.ok)throw new i(a.status,s.error||"error",s.message,s);return s}let s={config:()=>n("/api/candidate-portal/config"),register:e=>n("/api/candidate/register",{method:"POST",body:JSON.stringify(e)}),verifyEmail:e=>n("/api/candidate/verify-email",{method:"POST",body:JSON.stringify({token:e})}),resendVerification:e=>n("/api/candidate/resend-verification",{method:"POST",body:JSON.stringify({email:e})}),login:e=>n("/api/candidate/login",{method:"POST",body:JSON.stringify(e)}),requestLoginCode:e=>n("/api/candidate/login/code",{method:"POST",body:JSON.stringify({email:e})}),loginWithCode:e=>n("/api/candidate/login/code/verify",{method:"POST",body:JSON.stringify(e)}),logout:()=>n("/api/candidate/logout",{method:"POST"}),refresh:()=>n("/api/candidate/token/refresh",{method:"POST"}),forgot:e=>n("/api/candidate/password/forgot",{method:"POST",body:JSON.stringify({email:e})}),reset:(e,t)=>n("/api/candidate/password/reset",{method:"POST",body:JSON.stringify({token:e,password:t})}),me:()=>n("/api/candidate/me"),updateMe:e=>n("/api/candidate/me",{method:"PATCH",body:JSON.stringify(e)}),jobs:()=>n("/api/candidate/jobs"),job:e=>n(`/api/candidate/jobs/${e}`),jobAlerts:()=>n("/api/candidate/me/job-alerts"),createJobAlert:e=>n("/api/candidate/me/job-alerts",{method:"POST",body:JSON.stringify(e)}),deleteJobAlert:e=>n(`/api/candidate/me/job-alerts/${e}`,{method:"DELETE"}),savedJobs:()=>n("/api/candidate/me/saved-jobs"),saveJob:e=>n("/api/candidate/me/saved-jobs",{method:"POST",body:JSON.stringify({jobId:e})}),unsaveJob:e=>n(`/api/candidate/me/saved-jobs/${e}`,{method:"DELETE"}),applyToJob:(e,t,a)=>n("/api/candidate/me/applications",{method:"POST",body:JSON.stringify({jobId:e,coverLetter:t,screeningAnswers:a})}),uploadResume:async e=>{let t=new FormData;t.append("resume",e);let a=await fetch("/api/candidate/me/resume",{method:"POST",credentials:"include",body:t}),n=await a.text(),s=n?JSON.parse(n):{};if(!a.ok)throw new i(a.status,s.error||"error",s.message);return s},buildResume:e=>n("/api/candidate/me/resume/build",{method:"POST",body:JSON.stringify({data:e})}),prefillResume:()=>n("/api/candidate/me/resume/prefill",{method:"POST"}),downloadBuiltResume:async e=>{let t=await fetch("/api/candidate/me/resume/build",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({data:e,download:!0})});if(!t.ok){let e=await t.json().catch(()=>({}));throw new i(t.status,e.error||"error",e.message)}return t.blob()},applications:(e={})=>{let t=new URLSearchParams;null!=e.limit&&t.set("limit",String(e.limit)),null!=e.offset&&t.set("offset",String(e.offset)),e.status&&"all"!==e.status&&t.set("status",e.status);let a=t.toString();return n(`/api/candidate/me/applications${a?`?${a}`:""}`)},application:e=>n(`/api/candidate/me/applications/${e}`),withdraw:e=>n(`/api/candidate/me/applications/${e}/withdraw`,{method:"POST"})}},43182:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>c});var i=a(95155),n=a(12115),s=a(73321),r=a(98500),o=a.n(r),d=a(37142),l=a(60894);function c(){let e=(0,s.useRouter)(),[t,a]=(0,n.useState)("code"),[r,c]=(0,n.useState)(!1),[u,m]=(0,n.useState)(""),[p,h]=(0,n.useState)(""),[f,b]=(0,n.useState)(""),[y,g]=(0,n.useState)(""),[x,S]=(0,n.useState)(!1),[w,j]=(0,n.useState)(!1),[v,N]=(0,n.useState)(!1);function O(e){a(e),g(""),b(""),c(!1),j(!1),N(!1)}async function P(){try{await d.M.resendVerification(u)}catch{}finally{N(!0)}}async function C(t){t.preventDefault(),S(!0),g(""),j(!1),N(!1);try{await d.M.login({email:u,password:p}),e.push("/candidate/dashboard")}catch(t){let e=t instanceof d.C?t.code:"error";"email_not_verified"===e&&j(!0),g("email_not_verified"===e?"Please verify your email first â check your inbox.":"invalid_credentials"===e?"Wrong email or password.":"Sign in failed. Please try again.")}finally{S(!1)}}async function T(e){e?.preventDefault(),S(!0),g("");try{await d.M.requestLoginCode(u)}catch{}finally{S(!1),c(!0)}}async function k(t){t.preventDefault(),S(!0),g("");try{await d.M.loginWithCode({email:u,code:f}),e.push("/candidate/dashboard")}
1catch{g("That code is not valid. It may have expired â request a new one.")}finally{S(!1)}}return(0,i.jsxs)(l.Zp,{title:"Sign in",subtitle:"Track your applications",children:["code"!==t||r?"code"===t&&r?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("form",{onSubmit:k,className:"space-y-4",children:[y&&(0,i.jsx)(l.Fc,{children:y}),(0,i.jsxs)(l.Fc,{kind:"info",children:["If an account exists for ",u,", a 6-digit code is on its way. It expires in 10 minutes."]}),(0,i.jsx)(l.D0,{label:"Sign-in code",name:"one-time-code",inputMode:"numeric",value:f,onChange:b,autoComplete:"one-time-code",required:!0}),(0,i.jsx)(l.b7,{busy:x,children:"Sign in"})]}),(0,i.jsxs)("div",{className:"flex justify-between text-sm",children:[(0,i.jsx)("button",{type:"button",onClick:()=>void T(),className:"text-indigo-600 hover:underline",children:"Send a new code"}),(0,i.jsx)("button",{type:"button",onClick:()=>O("password"),className:"text-indigo-600 hover:underline",children:"Use a password instead"})]})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("form",{onSubmit:C,className:"space-y-4",children:[y&&(0,i.jsx)(l.Fc,{children:y}),w&&(0,i.jsx)("p",{className:"text-sm text-gray-600",children:v?(0,i.jsx)("span",{className:"font-medium text-gray-700",children:"Verification email re-sent â check your inbox."}):(0,i.jsxs)(i.Fragment,{children:["Didn't get the verification email?"," ",(0,i.jsx)("button",{type:"button",onClick:P,className:"font-medium text-indigo-600 hover:underline",children:"Resend it"})]})}),(0,i.jsx)(l.D0,{label:"Email",name:"email",type:"email",value:u,onChange:m,autoComplete:"email",required:!0}),(0,i.jsx)(l.D0,{label:"Password",name:"current-password",type:"password",value:p,onChange:h,autoComplete:"current-password",required:!0}),(0,i.jsx)(l.b7,{busy:x,children:"Sign in"})]}),(0,i.jsx)("button",{type:"button",onClick:()=>O("code"),className:"w-full text-sm text-indigo-600 hover:underline",children:"Email me a sign-in code instead"})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("form",{onSubmit:T,className:"space-y-4",children:[y&&(0,i.jsx)(l.Fc,{children:y}),(0,i.jsx)("p",{className:"text-sm text-gray-600",children:"We'll email you a 6-digit code. No password needed."}),(0,i.jsx)(l.D0,{label:"Email",name:"email",type:"email",value:u,onChange:m,autoComplete:"email",required:!0}),(0,i.jsx)(l.b7,{busy:x,children:"Send me a code"})]}),(0,i.jsx)("button",{type:"button",onClick:()=>O("password"),className:"w-full text-sm text-indigo-600 hover:underline",children:"Use a password instead"})]}),(0,i.jsxs)("div",{className:"flex justify-between text-sm",children:[(0,i.jsx)(o(),{href:"/candidate/forgot",className:"text-indigo-600 hover:underline",children:"Forgot password?"}),(0,i.jsx)(o(),{href:"/candidate/register",className:"text-indigo-600 hover:underline",children:"Create account"})]})]})}},60894:(e,t,a)=>{"use strict";a.d(t,{D0:()=>s,Fc:()=>o,Zp:()=>n,b7:()=>r});var i=a(95155);function n({title:e,subtitle:t,children:a}){return(0,i.jsxs)("div",{className:"mx-auto max-w-md rounded-2xl border border-gray-200 bg-white p-6 shadow-sm sm:p-8",children:[(0,i.jsx)("h1",{className:"text-xl font-semibold text-gray-900",children:e}),t&&(0,i.jsx)("p",{className:"mt-1 text-sm text-gray-500",children:t}),(0,i.jsx)("div",{className:"mt-5 space-y-4",children:a})]})}function s({label:e,name:t,type:a="text",value:n,onChange:r,autoComplete:o,inputMode:d,required:l}){return(0,i.jsxs)("label",{className:"block",htmlFor:t,children:[(0,i.jsx)("span",{className:"mb-1 block text-sm font-medium text-gray-700",children:e}),(0,i.jsx)("input",{id:t,name:t,type:a,value:n,onChange:e=>r(e.target.value),autoComplete:o,inputMode:d,required:l,className:"w-full rounded-lg border border-gray-300 px-3 py-2 text-sm outline-none focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500"})]})}function r({busy:e,children:t}){return(0,i.jsx)("button",{type:"submit",disabled:e,style:{backgroundColor:"var(--portal-accent, #4f46e5)"},className:"w-full rounded-lg px-4 py-2.5 text-sm font-medium text-white hover:opacity-90 disabled:opacity-60",children:e?"Workingâ¦":t})}function o({kind:e="error",children:t}){return(0,i.jsx)("div",{className:`rounded-lg border px-3 py-2 text-sm ${{error:"border-red-200 bg-red-50 text-red-700",success:"border-green-200 bg-green-50 text-green-700",info:"border-blue-200 bg-blue-50 text-blue-700"}[e]}`,children:t})}},73321:(e,t,a)=>{"use strict";var i=a(74645);a.o(i,"notFound")&&a.d(t,{notFound:function(){return i.notFound}}),a.o(i,"useParams")&&a.d(t,{useParams:function(){return i.useParams}}),a.o(i,"usePathname")&&a.d(t,{usePathname:function(){return i.usePathname}}),a.o(i,"useRouter")&&a.d(t,{useRouter:function(){return i.useRouter}}),a.o(i,"useSearchParams")&&a.d(t,{useSearchParams:function(){return i.useSearchParams}})},78176:(e,t,a)=>{Promise.resolve().then(a.bind(a,43182))}},e=>{e.O(0,[8500,9793,8441,2209,7358],()=>e(e.s=78176)),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.