PageSourceSearch

https://www.qhms.com/_next/static/chunks/pages/auth/profile-e7300c2df529b301.js

js qhms.com collected 2026-10-02 05:57:08 UTC 49,107 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4548],{11373:(e,n,i)=>{"use strict";i.d(n,{A:()=>t});var l=i(14232),a=i(13743),s=i(37876),r=(0,l.forwardRef)(function(e,n){var i=e.title,l=e.required,r=e.onChange,t=e.onBlur,o=e.name,c=e.error,d=e.errorMsg,m=void 0===d?"":d,u=e.className,h=e.placeholder,f=e.type;return(0,s.jsxs)(a.A.Group,{className:void 0===u?"":u,children:[i&&(0,s.jsx)(a.A.Label,{className:"field-title",children:i}),(0,s.jsx)(a.A.Control,{className:"contactus-field ".concat(c?"is-invalid":""),type:(void 0===f?"text":f)||"text",required:void 0!==l&&l,name:o,ref:n,onChange:r,onBlur:t,placeholder:void 0===h?"":h}),m&&(0,s.jsx)("div",{className:"invalid-feedback",children:m})]})});r.displayName="FormInput";let t=r},18439:(e,n,i)=>{"use strict";i.d(n,{A:()=>c});var l=i(74735),a=i(89099),s=i(14232),r=i(13743),t=i(37876),o=(0,s.forwardRef)(function(e,n){var i=e.title,o=e.placeholder,c=void 0===o?"":o,d=e.required,m=e.onChange,u=e.onBlur,h=e.name,f=e.value,p=e.error,x=e.errorMsg,v=void 0===x?"":x,j=e.data,N=void 0===j?[]:j,g=e.cmsData,b=void 0!==g&&g,k=e.commonData,A=void 0!==k&&k,y=(0,a.useRouter)().locale,C=(0,s.useMemo)(function(){return(0,l.Ns)(y)},[y]),w=(0,s.useCallback)(function(e,n){return n&&n[e+C]||""},[C]);return(0,t.jsxs)(r.A.Group,{children:[i&&(0,t.jsx)(r.A.Label,{className:"field-title",children:i}),(0,t.jsxs)("div",{className:"select-wrapper",children:[(0,t.jsxs)(r.A.Select,{className:"contactus-field ".concat(p?"is-invalid":""),"aria-label":"",required:void 0!==d&&d,name:h,value:f,ref:n,onChange:m,onBlur:u,children:[c&&(0,t.jsxs)("option",{value:"",children:[" ",c]}),null==N?void 0:N.map(function(e){return(0,t.jsx)("option",{value:e.id,disabled:e.disabled,children:b||A?e.title:(0,l.c)(w("name",e))},e.key||e.id)})]}),(0,t.jsx)("div",{className:"select-arrow"}),v&&(0,t.jsx)("div",{className:"invalid-feedback",children:v})]})]})});o.displayName="FormSelect";let c=o},19941:(e,n,i)=>{"use strict";i.r(n),i.d(n,{__N_SSG:()=>$,default:()=>ee});var l=i(63857),a=i(85572),s=i(60180),r=i.n(s),t=i(8145),o=i.n(t),c=i(32509),d=i(92950),m=i(89099),u=i(14232),h=i(91238),f=i.n(h),p=i(76951),x=i(5e4),v=i(36575),j=i(10841),N=i.n(j),g=i(37137),b=i(20459),k=i(14312),A=i(43028),y=i.n(A),C=i(85805),w=i(37876);let Y=function(e){var n,i,a,s,t,h,f,j=e.data,A=e.user,Y=e.status,M=e.reloadList,S=(0,d.Bd)(["common","home","profile","ebooking"]).t,P=(0,c.A)().updateToken,T=(0,m.useRouter)().locale,O=(0,u.useRef)(null),E=N()(j.startTime),D=(0,u.useState)(!1),L=D[0],I=D[1],B=(0,u.useState)(null),q=B[0],G=B[1],R=(0,u.useState)(!1),W=R[0],F=R[1],U=(0,u.useState)(!1),z=U[0],H=U[1],V=(0,u.useState)(!1),Z=V[0],K=V[1],X=(0,u.useState)(!1),J=(X[0],X[1]),Q=[{id:"Male",title:S("profile:male")},{id:"Female",title:S("profile:female")},{id:"NA",title:S("profile:preferredNotToSay")}];(0,u.useEffect)(function(){$()?K(!0):K(!1)},[]);var _=function(){J(!0);var e=O.current,n=new k.Ay({orientation:"p",unit:"pt",format:[597,842]}),i=n.internal.pageSize.getWidth()-56,l=n.internal.pageSize.getHeight()-140;y()(e,{width:710,height:980}).then(function(e){var a=e.toDataURL("image/png");n.addImage("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXwAAABcCAMAAABa4v56AAAApVBMVEVHcEwBcb4AecgAecgAecgAecgAecgAecgAecgAecgAecg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EbeEOwYnbV27FGJyub1OJZWDtcmPD5aEUQeGcETsEk5TwHzl6TzQXXqWURa+nAEVEIqu2cv6Q2MCaqdkIzoXvKorBcAzvq0CvOnmy/HhMtDIsRI0M1zgCcFXZ5cJBLJ2FP6Tx2i0c65MYUq4syJiGwNzF+dkOx6/OJWyOOUSpgv3hfqR3MlOwASa5j6MltMlRlKQH324JA+OiUvVALZEL2YgaNNcpX81V09WC6T6YlrE8IW6dZHUyohz9VUwHxLAfPBPtxzzyR1em4ugLXjFj6fNo6EuD11OKVPGXsaWKouDnnzO1cfTmYPWDvn4MCSbSZ2AVsmhEWj+Sbzu0XzGcuxYVT2ZEqndp4Eb6f/w61ilP1p9KiudW4D8ZvqpnUsd3jpOLbqmHm7fLoc/2xBES4JM9uy7Ow4kRrpe30I7lrxt3fTI7Dbsz1Vl4ePBrGwTE2/y4ZXLaeoxmuLph8lhStfvIAtE0Jdf3Va8/321KqEWB8vgyl0Z9B/17EfpVHpmShPt4x8lm+Cn0aUbeo4SeLaUP2SSgrH9JLx9/24xhyEMb5a7g/Sj6qldbQTQt8fdWd17ck65SXBwv8I1n/8/O/uY9w8DC8KC1u+Aa5zyf16qWxBBufjj4cPw91rHOKoul4yxx685/iMvlMbBj7fmDqKuf18HG7A4+PPzw/Gh83uuwMO3j4pfd8vk32Ne60vnx6+fn349GX3Yfut4z9xOZlqKGxiYwAAAABJRU5ErkJggg==","png",30,20,127,31),n.addImage(a,"PNG",30,70,i,l),n.save("confirmation-letter.pdf"),J(!1)})};function $(){return E.diff(N()(),"seconds")/3600>=24}function ee(){return(ee=(0,l.A)(r().mark(function e(n){var i,l,a,s,t,c;return r().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o().post("/api/auth/e-booking",{type:"getAppointment",token:A.token,refreshToken:A.refreshToken,params:{appointmentId:n},locale:T});case 2:null!=(s=e.sent)&&null!=(i=s.data)&&i.newToken&&null!=s&&null!=(l=s.data)&&l.newRefreshToken&&P(null==s||null==(t=s.data)?void 0:t.newToken,null==s||null==(c=s.data)?void 0:c.newRefreshToken),G(null==s||null==(a=s.data)||null==(a=a.data)?void 0:a.result);case 5:case"end":return e.stop()}},e)}))).apply(this,arguments)}function en(e){return ei.apply(this,arguments)}function ei(){return(ei=(0,l.A)(r().mark(function e(n){var i,l,a,s,t,c;return r().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(F(!1),!$()){e.next=8;break}return e.next=4,o().post("/api/auth/e-booking",{type:"cancelAppointment",token:A.token,refreshToken:A.refreshToken,params:{},appointmentId:n,locale:T});case 4:null!=(l=e.sent)&&null!=(i=l.data)&&i.success&&(null!=l&&null!=(a=l.data)&&a.newToken&&null!=l&&null!=(s=l.data)&&s.newRefreshToken&&P(null==l||null==(t=l.data)?void 0:t.newToken,null==l||null==(c=l.data)?void 0:c.newRefreshToken),K(!1),M()),e.next=10;break;case 8:H(!0),K(!1);case 10:case"end":return e.stop()}},e)}))).apply(this,arguments)}return(0,w.jsxs)("div",{className:"booking-item ".concat(["noshow","cancelled","rejected"].includes(j.appointmentStatusCode)?"
1noshow":"confirmed"),children:[(0,w.jsxs)("div",{className:"caption",children:[(0,w.jsx)("div",{children:(0,w.jsx)("span",{className:"title practitioner",children:j.practitioner})}),(0,w.jsxs)("div",{className:"mt-3",children:[(0,w.jsx)("div",{className:"practitioner",children:"CDCC-Lab/ECG"===j.specialty?S("ebooking:cdccLabDescription"):j.specialty}),(0,w.jsx)("div",{className:"location mt-1",children:j.location})]})]}),(0,w.jsxs)("div",{className:"details mt-2",children:[(0,w.jsx)("div",{className:"d-flex justify-content-end mb-4 text-primary booking-action-clickable",children:Z&&["confirmed","pending"].includes(Y)&&(0,w.jsx)("div",{className:"d-inline booking-action-clickable",onClick:function(){var e;en(null!=(e=j.appointmentId)?e:j.id)},children:(0,w.jsx)("span",{className:"link text-decoration-underline",children:S("profile:CancelBooking")})})}),(0,w.jsxs)("div",{className:"row",children:[(0,w.jsxs)("div",{className:"col-12 col-lg-6 d-flex",children:[(0,w.jsxs)("div",{className:"booking-label-min-width",children:[S("profile:date"),":"]}),(0,w.jsx)("div",{children:E.format("DD/MM/YYYY")})]}),(0,w.jsxs)("div",{className:"col-12 col-lg-6 d-flex",children:[(0,w.jsxs)("div",{className:"booking-label-min-width",children:[S("profile:time"),":"]}),(0,w.jsx)("div",{children:E.locale(T).format("hh:mm A").toString().toLowerCase()})]}),(0,w.jsxs)("div",{className:"col-12 d-flex mt-3",children:[(0,w.jsxs)("div",{className:"booking-label-min-width",children:[S("profile:BookingNo"),":"]}),(0,w.jsx)("span",{children:j.referenceNumber})]}),(0,w.jsx)("div",{className:"col-12 d-flex mt-3 justify-content-end",children:(0,w.jsx)("span",{className:"border border-1 border-secondary p-1 rounded text-secondary",children:j.appointmentStatus})}),["noshow","cancelled","rejected"].includes(j.appointmentStatusCode)&&(0,w.jsxs)("div",{children:[(0,w.jsx)("hr",{}),(0,w.jsx)("div",{children:(0,w.jsxs)("span",{className:"pe-1",children:[S("profile:reason"),":"," ",j.reason&&j.reason.length>0&&(0,w.jsx)("span",{children:j.reason})]})})]}),(0,w.jsx)("div",{className:"col-12 text-end mt-4 link",children:(0,w.jsxs)("div",{className:"d-inline booking-action-clickable",onClick:(n=(0,l.A)(r().mark(function e(n){return r().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:I(!L),L||function(e){ee.apply(this,arguments)}(j.id);case 2:case"end":return e.stop()}},e)})),function(e){return n.apply(this,arguments)}),children:[(0,w.jsx)("span",{className:"pe-2",children:S("profile:ShowDetails")}),(0,w.jsx)(v.FontAwesomeIcon,{icon:L?x.Os8:x.q5A,className:"booking-icon-lg"})]})}),(0,w.jsxs)("div",{className:"col-12 details-section ".concat(L?"d-flex":"d-none"),children:[null==q&&(0,w.jsx)("div",{className:"container d-flex justify-content-center mt-4",children:(0,w.jsx)("div",{className:"spinner-border",children:(0,w.jsx)("span",{className:"sr-only"})})}),q&&(0,w.jsxs)("div",{className:"container p-0 pb-5",children:[((null==(i=q.referenceNumber)?void 0:i.startsWith("EB-WHCU"))||(null==(a=q.referenceNumber)?void 0:a.startsWith("EB-DHC")))&&(0,w.jsx)("div",{className:"row",children:(0,w.jsx)("div",{className:"print-confirmation-letter-btn",onClick:function(){return _()},children:S("ebooking:downloadBookingConfirmation")})}),(0,w.jsx)("div",{className:"row",children:(0,w.jsx)("div",{className:"col-12 mt-2 mb-1",children:(0,w.jsx)("h5",{className:"text-dark fw-bold",children:S("profile:PatientInformation")})})}),(0,w.jsxs)("div",{className:"row border-bottom",children:[(0,w.jsxs)("div",{className:"col-6",children:[(0,w.jsx)("div",{className:"text-secondary",children:S("profile:FamilyMember")}),(0,w.jsx)("div",{className:"text-dark my-2",children:null==q?void 0:q.patientFamilyMember})]}),(0,w.jsxs)("div",{className:"col-6",children:[(0,w.jsx)("div",{className:"text-secondary",children:S("profile:gender")}),(0,w.jsx)("div",{className:"text-dark my-2",children:null!=(s=null==(t=Q.find(function(e){return e.id===(null==q?void 0:q.patientGender)}))?void 0:t.title)?s:S("profile:preferredNotToSay")})]})]}),(0,w.jsxs)("div",{className:"row mt-1 border-bottom",children:[(0,w.jsxs)("div",{className:"col-6",children:[(0,w.jsx)("div",{className:"text-secondary",children:S("profile:EnglishName")}),(0,w.jsx)("div",{className:"text-dark my-2",children:null==q?void 0:q.patientEngName})]}),(0,w.jsxs)("div",{className:"col-6",children:[(0,w.jsx)("div",{className:"text-secondary",children:S("profile:chineseName")}),(0,w.jsx)("div",{className:"text-dark my-2",children:null==q?void 0:q.patientName})]})]}),(0,w.jsxs)("div",{className:"row mt-1 border-bottom",children:[(0,w.jsxs)("div",{className:"col-6",children:[(0,w.jsx)("div",{className:"text-secondary",children:S("profile:email")}),(0,w.jsx)("div",{className:"text-dark my-2 booking-break-word",title:null==q?void 0:q.patientEmail,children:null==q?void 0:q.patientEmail})]}),(0,w.jsxs)("div",{className:"col-6",children:[(0,w.jsx)("div",{className:"text-secondary",children:S("profile:mobile")}),(0,w.jsx)("div",{className:"text-dark my-2",children:null==q?void 0:q.patientPhoneNo})]})]})]})]})]})]}),(0,w.jsxs)(g.A,{show:W,onHide:function(){return F(!1)},animation:!1,centered:!0,children:[(0,w.jsx)(g.A.Header,{closeButton:!0}),(0,w.jsxs)(g.A.Body,{className:"mx-auto",children:[(0,w.jsx)("div",{className:"fs-6 pb-3",children:(0,w.jsx)(p.A,{text:S("profile:ConfirmCancelAppointment")})}),(0,w.jsxs)("div",{className:"booking-form-confirm-dialog-button-group",children:[(0,w.jsx)(b.A,{className:"submit-btn",onClick:function(){en(j.id)},children:S("profile:yes")}),(0,w.jsx)(b.A,{className:"cancel-btn",onClick:function(){F(!1)},children:S("profile:no")})]})]})]}),(0,w.jsxs)(g.A,{show:z,onHide:function(){return H(!1)},animation:!1,centered:!0,children:[(0,w.jsx)(g.A.Header,{closeButton:!0}),(0,w.jsxs)(g.A.Body,{className:"mx-auto",children:[(0,w.jsx)("div",{className:"fs-6 pb-3",children:(0,w.jsx)(p.A,{text:S("profile:AppointmentCancelRejectMessage")})}),(0,w.jsx)("div",{className:"booking-form-confirm-dialog-button-group",children:(0,w.jsx)(b.A,{className:"submit-btn",onClick:function(){H(!1)},children:S("profile:confirm")})})]})]}),q&&((null==(h=q.referenceNumber)?void 0:h.startsWith("EB-WHCU"))||(null==(f=q.referenceNumber)?void 0:f.startsWith("EB-DHC")))&&(0,w.jsx)("div",{ref:O,className:"ebooking-result-pdf",children:(0,w.jsx)(C.A,{locale:T,appointmentData:q,creationTime:j.creationTime,remark:j.remark})})]})};var M=i(11373),S=i(18439);let P=function(e){(0,a.A)(e);var n,i=(0,d.Bd)(["common","home","profile"]).t,s=(0,m.useRouter)().locale,t=(0,c.A)(),h=t.user,p=t.updateToken,x=h.isLoading,v=h.isLoggedIn;h.token,h.refreshToken;var j=(0,u.useState)("confirmed"),N=j[0],g=j[1],b=(0,u.useState)(null),k=b[0],A=b[1],y=(0,u.useState)(1),C=y[0],P=y[1],T=(0,u.useState)(0),O
1=T[0],E=T[1],D=(0,u.useState)(5),L=D[0],I=D[1],B=(0,u.useState)(""),q=B[0],G=B[1],R=(0,u.useState)(""),W=R[0],F=R[1],U=[{title:i("profile:filterName"),id:"chineseName"},{title:i("profile:filterEngName"),id:"engName"},{title:i("profile:filterMobile"),id:"phoneNo"}],z=[{name:i("profile:confirmed"),status:"confirmed"},{name:i("profile:pending"),status:"pending"},{name:i("profile:rejected"),status:"rejected"}],H=function(e){g(e),P(1)},V=function(){P(1),Z(N,1,L)},Z=(n=(0,l.A)(r().mark(function e(n,i,l){var a,t,c,d,m,u,f,x,v,j;return r().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return A(null),u={confirmed:"getUserBookingConfirmed",pending:"getUserBookingPending",rejected:"getUserBookingRejected"},f={Page:i,PageSize:l,name:"",engName:"",phoneNo:""},W&&("chineseName"===q?f.name=W:"engName"===q?f.engName=W:"phoneNo"===q&&(f.phoneNo=W)),e.next=6,o().post("/api/auth/e-booking",{type:u[n],refreshToken:h.refreshToken,params:f,locale:s});case 6:null!=(x=e.sent)&&null!=(a=x.data)&&a.newToken&&null!=x&&null!=(t=x.data)&&t.newRefreshToken&&p(null==x||null==(v=x.data)?void 0:v.newToken,null==x||null==(j=x.data)?void 0:j.newRefreshToken),A(null),P(1),E(0),A(null==x||null==(c=x.data)||null==(c=c.data)?void 0:c.result),P(null==x||null==(d=x.data)||null==(d=d.data)||null==(d=d.result)?void 0:d.currentPage),E(null==x||null==(m=x.data)||null==(m=m.data)||null==(m=m.result)?void 0:m.pageCount),window.scrollTo(0,0);case 15:case"end":return e.stop()}},e)})),function(e,i,l){return n.apply(this,arguments)});return(0,u.useEffect)(function(){!x&&v&&Z(N,C,L)},[x,N]),(0,w.jsxs)("div",{className:"profile-navigation",children:[(0,w.jsx)("p",{className:"form-section-title",children:i("profile:EBookingStatus")})," ",(0,w.jsxs)("div",{className:"profile-form-container",children:[(0,w.jsx)("div",{className:"profile-booking-status-container",children:z.map(function(e,n){return(0,w.jsx)("div",{className:"profile-booking-status ".concat(e.status===N?"active":""),onClick:function(){return H(e.status)},children:e.name},n)})}),(0,w.jsxs)("div",{className:"row profile-booking-filter-container",children:[(0,w.jsx)("div",{className:"col-lg-4 col-md-4 col-6",children:(0,w.jsx)(S.A,{className:"form-select form-select-xs mb-3",data:U,commonData:!0,onChange:function(e){var n=e.target.value;console.log(n),G(n)}})}),(0,w.jsx)("div",{className:"col-lg-4 col-md-4 col-6",children:(0,w.jsx)(M.A,{onChange:function(e){var n=e.target.value;console.log(n),F(n)}})}),(0,w.jsx)("div",{className:"col-lg-3 col-md-4 col-12 mt-md-0 mt-3",children:(0,w.jsx)("div",{className:"btn next-btn w-100 ".concat(x?"booking-cursor-not-allowed":"booking-action-clickable"),onClick:function(){return!x&&V()},children:i("profile:filterSearch")})})]}),(0,w.jsxs)("div",{className:"profile-booking-page-size",children:[(0,w.jsx)("div",{className:"page-size-label",children:i("profile:filterPageSize")}),(0,w.jsx)("div",{className:"select-field",children:(0,w.jsx)(S.A,{className:"form-select form-select-xs select-field",data:[{title:5,id:5},{title:10,id:10},{title:20,id:20},{title:50,id:50}],commonData:!0,onChange:function(e){var n=e.target.value;console.log(n),I(n),P(1),Z(N,1,n)}})})]}),(0,w.jsxs)("div",{className:"profile-booking-item-list",children:[(null==k?void 0:k.totalCount)>0&&k.items.map(function(e,n){return(0,w.jsx)(Y,{data:e,user:h,status:N,reloadList:function(){Z(N,C,L)}},n)}),k&&O>1&&(0,w.jsx)("div",{className:"mb-4",children:(0,w.jsx)(f(),{previousLabel:"",nextLabel:"",pageClassName:"page-item",pageLinkClassName:"square-dot",previousClassName:"prev-paging-icon",previousLinkClassName:"",nextClassName:"next-paging-icon",nextLinkClassName:"",breakLabel:"...",breakClassName:"page-item",breakLinkClassName:"square-dot",activeClassName:"slick-active",containerClassName:"slick-dots square-paging-wrapper",forcePage:C-1,pageCount:O,marginPagesDisplayed:2,pageRangeDisplayed:3,onPageChange:function(e){Z(N,e.selected+1,L)}})}),(null==k?void 0:k.totalCount)==0&&(0,w.jsxs)("div",{className:"d-flex justify-content-center mt-4",children:["(",i("profile:NoRecord"),")"]}),null==k&&(0,w.jsx)("div",{className:"d-flex justify-content-center mt-4",children:(0,w.jsx)("div",{className:"spinner-border",role:"status",children:(0,w.jsx)("span",{className:"sr-only"})})})]})]})]})};var T=i(84330);let O=function(e){var n=e.currentPage,i=void 0===n?1:n,l=e.changePage,a=void 0===l?function(){return null}:l,s=(0,d.Bd)(["common","home","profile"]).t,r=(0,m.useRouter)(),t=(0,u.useContext)(T.GlobalContext).changeLoginUser,o=function(){localStorage.removeItem("access_token"),localStorage.removeItem("refresh_token"),t({isLoggedIn:!1,userName:null}),r.push("/")};return(0,w.jsxs)("div",{className:"profile-navigation",children:[(0,w.jsx)("p",{className:"form-section-title",children:s("profile:account")}
1),(0,w.jsxs)("div",{className:"profile-navigation-container p-4",children:[(0,w.jsxs)("div",{className:"profile-navigation-item mb-3",onClick:function(){return a(1)},children:[(0,w.jsx)("div",{className:"item-icon",children:(0,w.jsx)(v.FontAwesomeIcon,{icon:x.bkH,color:1==i?"red":"grey"})}),(0,w.jsxs)("div",{children:[s("profile:PersonalInfo"),1==i]})]}),(0,w.jsxs)("div",{className:"profile-navigation-item mb-3",onClick:function(){return a(2)},children:[(0,w.jsx)("div",{className:"item-icon",children:(0,w.jsx)(v.FontAwesomeIcon,{icon:x.okg,color:2==i?"red":"grey"})}),(0,w.jsxs)("div",{children:[s("profile:EBookingStatus"),2==i]})]}),(0,w.jsxs)("div",{onClick:function(){return o()},className:"profile-navigation-item logout",children:[(0,w.jsx)("div",{className:"item-icon",children:(0,w.jsx)(v.FontAwesomeIcon,{icon:x.GxD})}),(0,w.jsx)("div",{children:s("profile:logout")})]})]})]})};var E=i(42969),D=i(35741),L=i(50337),I=i(13216),B=i(84519),q=i(89149),G=i(13743),R=i(257),W=i(75625),F=i(39091);function U(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);n&&(l=l.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),i.push.apply(i,l)}return i}function z(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?U(Object(i),!0).forEach(function(n){(0,E.A)(e,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):U(Object(i)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))})}return e}let H=function(e){(0,a.A)(e);var n,i,s,t,h,f,j,k,A,y,C=(0,u.useContext)(T.GlobalContext).changeLoginUser,Y=(0,d.Bd)(["common","home","profile"]).t,P=(0,m.useRouter)().locale,O=[{id:"Male",title:Y("profile:male")},{id:"Female",title:Y("profile:female")},{id:"NA",title:Y("profile:preferredNotToSay")}],U=F.Ik().shape({firstName:F.Yj().required(Y("profile:PleaseInputFirstName")),lastName:F.Yj().required(Y("profile:PleaseInputSurname")),chineseName:F.Yj(),gender:F.Yj().required(Y("profile:PleaseSelectGender")),mobileNumber:F.Yj().required(Y("profile:PleaseInputMobileNumber")),mobileNumberAreaCode:F.Yj().required(Y("profile:PleaseInputCountryCode")),email:F.Yj().required(Y("profile:PleaseInputEmail")).email(Y("profile:EmailIsInvalid"))}),H=(0,c.A)(),V=H.user,Z=H.updateToken,K=H.updateUser,X=H.refreshMedicalCards,J=V.firstName,Q=V.lastName,_=V.chineseName,$=V.email,ee=V.gender,en=V.mobileNumber,ei=V.mobileNumberAreaCode,el=(V.medicalCards,V.token),ea=V.refreshToken,es=(0,u.useState)(!1),er=es[0],et=es[1],eo=(0,u.useState)(!1),ec=eo[0],ed=eo[1],em={resolver:(0,I.t)(U)},eu=(0,u.useState)(!1),eh=eu[0],ef=eu[1],ep=(0,u.useState)(null),ex=ep[0],ev=ep[1],ej=(0,u.useState)(!1),eN=ej[0],eg=ej[1],eb=(0,u.useState)(!1),ek=eb[0],eA=eb[1],ey=(0,u.useState)(""),eC=ey[0],ew=ey[1],eY=(0,u.useState)(""),eM=eY[0],eS=eY[1],eP=(0,u.useRef)(),eT=(0,W.mN)(em),eO=eT.register,eE=eT.formState,eD=eT.setValue,eL=(eT.watch,eT.trigger);eT.reset;var eI=eE.errors;(0,u.useEffect)(function(){if($)return eD("firstName",J||""),eD("lastName",Q||""),eD("chineseName",_||""),eD("dob",V.dobYear&&V.dobMonth?"".concat(V.dobYear,"-").concat(V.dobMonth):""),eD("dobYear",V.dobYear||""),eD("dobMonth",V.dobMonth||""),eD("email",$||""),eD("gender",ee||""),eD("mobileNumber",en||""),eD("mobileNumberAreaCode",ei||""),eS(V.dobMonth||""),ew(V.dobYear||""),eP.current=!0,function(){eP.current=!1}},[$]);var eB=function(e){var n=e.target;eD(n.name,n.value)},eq=(n=(0,l.A)(r().mark(function e(n){var i,l,a,s,t;return r().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n.target.files&&n.target.files[0])){e.next=21;break}if(console.log("upload file (prefetch): ",n.target.files),console.log("files[0]",n.target.files[0]),!(n.target.files[0].size>3145728)){e.next=6;break}return eg(!0),e.abrupt("return");case 6:return e.next=8,(0,B.bB)(n.target.files[0]);case 8:return s={url:e.sent,filename:null==(i=n.target.files[0])?void 0:i.name,mimeType:null==(l=n.target.files[0])?void 0:l.type},e.next=12,o().post("/api/auth/file-upload",{file:s,token:el,locale:P,uploadType:"MEDICAL_CARD"});case 12:if(console.log("file-upload result: ",t=e.sent),(null==t||null==(a=t.data)?void 0:a.success)!==!0){e.next=18;break}return e.next=17,X();case 17:return e.abrupt("return");case 18:ed(Y("profile:UploadFail")),et(!0),setTimeout(function(){eP.current&&et(!1)},3e3);case 21:case"end":return e.stop()}},e)})),function(e){return n.apply(this,arguments)}),eG=(i=(0,l.A)(r().mark(function e(n){var i,l;return r().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return ev(null),e.prev=1,e.next=4,o().post("/api/auth/e-booking",{type:"deleteMedicalCard",refreshToken:ea,params:{medicalcardId:n},locale:P});case 4:console.log("deleteMedicalCard result: ",i=e.sent),i.data.success&&(l=V.medicalCards.findIndex(function(e){return e.id==n}),console.log("before: ",V.medicalCards),V.medicalCards.splice(l,1),console.log("after: ",V.medicalCards),K(V)),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(1),console.error(e.t0);case 12:case"end":return e.stop()}},e,null,[[1,9]])})),function(e){return i.apply(this,arguments)}),eR=(s=(0,l.A)(r().mark(function e(n){var i,l,a,s,t,c,d;return r().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,eL();case 2:if(e.sent){e.next=5;break}return e.abrupt("return",!1);case 5:return l={lastName:n.lastName,firstName:n.firstName,chineseName:n.chineseName,gender:n.gender,dobMonth:parseInt(N()(n.dob).month()+1)||"",dobYear:parseInt(N()(n.dob).year())||"",mobileNumberAreaCode:n.mobileNumberAreaCode,mobileNumber:n.mobileNumber},(""==eM||""==eC)&&(delete l.dobMonth,delete l.dobYear),e.next=9,o().post("/api/auth/e-booking",{type:"updateMember",refreshToken:ea,params:l,locale:P});case 9:null!=(a=e.sent)&&null!=(i=a.data)&&i.success?(null!=a&&null!=(s=a.data)&&s.newToken&&null!=a&&null!=(t=a.data)&&t.newRefreshToken&&Z(null==a||null==(c=a.data)?void 0:c.newToken,null==a||null==(d=a.data)?void 0:d.newRefreshToken),K({userName:"".concat(n.firstName," ").concat(n.lastName),firstName:n.firstName,lastName:n.lastName,chineseName:n.chineseName,dobMonth:n.dobMonth,dobYear:n.dobYear,gender:n.gender,mobileNumber:n.mobileNumber,mobileNumberAreaCode:n.mobileNumberAreaCode}),C(z(z({},V),{},(0,E.A)({userName:"".concat(n.firstName," ").concat(n.lastName),firstName:n.firstName,lastName:n.lastName,chineseName:n.chineseName,dobMonth:n.dobMonth,dobYear:n.dobYear,gender:n.gender,mobileNumber:n.mobileNumber,mobileNumberAreaCode:n.mobileNumberAreaCode,isLoggedIn:!0},"userName","".concat(n.firstName," ").concat(n.lastName)))),ed(Y("profile:Updatesuccess")),et(!0),setTimeout(function(){return et(!1)},3e3)):(ed(Y("profile:UpdateFail")),et(!0),setTimeout(function(){return et(!1)},3e3));case 11:case"end":return e.stop()}},e)})),function(e){return s.apply(this,arguments)});return(0,w.jsxs)("div",{className:"profile-form",children:[er&&(0,w.jsx)(q.A,{className:"toast",children:(0,w.jsx)(q.A.Body,{children:ec})}),(0,w.jsx)(W.Op,z(z({},eT),{},{children:(0,w.jsx)(G.A,{onSubmit:eT.handleSubmit(eR),children:(0,w.jsxs)("div",{className:"p-4 bg-white",children:[(0,w.jsxs)("div",{className:"row",children:[(0,w.jsxs)("div",{className:"col-lg-3 col-6",children:[(0,w.jsxs)("label",{htmlFor:"surname",children:["*",Y("profile:surname")]}),(0,w.jsx)(M.A,z(z({placeholder:"".concat(Y("profile:surname"))},eO("lastName")),{},{onChange:eB,error:eI.lastName,errorMsg:null==(t=eI.lastName)?void 0:t.message}))]}),(0,w.jsxs)("div",{className:"col-lg-3 col-6",children:[(0,w.jsxs)("label",{htmlFor:"firstName",children:["*",Y("profile:firstName")]}),(0,w.jsx)(M.A,z(z({className:"mb-3",placeholder:"".concat(Y("profile:firstName"))},eO("firstName")),{},{onChange:eB,error:eI.firstName,errorMsg:null==(h=eI.firstName)?void 0:h.message}))]}),(0,w.jsxs)("div",{className:"col-lg-3 col-6",children:[(0,w.jsx)("label",{htmlFor:"chineseName",children:Y("profile:chineseName")}),(0,w.jsx)(M.A,z(z({className:"mb-3",placeholder:"".concat(Y("profile:chineseName"))},eO("chineseName")),{},{onChange:eB,error:eI.chineseName,errorMsg:null==(f=eI.chineseName)?void 0:f.message}))]}),(0,w.jsxs)("div",{className:"col-lg-3 col-6",children:[(0,w.jsxs)("label",{htmlFor:"gender",children:["*",Y("profile:gender")]}),(0,w.jsx)(S.A,z({className:"form-select form-select-xs mb-3",data:O,commonData:!0,errorMsg:null==(j=eI.gender)?void 0:j.message},eO("gender")))]}),(0,w.jsxs)("div",{className:"col-lg-4 col-12",children:[(0,w.jsx)("label",{htmlFor:"dob",children:Y("profile:dob")}),(0,w.jsxs)("div",{className:"d-flex align-items-center",children:[(0,w.jsxs)("div",{className:"ms-2",children:[eC&&eM&&(0,w.jsx)("span",{children:"".concat(eC,"-").concat(eM)}),!(eC&&eM)&&(0,w.jsx)("span",{children:"YYYY-MM"}),ek&&(0,w.jsx)("span",{className:"ms-3 text-danger booking-action-clickable",onClick:function(){eA(!1)},children:(0,w.jsx)(v.FontAwesomeIcon,{icon:x.GRI})})]}),!ek&&(0,w.jsx)("div",{children:(0,w.jsx)("div",{className:"text-primary text-decoration-underline p-2 booking-action-clickable",onClick:function(){eA(!0)},children:(0,w.jsxs)("span",{children:["(",Y("profile:update"),")"]})})})]})]}),(0,w.jsx)("div",{className:"col-lg-8 col-12 order-1 order-lg-0",children:(0,w.jsxs)("div",{className:"row",children:[(0,w.jsxs)("div",{className:"col-4",children:[(0,w.jsxs)("label",{htmlFor:"countryCode",children:["*",Y("profile:countryCode")]}),(0,w.jsx)(M.A,z(z({className:"mb-3",placeholder:"".concat(Y("profile:countryCode"))},eO("mobileNumberAreaCode")),{},{onChange:eB,error:eI.mobileNumberAreaCode,errorMsg:null==(k=eI.mobileNumberAreaCode)?void 0:k.message}))]}),(0,w.jsxs)("div",{className:"col-8",children:[(0,w.jsxs)("label",{htmlFor:"mobileNumber",children:["*",Y("profile:mobile")]}),(0,w.jsx)(M.A,z(z({className:"mb-3",placeholder:"".concat(Y("profile:mobile"))},eO("mobileNumber")),{},{onChange:eB,error:eI.mobileNumber,errorMsg:null==(A=eI.mobileNumber)?void 0:A.message}))]})]})}),(0,w.jsx)("div",{className:"col-12",children:ek&&(0,w.jsx)("div",{className:"mb-4",children:(0,w.jsx)(R.Ay,{className:"".concat(ek?"":"d-none"),tileClassName:"profile-calendar",maxDetail:"year",locale:P,defaultView:"year",defaultActiveStartDate:new Date(eC||2e3,eM||1,1),onChange:function(e,n){eA(!1);var i=N()(e);
1eD("dob",i.format("YYYY-MM")),eD("dobYear",i.year()),eD("dobMonth",i.month()+1),ew(i.year()),eS(i.month()+1),console.log("dob picked: ",i.format("YYYY-MM"))}})})}),(0,w.jsxs)("div",{className:"col-lg-6 col-12 order-2 order-lg-0",children:[(0,w.jsxs)("label",{htmlFor:"email",children:["*",Y("profile:email")]}),(0,w.jsx)("div",{className:"ms-2 mt-2",children:$}),(0,w.jsx)(M.A,z(z({disabled:!0,className:"mb-3 forbbiden-input d-none",placeholder:"".concat(Y("profile:email"))},eO("email")),{},{error:eI.email,errorMsg:null==(y=eI.email)?void 0:y.message}))]})]}),(0,w.jsx)("div",{className:"mt-4"}),(0,w.jsxs)("label",{htmlFor:"card",children:[Y("profile:UploadCard")," ",Y("profile:uploadMedicalCardMessage")]}),(0,w.jsx)("br",{}),!$&&(0,w.jsx)("div",{className:"ms-3 mt-3",children:(0,w.jsx)("div",{className:"spinner-border",children:(0,w.jsx)("span",{className:"sr-only"})})}),$&&(0,w.jsxs)("div",{className:"d-flex mt-2 medical-card-list",children:[V.medicalCards.map(function(e,n){return e.imageUri.indexOf("/getpdf/")>=0?(0,w.jsxs)("div",{className:"medical-card d-flex justify-content-center align-items-center",children:[(0,w.jsx)("span",{className:"close",onClick:function(){ef(!0),ev(e)},children:"\xd7"}),(0,w.jsxs)("span",{className:"text-danger booking-action-clickable",onClick:function(){window.open(e.imageUri)},children:[" ",(0,w.jsx)(v.FontAwesomeIcon,{icon:x.O_q,className:"booking-icon-md"})]})]},n):(0,w.jsxs)("div",{className:"medical-card",children:[e.imageUri&&(0,w.jsx)(D.A,{src:e.imageUri,layout:"fill",objectFit:"contain",imageClass:"medical-card-image",unoptimized:!0}),(0,w.jsx)("span",{className:"close",onClick:function(){ef(!0),ev(e)},children:"\xd7"})]},n)}),V.medicalCards.length<3&&(0,w.jsxs)("div",{children:[(0,w.jsx)("div",{className:"medical-card-upload",onClick:function(){document.querySelector("[name=upload-medical-card]").click()}}),(0,w.jsx)("input",{className:"d-none",name:"upload-medical-card",type:"file",onInput:function(e){eq(e),e.target.value=null},accept:".jpg, .jpeg, .png, .gif, .bmp"})]})]}),$&&(0,w.jsx)("div",{className:"btn-container mt-4",children:(0,w.jsx)(L.$n,{text:Y("profile:confirm"),className:"confirm-btn btn q-btn rounded-pill",type:"submit",rounded:!0,size:"sm",color:"light",fullWidth:!0})})]})})})),(0,w.jsxs)(g.A,{show:eh,onHide:function(){return ef(!1)},size:"md",centered:!0,children:[(0,w.jsx)(g.A.Header,{closeButton:!0}),(0,w.jsxs)(g.A.Body,{className:"mx-auto",children:[(0,w.jsx)("div",{className:"fs-6 pb-3",children:(0,w.jsx)(p.A,{text:Y("profile:ConfirmDeleteMedicalCard")})}),(0,w.jsxs)("div",{className:"booking-form-confirm-dialog-button-group",children:[(0,w.jsx)(b.A,{className:"submit-btn",onClick:function(){console.log("deleteMedicalCard: ",ex.id),eG(ex.id),ef(!1)},children:Y("profile:yes")}),(0,w.jsx)(b.A,{className:"cancel-btn",onClick:function(){ef(!1),ev(!1)},children:Y("profile:no")})]})]})]}),(0,w.jsxs)(g.A,{show:eN,onHide:function(){return eg(!1)},size:"md",centered:!0,children:[(0,w.jsx)(g.A.Header,{closeButton:!0}),(0,w.jsxs)(g.A.Body,{className:"mx-auto",children:[(0,w.jsx)("div",{className:"fs-6 pb-3",children:(0,w.jsx)(p.A,{text:Y("profile:ReachFileSizeLimit")})}),(0,w.jsx)("div",{className:"booking-form-confirm-dialog-button-group",children:(0,w.jsx)(b.A,{className:"submit-btn",onClick:function(){eg(!1)},children:Y("profile:confirm")})})]})]})]})},V=function(e){(0,a.A)(e);var n=(0,d.Bd)(["profile"]).t;return(0,w.jsxs)("div",{className:"profile-navigation",children:[(0,w.jsx)("p",{className:"form-section-title",children:n("profile:MyProfile")})," ",(0,w.jsx)("div",{className:"profile-form-container",children:(0,w.jsx)(H,{})})]})};var Z=i(91935),K=i(9754),X=i(94870),J=i(16668),Q=i(21970),_=i(37626),$=!0;let ee=function(){var e=(0,J.A)().isMobile,n=(0,_.B)(["common","home","profile","ebooking"]).t,i=(0,m.useRouter)(),l=(0,c.A)(),a=l.user;l.updateToken;var s=a.isLoading,r=a.isLoggedIn,t=(0,u.useState)("loading"),o=t[0],d=t[1],h=(0,u.useState)("/auth/profile?page=booking"===i.asPath?2:1),f=h[0],p=h[1];return(0,u.useEffect)(function(){s||(r?d("loggedIn"):d("unauthorized"))},[s]),(0,u.useEffect)(function(){p("/auth/profile?page=booking"===i.asPath?2:1)},[i.asPath]),(0,w.jsxs)(K.A,{children:[(0,w.jsx)(X.A,{}),(0,w.jsx)("div",{className:"profile-page",children:(0,w.jsx)(Q.A,{className:"py-lg-5 py-4",children:(0,w.jsx)("div",{className:"ebooking-content-container",children:"loading"===o?(0,w.jsxs)("div",{className:"text-center",children:[(0,w.jsx)("div",{className:"mb-4",children:(0,w.jsx)("div",{className:"spinner-border",children:(0,w.jsx)("span",{className:"sr-only"})})}),(0,w.jsx)("h1",{children:n("ebooking:loading")})]}):"unauthorized"===o?(0,w.jsx)(Z.A,{}):(0,w.jsxs)("div",{className:"row",children:[!e&&(0,w.jsx)("div",{className:"navigation-container col-4",children:(0,w.jsx)(O,{currentPage:f,changePage:function(e){p(e),i.push({pathname:"/auth/profile",query:{page:1===e?"profile":"booking"}},void 0,{shallow:!0})}})}),(0,w.jsxs)("div",{className:"profile-container col-sm-12 col-md-12 col-lg-8",children:[1==f&&(0,w.jsx)(V,{}),2==f&&(0,w.jsx)(P,{})]})]})})})})]})}},50337:(e,n,i)=>{"use strict";i.d(n,{$n:()=>p,K0:()=>x,z9:()=>v});var l=i(42969),a=i(59860),s=i(14232),r=i(48230),t=i.n(r),o=i(20459),c=i(36575),d=i(37876),m=["rounded","color","onClick","text","btnClass","size","fullWidth"],u=["rounded","color","onClick","text","icon","btnClass","size","fullWidth"];function h(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);n&&(l=l.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),i.push.apply(i,l)}return i}function f(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};
1n%2?h(Object(i),!0).forEach(function(n){(0,l.A)(e,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):h(Object(i)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))})}return e}var p=(0,s.memo)(function(e){var n=e.rounded,i=e.color,l=e.onClick,s=e.text,r=e.btnClass,t=e.size,c=e.fullWidth,u=(0,a.A)(e,m);return(0,d.jsx)(o.A,f(f({onClick:void 0===l?function(){return null}:l,className:"btn q-btn ".concat(void 0!==n&&n?"rounded-pill":""," ").concat(void 0===i?"default":i," ").concat(void 0===t?"md":t," ").concat(void 0!==c&&c?"fluid":""," ").concat(void 0===r?"":r)},u),{},{children:void 0===s?"":s}))});p.displayName="Button";var x=(0,s.memo)(function(e){var n=e.rounded,i=e.color,l=e.onClick,s=e.text,r=e.icon,t=void 0===r?null:r,m=e.btnClass,h=e.size,p=e.fullWidth,x=(0,a.A)(e,u);return(0,d.jsxs)(o.A,f(f({onClick:void 0===l?function(){return null}:l,className:"btn q-btn icon-btn ".concat(void 0!==n&&n?"rounded-pill":""," ").concat(void 0===i?"default":i," ").concat(void 0===h?"md":h," ").concat(void 0!==p&&p?"fluid":""," ").concat(void 0===m?"":m)},x),{},{children:[t&&(0,d.jsx)(c.FontAwesomeIcon,{icon:t}),void 0===s?"":s]}))});x.displayName="IconButton";var v=(0,s.memo)(function(e){var n=e.rounded,i=e.color,l=e.onClick,a=e.text,s=e.url,r=e.btnClass,o=e.size,c=e.fullWidth,m=e.newTab;return(0,d.jsx)(t(),{href:void 0===s?"#":s,passHref:!0,legacyBehavior:!0,children:(0,d.jsx)("a",{className:"btn q-btn link-btn ".concat(void 0!==n&&n?"rounded-pill":""," ").concat(void 0===i?"default":i," ").concat(void 0===o?"md":o," ").concat(void 0!==c&&c?"fluid":""," ").concat(void 0===r?"":r),onClick:void 0===l?function(){return null}:l,target:void 0!==m&&m?"_blank":void 0,children:void 0===a?"":a})})});v.displayName="LinkButton",(0,s.memo)(function(e){var n=e.color,i=e.onClick,l=e.text,a=e.url,s=e.newTab;return(0,d.jsx)(t(),{href:void 0===a?"#":a,passHref:!0,legacyBehavior:!0,children:(0,d.jsx)("a",{className:"link-text ".concat(void 0===n?"default":n),onClick:void 0===i?function(){return null}:i,target:void 0!==s&&s?"_blank":void 0,children:void 0===l?"":l})})}).displayName="LinkText"},76951:(e,n,i)=>{"use strict";i.d(n,{A:()=>t});var l=i(14232),a=i(63261),s=i(74735),r=i(37876);let t=(0,l.memo)(function(e){var n=e.text;return n?(0,r.jsx)("div",{className:"html-wrapper",children:(0,a.Ay)((0,s.Rk)(n)||"")}):null})},85805:(e,n,i)=>{"use strict";i.d(n,{A:()=>t});var l=i(14232),a=i(10841),s=i.n(a),r=i(37876);let t=function(e){e.locale;var n=e.appointmentData,i=void 0===n?{}:n,a=e.creationTime,t=void 0===a?null:a,o=e.remark,c=void 0===o?"":o,d=(0,l.useState)([]),m=d[0],u=d[1];return(0,l.useEffect)(function(){if(c){var e=c.split("Selected Services: ");2===e.length&&u(e[1].split(", "))}},[c]),(0,r.jsxs)("div",{className:"content-container",children:[(0,r.jsxs)("div",{className:"header-padding",children:["Dear ",null==i?void 0:i.patientEngName,","]}),(0,r.jsxs)("div",{className:"row-padding",children:[(0,r.jsx)("div",{children:"Your booking has been confirmed."}),(0,r.jsx)("div",{children:"您的預約已經確認。"})]}),(0,r.jsxs)("div",{className:"row-padding",children:[(0,r.jsx)("div",{children:"Should you have any enquiries, please contact us at (+852) 8301 8301 or email us at [email protected] with your reference number."}),(0,r.jsx)("div",{children:"如有任何查詢,請附上以下參考編號,並致電(+852) 8301 8301或電郵至[email protected]"})]}),(0,r.jsxs)("div",{className:"row-padding word-bold",children:[(0,r.jsx)("div",{children:"Reference No."}),(0,r.jsx)("div",{children:"參考編號"}),(0,r.jsx)("div",{children:null==i?void 0:i.referenceNumber})]}),(0,r.jsxs)("div",{className:"row-padding",children:[(0,r.jsxs)("div",{children:["Below is the detail of booking which submitted on ",(0,r.jsx)("span",{className:"word-bold",children:t?s()(t).format("YYYY-MM-DD HH:mm"):""})]}),(0,r.jsxs)("div",{children:["以下為您於 ",(0,r.jsx)("span",{className:"word-bold",children:t?s()(t).format("YYYY-MM-DD HH:mm"):""})," 進行服務預約資料"]})]}),(0,r.jsx)("div",{className:"row-padding",children:(0,r.jsx)("table",{className:"letter-table",children:(0,r.jsxs)("tbody",{children:[(0,r.jsxs)("tr",{children:[(0,r.jsxs)("td",{className:"word-bold title-col",children:[(0,r.jsx)("div",{children:"Name of Patient"}),(0,r.jsx)("div",{children:"病人姓名"})]}),(0,r.jsx)("td",{className:"content-col",children:null==i?void 0:i.patientEngName}),(0,r.jsxs)("td",{className:"word-bold title-col",children:[(0,r.jsx)("div",{children:"Appointment Date"}),(0,r.jsx)("div",{children:"預約時間"})]}),(0,r.jsx)("td",{className:"content-col",children:null!=i&&i.startTime?s()(null==i?void 0:i.startTime).format("YYYY-MM-DD HH:mm"):""})]}),(0,r.jsxs)("tr",{children:[(0,r.jsxs)("td",{className:"word-bold title-col",children:[(0,r.jsx)("div",{children:"Practitioner"}),(0,r.jsx)("div",{children:"醫生名稱"})]}),(0,r.jsx)("td",{colSpan:3,children:null==i?void 0:i.practitioner})]}),(0,r.jsxs)("tr",{children:[(0,r.jsxs)("td",{className:"word-bold title-col",children:[(0,r.jsx)("div",{children:"Medical Center"}),(0,r.jsx)("div",{children:"醫療中心"})]}),(0,r.jsx)("td",{colSpan:3,children:(0,r.jsx)("div",{children:null==i?void 0:i.location})})]}),(0,r.jsx)("tr",{children:(0,r.jsxs)("td",{colSpan:4,children:[(0,r.jsx)("div",{children:"Booking Services:"}),(0,r.jsx)("div",{children:"預約服務:"}),(0,r.jsx)("div",{children:m.map(function(e,n){return(0,r.jsx)("div",{children:(0,r.jsx)("div",{children:e})},n)})})]})})]})})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{children:"Thank y
1ou!"}),(0,r.jsx)("div",{children:"謝謝!"})]})]})}},89467:(e,n,i)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/auth/profile",function(){return i(19941)}])},91935:(e,n,i)=>{"use strict";i.d(n,{A:()=>o});var l=i(37626),a=i(89099),s=i(32509),r=i(74735),t=i(37876);let o=function(){var e=(0,l.B)(["ebooking"]).t,n=(0,s.A)(),i=n.user;n.updateToken;var o=(0,a.useRouter)(),c=(0,r.fx)(o.locale);return(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-center",children:e(i.isExpired?"ebooking:loginExpired":"ebooking:notLoginYet")}),(0,t.jsx)("div",{className:"py-5",children:(0,t.jsx)("button",{className:"btn btn-primary m-auto",onClick:function(){return o.push("".concat(c,"&ui_locales=").concat(o.locale.toLowerCase()))},children:e("ebooking:login")})})]})}},94870:(e,n,i)=>{"use strict";i.d(n,{A:()=>m});var l=i(14232),a=i(48230),s=i.n(a),r=i(84519),t=i(35741),o=i(16668),c=i(37876),d=(0,l.memo)(function(e){var n=e.url,i=e.title;return n?(0,c.jsx)(s(),{href:n,passHref:!0,legacyBehavior:!0,children:(0,c.jsx)("a",{children:(0,c.jsx)("h2",{className:"subtitle-text h6",children:i})})}):(0,c.jsx)("h2",{className:"subtitle-text h6",children:i})});d.displayName="LinkTitle";let m=(0,l.memo)(function(e){var n=e.header,i=e.clinic,l=e.promo,a=e.isH1Title,s=(0,o.A)().isMobile;if(!n)return null;var m=n.banner,u=n.title,h=n.titleIcon,f=void 0===h?null:h,p=n.remark,x=n.subtitleLeft,v=n.subtitleRight,j=n.titlePosition,N=void 0===j?"left":j,g=n.titleColor,b=n.subtitleLeftUrl,k=n.subtitleRightUrl,A=(0,r.Gf)(m);return(0,c.jsxs)("div",{className:"page-header ".concat(void 0!==i&&i?"clinic":""," ").concat(void 0!==l&&l?"promo":""," ").concat(A?"page-header-dynamic-bg":""),children:[(0,c.jsxs)("div",{className:"container page-title-container",children:[(0,c.jsxs)("div",{className:"main-title title-font ".concat("center"===N?"justify-content-center":"right"===N?"justify-content-end":"justify-content-start"," ").concat("white"===(void 0===g?"theme":g)?"title-white":"title-theme"),children:[f&&(0,c.jsx)("div",{className:"title-icon",children:(0,c.jsx)(t.A,{image:f,width:s?50:80,height:s?50:80})})," ",void 0!==a&&a?(0,c.jsx)("h1",{children:u}):u]}),p&&(0,c.jsx)("div",{className:"header-remark",children:p}),(x||v)&&(0,c.jsxs)("div",{className:"subtitle-wrapper",children:[(0,c.jsx)("div",{className:"left-title",children:x&&(0,c.jsx)(d,{title:x,url:b})}),(0,c.jsx)("div",{className:"right-title",children:v&&(0,c.jsx)(d,{title:v,url:k})})]})]}),A&&(0,c.jsx)("style",{jsx:!0,children:'\n          .page-header-dynamic-bg {\n            background-image: url("'.concat(A,'");\n          }\n        ')})]})})}},e=>{e.O(0,[4615,2366,347,4155,6976,3261,3743,7137,1926,257,9494,3786,5119,636,6593,8792],()=>e(e.s=89467)),_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.