PageSourceSearch

https://cgscholar.com/_nuxt/0vclUx5p.js

js cgscholar.com collected 2026-09-24 09:21:33 UTC 2,452 bytes, 1 lines download raw bytes

1import{_ as h}from"./BS8kfiTy.js";import{_ as B}from"./6Py2VufL.js";import{d as y,b as k,e as C,u as D,B as F,h as M,w as b,a4 as N,i as p,j as c,k as r,P as f,t as $}from"./CTwjLVo9.js";import{c as j,g as I,u as q}from"./BWxOVg1T.js";import{b as w}from"./DgJsqxrV.js";import"./DyJ9bgkC.js";import"./B_dCBO1A.js";import"./hBKOvaze.js";import"./BbON9zhe.js";import"./DMsxsjxB.js";import"./D8B-1ICt.js";import"./w1MSXho_.js";import"./BXWXHAo2.js";import"./Doz9SQD6.js";import"./B4T6mMwU.js";import"./Cu3muj1h.js";const E={class:"flex flex-col w-full"},O={type:"submit",form:"edit-profile-form",class:"app-button app-button--dark"},or=y({__name:"EditUserPassword",setup(R){const a=N("dialogRef"),_=()=>{a!=null&&a.value&&a.value.close()},{t:s}=k(),S=C(),V=D(),v=j().shape({currentPassword:w.requiredString(),password:w.password().test("not-same-as-current",s("errors.diffrentFromCurrentPassword"),function(t){return t?t!==this.parent.currentPassword:!0}),confirmPassword:w.password().oneOf([I("password")],s("accountSettings.update.password.mismatch"))}),{defineField:d,handleSubmit:g,errors:l,validate:U}=q({validationSchema:v,initialValues:{currentPassword:"",password:"",confirmPassword:""}}),[n]=d("currentPassword"),[i]=d("password"),[u]=d("confirmPassword"),P=g(async t=>{const{valid:e}=await U();e&&S.updateUserProfile(t).then(()=>{V.showBanner({type:"success",message:s("success.profileUpdated")}),_()})});return(t,e)=>{const m=h,x=B;return M(),F(x,null,{actions:b(()=>[p("button",O,$(r(s)("common.save")),1)]),default:b(()=>[p("form",{id:"edit-profile-form",onSubmit:e[3]||(e[3]=(...o)=>r(P)&&r(P)(...o))},[p("div",E,[c(m,{modelValue:r(n),"onUpdate:modelValue":e[0]||(e[0]=o=>f(n)?n.value=o:null),name:"currentPassword",errors:r(l).currentPassword,label:r(s)("accountSettings.update.password.currentPassword"),"field-type":"text"},null,8,["modelValue","errors","label"]),c(m,{modelValue:r(i),"onUpdate:modelValue":e[1]||(e[1]=o=>f(i)?i.value=o:null),name:"password",errors:r(l).password,"value-to-be-different-from":r(n),"custom-errors":"",label:r(s)("accountSettings.update.password.newPassword")},null,8,["modelValue","errors","value-to-be-different-from","label"]),c(m,{modelValue:r(u),"onUpdate:modelValue":e[2]||(e[2]=o=>f(u)?u.value=o:null),name:"confirmPassword",errors:r(l).confirmPassword,label:r(s)("accountSettings.update.password.confirmNewPassword")},null,8,["modelValue","errors","label"])])],32)]),_:1})}}});
1export{or 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.