"use strict";(self.webpackChunkhhgDiscoverV1=self.webpackChunkhhgDiscoverV1||[]).push([[6654],{q6HN:function(e,t,n){n.d(t,{m:function(){return Container}});var l=n("BGKE"),i=n("TSYQ"),r=n.n(i);let Container=e=>{let{className:t,isFluid:n,...i}=e;return(0,l.Y)("div",{className:r()("hhg-page-container",t,{fluid:n}),...i})}},Z51S:function(e,t,n){if(8068==n.j)var l=n("BGKE");var i=n("+OUp");let r=8068==n.j?(0,i.forwardRef)((e,t)=>(0,l.Y)("svg",{width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 24 24",ref:t,...e,children:(0,l.Y)("path",{d:"M6 2c-1.156 0-2 .965-2 2v18.04l8-2.974 8 2.973V4c0-.523-.191-1.055-.566-1.43-.38-.379-.91-.57-1.434-.57z"})})):null;t.A=8068==n.j?r:null},JnH1:function(e,t,n){if(8068==n.j)var l=n("BGKE");var i=n("+OUp");let r=8068==n.j?(0,i.forwardRef)((e,t)=>(0,l.FD)("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[(0,l.Y)("mask",{id:"a",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:0,y:-1,width:24,height:25,children:(0,l.Y)("path",{fill:"#D9D9D9",d:"M0-.5h24v24H0z"})}),(0,l.Y)("g",{mask:"url(#a)",children:(0,l.Y)("path",{d:"m12 16.962-3.97 1.703q-.903.387-1.716-.148-.814-.534-.814-1.503V4.808q0-.758.525-1.283T7.308 3h9.384q.758 0 1.283.525t.525 1.283v12.206q0 .969-.814 1.503-.813.535-1.717.148zm0-1.662 4.567 1.967q.154.067.293-.029a.3.3 0 0 0 .14-.26V4.809a.3.3 0 0 0-.096-.212.3.3 0 0 0-.212-.096H7.308a.3.3 0 0 0-.212.096.3.3 0 0 0-.096.212v12.17a.3.3 0 0 0 .14.26q.138.096.293.03z",fill:"currentColor"})})]})):null;t.A=8068==n.j?r:null},oWGZ:function(e,t,n){if(8068==n.j)var l=n("BGKE");var i=n("+OUp");let r=8068==n.j?(0,i.forwardRef)((e,t)=>(0,l.FD)("svg",{width:"1em",height:"1em",viewBox:"0 0 19 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[(0,l.Y)("mask",{id:"a",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:0,y:0,width:19,height:18,children:(0,l.Y)("path",{fill:"currentColor",d:"M.5 0h18v18H.5z"})}),(0,l.Y)("g",{mask:"url(#a)",children:(0,l.Y)("path",{d:"m7.663 11.637 6.478-6.48a.556.556 0 0 1 .802 0q.175.175.175.402a.55.55 0 0 1-.175.4l-6.806 6.807a.65.65 0 0 1-.474.203.65.65 0 0 1-.475-.203L4.057 9.635a.54.54 0 0 1-.165-.398.56.56 0 0 1 .176-.404.55.55 0 0 1 .401-.175q.227 0 .401.175z",fill:"currentColor"})})]})):null;t.A=8068==n.j?r:null},mx14:function(e,t,n){if(8068==n.j)var l=n("BGKE");var i=n("+OUp");let r=8068==n.j?(0,i.forwardRef)((e,t)=>(0,l.Y)("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:(0,l.Y)("path",{d:"m8.712 10 3.394 3.394q.172.173.177.435a.6.6 0 0 1-.177.443.6.6 0 0 1-.44.181.6.6 0 0 1-.438-.18l-3.745-3.746A.7.7 0 0 1 7.27 10q0-.15.048-.28a.7.7 0 0 1 .165-.247l3.745-3.745a.6.6 0 0 1 .435-.177.6.6 0 0 1 .443.177q.18.18.181.439 0 .258-.181.439z"})})):null;t.A=8068==n.j?r:null},bxHT:function(e,t,n){if(8068==n.j)var l=n("BGKE");var i=n("+OUp");let r=8068==n.j?(0,i.forwardRef)((e,t)=>(0,l.Y)("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:(0,l.Y)("path",{d:"m11.288 10-3.394 3.394a.6.6 0 0 0-.177.435.6.6 0 0 0 .177.443q.18.181.439.181.258 0 .44-.18l3.744-3.746A.7.7 0 0 0 12.73 10q0-.15-.048-.28a.7.7 0 0 0-.165-.247L8.772 5.728a.6.6 0 0 0-.435-.177.6.6 0 0 0-.443.177.6.6 0 0 0-.181.439q0 .258.181.439z"})})):null;t.A=8068==n.j?r:null},TwxO:function(e,t,n){var l=n("BGKE"),i=n("+OUp");let r=(0,i.forwardRef)((e,t)=>(0,l.Y)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:(0,l.Y)("path",{d:"M12 16.5115L16.073 12.4537C16.2115 12.3154 16.383 12.242 16.5875 12.2337C16.792 12.2254 16.9718 12.2987 17.127 12.4537C17.2718 12.5987 17.3442 12.7744 17.3442 12.9807C17.3442 13.187 17.2718 13.3627 17.127 13.5077L12.6327 18.002C12.5391 18.0955 12.4403 18.1615 12.3365 18.2C12.2326 18.2385 12.1205 18.2577 12 18.2577C11.8795 18.2577 11.7673 18.2385 11.6635 18.2C11.5596 18.1615 11.4609 18.0955 11.3672 18.002L6.87298 13.5077C6.73465 13.3692 6.66131 13.1977 6.65298 12.9932C6.64465 12.7887 6.71798 12.6089 6.87298 12.4537C7.01798 12.3089 7.19365 12.2365 7.39998 12.2365C7.60632 12.2365 7.78198 12.3089 7.92698 12.4537L12 16.5115ZM12 10.5307L16.073 6.47296C16.2115 6.33462 16.383 6.26129 16.5875 6.25296C16.792 6.24462 16.9718 6.31796 17.127 6.47296C17.2718 6.61796 17.3442 6.79362 17.3442 6.99996C17.3442 7.20629 17.2718 7.38196 17.127 7.52696L12.6327 12.0212C12.5391 12.1147 12.4403 12.1807 12.3365 12.2192C12.2326 12.2577 12.1205 12.277 12 12.277C11.8795 12.277 11.7673 12.2577 11.6635 12.2192C11.5596 12.1807 11.4609 12.1147 11.3672 12.0212L6.87298 7.52696C6.73465 7.38846 6.66131 7.21696 6.65298 7.01246C6.64465 6.80796 6.71798 6.62812 6.87298 6.47296C7.01798 6.32812 7.19365 6.25571 7.39998 6.25571C7.60632 6.25571 7.78198 6.32812 7.92698 6.47296L12 10.5307Z",fill:"currentColor"})}));t.A=r},UBf0:function(e,t,n){if(n.d(t,{ED:function(){return o},Xn:function(){return a.A},Oi:function(){return c.A},zf:function(){return d},aZ:function(){return h},U5:function(){return p}}),8068==n.j)var l=n("BGKE");var i=n("+OUp");let r=8068==n.j?(0,i.forwardRef)((e,t)=>(0,l.FD)("svg",{width:"1em",height:"1em",viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[(0,l.FD)("g",{clipPath:"url(#clip0_161_9843)",children:[(0,l.Y)("path",{d:"M10.9998 13.3333H4.6665C5.0298 13.1276 5.33971 12.8395 5.5713 12.4921C5.80288 12.1447 5.94967 11.7478 5.99984 11.3333V9.33333C6.03954 8.48738 6.3087 7.66818 6.77847 6.96353C7.24824 6.25888 7.9009 5.69535 8.6665 5.33333C8.6665 4.97971 8.80698 4.64057 9.05703 4.39052C9.30708 4.14048 9.64622 4 9.99984 4C10.3535 4 10.6926 4.14048 10.9426 4.39052C11.1927 4.64057 11.3332 4.97971 11.3332 5.33333C12.0988 5.69535 12.7514 6.25888 13.2212 6.96353C13.691 7.66818 13.9601 8.48738 13.9998 9.33333V10",stroke:"currentColor",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),(0,l.Y)("path",{d:"M8 13.3335V14.0002C7.99999 14.3427 8.08799 14.6796 8.25554 14.9784C8.4231 15.2772 8.66461 15.528 8.95691 15.7067C9.24921 15.8853 9.58251 15.9859 9.92485 15.9988C10.2672 16.0117 10.6071 15.9364 10.912 15.7802",stroke:"currentColor",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),(0,l.Y)("path",{d:"M14.6668 12.6667L13.3335 14.6667H16.0002L14.6668 16.6667",stroke:"currentColor",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"})]}),(0,l.Y)("defs",{children:(0,l.Y)("clipPath",{id:"clip0_161_9843",children:(0,l.Y)("rect",{width:16,height:16,fill:"white",transform:"translate(2 2)"})})})]})):null;var o=8068==n.j?r:null;n("Z51S"),n("JnH1"),n("oWGZ");var a=n("mx14"),c=n("bxHT");n("TwxO");let s=8068==n.j?(0,i.forwardRef)((e,t)=>(0,l.FD)("svg",{width:"1em",height:"1em",viewBox:"0 0 21 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[(0,l.Y)("path",{d:"M6.59503 4.05298L5.73858 3.7678L5.45249 2.91042C5.36015 2.63338 4.90114 2.63338 4.8088 2.91042L4.52271 3.7678L3.66627 4.05298C3.52775 4.09916 3.43359 4.22862 3.43359 4.37529C3.43359 4.52196 3.52775 4.65143 3.66627 4.6976L4.52271 4.98279L4.8088 5.84017C4.85497 5.97869 4.98444 6.07194 5.13019 6.07194C5.27595 6.07194 5.40632 5.97778 5.45159 5.84017L5.73768 4.98279L6.59412 4.6976C6.73264 4.65143 6.8268 4.52196 6.8268 4.37529C6.8268 4.22862 6.73355 4.09916 6.59503 4.05298Z",fill:"none"}),(0,l.Y)("path",{d:"M14.4954 10.6041L17.0131 8.14965L12.4774 7.49145L10.4494 3.3811L8.42148 7.49145L3.88574 8.14965L7.16759 11.3492L6.39262 15.866L10.3263 13.7982",stroke:"currentColor",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round",fill:"none"}),(0,l.Y)("path",{d:"M16.0236 14.0102L14.8802 13.629L14.499 12.4855C14.375 12.1161 13.7639 12.1161 13.6399 12.4855L13.2587 13.629L12.1153 14.0102C11.9306 14.0717 11.8057 14.2447 11.8057 14.4393C11.8057 14.634 11.9306 14.8069 12.1153 14.8684L13.2587 15.2496L13.6399 16.3931C13.7014 16.5778 13.8753 16.7027 14.0699 16.7027C14.2646 16.7027 14.4375 16.5778 14.4999 16.3931L14.8811 15.2496L16.0245 14.8684C16.2092 14.8069 16.3342 14.634 16.3342 14.4393C16.3342 14.2447 16.2092 14.0717 16.0245 14.0102H16.0236Z",fill:"currentColor"}),(0,l.Y)("path",{d:"M15.2024 5.41835C15.5774 5.41835 15.8814 5.11434 15.8814 4.73932C15.8814 4.36431 15.5774 4.0603 15.2024 4.0603C14.8274 4.0603 14.5234 4.36431 14.5234 4.73932C14.5234 5.11434 14.8274 5.41835 15.2024 5.41835Z",fill:"currentColor"})]})):null;var d=8068==n.j?s:null;let u=8068==n.j?(0,i.forwardRef)((e,t)=>(0,l.FD)("svg",{width:"1em",height:"1em",viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[(0,l.Y)("mask",{id:"a",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:0,y:0,width:21,height:20,children:(0,l.Y)("path",{fill:"currentColor",d:"M.75 0h20v20h-20z"})}),(0,l.Y)("g",{mask:"url(#a)"}),(0,l.Y)("path",{d:"M11 16.444a2.45 2.45 0 0 0 2.445-2.452C13.445 12.129 11 10 11 10s-2.444 2.13-2.444 3.992A2.45 2.45 0 0 0 11 16.444",stroke:"currentColor",strokeWidth:1.333,strokeLinecap:"round",strokeLinejoin:"round"}),(0,l.Y)("path",{d:"M11 16.445c2.7 0 4.89-2.196 4.89-4.904 0-3.726-4.89-7.985-4.89-7.985s-4.889 4.26-4.889 7.985a4.897 4.897 0 0 0 4.89 4.904",stroke:"currentColor",strokeWidth:1.333,strokeLinecap:"round",strokeLinejoin:"round"})]})):null;var h=8068==n.j?u:null;if(2708==n.j)var l=n("BGKE");let g=(0,i.forwardRef)((e,t)=>(0,l.Y)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:(0,l.Y)("path",{d:"M12 13.4693L7.92701 17.527C7.78851 17.6654 7.61701 17.7387 7.41251 17.747C7.20801 17.7554 7.02818 17.682 6.87301 17.527C6.72818 17.382 6.65576 17.2064 6.65576 17C6.65576 16.7937 6.72818 16.618 6.87301 16.473L11.3673 11.9788C11.4609 11.8853 11.5597 11.8193 11.6635 11.7808C11.7673 11.7423 11.8795 11.723 12 11.723C12.1205 11.723 12.2327 11.7423 12.3365 11.7808C12.4403 11.8193 12.5391 11.8853 12.6328 11.9788L17.127 16.473C17.2653 16.6115 17.3387 16.783 17.347 16.9875C17.3553 17.192 17.282 17.3719 17.127 17.527C16.982 17.6719 16.8063 17.7443 16.6 17.7443C16.3937 17.7443 16.218 17.6719 16.073 17.527L12 13.4693ZM12 7.46927L7.92701 11.527C7.78851 11.6654 7.61701 11.7387 7.41251 11.747C7.20801 11.7554 7.02818 11.682 6.87301 11.527C6.72818 11.382 6.65576 11.2064 6.65576 11C6.65576 10.7937 6.72818 10.618 6.87301 10.473L11.3673 5.97877C11.4609 5.88527 11.5597 5.81927 11.6635 5.78077C11.7673 5.74227 11.8795 5.72302 12 5.72302C12.1205 5.72302 12.2327 5.74227 12.3365 5.78077C12.4403 5.81927 12.5391 5.88527 12.6328 5.97877L17.127 10.473C17.2653 10.6115 17.3387 10.783 17.347 10.9875C17.3553 11.192 17.282 11.3719 17.127 11.527C16.982 11.6719 16.8063 11.7443 16.6 11.7443C16.3937 11.7443 16.218 11.6719 16.073 11.527L12 7.46927Z",fill:"currentColor"})}));var p=g},"4tKT":function(e,t,n){n.r(t),n.d(t,{DefaultPagination:function(){return Z},TitleComp:function(){return TitleComp},default:function(){return clinicLocator}});var l=n("BGKE"),i=n("+OUp"),r=n("rBCA"),o=n("P+HS"),a=n("oTwY"),c=n("kd6S"),s=n("vH4S"),d=n("sEfC"),u=n.n(d),h=n("dDsW"),g=n("q6HN"),icons_GPS=e=>{let{size:t=20,color:n="#595959",...i}=e;return(0,l.Y)("svg",{width:t,height:t,viewBox:"0 0 18 18",fill:"none",...i,children:(0,l.Y)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M16.2565 8.45986H17.4601C17.7554 8.45986 17.9953 8.69701 18 8.99105V9.00869C17.9953 9.30289 17.7554 9.53988 17.4601 9.53988H16.2565C15.9859 13.1346 13.129 15.9918 9.53428 16.2626V17.4601C9.53428 17.7554 9.29729 17.9953 9.00325 18H8.98561C8.69142 17.9953 8.45442 17.7554 8.45442 17.4601V16.2626C4.85991 15.9916 2.00299 13.1344 1.73241 9.53988H0.540009C0.241743 9.53988 0 9.29814 0 8.99987C0 8.70177 0.241743 8.45986 0.540009 8.45986H1.73241C2.00299 4.86535 4.85991 2.0081 8.45459 1.73719V0.540009C8.45459 0.241743 8.69633 0 8.9946 0C9.2927 0 9.53461 0.241743 9.53461 0.540009V1.73719C13.1291 2.0081 15.9859 4.86535 16.2565 8.45986ZM2.78507 8.99971C2.78507 12.4291 5.56504 15.2094 8.99443 15.2096C12.4225 15.2058 15.2005 12.4279 15.2046 8.99987C15.2046 5.57048 12.4245 2.79018 8.99493 2.79018C5.56553 2.79018 2.78524 5.57015 2.78507 8.99971ZM8.99443 12.5998C10.9826 12.5998 12.5944 10.988 12.5944 8.99987C12.5944 7.01171 10.9826 5.40009 8.99443 5.40009C7.00627 5.40009 5.39465 7.01171 5.39465 8.99987C5.39465 10.988 7.00627 12.5998 8.99443 12.5998Z",fill:n})})},icons_ZoomOutMap=e=>{let{size:t=24,color:n="#595959",...i}=e;return(0,l.Y)("svg",{width:t,height:t,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...i,children:(0,l.Y)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.432 17.566q.651.652 1.566.652t1.566-.652q.652-.651.652-1.566t-.652-1.566a2.13 2.13 0 0 0-1.566-.652q-.915 0-1.566.652A2.13 2.13 0 0 0 13.78 16q0 .915.652 1.566M6.234 27.17l3.764-3.764v2.928q0 .425.287.713a.97.97 0 0 0 .713.287q.424 0 .712-.287a.97.97 0 0 0 .288-.713v-5.128q0-.511-.346-.859a1.17 1.17 0 0 0-.859-.346H5.665a.97.97 0 0 0-.713.287.97.97 0 0 0-.287.713q0 .424.287.712a.97.97 0 0 0 .713.288h2.928L4.83 25.764a.96.96 0 0 0-.29.703q0 .412.29.702t.709.284a.97.97 0 0 0 .696-.284m15.764-.836v-2.928l3.764 3.764q.29.29.703.29t.702-.29a.94.94 0 0 0 .284-.709.97.97 0 0 0-.284-.696L23.403 22h2.928q.425 0 .713-.287A.97.97 0 0 0 27.33 21a.97.97 0 0 0-.287-.712.97.97 0 0 0-.713-.288h-5.128q-.511 0-.859.346-.346.348-.346.859v5.128q0 .425.287.713a.97.97 0 0 0 .713.287q.424 0 .712-.287a.97.97 0 0 0 .288-.713M4.828 6.236 8.594 10H5.665a.97.97 0 0 0-.713.287.97.97 0 0 0-.287.713q0 .424.287.712a.97.97 0 0 0 .713.288h5.128q.512 0 .859-.346.345-.347.346-.859V5.667a.97.97 0 0 0-.287-.713.97.97 0 0 0-.713-.287.97.97 0 0 0-.712.287.97.97 0 0 0-.288.713v2.928L6.234 4.831a.96.96 0 0 0-.703-.29.96.96 0 0 0-.702.29.94.94 0 0 0-.284.709q.008.42.284.696M26.332 10h-2.928l3.764-3.764a.96.96 0 0 0 .29-.703.96.96 0 0 0-.29-.702.94.94 0 0 0-.709-.284.97.97 0 0 0-.696.284l-3.764 3.764V5.667a.97.97 0 0 0-.287-.713.97.97 0 0 0-.713-.287.97.97 0 0 0-.712.287.97.97 0 0 0-.288.713v5.128q0 .512.346.859.348.345.86.346h5.127q.425 0 .713-.287A.97.97 0 0 0 27.33 11a.97.97 0 0 0-.287-.712.97.97 0 0 0-.713-.288",fill:n})})},p=n("9brV"),m=n("mwIZ"),f=n.n(m),v=n("JOt+"),w=n("ROQx"),C=n("LSb+"),b=n("iZSu");let x={streetViewControl:!1,fullscreenControl:!1,mapTypeControl:!1,styles:[{featureType:"all",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"poi.medical",elementType:"labels.icon",stylers:[{visibility:"on"}]}]},y={[b.ne.Vietnam]:{lat:10.762622,lng:106.660172},[b.ne.Indonesia]:{lat:-6.208763,lng:106.845599},[b.ne.Malaysia]:{lat:3.139003,lng:101.686855},[b.ne.Thailand]:{lat:13.756331,lng:100.501765},[b.ne.Cambodia]:{lat:11.544873,lng:104.892167},[b.ne.Taiwan]:{lat:25.032969,lng:121.565418},[b.ne.Myanmar]:{lat:19.763306,lng:96.07851},[b.ne.PhilippinesEnglish]:{lat:14.599512,lng:120.98422},[b.ne.India]:{lat:28.613939,lng:77.209021}};var L=n("GcSG"),k=n("U0k8");let S=(0,i.forwardRef)((e,t)=>{let{options:n=x,zoom:r=13,onLoad:o,center:a,onCenterChanged:c,markerItems:s,markerItemProps:{onClick:d}={},children:u}=e,[h,g]=(0,i.useState)(),p=(0,i.useCallback)(e=>{g(e),null==o||o(e)},[o]);return(0,i.useImperativeHandle)(t,()=>h,[h]),(0,l.Y)(L.LoadScript,{googleMapsApiKey:k.rp,children:(0,l.FD)(L.GoogleMap,{id:"clinicLocator--map",zoom:r,options:n,onLoad:p,onCenterChanged:c,mapContainerClassName:"g-map",center:a,children:[null==s?void 0:s.map(e=>(0,l.Y)(L.Marker,{position:{lat:Number(e.latitude),lng:Number(e.longitude)},onClick:()=>null==d?void 0:d(e)},e.id)),u]})})});var T=n("iBNF"),Y=n("RBzE"),B=n("wo9K"),A=n("o5qa"),D=n("DzJC"),M=n.n(D),F=n("UBf0"),N=n("TwxO"),E=n("a5L+"),I=n("1Hbx"),z=n("ChHM"),R=(0,s.createStyles)(e=>({root:{position:"relative"},selectedLabel:{padding:"".concat((0,s.rem)(4)," 0"),cursor:"pointer",userSelect:"none",maxWidth:200},selectedLabelText:{},item:{userSelect:"none",whiteSpace:"nowrap",padding:"".concat((0,s.rem)(8)," ").concat((0,s.rem)(12)),transition:"background .2s ease",cursor:"pointer",'&[data-is-current-loc="true"]':{position:"relative",marginBottom:16,"&:before":{position:"absolute",top:"calc(100% + 8px)",left:0,right:0,content:'""',borderBottom:"1px solid ".concat(e.colors.neutral[1])}},'&[data-selected="true"]':{cursor:"default",backgroundColor:e.colors.blue[0]},"&:hover":{backgroundColor:e.colors.gray[1]}},dropdownList:{minWidth:120,maxWidth:200,background:"#fff",position:"absolute",top:"100%",right:0,borderRadius:8,boxShadow:"0px 0px 1px 0px #0000000A, 0px 2px 8px 0px #0000000A, 0px 10px 16px 0px #0000000A"}}));let CustomSelect=e=>{var t;let{value:n,data:r=[],onSelectItem:a,styles:c,classNames:d,className:u,isMobile:h,...g}=e,{classes:p,cx:m}=R(void 0,{name:"CustomSelect__Select",styles:c,classNames:d}),[f,v]=(0,i.useState)(!1),w=(0,z.L)(()=>v(!1)),[C,b]=(0,i.useState)("string"==typeof n&&(null===(t=r.filter(e=>e.value===n))||void 0===t?void 0:t[0])||null);return(0,l.FD)(s.Box,{...g,className:m(p.root,u),ref:w,children:[(0,l.FD)(s.Flex,{justify:"space-between",align:"center",gap:8,onClick:()=>v(e=>!e),className:p.selectedLabel,children:[(0,l.Y)(o.Text,{className:p.selectedLabelText,size:h?"p3":"p4",lineClamp:1,children:null==C?void 0:C.label}),(0,l.Y)(I.A,{size:20})]}),(0,l.Y)(s.Transition,{mounted:f,transition:"fade",children:e=>(0,l.Y)(s.Box,{style:e,children:(0,l.Y)(s.ScrollArea.Autosize,{mah:320,type:"auto",scrollbarSize:6,className:p.dropdownList,children:r.map((e,t)=>{let n=(null==C?void 0:C.value)===e.value;return(0,l.Y)(s.Flex,{"data-selected":n,className:p.item,align:"center",gap:8,onClick:()=>{n||(v(!1),a(e),b(e))},children:(0,l.Y)(o.Text,{size:h?"p3":"p4",weight:n?"halfBold":"regular",lineClamp:1,children:e.label})},String(t))})})})})]})},_=(0,i.createContext)({}),ClinicLocatorSidebarLocation=e=>{var t;let{data:n=[],defaultValue:r="",onChange:o,...a}=e,{formatMessage:c}=(0,h.A)(),{isMobile:s}=(0,i.useContext)(_);return n&&(null==n?void 0:n.length)?(0,l.Y)(CustomSelect,{...a,isMobile:s,value:r,data:[{label:c({id:"clinicLocator.filterAll"}),value:"",type:null==n?void 0:null===(t=n[0])||void 0===t?void 0:t.type},...n],onSelectItem:e=>o(e)}):null};var P=n("Wbba"),j=n("VZtU"),q=(0,s.createStyles)(function(e){let{isUseMobileLayout:t,backgroundColor:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{resultItem:{padding:(0,s.rem)(12),display:"flex",flexDirection:"column",gap:4,...!t&&{[e.fn.largerThan("sm")]:{gap:8,padding:(0,s.rem)(16)}}},wrapper:{flexDirection:"column-reverse",[e.fn.smallerThan("md")]:{height:"80vh"},...!t&&{[e.fn.largerThan("md")]:{height:"min(800px,100vh)",flexDirection:"row"}}},content:{height:"100%",position:"relative",...!t&&{[e.fn.largerThan("md")]:{flex:1,minWidth:0,position:"static"}}},searchBarMobile:{},sidebar:{width:"100%",backgroundColor:e.colors.neutral50,...!t&&{[e.fn.largerThan("md")]:{width:(0,s.rem)(456),overflow:"auto",position:"relative","&:after":{content:'""',height:30,position:"absolute",left:0,right:0,bottom:0,backgroundImage:"linear-gradient(0deg, #FAFAFA 0%, rgba(250, 250, 250, 0) 100%)"}},[e.fn.largerThan(1500)]:{width:"max(".concat((0,s.rem)(456),",25%)")}}},sidebarExtend:{order:3,paddingTop:(0,s.rem)(8),paddingInline:(0,s.rem)(16),paddingBottom:(0,s.rem)(12),...!t&&{[e.fn.largerThan("md")]:{order:1,paddingInline:(0,s.rem)(24),paddingTop:(0,s.rem)(40),paddingBottom:0}}},sidebarSticky:{order:1,zIndex:1,paddingInline:(0,s.rem)(16),paddingBlock:(0,s.rem)(8),...!t&&{[e.fn.largerThan("md")]:{order:2,paddingTop:(0,s.rem)(16),paddingInline:(0,s.rem)(24),paddingBottom:(0,s.rem)(12),width:"calc(100% - 6px)"}}},sidebarSearch:{[e.fn.smallerThan("sm")]:{marginBottom:10},...!t&&{[e.fn.largerThan("lg")]:{paddingBottom:(0,s.rem)(16)}}},countTitle:{gap:(0,s.rem)(8),alignItems:"center",...!t&&{[e.fn.largerThan("md")]:{flex:1,minWidth:0}},".mantine-Select-item":{whiteSpace:"nowrap",fontSize:(0,s.rem)(14),padding:"10px 16px"}},searchBtn:{...!t&&{[e.fn.largerThan("lg")]:{paddingTop:(0,s.rem)(12)}}},sidebarList:{maxWidth:"100%",order:2,display:"flex",gap:(0,s.rem)(8),flexDirection:"row",overflow:"auto",paddingInline:(0,s.rem)(16),[e.fn.smallerThan("md")]:{paddingBottom:16},[e.fn.largerThan("md")]:{...t&&{paddingTop:8,paddingBottom:16}},...!t&&{[e.fn.largerThan("md")]:{order:3,gap:0,flexDirection:"column",overflow:"hidden",paddingInline:0},[e.fn.largerThan("lg")]:{flex:1,minHeight:0}}},controlBtns:{transform:"translate(0, -50%)",backgroundColor:"#fff",borderRadius:(0,s.rem)(4),".zoomBtn":{border:"none",borderRadius:(0,s.rem)(4),borderTop:"1px solid ".concat(e.colors.gray100),borderInline:"1px solid ".concat(e.colors.gray100),"+ .zoomBtn":{borderRadius:0},"&:first-child":{borderRadius:"".concat((0,s.rem)(4)," ").concat((0,s.rem)(4)," 0 0")},"&:last-child":{borderRadius:"0 0 ".concat((0,s.rem)(4)," ").concat((0,s.rem)(4)),borderBottom:"1px solid ".concat(e.colors.gray100)},".zoomIcon":{width:"70%",height:"70%"},...!t&&{[e.fn.largerThan("sm")]:{width:(0,s.rem)(46),height:(0,s.rem)(46)}}}},contentWrapper:{position:"relative",maxHeight:"100%",display:"flex",overflow:"auto",flex:1,background:"white",transition:"all .3s ease",[e.fn.smallerThan("sm")]:{padding:"0 16px 16px",gap:(0,s.rem)(12)},...!t&&{[e.fn.largerThan("sm")]:{flexDirection:"column",'&[data-opened="false"]':{transform:"translate(-50%, 0)",opacity:0}}}},searchItem:{width:"100%",background:"white",'&[data-selected="true"]':{background:e.colors.blue[0]},[e.fn.smallerThan("sm")]:{border:"1px solid ".concat(e.colors.neutral[1]),borderRadius:(0,s.rem)(6)},...!t&&{[e.fn.largerThan("sm")]:{borderBottom:"1px solid ".concat(e.colors.neutral[1])}}},filterSelectRoot:{width:"120px"},filterSelectItem:{fontSize:"14px",padding:"8px 10px"},filterSelectInput:{height:"auto !important",border:0,paddingLeft:0,paddingRight:(0,s.rem)(22),":focus":{outline:0,boxShadow:"none"},[e.fn.smallerThan("sm")]:{textAlign:"right"}},filterSelectRightSection:{pointerEvents:"none",width:(0,s.rem)(20)},filterSelectDropdown:{...!t&&{[e.fn.largerThan("sm")]:{transform:"translate(-10px, 0)"}}},foundListRoot:{display:"flex",flexDirection:"column",transition:"all .3s ease",...!t&&{[e.fn.largerThan("sm")]:{position:"absolute",zIndex:2,top:(0,s.rem)(29),left:(0,s.rem)(10),maxHeight:"calc(100% - 53px)",width:(0,s.rem)(312),alignItems:"flex-start",'&[data-open="false"]':{pointerEvents:"none"}}},[e.fn.smallerThan("sm")]:{border:"none",transition:"all .3s ease",background:"white"}},foundListWrapper:{padding:"".concat((0,s.rem)(8)," ").concat((0,s.rem)(16)),[e.fn.smallerThan("sm")]:{'&[data-open="false"]':{borderBottom:"1px solid ".concat(e.colors.neutral[1])}},...!t&&{[e.fn.largerThan("sm")]:{padding:"".concat((0,s.rem)(8)," ").concat((0,s.rem)(12)),background:"white",borderBottom:"1px solid ".concat(e.colors.neutral[1]),pointerEvents:"initial",width:"100%",'&[data-open="false"]':{width:"auto"}}}},foundListInner:{[e.fn.smallerThan("sm")]:{justifyContent:"space-between"},...!t&&{[e.fn.largerThan("sm")]:{justifyContent:"space-between",'&[data-open="false"]':{justifyContent:"flex-start"}}}},arrowBtn:{cursor:"pointer",...!t&&{[e.fn.largerThan("sm")]:{marginTop:"3px"}}},titleComp:{flex:1,color:e.colors.gray800,fontSize:(0,s.rem)(24),fontWeight:700,lineHeight:(0,s.rem)(32),letterSpacing:(0,s.rem)(-.8),textAlign:"center",paddingTop:(0,s.rem)(48),paddingBottom:(0,s.rem)(16),...!t&&{[e.fn.largerThan(1112)]:{textAlign:"left",fontSize:(0,s.rem)(22),letterSpacing:(0,s.rem)(-.6),paddingTop:0,paddingBottom:0}}},viewExpertBtn:{height:"auto",paddingBlock:0,paddingLeft:0,paddingRight:0,marginLeft:"auto",borderRadius:(0,s.rem)(8),color:e.colors.primary600,backgroundColor:"transparent !important",".mantine-Button-leftIcon":{marginRight:(0,s.rem)(12)},...!t&&{[e.fn.largerThan("md")]:{height:(0,s.rem)(48),paddingBlock:(0,s.rem)(12),paddingLeft:(0,s.rem)(12),paddingRight:(0,s.rem)(16),color:"white",backgroundColor:"".concat(n||e.colors.primary600," !important"),"&:hover":{backgroundColor:"".concat(n||e.colors.primary500," !important")}}}}}});let H=(0,i.forwardRef)(function(e,t){let{id:n,name:r,address:a,...c}=e,{isMobile:d}=(0,i.useContext)(_),{classes:u}=q({isUseMobileLayout:d});return(0,l.FD)(s.Box,{className:u.resultItem,ref:t,...c,children:[(0,l.Y)(o.Text,{size:"s3",weight:"semiBold",children:r}),(0,l.Y)(o.Text,{size:"p4",sx:{display:"-webkit-box","-webkit-line-clamp":"3","-webkit-box-orient":"vertical",overflow:"hidden"},children:a})]},n)}),U=(0,i.forwardRef)((e,t)=>{let{searchData:n,loading:i,placeholder:r,onClickLeftIcon:a,value:c,icon:d=(0,l.Y)(j.A,{color:T.w.colors.gray300,onClick:a}),hideSearchDropdown:u,...g}=e,{formatMessage:p}=(0,h.A)(),m=p({id:"clinicLocator.inputPlaceholder",defaultMessage:"Search by hospital name"}),f=(0,l.FD)(s.Stack,{align:"center",sx:{position:"relative",padding:(0,s.rem)(40),width:"100%"},children:[(0,l.Y)(s.LoadingOverlay,{visible:null===n||!!i,sx:()=>({borderRadius:(0,s.rem)(20),border:0})}),(0,l.FD)(s.Stack,{align:"center",sx:{opacity:Number(!(null===n||i))},children:[(0,l.Y)(s.Flex,{align:"center",justify:"center",sx:{background:"white",borderRadius:"50%",width:(0,s.rem)(120),height:(0,s.rem)(120),img:{width:(0,s.rem)(80)}},children:(0,l.Y)("img",{src:P.C.getAssetPath("hospital.png"),alt:"Not found",loading:"lazy"})}),(0,l.Y)(o.Text,{size:"p4",children:p({id:"clinicLocator.notFound",defaultMessage:"No result found. Try another keyword!"})})]})]});return(0,l.Y)(o.Select,{ref:t,size:"lg",clearable:!0,keepSearch:!0,searchable:!0,withinPortal:!0,limit:20,icon:d,data:n||[],inputMode:"text",value:c||"",placeholder:r||m,filter:()=>!0,itemComponent:H,rightSection:null,dropdownPosition:"bottom",dropdownComponent:e=>{let{children:t}=e;return(0,l.FD)(s.ScrollArea,{scrollbarSize:8,className:"w-full",children:[t,(0,l.Y)(s.LoadingOverlay,{visible:!!i,sx:()=>({borderRadius:(0,s.rem)(20),border:0})})]})},nothingFound:f,styles:e=>{let t={border:0,padding:0,borderRadius:(0,s.rem)(20)};return(u||!c)&&(t.display="none"),{input:{borderRadius:(0,s.rem)(8),borderColor:e.colors.gray200,fontSize:(0,s.rem)(16),lineHeight:1.5,"&:not(.mantine-Textarea-input)":{[e.fn.smallerThan("sm")]:{height:40,fontSize:(0,s.rem)(14)}},"&[data-with-icon]":{paddingLeft:(0,s.rem)(48)},"&[disabled]":{opacity:1}},dropdown:t,item:{borderRadius:0,borderTop:"1px solid ".concat(e.colors.neutral100),"&:first-of-type":{borderTop:0}}}},...g})}),O=(0,i.forwardRef)((e,t)=>{let{color:n,loadingAt:r,extendComponent:a,clinics:c,clinicSelected:d,onSelectClinic:g,pagination:p=Z,searchData:m=[],searchValue:f,onChangeSearch:v,onSubmitSearch:w,onItemSubmitSearch:C,filter:b=[],onFilter:x,onLoadMore:y,searchRef:L,hideSearchDropdown:k}=e,{isMobile:S,locale:D}=(0,i.useContext)(_),{classes:I}=q({isUseMobileLayout:S}),{formatMessage:z}=(0,h.A)(),R=(0,i.useRef)(null),P=(0,i.useRef)(null),j=(0,i.useRef)(null),[H,O]=(0,i.useState)(f||""),[W,V]=(0,i.useState)(!0);(0,i.useImperativeHandle)(t,()=>({scrollTop:()=>{S?j.current&&j.current.scrollTo({left:0,behavior:"smooth"}):P.current&&P.current.scrollTo({top:0,behavior:"smooth"})}}));let G=(0,i.useRef)(y),K=(0,i.useRef)(p),J=(0,i.useRef)(r);(0,i.useEffect)(()=>{G.current=y,K.current=p,J.current=r},[y,p,r]);let Q=(0,i.useCallback)(M()(()=>{let e=K.current,t="string"==typeof J.current;if(e.current{let e=R.current,t=P.current;if(!e)return;let n=new IntersectionObserver(e=>{e[0].isIntersecting&&Q()},{root:t,threshold:.1,rootMargin:"0px 0px 400px 0px"});return n.observe(e),()=>{n.disconnect(),Q.cancel()}},[Q,S,null==c?void 0:c.length]);let{title:X}=(0,i.useMemo)(()=>({title:z({id:"clinicLocator.foundClinics",defaultMessage:"{count} Clinics"},{count:null==p?void 0:p.total_items.toLocaleString(D)})}),[null==p?void 0:p.total_items,D,z]),$=(0,i.useMemo)(()=>(null==p?void 0:p.current)<(null==p?void 0:p.last),[null==p?void 0:p.current,null==p?void 0:p.last]),ee=S?s.Flex:s.ScrollArea,et=S?{direction:"column"}:{viewportRef:P,styles:{root:{height:"100%"},thumb:{zIndex:2}},scrollbarSize:6},en=S?s.ScrollArea:s.Flex,el=S?{viewportRef:j,scrollbarSize:6,w:"100%",styles:e=>({root:{[e.fn.smallerThan("sm")]:{paddingLeft:0,paddingRight:0}},viewport:{[e.fn.smallerThan("sm")]:{paddingLeft:16,paddingRight:16}}})}:{},ei=S?s.Flex:s.Box,er=S?{gap:8}:{},eo=(0,i.useMemo)(()=>u()(e=>null==v?void 0:v(e),500),[v]);(0,i.useEffect)(()=>()=>eo.cancel(),[eo]);let ea=(0,i.useCallback)(e=>{e.includes("-----")||(O(e),eo(e))},[eo]),ec=(0,i.useCallback)(e=>{"Enter"===e.key&&(null==w||w(e.target.value))},[w]),es=(0,i.useCallback)(e=>{let{value:t,label:n,...l}=e;null==C||C(l)},[C]);return(0,i.useEffect)(()=>{O(f||"")},[f]),(0,l.FD)(ee,{className:"ClinicLocatorSidebar--wrapper",...et,children:[a&&(0,l.Y)(s.Flex,{align:"stretch",gap:(0,s.rem)(16),className:I.sidebarExtend,children:a}),(0,l.FD)(s.Box,{pos:"sticky",top:0,left:0,bg:T.w.colors.neutral50,sx:{zIndex:10},className:(0,s.clsx)("ClinicLocatorSidebar--sticky relative",{"pt-4":!S,"block md:flex md:flex-col md:gap-2":E.a},I.sidebarSticky),children:[(0,l.Y)(s.Flex,{gap:(0,s.rem)(8),align:"center",children:(0,l.Y)(o.Button,{onClick:()=>V(!W),leftIcon:W?(0,l.Y)(F.U5,{className:"text-[24px] text-gray800"}):(0,l.Y)(N.A,{className:"text-[24px] text-gray800"}),className:(0,s.clsx)("ml-auto !absolute top-[52px] right-[12px] !bg-[transparent] ",{"!block":S,"!hidden":!S,"md:top-[64px]":E.a})})}),(0,l.Y)(U,{ref:L,searchData:Array.isArray(m)?m.map(e=>({...e,value:"-----".concat(e.id),label:e.name})):null,loading:"search-bar"===r,value:H,onChange:ea,onItemSubmit:es,onKeyUp:ec,className:I.sidebarSearch,hideSearchDropdown:k}),(0,l.FD)(s.Flex,{gap:(0,s.rem)(8),align:"center",className:I.searchBtn,children:[(0,l.Y)(A.A,{size:24,color:n||T.w.colors.primary600}),(0,l.FD)(s.Flex,{className:I.countTitle,align:"center",gap:16,children:[(0,l.Y)(o.Text,{size:"s3",sx:{flex:1},children:X}),(0,l.Y)(ClinicLocatorSidebarLocation,{data:b,onChange:x})]})]})]}),(0,l.FD)(en,{...el,className:(0,s.clsx)("clinicLocatorSidebar--body",{"!hidden":S&&!W},I.sidebarList),children:[(0,l.Y)(s.LoadingOverlay,{visible:"sidebar"===r,sx:{borderRadius:(0,s.rem)(20)}}),(0,l.FD)(ei,{...er,children:[null==c?void 0:c.map((e,t)=>(0,l.FD)(s.Flex,{gap:(0,s.rem)(16),sx:{cursor:"pointer",wordBreak:"break-word"},className:(0,s.clsx)("clinicLocatorSidebar--item relative",{"min-w-[280px]":S,"p-3":S,"px-6 py-3":!S,"border-b border-solid border-gray100":!S,"bg-[transparent]":(null==d?void 0:d.id)===e.id&&!S,"bg-blue50":(null==d?void 0:d.id)===e.id,...S&&{"bg-white":(null==d?void 0:d.id)!==e.id}}),onClick:()=>null==g?void 0:g(e),children:[(0,l.Y)("div",{className:(0,s.clsx)("absolute bg-primary600",{"left-0 bottom-0 w-full h-[2px]":S,"top-0 left-0 w-[2px] h-full":!S,"opacity-100":(null==d?void 0:d.id)===e.id,"opacity-0":(null==d?void 0:d.id)!==e.id})}),!S&&(0,l.Y)(s.Box,{className:"w-8 h-8",children:(0,l.Y)(Y.I,{width:"100%",height:"100%",src:e.logo,alt:e.name,className:"object-contain"})}),(0,l.Y)(s.Box,{sx:{flex:1,minWidth:0},children:(0,l.FD)(o.Text,{lineClamp:S?3:void 0,children:[(0,l.Y)(o.Text,{size:"s3",weight:"semiBold",children:e.name}),(0,l.Y)(o.Text,{size:"p4",lineClamp:S?void 0:3,children:e.address})]})})]},"".concat(e.id,"-").concat(t))),$&&(0,l.FD)(s.Box,{py:20,sx:{textAlign:"center"},children:[(0,l.Y)("div",{ref:R,style:{height:1}}),(0,l.Y)(B.L,{className:"whitespace-nowrap"})]})]})]})]})});O.displayName="ClinicLocatorSidebar";var W=n("+u84"),V=n("xrdX"),G=n("bPK4");function SelectedClinicMarker(e){var t,n;let{selectedClinic:r,hideBooking:a}=e,{formatMessage:c}=(0,h.A)(),d=(0,s.useMantineTheme)(),{dataEventCategory:u,locale:g}=(0,i.useContext)(_),[m,f]=(0,i.useState)(),v=W.C.includes(g)?(0,G.JQ)({id:r.id,name:r.name,locale:g,slug:r.slug}):null,w=r.totalAvailableDoctors&&r.totalAvailableServices?{label:c({id:"articleAuthor.button",defaultMessage:"Book now"}),url:v}:r.totalAvailableDoctors?{label:c({id:"articleAuthor.button",defaultMessage:"Book now"}),url:"".concat(v,"?tab=").concat(null===(t=p.ix[g])||void 0===t?void 0:t.DOCTOR)}:r.totalAvailableServices?{label:c({id:"articleAuthor.button",defaultMessage:"Book now"}),url:"".concat(v,"?tab=").concat(null===(n=p.ix[g])||void 0===n?void 0:n.SERVICE)}:{label:c({id:"articlePage.careEmbedding.viewDetail"}),url:v};return(0,l.FD)(l.FK,{children:[(0,l.Y)("style",{children:"\n .gm-style img {\n max-height: none !important;\n max-width: 100%;\n object-fit: contain;\n }\n\n .gm-style-iw-c {\n padding: 12px; \n border-radius: 16px; \n box-shadow: 0px 0px 1px 0px rgba(0, 0, 0, 0.04), \n 0px 0px 2px 0px rgba(0, 0, 0, 0.06), \n 0px 4px 8px 0px rgba(0, 0, 0, 0.04);\n }\n\n .gm-style-iw > button {\n right: 0 !important;\n top: 0 !important;\n }\n\n .gm-style-iw-chr {\n position: absolute;\n right: 0;\n }\n "}),(0,l.Y)(L.Marker,{position:{lat:Number(r.latitude),lng:Number(r.longitude)},onLoad:f}),m&&(0,l.Y)(L.InfoWindow,{anchor:m,options:{minWidth:320,maxWidth:320},children:(0,l.FD)(s.Stack,{spacing:(0,s.rem)(4),sx:{paddingTop:10},children:[r.logo?(0,l.Y)("div",{children:(0,l.Y)("img",{loading:"lazy",src:r.logo,alt:r.name,width:"auto",height:48})}):null,(0,l.FD)(s.Stack,{spacing:(0,s.rem)(4),children:[(0,l.Y)(o.Text,{size:"s4",weight:"semiBold",children:r.name}),(0,l.Y)(o.Text,{size:"n1",children:r.address}),!a&&(r.totalAvailableDoctors||r.totalAvailableServices)?(0,l.FD)(o.Text,{size:"n1",children:[c({id:"clinicLocator.infoWindow.availableForBooking",defaultMessage:"Available for booking"}),": ",(0,l.FD)(s.Box,{component:"span",sx:e=>({span:{display:"inline-block"},"span + span":{position:"relative",marginLeft:(0,s.rem)(5),paddingLeft:(0,s.rem)(5),"&:before":{content:'""',width:(0,s.rem)(2),height:(0,s.rem)(2),borderRadius:"50%",background:e.colors.gray[6],position:"absolute",left:"0",top:"50%"}}}),children:[r.totalAvailableDoctors>0&&(0,l.Y)("span",{children:r.totalAvailableDoctors?c({id:"clinicLocator.infoWindow.availableDoctors"}):""}),r.totalAvailableServices>0&&(0,l.Y)("span",{children:(0,l.Y)("span",{children:r.totalAvailableServices?c({id:"clinicLocator.infoWindow.availableServices"}):""})})]})]}):null,(!a&&w.url||r.websiteUrl)&&(0,l.FD)(s.Flex,{align:"center",gap:16,sx:{"a:focus-visible":{outline:"none"}},children:[!a&&w.url&&(0,l.Y)(s.Box,{component:"a",href:w.url,target:"_blank",className:"pointer-event-child-none","data-event-category":u,"data-event-action":"Book Doctor via Clinic Click","data-event-label":"https://".concat(V.y[g]).concat(w.url),children:(0,l.Y)(o.Text,{size:"n1",sx:{color:d.colors.blue[8],textDecoration:"underline",textUnderlineOffset:(0,s.rem)(4)},children:w.label})}),r.websiteUrl&&(0,l.Y)(s.Box,{component:"a",href:r.websiteUrl,target:"_blank",className:"pointer-event-child-none","data-event-category":u,"data-event-action":"Clinic Directory - Go to Hospital Page","data-event-label":r.websiteUrl,children:(0,l.Y)(o.Text,{size:"n1",sx:{color:d.colors.blue[8],textDecoration:"underline",textUnderlineOffset:(0,s.rem)(4)},children:c({id:"clinicLocator.infoWindow.websiteUrl",defaultMessage:"Go to hospital page"})})})]})]})]})},r.id)]})}let Z={current:1,first:1,last:1,next:1,prev:1,total_items:0,items_per_page:20};var clinicLocator=e=>{var t,n;let{title:r,specialties:d=[],specialties_hashtag:p,defaultColor:m,hideBooking:b,onGetBrowserLoc:x,infoPath:L,isUseMobileLayout:k,isMobile:T,locale:Y,currentUrl:B,dataEventCategory:A="Service Connection",...D}=e,{formatMessage:M}=(0,h.A)(),{classes:F}=q({isUseMobileLayout:k}),N=(0,i.useRef)(null),E=(0,i.useRef)(null),I=(0,i.useRef)(null),z=(0,i.useRef)(null),R=function(e){let{specialties:t}=e,n={type:"hospital",allowSearchInDistrict:1,showDistricts:1};return t.length&&(n.specialtyIds=t.join(",")),n}({specialties:d}),[P,j]=(0,i.useState)(R),[H,U]=(0,i.useState)(),[W,V]=(0,i.useState)(null),[G,J]=(0,i.useState)([]),[Q,X]=(0,i.useState)(!1),[$,ee]=(0,i.useState)(!1),[et,en]=(0,i.useState)(!1),[el,ei]=(0,i.useState)(!1),{fetchClinics:er}=function(e){let{infoPath:t}=e,[n,l]=(0,i.useState)(!1),r=(0,i.useCallback)(async e=>{let{signal:n,...i}=e;l(!0);try{let e=await (0,v.callApiNew)(C.PATHS.CARE.GET_SEARCH_CARE,{params:i,signal:n},"careV2"),{_data:l}=e||{};if(!l)throw Error(JSON.stringify(e));let{searches:r}=l||{};return{data:{...l,searches:r.map(e=>{let n={...e};return t&&(n.name=f()(e,t,e.name)),(0,w.RW)(n)})},errors:[]}}catch(e){if("AbortError"===e.name||"canceled"===e.message)return{data:null,errors:[],isCanceled:!0};return{data:null,errors:[e]}}finally{l(!1)}},[t]);return(0,i.useMemo)(()=>({loading:n,setLoading:l,fetchClinics:r}),[n,l,r])}({infoPath:L}),eo=(0,i.useRef)(null),appendClinics=e=>{J(t=>{let n=[...t,...e],l=n.reduce((e,t)=>(e[t.id]=t,e),{});return Object.values(l)})},[ea,ec]=(0,i.useState)(null),[es,ed]=(0,i.useState)(null),[eu,eh]=(0,i.useState)(),[eg,ep]=(0,i.useState)(""),em=y[Y],{title:ef,viewExpertsBtn:ev}=(0,i.useMemo)(()=>({title:r||M({id:"section.clinicLocator.title",defaultMessage:"Explore the best Clinics for yourself"}),viewExpertsBtn:M({id:"section.clinicLocator.viewExpertsBtn",defaultMessage:"View Experts"})}),[M,r]),ew=(0,i.useMemo)(()=>(0,l.Y)(TitleComp,{title:ef}),[ef]),eC=(0,i.useCallback)(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(0==e.length)return!1;if(N.current){let t=new window.google.maps.LatLngBounds;if(null==e||e.forEach(e=>{t.extend(new window.google.maps.LatLng(e.latitude,e.longitude))}),t.getNorthEast().equals(t.getSouthWest())){let e=new google.maps.LatLng(t.getNorthEast().lat()+.005,t.getNorthEast().lng()+.005),n=new google.maps.LatLng(t.getNorthEast().lat()-.005,t.getNorthEast().lng()-.005);t.extend(e),t.extend(n)}N.current.fitBounds(t)}},[]);function formatFilterData(e){let{cities:t=[],districts:n=[]}=e,l=n.length?n.map(e=>({label:e.name,value:e.id,type:"district"})):t.length?t.map(e=>({label:e.name,value:e.id,type:"city"})):[];return l}let handleReset=async()=>{j(R),eb(R,"sidebar",e=>{var t;let{clinics:n,pagination:l,cities:i,districts:r}=e;ed({initialClinics:n,initialPagination:l,filter:formatFilterData({cities:i,districts:r})}),J(n||[]),V(null),ep(""),null===(t=z.current)||void 0===t||t.scrollTop()})},handleFetch=async function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],l={...R,...e&&{latitude:e.lat,longitude:e.lng,...t&&{distance:5}}};j(l),ep(""),eb(l,"sidebar",e=>{let{clinics:t,pagination:l,cities:i,districts:r}=e;ed({initialClinics:t,initialPagination:l,filter:formatFilterData({cities:i,districts:r})}),J(t||[]),n&&setTimeout(()=>{ei(n)},1e3)})},handleLoadMore=async()=>{let e={...P,page:Number(null==es?void 0:es.initialPagination.current)+1};j(e),eb(e,"load-more",e=>{let{clinics:t,pagination:n,cities:l,districts:i}=e;ed(e=>({initialClinics:[...(null==e?void 0:e.initialClinics)||[],...t],initialPagination:n,filter:function(e){if(!e||!e.length)return[];let t=new Map,n=[];return e.forEach(e=>t.set(e.value,e)),t.forEach(e=>{n.push(e)}),n}(((null==es?void 0:es.filter)||[]).concat(formatFilterData({cities:l,districts:i})))})),appendClinics(t),J(t||[])})},handleFilter=async e=>{let t=null==e?void 0:e.type,n=null==e?void 0:e.value,l={...P,page:1,..."district"===t?{districtId:n}:"city"===t?{cityId:n}:{}};n||(delete l.cityId,delete l.districtId,delete l.distance),j(l);try{eb(l,"sidebar",e=>{var t;let{clinics:n,pagination:l,cities:i,districts:r}=e;ed({initialClinics:n,initialPagination:l,filter:formatFilterData({cities:i,districts:r})}),appendClinics(n),J(n||[]),null===(t=z.current)||void 0===t||t.scrollTop()})}catch(e){console.error(e)}},eb=(0,i.useCallback)(u()(async(e,t,n)=>{eo.current&&eo.current.abort();let l=new AbortController;eo.current=l;try{U(t);let i=await er({...e,signal:l.signal});if((null==i?void 0:i.isCanceled)||l.signal.aborted)return;let{data:r}=i;if(!r)return;let{searches:o,districts:a,cities:c,pagination:s}=r;n&&n({clinics:o,pagination:s||Z,districts:a,cities:c})}catch(e){"AbortError"!==e.name&&console.error("Search Error:",e)}finally{l.signal.aborted||U(void 0)}},500),[null==es?void 0:es.filter]);(0,i.useEffect)(()=>()=>{eb.cancel()},[eb]);let handleSearch=async e=>{if(!e){eb.cancel(),handleReset();return}let t={...P,keyword:e,page:1};eb(t,"search-bar",e=>{let{clinics:t,pagination:n,cities:l,districts:i}=e;V({initialClinics:t,initialPagination:n,filter:formatFilterData({cities:l,districts:i})})})},trackSearchResults=(e,t)=>{var n,l;null===(n=(l=window).gtag)||void 0===n||n.call(l,"event","view_search_results",{event_category:A,event_action:"Clinic Directory",event_label:B,search_term:e,search_result_shown:((null==t?void 0:t.length)>0).toString()})},handleSubmitSearchValue=async e=>{var t,n;let l={...R,keyword:e,page:1};j(l),X(!0),ep(e),null==E||null===(t=E.current)||void 0===t||t.blur();let i=(null==W?void 0:W.initialClinics)||[];if("search-bar"!==H&&i.length>0){ed({initialClinics:i,initialPagination:(null==W?void 0:W.initialPagination)||Z,filter:(null==W?void 0:W.filter)||[]}),J(i),V(null),trackSearchResults(e,i),null===(n=z.current)||void 0===n||n.scrollTop();return}eb(l,"sidebar",t=>{var n;let{clinics:l,pagination:i,cities:r,districts:o}=t;ed({initialClinics:l,initialPagination:i||Z,filter:formatFilterData({cities:r,districts:o})}),J(l),V(null),trackSearchResults(e,l),null===(n=z.current)||void 0===n||n.scrollTop()})},handleMarkerClick=async function(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];if(ec(e),t&&ep(""),X(!0),N.current){let t=new window.google.maps.LatLngBounds;if(t.extend(new window.google.maps.LatLng(e.latitude,e.longitude)),t.getNorthEast().equals(t.getSouthWest())){let e=new google.maps.LatLng(t.getNorthEast().lat()+.01,t.getNorthEast().lng()+.01),n=new google.maps.LatLng(t.getNorthEast().lat()-.01,t.getNorthEast().lng()-.01);t.extend(e),t.extend(n)}N.current.fitBounds(t)}if(!es){J([e]);let{data:t}=await er({type:"hospital",latitude:e.latitude,longitude:e.longitude,distance:5,perPage:50,showDistricts:0}),{searches:n}=t;appendClinics(n)}},getCurrentLocation=()=>{if(!el){if(!navigator.geolocation)return console.log("Geolocation is not supported by this browser."),null;ee(!0),navigator.geolocation.getCurrentPosition(e=>{ee(!1),handleFetch({lat:e.coords.latitude.toFixed(8),lng:e.coords.longitude.toFixed(8)},!0,!0),eh({lat:e.coords.latitude,lng:e.coords.longitude}),null==x||x({lat:e.coords.latitude,lng:e.coords.longitude})},e=>(console.log("Error getting user location",e),ee(!1),1===e.code&&en(!0),null))}},ex=(0,i.useCallback)(e=>()=>{var t,n;let l=(null===(t=N.current)||void 0===t?void 0:t.getZoom())||15;null===(n=N.current)||void 0===n||n.setZoom(l+e)},[null===(t=N.current)||void 0===t?void 0:t.getZoom,null===(n=N.current)||void 0===n?void 0:n.setZoom]);(0,i.useEffect)(()=>{N.current&&es&&(((null==es?void 0:es.initialClinics)||[]).length>0?eC(es.initialClinics):eu&&N.current.setCenter(eu))},[es]),(0,i.useEffect)(()=>{if(N.current&&eu){let e=new window.google.maps.LatLngBounds;if(e.extend(new window.google.maps.LatLng(eu.lat,eu.lng)),e.getNorthEast().equals(e.getSouthWest())){let t=new google.maps.LatLng(e.getNorthEast().lat()+.01,e.getNorthEast().lng()+.01),n=new google.maps.LatLng(e.getNorthEast().lat()-.01,e.getNorthEast().lng()-.01);e.extend(t),e.extend(n)}N.current.fitBounds(e)}},[eu]),(0,i.useEffect)(()=>{if(et){let e=setTimeout(()=>{en(!1)},3e3);return()=>clearTimeout(e)}},[et]);let ey=T||k;return(0,l.Y)(_.Provider,{value:{isMobile:ey,dataEventCategory:A,locale:Y,currentUrl:B},children:(0,l.FD)(K,{ref:I,...D,children:[ey&&(0,l.Y)(g.m,{className:"map-hhg-container",children:ew}),(0,l.Y)(s.Box,{sx:{position:"relative",backgroundColor:"#fff"},children:(0,l.FD)(s.Flex,{className:F.wrapper,pos:"relative",children:[(0,l.Y)(s.Flex,{id:"clinicLocator--sidebar",direction:"column",mah:"100%",className:F.sidebar,children:(0,l.Y)(O,{ref:z,color:m,loadingAt:H,extendComponent:!ey&&(0,l.FD)(l.FK,{children:[ew,(0,l.Y)(ButtonComp,{buttonText:ev,backgroundColor:m,specialties_hashtag:p,currentUrl:B})]}),clinics:null==es?void 0:es.initialClinics,pagination:null==es?void 0:es.initialPagination,clinicSelected:ea,onSelectClinic:e=>{var t,n;handleMarkerClick(e,!1),null===(t=(n=window).gtag)||void 0===t||t.call(n,"event","interaction_click",{event_category:A,event_action:"Clinic Directory Click",event_label:B,hospital_id:e.id,click_location:"list",debug_mode:!0}),setTimeout(()=>{var e;null===(e=document.getElementById("clinicLocator--content"))||void 0===e||e.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},100)},hideSearchDropdown:Q,searchValue:eg,searchData:(null==W?void 0:W.initialClinics)||null,onChangeSearch:e=>{X(!1),handleSearch(e)},onItemSubmitSearch:e=>{var t,n,l,i,r;let o={...P};delete o.keyword,ep(""),j(o),appendClinics([e]),handleMarkerClick(e),null===(t=E.current)||void 0===t||t.blur(),null===(n=(l=window).gtag)||void 0===n||n.call(l,"event","view_search_results",{event_category:A,event_action:"Clinic Directory",event_label:B,search_term:eg,search_result_shown:(((null==W?void 0:W.initialClinics)||[]).length>0).toString()}),null===(i=(r=window).gtag)||void 0===i||i.call(r,"event","interaction_click",{event_category:A,event_action:"Clinic Directory Click",event_label:B,hospital_id:e.id,click_location:"search box"}),setTimeout(()=>{var e;null===(e=document.getElementById("clinicLocator--content"))||void 0===e||e.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},100)},onSubmitSearch:handleSubmitSearchValue,onLoadMore:handleLoadMore,filter:null==es?void 0:es.filter,onFilter:handleFilter,searchRef:E,queryParams:P})}),(0,l.FD)(s.Box,{id:"clinicLocator--content",className:F.content,children:[(0,l.Y)(S,{ref:N,onLoad:e=>{var t,n;let l=null===(t=e.getCenter())||void 0===t?void 0:t.lat(),i=null===(n=e.getCenter())||void 0===n?void 0:n.lng();if(l&&i){let e=(null==em?void 0:em.lat)===l&&(null==em?void 0:em.lng)===i,t={lat:l,lng:i};eh(t),handleFetch(t,!e)}},zoom:13,center:eu||em,onCenterChanged:()=>ei(!1),markerItems:G,markerItemProps:{onClick(e){var t,n;handleMarkerClick(e),null===(t=(n=window).gtag)||void 0===t||t.call(n,"event","interaction_click",{event_category:A,event_action:"Clinic Directory Click",event_label:B,hospital_id:e.id,click_location:"map"})}},options:{cameraControl:!1,rotateControl:!1,streetViewControl:!1,mapTypeControl:!1,fullscreenControl:!1},children:ea&&(0,l.Y)(SelectedClinicMarker,{selectedClinic:ea,hideBooking:b})}),(0,l.FD)(s.Flex,{direction:"column",gap:0,pos:"absolute",top:"50%",right:(0,s.rem)(16),className:F.controlBtns,children:[(0,l.Y)(s.Tooltip,{label:M({id:"clinicLocator.zoomOutToViewMore"}),position:"left",withArrow:!0,children:(0,l.Y)(s.ActionIcon,{variant:"default",className:"zoomBtn",onClick:()=>{eC(G)},children:(0,l.Y)(icons_ZoomOutMap,{className:"zoomIcon"})})}),(0,l.Y)(s.ActionIcon,{variant:"default",className:"zoomBtn",onClick:ex(1),children:(0,l.Y)(a.A,{className:"zoomIcon"})}),(0,l.Y)(s.ActionIcon,{variant:"default",className:"zoomBtn",onClick:ex(-1),children:(0,l.Y)(c.A,{className:"zoomIcon"})})]}),(0,l.Y)(s.Flex,{pos:"absolute",left:"50%",sx:e=>({zIndex:0,transform:"translate(-50%, 0)",[e.fn.smallerThan("sm")]:{top:16},[e.fn.largerThan("sm")]:{bottom:16}}),children:(0,l.FD)(o.Popover,{position:"top",withArrow:!0,arrowPosition:"center",shadow:"md",opened:et,onChange:en,positionDependencies:["isMobile"],children:[(0,l.Y)(o.Popover.Target,{children:(0,l.Y)(o.Button,{className:"pointer-event-child-none",styles:e=>({root:{...m&&{background:"".concat(m,"!important"),"&:hover":{background:"".concat(e.fn.darken(m,.05))}},"&[data-loading]":{"&:before":{background:"transparent"}}},leftIcon:{display:"none"}}),onClick:()=>getCurrentLocation(),loading:$,rightIcon:$?(0,l.Y)(s.Loader,{color:"#fff",size:"xs"}):(0,l.Y)(icons_GPS,{color:"#fff",size:18}),"data-event-category":A,"data-event-action":"Find The Nearest Clinic","data-event-label":B,children:M({id:"clinicLocator.findNearClinic",defaultMessage:"Find your nearest Clinic"})})}),(0,l.Y)(o.Popover.Dropdown,{style:{pointerEvents:"none"},children:(0,l.Y)(o.Text,{size:"xs",children:M({id:"clinicLocator.plsAllowAccess",defaultMessage:"Please allow location access"})})})]})})]})]})})]})})};let TitleComp=e=>{let{title:t}=e,{isMobile:n}=(0,i.useContext)(_),{classes:r,cx:a}=q({isUseMobileLayout:n});return(0,l.Y)(o.Text,{as:"h2",miw:0,fs:(0,s.rem)(22),className:a("map-header",r.titleComp),children:t})},ButtonComp=e=>{let{buttonText:t,backgroundColor:n,specialties_hashtag:r,currentUrl:a}=e,{isMobile:c,dataEventCategory:d}=(0,i.useContext)(_),{classes:u}=q({backgroundColor:n,isUseMobileLayout:c}),h=(0,i.useMemo)(()=>{if(!r)return null;let e=document.getElementById("#".concat(r.replace(/\#/g,"")));if(!e)return null;let n={"data-event-category":d,"data-event-action":"CLick - View experts","data-event-label":"".concat(a).concat(r?"".concat(r):"")};return(0,l.Y)(o.Button,{...n,className:u.viewExpertBtn,size:"lg",variant:"primary",onClick:()=>{e.scrollIntoView({behavior:"smooth",inline:"center",block:"center"})},leftIcon:(0,l.Y)(s.Image,{w:(0,s.rem)(24),h:(0,s.rem)(24),src:"".concat(p.Mp,"/clinic.svg"),alt:t}),children:t})},[r,t]);return h},K=(0,r.A)("div",{target:"e6ovozb0"})("display:flex;flex-direction:column;.g-map{width:100%;height:100%;background-color:#fff;}")},U0k8:function(e,t,n){n.d(t,{GG:function(){return usePlacesAutocomplete},rp:function(){return a}});var l=n("+OUp"),i=n("yNk5");let formatAutoCompleteAddress=e=>!e||e.length<1?[]:e.map(e=>({placeId:e.place_id,description:e.description})),r=8068!=n.j&&null,o={VN:"vi",ID:"id",TH:"th",MY:"ms",TW:"zh-TW",KH:"km",MM:"my",IN:"hi",PH:"en"},a=i.env.GOOGLE_MAP_KEY||"AIzaSyDH2YEO0oZ0XzQv90_7nd2mBHIDhFxLw4s",googleAutocomplete=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new Promise((n,l)=>{if(!e)return l("Need valid text input");if(r)return l("Need valid window object");try{new window.google.maps.places.AutocompleteService().getPlacePredictions({input:e,componentRestrictions:{country:t},language:o[t]},n)}catch(e){l(e)}})},usePlacesAutocomplete=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:500,[i,r]=(0,l.useState)([]),[o,a]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{let l;return e?l=window.setTimeout(async()=>{if(!e){r([]);return}try{a(!0);let n=await googleAutocomplete(e,t);r(formatAutoCompleteAddress(n))}catch(e){console.error(e)}finally{a(!1)}},n):i.length&&r([]),()=>{window.clearTimeout(l)}},[e,n,t]),{isLoading:o,predictions:i}}}}]);