1import{r as w,m as j,j as s,L as v}from"./app-B3BWkqWE.js";import{L as n,I as p}from"./label-C56g-BWo.js";import{A as _}from"./app-layout-DwVEdf1c.js";import{S as y,H as N}from"./layout-D3ncRad5.js";import{B as C}from"./button-CLHTO0Jt.js";import{I as i}from"./input-ZAww2cax.js";import{z as S}from"./transition-CTbFeF03.js";/* empty css */import"./utils-jAU0Cazi.js";import"./index-C4MRzM_Z.js";import"./index-CaVhnAtO.js";import"./index-CG_TbiOe.js";import"./createLucideIcon-ltl3dnkG.js";import"./index-6QSUVNFK.js";import"./index-DeWcctpl.js";import"./app-logo--RTkJmoA.js";import"./app-logo-icon-GfEzXg4t.js";import"./clock-QahG2ajC.js";import"./message-square-CmL-Ae2T.js";const b=[{title:"Password settings",href:"/settings/password"}];function O(){const d=w.useRef(null),c=w.useRef(null),{data:e,setData:a,errors:o,put:f,reset:t,processing:x,recentlySuccessful:h}=j({current_password:"",password:"",password_confirmation:""}),g=r=>{r.preventDefault(),f(route("password.update"),{preserveScroll:!0,onSuccess:()=>t(),onError:l=>{var m,u;l.password&&(t("password","password_confirmation"),(m=d.current)==null||m.focus()),l.current_password&&(t("current_password"),(u=c.current)==null||u.focus())}})};return s.jsxs(_,{breadcrumbs:b,children:[s.jsx(v,{title:"Profile settings"}),s.jsx(y,{children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(N,{title:"Update password",description:"Ensure your account is using a long, random password to stay secure"}),s.jsxs("form",{onSubmit:g,className:"space-y-6",children:[s.jsxs("div",{className:"grid gap-2",children:[s.jsx(n,{htmlFor:"current_password",children:"Current password"}),s.jsx(i,{id:"current_password",ref:c,value:e.current_password,onChange:r=>a("current_password",r.target.value),type:"password",className:"mt-1 block w-full",autoComplete:"current-password",placeholder:"Current password"}),s.jsx(p,{message:o.current_password})]}),s.jsxs("div",{className:"grid gap-2",children:[s.jsx(n,{htmlFor:"password",children:"New password"}),s.jsx(i,{id:"password",ref:d,value:e.password,onChange:r=>a("password",r.target.value),type:"password",className:"mt-1 block w-full",autoComplete:"new-password",placeholder:"New password"}),s.jsx(p,{message:o.password})]}),s.jsxs("div",{className:"grid gap-2",children:[s.jsx(n,{htmlFor:"password_confirmation",children:"Confirm password"}),s.jsx(i,{id:"password_confirmation",value:e.password_confirmation,onChange:r=>a("password_confirmation",r.target.value),type:"password",className:"mt-1 block w-full",autoComplete:"new-password",placeholder:"Confirm password"}),s.jsx(p,{message:o.password_confirmation})]}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx(C,{disabled:x,children:"Save password"}),s.jsx(S,{show:h,enter:"transition ease-in-out",enterFrom:"opacity-0",leave:"transition ease-in-out",leaveTo:"opacity-0",children:s.jsx("p",{className:"text-sm text-neutral-600",children:"Saved"})})]})]})]})})]})}export{O as default};
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.