"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3792],{FDJX:function(e,t,a){a.d(t,{B:function(){return u},F:function(){return h},G:function(){return g},S:function(){return c},a:function(){return fetchSSOV2ApiJson},c:function(){return checkUserExist},f:function(){return fetchSSOV2Api},g:function(){return getUserInfo},h:function(){return handleAuthSuccess},l:function(){return p},r:function(){return resetPassword},u:function(){return updateUserInfo},w:function(){return m}});var i=a("+MNf"),n=a("GOBr"),o=a("mF45"),r=a("+24l"),l=a("27Mu"),s=a("nwPE"),d=a("xrdX");let c={LOGIN_BY_SOCIAL:"member/social-login",EMAIL:{REGISTER_BY_SEND_OTP:"login/login-with-email",LOGIN_BY_PASSWORD:"member/login",VERIFY_BY_OTP:"login/email-verify-code",SEND_OTP:"login/email-resend-otp-code"},PHONE:{REGISTER_BY_SEND_OTP:"login/login-with-sms",SEND_OTP:"login/sms/sent-otp",VERIFY_BY_OTP:"login/phone-verify-code",LOGIN_BY_PASSWORD:"member/login-by-phone",UPDATE_PHONE_SEND_OTP:"login/sms-social/sent-otp",UPDATE_PHONE_VERIFY_OTP:"login/sms-social/phone-verify-code"},WHATSAPP:{LOGIN_OTP_WHATSAPP:"login/login-otp-whatsapp",REGISTER_BY_SEND_OTP:"login/login-with-whatsapp",SEND_OTP:"login/whatsapp/sent-otp",UPDATE_PHONE_SEND_OTP:"login/sms-social/whatsapp/sent-otp",UPDATE_PHONE_VERIFY_OTP:"login/sms-social/whatsapp-verify-code",VERIFY_BY_OTP:"login/whatsapp-verify-code"},ZALO:{REGISTER_BY_SEND_OTP:"login/login-with-zalo",SEND_OTP:"login/zalo/sent-otp",VERIFY_BY_OTP:"login/zalo-verify-code",UPDATE_PHONE_SEND_OTP:"login/sms-social/zalo/sent-otp",UPDATE_PHONE_VERIFY_OTP:"login/sms-social/zalo-verify-code"},RESET_PASSWORD:"login/reset-password",CHECK_USER_EXIST:"member/check-user-exist",UPDATE_USER_INFO:"login/update-first-info",SETUP_USER_INFO:"login/setup-first-info",ECOM_CARE:{SEND_OTP:"login/ecom-care/send-email-otp-code",VERIFY_OTP:"login/ecom-care/email-verify-code",RESEND_OTP:"login/ecom-care/resend-email-otp-code"}},p="vi-VN",m={[s.L.Vietnam]:"1",[s.L.Indonesia]:"2",[s.L.Malaysia]:"3"}[p];r.L[p].PHONE;let getSSOV2ApiUrl=e=>(0,o.n)(`${(0,o.a)(p)}/api/v2/${e}`),getSSOApiUrl=e=>(0,o.n)(`${(0,o.a)(p)}/api/${e}`),u="hhg_user_token",fetchSSOV2Api=(e,t={},a)=>(0,i.a)(void 0,void 0,void 0,function*(){var i;let n;let o=a?"":null===(i=document.cookie.split("; ").find(e=>e.startsWith(u)))||void 0===i?void 0:i.split("=")[1];try{t.body instanceof FormData&&(t.body.append("ga_client_id",(0,l.ej)("_ga")||""),t.body.append("referrer",window.location.href)),n=yield fetch(getSSOV2ApiUrl(e),o?Object.assign(Object.assign({},t),{headers:Object.assign({Authorization:`Bearer ${o}`},null==t?void 0:t.headers)}):t)}catch(e){return console.error(e),null}return null==n?void 0:n.json()}),fetchSSOV2ApiJson=(e,t,a)=>(0,i.a)(void 0,void 0,void 0,function*(){var i;let n;let o=a?"":null===(i=document.cookie.split("; ").find(e=>e.startsWith(u)))||void 0===i?void 0:i.split("=")[1];try{n=yield fetch(getSSOV2ApiUrl(e),{method:"POST",headers:Object.assign({Accept:"application/json","Content-Type":"application/json"},o?{Authorization:`Bearer ${o}`}:{}),body:JSON.stringify(t)})}catch(e){return console.error(e),null}return null==n?void 0:n.json()}),fetchSSOApi=(e,t={},a)=>(0,i.a)(void 0,void 0,void 0,function*(){var i;let n;let o=a?"":null===(i=document.cookie.split("; ").find(e=>e.startsWith(u)))||void 0===i?void 0:i.split("=")[1];try{n=yield fetch(getSSOApiUrl(e),o?Object.assign(Object.assign({},t),{headers:Object.assign({Authorization:`Bearer ${o}`},null==t?void 0:t.headers)}):t)}catch(e){return console.error(e),null}return null==n?void 0:n.json()}),resetPassword=(e,t)=>(0,i.a)(void 0,void 0,void 0,function*(){let a=new FormData;return a.append("password",e),a.append("confirm-password",t),fetchSSOV2Api(c.RESET_PASSWORD,{method:"POST",body:a})}),checkUserExist=({email:e,phone:t})=>(0,i.a)(void 0,void 0,void 0,function*(){let a=new FormData;return e?a.append("email",e):a.append("phone_number",t),fetchSSOV2Api(c.CHECK_USER_EXIST,{method:"POST",body:a})}),updateUserInfo=e=>(0,i.a)(void 0,void 0,void 0,function*(){let t=new FormData;return Object.keys(e).forEach(a=>{let i=e[a];null!=i&&("string"!=typeof i||i.trim())&&t.append(a,e[a])}),fetchSSOV2Api(c.SETUP_USER_INFO,{method:"POST",body:t})}),g=n.y?"289442006438-040a42cbidr6v5d178f3iqi9q95821r3.apps.googleusercontent.com":"289442006438-cihobuq1h3r4426pur7u0e43fqdnep59.apps.googleusercontent.com",h="2759888574045636",getUserInfo=()=>(0,i.a)(void 0,void 0,void 0,function*(){return fetchSSOApi("user/profile",{method:"POST"})}),handleAuthSuccess=e=>{(null==e?void 0:e.token)&&(0,l.d8)(u,e.token,{domain:"localhost"===window.location.hostname?"localhost":`.${d.v[p]}`,expires:new Date(1e3*e.expire_in).toUTCString()}),(null==e?void 0:e.refresh_token)&&(0,l.d8)(r.k,e.refresh_token,{domain:"localhost"===window.location.hostname?"localhost":`.${d.v[p]}`})}},BzJP:function(e,t,a){a.d(t,{A:function(){return ArrowRightBlue},C:function(){return Clinic},D:function(){return DoctorExpertiseItem},I:function(){return InsuranceList},P:function(){return PaymentList},a:function(){return DoctorInfoExpertise}});var i=a("q1tI"),n=a("rBCA"),o=a("iBNF"),r=a("VDdh"),l=a("xXM3"),s=a.n(l),d=a("oxWm"),c=a("UldL");let ArrowRightBlue=e=>i.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 6 10",fill:"none"},e),i.createElement("path",{d:"M1 9L5 5L1 1",stroke:"#2D87F3",strokeWidth:1.75,strokeLinecap:"round",strokeLinejoin:"round"})),Clinic=e=>i.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"none"},e),i.createElement("path",{d:"M4.89646 16.9996H2.96549C2.43225 16.9996 2 16.5674 2 16.0341V12.6549C2 12.1217 2.43225 11.6895 2.96549 11.6895H4.89646",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M15.0342 11.6895H16.9652C17.4984 11.6895 17.9306 12.1217 17.9306 12.6549V16.0341C17.9306 16.5674 17.4984 16.9996 16.9652 16.9996H15.0342",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M5.86197 3H14.0686C14.6015 3 15.0341 3.43263 15.0341 3.96549V16.9995H4.89648V3.96549C4.89648 3.43263 5.32912 3 5.86197 3Z",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M11.172 13.6206H8.7583V16.9998H11.172V13.6206Z",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M9.96533 9.99996V5.65527",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M12.1377 7.82764H7.79297",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"})),p=n.Z.ul` display: grid; grid-gap: 16px; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); list-style: none; `,m=n.Z.li` p { margin-top: 8px; text-align: center; } .insuranceLogo { display: grid; height: 58px; border: 1px solid ${o.r.colors.neutral200}; border-radius: 6px; place-content: center; > img { width: 93px; height: 43px; object-fit: contain; } } `,InsuranceList=({insurances:e,className:t,isName:a=!0})=>e.length?i.createElement(p,{id:"insurance-list",className:t},e.map(e=>i.createElement(m,{className:"insuranceItem",key:e.id},i.createElement("div",{className:"insuranceLogo"},i.createElement("img",{src:e.logo,alt:e.name||"insurance-logo"})),a&&i.createElement(r.T,{size:"base",color:o.r.colors.gray500,type:"bold"},e.name)))):null,u=n.Z.div` display: flex; flex-wrap: wrap; gap: 7px; &.paymentList { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); justify-content: center; } `,g=n.Z.div` border: 1px solid ${o.r.colors.neutral100}; border-radius: 12px; width: 80px; min-height: 80px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; &.payment-item-mobile { width: 100%; } .logo { position: relative; width: 55px; aspect-ratio: 55 / 32; object-fit: contain; } .txt-caption-1 { font-size: 0.6875rem; line-height: 1rem; color: ${o.r.colors.gray800}; } `,PaymentList=({payments:e,className:t,isName:a=!0,isMobile:n=!1})=>e.length?i.createElement(u,{id:"payment-container",className:s()(t,{paymentList:n&&e.length>=4})},e.map(t=>i.createElement(g,{className:s()("payment-item",{"payment-item-mobile":n&&e.length>=4}),key:t.id},i.createElement(d.I,{className:"logo",src:t.logo,alt:t.name}),a&&i.createElement("div",{className:"txt-caption-1"},t.name)))):null,h=n.Z.div` display: flex; gap: 8px; .icon { width: 1.25rem; height: 1.25rem; color: ${o.r.colors.gray400}; flex-shrink: 0; } .doctor-info-item-content { display: flex; flex-direction: column; gap: 10px; } `;(0,n.Z)(Clinic)` width: 1.25rem; height: 1.25rem; `;let v=n.Z.div` display: flex; flex-direction: column; gap: 4px; `,DoctorExpertiseItem=e=>{let{doctorInfo:t,Icon:a,title:n}=e;return i.createElement(h,null,i.createElement(a,{className:"icon"}),i.createElement(v,null,i.createElement(c.T,{size:"p3",weight:"semiBold",color:"#111111"},n),i.createElement("div",{className:"doctor-info-item-content"},(Array.isArray(t)?t:[t]).map(e=>i.createElement(c.T,{size:"p3",weight:"regular",key:e},e)))))},f=n.Z.div` display: flex; padding: 1rem; width: 100%; justify-content: space-between; `,x=n.Z.div` display: flex; flex-direction: column; gap: 2px; `,DoctorInfoExpertise=e=>{let{name:t,specialty:a,experience:n,profileImage:o}=e;return i.createElement(f,null,i.createElement(x,null,i.createElement(c.T,{size:"title2",weight:"semiBold",color:"#111111"},t),i.createElement("div",null,a&&i.createElement(c.T,{size:"c1",weight:"regular"},a),n&&i.createElement(c.T,{size:"c1",weight:"regular"},n))),i.createElement(d.I,{src:o,alt:t,style:{width:"4.5rem",height:"4.5rem",borderRadius:"50%",objectFit:"cover",flexShrink:0}}))}},"4/As":function(e,t,a){a.d(t,{I:function(){return InputCommentBar},P:function(){return PopupDanger},S:function(){return SharePopup},a:function(){return PopupFrame},b:function(){return SubmitReportForm},c:function(){return $},d:function(){return getPostFormData},e:function(){return editPost},f:function(){return createPost},g:function(){return getDefaultFailNoti},h:function(){return deletePost},i:function(){return j},j:function(){return deleteComment},k:function(){return decodeCommentBody},l:function(){return likeUnlikeComment},m:function(){return likeUnlikePost},u:function(){return useImagePicker}});var i=a("q1tI"),n=a("KtSi"),o=a("J1dS"),r=a("UldL"),l=a("Dt6F"),s=a("i8i4"),d=a("9cAc"),c=a("rBCA"),p=a("iBNF"),m=a("+MNf"),u=a("3hJ3"),g=a("eyMb"),h=a("gDhB"),v=a("HJLy"),f=a("IQVP"),x=a("W8j8"),b=a("aQvW"),y=a("Naig"),E=a("RSp2"),w=a("Kdhh"),k=a("t/pd"),C=a("fKfj"),S=a("NX7q"),N=a("fqj+"),_=a("/pFO");let useImagePicker=(e,t)=>{let[a,n]=(0,i.useState)(e||[]),o=(0,i.useMemo)(()=>(e||a).map(e=>"string"==typeof e?e:URL.createObjectURL(e)),[e,a]);return{onSelectImages:i=>{let o=i.target.files;if(o){if(t&&e){let i=e||a;t(i.concat(Array.from(o)))}else n(a=>{let i=e||a;return t&&t(i.concat(Array.from(o))),i.concat(Array.from(o))})}},onRemoveImage:a=>{t&&e?(e.splice(a,1),t(e.slice())):n(i=>{let n=e||i;return n.splice(a,1),t&&t(n.slice()),n.slice()})},onRemoveAllImages:()=>{t?t([]):n([])},imageSrcs:o,imageFiles:e||a}},getDefaultFailNoti=e=>({message:e("notification.failure"),type:"danger"}),likeUnlikePost=({id:e,locale:t})=>(0,m.a)(void 0,void 0,void 0,function*(){if(!e)return;let a=yield(0,d.e)((0,d.f)(f.yy.POST.LIKE,{id:e,_locale:t}),"GET");return a}),deletePost=({id:e,locale:t})=>(0,m.a)(void 0,void 0,void 0,function*(){if(!e)return;let a=yield(0,d.e)((0,d.f)(f.yy.POST.DELETE,{id:e,_locale:t}),"DELETE");return a}),getPostFormData=({title:e,description:t,communityId:a,imageFiles:i,previewUrl:n,topicIds:o,locale:r,sanitizeFunction:s,categoryCommunityId:d,categoryTopicIds:c,introUrl:p,bannerUrl:u,scheduleTime:g,isAnonymous:h,isAskDoctor:f})=>(0,m.a)(void 0,void 0,void 0,function*(){let m=new FormData,b=(0,x.j)(t),y=(0,x.j)(e),E=(0,x.i)(b);if(m.append("title",y),m.append("description",(0,x.k)(b,s)),d?m.append("category_community",String(d)):a&&m.append("community_id",String(a)),m.append("is_anonymous",h?"1":"0"),m.append("is_question",f?"1":"0"),(null==n?void 0:n.title)&&m.append("preview_title",n.title),(null==n?void 0:n.description)&&m.append("preview_description",n.description),(null==n?void 0:n.url)&&m.append("preview_link",(0,l.c)(n.url)),(null==n?void 0:n.image)&&m.append("preview_image",(0,l.c)(n.image)),null==o||o.forEach(e=>{m.append("topics[]",String(e||""))}),null==c||c.forEach(e=>{m.append("category_topics[]",String(e||""))}),null==i?void 0:i.length){let e=yield Promise.all(i.map((e,t)=>new Promise(a=>{setTimeout(()=>{a((0,x.u)(e,r))},2e3*t)})));null==e||e.filter(Boolean).slice(0,v.M).forEach((e,t)=>{m.append(`images[${t}]`,e)})}else m.append("images","");return null==E||E.forEach(e=>{m.append("mention_ids[]",e)}),m.append("intro_url",p||""),m.append("banner",u||""),g&&(m.append("post_type","scheduled"),m.append("schedule_datetime",g)),m}),createPost=({locale:e,formData:t,isArticleComment:a})=>(0,m.a)(void 0,void 0,void 0,function*(){let i=yield(0,d.e)((0,d.f)(a?f.yy.POST.CREATE_ARTICLE_COMMENT:f.yy.POST.CREATE,{_locale:e}),"POST",{data:t});return i}),editPost=({id:e,locale:t,formData:a})=>(0,m.a)(void 0,void 0,void 0,function*(){let i=yield(0,d.e)((0,d.f)(f.yy.POST.UPDATE,{id:e,_locale:t}),"POST",{data:a});return i}),reportPost=({id:e,reason:t,locale:a})=>{let i=new FormData;return i.append("reason",t),(0,d.e)((0,d.f)(f.yy.POST.REPORT,{_locale:a,id:e}),"POST",{data:i})},P=c.Z.div` [data-type='confirm'] { max-width: 468px; /* height: 486px; */ padding: 0; .popup-content { display: flex; flex-direction: column; padding: 0; .close-button { top: 16px; right: 16px; width: 24px; height: 24px; z-index: 5; } .header { display: flex; height: 56px; align-items: center; padding: 16px 56px 16px 32px; border-bottom: 1px solid ${p.r.colors.neutral100}; font-weight: 900; width: 100%; justify-content: space-between; } .content { overflow: auto; flex: 1; .topic-list-wrapper { padding: 1rem; } } } } > div&[data-open='true'] { z-index: 250; &:last-child { z-index: 200; } } ${e=>e.isExpand&&` & > div[data-open] { width: 100%; height: 100%; max-width: none; max-height: none; } `} ${e=>e.hasFullscreen&&` & > div[data-open] { transition: all 0.5s ease-in-out, width 0s, height 0s; } `} `,T=c.Z.div` cursor: pointer; display: flex; align-items: center; `,PopupFrame=({className:e,style:t,closeIcon:a,heading:n="",children:r,isOpen:l=!1,hasFullscreen:s=!1,disableClickOutside:d=!1,initExpand:c=!1,onExpandChange:p,onClose:m=()=>null})=>{let[u,g]=(0,i.useState)(c);return i.createElement(P,{className:e,style:t,isExpand:u,hasFullscreen:s},i.createElement(S.P,{type:"confirm",onClose:m,isOpen:l,closeIcon:a||i.createElement("img",{src:N.C,loading:"lazy"}),enableAnimation:!s,disableClickOutside:d},i.createElement("div",{className:"header"},i.createElement(o.H,{tag:"h5"},n),s&&i.createElement(T,{onClick:()=>{null==p||p(),g(!u)}},i.createElement(C.Z,{size:14,isExpand:u}))),i.createElement("div",{className:"content"},"function"==typeof r?r(u):r)))};var $="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='25' fill='none'%3e%3cpath fill='%23262626' d='M12 22.984c5.523 0 10-4.477 10-10s-4.477-10-10-10-10 4.478-10 10 4.477 10 10 10'/%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m14.828 10.156-5.657 5.657M9.172 10.156l5.657 5.657'/%3e%3c/svg%3e";let z=c.Z.div` [data-type='confirm'] { width: min(360px, 100%); height: auto; &[data-open='false'] { top: calc(-100% - 500px); } } z-index: 600; .header { display: none !important; } .confirm-dialog { position: relative; overflow: auto; width: 100%; padding-top: 44px; background: #fff; border-radius: ${p.r.borderRadius}; .confirm-content { display: flex; flex-direction: column; align-items: center; padding: 0 16px 16px; text-align: center; .title { margin-bottom: 8px; font-size: 24px; line-height: 32px; word-break: break-word; overflow-wrap: break-word; } .desc { margin-bottom: 24px; color: ${p.r.colors.gray500}; font-size: 18px; line-height: 24px; text-align: center; word-break: break-word; overflow-wrap: break-word; } .btn-group { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; button { margin: 0 4px 0.5rem; } } } } .thumbnail-container { width: 80px; height: 80px; margin-bottom: 32px; .thumbnail { width: 100%; height: 100%; } &.is-icon { display: flex; align-items: center; justify-content: center; background: #e0e9fc; border-radius: 1rem; .thumbnail { width: 40px; height: 40px; } } } &[data-is-marrybaby='true'] { .popup-frame { > div:first-child { overflow: hidden; border-radius: 1rem; &[data-open='true'] { ${l.M.mbDown} { top: 100%; transform: translate(-50%, -100%); max-width: unset; width: 100%; background: unset; overflow: unset; } } } .popup-content { .close-button { ${l.M.mbDown} { display: none; } } .confirm-dialog { ${l.M.mbDown} { background: unset; position: relative; overflow-x: hidden; &::before { content: ''; width: 200%; background: #fff; position: absolute; left: 50%; top: 0; transform: translateX(-50%); z-index: -1; height: 100%; border-top-left-radius: 100%; border-top-right-radius: 100%; } } .confirm-content { padding: 0 40px 40px; ${l.M.mbDown} { padding-left: 1.5rem; padding-right: 1.5rem; } .btn-group { width: 100%; justify-content: space-between; button { flex: 1; margin: 0; &:first-child { margin-right: 0.5rem; } } } } } } .thumbnail-container { ${l.M.mbDown} { display: none; } &.is-icon { background: #ffeaf1; border-radius: 24px; } &.is-mobile { position: absolute; top: 0; left: 50%; display: none; width: 48px; height: 48px; transform: translate(-50%, -50%); &.is-icon { border-radius: 1rem; .thumbnail { width: 24px; height: 24px; } } ${l.M.mbDown} { display: flex; } } } } } `,PopupDanger=({className:e,isMarryBaby:t,style:a,title:c,description:p,acceptText:m,cancelText:u,onAccept:g,onCancel:h,thumbnail:v,isThumbnailIcon:f,onClose:x,acceptBtnTracking:b,acceptBtnProps:y,cancelBtnProps:E})=>{let{data:{env:{isMarryBaby:w}}}=(0,i.useContext)(d.T),k="boolean"==typeof t?t:w,[C,S]=(0,i.useState)(!1);return((0,i.useEffect)(()=>((0,l.t)(!0),setTimeout(()=>S(!0),0),()=>(0,l.t)(!1)),[]),"undefined"==typeof window)?null:s.createPortal(i.createElement(z,{"data-is-marrybaby":k,className:e,style:a,"data-open":C},i.createElement(PopupFrame,{className:"popup-frame",isOpen:C,onClose:x},i.createElement("div",{className:"confirm-dialog",onClick:e=>e.stopPropagation()},i.createElement("div",{className:"confirm-content"},v&&i.createElement("div",{className:`thumbnail-container ${f?"is-icon":""}`},i.createElement("img",{className:"thumbnail",src:v,loading:"lazy"})),i.createElement(o.H,{className:"title",tag:"h2"},c),i.createElement(r.T,{className:"desc",size:"lg"},p),i.createElement("div",{className:"btn-group"},i.createElement(n.B,Object.assign({theme:k?"marryBaby":"helloSites",size:"md",color:"tertiary",onClick:()=>{null==g||g(),null==x||x()}},y,b),m),i.createElement(n.B,Object.assign({theme:k?"marryBaby":"helloSites",size:"md",onClick:()=>{null==h||h(),null==x||x()}},E),u)))),k&&v&&i.createElement("div",{className:`thumbnail-container is-mobile ${f?"is-icon":""}`},i.createElement("img",{className:"thumbnail",src:v,loading:"lazy"})))),(0,l.a)())},A=c.Z.div` padding: 1rem; border-top: 1px solid #f2f2f2; &[data-is-reply='true'] { padding-right: 0; padding-left: 0; border-top: 1px solid #e4e8ec; margin-right: 1rem; margin-left: 1rem; } .error-text { padding: 1rem; color: ${p.r.colors.red700}; } .reply-to-container { display: flex; justify-content: space-between; padding-bottom: 0.75rem; margin-top: -0.25rem; .icon-close-comment { width: 16px; height: 16px; cursor: pointer; } a { text-decoration: none; } } .input-container { display: flex; align-items: center; .avatar-wrapper { display: flex; flex-shrink: 0; align-items: center; margin-right: 0.5rem; &.avatar-wrapper-reply { width: 32px; height: 32px; .avatar { width: 32px; height: 32px; } } } .input-wrapper { margin-right: 0.5rem; &[data-has-error] { .as-input { border-color: ${p.r.colors.red700}; } } .as-input { .textarea { width: 100%; max-height: 225px; min-height: 75px; .ql-toolbar { padding: 0; } .ql-editor { padding-left: 0; padding-right: 0; } .quill { height: 0; } } width: 100%; padding: 12px 16px; border: solid 1px ${p.r.colors.gray200}; border-radius: ${p.r.borderRadius}; &:active, &:focus { border-color: ${p.r.colors.primaryBase}; box-shadow: 0px 0px 2px 2px ${p.r.colors.primary200}; } &:disabled { background-color: ${p.r.colors.gray100}; cursor: not-allowed; } span { &[data-error='true'] { color: red; text-decoration: underline; } } } &[data-has-action-icon] { .as-input { padding: 12px 48px 12px 16px; } } &[data-has-display-icon] { .as-input { padding: 12px 16px 12px 48px; } } &[data-has-action-icon][data-has-display-icon] { .as-input { padding: 12px 48px; } } &[data-size='lg'] { .as-input { font-size: 16px; font-weight: ${p.r.sizes.fwRegular}; ${l.M.mbDown} { font-size: 22px; line-height: 1.2; } ${l.M.mbUp} { font-size: 26px; line-height: 1.2; } } } &[data-size='md'] { .as-input { font-weight: ${p.r.sizes.fwRegular}; line-height: 22px; ${l.M.mbDown} { font-size: 14px; line-height: 1.2; } ${l.M.mbUp} { font-size: 16px; line-height: 1.2; } } } &[data-size='sm'] { .as-input { font-weight: ${p.r.sizes.fwRegular}; line-height: 20px; ${l.M.mbDown} { font-size: 13px; line-height: 1.5; } ${l.M.mbUp} { font-size: 13px; line-height: 1.5; } } } } .images-input-label { height: 100%; cursor: pointer; .icon-images-input { width: 24px; height: 24px; vertical-align: middle; } } .send-button { display: flex; width: 40px; height: 40px; flex-shrink: 0; align-items: center; justify-content: center; padding: 0; border: none; &.send-button-post { background: ${p.r.colors.neutral100}; border-radius: 50%; } .icon-enter { width: 20px; height: 20px; vertical-align: middle; } &[data-is-loading='true'] { > div { display: flex; align-items: center; justify-content: center; } } } } .preview-images-container { margin-top: 1rem; .image-src-wrapper { position: relative; width: 100%; padding-top: 66.67%; &:not(:last-child) { margin-bottom: 1rem; } .preview-image { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; } .icon-close-circle { position: absolute; top: 10px; right: 10px; width: 20px; height: 20px; cursor: pointer; } } } `,O=(0,i.createContext)({}),getCommentFormBody=({postId:e,message:t,photos:a,link:i,locale:n,sanitizeFunction:o,replyingUserId:r,replyingUserName:l,replyingId:s})=>(0,m.a)(void 0,void 0,void 0,function*(){let d=new FormData,c=(0,x.k)(t.replace(/(\ )+/g," "),o),p=(0,x.i)(c);if(a&&a.length>0){let e=yield Promise.all(null==a?void 0:a.map(e=>(0,x.u)(e,n)));e.filter(Boolean).slice(0,v.M).forEach(e=>{d.append("images[]",e)})}return i&&d.append("link",i),null==p||p.forEach(e=>{d.append("mention_ids[]",e)}),d.append("post_id",e),s&&d.append("parent_id",s),r&&(p.unshift(r),c=`[mention+id="${r}"+name="${(l||"").replace('"',"'")}"]${c}`,d.append("parent_user_id",String(r))),d.append("content",c),d.append("content",c),d}),submitComment=(e,t)=>(0,m.a)(void 0,void 0,void 0,function*(){return(0,d.e)((0,d.f)(f.yy.COMMENT.CREATE,{_locale:t}),"POST",{data:e})}),decodeCommentBody=e=>{try{let t=e.match(/\[@([^\]]+)\]/),a=t?t[0].replace("[@","").replace("]",""):"",i=e.replace(/\[@([^\]]+)\]/,"");return{text:i.trim(),replyingTo:a}}catch(e){}return{text:""}},submitReply=(e,t)=>(0,m.a)(void 0,void 0,void 0,function*(){return(0,d.e)((0,d.f)(f.yy.COMMENT.REPLY,{_locale:t}),"POST",{data:e})}),likeUnlikeComment=({commentId:e,setLike:t=!1,locale:a})=>(0,m.a)(void 0,void 0,void 0,function*(){return(0,d.e)((0,d.f)(t?f.yy.COMMENT.LIKE:f.yy.COMMENT.UNLIKE,{_locale:a,id:e}),"GET")}),deleteComment=({id:e,locale:t})=>(0,d.e)((0,d.f)(f.yy.COMMENT.DELETE,{_locale:t,id:e}),"DELETE"),InputCommentBar=({isReply:e,className:t,onClose:a,replyToName:o,style:l,replyingId:s,replyingUser:c,onPostSuccess:p,post:f,isMarryBaby:x})=>{let{action:{pushNotifications:k,sanitizeFunction:C},data:{userInfo:S,locale:N,env:{isMarryBaby:_}}}=(0,i.useContext)(d.T),{t:P}=(0,g.u)(),{onSelectImages:T,onRemoveImage:z,imageSrcs:D,onRemoveAllImages:M,imageFiles:j}=useImagePicker(),[I,B]=(0,i.useState)(""),{trigger:F}=(0,i.useContext)(O),[R,L]=(0,i.useState)(!1),U=(0,i.useRef)(null),Z=(0,i.useRef)(null),H=(0,i.useRef)(null),[V,W]=(0,i.useState)([]),[Y,q]=(0,i.useState)([]),[G,K]=(0,i.useState)(null);return(0,i.useEffect)(()=>{var e;null===(e=H.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start"}),setTimeout(()=>{var e;null===(e=Z.current)||void 0===e||e.focus()},400)},[F]),i.createElement(A,{"data-is-reply":e,className:t,style:l},e&&i.createElement("div",{className:"reply-to-container"},i.createElement(r.T,{size:"p4"},i.createElement("span",{dangerouslySetInnerHTML:{__html:P("inputComment.replyTo",{name:`@${o||""}`})}})),i.createElement("img",{src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='17' fill='none'%3e%3ccircle cx='8' cy='8.5' r='6.667' fill='white' stroke='%23404040'/%3e%3cpath stroke='%23404040' stroke-linecap='round' stroke-linejoin='round' d='m10 6.5-4 4M6 6.5l4 4'/%3e%3c/svg%3e",className:"icon-close-comment",onClick:()=>a&&a(),loading:"lazy"})),i.createElement("div",{className:"input-container",ref:H},i.createElement(E.U,{className:`avatar-wrapper ${e?"avatar-wrapper-reply":""}`,avatar:(null==S?void 0:S.id)?S.avatar:v.D,username:(null==S?void 0:S.name)||(null==S?void 0:S.username)}),i.createElement("input",{ref:U,onChange:T,type:"file",multiple:!0,accept:"image/png,image/jpeg",name:"images",style:{display:"none"}}),i.createElement(u.I,{value:I,name:"input",size:"md",className:"input-wrapper",displayIcon:i.createElement("img",{src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3cpath stroke='%232D87F3' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='M10.754 4.854H4.492a1.79 1.79 0 0 0-1.789 1.789v12.524a1.79 1.79 0 0 0 1.79 1.789h12.523a1.79 1.79 0 0 0 1.79-1.79v-6.261'/%3e%3cpath stroke='%232D87F3' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='M17.463 3.512a1.898 1.898 0 0 1 2.684 2.684l-8.498 8.498-3.579.895.895-3.579z'/%3e%3c/svg%3e",loading:"lazy"}),CustomInput:i.createElement("div",{className:"as-input"},i.createElement(w.R,{className:"textarea",html:I,onChange:B,onImagePickerClick:()=>{var e;return null===(e=U.current)||void 0===e?void 0:e.click()},bannedWords:Y,onPreviewUrlChange:K,onInvalidUrlsChange:W,setEditorRef:e=>Z.current=e,isReplying:e}))}),i.createElement(n.B,{theme:("boolean"==typeof x?x:_)?"marryBaby":"helloSites",className:"send-button",size:"sm",onClick:()=>(0,m.a)(void 0,void 0,void 0,function*(){var t,i,n,o,r,l,d,m,u;if((null==f?void 0:f.id)&&!R){L(!0);try{let g=yield getCommentFormBody(Object.assign({message:I,photos:j,postId:String(f.id),link:null==G?void 0:G.url,sanitizeFunction:C,locale:N},e&&s?{replyingUserId:String((null==c?void 0:c.id)||(null===(t=null==f?void 0:f.author)||void 0===t?void 0:t.id)||""),replyingId:s,replyingUserName:(null==c?void 0:c.name)||(null==c?void 0:c.username)||""}:{})),v=yield e&&s?submitReply(g,N):submitComment(g,N),x=null==v?void 0:v.data;(null==x?void 0:x.id)&&!(null===(n=null===(i=null==v?void 0:v.messages)||void 0===i?void 0:i.moderation)||void 0===n?void 0:n.type)?(e=>{B(""),M(),a&&a();let t=(0,h.g)(e.data);"string"==typeof t.images&&(t.images=JSON.parse(t.images)),p&&p(t)})(v):(null===(r=null===(o=null==v?void 0:v.messages)||void 0===o?void 0:o.moderation)||void 0===r?void 0:r.type)==="banned"?(k({title:P("notification.comment.blocked.title"),message:P("notification.comment.blocked.message"),type:"danger"}),v.messages.moderation.words&&q(v.messages.moderation.words)):(null===(d=null===(l=null==v?void 0:v.messages)||void 0===l?void 0:l.moderation)||void 0===d?void 0:d.type)==="suspect"?(k({title:P("notification.comment.suspect.title"),message:P("notification.comment.suspect.message"),type:"warning"}),B(""),M(),a&&a()):(null===(m=null==v?void 0:v.messages)||void 0===m?void 0:m.find(e=>{var t;return!!(null===(t=null==e?void 0:e.includes)||void 0===t?void 0:t.call(e,"suspend"))}))?(k({message:P("notification.suspend.message"),type:"warning"}),B(""),M(),a&&a()):k({title:"",message:(null===(u=null==v?void 0:v.messages)||void 0===u?void 0:u[0])||P("notification.comment.somethingWrong"),type:"danger"})}catch(e){k({title:"",message:P("notification.comment.somethingWrong"),type:"danger"})}L(!1)}}),isLoading:R,isDisabled:!!(null==V?void 0:V.length)||R||!I||(null==I?void 0:I.length)<2||!I.trim()},i.createElement("img",{src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='20' height='21' fill='none'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m7.5 9.734-3.75 3.75 3.75 3.75'/%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M16.25 4.734v5.569c0 .843-.33 1.653-.915 2.25a3.1 3.1 0 0 1-2.21.931H3.75'/%3e%3c/svg%3e",className:"icon-enter",loading:"lazy"}))),(null==V?void 0:V.length)?i.createElement("div",{className:"error-text"},P("notification.limitUrlDomain")):null,(!D||0===D.length)&&G&&i.createElement("div",{className:"link-preview-wrapper"},G.isFetching?i.createElement(y.L,null):i.createElement(i.Fragment,null,i.createElement(b.C,{title:G.title,url:G.url||"#",image:G.image,noRefetch:!0}),i.createElement("img",{src:$,className:"icon-close",onClick:()=>K(null),loading:"lazy"}))),D&&D.length>0&&i.createElement("div",{className:"preview-images-container"},D.map((e,t)=>i.createElement("div",{key:t,className:"image-src-wrapper"},i.createElement("img",{className:"preview-image",src:e,loading:"lazy"}),i.createElement("img",{src:$,className:"icon-close-circle",onClick:()=>z(t),loading:"lazy"})))))},SharePopup=({trackingCategory:e,className:t,style:a,url:n,text:o,onClose:r})=>{let{data:{env:{isMarryBaby:s}}}=(0,i.useContext)(d.T),{t:c}=(0,g.u)(),[p,m]=(0,i.useState)(!1);return(0,i.useEffect)(()=>((0,l.t)(!0),setTimeout(()=>m(!0),0),()=>(0,l.t)(!1)),[]),i.createElement(k.h,null,i.createElement(D,{"data-is-marrybaby":s,className:t,style:a},i.createElement(PopupFrame,{className:"share-popup",isOpen:p,onClose:r,heading:c("bottomBar.share")},p&&i.createElement(_.r,{trackingCategory:e,shareUrl:n||("undefined"!=typeof window?window.location.href:""),title:o}))))},D=c.Z.div` .share-popup { > div:first-child { height: unset; } } .custom-share__header { display: flex; flex-wrap: no-wrap; align-items: center; padding: 1rem; border-bottom: 1px solid ${p.r.colors.neutral100}; margin-bottom: 16px; .custom-share__header-image { width: 38px; height: 38px; flex-shrink: 0; & > img { width: 100%; height: 100%; object-fit: cover; object-position: center; } } .custom-share__header-info { flex: 1; padding: 0 8px; word-break: break-word; [data-tag='h4'] { margin-bottom: 8px; font-size: 14px; font-weight: bold; line-height: 14px; } [data-size='md'] { color: #a5a5a5; font-size: 14px; line-height: 14px; } } } &[data-is-marrybaby='true'] { .share-popup { > div:first-child { overflow: hidden; border-radius: 1rem; &[data-open='true'] { ${l.M.mbDown} { max-width: unset; width: 100%; top: 100%; transform: translate(-50%, -100%); border-bottom-left-radius: 0; border-bottom-right-radius: 0; } } } .close-button { display: block; } .popup-content { .header { display: block; padding: 1rem; background-color: rgb(243, 243, 243); } .content { padding-bottom: 1rem; } } .share-mb-text { margin: 1rem 1rem 0.5rem; } } } `,M=c.Z.div` padding: 0 8px; margin-top: 18px; .report-list { margin-bottom: 18px; .report-item { display: flex; align-items: center; margin-bottom: 10px; font-weight: 600; & > img { width: 12px; height: 12px; margin-right: 8px; } .__label { font-size: 14px; } } } .report-submit { width: 100%; } &[data-is-marrybaby='true'] { padding: 0 1rem 1rem; } `;var j="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath stroke='%23737373' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12M8 5v3M8 11h.007'/%3e%3c/svg%3e";let SubmitReportForm=({className:e,style:t,reason:a,reasonText:o,onClose:l,postId:s})=>{let{data:{locale:c,env:{isMarryBaby:u}},action:{pushNotifications:h}}=(0,i.useContext)(d.T),{t:v}=(0,g.u)(),[f,x]=(0,i.useState)(!1);return i.createElement(M,{"data-is-marrybaby":u,className:e,style:t},i.createElement("ul",{className:"report-list"},i.createElement("li",{className:"report-item"},i.createElement("img",{src:j,loading:"lazy"}),i.createElement(r.T,{className:"__label",color:p.r.colors.gray800,size:"p4"},o))),i.createElement(n.B,{theme:u?"marryBaby":"helloSites",className:"report-submit",size:"lg",color:"primary",isLoading:f,onClick:()=>(0,m.a)(void 0,void 0,void 0,function*(){if(s&&!f){x(!0);try{let e=yield reportPost({id:s,reason:a,locale:c});(null==e?void 0:e.status)===1&&(h({message:"Post reported",type:"success"}),l&&l())}catch(e){}x(!1)}})},v("submit")))}},rL2a:function(e,t,a){a.d(t,{C:function(){return Container}});var i=a("q1tI");let Container=({children:e,className:t,style:a,type:n})=>i.createElement("div",{className:`d76E4SH ${t||""}`,style:a,"data-type":n},e)},"/NUe":function(e,t,a){a.d(t,{M:function(){return Modal}});var i=a("q1tI"),n=a("Jryi"),o=a("i8i4"),r=a("rBCA"),l=a("Dt6F"),s=a("gEnE"),d=a("iBNF");let c=(0,s.Z)(r.Z.div` position: relative; z-index: 200; background-color: ${d.r.colors.white}; border-radius: ${d.r.borderRadius}; box-shadow: 0px 8px 40px 0px #0000001a; &[data-site-type='marryBaby'] { border-radius: 16px; .hhg-modal__content { position: relative; z-index: 111; height: 100%; padding: 24px; } } .hhg-modal__content { position: relative; z-index: 111; height: 100%; padding: 16px; } .hhg-modal__video { position: relative; z-index: 111; height: 100%; background-color: none; box-shadow: none; } `,"hhgcomp-modal-modal"),p=r.Z.div` position: fixed; top: 0; left: 0; z-index: 201; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; overflow-x: hidden; overflow-y: auto; outline: 0; visibility: hidden; opacity: 0; background-color: rgba(0, 0, 0, 0.6); transition: opacity 0.3s ease-in-out; .hhg-modal__close { position: absolute; top: 16px; right: 16px; cursor: pointer; img { width: 100%; height: 100%; border-radius: 50%; } } &[data-type='video'] { z-index: 1001; } &[data-open='true'] { opacity: 1; visibility: visible; } ${c.classSelector} { transition: transform 0.3s ease-in-out; } &.slideTop { ${c.classSelector} { transform: translate(0, -100vh); } &[data-open='true'] { ${c.classSelector} { transform: translate(0); } } } &.scaleUp { ${c.classSelector} { transform: scale(0.9); } &[data-open='true'] { ${c.classSelector} { transform: scale(1); } } } &[data-type='tail'] { justify-content: flex-end; ${c.classSelector} { width: 420px; height: 100%; border-radius: 0; overflow: hidden auto; } } &[data-type='form'] { ${c.classSelector} { width: 496px; height: 548px; max-height: 100%; overflow-y: auto; ${l.M.mbDown} { width: 340px; } } } &[data-type='video'] { ${c.classSelector} { height: 100%; max-height: 539px; ${l.M.mbDown} { height: 192px; width: 100%; height: 100%; border-radius: ${d.r.borderRadius}; max-height: 192px; } } } &[data-type='confirm'] { ${c.classSelector} { width: 100%; max-width: 407px; ${l.M.mbDown} { width: calc(100% - 32px); max-width: calc(100% - 32px); } } } `,m=r.Z.div` position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; align-items: center; &[data-open='false'] { display: none; } &[data-type='video'] { background-color: ${d.r.colors.secondaryDark}; } `,u="hhg-modals",getModalsRoot=()=>{let e=document.getElementById(u);return e||((e=document.createElement("div")).setAttribute("id",u),document.body.append(e)),e},cleanUpModalShow=()=>{let e=document.querySelectorAll('.hhg-modal[data-open="true"]');e.length<1&&document.body.classList.remove("hhc-modal-show")},cleanUpDisabledScroll=()=>{let e=document.querySelectorAll('.hhg-modal[data-open="true"]');e.length<1&&(document.body.style.overflow="",document.body.style.paddingRight="",document.body.classList.remove("hhc-disabled-scroll"))},Modal=({type:e="lead",closeIcon:t,isOpen:a=!0,onClose:r,children:l,className:s="",animationType:d="scaleUp",isStaticBackdrop:u=!1,siteType:g})=>{let[h,v]=(0,i.useState)(!1),f=(0,i.useRef)(null),{width:x}=(0,n.u)();if(!f.current&&h&&(f.current=document.createElement("div")),(0,i.useEffect)(()=>(v(!0),()=>{v(!1),cleanUpModalShow(),cleanUpDisabledScroll()}),[]),(0,i.useEffect)(()=>{if(h){let e=getModalsRoot();return e.appendChild(f.current),()=>{e.removeChild(f.current)}}},[h]),(0,i.useEffect)(()=>{a?document.body.classList.add("hhc-modal-show"):cleanUpModalShow()},[a]),(0,i.useEffect)(()=>{a?(document.body.style.overflow="hidden",document.body.style.paddingRight=x+"px",document.body.classList.add("hhc-disabled-scroll")):cleanUpDisabledScroll()},[a,x]),!h)return null;let b=["hhg-modal__wrapper",s,d].filter(e=>e).join(" ");return(0,o.createPortal)(i.createElement(p,{className:b,"data-open":a,"data-type":e},!u&&i.createElement(m,{"data-open":a,onClick:r,"data-type":e}),!u&&"video"===e&&!!t&&i.createElement("div",{className:"hhg-modal__close",onClick:r},t),i.createElement(c,{className:"hhg-modal","data-open":a,"data-site-type":g},i.createElement("div",{className:"video"===e?"hhg-modal__video":"hhg-modal__content"},!!t&&"video"!==e&&i.createElement("div",{className:"hhg-modal__close",onClick:r},t),l))),f.current)}},SKLy:function(e,t,a){a.d(t,{D:function(){return Dropdown}});var i=a("q1tI"),n=a("8vDj"),o=a("rBCA"),r=a("iBNF");let l=o.Z.div` --dropdown-padding: 12px 18px 12px 16px; position: relative; box-sizing: border-box; border: 1px solid ${r.r.colors.gray200}; background: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23595959' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A") no-repeat; background-position: right 16px center; border-radius: ${r.r.borderRadius}; &[data-disabled='true'], :disabled { background-color: #f2f2f2; cursor: not-allowed; } &[data-size='sm'] { font-size: 13px; line-height: 20px; } &[data-size='md'] { font-size: 14px; line-height: 21px; } &[data-size='lg'] { font-size: 16px; line-height: 24px; } &[data-has-icons='true'] { border: none; background: ${r.r.colors.gray100}; img, svg { display: inline-block; max-width: 16px; margin-right: 6px; } span { display: inline-block; vertical-align: middle; } &:hover { box-shadow: none; } > div { position: relative; display: flex; width: 100%; box-sizing: border-box; align-items: center; } > div::after { position: absolute; top: 50%; right: 12px; width: 10px; height: 8px; background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23595959' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A"); background-repeat: no-repeat; content: ''; transform: translateY(-50%); } } &:hover { box-shadow: 0 0 2px 2px ${e=>e.shadowColor}; } &[data-is-native='true'] { padding: var(--dropdown-padding); line-height: 24px; &:focus { box-shadow: 0px 0px 2px 2px ${e=>e.shadowColor}; } } `,s=o.Z.div` padding: var(--dropdown-padding); cursor: pointer; &.with-label { padding-top: 34px; padding-bottom: 12px; } &[data-dropdown-open] { padding: 11px 15px 11px 15px; border: 1px solid ${e=>e.color}; border-radius: ${r.r.borderRadius}; box-shadow: 0 0 2px 2px ${e=>e.shadowColor}; } `,d=o.Z.ul` position: absolute; top: 100%; /* right: 0; */ min-width: 100%; left: 0; display: block; margin-top: 4px; background: ${r.r.colors.white}; border-radius: ${r.r.borderRadius}; box-shadow: -1px 1px 2px rgba(67, 70, 74, 0.0001), -2px 2px 5px rgba(67, 86, 100, 0.123689); cursor: pointer; &[data-has-icons='true'] { border: 1px solid ${r.r.colors.gray200}; background: white; box-shadow: none; filter: drop-shadow(0px 10px 16px rgba(0, 0, 0, 0.04)); } `,c=o.Z.li` display: flex; padding: 12px 18px 12px 16px; &[data-disabled='true'] { cursor: not-allowed; color: #bfbfbf; & > * { pointer-events: none; } } &:hover, :active { background: ${r.r.colors.gray100}; } `,p=o.Z.div` max-width: 16px; margin-right: 8px; `,m=o.Z.div` position: absolute; top: 12px; left: 16px; pointer-events: none; `,Dropdown=({className:e,value:t,options:a,onChange:o=()=>void 0,id:r,placeholderIcon:u,placeholder:g,style:h,size:v="lg",groupedWithLabel:f,disabled:x,dropdownLabelTrackingAttributes:b={},isNativeSelect:y=!1})=>{let E=(0,n.rZ)(),[w,k]=i.useState(!1),showDropdown=()=>!x&&k(!w);if(y){let e="object"==typeof(null==t?void 0:t.value)&&t.value instanceof Date?t.value.toString():null==t?void 0:t.value;return i.createElement(l,{color:E.fn.primaryColor(),shadowColor:E.colors[E.primaryColor][2],as:"select","data-is-native":"true",value:e||void 0,disabled:x,onChange:e=>{if("string"==typeof e.target.value){let t=a.find(t=>t.value===e.target.value);t&&o(t)}}},g&&i.createElement("option",{value:g,disabled:!0,selected:!0},g),a.map(e=>i.createElement("option",{key:`${r}-${e.value}`,value:e.value,disabled:!!e.disabled&&e.disabled},e.label)))}return i.createElement(l,{color:E.fn.primaryColor(),shadowColor:E.colors[E.primaryColor][2],className:e,"data-dropdown-open":w||void 0,"data-size":v,id:r,"data-has-icons":!!u,style:h,onBlur:()=>k(!1),tabIndex:0,"data-disabled":x},!!f&&i.createElement(m,null,f),i.createElement(s,Object.assign({color:E.fn.primaryColor(),shadowColor:E.colors[E.primaryColor][2],onClick:showDropdown,className:f&&"with-label"},b),u," ",i.createElement("span",null,t&&t.value?t.label:g)),w&&i.createElement(d,{onClick:showDropdown,"data-has-icons":!!u},a.map(e=>i.createElement(c,{key:`${r}-${e.value}`,"data-selected":t&&t.value===e.value||void 0,onClick:()=>!e.disabled&&!x&&(null==o?void 0:o(e)),"data-disabled":!!e.disabled&&e.disabled},e.icon&&i.createElement(p,null,e.icon),e.label))))}},zSvm:function(e,t,a){a.d(t,{C:function(){return CardAuthor},P:function(){return PopupExpert},a:function(){return PopupDoctor},b:function(){return PopupHospital},c:function(){return ProfileDetailModal},d:function(){return CardAuthor$1}});var i=a("q1tI"),n=a("Frvz"),o=a("daqB"),r=a("/npG"),l=a("Eso5"),s=a("SPK5"),d=a("mAfZ"),c=a("mYVa"),p=a("Wgwc"),m=a.n(p),u=a("QgiU"),g=a.n(u),h=a("eyMb"),v=a("Dt6F"),f=a("XI7l"),x=a("Nkw6"),b=a("+MNf"),y=a("RSp2"),E=a("oxWm"),w=a("5SVV"),k=a("9cAc"),C=a("KtSi"),S=a("UldL"),N=a("iBNF"),_=a("rBCA"),P=a("IQVP"),T=a("Naig"),$=a("J1dS"),z=a("0sF0"),A=a("xrdX");let MainText=({children:e,className:t=""})=>i.createElement("div",{className:`tMiOKib ${t}`},e),SubText=({children:e,className:t=""})=>i.createElement("div",{className:`uDcqD-2 ${t}`},e);var O={container:"sTU4T4I",info:"tCql9Je",avatarWrapper:"_3j7uYhH",avatarIcon:"PHABgoT"};let CardAuthor$1=({avatarProps:e,title:t,subTitle:a,children:n,className:o="",style:r,onAvatarClick:l,avatarIcon:s,dataEventCategory:d,dataEventAction:c,dataEventLabel:p})=>i.createElement("div",{className:`${O.container} ${o}`,style:r},i.createElement("div",{className:O.avatarWrapper,onClick:l,"data-event-category":d,"data-event-action":c,"data-event-label":p},i.createElement(y.U,Object.assign({},e)),s&&i.createElement("div",{className:O.avatarIcon},s)),i.createElement("div",{className:`${O.info} ${o}`,style:{minHeight:`${(null==e?void 0:e.size)||40}px`}},n||i.createElement(i.Fragment,null,t&&i.createElement(MainText,null,t),a&&i.createElement(SubText,null,a))));CardAuthor$1.MainText=MainText,CardAuthor$1.SubText=SubText,CardAuthor$1.SubDivider=({className:e=""})=>i.createElement("span",{className:`m-HVXw1 ${e}`}),CardAuthor$1.Row=({children:e,className:t=""})=>i.createElement("div",{className:`dZWeHns ${t} row`},e),CardAuthor$1.ColLeft=({children:e,className:t=""})=>i.createElement("div",{className:`${t} col-left`},e),CardAuthor$1.ColRight=({children:e,className:t=""})=>i.createElement("div",{className:`${t} col-right`},e),CardAuthor$1.SubTextRow=e=>{var{children:t,className:a=""}=e,n=(0,b._)(e,["children","className"]);return i.createElement("div",Object.assign({className:`pDlsows ${a}`},n),t)};var D=(0,r.k)(()=>({root:{verticalAlign:"bottom"}}));let M=(0,i.createContext)({}),AuthorBadgeItem=({styles:e,className:t,classNames:a})=>{let{role:n,siteType:o,title:r}=(0,i.useContext)(M),{cx:l,classes:s}=D(void 0,{name:"AuthorBadgeItem",styles:e,classNames:a});return n?i.createElement(f.A,{className:l(s.root,t),siteType:o,role:n,title:r}):null};var j=(0,r.k)(()=>({root:{}}));let I=_.Z.div` position: fixed; left: 50%; width: 343px; background-color: ${N.r.colors.white}; border-radius: ${N.r.borderRadius}; box-shadow: 0px 0px 4px ${N.r.colors.gray200}; transform: translate(-50%, -50%); transition: all 0.5s ease-in-out; ${v.M.tdUp} { width: 750px; } &[data-animation='true'] { transition: all 0.5s ease-in-out; } &[data-open='true'] { z-index: 400; top: 50%; opacity: 1; visibility: visible; } &[data-open='false'] { top: -50%; } .popup-content { ${v.M.mbDown} { display: block; } display: flex; position: relative; z-index: 111; height: 100%; .button-see-more { margin: 32px 0; padding: 0; > * { display: inline-block; } } .close-button { position: absolute; z-index: 100; top: 10px; right: 10px; cursor: pointer; width: unset; height: unset; img { width: 100%; height: 100%; border-radius: 50%; } } } .main-info { padding-bottom: 32px; background-color: ${N.r.colors.primary50}; border-radius: ${N.r.borderRadius}; .btn-booking { display: flex; margin: 12px auto; } .avatar-title { position: relative; width: 100%; padding-top: 46px; text-align: center; } } `,B=_.Z.div` position: fixed; z-index: 110; top: 0; left: 0; width: 100%; height: 100%; align-items: center; background: rgba(38, 38, 38, 0.3); &[data-open='false'] { display: none; } `,F=_.Z.div` .image-container { .badge-avatar { position: absolute; right: 0; bottom: 0; top: 0; } } display: flex; justify-content: center; padding-bottom: 15px; text-align: center; .profile-image { width: 100px; min-width: 100px; height: 100px; min-height: 100px; border-radius: 50%; object-fit: cover; } .badge-avatar { width: 24px; height: 24px; } `,R=_.Z.div` position: relative; z-index: 9; .specialty { display: flex; flex-wrap: wrap; justify-content: center; } padding: 0px 16px; text-align: center; .specialty { justify-content: center; } .experience { padding: 16px 0px 32px; text-align: left; .btn-wrapper { margin-top: 24px; } } p { max-width: 100%; -webkit-line-clamp: 4; -webkit-box-orient: vertical; text-overflow: ellipsis; overflow: hidden; } `,L=_.Z.ul` padding-left: 18px; li { list-style-type: disc; } `;var U="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3cpath stroke='%23262626' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M18 6 6 18M6 6l12 12'/%3e%3c/svg%3e",Z="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none'%3e%3cpath fill='white' stroke='%23E4E8EC' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='M9 17A8 8 0 1 0 9 1a8 8 0 0 0 0 16'/%3e%3cpath fill='%23FF5331' d='M10.333 7.667V5H7.667v2.667H5v2.667h2.667V13h2.666v-2.666H13V7.667z'/%3e%3c/svg%3e";let PopupDoctor=({isOpen:e=!0,onClose:t,enableAnimation:a=!0,doctorId:n,locale:o,isMobile:r,overwriteProfileProps:l,avatarFallback:s=w.C.getAssetPath("avatar.jpg"),trackingCategory:d="Together"})=>{var c,p,m;let{t:u}=(0,h.u)(),[g,v]=(0,i.useState)(null),[f,x]=(0,i.useState)(!1);(0,i.useEffect)(()=>{if(e&&n&&String(null==g?void 0:g.id)!==String(n)){x(!0);try{v(null),(0,k.c)((0,k.b)(P.tC.GET_DOCTOR_INFO,{doctorId:n,website_url:k.m[o]}),"get").then(e=>{v(Object.assign(Object.assign({},null==e?void 0:e._data.doctor),l))})}catch(e){console.error(e)}x(!1)}},[e,n,null==g?void 0:g.id]);let b=(null==g?void 0:g.experiences)||[],y=(null==g?void 0:g.specialties)||[],_=y.map(e=>(null==e?void 0:e.name)||e).join(" • "),$=b.map(e=>{try{return JSON.parse(e.description)}catch(t){return e.description}}).filter(e=>e.content),renderExperienceText=e=>(null==e?void 0:e.year)?`${e.year} ${null==e?void 0:e.content}`:(null==e?void 0:e.content)?e.content:"string"==typeof e?e:"";return i.createElement(i.Fragment,null,i.createElement(I,{"data-open":e,"data-animation":a,onClick:e=>e.stopPropagation()},f||!g?i.createElement(T.L,null):i.createElement("div",{className:"popup-content"},i.createElement("div",{className:"close-button",onClick:t},i.createElement("img",{src:U,style:{width:20,height:20},alt:"close-icon",loading:"lazy"})),i.createElement("div",{className:"main-info"},i.createElement("div",{className:"border-banner"}),i.createElement("div",{className:"avatar-title"},i.createElement(F,null,i.createElement("div",{className:"image-container"},i.createElement("div",{style:{position:"relative"}},i.createElement(E.I,{src:null==g?void 0:g.avatar,backupSrc:s,className:"profile-image",alt:"avatar"}),i.createElement("img",{className:"badge-avatar",src:Z,alt:"badge",loading:"lazy"})))),i.createElement(R,null,i.createElement(S.T,{size:"s3",weight:"semiBold",className:"full-name"},null==g?void 0:g.name),i.createElement("div",{className:"specialty"},_&&i.createElement(i.Fragment,null,i.createElement(S.T,{size:"p4",color:N.r.colors.gray800},_," • ")),i.createElement("a",{href:(0,k.n)({id:null===(c=null==g?void 0:g.organization)||void 0===c?void 0:c.id,name:null===(p=null==g?void 0:g.organization)||void 0===p?void 0:p.name,slug:null===(m=null==g?void 0:g.organization)||void 0===m?void 0:m.slug,locale:o}),className:"organisation",target:"_blank",rel:"noreferrer"},i.createElement(S.T,{size:"p4",className:"organisation",color:N.r.colors.gray800,style:{textDecoration:"underline"}},null==g?void 0:g.organization.name))))),!r&&i.createElement("div",{className:"btn-wrapper"},i.createElement("a",{href:(0,k.o)({name:g.name,id:g.id,locale:o})},i.createElement(C.B,{color:"primary",size:"md",className:"btn-booking"},u("careBooking.bookAnAppointment"))))),$&&i.createElement(R,null,i.createElement("div",{className:"experience"},i.createElement(S.T,{weight:"bold",size:"s3",color:N.r.colors.gray800,style:{paddingBottom:16}},u("expert.content.description").toUpperCase()),i.createElement(L,null,$.map((e,t)=>i.createElement("li",{key:t},i.createElement(S.T,{size:"p2"},renderExperienceText(e))))),r?i.createElement("div",{className:"btn-wrapper"},i.createElement("a",{href:(0,k.o)({name:g.name,id:g.id,locale:o})},i.createElement(C.B,{color:"primary",size:"md",className:"btn-booking"},u("careBooking.bookAnAppointment")))):i.createElement("a",{href:(0,k.o)({name:g.name,id:g.id,locale:o})},i.createElement(S.T,{size:"s4",color:"#2D87F3",style:{paddingTop:24},"data-event-category":d,"data-event-action":"See Full Doctor Profile","data-event-label":(0,k.l)(o)+(0,k.o)({name:g.name,id:g.id,locale:o})},u("home.seeExpert"))))))),i.createElement(B,{"data-open":e,onClick:e=>{e.stopPropagation(),t()}}))},H=_.Z.div` position: fixed; left: 50%; width: 343px; background-color: ${N.r.colors.white}; border-radius: ${N.r.borderRadius}; box-shadow: 0px 0px 4px ${N.r.colors.gray200}; transform: translate(-50%, -50%); transition: all 0.5s ease-in-out; ${v.M.tdUp} { width: 750px; } &[data-animation='true'] { transition: all 0.5s ease-in-out; } &[data-open='true'] { z-index: 400; top: 50%; opacity: 1; visibility: visible; } &[data-open='false'] { top: -50%; } .popup-content { ${v.M.mbDown} { display: block; } display: flex; position: relative; z-index: 111; height: 100%; .button-see-more { margin: 32px 0; padding: 0; > * { display: inline-block; } } .close-button { position: absolute; z-index: 100; top: 10px; right: 10px; cursor: pointer; width: unset; height: unset; img { width: 100%; height: 100%; border-radius: 50%; } } } .main-info { padding-bottom: 32px; background-color: ${N.r.colors.primary50}; border-radius: ${N.r.borderRadius}; .avatar-title { position: relative; width: 100%; padding-top: 46px; text-align: center; } } `,V=_.Z.div` position: fixed; z-index: 110; top: 0; left: 0; width: 100%; height: 100%; align-items: center; background: rgba(38, 38, 38, 0.3); &[data-open='false'] { display: none; } `,W=_.Z.div` .image-container { .badge-avatar { position: absolute; right: 0; bottom: 0; top: 0; } } display: flex; justify-content: center; padding-bottom: 15px; text-align: center; .profile-image { width: 100px; min-width: 100px; height: 100px; min-height: 100px; border-radius: 50%; object-fit: cover; } .badge-avatar { width: 24px; height: 24px; } `,Y=_.Z.div` position: relative; z-index: 9; .specialty { display: flex; flex-wrap: wrap; justify-content: center; } padding: 0px 16px; text-align: center; .specialty { justify-content: center; } .experience { padding: 16px 0px 32px; text-align: left; .btn-wrapper { margin-top: 24px; } } p { max-width: 100%; -webkit-line-clamp: 4; -webkit-box-orient: vertical; text-overflow: ellipsis; overflow: hidden; } `,q=_.Z.div` display: flex; margin-top: 8px; .bullet-point { width: 24px; height: 24px; } `;var G="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3cpath fill='%2345A4FF' d='M12 24c6.627 0 12-5.373 12-12S18.627 0 12 0 0 5.373 0 12s5.373 12 12 12'/%3e%3cpath fill='%232D87F3' d='M24 12a12 12 0 0 0-.128-1.758l-5.077-5.077L5.041 18.958l4.858 4.858c.682.12 1.384.184 2.1.184 6.628 0 12-5.373 12-12Z'/%3e%3cpath fill='white' d='M9.014 17.824 5.04 18.959l1.135-3.973 2.368.47z'/%3e%3cpath fill='%23F7F9FC' d='M8.544 15.456 5.041 18.96l3.972-1.135z'/%3e%3cpath fill='%23E4E8EC' d='M6.467 18.552 5.45 17.533l-.41 1.427 1.426-.407Z'/%3e%3cpath fill='%23D2D6DC' d='m5.957 18.043-.916.916 1.426-.407z'/%3e%3cpath fill='%23FFD658' d='m15.828 5.331 2.837 2.837-9.651 9.652-2.838-2.837z'/%3e%3cpath fill='%23FFC326' d='m7.594 16.404 9.651-9.651 1.419 1.418-9.652 9.652z'/%3e%3cpath fill='%23FF5331' d='m18.312 8.525-2.837-2.838 1.123-1.123c.44-.44 1.154-.44 1.595 0l1.243 1.243c.44.44.44 1.154 0 1.594z'/%3e%3cpath fill='%23F44D2C' d='m18.816 5.186-1.921 1.92 1.418 1.419 1.124-1.124c.44-.44.44-1.154 0-1.594l-.622-.621Z'/%3e%3c/svg%3e";let K={author:G,edtior:G,expert:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3ccircle cx='12' cy='12' r='12' fill='%23FFCB37'/%3e%3ccircle cx='12' cy='12' r='10.5' fill='%23FE921D'/%3e%3cpath fill='white' d='M11.443 5.137a.6.6 0 0 1 1.114 0l1.436 3.577a.6.6 0 0 0 .516.375l3.846.26a.6.6 0 0 1 .344 1.06l-2.958 2.471a.6.6 0 0 0-.197.607l.94 3.738a.6.6 0 0 1-.9.655l-3.265-2.05a.6.6 0 0 0-.638 0l-3.265 2.05a.6.6 0 0 1-.9-.655l.94-3.738a.6.6 0 0 0-.198-.607L5.3 10.41a.6.6 0 0 1 .344-1.06l3.846-.26a.6.6 0 0 0 .517-.375z'/%3e%3c/svg%3e","fact-check":"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath fill='%2300C076' d='M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16'/%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='m11.946 5.466-5.28 4.8-2.4-2.182'/%3e%3c/svg%3e",medical:Z},PopupExpert=({trackingCategory:e="Together",locale:t,isOpen:a=!0,onClose:n,enableAnimation:o=!0,expertId:r,overwriteProfileProps:l,avatarFallback:s=w.C.getAssetPath("avatar.jpg")})=>{let{t:d}=(0,h.u)(),[c,p]=(0,i.useState)(null),[m,u]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{if(a&&r&&String(null==c?void 0:c.user_id)!==String(r)){u(!0);try{p(null),(0,k.c)((0,k.g)(P.D9.GET_EXPERT_BY_ID,{id:r}),"get").then(e=>{p(Object.assign(Object.assign({},null==e?void 0:e.data),l))})}catch(e){console.error(e)}u(!1)}},[a,r,null==c?void 0:c.user_id]),i.createElement(i.Fragment,null,i.createElement(H,{"data-open":a,"data-animation":o,onClick:e=>e.stopPropagation()},m||!c?i.createElement(T.L,null):i.createElement("div",{className:"popup-content"},i.createElement("div",{className:"close-button",onClick:n},i.createElement("img",{src:U,style:{width:20,height:20},alt:"close-icon",loading:"lazy"})),i.createElement("div",{className:"main-info"},i.createElement("div",{className:"border-banner"}),i.createElement("div",{className:"avatar-title"},i.createElement(W,null,i.createElement("div",{className:"image-container"},i.createElement("div",{style:{position:"relative"}},i.createElement(E.I,{src:null==c?void 0:c.avatar,className:"profile-image",alt:"avatar",backupSrc:s}),i.createElement("img",{className:"badge-avatar",src:K[null==c?void 0:c.role],alt:"badge",loading:"lazy"})))),i.createElement(Y,null,i.createElement(S.T,{size:"s3",className:"full-name",weight:"semiBold"},null==c?void 0:c.display_name),i.createElement("div",null,i.createElement(S.T,{size:"p4",color:N.r.colors.gray800},null==c?void 0:c.specialty," • "),i.createElement("a",{href:null==c?void 0:c.organisation_url,className:"organisation",target:"_blank",rel:"noreferrer"},i.createElement(S.T,{size:"p4",className:"organisation",color:N.r.colors.gray800,style:{textDecoration:"underline"}},null==c?void 0:c.organisation)))))),i.createElement(Y,null,i.createElement("div",{className:"experience"},i.createElement(S.T,{weight:"bold",size:"p4",color:N.r.colors.gray800,style:{paddingBottom:16}},d("expert.content.description").toUpperCase()),i.createElement("div",{className:"list-items"},null!=c&&!!c.experiences&&c.experiences.filter(e=>!!(e&&(e.title||e.organization))).slice(0,3).map((e,t)=>i.createElement(q,{key:t},i.createElement("img",{className:"bullet-point",src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3ccircle cx='12' cy='12' r='2' fill='%232D87F3'/%3e%3c/svg%3e",alt:"point",loading:"lazy"}),i.createElement("div",{className:"text-contain"},i.createElement($.H,{tag:"h6",color:N.r.colors.gray800},null==e?void 0:e.title),i.createElement(S.T,{size:"p2",color:N.r.colors.gray500},null==e?void 0:e.organization))))),i.createElement("a",{href:null==c?void 0:c.profile_url,style:{display:"inline-block",paddingTop:24}},i.createElement(S.T,{as:"span",size:"s4",color:"#2D87F3","data-event-category":e,"data-event-action":"See Full Doctor Profile","data-event-label":(0,k.l)(t)+(null==c?void 0:c.profile_url)},d("home.seeExpert"))))))),i.createElement(V,{"data-open":a,onClick:e=>{e.stopPropagation(),n()}}))},J=_.Z.div` position: fixed; left: 50%; width: 343px; background-color: ${N.r.colors.white}; border-radius: ${N.r.borderRadius}; box-shadow: 0px 0px 4px ${N.r.colors.gray200}; transform: translate(-50%, -50%); transition: all 0.5s ease-in-out; ${v.M.tdUp} { width: 750px; } &[data-animation='true'] { transition: all 0.5s ease-in-out; } &[data-open='true'] { z-index: 400; top: 50%; opacity: 1; visibility: visible; } &[data-open='false'] { top: -50%; } .popup-content { ${v.M.mbDown} { display: block; } display: flex; position: relative; z-index: 111; height: 100%; .button-see-more { margin: 32px 0; padding: 0; > * { display: inline-block; } } .close-button { position: absolute; z-index: 100; top: 10px; right: 10px; cursor: pointer; width: unset; height: unset; img { width: 100%; height: 100%; border-radius: 50%; } } } .main-info { padding-bottom: 32px; background-color: ${N.r.colors.primary50}; border-radius: ${N.r.borderRadius}; .btn-booking { display: flex; margin: 12px auto; } .avatar-title { position: relative; width: 100%; padding-top: 46px; text-align: center; } } `,X=_.Z.div` position: fixed; z-index: 110; top: 0; left: 0; width: 100%; height: 100%; align-items: center; background: rgba(38, 38, 38, 0.3); &[data-open='false'] { display: none; } `,Q=_.Z.div` .image-container { .badge-avatar { position: absolute; right: 0; bottom: 0; top: 0; } } display: flex; justify-content: center; padding-bottom: 15px; text-align: center; .profile-image { width: 100px; min-width: 100px; height: 100px; min-height: 100px; border-radius: 50%; object-fit: cover; } .badge-avatar { width: 24px; height: 24px; } `,ee=_.Z.div` position: relative; z-index: 9; .specialty { display: block; min-width: 240px; } padding: 0px 16px; text-align: center; .specialty { justify-content: center; } .experience { padding: 16px 0px 32px; text-align: left; .btn-wrapper { margin-top: 24px; } } p { max-width: 100%; } `,PopupHospital=({isOpen:e=!0,onClose:t,enableAnimation:a=!0,hospitalId:n,locale:o,isMobile:r,overwriteProfileProps:l,avatarFallback:s=w.C.getAssetPath("avatar.jpg"),trackingCategory:d="Together"})=>{let{t:c}=(0,h.u)(),[p,m]=(0,i.useState)(null),[u,g]=(0,i.useState)(!1);(0,i.useEffect)(()=>{if(e&&n&&String(null==p?void 0:p.id)!==String(n)){g(!0);try{m(null),(0,k.c)((0,k.b)(P.tC.GET_HOSPITAL_INFO,{hospital_branch_id:n,website_url:k.m[o]}),"get").then(e=>{m(Object.assign(Object.assign({},null==e?void 0:e._data.branch),l))})}catch(e){console.error(e)}g(!1)}},[e,n,null==p?void 0:p.id]);let v=(null==p?void 0:p.specialties)||[],f=(0,i.useMemo)(()=>v.map(e=>e.name),[v]);return i.createElement(i.Fragment,null,i.createElement(J,{"data-open":e,"data-animation":a,onClick:e=>e.stopPropagation()},u||!p?i.createElement(T.L,null):i.createElement("div",{className:"popup-content"},i.createElement("div",{className:"close-button",onClick:t},i.createElement("img",{src:U,style:{width:20,height:20},alt:"close-icon",loading:"lazy"})),i.createElement("div",{className:"main-info"},i.createElement("div",{className:"border-banner"}),i.createElement("div",{className:"avatar-title"},i.createElement(Q,null,i.createElement("div",{className:"image-container"},i.createElement("div",{style:{position:"relative"}},i.createElement(E.I,{src:null==p?void 0:p.logo,className:"profile-image",alt:"avatar",backupSrc:s}),i.createElement("img",{className:"badge-avatar",src:Z,alt:"badge",loading:"lazy"})))),i.createElement(ee,null,i.createElement(S.T,{size:"s3",weight:"semiBold",className:"full-name"},null==p?void 0:p.name),i.createElement("div",{className:"specialty"},v&&i.createElement(S.T,{size:"p4",color:N.r.colors.gray800},f.join(" • "),"•"),i.createElement("a",{href:(0,k.n)({id:p.id,name:p.name,slug:p.slug,locale:o}),className:"organisation",target:"_blank",rel:"noreferrer"},i.createElement(S.T,{size:"p4",className:"organisation",color:N.r.colors.gray800,style:{textDecoration:"underline"}},null==p?void 0:p.name))))),!r&&i.createElement("a",{href:(0,k.n)({id:p.id,name:p.name,slug:p.slug,locale:o})},i.createElement("div",{className:"btn-wrapper"},i.createElement(C.B,{color:"primary",size:"md",className:"btn-booking"},c("careBooking.bookAnAppointment"))))),i.createElement(ee,null,i.createElement("div",{className:"experience"},i.createElement(S.T,{weight:"bold",size:"s3",color:N.r.colors.gray800,style:{paddingBottom:16}},c("hospital.content.description").toUpperCase()),i.createElement(S.T,{size:"p2",color:N.r.colors.gray500},p.about),r?i.createElement("a",{href:(0,k.n)({id:p.id,name:p.name,slug:p.slug,locale:o})},i.createElement("div",{className:"btn-wrapper"},i.createElement(C.B,{color:"primary",size:"md",className:"btn-booking"},c("careBooking.bookAnAppointment")))):i.createElement("a",{href:(0,k.n)({id:p.id,name:p.name,slug:p.slug,locale:o})},i.createElement(S.T,{size:"s4",color:"#2D87F3",as:"span","data-event-category":d,"data-event-action":"See Full Hospital Profile","data-event-label":(0,k.l)(o)+(0,k.n)({id:p.id,name:p.name,slug:p.slug,locale:o})},c("home.seeHospital"))))))),i.createElement(X,{"data-open":e,onClick:e=>{e.stopPropagation(),t()}}))},ProfileDetailModal=({open:e,onClose:t,children:a,profileModalProps:n})=>{let{t:o}=(0,h.u)();return i.createElement(z.M,Object.assign({title:o("profilePanel.modal.heading"),titleProps:!0,className:"_2UKyiK1",opened:e,onClose:t,overlayOpacity:.2,overflow:"inside",transitionProps:{transition:"slide-left"},styles:{header:{borderBottom:0},inner:{padding:0,justifyContent:"flex-end"},modal:{height:"100%",borderRadius:0},body:{maxHeight:"100%"},content:{maxHeight:"100%",height:"100%",borderRadius:0}}},n),a)};m().extend(g());let CardAuthor=e=>{let{className:t="",community:r,name:p,username:m,url:u,avatar:g,role:b,title:y,userType:C="user",expertId:S,specialty:_,organisation:P,isMarryBaby:T,doctorId:$,hospitalId:z,hasQuickBooking:O,handleMakeAppointment:D,communityTrackingAttr:I,isAnonymous:B,showDetailPopup:F,showChatbotButton:R=!1,subLine:L,authActionWrapper:U,profileProps:Z,profileModalProps:H,extendEle:V,avatarProps:W,hideInfo:Y,timeText:q,onCloseFromPost:G,onChatWithBot:K,avatarIcon:J,badgeIconSize:X,hideBackground:Q,children:ee,styles:et,dataEventCategory:ea,dataEventAction:ei,dataEventLabel:en}=e,{data:{locale:eo,router:er,env:{isMarryBaby:el,togetherBasePath:es}}}=(0,i.useContext)(k.T),{isMobile:ed}=(0,E.u)(),{t:ec}=(0,h.u)(),{classes:ep}=j(void 0,{name:"CardAuthor",styles:et}),em="boolean"==typeof T?T:el,eu=em?"marryBaby":"helloSites",eg=B?ec("cardPost.anonymous"):p||m||"",eh=B?w.C.getAssetPath("avatar.jpg"):g,ev=B?void 0:b,[ef,ex]=(0,i.useState)(!1),{asPath:eb}=er||{},ey=`https://${A.v[eo]}${eb}`,onAuthorClick=()=>{if(B)return!1;F?ew(!0):u&&(window.location.href=u)};(0,i.useEffect)(()=>{(0,v.t)(ef)},[ef]);let[eE,ew]=(0,i.useState)(!1),ek=(null==e?void 0:e.role)==="expert",eC=!!($||z),eS=["expert"===ev&&P&&i.createElement("span",null,P),"expert"===ev&&_&&i.createElement("span",null,_),!("expert"===ev&&_&&P)&&(null==r?void 0:r.name)&&i.createElement("a",Object.assign({href:(null==r?void 0:r.slug)&&r.isActive&&!r.isHidden?`${es}/${null==r?void 0:r.slug}/`:void 0,className:"author-community-name"},I),`${null==r?void 0:r.name}`),q&&i.createElement("span",null,q)].filter(Boolean),[eN,e_]=(0,i.useState)(null);return(0,i.useEffect)(()=>{eE&&!eN&&("chatbot"===C?Promise.all([a.e(5231),a.e(7797),a.e(5454),a.e(5481),a.e(2354),a.e(9803),a.e(5349),a.e(4148),a.e(2509),a.e(1533),a.e(1108),a.e(9124),a.e(4190),a.e(6509),a.e(8674),a.e(9301),a.e(3792),a.e(3929),a.e(7884),a.e(9634),a.e(137),a.e(4414),a.e(1079),a.e(7613),a.e(8098),a.e(3416),a.e(2500),a.e(1570),a.e(3506),a.e(1413)]).then(a.bind(a,"wgE6")).then(e=>{e_(()=>e.ProfileChatbot)}):Promise.all([a.e(9409),a.e(6259),a.e(1818),a.e(7519),a.e(761),a.e(2189),a.e(5231),a.e(7797),a.e(5454),a.e(5481),a.e(2354),a.e(9803),a.e(5349),a.e(4148),a.e(2509),a.e(1533),a.e(1108),a.e(9124),a.e(4190),a.e(6509),a.e(8674),a.e(9301),a.e(3792),a.e(3929),a.e(7884),a.e(9634),a.e(137),a.e(4414),a.e(1079),a.e(7613),a.e(8098),a.e(3416),a.e(2500),a.e(1570),a.e(3506),a.e(1413)]).then(a.bind(a,"aUqw")).then(e=>{e_(()=>e.ProfileDetail)}))},[eE,C]),i.createElement(M.Provider,{value:{displayName:eg,title:y,role:ev,siteType:eu,handleMakeAppointment:D,doctorId:$,hospitalId:z,currentUrl:ey}},i.createElement(ProfileDetailModal,{open:eE,onClose:()=>ew(!1),profileModalProps:H},eN&&i.createElement(eN,Object.assign({currentPageUrl:en,authActionWrapper:U,onCloseFromPost:()=>{ew(!1),null==G||G()},onChatWithBot:K},Z,{authorProps:Object.assign({userId:null==e?void 0:e.userId,avatar:eh,name:null==e?void 0:e.name,role:null==e?void 0:e.role,title:null==e?void 0:e.title,doctorId:$,hospitalId:z,hasQuickBooking:O,userType:C},null==Z?void 0:Z.authorProps)}))),"expert"===ev&&S?i.createElement(PopupExpert,{isOpen:ef,onClose:()=>ex(!1),expertId:S}):null,"expert"===ev&&$?i.createElement(PopupDoctor,{isOpen:ef,onClose:()=>ex(!1),doctorId:$,locale:eo}):null,"expert"===ev&&z?i.createElement(PopupHospital,{isOpen:ef,onClose:()=>ex(!1),hospitalId:z,locale:eo}):null,i.createElement("div",{className:`hhg-card-author ${ep.root} ${t} ${ek?"expert-author":""}`,"data-background":!Q&&ek,"data-is-marrybaby":em},i.createElement(CardAuthor$1,{dataEventCategory:ea,dataEventAction:ei,dataEventLabel:en,onAvatarClick:onAuthorClick,avatarProps:Object.assign(Object.assign({avatar:B?w.C.getAssetPath(em?"anomyous-avatar-1.svg":"anomyous-avatar.svg"):eh,username:eg},W),{style:{cursor:!B&&(u||F)?"pointer":"default"}}),avatarIcon:J||ek&&i.createElement(n.Z,{size:X||15})},ee?i.createElement("div",{onClick:onAuthorClick},ee):!Y&&i.createElement(CardAuthor$1.Row,null,i.createElement(CardAuthor$1.ColLeft,null,i.createElement(s.k,{align:"center",onClick:onAuthorClick},i.createElement(CardAuthor$1.MainText,{onClick:onAuthorClick},eg,"chatbot"===C?i.createElement(i.Fragment,null," ",i.createElement(o.Z,{color:N.r.colors.primaryBase,size:16,style:{display:"inline-block",transform:"translate(0, 2px)"}}),R&&i.createElement("div",{style:{marginTop:"8px"}},i.createElement(d.z,{color:"primary",size:"xs",variant:"filled",type:"button",leftIcon:i.createElement(x.I.App,{size:16}),onClick:()=>{null==K||K()}},ec("chatbot.with.me")))):i.createElement(AuthorBadgeItem,null))),L||i.createElement(CardAuthor$1.SubTextRow,{style:O?{position:"relative"}:{}},eS.map((e,t)=>i.createElement(i.Fragment,null,0!==t&&i.createElement(CardAuthor$1.SubDivider,null),i.createElement(CardAuthor$1.SubText,null,e))),O&&eC&&i.createElement(l.x,{sx:{marginTop:(0,c.h)(5)}},i.createElement(f.B,{bookingId:$||z,bookingType:$?"doctor":z?"hospital":void 0,size:ed?"xs":"sm"})))))),V&&V))};CardAuthor.MainText=CardAuthor$1.MainText,CardAuthor.SubText=CardAuthor$1.SubText,CardAuthor.SubTextRow=CardAuthor$1.SubTextRow,CardAuthor.SubDivider=CardAuthor$1.SubDivider,CardAuthor.AuthorBadge=AuthorBadgeItem,CardAuthor.DisplayName=()=>{let{displayName:e}=(0,i.useContext)(M);return i.createElement(l.x,null,e)}}}]);