PageSourceSearch

https://account.ilmessaggero.it/assets/EditPassword-HBZiT4LF.js

js ilmessaggero.it collected 2026-09-24 08:33:09 UTC 2,627 bytes, 1 lines download raw bytes

1import{r as e,a as s,i as a,d as r,j as t,L as i,F as o,e as d,N as l,t as p,m as n,n as c}from"./index-r-KClxtY.js";import{F as u}from"./Form-BVeuzoPa.js";/* empty css             */import"./Toast-DuPXoAKZ.js";/* empty css              */const m=n=>{const c=n.texts,[m,w]=e.useState(!1),{addNotice:h,removeNoticeById:g}=s(),v=a(),f={inputs:{old_password:{label:c.old_password,tag:"input",className:"old-password",type:"password",placeholder:c.old_password,regOptions:{required:{value:!0,message:c.validation.required}}},password:{label:c.password,tag:"input",className:"password",type:"password",placeholder:"Password",regOptions:{required:{value:!0,message:c.validation.required},minLength:{value:8,message:c.validation.minLength},validationRules:[{type:"hasLowerUpper"},{type:"hasNumber"},{type:"hasSpecialChar"}]},validationTitle:c.validation.pwdValidationTitle,validationMessages:{minLength:c.validation.minLength,hasLowerUpper:c.validation.hasLowerUpper,hasNumber:c.validation.hasNumber,hasSpecialChar:c.validation.hasSpecialChar}},password_confirm:{label:c.password_confirm,tag:"input",className:"password-confirm",type:"password",placeholder:"Password",regOptions:{required:{value:!0,message:c.validation.required},validationRules:[{type:"isMatch",value:"password"}]}}},defaultValues:{old_password:"",password:"",password_confirm:""}},_=r({defaultValues:f.defaultValues,mode:"onChange",criteriaMode:"all"});return t.jsxs("div",{className:"EditPasswordForm-wrapper PageForm-wrapper",children:[m&&t.jsx(i,{}),t.jsx(o,{..._,children:t.jsx(u,{schema:f,name:"EditPasswordForm",onSubmit:e=>{w(!0);let s={...e};return d("/api/user/profile/edit-password",s).then((e=>{var s,a;0==e.data.success?h({title:(null==(a=null==(s=e.data)?void 0:s.status)?void 0:a.message)||p.notices.generic_error,type:l.error,timeout:1e4}):1==e.data.success&&(g("password_expired"),h({title:p.notices.generic_success,type:l.success,timeout:1e4}),n.redirect_uri&&(window.location.href=n.redirect_uri),v("/user/profile"))})).catch((e=>{h({title:p.notices.generic_error,type:l.error,timeout:1e4})})).finally((()=>{w(!1)}))},cta:n.cta,methods:_,alertMessage:c.alertMessage})})]})},w=()=>{const e=p.user,s=p.common,{redirect_uri:a}=n();return t.jsx("div",{className:"EditPassword-wrapper route-wrapper",children:t.jsxs("div",{className:"auth-wrapper",children:[t.jsx("h1",{className:"page-title centered",children:e.titles.change_password}),t.jsx("div",{className:"EditPassword-text",children:e.change_password_text}),t.jsx(m,{cta:s.forms.confirmCta,texts:s.forms,redirect_uri:a}),t.jsx(c,{to:"/user/profile",children:s.undo})]})})};export{w 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.