(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6588],{15393:function(e,t,a){"use strict";a.d(t,{$:function(){return ao},A:function(){return qe},B:function(){return Qe},C:function(){return dt},D:function(){return Jt},E:function(){return pi},F:function(){return nt},G:function(){return it},H:function(){return yi},I:function(){return It},J:function(){return ki},K:function(){return Fi},L:function(){return Vi},M:function(){return Xa},N:function(){return Ki},O:function(){return wi},P:function(){return ot},Q:function(){return Ji},R:function(){return rt},S:function(){return la},T:function(){return st},U:function(){return sl},V:function(){return cl},W:function(){return Yl},X:function(){return yl},Y:function(){return fl},Z:function(){return Dl},_:function(){return zo},a:function(){return Ke},a0:function(){return Mo},b:function(){return Xe},c:function(){return ct},d:function(){return ut},e:function(){return gt},f:function(){return wt},g:function(){return Tt},h:function(){return zt},i:function(){return $t},j:function(){return Vt},k:function(){return qt},l:function(){return aa},m:function(){return da},n:function(){return ba},o:function(){return fa},p:function(){return Sa},q:function(){return Ta},r:function(){return Oa},s:function(){return Ua},t:function(){return Qa},u:function(){return Ja},v:function(){return rn},w:function(){return zn},x:function(){return Zn},y:function(){return ti},z:function(){return ni}});var n=a(67294),i=a(75529),l=a(13597),o=a(89814),r=a(48560),s=a(11024),c=a(33919),d=a(22484),m=a(68622),p=a(71663),u=a(32680),g=a(48337),h=a(46784),v=a(91938),b=a(44079),y=a(53515),f=a(2566),E=a(34372),x=a(81972),w=a(44036),C=a(55157),k=a(6483),N=a(19827),B=a(9724),S=a(69984),T=a(34261),M=a(23314),z=a(41950),D=a(7366),$=a(54508),P=a(36380),I=a.n(P),A=a(86262),L=a(14646),j=(a(47856),a(29355)),O=a(92351),_=a(93867),Z=a(23493),H=a.n(Z),F=a(19220),R=a(42010),W=a(55482),U=a(70917),G=a(15020),V=a(22190),q=a(86826),Y=a(70027),K=a(77349),Q=a(313),X=a(43703),J=a(11640),ee=a(54559),te=a(30890),ae=a(51085),ne=a(3151),ie=a(24257),le=a(42699),oe=a(33913),re=a(90411),se=a.n(re),ce=a(49640),de=a(93393),me=a(48566),pe=a(1824),ue=a(34317),ge=a(87801),he=a(2465),ve=a(32439),be=a(91538),ye=a(10070),fe=a(14569),Ee=a(45417),xe=a(97944),we=a(94599),Ce=a(26706),ke=a(41695),Ne=a(46411),Be=a(27713),Se=a(68953),Te=a(15975),Me=a(32886),ze=a(63096),De=a(9713),$e=a(75762),Pe=a(91739),Ie=a(31932),Ae=a(32951),Le=a(39333),je=a(60305),Oe=a(85564),_e=a.n(Oe),Ze=a(45578),He=a.n(Ze),Fe=a(87474),Re=a(76507),We=a(34155),Ue="CHw-fZZ",Ge="_03U6VRS",Ve="EO828Vv";const qe=({style:e,onClose:t,text:a,type:l,contentIcon:o,closeIcon:r,className:s,description:c})=>n.createElement("div",{className:`${Ue} ${s||""}`,style:e,"data-alert-type":l},n.createElement("div",{className:Ge},n.createElement("div",{className:"icon-title"},o,n.createElement(i.T,{weight:"bold",size:"label1"},a)),n.createElement(i.T,{weight:"regular",size:"p3"},c)),n.createElement("div",{className:Ve,onClick:t},r)),Ye={xs:28,small:32,medium:40,large:48,xl:64,xxl:80,xxxl:96},Ke=({type:e="square",size:t,avatarImg:a,avatarUrl:i,firstLetter:o,backgroundColor:s,onClick:c,style:d,className:m,width:p,height:u,alt:g})=>{const h=t?Ye[t]:void 0,[v,b]=(0,n.useState)(!1);(0,n.useEffect)((()=>{if(i){const e=document.createElement("img");e.setAttribute("src",i),e.addEventListener("error",(()=>{b(!0)}))}}),[i,b]);const y=(!i&&!a||v)&&o;return n.createElement(l.b,{style:Object.assign(Object.assign({},d),{"--size":h?h+"px":void 0,"--width-prop":p?p+"px":void 0,"--height-prop":u?u+"px":void 0,"--background-color":s}),"data-has-max":!(!p||!u),"data-avatar-type":e,onClick:c,className:m,avatarUrl:i,"data-custom-size":!!t},a,i&&!v&&n.createElement(r.I,{src:i,alt:g||"avatar"}),y&&o)},Qe=({amount:e,type:t,size:a="medium",color:i="primary",icon:o,className:r})=>n.createElement(l.c,{"data-notification-type":t,"data-notification-size":a,"data-notification-color":i,"data-has-icon":!!o||void 0,notificationType:t,notificationSize:a,notificationColor:i,hasIcon:!!o,className:r},n.createElement("div",null,e&&n.createElement("span",null,e)," ",o&&n.createElement("div",null,o))),Xe=({style:e,children:t,className:a,size:i="lg",type:o="bold",upperCase:r,as:s="h4",color:c})=>n.createElement(l.d,{style:Object.assign({color:c},e),className:a,"data-size":i,"data-type":o,"data-uppercase":r,as:s},t),Je=()=>n.createElement("style",null,".file-dropdown-path{fill:none;stroke:#595959;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.5px}"),et=()=>n.createElement("svg",{id:"prefix__Layer_1","data-name":"Layer 1",viewBox:"0 0 12.17 14.83"},n.createElement("defs",null,n.createElement("clipPath",{id:"prefix__clip-path",transform:"translate(-1.92 -1.54)"},n.createElement("path",{fill:"none",d:"M0 .96h16v16H0z"}))),n.createElement("title",null,"File"),n.createElement("g",{clipPath:"url(#prefix__clip-path)"},n.createElement("path",{className:"file-dropdown-path",d:"M8.67 2.29H4a1.33 1.33 0 00-1.33 1.33v10.67A1.33 1.33 0 004 15.62h8a1.33 1.33 0 001.33-1.33V7z",transform:"translate(-1.92 -1.54)"}),n.createElement("path",{className:"file-dropdown-path",d:"M8.67 2.29V7h4.66",transform:"translate(-1.92 -1.54)"}))),tt=()=>n.createElement("svg",{id:"prefix__Layer_1","data-name":"Layer 1",viewBox:"0 0 13.5 13.5"},n.createElement("title",null,"download"),n.createElement("path",{className:"file-dropdown-path",d:"M14 11v2.66A1.33 1.33 0 0112.67 15H3.33A1.33 1.33 0 012 13.62V11M4.67 7.62L8 11l3.33-3.34M8 11V3",transform:"translate(-1.25 -2.21)"})),at=()=>n.createElement("svg",{id:"prefix__Layer_1","data-name":"Layer 1",viewBox:"0 0 13.5 13.5"},n.createElement("title",null,"upload"),n.createElement("path",{className:"file-dropdown-path",d:"M14 11v2.66A1.33 1.33 0 0112.67 15H3.33A1.33 1.33 0 012 13.62V11M11.33 6.29L8 3 4.67 6.29M8 3v8",transform:"translate(-1.25 -2.21)"})),nt=({className:e,value:t,options:a,onUploadSelected:i,id:o,placeholderIcon:r,placeholder:s,style:c})=>{const[d,m]=(0,n.useState)(!1),p=()=>m(!d),u=(0,n.useRef)(a.map((e=>"upload"===e.type&&n.createElement("input",{id:"uploader-dropdown-input-"+o+"-"+e.value,key:"uploader-dropdown-input-"+o+"-"+e.value,accept:e.fileAcceptedType,multiple:e.multiple,type:"file",style:{display:"none"},onChange:e=>{console.log("change"),i(e.target.files)}}))));return n.createElement(l.e,{className:e,"data-dropdown-open":!!d,id:o,"data-has-icons":!0,style:c,onBlur:()=>m(!1),tabIndex:0},n.createElement(Je,null),n.createElement(l.f,{onClick:p},r||n.createElement(et,null)," ",n.createElement("span",null,t&&t.value?t.label:s)),d&&n.createElement(l.g,{onClick:p,"data-has-icons":!0},a.map((e=>n.createElement(l.h,{key:`${o}-${e.value}`,"data-selected":t&&t.value===e.value||void 0,onClick:()=>{return"upload"===e.type?(e=>{var t;null===(t=document.querySelector(e))||void 0===t||t.click()})("#uploader-dropdown-input-"+o+"-"+e.value):void((t=e.url)&&window.open(t,"_blank"));var t}},n.createElement(l.i,null,e.icon||"download"===e.type?n.createElement(tt,null):n.createElement(at,null)),e.label)))),n.createElement(n.Fragment,null,u.current))},it=({className:e,columns:t,columnsDesktop:a,gridTemplateColumns:i,gridTemplateColumnsDesktop:o,gap:r,children:s,justifyChildren:c,style:d,alignItems:m})=>n.createElement(l.j,{className:e,style:Object.assign({"--columns-count":t,"--columns-count-desktop":a,"--grid-template-columns":i,"--grid-template-columns-desktop":o,"--justify-children":c,"--grid-gap":r,"--align-items":m},d)},s),lt=({pagesAmount:e,activePage:t,handlePageChange:a,handleClick:i,href:r,queryPageName:s="page"})=>{const c=[...Array(e)].map(((e,t)=>t+1)),[d,m]=(0,n.useState)(t<=4?c.slice(0,5):t>=c.length-3?c.slice(c.length-5,c.length):c.slice(t-2,t+1));return(0,n.useEffect)((()=>{t<=4?m(c.slice(0,5)):t>=c.length-3?m(c.slice(c.length-5,c.length)):m(c.slice(t-2,t+1))}),[t]),n.createElement(n.Fragment,null,t>4&&n.createElement(n.Fragment,null,n.createElement(l.m,{onClick:()=>a(1)},r?n.createElement("a",{href:r,onClick:i},1):1),n.createElement(l.m,null,"...")),d.map((e=>n.createElement(l.m,{key:`pagination+${e}`,"data-page-active":e===t||void 0,onClick:()=>a(e)},r?n.createElement("a",{href:(0,o.f)(r,e,s),onClick:i},e):e))),ta(c.length)},r?n.createElement("a",{href:(0,o.f)(r,c.length,s),onClick:i},c.length):c.length)))},ot=({className:e,pagesAmount:t,currentPage:a,onChange:i,onClick:r,style:s,href:c,queryPageName:d="page"})=>{const m=[...Array(t)].map(((e,t)=>t+1)),[p,u]=(0,n.useState)(a),g=(0,n.useMemo)((()=>c&&c.endsWith("&page=")?c.replace("&page=",""):c),[c]),h=t-1,v=e=>{e<=t&&e>0&&(u(e),i(e))},b=e=>{r&&r(e)};return(0,n.useEffect)((()=>{u(a)}),[a]),n.createElement(l.k,{className:e,style:s},n.createElement(l.l,{className:"prev-page",onClick:()=>v(p-1),"data-last-page":1===p||void 0},g?n.createElement("a",{href:(0,o.f)(g,p,d),onClick:b},n.createElement("svg",{width:"7",height:"10",viewBox:"0 0 7 10",fill:"none"},n.createElement("path",{d:"M5.5 9L1.5 5L5.5 1",stroke:"#2D87F3",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))):n.createElement("svg",{width:"7",height:"10",viewBox:"0 0 7 10",fill:"none"},n.createElement("path",{d:"M5.5 9L1.5 5L5.5 1",stroke:"#2D87F3",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))),m.length>8?n.createElement(lt,{pagesAmount:t,activePage:p,handlePageChange:v,handleClick:b,href:g,queryPageName:d}):m.map((e=>n.createElement(l.m,{key:`pagination+${e}`,"data-page-active":e===p||void 0,onClick:()=>v(e)},g?n.createElement("a",{href:(0,o.f)(g,e,d),onClick:b},e):e))),n.createElement(l.l,{className:"next-page",onClick:()=>v(p+1),"data-last-page":p===h+1||void 0},g?n.createElement("a",{href:(0,o.f)(g,p,d),onClick:b},n.createElement("svg",{width:"7",height:"10",viewBox:"0 0 7 10",fill:"none"},n.createElement("path",{d:"M1.5 9L5.5 5L1.5 1",stroke:"#2D87F3",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))):n.createElement("svg",{width:"7",height:"10",viewBox:"0 0 7 10",fill:"none"},n.createElement("path",{d:"M1.5 9L5.5 5L1.5 1",stroke:"#2D87F3",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))))},rt=({size:e="small",label:t,name:a,checked:i,value:l,className:o,isDisabled:s=!1,onChange:c,dataEventCategory:d,dataEventAction:m,dataEventLabel:p})=>{const u=!!m&&!!d&&!!p?{"data-event-category":d,"data-event-action":m,"data-event-label":p}:{};return n.createElement(r.R,Object.assign({size:"small"===e?"md":"lg",label:t,name:a,checked:i,value:l,className:o,disabled:s,onChange:e=>null===c||void 0===c?void 0:c(e.target.value)},u))},st=({type:e,children:t,style:a,isInline:i,isSquared:o=!1,className:r,isLight:c,hasMorePadding:d,isLink:m,isSelected:p,textProps:u={size:"sm"}})=>{const g=u.color?{"--text-props-color":u.color}:{};return n.createElement(l.n,{"data-is-squared":o||void 0,"data-tag-type":e,"data-is-light":c||void 0,"data-has-more-padding":d||void 0,"data-is-inline":i||void 0,style:Object.assign(Object.assign({},a),g),className:r,"data-is-selected":p||void 0,"data-is-link":m||void 0,tagType:e,isInline:i,tagHasMorePadding:d,tagIsLight:c,tagIsSquared:o,tagIsALink:m},n.createElement(s.T,Object.assign({},u),t))},ct=({className:e,id:t,onChange:a,checked:i,style:o,label:r})=>n.createElement(l.o,{className:e,style:o},n.createElement("input",{type:"checkbox",id:t,onChange:a,checked:i}),n.createElement("label",{htmlFor:t},n.createElement(l.p,null),r&&n.createElement(l.q,null,r))),dt=({label:e,name:t,checked:a,className:i,isDisabled:o,onChange:r,value:s,isRectangle:c,inputDataTestId:d,siteType:m})=>n.createElement(l.r,{className:i,"data-disabled":o||void 0,"data-is-rectangle":c||void 0,"data-label-text":e,"data-theme":m},n.createElement("input",{type:"checkbox",checked:a,name:t,onChange:()=>r(s,!a),disabled:o,value:s,id:`${t}-${s}`,"data-label-text":e,"data-testid":d}),!c&&n.createElement("label",{htmlFor:`${t}-${s}`},e)),mt=e=>n.createElement("svg",Object.assign({},e,{viewBox:"0 0 24 24",fill:"none"}),n.createElement("path",{d:"m139.287 144.772 5.17 3.12c.38.23.85-.11.75-.54l-1.37-5.88 4.56-3.95c.33-.29.16-.84-.29-.88l-6.01-.51-2.35-5.54a.498.498 0 0 0-.92 0l-2.35 5.54-6.01.51a.499.499 0 0 0-.28.88l4.56 3.95-1.37 5.88c-.1.43.37.77.75.54z",fill:"#E4E8EC"}),n.createElement("path",{d:"M139.289 144.771s.013-14.488 0-14.488a.49.49 0 0 0-.46.308l-2.35 5.54-6.01.51a.499.499 0 0 0-.28.88l4.56 3.95-1.37 5.88c-.1.43.37.77.75.54z",fill:"#FFC326"})),pt=e=>{var{isFull:t}=e,a=(0,c._)(e,["isFull"]);return n.createElement("svg",Object.assign({},a,{viewBox:"0 0 32 32",fill:"none"}),n.createElement("path",{d:"m16 23.027 6.893 4.16c.507.306 1.134-.147 1-.72l-1.826-7.84 6.08-5.267a.67.67 0 0 0-.387-1.173l-8.013-.68-3.134-7.387a.664.664 0 0 0-1.226 0l-3.133 7.387-8.014.68a.668.668 0 0 0-.373 1.173l6.08 5.267-1.827 7.84c-.133.573.493 1.026 1 .72z",fill:t?"#FFC326":"#D2D6DC"}))},ut=({gap:e=2,size:t=24,star:a,totalStars:i=5,onSelect:o,hideEmptyStars:r,style:s,className:c})=>{const d=Math.floor(a),m=a-d>=.5?1:0,[p,u]=(0,n.useState)(null),g=p||d,h=p?0:m;return n.createElement(l.s,{"data-selectable":!!o,style:Object.assign({"--gap":e,"--star-size":t},s),className:c},Array.from({length:r?d+m:i}).map(((e,t)=>{const a=()=>!!o&&u(t+1),i=()=>!!o&&u(null);return t+1<=g?n.createElement(pt,{key:t,onClick:()=>null===o||void 0===o?void 0:o(t+1),onMouseOver:a,onMouseLeave:i,isFull:!0}):t+1===g+h?n.createElement(mt,{key:t,onClick:()=>null===o||void 0===o?void 0:o(t+1),onMouseOver:a,onMouseLeave:i}):n.createElement(pt,{key:t,onClick:()=>null===o||void 0===o?void 0:o(t+1),onMouseOver:a,onMouseLeave:i})})))},gt=e=>{var{label:t,availableValue:a,styles:o,isBaby:r,genderValue:s={male:"male",female:"female"}}=e,d=(0,c._)(e,["label","availableValue","styles","isBaby","genderValue"]);const{t:m}=(0,q.u)(),{classes:p,cx:g}=(0,l.u)(void 0,{name:"GenderOptionControl",styles:o}),[h,E]=(0,n.useState)(),x=(0,n.useRef)(null),w=(0,n.useMemo)((()=>[{value:s.male,label:m(r?"gender.boy":"gender.male"),icon:u.C.getAssetPath(r?"health-tools/boy-icon.svg":"health-tools/male-icon.svg")},{value:s.female,label:m(r?"gender.girl":"gender.female"),icon:u.C.getAssetPath(r?"health-tools/girl-icon.svg":"health-tools/female-icon.svg")}]),[]);return(0,n.useEffect)((()=>{E(a)}),[a]),n.createElement(v.x,{ref:x,className:p.root},n.createElement(b.Y.Group,Object.assign({className:"radio-group",label:n.createElement(i.T,{as:"label",size:"s4",weight:"semiBold"},t||m(r?"tools.selectBabyGender":"tools.selectGender")),size:"lg"},d,{classNames:{error:p.groupErr}}),n.createElement(y.k,{className:g(p.wrapper)},w.map((e=>n.createElement(b.Y,Object.assign({className:"gender-item",classNames:{root:p.itemRoot,labelWrapper:p.itemLabelWrapper,label:p.itemLabel,inner:p.itemInner},key:e.value,value:e.value},h&&e.value!==h&&{disabled:!0},{label:n.createElement(y.k,{gap:(0,f.h)(8),align:"center",justify:"center",sx:{zIndex:0}},n.createElement("img",{src:e.icon,className:"gender-image",alt:"female",loading:"lazy"}),n.createElement(i.T,{size:"p3"},e.label))})))))))};var ht="PiqKaXk",vt="HgbW6-m",bt="_6lkfLYy",yt="j7c-onH";const ft=({avatarImg:e,authorName:t,authorLink:a,uploadTime:l,size:o})=>n.createElement("div",{className:yt},n.createElement("div",{className:"author"},n.createElement("div",{className:"avatar","data-size":o},e),n.createElement("div",{className:"poster","data-is-disabled-url":!a},n.createElement(i.T,{size:"lg"===o?"p3":"p4"},n.createElement("a",{href:a},n.createElement("span",{className:"name"},t),"\u2022"," "),n.createElement("span",null,l))))),Et=({isMobile:e,avatarImg:t,name:a,link:l,size:o="lg",specialty:r})=>n.createElement("div",{className:yt},n.createElement("div",{className:"author"},n.createElement("div",{className:"expert-avatar","data-size":o},t),n.createElement("div",{className:"expert","data-is-disabled-url":!l},e?n.createElement("a",{href:l},"lg"===o?n.createElement(n.Fragment,null,n.createElement(g.H,{tag:"h6",className:"expert__name",color:h.t.colors.gray600},a),n.createElement(i.T,{color:h.t.colors.gray500,size:"p3",className:"specialty"},r)):n.createElement(n.Fragment,null,n.createElement(g.H,{tag:"h6",className:"expert__name",color:h.t.colors.gray600},a))):n.createElement("a",{href:l},"lg"===o?n.createElement(n.Fragment,null,n.createElement(g.H,{tag:"h6",className:"expert__name",color:h.t.colors.gray600},a),n.createElement(i.T,{color:h.t.colors.gray500,size:"p3",className:"specialty"},r)):n.createElement(n.Fragment,null,n.createElement("h6",{color:h.t.colors.gray600,className:`${ht} expert__name`},a),n.createElement(i.T,{color:h.t.colors.gray500,size:"p4",className:"specialty"},r)))))),xt=(0,n.memo)((()=>n.createElement("div",{className:"shoppable"},n.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},n.createElement("rect",{width:"24",height:"24",rx:"12",fill:"#1B3250"}),n.createElement("path",{d:"M16.6667 8.00033H15.3333C15.3333 6.16033 13.84 4.66699 12 4.66699C10.16 4.66699 8.66667 6.16033 8.66667 8.00033H7.33333C6.6 8.00033 6 8.60033 6 9.33366V17.3337C6 18.067 6.6 18.667 7.33333 18.667H16.6667C17.4 18.667 18 18.067 18 17.3337V9.33366C18 8.60033 17.4 8.00033 16.6667 8.00033ZM12 6.00033C13.1067 6.00033 14 6.89366 14 8.00033H10C10 6.89366 10.8933 6.00033 12 6.00033ZM12 12.667C10.4467 12.667 9.14 11.607 8.77333 10.167C8.66 9.74699 8.98667 9.33366 9.42 9.33366C9.73333 9.33366 9.98667 9.56033 10.0733 9.86699C10.3067 10.7137 11.08 11.3337 12 11.3337C12.92 11.3337 13.6933 10.7137 13.9267 9.86699C14.0133 9.56033 14.2667 9.33366 14.58 9.33366C15.0133 9.33366 15.3333 9.74699 15.2267 10.167C14.86 11.607 13.5533 12.667 12 12.667Z",fill:"white"}))))),wt=({articleLink:e,authorLink:t,authorName:a,avatarImg:l,banner:o,categoryLink:r,categoryName:s,className:c,dataEventActionForBanner:m,dataEventActionForBookmark:p,dataEventActionForCategory:h,dataEventActionForTitle:v,dataEventCategoryForBanner:b,dataEventCategoryForBookmark:y,dataEventCategoryForCategory:f,dataEventCategoryForTitle:E,dataEventLabelForBanner:x,dataEventLabelForBookmark:w,dataEventLabelForCategory:C,dataEventLabelForTitle:k,direction:N="horizontal",hasAffiliate:B,isBookmark:S=!1,isBookmarkDisplayed:T=!0,isMobile:M=!0,onBookmark:z,onClickCategoryName:D,section:$="normal",size:P="md",specialty:I,style:A,styleBanner:L,styleLabel:j,styleTitle:O,text:_,title:Z,type:H="author",uploadTime:F,articleLinkTarget:R,isPremium:W})=>{const U=e=>{e.stopPropagation(),null===z||void 0===z||z()},G="lg"===P&&"expert"===H?"h4":"lg"===P&&"home"===$?M?"h4":"h3":"lg"===P?"h4":"h5",V="lg"===P?"p3":"p4",q=M||"home"!==$||"lg"!==P||"author"!==H?"c2":"c1";return n.createElement("article",{className:`${bt} ${c||""}`,"data-size":P,style:A,"data-direction":N,"data-is-expert":"expert"===H||void 0},n.createElement("div",{className:"banner",style:L},n.createElement("a",{className:vt,"data-event-category":b,"data-event-action":m,"data-event-label":x,href:e||"#",target:R},o),W&&n.createElement("img",{loading:"lazy",className:"premium",src:u.C.getAssetPath("premium-crown.svg")}),B&&n.createElement(xt,null)),n.createElement("div",{className:"content"},n.createElement("div",{className:"inner-content"},n.createElement(i.T,{style:j,className:"label",size:q,weight:"caption"},n.createElement("a",{className:vt,"data-event-category":f,"data-event-action":h,"data-event-label":C,href:r||"#",onClick:D},s),T&&n.createElement("a",{className:"bookmark",onClick:U},S?n.createElement(d.Z,{size:18,isActive:!0,"data-event-category":y,"data-event-action":p,"data-event-label":w,activeColor:"#2ED69E"}):n.createElement(d.Z,{size:18,"data-event-category":y,"data-event-action":p,"data-event-label":w}))),n.createElement(g.H,{tag:G,style:O,className:"title",as:"lg"===P?"h2":"h3"},n.createElement("a",{className:vt,"data-event-category":E,"data-event-action":v,"data-event-label":k,href:e||"#",target:R},Z)),_&&n.createElement("a",{href:e||"#",target:R},n.createElement(i.T,{size:V,className:"text"},_))),n.createElement("div",{className:"footer"},"author"===H?n.createElement(ft,{size:P,avatarImg:l,authorName:a,authorLink:t,uploadTime:F,handleClick:U,isBookmarked:S,dataEventCategoryForBookmark:y,dataEventActionForBookmark:p,dataEventLabelForBookmark:w}):n.createElement(Et,{size:P,isMobile:M,avatarImg:l,specialty:I,name:a,link:t,handleClick:U,isBookmarked:S,dataEventCategoryForBookmark:y,dataEventActionForBookmark:p,dataEventLabelForBookmark:w}))))},Ct=e=>{var t,a,l,{article:o,author:s,authorAvatar:d,badge:m="",hideDescription:p=!1,isBookmarked:u=!1,onBookmark:g,time:h,tracking:b}=e,f=(0,c._)(e,["article","author","authorAvatar","badge","hideDescription","isBookmarked","onBookmark","time","tracking"]);const{isMobile:w}=(0,r.u)();return console.log({article:o}),n.createElement(E.Z,Object.assign({padding:0,radius:0,sx:{display:"flex",flexDirection:"row",gap:24}},f),n.createElement(E.Z.Section,{w:"100%",h:"100%",miw:264,m:0,className:"pointer"},n.createElement("img",{src:(w?o.featureImageMobile:o.featureImage)||o.featureImage,alt:o.postName,style:{width:"100%"},loading:"lazy"})),n.createElement(E.Z.Section,null,n.createElement(x.Z,{position:"apart",mt:16,mb:4},n.createElement(r.A,{href:(null===(t=null===o||void 0===o?void 0:o.primaryCategory)||void 0===t?void 0:t.permalink)||"#"},n.createElement(i.T,{size:"p4",color:"blue.6"},null===(a=null===o||void 0===o?void 0:o.primaryCategory)||void 0===a?void 0:a.displayName)),n.createElement(v.x,{sx:{cursor:"pointer"},role:"button",onClick:g},u?n.createElement("svg",Object.assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},null===b||void 0===b?void 0:b.bookmark),n.createElement("path",{d:"M6.775 19.7C6.475 19.8333 6.18733 19.8123 5.912 19.637C5.63733 19.4623 5.5 19.2083 5.5 18.875V5.3C5.5 4.8 5.675 4.375 6.025 4.025C6.375 3.675 6.8 3.5 7.3 3.5H16.7C17.2 3.5 17.625 3.675 17.975 4.025C18.325 4.375 18.5 4.8 18.5 5.3V18.875C18.5 19.2083 18.3623 19.4623 18.087 19.637C17.8123 19.8123 17.525 19.8333 17.225 19.7L12 17.45L6.775 19.7Z",fill:"#595959"})):n.createElement("svg",Object.assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},null===b||void 0===b?void 0:b.bookmark),n.createElement("path",{d:"M7 17.95L12 15.8L17 17.95V5.3C17 5.23333 16.9667 5.16667 16.9 5.1C16.8333 5.03333 16.7667 5 16.7 5H7.3C7.23333 5 7.16667 5.03333 7.1 5.1C7.03333 5.16667 7 5.23333 7 5.3V17.95ZM6.775 19.7C6.475 19.8333 6.18733 19.8123 5.912 19.637C5.63733 19.4623 5.5 19.2083 5.5 18.875V5.3C5.5 4.8 5.675 4.375 6.025 4.025C6.375 3.675 6.8 3.5 7.3 3.5H16.7C17.2 3.5 17.625 3.675 17.975 4.025C18.325 4.375 18.5 4.8 18.5 5.3V18.875C18.5 19.2083 18.3623 19.4623 18.087 19.637C17.8123 19.8123 17.525 19.8333 17.225 19.7L12 17.45L6.775 19.7ZM7 5H17H12H7Z",fill:"#595959"})))),n.createElement(i.T,{size:p?"s2":"s1",mb:8,weight:"semiBold",className:"pointer"},o.postTitle||o.postName||""),!p&&n.createElement(i.T,{size:"p2",mb:16,lineClamp:3,className:"pointer"},I()(o.excerpt||o.description||(null===(l=o.postContent)||void 0===l?void 0:l.split("\r\n")[0])||"")),n.createElement(y.k,{gap:12,align:"center"},n.createElement(r.a,{size:32,src:d,withIndicator:!0,indicatorConfig:{offset:5,size:18,label:n.createElement("img",{loading:"lazy",src:m,alt:""})}},"A"),n.createElement(i.T,{size:"n1",c:"gray.6"},s," \u2022 ",h))))};var kt=(0,w.k)(((e,{})=>({root:{},image:{},title:{},category:{},description:{},author:{}})));const Nt=648/440,Bt=1.5,St=e=>{var t,a,l,{article:o,author:s,authorAvatar:d,badge:m="",bannerImageWrapProps:p,hideDescription:u=!1,isBookmarked:g=!1,onBookmark:h,time:b,tracking:f,classNames:w,styles:C,unstyled:k,className:N}=e,B=(0,c._)(e,["article","author","authorAvatar","badge","bannerImageWrapProps","hideDescription","isBookmarked","onBookmark","time","tracking","classNames","styles","unstyled","className"]);const{isMobile:S}=(0,r.u)(),{classes:T,cx:M}=kt({},{name:"ArticleCard",classNames:w,styles:C,unstyled:k}),z=(0,n.useMemo)((()=>u?Bt:Nt),[u]);return n.createElement(E.Z,Object.assign({className:M(T.root,N),padding:"lg",radius:0},B),n.createElement(E.Z.Section,{className:M(T.image,"pointer")},n.createElement(r.b,Object.assign({ratio:z},p),n.createElement("img",{src:(S?o.featureImageMobile:o.featureImage)||o.featureImage,alt:o.postName,style:{objectFit:"cover"}}))),n.createElement(E.Z.Section,null,n.createElement(x.Z,{position:"apart",mt:16,mb:4},n.createElement(r.A,{className:T.category,href:(null===(t=null===o||void 0===o?void 0:o.primaryCategory)||void 0===t?void 0:t.permalink)||"#"},n.createElement(i.T,{size:"p4",color:"blue.6"},null===(a=null===o||void 0===o?void 0:o.primaryCategory)||void 0===a?void 0:a.displayName)),n.createElement(v.x,{sx:{cursor:"pointer"},role:"button",onClick:h},g?n.createElement("svg",Object.assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},null===f||void 0===f?void 0:f.bookmark),n.createElement("path",{d:"M6.775 19.7C6.475 19.8333 6.18733 19.8123 5.912 19.637C5.63733 19.4623 5.5 19.2083 5.5 18.875V5.3C5.5 4.8 5.675 4.375 6.025 4.025C6.375 3.675 6.8 3.5 7.3 3.5H16.7C17.2 3.5 17.625 3.675 17.975 4.025C18.325 4.375 18.5 4.8 18.5 5.3V18.875C18.5 19.2083 18.3623 19.4623 18.087 19.637C17.8123 19.8123 17.525 19.8333 17.225 19.7L12 17.45L6.775 19.7Z",fill:"#595959"})):n.createElement("svg",Object.assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},null===f||void 0===f?void 0:f.bookmark),n.createElement("path",{d:"M7 17.95L12 15.8L17 17.95V5.3C17 5.23333 16.9667 5.16667 16.9 5.1C16.8333 5.03333 16.7667 5 16.7 5H7.3C7.23333 5 7.16667 5.03333 7.1 5.1C7.03333 5.16667 7 5.23333 7 5.3V17.95ZM6.775 19.7C6.475 19.8333 6.18733 19.8123 5.912 19.637C5.63733 19.4623 5.5 19.2083 5.5 18.875V5.3C5.5 4.8 5.675 4.375 6.025 4.025C6.375 3.675 6.8 3.5 7.3 3.5H16.7C17.2 3.5 17.625 3.675 17.975 4.025C18.325 4.375 18.5 4.8 18.5 5.3V18.875C18.5 19.2083 18.3623 19.4623 18.087 19.637C17.8123 19.8123 17.525 19.8333 17.225 19.7L12 17.45L6.775 19.7ZM7 5H17H12H7Z",fill:"#595959"})))),n.createElement(i.T,{className:M(T.title,"pointer"),size:u?"s2":"s1",mb:8,weight:"semiBold"},o.postTitle||o.postName||""),!u&&n.createElement(i.T,{className:M(T.description,"pointer"),size:"p2",mb:16,lineClamp:3},I()(o.excerpt||o.description||(null===(l=o.postContent)||void 0===l?void 0:l.split("\r\n")[0])||"")),n.createElement(y.k,{className:T.author,gap:12,align:"center"},n.createElement(r.a,{size:32,src:d,withIndicator:!0,indicatorConfig:{offset:5,size:18,label:n.createElement("img",{loading:"lazy",src:m,alt:""})}},"A"),n.createElement(i.T,{size:"n1",c:"gray.6"},s," \u2022 ",b))))},Tt=e=>{var{variant:t="vertical"}=e,a=(0,c._)(e,["variant"]);return"horizontal"===t?n.createElement(Ct,Object.assign({},a)):n.createElement(St,Object.assign({},a))},Mt=_.Z.a` display: flex; height: 125px; box-sizing: border-box; flex-direction: column; align-items: center; padding: 8px; border: 1px solid ${h.t.colors.neutral100}; background-color: white; border-radius: ${h.t.borderRadius}; box-shadow: 0px 5px 12px rgba(40, 74, 117, 0.08); cursor: pointer; text-decoration: none; & > .banner { width: 100%; height: 63px; text-align: center; } & > .content { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; text-align: center; word-break: break-word; } * { pointer-events: none; } `,zt=e=>{var{category:t,imgBanner:a,label:l,className:o,style:r,href:s="",dataEventCategory:d,dataEventAction:m,dataEventLabel:p}=e,u=(0,c._)(e,["category","imgBanner","label","className","style","href","dataEventCategory","dataEventAction","dataEventLabel"]);const g=(null===t||void 0===t?void 0:t.customizedUrl)||(null===t||void 0===t?void 0:t.permalink)||s||"";return n.createElement(Mt,Object.assign({"data-event-category":d,"data-event-action":m,"data-event-label":p,className:o,style:r,href:g},(null===t||void 0===t?void 0:t.customizedUrl)&&!(0,O.i)(t.customizedUrl)&&{target:"_blank"},{onClick:e=>{""===g&&e.preventDefault()}},u),n.createElement("div",{className:"banner"},a),n.createElement("div",{className:"content"},n.createElement(i.T,{className:"category_name",size:"sm",weight:"bold"},(null===t||void 0===t?void 0:t.displayName)||l||"")))},Dt=_.Z.div` display: flex; &[data-type='vertical'] { flex-direction: column; div { margin-bottom: 20px; } } &[data-type='horizontal'] { flex-wrap: wrap; div { margin-right: 25px; } &[data-is-rectangle] { div { margin-right: 14px; } } } `,$t=({name:e,values:t=[],onChanges:a,options:i=[],className:l,type:o="vertical",isDisabled:r,isRectangle:s})=>{const c=(e,n)=>{const i=t.slice();if(n)i.push(e);else{const t=i.findIndex((t=>t===e));i.splice(t,1)}a&&a(i)};return n.createElement(Dt,{className:l,"data-type":o,"data-is-rectangle":s||void 0},i.map(((a,i)=>n.createElement(dt,{label:a.label,name:e,key:`${i}-${a.value}`,checked:t.includes(a.value),value:a.value,isDisabled:r||a.disabled,onChange:!r&&c,isRectangle:s}))))},Pt=_.Z.div` display: flex; align-items: center; --font-weight-lg: ${h.t.sizes.fwBold}; --font-weight-md: ${h.t.sizes.fwRegular}; --font-weight-sm: ${h.t.sizes.fwRegular}; &[data-icon-position='left'] { & > *:first-child { margin-right: 8px; } & > *:last-child { width: calc(100% - 24px); } } &[data-icon-position='right'] { & > *:first-child { width: calc(100% - 24px); } & > *:last-child { margin-left: 8px; } } ${o.M.mbDown} { &[data-size='lg'] { font-size: 16px; line-height: 24px; font-weight: var(--font-weight-lg); } &[data-size='md'] { font-size: 14px; line-height: 22px; font-weight: var(--font-weight-md); } &[data-size='sm'] { font-size: 13px; line-height: 20px; font-weight: var(----font-weight-sm); } } `,It=({size:e,iconPosition:t,className:a,children:i,icon:l})=>n.createElement(Pt,{className:a,"data-size":e,"data-icon-position":t},"left"===t&&l,i,"right"===t&&l),At=_.Z.div` position: relative; width: 100%; & div[role='slider'] { -webkit-text-size-adjust: none; -webkit-user-select: none; &:focus { outline: none; } } `,Lt=_.Z.div` position: absolute; top: 19px; width: 24px; height: 24px; color: ${h.t.colors.white}; border: 2px solid ${h.t.colors.white}; border-radius: 50%; transform: translateY(-50%) translateX(-50%); display: flex; align-items: center; justify-content: center; cursor: pointer; background-color: ${h.t.colors.white}; color: ${h.t.colors.gray300}; border: 1px solid ${h.t.colors.gray300}; &[data-is-active='true'] { background-color: ${h.t.colors.primaryBase}; color: ${h.t.colors.white}; border: none; } `,jt=_.Z.div` display: flex; width: 100%; height: 36px; &[data-track-type='detail'] { margin-top: 0; } &[data-track-type='detail'][data-step-passed='true'] > div { border: 1px solid ${h.t.colors.primaryBase}; height: 0px; } &[data-track-type='detail'] > div { border: 1px solid ${h.t.colors.gray200}; height: 0px; } `,Ot=_.Z.div` width: 100%; height: 5px; align-self: center; border-radius: 4px; background-color: ${h.t.colors.gray200}; `,_t=_.Z.div` position: absolute; top: 32px; min-width: 100px; text-align: center; color: ${h.t.colors.gray500}; font-size: ${h.t.sizes.fsCaption2}; font-weight: ${h.t.sizes.fwBold}; &[data-step-passed='true'] { color: ${h.t.colors.gray800}; } `,Zt=_.Z.div` display: flex; align-items: center; `,Ht=_.Z.div` display: flex; align-items: center; font-size: ${h.t.sizes.fsCaption2}; font-weight: ${h.t.sizes.fwBold}; color: ${h.t.colors.gray500}; cursor: pointer; & > svg { height: 10px; width: 10px; margin: 0 14px; } & > svg > path { stroke: ${h.t.colors.gray500}; } &[data-selected='true'] { color: ${h.t.colors.primaryBase}; } `,Ft=_.Z.div` position: absolute; left: 0; top: 19px; height: 24px; cursor: pointer; transform: translateY(-50%); display: flex; align-items: center; padding: 8px; background-color: ${h.t.colors.white}; `,Rt=_.Z.div` min-width: 24px; height: 24px; border: 2px solid ${h.t.colors.white}; border-radius: 50%; margin-right: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; background-color: ${h.t.colors.white}; color: ${h.t.colors.gray300}; border: 1px solid ${h.t.colors.gray300}; &[data-is-active='true'] { border: none; background-color: ${h.t.colors.primaryBase}; color: ${h.t.colors.white}; } `,Wt=_.Z.div` display: flex; align-items: center; justify-content: center; & > svg { height: 20px; width: 20px; margin-right: 8px; & > path { stroke: ${h.t.colors.gray500}; } } `,Ut=_.Z.div` color: ${h.t.colors.gray400}; font-size: ${h.t.sizes.fsCaption2}; font-weight: ${h.t.sizes.fwBold}; margin-right: 8px; flex: 0 0 auto; &[data-step-passed='true'] { color: ${h.t.colors.gray800}; } `,Gt=_.Z.div` position: absolute; top: 32px; font-weight: ${h.t.sizes.fwRegular}; color: ${h.t.colors.gray400}; padding-right: 16px; `,Vt=({type:e,numberOfStep:t,activeStep:a,labelPrefix:i,detailSteps:l,className:o,onChange:r})=>{const[s,d]=(0,n.useState)(0),m=e=>{var{trackClassName:t}=e,a=(0,c._)(e,["trackClassName"]);return n.createElement(jt,Object.assign({},a,{className:t}),n.createElement(Ot,null))},p=n.createElement(At,{className:o+" progress-bar"},n.createElement(m,null),n.createElement((({trackLength:e,activeStep:a,labelPrefix:i="Step",onChange:l})=>n.createElement(n.Fragment,null,Array.from({length:t},((e,t)=>t)).map(((o,r)=>n.createElement(Lt,{"data-is-active":r===a,"data-label":r,style:{left:r*e/(t-1)},onClick:()=>{l&&l(r)},key:r},r+1,n.createElement(_t,{"data-step-passed":r<=a},i+" "+(r+1))))))),{trackLength:s,activeStep:a,labelPrefix:i,onChange:r})),u=n.createElement("svg",{"data-name":"Layer 1",viewBox:"0 0 5.5 9.5"},n.createElement("title",null,"chevron-right"),n.createElement("path",{d:"M.75 8.75l4-4-4-4",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5})),g=n.createElement(Zt,null,l&&Array.from({length:l.length},((e,t)=>t)).map(((e,t)=>{var i;return n.createElement(Ht,{key:t,"data-selected":t===a,onClick:()=>{r&&r(t)}},null===(i=l[t])||void 0===i?void 0:i.text," ",tn.createElement(n.Fragment,null,Array.from({length:e.length},((e,t)=>t)).map(((i,l)=>n.createElement(Ft,{key:l,style:{left:100/e.length*l+"%",width:100/e.length+"%"},onClick:()=>{a&&a(l)}},e[l].icon?n.createElement(Wt,{onClick:()=>{a&&a(l)}},e[l].icon):n.createElement(Rt,{"data-is-active":l===t,"data-label":i,onClick:()=>{a&&a(l)},key:l},l+1),n.createElement(Ut,{"data-step-passed":l{const e=document.querySelector(".progress-bar");e&&d(e.offsetWidth)}),1e3),[]);return(0,n.useEffect)((()=>{const e=document.querySelector(".progress-bar");return d(null===e||void 0===e?void 0:e.offsetWidth),window.addEventListener("resize",v,{passive:!0}),()=>{window.removeEventListener("resize",v)}}),[]),"step-track"===e&&p||"breadcrumb"===e&&g||"detail-track"===e&&h},qt=n.forwardRef((({id:e,value:t,options:a,className:i,isDisabled:l,size:o="small",direction:s="vertical",onChange:c,dataEventCategory:d,dataEventAction:m,dataEventLabel:p},u)=>{const[g,h]=(0,n.useState)(t);(0,n.useImperativeHandle)(u,(()=>({reset(){h(t)}})));const v="small"===o?"md":"lg",b="vertical"===s?C.K:x.Z;return n.createElement(r.R.Group,{name:e,className:i,size:v,value:String(g),defaultValue:t,onChange:e=>{h(e),null===c||void 0===c||c(e)}},n.createElement(b,{spacing:"xl"},a.map((e=>n.createElement(r.R,{key:e.value,value:e.value,label:e.label,disabled:l,"data-event-category":d,"data-event-action":m,"data-event-label":p})))))})),Yt=_.Z.div` --menu-width: 240px; --menu-spacing: 28px 16px; width: var(--menu-width); height: 100vh; padding: var(--menu-spacing); background-color: ${h.t.colors.neutral50}; transition: ease-in-out 0.5s; &[data-is-collapsed] { --menu-width: 64px; --menu-spacing: 28px 8px; } `,Kt=_.Z.div` display: flex; align-items: baseline; justify-content: space-between; svg { transition: 0.4s ease-in-out; } `,Qt=_.Z.div` cursor: pointer; &[data-is-collapsed] { transform: rotate(180deg); } `,Xt=_.Z.figure` display: flex; > img, svg, picture { width: 40px; height: 40px; margin-right: 1rem; border-radius: 6px; object-fit: cover; } > figcaption { p + p { margin-top: 2px; } } `,Jt=({name:e,description:t,image:a,isDescriptionHidden:l})=>n.createElement(Xt,null,a,!l&&n.createElement("figcaption",null,n.createElement(i.T,{size:"p4",weight:"bold"},e),n.createElement(i.T,{size:"p4"},t))),ea=_.Z.div` display: flex; align-items: center; margin-top: 24px; margin-bottom: 36px; figcaption { white-space: nowrap; } &[data-is-collapsed='true'] { img { max-width: 2rem; max-height: 2rem; } } `,ta=_.Z.div` display: flex; align-items: center; padding: 9px 21px; margin-bottom: 4px; border-radius: 6px; &:not([data-is-link-active]) { cursor: pointer; } p { margin-left: 12px; } &[data-is-link-active] { background: ${h.t.colors.primaryBase}; } &[data-is-link-collapsed] { justify-content: center; margin-right: -14px; margin-left: -14px; } `;var aa=Object.freeze({__proto__:null,SideMenu:({isCollapsed:e,className:t,style:a,children:i})=>n.createElement(Yt,{style:a,className:t,"data-is-collapsed":e||void 0},i),SideHeader:({isCollapsed:e,defaultLogo:t,onBackClick:a,customIcon:i})=>n.createElement(Kt,null,n.createElement(F.L,{type:e?"logomark":t||"hellocare",customSize:{width:e?"24px":"77px",height:"24px"}}),n.createElement(Qt,{"data-is-collapsed":e||void 0,onClick:a},i||n.createElement("svg",{"data-name":"Layer 1",viewBox:"0 0 20 20",width:"20px",height:"20px"},n.createElement("path",{d:"M10 .75A9.25 9.25 0 1019.25 10 9.25 9.25 0 0010 .75z",fill:"none",stroke:"#d2d6dc",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),n.createElement("path",{d:"M11.44 6.53L8 10l3.48 3.47",fill:"none",stroke:"#737373",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})))),UserInfo:({isCollapsed:e,userName:t,role:a,avatar:i})=>n.createElement(ea,{"data-is-collapsed":e||void 0},n.createElement(Jt,{image:i,name:t,description:a,isDescriptionHidden:e})),MenuLink:({icon:e,isActive:t,children:a,isCollapsed:l,activeIcon:o,onLinkClick:r,textSize:s="base",textType:c="bold",textColorActive:d="#fff",textColor:m="#595959"})=>n.createElement(ta,{"data-is-link-active":t||void 0,onClick:r,"data-is-link-collapsed":l||void 0},t&&o?o:e,!l&&n.createElement(i.T,{size:s,weight:c,color:t?d:m},a))});const na=_.Z.div` position: relative; width: 100%; > .container { display: flex; width: 100%; -ms-overflow-style: none; overflow-x: auto; scrollbar-width: none; &::-webkit-scrollbar { display: none; } .section { display: flex; width: 100%; flex-direction: column; flex-shrink: 0; margin: auto; > .grid-layout { display: grid; width: 100%; grid-row-gap: 8px; > .item-grid { width: 100%; > * { margin: 0 auto; } } } .progress-bar { display: grid; height: 15px; margin-bottom: 10px; .items-progress { position: relative; display: flex; width: 100%; align-items: center; justify-content: center; .icon-status { position: absolute; display: flex; } .line { width: 50%; height: 2px; background-color: ${h.t.colors.gray600}; } } } } } .bullet-nav { position: absolute; z-index: ${h.t.zIndexes.belowHeader}; bottom: -30px; left: 50%; display: flex; transform: translate(-50%, -50%); } .bullet-nav__link { display: block; width: 8px; height: 8px; padding: 0; margin-right: 8px; backface-visibility: hidden; background-color: #e4e8ec; border-radius: 50%; cursor: pointer; transition: all 0.3s; &.active { &[data-scheme='hellosites'] { background-color: ${h.t.colors.primary600}; } &[data-scheme='marrybaby'] { background-color: ${h.t.mbColors.pink}; } } } .arrow-left { position: absolute; z-index: 10; top: 50%; left: -35px; transform: translateY(-50%); &[data-event-category] > * { pointer-events: none; } } .arrow-right { position: absolute; z-index: 10; top: 50%; right: -35px; transform: translateY(-50%); &[data-event-category] > * { pointer-events: none; } } .image-gallery-wrapper { display: flex; position: relative; margin-top: 16px; justify-content: center; gap: 16px; .image-block { display: block; width: 100%; border: 2px solid transparent; border-radius: 4px; } .image-block.active { border-color: ${h.t.colors.primaryBase}; } img { height: 40px; width: auto; max-width: 100%; } } `,ia=({status:e})=>"inActive"===e?n.createElement("svg",{width:"6",height:"6",viewBox:"0 0 6 6",fill:"none"},n.createElement("circle",{cx:"3",cy:"3",r:"3",fill:"#ADB3BC"})):"active"===e?n.createElement("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"},n.createElement("circle",{cx:"6",cy:"6",r:"4",fill:"#2D87F3"}),n.createElement("circle",{cx:"6",cy:"6",r:"5.5",stroke:"#2D87F3"})):"done"===e?n.createElement("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"},n.createElement("path",{d:"M6 12C9.31371 12 12 9.31371 12 6C12 2.68629 9.31371 0 6 0C2.68629 0 0 2.68629 0 6C0 9.31371 2.68629 12 6 12Z",fill:"#00B16A"}),n.createElement("path",{d:"M8.76061 4.20029L4.80061 7.80029L3.00061 6.16392",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})):n.createElement("svg",{width:"6",height:"6",viewBox:"0 0 6 6",fill:"none"},n.createElement("circle",{cx:"3",cy:"3",r:"3",fill:"#ADB3BC"})),la=({row:e=2,column:t=3,isDotsShown:a=!0,isImageGalleryShown:i=!1,mode:l="infinity",type:o="separated",distanceOverlappedLeft:r={amount:0,unit:"pixel"},children:s,className:c,isProgressShown:d=!1,statusChildren:m,isArrowShown:p=!1,classNameLeftArrow:u,classNameRightArrow:g,dataEventCategory:h,dataEventAction:v,dataEventLabel:b,onChangePage:y,page:f,customPageWidth:E,scheme:x="hellosites",arrowType:w="Discover"})=>{const C="number"===typeof f,[k,N]=(0,n.useState)(C?f:0),B=[];n.Children.map(s,((a,i)=>{i%(e*t)===0&&B.push([]),B[B.length-1].push(n.cloneElement(a))}));const S=(0,n.useRef)(),T=(0,n.useRef)(0),M=e=>{if(!S.current)return;const{clientWidth:t}=S.current,a=E||t,n="intertwined"===o?"percentage"===r.unit?e*a+r.amount/100*a*e:e*a+r.amount*a*e:e*a;S.current.scrollTo({top:0,left:n,behavior:"smooth"}),T.current=e,N(e),y&&y(e)};(0,n.useEffect)((()=>{"number"===typeof f&&(e=>{if(!S.current)return;const{clientWidth:t}=S.current,a=E||t,n="intertwined"===o?"percentage"===r.unit?e*a+r.amount/100*a*e:e*a+r.amount*a*e:e*a;S.current.scrollTo({top:0,left:n,behavior:"smooth"}),T.current=e,N(e)})(f)}),[f]);const z=e=>{if(!S.current)return;const{clientWidth:t}=S.current,a=E||t;let n;n=0===k?0:k*a,"forward"===e&&(n===a*(B.length-1)?(N(B.length-1),n=a*(B.length-1),y&&y(B.length-1)):(N(k+1),n+=a,y&&y(k+1)),S.current.scrollTo({top:0,left:n,behavior:"smooth"})),"back"===e&&(0===n?(N(0),y&&y(0),n=0):(N(k-1),y&&y(k-1),n-=a),S.current.scrollTo({top:0,left:n,behavior:"smooth"}))},D=H()((()=>{if("infinity"===l){if(!S.current)return;const{clientWidth:e,scrollLeft:t}=S.current,a=E||e,n=Math.floor(t/a);N(n),y&&y(n)}}),400);return(0,n.useEffect)((()=>{if("snapped"===l){let e,t,a,n,i,l,s=!1;const c=S.current,d=(l,o)=>{s=!0,a=!1,n=!1,e=l-c.offsetLeft,t=o-c.offsetTop,i=c.scrollLeft},m=e=>{d(e.pageX,e.pageY)},p=e=>{d(e.touches[0].pageX,e.touches[0].pageY)},u=()=>{if(s=!1,a=!1,n=!1,!S.current)return;const{clientWidth:e}=S.current,t=E||e,i="ltr"===l?0!==T.current?T.current-1:T.current:"rtl"===l&&T.current{if(!s)return;const d=o-c.offsetLeft,m=r-c.offsetTop,p=d-e,u=m-t;a||n||!(u>20||u<-20)||(a=!0),!a&&(p>20||p<-20)&&(n=!0,c.scrollLeft=i-p,p>0&&(l="ltr"),p<0&&(l="rtl"),0===p&&(l="none"))},h=e=>{n&&e.preventDefault(),g(e.pageX,e.pageY)},v=e=>{n&&e.preventDefault(),g(e.touches[0].pageX,e.touches[0].pageY)};return null===c||void 0===c||c.addEventListener("mousedown",m,{passive:!0}),null===c||void 0===c||c.addEventListener("touchstart",p,{passive:!0}),window.addEventListener("mouseup",u,{passive:!0}),window.addEventListener("touchend",u,{passive:!0}),null===c||void 0===c||c.addEventListener("mousemove",h,{passive:!0}),null===c||void 0===c||c.addEventListener("touchmove",v,{passive:!0}),()=>{null===c||void 0===c||c.removeEventListener("mousedown",m),null===c||void 0===c||c.removeEventListener("touchstart",p),window.removeEventListener("mouseup",u),window.removeEventListener("touchend",u),null===c||void 0===c||c.removeEventListener("mousemove",h),null===c||void 0===c||c.removeEventListener("touchmove",v)}}}),[]),n.createElement(na,{className:c,"data-row":e,onScroll:D},p&&k>0&&n.createElement("div",{className:`${u} arrow-left`,onClick:()=>z("back"),"data-event-category":h,"data-event-action":v,"data-event-label":b},"Care"===w?n.createElement("svg",{width:"42",height:"42",viewBox:"0 0 42 42",fill:"none"},n.createElement("g",{filter:"url(#filter0_dd_12599_34420)"},n.createElement("path",{d:"M7.00024 19C7.00024 10.1634 14.1637 3 23.0002 3V3C31.8368 3 39.0002 10.1634 39.0002 19V19C39.0002 27.8366 31.8368 35 23.0002 35V35C14.1637 35 7.00024 27.8366 7.00024 19V19Z",fill:"white"}),n.createElement("path",{d:"M20.9293 19L24.7503 15.179C25.1643 14.765 25.1643 14.093 24.7503 13.679C24.3363 13.265 23.6643 13.265 23.2503 13.679L18.6363 18.293C18.2453 18.684 18.2453 19.317 18.6363 19.707L23.2503 24.321C23.6643 24.735 24.3363 24.735 24.7503 24.321C25.1643 23.907 25.1643 23.235 24.7503 22.821L20.9293 19Z",fill:"#595959"}),n.createElement("path",{d:"M23.0002 34C14.716 34 8.00024 27.2843 8.00024 19H6.00024C6.00024 28.3888 13.6114 36 23.0002 36V34ZM38.0002 19C38.0002 27.2843 31.2845 34 23.0002 34V36C32.3891 36 40.0002 28.3888 40.0002 19H38.0002ZM23.0002 4C31.2845 4 38.0002 10.7157 38.0002 19H40.0002C40.0002 9.61116 32.3891 2 23.0002 2V4ZM23.0002 2C13.6114 2 6.00024 9.61116 6.00024 19H8.00024C8.00024 10.7157 14.716 4 23.0002 4V2Z",fill:"#DBDFE5"})),n.createElement("defs",null,n.createElement("filter",{id:"filter0_dd_12599_34420",x:"0.000244141",y:"0",width:"42",height:"42",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},n.createElement("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),n.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),n.createElement("feOffset",{dx:"-2",dy:"2"}),n.createElement("feGaussianBlur",{stdDeviation:"2.5"}),n.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.263201 0 0 0 0 0.335725 0 0 0 0 0.393257 0 0 0 0.123689 0"}),n.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_12599_34420"}),n.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),n.createElement("feOffset",{dx:"-1",dy:"1"}),n.createElement("feGaussianBlur",{stdDeviation:"1"}),n.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.264489 0 0 0 0 0.275745 0 0 0 0 0.28861 0 0 0 0.01 0"}),n.createElement("feBlend",{mode:"normal",in2:"effect1_dropShadow_12599_34420",result:"effect2_dropShadow_12599_34420"}),n.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect2_dropShadow_12599_34420",result:"shape"})))):n.createElement("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none"},n.createElement("path",{d:"M15.9996 28.2218C22.7497 28.2218 28.2218 22.7497 28.2218 15.9996C28.2218 9.24942 22.7497 3.77734 15.9996 3.77734C9.24942 3.77734 3.77734 9.24942 3.77734 15.9996C3.77734 22.7497 9.24942 28.2218 15.9996 28.2218Z",stroke:"hellosites"===x?"#2D87F3":"#e85388",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),n.createElement("path",{d:"M15.9997 11.1109L11.1108 15.9998L15.9997 20.8887",stroke:"hellosites"===x?"#2D87F3":"#e85388",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),n.createElement("path",{d:"M20.8886 15.999L11.1108 15.999",stroke:"hellosites"===x?"#2D87F3":"#e85388",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))),n.createElement("div",{ref:S,className:"container",style:{overflowX:"snapped"===l||p?"hidden":"scroll"}},B.map(((a,i)=>{let l=0;for(let e=0;e{const o=l+t,r=m.find((e=>e.index===o));return n.createElement("div",{className:"items-progress",key:t},0===t&&0===i?n.createElement("div",{className:"line",style:{visibility:"hidden"}}):n.createElement("div",{className:"line"}),n.createElement("div",{className:"icon-status"},n.createElement(ia,{status:null===r||void 0===r?void 0:r.status})),i===B.length-1&&t===a.length-1?n.createElement("div",{className:"line",style:{visibility:"hidden"}}):n.createElement("div",{className:"line"}))}))),n.createElement("div",{className:"grid-layout","data-index":i,style:{gridTemplateColumns:`repeat(${t}, 1fr)`,gridTemplateRows:`repeat(${e}, 1fr)`}},a.map(((e,t)=>n.createElement(n.Fragment,{key:t},n.createElement("div",{className:"item-grid",key:t},e))))))}))),p&&kz("forward"),"data-event-category":h,"data-event-action":v,"data-event-label":b}," ","Care"===w?n.createElement("svg",{width:"42",height:"42",viewBox:"0 0 42 42",fill:"none"},n.createElement("g",{filter:"url(#filter0_dd_12597_34423)"},n.createElement("path",{d:"M7.00024 19C7.00024 10.1634 14.1637 3 23.0002 3C31.8368 3 39.0002 10.1634 39.0002 19C39.0002 27.8366 31.8368 35 23.0002 35C14.1637 35 7.00024 27.8366 7.00024 19Z",fill:"white"}),n.createElement("path",{d:"M24.0712 19L20.2502 15.179C19.8362 14.765 19.8362 14.093 20.2502 13.679C20.6642 13.265 21.3362 13.265 21.7502 13.679L26.3642 18.293C26.7552 18.684 26.7552 19.317 26.3642 19.707L21.7502 24.321C21.3362 24.735 20.6642 24.735 20.2502 24.321C19.8362 23.907 19.8362 23.235 20.2502 22.821L24.0712 19Z",fill:"#595959"}),n.createElement("path",{d:"M23.0002 34C14.716 34 8.00024 27.2843 8.00024 19H6.00024C6.00024 28.3888 13.6114 36 23.0002 36V34ZM38.0002 19C38.0002 27.2843 31.2845 34 23.0002 34V36C32.3891 36 40.0002 28.3888 40.0002 19H38.0002ZM23.0002 4C31.2845 4 38.0002 10.7157 38.0002 19H40.0002C40.0002 9.61116 32.3891 2 23.0002 2V4ZM23.0002 2C13.6114 2 6.00024 9.61116 6.00024 19H8.00024C8.00024 10.7157 14.716 4 23.0002 4V2Z",fill:"#DBDFE5"})),n.createElement("defs",null,n.createElement("filter",{id:"filter0_dd_12597_34423",x:"0.000244141",y:"0",width:"42",height:"42",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},n.createElement("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),n.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),n.createElement("feOffset",{dx:"-2",dy:"2"}),n.createElement("feGaussianBlur",{stdDeviation:"2.5"}),n.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.263201 0 0 0 0 0.335725 0 0 0 0 0.393257 0 0 0 0.123689 0"}),n.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_12597_34423"}),n.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),n.createElement("feOffset",{dx:"-1",dy:"1"}),n.createElement("feGaussianBlur",{stdDeviation:"1"}),n.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.264489 0 0 0 0 0.275745 0 0 0 0 0.28861 0 0 0 0.01 0"}),n.createElement("feBlend",{mode:"normal",in2:"effect1_dropShadow_12597_34423",result:"effect2_dropShadow_12597_34423"}),n.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect2_dropShadow_12597_34423",result:"shape"})))):n.createElement("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none"},n.createElement("path",{d:"M15.9996 28.2218C22.7497 28.2218 28.2218 22.7497 28.2218 15.9996C28.2218 9.24942 22.7497 3.77734 15.9996 3.77734C9.24942 3.77734 3.77734 9.24942 3.77734 15.9996C3.77734 22.7497 9.24942 28.2218 15.9996 28.2218Z",stroke:"hellosites"===x?"#2D87F3":"#e85388",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),n.createElement("path",{d:"M15.9998 20.8891L20.8887 16.0002L15.9998 11.1113",stroke:"hellosites"===x?"#2D87F3":"#e85388",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),n.createElement("path",{d:"M11.1109 16L20.8887 16",stroke:"hellosites"===x?"#2D87F3":"#e85388",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))),a&&n.createElement("ul",{className:"bullet-nav"},B.map(((e,t)=>n.createElement("li",{key:t,className:"bullet-nav__item "},n.createElement("p",{onClick:()=>M(t),className:`bullet-nav__link scroll ${k==t?"active":null}`,"data-scheme":x}))))),i&&n.createElement("div",{className:"image-gallery-wrapper","data-test":B.length},B.slice(0,3).map(((e,t)=>n.createElement("div",{className:`image-block ${k==t?"active":null}`,key:t,onClick:()=>M(t),"data-scheme":x},e)))))},oa=_.Z.div` border-radius: ${h.t.borderRadius}; ${e=>e["data-is-in-card"]&&`\n padding: 12px; \n background-color: ${e["data-card-color"]};`} `,ra=_.Z.div` width: 13px; height: 13px; margin-right: 10px; background-color: ${e=>e["data-color"]}; border-radius: 50%; `,sa=_.Z.div` display: flex; align-items: center; color: ${h.t.colors.gray800}; font-size: ${h.t.sizes.fsParagraph4}; font-weight: ${h.t.sizes.fwRegular}; `,ca=_.Z.div` display: flex; align-items: center; margin-top: 4px; color: ${h.t.colors.gray800}; font-size: ${h.t.sizes.fsHeading2}; font-weight: ${h.t.sizes.fwSemiBold}; & > svg { width: 24px; height: 24px; margin-right: 12px; } &[data-size='small'] { margin-left: 23px; font-size: ${h.t.sizes.fsParagraph4}; font-weight: ${h.t.sizes.fwBold}; } `,da=({type:e,description:t,value:a,withIcon:i,isInACard:l,cardColor:o,className:r})=>n.createElement(oa,{className:r,"data-size":e,"data-is-in-card":"big"===e&&l,"data-card-color":o},n.createElement(sa,null,"small"===e&&n.createElement(ra,{"data-color":o}),t),n.createElement(ca,{"data-size":e},"small"!==e&&i,a)),ma=_.Z.table` width: 100%; position: relative; `,pa=_.Z.td` padding: var(--vertical-spacing) var(--horizontal-spacing); vertical-align: middle; &[data-text-align='left'] { text-align: left; } &[data-text-align='right'] { text-align: right; } &[data-text-align='center'] { text-align: center; } `,ua=_.Z.tr` border-bottom: 1px solid ${h.t.colors.gray100}; &[data-is-active='true'] { background-color: ${h.t.colors.gray200}; } `,ga=({children:e,className:t,style:a,isActive:i,onRowClicked:l,rowId:o})=>n.createElement(ua,{className:t,"data-is-active":i,style:a,onClick:()=>{l&&l(o)}},e),ha=_.Z.thead` th { padding: var(--vertical-spacing) var(--horizontal-spacing); text-align: left; color: ${h.t.colors.gray500}; font-weight: ${h.t.sizes.fwBold}; } &[data-is-sticky] { th { position: sticky; top: 0; background: white; border-bottom: 2px solid ${h.t.colors.gray200}; } } `,va=_.Z.tbody` position: relative; &[data-is-striped] { > tr:nth-child(odd) { background-color: ${h.t.colors.neutral50}; } } &[data-is-hoverable] { > tr:hover { background-color: ${h.t.colors.neutral100}; } } `;var ba=Object.freeze({__proto__:null,Table:({children:e,className:t,style:a,horizontalPadding:i,verticalPadding:l})=>n.createElement(ma,{className:t,style:Object.assign({"--horizontal-spacing":i||"19px","--vertical-spacing":l||"26px"},a)},e),Cell:({children:e,className:t,style:a,textAlign:i,isTableHead:l})=>n.createElement(pa,{className:t,style:a,"data-text-align":i||"left",as:l?"th":"td"},e),Head:({isSticky:e,children:t,className:a,style:i})=>n.createElement(ha,{className:a,"data-is-sticky":e||void 0,style:i},n.createElement(ga,null,t)),Row:ga,Body:({children:e,className:t,style:a,isHoverable:i,isStriped:l})=>n.createElement(va,{className:t,style:a,"data-is-striped":l||void 0,"data-is-hoverable":i||void 0},e)}),ya=(0,w.k)((e=>{const t=(0,k.A)("itemLabel");return{root:{display:"inline-flex",maxWidth:"100%",borderBottom:`1px solid ${e.colors.neutral[1]}`,"-webkit-overflow-scrolling":"touch",overflowX:"auto",overflowY:"hidden","-ms-overflow-style":"none","scrollbar-width":"none","&::-webkit-scrollbar":{display:"none"},columnGap:e.spacing.lg},item:{display:"flex",alignItems:"center",paddingBottom:"4px","&:hover":{cursor:"pointer"},"&.active":{color:e.fn.primaryColor(),borderBottom:`3px solid ${e.fn.primaryColor()}`,bottom:"-1px",position:"relative",[`& .${t}`]:{}},"&[data-event-category] > *":{pointerEvents:"none"}},itemInner:{display:"flex",alignItems:"center"},label:{ref:t},icon:{marginRight:e.spacing.xs}}}));const fa=({style:e,initialTab:t,tabContent:a,onChange:l,className:o,dataEventCategory:r,dataEventAction:s,dataEventLabel:c,id:d,styles:m})=>{const{classes:p,cx:u,theme:g}=ya(void 0,{name:"Tabs",styles:m}),[h,v]=(0,n.useState)(t||0);return(0,n.useEffect)((()=>{v(t)}),[t]),n.createElement("ul",{style:e,className:u(p.root,o),role:"tablist",id:d},a.map(((e,t)=>n.createElement("li",{className:`${p.item} ${h===t?"active":""} ${e.className}`,"aria-selected":h===t,role:"tab",onClick:()=>{v(t),l&&l(t)},onKeyDown:e=>{"Enter"===e.key&&(v(t),l&&l(t))},key:t,"data-event-category":e.dataEventCategory||r,"data-event-action":e.dataEventAction||s,"data-event-label":e.dataEventLabel||c,tabIndex:0,"data-testid":e.dataTestid},n.createElement("div",{className:p.itemInner},e.icon&&n.createElement("div",{className:p.icon},e.icon),n.createElement(i.T,{className:p.label,size:e.textSize||"sm",weight:e.textType||"bold",color:h===t?g.fn.primaryColor():e.textColor||g.colors.gray[4],dataEventCategory:e.dataEventCategory,dataEventAction:e.dataEventAction,dataEventLabel:e.dataEventLabel},e.name))))))},Ea=_.Z.div` padding: 1rem; background: ${h.t.colors.neutral100}; .survey-inner-wrapper { padding: 1.25rem 1rem 1.5rem; background: ${h.t.colors.white}; border-radius: ${h.t.borderRadius}; .survey-header { border-bottom: 1px solid #dbdfe5; margin-bottom: 12px; .survey-header-text { color: ${h.t.colors.gray500}; } } .survey-contact-submit { width: 100%; margin-bottom: 1.5rem; } .term-policy-container { width: 70%; min-width: 210px; max-width: 100%; margin: 0 auto 1.5rem; text-align: center; } .survey-progress-wrapper { width: calc(100% + 2rem); height: 4px; margin-bottom: 1rem; margin-left: -1rem; background: #e4e8ec; .survey-progress { width: 100%; height: 100%; background: #00b16a; transform: scaleX(0); transform-origin: left; transition: transform ease-in-out 0.3s; } } .survey-button-wrapper { display: flex; justify-content: flex-end; button { justify-content: center; &[data-has-icon='true'] { svg { width: 10px; height: 10px; margin-right: 10px; vertical-align: unset; } } &.survey-next-button { &[data-has-icon='true'] { svg { margin-right: 0; margin-left: 10px; } } } } &[data-center='true'] { justify-content: center; button:only-child { width: 200px; max-width: 80%; } } .survey-prev-button { margin-right: 0.5rem; } } } `,xa=_.Z.div` position: relative; display: flex; align-items: center; cursor: pointer; input { position: relative; width: 20px; height: 20px; flex-shrink: 0; border: solid 1px ${h.t.colors.gray500}; margin-right: 8px; border-radius: 100%; cursor: inherit; transition: background 0.4s, border-color 0.4s, box-shadow 0.4s; &:hover, &:active { border-color: ${h.t.colors.primaryBase}; box-shadow: 0 0 2px 2px ${h.t.colors.primary600}; } &:checked { display: flex; align-items: center; justify-content: center; border-color: ${h.t.colors.primaryBase}; &:after { position: absolute; top: 50%; left: 50%; width: 14px; height: 14px; //left: 3px; //position: absolute; //top: 4px; background-color: ${h.t.colors.primaryBase}; border-radius: 50%; content: ''; transform: translate(-50%, -50%); } } } label { width: calc(100% - 24px); cursor: inherit; font-weight: ${h.t.sizes.fwRegular}; } &[data-disabled='true'] { color: ${h.t.colors.gray300}; cursor: not-allowed; input { border-color: ${h.t.colors.gray300}; &:hover { border-color: ${h.t.colors.gray300}; box-shadow: none; } } } padding: 16px 20px; border: 0.5px solid transparent; background: #fafafa; border-radius: ${h.t.borderRadius}; &[data-checked='true'] { border: 0.5px solid #2d87f3; background: #f7f9fc; } input { border: solid 2px #737373; margin-right: 0; background: white; &[type='checkbox'] { &:checked { border: 0; background: ${h.t.colors.primaryBase} url("data:image/svg+xml,%3Csvg width='22' height='22' viewBox='0 0 22 22' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M11 21C16.5228 21 21 16.5228 21 11C21 5.47715 16.5228 1 11 1C5.47715 1 1 5.47715 1 11C1 16.5228 5.47715 21 11 21Z' fill='%232D87F3' stroke='%232D87F3' stroke-width='2'/%3E%3Cpath d='M15.5714 8L9.67857 14L7 11.2727' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A") no-repeat center center; &:after { display: none; } } } } &[data-has-image='true'] { position: relative; display: block; padding: 12px; input { position: absolute; top: 20px; right: 20px; } .choice-image-wrapper { position: relative; padding-top: 56.25%; margin-bottom: 0.75rem; img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border-radius: ${h.t.borderRadius}; object-fit: cover; } } } `,wa=_.Z.div` position: relative; width: 100%; padding-top: min(400px, 100%); .survey-thankyou-wrapper-inner { position: absolute; top: 0; left: 0; display: flex; width: 100%; height: 100%; flex-direction: column; align-items: center; justify-content: center; .survey-thankyou-icon { width: 36%; max-height: 50%; margin-bottom: 1.5rem; } .survey-thankyou-title { margin-bottom: 1rem; text-align: center; } .survey-thankyou-subtitle { text-align: center; > * { text-align: center; } } } `,Ca=_.Z.div` .survey-question-text-wrapper { margin-bottom: 24px; .survey-question-title { margin-bottom: 4px; } .survey-question-subtitle, .survey-question-description { color: ${h.t.colors.gray500}; } } .survey-question-image { width: 100%; margin-bottom: 12px; border-radius: ${h.t.borderRadius}; } .survey-question-answer-wrapper { margin-bottom: 1.5rem; .survey-question-options-wrapper { display: grid; grid-gap: 0.5rem; grid-template-columns: 1fr; &[data-has-image='true'] { grid-gap: 0.8rem; grid-template-columns: 1fr 1fr; } .survey-question-option-item { label { color: #262626; font-size: 16px; font-style: normal; font-weight: normal; line-height: 24px; } } } .survey-contact-input { margin-bottom: 1rem; &:first-child { margin-top: 1rem; } label { font-weight: 700; } input { margin-top: 6px; } } } `,ka=({size:e="small",label:t,name:a,checked:i,value:l,className:o,isDisabled:r=!1,onChange:s,hasImage:c,inputType:d,image:m})=>n.createElement(xa,{"data-disabled":r,className:o,"data-size":e,"data-checked":i,onClick:()=>{s(l)},"data-has-image":c},c&&n.createElement("div",{className:"choice-image-wrapper"},m&&n.createElement("img",{src:m,loading:"lazy"})),n.createElement("label",{onClick:e=>{e.preventDefault()},htmlFor:`${a}-${l}`},t),n.createElement("input",{type:d,checked:i,name:a,id:`${a}-${l}`,value:l,readOnly:!0})),Na=({question:e,description:t,onOptionsChange:a,onTextOptionsChange:o,style:r,className:s})=>{const{type:c,title:d,subtitle:m,image:p,textOptions:u,options:h,name:v,is_multi_select:b}=e,y=!!(null===h||void 0===h?void 0:h.some((e=>e.image))),[f,E]=(0,n.useState)([]),[x,w]=(0,n.useState)((()=>(null===u||void 0===u?void 0:u.slice())||[]));return(0,n.useEffect)((()=>{a&&a(f.slice())}),[!!a,f]),(0,n.useEffect)((()=>{o&&o(x)}),[!!o,x]),n.createElement(Ca,{className:s,style:r},n.createElement("div",{className:"survey-question-text-wrapper"},d&&n.createElement(g.H,{"data-nosubtitle":!m,className:"survey-question-title",tag:"h4"},d),m&&n.createElement(i.T,{className:"survey-question-subtitle",size:"p2"},m),t&&n.createElement(i.T,{className:"survey-question-description",size:"p2"},t)),p&&n.createElement("img",{src:p,className:"survey-question-image",loading:"lazy"}),n.createElement("div",{className:"survey-question-answer-wrapper"},"radio"===c&&n.createElement("div",{"data-has-image":y,className:"survey-question-options-wrapper"},h.map((e=>{var t;return n.createElement(ka,{inputType:"radio",label:e.label,name:v,key:`${v}-${e.value}`,checked:(null===(t=f[0])||void 0===t?void 0:t.value)===e.value,value:e.value,onChange:e=>{E([h.find((t=>t.value===e))])},className:"survey-question-option-item",image:e.image,hasImage:y})}))),"checkbox"===c&&n.createElement("div",{"data-has-image":y,className:"survey-question-options-wrapper"},h.map((e=>n.createElement(ka,{inputType:"checkbox",label:e.label,name:v,key:`${v}-${e.value}`,checked:!!f.find((t=>t.value===e.value)),value:e.value,onChange:()=>{const t=f.findIndex((t=>t.value===e.value));E(t>=0?e=>(e.splice(t,1),e.slice()):b?t=>t.concat(e).slice():[e])},className:"survey-question-option-item survey-option-radio",image:e.image,hasImage:y})))),"textbox"===c&&x.map(((e,t)=>e.isTextArea?n.createElement(l.T,{key:t,placeholder:e.placeholder,height:"150px",value:e.value,onChange:e=>w((a=>(a[t].value=e,a.slice())))}):n.createElement(W.I,{key:t,value:e.value,name:e.name,size:"md",className:"survey-contact-input",label:e.label,placeholder:e.placeholder,onChange:e=>{w((a=>(a[t].value=e,a.slice())))},type:e.type})))))};var Ba;!function(e){e[e.UNLIMITED=0]="UNLIMITED",e[e.EXACT_NUMBER=1]="EXACT_NUMBER",e[e.RANGE=2]="RANGE"}(Ba||(Ba={}));const Sa=({className:e,headerText:t,style:a,question:l,termAndPolicyText:o,prevText:r,nextText:s,isContactForm:c,isDisableNext:d,isDisablePrev:m,onPrevClick:p,onNextClick:u,isSubmitButton:g,isButtonCenter:h,progress:v,descriptionText:b})=>{var y,f,E;const[x,w]=(0,n.useState)([]),{is_multi_select:C,multi_select_option:k,from:N,to:B}=l,S=null===l||void 0===l?void 0:l.type,T="checkbox"===S&&(null===(y=l.options)||void 0===y?void 0:y.length)&&(!x||0===x.length||C&&k===Ba.RANGE&&(x.lengthB)||C&&k===Ba.EXACT_NUMBER&&x.length!==N)||"radio"===S&&(null===(f=l.options)||void 0===f?void 0:f.length)&&(!x||0===x.length)||"textbox"===S&&(null===(E=l.textOptions)||void 0===E?void 0:E.length)&&(x.length!e.value))),M="number"===typeof v?v>1?1:v<0?0:Number(v.toFixed(2)):-1,z=(0,n.useRef)(null),D=()=>"textbox"!==S||z.current.reportValidity();return n.createElement(Ea,{className:e,style:a},n.createElement("div",{className:"survey-inner-wrapper"},t&&n.createElement("div",{className:"survey-header"},n.createElement(i.T,{className:"survey-header-text",size:"c2"},t)),n.createElement("form",{ref:z,onSubmit:e=>e.preventDefault()},n.createElement(Na,{question:l,description:b,onOptionsChange:e=>{w(e)},onTextOptionsChange:e=>{w(e)}})),c&&s&&n.createElement(R.B,{className:"survey-contact-submit",size:"lg",isDisabled:d||T,onClick:()=>D()&&u&&u(x)},s),o&&n.createElement("div",{className:"term-policy-container"},o),"number"===typeof v&&n.createElement("div",{className:"survey-progress-wrapper"},n.createElement("div",{className:"survey-progress",style:{transform:`scaleX(${M})`}})),(r||s)&&n.createElement("div",{"data-center":h,className:"survey-button-wrapper"},r&&n.createElement(R.B,{className:"survey-prev-button",size:"lg",color:m?"primary":"secondary",isDisabled:m,icon:n.createElement("svg",{width:"6",height:"10",viewBox:"0 0 6 10",fill:"none"},n.createElement("path",{d:"M2.44677 4.99999L5.31252 2.13424C5.62302 1.82374 5.62302 1.31974 5.31252 1.00924C5.00202 0.698742 4.49802 0.698742 4.18752 1.00924L0.727018 4.46974C0.433768 4.76299 0.433768 5.23774 0.727018 5.53024L4.18752 8.99074C4.49802 9.30124 5.00202 9.30124 5.31252 8.99074C5.62302 8.68024 5.62302 8.17624 5.31252 7.86574L2.44677 4.99999Z",fill:m?"#fff":"#2D87F3"})),onClick:p},r),!c&&s&&n.createElement(R.B,{onClick:()=>D()&&u&&u(x),className:"survey-next-button",size:"lg",isDisabled:d||T},s," ",g?void 0:n.createElement("svg",{width:"6",height:"10",viewBox:"0 0 6 10",fill:"none"},n.createElement("path",{d:"M3.80322 5.19994L0.937465 2.33419C0.626965 2.02369 0.626965 1.51969 0.937465 1.20919C1.24796 0.898693 1.75196 0.898693 2.06246 1.20919L5.52297 4.66969C5.81622 4.96294 5.81622 5.43769 5.52297 5.73019L2.06246 9.19069C1.75196 9.50119 1.24796 9.50119 0.937465 9.19069C0.626965 8.88019 0.626965 8.37619 0.937465 8.06569L3.80322 5.19994Z",fill:"#ffffff"}))))))},Ta=({thankyou:e,thankyouSubtitle:t,className:a,style:l})=>n.createElement(Ea,{className:a,style:l},n.createElement("div",{className:"survey-inner-wrapper"},n.createElement(wa,null,n.createElement("div",{className:"survey-thankyou-wrapper-inner"},n.createElement("svg",{viewBox:"0 0 122 122",fill:"none",className:"survey-thankyou-icon"},n.createElement("path",{d:"M61.5 122c33.137 0 60-26.863 60-60S94.637 2 61.5 2s-60 26.863-60 60 26.863 60 60 60Z",fill:h.t.colors.primary50}),n.createElement("ellipse",{cx:"61.5",cy:"110.36",rx:"48",ry:"3.36",fill:"#91CAFF"}),n.createElement("path",{d:"M82.905 72.666H101.5L87.597 40H35.403L21.5 72.666h18.595V91H83.08l-.174-18.334Z",fill:"#2C74DF"}),n.createElement("path",{d:"M74.4 15H39.863a5.364 5.364 0 0 0-5.363 5.363v52.214a5.364 5.364 0 0 0 5.363 5.363h43.273a5.364 5.364 0 0 0 5.363-5.363V21a6 6 0 0 0-6-6H74.4Z",fill:"#fff"}),n.createElement("path",{d:"M88.853 80.108H34.147a4.055 4.055 0 0 1-4.087-4.074v-10.65c0-2.27 1.81-4.074 4.087-4.074h54.706a4.055 4.055 0 0 1 4.087 4.074v10.65c0 2.27-1.81 4.074-4.087 4.074Z",fill:"#E4E8EC"}),n.createElement("path",{d:"M90.838 85.451H32.162a4.055 4.055 0 0 1-4.087-4.074v-10.65c0-2.27 1.81-4.074 4.087-4.074H90.78a4.055 4.055 0 0 1 4.087 4.074v10.65c.058 2.27-1.81 4.074-4.029 4.074Z",fill:"#fff"}),n.createElement("path",{d:"M103.748 75.492v30.263c0 1.92-1.576 3.492-3.503 3.492H23.003c-1.927 0-3.503-1.572-3.503-3.492V75.492c0-1.92 1.576-3.492 3.503-3.492h19.384c1.926 0 3.503 1.571 3.503 3.492v5.354c0 .35.233.582.584.582h30.3c.351 0 .585-.233.585-.582v-5.354c0-1.92 1.576-3.492 3.503-3.492h19.383c1.927 0 3.503 1.571 3.503 3.492Z",fill:"#45A4FF"}),n.createElement("path",{stroke:"#2C74DF",d:"M51.954 91.377v3.084c0 1.63 1.285 2.91 2.92 2.91h12.844c1.635 0 2.92-1.28 2.92-2.91v-3.084"}),n.createElement("path",{d:"M120.5 38.025c-2-.246-3.25 1.352-2.375 3.195l.25.737c.75 1.844-.375 3.441-2.375 3.195l-.75-.123c-2-.245-3.25 1.352-2.375 3.195l.375.738c.75 1.843-.375 3.44-2.375 3.195l-.75-.123c-1.5-.123-2.625.737-2.625 1.966",stroke:"#FE921D"}),n.createElement("path",{d:"M1.533 62c-.269 1.413 1.142 2.337 2.82 1.848l.672-.218c1.678-.543 3.089.38 2.82 1.848l-.134.544c-.269 1.413 1.141 2.337 2.82 1.848l.671-.218c1.68-.543 3.09.38 2.82 1.848l-.134.543c-.201 1.087.538 1.848 1.612 1.957M118 92a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM82 3.187l1.188 4.348 4.347-1.188L86.347 2 82 3.187Z",stroke:"#00B16A"}),n.createElement("path",{stroke:"#FE921D",d:"M17 28a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"}),n.createElement("path",{d:"M61.5 26.667c-7.364 0-13.333 5.97-13.333 13.333 0 7.364 5.969 13.333 13.333 13.333S74.833 47.364 74.833 40 68.864 26.667 61.5 26.667Zm7.61 10.276-9.334 9.333a1.33 1.33 0 0 1-1.885 0l-4-4a1.332 1.332 0 1 1 1.885-1.885l3.057 3.057 8.391-8.39a1.332 1.332 0 1 1 1.885 1.885Z",fill:"#00CB8A"})),e&&n.createElement(g.H,{className:"survey-thankyou-title",tag:"h3"},e),t&&n.createElement(i.T,{className:"survey-thankyou-subtitle",size:"p3"},t))))),Ma=200,za=_.Z.div``,Da=_.Z.div` width: 100vw; height: 100vh; position: fixed; bottom: 0; right: 0; background-color: ${h.t.colors.white}; opacity: 0.83; transition: display ${Ma}ms linear; [data-floatmenu-open='true'] & { animation: showBackgroundPanel ${Ma}ms linear 0s normal forwards; } [data-floatmenu-open='false'] & { animation: hideBackgroundPanel ${Ma}ms linear 0s normal forwards; } @keyframes showBackgroundPanel { 0% { opacity: 0; width: 100vw; height: 100vh; } 100% { opacity: 0.83; } } @keyframes hideBackgroundPanel { 0% { width: 100vw; height: 100vh; } 99% { width: 100vw; height: 100vh; } 100% { opacity: 0; width: 0; height: 0; } } `,$a=_.Z.div` position: fixed; right: 16px; bottom: 40px; `,Pa=_.Z.div` display: flex; flex-direction: column; gap: 16px; transition: all ${Ma}ms ease-in-out; position: fixed; bottom: 112px; right: 16px; // scale [data-animation-type='scale'] & { transform-origin: 100% 100%; } [data-animation-type='scale'][data-floatmenu-open='true'] & { transform: scale(1); } [data-animation-type='scale'][data-floatmenu-open='false'] & { transform: scale(0); bottom: 46px; right: 36px; } `,Ia=_.Z.div` border-radius: 50%; width: 56px; height: 56px; position: relative; cursor: pointer; margin-left: auto; transition: all 0.1s linear; -webkit-tap-highlight-color: transparent; [data-site-type='hb'] & { background-color: ${h.t.colors.primaryBase}; &:hover { background-color: ${h.t.colors.primaryHover}; } } [data-site-type='mb'] & { background-color: #2d87f3; &:hover { background-color: #2c74df; } } &:before { content: ''; width: 2px; height: 20px; background-color: ${h.t.colors.white}; border-radius: 2px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); } &:after { content: ''; width: 20px; height: 2px; background-color: ${h.t.colors.white}; border-radius: 2px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); } [data-floatmenu-open='true'] &:before, [data-floatmenu-open='true'] &:after { animation: toX ${Ma}ms linear 0s normal forwards; } [data-floatmenu-open='false'] &:before, [data-floatmenu-open='false'] &:after { animation: toPlus ${Ma}ms linear 0s normal forwards; } @keyframes toX { 0% { transform: translate(-50%, -50%) rotateZ(0deg); } 49% { transform: translate(-50%, -50%) rotateZ(0deg); } 50% { width: 2px; height: 2px; transform: translate(-50%, -50%) rotateZ(45deg); } 100% { transform: translate(-50%, -50%) rotateZ(45deg); } } @keyframes toPlus { 0% { transform: translate(-50%, -50%) rotateZ(45deg); } 49% { transform: translate(-50%, -50%) rotateZ(45deg); } 50% { width: 2px; height: 2px; transform: translate(-50%, -50%) rotateZ(0deg); } 100% { transform: translate(-50%, -50%) rotateZ(0deg); } } `,Aa=_.Z.div` display: flex; gap: 8px; align-items: center; justify-content: flex-end; width: fit-content; margin-left: auto; [data-floatmenu-open='true'] { cursor: pointer; } [data-floatmenu-open='false'] { pointer-events: none; } [data-animation-type='zoom'] &, [data-animation-type='slide'] & { position: absolute; right: 0; width: max-content; } // slide [data-animation-type='slide'] & { transition: all ${Ma}ms ease-in; } [data-animation-type='slide'][data-floatmenu-open='true'] & { animation: showItem ${Ma}ms; } [data-animation-type='slide'][data-floatmenu-open='false'] & { bottom: -64px !important; animation: hideItemOnZoom ${250}ms normal forwards; } // zoom [data-animation-type='zoom'][data-floatmenu-open='false'] & { animation: hideItemOnZoom ${250}ms normal forwards; } @keyframes showItem { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes hideItemOnZoom { 0% { transform: translateX(0); opacity: 1; } 99% { transform: translateX(0); opacity: 0.5; } 100% { transform: translateX(calc(100% + 16px)); opacity: 0; } } `,La=_.Z.div` font-size: 14px; // zoom [data-animation-type='zoom'] & { transition: transform ${Ma}ms ease-in-out; transform-origin: 100% 0; } [data-animation-type='zoom'][data-floatmenu-open='true'] & { transform: scale(1); } [data-animation-type='zoom'][data-floatmenu-open='false'] & { transform: scale(0); } // slide [data-animation-type='slide'] & { transition: opacity ${Ma}ms; } [data-animation-type='slide'][data-floatmenu-open='true'] & { opacity: 1; } [data-animation-type='slide'][data-floatmenu-open='false'] & { opacity: 0; } `,ja=_.Z.div` border-radius: 50%; box-shadow: 0px 16px 24px rgba(0, 0, 0, 0.06), 0px 2px 8px rgba(0, 0, 0, 0.04), 0px 0px 1px rgba(0, 0, 0, 0.04); width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background-color: ${h.t.colors.white}; // zoom [data-animation-type='zoom'] & { transition: transform ${Ma}ms ease-in-out; } [data-animation-type='zoom'][data-floatmenu-open='true'] & { transform: scale(1); } [data-animation-type='zoom'][data-floatmenu-open='false'] & { transform: scale(0); } > img { width: 24px; height: 24px; object-fit: contain; } `,Oa=({items:e,className:t,style:a,backgroundPanelStyle:i,isOpen:l,onOpen:o,onClose:r,disableBackdropClick:s,siteType:c="hb",animationType:d="zoom",zIndex:m=300})=>{const[p,u]=(0,n.useState)(!!l);(0,n.useEffect)((()=>{u(!!l)}),[l]);const g=()=>{u(!1),r&&r()};return n.createElement(za,{style:a,className:t,"data-floatmenu-open":p,"data-site-type":c,"data-animation-type":d},n.createElement(Da,{className:"float-button-group__panel",style:Object.assign({zIndex:m},i),onClick:s?void 0:g}),n.createElement($a,{className:"float-button-group___content",style:{zIndex:m}},n.createElement(Pa,null,e.map(((t,a)=>n.createElement(Aa,{className:`float-item-button-${a}`,style:Object.assign(Object.assign({},"zoom"===d&&{bottom:64*(e.length-1-a),transitionDelay:Ma/e.length*(p?e.length-1-a:a)+"ms"}),"slide"===d&&{bottom:64*(e.length-1-a),transitionDelay:Ma/e.length*(p?a:e.length-1-a)+"ms"}),key:a,onClick:()=>{t.onClick(),t.keepMenuOnClick||u(!1)}},n.createElement(La,{style:Object.assign({},"zoom"===d&&{transitionDelay:Ma/e.length*(p?e.length-1-a:a)+"ms"})},t.label),n.createElement(ja,{className:"float-item-button__icon-wrapper",style:Object.assign({},("zoom"===d||"slide"===d)&&{transitionDelay:Ma/e.length*(p?e.length-1-a:a)+"ms"})},t.icon))))),n.createElement(Ia,{onClick:p?g:()=>{u(!0),o&&o()}})))},_a=_.Z.div` padding: 16px; width: 375px; word-wrap: break-word; word-break: break-word; ${o.M.mbDown} { width: 100%; } &[data-theme='helloSites'] { background: ${h.t.colors.secondaryBase}; box-shadow: 0px 8px 40px rgba(0, 0, 0, 0.1); } &[data-theme='marryBaby'] { border: none; background: ${h.t.mbColors.pink}; border-radius: 12px 12px 0 0; } &[data-is-open='false'] { display: none; } &[data-default-position='true'] { position: fixed; z-index: 1000; bottom: 0; right: 0; ${o.M.mbDown} { left: 0; right: unset; } } `,Za=_.Z.p` position: relative; padding-left: 24px; color: ${h.t.colors.white}; font-size: 14px; font-weight: 600; line-height: 22px; &[data-has-content='true'] { ::before { position: absolute; top: 0; bottom: 0; left: 0; width: 16px; height: 16px; margin: auto 0; content: url("data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.00001 1.33331C4.32001 1.33331 1.33334 4.31998 1.33334 7.99998C1.33334 11.68 4.32001 14.6666 8.00001 14.6666C11.68 14.6666 14.6667 11.68 14.6667 7.99998C14.6667 4.31998 11.68 1.33331 8.00001 1.33331ZM8.00001 11.3333C7.63334 11.3333 7.33334 11.0333 7.33334 10.6666V7.99998C7.33334 7.63331 7.63334 7.33331 8.00001 7.33331C8.36668 7.33331 8.66668 7.63331 8.66668 7.99998V10.6666C8.66668 11.0333 8.36668 11.3333 8.00001 11.3333ZM7.33334 5.99998H8.66668V4.66665H7.33334V5.99998Z' fill='white'/%3e%3c/svg%3e"); } } `,Ha=_.Z.p` margin-top: 2px; color: ${h.t.colors.white}; font-size: 12px; font-weight: 400; line-height: 18px; a { color: ${h.t.colors.white}; text-decoration: none; text-decoration-line: underline; } `,Fa=_.Z.div` display: flex; align-items: center; margin-top: 8px; gap: 16px; `,Ra=_.Z.div` padding: 7px 28px; background: ${h.t.colors.white}; border-radius: ${h.t.borderRadius}; color: ${h.t.colors.secondaryBase}; cursor: pointer; font-size: 12px; font-weight: 600; line-height: 18px; `,Wa=_.Z.a` color: ${h.t.colors.white}; font-size: 12px; font-weight: 600; line-height: 22px; text-decoration: none; text-decoration-line: underline; `,Ua=({className:e,policiesUrl:t,onAcceptClick:a,translations:i={acceptButton:"Accept",policiesButton:"Our Policies"},title:l="",description:o="",theme:r="helloSites",isOpen:s=!0,useDefaultPosition:c=!0,trackingAttributes:d})=>n.createElement(_a,{className:e,"data-theme":r,"data-is-open":s,"data-default-position":c},n.createElement(Za,{"data-has-content":!!l},l),n.createElement(Ha,{dangerouslySetInnerHTML:{__html:o}}),n.createElement(Fa,null,n.createElement(Ra,{role:"button",tabIndex:0,onClick:a,"data-event-category":null===d||void 0===d?void 0:d.dataEventCategory,"data-event-action":null===d||void 0===d?void 0:d.dataEventAction,"data-event-label":null===d||void 0===d?void 0:d.dataEventLabel},i.acceptButton),n.createElement(Wa,{href:t},i.policiesButton))),Ga=U.F4` from { transform: translateY(100%); visibility: visible; } to { transform: translateY(0); } `,Va=U.F4` from { transform: translate(0, 0); } to { visibility: hidden; transform: translate(0, 100%); } `,qa=_.Z.div` cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-items: center; gap: 4px; .mobile-navigation-label { font-weight: 500; font-size: 10px; line-height: 16px; color: ${h.t.colors.gray600}; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 60px; text-align: center; ${o.M.mbDown} { max-width: 60px; } } .mobile-navigation-icon { position: relative; height: 24px; &[data-no-label='true'] { border-radius: 50%; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 0px; gap: 16px; width: 40px; height: 40px; } } &[data-is-special='true'] { display: flex; flex-direction: row; align-items: center; padding: 4px 12px 4px 6px; gap: 4px; min-width: 152px; height: 32px; /* Neutral/Neutral-50 */ background: ${h.t.colors.primary50}; border-radius: 20px; flex-grow: 1; .mobile-navigation-icon { &[data-no-label='true'] { width: 24px; height: 24px; } } .mobile-navigation-label { max-width: max-content; color: ${h.t.colors.primaryBase}; } } &[data-is-active='true'] { .mobile-navigation-label { color: ${h.t.colors.primaryBase}; } } &[data-is-disabled='true'] { opacity: 0.2; } `,Ya=_.Z.div` z-index: 100; position: fixed; bottom: 0; left: 0; width: 100%; height: 100%; max-height: 56px; min-height: 56px; display: flex; height: 100%; align-items: center; justify-content: space-evenly; background-color: ${h.t.colors.white}; @supports (padding-bottom: env(safe-area-inset-bottom)) { min-height: calc(56px + env(safe-area-inset-bottom)); max-height: calc(56px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); } & > div { flex: 1; } a { text-decoration: none; } &[data-is-collapsed='true'] { animation: ${Va} 500ms ease-in-out forwards; } &[data-is-collapsed='false'] { animation: ${Ga} 500ms ease-in-out forwards; } &[data-template='health-tool'] { height: 44px; max-height: 44px; min-height: 44px; justify-content: space-between; & > div { flex: 0; } } `,Ka=_.Z.span` position: absolute; left: 100%; transform: translate(-10px, calc(-50% + 3px)); background-color: ${h.t.colors.green800}; border-radius: 32px; border: 2px solid ${h.t.colors.white}; padding: 1px 4px; display: flex; flex-direction: column; justify-content: center; align-items: center; height: 20px; aspect-ratio: 1; &[data-no-label='true'] { left: 0; transform: translate(22px, -50%); } `;_.Z.div` position: absolute; top: 0; left: 0; height: 3px; background-color: ${h.t.colors.primaryBase}; transition: width 150ms linear; `,_.Z.div` a { text-decoration: none; } `;const Qa=e=>{var{badgeAmount:t,disabled:a=!1,hasBadge:l=!1,icon:o,isActive:r=!1,isSpecial:s=!1,label:d}=e,m=(0,c._)(e,["badgeAmount","disabled","hasBadge","icon","isActive","isSpecial","label"]);return n.createElement(qa,Object.assign({"data-is-special":s,"data-is-active":r,"data-is-disabled":a},m),n.createElement("div",{className:"mobile-navigation-icon","data-no-label":!Boolean(d)},l&&n.createElement(Ka,{"data-no-label":!Boolean(d)},n.createElement(i.T,{size:"s5",weight:"semiBold",color:s?h.t.colors.primaryBase:h.t.colors.white},t)),o),d&&n.createElement("span",{className:"mobile-navigation-label"},d))},Xa=e=>{var{children:t,isCollapsed:a=!1,template:i="homepage"}=e,l=(0,c._)(e,["children","isCollapsed","template"]);return n.createElement(Ya,Object.assign({"data-is-collapsed":a,"data-template":i},l),t)};Xa.Icon=Qa;const Ja=({SEOData:e={},locale:t="vi-VN",routerPathname:a,routerQuery:i,nextHead:l,siteType:o,seoCustom:r,userId:s,forcedCanonicalUrl:c})=>{var d,m,p,u,g,h,v,b,y,f,E,x;const{totalPages:w,currentPage:C,SEOTitle:k="",SEODescription:N="",SEOImage:B,seoType:S,SEOImageWidth:T,SEOImageHeight:M,customMetaData:z=[],isIndexable:D=!0,hasNoCanonical:$=!1}=e,P=D&&V.i?"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1":"noindex",{NEXT_PUBLIC_BASE_API_URL:I}=We.env;let L=e.canonicalUrl||a;Object.keys(i).forEach((e=>{const t=i[e];t&&Array.isArray(t)&&(L=L.replace(`[...${e}]`,t.join("/")))}));const j=t||"en-PH",O="helloSites"===o?A.d[j]:"www.marrybaby.vn",_=L.endsWith("/")?"":"/",Z=(0,n.useMemo)((()=>{var a,i,l,o,r,s,c;let d="";if(e.apiMetaData&&"string"===typeof e.apiMetaData){const m=null===(a=e.apiMetaData)||void 0===a?void 0:a.match(/(.*)<\/title>/),p=` - Page ${C} of ${w}`,u=C&&1!==C&&m?e.apiMetaData.replace(m[0],m[0].includes("-")?m[0].replace("-",p+" - "):`${m[1].concat(p)}`).replace(``,``):e.apiMetaData;if(d=(0,G.ZP)(u,{trim:!0}),!d.find((e=>{var t,a;return"og:image"===(null===(t=e.props)||void 0===t?void 0:t.property)||"og:image:secure_url"===(null===(a=e.props)||void 0===a?void 0:a.property)}))){const a=`https://${O}/images/${t}.png`;d=[...d,n.createElement("meta",{key:"og:image",property:"og:image",content:(null===(i=e.openGraph)||void 0===i?void 0:i.image)||B||a||""}),n.createElement("meta",{key:"og:image:secure_url",property:"og:image:secure_url",content:(null===(l=e.openGraph)||void 0===l?void 0:l.image)||B||a}),n.createElement("meta",{key:"og:image:width",property:"og:image:width",content:(null===(o=e.openGraph)||void 0===o?void 0:o.imageWidth)&&String(null===(r=e.openGraph)||void 0===r?void 0:r.imageWidth)||T&&String(T)||"1200"}),n.createElement("meta",{key:"og:image:height",property:"og:image:height",content:(null===(s=e.openGraph)||void 0===s?void 0:s.imageHeight)&&String(null===(c=e.openGraph)||void 0===c?void 0:c.imageHeight)||M&&String(M)||"630"})]}}return d}),[e.apiMetaData,e.openGraph,B,M,T,C,L,w,t,O]),H=`https://${O}/images/${t}.png`;return n.createElement(l,null,n.createElement("link",{rel:"preconnect",href:"https://fonts.gstatic.com"}),"marryBaby"===o?n.createElement("link",{href:"https://fonts.googleapis.com/css2?family=Inter:wght@400..800&display=swap",rel:"stylesheet"}):"km-KH"===t?n.createElement("link",{href:"https://fonts.googleapis.com/css2?family=Battambang:wght@400;700&display=swap",rel:"stylesheet"}):"th-TH"===t?n.createElement("link",{href:"https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wdth,wght@62.5..100,100..900&display=swap",rel:"stylesheet"}):n.createElement("link",{href:"https://fonts.googleapis.com/css2?family=Inter:wght@400..800&display=swap",rel:"stylesheet"}),n.createElement("link",{rel:"preconnect",href:I}),n.createElement("meta",{charSet:"UTF-8"}),n.createElement("meta",{name:"viewport",content:"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover"}),n.createElement("meta",{name:"google",content:"notranslate"}),n.createElement("meta",{name:"robots",content:P}),n.createElement("meta",{property:"fb:app_id",content:"653713035016537"}),z.map(((e,t)=>n.createElement("meta",Object.assign({key:t},e)))),n.createElement("meta",{name:"theme-color",content:"helloSites"===o?"#2c87f3":"#e85388"}),n.createElement("meta",{name:"page_type",content:"Home"}),n.createElement("meta",{name:"page_platform",content:"WEB"}),n.createElement("meta",{name:"page_language",content:j}),n.createElement("meta",{name:"ahrefs-site-verification",content:"46e7521a2b89a1013149c4685bbe02a1d36a4732fef98655142b829bc87cba4d"}),!Z&&n.createElement(n.Fragment,null,"helloSites"===o?n.createElement("title",null,r?k:k+" - "+(null===(d=A.L[t])||void 0===d?void 0:d.SITE_NAME)):n.createElement("title",null,k),!$&&n.createElement("link",{rel:"canonical",href:`https://${O}${L}`}),n.createElement("meta",{name:"description",content:N||(null===(m=e.openGraph)||void 0===m?void 0:m.description)}),e.schemaData&&n.createElement("script",{type:"application/ld+json",className:"yoast-schema-graph",dangerouslySetInnerHTML:{__html:e.schemaData}}),n.createElement("meta",{property:"og:locale",content:t}),n.createElement("meta",{property:"og:type",content:S||"website"}),n.createElement("meta",{property:"og:title",content:(null===(p=e.openGraph)||void 0===p?void 0:p.title)||k}),n.createElement("meta",{property:"og:description",content:(null===(u=e.openGraph)||void 0===u?void 0:u.description)||N}),n.createElement("meta",{property:"og:url",content:`https://${O}${L}`}),n.createElement("meta",{property:"og:site_name",content:`https://${O}`}),n.createElement("meta",{property:"og:image",content:(null===(g=e.openGraph)||void 0===g?void 0:g.image)||B||H||""}),n.createElement("meta",{property:"og:image:secure_url",content:(null===(h=e.openGraph)||void 0===h?void 0:h.image)||B||H}),n.createElement("meta",{property:"og:image:width",content:(null===(v=e.openGraph)||void 0===v?void 0:v.imageWidth)&&String(null===(b=e.openGraph)||void 0===b?void 0:b.imageWidth)||T&&String(T)||"1200"}),n.createElement("meta",{property:"og:image:height",content:(null===(y=e.openGraph)||void 0===y?void 0:y.imageHeight)&&String(null===(f=e.openGraph)||void 0===f?void 0:f.imageHeight)||M&&String(M)||"630"}),n.createElement("meta",{name:"twitter:card",content:"summary_large_image"}),n.createElement("meta",{name:"twitter:title",content:(null===(E=e.twitter)||void 0===E?void 0:E.title)||k}),n.createElement("meta",{name:"twitter:description",content:N}),n.createElement("meta",{name:"twitter:image",content:(null===(x=e.twitter)||void 0===x?void 0:x.image)||B})),("helloSites"===o?A.F[j]||[]:A.F.marryBaby).map(((e,t)=>"link"===e.type?n.createElement("link",{key:`favicon-${t}`,rel:e.rel,href:e.href,sizes:e.sizes}):"meta"===e.type?n.createElement("meta",{key:t,name:e.name,content:e.content}):null)),Array.isArray(Z)&&c?Z.filter((e=>"canonical"!==e.props.name&&"canonical"!==e.props.rel)):Z,c&&n.createElement("link",{rel:"canonical",href:c}),!e.hasNoAmp&&"vi-VN"!==t&&n.createElement("link",{rel:"amphtml",href:`https://${O}${L}${_}?amp=1`}),s&&"undefined"!==typeof window?n.createElement("script",{dangerouslySetInnerHTML:{__html:`window.dataLayer = window.dataLayer || []; window.dataLayer.push({'userID': '${s}'});`}}):null)},en=(0,de.s)(_.Z.div` position: relative; width: 100%; height: 100%; background: ${e=>e.bgColor}; background-color: inherit; &[data-site='marryBaby'] { background-color: ${e=>e["data-banner-color"]||"#5EC08F"}; background-image: none; padding-bottom: 0; &[data-is-embedded='true'] { border-top-left-radius: 16px; border-top-right-radius: 16px; } } `,"hhgcomp-toolbanner-wrapper"),tn=_.Z.div` width: 100%; ${o.M.mbDown} { padding-bottom: 24px; } a { text-decoration: none; color: inherit; } &[data-site='marryBaby'] { a { text-decoration: underline; } ${o.M.mbDown} { padding-bottom: 0; } } ${o.M.tdDown} { height: auto; ${en.classSelector} { .${"hhgcomp-toolbanner-inner"} { display: flex; align-items: center; ${o.M.mbDown} { justify-content: space-between; } .${"hhgcomp-toolbanner-iconcontainer"} { position: relative; right: -50px; bottom: -20px; width: 110px; min-width: 0; height: auto; min-height: 0; align-self: flex-end; margin-bottom: -20px; ${o.M.mbDown} { right: unset; } } } } } `,an=_.Z.div` display: flex; flex-direction: row; align-items: center; padding: 16px 24px; gap: 16px; width: 100%; /* background-color: ; */ ${o.M.mbDown} { padding: 16px 0; } `,nn=_.Z.div` background: #ffffff; border-radius: 16px; width: 48px; height: 48px; position: relative; img { position: absolute; top: 50%; left: 50%; max-width: 24px; max-height: 24px; transform: translate(-50%, -50%); } `,ln=_.Z.div` display: flex; align-items: flex-start; flex-direction: column; justify-content: space-between; gap: 0; width: 100%; `,on=_.Z.div` display: flex; align-items: flex-start; font-weight: 400; font-size: 12px; line-height: 18px; letter-spacing: -0.2px; color: #f3f3f3; > img { margin-top: 2px; margin-right: 4px; } &[data-is-mobile='false'] { > img { width: 16px; height: 16px; } } &[data-is-mobile='true'] { > img { width: 14px; height: 14px; } } `,rn=({className:e,heading:t,color:a="blue",isMobile:l,bannerUrl:o,bannerUrlLarge:r,bannerColor:s,medicalReview:c={link:"#",reviewer:"",date:""},icon:d,style:m,siteType:p,isEmbeded:u})=>{var h,b;const{t:E}=(0,q.u)(),x=(0,N.rZ)(),w=l?o:r||o,C={pink:[8,6]},k=x.colors[a]||x.colors.blue,B=(null===c||void 0===c?void 0:c.reviewer)?n.createElement(i.T,{size:"label2",color:"#fff",as:"div",className:"embedded-review",sx:{a:{textUnderlineOffset:"2px",color:"#fff",textDecoration:"underline"}}},n.createElement("div",{dangerouslySetInnerHTML:{__html:E("toolPage.toolReviewer",{expert_name:`${c.reviewer.trim()}`,date:c.date})}})):null;return n.createElement(tn,{"data-is-mobile":l,style:m,"data-site":p},n.createElement(en,{className:e,"data-banner-url":w,"data-is-mobile":l,"data-site":p,"data-banner-color":s,"data-is-embedded":u,bgColor:`linear-gradient(71deg, ${null===k||void 0===k?void 0:k[(null===(h=C[a])||void 0===h?void 0:h[0])||7]} -4.07%, ${null===k||void 0===k?void 0:k[(null===(b=C[a])||void 0===b?void 0:b[1])||4]} 90.13%)}`},"marryBaby"===p&&u?n.createElement(an,null,n.createElement(nn,null,d),n.createElement(ln,null,n.createElement(g.H,{color:"white",tag:"h5",as:"h2"},t),c&&n.createElement(on,{"data-is-mobile":l},B))):n.createElement(y.k,{gap:(0,f.h)(24),align:"center",justify:"space-between",sx:{padding:`${(0,f.h)(13)} ${(0,f.h)(20)}`,gap:(0,f.h)(24)}},n.createElement(v.x,null,n.createElement(g.H,{tag:"h5",as:"h2",color:"#fff"},t),c&&n.createElement(i.T,{size:"n1",as:"div"},B)),n.createElement(y.k,{justify:"center",align:"center",sx:e=>{var t,n;return{width:(0,f.h)(64),height:(0,f.h)(64),borderRadius:"50%",background:(null===(n=null===(t=e.colors)||void 0===t?void 0:t[a])||void 0===n?void 0:n[0])||e.colors.blue[0],flexShrink:0,img:{maxWidth:(0,f.h)(48),maxHeight:(0,f.h)(48)},[e.fn.smallerThan("sm")]:{width:(0,f.h)(56),height:(0,f.h)(56),img:{maxWidth:(0,f.h)(40),maxHeight:(0,f.h)(40)}}}}},d))))},sn=(0,_.Z)(ge.D)` border-color: ${h.t.mbColors.lightGray}; background-color: ${h.t.colors.white}; border-radius: 16px; transition: all 0.2s ease; &:hover { border-color: ${h.t.mbColors.pink}; box-shadow: none; } & > ul { z-index: ${de.Z.menuSearchPopup}; max-height: 300px; overflow-y: auto; } ${e=>e.groupedWithLabel&&U.iv` & > div:first-child { color: ${h.t.mbColors.midGray}; font-size: 12px; } `} &[data-dropdown-open='true'] { border-color: ${h.t.mbColors.pink}; } `;(0,_.Z)(l.P)` & input { border-color: ${h.t.mbColors.lightGray}; background-color: ${h.t.colors.white}; border-radius: 16px; transition: all 0.2s ease; &:focus, &:hover { border-color: ${h.t.mbColors.pink}; box-shadow: none; } } & .displayIcon { pointer-events: none; } `;const cn=(0,_.Z)(W.I)` & label { position: absolute; z-index: 1; top: 16px; left: 16px; color: ${h.t.mbColors.midGray}; pointer-events: none; transition: all 0.2s ease; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; &[data-size='label2'] { font-size: 12px; } ${o.M.tdDown} { max-width: 220px; } } & input { ::placeholder { color: ${h.t.mbColors.gray}; font-size: 14px; } ::-webkit-input-placeholder { /* Chrome/Opera/Safari */ color: ${h.t.mbColors.gray}; font-size: 14px; } ::-moz-placeholder { /* Firefox 19+ */ color: ${h.t.mbColors.gray}; font-size: 14px; } :-ms-input-placeholder { /* IE 10+ */ color: ${h.t.mbColors.gray}; font-size: 14px; } :-moz-placeholder { /* Firefox 18- */ color: ${h.t.mbColors.gray}; font-size: 14px; } height: ${e=>"sm"===e.size?48:72}px; padding-top: 27px; border-color: ${h.t.mbColors.lightGray}; background-color: ${h.t.colors.white}; border-radius: 16px; transition: all 0.2s ease; padding-top: ${e=>e.value?"38px":"27px"}; &:focus, &:hover { border-color: ${h.t.mbColors.pink}; box-shadow: none; } } &[data-has-action-icon] { input { padding-top: ${e=>e.value?"38px":"27px"}; padding-bottom: ${e=>e.value?"16px":"27px"}; } label { position: absolute; z-index: 1; top: 16px; padding-right: 46px; } } `,dn=_.Z.div` width: 100%; `,mn=_.Z.div` #due-date-dropdown { z-index: 9; width: 100%; min-width: unset; max-width: unset; ${o.M.mbDown} { font-size: 14px; } ${o.M.tdUp} { font-size: 16px; &[data-is-side='true'] { font-size: 14px; } } color: ${h.t.colors.gray800}; > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } } display: flex; width: 100%; justify-content: space-between; `,pn=(0,_.Z)(dn)` .due-date-input { width: 100%; min-width: unset; max-width: unset; color: ${h.t.colors.gray800}; } .due-date-calculate-button { margin-right: auto; margin-left: auto; } input { &[data-is-side='true'] { ${o.M.tdUp} { font-size: 14px; } } ${o.M.mbDown} { font-size: 14px; } ${o.M.tdUp} { font-size: 16px; } } `;_.Z.div` display: flex; align-items: right; & > p { display: inline-block; border-bottom: solid 1px ${h.t.colors.primaryBase}; margin-bottom: 24px; margin-left: auto; color: ${h.t.colors.primaryBase}; cursor: pointer; font-size: 11px; line-height: 16px; text-align: right; } `;const un=_.Z.img` img& { width: 16px; height: 16px; } `;var gn;(0,_.Z)(un)` margin-right: 4px; `,function(e){e[e.lastPeriod=0]="lastPeriod",e[e.conception=1]="conception",e[e.IVF=2]="IVF"}(gn||(gn={}));const hn="yyyy-MM-dd",vn=e=>`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`,bn=({locale:e,onClick:t,siteType:a,pageUrl:l})=>{const{t:o}=(0,q.u)(),[s,c]=(0,n.useState)(new Date);return n.createElement(n.Fragment,null,n.createElement(pn,{className:"input-form","data-is-side":!0},"marryBaby"===a?n.createElement(cn,{label:o("dueDatePage.conceptionDate"),name:"date",size:"md",value:vn(s),CustomInput:n.createElement(me.D,{onChange:e=>{c(e)},placeholder:"dd/mm/yyyy",pickedDate:s,displayDateFormat:"dd/MM/yyyy",disabledDays:{before:new Date((new Date).getTime()-24192e6)},customInput:e=>n.createElement(W.I,Object.assign({className:"due-date-input",name:"birthday",size:"md"},e,{value:s&&se()(s).format(de.b)}))}),actionIcon:n.createElement(m.Z,{size:32})}):n.createElement(W.I,{label:n.createElement(i.T,{size:"s4",weight:"semiBold",color:h.t.colors.gray600,style:{marginBottom:"9px",flex:"1"}},o("dueDatePage.conceptionDate")),value:vn(s),name:"date",size:"md",className:"due-date-input",CustomInput:n.createElement(me.D,{customInput:e=>n.createElement("input",Object.assign({type:"date",className:"due-date-input"},e,{value:vn(s)})),disabledDays:{before:new Date((new Date).getTime()-24192e6)},locale:e,pickedDate:s,displayDateFormat:ce.D,onChange:e=>{c(e)},placeholder:"placeholder"})})),n.createElement(r.B,{className:"due-date-calculate-button",size:"lg",variant:"marryBaby"===a?"secondary":"primary",dataEventCategory:"Health Tool",dataEventAction:"Due Date",dataEventLabel:l,onClick:()=>{t((e=>{const t=new Date(e);return t.setDate(t.getDate()+265),{startDate:e,dueDate:t,otherInfo:{method:gn.conception+1,conception_date:(0,Y.Z)(e,hn),first_day:null,cycle_length_days:null,ivf_transfer_date:null,days_transfer:null}}})(s),`${A.Q.type}=1&sd=${(0,Y.Z)(s,hn)}&${A.Q.additional}= `)},role:"button"},o("dueDatePage.lastPeriod.calculate")))},yn=({locale:e,onClick:t,siteType:a,pageUrl:l})=>{const{t:o}=(0,q.u)(),[s,c]=(0,n.useState)(new Date),[d,p]=(0,n.useState)("3");return n.createElement(n.Fragment,null,n.createElement(pn,{className:"input-form","data-is-side":!0},"marryBaby"===a?n.createElement(cn,{label:o("dueDatePage.ivf.transferDate"),name:"date",size:"md",value:vn(s),CustomInput:n.createElement(me.D,{onChange:e=>{c(e)},placeholder:"dd/mm/yyyy",pickedDate:s,displayDateFormat:"dd/MM/yyyy",disabledDays:{before:new Date((new Date).getTime()-24192e6)},customInput:e=>n.createElement(W.I,Object.assign({className:"due-date-input",name:"birthday",size:"md"},e,{value:s&&se()(s).format(de.b)}))}),actionIcon:n.createElement(m.Z,{size:32})}):n.createElement(W.I,{label:n.createElement(i.T,{size:"s4",weight:"semiBold",color:h.t.colors.gray700,style:{marginBottom:"9px",flex:"1"}},o("dueDatePage.ivf.transferDate")),value:vn(s),name:"date",size:"md",className:"due-date-input",CustomInput:n.createElement(me.D,{customInput:e=>n.createElement("input",Object.assign({type:"date",className:"due-date-input"},e,{value:vn(s)})),disabledDays:{before:new Date((new Date).getTime()-24192e6)},locale:e,pickedDate:s,displayDateFormat:ce.D,onChange:e=>{c(e)},placeholder:"placeholder"})})),n.createElement("div",{style:{width:"100%"}},n.createElement(qt,{id:"radio-transfer-date",direction:"vertical",size:"small",value:d,onChange:e=>p(e),options:[{value:"3",label:o("dueDatePage.ivf.transferDateRadio",{number:3})},{value:"5",label:o("dueDatePage.ivf.transferDateRadio",{number:5})}]})),n.createElement(r.B,{className:"due-date-calculate-button",size:"lg",variant:"marryBaby"===a?"secondary":"primary",dataEventCategory:"Health Tool",dataEventAction:"Due Date",dataEventLabel:l,onClick:()=>{t(((e,t)=>{const a=new Date(e);return a.setDate(a.getDate()+265-t),{startDate:e,dueDate:a,otherInfo:{method:gn.IVF+1,ivf_transfer_date:(0,Y.Z)(e,hn),days_transfer:t,conception_date:null,first_day:null,cycle_length_days:null}}})(s,Number(d)),`${A.Q.type}=2&${A.Q.startDate}=${(0,Y.Z)(s,hn)}&${A.Q.additional}=${d}`)},role:"button"},o("dueDatePage.lastPeriod.calculate")))},fn=({locale:e,onClick:t,siteType:a,pageUrl:l})=>{const{t:o}=(0,q.u)(),[s,c]=(0,n.useState)(28),[d,p]=(0,n.useState)(new Date);return n.createElement(n.Fragment,null,n.createElement(pn,{className:"input-form","data-is-side":!0},"marryBaby"===a?n.createElement(cn,{label:o("dueDatePage.lastPeriod.lastPeriodLabel"),name:"date",size:"md",value:vn(d),CustomInput:n.createElement(me.D,{onChange:e=>{p(e)},placeholder:"dd/mm/yyyy",pickedDate:d,displayDateFormat:"dd/MM/yyyy",disabledDays:{before:new Date((new Date).getTime()-24192e6)},customInput:e=>n.createElement(W.I,Object.assign({name:"birthday",size:"md"},e,{value:d&&se()(d).format(de.b)}))}),actionIcon:n.createElement(m.Z,{size:32})}):n.createElement(W.I,{className:"input-section due-date-input",label:n.createElement(i.T,{size:"s4",weight:"semiBold",color:h.t.colors.gray600,style:{marginBottom:"9px",flex:"1"}},o("dueDatePage.lastPeriod.lastPeriodLabel")),value:vn(d),name:"date",size:"md",CustomInput:n.createElement(me.D,{customInput:e=>n.createElement("input",Object.assign({type:"date",className:"due-date-input"},e,{value:vn(d)})),disabledDays:{before:new Date((new Date).getTime()-24192e6)},locale:e,pickedDate:d,displayDateFormat:ce.D,onChange:e=>{p(e)},placeholder:"placeholder"})})),n.createElement("div",{className:"slider-due-date","data-theme":"marryBaby"===a?"marryBaby":""},"marryBaby"===a?n.createElement(pe.M,{type:"bodytext-3",color:h.t.mbColors.midGray},o("dueDatePage.lastPeriod.periodLengthLabel")):n.createElement(i.T,{size:"s4",weight:"semiBold",color:h.t.colors.gray600,style:{marginBottom:"0.5rem"}},o("dueDatePage.lastPeriod.periodLengthLabel")),n.createElement("div",{className:"slider-outer-wrapper"},"marryBaby"===a&&n.createElement(i.T,{size:"s3",weight:"semiBold",color:h.t.colors.gray600},s),n.createElement(ue.S,{containerStyle:{flex:1},min:20,max:40,step:1,labelAlwaysOn:"marryBaby"!==a,withControl:"marryBaby"!==a,onChange:c,value:s,label:"marryBaby"!==a?void 0:null}))),n.createElement(r.B,{dataEventCategory:"Health Tool",dataEventAction:"Due Date",dataEventLabel:l,className:"due-date-calculate-button",size:"lg",variant:"marryBaby"===a?"secondary":"primary",onClick:()=>t(((e,t)=>{const a=t-21+272,n=new Date(e);return n.setDate(n.getDate()+a),{startDate:e,dueDate:n,otherInfo:{method:gn.lastPeriod+1,first_day:(0,Y.Z)(e,hn),cycle_length_days:t,conception_date:null,ivf_transfer_date:null,days_transfer:null}}})(d,s),`${A.Q.type}=0&${A.Q.startDate}=${(0,Y.Z)(d,hn)}&${A.Q.additional}=${s}`),role:"button"},o("dueDatePage.lastPeriod.calculate")))},En=_.Z.div` &[data-is-side='true'] { width: 100%; margin-bottom: 0; } ${o.M.mbDown} { width: 100%; margin-bottom: 0; } margin-bottom: 24px; & > :not(:last-child) { margin-bottom: 8px; } .gender-selector { & > :not(:last-child) { margin-right: 16px; } & > div { width: calc(50% - 8px); ${o.M.mbUp} { max-width: 186px; justify-self: left; } } } `,xn=_.Z.div` margin-bottom: 20px; width: 100%; & > :not(:last-child) { margin-bottom: 8px; } .gender-selector { & > div { width: calc(50% - 8px); } } `,wn=_.Z.div` width: 100%; display: flex; justify-content: center; ${o.M.mbUp} { padding: 0 16px; &[data-is-side='true'] { margin-top: 24px; } } ${o.M.mbDown} { margin-top: 24px; &[data-site='marryBaby'] { margin-top: 12px; } } & > :not(:last-child) { margin-bottom: 8px; } button { width: 100%; margin: auto; ${o.M.mbUp} { max-width: 200px; } } `,Cn=_.Z.div` width: 100%; display: flex; flex-wrap: wrap; justify-content: space-between; .input-section { display: flex; flex-direction: column; } ${o.M.mbDown} { flex-direction: column; .input-section { width: 100%; } } `,kn=_.Z.div` position: relative; width: calc(50% - 8px); &[data-is-side='true'] { .label { margin-bottom: 9px; } } ${o.M.mbDown} { .label { margin-bottom: 9px; } } margin-bottom: 24px; #weight-gain-dropdown { z-index: 9; width: 100%; min-width: unset; max-width: unset; color: ${h.t.colors.gray800}; & > ul { z-index: 1; max-height: 300px; overflow-y: scroll; } } `,Nn=_.Z.div` margin-bottom: 24px; width: 100%; ${o.M.mbUp} { padding: 0 16px; } .card { display: flex; align-items: center; justify-content: space-between; & > :not(:last-child) { margin-bottom: 8px; } .gender-selector { row-gap: 12px; & > :not(:last-child) { margin-right: 16px; } & > div { ${o.M.mbUp} { width: calc(18% - 4px); max-width: 186px; justify-self: left; } ${o.M.mbDown} { width: calc(31% - 8px); max-width: 109px; justify-self: left; } } } .gender-image { width: 23px; height: 36px; object-fit: contain; } } .note { display: flex; align-items: center; padding-top: 8px; padding-bottom: 16px; } `,Bn=({onSubmitDueDate:e,locale:t,isSide:a,siteType:l})=>{const{t:o}=(0,q.u)(),[r,s]=(0,n.useState)(gn.lastPeriod),c=[{value:gn.lastPeriod,label:o("dueDatePage.lastPeriod")},{value:gn.conception,label:o("dueDatePage.conceptionDate")},{value:gn.IVF,label:o("dueDatePage.ivf")}],d=(0,n.useMemo)((()=>"undefined"!==typeof window?window.location.href:""),[]);return n.createElement(Cn,null,n.createElement(dn,{className:"input-form input-section","data-is-side":!0},"marryBaby"===l?n.createElement(sn,{groupedWithLabel:o("dueDatePage.calculationMethod"),options:c,placeholder:o("dueDatePage.lastPeriod"),id:"due-date-dropdown",size:"lg",value:c[r],onChange:e=>{s(e.value)}}):n.createElement(n.Fragment,null,n.createElement(i.T,{size:"s4",weight:"semiBold",color:h.t.colors.gray600,style:{marginBottom:"9px",flex:"1"}},o("dueDatePage.calculationMethod")),n.createElement(mn,{"data-is-side":a},n.createElement(ge.D,{options:c,placeholder:o("dueDatePage.lastPeriod"),id:"due-date-dropdown",size:"md",value:c[r],onChange:e=>{s(e.value)}})))),r===gn.lastPeriod?n.createElement(fn,{locale:t,onClick:e,isSide:a,siteType:l,pageUrl:d}):null,r===gn.conception?n.createElement(bn,{locale:t,onClick:e,isSide:a,siteType:l,pageUrl:d}):null,r===gn.IVF?n.createElement(yn,{locale:t,onClick:e,isSide:a,siteType:l,pageUrl:d}):null)},Sn=(0,de.s)(_.Z.form` margin: auto; ${o.M.mbUp} { width: 100%; padding: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; } ${o.M.mbDown} { padding: 16px; } .due-date-calculate-button { width: 100%; margin: 12px auto 0; ${o.M.mbUp} { max-width: 200px; } } &[data-is-side='true'] { ${o.M.mbUp} { padding: 24px 40px 0px 40px; } } .input-weight-form { display: flex; flex-wrap: wrap; justify-content: space-between; padding: 0 16px; } .input-form { display: flex; ${o.M.mbUp} { margin-bottom: 24px; width: calc(50% - 8px); } &[data-is-side='true'] { ${o.M.mbUp} { margin-bottom: 8px; width: 100%; } } ${o.M.mbDown} { margin-bottom: 8px; } .label-text { overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; } } .input-form-pwg { display: flex; width: calc(50% - 8px); ${o.M.mbUp} { margin-bottom: 24px; } &[data-is-side='true'] { ${o.M.mbUp} { margin-bottom: 8px; } } ${o.M.mbDown} { margin-bottom: 8px; width: 100%; } .label-text { overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; } } .day-slider { width: 100%; ${o.M.mbUp} { width: calc(50% - 8px); &[data-is-side='true'] { width: 100%; } } } `,"hhgcomp-embedtoolcard-content"),Tn=_.Z.div` padding: 0; background-color: white; border: 1px solid #e4e8ec; border-radius: 4px; &[data-site='marryBaby'] { background-color: ${h.t.mbColors.green}; border-radius: 16px; } .due-date-cal { ${Sn.classSelector} { ${o.M.mbUp} { padding: 24px; } ${o.M.mbDown} { padding: 16px; } } display: table; width: 100%; .slider-due-date { margin-bottom: 12px; width: 100%; margin-left: 0px; margin-right: 0px; .slider-outer-wrapper { margin: 2rem -0.5rem 1rem; } &[data-theme='marryBaby'] { padding: 1rem; background: white; border-radius: 1rem; .slider-outer-wrapper { gap: 12px; display: flex; align-items: center; margin: 0.5rem; } } } .input-form { display: flex; ${o.M.mbUp} { width: calc(50% - 8px); margin-bottom: 24px; } &[data-is-side='true'] { ${o.M.mbUp} { margin-bottom: 12px; width: 100%; } } ${o.M.mbDown} { margin-bottom: 8px; } } } .heart-rate-cal { .slider-heart-rate { margin-bottom: 12px; width: 100%; margin-left: 0px; margin-right: 0px; .slider-outer-wrapper { margin: 2rem -0.5rem 1rem; } } } .ovulation-cal { display: flex; /* padding-top: 24px; */ justify-content: space-between; flex-wrap: wrap; .slider-ovulation { margin-bottom: 12px; /* width: 100%; */ margin-left: 0px; margin-right: 0px; .slider-outer-wrapper { margin: 2rem -0.5rem 1rem; } &[data-theme='marryBaby'] { padding: 1rem; background: white; border-radius: 1rem; .slider-outer-wrapper { gap: 12px; display: flex; align-items: center; margin: 0.5rem; } } } .input-form { display: flex; ${o.M.mbUp} { width: calc(50% - 8px); margin-bottom: 24px; &[data-is-side='true'] { margin-bottom: 12px; width: 100%; } } ${o.M.mbDown} { margin-bottom: 8px; } } } .pwg-view-mobile { &[data-is-side='true'] { display: flex; flex-wrap: wrap; justify-content: space-between; } ${o.M.mbDown} { display: flex; flex-wrap: wrap; justify-content: space-between; padding: 16px 0; } .hide-asking-mobile { gap: 10px; &[data-is-side='true'] { ${o.M.mbUp} { display: none; } } ${o.M.mbDown} { display: none; } } .hide-asking-desk { gap: 10px; &[data-is-side='true'] { ${o.M.mbUp} { display: unset; } } ${o.M.mbUp} { display: none; } } } input[type='date']::after { width: 16px; height: 16px; background-image: url('https://hellobacsi.blog/svg/calendar.svg'); background-repeat: no-repeat; background-size: contain; content: ''; } `,Mn=(0,_.Z)(qt)` &[data-direction='horizontal'] div[data-type='circle'] { margin-right: 8px; } label { font-size: 14px; } `,zn=({isMobile:e,locale:t,onSubmitDueDate:a,dueDatePageInfo:i,expertUrl:l,isSide:o,siteType:r})=>{var s;const{t:c}=(0,q.u)();return n.createElement(Tn,{"data-is-side":o,"data-site":r},n.createElement(rn,{isSide:o,siteType:r,bannerColor:"marryBaby"===r&&h.t.mbColors.mint,isEmbeded:!0,color:"pink",icon:n.createElement("img",{alt:"health-tool-icon",src:(null===i||void 0===i?void 0:i.featured_image)||u.C.getAssetPath("health-tools/due-date-icon.svg"),loading:"lazy"}),heading:c("healthTools.dueDateCalculator"),medicalReview:{link:l,reviewer:null===(s=null===i||void 0===i?void 0:i.reviewed_by)||void 0===s?void 0:s.display_name,date:null===i||void 0===i?void 0:i.reviewed_date},isMobile:e}),n.createElement(Sn,{onSubmit:e=>e.preventDefault(),className:"due-date-cal","data-is-side":o},n.createElement(Bn,{siteType:r,locale:t,onSubmitDueDate:a,isSide:o})))},Dn=(0,n.createContext)({}),$n=(0,_.Z)(r.B)` margin: 0 auto 24px; ${o.M.mbUp} { max-width: 200px; margin: 24px auto; } `,Pn=(0,_.Z)(l.P)` &.bmi--input { + .bmi--input { margin-top: 24px; } .inputLabel { display: inline-block; margin-bottom: 5px; color: #595959; font-weight: bold; font-size: 12px; } .errorLabel { line-height: 1.3; } input[type='radio'] { padding: 0; } .bmi--input-radio_gender { width: 100%; gap: 16px; > div { ${o.M.mbDown} { width: calc(50% - 8px); } width: calc(33% - 8px); } & > div > div { display: flex; flex-direction: row; justify-content: center; align-content: center; gap: 8px; padding-block: 5px; } } .bmi-side-embed { > div { ${o.M.mbUp} { width: calc(50% - 8px); } } } .radio-group-item-heading { margin-top: 0; } } ${o.M.mbDown} { &.bmi--input { .bmi--input-radio_gender { > div { .gender-image { width: 40px; height: 40px; } } } } } `,In=_.Z.div` width: 100%; `,An=_.Z.div` margin-bottom: 1rem; display: flex; flex-direction: column; gap: 16px; input { font-size: 12px; ::placeholder { color: #8c8c8c; opacity: 1; } } .input-label { label { display: inline-block; margin-bottom: 9px; color: #595959; font-weight: bold; font-size: 12px; } } `,Ln=_.Z.div` ${o.M.mbUp} { display: flex; width: 100%; align-items: flex-start; justify-content: space-between; gap: 12px; > div { width: 100%; } &[data-is-side='true'] { ${o.M.mbUp} { display: flex; flex-direction: column; gap: 0px; } } } ${o.M.mbDown} { display: flex; flex-direction: column; gap: 0px; } `;function jn({weight:e,height:t}){const a=t/100,n=e;return Math.round(n/(a*a)*10)/10}const On=({value:e,onChange:t,onSubmit:a,disabled:l,bmiGenerated:o,bmiUnit:s,locale:d,isSide:m})=>{var p,u,g,v;const[b,y]=(0,n.useState)(!1),{control:E,handleSubmit:x,setValue:w,watch:C}=(0,ve.cI)(),k=C(),{t:N}=(0,q.u)(),{gender:B=!1,age:S=!1,height:T=!1,weight:M=!1,objective:z=!0}=l||{},{getHealthToolLink:D}=(0,be.u)(d),$=(0,n.useMemo)((()=>D(de.H.OVULATION)),[D]),P=(0,n.useMemo)((()=>[{value:"lose-weight",label:N("bmi.objective.loseWeight")},{value:"maintain-weight",label:N("bmi.objective.maintainWeight")},{value:"gain-weight",label:N("bmi.objective.gainWeight")}]),[]),I=()=>{y(!0)};return(0,n.useEffect)((()=>{Object.keys(e||{}).forEach((t=>{w(t,null===e||void 0===e?void 0:e[t],{shouldTouch:!1,shouldDirty:!1,shouldValidate:!1})}))}),[e]),(0,n.useEffect)((()=>{t&&t(k)}),[k]),n.createElement(In,null,n.createElement("form",{onSubmit:x((e=>(0,c.a)(void 0,void 0,void 0,(function*(){const t=s.heightConvert(e.height),n=s.weightConvert(e.weight),i={gender:e.gender,age:e.age,height:t,weight:n,bmi:jn({height:t,weight:n})};z||(i.objective=e.objective),I(),a&&a(i)}))),I)},!B&&n.createElement(An,{"data-is-side":m},n.createElement(ve.Qr,{name:"gender",control:E,defaultValue:"male",render:({field:{onChange:e}})=>n.createElement(gt,{defaultValue:"male",onChange:t=>e(t),styles:e=>({root:!m&&{[e.fn.largerThan("sm")]:{width:"calc((100% - 24px) * 2/3 + 12px)"}},wrapper:{[e.fn.largerThan("sm")]:{gap:(0,f.h)(12)}}})})})),n.createElement(Ln,{"data-is-side":m},!S&&n.createElement(An,null,n.createElement(ve.Qr,{name:"age",control:E,rules:null===(p=o.age)||void 0===p?void 0:p.rule,render:({field:{name:e,value:t,onChange:a},fieldState:{error:l}})=>n.createElement(r.c.Number,{label:n.createElement(i.T,{size:"s4",weight:"semiBold",color:h.t.colors.gray600},N("bmi.ageInput")," ",n.createElement(i.T,{size:"s4",weight:"semiBold",color:h.t.colors.gray300,as:"span"},N("bmi.ageInput.desc"))),placeholder:N("healthtool.placeholder.age"),name:e,value:t,onChange:a,error:b?null===l||void 0===l?void 0:l.message:"",min:0})})),!T&&n.createElement(An,null,n.createElement(ve.Qr,{name:"height",control:E,rules:null===(u=o.height)||void 0===u?void 0:u.rule,render:({field:{name:e,value:t,onChange:a},fieldState:{error:l}})=>n.createElement(r.c.Number,{label:n.createElement(i.T,{size:"s4",weight:"semiBold",color:h.t.colors.gray600},N("bmi.heightInput")," ",n.createElement(i.T,{size:"s4",weight:"semiBold",color:h.t.colors.gray300,as:"span"},N("bmi.heightInput.desc"))),placeholder:N("pwg.placeholder.height"),name:e,value:t,onChange:a,error:b?null===l||void 0===l?void 0:l.message:"",min:0})})),!M&&n.createElement(An,null,n.createElement(ve.Qr,{name:"weight",control:E,rules:null===(g=o.weight)||void 0===g?void 0:g.rule,render:({field:{name:e,value:t,onChange:a},fieldState:{error:l}})=>n.createElement(r.c.Number,{label:n.createElement(i.T,{size:"s4",weight:"semiBold",color:h.t.colors.gray600},N("bmi.weightInput")," ",n.createElement(i.T,{size:"s4",weight:"semiBold",color:h.t.colors.gray300,as:"span"},N("bmi.weightInput.desc"))),placeholder:N("pwg.placeholder.weight"),name:e,value:t,onChange:a,error:b?null===l||void 0===l?void 0:l.message:"",precision:1,min:0})})),!z&&n.createElement(An,null,n.createElement(ve.Qr,{name:"objective",control:E,defaultValue:"lose-weight",rules:null===(v=o.objective)||void 0===v?void 0:v.rule,render:({field:{name:e,value:t,onChange:a},fieldState:{error:i}})=>n.createElement(Pn,{size:"md",name:e,label:o.objective.label,CustomInput:n.createElement(qt,{id:"bmi-objective",className:"bmi-objective",direction:"vertical",size:"small",options:P,value:t,onChange:a}),errorMessage:b?null===i||void 0===i?void 0:i.message:"",className:"bmi--input bmi--input-objective"})}))),n.createElement("div",{style:{display:"flex"}},n.createElement($n,{size:"lg",fullWidth:!0,className:"bmi-btn bmi--btn-submit",dataEventCategory:"Health Tool",dataEventAction:"BMI",dataEventLabel:`https://${A.d[d]}/${$}`,type:"submit"},N("bmi.submit")))))},_n=()=>{const{onSubmit:e,bmiGenerated:t,locale:a,bmiUnit:i,isSide:l}=(0,n.useContext)(Dn);return n.createElement(On,{onSubmit:e,bmiGenerated:t,locale:a,bmiUnit:i,isSide:l})},Zn=({isMobile:e,onSubmit:t,bmiContent:a,isSide:i,bmiGenerated:l,bmiUnit:o,bmiLink:r,locale:s,children:c})=>{var d,m,p;const{t:g}=(0,q.u)();return n.createElement(Dn.Provider,{value:{isMobile:e,onSubmit:t,isSide:i,bmiGenerated:l,bmiUnit:o,bmiLink:r,locale:s}},c||n.createElement(Tn,{"data-is-side":i},n.createElement(rn,{isSide:i,icon:n.createElement("img",{alt:"health-tool-icon",src:(null===a||void 0===a?void 0:a.featured_image)||u.C.getAssetPath("health-tools/bmi.svg"),loading:"lazy"}),heading:g("bmi.heading"),medicalReview:{link:null===(d=null===a||void 0===a?void 0:a.reviewBy)||void 0===d?void 0:d.link,reviewer:null===(m=null===a||void 0===a?void 0:a.reviewBy)||void 0===m?void 0:m.reviewer,date:null===(p=null===a||void 0===a?void 0:a.reviewBy)||void 0===p?void 0:p.date},isMobile:e}),n.createElement(he.C,null,n.createElement(Sn,{as:"div","data-is-side":i},r&&n.createElement(_n,null)))))};Zn.Form=_n;const Hn=(0,n.createContext)({}),Fn=(0,n.createContext)({});var Rn=(0,w.k)((()=>({root:{}}))),Wn=(0,w.k)((e=>({root:{display:"flex",flexDirection:"column",gap:(0,f.h)(8)},row:{display:"flex",alignItems:"stretch",justifyContent:"space-between",gap:(0,f.h)(16)},labelWrapper:{flex:"1 1 0px",display:"flex",alignItems:"center",borderBottom:`1px solid ${e.colors.neutral[1]}`},label:{fontSize:(0,f.h)(14),color:e.colors.gray[6]},control:{width:(0,f.h)(180),flexShrink:1,"&.error":{"button, input":{borderColor:e.colors.red[7]}}},radioLabel:{fontSize:(0,f.h)(16)},radioRoot:{padding:`${(0,f.h)(10)} 0`,margin:0},bmiVal:{display:"inline-block"},inputWithUnit__wrapper:{position:"relative"},inputWithUnit__unit:{position:"absolute",top:0,right:0,bottom:0,paddingRight:(0,f.h)(10),display:"flex",alignItems:"center"},inputWithUnit__unitText:{color:e.colors.gray[6]},inputWithUnit__input:{input:{paddingRight:(0,f.h)(30),"::-webkit-inner-spin-button":{"-webkit-appearance":"none"}}},submitBtn:{},switchRoot:{padding:"16px 0"}})));const Un=e=>{var{styles:t,classNames:a}=e,l=(0,c._)(e,["styles","classNames"]);const{t:o}=(0,q.u)(),{control:s,currentUrl:d,isEmptyThreeFields:m,isMarryBaby:p}=(0,n.useContext)(Fn),{classes:u,cx:g}=Wn(void 0,{name:"BabyGrowthForm__HorizonalForm",styles:t,classNames:a});return n.createElement(v.x,Object.assign({className:u.root},l),n.createElement(ve.Qr,{control:s,name:"gender",render:({field:{onChange:e,value:t}})=>n.createElement(v.x,{className:u.row},n.createElement(v.x,{className:u.labelWrapper},n.createElement("label",{className:u.label,htmlFor:"gender"},o("tools.selectBabyGender"))),n.createElement(r.R.Group,{onChange:e,value:t},n.createElement(x.Z,{mt:"xs"},n.createElement(r.R,{value:"boy",label:o("gender.boy"),classNames:{root:u.radioRoot,label:u.radioLabel}}),n.createElement(r.R,{value:"girl",label:o("gender.girl"),classNames:{label:u.radioLabel}}))))}),n.createElement(ve.Qr,{control:s,name:"birthday",render:({field:{onChange:e,value:t},fieldState:{error:a}})=>n.createElement(v.x,{className:u.row},n.createElement(v.x,{className:u.labelWrapper},n.createElement("label",{className:u.label,htmlFor:"birthday"},o("babyGrowth.input.birthday"))),n.createElement(fe.D,{popoverProps:{withinPortal:!0},className:g(u.control,a?"error":""),onChange:e,placeholder:"DD/MM/YYYY",defaultDate:t||new Date,maxDate:new Date}))}),n.createElement(v.x,{className:u.row},n.createElement(v.x,{className:u.labelWrapper},n.createElement("label",{className:u.label},"BMI")),n.createElement(y.k,{align:"center",gap:"8px"},n.createElement(ve.Qr,{control:s,name:"bmi",render:({field:{value:e}})=>n.createElement(n.Fragment,null,n.createElement(i.T,{size:"p2"},n.createElement("span",{className:u.bmiVal},isNaN(Number(e))||"0"===e?"":e),o("babyGrowth.kg.m2")))}),n.createElement(ve.Qr,{control:s,name:"height",render:({field:{onChange:e,value:t},fieldState:{error:a}})=>n.createElement(v.x,{className:g(u.control,u.inputWithUnit__wrapper,m||(null===a||void 0===a?void 0:a.message)?"error":"")},n.createElement(W.I,{className:`${g(u.inputWithUnit__input)}`,name:"height",placeholder:o("babyGrowth.height"),size:"md",value:String(t),onChange:e,type:"number",onKeyDown:e=>["e","E","+","-"].includes(e.key)&&e.preventDefault(),onWheelCapture:e=>e.currentTarget.blur()}),n.createElement(v.x,{className:u.inputWithUnit__unit},n.createElement(i.T,{as:"span",size:"p2",className:u.inputWithUnit__unitText},o("babyGrowth.cm"))))}),n.createElement(ve.Qr,{control:s,name:"weight",render:({field:{onChange:e,value:t},fieldState:{error:a}})=>n.createElement(v.x,{className:g(u.control,u.inputWithUnit__wrapper,m||(null===a||void 0===a?void 0:a.message)?"error":"")},n.createElement(v.x,{className:u.inputWithUnit__unit},n.createElement(i.T,{as:"span",size:"p2",className:u.inputWithUnit__unitText},o("babyGrowth.kg"))),n.createElement(W.I,{className:`${g(u.inputWithUnit__input)}`,name:"weight",placeholder:o("babyGrowth.weight"),size:"md",value:String(t),onChange:e,type:"number",onKeyDown:e=>["e","E","+","-"].includes(e.key)&&e.preventDefault(),onWheelCapture:e=>e.currentTarget.blur()}))}))),n.createElement(ve.Qr,{control:s,name:"head",render:({field:{onChange:e,value:t},fieldState:{error:a}})=>n.createElement(v.x,{className:u.row},n.createElement(v.x,{className:u.labelWrapper},n.createElement("label",{className:u.label,htmlFor:"head"}," ",o("babyGrowth.headCircumference"))),n.createElement(v.x,{className:g(u.inputWithUnit__wrapper,u.control,m||(null===a||void 0===a?void 0:a.message)?"error":"")},n.createElement(W.I,{className:`${g(u.inputWithUnit__input)}`,name:"head",placeholder:"0",size:"md",value:String(t),onChange:e,type:"number",onKeyDown:e=>["e","E","+","-"].includes(e.key)&&e.preventDefault(),onWheelCapture:e=>e.currentTarget.blur()}),n.createElement(v.x,{className:u.inputWithUnit__unit},n.createElement(i.T,{as:"span",size:"p2",className:u.inputWithUnit__unitText},o("babyGrowth.cm")))))}),n.createElement(ve.Qr,{control:s,name:"measurementDate",render:({field:{onChange:e,value:t}})=>n.createElement(v.x,{className:u.row},n.createElement(v.x,{className:u.labelWrapper},n.createElement("label",{className:u.label,htmlFor:"measurementDate"},o("babyGrowth.input.measurementDate"))),n.createElement(fe.D,{popoverProps:{withinPortal:!0},className:u.control,placeholder:t&&se()(t).format(de.b),defaultDate:t||new Date,onChange:e,maxDate:new Date}))}),n.createElement(v.x,{className:u.row},n.createElement(r.B,{className:u.submitBtn,size:"lg",type:"submit",variant:p?"secondary":"primary","data-event-category":"Health Tool","data-event-action":"Baby Growth","data-event-label":d},o("babyGrowth.input.submit"))))},Gn=_.Z.div` display: flex; flex-direction: column; gap: 16px; padding-block: 40px; &[data-theme='marryBaby'] { padding-block: 0; padding-top: 12px; } `,Vn=_.Z.div` display: flex; flex-direction: column; gap: 6px; margin-top: auto; .error-input input { border: 1px solid ${h.t.colors.red700}; } `,qn=(0,_.Z)(xe.L)` display: inline-flex; padding-bottom: 6px; gap: 4px; `,Yn=_.Z.div` display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 16px; > div { width: 100%; } `,Kn=()=>{const{t:e}=(0,q.u)(),{control:t,currentUrl:a,isEmptyThreeFields:l,isMarryBaby:o,siteType:s}=(0,n.useContext)(Fn);return n.createElement(Gn,{className:"form-wrapper","data-theme":s},n.createElement(ve.Qr,{control:t,name:"gender",render:({field:{onChange:e,value:t}})=>n.createElement(Ee.B,{onChange:e,value:t,siteType:s})}),"marryBaby"===s?n.createElement(n.Fragment,null,n.createElement(ve.Qr,{control:t,name:"birthday",render:({field:{onChange:t,value:a},fieldState:{error:i}})=>n.createElement(Vn,null,n.createElement(cn,{label:e("babyGrowth.input.birthday"),name:"birthday",size:"md",value:String(a),CustomInput:n.createElement(me.D,{onChange:t,placeholder:"dd/mm/yyyy",pickedDate:a||new Date,displayDateFormat:"dd/MM/yyyy",disabledDays:{after:new Date},customInput:e=>n.createElement(W.I,Object.assign({onChange:t,className:(null===i||void 0===i?void 0:i.message)?"error-input":"",name:"birthday",size:"md"},e,{value:a&&se()(a).format(de.b)}))}),actionIcon:n.createElement(m.Z,{size:32})}))}),n.createElement(Yn,null,n.createElement(ve.Qr,{control:t,name:"height",render:({field:{onChange:t,value:a},fieldState:{error:i}})=>n.createElement(Vn,null,n.createElement(cn,{label:`${e("babyGrowth.height")} ${e("babyGrowth.cm")}`,name:"height",size:"md",value:String(a),CustomInput:n.createElement(W.I,{className:l||(null===i||void 0===i?void 0:i.message)?"error-input":"",name:"height",size:"md",placeholder:"Nh\u1eadp th\xf4ng tin",value:String(a),onChange:t,type:"number",onKeyDown:e=>["e","E","+","-"].includes(e.key)&&e.preventDefault(),onWheelCapture:e=>e.currentTarget.blur()})}))}),n.createElement(ve.Qr,{control:t,name:"weight",render:({field:{onChange:t,value:a},fieldState:{error:i}})=>n.createElement(Vn,null,n.createElement(cn,{label:`${e("babyGrowth.weight")} ${e("babyGrowth.kg")}`,name:"weight",size:"md",value:String(a),CustomInput:n.createElement(W.I,{className:l||(null===i||void 0===i?void 0:i.message)?"error-input":"",name:"weight",size:"md",placeholder:"Nh\u1eadp th\xf4ng tin",value:String(a),onChange:t,type:"number",onKeyDown:e=>["e","E","+","-"].includes(e.key)&&e.preventDefault(),onWheelCapture:e=>e.currentTarget.blur()})}))})),n.createElement(Yn,null,n.createElement(ve.Qr,{control:t,name:"head",render:({field:{onChange:t,value:a},fieldState:{error:i}})=>n.createElement(Vn,null,n.createElement(cn,{label:`${e("babyGrowth.headCircumference")} ${e("babyGrowth.cm")}`,name:"head",size:"md",value:String(a),CustomInput:n.createElement(W.I,{className:l||(null===i||void 0===i?void 0:i.message)?"error-input":"",name:"head",size:"md",value:String(a),onChange:t,type:"number",placeholder:"Nh\u1eadp th\xf4ng tin",onKeyDown:e=>["e","E","+","-"].includes(e.key)&&e.preventDefault(),onWheelCapture:e=>e.currentTarget.blur()})}))}),n.createElement(ve.Qr,{control:t,name:"bmi",render:({field:{value:t}})=>n.createElement(Vn,null,n.createElement(cn,{label:`${e("babyGrowth.input.bmi")} ${e("babyGrowth.kg.m2")}`,name:"date",size:"md",value:String(t),CustomInput:n.createElement(W.I,{name:"bmi",size:"md",type:"number",value:String(t),isDisabled:!0,style:{color:"#9495A0"}})}))})),n.createElement(ve.Qr,{control:t,name:"measurementDate",render:({field:{onChange:t,value:a},fieldState:{error:i}})=>n.createElement(Vn,null,n.createElement(cn,{label:e("babyGrowth.input.measurementDate"),name:"date",size:"md",value:vn(a),CustomInput:n.createElement(me.D,{placeholder:a&&se()(a).format(de.b),pickedDate:a||new Date,displayDateFormat:"dd/MM/yyyy",onChange:t,disabledDays:{after:new Date},customInput:e=>n.createElement(W.I,Object.assign({className:(null===i||void 0===i?void 0:i.message)&&"error-input",name:"measurementDate",size:"md",placeholder:a&&se()(a).format(de.b),onChange:t},e,{value:a&&se()(a).format(de.b)}))}),actionIcon:n.createElement(m.Z,{size:32})}))}),n.createElement(r.B,{size:"lg",type:"submit",variant:o?"secondary":"primary","data-event-category":"Health Tool","data-event-action":"Baby Growth","data-event-label":a},e("babyGrowth.input.submit"))):n.createElement(n.Fragment,null,n.createElement(ve.Qr,{control:t,name:"birthday",render:({field:{onChange:t,value:a},fieldState:{error:l}})=>n.createElement(Vn,null,n.createElement(qn,{size:"label1",htmlFor:"birthday"},n.createElement(i.T,{as:"label",size:"s4",weight:"semiBold"},e("babyGrowth.input.birthday"))),n.createElement(me.D,{onChange:t,placeholder:"dd/mm/yyyy",pickedDate:a||new Date,displayDateFormat:"dd/MM/yyyy",disabledDays:{after:new Date},customInput:e=>n.createElement(W.I,Object.assign({onChange:t,className:(null===l||void 0===l?void 0:l.message)?"error-input":"",name:"birthday",size:"md",actionIcon:n.createElement(p.Z,null)},e,{value:a&&se()(a).format(de.b)}))}))}),n.createElement(Yn,null,n.createElement(ve.Qr,{control:t,name:"height",render:({field:{onChange:t,value:a},fieldState:{error:o}})=>n.createElement(Vn,null,n.createElement(qn,{size:"label1",htmlFor:"height"},n.createElement(i.T,{size:"s4",weight:"semiBold"},e("babyGrowth.height")),n.createElement(i.T,{as:"span",size:"n1",color:h.t.colors.gray400},e("babyGrowth.cm"))),n.createElement(W.I,{className:l||(null===o||void 0===o?void 0:o.message)?"error-input":"",name:"height",placeholder:"0",size:"md",value:String(a),onChange:t,type:"number",onKeyDown:e=>["e","E","+","-"].includes(e.key)&&e.preventDefault(),onWheelCapture:e=>e.currentTarget.blur()}))}),n.createElement(ve.Qr,{control:t,name:"weight",render:({field:{onChange:t,value:a},fieldState:{error:o}})=>n.createElement(Vn,null,n.createElement(qn,{size:"label1",htmlFor:"weight"},n.createElement(i.T,{size:"s4",weight:"semiBold"},e("babyGrowth.weight")),n.createElement(i.T,{as:"span",size:"n1",color:h.t.colors.gray400},e("babyGrowth.kg"))),n.createElement(W.I,{className:l||(null===o||void 0===o?void 0:o.message)?"error-input":"",name:"weight",placeholder:"0",size:"md",value:String(a),onChange:t,type:"number",onKeyDown:e=>["e","E","+","-"].includes(e.key)&&e.preventDefault(),onWheelCapture:e=>e.currentTarget.blur()}))})),n.createElement(Yn,null,n.createElement(ve.Qr,{control:t,name:"head",render:({field:{onChange:t,value:a},fieldState:{error:o}})=>n.createElement(Vn,null,n.createElement(qn,{size:"label1",htmlFor:"head"},n.createElement(i.T,{size:"s4",weight:"semiBold"},e("babyGrowth.headCircumference")),n.createElement(i.T,{as:"span",size:"n1",color:h.t.colors.gray400},e("babyGrowth.cm"))),n.createElement(W.I,{className:l||(null===o||void 0===o?void 0:o.message)?"error-input":"",name:"head",placeholder:"0",size:"md",value:String(a),onChange:t,type:"number",onKeyDown:e=>["e","E","+","-"].includes(e.key)&&e.preventDefault(),onWheelCapture:e=>e.currentTarget.blur()}))}),n.createElement(ve.Qr,{control:t,name:"bmi",render:({field:{value:t}})=>n.createElement(Vn,null,n.createElement(qn,{size:"label1",htmlFor:"bmi"},n.createElement(i.T,{size:"s4",weight:"semiBold"},e("babyGrowth.input.bmi")),n.createElement(i.T,{as:"span",size:"n1",color:h.t.colors.gray400},e("babyGrowth.kg.m2"))),n.createElement(W.I,{name:"bmi",size:"md",type:"number",value:String(t),isDisabled:!0}))})),n.createElement(ve.Qr,{control:t,name:"measurementDate",render:({field:{onChange:t,value:a},fieldState:{error:l}})=>n.createElement(Vn,null,n.createElement(qn,{size:"label1",htmlFor:"measurementDate"},n.createElement(i.T,{as:"label",size:"s4",weight:"semiBold"},e("babyGrowth.input.measurementDate"))),n.createElement(me.D,{placeholder:a&&se()(a).format(de.b),pickedDate:a||new Date,displayDateFormat:"dd/MM/yyyy",onChange:t,disabledDays:{after:new Date},customInput:e=>n.createElement(W.I,Object.assign({className:(null===l||void 0===l?void 0:l.message)&&"error-input",name:"measurementDate",size:"md",placeholder:a&&se()(a).format(de.b),onChange:t,actionIcon:n.createElement(p.Z,null)},e,{value:a&&se()(a).format(de.b)}))}))}),n.createElement(r.B,{size:"lg",type:"submit",variant:o?"secondary":"primary","data-event-category":"Health Tool","data-event-action":"Baby Growth","data-event-label":a},e("babyGrowth.input.submit"))))},Qn=(e=0,t=0)=>{try{if(e&&t){const a=Number(t)/Math.pow(Number(e)/100,2);return Number(((e,t=2)=>Intl.NumberFormat(void 0,{maximumFractionDigits:t}).format(e))(a))}return 0}catch(a){}return 0},Xn=_.Z.div` padding: 36px; padding-top: 0; background-color: white; ${o.M.mbDown} { padding: 16px; padding-top: 0; } &[data-theme='marryBaby'] { background-color: ${h.t.mbColors.green}; padding: 24px; border-bottom-right-radius: 16px; border-bottom-left-radius: 16px; ${o.M.mbDown} { padding: 16px; } } `,Jn=(0,_.Z)((({onSubmit:e,onError:t,schema:a,siteType:i,layout:l="vertical",styles:o,classNames:r})=>{const{classes:s,theme:c}=Rn(void 0,{name:"BabyGrowthForm",styles:o,classNames:r}),d="mb"===c.other.template,{control:m,setValue:p,watch:u,handleSubmit:g,formState:{isSubmitted:h}}=(0,ve.cI)({resolver:(0,ye.X)(a),mode:"onSubmit",defaultValues:{name:"",gender:L.G.Boy,measurementDate:new Date}}),b=u("weight"),y=u("height"),f=u("head"),E=(0,n.useMemo)((()=>h&&!b&&!y&&!f),[h,b,y,f]);(0,n.useEffect)((()=>{const e=Qn(y,b);p("bmi",String(e)||"0")}),[b,y]);const x=(0,n.useMemo)((()=>"undefined"!==typeof window?window.location.href:""),[]);return n.createElement(Fn.Provider,{value:{isEmptyThreeFields:E,control:m,currentUrl:x,isMarryBaby:d,siteType:i}},n.createElement(v.x,{component:"form",onSubmit:g(e,t)},"vertical"===l?n.createElement(Kn,null):n.createElement(Un,{classNames:{root:s.root}})))}))` padding-block: 0; `;(0,_.Z)(rn)` padding-inline: 20px; img.embedded-icon { width: 140px; margin-left: 50%; align-self: center; } ${o.M.mbDown} { padding-inline: 0; img.embedded-icon { width: 125px; align-self: end; margin-left: 0; position: absolute; transform: translateY(50%); } .embedded-review { max-width: 200px; } } `;const ei=e=>{var t=(0,c._)(e,[]);const{formLayout:a,siteType:i,schema:l,onSubmit:o,onError:r}=(0,n.useContext)(Hn);return n.createElement(Jn,Object.assign({siteType:i,schema:l,onSubmit:o,onError:r,layout:a},t))},ti=({isMobile:e,onSubmit:t,onError:a,schema:i,babyGrowthContent:l,siteType:o,children:r,formLayout:s})=>{var c,d,m;return n.createElement(Hn.Provider,{value:{formLayout:s,siteType:o,schema:i,onSubmit:t,onError:a}},r||n.createElement(n.Fragment,null,n.createElement(Tn,{"babyGrowthContent-is-mobile":e,"data-site":o},n.createElement(rn,{siteType:o,bannerUrl:u.C.getAssetPath("embedToolBannerBlue.svg"),bannerUrlLarge:u.C.getAssetPath("embedToolBannerBlue.svg"),bannerColor:"marryBaby"===o&&h.t.mbColors.mint,isEmbeded:!0,icon:n.createElement("img",{className:"embedded-icon",alt:"health-tool-icon",src:(null===l||void 0===l?void 0:l.featuredImage)||u.C.getAssetPath("health-tools/toolsIconBabyGrowth.svg"),loading:"lazy"}),heading:(null===l||void 0===l?void 0:l.title)||"",medicalReview:{link:null===(c=null===l||void 0===l?void 0:l.reviewBy)||void 0===c?void 0:c.link,reviewer:null===(d=null===l||void 0===l?void 0:l.reviewBy)||void 0===d?void 0:d.reviewer.trim(),date:null===(m=null===l||void 0===l?void 0:l.reviewBy)||void 0===m?void 0:m.date},isMobile:e}),n.createElement(Xn,{"data-theme":o},n.createElement(ei,{layout:s})))))};ti.Form=ei;var ai=(0,w.k)(((e,t)=>{const{isMarryBaby:a,isSide:n,direction:i}=t;return{root:Object.assign(Object.assign(Object.assign(Object.assign({position:"relative",display:"flex"},"auto"===i?{flexDirection:"row"}:{flexDirection:"column"===i?"column-reverse":"row"}),{gap:"8px",padding:"16px",borderRadius:a?"16px":"8px"}),!a&&{backgroundImage:`url(${u.C.getAssetPath("bgPattern/baby-poop.svg")})`,backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundPosition:"center"}),{backgroundColor:a?e.colors.toneGreen.toString():e.colors[e.primaryColor][0],[e.fn.smallerThan("sm")]:Object.assign({},"auto"===i?{flexDirection:"column-reverse"}:{}),[e.fn.smallerThan("md")]:{borderRadius:a?"12px":"8px"},[e.fn.largerThan("md")]:{padding:"32px",gap:"20px"}}),inner:{display:"flex",gap:"16px",flexDirection:"column",flex:1},content:{display:"flex",flexDirection:"column",gap:"16px"},reviewText:{display:"flex",gap:"4px",a:{color:e.colors.gray[6],fontWeight:"bold","&:not(:hover)":{textDecoration:"none"}}},reviewTextIcon:{flexShrink:0,width:"16px",height:"16px",[e.fn.largerThan("sm")]:{marginTop:"2px"}},thumbnail:Object.assign(Object.assign({img:{objectFit:"contain",objectPosition:"bottom",width:"100%",height:"100%"}},"column"===i?{width:"80%",alignSelf:"center"}:"row"===i?{width:"40%"}:{}),{[e.fn.smallerThan("sm")]:Object.assign({},"auto"===i?{width:"80%",alignSelf:"center"}:{}),[e.fn.largerThan("sm")]:Object.assign({},"auto"===i?{width:"40%"}:{})}),action:{display:"flex",justifyContent:a?"center":"flex-start"},btn:{minWidth:a?"auto":"143px",width:n||a?"100%":"auto",[e.fn.smallerThan("md")]:{width:"100%"}},sponsorLogo:Object.assign(Object.assign({position:"absolute",top:0,height:40,objectFit:"contain",objectPosition:"top"},"column"===i?{left:"16px",height:40}:"row"===i?{height:50,right:"40px"}:{left:"16px",height:40}),{[e.fn.largerThan("sm")]:Object.assign({},"auto"===i?{height:50,right:"40px",left:"unset"}:{})})}}));const ni=({babyPoopPage:e,onClickFindOut:t,currentUrl:a,isSide:l,direction:o="auto",sponsorLogo:s})=>{const{t:c}=(0,q.u)(),d="mb"===(0,N.rZ)().other.template,{classes:m}=ai({isMarryBaby:d,isSide:l,direction:o},{name:"BabyPoopEmbed"}),{reviewedBy:p,reviewedDate:v}=e||{};return n.createElement("div",{className:m.root},n.createElement("div",{className:m.inner},n.createElement(g.H,{tag:"h3",as:"h2",color:!d&&"#284A75"},e.title),n.createElement("div",{className:m.content,"data-is-side":l},n.createElement(i.T,{size:"p3",className:"description"},e.description),!!p&&n.createElement("div",{className:m.reviewText},n.createElement("img",{src:u.C.getAssetPath("reviewerCheck.svg"),alt:"check",className:m.reviewTextIcon,loading:"lazy"}),n.createElement(i.T,{size:"p4",color:h.t.colors.gray600},c("categoryPage.info.reviewed"),"\xa0",n.createElement("a",{href:p.profile_url},p.display_name),"\xa0",c("categoryPage.onDate",{date:v||""}))),n.createElement("div",{className:m.action},n.createElement(r.B,{className:m.btn,size:d?"lg":"md",variant:d?"secondary":"primary",onClick:t,dataEventCategory:"Health Tool",dataEventAction:"Baby Stool Inquiry",dataEventLabel:a,style:{visibility:Boolean(t)?"visible":"hidden"}},c("babyPoop.findOut"))))),n.createElement("div",{className:m.thumbnail},n.createElement("img",{src:d?u.C.getAssetPath("baby-poop.svg"):null===e||void 0===e?void 0:e.featuredImage,alt:e.title,loading:"lazy"})),s&&n.createElement("img",{loading:"lazy",src:s,alt:"sponsor",className:m.sponsorLogo}))},ii=_.Z.div` display: flex; width: 100%; &[data-direction='vertical'] { flex-direction: column; } &[data-direction='horizontal'] { flex-wrap: wrap; } `,li=_.Z.div` display: flex; padding: 8px; border-radius: ${h.t.borderRadius}; cursor: pointer; & > div { display: flex; width: 100%; height: 100%; flex-direction: column; align-items: center; justify-content: flex-start; } &[data-selected='true'] { border: 1px solid #2d87f3; background: white; .radio-group-item-heading { color: #2d87f3; } } &[data-selected='false'] { border: 1px solid #f2f2f2; box-shadow: 0px 5px 12px rgba(40, 74, 117, 0.08); .radio-group-item-heading { color: #262626; } } &[data-disabled='true'] { cursor: auto; } .radio-group-item-heading { margin-top: 8px; text-align: center; } .gender-image { width: 23px; height: 36px; object-fit: contain; } `,oi=({value:e,options:t,className:a,direction:l="horizontal",onChange:o,isDisabled:r})=>{const[s,c]=(0,n.useState)(e);return n.createElement(ii,{className:a,"data-direction":l},t.map(((t,a)=>n.createElement(li,{"data-selected":(e||s)===t.value,"data-disabled":r,key:`health-tool${a}`,onClick:()=>{var e;e=t.value,r||(c(e),o&&o(e))}},n.createElement("div",null,n.createElement("img",{src:(e||s)===t.value?t.imageActive:t.image,className:"gender-image",alt:"",loading:"lazy"}),t.label&&n.createElement(i.T,{weight:"bold",className:"radio-group-item-heading",size:"label1"},t.label))))))},ri=(0,_.Z)(r.B)` margin: 0 auto 24px; width: 100%; ${o.M.mbUp} { max-width: 200px; } `,si=_.Z.div``,ci=_.Z.div` display: flex; flex-direction: column; gap: 16px; input { font-size: 12px; } .gender-option { gap: 16px; > div { width: calc(50% - 8px); } } .input-label { label { display: inline-block; margin-bottom: 9px; color: #595959; font-weight: bold; font-size: 12px; } } `,di=_.Z.div` ${o.M.mbUp} { display: flex; width: 100%; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; > div { width: 100%; } } ${o.M.mbDown} { display: flex; flex-direction: column; gap: 16px; margin-bottom: 8px; } &[data-is-side='true'] { ${o.M.mbUp} { display: flex; flex-direction: column-reverse; gap: 0px; } } `,mi=({info:e,className:t,style:a,onChange:l,errorMessage:o={},locale:r})=>{const{t:s}=(0,q.u)(),[c,d]=(0,n.useState)(new Date),[m,p]=(0,n.useState)({age:!1,rate:!1});return(0,n.useEffect)((()=>{p({age:!1,rate:!1})}),[o]),n.createElement(si,{style:a,className:t},n.createElement(W.I,{className:"input-section due-date-input",label:n.createElement(i.T,{size:"s4",weight:"semiBold",color:h.t.colors.gray600,style:{marginBottom:"9px",flex:"1"}},s("targetHeartRate.ageInput")),value:vn(c),name:"date",size:"md",CustomInput:n.createElement(me.D,{customInput:e=>n.createElement("input",Object.assign({type:"date",className:"due-date-input"},e,{value:vn(c)})),disabledDays:{after:new Date((0,K.Z)(new Date,0))},locale:r,pickedDate:c,displayDateFormat:"dd/MM/yyyy",onChange:t=>{(t=>{d(t),p((e=>Object.assign(Object.assign({},e),{age:!0})));const a=Object.assign(Object.assign({},e),{age:(0,Y.Z)(new Date(t),hn)});l&&l(a)})(t)},placeholder:"placeholder"}),errorMessage:m.age?"":o.age}))},pi=({isSide:e,locale:t,thrContent:a,isMobile:l,info:o,inputErrorMessage:r,onFormChange:s,onSubmit:c})=>{var d,m,p;const{t:g}=(0,q.u)(),{getHealthToolLink:v}=(0,be.u)(t),b=(0,n.useMemo)((()=>v(de.H.THR)),[v]),[y,E]=(0,n.useState)(!1),[x,w]=(0,n.useState)("low_intensity"),[C,k]=(0,n.useState)("male"),[N,B]=(0,n.useState)(60),[S,T]=(0,n.useState)({idAge:0,minAge:0,maxAge:18,rangeMale:40,rangeFemale:40}),M=[{idAge:0,minAge:0,maxAge:18,rangeMale:40,rangeFemale:40},{idAge:1,minAge:18,maxAge:25,rangeMale:49,rangeFemale:54},{idAge:2,minAge:25,maxAge:35,rangeMale:49,rangeFemale:54},{idAge:3,minAge:35,maxAge:45,rangeMale:50,rangeFemale:54},{idAge:4,minAge:45,maxAge:55,rangeMale:50,rangeFemale:54},{idAge:5,minAge:55,maxAge:65,rangeMale:51,rangeFemale:54},{idAge:6,minAge:65,maxAge:120,rangeMale:50,rangeFemale:54}],z=[{value:"low_intensity",label:g("targetHeartRate.lowIntensity.title"),image:u.C.getAssetPath("/low.svg"),imageActive:u.C.getAssetPath("/low-active.svg"),content:g("targetHeartRate.lowIntensity.note")},{value:"moderate_intensity",label:g("targetHeartRate.moderateIntensity.title"),image:u.C.getAssetPath("/moderate.svg"),imageActive:u.C.getAssetPath("/moderate-active.svg"),content:g("targetHeartRate.moderateIntensity.note")},{value:"aerobic_zone",label:g("targetHeartRate.aerobicZone.title"),image:u.C.getAssetPath("/aerobic.svg"),imageActive:u.C.getAssetPath("/aerobic-active.svg"),content:g("targetHeartRate.aerobicZone.note")},{value:"vigorous_intensity",label:g("targetHeartRate.vigorousIntensity.title"),image:u.C.getAssetPath("/vigorous.svg"),imageActive:u.C.getAssetPath("/vigorous-active.svg"),content:g("targetHeartRate.vigorousIntensity.note")},{value:"maximum_intensity",label:g("targetHeartRate.maximumIntensity.title"),image:u.C.getAssetPath("/maximum.svg"),imageActive:u.C.getAssetPath("/maximum-active.svg"),content:g("targetHeartRate.maximumIntensity.note")}];return(0,n.useEffect)((()=>{const e=((new Date).getTime()-new Date(null===o||void 0===o?void 0:o.age).getTime())/1e3;E(e>=567648e3);const t=M.find((t=>e>=365*t.minAge*24*60*60&&e<365*t.maxAge*24*60*60))||M[0];T(t),B(60)}),[null===o||void 0===o?void 0:o.age]),n.createElement(Tn,{"data-is-side":e},n.createElement(rn,{isSide:e,icon:n.createElement("img",{alt:"health-tool-icon",src:(null===a||void 0===a?void 0:a.featured_image)||u.C.getAssetPath("health-tools/target-heart-rate-icon.svg"),loading:"lazy"}),heading:g("targetHearRate.heading"),medicalReview:(null===(d=null===a||void 0===a?void 0:a.reviewedBy)||void 0===d?void 0:d.display_name)?{link:(0,we.f)(null===a||void 0===a?void 0:a.reviewedBy),reviewer:null===(m=null===a||void 0===a?void 0:a.reviewedBy)||void 0===m?void 0:m.display_name,date:null===a||void 0===a?void 0:a.reviewedDate}:void 0,isMobile:l}),n.createElement(he.C,null,n.createElement(Sn,{className:"heart-rate-cal",onSubmit:e=>e.preventDefault(),"data-is-side":e},n.createElement(di,{"data-is-side":e},n.createElement(ci,null,n.createElement(gt,{defaultValue:"male",onChange:e=>{k(e),B(60)},styles:t=>({root:!e&&{[t.fn.largerThan("sm")]:{width:"calc((100% - 24px) * 2/3 + 12px)"}},wrapper:{[t.fn.largerThan("sm")]:{gap:(0,f.h)(12)}}})}))),n.createElement(di,null,n.createElement(mi,{info:o,locale:t,errorMessage:r,onChange:s})),n.createElement("div",{className:"slider-heart-rate"},n.createElement(i.T,{size:"s4",weight:"semiBold",color:h.t.colors.gray600},g("targetHeartRate.heartRateInput")),n.createElement("div",{className:"slider-outer-wrapper"},n.createElement(ue.S,{containerStyle:{flex:1},min:"male"===C?S.rangeMale:S.rangeFemale,max:200,step:1,value:N,withControl:!0,onChange:B}))),y&&n.createElement(ci,null,n.createElement(Nn,null,n.createElement(i.T,{size:"s4",style:{display:"inline-block",fontWeight:"bold",color:h.t.colors.gray600,marginBottom:"9px"}},g("targetHeartRate.selectActive")),n.createElement("div",{className:"card"},n.createElement(oi,{options:z.map((e=>({value:e.value,label:e.label,image:e.image,imageActive:e.imageActive}))),value:x,onChange:e=>{w(e)},className:"gender-selector"})),x&&n.createElement("div",{className:"note"},n.createElement("img",{style:{height:"16px",width:"16px"},src:u.C.getAssetPath("/infoIcon.svg"),alt:"",loading:"lazy"}),n.createElement(i.T,{size:"s4",color:"#595959"},null===(p=z[z.findIndex((e=>e.value==x))||0])||void 0===p?void 0:p.content)),!x&&n.createElement("span",{style:{color:"#e64728"}},r.intensity)))),n.createElement("div",{style:{display:"flex"}},n.createElement(ri,{size:"lg",onClick:()=>{c(C,x,[N])},dataEventCategory:"Health Tool",dataEventAction:"THR",dataEventLabel:`https://${A.d[t]}/${b}`},g("bmi.submit")))))},ui=(0,_.Z)(r.B)` margin: 0 auto 24px; ${o.M.mbUp} { max-width: 200px; margin: 24px auto; } `,gi=_.Z.div``,hi=_.Z.div` margin-bottom: 1rem; display: flex; flex-direction: column; gap: 16px; input { font-size: 12px; ::placeholder { color: #8c8c8c; opacity: 1; } } .gender-option { gap: 16px; > div { width: calc(50% - 8px); } } .input-label { label { display: inline-block; margin-bottom: 9px; color: #595959; font-weight: bold; font-size: 12px; } } `,vi=_.Z.div` ${o.M.mbUp} { display: flex; width: 100%; align-items: flex-start; justify-content: space-between; gap: 12px; > div { width: 100%; } &[data-is-side='true'] { ${o.M.mbUp} { display: flex; flex-direction: column; gap: 0px; } } } ${o.M.mbDown} { display: flex; flex-direction: column; gap: 0px; } `,bi=({info:e,className:t,style:a,onChange:l,errorMessage:o={},locale:s,onClick:c,isSide:d})=>{const{t:m}=(0,q.u)(),[p,u]=(0,n.useState)({age:!1,height:!1,weight:!1}),{getHealthToolLink:g}=(0,be.u)(s),v=(0,n.useMemo)((()=>g(de.H.OVULATION)),[g]),[b,y]=(0,n.useState)("male"),E=(e,t)=>{""!==e&&(isNaN(e)||isNaN(parseFloat(e)))||t(e)},x=t=>{var a,n;n=t=>{u((e=>Object.assign(Object.assign({},e),{age:!0})));const a=Object.assign(Object.assign({},e),{age:t});l&&l(a)},""!==(a=t)&&(isNaN(a)||isNaN(parseFloat(a))||a.includes("."))||n(a)};return(0,n.useEffect)((()=>{l&&l(Object.assign(Object.assign({},e),{objective:"lose-fat",activeLevel:"sedentary"}))}),[]),(0,n.useEffect)((()=>{u({age:!1,height:!1,weight:!1})}),[o]),n.createElement(gi,{style:a,className:t},n.createElement(hi,{"data-is-side":d},n.createElement(gt,{defaultValue:"male",onChange:e=>y(e),styles:e=>({root:!d&&{[e.fn.largerThan("sm")]:{width:"calc((100% - 24px) * 2/3 + 12px)"}},wrapper:{[e.fn.largerThan("sm")]:{gap:(0,f.h)(12)}}})})),n.createElement(vi,{"data-is-side":d},n.createElement(hi,null,n.createElement(r.c.Number,{label:n.createElement(i.T,{size:"s4",weight:"semiBold",color:h.t.colors.gray600},m("bmi.ageInput")," ",n.createElement(i.T,{size:"s4",weight:"semiBold",color:h.t.colors.gray300,as:"span"},m("bmi.ageInput.desc"))),placeholder:m("healthtool.placeholder.age"),value:Number(e.age),onChange:e=>x(String(e)),error:p.age?"":o.age,min:0})),n.createElement(hi,null,n.createElement(r.c.Number,{label:n.createElement(i.T,{size:"s4",weight:"semiBold",color:h.t.colors.gray600},m("bmi.heightInput")," ",n.createElement(i.T,{size:"s4",weight:"semiBold",color:h.t.colors.gray300,as:"span"},m("bmi.heightInput.desc"))),placeholder:m("pwg.placeholder.height"),value:Number(e.height),onChange:t=>{return a=String(t),void E(a,(t=>{u((e=>Object.assign(Object.assign({},e),{height:!0})));const a=Object.assign(Object.assign({},e),{height:t});l&&l(a)}));var a},error:p.height?"":o.height,min:0})),n.createElement(hi,null,n.createElement(r.c.Number,{label:n.createElement(i.T,{size:"s4",weight:"semiBold",color:h.t.colors.gray600},m("bmi.weightInput")," ",n.createElement(i.T,{size:"s4",weight:"semiBold",color:h.t.colors.gray300,as:"span"},m("bmi.weightInput.desc"))),placeholder:m("pwg.placeholder.weight"),value:Number(e.weight),onChange:t=>{return a=String(t),u((e=>Object.assign(Object.assign({},e),{weight:!0}))),void E(a,(t=>{const a=Object.assign(Object.assign({},e),{weight:t});l&&l(a)}));var a},error:p.weight?"":o.weight,min:0,precision:1}))),n.createElement("div",{style:{display:"flex"}},n.createElement(ui,{size:"lg",fullWidth:!0,className:"bmi-btn bmi--btn-submit",dataEventCategory:"Health Tool",dataEventAction:"BMR",dataEventLabel:`https://${A.d[s]}/${v}`,onClick:()=>{c(b)}},m("bmi.submit"))))},yi=({isSide:e,locale:t,bmrContent:a,isMobile:i,info:l,inputErrorMessage:o,onFormChange:r,onSubmit:s})=>{var c,d,m;const{t:p}=(0,q.u)();return n.createElement(Tn,{"data-is-side":e},n.createElement(rn,{isSide:e,icon:n.createElement("img",{alt:"health-tool-icon",src:(null===a||void 0===a?void 0:a.featured_image)||u.C.getAssetPath("health-tools/bmr.svg"),loading:"lazy"}),heading:p("bmr.heading"),medicalReview:{link:null===(c=null===a||void 0===a?void 0:a.reviewBy)||void 0===c?void 0:c.link,reviewer:null===(d=null===a||void 0===a?void 0:a.reviewBy)||void 0===d?void 0:d.reviewer,date:null===(m=null===a||void 0===a?void 0:a.reviewBy)||void 0===m?void 0:m.date},isMobile:i}),n.createElement(he.C,null,n.createElement(Sn,{onSubmit:e=>e.preventDefault(),"data-is-side":e},n.createElement(xn,null,n.createElement(bi,{info:l,locale:t,errorMessage:o,onChange:r,onClick:s,isSide:e})))))},fi=({locale:e,onSubmit:t,isSide:a,siteType:l})=>{const{t:o}=(0,q.u)(),[s,c]=(0,n.useState)(new Date),[d,p]=(0,n.useState)(28),[u,g]=(0,n.useState)(7),v={cycle:d,periodDateStart:s,periodLength:u},b=(0,n.useMemo)((()=>"undefined"!==typeof window?window.location.href:""),[]);return n.createElement(n.Fragment,null,n.createElement(pn,{className:"input-form input-section","data-is-side":!0},"marryBaby"===l?n.createElement(cn,{label:o("dueDatePage.lastPeriod.lastPeriodLabel"),name:"date",size:"md",value:vn(s),CustomInput:n.createElement(me.D,{onChange:e=>{c(e)},placeholder:"dd/mm/yyyy",pickedDate:s,displayDateFormat:"dd/MM/yyyy",disabledDays:{before:(0,K.Z)(new Date,-45),after:new Date},customInput:e=>n.createElement(W.I,Object.assign({className:"due-date-input",name:"birthday",size:"md"},e,{value:s&&se()(s).format(de.b)}))}),actionIcon:n.createElement(m.Z,{size:32})}):n.createElement(W.I,{label:n.createElement(i.T,{size:"s4",weight:"semiBold",color:"#595959",style:{marginBottom:"9px",flex:"1"}},o("dueDatePage.lastPeriod.lastPeriodLabel")),value:vn(s),size:"md",name:"date",className:"due-date-input",CustomInput:n.createElement(me.D,{customInput:e=>n.createElement("input",Object.assign({},e,{type:"date",className:"due-date-input",value:vn(s)})),locale:e,pickedDate:s,displayDateFormat:ce.D,onChange:e=>{c(e)},disabledDays:{before:(0,K.Z)(new Date,-45),after:new Date},placeholder:"Ch\u1ecdn ng\xe0y"})})),n.createElement("div",{className:"slider-ovulation day-slider","data-theme":"marryBaby"===l?"marryBaby":"","data-is-side":a},"marryBaby"===l?n.createElement(pe.M,{type:"bodytext-3",color:h.t.mbColors.midGray},o("ovulationPage.cycleLength")):n.createElement(i.T,{size:"s4",weight:"semiBold",color:"#595959"},o("ovulationPage.cycleLength")+" ",n.createElement("span",{style:{minHeight:"36px"}},o("ovulationPage.dayUnit"))),n.createElement("div",{className:"slider-outer-wrapper"},"marryBaby"===l&&n.createElement(i.T,{size:"s3",weight:"semiBold",color:h.t.colors.gray600},d),n.createElement(ue.S,{containerStyle:{flex:1},min:21,max:45,step:1,value:d,onChange:p,labelAlwaysOn:"marryBaby"!==l,withControl:"marryBaby"!==l,label:"marryBaby"!==l?void 0:null}))),n.createElement("div",{className:"slider-ovulation day-slider","data-theme":"marryBaby"===l?"marryBaby":"","data-is-side":a},"marryBaby"===l?n.createElement(pe.M,{type:"bodytext-3",color:h.t.mbColors.midGray},o("ovulationPage.periodDuration")):n.createElement(i.T,{size:"s4",weight:"semiBold",color:"#595959"},o("ovulationPage.periodDuration")+" ",n.createElement(i.T,{size:"s4",weight:"semiBold",color:"#595959",style:{display:"inline",minHeight:"36px"}},o("ovulationPage.dayUnit"))),n.createElement("div",{className:"slider-outer-wrapper"},"marryBaby"===l&&n.createElement(i.T,{size:"s3",weight:"semiBold",color:h.t.colors.gray600},u),n.createElement(ue.S,{containerStyle:{flex:1},min:1,max:15,step:1,value:u,onChange:g,labelAlwaysOn:"marryBaby"!==l,withControl:"marryBaby"!==l,label:"marryBaby"!==l?void 0:null}))),n.createElement("div",{style:{width:"100%",display:"flex"}},n.createElement(r.B,{className:"due-date-calculate-button",size:"lg",variant:"marryBaby"===l?"secondary":"primary",dataEventCategory:"Health Tool",dataEventAction:"Ovulation",dataEventLabel:b,onClick:()=>{localStorage.setItem("ovulationInfo",JSON.stringify(v)),t&&t({startDate:s,cycle:d,periodLength:u})},role:"button"},o("dueDatePage.lastPeriod.calculate"))))};var Ei;!function(e){e[e.trackPeriod=0]="trackPeriod",e[e.conceive=1]="conceive",e[e.avoidPregnancy=2]="avoidPregnancy"}(Ei||(Ei={}));const xi=({locale:e,onSubmitOvulation:t,isSide:a,siteType:l})=>{const{t:o}=(0,q.u)(),[r,s]=(0,n.useState)(Ei.trackPeriod),c=[{label:o("ovulationPage.trackPeriod"),value:Ei.trackPeriod},{label:o("ovulationPage.conceive"),value:Ei.conceive},{label:o("ovulationPage.avoidPregnancy"),value:Ei.avoidPregnancy}];return n.createElement(Cn,null,n.createElement(dn,{className:"input-form input-section","data-is-side":!0},"marryBaby"===l?n.createElement(sn,{groupedWithLabel:o("dueDatePage.calculationMethod"),options:c,placeholder:o("dueDatePage.lastPeriod"),id:"due-date-dropdown",size:"lg",value:c[r],onChange:e=>{s(e.value)}}):n.createElement(n.Fragment,null,n.createElement(i.T,{size:"s4",weight:"semiBold",color:"#595959",style:{marginBottom:"9px",flex:"1"}},o("ovulationPage.objectives")),n.createElement(mn,{"data-is-side":a},n.createElement(ge.D,{options:c,placeholder:o("ovulationPage.trackPeriod"),id:"due-date-dropdown",size:"md",value:c[r],onChange:e=>{s(e.value)}})))),n.createElement(fi,{siteType:l,locale:e,onSubmit:({startDate:e,cycle:a,periodLength:n})=>{t&&t({method:r,periodDateStart:e,cycle:a,periodLength:n})},isSide:a}))},wi=({onSubmitOvulation:e,locale:t,ovulationPageInfo:a,expertUrl:i,isSide:l=!1,siteType:o,isMobile:r})=>{var s;const{t:c}=(0,q.u)();return n.createElement(Tn,{"data-is-side":l,"data-site":o},n.createElement(rn,{isSide:l,bannerUrl:u.C.getAssetPath("embedToolBannerPink.svg"),siteType:o,bannerColor:"marryBaby"===o&&h.t.mbColors.mint,isEmbeded:!0,color:"pink",icon:n.createElement("img",{alt:"health-tool-icon",src:(null===a||void 0===a?void 0:a.featured_image)||u.C.getAssetPath("health-tools/ovulation-icon.svg"),loading:"lazy"}),heading:c("healthTools.ovulationCalculator"),medicalReview:{link:i,reviewer:null===(s=null===a||void 0===a?void 0:a.reviewed_by)||void 0===s?void 0:s.display_name,date:null===a||void 0===a?void 0:a.reviewed_date},isMobile:r}),n.createElement(Sn,{onSubmit:e=>e.preventDefault(),className:"ovulation-cal","data-is-side":l},n.createElement(xi,{siteType:o,locale:t,onSubmitOvulation:e,isSide:l})))},Ci=({siteType:e,info:t,onChange:a,errorMessage:i={}})=>{const{t:o}=(0,q.u)(),[r,s]=(0,n.useState)({weightBefore:!1,height:!1,weight:!1}),[c,d]=(0,n.useState)(0),m=(0,n.useRef)(null);(0,n.useEffect)((()=>{var e;d(null===(e=m.current)||void 0===e?void 0:e.clientHeight)}));const p=(e,t)=>{""!==e&&(isNaN(e)||isNaN(parseFloat(e)))||t(e)},u=e=>{p(e,(e=>{s((e=>Object.assign(Object.assign({},e),{weightBefore:!0})));const n=Object.assign(Object.assign({},t),{weightBefore:e});a&&a(n)}))},g=e=>{p(e,(e=>{s((e=>Object.assign(Object.assign({},e),{height:!0})));const n=Object.assign(Object.assign({},t),{height:e});a&&a(n)}))},v=e=>{p(e,(e=>{s((e=>Object.assign(Object.assign({},e),{weight:!0})));const n=Object.assign(Object.assign({},t),{weight:e});a&&a(n)}))};return(0,n.useEffect)((()=>{a&&a(Object.assign({},t))}),[]),(0,n.useEffect)((()=>{s({weightBefore:!1,height:!1,weight:!1})}),[i]),"marryBaby"===e?n.createElement(n.Fragment,null,n.createElement("div",{className:"input-form-pwg input-section"},n.createElement(cn,{label:o("pregnancyWeightGain.heightInput"),name:"pwg-height",size:"md",value:null===t||void 0===t?void 0:t.height,CustomInput:n.createElement(W.I,{className:(null===r||void 0===r?void 0:r.height)?"":"error-input",name:"pwg-height",size:"md",placeholder:"Nh\u1eadp th\xf4ng tin",value:null===t||void 0===t?void 0:t.height,type:"number",onKeyDown:e=>["e","E","+","-"].includes(e.key)&&e.preventDefault(),onWheelCapture:e=>e.currentTarget.blur(),errorMessage:(null===r||void 0===r?void 0:r.height)?"":null===i||void 0===i?void 0:i.height,showErrorMessage:!1,onChange:g})})),n.createElement("div",{className:"input-form-pwg input-section"},n.createElement(cn,{label:o("pregnancyWeightGain.weightBeforeInput"),name:"pwg-weightBefore",size:"md",value:null===t||void 0===t?void 0:t.weightBefore,CustomInput:n.createElement(W.I,{className:(null===r||void 0===r?void 0:r.weightBefore)?"":"error-input",name:"pwg-weightBefore",size:"md",placeholder:"Nh\u1eadp th\xf4ng tin",value:null===t||void 0===t?void 0:t.weightBefore,type:"number",onKeyDown:e=>["e","E","+","-"].includes(e.key)&&e.preventDefault(),onWheelCapture:e=>e.currentTarget.blur(),errorMessage:(null===r||void 0===r?void 0:r.weightBefore)?"":null===i||void 0===i?void 0:i.height,showErrorMessage:!1,onChange:u})})),n.createElement("div",{className:"input-form-pwg input-section"},n.createElement(cn,{label:o("pregnancyWeightGain.weightInput"),name:"pwg-weight",size:"md",value:null===t||void 0===t?void 0:t.weight,CustomInput:n.createElement(W.I,{className:(null===r||void 0===r?void 0:r.weight)?"":"error-input",name:"pwg-weight",size:"md",placeholder:"Nh\u1eadp th\xf4ng tin",value:null===t||void 0===t?void 0:t.weight,type:"number",onKeyDown:e=>["e","E","+","-"].includes(e.key)&&e.preventDefault(),onWheelCapture:e=>e.currentTarget.blur(),errorMessage:(null===r||void 0===r?void 0:r.weight)?"":null===i||void 0===i?void 0:i.weight,showErrorMessage:!1,onChange:v})}))):n.createElement(n.Fragment,null,n.createElement("div",{className:"input-form-pwg"},n.createElement(l.P,{placeholder:o("pwg.placeholder.height"),className:"input-section",label:n.createElement("span",{style:{color:h.t.colors.gray600,fontWeight:"bold",marginBottom:"9px"},className:"label-text"},o("pregnancyWeightGain.heightInput")," ",n.createElement("span",{style:{color:`${h.t.colors.gray300}`}},o("bmi.heightInput.desc"))),errorMessage:r.height?"":null===i||void 0===i?void 0:i.height,size:"sm",isNumerousKeyboard:!0,name:"pwg-height",value:null===t||void 0===t?void 0:t.height,onChange:g})),n.createElement("div",{className:"input-form-pwg"},n.createElement(l.P,{placeholder:o("pwg.placeholder.weight"),className:"input-section",label:n.createElement("span",{style:{color:h.t.colors.gray600,fontWeight:"bold",marginBottom:"9px"},ref:m,className:"label-text"},o("pregnancyWeightGain.weightBeforeInput")," ",n.createElement("span",{style:{color:`${h.t.colors.gray300}`}},o("pregnancyWeightGain.weightInput.desc"))),errorMessage:r.weightBefore?"":null===i||void 0===i?void 0:i.weightBefore,size:"sm",isNumerousKeyboard:!0,name:"pwg-weightBefore",onChange:u,value:null===t||void 0===t?void 0:t.weightBefore})),n.createElement("div",{className:"input-form-pwg"},n.createElement(l.P,{placeholder:o("pwg.placeholder.weight"),className:"input-section",label:n.createElement("span",{style:{color:h.t.colors.gray600,fontWeight:"bold",marginBottom:"9px",minHeight:c},className:"label-text"},o("pregnancyWeightGain.weightInput")," ",n.createElement("span",{style:{color:`${h.t.colors.gray300}`}},o("pregnancyWeightGain.weightInput.desc"))),errorMessage:r.weight?"":null===i||void 0===i?void 0:i.weight,size:"sm",isNumerousKeyboard:!0,name:"pwg-weight",value:null===t||void 0===t?void 0:t.weight,onChange:v})))},ki=({locale:e,onClick:t,inputErrorMessage:a,pwgContent:l,onFormChange:o,info:s,isMobile:c,isSide:d=!1,siteType:m})=>{var p;const{t:g}=(0,q.u)(),[v,b]=(0,n.useState)("notwins"),[y,f]=(0,n.useState)({label:"1",value:1}),E=(0,n.useMemo)((()=>[...Array(40)].map(((e,t)=>({label:`${t+1}`,value:`${t+1}`})))),[]),{getHealthToolLink:x}=(0,be.u)(e),w=(0,n.useMemo)((()=>x(de.H.PWG)),[x]);return n.createElement(Tn,{"data-is-side":d,"data-site":m},n.createElement(rn,{siteType:m,bannerColor:"marryBaby"===m&&h.t.mbColors.mint,isEmbeded:!0,color:"pink",icon:n.createElement("img",{alt:"health-tool-icon",src:(null===l||void 0===l?void 0:l.featuredImage)||u.C.getAssetPath("health-tools/pwg-icon.svg"),loading:"lazy"}),heading:g("pregnancyWeightGain.heading"),medicalReview:{link:(0,we.f)(null===l||void 0===l?void 0:l.reviewedBy),reviewer:null===(p=null===l||void 0===l?void 0:l.reviewedBy)||void 0===p?void 0:p.display_name,date:null===l||void 0===l?void 0:l.reviewedDate},isMobile:c,isSide:d}),n.createElement(he.C,null,n.createElement(Sn,{onSubmit:e=>e.preventDefault(),className:"pwg-view-mobile","data-is-side":d},"marryBaby"!==m&&n.createElement(En,{className:"hide-asking-mobile","data-is-side":d},n.createElement(i.T,{size:"s4",weight:"semiBold",style:{display:"block",color:h.t.colors.gray600},className:"label"},g("pregnancyWeightGain.havingTwins")),n.createElement(Mn,{options:[{value:"twins",label:g("switchBtn.yes")},{value:"notwins",label:g("switchBtn.no")}],value:v,onChange:e=>b(e),className:"gender-selector",id:"twins-check",direction:"horizontal",size:"small"})),n.createElement(Cn,null,n.createElement(kn,{className:"input-section input-form-pwg","data-is-side":d},"marryBaby"===m?n.createElement(sn,{groupedWithLabel:g("pregnancyWeightGain.weekInput"),options:E,placeholder:"28 days",id:"due-date-dropdown",size:"lg",value:y,onChange:e=>f({label:e.label,value:e.value})}):n.createElement(n.Fragment,null,n.createElement(i.T,{size:"s4",weight:"semiBold",style:{display:"inline-block",marginBottom:"9px",color:h.t.colors.gray600}},g("pregnancyWeightGain.weekInput")),n.createElement(ge.D,{options:E,placeholder:String(y.label),id:"weight-gain-dropdown",size:"md",value:y,onChange:e=>f({label:e.label,value:e.value})}))),n.createElement(Ci,{siteType:m,info:s,errorMessage:a,onChange:o})),"marryBaby"!==m&&n.createElement(En,{className:"hide-asking-desk","data-is-side":d},n.createElement(i.T,{size:"s4",weight:"semiBold",style:{display:"block",color:h.t.colors.gray600},className:"label"},g("pregnancyWeightGain.havingTwins")),n.createElement(Mn,{options:[{value:"twins",label:g("switchBtn.yes")},{value:"notwins",label:g("switchBtn.no")}],value:v,onChange:e=>b(e),className:"gender-selector",id:"twins-check-mobile",direction:"horizontal",size:"small"})),"marryBaby"===m&&n.createElement(dt,{name:"twins",label:g("pregnancyWeightGain.havingTwins"),checked:"twins"===v,siteType:"marryBaby",onChange:()=>{b("twins"===v?"notwins":"twins")},value:"twins"}),n.createElement(wn,{"data-is-side":d,"data-site":m},n.createElement(r.B,{dataEventCategory:"Health Tool",dataEventAction:"Embedded Pregnancy Weight Gain",dataEventLabel:`https://${A.d["marryBaby"===m?"vi-VN_MB":e]}/${w}`,className:"due-date-calculate-button",size:"lg",variant:"marryBaby"===m?"secondary":"primary",onClick:()=>t(v,y.value),role:"button"},g("dueDatePage.lastPeriod.calculate"))))))},Ni=_.Z.div` flex: 1; `,Bi=_.Z.div` padding: 0 10px; `,Si=_.Z.div` display: flex; height: 80px; align-items: center; .calendar-month { font-size: 16px; flex: 1; text-align: center; strong { margin-left: 5px; } } ${o.M.mbDown} { height: 70px; } `,Ti=_.Z.div` display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 2px; `,Mi=(0,_.Z)(Ti)` margin-bottom: 8px; `;_.Z.div` height: 40px; width: 40px; display: flex; align-items: center; justify-content: center; `;const zi=_.Z.div` font-size: 14px; display: flex; justify-content: center; align-items: center; color: 1px solid ${h.t.colors.gray800}; font-weight: 300; `,Di=_.Z.div` width: 18px; position: relative; &::before { content: ''; position: absolute; inset: 16px 0 0 0; width: 1px; left: 50%; right: 50%; background: ${h.t.colors.neutral100}; } `,$i=_.Z.div` margin: 0 auto; `,Pi=_.Z.div` position: relative; `,Ii=Ti,Ai=_.Z.div` position: relative; display: flex; justify-content: center; align-items: center; height: 34px; ${o.M.mbUp} { height: 38px; } &[data-is-disabled='true'] { opacity: 0.3; } &[data-in-range='true']:not([data-is-from='true'][data-is-to='true']) { background-color: ${h.t.colors.gray100}; } &:before { position: absolute; top: 0; bottom: 0; right: 0; background-color: ${h.t.colors.gray100}; } &[data-is-from='true'][data-in-range='true'][data-is-to='false'] { background-color: transparent; &:before { content: ''; left: 50%; right: 0; } } &[data-is-to='true'][data-in-range='true'][data-is-from='false'], &:hover[data-in-range='true']:is([data-has-range='false'] &) { background-color: transparent; &:before { content: ''; left: 0; right: 50%; } } `,Li=_.Z.div` position: relative; font-weight: 600; ${o.M.mbDown} { width: 32px; height: 32px; } ${o.M.mbUp} { width: 36px; height: 36px; } display: flex; justify-content: center; align-items: center; cursor: pointer; [data-is-disabled='true'] & { cursor: not-allowed; } line-height: 1; color: 1px solid ${h.t.colors.gray800}; [data-is-selected='true'] &, [data-is-today='true'] &, [data-is-selected='false']:hover & { border-radius: 32px; } [data-is-selected='true'] & { background-color: ${h.t.colors.primaryBase}; color: white; } [data-is-selected='false']:hover & { background-color: ${h.t.colors.primary50}; } [data-is-today='true'][data-is-selected='false'] & { background-color: transparent; border-radius: 32px; border: 1px solid ${h.t.colors.primaryBase}; } `;const ji={"en-PH":ke.Z,"vi-VN":Be.Z,"zh-TW":Se.Z,"id-ID":Ne.Z};function Oi(e){const{value:t={from:null,to:null}}=e,[a,i]=(0,n.useState)(null),{isMobile:l}=(0,r.u)(),[o,s]=(0,n.useState)((()=>t)),[c,d]=(0,n.useState)((()=>{var e;return(0,X.Z)(null!==(e=t.from)&&void 0!==e?e:new Date)})),m=(0,n.useMemo)((()=>(0,J.Z)(c,1)),[c]);const p=Object.assign(Object.assign({},e),{goToNextMonth:function(){d((e=>(0,J.Z)(e,1)))},goToPreviousMonth:function(){d((e=>(0,ee.Z)(e,1)))},range:o,setRange:s,hoverDay:a,setHoverDay:i});return n.createElement(n.Fragment,null,n.createElement(_i,Object.assign({},p,{date:c})),!l&&n.createElement(Di,null),!l&&n.createElement(_i,Object.assign({},p,{date:m})))}function _i({date:e,range:t,setRange:a,onChange:i,goToPreviousMonth:l,goToNextMonth:o,minDate:r,maxDate:s,close:c=(()=>{}),autoClose:d=!1,hoverDay:m,setHoverDay:p}){const{locale:g}=(0,q.u)(),h=(0,n.useMemo)((()=>{var e;return null!==(e=ji[g])&&void 0!==e?e:ji["en-PH"]}),[g]),v=(0,n.useMemo)((()=>(0,Y.Z)(e,"MMMM",{locale:h})),[e,h]),b=(0,n.useMemo)((()=>h?[1,2,3,4,5,6,0].map((e=>h.localize.day(e,{width:"narrow"}))):[]),[h]);function y(e,i){if(null===e)return n.createElement(Ai,{key:`idx-${i}`,"data-empty":"true"});const l=e.getDate(),o=(0,ae.Z)(e),u=!!t.from&&(0,ne.Z)(t.from,e),g=!!t.to&&(0,ne.Z)(t.to,e),h=u||g;let v=!1;null!==m&&t.from&&(0,Q.Z)(t.from,m)&&!t.to?v=(0,ie.Z)(e,{start:t.from,end:m}):t.from&&t.to&&(v=(0,ie.Z)(e,{start:t.from,end:t.to}));let b=!1;return r&&s?b=!(0,ie.Z)(e,{start:r,end:s}):r?b=(0,Q.Z)(e,r):s&&(b=(0,le.Z)(e,s)),n.createElement(Ai,{key:l,"data-is-today":o,"data-is-past":!o&&(0,oe.Z)(e),"data-is-selected":h,"data-is-disabled":b,"data-in-range":v,"data-is-from":u,"data-is-to":g,onMouseEnter:()=>{p(e)},onMouseLeave:()=>p(null),onClick:()=>{b||a((a=>(d&&t.from&&!t.to&&c(),function(e,t){return t.from||t.to?t.from&&t.to?{from:e,to:null}:t.from?(0,Q.Z)(e,t.from)?Object.assign(Object.assign({},t),{from:e}):Object.assign(Object.assign({},t),{to:e}):t:Object.assign(Object.assign({},t),{from:e})}(e,a))))}},n.createElement(Li,{onClick:()=>{}},n.createElement("p",null,l)))}return(0,n.useEffect)((()=>{t.from&&t.to&&i(t)}),[t]),n.createElement(Ni,{className:"calendar-wrapper"},n.createElement(Si,null,n.createElement(R.B,{onClick:l,size:"md",color:"ghost",icon:n.createElement("img",{src:u.C.getAssetPath("calendarArrowLeft.svg"),loading:"lazy"})}),n.createElement("div",{className:"calendar-month"},v,n.createElement("strong",null,(0,Y.Z)(e,"yyyy"))),n.createElement(R.B,{onClick:o,size:"md",color:"ghost",icon:n.createElement("img",{src:u.C.getAssetPath("calendarArrowRight.svg"),loading:"lazy"})})),n.createElement(Bi,null,n.createElement("div",null,n.createElement(Mi,null,b.map(((e,t)=>n.createElement(zi,{key:`${e}-${t}`},e))))),n.createElement("div",null,function(){const a=e.getFullYear(),i=e.getMonth(),l=(0,te.Z)(e),o=[];for(let e=1;e<=l;e++)o.push(new Date(a,i,e));const r=o[0]?o[0].getDay():0;if(1!==r){const e=0===r?6:r-1;for(let t=0;t{p()}));const b=(0,n.useMemo)((()=>a.from&&a.to?(0,ne.Z)(a.from,a.to)?v(a.from):`${v(a.from)} - ${v(a.to)}`:""),[a.from,a.to]);return n.createElement(Zi,{className:[s,d&&"focused"].filter(Boolean).join(" "),ref:g},n.createElement("label",{htmlFor:t},n.createElement(l.P,{size:e,value:b,name:t,actionIcon:n.createElement("img",{src:u.C.getAssetPath("calendar.svg"),loading:"lazy"}),onFocus:()=>m(!0)})),d?n.createElement(Hi,{onMouseDown:e=>{e.stopPropagation()}},n.createElement(Oi,{value:a,onChange:h,minDate:i,maxDate:o,close:p,autoClose:c})):null)}var Ri="WUqzfRb",Wi="MnVGtSY",Ui="NclbhXQ";const Gi=({LinkComponent:e,page:t,isLast:a,onChangePage:i})=>{const{label:l,value:o,isDropdown:r,dropdownItems:s,dataEventCategory:c,dataEventAction:d,dataEventLabel:m}=t;return r?n.createElement(ge.D,{options:s,placeholder:"...",id:"",placeholderIcon:null,onChange:i,className:"collapsed-breadcrumb"}):n.createElement("div",{className:Ui,title:"string"!==typeof l?o:l,"data-last":a},e&&n.createElement(e,{"data-event-category":c,"data-event-action":d,"data-event-label":m,href:o||"#"},l))},Vi=({className:e,pages:t,size:a,LinkComponent:i="a",onChangePage:l,separator:o})=>{const r=(0,n.useMemo)((()=>t.map(((e,a)=>t.length>4?a>1&&a{const s=t+1===r.length;return n.createElement(n.Fragment,{key:t},n.createElement(Gi,{LinkComponent:i,page:e,isLast:s,onChangePage:l}),!s&&(e.separator||o||n.createElement("div",{className:Wi,"data-size":a})))})))},qi=_.Z.div` display: flex; gap: 20px; width: 100%; align-items: center; justify-content: center; .icon-group { display: flex; align-items: center; gap: 10px; a, svg { width: 32px; height: 32px; } .share { width: 32px; height: 32px; padding: 8px; &:hover { background-color: ${h.t.colors.neutral50}; } svg { margin: 0; width: 16px; height: 16px; } } } `,Yi=()=>n.createElement("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none"},n.createElement("path",{d:"M6.86364 10.6666H5.22727C4.86912 10.6666 4.51448 10.5977 4.18359 10.4637C3.8527 10.3296 3.55205 10.1332 3.2988 9.8856C2.78734 9.3855 2.5 8.70722 2.5 7.99998C2.5 7.29274 2.78734 6.61446 3.2988 6.11436C3.81026 5.61426 4.50396 5.33331 5.22727 5.33331H6.86364M9.78374 5.33331H11.7727C12.1309 5.33331 12.4855 5.40229 12.8164 5.5363C13.1473 5.67031 13.4479 5.86674 13.7012 6.11436C13.9545 6.36198 14.1553 6.65596 14.2924 6.97949C14.4295 7.30303 14.5 7.64979 14.5 7.99998C14.5 8.35017 14.4295 8.69693 14.2924 9.02047C14.1553 9.344 13.9545 9.63798 13.7012 9.8856C13.4479 10.1332 13.1473 10.3296 12.8164 10.4637C12.4855 10.5977 12.1309 10.6666 11.7727 10.6666H9.78374",stroke:"#595959",strokeLinecap:"round",strokeLinejoin:"round"}),n.createElement("path",{d:"M6.5 8H10.5",stroke:"#595959",strokeLinecap:"round",strokeLinejoin:"round"})),Ki=({url:e,onCopied:t,locale:a,siteType:l})=>{const{t:o}=(0,q.u)(),r=(0,Te.g)(e||"").filter((e=>!e.allowedLocales||e.allowedLocales.includes(a))),s=(0,n.useMemo)((()=>"undefined"!==typeof window?window.location.href:""),[]);return n.createElement(qi,null,n.createElement(i.T,{size:"p3",color:h.t.colors.gray800},o("shareContainer.title")),n.createElement("div",{className:"icon-group"},r.map(((e,t)=>n.createElement("a",{key:t,href:e.href,target:"_blank",rel:"noreferrer","data-event-category":"Health Tool","data-event-action":`Social Share - ${e.name}`,"data-event-label":s},e.icon))),n.createElement(R.B,{theme:l,size:"sm",type:"button",color:"tertiary",className:"share",style:{},icon:n.createElement(Yi,null),onClick:()=>(0,c.a)(void 0,void 0,void 0,(function*(){var a;yield null===(a=null===navigator||void 0===navigator?void 0:navigator.clipboard)||void 0===a?void 0:a.writeText(e),null===t||void 0===t||t()})),"data-event-category":"Health Tool","data-event-action":"Copy Link","data-event-label":s})))},Qi=(0,_.Z)(Ee.D)` padding-bottom: 24px; .share-container { display: flex; flex-direction: column; gap: 24px; } .icon-group { margin-top: 12px; display: flex; gap: 16px; img { border-radius: 8px; } } .input-group { margin-top: 8px; display: flex; gap: 8px; button { padding: 10px; &:hover { background-color: ${h.t.colors.neutral50}; } } svg { margin: 0; } a, svg:not(.copy) { width: 32px; height: 32px; } } `,Xi=()=>n.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:"copy"},n.createElement("path",{d:"M4 2.5C3.17125 2.5 2.5 3.17125 2.5 4V13.75C2.5 14.164 2.836 14.5 3.25 14.5C3.664 14.5 4 14.164 4 13.75V4H13.75C14.164 4 14.5 3.664 14.5 3.25C14.5 2.836 14.164 2.5 13.75 2.5H4ZM7 5.5C6.17125 5.5 5.5 6.17125 5.5 7V16C5.5 16.8287 6.17125 17.5 7 17.5H16C16.8287 17.5 17.5 16.8287 17.5 16V7C17.5 6.17125 16.8287 5.5 16 5.5H7ZM7 7H16V16H7V7Z",fill:"#595959"})),Ji=e=>{var{open:t,title:a,onClose:l,onCopied:o,onShared:r,url:s,locale:d}=e,m=(0,c._)(e,["open","title","onClose","onCopied","onShared","url","locale"]);const{t:p}=(0,q.u)(),u=(0,n.useCallback)((()=>(0,c.a)(void 0,void 0,void 0,(function*(){var e;yield null===(e=null===navigator||void 0===navigator?void 0:navigator.clipboard)||void 0===e?void 0:e.writeText(s),null===o||void 0===o||o()}))),[s,o]),g=(0,Te.g)(s||"").filter((e=>!e.allowedLocales||e.allowedLocales.includes(d)));return(0,n.useEffect)((()=>{t&&navigator.share&&navigator.share({title:null!==a&&void 0!==a?a:"Read This Post",url:s}).then((()=>{null===r||void 0===r||r()})).catch((()=>{null===l||void 0===l||l()}))}),[s,a,r,t]),"undefined"!==typeof navigator&&navigator.share?null:n.createElement(Qi,Object.assign({title:p("share.title"),onClose:l,open:t,placement:"bottom"},m),n.createElement("div",{className:"share-container"},n.createElement("div",{className:"icon-container"},n.createElement(i.T,{weight:"semiBold",size:"s3",color:h.t.colors.gray600},p("share.title")),n.createElement("div",{className:"icon-group"},g.map(((e,t)=>n.createElement("a",{key:t,href:e.href,target:"_blank",rel:"noreferrer"},e.icon))))),n.createElement("div",{className:"link-container"},n.createElement(i.T,{weight:"semiBold",size:"s3",color:h.t.colors.gray600},p("share.copyLink")),n.createElement("div",{className:"input-group"},n.createElement(W.I,{name:"link",size:"md",value:s,isDisabled:!0}),n.createElement(R.B,{size:"md",type:"button",color:"tertiary",icon:n.createElement(Xi,null),onClick:u})))))},el=_.Z.div` position: fixed; z-index: 48; bottom: 0; left: 50%; width: fit-content; max-width: 100%; background: none; transform: translateX(-50%); .close-sticky-button { position: absolute; display: flex; width: 16px; height: 16px; align-items: center; justify-content: center; background: #bfbfbf; border-radius: 50%; color: white; cursor: pointer; font-size: 12px; line-height: 12px; transform: translate(50%, -50%); top: 0; right: 0; } opacity: 0; pointer-events: none; &[data-visible='true'] { opacity: 1; pointer-events: auto; } `,tl=_.Z.div` display: flex; justify-content: center; align-items: center; flex-direction: column; max-width: 100%; width: fit-content; height: fit-content; margin-inline: auto; /* margin: 1rem auto; */ &[data-no-wrapper='false'] { border: 1px solid ${h.t.colors.neutral50}; background: ${h.t.colors.neutral50}; } &[data-no-wrapper='true'] { line-height: 0; } &[data-header-bottom='true'] { flex-direction: column-reverse; background: none; border: none; } `,al=_.Z.div` width: 100%; padding: 0 5px 1.5px; display: flex; align-items: center; justify-content: center; gap: 5px; text-transform: capitalize; img { height: 12px; width: 12px; max-width: 12px; max-height: 12px; } &[data-header-bottom='true'] { background: ${h.t.colors.neutral50}; } span { font-size: 10px; line-height: 12px; color: ${h.t.colors.gray400}; font-weight: 400; } `,nl=_.Z.div` background-color: white; background-image: url(${u.C.getAssetPath("close-blue.svg")}); background-repeat: no-repeat; background-size: 10px; background-position: center; width: 12px; height: 12px; position: absolute; top: 1px; right: 1px; cursor: pointer; `,il={},ll=e=>{if(il[e]){window.googletag=window.googletag||{cmd:[]};const{googletag:t}=window;t.cmd.push((function(){t.destroySlots([il[e]]),delete il[e]}))}},ol=["TopBanner","MidBanner1","MidBanner2","EndBanner","Sticky"],rl=(0,n.forwardRef)((function({className:e,adUnitPath:t,size:a,divId:i,pos:l,sizeMapping:o,contentId:r,isHidden:s,hideIfHasSubot:c,isSticky:d,refreshInterval:m,customTargetings:p,style:g,adDefaultSize:h,noWrapper:b,showCloseBtn:y,onCloseAd:f,headerBottom:E,wrapperProps:x,locale:w,isMarryBaby:C},k){const N=m||(w===L.L.Vietnam&&l.some((e=>ol.includes(e)))?30:void 0),{t:B}=(0,q.u)(),S=(0,n.useRef)(null),T=(0,n.useRef)(null),M=(0,n.useRef)(N);M.current=N;const[z,D]=(0,n.useState)(!1),$=()=>{M.current&&(null!==T.current&&clearInterval(T.current),T.current=window.setInterval((()=>{window.googletag=window.googletag||{cmd:[]};const{googletag:e}=window;e.cmd.push((function(){il[i]&&e.pubads().refresh([il[i]])}))}),1e3*M.current))};if((0,n.useEffect)((()=>()=>{ll(i),T.current&&clearInterval(T.current)}),[]),(0,n.useEffect)((()=>{$()}),[N]),(0,n.useEffect)((()=>{s||(({contentId:e,adUnitPath:t,size:a,divId:n,pos:i,sizeMapping:l,hideIfHasSubot:o,customTargetings:r,onSuccess:s})=>{if(!n||!document.getElementById(n))return console.error("divId is required");ll(n),window.googletag=window.googletag||{cmd:[]};const{googletag:c}=window;c.cmd.push((function(){const d=document.querySelector('meta[name="content_id"]'),m="string"===typeof e?e:null===d||void 0===d?void 0:d.content,p=c.defineSlot(t,a,n);if(p){try{r&&Object.keys(r).forEach((e=>{e&&(null===p||void 0===p||p.setTargeting(e,r[e]))}))}catch(u){console.error(u)}il[n]=p,p.setTargeting("Pos",i),p.addService(c.pubads()),m&&p.setTargeting("Content_ID",m),l&&p.defineSizeMapping(l),o&&document.getElementById("subot--container")&&p.setTargeting("chatbot",!0),c.display(n),null===s||void 0===s||s()}}))})({contentId:r,adUnitPath:t,size:a,divId:i,pos:l,sizeMapping:o,hideIfHasSubot:c,customTargetings:p,onSuccess:$})}),[s]),z)return null;const P=n.createElement("div",{style:{position:"relative",width:"fit-content",height:"fit-content",overflow:"hidden",maxWidth:"100%",display:"flex",alignItems:"center",justifyContent:"center"}},n.createElement("div",{ref:k,id:i}),y&&n.createElement(nl,{onClick:()=>{null===f||void 0===f||f(),D(!0)}}));if(d)return P;const I=h?h[0]:a?Array.isArray(a[0])?a[0][0]:a[0]:void 0,A=h?h[1]:a?Array.isArray(a[0])?a[0][1]:a[1]:void 0;return n.createElement(v.x,Object.assign({},x,{className:e}),n.createElement(tl,{ref:S,className:e,style:g,"data-no-wrapper":!!b,"data-header-bottom":!!E},b?P:n.createElement(n.Fragment,null,n.createElement(al,{"data-header-bottom":!!E},n.createElement("img",{src:C?u.C.getAssetPath("adsIcon-mb.svg"):u.C.getAssetPath("adsIcon.svg"),alt:"",loading:"lazy"}),n.createElement("span",null,B("adBanner.title"))),n.createElement("div",{style:{minWidth:I||"100%",minHeight:A||"100%",position:"relative"}},P))))})),sl=(0,n.memo)(rl,((e,t)=>e.adUnitPath===t.adUnitPath&&e.divId===t.divId&&e.className===t.className)),cl=({className:e,adUnitPath:t,divId:a,isMobile:i,contentId:l,customTargetings:o,locale:r,isMarryBaby:s})=>{const[c,d]=(0,n.useState)(!0),[m,p]=(0,n.useState)(!1),[u,g]=(0,n.useState)(!0),h=(0,n.useRef)(null),v=(0,n.useRef)((0,Me.Z)()),b=(0,n.useRef)(null),y=(0,n.useRef)(),f=(0,n.useRef)();return(0,n.useEffect)((()=>{const e=()=>{f.current&&clearTimeout(f.current),f.current=setTimeout((()=>{var t;document.getElementById("subot--container")?d(!0):(d(!1),(null===(t=h.current)||void 0===t?void 0:t.clientHeight)?g(!1):g(!0)),e()}),4e3)};return e(),()=>{y.current&&clearTimeout(y.current),f.current&&clearTimeout(f.current)}}),[]),c||m?null:n.createElement(el,{key:i?"mobile":"desktop",ref:b,className:e,"data-visible":!u},t&&n.createElement(sl,{wrapperProps:{m:0},ref:h,adUnitPath:t,size:i?[[320,50],[320,100]]:[728,90],divId:(a||"div-gpt-ad-sticky")+(i?"-mobile":"")+l+String(v.current),pos:["Sticky"],contentId:l,hideIfHasSubot:i,customTargetings:o,adDefaultSize:i?[320,50]:[728,90],showCloseBtn:!0,onCloseAd:()=>p(!0),refreshInterval:60,locale:r,isMarryBaby:s}))},dl=[{title:"Health News & Current Affairs",description:"Covering the latest happenings in the health field, including medical breakthroughs, policies, and disease outbreaks",icon:u.C.getAssetPath("newsletter-prefer/newsletter-health.svg"),checked:!1,id:1},{title:"Educational Medical Hello Bacsi Content",description:"Covering the latest happenings in the health field, including medical breakthroughs, policies, and disease outbreaks",icon:u.C.getAssetPath("newsletter-prefer/newsletter-education.svg"),checked:!1,id:2},{title:"Hello Health Community Feed",description:"Covering the latest happenings in the health field, including medical breakthroughs, policies, and disease outbreaks",icon:u.C.getAssetPath("newsletter-prefer/newsletter-community.svg"),checked:!1,id:3}];var ml;!function(e){e.DUE_DATE="due-date-calculator",e.BMI="bmi",e.BMR="bmr",e.OVULATION="ovulation",e.IFRAME="IFRAME",e.PWG="pregnancy-weight-gain",e.THR="heart-rate",e.BABY_VACCINE="vaccination-tool",e.BABY_GROWTH="baby-growth-tracking",e.BABY_POOP="baby-poop-checking"}(ml||(ml={}));const pl={DUE_DATE:ml.DUE_DATE,BMI:ml.BMI,BMR:ml.BMR,OVULATION:ml.OVULATION,IFRAME:ml.IFRAME,PWG:ml.PWG,THR:ml.THR,BABY_VACCINE:ml.BABY_VACCINE,BABY_GROWTH:ml.BABY_GROWTH,BABY_POOP:ml.BABY_POOP},ul={[pl.DUE_DATE]:u.C.getAssetPath("health-tools/due-date-icon.svg")};var gl,hl,vl,bl;!function(e){e.Pregnant="pregnant",e.Parenting="parenting"}(gl||(gl={})),function(e){e.Option="option"}(hl||(hl={})),function(e){e.Button="button",e.Checkbox="checkbox"}(vl||(vl={})),function(e){e.ShowTool="showTool",e.ShowPremiumModal="showPremiumModal",e.ShowOptionBanner="showOptionBanner",e.Hide="hide"}(bl||(bl={}));const yl={pregnancy:gl.Pregnant,parenting:gl.Parenting},fl={[gl.Pregnant]:"pregnant",[gl.Parenting]:"parent"},El=e=>({[pl.DUE_DATE]:{heading:e("pnBanner.dueDateTool.heading"),description:e("pnBanner.dueDateTool.desc"),btnLabel:e("pnBanner.caclNow"),value:pl.DUE_DATE,dataEventAction:"Try our Due Date Calculator Click"},[pl.BABY_VACCINE]:{heading:e("pnBanner.vaccination.heading"),description:e("pnBanner.vaccination.desc"),btnLabel:e("pnBanner.caclNow"),value:pl.BABY_VACCINE,dataEventAction:"Try our Baby Vaccine Scheduler Click"},[pl.BABY_GROWTH]:{heading:"Baby Growth",description:e("pnBanner.vaccination.desc"),btnLabel:e("pnBanner.caclNow"),value:pl.BABY_GROWTH},[A.R.HPV]:{heading:e("pnBanner.hpv.heading"),description:e("pnBanner.hpv.desc"),thumbnail:{desktop:u.C.getAssetPath("newsletter/banner-option-hpv-desktop.png"),mobile:u.C.getAssetPath("newsletter/banner-option-hpv-mobile.png")},isRiskScreener:!0,btnLabel:e("pnBanner.checkNow"),value:A.R.HPV,hideDescOnMobile:!0,dataEventAction:"Keep safe from HPV virus Click"}}),xl=(0,n.createContext)({}),wl=e=>{var t=(0,c._)(e,[]);const{locale:a}=(0,q.u)(),{type:i,isMobile:l,currentUrl:o,isMarketing:s,isLoggedIn:d,setShouldAcquisitionModalOpen:m}=(0,n.useContext)(xl);return n.createElement(B.W,Object.assign({mih:{base:144,md:160},fluid:!0,p:0,sx:{borderRadius:4,cursor:"pointer"},onClick:()=>(0,c.a)(void 0,void 0,void 0,(function*(){const e=s?(0,ze.g)(a)+"/dang-ky-nhan-tin/":`${window.location.href}?source=acquisition`;d?null===m||void 0===m||m():window.location.href=`${(0,ze.a)(a)}/?returnUrl=${encodeURIComponent(e)}`})),"data-event-category":"Newsletter","data-event-action":"Banner Click","data-event-label":o,className:"pointer-event-child-none"},t),n.createElement(r.I,{src:s?u.C.getAssetPath(`newsletter/${l?"Mobile":"Desktop"}_Marketing.png`):u.C.getAssetPath(`newsletter/${l?"Mobile":"Desktop"}_${i}.png`),style:{maxWidth:"100%"},alt:"newsletter banner"}))},Cl="api/v1/categories?site={website_url}",kl="api/v1/subscription?site={website_url}",Nl="api/v1/categories?site={website_url}";var Bl=(0,w.k)((e=>({root:{},wrapper:{[e.fn.smallerThan("sm")]:{width:"70%"}},button:{[e.fn.smallerThan("sm")]:{height:"auto",minHeight:(0,f.h)(32),padding:`${(0,f.h)(6)} ${(0,f.h)(16)}`,textAlign:"center",width:"100%"}},buttonLabel:{whiteSpace:"normal"}})));const Sl=({heading:e,description:t,thumbnail:a={desktop:"",mobile:""},hideDescOnMobile:l,children:o})=>{const{isMobile:r,minHeight:s}=(0,n.useContext)(xl);return n.createElement(v.x,{sx:()=>({borderRadius:(0,f.h)(8),background:"linear-gradient(180deg, #FAFDFF 0%, #E3F2FF 100%)"})},n.createElement(v.x,{sx:e=>({minHeight:(0,f.h)(s),borderRadius:"inherit",background:`url(${r?a.mobile:a.desktop})`,backgroundPosition:"center right",backgroundRepeat:"no-repeat",backgroundSize:"contain",padding:`${(0,f.h)(24)} ${(0,f.h)(16)}`,display:"flex",flexDirection:"column",justifyContent:"center",[e.fn.largerThan("sm")]:{padding:`${(0,f.h)(22)} ${(0,f.h)(32)}`}})},n.createElement(C.K,{spacing:(0,f.h)(16)},n.createElement(C.K,{spacing:(0,f.h)(4),sx:e=>({maxWidth:"60%",[e.fn.largerThan("sm")]:{maxWidth:"70%"}})},e&&n.createElement(g.H,{tag:"h4"},e),!(l&&r)&&t&&n.createElement(i.T,{size:"p4"},t)),n.createElement(v.x,null,o))))},Tl=e=>{const{styleType:t=vl.Button,items:a=[],buttonProps:i,styles:l,submitBtnTracking:o}=e,{classes:s}=Bl(void 0,{name:"PremiumBannerWithOptions",styles:l}),{t:d,locale:m}=(0,q.u)(),{surveyType:p,articleId:u,handleClickOption:g,hasPremiumBanner:h,source:b,isMobile:E,setShowPNModal:x}=(0,n.useContext)(xl),w=(0,n.useMemo)((()=>h?a:a.filter((e=>!Boolean(e.isPNBtn))).filter(Boolean)),[a]),{getHealthToolLink:C}=(0,be.u)(m),k=(0,De.c)({initialValues:{bannerOptions:[]}}),N=e=>(0,c.a)(void 0,void 0,void 0,(function*(){return yield(0,de.d)((0,de.g)(de.P.HEALTH_TOOL.CREATE,{_locale:m,type:fl[p]}),"POST",{headers:{"Content-Type":"application/json"},data:{value:e,article:u,source:b}})})),B=(0,n.useCallback)((()=>n.createElement(y.k,{gap:(0,f.h)(8),className:s.wrapper},w.map(((e,t)=>n.createElement(v.x,{key:String(t),component:e.isLink?"a":"div",href:e.isRiskScreener?`https://${A.d[m]}/bot/${A.a[m][e.activeTool]}/`:e.isLink?C(e.activeTool):void 0},n.createElement(r.B,Object.assign({className:s.button,classNames:{label:s.buttonLabel},size:"sm"},e.tracking,i,{onClick:()=>{e.isLink||(e.isPNBtn&&x(!0),N(e.value),g(e.value))}}),e.label)))))),[w,k]),S=(0,n.useCallback)((()=>n.createElement(y.k,null,n.createElement(y.k,{align:"center",gap:(0,f.h)(24),sx:e=>({background:"white",borderRadius:(0,f.h)(8),padding:(0,f.h)(4),[e.fn.largerThan("sm")]:{paddingLeft:(0,f.h)(16)}})},n.createElement(r.d.Group,Object.assign({},k.getInputProps("bannerOptions",{type:"checkbox"})),n.createElement(y.k,{gap:(0,f.h)(16)},w.map(((e,t)=>n.createElement(r.d,{key:String(t),value:e.value,label:e.label,styles:{label:{cursor:"pointer"}}}))))),n.createElement(r.B,Object.assign({size:"sm"},o,i,{disabled:0===k.getInputProps("bannerOptions").value.length,leftIcon:E?n.createElement(Pe.I.ArrowRightTail,{size:18,useCurrentColor:!0}):void 0,onClick:()=>{const e=k.getInputProps("bannerOptions").value;N(e.join("|")),g(e.join("|"))},styles:e=>({root:{[e.fn.smallerThan("sm")]:{width:(0,f.h)(38),minWidth:"auto",padding:0}}})}),!E&&d("pnBanner.submit"))))),[w,k]);return n.createElement(Sl,Object.assign({},e),t===vl.Button?B():t===vl.Checkbox?S():null)},Ml=e=>{var t,a;const{t:l}=(0,q.u)(),{heading:o,description:s,thumbnail:c,btnLabel:d,value:m,isRiskScreener:p,hideDescOnMobile:u,dataEventAction:h}=e,{locale:v}=(0,q.u)(),{isMobile:b}=(0,n.useContext)(xl),{getHealthToolLink:E,allTools:x}=(0,be.u)(v),w=p?"mainBanner":"toolBanner",k=(0,n.useMemo)((()=>{const e=p?`https://${V.i?"":"discover."}${A.d[v]}/bot/${A.a[v][m]}`:E(m);return n.createElement("a",{href:e},n.createElement(r.B,{size:"sm","data-event-category":"Focused Audience","data-event-action":h,"data-event-label":e},d||l("pnBanner.caclNow")))}),[x]);return"mainBanner"===w?n.createElement(Sl,Object.assign({},Object.assign(Object.assign({},e),{thumbnail:e.thumbnail})),k):n.createElement(y.k,{gap:(0,f.h)(7),align:"center",justify:"space-between",sx:e=>({borderRadius:(0,f.h)(8),background:e.colors.blue[0],minHeight:(0,f.h)(180),padding:`${(0,f.h)(24)} ${(0,f.h)(16)}`,[e.fn.largerThan("sm")]:{padding:`${(0,f.h)(34)} ${(0,f.h)(32)}`}})},n.createElement(C.K,{spacing:(0,f.h)(12)},n.createElement(C.K,{spacing:(0,f.h)(4)},o&&n.createElement(g.H,{tag:"h4"},o),!(b&&u)&&s&&n.createElement(i.T,{size:"p4"},s)),n.createElement(y.k,{gap:(0,f.h)(8),sx:{button:{minWidth:(0,f.h)(120)}}},k)),n.createElement(y.k,{align:"center",justify:"center",sx:e=>({width:(0,f.h)(96),height:(0,f.h)(96),borderRadius:"50%",background:"white",flexShrink:0,[e.fn.largerThan("sm")]:{width:(0,f.h)(112),height:(0,f.h)(112)},img:{maxWidth:(0,f.h)(64),[e.fn.largerThan("sm")]:{maxWidth:(0,f.h)(73)}}})},n.createElement("img",{alt:"health-tool-icon",src:c||(null===(a=null===(t=x.filter((e=>e.template===m)))||void 0===t?void 0:t[0])||void 0===a?void 0:a.icon)||ul[m]||"",loading:"lazy"})))},zl=()=>{var e,t,a;const{t:i}=(0,q.u)(),{state:l,Outside:o}=(0,n.useContext)(xl);return(null===l||void 0===l?void 0:l.action)===bl.ShowTool?n.createElement(o,null,El(i)[null===(e=null===l||void 0===l?void 0:l.props)||void 0===e?void 0:e.value]?n.createElement(Ml,Object.assign({},El(i)[null===(t=null===l||void 0===l?void 0:l.props)||void 0===t?void 0:t.value],{value:null===(a=null===l||void 0===l?void 0:l.props)||void 0===a?void 0:a.value})):null):(null===l||void 0===l?void 0:l.action)===bl.ShowOptionBanner?n.createElement(o,null,n.createElement(Tl,Object.assign({},null===l||void 0===l?void 0:l.props))):null},Dl=e=>{var{isMobile:t,children:a,desktopBanner:i=u.C.getAssetPath("friso/onboarding-banner.jpg"),mobileBanner:l=u.C.getAssetPath("friso/onboarding-banner-mobile.jpg"),modalRatio:o={width:937,height:536},mobileBannerRatio:s={width:750,height:480},desktopBannerRatio:d={width:420,height:536},closeProps:m}=e,p=(0,c._)(e,["isMobile","children","desktopBanner","mobileBanner","modalRatio","mobileBannerRatio","desktopBannerRatio","closeProps"]);const{width:g,height:h}=(0,j.n)(),b=(h<=667?190:265)+g*s.height/s.width+74,[y,E]=(0,n.useState)(!1);return n.createElement(Le.M,Object.assign({styles:e=>({content:{flex:"auto",background:"transparent",[e.fn.smallerThan("sm")]:{maxHeight:"100%",height:"100%",position:"relative",borderRadius:0},[e.fn.largerThan("sm")]:{maxWidth:(0,f.h)(o.width),width:"100%",height:"100%",maxHeight:(0,f.h)(o.height),boxShadow:"none"}},body:{padding:0,width:"100%",height:"100%",[e.fn.largerThan("sm")]:{display:"flex",alignItems:"center"}},inner:{padding:0,[e.fn.smallerThan("sm")]:{display:"flex",alignItems:"flex-end"}}})},p),t?n.createElement(v.x,{sx:{position:"relative",width:"100%",height:"100%"},onTouchStart:()=>E(!0)},n.createElement(v.x,{className:"mobile-template",sx:{position:"absolute",height:100*(y?1:b/h)+"%",left:0,bottom:0,right:0,transition:"height 0.4s ease"}},n.createElement(v.x,{className:"mobile-template-wrapper",sx:{height:"100%",backgroundColor:"white",borderTopLeftRadius:y?0:(0,f.h)(12),borderTopRightRadius:y?0:(0,f.h)(12)}},n.createElement(v.x,{sx:{height:"100%",background:`url(${l})`,backgroundSize:"contain",backgroundRepeat:"no-repeat",backgroundPosition:"top center",overflowY:"auto",borderRadius:"inherit"}},n.createElement(r.B,Object.assign({variant:"white",leftIcon:n.createElement(Ie.Z,null),sx:{position:"absolute",right:0,top:0,zIndex:1,padding:(0,f.h)(10)}},m,{onClick:()=>null===p||void 0===p?void 0:p.onClose()})),n.createElement(S.o,{ratio:(null===s||void 0===s?void 0:s.width)/(null===s||void 0===s?void 0:s.height),w:"100%"}),n.createElement(v.x,{className:"inner",sx:{padding:`${(0,f.h)(28)} ${(0,f.h)(16)} ${(0,f.h)(16)}`,background:"white"}},a))))):n.createElement(S.o,{className:"desktop-template",ratio:o.width/o.height,w:"100%",sx:{position:"relative","& > div":{justifyContent:"flex-end"}}},n.createElement(v.x,{sx:{width:"100%",height:"100%",justifyContent:"flex-end",alignItems:"stretch",borderRadius:(0,f.h)(8),background:"white",boxShadow:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 2.25rem 1.75rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 1.0625rem 1.0625rem -0.4375rem"}},n.createElement("img",{alt:"",src:i,loading:"lazy",style:{borderTopLeftRadius:(0,f.h)(8),borderBottomLeftRadius:(0,f.h)(8),height:"100%",display:"block"}}),n.createElement(v.x,{sx:{position:"relative",height:"100%",width:(o.width-d.width)/o.width*100+"%"}},n.createElement(r.B,Object.assign({variant:"white",leftIcon:n.createElement(Ie.Z,null)},m,{onClick:()=>null===p||void 0===p?void 0:p.onClose(),sx:{position:"absolute",right:0,top:0,backgroundColor:"transparent"}})),n.createElement(v.x,{className:"side-banner-modal-container",sx:{height:"100%",padding:`${(0,f.h)(40)} ${(0,f.h)(24)} 0`}},a)))))},$l="user/subscription",Pl=(0,n.createContext)({}),Il=e=>{var{value:t,name:a}=e,i=(0,c._)(e,["value","name"]);return n.createElement(r.e,Object.assign({value:t,withIcon:!0},i,{buttonProps:{styles:()=>({leftIcon:{marginRight:(0,f.h)(6)},root:{paddingLeft:(0,f.h)(10),paddingRight:(0,f.h)(10)}})}}),a)},Al=({topicsGroup:e,onTopicChange:t,isBlock:a=!1,selectedTopics:l=[],inputProps:o,labelProps:r,maxSelect:s=5,hasScroll:c,readonly:d})=>{const{action:{pushNotifications:m}}=(0,n.useContext)(de.T),p=_e()(e.map((e=>e.topics||[]))),{t:u}=(0,q.u)(),[g,h]=(0,n.useState)([]);(0,n.useEffect)((()=>{h(l)}),[l.length]),(0,n.useEffect)((()=>{null===t||void 0===t||t(g)}),[g]);const b=e=>{e.length>5?m({type:"danger",title:u("pnTopicSection.maxSelectError.title",{maxSelect:s}),message:u("pnTopicSection.maxSelectError.desc")}):!d&&h((()=>p.filter((t=>e.some((e=>t.catId===e))))))};return n.createElement(C.K,{spacing:12},e.map(((e,t)=>n.createElement(C.K,{key:String(t),spacing:12},e.label&&n.createElement(i.T,Object.assign({size:"s5",color:"gray.4",weight:"semiBold"},r),e.label),c?n.createElement(T.x,{w:"100%",offsetScrollbars:!0,scrollbarSize:4,p:16,m:-16,styles:{viewport:{margin:-16,padding:16}}},n.createElement(v.x,{w:800},n.createElement(M.A.Group,Object.assign({value:g.map((e=>e.catId)),multiple:!0},o,{onChange:b}),n.createElement(y.k,{gap:8,wrap:"wrap"},e.topics.map((t=>n.createElement(Il,Object.assign({key:t.catId,value:t.catId,name:t.localName,isBlock:a},e.tracking)))))))):n.createElement(M.A.Group,Object.assign({value:g.map((e=>e.catId)),multiple:!0},o,{onChange:b}),n.createElement(y.k,{gap:8,wrap:"wrap"},e.topics.map((t=>t.catId?n.createElement(Il,Object.assign({key:t.catId,value:t.catId,name:t.localName,isBlock:a},e.tracking)):n.isValidElement(t.component)?t.component:null))))))))},Ll=e=>{var{heading:t,children:a,stickyActions:i}=e,l=(0,c._)(e,["heading","children","stickyActions"]);const{isMobile:o}=(0,n.useContext)(Pl),r=n.createElement(C.K,{spacing:(0,f.h)(24),sx:{height:"100%"}},n.createElement(g.H,{tag:"h4",style:{textAlign:"center"}},t),n.createElement(v.x,null,a));return n.createElement(v.x,{sx:e=>({[e.fn.largerThan("sm")]:{position:"relative",height:"100%"}})},o?r:n.createElement(T.x,Object.assign({className:"layout-body",h:i?"calc(100% - 90px)":"100%"},l),r),i&&n.createElement(y.k,{gap:(0,f.h)(8),sx:e=>({position:"absolute",left:0,right:0,bottom:0,padding:(0,f.h)(16),button:{flexGrow:1},justifyContent:"center",[e.fn.largerThan("sm")]:{padding:`${(0,f.h)(24)} 0`}})},i))},jl=()=>{const{t:e,locale:t}=(0,q.u)(),{data:{userInfo:a},action:{pushNotifications:l}}=(0,n.useContext)(de.T),o=null===a||void 0===a?void 0:a.id,{currentUrl:s,isMobile:d,pnSuggestCategory:m=[],nextStep:p,formValues:u,setFormValues:g,onSubmit:h,submitLoading:v,selectCategory:b,setCategoryLibs:y,setSelectCategory:E,maxSelectCategory:x}=(0,n.useContext)(Pl),w=m.map((e=>e.catId)),k=(0,De.c)({validate:{name:(0,$e.U)(e("healthToolPNModal.mainForm.requireName"))},initialValues:Object.assign(Object.assign({},u),{fitnessTopics:w})}),[N,B]=(0,n.useState)([]),[S,T]=(0,n.useState)([]);(0,n.useEffect)((()=>{(0,c.a)(void 0,void 0,void 0,(function*(){var e;try{const a=yield(0,de.d)((0,de.e)(Nl,{_locale:t}),"get"),n=((null===(e=null===a||void 0===a?void 0:a.data)||void 0===e?void 0:e.subscription)||[]).filter((e=>!w.includes(e.catId)));B(m),T(n),y([...m,...n])}catch(a){console.log(a)}}))}),[]),(0,n.useEffect)((()=>{o&&k.setFieldValue("name",(null===a||void 0===a?void 0:a.name)||"")}),[o]);const M=()=>{""!==k.getInputProps("name").value?(g(k.getTransformedValues()),p()):k.validateField("name")},z=(0,n.useMemo)((()=>n.createElement(r.B,{variant:"tertiary",dataEventCategory:"Newsletter",dataEventAction:"More Category Click",dataEventLabel:s,leftIcon:n.createElement(Ae.Z,{size:16,color:"currentColor"}),onClick:M,styles:e=>({root:{borderRadius:(0,f.h)(6),padding:"2px 15px",height:(0,f.h)(40)},label:{fontSize:(0,f.h)(14),fontWeight:400,[e.fn.smallerThan("sm")]:{fontSize:(0,f.h)(12),lineHeight:(0,f.h)(16),height:(0,f.h)(40)}},leftIcon:{marginRight:"5px"}})},n.createElement(i.T,{size:d?"p3":"p4"},e("home.seeMore")))),[k]);return(0,n.useEffect)((()=>{k.setFieldValue("fitnessTopics",b.map((e=>e.catId)))}),[b]),n.createElement("form",{style:{height:"100%"},onSubmit:k.onSubmit((t=>{if(0===b.length)return l({type:"danger",title:e("newsletter.error.minTitle"),message:e("newsletter.error.minCotennt")}),!1;g(t),null===h||void 0===h||h(t.name)}))},n.createElement(Ll,{heading:e("healthToolPNModal.heading"),stickyActions:n.createElement(n.Fragment,null,n.createElement(r.B,{fullWidth:!0,type:"submit",dataEventCategory:"Newsletter",dataEventAction:"Register Click",dataEventLabel:s,loading:v,sx:{maxWidth:(0,f.h)(240)}},e("healthToolPNModal.register")))},n.createElement(C.K,{spacing:(0,f.h)(16)},n.createElement(r.c,Object.assign({label:e("newsletter.welcome.description")},k.getInputProps("name"))),n.createElement(Al,{topicsGroup:[...0===m.length&&0===S.length?[{topics:[{component:z}]}]:[],...m.length>0?[{label:e("healthToolPNModal.mainForm.tailorTopicsHeading"),topics:[...m,...0===S.length?[{component:z}]:[]]}]:[],...S.length>0?[{label:e("healthToolPNModal.findMore.chooseFav"),topics:[...S,...S.length>0?[{component:z}]:[]]}]:[]],selectedTopics:[...N],labelProps:{size:d?"p3":"p4",color:"gray.6"},onTopicChange:E,maxSelect:x}))))},Ol=(0,n.forwardRef)((function(e,t){var{label:a}=e,l=(0,c._)(e,["label"]);return n.createElement("div",Object.assign({ref:t},l),n.createElement(x.Z,{noWrap:!0},n.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none"},n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.97887 8.15493C2.97887 5.29627 5.29627 2.97887 8.15493 2.97887C11.0136 2.97887 13.331 5.29627 13.331 8.15493C13.331 11.0136 11.0136 13.331 8.15493 13.331C5.29627 13.331 2.97887 11.0136 2.97887 8.15493ZM8.15493 1.5C4.47951 1.5 1.5 4.47951 1.5 8.15493C1.5 11.8303 4.47951 14.8099 8.15493 14.8099C9.72615 14.8099 11.1702 14.2653 12.3086 13.3547L15.2376 16.2837C15.5264 16.5725 15.9946 16.5725 16.2833 16.2837C16.5721 15.9949 16.5721 15.5267 16.2833 15.238L13.3544 12.3091C14.2652 11.1705 14.8099 9.72634 14.8099 8.15493C14.8099 4.47951 11.8303 1.5 8.15493 1.5Z",fill:"#8C8C8C"})),n.createElement(i.T,{size:"p3"},a)))})),_l=(0,n.forwardRef)((function(e,t){var{label:a}=e,l=(0,c._)(e,["label"]);return n.createElement("div",Object.assign({ref:t},l),n.createElement(i.T,{size:"p3"},a))})),Zl=({history:e,onDelete:t})=>n.createElement(y.k,{wrap:"wrap",gap:8},He()(e,"catId").map((e=>n.createElement(z.C,{key:e.catId,rightSection:n.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",onClick:()=>null===t||void 0===t?void 0:t(e)},n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.5 9C1.5 4.8525 4.8525 1.5 9 1.5C13.1475 1.5 16.5 4.8525 16.5 9C16.5 13.1475 13.1475 16.5 9 16.5C4.8525 16.5 1.5 13.1475 1.5 9ZM11.1677 12.2248C11.4602 12.5173 11.9327 12.5173 12.2252 12.2248C12.5101 11.9323 12.5101 11.4523 12.2252 11.1673L10.0577 8.99979L12.2252 6.83229C12.5177 6.53979 12.5177 6.0673 12.2252 5.7748C11.9327 5.4823 11.4602 5.4823 11.1677 5.7748L9.00015 7.9423L6.83265 5.7748C6.54015 5.4823 6.06765 5.4823 5.77515 5.7748C5.63471 5.91492 5.55579 6.10516 5.55579 6.30354C5.55579 6.50193 5.63471 6.69217 5.77515 6.83229L7.94265 8.99979L5.77515 11.1673C5.63471 11.3074 5.55579 11.4977 5.55579 11.696C5.55579 11.8944 5.63471 12.0847 5.77515 12.2248C6.06765 12.5173 6.54015 12.5173 6.83265 12.2248L9.00015 10.0573L11.1677 12.2248Z",fill:"#8C8C8C"})),styles:{root:{height:32,background:"#ffffff",padding:"5px 12px",border:`1px solid ${r.t.neutral[4]}`,borderRadius:32,textTransform:"unset"},rightSection:{height:18,cursor:"pointer"}}},n.createElement(i.T,{size:"p4"},e.localName))))),Hl=({topics:e,onTopicChange:t,isBlock:a=!1,selectedTopics:l,labelProps:o,maxSelect:r=5})=>{const{action:{pushNotifications:s}}=(0,n.useContext)(de.T),[c,d]=(0,n.useState)([]),{t:m}=(0,q.u)();(0,n.useEffect)((()=>{d(l)}),[l.length]),(0,n.useEffect)((()=>{t(c)}),[c]);return e&&0!==e.length?n.createElement(C.K,{spacing:12,px:16,mx:-16},n.createElement(i.T,Object.assign({size:"s5",color:"gray.4",weight:"semiBold"},o),m("pnTopicSection.recentView")),n.createElement(M.A.Group,{value:c.map((e=>e.catId)),onChange:t=>{a&&c.lengthe.filter((e=>t.some((t=>e.catId===t))))))},multiple:!0},n.createElement(y.k,{gap:8,wrap:"wrap"},e.map(((e,t)=>n.createElement(Il,{key:t,value:e.catId,name:e.localName,isBlock:a})))))):null},Fl=e=>{var{topic:t,active:a,onClick:l}=e,o=(0,c._)(e,["topic","active","onClick"]);return n.createElement(v.x,Object.assign({sx:e=>({position:"relative",cursor:"pointer",padding:2,borderRadius:8,boxShadow:"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)",minHeight:(0,f.h)(130),[e.fn.largerThan("sm")]:{minHeight:(0,f.h)(138)}}),onClick:()=>l(t,a)},o),a&&n.createElement(v.x,{id:"test",sx:{position:"absolute",top:2,right:2,width:20,height:20,zIndex:1}},n.createElement("svg",{id:"test",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.66699 9.99984C1.66699 5.39984 5.40033 1.6665 10.0003 1.6665C14.6003 1.6665 18.3337 5.39984 18.3337 9.99984C18.3337 14.5998 14.6003 18.3332 10.0003 18.3332C5.40033 18.3332 1.66699 14.5998 1.66699 9.99984ZM4.75066 10.5827L7.74232 13.5744C8.06732 13.8994 8.60066 13.8994 8.91732 13.5744L15.2423 7.2494C15.5673 6.9244 15.5673 6.3994 15.2423 6.0744C14.9173 5.7494 14.3923 5.7494 14.0673 6.0744L8.33399 11.8077L5.92566 9.40773C5.60066 9.08273 5.07566 9.08273 4.75066 9.40773C4.59461 9.56342 4.50692 9.7748 4.50692 9.99523C4.50692 10.2157 4.59461 10.427 4.75066 10.5827Z",fill:"#2D87F3"}),n.createElement("path",{d:"M7.74224 13.5772L4.75057 10.5856C4.59453 10.4299 4.50684 10.2185 4.50684 9.99808C4.50684 9.77765 4.59453 9.56627 4.75057 9.41058C5.07557 9.08558 5.60057 9.08558 5.92557 9.41058L8.33391 11.8106L14.0672 6.07725C14.3922 5.75225 14.9172 5.75225 15.2422 6.07725C15.5672 6.40225 15.5672 6.92725 15.2422 7.25225L8.91724 13.5772C8.60057 13.9022 8.06724 13.9022 7.74224 13.5772Z",fill:"white"}))),n.createElement(v.x,{sx:{borderRadius:"8px"}},n.createElement(r.b,{ratio:1.5,mb:10,sx:e=>({background:e.colors.neutral[0]})},n.createElement(v.x,null,n.createElement("img",{src:t.guid||"",alt:"cat",loading:"lazy",style:{maxHeight:"63px"}})))),n.createElement(i.T,{size:"p4",ta:"center",px:6,sx:{display:"-webkit-box","-webkit-line-clamp":"2","-webkit-box-orient":"vertical",overflow:"hidden"}},t.localName||""))},Rl=({topics:e,selectedTopics:t=[],onTopicChange:a,isBlock:l=!1,labelProps:o,pushNotifications:r,maxSelect:s=5})=>{const{t:c}=(0,q.u)(),[d,m]=(0,n.useState)([]),p=(e,t)=>{if(t)m((t=>t.filter((t=>t.catId!==e.catId))));else{if(l)return void r({type:"danger",title:c("pnTopicSection.maxSelectError.title",{maxSelect:s}),message:c("pnTopicSection.maxSelectError.desc")});m((t=>[...t,e]))}};(0,n.useEffect)((()=>{m(t)}),[t.length]),(0,n.useEffect)((()=>{a(d)}),[d]);const[u,g]=(0,n.useState)(!1),[h,b]=(0,n.useState)(0),[f,E]=(0,n.useState)(0),x=(0,n.useRef)(null),w=()=>{g(!1)};return n.createElement(C.K,{spacing:10},n.createElement(y.k,{justify:"space-between",align:"center",w:"100%"},n.createElement(i.T,Object.assign({size:"s5",color:"gray.4",weight:"semiBold",span:!0},o),c("pnTopicSection.trending"))),n.createElement(v.x,null,n.createElement(T.x,{type:"always",w:"100%",offsetScrollbars:!0,scrollbarSize:4,px:4,viewportRef:x,viewportProps:{onMouseDown:e=>{e.preventDefault(),x.current&&(g(!0),b(e.pageX-x.current.offsetLeft),E(x.current.scrollLeft))},onMouseUp:w,onMouseLeave:w,onMouseMove:e=>{if(e.preventDefault(),!u||!x.current)return;const t=2*(e.pageX-x.current.offsetLeft-h);x.current.scrollLeft=f-t}},styles:{viewport:{paddingBottom:16}}},n.createElement(v.x,{w:{base:112*e.length+8*(e.length-1)+10}},n.createElement(y.k,{gap:8},e.map(((e,t)=>n.createElement(Fl,{key:t,topic:e,onClick:p,active:d.some((t=>t.catId===e.catId)),w:{base:112}}))))))))},Wl=e=>{var{isLoggedIn:t,maxSelect:a=5,values:l=[],labelProps:o,onChange:s}=e,d=(0,c._)(e,["isLoggedIn","maxSelect","values","labelProps","onChange"]);const{action:{pushNotifications:m}}=(0,n.useContext)(de.T),[p,u]=(0,n.useState)(""),{t:g,locale:h}=(0,q.u)(),b=(0,n.useRef)(null),[y,E]=(0,n.useState)([]),[x,w]=(0,n.useState)([]),[k,N]=(0,n.useState)([]),[B,S]=(0,n.useState)([]),[T,M]=(0,n.useState)(null),[z,$]=(0,n.useState)([]);(0,n.useEffect)((()=>{(0,c.a)(void 0,void 0,void 0,(function*(){var e,t;const a=yield(0,de.d)((0,de.e)(Cl,{_locale:h}),"get"),n=(null===(e=null===a||void 0===a?void 0:a.data)||void 0===e?void 0:e.interested)||[],i=(null===(t=null===a||void 0===a?void 0:a.data)||void 0===t?void 0:t.trending)||[],o=He()([...n,...i],"catId").map((e=>Object.assign(Object.assign({},e),{value:e.catId||"",label:e.localName||""})));if($(o||[]),M((null===a||void 0===a?void 0:a.data)||null),l.length>0){const e=n.filter((e=>l.includes(e.catId))).map((e=>Object.assign(Object.assign({},e),{template:"interested"}))),t=i.filter((e=>l.includes(e.catId))).map((e=>Object.assign(Object.assign({},e),{template:"trending"})));S(e),w(t)}}))}),[t]);const P=(0,n.useMemo)((()=>He()([...y,...x,...B,...k],"catId")),[y,x,B,k]),[I,A]=(0,n.useState)(!1);(0,n.useEffect)((()=>{P.length>=a?A(!0):A(!1),null===s||void 0===s||s(P)}),[P]);return n.createElement(C.K,Object.assign({spacing:(0,f.h)(16)},d),n.createElement(C.K,{spacing:(0,f.h)(8)},n.createElement(i.T,{size:"p3"},g("pnTopicSection.maxSelectError.detail",{max:a,maxTopic:P.length})),n.createElement(D.NU,{ref:b,maxSelectedValues:3,styles:{wrapper:{overflow:"initial !important"},separator:{padding:16},separatorLabel:{fontWeight:600,fontSize:12,lineHeight:"18px",textTransform:"uppercase",color:r.t.gray[4],"&::after":{display:"none"}},searchInput:{fontSize:"inherit"},input:{paddingRight:16}},nothingFound:n.createElement(i.T,{size:"s4",color:"gray.6"},g("pnTopicSection.notFound")),itemComponent:""===p?Ol:_l,size:"lg",placeholder:g("pnTopicSection.plsEnterFavTopics"),data:z,onSearchChange:u,searchValue:p,icon:n.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.97183 10.8732C3.97183 7.0617 7.0617 3.97183 10.8732 3.97183C14.6848 3.97183 17.7746 7.0617 17.7746 10.8732C17.7746 14.6848 14.6848 17.7746 10.8732 17.7746C7.0617 17.7746 3.97183 14.6848 3.97183 10.8732ZM10.8732 2C5.97268 2 2 5.97268 2 10.8732C2 15.7738 5.97268 19.7465 10.8732 19.7465C12.9682 19.7465 14.8936 19.0205 16.4115 17.8063L20.3168 21.7116C20.7018 22.0966 21.3261 22.0966 21.7111 21.7116C22.0961 21.3266 22.0961 20.7023 21.7111 20.3173L17.8059 16.4121C19.0203 14.894 19.7465 12.9684 19.7465 10.8732C19.7465 5.97268 15.7738 2 10.8732 2Z",fill:"#595959"})),rightSection:n.createElement(n.Fragment,null),zIndex:500,searchable:!0,withinPortal:!0,onChange:e=>{return t=e,(0,c.a)(void 0,void 0,void 0,(function*(){var e;const n={trending:w,recently:N,interested:S,default:E};let i="default";if(I)m({type:"danger",title:g("pnTopicSection.maxSelectError.title",{maxSelect:a}),message:g("pnTopicSection.maxSelectError.desc")});else{const a=[{key:"trending",array:null===T||void 0===T?void 0:T.trending},{key:"recently",array:null===T||void 0===T?void 0:T.recently},{key:"interested",array:null===T||void 0===T?void 0:T.interested}].find((e=>{var a;return null===(a=e.array)||void 0===a?void 0:a.some((e=>e.catId===t[0]))}));i=(null===a||void 0===a?void 0:a.key)||"default",n[i]((e=>[...e,...z.filter((e=>t.some((t=>e.catId===t))))].map((e=>Object.assign(Object.assign({},e),{template:i}))))),null===(e=b.current)||void 0===e||e.blur()}return null}));var t},value:[]}),P&&P.length>0&&n.createElement(Zl,{history:P,onDelete:e=>{const t={trending:w,recently:N,interested:S,default:E};(t[e.template]||t.default)((t=>{const a=[...t],n=a.findIndex((t=>t.catId===e.catId));return a.splice(n,1),a}))}})),n.createElement(v.x,{sx:e=>({position:"relative",height:(0,f.h)(175),[e.fn.largerThan("sm")]:{height:(0,f.h)(190)}})},n.createElement(v.x,{sx:{position:"absolute",top:0,right:0,left:0}},n.createElement(Rl,{topics:((null===T||void 0===T?void 0:T.trending)||[]).map((e=>Object.assign(Object.assign({},e),{template:"trending"}))),selectedTopics:x,onTopicChange:w,isBlock:I,labelProps:o}))),n.createElement(Hl,{topics:((null===T||void 0===T?void 0:T.recently)||[]).map((e=>Object.assign(Object.assign({},e),{template:"recently"}))),selectedTopics:k,onTopicChange:N,isBlock:I,labelProps:o}),n.createElement(Al,{labelProps:o,topicsGroup:[{label:g("pnTopicSection.ppAlsoInterested"),topics:((null===T||void 0===T?void 0:T.interested)||[]).map((e=>Object.assign(Object.assign({},e),{template:"interested"})))}],selectedTopics:B,onTopicChange:S,isBlock:I}))},Ul=()=>{const{t:e}=(0,q.u)(),{action:{pushNotifications:t}}=(0,n.useContext)(de.T),{prevStep:a,formValues:i,submitLoading:l,onSubmit:o,selectCategory:s,maxSelectCategory:c,setSelectCategory:d,currentUrl:m,isLoggedIn:p}=(0,n.useContext)(Pl);return n.createElement(Ll,{heading:e("newsletter.topic.title"),type:"always",styles:{root:{paddingRight:(0,f.h)(25)}},stickyActions:n.createElement(n.Fragment,null,n.createElement(r.B,{fullWidth:!0,variant:"secondary",dataEventCategory:"Newsletter",dataEventAction:"Back Click",dataEventLabel:m,onClick:a},e("healthToolPNModal.back")),n.createElement(r.B,{fullWidth:!0,type:"submit",dataEventCategory:"Newsletter",dataEventAction:"Next Click",dataEventLabel:m,onClick:()=>{if(0===s.length)return t({type:"danger",title:e("newsletter.error.minTitle"),message:e("newsletter.error.minCotennt")}),!1;null===o||void 0===o||o(i.name)},loading:l},e("healthToolPNModal.next")))},n.createElement(Wl,{isLoggedIn:p,maxSelect:c,values:i.fitnessTopics,onChange:d,labelProps:{size:"s5",sx:{textTransform:"uppercase"}}}))},Gl=()=>{const{t:e}=(0,q.u)(),{close:t,selectCategory:a,onRegisterSuccess:l,currentUrl:o,finishLabelOnResult:s,disclaimerText:c}=(0,n.useContext)(Pl);return(0,n.useEffect)((()=>()=>{setTimeout((()=>{null===l||void 0===l||l()}),400)}),[]),n.createElement(Ll,{heading:e("healthToolPNModal.heading"),stickyActions:n.createElement(r.B,{fullWidth:!0,sx:{maxWidth:(0,f.h)(300)},dataEventCategory:"Newsletter",dataEventAction:"Continue Reading Click",dataEventLabel:o,onClick:()=>{t()}},s||e("healthToolPNModal.finish"))},n.createElement(C.K,null,n.createElement(y.k,{gap:(0,f.h)(8),sx:e=>({background:e.colors.green[0],border:`1px solid ${e.colors.green[1]}`,borderRadius:(0,f.h)(8),padding:(0,f.h)(8)})},n.createElement(v.x,null,n.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},n.createElement("path",{d:"M9.99984 18.3334C14.6022 18.3334 18.3332 14.6025 18.3332 10.0001C18.3332 5.39771 14.6022 1.66675 9.99984 1.66675C5.39746 1.66675 1.6665 5.39771 1.6665 10.0001C1.6665 14.6025 5.39746 18.3334 9.99984 18.3334Z",fill:"#00B16A"}),n.createElement("path",{d:"M9.58558 12.6674C9.22944 12.668 8.87668 12.5983 8.54752 12.4623C8.21835 12.3264 7.91925 12.1268 7.66732 11.8751L6.68587 10.8931C6.55607 10.7587 6.48424 10.5787 6.48587 10.3919C6.48749 10.2051 6.56243 10.0263 6.69455 9.89422C6.82667 9.7621 7.00539 9.68716 7.19222 9.68554C7.37906 9.68391 7.55906 9.75574 7.69345 9.88554L8.67491 10.8675C8.79344 10.986 8.93415 11.08 9.08902 11.1442C9.24389 11.2083 9.40987 11.2413 9.5775 11.2413C9.74513 11.2413 9.91111 11.2083 10.066 11.1442C10.2208 11.08 10.3616 10.986 10.4801 10.8675L16.7033 5.24335C16.8443 5.12184 17.0272 5.06032 17.213 5.07195C17.3987 5.08358 17.5726 5.16744 17.6973 5.30558C17.8221 5.44373 17.8878 5.6252 17.8805 5.81118C17.8731 5.99717 17.7933 6.17291 17.6581 6.30081L11.4592 11.8998C11.2128 12.1448 10.9205 12.3387 10.5989 12.4705C10.2774 12.6022 9.93304 12.6692 9.58558 12.6674Z",fill:"white"}))),n.createElement(i.T,{size:"p3"},c||e("pnModal.disclaimer"))),n.createElement(g.H,{tag:"h5"},e("healthToolPNModal.yourPre")),a.length>0&&n.createElement(Al,{topicsGroup:[{label:"",topics:a}],selectedTopics:a,readonly:!0})))},Vl=({isMobile:e,isLoggedIn:t,pnSuggestCategory:a=[],acquisitionInfo:i,currentUrl:l,opened:o,close:r,finishLabelOnResult:s,onRegisterSuccess:d,disclaimerText:m})=>{const{t:p,locale:g}=(0,q.u)(),{action:{pushNotifications:h}}=(0,n.useContext)(de.T),v=u.C.getAssetPath("premiumNewsletter/side-banner-desktop.jpg"),b=u.C.getAssetPath("premiumNewsletter/side-banner-mobile.jpg"),[y,f]=(0,n.useState)([]),[E,x]=(0,n.useState)([]),[w,C]=(0,n.useState)(0),[k,N]=(0,n.useState)({name:"",fitnessTopics:[]}),[B,S]=(0,n.useState)(!1),T=()=>C(2),M=(0,n.useCallback)((e=>(0,c.a)(void 0,void 0,void 0,(function*(){try{S(!0),yield(0,de.d)((0,de.e)(kl,{website_url:(0,de.f)(g)}),"post",{headers:{"Content-Type":"application/json"},method:"POST",data:{ga_client_id:je.Z.get(A.G),client_ip:window.clientIP||"",user_info:Object.assign(Object.assign({},i.userInfo),{name:e||k.name,type_subscription:1}),domain:A.d[g||L.L.Vietnam],category:E,perferred:i.preferredTopics.map((({id:e})=>({id:e})))}}),S(!1),yield(0,de.d)((0,de.h)($l),"post",{headers:{"Content-Type":"application/json"},method:"PUT",data:{subscription:1}}),T()}catch(t){console.log({err:t}),S(!1),h({title:p("notification.comment.somethingWrong"),message:"",type:"danger"})}}))),[k,E]);return(0,n.useEffect)((()=>{[v,b].forEach((e=>{(new Image).src=e}))}),[]),n.createElement(Pl.Provider,{value:{currentUrl:l,isMobile:e,isLoggedIn:t,opened:o,close:r,pnSuggestCategory:a,nextStep:()=>C((e=>e<3?e+1:e)),prevStep:()=>C((e=>e>0?e-1:e)),lastStep:T,categoryLibs:y,setCategoryLibs:f,selectCategory:E,setSelectCategory:x,formValues:k,setFormValues:N,maxSelectCategory:5,submitLoading:B,onSubmit:M,onRegisterSuccess:d,finishLabelOnResult:s,disclaimerText:m}},n.createElement(Dl,{isMobile:e,desktopBanner:u.C.getAssetPath("premiumNewsletter/side-banner-desktop.jpg"),mobileBanner:u.C.getAssetPath("premiumNewsletter/side-banner-mobile.jpg"),modalRatio:{width:960,height:588},desktopBannerRatio:{width:384,height:588},opened:o,onClose:r,zIndex:305,closeProps:{dataEventCategory:"Newsletter",dataEventAction:"Close Click",dataEventLabel:l}},n.createElement($.v,{active:w,onStepClick:C,styles:{root:{height:"100%"},content:{padding:0,height:"100%",width:"100%"},steps:{display:"none"}}},n.createElement($.v.Step,null,n.createElement(jl,null)),n.createElement($.v.Step,null,n.createElement(Ul,null)),n.createElement($.v.Step,null,n.createElement(Gl,null)))))},ql=()=>{const{locale:e}=(0,q.u)(),{isMobile:t,isLoggedIn:a,currentUrl:i,acquisitionInfo:l,categoryIds:o,state:r,setState:s,settings:d,submitHandler:m,subcribeHealthStatus:p,showPNModal:u,setShowPNModal:g,setIsBack:h}=(0,n.useContext)(xl),[v,b]=(0,n.useState)([]),[y,f]=(0,n.useState)(u);(0,n.useEffect)((()=>{(0,c.a)(void 0,void 0,void 0,(function*(){var t,a;const n=yield(0,de.d)((0,de.e)(Cl,{_locale:e}),"get"),i=[...(null===(t=null===n||void 0===n?void 0:n.data)||void 0===t?void 0:t.interested)||[],...(null===(a=null===n||void 0===n?void 0:n.data)||void 0===a?void 0:a.trending)||[]];b(i.filter((e=>o.includes(Number(e.catId)))))}))}),[]);const E=(0,n.useRef)([]);return(0,n.useEffect)((()=>{const e=(null===p||void 0===p?void 0:p.value)||"",t=e.split("|").filter(Boolean);let a=e;E.current.push(p),t.length>1&&(null!==E.current[0]&&h(!0),Object.keys(m).map((e=>{const n=e.split("|");if(t.length===n.length){let i=0;t.map((e=>{n.includes(String(e))&&(i+=1)})),i===t.length&&(a=e)}})));const n=t.length>0?m[a]:d;s(n)}),[p]),(0,n.useEffect)((()=>{f(u)}),[u]),(null===r||void 0===r?void 0:r.action)!==bl.Hide?n.createElement(n.Fragment,null,n.createElement(zl,Object.assign({},d.props)),n.createElement(Vl,{acquisitionInfo:l,isMobile:t,isLoggedIn:a,currentUrl:i,pnSuggestCategory:v,opened:y,close:()=>{var e;f(!1),g(!1),setTimeout((()=>{var e;(null===(e=r.actionParams)||void 0===e?void 0:e.hideBannerWhenClose)&&s({action:bl.Hide})}),400),(null===(e=r.actionParams)||void 0===e?void 0:e.hideBannerWhenClose)&&s({action:bl.Hide})},onRegisterSuccess:()=>f(!1)})):null},Yl=({type:e,articleId:t=0,categoryIds:a=[],isMarketing:i,isSurveyType:l,hasPremiumBanner:o,currentUrl:r,isMobile:s,subcribeHealthStatus:c,setShouldAcquisitionModalOpen:d,onValueChange:m,source:p="discover",Wrapper:g})=>{const{t:h}=(0,q.u)(),{data:{userInfo:b}}=(0,n.useContext)(de.T),y=Boolean(null===b||void 0===b?void 0:b.id),[E,x]=(0,n.useState)(null),[w,C]=(0,n.useState)(),[k,N]=(0,n.useState)(""),[B,S]=(0,n.useState)(!1),[T,M]=(0,n.useState)(!1),z=(0,n.useMemo)((()=>yl[e]),[]),D=((e,t)=>({[gl.Pregnant]:{action:bl.ShowOptionBanner,props:{heading:e("pnBanner.pregnancy.heading"),description:e("pnBanner.pregnancy.desc"),styleType:vl.Button,thumbnail:{desktop:u.C.getAssetPath("newsletter/banner-option-pregnancy-desktop.png"),mobile:u.C.getAssetPath("newsletter/banner-option-pregnancy-mobile.png")},buttonProps:{variant:"white",styles:e=>({minWidth:(0,f.h)(80),[e.fn.largerThan("sm")]:{minWidth:(0,f.h)(120)}})},items:[{label:e("switchBtn.yes"),value:"yes",tracking:{dataEventCategory:"Focused Audience",dataEventAction:"Are you navigating the world of pregnancy - Yes Click",dataEventLabel:t}},{label:e("switchBtn.no"),value:"no",tracking:{dataEventCategory:"Focused Audience",dataEventAction:"Are you navigating the world of pregnancy - No Click",dataEventLabel:t}}]},submitHandler:{yes:{action:bl.ShowTool,props:{value:pl.DUE_DATE}},no:{action:bl.ShowPremiumModal}}},[gl.Parenting]:{action:bl.ShowOptionBanner,props:{heading:e("pnBanner.parenting.heading"),description:e("pnBanner.parenting.desc"),thumbnail:{desktop:u.C.getAssetPath("newsletter/banner-option-parenting-desktop.png"),mobile:u.C.getAssetPath("newsletter/banner-option-parenting-mobile.png")},hideDescOnMobile:!0,styleType:vl.Checkbox,items:[{label:e("pnBanner.toddlers"),value:"todders"},{label:e("pnBanner.teenager"),value:"teenager"}],submitBtnTracking:{dataEventCategory:"Focused Audience",dataEventAction:"What is the age range of your kids Click",dataEventLabel:t}},submitHandler:{todders:{action:bl.ShowTool,props:{value:pl.BABY_VACCINE}},teenager:{action:bl.ShowOptionBanner,props:{styleType:vl.Button,heading:e("pnBanner.teenager.heading"),description:e("pnBanner.parenting.desc"),thumbnail:{desktop:u.C.getAssetPath("newsletter/banner-option-parenting-desktop.png"),mobile:u.C.getAssetPath("newsletter/banner-option-parenting-mobile.png")},buttonProps:{variant:"white"},items:[{label:e("childCard.boy"),value:"teenager.boy",tracking:{dataEventCategory:"Focused Audience",dataEventAction:"What is the gender of your kids - Boy Click",dataEventLabel:t}},{label:e("childCard.girl"),value:"teenager.girl",tracking:{dataEventCategory:"Focused Audience",dataEventAction:"What is the gender of your kids - Girl Click",dataEventLabel:t}}]}},"teenager.boy":{action:bl.ShowPremiumModal},"teenager.girl":{action:bl.ShowTool,activeTool:A.R.HPV,props:{value:A.R.HPV}},"todders|teenager":{action:bl.ShowOptionBanner,props:{styleType:vl.Button,heading:e("pnBanner.both.heading"),description:e("pnBanner.both.desc"),thumbnail:{desktop:u.C.getAssetPath("newsletter/banner-option-parenting-desktop.png"),mobile:u.C.getAssetPath("newsletter/banner-option-parenting-mobile.png")},hideDescOnMobile:!0,buttonProps:{variant:"secondary"},styles:e=>({wrapper:{[e.fn.smallerThan("sm")]:{flexDirection:"column"}},button:{background:e.colors.blue[0]}}),items:[{label:e("pnBanner.vaccine.btnLabel"),activeTool:pl.BABY_VACCINE,isLink:!0,tracking:{dataEventCategory:"Focused Audience",dataEventAction:"Experience our tools for parent - Baby Vaccine Click",dataEventLabel:t}},{label:e("pnBanner.pn.btnLabel"),value:"todders|teenager.showPN",isPNBtn:!0,tracking:{dataEventCategory:"Focused Audience",dataEventAction:"Experience our tools for parent - Premium Newsletter Click",dataEventLabel:t}}]}},"todders|teenager.showPN":{action:bl.ShowOptionBanner,props:{styleType:vl.Button,heading:e("pnBanner.both.heading"),description:e("pnBanner.both.desc"),thumbnail:{desktop:u.C.getAssetPath("newsletter/banner-option-parenting-desktop.png"),mobile:u.C.getAssetPath("newsletter/banner-option-parenting-mobile.png")},hideDescOnMobile:!0,buttonProps:{variant:"secondary"},styles:e=>({wrapper:{[e.fn.smallerThan("sm")]:{flexDirection:"column"}},button:{background:e.colors.blue[0]}}),items:[{label:e("pnBanner.vaccine.btnLabel"),activeTool:pl.BABY_VACCINE,isLink:!0,tracking:{dataEventCategory:"Focused Audience",dataEventAction:"Experience our tools for parent - Baby Vaccine Click",dataEventLabel:t}}]}}}}}))(h,r)[z],$=null===D||void 0===D?void 0:D.submitHandler,P=g||v.x,I=()=>o&&1!==(null===b||void 0===b?void 0:b.subscription)?n.createElement(wl,null):null;return(0,n.useEffect)((()=>{y&&x({userInfo:b,preferredTopics:dl,healthTopics:[]})}),[y]),n.createElement(xl.Provider,{value:{settings:D,submitHandler:$,type:e,surveyType:z,value:k,setValue:N,isMobile:s,isLoggedIn:y,isMarketing:i,hasPremiumBanner:o,currentUrl:r,acquisitionInfo:E,categoryIds:a,subcribeHealthStatus:c,articleId:t,onValueChange:m,state:w,setState:C,handleClickOption:e=>{const t=(e=>{let t="";const a=e.split("|");return 1===a.length?e:(Object.keys($).map((e=>{const n=e.split("|");if(a.length===n.length){let i=0;a.map((e=>{n.includes(String(e))&&(i+=1)})),i===a.length&&(t=e)}})),t)})(e);if(t){const a=$[t];a.action===bl.ShowPremiumModal?o?(S(!0),C(Object.assign(Object.assign({},w),{actionParams:{hideBannerWhenClose:a.action===bl.ShowPremiumModal}}))):(C({action:bl.Hide}),null===m||void 0===m||m(e)):(C(a),null===m||void 0===m||m(e))}},showPNModal:B,setShowPNModal:S,source:p,Outside:P,isBack:T,setIsBack:M,minHeight:180,setShouldAcquisitionModalOpen:d}},void 0!==c?y?l&&D?(()=>{const e=$[(null===c||void 0===c?void 0:c.value)||""];return(null===e||void 0===e?void 0:e.action)===bl.ShowPremiumModal?I():n.createElement(ql,null)})():I():o?n.createElement(wl,null):null:null)},Kl={myBooking:"booking",mySaved:"saved",myHealth:"health",myFamily:"family",myCommunity:"my-communities",eCom:"/shop/ho-so/quan-li-don-hang/"};var Ql="uJQBNNg",Xl="TfG3dM5",Jl="aMtjFNf",eo="cSz2RR-",to="GyFm00F";function ao({userInfo:e,onClickMyProfileButton:t,themeName:a="helloSites"}){const{t:i}=(0,q.u)(),l=(0,n.useMemo)((()=>{const t=(null===e||void 0===e?void 0:e.name)||(null===e||void 0===e?void 0:e.username);return t&&t.length?t[0].toUpperCase():"A"}),[null===e||void 0===e?void 0:e.username,null===e||void 0===e?void 0:e.name]);return n.createElement("div",{className:Ql,onClick:()=>{t&&t()}},n.createElement(Ke,{className:Xl,type:"rounded",size:"xl",avatarUrl:null===e||void 0===e?void 0:e.avatar,firstLetter:l,backgroundColor:"marryBaby"===a?h.t.mbColors.pink:h.t.colors.secondaryBase}),n.createElement("div",{className:Jl},n.createElement("div",{className:eo},(null===e||void 0===e?void 0:e.name)||(null===e||void 0===e?void 0:e.username)),n.createElement("div",{className:to,style:{"--bg-hellosites":`url(${u.C.getAssetPath("userProfileNav/helloSites/icon-chevronRight.svg")})`,"--bg-marrybaby":`url(${u.C.getAssetPath("userProfileNav/marryBaby/icon-arrowRight.svg")})`}},i("userProfile.nav.header.viewProfile"))))}var no="fVk18fq",io="v8TCvUb",lo="mx7T4V3";const oo={myHealth:h.t.mbColors.toneYellow,myCommunity:h.t.mbColors.toneBlue,mySaved:h.t.mbColors.toneGreen},ro={helloSites:{myBooking:()=>u.C.getAssetPath("userProfileNav/helloSites/icon-myBooking.svg"),myCommunity:()=>u.C.getAssetPath("userProfileNav/helloSites/icon-myCommunity.svg"),myFamily:()=>u.C.getAssetPath("userProfileNav/helloSites/icon-myFamily.svg"),myHealth:()=>u.C.getAssetPath("userProfileNav/helloSites/icon-myHealth.svg"),mySaved:()=>u.C.getAssetPath("userProfileNav/helloSites/icon-mySaved.svg"),eCom:()=>u.C.getAssetPath("userProfileNav/helloSites/icon-eCom.svg")},marryBaby:{mySaved:()=>u.C.getAssetPath("userProfileNav/marryBaby/icon-mySaved.svg"),myCommunity:()=>u.C.getAssetPath("userProfileNav/marryBaby/icon-myCommunity.svg"),myHealth:()=>u.C.getAssetPath("userProfileNav/marryBaby/icon-myHealth.svg")}},so=({type:e,themeName:t,className:a,onClick:i=(()=>{})})=>{const{t:l}=(0,q.u)(),o=(0,n.useMemo)((()=>{var a,n;return(null===(n=null===(a=ro[t])||void 0===a?void 0:a[e])||void 0===n?void 0:n.call(a))||""}),[e,t]),r=(0,n.useMemo)((()=>"marryBaby"!==t?"transparent":oo[e]),[e,t]);return n.createElement("div",{onClick:function(){i(e)},className:`${no} ${a}`},n.createElement("div",{className:lo,style:{backgroundColor:r,backgroundImage:`url("${o}")`}}),n.createElement("h3",{className:io},l(`userProfile.nav.card.${e}`)))};var co="gn6HmGG",mo="FCx8FEM",po="zMiRxaE",uo="lZ2Z9MQ",go="rwm-agG",ho="qMOscoq";const vo=({themeName:e,locale:t,onClickItem:a})=>{const[i,l]=(0,n.useState)(""),o=(0,n.useMemo)((()=>"marryBaby"===e?[{key:"userProfile.nav.menu.password",icon:u.C.getAssetPath("userProfileNav/marryBaby/icon-lock.svg"),link:"password"},{key:"userProfile.nav.menu.logout",icon:u.C.getAssetPath("userProfileNav/marryBaby/icon-logOut.svg"),link:"logout"}]:[{key:"userProfile.nav.menu.accountSettings",icon:u.C.getAssetPath("userProfileNav/helloSites/icon-settingsWheel.svg"),subMenu:[{key:"common.profileNavigator.newsletterSubscription",link:"subscriptions",disableLocale:["id-ID","ms-MY","km-KH","en-PH","tl-PH","th-TH","my-MM","zh-TW","hi-IN"]},{key:"userProfile.nav.menu.password",link:"password"},{key:"userProfile.nav.menu.disableAccount",link:"disable-account",disableLocale:["hi-IN"]}]},{key:"userProfile.nav.menu.help",icon:u.C.getAssetPath("userProfileNav/helloSites/icon-helpCircle.svg"),link:"help"}]),[e]);function r(e){e.subMenu?l((t=>t?"":e.key)):a&&a(e)}return n.createElement("div",{className:co},o.map((e=>n.createElement(bo,{key:e.key,item:e,openKey:i,onClickItem:r,locale:t}))))},bo=({item:e,openKey:t,onClickItem:a,locale:i})=>{var l;const{t:o}=(0,q.u)();return(null===(l=e.disableLocale)||void 0===l?void 0:l.includes(i))?null:n.createElement("div",{className:`${mo} nav-menu-item`,"data-is-open":t===e.key,key:e.key,"data-has-submenu":!!e.subMenu},n.createElement("div",{className:po,onClick:()=>a(e)},e.icon&&n.createElement("div",{className:uo,style:{backgroundImage:`url("${e.icon}")`}}),o(e.key),e.subMenu&&n.createElement("div",{className:go,style:{"--after-bg":`url(${u.C.getAssetPath("userProfileNav/helloSites/icon-chevronDown.svg")})`}})),e.subMenu&&n.createElement("div",{className:ho},e.subMenu.map((e=>n.createElement(bo,{key:e.key,item:e,openKey:t,onClickItem:a,locale:i})))))};var yo="-AZt1au",fo="IvSIfCI",Eo="eahCJov",xo="XIyViFs",wo="_4y-O0w3",Co="kO8iNgD",ko="a1d4E10",No="Tdguxxf",Bo="-mOxsaU",So="yPeDBNZ";const To={helloSites:{member:()=>u.C.getAssetPath("userProfileNav/helloSites/icon-rank-member.svg"),ambassador:()=>u.C.getAssetPath("userProfileNav/helloSites/icon-rank-ambassador.svg"),doctor:()=>u.C.getAssetPath("userProfileNav/helloSites/icon-rank-doctor.svg"),expert:()=>u.C.getAssetPath("userProfileNav/helloSites/icon-rank-expert.svg"),influencer:()=>u.C.getAssetPath("userProfileNav/helloSites/icon-rank-influencer.svg")},marryBaby:{member:()=>u.C.getAssetPath("userProfileNav/marryBaby/icon-rank-member.svg"),ambassador:()=>u.C.getAssetPath("userProfileNav/marryBaby/icon-rank-ambassador.svg"),doctor:()=>u.C.getAssetPath("userProfileNav/marryBaby/icon-rank-doctor.svg"),expert:()=>u.C.getAssetPath("userProfileNav/marryBaby/icon-rank-expert.svg"),influencer:()=>u.C.getAssetPath("userProfileNav/marryBaby/icon-rank-influencer.svg")}},Mo=({themeName:e,rank:t="member",numberOfPosts:a=0})=>{const{t:i}=(0,q.u)(),l=(0,n.useMemo)((()=>{var a,n;return(null===(n=null===(a=To[e])||void 0===a?void 0:a[t])||void 0===n?void 0:n.call(a))||""}),[t,e]);return n.createElement("div",{className:wo,"data-user-rank":t},n.createElement("div",{className:Co},n.createElement("div",{className:ko},n.createElement("div",{className:No,style:{backgroundImage:`url("${l}")`}}),n.createElement("h3",{className:Bo},i(`userProfile.userRank.${t}`)),a>0&&n.createElement("p",{className:So},a," ",i("userProfile.nav.header.count.posts")))))},zo=({SSO_URL:e,UP_BASEPATH:t="user",themeName:a="helloSites",cardUrls:i=Kl,enableCare:l,enableTogether:o,enableEcom:r,enableMySaved:s,userInfo:c,togetherApiDomain:d,userPostsNumber:m,onClickNavigationCard:p,onClickMyProfileButton:g,onClickMenuItem:h,onClickLogout:v,isUserProfileNavigatorMenuHidden:b=!1,isMyHealthEnabled:y=!1,locale:f})=>{const{t:E}=(0,q.u)(),[x,w]=(0,n.useState)(m||0),C="marryBaby"===a;(0,n.useEffect)((()=>{if(c&&"undefined"===typeof m){const e=(0,Fe.g)("hhg_user_token");e&&fetch((0,Re.n)((0,O.d)(f,C,d)),{headers:{Authorization:`Bearer ${e}`}}).then((e=>e.json())).then((e=>{var t,a,n;1===(null===e||void 0===e?void 0:e.status)&&(null===(t=null===e||void 0===e?void 0:e.data)||void 0===t?void 0:t.pagination)&&w((null===(n=null===(a=null===e||void 0===e?void 0:e.data)||void 0===a?void 0:a.pagination)||void 0===n?void 0:n.total_items)||0)})).catch((e=>console.error("Error fetching post number",e)))}}),[f,null!==c,m,d,C]);const k=(0,n.useMemo)((()=>{let e;return e=C?["myHealth","myCommunity","mySaved"]:["myHealth","mySaved","myBooking","myCommunity","eCom"],e.filter((e=>"myBooking"===e?l:"myCommunity"===e?o:"myHealth"===e?y:"eCom"===e?r:"mySaved"!==e||s))}),[C,y]),N=(0,n.useMemo)((()=>"marryBaby"===a?null:n.createElement(R.B,{color:"tertiary",icon:n.createElement("img",{src:u.C.getAssetPath("userProfileNav/helloSites/icon-logOut.svg"),width:15,height:15,loading:"lazy"}),size:"md",onClick:v,className:xo},E("userProfile.nav.menu.logout"))),[a]),B=a=>{a.startsWith("http")||a.startsWith("/")?window.location.href=(0,Re.a)(a):e&&(window.location.href=(0,Re.a)(`${e}${t}/${a}`))},S=e=>{const t=i[e];p?p(t):B(t)};return c?n.createElement("div",{className:yo,"data-theme":a},n.createElement(ao,{userInfo:c,themeName:a,onClickMyProfileButton:()=>{g?g():B("profile")}}),n.createElement(Mo,{themeName:a,rank:"member",numberOfPosts:x}),n.createElement("div",{className:fo},k.map((e=>n.createElement(so,{className:Eo,key:e,themeName:a,type:e,onClick:S})))),!b&&n.createElement(n.Fragment,null,n.createElement(vo,{themeName:a,locale:f,onClickItem:e=>{"logout"===e.link&&v?v():e.link&&!e.subMenu&&(h?h(e.link):B(e.link))}}),N)):null}}}]);