PageSourceSearch

https://www.gentlekids.com.hk/_nuxt/wFkajNat.js

js gentlekids.com.hk collected 2026-10-07 10:06:47 UTC 13,787 bytes, 1 lines download raw bytes

1import{_ as p,o as a,c as l,b as t,t as i,f as g,x as h,y as x,H as y,C as k,i as _,d as f,w,I as $,T as I,D as F,z as b,F as j,r as A,A as H,u as P,a as T,g as C}from"./Bq-LypMj.js";import{_ as V}from"./ch7lKhd-.js";import{_ as B}from"./BGHbRsLP.js";import{_ as E}from"./DbEIMUcE.js";import{s as M}from"./DI-_HKo5.js";const L={name:"UpdateImage",data(){return{loading:!1,profileImage:null,currentProfileImage:null}},async fetch(){await this.getUserImage()},methods:{async getUserImage(){const s=await this.getProfileImage();this.currentProfileImage=this.profileImage=this.responseToImg(s)},async update(s){if(s.target.files.length===0)return;this.loading=!0;const e=new FormData;e.append("profile_image",s.target.files[0]);const o=await this.updateProfileImage(e);if(o!=null&&o.status_code!=null)switch(o.status_code){case 200:await this.getUserImage(),this.$bus.emit("refresh-user-image"),this.showAlert("success",o.message);break;case 403:case 422:this.showAlert("error",o.message);break}else this.showAlert("error",o?.message||this.$t("alert.error.unknown"));this.loading=!1}}},N={id:"update-image",class:"position-relative"},S=["src"],D={key:1,class:"image-placeholder"},R=["title"],G={for:"profile_image",class:"btn-upload"};function z(s,e,o,m,n,r){return a(),l("div",null,[t("div",N,[n.currentProfileImage!=null?(a(),l("img",{key:0,src:n.currentProfileImage},null,8,S)):(a(),l("div",D)),t("input",{id:"profile_image",type:"file",title:s.$t("member.profile.update_image.upload"),accept:"image/*",hidden:"",onChange:e[0]||(e[0]=(...c)=>r.update&&r.update(...c))},null,40,R),t("label",G,i(s.$t("member.profile.update_image.upload")),1),e[1]||(e[1]=t("div",{class:"bg-overlay position-absolute"},null,-1))])])}const O=p(L,[["render",z],["__scopeId","data-v-2d0fdb8b"]]),q={name:"UpdateName",data(){return{open:!1,loading:!1,focus:!1,current_name:this.$auth.user.name,previous_name:this.$auth.user.name}},methods:{async update(){this.loading=!0;const s=await this.updateName(this.current_name);if(s!=null&&s.status_code!=null)switch(s.status_code){case 200:this.previous_name=this.current_name,await this.$auth.fetchUser(),this.showAlert("success",s.message);break;case 403:case 422:this.current_name=this.previous_name,this.showAlert("error",s.message);break}this.loading=!1},onStart(){this.open=!0,setTimeout(()=>{this.$refs.name.focus()},100)},onBlur(){this.open=!1,this.checkFocus(),this.previous_name!=this.current_name&&this.update()},checkFocus(){this.current_name.length===0&&(this.focus=!1,this.current_name=this.previous_name)}}},J={id:"update-name",class:"d-flex flex-1"},K=["placeholder"],Q={key:1,class:"spinner"};function W(s,e,o,m,n,r){return a(),l("div",J,[n.open?g("",!0):(a(),l("h2",{key:0,onClick:e[0]||(e[0]=(...c)=>r.onStart&&r.onStart(...c))},i(n.current_name),1)),h(t("input",{ref:"name","onUpdate:modelValue":e[1]||(e[1]=c=>n.current_name=c),type:"text",placeholder:s.$t("member.profile.update_name.your_name"),onFocus:e[2]||(e[2]=c=>n.focus=!0),onBlur:e[3]||(e[3]=c=>r.onBlur()),onChange:e[4]||(e[4]=c=>r.checkFocus())},null,40,K),[[x,n.open],[y,n.current_name]]),n.loading?(a(),l("div",Q,[...e[5]||(e[5]=[t("div",{class:"double-bounce1"},null,-1),t("div",{class:"double-bounce2"},null,-1)])])):g("",!0)])}const X=p(q,[["render",W],["__scopeId","data-v-7bf79fc3"]]),Y={name:"UpdateGender",data(){return{show:!1,loading:!1,gender:this.$auth.user.gender}},computed:{genderText(){switch(this.gender){case 1:case"1":return"member.profile.gender.selections.dad";case 2:case"2":return"member.profile.gender.selections.mum";case 3:case"3":return"member.profile.gender.selections.others";default:return"profile.gender.unknown"}}},methods:{async update(s){this.loading=!0;const e=await this.updateGender(s);if(e!=null&&e.status_code!=null)switch(e.status_code){case 200:this.show=!1,this.gender=s,this.$auth.fetchUser(),this.$bus.emit("refresh-user-image"),this.showAlert("success",e.message);break;case 403:case 422:this.showAlert("error",e.message);break}this.loading=!1}}},Z={id:"update-gender",class:"position-relative"},ee={class:"gender-button-container d-flex flex-column justify-content-end align-items-end"},se={class:"gender"},te={class:"modal position-absolute d-flex flex-column justify-content-center align-items-center"},ne={class:"text-center"},oe={key:0,class:"spinner"};function ie(s,e,o,m,n,r){const c=k("scroll-lock");return a(),l("div",Z,[t("div",ee,[t("span",se,i(s.$t(r.genderText)),1),t("button",{class:_(["btn-badge",{invisible:n.loading}]),type:"button",onClick:e[0]||(e[0]=u=>n.show=!n.show)},i(s.$t("member.profile.gender.update")),3)]),f(I,{name:"fade"},{default:w(()=>[n.show?h((a(),l("div",{key:0,class:"overlay d-flex justify-content-center align-items-center position-fixed",onMousedown:e[4]||(e[4]=$(u=>n.show=!1,["self","stop"]))},[t("div",te,[t("h4",ne,i(s.$t("member.profile.gender.update")),1),t("button",{class:"btn-theme btn-blue",onClick:e[1]||(e[1]=u=>r.update(1))},i(s.$t("member.profile.gender.selections.dad")),1),t("button",{class:"btn-theme btn-red",onClick:e[2]||(e[2]=u=>r.update(2))},i(s.$t("member.profile.gender.selections.mum")),1),t("button",{class:"btn-theme btn-orange",onClick:e[3]||(e[3]=u=>r.update(3))},i(s.$t("member.profile.gender.selections.others")),1)]),n.loading?(a(),l("div",oe,[...e[5]||(e[5]=[t("div",{class:"double-bounce1"},null,-1),t("div",{class:"double-bounce2"},null,-1)])])):g("",!0)],32)),[[c,n.show]]):g("",!0)]),_:1})])}const re=p(Y,[["render",ie],["__scopeId","data-v-a6234534"]]),ae={name:"UpdatePassword",data(){return{show:!1,loading:!1,new_password:"",confirm_password:"",new_focu
1s:!1,confirm_focus:!1,errors:null}},watch:{open(){}},mounted(){},methods:{async update(){this.errors=null,this.loading=!0;const s=await this.updatePassword(this.old_password,this.new_password,this.confirm_password);if(s!=null&&s.status_code!=null)switch(s.status_code){case 200:this.show=!1,this.showAlert("success",s.message);break;case 403:case 422:this.errors=s.message;break}this.loading=!1,this.new_password="",this.confirm_password=""},checkFocus(s){switch(s){case"new_password":this.new_password.length===0&&(this.new_focus=!1);break;case"confirm_password":this.confirm_password.length===0&&(this.confirm_focus=!1);break}}}},le={id:"update-password",class:"position-relative"},de={class:"modal position-absolute d-flex flex-column justify-content-center align-items-center"},ce={class:"text-center"},ue={for:"new_password"},me={for:"confirm_password"},fe={class:"text-center text-red response"};function pe(s,e,o,m,n,r){const c=V,u=k("scroll-lock");return a(),l("div",le,[t("button",{class:"btn-badge",type:"button",onClick:e[0]||(e[0]=d=>n.show=!n.show)},i(s.$t("member.profile.password.update")),1),f(I,{name:"fade"},{default:w(()=>[n.show?h((a(),l("div",{key:0,class:"overlay d-flex justify-content-center align-items-center position-fixed",onMousedown:e[10]||(e[10]=$(d=>n.show=!1,["self","stop"]))},[t("div",de,[t("h4",ce,i(s.$t("member.profile.password.update")),1),t("div",{class:_(["theme-focus-input",{focused:n.new_focus,filled:n.new_password.length>0}])},[t("label",ue,[e[11]||(e[11]=t("i",{class:"fas fa-key"},null,-1)),e[12]||(e[12]=F()),t("span",null,i(s.$t("member.profile.password.form.new_password")),1)]),h(t("input",{id:"new_password","onUpdate:modelValue":e[1]||(e[1]=d=>n.new_password=d),type:"password",onFocus:e[2]||(e[2]=d=>n.new_focus=!0),onBlur:e[3]||(e[3]=d=>r.checkFocus("new_password")),onChange:e[4]||(e[4]=d=>r.checkFocus("new_password"))},null,544),[[y,n.new_password]])],2),t("div",{class:_(["theme-focus-input",{focused:n.confirm_focus,filled:n.confirm_password.length>0}])},[t("label",me,[e[13]||(e[13]=t("i",{class:"fas fa-check-double"},null,-1)),t("span",null,i(s.$t("member.profile.password.form.confirm_new_password")),1)]),h(t("input",{id:"confirm_password","onUpdate:modelValue":e[5]||(e[5]=d=>n.confirm_password=d),type:"password",onFocus:e[6]||(e[6]=d=>n.confirm_focus=!0),onBlur:e[7]||(e[7]=d=>r.checkFocus("confirm_password")),onChange:e[8]||(e[8]=d=>r.checkFocus("confirm_password"))},null,544),[[y,n.confirm_password]])],2),n.loading?(a(),b(c,{key:0,"class-name":"btn-theme"})):(a(),l("button",{key:1,class:"btn-theme",onClick:e[9]||(e[9]=d=>r.update())},i(s.$t("member.profile.password.form.confirm")),1)),t("div",fe,i(n.errors),1)])],32)),[[u,n.show]]):g("",!0)]),_:1})])}const he=p(ae,[["render",pe],["__scopeId","data-v-3fe6fb76"]]),_e={name:"ChildrenList",data(){return{loading:!0,children:[]}},async mounted(){this.loading=!0;const s=await this.getChildren();if(s!=null&&s.status_code!=null)switch(s.status_code){case 200:this.children=s.data,await this.getImages();break;case 403:s.status===0&&this.showAlert("error",s.message);break}this.loading=!1},methods:{async getImages(){for(let s=0;s<this.children.length;s++){const e=this.children[s].child_id,o=await this.getChildrenImage(e);this.children[s].image=this.responseToImg(o)}this.$forceUpdate()}}},ge={id:"children-list"},be={key:1,class:"children-container"},we={key:0,class:"d-grid"},ve=["src"],ye={key:1};function ke(s,e,o,m,n,r){const c=B,u=H;return a(),l("div",ge,[n.loading?(a(),b(c,{key:0,number:5,type:"childrenList"})):(a(),l("div",be,[n.children.length>0?(a(),l("div",we,[(a(!0),l(j,null,A(n.children,(d,v)=>(a(),b(u,{key:v,to:s.$localePath(`/member/children/${d.child_id}`),class:"child d-flex align-items-center"},{default:w(()=>[t("img",{src:d.image,class:_(["rounded-circle border",{"b-blue":d.gender==0,"b-red":d.gender==1}]),alt:""},null,10,ve),t("h5",{class:_({"text-blue":d.gender==0,"text-red":d.gender==1})},i(d.name),3)]),_:2},1032,["to"]))),128))])):(a(),l("i",ye,i(s.$t("member.children.message.empty")),1))]))])}const $e=p(_e,[["render",ke],["__scopeId","data-v-c75de1c5"]]),Ie={name:"CheckEmailVerify",props:["message","seconds"],data(){return{show:!1}},methods:{onShow(){this.show=!0},onHide(){this.show=!1},resend(){this.show=!1,this.$emit("resend")}}},Ce={class:"box position-absolute text-center"},xe=["innerHTML"],Ue={key:1,class:"timer"};function Fe(s,e,o,m,n,r){const c=k("scroll-lock");return a(),b(I,{name:"fade"},{default:w(()=>[h((a(),l("div",{class:"overlay position-fixed",onClick:e[3]||(e[3]=$((...u)=>r.onHide&&r.onHide(...u),["self"]))},[t("div",Ce,[t("div",{class:"btn-close pointer bg-contain position-absolute",onClick:e[0]||(e[0]=(...u)=>r.onHide&&r.onHide(...u))}),e[4]||(e[4]=t("img",{src:E,width:"100%"},null,-1)),t("div",{class:_(["title","text-yellow"])},i(s.$t("auth.message.verify.sent")),1),t("div",{class:"message",innerHTML:o.message},null,8,xe),t("button",{type:"button",class:"btn-theme btn-yellow-border",onClick:e[1]||(e[1]=(...u)=>r.onHide&&r.onHide(...u))},i(s.$t("auth.message.verify.button.confirm")),1),o.seconds<=0?(a(),l("button",{key:0,t
1ype:"button",class:"btn-text",onClick:e[2]||(e[2]=(...u)=>r.resend&&r.resend(...u))},i(s.$t("auth.message.verify.button.resend")),1)):(a(),l("div",Ue,i(s.$t("auth.message.verify.send_again",{seconds:o.seconds})),1))])])),[[x,n.show],[c,n.show]])]),_:1})}const je=p(Ie,[["render",Fe],["__scopeId","data-v-0632e905"]]),Ae={id:"user-profile",class:"position-relative"},He={class:"name-photo d-flex align-items-center"},Pe={class:"flex-1 name-email-container"},Te={class:"email-container d-flex flex-wrap align-items-center"},Ve={class:"email"},Be={key:0,class:"badge badge-green"},Ee={key:1,class:"d-flex"},Me={class:"badge badge-orange d-inline-block"},Le={key:1,class:"verify badge"},Ne={class:"information d-flex flex-column justify-content-between"},Se={class:"row d-flex justify-content-between align-items-center"},De={class:"font-bold"},Re={class:"profile-data"},Ge={class:"row d-flex justify-content-between align-items-center"},ze={class:"font-bold"},Oe={class:"profile-data"},qe={class:"row d-flex justify-content-between align-items-center"},Je={class:"font-bold"},Ke={class:"profile-data"},Qe={class:"children-list-box d-flex flex-column"},We={name:"Profile",data(){return{timer:null,seconds:0,verifyMessage:""}},methods:{async onResendEmail(){const s=await this.resendEmail();if(s!=null&&s.status_code!=null)switch(s.status_code){case 200:this.seconds=60,this.timer=M(()=>{this.seconds<=0&&clearInterval(this.timer),this.seconds--},1e3),this.verifyMessage=s.message,this.$refs.checkEmailVerify.onShow();break;case 403:this.showAlert("error",s.message);break}}}},Xe=Object.assign(We,{setup(s){const{t:e}=P();return T({title:C(()=>e("member.menu.profile")),meta:C(()=>[{name:"description",content:e("member.menu.profile")},{property:"og:title",content:e("member.menu.profile")},{property:"og:description",content:e("member.menu.profile")}])}),(o,m)=>{const n=O,r=X,c=re,u=he,d=$e,v=je;return a(),l("div",Ae,[t("h3",null,i(o.$t("member.profile.title")),1),t("div",He,[f(n),t("div",Pe,[f(r),t("div",Te,[t("span",Ve,i(o.$auth.user.email),1),o.$auth.user.is_activated?(a(),l("span",Be,i(o.$t("member.profile.email.active")),1)):(a(),l("div",Ee,[t("span",Me,i(o.$t("member.profile.email.inactive")),1),o.seconds<=0?(a(),l("button",{key:0,class:"verify btn-badge",type:"button",onClick:m[0]||(m[0]=(...U)=>o.onResendEmail&&o.onResendEmail(...U))},i(o.$t("member.profile.email.resend")),1)):(a(),l("span",Le,i(o.$t("member.profile.email.wait",{seconds:o.seconds})),1))]))])])]),t("div",Ne,[t("div",Se,[t("div",De,i(o.$t("member.profile.gender.title")),1),t("div",Re,[f(c)])]),t("div",Ge,[t("div",ze,i(o.$t("member.profile.start_date")),1),t("div",Oe,i(o.$dayjs(o.$auth.user.created_at).format(o.$t("date"))),1)]),t("div",qe,[t("div",Je,i(o.$t("member.profile.password.title")),1),t("div",Ke,[f(u)])])]),t("div",Qe,[t("h3",null,i(o.$t("member.profile.my_children")),1),f(d)]),f(v,{ref:"checkEmailVerify",message:o.verifyMessage,seconds:o.seconds,onResend:o.onResendEmail},null,8,["message","seconds","onResend"])])}}}),ns=p(Xe,[["__scopeId","data-v-a92ee61e"]]);export{ns 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.