1import{E as m,r as a,j as e,t as o,q as x}from"./index-CWHMBte_.js";function f(){const i=m(),[t,l]=a.useState(""),[n,p]=a.useState(""),[d,u]=a.useState(!1),c=async r=>{if(r.preventDefault(),t!==n){o.error("Passwords do not match");return}u(!0);try{const{error:s}=await x.auth.updateUser({password:t});if(s)throw s;o.success("Password updated. You're signed in."),i({to:"/"})}catch(s){o.error(s instanceof Error?s.message:"Failed to update password")}finally{u(!1)}};return e.jsx("div",{className:"min-h-[70vh] grid place-items-center px-4",children:e.jsxs("form",{onSubmit:c,className:"w-full max-w-sm glass rounded-xl border border-primary/30 p-8 corner-bracket space-y-3",children:[e.jsx("h1",{className:"font-display text-xl glow-text text-center",children:"Set a new password"}),e.jsx("p",{className:"text-[11px] tracking-[0.22em] uppercase text-muted-foreground text-center",children:"Choose something you'll remember"}),e.jsx("input",{type:"password",required:!0,minLength:6,value:t,onChange:r=>l(r.target.value),placeholder:"New password",className:"w-full bg-black/40 border border-border/40 rounded-md px-3 py-2 text-sm outline-none focus:border-primary/60 mt-4"}),e.jsx("input",{type:"password",required:!0,minLength:6,value:n,onChange:r=>p(r.target.value),placeholder:"Confirm new password",className:"w-full bg-black/40 border border-border/40 rounded-md px-3 py-2 text-sm outline-none focus:border-primary/60"}),e.jsx("button",{type:"submit",disabled:d,className:"w-full rounded-md bg-primary text-primary-foreground text-sm font-medium py-2.5 hover:opacity-90 disabled:opacity-50",children:d?"Updatingâ¦":"Update password"})]})})}export{f as component};
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.