1"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[5969],{46110:(s,e,r)=>{r.r(e),r.d(e,{PasswordChangePageComponent:()=>L,default:()=>v});var a=r(65043),o=r(65173),n=r.n(o),t=r(50805),d=r(97508),i=r(4239),l=(r(44356),r(44104)),h=r(46790),g=r(71702),w=r(37614),P=r(77775),m=r(98139),c=r.n(m),u=r(93590),C=r(41233),p=r(16882);const _={root:"PasswordChangeForm_root__VLe0K",newPasswordSection:"PasswordChangeForm_newPasswordSection__-kQc8",confirmChangesSection:"PasswordChangeForm_confirmChangesSection__7I4ye",confirmChangesSectionVisible:"PasswordChangeForm_confirmChangesSectionVisible__rmNQC",confirmChangesTitle:"PasswordChangeForm_confirmChangesTitle__rTDTV",confirmChangesInfo:"PasswordChangeForm_confirmChangesInfo__SnHpR",bottomWrapper:"PasswordChangeForm_bottomWrapper__TDCti",error:"PasswordChangeForm_error__z3rH2 h4",helperLink:"PasswordChangeForm_helperLink__zGuQv a",emailStyle:"PasswordChangeForm_emailStyle__8iIgO"};var b=r(70579);class f extends a.Component{constructor(s){super(s),this.state={showResetPasswordMessage:!1},this.resetTimeoutId=null,this.submittedValues={},this.handleResetPassword=this.handleResetPassword.bind(this)}componentWillUnmount(){window.clearTimeout(this.resetTimeoutId)}handleResetPassword(){this.setState({showResetPasswordMessage:!0});const s=this.props.currentUser.attributes.email;this.props.onResetPassword(s)}render(){return(0,b.jsx)(P.lV,{...this.props,render:s=>{const{rootClassName:e,className:r,formId:a,changePasswordError:o,currentUser:n,handleSubmit:t,inProgress:d,resetPasswordInProgress:l,intl:g,invalid:w,pristine:P,ready:m,form:f,values:x}=s;if(!(0,C.vs)(n).id)return null;const j=g.formatMessage({id:"PasswordChangeForm.newPasswordLabel"}),F=g.formatMessage({id:"PasswordChangeForm.newPasswordPlaceholder"}),N=g.formatMessage({id:"PasswordChangeForm.newPasswordRequired"}),S=u.kO(N),I=g.formatMessage({id:"PasswordChangeForm.passwordTooShort"},{minLength:u.wz}),L=g.formatMessage({id:"PasswordChangeForm.passwordTooLong"},{maxLength:u.K9}),T=u.Bp(I,u.wz),k=u.Ru(L,u.K9),v=g.formatMessage({id:"PasswordChangeForm.passwordLabel"}),E=g.formatMessage({id:"PasswordChangeForm.passwordPlaceholder"}),A=g.formatMessage({id:"PasswordChangeForm.passwordRequired"}),R=u.kO(A),y=g.formatMessage({id:"PasswordChangeForm.passwordFailed"}),M=x.currentPassword&&this.submittedValues.currentPassword!==x.currentPassword,D=(0,p.CQ)(o)?y:null,U=c()(_.confirmChangesSection,{[_.confirmChangesSectionVisible]:!P}),V=o&&!D?(0,b.jsx)("span",{className:_.error,children:(0,b.jsx)(i.sA,{id:"PasswordChangeForm.genericFailure"})}):null,O=c()(e||_.root,r),z=w||d,H=(0,b.jsx)("span",{className:_.helperLink,onClick:this.handleResetPassword,role:"button",children:(0,b.jsx)(i.sA,{id:"PasswordChangeForm.resetPasswordLinkText"})}),B=(0,b.jsx)("span",{className:_.helperLink,onClick:this.handleResetPassword,role:"button",children:(0,b.jsx)(i.sA,{id:"PasswordChangeForm.resendPasswordLinkText"})}),K=this.state.showResetPasswordMessage||l?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(i.sA,{id:"PasswordChangeForm.resetPasswordLinkSent",values:{email:(0,b.jsx)("span",{className:_.emailStyle,children:n.attributes.email})}})," ",B]}):H;return(0,b.jsxs)(h.lV,{className:O,onSubmit:s=>{this.submittedValues=x,t(s).then((()=>{this.resetTimeoutId=window.setTimeout((()=>{f.restart(),this.props.onChange&&this.props.onChange()}),800)})).catch((()=>{}))},children:[(0,b.jsx)("div",{className:_.newPasswordSection,children:(0,b.jsx)(h.k7,{type:"password",id:a?`${a}.newPassword`:"newPassword",name:"newPassword",autoComplete:"new-password",label:j,placeholder:F,validate:u.k3(S,T,k)})}),(0,b.jsxs)("div",{className:U,children:[(0,b.jsx)(h.H4,{as:"h3",className:_.confirmChangesTitle,children:(0,b.jsx)(i.sA,{id:"PasswordChangeForm.confirmChangesTitle"})}),(0,b.jsxs)("p",{className:_.confirmChangesInfo,children:[(0,b.jsx)(i.sA,{id:"PasswordChangeForm.confirmChangesInfo"}),(0,b.jsx)("br",{}),(0,b.jsx)(i.sA,{id:"PasswordChangeForm.resetPasswordInfo",values:{resetPasswordLink:K}})]}),(0,b.jsx)(h.k7,{className:_.password,type:"password",id:"currentPassword",name:"currentPassword",autoComplete:"current-password",label:v,placeholder:E,validate:u.k3(R,T,k),customErrorText:M?null:D})]}),(0,b.jsxs)("div",{className:_.bottomWrapper,children:[V,(0,b.jsx)(h.jn,{type:"submit",inProgress:d,ready:m,disabled:z,children:(0,b.jsx)(i.sA,{id:"PasswordChangeForm.saveChanges"})})]})]})}})}}f.defaultProps={rootClassName:null,className:null,changePasswordError:null,inProgress:!1,formId:null,resetPasswordInProgress:!1,resetPasswordError:null};const{bool:x,string:j}=n(),F=(0,t.Zz)(i.j4)(f);F.displayName="PasswordChangeForm";const N=F;var S=r(96241);const I={content:"PasswordChangePage_content__NJmY9",desktopTopbar:"PasswordChangePage_desktopTopbar__Cq1fB",mobileTopbar:"PasswordChangePage_mobileTopbar__h8OZI",userNav:"PasswordChangePage_userNav__wboD4",LayoutSingleColumn:"PasswordChangePage_LayoutSingleColumn__Bq82f",heading:"PasswordChangePage_heading__b9Mb+"},L=s=>{const{changePasswordError:e,changePasswordInProgress:r,currentUser:a,onChange:o,onSubmitChangePassword:n,onResetPassword:t,resetPasswordInProgress:d,resetPasswordError:l,passwordChanged:P,scrollingDisabled:m,intl:c}=s,u=a&&a.id?(0,b.jsx)(N,{className:I.form,changePasswordError:e,currentUser:a,onSubmit:n,onChange:o,onResetPassword:t,resetPasswordInProgress:d,resetPasswordError:l,inProgress:r,ready:P}):null,C=c.formatMessage({id:"PasswordChangePage.title"});return(0,b.jsx)(h.YW,{title:C,scrollingDisabled:m,children:(0,b.jsx)(h.JI,{topbar:(0,b.jsx)(b.Fragment,{children:(0,b.jsx)(g.A,{currentPage:"PasswordChangePage",desktopClassName:I.desktopTopbar,mobileClassName:I.mobileTopbar})}
1),sideNav:null,footer:(0,b.jsx)(w.A,{}),className:I.LayoutSingleColumn,children:(0,b.jsxs)("div",{className:I.content,children:[(0,b.jsx)(h.H3,{as:"h1",className:I.heading,children:(0,b.jsx)(i.sA,{id:"PasswordChangePage.heading"})}),(0,b.jsx)(h.pJ,{currentPage:"PasswordChangePage",className:I.userNav}),u]})})})};L.defaultProps={changePasswordError:null,currentUser:null,resetPasswordInProgress:!1,resetPasswordError:null};const{bool:T,func:k}=n(),v=(0,t.Zz)((0,d.Ng)((s=>{const{changePasswordError:e,changePasswordInProgress:r,passwordChanged:a,resetPasswordInProgress:o,resetPasswordError:n}=s.PasswordChangePage,{currentUser:t}=s.user;return{changePasswordError:e,changePasswordInProgress:r,currentUser:t,passwordChanged:a,scrollingDisabled:(0,l.kl)(s),resetPasswordInProgress:o,resetPasswordError:n}}),(s=>({onChange:()=>s((0,S.n3)()),onSubmitChangePassword:e=>s((0,S.ec)(e)),onResetPassword:e=>s((0,S.xw)(e))}))),i.j4)(L)}}]); 2//# sourceMappingURL=PasswordChangePage.a711eb8a.chunk.js.map
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.