1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,90761,e=>{"use strict";var t=e.i(43476),r=e.i(71645),a=e.i(18566),s=e.i(32775),o=e.i(4659);e.s(["LoginForm",0,function(){let e=(0,a.useRouter)(),[i,l]=(0,r.useState)(""),[n,c]=(0,r.useState)(""),[d,m]=(0,r.useState)(null),[u,h]=(0,r.useState)(""),[b,p]=(0,r.useState)(""),[g,x]=(0,r.useState)(!1),[y,f]=(0,r.useState)(!1);async function w(t){t.preventDefault(),h(""),p(""),x(!0);try{if(!d)throw Error("Advisor login is not ready yet. Please reload and try again.");try{await d.deleteSession("current")}catch{}try{await d.createEmailPasswordSession(i,n),p("Signed in successfully. Redirecting to the dashboard...")}catch(l){let e=await fetch("/api/account/eligibility",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:i})}),t=await e.json();if(!e.ok)throw l;try{await d.create(s.ID.unique(),i,n,t.application?.contactName||i)}catch(e){if(e instanceof Error&&e.message.toLowerCase().includes("already exists"))throw l;throw e}await d.createEmailPasswordSession(i,n);let r=await d.createJWT(),a=await fetch("/api/account/bootstrap",{method:"POST",headers:{Authorization:`Bearer ${r.jwt}`}}),o=await a.json();if(!a.ok)throw Error(o.error||"Unable to finish setting up your advisor account.");p("Your advisor account is ready. Redirecting to the dashboard...")}e.push("/dashboard"),e.refresh()}catch(e){h(e instanceof Error?e.message:"We couldnât complete that request. Please try again.")}finally{x(!1)}}return((0,r.useEffect)(()=>{let e=!0;return Promise.resolve().then(()=>{try{let t=(0,o.createBrowserServices)();e&&m(t.account)}catch(t){e&&h(t instanceof Error?t.message:"Unable to initialize advisor login.")}finally{e&&f(!0)}}),()=>{e=!1}},[]),y)?(0,t.jsx)("div",{className:"border border-[color:var(--border)] bg-white p-8 shadow-[var(--shadow-sm)]",children:(0,t.jsxs)("form",{onSubmit:w,className:"mt-6",children:[(0,t.jsx)("div",{className:"border border-[color:var(--border)] bg-[color:var(--surface)] px-4 py-3 text-sm leading-6 text-slate-600",children:"Approved advisors can log in here directly. If your membership has been approved but this is your first time signing in, weâll create the account automatically."}),(0,t.jsxs)("label",{className:"mt-5 block text-sm font-semibold text-slate-700",children:["Email",(0,t.jsx)("input",{type:"email",value:i,onChange:e=>l(e.target.value),className:"mt-2 w-full border border-[color:var(--border)] px-4 py-3",required:!0})]}),(0,t.jsxs)("label",{className:"mt-5 block text-sm font-semibold text-slate-700",children:["Password",(0,t.jsx)("input",{type:"password",value:n,onChange:e=>c(e.target.value),className:"mt-2 w-full border border-[color:var(--border)] px-4 py-3",required:!0,minLength:8})]}),u?(0,t.jsx)("p",{className:"mt-4 rounded-md border border-rose-200 bg-rose-50 px-4 py-3 text-sm text-rose-700",children:u}):null,b?(0,t.jsx)("p",{className:"mt-4 rounded-md border border-emerald-200 bg-emerald-50 px-4 py-3 text-sm text-emerald-700",children:b}):null,(0,t.jsx)("button",{type:"submit",disabled:g,className:"mt-6 w-full rounded-md bg-[color:var(--ink)] px-6 py-3 text-sm font-semibold text-white disabled:opacity-60",children:g?"Working...":"Sign in"}),(0,t.jsx)("p",{className:"mt-4 text-sm leading-6 text-slate-600",children:(0,t.jsx)("a",{href:"/recover-password",className:"font-semibold text-[color:var(--accent-strong)]",children:"Forgot your password?"})}),(0,t.jsxs)("p",{className:"mt-2 text-sm leading-6 text-slate-600",children:["Need to apply first?"," ",(0,t.jsx)("a",{href:"/get-listed",className:"font-semibold text-[color:var(--accent-strong)]",children:"Submit a membership request"}),"."]})]})}):(0,t.jsx)("div",{className:"border border-[color:var(--border)] bg-white p-8 shadow-[var(--shadow-sm)]",children:(0,t.jsx)("p",{className:"text-sm leading-6 text-slate-600",children:"Preparing advisor login..."})})}])}]);
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.