1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[35],{26742:function(s,e,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/auth/reset-password",function(){return t(7259)}])},7259:function(s,e,t){"use strict";t.r(e),t.d(e,{default:function(){return E}});var r=t(85893),a=t(11163),o=t(44504),n=t(47568),i=t(70655),c=t(9669),d=t.n(c),_=t(67294),u=t(4050),l=t(74736),h=t(82508),w=t(80184),f=t(46702),m=t.n(f),p=t(45697),R=t.n(p),P=t(72362),v=t(61593),x=t.n(v),g=function(s){var e=s.token,t=(0,u.As)(e),o=(0,_.useState)(""),c=o[0],f=o[1],p=(0,_.useState)(""),R=p[0],v=p[1],g=(0,_.useState)(""),j=g[0],b=g[1],N=(0,_.useState)(!1),k=N[0],y=N[1],C=(0,_.useState)(!1),E=C[0],K=C[1],Z=(0,_.useState)(""),S=Z[0],D=Z[1],T=(0,_.useRef)(),q=(0,a.useRouter)(),I=(0,r.jsxs)("ul",{className:x()["password-format"],children:[(0,r.jsx)("li",{children:"8-20 characters"}),(0,r.jsx)("li",{children:"Alphanumeric"}),(0,r.jsx)("li",{children:"Contains at least 1 capital letter"}),(0,r.jsx)("li",{children:"Contains at least 1 special character"})]}),M=(0,r.jsx)("div",{className:x()["auth-error-msg"],children:S});return(0,r.jsxs)("div",{className:x()["auth-container"],children:[(0,r.jsxs)("div",{className:x().header,children:[(0,r.jsx)("div",{className:x().logo,children:(0,r.jsx)("img",{src:"/images/logo.png",alt:""})}),(0,r.jsx)("h3",{children:"Reset Password"})]}),!t&&(0,r.jsx)("div",{className:x().msg,children:"Invalid Token"}),t&&(0,r.jsxs)("form",{className:x()["auth-form"],children:[(0,r.jsxs)("div",{className:(0,P.j)([x()["auth-input"],"password"===c?x().active:"",j?x().error:""]),children:[(0,r.jsx)("input",{type:k?"text":"password",name:"password",id:"password",placeholder:"Enter password",value:R,onChange:function(s){var e=s.target.value;v(e),e&&((0,u.uo)(e)?b(""):b("Invalid password format"))},onFocus:function(){return f("password")},onBlur:function(){return f("")},required:!0,autoComplete:"off",autoFocus:!0}),R&&(0,r.jsx)("div",{onClick:function(s){s.preventDefault(),v("")},title:"Clear Password",className:x().btn,children:(0,r.jsx)("img",{src:"/icons/close_circle.svg",alt:"",className:x().icon})}),(0,r.jsx)("div",{onClick:function(s){s.preventDefault(),y((function(s){return!s}))},className:x().btn,children:(0,r.jsx)("img",{src:k?"/icons/visibility.svg":"/icons/visibility_off.svg",alt:"",className:x().icon,title:k?"Hide Password":"Show Password"})}),j&&(0,r.jsx)("small",{className:x().error,children:j})]}),(0,r.jsxs)("div",{className:x().info,title:"Show Password Format",onClick:function(s){s.preventDefault(),(0,h.K4)("password-format")},children:[(0,r.jsx)("small",{children:"Password format"}),(0,r.jsx)("img",{src:"/icons/info.svg",alt:"",className:x().icon})]}),(0,r.jsx)("button",{className:x()["submit-btn"],type:"submit",disabled:!R||j||!t||E,onClick:function(s){if(s.preventDefault(),R||b("Please enter password"),R&&!j&&t&&!E){var r=function(){var s=(0,n.Z)((function(){var s,t,r,a,o;return(0,i.__generator)(this,(function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),[4,T.current.execute({async:!0})];case 1:return s=n.sent(),t=s.response,T.current.resetCaptcha(),t?(K(!0),r={password:R,captchaToken:t},[4,d().put("".concat("https://api1.ampmcx.com","/api/v1/auth/reset-password/").concat(e),r,{headers:(0,l.c)(1)})]):(D("Recaptcha Error"),(0,h.K4)("reset-password-error"),[2]);case 2:return 200===n.sent().status&&q.push("/auth/login"),[3,4];case 3:return a=n.sent(),(o=a.response.data&&a.response.data.status.errorMessage)&&(D(o),(0,h.K4)("reset-password-error")),K(!1),v(""),[3,4];case 4:return[2]}}
1))}));return function(){return s.apply(this,arguments)}}();r()}},children:"Reset"})]}),t&&(0,r.jsx)("div",{className:x().footer}),(0,r.jsx)(w.Z,{id:"password-format",title:"Password Format",Body:I}),(0,r.jsx)(w.Z,{id:"reset-password-error",title:"Request error",Body:M}),(0,r.jsx)(m(),{ref:T,size:"invisible",sitekey:"786c2298-0f01-4ebc-92a3-493aaa56014a",onVerify:function(){}})]})};g.propTypes={token:R().string.isRequired};var j=g,b=t(53405),N=t(71738),k=t(65414),y=t.n(k),C=function(){var s=(0,a.useRouter)().query.t;return(0,o.Z)(),(0,r.jsxs)("div",{className:y().auth,children:[(0,r.jsx)(N.Z,{title:"Reset Password | AmPmCx",description:"Reset your password. Choose a strong password and keep it safe."}),(0,r.jsx)("main",{className:y()["reset-password"],children:(0,r.jsx)(j,{token:null!==s&&void 0!==s?s:""})})]})},E=function(){return(0,r.jsx)(b.Z,{loginRequired:!1,children:(0,r.jsx)(C,{})})}},61593:function(s){s.exports={icon:"ResetPassword_icon__Izp8M","auth-input":"ResetPassword_auth-input__WJAJi","auth-container":"ResetPassword_auth-container__IqXCG",footer:"ResetPassword_footer__RDGlE",auth:"ResetPassword_auth__dWKIK",header:"ResetPassword_header__0KaGL",logo:"ResetPassword_logo__7QPga",msg:"ResetPassword_msg__Z7og3","auth-form":"ResetPassword_auth-form___DVE6",info:"ResetPassword_info__pqZR2",terms:"ResetPassword_terms__V3rwM",checkbox:"ResetPassword_checkbox__KD1kU",checked:"ResetPassword_checked__OH_vo","submit-btn":"ResetPassword_submit-btn__vPRjN",active:"ResetPassword_active__N_Kma",error:"ResetPassword_error__i749h",btn:"ResetPassword_btn__rPvHG","tfa-info":"ResetPassword_tfa-info__kafxy","password-format":"ResetPassword_password-format__GNcct","auth-success-msg":"ResetPassword_auth-success-msg__vrhLy"}},65414:function(s){s.exports={icon:"ResetPassword_icon__vadks","auth-input":"ResetPassword_auth-input__DtqK2","auth-container":"ResetPassword_auth-container__d7LZo",footer:"ResetPassword_footer__dMpRK",auth:"ResetPassword_auth__JrQ29",header:"ResetPassword_header__gcWW7",logo:"ResetPassword_logo___EzZs",msg:"ResetPassword_msg__vgMX4","auth-form":"ResetPassword_auth-form__L3VJE",info:"ResetPassword_info__ZSKjg",terms:"ResetPassword_terms__zZ9vr",checkbox:"ResetPassword_checkbox__LfKPW",checked:"ResetPassword_checked__0NHfg","submit-btn":"ResetPassword_submit-btn__gRIEB",active:"ResetPassword_active__acIlj",error:"ResetPassword_error__RMmCt",btn:"ResetPassword_btn__jTyJO","tfa-info":"ResetPassword_tfa-info__TB3DT","password-format":"ResetPassword_password-format__nANjl","auth-success-msg":"ResetPassword_auth-success-msg__ThbSm"}},9008:function(s,e,t){s.exports=t(5443)}},function(s){s.O(0,[608,774,888,179],(function(){return e=26742,s(s.s=e);var e}));var e=s.O();_N_E=e}]);
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.