1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1831],{3167:(e,s,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/account/password-reset/[token]",function(){return t(68786)}])},38934:(e,s,t)=>{"use strict";t.r(s),t.d(s,{__N_SSP:()=>S,default:()=>P,getCustomerPasswordResetTokenProps:()=>C});var a=t(50979),l=t(70365),r=t(25963),o=t(82014),n=t(24875),d=t(52816),i=t(81408),c=t(35781),u=t(56267),h=t(72202),w=t(60148),p=t(17686),m=t(17104),g=t(48474),f=t(49232),x=t(62900),v=t(67808),j=t(35531),N=t(42386),_=t(4142),y=t(79902),R=t(78077);let A=e=>{var s,t,A,k;let{t:b}=(0,l.Bd)("auth"),S=(0,f.br)(),{seller:C}=(0,g.hn)(),P=(0,n.C)(),[E,I]=(0,r.useState)(!1),U=(0,r.useRef)({sellerId:(null==C?void 0:C._id)||"",password:"",passwordRepeat:""}).current,z=p.Q.setNewPassword.append({passwordRepeat:m.s.password.required().valid(d.A.ref("password")).messages({"any.only":b("auth:passwordReset.passwordsDoNotMatch")})}),L=(0,w.e)(U,new u.A({},z));if((0,r.useEffect)(()=>{_.v.applyCheckoutStyling({theme:"white",accentColor:(null==C?void 0:C.accentColor)||"#000000",sellerInfo:C})},[]),!C)return(0,a.jsx)(R.M,{code:404,message:b("seller:sellerCouldNotBeFound")});let B=async()=>{if(L.check(),L.hasErrors())return P();o.Ay.start();try{let{passwordRepeat:s,...t}=U;await v.A.setPassword(e.token,t),I(!0)}catch(e){j.X.info({title:b("common:errors.failed"),message:b("auth:passwordReset.couldNotSetPassword")})}finally{o.Ay.stop()}},F=(0,f.oU)({_id:C._id},S);return(0,a.jsx)("div",{children:(0,a.jsxs)("div",{className:"account-grid",children:[(0,a.jsx)("div",{className:"account-left",children:(0,a.jsx)("div",{className:"account-left",children:(null==(s=C.brandingSettings)?void 0:s.customLogo)?(0,a.jsx)("a",{href:x.J.getValidUrl(C.brandingSettings.shopLogoUrl||F),children:(0,a.jsx)("img",{src:x.J.CDN_URL()+"/image?width=120&url="+C.brandingSettings.customLogo,alt:C.name})}):(0,a.jsx)(N.A,{className:"vi-w-36"})})}),(0,a.jsxs)("div",{className:"account-right",children:[(0,a.jsx)("div",{className:"mini-container",children:E?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h1",{className:"h2",children:b("auth:passwordReset.passwordResetted")}),(0,a.jsx)("div",{className:"text-muted mb-24",children:b("auth:passwordReset.passwordSuccessfullyResetted")}),(null==(k=null==(A=C.shopSettings)||null==(t=A.accountPages)?void 0:t.personalInformation.visible)||k)&&(0,a.jsx)("a",{className:"btn default",href:(0,f.oU)(C,S)+"/account/edit",children:b("common:myAccount")}),(0,a.jsx)("a",{className:"btn ml-12 bordered",href:(0,f.oU)(C,S),children:b("auth:passwordReset.sellerPage")})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h1",{className:"h2",children:b("auth:passwordReset.title")}),(0,a.jsx)("div",{className:"text-muted mb-24",children:b("auth:passwordReset.choosePasswordForAccount")}),(0,a.jsxs)(i.Ay,{validator:L,children:[(0,a.jsx)(c.A,{link:new h.a(U,"password"),title:b("common:password"),type:"password"}),(0,a.jsx)(c.A,{link:new h.a(U,"passwordRepeat"),title:b("common:passwordRepeat"),type:"password"})]}),(0,a.jsx)("button",{type:"button",className:"btn default block",onClick:e=>B(),disabled:o.Ay.loading,children:b("auth:passwordReset.definePassword")})]})}),(0,a.jsx)("div",{className:"footer-container",children:(0,a.jsx)(y.S,{hideCookieSettings:!0,sellerId:C._id})})]})]})})};var k=t(47349),b=t(1017),S=!0;let C=async(e,s,t)=>{var a,l;let r=null==(l=e.query)||null==(a=l.token)?void 0:a.toString();try{if(!(r&&t?await v.A.getPasswordReset(r,t):void 0))return{seller:null,organization:null};let a=t?await b.A.fetchSellerInfo(t,e.detectedLocale):void 0,l=(0,f.Wq)(s.domainCtx,null==a?void 0:a._id,null==a?void 0:a.orgId),o=null;return(null==a?void 0:a.orgId)&&(o=await k.A.fetchOrganizationInfo(a.orgId)),s.domainCtx=await l,{seller:null!=a?a:null,organization:o,token:r}}catch(e){}return{seller:null,organization:null}},P=e=>{let{seller:s,organization:t,token:r}=e,{t:o}=(0,l.Bd)(["auth","seller"]);return r?s?(0,a.jsx)(g.O3,{seller:s,organization:null!=t?t:void 0,children:(0,a.jsx)(A,{token:r})}):(0,a.jsx)(R.M,{code:404,message:o("seller:sellerCouldNotBeFound")}):(0,a.jsx)(R.M,{code:400,message:o("auth:passwordReset.tokenExpiredError")})}},47349:(e,s,t)=>{"use strict";t.d(s,{A:()=>r});var a=t(62900),l=t(38234);class r extends l.Ay{static async fetchOrganizationInfo(e){let s=a.J.BASE_URL()+"/api/organizations/"+e+"/info";return await this.fetchApi(l.U0.get,s)}}},68786:(e,s,t)=>{"use strict";t.r(s),t.d(s,{__N_SSP:()=>l,default:()=>r});var a=t(38934),l=!0;let r=a.default}},e=>{e.O(0,[7310,95,6762,5358,3148,2864,7621,639,636,6593,8792],()=>e(e.s=3167)),_N_E=e.O()}]);
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.