PageSourceSearch

https://royalleafs.ca/_nuxt/7RHmGo-X.js

js royalleafs.ca collected 2026-09-30 16:42:06 UTC 7,179 bytes, 1 lines download raw bytes

1import{_ as M,E as k}from"./CzSKJ4ch.js";import{u as _,_ as E,o as i,c as d,a as e,t as u,F as C,h,e as p,G as b,P as c,n as f,d as l,x as v,w as x,f as R,k as g,l as w,i as V,m as B}from"./BFMX5MT1.js";import{_ as N}from"./CVpuDZon.js";import"./CwG3y940.js";import"./CE1G-McA.js";const n=_(),S={data(){return{processing:n.requestProcessing,displayResetPasswordForm:!1,form:{pin:null,email:null},passwordForm:{password:null,password_confirmation:null,pin:null},validationMessages:new k}},created(){this.fillForgetPasswordEmail()},methods:{fillForgetPasswordEmail(){const o=n.state.forgetPasswordEmail.value;if(!o){let r=g().params.prefix;return r=r?`/${r}`:"",w(`${r}/auth/forgot-password/email`)}this.form.email=o,n.mutations.clearForgetPasswordEmail()},async request(){this.validationMessages.clear();try{await n.actions.checkResetPasswordPin(this.form),this.displayResetPasswordForm=!0}catch(o){this.validationMessages.recordFromErrorResponse(o.response)}},async updatePassword(){this.validationMessages.clear();try{this.passwordForm.pin=this.form.pin,await n.actions.updatePassword(this.passwordForm),await this.login()}catch(o){this.validationMessages.recordFromErrorResponse(o.response)}},async login(){await n.actions.login({email:this.form.email,password:this.passwordForm.password});let o=g().params.prefix;o=o?`/${o}`:"",w(`${o}/shop`)}}},q={class:"mt-8 sm:mt-12"},I={class:"text-center"},T={class:"mt-2 text-sm text-brand-neutral-300"},A={key:0,class:"alert-bar alert-bar--error text-xs mb-4"},D=["disabled"],U={key:0,class:"alert-bar alert-bar--error text-xs mb-4"},L={class:"mt-4"},O=["disabled"],j={class:"mt-4 text-center text-sm"};function z(o,r,F,y,s,a){const m=M,P=R;return i(),d("div",q,[e("div",I,[r[8]||(r[8]=e("h1",{class:"text-2xl font-extrabold text-brand-neutral-900"},"Forgot password",-1)),e("p",T,u(s.displayResetPasswordForm?"Choose a new password.":"Enter the 5-digit pin we emailed you."),1)]),s.displayResetPasswordForm?(i(),d("form",{key:1,onSubmit:r[7]||(r[7]=v((...t)=>a.updatePassword&&a.updatePassword(...t),["prevent"])),class:"mt-6 bg-white rounded-2xl border border-brand-neutral-100 p-6 sm:p-8"},[s.validationMessages.has("throttling")?(i(),d("p",U,u(s.validationMessages.get("throttling")),1)):h("",!0),e("div",null,[r[11]||(r[11]=e("label",{class:"block pl-2 text-xs font-semibold text-brand-neutral-800"},[p("New password "),e("span",{class:"text-brand-error"},"*")],-1)),b(e("input",{type:"password",name:"customer_password","onUpdate:modelValue":r[3]||(r[3]=t=>s.passwordForm.password=t),class:f(["appearance-none primary-text input w-full mt-1 px-4 py-2.5 bg-brand-surface-secondary border border-brand-neutral-100 rounded-xl text-base sm:text-sm text-brand-neutral-900 placeholder-brand-neutral-400 hover:border-brand-primary focus:bg-brand-surface-primary focus:border-brand-primary focus:outline-none focus:ring-3 focus:ring-brand-primary/30 transition-all duration-200",s.validationMessages.has("password")?"border-red-400 hover:border-red-400 focus:border-red-400 focus:ring-red-400/30":""]),placeholder:"Enter new password",onInput:r[4]||(r[4]=t=>s.validationMessages.clear("password")),autofocus:""},null,34),[[c,s.passwordForm.password]]),l(m,{class:"pl-2",errors:s.validationMessages,"property-name":"password"},null,8,["errors"])]),e("div",L,[r[12]||(r[12]=e("label",{class:"block pl-2 text-xs font-semibold text-brand-neutral-800"},[p("Confirm new password "),e("span",{class:"text-brand-error"},"*")],-1)),b(e("input",{type:"password",name:"customer_password_confirmation","onUpdate:modelValue":r[5]||(r[5]=t=>s.passwordForm.password_confirmation=t),class:f(["appearance-none primary-text input w-full mt-1 px-4 py-2.5 bg-brand-surface-secondary border border-brand-neutral-100 rounded-xl text-base sm:text-sm text-brand-neutral-900 placeholder-brand-neutral-400 hover:border-brand-primary focus:bg-brand-surface-primary focus:border-brand-primary focus:outline-none focus:ring-3 focus:ring-brand-primary/30 transition-all duration-200",s.validationMessages.has("password_confirmation")?"border-red-400 hover:border-red-400 focus:border-red-400 focus:ring-red-400/30":""]),placeholder:"Confirm new password",onInput:r[6]||(r[6]=t=>s.validationMessages.clear("password_confirmation"))},null,34),[[c,s.passwordForm.password_confirmation]]),l(m,{class:"pl-2",errors:s.validationMessages,"property-name":"password_confirmation"},null,8,["errors"])]),e("button",{disabled:s.processing,type:"submit",class:"mt-6 w-full bg-brand-primary primary-btn hover:bg-brand-primary-700 text-[var(--color-primary-text)] rounded-2xl font-bold text-base py-3.5 px-8 transition-all duration-300 hover:ring-4 hover:ring-brand-primary/30 hover:scale-[1.01] disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer"}," Reset password ",8,O)],32)):(i(),d(C,{key:0},[r[10]||(r[10]=e("p",{class:"alert-bar alert-bar--neutral text-xs mt-6"}," Don't see the email? Check your spam folder. ",-1)),e("form",{onSubmit:r[2]||(r[2]=v((...t)=>a.request&&a.request(...t),["prevent"])),class:"mt-3 bg-white rounded-2xl border border-brand-neutral-100 p-6 sm:p-8"},[s.validationMessages.has("throttling")?(i(),d("p",A,u(s.validationMessages.get("throttling")),1)):h("",!0),e("div",null,[r[9]||(r[9]=e("label",{class:"block pl-2 text-xs font-semibold text-brand-neutral-800"},[p("5-digit pin "),e("span",{class:"text-brand-error"},"*")],-1)),b(e("input",{type:"text",name:"pin",id:"pin","onUpdate:modelValue":r[0]||(r[0]=t=>s.form.pin=t),class:f(["appearance-none primary-text input w-full mt-1 px-4 py-2.5 bg-brand-surface-secondary border border-brand-neutral-100 rounded-xl text-base sm:text-sm text-brand-neutral-900 placeholder-brand-neutral-400 hover:border-brand-primary focus:bg-brand-surface-primary focus:border-brand-primary focus:outline-none focus:ring-3 focus:ring-brand-primary/30 transition-all duration-200",s.validationMessages.has("pin")?"border-red-400 hover:border-red-400 focus:border-red-400 focus:ring-red-400/30":""]),placeholder:"Enter your 5-digit pin",onInput:r[1]||(r[1]=t=>s.validationMessages.clear("pin")),autofocus:""},null,34),[[c,s.form.pin]]),l(m,{class:"pl-2",errors:s.validationMessages,"property-name":"pin"},null,8,["errors"])]),e("button",{disabled:s.processing,type:"submit",class:"mt-6 w-full bg-brand-primary primary-btn hover:bg-brand-primary-700 text-[var(--color-primary-text)] rounded-2xl font-bold text-base py-3.5 px-8 transition-all duration-300 hover:ring-4 hover:ring-brand-primary/30 hover:scale-[1.01] disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer"}," Submit ",8,D)],32)],64)),e("div",j,[l(P,{to:"/auth/login",class:"text-brand-neutral-600 hover:text-brand-primary transition-colors duration-200"},{default:x(()=>[...r[13]||(r[13]=[p(" Back to ",-1),e("span",{class:"font-semibold text-brand-primary"},"Sign in",-1)])]),_:1})])])}const G=Object.assign(E(S,[["render",z]]),{__name:"AuthForgotPasswordPin"}),X={__name:"pin",setup(o){if(_().state.isLoggedIn.value){let r=g().params.prefix;r=r?`/${r}`:"",w(`${r}/shop`)}return(r,F)=>{const y=G,s=N,a=B;return i(),V(a,null,{default:x(()=>[l(s,{"max-width-class":"max-w-md"},{default:x(()=>[l(y)]),_:1})]),_:1})}}};export{X 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.