"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8674],{XASs:function(e,t,a){a.d(t,{A:function(){return Avatar},D:function(){return DistanceTag},I:function(){return IconWrapper},S:function(){return ShapedArrowDown},a:function(){return DrawerBottom}});var i=a("q1tI"),n=a("rBCA"),o=a("iBNF"),l=a("Ek4F"),r=a("qdzI"),s=a("WFaC"),d=a("iuhU"),c=a("h8tX"),p=a("Yre8"),m=a("rSBk"),g=a("2yqS");let ShapedArrowDown=e=>i.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"none"},e),i.createElement("path",{d:"M13.5554 9.33398L7.99989 5.55621L2.44434 9.33398",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"})),u=n.Z.div` background-color: var(--background-color, transparent); color: white; cursor: pointer; img { --width: var(--width-prop, 40px); --height: var(--height-prop, 40px); width: var(--width); height: var(--height); } &[data-has-max='true'] { img { max-width: var(--width); max-height: var(--height); } } &[data-avatar-type='square'] { img { --width: var(--width-prop, 72px); --height: var(--height-prop, 72px); border-radius: ${o.r.borderRadius}; } } &[data-avatar-type='rounded'] { img { border-radius: 50%; } } &[data-custom-size='true'] { display: flex; overflow: hidden; overflow: hidden; width: var(--size); height: var(--size); align-items: center; justify-content: center; background-size: cover; font-size: calc(var(--size) / 2); font-weight: bold; &[data-avatar-type='square'] { border-radius: ${o.r.borderRadius}; } &[data-avatar-type='rounded'] { border-radius: 50%; img { --width: 100%; --height: 100%; } } img { object-fit: cover; } } `,h={xs:28,small:32,medium:40,large:48,xl:64,xxl:80,xxxl:96},Avatar=({type:e="square",size:t,avatarImg:a,avatarUrl:n,firstLetter:o,backgroundColor:r,onClick:s,style:d,className:c,width:p,height:m,alt:g})=>{let v=t?h[t]:void 0,[f,b]=(0,i.useState)(!1);(0,i.useEffect)(()=>{if(n){let e=document.createElement("img");e.setAttribute("src",n),e.addEventListener("error",()=>{b(!0)})}},[n,b]);let x=(!n&&!a||f)&&o;return i.createElement(u,{style:Object.assign(Object.assign({},d),{"--size":v?v+"px":void 0,"--width-prop":p?p+"px":void 0,"--height-prop":m?m+"px":void 0,"--background-color":r}),"data-has-max":!!(p&&m),"data-avatar-type":e,onClick:s,className:c,avatarUrl:n,"data-custom-size":!!t},a,n&&!f&&i.createElement(l.I,{src:n,alt:g||"avatar"}),x&&o)},v=n.Z.div` display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; color: ${o.r.colors.red700}; border-radius: 8px; border: 1px solid ${o.r.colors.neutral100}; font-size: 0.6875rem; line-height: 1rem; border-radius: 0.5rem; `,f=(0,n.Z)(e=>i.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 12 12",fill:"none"},e),i.createElement("g",{clipPath:"url(#clip0_5371_10640)"},i.createElement("path",{d:"M6.6665 4.3335L8.1665 5.8335L6.6665 7.3335",stroke:"#8C8C8C",strokeWidth:.72,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M8.16667 5.8335H5.83333C5.09667 5.8335 4.5 6.43016 4.5 7.16683V7.50016",stroke:"#8C8C8C",strokeWidth:.72,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M6.94331 10.3902L10.3907 6.94281C10.9114 6.42211 10.9114 5.57789 10.3907 5.05719L6.94331 1.60981C6.42261 1.08911 5.57839 1.08911 5.05769 1.60981L1.61031 5.05719C1.08961 5.57789 1.08961 6.42211 1.61031 6.94281L5.05769 10.3902C5.57839 10.9109 6.42261 10.9109 6.94331 10.3902Z",stroke:"#8C8C8C",strokeWidth:.72,strokeLinecap:"round",strokeLinejoin:"round"})),i.createElement("defs",null,i.createElement("clipPath",{id:"clip0_5371_10640"},i.createElement("rect",{width:12,height:12,fill:"white"})))))` width: 0.75rem; height: 0.75rem; color: ${o.r.colors.gray400}; `;function DistanceTag({value:e,className:t}){return i.createElement(v,{className:t},i.createElement(f,null),i.createElement(r.T,{size:"p3",weight:"regular",color:o.r.colors.gray400},e))}let b=n.Z.div` display: inline-flex; align-items: center; justify-content: center; flex-grow: 0; flex-shrink: 0; width: calc(var(--wrapper-size, var(--icon-size)) * 1px); height: calc(var(--wrapper-size, var(--icon-size)) * 1px); &[data-clickable='true'] { cursor: pointer; } > * { width: calc(var(--icon-size) * 1px); height: calc(var(--icon-size) * 1px); } &[data-svg-custom-stroke='true'] > svg * { stroke: var(--icon-stroke-color); } &[data-svg-custom-fill='true'] > svg * { fill: var(--icon-fill-color); } `,IconWrapper=({children:e,className:t,onClick:a,wrapperSize:n,iconSize:o=24,wrapperStyle:l,iconStyle:r,svgIcon:s,wrapperProps:d})=>i.createElement(b,Object.assign({className:t,onClick:a,style:Object.assign(Object.assign(Object.assign(Object.assign({},n&&{"--wrapper-size":n}),o&&{"--icon-size":o}),s&&Object.assign(Object.assign({},s.fill&&{"--icon-fill-color":s.fill}),s.stroke&&{"--icon-stroke-color":s.stroke})),l),"data-clickable":!!a,"data-svg-custom-stroke":!!(null==s?void 0:s.stroke),"data-svg-custom-fill":!!(null==s?void 0:s.fill)},d),i.cloneElement(e,{style:r}));(0,n.Z)(p.D)` /* max-height: 100vh; max-height: 100dvh; */ background-color: white; &[data-vaul-drawer-direction='bottom'] { top: initial !important; border-top-left-radius: 16px !important; border-top-right-radius: 16px !important; padding-bottom: 32px; padding-left: 20px; padding-right: 20px; } .drawer__handle { width: 44px; height: 3px; background-color: ${o.r.colors.neutral500}; margin: 16px auto; flex-shrink: 0; } `;let x=(0,n.Z)(m.dy.Content)` position: fixed; z-index: ${g.Z-9e6+1}; inset: 0; background-color: #fff; outline: none !important; &[data-is-linear='true'] { background: linear-gradient(180deg, #c3e3ff 1.86%, #fff 20%) !important; } &::-webkit-scrollbar { width: 6px; height: 6px; } &::-webkit-scrollbar-track { background-color: transparent; } &::-webkit-scrollbar-thumb { background-color: rgba(0, 0, 0, 0.4); border-radius: 6px; } &[data-vaul-drawer-direction='bottom'] { top: initial; border-top-left-radius: 16px; border-top-right-radius: 16px; /* padding-bottom: 16px; */ } ${e=>e.isDragging&&` input { caret-color: transparent; } `} `,y=(0,n.Z)(m.dy.Overlay)` position: fixed; inset: 0; z-index: ${g.Z-9e6}; width: 100%; max-height: 100%; background-color: rgb(0, 0, 0, 0.4); `,E=(0,n.Z)(m.dy.Handle)` &[data-vaul-handle] { width: 44px; height: 3px; background-color: ${o.r.colors.neutral500}; margin: 16px auto; flex-shrink: 0; } `;function DrawerBottom(e){var{children:t,onClose:a,isOpen:n,onOpenChange:o,isMobile:l,classNames:r,isLinear:g,overlayClassName:u,contentClassName:h,handlerClassName:v}=e,f=(0,s._)(e,["children","onClose","isOpen","onOpenChange","isMobile","classNames","isLinear","overlayClassName","contentClassName","handlerClassName"]);let{isDragging:b,handleDragStart:w,handleDragEnd:C}=(0,p.u)();return l?i.createElement(m.dy.Root,Object.assign({onDrag:w,onRelease:C,open:n,onOpenChange:o,onClose:a},f),i.createElement(m.dy.Portal,null,i.createElement(y,{className:(0,d.default)(u,"drawer__overlay")}),i.createElement(x,{isDragging:b,className:(0,d.default)(h,"drawer__content"),"data-is-linear":g},i.createElement(m.dy.Title,{style:{display:"none"}}),i.createElement(E,{className:(0,d.default)(v,"drawer__handle")}),t))):i.createElement(c.u,Object.assign({withCloseButton:!0,centered:!0,zIndex:500,size:"auto",classNames:r,radius:"lg"},f,{onClose:a,opened:n,styles:{root:{maxHeight:"400px"}}}),t)}},N8lP: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"),l=a("hZTu"),r=a("xXM3"),s=a.n(r),d=a("Ek4F"),c=a("qdzI");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"})),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(l.T,{size:"base",color:o.r.colors.gray500,type:"bold"},e.name)))):null,g=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; } `,u=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(g,{id:"payment-container",className:s()(t,{paymentList:n&&e.length>=4})},e.map(t=>i.createElement(u,{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,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"})),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; `,b=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(b,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"}}))}},k1t0:function(e,t,a){a.d(t,{G:function(){return GenderOptionControl}});var i=a("WFaC"),n=a("q1tI"),o=a("XUjW"),l=a("ah6c"),r=a("/npG"),s=a("mYVa"),d=a("Eso5"),c=a("SPK5"),p=a("7yNo"),m=a("v9p6"),g=a("qdzI"),u=a("Xmc7");let h={lg:{height:48},md:{height:40},sm:{height:32},xs:{height:32}};var v=(0,r.k)((e,{type:t,gap:a,size:i})=>{let n="mb"===e.other.template,o=h[i]||{},l=o.height;return{root:{},wrapper:Object.assign({gap:(0,s.h)(a||8)},"radio"===t&&{justifyContent:"flex-end",gap:(0,s.h)(a||24)}),groupErr:{fontSize:(0,s.h)(14)},itemRoot:Object.assign({},"button"===t?{flexGrow:1,width:"50%",'&[data-checked="true"]':{".mantine-Radio-label":{borderColor:e.fn.primaryColor()}}}:"radio"===t?{padding:`${(0,s.h)(10)} 0`,margin:0}:{}),itemLabelWrapper:{padding:0,width:"100%"},itemLabel:Object.assign({whiteSpace:"nowrap"},"button"===t?{position:"relative",padding:`${(0,s.h)(2)} ${(0,s.h)(16)}`,border:`1px solid ${n?"#EAEAEC":e.colors.gray[2]}`,backgroundColor:"#fff",borderRadius:(0,s.h)(n?16:4),cursor:"pointer",display:"flex",justifyContent:"center",alignItems:"center",height:l,'&[data-disabled="true"]':{background:e.colors.gray[1],color:`${e.colors.gray[4]} !important`,img:{opacity:.5}},img:{height:(0,s.h)("lg"===i?26:22)}}:"radio"===t?{fontSize:(0,s.h)(14)}:{}),itemInner:Object.assign(Object.assign({},"button"===t&&{display:"none"}),"radio"===t&&{alignSelf:"center"}),itemBody:Object.assign({},"radio"===t&&{alignItems:"center"})}});let GenderOptionControl=e=>{var{label:t,availableValue:a,styles:r,isBaby:h,genderValue:f={male:"male",female:"female"},type:b="button",hideLabel:x,labelTextProps:y,gap:E,size:w="md",LabelWrapper:C}=e,k=(0,i._)(e,["label","availableValue","styles","isBaby","genderValue","type","hideLabel","labelTextProps","gap","size","LabelWrapper"]);let{t:M}=(0,u.u)(),{classes:$,cx:_,theme:N}=v({type:b,gap:E,size:w},{name:"GenderOptionControl",styles:r}),I="mb"===N.other.template,[L,P]=(0,n.useState)(),S=(0,n.useRef)(null),T=C?{}:Object.assign({as:"label",size:"p2",weight:"semiBold",variant:"primary"},y),z=C||g.T,D=(0,n.useMemo)(()=>[{value:f.male,label:h?M("gender.boy"):M("gender.male"),icon:h?I?n.createElement(o.Z,null):m.C.getAssetPath("health-tools/boy-icon.svg"):m.C.getAssetPath("health-tools/male-icon.svg")},{value:f.female,label:h?M("gender.girl"):M("gender.female"),icon:h?I?n.createElement(l.Z,null):m.C.getAssetPath("health-tools/girl-icon.svg"):m.C.getAssetPath("health-tools/female-icon.svg")}],[]);return(0,n.useEffect)(()=>{P(a)},[a]),n.createElement(d.x,{ref:S,className:$.root},n.createElement(p.R.Group,Object.assign({className:"radio-group",label:x?void 0:n.createElement(z,Object.assign({},T),t||(h?M("tools.selectBabyGender"):M("tools.selectGender"))),size:"lg"},k,{classNames:{error:$.groupErr}},"radio"===b&&{error:null}),n.createElement(c.k,{className:_($.wrapper)},D.map(e=>n.createElement(p.R,Object.assign({className:"gender-item",size:"sm",classNames:{root:$.itemRoot,labelWrapper:$.itemLabelWrapper,label:$.itemLabel,inner:$.itemInner,body:$.itemBody},key:e.value,value:e.value},L&&e.value!==L&&{disabled:!0},{label:n.createElement(c.k,{gap:(0,s.h)(8),align:"center",justify:"center",sx:{zIndex:0}},"button"===b&&("string"==typeof e.icon?n.createElement("img",{src:e.icon,className:"gender-image",alt:"female",loading:"lazy"}):e.icon),n.createElement(g.T,{size:"p3"},e.label))}))))))}},Q9az:function(e,t,a){a.d(t,{B:function(){return Button}});var i=a("WFaC"),n=a("q1tI"),o=a("/bt/");let Button=e=>{var{size:t,color:a="primary",isDisabled:l,isBlock:r,title:s,onClick:d,icon:c,iconPosition:p="left",children:m,isLoading:g=!1,loadingText:u,dataEventCategory:h,dataEventAction:v,dataEventLabel:f,dataProductChannel:b,dataProductSku:x,dataProductBrand:y,dataProductName:E,dataProductPrice:w,dataProductCategory:C,dataProductPosition:k,type:M}=e,$=(0,i._)(e,["size","color","isDisabled","isBlock","title","onClick","icon","iconPosition","children","isLoading","loadingText","dataEventCategory","dataEventAction","dataEventLabel","dataProductChannel","dataProductSku","dataProductBrand","dataProductName","dataProductPrice","dataProductCategory","dataProductPosition","type"]);return n.createElement(o.B,Object.assign({},{"data-event-category":h,"data-event-action":v,"data-event-label":f,"data-product-channel":b,"data-product-sku":x,"data-product-brand":y,"data-product-name":E,"data-product-price":w,"data-product-category":C,"data-product-position":k},{size:t,variant:"transparent"===a?"white":"danger"===a?"error":a,disabled:l,onClick:e=>{g||l||!d||d(e)},title:s,loading:g,type:M||"submit",leftIcon:"left"===p?c:void 0,rightIcon:"right"===p?c:void 0,w:r?"100%":void 0,p:r?"12px auto":void 0,"data-color":a,"data-size":t,"data-block":r,"data-has-icon":!!c||void 0,"data-theme":$.theme,"data-is-loading":g},$),g&&u||m)}},"1Vkj":function(e,t,a){a.d(t,{D:function(){return Divider}});var i=a("q1tI"),n=a("rBCA"),o=a("iBNF");let l=n.Z.hr` border-width: 1px; border-color: ${o.r.colors.neutral200}; border-style: ${e=>e.dividerType}; `,Divider=({type:e="solid",className:t,style:a})=>i.createElement(l,{style:a,className:t,"data-diver-type":e,dividerType:e})},mE0L:function(e,t,a){a.d(t,{H:function(){return HamburgerWhite},N:function(){return NavigationV2},S:function(){return StarPair},a:function(){return getNavMenuContentWithCache},b:function(){return K},g:function(){return getNavMenuContent}});var i=a("WFaC"),n=a("q1tI"),o=a("KzVE"),l=a("2yqS"),r=a("Zh+3"),s=a("Ob47"),d=a("q9DY"),c=a("9wNu"),p=a("rBCA"),m=a("7yNo"),g=a("iBNF"),u=a("TTVT"),h=a("iZ8j"),v=a("v8Gc"),f=a("/npG"),b=a("Eso5"),x=a("QJsO"),y=a("8vDj"),E=a("iuhU"),w=a("PSS+"),C=a("DzJC"),k=a.n(C),M=a("fVL3"),$=a("v9p6"),_=a("qdzI"),N=a("/bt/"),I=a("3wcI"),L=a("nCWQ"),P=a("Qnxw"),S=a("OBVi"),T=a("Xmc7"),z=a("Vxnz"),D=a("39Hg"),j=a("gEnE"),A=a("Q9az"),B=a("qEJm"),R=a("W441"),O=a("riOU"),Z=a("Wgwc"),H=a.n(Z),F=a("QgiU"),V=a.n(F),U=a("LtSz"),W=a("lsJL"),G=a("sEfC"),q=a.n(G),Q=a("xrdX"),Y=a("/YIn");let HamburgerWhite=e=>n.createElement("svg",Object.assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),n.createElement("path",{d:"M4 12H20",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),n.createElement("path",{d:"M4 7H20",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),n.createElement("path",{d:"M4 17H20",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})),StarPair=e=>n.createElement("svg",Object.assign({width:"22",height:"28",viewBox:"0 0 22 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),n.createElement("path",{d:"M6.35278 10.7516C6.42759 10.976 6.63881 11.1279 6.87534 11.1279C7.11187 11.1279 7.322 10.976 7.39791 10.7516C7.68947 9.87691 8.37585 9.19053 9.25054 8.89896C9.47497 8.82415 9.62679 8.61403 9.62679 8.3775C9.62679 8.14097 9.47497 7.93084 9.25054 7.85603C8.37585 7.56446 7.68947 6.87809 7.39791 6.00339C7.24719 5.55453 6.5046 5.55453 6.35388 6.00339C6.06231 6.87809 5.37594 7.56446 4.50125 7.85603C4.27682 7.93084 4.125 8.14097 4.125 8.3775C4.125 8.61403 4.27682 8.82415 4.50125 8.89896C5.37565 9.19043 6.06193 9.87699 6.35278 10.7516Z",fill:"#2743AD"}),n.createElement("path",{d:"M20.1723 14.3286L18.5342 13.6789C16.821 12.9995 15.4655 11.6411 14.7897 9.92641L14.1396 8.27697C13.9232 7.72994 13.0262 7.72994 12.8097 8.27697L12.1597 9.92641C11.4839 11.6411 10.1284 12.9995 8.41517 13.6789L6.77705 14.3286C6.5044 14.4367 6.32422 14.7016 6.32422 14.9952C6.32422 15.2888 6.50345 15.5537 6.77705 15.6618L8.41517 16.3115C10.1284 16.991 11.4839 18.3494 12.1597 20.064L12.8097 21.7135C12.9175 21.987 13.1815 22.1668 13.4742 22.1668C13.7669 22.1668 14.031 21.987 14.1387 21.7135L14.7888 20.064C15.4646 18.3494 16.8201 16.991 18.5333 16.3115L20.1714 15.6618C20.444 15.5537 20.6242 15.2888 20.6242 14.9952C20.6242 14.7016 20.4459 14.4367 20.1723 14.3286Z",fill:"#2743AD"})),X=(0,p.Z)(m.I)` .mantine-Input-input { border-radius: 40px; background: ${g.r.colors.white}; border: 1px solid ${g.r.colors.blue200}; &:focus { border: 1px solid ${g.r.colors.primaryBase}; } } .close-icon-wrapper { display: flex; background-color: ${g.r.colors.gray400}; border-radius: 100%; cursor: pointer; svg { pointer-events: none; } } .search-icon-btn { display: flex; justify-content: center; align-items: center; } `,K="hhg_search_history",SearchInput=({id:e,isMobile:t=!1,isHomepage:a=!1,projectType:i,isRedirectSearchPage:o=!1})=>{let{locale:r,siteType:s,isWinCashBackTheme:c}=(0,n.useContext)(u.a),[p,m]=(0,n.useState)(""),[h,v]=(0,n.useState)("Search From Another Page"),{t:f}=(0,T.u)(),b=(0,n.useCallback)((e="")=>{let t="";"together"===i&&(t="community"),"discover"===i&&(t=window.location.pathname.startsWith("/health-tools/")?"health-tools":i),localStorage.setItem(K,window.location.href);let a=new URLSearchParams(window.location.search);a.set("source",t),a.set("s",e),a.delete("page"),window.location.href=`/search/?${a.toString()}`},[i]),x=(0,n.useCallback)(()=>{let e=localStorage.getItem(K);if(!e){b("");return}localStorage.removeItem(K),window.location.href=e},[b]);return(0,n.useEffect)(()=>{if("undefined"!=typeof window){let e=new URL(window.location.href),t=new URLSearchParams(e.search),a=t.get("s");"discover"===i&&window.location.pathname.startsWith("/search/")&&v("Search Page"),m(a)}},[]),t&&!a?n.createElement(N.B,{variant:"tertiary",style:{padding:"6px"},size:"sm",onClick:x},n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",style:{verticalAlign:"bottom"}},n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.3097 9.06111C3.3097 5.88483 5.88458 3.30994 9.06087 3.30994C12.2372 3.30994 14.812 5.88483 14.812 9.06111C14.812 12.2374 12.2372 14.8123 9.06087 14.8123C5.88458 14.8123 3.3097 12.2374 3.3097 9.06111ZM9.06087 1.66675C4.97707 1.66675 1.6665 4.97732 1.6665 9.06111C1.6665 13.1449 4.97707 16.4555 9.06087 16.4555C10.8067 16.4555 12.4112 15.8505 13.6761 14.8387L16.9305 18.0931C17.2514 18.4139 17.7716 18.4139 18.0924 18.0931C18.4133 17.7722 18.4133 17.252 18.0924 16.9312L14.8381 13.6768C15.8501 12.4118 16.4552 10.8071 16.4552 9.06111C16.4552 4.97732 13.1447 1.66675 9.06087 1.66675Z",fill:"#8C8C8C"}))):n.createElement(X,{className:"fake-search-input",name:"search-input-menu-service"+e,size:"md","data-event-category":h,"data-event-action":"Search","data-event-label":p,placeholder:"marryBaby"===s?f("navigation.search.input.placeholder"):f("home.search",{site:l.L[r||"en-PH"]?l.L[r||"en-PH"].SITE_NAME:""}),onChange:m,value:p,onKeyDown:e=>"Enter"===e.key&&b(e.target.value),type:"search",onFocus:e=>{e.preventDefault(),(t&&a||o)&&b("")},rightSection:p?n.createElement("div",{className:"close-icon-wrapper",onClick:()=>m(""),"data-event-category":"Search Page","data-event-action":"Delete Search"},n.createElement(d.Z,{size:17,color:g.r.colors.white})):c?n.createElement(StarPair,{className:"star-pair-icon"}):"",icon:n.createElement("a",{"data-event-category":"Search Button","data-event-action":"Click",className:"search-icon-btn",onClick:()=>{(t&&a||o)&&b("")}},n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",style:{verticalAlign:"bottom"}},n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.3097 9.06111C3.3097 5.88483 5.88458 3.30994 9.06087 3.30994C12.2372 3.30994 14.812 5.88483 14.812 9.06111C14.812 12.2374 12.2372 14.8123 9.06087 14.8123C5.88458 14.8123 3.3097 12.2374 3.3097 9.06111ZM9.06087 1.66675C4.97707 1.66675 1.6665 4.97732 1.6665 9.06111C1.6665 13.1449 4.97707 16.4555 9.06087 16.4555C10.8067 16.4555 12.4112 15.8505 13.6761 14.8387L16.9305 18.0931C17.2514 18.4139 17.7716 18.4139 18.0924 18.0931C18.4133 17.7722 18.4133 17.252 18.0924 16.9312L14.8381 13.6768C15.8501 12.4118 16.4552 10.8071 16.4552 9.06111C16.4552 4.97732 13.1447 1.66675 9.06087 1.66675Z",fill:"#8C8C8C"})))})},getEcomUrl=({path:e,locale:t})=>{var a;return`/shop/${null===(a=L.L[t||"vi-VN"])||void 0===a?void 0:a[e]}/`};var J=(0,f.k)(()=>({root:{textDecoration:"none"},iconText:{color:"#fff"}}));let CartBadge=e=>{var{count:t,styles:a,className:o,classNames:l,locale:r}=e,s=(0,i._)(e,["count","styles","className","classNames","locale"]);let{classes:d,cx:c}=J(void 0,{name:"CartBadge",styles:a,classNames:l});return void 0!==t?n.createElement(b.x,Object.assign({component:"a",href:getEcomUrl({path:"CART",locale:r}),className:c(d.root,o)},s),n.createElement(x.z,{withBorder:!0,color:"red",size:20,disabled:0===t,label:n.createElement(_.T,{className:d.iconText,size:"s5"},t>99?"99+":t)},n.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},n.createElement("path",{d:"M5.308 21.5q-.748 0-1.278-.53a1.74 1.74 0 0 1-.53-1.278V8.308q0-.75.53-1.278.53-.53 1.278-.53H7.5q0-1.873 1.313-3.187Q10.127 2 12 2t3.187 1.313T16.5 6.5h2.192q.749 0 1.278.53.53.53.53 1.278v11.384q0 .749-.53 1.278-.53.53-1.278.53zm0-1.5h13.384a.3.3 0 0 0 .212-.096.3.3 0 0 0 .096-.212V8.308a.3.3 0 0 0-.096-.212.3.3 0 0 0-.212-.096H5.308a.3.3 0 0 0-.212.096.3.3 0 0 0-.096.212v11.384q0 .116.096.212a.3.3 0 0 0 .212.096M9 6.5h6q0-1.25-.875-2.125A2.9 2.9 0 0 0 12 3.5q-1.25 0-2.125.875A2.9 2.9 0 0 0 9 6.5m2.985 7q1.695 0 3.047-1.148 1.35-1.148 1.335-2.606a.74.74 0 0 0-.207-.528.7.7 0 0 0-.527-.218.7.7 0 0 0-.471.182 1 1 0 0 0-.295.506 2.8 2.8 0 0 1-1.036 1.665 2.9 2.9 0 0 1-1.846.647 2.93 2.93 0 0 1-1.854-.647A2.73 2.73 0 0 1 9.1 9.688q-.086-.34-.278-.514A.66.66 0 0 0 8.367 9a.72.72 0 0 0-.534.218.72.72 0 0 0-.216.528q0 1.457 1.336 2.606 1.335 1.148 3.032 1.148",fill:"#2D87F3"})))):null},ee=p.Z.div` &.block-show { display: block; } `,DisplayWrapper=({forceDisplay:e,mediaQueryKey:t,children:a,className:i,style:o})=>{let[l,r]=(0,n.useMemo)(()=>(0,I.g)(t),[t]);return n.createElement(ee,{lowerBound:e?0:l,upperBound:e?0:r,className:i,style:o},a)};var et={menuIconWrapper:"wnUb-dV",menuButton:"cjbOxWe"};let ItemMenu=({item:e,menu:t})=>{let{containerRef:a,onButtonMouseDown:i,onClose:o}=(0,u.u)({allowBgScroll:!0}),l=(0,z.u)();return!e.popupType&&e.link?n.createElement(NewWrapper,{isNew:e.isNew},n.createElement("a",{className:`hhgcomp-navigation-itemnav-headeritem ${l?"":`menu-handler-${e.id}`}`,tabIndex:0,href:e.link,"data-event-category":"Hamburger Navigation","data-event-action":"Click","data-event-label":e.link},n.createElement("div",{"data-event-category":"Hamburger Navigation","data-event-action":"Click","data-event-label":e.link,className:et.menuButton},e.name))):n.createElement(NewWrapper,{isNew:e.isNew},n.createElement("div",{ref:a,className:`hhgcomp-navigation-itemnav-headeritem ${l?"":`menu-handler-${e.id}`}`,tabIndex:0,key:e.id,"data-event-category":"Hamburger Navigation","data-event-action":"Click","data-event-label":e.link},n.createElement("div",{"data-event-category":"Hamburger Navigation","data-event-action":"Click","data-event-label":e.link,onMouseDown:i,className:et.menuButton},e.name,e.popupType&&n.createElement(n.Fragment,null,(null==e?void 0:e.icon)?n.createElement("div",{className:"wrapper-menu-icon"},n.createElement("div",{className:"origin-icon"},e.icon),n.createElement("div",{className:"close-icon",onClick:o},n.createElement(d.Z,{size:16}))):n.createElement("div",{className:et.menuIconWrapper},n.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none"},n.createElement("path",{d:"M11.5 7.5L9 10L6.5 7.5",strokeWidth:"1.33",strokeLinecap:"round",strokeLinejoin:"round"}))))),n.isValidElement(t)?n.cloneElement(t,{onClose:o}):null))},NewWrapper=({isNew:e,children:t})=>{let{t:a}=(0,T.u)();return e?n.createElement(S.I,{color:"green",label:a("home.navigator.menuItem.new"),size:20,styles:{root:{paddingRight:10}}},t):n.createElement(n.Fragment,null,t)},ea=p.Z.div` display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 3.5rem; ${I.M.tdDown} { grid-template-columns: repeat(1, 1fr); } `,ei=p.Z.div` height: 152px; position: absolute; top: 0; left: 0; z-index: 3; overflow: hidden; border-radius: 4px; padding: 16px; width: 100%; .img-container { width: 100%; height: 100%; } img { width: 100%; height: 100%; display: block; object-fit: contain; } ${I.M.tdDown} { margin-bottom: 0; padding: 0; height: 100%; position: unset; width: 150px; } ${I.M.mbDown} { width: 80px; } `,en=p.Z.div` background-color: #ffffff; border-radius: 4px; width: 100%; height: 100%; `,eo=p.Z.div` display: flex; margin-top: 1rem; align-items: center; color: ${g.r.colors.primaryBase}; font-weight: 400; font-size: 14px; text-decoration: none; ${I.M.tdDown} { display: none; } `,el=p.Z.p` font-size: 16px; font-weight: 600; line-height: 1.6; color: ${g.r.colors.gray800}; ${I.M.tdDown} { padding: 0; } `,er=p.Z.p` font-size: 14px; line-height: 1.6; font-weight: 400; color: ${g.r.colors.gray600}; height: 40px; text-overflow: ellipsis; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin-bottom: auto; ${I.M.tdDown} { height: unset; padding: 0; } `,es=(0,j.Z)(p.Z.div` display: flex; flex-direction: column; gap: 8px; flex: 1; z-index: 1; ${I.M.tdDown} { gap: 4px; } `,"hhgcomp-navigation-menucareitem-contentwrapper"),ed=p.Z.a` text-decoration: none; border-radius: 4px; background: ${g.r.colors.white}; position: relative; overflow: hidden; padding: 16px; display: flex; padding-top: 166px; * { pointer-events: none; } ${I.M.tdUp} { box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.04), 0px 0px 2px rgba(0, 0, 0, 0.06), 0px 0px 1px rgba(0, 0, 0, 0.04); gap: 30px; flex-direction: column; a { display: flex; width: 100%; } } ${I.M.tdDown} { padding-top: 16px; a { display: none; } grid-template-columns: 2fr 1fr; gap: 10px; display: grid; max-height: 110px; display: flex; flex-direction: row-reverse; > ${es.classSelector} { flex: 1; } img { width: 150px; } } ${I.M.mbDown} { box-shadow: 0px 10px 16px rgba(0, 0, 0, 0.04), 0px 2px 8px rgba(0, 0, 0, 0.04), 0px 0px 1px rgba(0, 0, 0, 0.04); display: flex; flex-direction: row-reverse; img { width: 80px; height: 80px; } } ${I.M.tdOnly} { border: 1px solid ${g.r.colors.neutral100}; } .bg-svg { width: 100%; max-width: 245px; height: 100%; top: 0; right: -40px; position: absolute; display: inline-block; } `,Item$4=({item:e,index:t=0})=>{var a;let{t:i}=(0,T.u)(),{locale:o,configs:{statics:l}}=(0,n.useContext)(u.a);if(!e)return null;let r=`${l.CARE_URL_FE}/${null===(a=D.L[o])||void 0===a?void 0:a.HOSPITAL}/${e.slug}-${e.id}`;return n.createElement(ed,{key:e.id,href:r,"data-event-category":"Hamburger Navigation","data-event-action":`Care Click ${t+1}`,"data-event-label":r},n.createElement("img",{src:$.C.getAssetPath("navCareCardBg.svg"),alt:"",className:"bg-svg",loading:"lazy"}),n.createElement(ei,null,n.createElement(en,null,n.createElement("img",{loading:"lazy",alt:e.name,src:e.logo||"/images/avatar.jpg"}))),n.createElement(es,null,n.createElement(el,null,e.name),n.createElement(er,null,e.description),n.createElement(eo,null,i("home.seeMore"),n.createElement("img",{src:$.C.getAssetPath("chevronRightActive.svg"),style:{width:"16px",height:"16px",marginTop:"3px",marginLeft:"5px"},loading:"lazy"}))))},ec=p.Z.div` padding: 16px; border-radius: 8px; position: relative; z-index: 1; overflow: hidden; a { text-decoration: none; } .bg-svg { height: 100%; position: absolute; top: 0; left: 0; z-index: -1; } ${I.M.mbDown} { display: block; .bg-svg { right: -24px; left: unset; top: 0; transform: rotateY(180deg); } } ${I.M.mbUp} { display: grid; grid-gap: 10px; grid-template-columns: 1fr 3fr; } `,ep=p.Z.div` font-weight: 400; font-size: 14px; line-height: 24px; color: ${g.r.colors.gray600}; margin-bottom: 15px; `,em=p.Z.div` font-weight: 600; font-size: 16px; line-height: 26px; color: #000000; margin-bottom: 4px; `,eg=p.Z.div` background: #fff; padding: 5px; display: flex; align-items: center; justify-content: center; border-radius: 50px; `,eu=p.Z.div` display: flex; justify-content: center; align-items: center; position: relative; ${I.M.mbDown} { justify-content: end; min-height: 100px; } `,SpotlightNoData=({title:e,link:t,description:a,cta:i,icon:o})=>{let{siteType:l}=(0,n.useContext)(u.a);return n.createElement(ec,{"data-theme":l},n.createElement(eu,null,n.createElement("img",{src:"marryBaby"===l?$.C.getAssetPath("navMBSpotlightBgNoData.svg"):$.C.getAssetPath("navSpotlightBgNoData.svg"),alt:"",loading:"lazy",className:"bg-svg"}),n.createElement(eg,null,o&&n.createElement("img",{src:o,width:64,height:64,loading:"lazy"}))),n.createElement("div",null,e&&n.createElement(em,null,e),a&&n.createElement(ep,null,a),i&&n.createElement("div",null,n.createElement("a",{href:t},n.createElement(A.B,{theme:l,className:"survey-contact-submit",size:"md"},i)))))},eh=p.Z.div` margin-top: 10px; background: #ffffff; padding: 5px 15px; position: relative; ${I.M.mbDown} { &:after { position: absolute; top: 0; left: 0; width: 100%; height: 4px; background-color: ${g.r.colors.neutral100}; content: ''; } } `,ev=p.Z.div` margin: 15px 0; display: flex; `,ef=p.Z.a` padding-left: 10px; display: flex; align-items: center; text-decoration: none; font-weight: 400; font-size: 14px; color: ${g.r.colors.primaryBase}; &[data-theme='marryBaby'] { color: ${g.r.mbColors.pink}; } img { padding-left: 5px; } ${I.M.mbDown} { margin-left: auto; } `,Spotlights=({title:e,viewMore:t,children:a,link:i,dataEventAction:o=""})=>{let{siteType:l}=(0,n.useContext)(u.a);return n.createElement(eh,null,n.createElement(ev,null,n.createElement(B.H,{tag:"marryBaby"===l?"h5":"h6",as:"p",fontWeight:"semibold"},e),t&&n.createElement(ef,{"data-event-category":"Hamburger Navigation","data-event-action":o,"data-event-label":i,href:i,"data-theme":l},t,n.createElement("img",{src:"marryBaby"===l?$.C.getAssetPath("chevronRightPink.svg"):$.C.getAssetPath("chevronRightActive.svg"),style:{width:"16px",height:"16px"},loading:"lazy"}))),a)},CareSpotlights=({spotlights:e=[],hrefViewMore:t})=>{let{t:a}=(0,T.u)(),{siteType:i}=(0,n.useContext)(u.a);return n.createElement(Spotlights,{title:a("home.navigator.menu.spotlightHospitals")},0!==e.length?n.createElement(n.Fragment,null,n.createElement(ea,null,null==e?void 0:e.slice(0,3).map((e,t)=>n.createElement(Item$4,{key:t,index:t,item:e}))),n.createElement("div",{style:{position:"absolute",bottom:"6px",right:"1rem"}},n.createElement("a",{href:t},n.createElement(A.B,{theme:i,className:"survey-contact-submit",size:"md"},a("home.navigator.menu.care.homeButton"))))):n.createElement(SpotlightNoData,{title:a("home.navigator.menu.care.noDatas.title"),description:a("home.navigator.menu.care.noDatas.description"),link:t,cta:a("home.navigator.menu.care.homeButton"),icon:$.C.getAssetPath("community.svg")}))};var eb={gridContainer:"q3nL5cp",container:"_2DNf80G",closeWrapper:"Q-glX-n"};let BtnClosePopup=({onClosePopup:e})=>n.createElement("div",{className:`${eb.closeWrapper} close-btn`,onClick:e},n.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},n.createElement("path",{d:"M18 6L6 18M18 18L6 6",stroke:"#3E3F58",strokeWidth:"1.3",strokeLinecap:"round"}))),PopupWrapper=({onClosePopup:e,isDisplay:t,children:a,isNavMenu:i,hideCloseBtn:o,stylesContainer:l})=>n.createElement("div",{className:"hhgcomp-navigation-popupwrapper-menuwrapper top-menu-health-tools","data-is-display":!!t,"data-is-nav-menu":!!i},n.createElement(O.C,{className:"hhgcomp-navigation-popupwrapper-menuwrapper-child"},!o&&n.createElement("div",{className:eb.container},n.createElement(BtnClosePopup,{onClosePopup:e})),n.createElement(O.C,{className:eb.gridContainer,style:l},a))),Phone=e=>{var{size:t=24,color:a=g.r.colors.neutral600}=e,o=(0,i._)(e,["size","color"]);return n.createElement("svg",Object.assign({width:t,height:t,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),n.createElement("path",{d:"M6.088 18.75q-.63 0-1.068-.437a1.45 1.45 0 0 1-.438-1.07V2.757q0-.63.438-1.068a1.45 1.45 0 0 1 1.068-.438h7.82q.633 0 1.07.438.437.437.437 1.068v14.488q0 .63-.437 1.069a1.45 1.45 0 0 1-1.07.437zm3.91-1.859a.7.7 0 0 0 .522-.216.7.7 0 0 0 .216-.521.7.7 0 0 0-.216-.522.7.7 0 0 0-.521-.215.7.7 0 0 0-.522.215.7.7 0 0 0-.215.522.7.7 0 0 0 .215.521.7.7 0 0 0 .522.216m-4.166-3.333h8.333V4.792H5.832z",fill:a}))},ex=p.Z.div` padding-right: 1rem; background: #ffffff; padding: 5px 15px; ${I.M.mbUp} { border-right: 1px solid #e4e8ec; display: flex; flex-direction: column; justify-content: space-between; } `,ey=p.Z.a` padding: 10px 0; position: relative; display: flex; align-items: center; &[data-is-mobile-tool='true'] { align-items: flex-start; .name, .phone-icon { margin-top: 4px; } } text-decoration: none; color: ${g.r.colors.gray800}; * { pointer-events: none; } .name { font-size: 16px; font-weight: 400; } &[data-theme='marryBaby']:hover, &[data-theme='marryBaby'][data-active='true'] { p { color: ${g.r.mbColors.pink}; } .icon { background-color: ${g.r.mbColors.lightPink}; } } &[data-theme='helloSites']:hover, &[data-theme='helloSites'][data-active='true'] { p { color: ${g.r.colors.primaryActive}; } } a { } &[data-theme='marryBaby'] { .icon { display: flex; align-items: center; justify-content: center; max-width: 40px; width: 100%; height: 40px; border-radius: 50%; background-color: ${g.r.mbColors.lightGray}; img { border-radius: 50%; } } } `,eE=p.Z.div` margin: 15px 0; ${I.M.mbDown} { display: none; } `,ew=p.Z.div` display: flex; position: absolute; right: 0; ${I.M.mbUp} { &.arrow-icon { display: none; } } `,eC=p.Z.div` display: flex; align-items: center; color: ${g.r.colors.primaryBase}; font-size: ${g.r.sizes.fsParagraph4}; font-weight: ${g.r.sizes.fwBold}; line-height: 24px; font-size: 14px; font-weight: 600; &[data-theme='marryBaby'] { color: ${g.r.mbColors.pink}; } `,ek=p.Z.div` display: flex; align-items: center; margin-left: 10px; `,eM=p.Z.a` border: 1px solid ${g.r.colors.primaryBase}; &[data-theme='marryBaby'] { border: 1px solid ${g.r.mbColors.pink}; svg path { stroke: ${g.r.mbColors.pink}; } } position: relative; display: flex; align-items: center; justify-content: center; padding: 6px; border-radius: 5px; margin-top: 20px; ${I.M.mbDown} { display: none; } `,Categories=({hrefViewMore:e,titleBtnViewMore:t,UrlFE:a,onClosePopup:i,menuItems:l,headingTitle:r,activeItem:s})=>{let{siteType:d}=(0,n.useContext)(u.a),{t:c}=(0,T.u)(),p=(0,y.rZ)();return n.createElement(ex,null,n.createElement("div",null,n.createElement(eE,null,n.createElement(B.H,{tag:"marryBaby"===d?"h5":"h6",as:"p",fontWeight:"semibold"},r)),null==l?void 0:l.slice(0,6).map((e,t)=>{let l=(null==e?void 0:e.link)?(null==e?void 0:e.link.startsWith("http"))?null==e?void 0:e.link:`${a}/${null==e?void 0:e.link.split("/").filter(Boolean).join("/")}/`:"/";return n.createElement(ey,Object.assign({className:(0,E.default)("iconMenu",`itemMenu-${e.id}`),"data-event-category":"Hamburger Navigation","data-event-action":"Click","data-event-label":l,"data-is-heading-category":!1,"data-active":e.id&&e.id===s,"data-is-mobile-tool":e.isMobileAppTool,href:l},!(0,o.i)(l)&&{target:"_blank"},{"data-theme":d,key:t,onClick:i}),n.createElement("div",{className:"icon"},n.createElement("img",{loading:"lazy",alt:e.name,src:e.thumbnail||"/images/avatar.jpg",style:{width:32,height:32,maxWidth:32,maxHeight:32,overflow:"hidden"}})),n.createElement(NewWrapper,{isNew:e.isNew},n.createElement("div",{style:{padding:"0 0.4rem",paddingRight:e.isNew?10:0}},n.createElement("p",{className:"name"},e.name),e.isMobileAppTool&&n.createElement(_.T,{size:"n1",color:p.fn.primaryColor(),weight:"regular"},c("home.calcWithApp")))),e.isMobileAppTool&&n.createElement(ew,null,n.createElement(Phone,{className:"phone-icon",size:16})),n.createElement(ew,{className:"arrow-icon"},n.createElement("img",{src:$.C.getAssetPath("chevronRight.svg"),style:{width:"16px",height:"16px"},loading:"lazy"})))})),t&&n.createElement(eM,{"data-theme":d,style:{textDecoration:"none"},href:e,"data-event-category":"Hamburger Navigation","data-event-action":"Click","data-event-label":e},n.createElement(eC,{onClick:i,"data-theme":d,"data-is-heading-category":!1},t,n.createElement(ek,null,n.createElement("img",{className:"svg",src:"marryBaby"===d?$.C.getAssetPath("chevronRightPink.svg"):$.C.getAssetPath("chevronRightActive.svg"),style:{width:"16px",height:"16px"},loading:"lazy"})))))},MenuCareList=({careSpecialties:e=[],isOpen:t,onClose:a,spotlights:i=[]})=>{var o;let{t:l}=(0,T.u)(),{locale:r,configs:{statics:s}}=(0,n.useContext)(u.a);return n.createElement(PopupWrapper,{onClosePopup:a,isDisplay:t,isNavMenu:!0},n.createElement(Categories,{headingTitle:l("home.navigator.menuItem.specialties"),hrefViewMore:`${s.CARE_URL_FE}/`,UrlFE:s.CARE_URL_FE,onClosePopup:a,titleBtnViewMore:l("home.navigator.menuItem.allSpecialties"),menuItems:(null==e?void 0:e.map(e=>e?{name:String(e.name)||"",link:(0,R.a)({type:"DOCTOR",specialtySlug:e.slug,locale:r}),thumbnail:(null==e?void 0:e.thumbnail)||""}:{}))||[]}),n.createElement(CareSpotlights,{spotlights:i,hrefViewMore:`${s.CARE_URL_FE}/${null===(o=D.L[r])||void 0===o?void 0:o.SPECIALTIES}/`}))},e$=p.Z.div` display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; ${I.M.tdDown} { gap: 12px; grid-template-columns: 1fr; } `,e_=p.Z.a` position: relative; width: 100%; display: flex; align-items: center; text-decoration: none; * { pointer-events: none; } `,eN=p.Z.div` border-radius: 5px; display: block; overflow: hidden; padding-top: 140%; width: 100%; position: relative; height: 0; img { position: absolute; width: 100%; height: 100%; display: block; object-fit: cover; top: 0; left: 0; } ${I.M.tdDown} { width: 72px; padding-top: 100px; flex-shrink: 0; } `,eI=p.Z.a` ${I.M.tdDown} { position: relative; bottom: 0; left: 16px; right: 0; padding: 4px 8px; width: 90px; height: 24px; font-size: 11px; line-height: 16px; } position: absolute; bottom: 8px; left: 8px; right: 8px; height: 32px; padding: 6px 12px; background: ${e=>e.bgColor}; border-radius: 10px; border: none; transition: all 0.2s ease-in-out; color: ${e=>e.textColor}; font-family: 'Inter'; font-weight: 500; font-size: 14px; line-height: 20px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; &:hover { background: ${e=>{let t=e.bgColor.toLowerCase();if("#ffffff"===t||"white"===t||"#fff"===t)return"#f0f0f0";if("string"==typeof t){let e=(0,R.h)(t,!0),a=(0,R.r)(e.r,e.g,e.b),i=(0,R.b)(a[0],a[1]+16,a[2]-16);return`rgb(${i[0]},${i[1]},${i[2]})`}return""}}; } `,eL=p.Z.p` font-size: 16px; font-weight: 400; padding: 4px 15px; line-height: 1.4; color: ${g.r.colors.gray800}; flex: 1; ${I.M.tdUp} { display: none; } `,Item$3=({item:e,index:t=0})=>{if(!e)return null;let a={href:e.link,"data-event-category":"Hamburger Navigation","data-event-action":`Spotlight Click ${t+1}`,"data-event-label":e.link};return n.createElement(e_,Object.assign({key:e.id},a),n.createElement(eN,null,n.createElement("img",{loading:"lazy",alt:e.title,src:e.banner||"/images/notFound-min-small.jpg"})),n.createElement("div",{style:{display:"flex",flexDirection:"column",gap:8}},n.createElement(eL,null,e.title),!!e.buttonDisplay&&n.createElement(eI,Object.assign({bgColor:e.buttonDisplay.button_background_color,textColor:e.buttonDisplay.button_text_color},a),e.buttonDisplay.button_label)))},CategorySpotlights=({spotlightsList:e=[],hrefViewMore:t})=>{let{t:a}=(0,T.u)(),{configs:{statics:i}}=(0,n.useContext)(u.a);return n.createElement(Spotlights,{title:a("home.navigator.menu.spotlights"),viewMore:a("home.navigator.menu.spotlights.seeAll"),link:t,dataEventAction:"Spotlight See More Click"},0!==e.length?n.createElement(e$,null,null==e?void 0:e.slice(0,4).map((e,t)=>n.createElement(Item$3,{key:t,index:t,item:{id:e.id,link:i.HOME_PAGE_URL+e.permalink,title:e.name,banner:e.image,buttonDisplay:e.buttonDisplay}}))):n.createElement(SpotlightNoData,{title:a("home.navigator.menu.category.noDatas.title"),description:a("home.navigator.menu.category.noDatas.description"),link:t,cta:a("home.navigator.menu.category.noDatas.cta"),icon:$.C.getAssetPath("Spotlight.svg")}))},MenuCategoriesList=({categories:e=[],spotlightsList:t=[],onClose:a,isOpen:i})=>{let{t:o}=(0,T.u)(),{locale:l,configs:{statics:r}}=(0,n.useContext)(u.a);return n.createElement(PopupWrapper,{onClosePopup:a,isDisplay:i,isNavMenu:!0},n.createElement(Categories,{hrefViewMore:`${r.HOME_PAGE_URL}${"tl-PH"===l?"/fil":""}/categories/`,UrlFE:r.HOME_PAGE_URL,onClosePopup:a,titleBtnViewMore:o("home.navigator.menuItem.allCategories"),menuItems:(null==e?void 0:e.map(e=>e?{name:e.displayName||null,link:(null==e?void 0:e.customizedUrl)||(null==e?void 0:e.permalink)||"/",thumbnail:e.iconUrl||null}:{}))||[],headingTitle:o("home.navigator.menuItem.healthCategories")}),n.createElement(CategorySpotlights,{spotlightsList:t,hrefViewMore:`${r.HOME_PAGE_URL}${"tl-PH"===l?"/fil":""}/spotlight/`}))},eP=p.Z.div` display: grid; grid-template-columns: repeat(2, 1fr); grid-gap: 48px; ${I.M.tdDown} { grid-template-columns: 1fr; grid-gap: 32px; } ${I.M.mbDown} { grid-gap: 24px; } `,eS=p.Z.div` padding: 5px; flex: 1; `,eT=p.Z.img` width: 88px; height: 88px; border-radius: 4px; object-fit: cover; `,ez=p.Z.div` font-size: 12px; font-weight: 600; color: ${g.r.colors.gray800}; text-decoration: none; &[data-theme='marryBaby'] { font-weight: 400; letter-spacing: -0.2px; } `,eD=p.Z.div` text-decoration: none; font-size: 12px; font-weight: 400; color: ${g.r.colors.primaryBase}; &[data-theme='marryBaby'] { font-weight: 400; letter-spacing: -0.2px; } `,ej=p.Z.div` font-size: 12px; font-weight: 400; color: ${g.r.colors.gray600}; `,eA=p.Z.div` font-size: 12px; font-weight: 400; color: ${g.r.colors.gray600}; `,eB=p.Z.a` display: flex; gap: 10px; text-decoration: none; position: relative; &::after { content: ''; display: block; width: 100%; height: 1px; border-top: 1px dashed ${g.r.colors.neutral100}; position: absolute; bottom: -24px; ${I.M.tdOnly} { bottom: -16px; } ${I.M.mbDown} { bottom: -12px; } } &:last-child { &::after { display: none; } } ${I.M.tdUp} { &:nth-last-child(2) { &::after { display: none; } } } `,eR=p.Z.div` display: flex; gap: 10px; vertical-align: middle; align-items: center; `,eO=p.Z.div` margin-top: 8px; font-size: 16px; font-weight: 600; color: ${g.r.colors.gray800}; &[data-theme='marryBaby'] { margin-top: 12px; font-weight: 400; font-size: 14px; line-height: 24px; letter-spacing: -0.2px; } `,eZ=p.Z.div` display: flex; flex-wrap: wrap; align-items: center; column-gap: 5px; `,eH=p.Z.div` display: flex; gap: 4px; flex-direction: column; `;H().extend(V());let Item$2=({post:e,index:t=0})=>{var a,i,o,l,r,s,d;let{siteType:c,configs:{statics:p}}=(0,n.useContext)(u.a);if(!e)return null;let m=[p.TOGETHER_URL_FE,null===(a=e.community)||void 0===a?void 0:a.slug].join("/"),g=[m,e.slug].join("/"),h=e.createdAt,v=h?isNaN(new Date(h).getTime())?null:new Date(h):null,f=v?H()(v).toNow(!0):h;return n.createElement(eB,{href:g,"data-event-category":"Hamburger Navigation","data-event-action":`Together Click ${t+1}`,"data-event-label":g},n.createElement(eS,null,n.createElement(eR,null,n.createElement(U.U,{avatar:null===(i=e.author)||void 0===i?void 0:i.avatar,username:(null===(o=e.author)||void 0===o?void 0:o.name)||(null===(l=e.author)||void 0===l?void 0:l.username)}),n.createElement(eH,null,n.createElement(ez,{"data-theme":c},null===(r=e.author)||void 0===r?void 0:r.name),n.createElement(eZ,null,n.createElement(eD,{"data-event-category":"Hamburger Navigation","data-event-action":`Topic Click ${t+1}`,"data-event-label":m,onClick:e=>{e.preventDefault(),location.href=m},"data-theme":c},null===(s=e.community)||void 0===s?void 0:s.name),n.createElement(eA,null,"•"),n.createElement(ej,{"data-theme":c},f)))),n.createElement(eO,null,e.title)),!!(null===(d=e.photos)||void 0===d?void 0:d.length)&&n.createElement(eT,{loading:"lazy",src:e.photos[0]}))},CommunitySpotlights=({spotlights:e=[]})=>{let{configs:{statics:t}}=(0,n.useContext)(u.a),{t:a}=(0,T.u)();return n.createElement(Spotlights,{title:a("home.navigator.menu.trendingPosts"),viewMore:a("home.navigator.menu.trendingPosts.seeMore"),link:(0,r.e)(t.TOGETHER_URL_FE),dataEventAction:"Together See More Click"},0!==e.length?n.createElement(eP,null,null==e?void 0:e.slice(0,4).map((e,t)=>n.createElement(Item$2,{index:t,post:e,key:e.id}))):n.createElement(SpotlightNoData,{title:a("home.navigator.menu.together.noPosts.title"),description:a("home.navigator.menu.together.noPosts.description"),link:`${t.HOME_PAGE_URL}/community/`,cta:a("home.navigator.menu.together.noPosts.cta"),icon:$.C.getAssetPath("community.svg")}))},MenuCommunitiesList=({communities:e=[],onClose:t,isOpen:a,spotlights:i=[]})=>{let{t:o}=(0,T.u)(),{configs:{statics:l}}=(0,n.useContext)(u.a);return n.createElement(PopupWrapper,{onClosePopup:t,isDisplay:a,isNavMenu:!0},n.createElement(Categories,{hrefViewMore:(0,r.e)(l.TOGETHER_URL_FE),UrlFE:(0,r.n)(l.TOGETHER_URL_FE),onClosePopup:t,titleBtnViewMore:o("home.navigator.menuItem.allCommunities"),menuItems:(null==e?void 0:e.map(e=>e?{name:e.name||"",link:e.slug||"/",thumbnail:e.thumbnail||""}:{}))||[],headingTitle:o("home.navigator.menuItem.allCommunitiesheadingTitle")}),n.createElement(CommunitySpotlights,{spotlights:i}))},eF=p.Z.div` display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; ${I.M.tdDown} { grid-template-columns: 1fr; gap: 12px; } `,AppIcon=e=>{var{size:t=24,color:a="#2D87F3"}=e,o=(0,i._)(e,["size","color"]);return n.createElement("svg",Object.assign({width:t,height:t,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),n.createElement("rect",{width:"20",height:"20",rx:"4",fill:a}),n.createElement("path",{d:"M9.12 6.005c0-.088-.005-.181-.012-.27-.022-.611-.623-1.071-1.208-1.046-.69.04-.839 1.007-.248 1.297.09.047.115.088.105.172v5.048c.004.064-.016.096-.077.122-.63.274-.474 1.276.233 1.304.583.03 1.16-.453 1.195-1.044q.012-.135.013-.272c0-1.77.013-3.54 0-5.311m-3.093 5.34c-.109-.048-.144-.108-.132-.232V6.117c.009-.114.103-.108.176-.165.544-.357.313-1.249-.346-1.264h-.023c-.659 0-1.172.546-1.172 1.194q-.002 2.09.004 4.177l.003 1.396c0 .62.527 1.175 1.15 1.175.68 0 .989-.978.34-1.285m7.299-1.489a.623.623 0 1 1-1.247 0 .623.623 0 0 1 1.247 0",fill:"#fff"}),n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.927 9.821c0 1.338.925 2.46 2.162 2.743-.089 1.583-2.049 1.657-3.22 1.47a2.5 2.5 0 0 1-.716-.225 1.3 1.3 0 0 1-.614-.68c-.057-.142-.093-.293-.158-.431a.58.58 0 0 0-.674-.346.59.59 0 0 0-.462.603c.017.415.192.827.44 1.156.26.354.607.625 1.058.827.636.29 1.336.375 2.03.375.774 0 1.591-.132 2.267-.53.643-.38 1.25-.878 1.263-2.217a2.81 2.81 0 0 0 2.17-2.745c0-1.55-1.244-2.811-2.773-2.811S9.927 8.27 9.927 9.82m4.275 0c0 .841-.674 1.525-1.502 1.525a1.515 1.515 0 0 1-1.502-1.525c0-.84.674-1.525 1.502-1.525a1.516 1.516 0 0 1 1.502 1.525",fill:"#fff"}))},eV=p.Z.a` text-decoration: none; border-radius: 4px; background: ${g.r.colors.primary50}; position: relative; overflow: hidden; display: flex; * { pointer-events: none; } .bg-svg { width: 245px; top: 0; right: 0; height: 100%; position: absolute; ${I.M.tdDown} { top: calc(51% - 68px); right: -8px; } } padding: 180px 24px 16px; a { display: flex; width: 100%; } .phone-badge { position: absolute; top: 16px; left: 16px; } ${I.M.tdDown} { padding-top: 16px; display: flex; align-items: center; } ${I.M.mbDown} { .phone-badge { display: none; } } `,eU=p.Z.div` width: 64px; height: 64px; background: white; position: absolute; right: 25px; top: 35px; z-index: 3; border-radius: 50%; img { position: absolute; width: 64px; height: 64px; top: 50%; left: 50%; display: block; transform: translate(-50%, -50%); } ${I.M.tdDown} { position: relative; top: unset; right: unset; } `,eW=p.Z.div` display: flex; align-items: center; gap: 4px; color: ${g.r.colors.primaryBase}; font-weight: 400; font-size: 14px; text-decoration: none; `,eG=p.Z.p` font-size: 16px; font-weight: 600; line-height: 1.4; color: ${g.r.colors.gray800}; `,eq=p.Z.p` font-size: 14px; line-height: 1.4; font-weight: 400; color: ${g.r.colors.gray600}; height: 40px; text-overflow: ellipsis; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin-bottom: auto; ${I.M.tdDown} { display: none; } `,eQ=p.Z.div` display: flex; flex-direction: column; flex: 1; z-index: 1; ${I.M.tdUp} { gap: 8px; } ${I.M.tdDown} { gap: 4px; flex: 1; } `,Item$1=({item:e,index:t=0})=>{let{t:a}=(0,T.u)(),{configs:{statics:i}}=(0,n.useContext)(u.a);if(!e)return null;let o=e.link?e.link.startsWith("http")?e.link:`${i.HOME_PAGE_URL}${e.link}`:void 0;return n.createElement(eV,{href:o,"data-event-category":"Hamburger Navigation","data-event-action":`Engage Click ${t+1}`,"data-event-label":o},e.isMobileAppTool&&n.createElement(Phone,{size:20,className:"phone-badge"}),n.createElement("img",{src:$.C.getAssetPath("navToolCardBg.svg"),alt:"",loading:"lazy",className:"bg-svg"}),n.createElement(eQ,null,n.createElement(eG,null,e.title),n.createElement(eq,{dangerouslySetInnerHTML:{__html:e.subtitle}}),n.createElement(eW,null,e.isMobileAppTool?n.createElement(n.Fragment,null,n.createElement(AppIcon,{size:16}),a("home.calcWithApp")):n.createElement(n.Fragment,null,a("home.seeMore"),n.createElement(h.Z,{size:18,useCurrentColor:!0})))),n.createElement(eU,null,n.createElement("img",{loading:"lazy",alt:e.title,src:e.icon||"/images/avatar.jpg"})))},eY=p.Z.a` text-decoration: none; border-radius: 12px; position: relative; overflow: hidden; display: flex; * { pointer-events: none; } .bg-svg { top: 0; left: 0; position: absolute; } .dot-svg { width: 40px; height: 30px; top: 36px; left: 16px; position: absolute; stroke-width: 0; } &[data-color='pink'] { background: ${g.r.mbColors.tonePink}; .bg-svg { fill: ${g.r.mbColors.peach}; } } &[data-color='orange'] { background: ${g.r.mbColors.toneYellow}; .bg-svg { fill: ${g.r.mbColors.orange}; } } &[data-color='green'] { background: ${g.r.mbColors.toneGreen}; .bg-svg { fill: ${g.r.mbColors.mint}; } } padding: 180px 24px 16px; a { display: flex; width: 100%; } ${I.M.tdDown} { padding-top: 16px; display: flex; align-items: flex-start; justify-content: flex-start; } ${I.M.mbDown} { padding-top: 0; padding-left: 80px; height: 96px; align-items: flex-start; justify-content: center; flex-direction: column; .dot-svg { top: 22px; left: 16px; } } ${I.M.tdUp} { min-height: 296px; } .mobile-only { ${I.M.tdUp} { display: none; } } .desktop-only { ${I.M.tdDown} { display: none; } } `,eX=p.Z.div` width: 48px; height: 48px; background: white; position: absolute; right: 25px; top: 35px; z-index: 3; border-radius: 50%; img { position: absolute; width: 36px; height: 36px; top: 50%; left: 50%; display: block; transform: translate(-50%, -50%); } ${I.M.tdDown} { position: relative; top: unset; right: unset; } ${I.M.mbDown} { position: absolute; left: 32px; top: 28px; } `,eK=p.Z.div` display: flex; align-items: center; background: white; font-weight: 400; font-size: 14px; text-decoration: none; border-radius: 50%; width: 20px; height: 20px; svg path { fill: ${g.r.mbColors.gray}; } ${I.M.tdDown} { background: none; width: 100%; font-weight: 400; font-size: 12px; line-height: 18px; color: ${g.r.mbColors.pink}; padding-left: 16px; } `,eJ=p.Z.p` font-weight: 600; font-size: 14px; line-height: 24px; letter-spacing: -0.2px; color: ${g.r.colors.gray800}; `,e0=p.Z.p` font-weight: 400; font-size: 12px; line-height: 18px; letter-spacing: -0.2px; color: ${g.r.colors.gray600}; height: 54px; text-overflow: ellipsis; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: auto; ${I.M.tdDown} { display: none; } `,e1=p.Z.div` display: flex; flex: 1; z-index: 1; align-items: flex-end; justify-content: flex-end; ${I.M.tdUp} { gap: 8px; flex-direction: row; } ${I.M.tdDown} { align-items: flex-start; justify-content: flex-start; gap: 4px; } `,e2=p.Z.div` display: flex; flex-direction: column; flex: 1; z-index: 1; ${I.M.tdUp} { gap: 8px; } ${I.M.tdDown} { gap: 4px; flex: 1; padding-left: 16px; } `,e3=p.Z.div` display: flex; flex-direction: row; flex: 1; z-index: 1; ${I.M.tdUp} { gap: 8px; justify-content: flex-end; align-items: flex-end; } ${I.M.tdDown} { flex-direction: column; justify-content: flex-start; align-items: flex-start; } `,ItemMarryBaby=({item:e,index:t=0,color:a})=>{let{t:i}=(0,T.u)(),{configs:{statics:o}}=(0,n.useContext)(u.a);if(!e)return null;let l=e.link?e.link.startsWith("http")?e.link:`${o.HOME_PAGE_URL}${e.link}`:void 0,renderIcon=()=>n.createElement(eX,null,n.createElement("img",{loading:"lazy",alt:e.title,src:e.icon||"/images/avatar.jpg"})),renderName=()=>n.createElement(e3,null,n.createElement(e2,null,n.createElement(eJ,null,e.title),n.createElement(e0,null,e.subtitle)),n.createElement(eK,null,n.createElement("div",{className:"mobile-only"},i("home.seeMore")),n.createElement("img",{src:$.C.getAssetPath("arrowRightGray.svg"),style:{width:"12px",height:"12px",marginTop:"2px",marginLeft:"5px"},loading:"lazy"})));return n.createElement(eY,{href:l,"data-event-category":"Hamburger Navigation","data-event-action":`Engage Click ${t+1}`,"data-event-label":l,"data-color":a},n.createElement("svg",{className:"bg-svg",width:"74",height:"121",viewBox:"0 0 74 121",fill:"none"},n.createElement("path",{d:"M58.5713 53.428C40.6466 70.0213 12.9929 71.0875 -7.00506 84.9856C-24.9277 97.4005 -38.3893 120.472 -60.213 120.346C-73.3615 120.271 -84.9289 110.925 -91.9303 99.8138C-101.443 84.7327 -103.994 64.0482 -93.916 49.3276C-81.8133 31.6505 -56.6933 28.1101 -41.7246 12.7895C-35.4351 6.35117 -31.2212 -1.90115 -24.8564 -8.25051C-7.17639 -25.9054 34.9604 -29.7543 56.852 -16.9562C80.9056 -2.89888 77.046 36.3304 58.5713 53.428Z",strokeWidth:"0"})),n.createElement("img",{src:$.C.getAssetPath("navMBCardDotBg.svg"),className:"dot-svg",loading:"lazy",alt:""}),n.createElement(e1,null,n.createElement("div",{className:"mobile-only"},renderIcon()),n.createElement("div",{className:"desktop-only"},renderName())),n.createElement("div",{className:"mobile-only"},renderName()),n.createElement("div",{className:"desktop-only"},renderIcon()))},ToolSpotlights=({hrefViewMore:e,spotlightHealthTools:t=[]})=>{let{t:a}=(0,T.u)(),i=["pink","orange","green"],{siteType:o}=(0,n.useContext)(u.a);return n.createElement(Spotlights,{title:a("home.navigator.menu.spotlightTools")},0!==t.length&&n.createElement(eF,null,null==t?void 0:t.slice(0,3).map((e,t)=>"marryBaby"===o?n.createElement(ItemMarryBaby,{key:t,index:t,item:e,color:i[t]}):n.createElement(Item$1,{key:t,index:t,item:e}))),0===t.length&&n.createElement(SpotlightNoData,{title:a("home.navigator.menu.healthTools.noDatas.title"),description:a("home.navigator.menu.healthTools.noDatas.description"),link:e,cta:a("home.navigator.menu.healthTools.noDatas.cta"),icon:$.C.getAssetPath("community.svg")}))},MenuHealthToolsList=({locale:e,onClose:t,isOpen:a,spotlightHealthTools:i=[],healthTools:o=[]})=>{var r;let{t:s}=(0,T.u)(),{configs:{statics:d}}=(0,n.useContext)(u.a),c=`${d.HOME_PAGE_URL}${"tl-PH"===e?"/fil":""}${(null===(r=l.S[e])||void 0===r?void 0:r.HEALTH_TOOLS)||""}`;return n.createElement(PopupWrapper,{onClosePopup:t,isDisplay:a,isNavMenu:!0},n.createElement(Categories,{hrefViewMore:c,UrlFE:d.HOME_PAGE_URL,onClosePopup:t,headingTitle:s("home.navigator.menuItem.healthToolsList"),titleBtnViewMore:s("home.navigator.menuItem.allHealthTools"),menuItems:o.map(e=>({name:e.title,link:e.link?e.link.startsWith("http")?e.link:`${d.HOME_PAGE_URL}${e.link}`:void 0,thumbnail:e.icon,isMobileAppTool:e.isMobileAppTool}))}),n.createElement(ToolSpotlights,{spotlightHealthTools:i,hrefViewMore:c}))},e5=p.Z.div` display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; ${I.M.tdDown} { gap: 12px; grid-template-columns: 1fr; } `,VideoSpotlights=({spotlightsList:e=[],layout:t="default"})=>{let{t:a}=(0,T.u)(),{configs:{statics:i}}=(0,n.useContext)(u.a);return n.createElement(Spotlights,{title:a("home.navigator.menu.lastestVideos")},0!==e.length?n.createElement(e5,null,null==e?void 0:e.slice(0,4).map((e,a)=>n.createElement(o.V,{key:a,data:Object.assign(Object.assign({},e),{type:M.V.SHORTS}),layout:"default"===t?"overlay":"horizon",dataEventCategory:"Hamburger Navigation",dataEventAction:`Video Click ${a+1}`}))):n.createElement(SpotlightNoData,{title:a("home.navigator.menu.category.noDatas.title"),description:a("home.navigator.menu.category.noDatas.description"),link:`${i.VIDEO_URL_FE}/`,cta:a("home.navigator.menu.category.noDatas.cta"),icon:$.C.getAssetPath("Spotlight.svg")}))},MenuVideoList=({spotlightsList:e=[],onClose:t,isOpen:a})=>{let{t:i}=(0,T.u)(),{locale:o,configs:{statics:l}}=(0,n.useContext)(u.a),r=(0,n.useMemo)(()=>[{name:i("home.navigator.menu.videos"),link:`${l.VIDEO_URL_FE}/video/`,thumbnail:$.C.getAssetPath("nav-icons/video.svg")},{name:i("home.navigator.menu.shorts"),link:`${l.VIDEO_URL_FE}/short/`,thumbnail:$.C.getAssetPath("nav-icons/short.svg")}],[]);return n.createElement(PopupWrapper,{onClosePopup:t,isDisplay:a,isNavMenu:!0},n.createElement(Categories,{hrefViewMore:`${l.HOME_PAGE_URL}${"tl-PH"===o?"/fil":""}/videos/`,UrlFE:l.HOME_PAGE_URL,onClosePopup:t,titleBtnViewMore:i("home.navigator.menuItem.allVideos"),menuItems:r,headingTitle:i("home.navigator.menuItem.videoCategories")}),n.createElement(VideoSpotlights,{spotlightsList:e}))};p.Z.div` display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; ${I.M.tdDown} { gap: 12px; grid-template-columns: 1fr; } `;let e4=(0,p.Z)(N.B)` border: 1px solid ${g.r.colors.white} !important; .mantine-Button-leftIcon { width: 24px; height: 24px; } `,e6=p.Z.div` width: 20px; height: 20px; display: flex; justify-content: center; align-items: center; border-radius: 5px; background: linear-gradient( 180deg, rgba(255, 255, 255, 0.1) 15.1%, rgba(0, 0, 0, 0.01) 100% ), linear-gradient(180deg, #65b5ff 0%, #2685f1 100%); background-blend-mode: soft-light, normal; `,InitialCart=()=>n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:"512",height:"512",style:{width:"100%",height:"100%",contentVisibility:"visible"},viewBox:"0 0 512 512"},n.createElement("defs",null,n.createElement("clipPath",{id:"__lottie_element_2"},n.createElement("path",{d:"M0 0h512v512H0z"})),n.createElement("path",{fill:"#FFF",d:"m139 0-13 174h244l-30 292 165 1 4-466z",opacity:"1",id:"__lottie_element_6",display:"block"}),n.createElement("mask",{id:"__lottie_element_6_1","mask-type":"alpha"},n.createElement("use",{xlinkHref:"#__lottie_element_6"}))),n.createElement("g",{clipPath:"url(#__lottie_element_2)"},n.createElement("path",{fill:"#2B62CD",d:"m430 181-40 41-111-120a18 18 0 0 1-5-13c0-5 2-9 5-13l6-5a18 18 0 0 1 25-1zm-348 0 40 41 111-120a18 18 0 0 0 0-26l-6-5a18 18 0 0 0-25-1z",display:"block"}),n.createElement("g",{display:"block"},n.createElement("path",{fill:"#2D87F3",d:"M385 427H125c-4 0-9-1-13-5a20 20 0 0 1-6-12L88 239h335l-18 171a20 20 0 0 1-7 12c-3 4-8 5-13 5"}),n.createElement("path",{fill:"#2B62CD",d:"m160 402-5-2a6 6 0 0 1-1-4l-8-114v-2a6 6 0 0 1 3-4 6 6 0 0 1 5 0 6 6 0 0 1 4 5l8 115-1 2a6 6 0 0 1-1 2 6 6 0 0 1-4 2m61 0-5-2a6 6 0 0 1-1-4l-2-114c0-2 0-3 2-5a6 6 0 0 1 4-1l4 1a6 6 0 0 1 2 4l2 115a6 6 0 0 1-2 4 6 6 0 0 1-4 2zm131 0a6 6 0 0 1-5-4l-1-2 8-115a6 6 0 0 1 2-4l2-1a6 6 0 0 1 2 0 6 6 0 0 1 5 2 6 6 0 0 1 1 4l-8 114a6 6 0 0 1-6 6m-61 0a6 6 0 0 1-6-6l2-114 2-5a6 6 0 0 1 4-1 6 6 0 0 1 5 1 6 6 0 0 1 1 5l-2 114a6 6 0 0 1-1 4 6 6 0 0 1-5 2"}),n.createElement("path",{fill:"#91CAFF",d:"M424 243H88a20 20 0 0 1-21-18l-3-28a20 20 0 0 1 20-23h344a20 20 0 0 1 20 23l-3 28a20 20 0 0 1-21 18"})),n.createElement("g",{mask:"url(#__lottie_element_6_1)",display:"block"},n.createElement("path",{fill:"#FFC326",d:"m294 198-16 123a5 5 0 0 1-5 5h-80l-4-2a5 5 0 0 1-1-4l15-115h1z"}),n.createElement("path",{fill:"#FFD658",d:"M272 189c0 3 0 7 2 10a12 12 0 0 0 10 6h-81l-3-1c-3-1-5-3-6-5a15 15 0 0 1 5-19 17 17 0 0 1 9-3h80c-4 0-7 1-9 3a15 15 0 0 0-7 9"}),n.createElement("path",{fill:"#FEA21E",d:"M277 326h-4c3 0 5-2 5-4l15-115 1-9v1l-1 1a9 9 0 0 1-5 4 11 11 0 0 1-8 0c-3-1-5-3-6-5-4-7-2-15 5-19 2-2 5-3 9-3h1c4 0 7 2 10 4l6 9 1 11 14 119-1 4z"}),n.createElement("path",{fill:"#FC7419",d:"M303 310v-74a3 3 0 1 0-5 0v74l-21 16h38l4-2zm-5-109a13 13 0 0 1-5 6l1-9c0-1 0 0 0 0 0-3-1-6-4-7a4 4 0 0 0-5 1v1c0 2-1 3-2 3a3 3 0 0 1-3-2l1-4a9 9 0 0 1 11-4c3 1 5 3 6 6v9"})),n.createElement("g",{display:"block"},n.createElement("path",{fill:"#FFC326",d:"m460 330-16 123a5 5 0 0 1-5 5h-80l-4-2a5 5 0 0 1-1-4l15-115h1z"}),n.createElement("path",{fill:"#FFD658",d:"M438 321c0 3 0 6 2 9a12 12 0 0 0 10 7h-81l-3-1c-3-1-5-3-6-6a15 15 0 0 1 5-18 17 17 0 0 1 9-3h80c-4 0-7 1-9 3a15 15 0 0 0-7 9"}),n.createElement("path",{fill:"#FEA21E",d:"M443 458h-4c3 0 5-2 5-5l15-114 1-9v1l-1 1a9 9 0 0 1-5 4 11 11 0 0 1-8 0c-3-1-5-3-6-6-4-6-2-14 5-18 2-2 5-3 9-3h1c4 0 7 2 10 4s5 5 6 9l1 11 14 119-1 4z"}),n.createElement("path",{fill:"#FC7419",d:"M469 442v-74a3 3 0 1 0-5 0v74l-21 16h38l4-2zm-5-109a13 13 0 0 1-5 6l1-9c0-1 0 0 0 0 0-3-1-6-4-7a4 4 0 0 0-4 1l-1 1-2 3a3 3 0 0 1-3-3l1-3a9 9 0 0 1 11-4c3 1 5 3 6 5 1 3 2 7 0 10"})))),InitialDoctor=()=>n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"512",height:"512",style:{width:"100%",height:"100%",contentVisibility:"visible"},viewBox:"0 0 512 512"},n.createElement("defs",null,n.createElement("clipPath",{id:"__lottie_element_23"},n.createElement("path",{d:"M0 0h512v512H0z"}))),n.createElement("g",{clipPath:"url(#__lottie_element_23)"},n.createElement("g",{display:"block"},n.createElement("path",{fill:"#1B3250",d:"M430 332c-13-17-52-37-42-63 16-41-9-72-28-84-22-14-23-43-30-66-15-50-53-73-103-73s-88 21-103 71c-7 22-7 53-29 67-19 12-61 41-45 82 10 26-15 52-28 69-39 53 13 89 72 98l255 2c59-9 120-50 81-103"}),n.createElement("path",{fill:"#FFB497",d:"M120 202c-11 4-13 17-10 29a29 29 0 0 0 14 17 29 29 0 0 0 22 3l-8-49a25 25 0 0 0-18 0"}),n.createElement("path",{fill:"#FF977B",d:"M147 235a5 5 0 0 1-4-2c-6-8-17-8-17-8a5 5 0 0 1-4-2 5 5 0 0 1 0-7l4-1c1 0 16 0 25 11a5 5 0 0 1-4 9"}),n.createElement("path",{fill:"#FFB497",d:"M332 202a25 25 0 0 0-18 0l-8 49a29 29 0 0 0 22-3c7-3 12-10 14-17 3-12 1-25-10-29"}),n.createElement("path",{fill:"#FF977B",d:"M305 235a5 5 0 0 1-5-3 5 5 0 0 1 1-6c9-11 24-11 25-11a5 5 0 0 1 5 5 5 5 0 0 1-5 5s-11 0-17 8a5 5 0 0 1-4 2"}),n.createElement("path",{fill:"#E3F2FF",d:"M366 452H86a3 3 0 0 1-4-4c5-19 19-47 37-65a153 153 0 0 1 42-28l1-1a85 85 0 0 1 29-19h70a84 84 0 0 1 29 19l1 1a153 153 0 0 1 42 28c18 18 32 46 37 65a3 3 0 0 1-1 3 3 3 0 0 1-3 1"}),n.createElement("path",{fill:"#FCCAAF",d:"M261 335c-25 32-48 32-70 0l5-10v-1a45 45 0 0 0 2-13h56a48 48 0 0 0 2 13v1l5 10"}),n.createElement("path",{fill:"#2D87F3",d:"M281 452H175c-14-93 16-117 16-117 7 9 20 15 35 15s28-6 35-15c0 0 9 12 16 37 5 20 6 60 4 80"}),n.createElement("path",{fill:"#BCDEFF",d:"M191 335a84 84 0 0 0-30 19 53 53 0 0 0-13 28c0 3 11 1 16 0h1v1c-13 8-17 19-16 25 2 15 6 30 13 44h26s-12-72 3-117m96 48a1 1 0 0 1 0-1h1c1 0 0 0 0 0 5 1 16 3 16 0a53 53 0 0 0-13-28 83 83 0 0 0-30-19c15 45 3 117 3 117h26a157 157 0 0 0 13-44c1-6-3-17-16-25"}),n.createElement("path",{fill:"#FF977B",d:"M256 325c-20 18-40 18-60 0v-1a46 46 0 0 0 2-13h56a48 48 0 0 0 2 13v1"}),n.createElement("path",{fill:"#FCCAAF",d:"M314 205c-3 54-17 80-39 96-14 11-37 24-49 24s-35-13-49-24c-22-16-36-42-39-96 52-21 30-127 85-99a7 7 0 0 0 6 0c55-28 33 78 85 99"}),n.createElement("path",{fill:"#FFB497",d:"M221 106c-27-12-34 12-43 40-7 25-16 54-41 63l1 3c43 0 71-62 83-106"})),n.createElement("path",{fill:"#FF977B",d:"M233 233a5 5 0 0 0-4 2l-3 1-3-1a5 5 0 0 0-2-2 5 5 0 0 0-4 0 5 5 0 0 0-3 5c0 6 9 8 12 8s12-2 12-8a5 5 0 0 0-2-3 5 5 0 0 0-3-2",display:"block"}),n.createElement("path",{fill:"#1B3250",d:"m261 199 9-5a27 27 0 0 1 11-1c4 0 7 0 11 2l8 4a2 2 0 0 1 1 2 2 2 0 0 1 0 1h-1l-10-1h-9a20 20 0 0 0-7 2 65 65 0 0 0-7 4 5 5 0 0 1-4 1 5 5 0 0 1-3-2 5 5 0 0 1-1-2 5 5 0 0 1 2-5",display:"block"}),n.createElement("path",{fill:"#284A75",d:"M280 218a9 9 0 1 0 0-19 9 9 0 0 0 0 19",display:"block"}),n.createElement("path",{fill:"#1B3250",d:"m192 210-7-4-7-2h-9l-9 1a2 2 0 0 1-2-1v-1l1-1 9-4c3-2 6-2 10-2 4-1 7 0 11 1l9 5a5 5 0 0 1 2 3v4a5 5 0 0 1-7 2l-1-1",display:"block"}),n.createElement("path",{fill:"#284A75",d:"M184 218a9 9 0 1 0 0-19 9 9 0 0 0 0 19",display:"block"}),n.createElement("g",{fill:"#FFF",display:"block"},n.createElement("path",{d:"m216 213-4-1a5 5 0 0 1-1-3v-4a5 5 0 0 1 3-2 33 33 0 0 1 24 0 5 5 0 0 1 3 7 5 5 0 0 1-3 2h-3a23 23 0 0 0-18 1h-1"}),n.createElement("path",{d:"M183 249a38 38 0 0 1-35-23 38 38 0 0 1-2-22 38 38 0 0 1 11-19 38 38 0 0 1 19-11c7-1 15 0 22 2a38 38 0 0 1 16 14 38 38 0 0 1 7 21 38 38 0 0 1-11 27 38 38 0 0 1-27 11m0-65a27 27 0 0 0-25 17 27 27 0 0 0-2 15 27 27 0 0 0 8 14 27 27 0 0 0 42-4c3-4 4-9 4-15a27 27 0 0 0-8-19 27 27 0 0 0-19-8zm86 65a38 38 0 0 1-35-24 38 38 0 0 1 27-51 38 38 0 0 1 39 16 38 38 0 0 1 6 21 38 38 0 0 1-11 27 38 38 0 0 1-26 11m0-65a27 27 0 0 0-25 17 27 27 0 0 0-2 15 27 27 0 0 0 8 14 27 27 0 0 0 46-19 27 27 0 0 0-8-19 27 27 0 0 0-19-8z"})),n.createElement("path",{d:"m205 180-2-1c-10-4-39-9-47-1a5 5 0 0 1-3 2 5 5 0 0 1-4-2 5 5 0 0 1-2-3l1-4c14-15 52-4 59-1a5 5 0 0 1 3 6 5 5 0 0 1-2 3l-3 1zm42 0-3-1a5 5 0 0 1-1-7 5 5 0 0 1 2-2c7-3 45-14 59 1a5 5 0 0 1 1 4l-2 3a5 5 0 0 1-4 2l-3-2c-8-8-37-3-47 1l-2 1",fill:"#284A75",display:"block"}),n.createElement("path",{fill:"#FF886C",d:"M208 260a4 4 0 0 0-3 1 4 4 0 0 0-1 3c2 8 6 19 22 19s21-11 22-19a4 4 0 0 0-4-4l-18-1-18 1",display:"block"}),n.createElement("g",{display:"block"},n.createElement("g",{fill:"#FFF"},n.createElement("path",{d:"M469 405a85 85 0 1 1-170 0 85 85 0 0 1 170 0"}),n.createElement("path",{d:"M469 405a85 85 0 1 1-170 0 85 85 0 0 1 170 0"})),n.createElement("path",{fill:"#E4E8EC",d:"M384 480a75 75 0 1 0 0-149 75 75 0 0 0 0 149m0 11a85 85 0 1 0 0-171 85 85 0 0 0 0 171"}),n.createElement("path",{fill:"#FFF",d:"M469 405a85 85 0 1 1-170 0 85 85 0 0 1 170 0"}),n.createElement("path",{fill:"#E4E8EC",d:"M384 480a75 75 0 1 0 0-149 75 75 0 0 0 0 149m0 11a85 85 0 1 0 0-171 85 85 0 0 0 0 171"}),n.createElement("path",{fill:"#FF6F4D",d:"M389 358h-11a17 17 0 0 0-12 5 17 17 0 0 0-5 12v3l-1 3a4 4 0 0 1-3 1h-3a17 17 0 0 0-17 17v12a17 17 0 0 0 17 17h3a4 4 0 0 1 4 3v3a17 17 0 0 0 17 17h11c5 0 9-2 12-5s5-7 5-12v-3a4 4 0 0 1 4-3h3c4 0 9-2 12-5s5-8 5-12v-12c0-5-2-9-5-12a17 17 0 0 0-12-5h-3a4 4 0 0 1-4-4v-3a17 17 0 0 0-5-12 17 17 0 0 0-12-5"})))),MenuViewMore=({menuItems:e=[],isOpen:t,onClose:a})=>{let{locale:i,configs:{enableAppIntroPage:o}}=(0,n.useContext)(u.a),r=e.find(e=>"ecom"===e.id),s=e.find(e=>"care"===e.id);return n.createElement(PopupWrapper,{onClosePopup:a,isDisplay:t,isNavMenu:!0,hideCloseBtn:!0,stylesContainer:{display:"flex",gap:0,padding:0}},r&&n.createElement("a",{tabIndex:0,href:r.link,"data-event-category":"Hamburger Navigation","data-event-action":"Click","data-event-label":r.link},n.createElement(e4,{variant:"tertiary",leftIcon:n.createElement(InitialCart,null)},r.name)),s&&n.createElement("a",{tabIndex:0,href:s.link,"data-event-category":"Hamburger Navigation","data-event-action":"Click","data-event-label":s.link},n.createElement(e4,{variant:"tertiary",leftIcon:n.createElement(InitialDoctor,null)},s.name)),o&&n.createElement("a",{tabIndex:0,href:"https://applink.hellobacsi.com/o9Q88rQh7Mb","data-event-category":"Hamburger Navigation","data-event-action":"Click","data-event-label":"https://applink.hellobacsi.com/o9Q88rQh7Mb"},n.createElement(e4,{variant:"tertiary",leftIcon:n.createElement(e6,null,n.createElement(c.Z,{width:16,height:15}))},`${l.L[i||"en-PH"].SITE_NAME_FORMATTED} App`)))};function ClosePopupIcon({className:e}){return n.createElement("div",null,n.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",className:e},n.createElement("path",{d:"M18 6L6 18M18 18L6 6",stroke:"#3E3F58",strokeWidth:"1.3",strokeLinecap:"round"})))}function HamburgerIcon({siteType:e,enableSearch:t,className:a,style:i}){let{isWinCashBackTheme:o}=(0,n.useContext)(u.a);return"helloSites"===e?n.createElement("div",{className:"hamburger-container"},o?n.createElement(HamburgerWhite,{className:a}):n.createElement("img",{"data-list-type":"Header","data-content-type":"Navigation","data-content-topic":"Hamburger",src:t?$.C.getAssetPath("hamburgerMenuNewWithSearch.svg"):$.C.getAssetPath("hamburgerMenuNew.svg"),style:Object.assign({width:"24px",height:"24px"},i),alt:"home",className:a,loading:"lazy"})):n.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",className:a},n.createElement("path",{d:"M3.35 15a.65.65 0 0 1 .65-.65h10a.65.65 0 1 1 0 1.3H4a.65.65 0 0 1-.65-.65m0-6A.65.65 0 0 1 4 8.35h16a.65.65 0 1 1 0 1.3H4A.65.65 0 0 1 3.35 9",fill:"#3E3F58"}))}let e8=p.Z.div` position: fixed; z-index: 201; top: calc(100% - 1px); width: 100%; height: calc(100vh - var(--header-bottom)); overflow-x: hidden; overflow-y: auto; background: white; display: flex; flex-direction: column; padding-bottom: 0; left: 0; .hhgcomp-navigation-popupwrapper-menuwrapper { position: unset; } `;p.Z.div` padding: 16px; padding-bottom: 12px; .fake-search-input { pointer-events: none; input { line-height: 20px; padding-top: 10px; padding-bottom: 10px; } } &[data-theme='marryBaby'] { input { background: ${g.r.mbColors.lightGray}; border-radius: 16px; border: none; } } `;let e7=p.Z.div` display: block; overflow-y: auto; flex: 1; padding-bottom: 16px; &::-webkit-scrollbar { width: 0; display: none; } `,e9=p.Z.div` padding: 0 16px; `,te=p.Z.div` display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 3.5rem; ${I.M.tdDown} { grid-template-columns: repeat(1, 1fr); } `,tt=p.Z.a` text-decoration: none; display: flex; align-items: center; `,Item=({item:e,index:t=0})=>e?n.createElement(tt,{href:e.url,"data-event-category":"Hamburger Navigation","data-event-action":`Care Click ${t+1}`,"data-event-label":e.url},n.createElement("img",{loading:"lazy",alt:e.name,src:e.featuredImage||"/images/avatar.jpg",style:{width:"40px",height:"40px"}}),n.createElement(_.T,{size:"p2",weight:"regular",style:{marginLeft:16}},e.name),n.createElement("img",{src:$.C.getAssetPath("chevronRightActive.svg"),style:{width:"20px",height:"20px",marginLeft:"auto"},loading:"lazy"})):null,EcomSpotlights=({helpfulUrls:e=[]})=>{let{t}=(0,T.u)();return e.length?n.createElement(Spotlights,{title:t("home.navigator.menu.spotlightEcom")},0!==e.length?n.createElement(te,null,null==e?void 0:e.slice(0,5).map((e,t)=>n.createElement(Item,{key:t,index:t,item:e}))):n.createElement(n.Fragment,null)):null},MenuServiceList=({closePopup:e,menuItems:t=[],projectType:a,isHomepage:i=!1})=>{var o,r;let{siteType:s,ssrMenuContent:{categories:d,healthTools:c,care:p,together:m,ecom:g,videos:h},activeMenuService:v,configs:{statics:f},locale:b,customClasses:x}=(0,n.useContext)(u.a),{t:y}=(0,T.u)();return n.createElement(e8,{className:x.categoriesMenu,id:"categories-menu"},!i&&n.createElement(e9,{className:"search-wrapper"},n.createElement(NavigtionSearch,{siteType:s,projectType:a,isMobile:!1,isRedirectSearchPage:!0})),n.createElement(e7,null,n.createElement(Categories,{UrlFE:f.HOME_PAGE_URL,titleBtnViewMore:y("home.navigator.menuItem.allCategories"),menuItems:t,headingTitle:y("home.navigator.menuItem.healthCategories"),onClosePopup:e,activeItem:v}),"categories"===v&&n.createElement(CategorySpotlights,{spotlightsList:(null==d?void 0:d.spotlights)||[],hrefViewMore:`${f.HOME_PAGE_URL}${"tl-PH"===b?"/fil":""}/spotlight/`}),"tools"===v&&n.createElement(ToolSpotlights,{spotlightHealthTools:null==c?void 0:c.spotlights,hrefViewMore:`${f.HOME_PAGE_URL}${"tl-PH"===b?"/fil":""}${(null===(o=l.S[b])||void 0===o?void 0:o.HEALTH_TOOLS)||""}`}),"care"===v&&n.createElement(CareSpotlights,{spotlights:null==p?void 0:p.spotlights,hrefViewMore:`${f.CARE_URL_FE}/${null===(r=D.L[b])||void 0===r?void 0:r.SPECIALTIES}`}),"together"===v&&n.createElement(CommunitySpotlights,{spotlights:null==m?void 0:m.spotlights}),"ecom"===v&&n.createElement(EcomSpotlights,{helpfulUrls:null==g?void 0:g.helpfulUrls}),"video"===v&&n.createElement(VideoSpotlights,{spotlightsList:null==h?void 0:h.spotlights,layout:"stack"})))},HamburgerMenu=({menuItems:e,isHomepage:t,projectType:a})=>{let{siteType:i}=(0,n.useContext)(u.a),{containerRef:o,onContainerFocus:l,onContainerBlur:r,onButtonMouseDown:s,onClose:d}=(0,u.u)();return n.createElement(DisplayWrapper,{mediaQueryKey:"mbDown"},n.createElement("header",{className:"y5VJdvw"},n.createElement("div",{className:"oVhOSCy",ref:o,role:"button",tabIndex:0,onBlur:r,onFocus:l},n.createElement("div",{className:"pX8OXTM",onMouseDown:s,"data-event-category":"Hamburger Navigation","data-event-action":"Click","data-event-label":"Hamburger Navigation URL"},n.createElement(ClosePopupIcon,{className:"mobile-close-icon"}),n.createElement(HamburgerIcon,{siteType:i,enableSearch:!1,className:"mobile-hamburger-icon"})),n.createElement(MenuServiceList,{menuItems:e,isHomepage:t,projectType:a,closePopup:d}))))},ta=p.Z.div` z-index: 201; width: 100%; align-items: center; background-color: ${g.r.colors.white}; transition: height 0.3s, transform 0.3s; &[data-win-cash-back-theme='true'] { background-color: ${g.r.colors.blue900}; .search-wrapper { padding: 8px 16px; background-color: ${g.r.colors.blue900}; } .hhgcomp-navigation-itemnav-headeritem { border-bottom: none; color: ${g.r.colors.white}; svg { path { stroke: ${g.r.colors.white}; } } .wrapper-menu-icon { .origin-icon { filter: brightness(0) invert(1); } .close-icon { svg { path { fill: ${g.r.colors.white}; } } } } } .profile-nav-group { .login-btn { border-radius: 28px; border-color: rgba(255, 255, 255, 0.2); &:hover { background-color: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.2); } } } .mobile-close-icon { path { stroke: ${g.r.colors.white}; } } .fake-search-input { .mantine-Input-input { border-radius: 8px; } } } &[data-site-type='helloSites'] { border-bottom: 1px solid ${g.r.colors.neutral100}; } &[data-site-type='helloSites'][data-win-cash-back-theme='true'] { border-bottom: none; } &[data-sponsored='true'] { border-bottom: none; } &[data-marry-baby-tone='pink'] { background-color: ${g.r.mbColors.lightPink}; } ${I.M.mbDown} { &[data-site-type='marryBaby'] { border-bottom: none; } &[data-fixed-bar='true'] { position: fixed; transform: translateY(0); } &[data-fixed-bar='false'] { position: absolute; } &[data-collapsed='true'] { transform: translateY(-100%); transition: transform 0.5s; } &[data-collapsed='false'] { transform: translateY(0); transition: transform 0.5s; } .top-bar-header { line-height: normal; } &[data-header-type='home'] { z-index: ${R.Z.headerContainerHome}; } &[data-is-displayed='false'] { //display: none; visibility: hidden; } } .marry-baby { input { background: ${g.r.mbColors.lightGray}; border-radius: 16px; border: none; } max-width: 172px; } &[data-site-type='marryBaby'] { .close-btn { top: 16px; right: 16px; } } `,ti=p.Z.div` display: flex; height: 100%; align-items: center; justify-content: space-between; padding: 0 2rem; height: 56px; ${I.M.pcDown} { padding: 0 1rem; } ${I.M.mbDown} { position: relative; height: 56px; background: ${g.r.colors.white}; gap: 2px; } &[data-win-cash-back-theme='true'] { height: 60px; /* width: 100%; margin: 0 auto; padding: 0 16px; max-width: 1160px; margin: 0 auto; width: 100%; */ ${I.M.mbDown} { /* padding: 0 16px; */ background: ${g.r.colors.blue900}; height: 56px; } } &[data-site-type='marryBaby'] { width: 100%; margin: 0 auto; padding: 0 16px; ${I.M.tdUp} { max-width: 1064px; } } `,tn=p.Z.div` display: flex; align-items: center; height: 100%; gap: 32px; ${I.M.pcDown} { flex-shrink: 0; gap: 12px; &[data-site-type='marryBaby'] { gap: 24px; } } `,to=p.Z.div` display: flex; align-items: center; height: 100%; flex-shrink: 0; ${I.M.tdDown} { flex-shrink: 0.6; gap: 8px; } .hhgcomp-navigation-itemnav-headeritem { gap: 2px; ${I.M.pcUp} { padding: 0 10px; } ${I.M.pcDown} { padding: 0 6px; } ${I.M.mbDown} { display: none; } a { text-decoration: none; } } `;p.Z.div` .fake-search-input { pointer-events: none; input { line-height: 20px; padding-top: 10px; padding-bottom: 10px; } } `;let tl=p.Z.div` margin-left: 16px; display: flex; gap: 12px; align-items: center; flex-shrink: 0; ${I.M.pcDown} { margin-left: 8px; gap: 8px; } ${I.M.mbDown} { margin-left: 0; gap: 8px; } .ai-doctor-nav-item { .ai-doctor-btn { border-radius: 28px; border: 1px solid ${g.r.colors.neutral200}; } } .clinity-logo { width: 99px; height: 40px; ${I.M.mbDown} { width: 88px; height: 36px; } } `,tr=p.Z.div` display: flex; align-items: center; height: 100%; &[data-site-type='marryBaby'] { gap: 26px; } .hamburger-container { display: flex; justify-content: center; align-items: center; } `,ts=p.Z.div` padding: 0 16px 6px; `,td=(0,p.Z)(N.B)` border-radius: 28px; border: 1px solid ${g.r.colors.neutral200}; &.ai-doctor-btn { pointer-events: none !important; * { pointer-events: none !important; } } ${I.M.mbDown} { padding: 0px 12px 0px 10px; height: 36px; color: ${g.r.colors.gray900}; font-size: 13px; font-weight: 500; line-height: 22px; } `,NavigationBar=({onTopBarAppears:e,languageMenu:t,menuItems:a,logoComponent:i,subHead:s,projectType:d,customClasses:c})=>{var p,m,g,h;let{siteType:f,isMobile:x=!1,locale:y,sitewideBanner:E,sitewideBannerData:C,sitewideSite:M="discover",sponsorComponent:_,isHomepage:N=!1,currentUrl:I,onLoginClick:L,cartNumber:S,configs:{statics:T,enableSearchBar:z,enableNavChatbotAi:D,enableNavClinityDownload:j,enableAppIntroPage:A},userState:{userInfo:B},onLogout:R,isUserLoading:O,slot:Z,isWinCashBackTheme:H}=(0,n.useContext)(u.a),{triggerLogin:F}=(0,P.u)(),{SSO_URL:V,HOME_PAGE_URL:U}=T,G=!!_,[q,Q]=(0,n.useState)(!1),Y=(0,n.useRef)(47),X=(0,n.useRef)(null),K=(0,n.useRef)(!1),J="helloSites"===f?null===(p=l.L[y])||void 0===p?void 0:p.LOGO_TYPE:f,ee="undefined"!=typeof window,et=(0,n.useCallback)(k()(()=>{if(ee){if(!X.current)return;let e=X.current.getBoundingClientRect();e.top<=0&&window.scrollY>Y.current+30&&window.scrollY>e.height+20&&!K.current&&(K.current=!0,Q(!0)),window.scrollY=0&&(Y.current=window.scrollY)}},200),[]);return(0,n.useEffect)(()=>{null==e||e(!q)},[q]),(0,n.useEffect)(()=>(window.addEventListener("scroll",et,{passive:!0}),()=>{window.removeEventListener("scroll",et)}),[]),(0,n.useEffect)(()=>{x&&et()},[x]),n.createElement(ta,{"data-site-type":f,"data-sponsored":G,"data-header-type":"home","data-collapsed":q,"data-is-displayed":!0,"data-win-cash-back-theme":H,id:"site-header",ref:X,className:c.wrapper},E||n.createElement(o.S,{site:M,currentUrl:I,banner:C}),n.createElement(ti,{className:c.header,"data-main-header":!0,"data-site-type":f,"data-win-cash-back-theme":H},n.createElement(tn,{className:c.leftGroup,"data-site-type":f},x&&n.createElement(HamburgerMenu,{menuItems:a.filter(e=>!!e.link),isHomepage:N,projectType:d}),i||n.createElement("a",{style:{flexShrink:0},href:U},n.createElement("div",null,n.createElement(w.L,{style:{display:"flex"},type:J,badge:"id-ID"===y&&n.createElement("img",{src:$.C.getAssetPath("sehat-badge.png"),width:"56",height:"23",loading:"lazy"}),dateForSeasonal:new Date,locale:y,key:"undefined"!=typeof window?"client":"server",isLightLogo:H}))),!x&&n.createElement(n.Fragment,null,"marryBaby"===f?n.createElement(NavigationMenu,{menuItems:a,originalMenuItems:a,className:c.navMenu}):z&&n.createElement(NavigtionSearch,{siteType:f,projectType:d,isMobile:x}))),n.createElement(to,{className:c.rightGroup,"data-site-type":f},!x&&"marryBaby"!==f&&n.createElement(NavigationMenu,{menuItems:a.filter(e=>y!==W.L.Vietnam||"ecom"!==e.id&&"care"!==e.id),originalMenuItems:a,className:c.navMenu}),n.createElement(tl,{className:"profile-nav-group"},t,D&&n.createElement(b.x,{component:"a",href:`${(0,r.g)(y)}/ai-doctor`,"data-event-category":"Chatbot AI","data-event-action":"Open","data-event-label":"Hamburger Navigation",className:"ai-doctor-nav-item"},n.createElement(td,{variant:"tertiary",leftIcon:n.createElement(v.Z,{size:18,color:"#2F8AF2"}),size:"md",className:"ai-doctor-btn"},null===(m=l.L[y])||void 0===m?void 0:m.SITE_NAME," AI")),j&&n.createElement(b.x,{component:"a",href:`${null===(g=l.S[y])||void 0===g?void 0:g.CLINITY_DOWNLOAD_LINK}`,target:"_blank","data-event-category":"Hamburger Navigation","data-event-action":"Download Clinity","data-event-label":`${null===(h=l.S[y])||void 0===h?void 0:h.CLINITY_DOWNLOAD_LINK}`,"data-cart-menu":!0},n.createElement("img",{src:$.C.getAssetPath("clinity-download.png"),alt:"Clinity",className:"clinity-logo",style:{display:"block"}})),Z,n.createElement(u.N,{userInfo:B,siteType:f,onLoginClick:L||(()=>{if((0,P.I)(y))return F();let e=window.location.href;window.location.href=V?(0,r.n)(`${V}?returnUrl=${e}`):e}),currentUrl:I,onLogout:R,isLoading:O,locale:y,enableAppIntroPage:A,isMobile:x,className:c.profileBtn}),void 0!==S&&n.createElement(n.Fragment,null,!x&&n.createElement("hr",{style:{height:20,width:0,border:"none",borderLeft:"1px solid #E4E8EC"}}),n.createElement(CartBadge,{"data-cart-menu":"true","data-event-category":"Ecommerce","data-event-action":"Cart Click","data-event-label":I,count:S,locale:y}))))),x&&N&&n.createElement(ts,{className:"search-wrapper"},n.createElement(NavigtionSearch,{siteType:f,projectType:d,isMobile:x,isHomepage:N})),_?n.isValidElement(_)?n.cloneElement(_,{isCollapsed:q,locale:y,isMobile:x}):_:null,s&&s)},NavigtionSearch=({siteType:e,projectType:t,isMobile:a=!1,isHomepage:i=!1,isRedirectSearchPage:o=!1})=>n.createElement(DisplayWrapper,{mediaQueryKey:"mbUp",className:`${"marryBaby"===e?"marry-baby":""} ${i?"block-show":""}`},n.createElement(SearchInput,{id:"desktop",projectType:t,isMobile:a,isHomepage:i,isRedirectSearchPage:o})),NavigationMenu=({menuItems:e,originalMenuItems:t,className:a})=>{let{siteType:i,locale:o,ssrMenuContent:{categories:l,healthTools:r,care:s,together:d,videos:c}}=(0,n.useContext)(u.a);return n.createElement(DisplayWrapper,{className:a,mediaQueryKey:"mbUp",style:{height:"100%"}},n.createElement(tr,{"data-site-type":i},null==e?void 0:e.map((e,a)=>n.createElement(ItemMenu,{key:a,item:e,menu:"categories"===e.popupType?n.createElement(MenuCategoriesList,{categories:null==l?void 0:l.items,spotlightsList:null==l?void 0:l.spotlights}):"tools"===e.popupType?n.createElement(MenuHealthToolsList,{locale:o,healthTools:null==r?void 0:r.items,spotlightHealthTools:null==r?void 0:r.spotlights}):"together"===e.popupType?n.createElement(MenuCommunitiesList,{communities:null==d?void 0:d.items,spotlights:null==d?void 0:d.spotlights}):"care"===e.popupType?n.createElement(MenuCareList,{careSpecialties:null==s?void 0:s.items,spotlights:null==s?void 0:s.spotlights}):"video"===e.popupType?n.createElement(MenuVideoList,{spotlightsList:null==c?void 0:c.spotlights}):"other"===e.popupType?n.createElement(MenuViewMore,{menuItems:t}):null}))))},useHeaderHeight=({hasSponsoredBanners:e,isSponsored:t,isShowingSiteWideBanner:a,isMobile:i})=>{let o=(0,n.useRef)(null),[l,r]=(0,n.useState)(0),[s,d]=(0,n.useState)(64),c=(0,n.useCallback)(q()(()=>{var e,t,a,i;let n=(null===(e=o.current)||void 0===e?void 0:e.clientHeight)||(null===(a=null===(t=o.current)||void 0===t?void 0:t.children[0])||void 0===a?void 0:a.clientHeight)||0;window.scrollY<=n+200&&(r(n),d((null===(i=o.current)||void 0===i?void 0:i.getBoundingClientRect().bottom)||l))},200),[]);(0,n.useEffect)(()=>(window.addEventListener("resize",c,{passive:!0}),window.addEventListener("scroll",c,{passive:!0}),c(),()=>{window.removeEventListener("resize",c),window.removeEventListener("scroll",c)}),[]),(0,n.useEffect)(()=>{c()},[i,a,t,e,o.current]);let p=(0,n.useMemo)(()=>{let n=i?56:60;return a&&(n+=64),t&&(n+=40,e&&(n+=57)),n},[i,a,e,t]);return{defaultHeaderHeight:p,headerHeight:l||p,headerBottom:s,headerRef:o}},useInsider=()=>{let{isFirstLogin:e,userState:t}=(0,n.useContext)(u.a),{userInfo:a}=t;(0,n.useEffect)(()=>{(null==a?void 0:a.id)&&(e?(null==a?void 0:a.email)&&(null==a?void 0:a.email)!==""?window.insider_object={user:Object.assign({uuid:null==a?void 0:a.id,email:null==a?void 0:a.email,gdpr_optin:!0,email_optin:!0,sign_up:!0},(null==a?void 0:a.name)?{name:null==a?void 0:a.name}:{})}:window.insider_object={user:Object.assign({uuid:null==a?void 0:a.id,sign_up:!0},(null==a?void 0:a.name)?{name:null==a?void 0:a.name}:{})}:(null==a?void 0:a.email)&&(null==a?void 0:a.email)!==""?window.insider_object={user:Object.assign({uuid:null==a?void 0:a.id,email:null==a?void 0:a.email,gdpr_optin:!0,email_optin:!0,log_in:!0},(null==a?void 0:a.name)?{name:null==a?void 0:a.name}:{})}:window.insider_object={user:Object.assign({uuid:null==a?void 0:a.id,log_in:!0},(null==a?void 0:a.name)?{name:null==a?void 0:a.name}:{})})},[])},useNavServices=()=>{let{t:e}=(0,T.u)(),{siteType:t,locale:a,configs:{enableNavDiscover:i,enableNavHealthTools:o,enableNavCare:s,enableNavTogether:d,enableNavEcom:c,enableNavVideo:p,enableAppIntroPage:m,statics:g}}=(0,n.useContext)(u.a),h="marryBaby"===t,v=[m,s,c].filter(Boolean).length>1,f=(0,n.useMemo)(()=>{var m;let u=[];return i&&u.push({name:e("home.navigator.menuItem.discover"),id:"categories",link:`${g.HOME_PAGE_URL}${"tl-PH"===a?"/fil":""}/categories/`,niceName:"",thumbnail:h?$.C.getAssetPath("categories-mb.svg"):$.C.getAssetPath("nav-icons/discover.svg"),popupType:"categories"}),p&&u.push({name:e("home.navigator.menuItem.video"),id:"video",link:`${g.HOME_PAGE_URL}${"tl-PH"===a?"/fil":""}/videos/`,niceName:"",thumbnail:$.C.getAssetPath("nav-icons/video.svg"),popupType:"video"}),o&&u.push({name:e("home.navigator.menuItem.healthTools"),id:"tools",link:`${g.HOME_PAGE_URL}${"tl-PH"===a?"/fil":""}${(null===(m=l.S[a])||void 0===m?void 0:m.HEALTH_TOOLS)||""}`,thumbnail:h?$.C.getAssetPath("healthtools-mb.svg"):$.C.getAssetPath("nav-icons/health-tools.svg"),popupType:"tools"}),d&&u.push({name:e("home.navigator.menuItem.helloTogether"),id:"together",link:(0,r.n)(g.TOGETHER_URL_FE+"/"),thumbnail:h?$.C.getAssetPath("community-mb.svg"):$.C.getAssetPath("nav-icons/community.svg"),popupType:"together"}),c&&u.push({name:e("home.navigator.menuItem.helloEcom"),id:"ecom",link:(0,r.n)(g.HOME_PAGE_URL+"/shop/"),thumbnail:$.C.getAssetPath("nav-icons/shop.svg"),popupType:null}),s&&u.push({name:e("home.navigator.menuItem.helloCare"),id:"care",link:(0,r.n)(g.HOME_PAGE_URL+"/care/"),thumbnail:$.C.getAssetPath("nav-icons/care.svg"),popupType:null}),v&&u.push({name:e("home.seeMore"),id:"other",link:"",thumbnail:"",popupType:"other",icon:n.createElement(HamburgerIcon,{siteType:t,enableSearch:!1,style:{width:"16px",height:"16px"},className:"mobile-hamburger-icon"})}),u},[]);return f},tc=p.Z.div` --header-z-index: ${l.a}; top: 0; z-index: var(--header-z-index); ${I.M.mbDown} { width: 100vw; max-width: 100%; } --amp-site-wide-closed: 2px; -webkit-transform: translateZ(0); position: sticky; &.nav-open { margin-top: 64px; } &:not(.nav-open) { --amp-site-wide-closed: 66px; } pointer-events: none; > section *:not([data-cart-menu] *) { pointer-events: auto; } `,_NavigationV2=e=>{var t,a;let{isMobile:i,locale:l,onTopBarAppears:r,languageOptions:s,sponsorComponent:d,sitewideBanner:c,sitewideBannerShown:p,className:m,logoComponent:g,subHead:u,projectType:h,customClasses:v={}}=e,f=useNavServices();useInsider();let b=!!(null===(a=null===(t=null==d?void 0:d.props)||void 0===t?void 0:t.sponsoredBy)||void 0===a?void 0:a.length),{headerRef:x,defaultHeaderHeight:y,headerHeight:E,headerBottom:w}=useHeaderHeight({isShowingSiteWideBanner:p&&!!c,isSponsored:!!d,hasSponsoredBanners:b,isMobile:i});return n.createElement(tc,{id:"navigation-v2",style:{"--default-header-height":y+"px","--header-height":`calc(${E}px - var(--amp-site-wide-closed), 64px)`,"--header-bottom":w+"px"},className:m},n.createElement("section",{ref:x},n.createElement(NavigationBar,{menuItems:f,onTopBarAppears:r,logoComponent:g,subHead:u,projectType:h,languageMenu:n.createElement(o.L,{languageOptions:s,locale:l}),customClasses:v})))},NavigationV2=e=>{let t=Object.assign({siteType:"helloSites",projectType:"discover",locale:"vi-VN",activeMenuService:"categories",ssrMenuContent:{}},e);return n.createElement(u.b,Object.assign({},t),n.createElement(_NavigationV2,Object.assign({},t)))},getNavMenuContent=e=>(0,i.a)(void 0,void 0,void 0,function*(){var t,a,i,n,o,d,c,p,m,g,u,h,v,f,b,x,y,E,w,C,k,M,$,_,N;let I={},L="vi-VN_MB"===e;try{let P="tl-PH"===e?"lang=fil":"";try{let[s,v,f,b,x]=yield Promise.all([fetch((0,r.n)(`${(0,r.c)(e)}/wp-json/api/categories${P?"?"+P:""}`)).then(e=>e.json()),fetch((0,r.n)(`${(0,r.c)(e)}/wp-json/api/spotlights?per_page=10&order_by=start_date${P?"&"+P:""}`)).then(e=>e.json()),fetch((0,r.n)(`${(0,r.c)(e)}/wp-json/api/${L?"health-tools":"healthtools"}${P?"?"+P:""}`)).then(e=>e.json()),fetch((0,r.n)(`${(0,r.c)(e)}/wp-json/api/${L?"health-tools":"healthtools"}/favorites${P?"?"+P:""}`)).then(e=>e.json()),l.V.includes(e)&&fetch((0,r.n)(`${(0,r.c)(e)}/wp-json/api/video/navigation`)).then(e=>e.json())]);I.categories={items:(null===(a=null===(t=null==s?void 0:s.data)||void 0===t?void 0:t.map)||void 0===a?void 0:a.call(t,R.f))||[],spotlights:(null===(d=null===(o=null===(n=null===(i=null==v?void 0:v.data)||void 0===i?void 0:i.articles)||void 0===n?void 0:n.map)||void 0===o?void 0:o.call(n,R.c))||void 0===d?void 0:d.filter(R.d))||[]},I.healthTools={items:(null===(p=null===(c=null==f?void 0:f.data)||void 0===c?void 0:c.map)||void 0===p?void 0:p.call(c,R.e))||[],spotlights:(null===(g=null===(m=null==b?void 0:b.data)||void 0===m?void 0:m.map)||void 0===g?void 0:g.call(m,R.e))||[]},I.videos={spotlights:(null!==(h=null===(u=null==x?void 0:x.data)||void 0===u?void 0:u.videos)&&void 0!==h?h:[]).map(R.i)}}catch(e){}if(L||l.c.includes(e))try{let[t,a]=yield Promise.all([fetch((0,r.n)(`${(0,r.b)()}/api/v1/community?website_url=https://${Q.v[e]}`)).then(e=>e.json()),fetch((0,r.n)(`${(0,r.b)()}/api/v1/options?website_url=https://${Q.v[e]}&meta_key=popular_post`)).then(e=>e.json())]);I.together={items:(null===(b=null===(f=null===(v=null==t?void 0:t.data)||void 0===v?void 0:v.communities)||void 0===f?void 0:f.map)||void 0===b?void 0:b.call(f,s.f))||[],spotlights:(null===(E=null===(y=null===(x=null==a?void 0:a.data)||void 0===x?void 0:x.posts)||void 0===y?void 0:y.map)||void 0===E?void 0:E.call(y,s.a))||[]}}catch(e){}if(l.C.includes(e))try{let[t,a]=yield Promise.all([fetch((0,r.n)((0,r.d)()+`/api/options/setting_menu?site=${Q.v[e]}&type=0`)).then(e=>e.json()),fetch((0,r.n)((0,r.d)()+`/api/options/setting_menu?site=${Q.v[e]}&type=1`)).then(e=>e.json())]);I.care={items:(null===(M=null===(k=null===(C=null===(w=null==t?void 0:t._data)||void 0===w?void 0:w.setting_menu)||void 0===C?void 0:C.menu_specialty)||void 0===k?void 0:k.map)||void 0===M?void 0:M.call(k,R.j))||[],spotlights:(null===(N=null===(_=null===($=null==a?void 0:a._data.setting_menu)||void 0===$?void 0:$.menu_hospital)||void 0===_?void 0:_.map)||void 0===N?void 0:N.call(_,R.k))||[]}}catch(e){}}catch(e){console.error(e)}return I}),getNavMenuContentWithCache=e=>(0,i.a)(void 0,void 0,void 0,function*(){return(yield(0,Y.g)("nav-menu-content",()=>getNavMenuContent(e||"en-PH"),e=>{var t,a;return!!(null===(a=null===(t=null==e?void 0:e.categories)||void 0===t?void 0:t.items)||void 0===a?void 0:a.length)}))||{}})},"1tps":function(e,t,a){a.d(t,{C:function(){return CardPost},S:function(){return SourceList},V:function(){return VerifiedTag},a:function(){return CardPostPopoverMore},b:function(){return CardReply},c:function(){return CardReplyPopover}});var i=a("WFaC"),n=a("q1tI"),o=a("Q9az"),l=a("qEJm"),r=a("Xmc7"),s=a("ns0B"),d=a.n(s),c=a("0MY3"),p=a("v9p6"),m=a("zM4m"),g=a("aZjv"),u=a("lLco"),h=a("UAQt"),v=a("rBCA"),f=a("3wcI"),b=a("iBNF"),x=a("Ob47"),y=a("IQVP"),E=a("+42W"),w=a("8Qlg"),C=a("xLhM"),k=a("ZfEQ"),M=a("ZIYp"),$=a("1Vkj"),_=a("oTwY"),N=a("iZ8j"),I=a("e0pn"),L=a("LWwf"),P=a("PbOM"),S=a("bpvy"),T=a("5FsI"),z=a("qdzI"),D=a("Y12a"),j=a("Zh+3"),A=a("xrdX"),B="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3cpath fill='%233E3F58' d='M5 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2M19 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2M12 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2'/%3e%3c/svg%3e",R="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='3' height='13' fill='none'%3e%3ccircle cx='1.583' cy='6.417' r='1.25' fill='%23595959' transform='rotate(90 1.583 6.417)'/%3e%3ccircle cx='1.583' cy='1.417' r='1.25' fill='%23595959' transform='rotate(90 1.583 1.417)'/%3e%3ccircle cx='1.583' cy='11.417' r='1.25' fill='%23595959' transform='rotate(90 1.583 11.417)'/%3e%3c/svg%3e",O="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.75' d='M2 4h12'/%3e%3cpath stroke='%23737373' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M5.333 4V2.667a1.333 1.333 0 0 1 1.334-1.334h2.666a1.334 1.334 0 0 1 1.334 1.334V4m2 0v9.333a1.334 1.334 0 0 1-1.334 1.334H4.667a1.334 1.334 0 0 1-1.334-1.334V4zM6.667 7.333v4M9.333 7.333v4'/%3e%3c/svg%3e";let CardPostPopoverMore=({authorEmail:e,onDeletePost:t,shareUrl:a,post:o,className:l="",popoverClassName:s="",onEditPost:d})=>{let{data:{locale:v,userInfo:f,env:{isMarryBaby:b}}}=(0,n.useContext)(u.T),{t:x}=(0,r.u)(),[y,E]=(0,n.useState)(!1),[w,C]=(0,n.useState)(!1),[k,M]=(0,n.useState)(!1),{authActionWrapper:$}=(0,g.iV)(),_=e&&(null==f?void 0:f.email)&&e===String(null==f?void 0:f.email);return n.createElement("div",{className:l,onClick:e=>{e.preventDefault(),e.stopPropagation()}},k&&n.createElement(c.S,{url:a,text:null==o?void 0:o.title,onClose:()=>M(!1)}),w&&n.createElement(c.P,{thumbnail:p.C.getAssetPath("trash-bin.svg"),isThumbnailIcon:!0,title:x("popup.deletePost.title"),description:x("popup.deletePost.description"),acceptText:x("popup.deletePost.accept"),cancelText:x("popup.deletePost.cancel"),onAccept:()=>(0,i.a)(void 0,void 0,void 0,function*(){if((null==o?void 0:o.id)&&!y){E(!0);try{let e=yield(0,c.h)({id:o.id,locale:v});(null==e?void 0:e.status)===1&&(null==t||t())}catch(e){}E(!1)}}),onClose:()=>C(!1)}),n.createElement(h.b,{className:s,toggleButtonContent:n.createElement("img",{src:b?B:R,loading:"lazy"}),position:"bottom",align:"end",buttonProps:{isLoading:y},data:_?{isShowheader:!1,type:"list",list:[{icon:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath stroke='%23595959' stroke-linecap='round' stroke-linejoin='round' d='M7.17 3.236H2.995a1.193 1.193 0 0 0-1.193 1.192v8.35a1.193 1.193 0 0 0 1.193 1.192h8.35a1.193 1.193 0 0 0 1.192-1.192V8.603'/%3e%3cpath stroke='%23595959' stroke-linecap='round' stroke-linejoin='round' d='M11.643 2.341a1.265 1.265 0 0 1 1.789 1.79L7.766 9.795l-2.385.596.596-2.385z'/%3e%3c/svg%3e",label:x("actionPopover.edit"),onClick:d},{icon:O,label:x("actionPopover.delete"),onClick:()=>{$(()=>C(!0))}}]}:{isShowheader:!1,type:"list",list:[{icon:c.i,label:x("morePopover.report"),subTree:{title:x("morePopover.report.title"),description:x("morePopover.report.description"),isShowheader:!0,type:"list",list:Object.keys(m.R).map(e=>({label:m.R[e].label,reason:m.R[e].reportReasonText,reasonValue:e})).map(e=>({label:x(e.label),subTree:{title:x("morePopover.reportSubmit.title"),description:x("morePopover.reportSubmit.description"),isShowheader:!0,type:"jsx",jsxRenderer:t=>n.createElement(c.b,{reason:e.reasonValue,reasonText:x(e.reason),postId:null==o?void 0:o.id,onClose:()=>t&&t(!1)})}}))}}]}}))},Z=v.Z.div` position: relative; margin-bottom: 24px; background: white; border-radius: ${b.r.borderRadius}; a { text-decoration: none; } ${f.M.mbDown} { margin-bottom: 8px; } &.flat-top { border-top-left-radius: 0; border-top-right-radius: 0; } .post-pin { padding: 0.5rem 1rem; border-radius: ${b.r.borderRadius} 6px 0 0; } .post-author { display: flex; align-items: center; justify-content: space-between; &.comment { padding-right: 2.6rem; } .author-avatar-wrapper { width: 40px; height: 40px; font-size: 20px; ${f.M.mbDown} { width: 32px; height: 32px; font-size: 16px; } } } .post-content-link-wrapper { color: inherit; cursor: pointer; .post-content-title { padding: 1rem 1rem 0; word-break: break-word; } } .social-preview-wrapper.has-image { margin-bottom: 5px; } .social-preview-wrapper, .image-preview-wrapper, .link-preview-wrapper { width: 100%; &[data-is-reply='true'] { padding-right: 1rem; padding-left: 1rem; } } .post-topics { padding: 0 1rem; } .post-reaction { background: none; border-radius: 0 0 6px 6px; &.hide-top-border { ::before { display: none; } } } .most-engaging-wrapper { padding: 1rem; cursor: pointer; .author-avatar-wrapper { width: 2rem; height: 2rem; font-size: 1rem; } .see-more-comments { width: 100%; padding: 12px 0 0; text-align: unset; } } &[data-most-engaging='true'] { border: none; ${f.M.mbDown} { margin: 1rem; border: 1px solid #e4e8ec; } } .top-divider { border-color: #e4e8ec; } .popover { .popover-menu__btn { display: flex; width: 1.5rem; height: 1rem; align-items: center; justify-content: center; padding: 0; background: transparent; &:hover { background-color: transparent; } } .popover-menu__content { &.--position-bottom { &.--align-end { &::before { right: 12.5px; } } } } } &[data-is-marrybaby='true'] { border: 1px solid #f3f3f3; border-radius: 1rem; /* shadow */ box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.08); .image-preview-wrapper, .link-preview-wrapper { padding-right: 1rem; padding-left: 1rem; } .popover { .popover-menu__btn { width: 24px; height: 24px; ${f.M.mbDown} { width: 18px; height: 18px; } } .popover-menu__content { &.--position-bottom { &.--align-end { &::before { right: 1rem; } width: 350px; ${f.M.mbDown} { max-width: calc(320px - 2rem); } } } } } .most-engaging-wrapper { position: relative; padding: 0; &::before { position: absolute; z-index: 5; top: 0; left: 50%; width: calc(100% - 2rem); height: 1px; background: #f3f3f3; content: ' '; transform: translateX(-50%); } } ${f.M.mbDown} { margin-bottom: 12px; } } `;var H="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath stroke='%23595959' stroke-linecap='round' stroke-linejoin='round' d='M12 13.333 8 10.37l-4 2.963V3.852c0-.314.12-.616.335-.838.214-.222.505-.347.808-.347h5.714c.303 0 .594.125.808.347s.335.524.335.838z'/%3e%3c/svg%3e";let CardReplyPopover=({onDeleteComment:e,commentId:t,className:a="",popoverClassName:o=""})=>{let{data:{env:{isMarryBaby:l},locale:s},action:{pushNotifications:d}}=(0,n.useContext)(u.T),{t:p}=(0,r.u)(),[m,v]=(0,n.useState)(!1),{authActionWrapper:f}=(0,g.iV)();return n.createElement("div",{className:a,onClick:e=>{e.preventDefault(),e.stopPropagation()}},m&&n.createElement(c.P,{thumbnail:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='17' fill='none'%3e%3cg stroke='%23737373' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' clip-path='url(%23a)'%3e%3cpath d='M2 4.008h12m-8.667 0V2.675a1.333 1.333 0 0 1 1.334-1.333h2.666a1.333 1.333 0 0 1 1.334 1.333v1.333m2 0v9.334a1.333 1.333 0 0 1-1.334 1.333H4.667a1.333 1.333 0 0 1-1.334-1.333V4.008zm-6 3.334v4m2.666-4v4'/%3e%3c/g%3e%3cdefs%3e%3cclipPath id='a'%3e%3cpath fill='white' d='M0 .008h16v16H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",isThumbnailIcon:!0,title:p("popup.deleteComment.title"),description:p("popup.deleteComment.description"),acceptText:p("popup.deletePost.accept"),cancelText:p("popup.deletePost.cancel"),onAccept:()=>(0,i.a)(void 0,void 0,void 0,function*(){var a;if(!t)return;let i=yield(0,c.j)({id:t,locale:s});(null==i?void 0:i.status)===1?(e&&e(),d({title:"",message:p("notification.success"),type:"success"})):d({title:"",message:(null===(a=null==i?void 0:i.messages)||void 0===a?void 0:a[0])||p("notification.failure"),type:"danger"})}),onClose:()=>v(!1)}),n.createElement(h.b,{position:"bottom",align:"end",data:{isShowheader:!1,type:"list",list:[{icon:O,label:p("actionPopover.delete"),onClick:()=>{f(()=>{v(!0)})}}]},className:o,toggleButtonContent:n.createElement("img",{src:l?B:R,loading:"lazy"}),buttonProps:{}}))},F=v.Z.div` .add-link { color: ${b.r.colors.primaryBase}; } `,V=v.Z.div` margin: 16px 0; background: ${b.r.colors.yellow50}; padding: 5px 10px; border-radius: 2px; .icon { display: inline-block; vertical-align: middle; margin-right: 6px; } `,U=v.Z.div` display: flex; align-items: center; gap: 8px; `,W=v.Z.div` padding: 8px 16px; `,G=v.Z.div` margin-bottom: 12px; width: 100%; `,q=v.Z.div``,Q=v.Z.div` margin-bottom: 16px; `,Y=v.Z.div` display: flex; flex-wrap: wrap; row-gap: 16px; ${f.M.tdUp} { align-items: center; column-gap: 24px; } `,X=v.Z.a` display: flex; align-items: center; gap: 16px; ${f.M.mbDown} { width: 100%; justify-content: space-between; } `,K=v.Z.div` display: flex; align-items: center; gap: 16px; `,J=v.Z.div` border-radius: ${b.r.borderRadius}; overflow: hidden; width: 48px; height: 48px; img { object-fit: cover; width: 100%; height: 100%; } `,RecommentCategories=({categories:e})=>{let{t}=(0,r.u)(),{data:{locale:a,env:{isMarryBaby:i}}}=(0,n.useContext)(u.T),o=(0,j.g)(a,i);return n.createElement(q,null,n.createElement(Q,null,n.createElement(l.H,{tag:"h6",as:"h5"},t("cardReply.recommentCategories.heading"))),n.createElement(Y,null,e.map(e=>n.createElement(X,{href:o+e.permalink,key:String(e.termId),target:"_blank"},n.createElement(K,null,n.createElement(J,null,n.createElement("img",{src:e.featureImage||p.C.getAssetPath(i?"mb-logo.svg":"/logo/logomark.png"),alt:e.displayName,loading:"lazy"})),n.createElement(z.T,{size:"s3",weight:"bold"},e.displayName)),n.createElement(N.Z,{size:20,color:b.r.colors.gray400})))))},ee=v.Z.a` padding: 12px 0; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid ${b.r.colors.neutral100}; text-decoration: none; &:first-child { border-top: 0; } `,SourceItem=({postTitle:e,articleReviewed:t,modifiedTime:a,href:i})=>{let{t:o}=(0,r.u)(),l=(()=>{let{expert:e,editor:a,is_author:i}=t;if(e){let t={name:e.display_name,role:"expert",avatar:e.avatar};return i?Object.assign({title:o("articleAuthor.title.written-by")},t):"expert"===e.role?Object.assign({title:o("articleAuthor.title.expert")},t):Object.assign({title:o("articleAuthor.title.medical")},t)}if(a)return{title:o("articleAuthor.title.fact-check"),name:a.display_name,avatar:a.avatar}})();return n.createElement(ee,{href:i,title:e,target:"_blank"},n.createElement(z.T,{size:"s3",as:"h5",weight:"bold"},e),n.createElement("div",null,n.createElement(w.C,{avatar:null==l?void 0:l.avatar,avatarProps:{size:32},name:null==l?void 0:l.name,role:null==l?void 0:l.role,hideBackground:!0},n.createElement(w.C.SubTextRow,null,n.createElement(w.C.SubText,null,null==l?void 0:l.title," ",n.createElement("span",{style:{color:b.r.colors.gray800}},null==l?void 0:l.name)),n.createElement(w.C.SubDivider,null),n.createElement(w.C.SubText,null,a)))))};var et={header:"F4mmgSy",chevron:"A7QrQ7A"};let SourceList=e=>{var{listUrl:t,hideSourceList:a,categorySlug:s,editMode:d,collapseSource:c,onListChange:m,isMarryBaby:g}=e,h=(0,i._)(e,["listUrl","hideSourceList","categorySlug","editMode","collapseSource","onListChange","isMarryBaby"]);let{t:v}=(0,r.u)(),[f,E]=(0,n.useState)(t||[]),[w,C]=(0,n.useState)([]),[k,M]=(0,n.useState)([]),[$,N]=(0,n.useState)(!1);(0,n.useEffect)(()=>{a||(0,i.a)(void 0,void 0,void 0,function*(){N(!0);let e=f.map(e=>{let t=new URL(e),a=String(t.pathname).split("/").filter(e=>""!=e),i=t.origin,n=-1!==i.search("marrybaby.vn");return{isMarrySite:n,path:a[a.length-1],href:e}}),t=[...e.map(e=>(0,u.c)(e.isMarrySite?(0,u.s)(y.D9.GET_PREVIEW_ARTICLE,{fullSlug:e.path},!0):(0,u.o)(y.D9.GET_PREVIEW_ARTICLE,{fullSlug:e.path},!0),"GET"))],a=yield Promise.all(t);C(a.map((t,a)=>{var i,n;return(null===(i=null==t?void 0:t.data)||void 0===i?void 0:i.post)&&Object.assign(Object.assign({},(0,x.g)(null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.post)),{href:e[a].href})}).filter(Boolean)),N(!1)})},[]),(0,n.useEffect)(()=>{!a&&(null==w?void 0:w.length)===0&&s&&(0,i.a)(void 0,void 0,void 0,function*(){var e;let t=yield(0,u.c)(g?(0,u.s)(y.D9.GET_CATEGORY_OR_ARTICLE_DETAIL,{fullSlug:s},!0):(0,u.o)(y.D9.GET_CATEGORY_OR_ARTICLE_DETAIL,{fullSlug:s},!0),"GET");(null==t?void 0:t.data)&&M([(0,x.h)(null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.category)])})},[w]);let handleRemoveItem=e=>{E(t=>{let a=[...t];return a.splice(e,1),a}),C(t=>{let a=[...t];return a.splice(e,1),a})};return(0,n.useEffect)(()=>{null==m||m(f)},[f]),n.createElement("div",Object.assign({},h),!d&&n.createElement(V,null,n.createElement("img",{className:"icon",src:p.C.getAssetPath("warning.svg"),alt:"warning",style:{marginBottom:"3px",width:"18px"},loading:"lazy"}),n.createElement(z.T,{size:"s3",as:"span",dangerouslySetInnerHTML:{__html:v("cardReply.disclaimer")}})),a?null:$?n.createElement(D.L,null):w.length>0||d?n.createElement(F,null,n.createElement(S.U,{defaultValue:!c&&"accordion",styles:{control:{borderRadius:"inherit",'&[aria-expanded="false"]':{borderBottom:0}},chevron:{width:"32px",height:"32px"},content:{padding:0,borderBottom:0,borderTop:`1px solid ${b.r.colors.neutral100}`},item:{marginBottom:"16px",borderTopLeftRadius:"8px",borderTopRightRadius:"8px",border:`1px solid ${b.r.colors.neutral100}`,borderBottomLeftRadius:"8px",borderBottomRightRadius:"8px","&[data-active]":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}},chevron:n.createElement("div",{className:et.chevron},n.createElement(I.Z,{color:b.r.colors.gray600,size:20}))},n.createElement(S.U.Item,{value:"accordion"},n.createElement(S.U.Control,null,n.createElement("div",{className:et.header},n.createElement(l.H,{as:"h4",tag:"h6"},v("cardReply.source")))),n.createElement(S.U.Panel,null,n.createElement(W,null,(w||[]).map((e,t)=>n.createElement(U,{key:String(t)},"object"==typeof e?n.createElement(SourceItem,Object.assign({},e)):n.createElement(G,null,n.createElement(T.I,{style:{width:"100%"},name:"source-list",value:e||"",size:"sm",onChange:e=>{E(a=>{let i=[...a];return i[t]=e,i}),C(a=>{let i=[...a];return i[t]=e,i})}})),d&&n.createElement(o.B,{size:"md",color:"transparent",icon:n.createElement(L.Z,null),onClick:()=>handleRemoveItem(t)}))),d&&n.createElement(o.B,{className:"add-link",color:"transparent",size:"md",icon:n.createElement(_.Z,{color:b.r.colors.primaryBase,size:18}),onClick:()=>{E(e=>[...e,""]),C(e=>[...e,""])}},"Add source")))))):n.createElement(RecommentCategories,{categories:k}))},ea=v.Z.div` position: relative; margin-bottom: 0; background: white; border-radius: ${b.r.borderRadius}; .verify-tag { margin-top: 12px; } .post-author { &.with-popover { padding-right: 2.6rem; } .author-avatar-wrapper { width: 40px; height: 40px; font-size: 20px; ${f.M.mbDown} { width: 32px; height: 32px; font-size: 16px; } } } .image-preview-wrapper, .link-preview-wrapper { width: 100%; &[data-is-reply='true'] { padding-right: 1rem; padding-left: 1rem; } } .post-reaction { background: none; border-radius: 0 0 6px 6px; } &[data-is-reply='true'] { > .post-author .author-avatar-wrapper { width: 20px; height: 20px; font-size: 10px; } } &[data-is-reply='false'] { border: 1px solid #e4e8ec; } .expert-wrapper { width: 100%; } &[data-has-booking='true'] { display: grid; .post-author { background-color: ${b.r.colors.primary50}; } .btn-wrapper { padding: 0 16px; .btn-booking { width: 100%; margin: 12px 0; } } } .comment-reply-wrapper { padding: 0 1rem; .more-cmt { .chevron-right { height: 1rem; width: 1rem; vertical-align: middle; } } } .top-divider { border-color: #e4e8ec; } .popover { position: absolute; top: 1.5rem; right: 1rem; .popover-menu__btn { display: flex; width: 1rem; height: 1rem; align-items: center; justify-content: center; padding: 0; background: transparent; &:hover { background-color: transparent; } .popover-menu__content { &.--position-bottom { &.--align-end { &::before { right: 12.5px; } } } } } } &[data-is-marrybaby='true'] { &[data-is-reply='false'] { border: none; } .image-preview-wrapper, .link-preview-wrapper { padding-right: 1rem; padding-left: 1rem; } .popover { .popover-menu__btn { width: 24px; height: 24px; } } margin-left: 56px; ${f.M.mbDown} { margin-left: 40px; } > .post-author { margin-left: -56px; ${f.M.mbDown} { margin-left: -40px; } .author-info { align-items: center; display: flex; align-items: center; .author-info-top { width: 100%; } .author-info-text-wrapper { justify-content: space-between; } } .author-avatar-wrapper { width: 40px; height: 40px; font-size: 20px; ${f.M.mbDown} { width: 24px; height: 24px; font-size: 12px; } } } &[data-is-reply] { > .post-author { .author-avatar-wrapper { width: 40px; height: 40px; font-size: 20px; ${f.M.mbDown} { width: 24px; height: 24px; font-size: 12px; } } } } .comment-reply-wrapper { padding-right: 0; padding-left: 0; } .post-reaction { &::after { position: absolute; bottom: 0; left: 50%; width: calc(100% - 2rem); height: 1px; background: #f3f3f3; content: ' '; transform: translateX(-50%); } } .post-content-wrapper { padding-top: 0; padding-bottom: 0; ${f.M.mbDown} { padding-left: 0.5rem; } } ${f.M.mbDown} { margin-bottom: 12px; } } `,ei=(0,v.Z)(SourceList)` margin-top: 12px; padding: 0.5rem 1rem 1rem; `,VerifiedTag=({userId:e,avatar:t,name:a,role:i,title:l,className:s})=>{let{t:d}=(0,r.u)(),[c,p]=(0,n.useState)(!1);return n.createElement(n.Fragment,null,n.createElement(o.B,{className:`-dzIuHr ${s}`,color:"success",size:"xs",onClick:()=>p(!0),style:{padding:"5px 8px",marginBottom:"12px",borderRadius:"4px"}},n.createElement("span",{className:"text"},n.createElement(P.Z,{isSolid:!0,size:18,color:b.r.colors.green800,className:"icon"}),d("cardReply.verifyBy",{name:`${a||""}`}))),n.createElement(w.c,{open:c,onClose:()=>p(!1),profileModalProps:{zIndex:1e3}},n.createElement(C.a,{authorProps:{userId:e,avatar:t,name:a,role:i,title:l},hideQuestionTab:!0})))},CardReply=({className:e,style:t,comment:a,type:l="comment",level:s=0,replyingId:d,onPostCommentSuccess:p,post:m,onDeleteComment:v,refetchComment:f,hasQuickBookingEnable:b,handleMakeAppointment:x,cardAuthorProps:M,maxChars:_=600,disableShortenContent:N})=>{var I,L,P,S,T,z,D,j,B,R,O,Z,H;let{data:{locale:F,userInfo:V,env:{isMarryBaby:U}}}=(0,n.useContext)(u.T),{t:W}=(0,r.u)(),[G,q]=(0,n.useState)(a||null),{id:Q,countLikes:Y,content:X,replies:K=[],images:J=[],author:ee,liked:et,link:en,mentionedUser:eo,mentions:el}=G,{text:er,replyingTo:es}=(0,c.k)(X),{authActionWrapper:ed}=(0,g.iV)({_joinCommunityIds:[null===(I=null==m?void 0:m.community)||void 0===I?void 0:I.id],_joinTopicIds:null===(L=null==m?void 0:m.topics)||void 0===L?void 0:L.map(e=>e.id)}),[ec,ep]=(0,n.useState)(4),em=null!=V&&!!V.id&&(null==K?void 0:K.some(e=>e.author.id===V.id)),addNewReply=e=>{q(t=>{if(!t.replies.find(t=>t.id===e.id)){t.replies.unshift(e);let a=Object.assign(Object.assign({},t),{replies:t.replies.slice(),countReplies:t.countReplies+1});return f&&f(a),a}return t})},[eg,eu]=(0,n.useState)(!1),eh=(0,n.useMemo)(()=>"comment"===l&&K&&0!=K.length?K.sort((e,t)=>{let a=new Date(e.createdAt).getTime(),i=new Date(t.createdAt).getTime();return a>i?-1:a{var e,t;(null==ee?void 0:ee.hospitalId)&&(e=ee.hospitalId,(0,i.a)(void 0,void 0,void 0,function*(){var t;let a=yield(0,u.c)((0,u.g)(y.tC.GET_HOSPITAL_INFO,{hospital_branch_id:e,website_url:A.v[F]}),"get");(null===(t=null==a?void 0:a._data)||void 0===t?void 0:t.branch)&&ek(null==a?void 0:a._data.branch)})),(null==ee?void 0:ee.doctorId)&&(t=ee.doctorId,(0,i.a)(void 0,void 0,void 0,function*(){var e;let a=yield(0,u.c)((0,u.g)(y.tC.GET_DOCTOR_INFO,{doctorId:t,website_url:A.v[F]}),"get");(null===(e=null==a?void 0:a._data)||void 0===e?void 0:e.doctor)&&e$(null==a?void 0:a._data.doctor)}))},[ee.hospitalId,ee.doctorId]);let e_=(null==eM?void 0:eM.valid_outpatient)||(null==eM?void 0:eM.valid_telemedicine),eN=((null==eC?void 0:eC.total_available_service)||(null==eC?void 0:eC.total_available_doctor))>0,eI=b&&(e_||eN),eL=(null===(S=null==G?void 0:G.author)||void 0===S?void 0:S.type)==="chatbot";return n.createElement(g.I_,{defaultParams:{_joinCommunityIds:[null===(T=null==m?void 0:m.community)||void 0===T?void 0:T.id],_joinTopicIds:null===(z=null==m?void 0:m.topics)||void 0===z?void 0:z.map(e=>e.id)}},n.createElement(ea,{className:e,style:t,"data-is-reply":!!s,"data-is-marrybaby":U,"data-has-booking":eI},"reply"===l&&n.createElement($.D,{className:"top-divider",type:"solid"}),n.createElement("div",{style:{padding:"16px 16px 0"}},n.createElement(w.C,Object.assign({avatar:ey,name:eb,username:ex,timeText:null==m?void 0:m.createdTime,community:null==m?void 0:m.community,className:`post-author ${ef?"with-popover":""}`,type:l,userId:null==ee?void 0:ee.id,role:eE,expertId:null==ee?void 0:ee.partnerId,title:null==ee?void 0:ee.title,doctorId:null==ee?void 0:ee.doctorId,hospitalId:null==ee?void 0:ee.hospitalId,hasQuickBooking:eI,handleMakeAppointment:x,isAnonymous:(null==G?void 0:G.isAnonymous)||!!(null==m?void 0:m.isAnonymous)&&(null===(D=null==m?void 0:m.author)||void 0===D?void 0:D.username)===(null==ee?void 0:ee.username),hideBackground:eL,userType:null==ee?void 0:ee.type},M)),!!(null==G?void 0:G.isVerify)&&!(null==G?void 0:G.isOppose)&&n.createElement(VerifiedTag,{title:null===(j=null==G?void 0:G.userVerify)||void 0===j?void 0:j.title,name:null===(B=null==G?void 0:G.userVerify)||void 0===B?void 0:B.name,userId:null===(R=null==G?void 0:G.userVerify)||void 0===R?void 0:R.id,role:null===(O=null==G?void 0:G.userVerify)||void 0===O?void 0:O.role,avatar:null===(Z=null==G?void 0:G.userVerify)||void 0===Z?void 0:Z.avatar,className:"verify-tag"})),n.createElement(C.P,{className:"post-content-wrapper",replyingTo:es,mentionedUser:eo,description:er,mentions:ew,maxChars:_,disableShortenContent:N}),n.createElement("span",null),n.createElement("span",null),J&&J.length>0?n.createElement("div",{key:"image-preview",className:"image-preview-wrapper","data-is-reply":!0},n.createElement(k.a,{images:J,authorName:null==ee?void 0:ee.username})):null,(!J||0===J.length)&&en?n.createElement("div",{key:"link-preview",className:"link-preview-wrapper","data-is-reply":!0},n.createElement(E.C,{url:en})):null,"most-engaging"!==l?n.createElement(n.Fragment,null,eL&&n.createElement(ei,{listUrl:null==G?void 0:G.source,categorySlug:null==G?void 0:G.categorySlug}),n.createElement(h.C,{type:h.c.reply,loveCount:Y,replyCount:ev,className:"post-reaction",liked:et,isReplied:em,hideCommentIcon:"reply"===l||eL,hasShare:!1,onCommentClick:()=>ed(()=>eu(e=>!e)),onCommentCountClick:()=>ed(()=>{eu(!0)}),onLikeClick:()=>ed(()=>(0,i.a)(void 0,void 0,void 0,function*(){if(Q){let e=yield(0,c.l)({commentId:Q,setLike:!et,locale:F});1===e.status&&q(e=>Object.assign(Object.assign({},e),{liked:!et,countLikes:e.countLikes+(et?-1:1)}))}}))}),eg&&n.createElement(c.I,{replyingId:d||G.id,replyToName:eb,isReply:!0,onClose:()=>eu(!1),onPostSuccess:e=>{"reply"===l?p&&p(e):addNewReply(e)},post:m,replyingUser:ee}),"comment"===l&&K&&K.length>0?n.createElement("div",{className:"comment-reply-wrapper"},null===(H=null==eh?void 0:eh.slice(0,ec))||void 0===H?void 0:H.map(e=>n.createElement(CardReply,{key:e.id,comment:e,type:"reply",className:"comment-reply-item",level:s+1,replyingId:Q,onPostCommentSuccess:addNewReply,post:m,onDeleteComment:()=>{q(t=>Object.assign(Object.assign({},t),{replies:t.replies.filter(t=>t.id!==e.id),countReplies:t.countReplies-1}))},handleMakeAppointment:x,hasQuickBookingEnable:b})),ev>ec&&n.createElement(n.Fragment,null,n.createElement($.D,{className:"top-divider",type:"solid"}),n.createElement(o.B,{className:"more-cmt",size:"lg",color:"ghost",onClick:()=>ep(e=>e+4)},W("comment.seeMoreReplies",{count:ev-ec}),n.createElement("img",{className:"chevron-right",src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath stroke='%232D87F3' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 12 4-4-4-4'/%3e%3c/svg%3e",loading:"lazy"})))):null):null,ef&&n.createElement(CardReplyPopover,{onDeleteComment:v,className:"popover",commentId:G.id})))},getMostEngagingComment=(e,t)=>(0,i.a)(void 0,void 0,void 0,function*(){var a,i,n;let o=yield(0,u.t)((0,u.e)(y.yy.COMMENT.LIST,{postId:e,_locale:t,sort:"popularity",perPage:1,withoutReply:1}),"GET");return null===(n=null===(i=null===(a=null==o?void 0:o.data)||void 0===a?void 0:a.comments)||void 0===i?void 0:i.map(x.e))||void 0===n?void 0:n[0]}),CardPost=({className:e,style:t,hideViewMoreComment:a,showMostEngaging:s,onCommentClick:p,onCommentCountClick:v,onMostEngagingCommentClick:f,onPostCommentSuccess:b,disableCardLink:x,disableShortenContent:$,onDeletePost:_,onEditPost:N,post:I,mostEngagingComment:L,onDeleteComment:P,showInputComment:S,InlineCommentsComponent:T,hasQuickBookingEnable:z,handleMakeAppointment:D,onSaveUnsaveSuccess:j,cardAuthorProps:A,verticalReactions:B=!1})=>{let[R,O]=(0,n.useState)(I),[F,V]=(0,n.useState)(!1),[U,W]=(0,n.useState)(L),{community:G,topics:q,author:Q,slug:Y,isPin:X,liked:K,photos:J,mentions:ee,title:et,description:ea,previewUrl:ei,likesCount:en,commentsCount:eo,id:el,commented:er}=R,{data:{locale:es,togetherUserId:ed,userInfo:ec,env:{isMarryBaby:ep,togetherBasePath:em}},action:{pushNotifications:eg}}=(0,n.useContext)(u.T),eu=!!(null==ec?void 0:ec.id),{t:eh}=(0,r.u)(),[ev,ef]=(0,n.useState)(S),eb=`${em}/${(null==G?void 0:G.slug)||"_"}/${Y||""}`,ex=`${(0,u.k)(es)}${eb}`,{authActionWrapper:ey}=(0,g.iV)((null==G?void 0:G.slug)?{_joinCommunityIds:[G.id],_joinTopicIds:null==q?void 0:q.map(e=>e.id)}:void 0),[eE,ew]=(0,n.useState)(!1);(0,n.useEffect)(()=>{ef(S)},[S]);let eC=(null==Q?void 0:Q.name)||(null==Q?void 0:Q.username)||"",ek=(null==Q?void 0:Q.username)||(null==Q?void 0:Q.name)||"",eM=null==Q?void 0:Q.avatar,e$=(null==R?void 0:R.isAnonymous)?void 0:null==Q?void 0:Q.role,[e_,eN]=(0,n.useState)(null),[eI,eL]=(0,n.useState)(null);(0,n.useEffect)(()=>{var e,t;(null==Q?void 0:Q.hospitalId)&&(e=Q.hospitalId,(0,i.a)(void 0,void 0,void 0,function*(){var t;let a=yield(0,u.c)((0,u.g)(y.tC.GET_HOSPITAL_INFO,{hospital_branch_id:e,website_url:u.l[es]}),"get");(null===(t=null==a?void 0:a._data)||void 0===t?void 0:t.branch)&&eN(null==a?void 0:a._data.branch)})),(null==Q?void 0:Q.doctorId)&&(t=Q.doctorId,(0,i.a)(void 0,void 0,void 0,function*(){var e;let a=yield(0,u.c)((0,u.g)(y.tC.GET_DOCTOR_INFO,{doctorId:t,website_url:u.l[es]}),"get");(null===(e=null==a?void 0:a._data)||void 0===e?void 0:e.doctor)&&eL(null==a?void 0:a._data.doctor)}))},[Q.hospitalId,Q.doctorId]);let eP=(null==eI?void 0:eI.valid_outpatient)||(null==eI?void 0:eI.valid_telemedicine),eS=((null==e_?void 0:e_.total_available_service)||(null==e_?void 0:e_.total_available_doctor))>0;(0,n.useEffect)(()=>{(0,i.a)(void 0,void 0,void 0,function*(){if(el&&eo&&s&&!(null==L?void 0:L.id)){let e=yield getMostEngagingComment(el,es);W(e)}})},[el,es,eo,s,null==L?void 0:L.id]),(0,n.useEffect)(()=>{W(L)},[null==L?void 0:L.id]);let onDeleteComment=e=>(0,i.a)(void 0,void 0,void 0,function*(){if(eo>1&&(null==U?void 0:U.id)&&(null==U?void 0:U.id)===(null==e?void 0:e.id)){let e=yield getMostEngagingComment(el,es);W(e)}O(e=>Object.assign(Object.assign({},e),{commentsCount:e.commentsCount-1})),P&&P(e)});return n.createElement(g.I_,{defaultParams:(null==G?void 0:G.slug)?{_joinCommunityIds:[G.id],_joinTopicIds:null==q?void 0:q.map(e=>e.id)}:void 0},F&&n.createElement(c.S,{url:ex,avatar:m.D,text:et,onClose:()=>V(!1)}),n.createElement(Z,{className:e,style:t,"data-is-marrybaby":ep},X?n.createElement(h.a,{className:"post-pin"}):null,n.createElement("div",{style:{position:"relative",padding:"1rem 1rem 0"}},n.createElement(w.C,Object.assign({avatar:eM,name:eC,username:ek,url:x?void 0:eb,community:G,timeText:null==R?void 0:R.createdTime,className:"post-author",role:e$,userId:null==Q?void 0:Q.id,expertId:null==Q?void 0:Q.partnerId,doctorId:null==Q?void 0:Q.doctorId,hospitalId:null==Q?void 0:Q.hospitalId,title:null==Q?void 0:Q.title,hasQuickBooking:z&&(eP||eS),handleMakeAppointment:D,"data-testid":"name",isAnonymous:!!(null==R?void 0:R.isAnonymous),extendEle:n.createElement(CardPostPopoverMore,{authorEmail:String(null==Q?void 0:Q.email),onDeletePost:_,shareUrl:ex,post:R,className:"popover",onEditPost:N})},A))),n.createElement("a",{href:x?void 0:eb,className:"post-content-link-wrapper"},et&&n.createElement(l.H,{className:"post-content-title",as:"h2",tag:"h5",fontWeight:"bold","data-testid":"Title of the Post"},d()(et)),n.createElement(C.P,{className:"post-content-wrapper",description:ea,disableShortenContent:$,mentions:ee,"data-testid":"Content of the Post"})),n.createElement("span",null),n.createElement("span",null),n.createElement("div",{key:"tag-topic"},q&&q.length>0?n.createElement(h.T,{topics:q,className:"post-topics"}):null),n.createElement("div",{key:"social-preview"},(null==R?void 0:R.introUrl)?n.createElement("div",{className:`social-preview-wrapper ${(null==J?void 0:J.length)?"has-image":""}`},n.createElement(M.S,{url:R.introUrl,image:R.bannerImage})):null),n.createElement("div",{key:"image-preview"},(null==J?void 0:J.length)?n.createElement("div",{className:"image-preview-wrapper"},n.createElement(k.a,{images:J,authorName:null==Q?void 0:Q.name,isSensitive:!!(null==R?void 0:R.isSensitive)})):null),n.createElement("div",{key:"link-preview"},(null==R?void 0:R.introUrl)||(null==J?void 0:J.length)||null==ei||!ei.url?null:n.createElement("div",{className:"link-preview-wrapper"},n.createElement(E.C,{title:ei.title,url:ei.url,image:ei.image}))),n.createElement(h.C,{isMarryBaby:ep,type:h.c.post,loveCount:en,replyCount:eo,className:`post-reaction ${(null==J?void 0:J.length)||(null==ei?void 0:ei.url)?"hide-top-border":""}`,liked:eE?!K:K,isReplied:er,isSaved:(null==R?void 0:R.bookmarked)||!1,onCommentClick:()=>ey(()=>{p?p():ef(e=>!e)}),onCommentCountClick:()=>{ey(()=>{ep?ef(!0):v?v():x||(window.location.href=eb)})},onShareClick:()=>{V(!0)},onLikeClick:()=>(0,i.a)(void 0,void 0,void 0,function*(){ey(()=>(0,i.a)(void 0,void 0,void 0,function*(){if(el&&!eE){ew(!0);try{let e=yield(0,c.m)({id:el,locale:es});(null==e?void 0:e.status)!==1?eg((0,c.g)(eh)):O(e=>Object.assign(Object.assign({},e),{likesCount:(e.likesCount||0)+(e.liked?-1:1),liked:!e.liked}))}catch(e){eg((0,c.g)(eh))}ew(!1)}}))}),onSaveClick:()=>{ey(()=>(0,i.a)(void 0,void 0,void 0,function*(){if((null==ec?void 0:ec.id)&&(null==R?void 0:R.id)){if(null==R?void 0:R.bookmarked){let e=yield(0,u.b)((0,u.e)(y.yy.BOOKMARK.DELETE,{_locale:es}),"DELETE",{headers:{"Content-Type":"application/json"},data:{post_id:String(R.id)}});(null==e?void 0:e.status)===1?(eg({title:"",message:eh("post.remove.success"),type:"success",displayIcon:H}),null==j||j()):eg({title:"",message:eh("post.remove.failed"),type:"danger",displayIcon:H})}else{let e=yield(0,u.b)((0,u.e)(y.yy.BOOKMARK.CREATE,{_locale:es}),"POST",{headers:{"Content-Type":"application/json"},data:{user_id:ed||ec.id,post_id:R.id}});(null==e?void 0:e.status)===1?(eg({title:"",message:eh("post.save.success"),type:"success",displayIcon:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23595959'%3e%3cpath stroke='%23595959' stroke-linecap='round' stroke-linejoin='round' d='M12 13.333 8 10.37l-4 2.963V3.852c0-.314.12-.616.335-.838.214-.222.505-.347.808-.347h5.714c.303 0 .594.125.808.347s.335.524.335.838z'/%3e%3c/svg%3e"}),null==j||j()):eg({title:"",message:eh("post.save.failed"),type:"danger",displayIcon:H})}}}))},onGoToUrl:e=>{let t=e?`${ex}${e}`:ex;eu?window.location.href=t:ey(()=>window.location.href=t)},showingMostEngaging:!!(s&&(null==U?void 0:U.id)),isVertical:B}),ev&&n.createElement(c.I,{isMainCmt:!S,onClose:()=>ef(!1),onPostSuccess:e=>{0!==eo||(null==U?void 0:U.id)||W(e),O(e=>Object.assign(Object.assign({},e),{commentsCount:e.commentsCount+1,commented:!0})),b&&b(e)},post:R}),s&&(null==U?void 0:U.id)?n.createElement("div",{className:"most-engaging-wrapper",onClick:e=>{f?(e.stopPropagation(),f()):window.location.href=eb}},n.createElement(CardReply,{hasQuickBookingEnable:z,handleMakeAppointment:D,comment:U,post:R,onDeleteComment:()=>{onDeleteComment&&onDeleteComment(U)},className:"most-engaging-comment",type:"most-engaging",key:U.id,cardAuthorProps:A}),eo>1&&!a&&n.createElement(o.B,{className:"see-more-comments",color:"ghost",size:"md"},eh("comment.seeMoreComments",{count:eo-1}))):null,T))}}}]);