"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[932],{Rj6C:function(e,t,a){a.d(t,{T:function(){return TextArea}});var l=a("otAR"),i=a("q1tI"),n=a("0qvZ"),r=a("QAkY"),o=a("1WmY");let TextArea=e=>{var{styles:t}=e,a=(0,l.a)(e,["styles"]);let s=(0,o.u)(),{classes:c}=(0,r.u)({variantStyle:s},{name:"MantineTextarea",styles:t});return i.createElement(n.g,Object.assign({classNames:{input:c.input},minRows:2,maxRows:4},a))}},uXCw:function(e,t,a){a.d(t,{U:function(){return UserAvatar}});var l=a("otAR"),i=a("q1tI"),n=a("ejmp"),r=a("rBCA"),o=a("iBNF");let s=r.Z.div` width: ${e=>e.size||40}px; height: ${e=>e.size||40}px; flex-shrink: 0; cursor: pointer; img { border-radius: 50%; } .avatar { width: 100%; height: 100%; object-fit: cover; } .avatar-default { display: flex; align-items: center; justify-content: center; background-color: ${o.r.colors.secondaryBase}; border-radius: 50%; color: white; font-size: 1em; font-weight: bold; line-height: 1; } &[data-is-marrybaby='true'] { .avatar-default { background-color: ${o.r.mbColors.pink}; } } `,UserAvatar=e=>{var{className:t,isMarryBaby:a,style:r,avatar:o,username:c,size:d}=e,p=(0,l.a)(e,["className","isMarryBaby","style","avatar","username","size"]);let{data:{env:{isMarryBaby:m}}}=(0,i.useContext)(n.T),[u,g]=(0,i.useState)(!1);return i.createElement(s,Object.assign({"data-is-marrybaby":"boolean"==typeof a?a:m,className:t,style:r,size:d},p),o&&!u?i.createElement("img",{loading:"lazy",src:o,className:"avatar",alt:"avatar",onError:()=>{u||g(!0)}}):i.createElement("div",{className:"avatar avatar-default"},c&&(null==c?void 0:c.length)>0?c[0].toUpperCase():"A"))}},u7Sf: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 l=a("q1tI"),i=a("Frvz"),n=a("daqB"),r=a("/npG"),o=a("Eso5"),s=a("SPK5"),c=a("mAfZ"),d=a("mYVa"),p=a("Wgwc"),m=a.n(p),u=a("QgiU"),g=a.n(u),h=a("Frmf"),v=a("q+5q"),x=a("+v/W"),b=a("WYQf"),E=a("otAR"),f=a("uXCw"),y=a("c1cU"),w=a("38FU"),C=a("ejmp"),k=a("ASLx"),N=a("V50O"),A=a("iBNF"),z=a("rBCA"),$=a("IQVP"),T=a("Q/Ck"),P=a("D9+h"),S=a("KWqw"),j=a("xrdX");let MainText=({children:e,className:t=""})=>l.createElement("div",{className:`tMiOKib ${t}`},e),SubText=({children:e,className:t=""})=>l.createElement("div",{className:`uDcqD-2 ${t}`},e);var F={container:"sTU4T4I",info:"tCql9Je",avatarWrapper:"_3j7uYhH",avatarIcon:"PHABgoT"};let CardAuthor$1=({avatarProps:e,title:t,subTitle:a,children:i,className:n="",style:r,onAvatarClick:o,avatarIcon:s,dataEventCategory:c,dataEventAction:d,dataEventLabel:p})=>l.createElement("div",{className:`${F.container} ${n}`,style:r},l.createElement("div",{className:F.avatarWrapper,onClick:o,"data-event-category":c,"data-event-action":d,"data-event-label":p},l.createElement(f.U,Object.assign({},e)),s&&l.createElement("div",{className:F.avatarIcon},s)),l.createElement("div",{className:`${F.info} ${n}`,style:{minHeight:`${(null==e?void 0:e.size)||40}px`}},i||l.createElement(l.Fragment,null,t&&l.createElement(MainText,null,t),a&&l.createElement(SubText,null,a))));CardAuthor$1.MainText=MainText,CardAuthor$1.SubText=SubText,CardAuthor$1.SubDivider=({className:e=""})=>l.createElement("span",{className:`m-HVXw1 ${e}`}),CardAuthor$1.Row=({children:e,className:t=""})=>l.createElement("div",{className:`dZWeHns ${t} row`},e),CardAuthor$1.ColLeft=({children:e,className:t=""})=>l.createElement("div",{className:`${t} col-left`},e),CardAuthor$1.ColRight=({children:e,className:t=""})=>l.createElement("div",{className:`${t} col-right`},e),CardAuthor$1.SubTextRow=e=>{var{children:t,className:a=""}=e,i=(0,E.a)(e,["children","className"]);return l.createElement("div",Object.assign({className:`pDlsows ${a}`},i),t)};var B=(0,r.k)(()=>({root:{verticalAlign:"bottom"}}));let D=(0,l.createContext)({}),AuthorBadgeItem=({styles:e,className:t,classNames:a})=>{let{role:i,siteType:n,title:r}=(0,l.useContext)(D),{cx:o,classes:s}=B(void 0,{name:"AuthorBadgeItem",styles:e,classNames:a});return i?l.createElement(x.A,{className:o(s.root,t),siteType:n,role:i,title:r}):null};var M=(0,r.k)(()=>({root:{}}));let I=z.Z.div` position: fixed; left: 50%; width: 343px; background-color: ${A.r.colors.white}; border-radius: ${A.r.borderRadius}; box-shadow: 0px 0px 4px ${A.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: ${A.r.colors.primary50}; border-radius: ${A.r.borderRadius}; .btn-booking { display: flex; margin: 12px auto; } .avatar-title { position: relative; width: 100%; padding-top: 46px; text-align: center; } } `,O=z.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; } `,_=z.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.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; } `,Z=z.Z.ul` padding-left: 18px; li { list-style-type: disc; } `;var H="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",U="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:i,locale:n,isMobile:r,overwriteProfileProps:o,avatarFallback:s=w.C.getAssetPath("avatar.jpg"),trackingCategory:c="Together"})=>{var d,p,m;let{t:u}=(0,h.u)(),[g,v]=(0,l.useState)(null),[x,b]=(0,l.useState)(!1);(0,l.useEffect)(()=>{if(e&&i&&String(null==g?void 0:g.id)!==String(i)){b(!0);try{v(null),(0,C.c)((0,C.b)($.tC.GET_DOCTOR_INFO,{doctorId:i,website_url:C.m[n]}),"get").then(e=>{v(Object.assign(Object.assign({},null==e?void 0:e._data.doctor),o))})}catch(e){console.error(e)}b(!1)}},[e,i,null==g?void 0:g.id]);let E=(null==g?void 0:g.experiences)||[],f=(null==g?void 0:g.specialties)||[],z=f.map(e=>(null==e?void 0:e.name)||e).join(" • "),P=E.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 l.createElement(l.Fragment,null,l.createElement(I,{"data-open":e,"data-animation":a,onClick:e=>e.stopPropagation()},x||!g?l.createElement(T.L,null):l.createElement("div",{className:"popup-content"},l.createElement("div",{className:"close-button",onClick:t},l.createElement("img",{src:H,style:{width:20,height:20},alt:"close-icon",loading:"lazy"})),l.createElement("div",{className:"main-info"},l.createElement("div",{className:"border-banner"}),l.createElement("div",{className:"avatar-title"},l.createElement(_,null,l.createElement("div",{className:"image-container"},l.createElement("div",{style:{position:"relative"}},l.createElement(y.I,{src:null==g?void 0:g.avatar,backupSrc:s,className:"profile-image",alt:"avatar"}),l.createElement("img",{className:"badge-avatar",src:U,alt:"badge",loading:"lazy"})))),l.createElement(R,null,l.createElement(N.T,{size:"s3",weight:"semiBold",className:"full-name"},null==g?void 0:g.name),l.createElement("div",{className:"specialty"},z&&l.createElement(l.Fragment,null,l.createElement(N.T,{size:"p4",color:A.r.colors.gray800},z," • ")),l.createElement("a",{href:(0,C.n)({id:null===(d=null==g?void 0:g.organization)||void 0===d?void 0:d.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:n}),className:"organisation",target:"_blank",rel:"noreferrer"},l.createElement(N.T,{size:"p4",className:"organisation",color:A.r.colors.gray800,style:{textDecoration:"underline"}},null==g?void 0:g.organization.name))))),!r&&l.createElement("div",{className:"btn-wrapper"},l.createElement("a",{href:(0,C.o)({name:g.name,id:g.id,locale:n})},l.createElement(k.B,{color:"primary",size:"md",className:"btn-booking"},u("careBooking.bookAnAppointment"))))),P&&l.createElement(R,null,l.createElement("div",{className:"experience"},l.createElement(N.T,{weight:"bold",size:"s3",color:A.r.colors.gray800,style:{paddingBottom:16}},u("expert.content.description").toUpperCase()),l.createElement(Z,null,P.map((e,t)=>l.createElement("li",{key:t},l.createElement(N.T,{size:"p2"},renderExperienceText(e))))),r?l.createElement("div",{className:"btn-wrapper"},l.createElement("a",{href:(0,C.o)({name:g.name,id:g.id,locale:n})},l.createElement(k.B,{color:"primary",size:"md",className:"btn-booking"},u("careBooking.bookAnAppointment")))):l.createElement("a",{href:(0,C.o)({name:g.name,id:g.id,locale:n})},l.createElement(N.T,{size:"s4",color:"#2D87F3",style:{paddingTop:24},"data-event-category":c,"data-event-action":"See Full Doctor Profile","data-event-label":(0,C.l)(n)+(0,C.o)({name:g.name,id:g.id,locale:n})},u("home.seeExpert"))))))),l.createElement(O,{"data-open":e,onClick:e=>{e.stopPropagation(),t()}}))},q=z.Z.div` position: fixed; left: 50%; width: 343px; background-color: ${A.r.colors.white}; border-radius: ${A.r.borderRadius}; box-shadow: 0px 0px 4px ${A.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: ${A.r.colors.primary50}; border-radius: ${A.r.borderRadius}; .avatar-title { position: relative; width: 100%; padding-top: 46px; text-align: center; } } `,L=z.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.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; } `,V=z.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; } `,Y=z.Z.div` display: flex; margin-top: 8px; .bullet-point { width: 24px; height: 24px; } `;var K="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 Q={author:K,edtior:K,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:U},PopupExpert=({trackingCategory:e="Together",locale:t,isOpen:a=!0,onClose:i,enableAnimation:n=!0,expertId:r,overwriteProfileProps:o,avatarFallback:s=w.C.getAssetPath("avatar.jpg")})=>{let{t:c}=(0,h.u)(),[d,p]=(0,l.useState)(null),[m,u]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{if(a&&r&&String(null==d?void 0:d.user_id)!==String(r)){u(!0);try{p(null),(0,C.c)((0,C.g)($.D9.GET_EXPERT_BY_ID,{id:r}),"get").then(e=>{p(Object.assign(Object.assign({},null==e?void 0:e.data),o))})}catch(e){console.error(e)}u(!1)}},[a,r,null==d?void 0:d.user_id]),l.createElement(l.Fragment,null,l.createElement(q,{"data-open":a,"data-animation":n,onClick:e=>e.stopPropagation()},m||!d?l.createElement(T.L,null):l.createElement("div",{className:"popup-content"},l.createElement("div",{className:"close-button",onClick:i},l.createElement("img",{src:H,style:{width:20,height:20},alt:"close-icon",loading:"lazy"})),l.createElement("div",{className:"main-info"},l.createElement("div",{className:"border-banner"}),l.createElement("div",{className:"avatar-title"},l.createElement(W,null,l.createElement("div",{className:"image-container"},l.createElement("div",{style:{position:"relative"}},l.createElement(y.I,{src:null==d?void 0:d.avatar,className:"profile-image",alt:"avatar",backupSrc:s}),l.createElement("img",{className:"badge-avatar",src:Q[null==d?void 0:d.role],alt:"badge",loading:"lazy"})))),l.createElement(V,null,l.createElement(N.T,{size:"s3",className:"full-name",weight:"semiBold"},null==d?void 0:d.display_name),l.createElement("div",null,l.createElement(N.T,{size:"p4",color:A.r.colors.gray800},null==d?void 0:d.specialty," • "),l.createElement("a",{href:null==d?void 0:d.organisation_url,className:"organisation",target:"_blank",rel:"noreferrer"},l.createElement(N.T,{size:"p4",className:"organisation",color:A.r.colors.gray800,style:{textDecoration:"underline"}},null==d?void 0:d.organisation)))))),l.createElement(V,null,l.createElement("div",{className:"experience"},l.createElement(N.T,{weight:"bold",size:"p4",color:A.r.colors.gray800,style:{paddingBottom:16}},c("expert.content.description").toUpperCase()),l.createElement("div",{className:"list-items"},null!=d&&!!d.experiences&&d.experiences.filter(e=>!!(e&&(e.title||e.organization))).slice(0,3).map((e,t)=>l.createElement(Y,{key:t},l.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"}),l.createElement("div",{className:"text-contain"},l.createElement(P.H,{tag:"h6",color:A.r.colors.gray800},null==e?void 0:e.title),l.createElement(N.T,{size:"p2",color:A.r.colors.gray500},null==e?void 0:e.organization))))),l.createElement("a",{href:null==d?void 0:d.profile_url,style:{display:"inline-block",paddingTop:24}},l.createElement(N.T,{as:"span",size:"s4",color:"#2D87F3","data-event-category":e,"data-event-action":"See Full Doctor Profile","data-event-label":(0,C.l)(t)+(null==d?void 0:d.profile_url)},c("home.seeExpert"))))))),l.createElement(L,{"data-open":a,onClick:e=>{e.stopPropagation(),i()}}))},X=z.Z.div` position: fixed; left: 50%; width: 343px; background-color: ${A.r.colors.white}; border-radius: ${A.r.borderRadius}; box-shadow: 0px 0px 4px ${A.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: ${A.r.colors.primary50}; border-radius: ${A.r.borderRadius}; .btn-booking { display: flex; margin: 12px auto; } .avatar-title { position: relative; width: 100%; padding-top: 46px; text-align: center; } } `,G=z.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; } `,J=z.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.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:i,locale:n,isMobile:r,overwriteProfileProps:o,avatarFallback:s=w.C.getAssetPath("avatar.jpg"),trackingCategory:c="Together"})=>{let{t:d}=(0,h.u)(),[p,m]=(0,l.useState)(null),[u,g]=(0,l.useState)(!1);(0,l.useEffect)(()=>{if(e&&i&&String(null==p?void 0:p.id)!==String(i)){g(!0);try{m(null),(0,C.c)((0,C.b)($.tC.GET_HOSPITAL_INFO,{hospital_branch_id:i,website_url:C.m[n]}),"get").then(e=>{m(Object.assign(Object.assign({},null==e?void 0:e._data.branch),o))})}catch(e){console.error(e)}g(!1)}},[e,i,null==p?void 0:p.id]);let v=(null==p?void 0:p.specialties)||[],x=(0,l.useMemo)(()=>v.map(e=>e.name),[v]);return l.createElement(l.Fragment,null,l.createElement(X,{"data-open":e,"data-animation":a,onClick:e=>e.stopPropagation()},u||!p?l.createElement(T.L,null):l.createElement("div",{className:"popup-content"},l.createElement("div",{className:"close-button",onClick:t},l.createElement("img",{src:H,style:{width:20,height:20},alt:"close-icon",loading:"lazy"})),l.createElement("div",{className:"main-info"},l.createElement("div",{className:"border-banner"}),l.createElement("div",{className:"avatar-title"},l.createElement(J,null,l.createElement("div",{className:"image-container"},l.createElement("div",{style:{position:"relative"}},l.createElement(y.I,{src:null==p?void 0:p.logo,className:"profile-image",alt:"avatar",backupSrc:s}),l.createElement("img",{className:"badge-avatar",src:U,alt:"badge",loading:"lazy"})))),l.createElement(ee,null,l.createElement(N.T,{size:"s3",weight:"semiBold",className:"full-name"},null==p?void 0:p.name),l.createElement("div",{className:"specialty"},v&&l.createElement(N.T,{size:"p4",color:A.r.colors.gray800},x.join(" • "),"•"),l.createElement("a",{href:(0,C.n)({id:p.id,name:p.name,slug:p.slug,locale:n}),className:"organisation",target:"_blank",rel:"noreferrer"},l.createElement(N.T,{size:"p4",className:"organisation",color:A.r.colors.gray800,style:{textDecoration:"underline"}},null==p?void 0:p.name))))),!r&&l.createElement("a",{href:(0,C.n)({id:p.id,name:p.name,slug:p.slug,locale:n})},l.createElement("div",{className:"btn-wrapper"},l.createElement(k.B,{color:"primary",size:"md",className:"btn-booking"},d("careBooking.bookAnAppointment"))))),l.createElement(ee,null,l.createElement("div",{className:"experience"},l.createElement(N.T,{weight:"bold",size:"s3",color:A.r.colors.gray800,style:{paddingBottom:16}},d("hospital.content.description").toUpperCase()),l.createElement(N.T,{size:"p2",color:A.r.colors.gray500},p.about),r?l.createElement("a",{href:(0,C.n)({id:p.id,name:p.name,slug:p.slug,locale:n})},l.createElement("div",{className:"btn-wrapper"},l.createElement(k.B,{color:"primary",size:"md",className:"btn-booking"},d("careBooking.bookAnAppointment")))):l.createElement("a",{href:(0,C.n)({id:p.id,name:p.name,slug:p.slug,locale:n})},l.createElement(N.T,{size:"s4",color:"#2D87F3",as:"span","data-event-category":c,"data-event-action":"See Full Hospital Profile","data-event-label":(0,C.l)(n)+(0,C.n)({id:p.id,name:p.name,slug:p.slug,locale:n})},d("home.seeHospital"))))))),l.createElement(G,{"data-open":e,onClick:e=>{e.stopPropagation(),t()}}))},ProfileDetailModal=({open:e,onClose:t,children:a,profileModalProps:i})=>{let{t:n}=(0,h.u)();return l.createElement(S.M,Object.assign({title:n("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}}},i),a)};m().extend(g());let CardAuthor=e=>{let{className:t="",community:r,name:p,username:m,url:u,avatar:g,role:E,title:f,userType:k="user",expertId:N,specialty:z,organisation:$,isMarryBaby:T,doctorId:P,hospitalId:S,hasQuickBooking:F,handleMakeAppointment:B,communityTrackingAttr:I,isAnonymous:O,showDetailPopup:_,showChatbotButton:R=!1,subLine:Z,authActionWrapper:H,profileProps:U,profileModalProps:q,extendEle:L,avatarProps:W,hideInfo:V,timeText:Y,onCloseFromPost:K,onChatWithBot:Q,avatarIcon:X,badgeIconSize:G,hideBackground:J,children:ee,styles:et,dataEventCategory:ea,dataEventAction:el,dataEventLabel:ei}=e,{data:{locale:en,router:er,env:{isMarryBaby:eo,togetherBasePath:es}}}=(0,l.useContext)(C.T),{isMobile:ec}=(0,y.u)(),{t:ed}=(0,h.u)(),{classes:ep}=M(void 0,{name:"CardAuthor",styles:et}),em="boolean"==typeof T?T:eo,eu=em?"marryBaby":"helloSites",eg=O?ed("cardPost.anonymous"):p||m||"",eh=O?w.C.getAssetPath("avatar.jpg"):g,ev=O?void 0:E,[ex,eb]=(0,l.useState)(!1),{asPath:eE}=er||{},ef=`https://${j.v[en]}${eE}`,onAuthorClick=()=>{if(O)return!1;_?ew(!0):u&&(window.location.href=u)};(0,l.useEffect)(()=>{(0,v.t)(ex)},[ex]);let[ey,ew]=(0,l.useState)(!1),eC=(null==e?void 0:e.role)==="expert",ek=!!(P||S),eN=["expert"===ev&&$&&l.createElement("span",null,$),"expert"===ev&&z&&l.createElement("span",null,z),!("expert"===ev&&z&&$)&&(null==r?void 0:r.name)&&l.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}`),Y&&l.createElement("span",null,Y)].filter(Boolean),[eA,ez]=(0,l.useState)(null);return(0,l.useEffect)(()=>{ey&&!eA&&("chatbot"===k?Promise.all([a.e(5231),a.e(7797),a.e(5454),a.e(106),a.e(3684),a.e(5349),a.e(4148),a.e(2509),a.e(1533),a.e(1108),a.e(9124),a.e(4190),a.e(932),a.e(4276),a.e(5464),a.e(6509),a.e(8674),a.e(9353),a.e(3929),a.e(137),a.e(4414),a.e(7613),a.e(8098),a.e(3416),a.e(3012),a.e(1570),a.e(6192),a.e(6918),a.e(5965),a.e(3301),a.e(1413)]).then(a.bind(a,"spTn")).then(e=>{ez(()=>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(106),a.e(3684),a.e(5349),a.e(4148),a.e(2509),a.e(1533),a.e(1108),a.e(9124),a.e(4190),a.e(932),a.e(4276),a.e(5464),a.e(6509),a.e(8674),a.e(9353),a.e(3929),a.e(137),a.e(4414),a.e(7613),a.e(8098),a.e(3416),a.e(3012),a.e(1570),a.e(6192),a.e(6918),a.e(5965),a.e(3301),a.e(1413)]).then(a.bind(a,"aUqw")).then(e=>{ez(()=>e.ProfileDetail)}))},[ey,k]),l.createElement(D.Provider,{value:{displayName:eg,title:f,role:ev,siteType:eu,handleMakeAppointment:B,doctorId:P,hospitalId:S,currentUrl:ef}},l.createElement(ProfileDetailModal,{open:ey,onClose:()=>ew(!1),profileModalProps:q},eA&&l.createElement(eA,Object.assign({currentPageUrl:ei,authActionWrapper:H,onCloseFromPost:()=>{ew(!1),null==K||K()},onChatWithBot:Q},U,{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:P,hospitalId:S,hasQuickBooking:F,userType:k},null==U?void 0:U.authorProps)}))),"expert"===ev&&N?l.createElement(PopupExpert,{isOpen:ex,onClose:()=>eb(!1),expertId:N}):null,"expert"===ev&&P?l.createElement(PopupDoctor,{isOpen:ex,onClose:()=>eb(!1),doctorId:P,locale:en}):null,"expert"===ev&&S?l.createElement(PopupHospital,{isOpen:ex,onClose:()=>eb(!1),hospitalId:S,locale:en}):null,l.createElement("div",{className:`hhg-card-author ${ep.root} ${t} ${eC?"expert-author":""}`,"data-background":!J&&eC,"data-is-marrybaby":em},l.createElement(CardAuthor$1,{dataEventCategory:ea,dataEventAction:el,dataEventLabel:ei,onAvatarClick:onAuthorClick,avatarProps:Object.assign(Object.assign({avatar:O?w.C.getAssetPath(em?"anomyous-avatar-1.svg":"anomyous-avatar.svg"):eh,username:eg},W),{style:{cursor:!O&&(u||_)?"pointer":"default"}}),avatarIcon:X||eC&&l.createElement(i.Z,{size:G||15})},ee?l.createElement("div",{onClick:onAuthorClick},ee):!V&&l.createElement(CardAuthor$1.Row,null,l.createElement(CardAuthor$1.ColLeft,null,l.createElement(s.k,{align:"center",onClick:onAuthorClick},l.createElement(CardAuthor$1.MainText,{onClick:onAuthorClick},eg,"chatbot"===k?l.createElement(l.Fragment,null," ",l.createElement(n.Z,{color:A.r.colors.primaryBase,size:16,style:{display:"inline-block",transform:"translate(0, 2px)"}}),R&&l.createElement("div",{style:{marginTop:"8px"}},l.createElement(c.z,{color:"primary",size:"xs",variant:"filled",type:"button",leftIcon:l.createElement(b.I.App,{size:16}),onClick:()=>{null==Q||Q()}},ed("chatbot.with.me")))):l.createElement(AuthorBadgeItem,null))),Z||l.createElement(CardAuthor$1.SubTextRow,{style:F?{position:"relative"}:{}},eN.map((e,t)=>l.createElement(l.Fragment,null,0!==t&&l.createElement(CardAuthor$1.SubDivider,null),l.createElement(CardAuthor$1.SubText,null,e))),F&&ek&&l.createElement(o.x,{sx:{marginTop:(0,d.h)(5)}},l.createElement(x.B,{bookingId:P||S,bookingType:P?"doctor":S?"hospital":void 0,size:ec?"xs":"sm"})))))),L&&L))};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,l.useContext)(D);return l.createElement(o.x,null,e)}}}]);