(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3414],{74888:function(e,t,n){"use strict";n.d(t,{S:function(){return l}});var r=n(42010),i=n(46784),o=n(91256),a=n(95983),l=(0,o.ZP)(r.B).withConfig({displayName:"indexstyled__StyledButton",componentId:"sc-1s0qary-0"})([".button-icon + span{margin-left:4px !important;}",""],a.fn&&(0,o.iv)(["&[data-color='primary'],&[data-color='secondary'],&[data-color='tertiary']{&:disabled{border-color:",";background-color:",";color:",";cursor:not-allowed;}}"],i.t.colors.gray300,i.t.colors.gray300,i.t.colors.white))},52969:function(e,t,n){"use strict";n.d(t,{w:function(){return s}});var r=n(85893),i=n(86896),o=n(95983),a=n(43196),l=n(61023),s=function(e){var t=e.onClick,n=(e.color,e.className),s=e.style,c=(0,i.Z)().formatMessage;return(0,r.jsx)(l.v,{label:(0,r.jsxs)(r.Fragment,{children:[o.fn&&(0,r.jsx)("img",{className:"label-sort-pin-icon",src:(0,a.k3)("/svg/marrybaby/pinOrange.svg")})," ",c({id:"label.pinnedPost"})]}),rightLabel:!o.fn&&(0,r.jsx)("img",{className:"label-sort-pin-icon",src:(0,a.k3)("/svg/icon-pin-yellow.svg")}),onClick:t,color:"white",className:"label-pinned ".concat(n),style:s})}},63593:function(e,t,n){"use strict";n.d(t,{M:function(){return p}});var r,i=n(85893),o=n(26265),a=n(15393),l=n(24169),s=n(4266),c=n(26381),u=n(5200),d=(r={},(0,o.Z)(r,u.MV.Vietnam,["pregnancy","parenting"]),(0,o.Z)(r,u.MV.Indonesia,["pregnancy","parenting"]),r),p=function(e){var t,n=e.type,r=e.categoryIds,o=e.subcribeHealthStatus,u=e.onValueChange,p=e.Wrapper,f=(0,c.h)(),h=f.locale,m=f.asPath,v=(0,s.d)();return(0,i.jsx)(a.W,{Wrapper:p,source:"together",type:n,isMobile:v,isMarketing:!1,isSurveyType:null===(t=d[h])||void 0===t?void 0:t.includes(n||""),hasPremiumBanner:!1,categoryIds:r,currentUrl:(0,l.Ow)(h,m),subcribeHealthStatus:o,onValueChange:u})}},73870:function(e,t,n){"use strict";n.d(t,{V:function(){return A}});var r=n(26265),i=n(85893),o=n(38347),a=n(48337),l=n(75529),s=n(11163),c=n(86896),u=n(24169),d=n(56632),p=n(68558),f=n(76180),h=n(95983),m=n(809),v=n.n(m),g=n(92447),b=n(67294),y=n(15393),w=n(36380),x=n.n(w),_=n(2810),O=n(76278),j=n(5886),k=n(43196),E=n(50572),I=n(91256),S=I.ZP.div.withConfig({displayName:"indexstyled__StyledAvatarReviewer",componentId:"sc-s22hst-0"})(["position:relative;img{border-radius:50%;}.avatar{object-fit:cover;}.badge{position:absolute;right:0;bottom:0;}"]);function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function T(e){for(var t=1;t p *{vertical-align:middle;}*{pointer-events:none;}}}}.articles-wrapper{margin:0 -1rem;-ms-overflow-style:none;overflow-x:auto;scrollbar-width:none;user-select:none;&::-webkit-scrollbar{display:none;}&.sliding{cursor:grabbing;> *{pointer-events:none;}}.articles-wrapper-inner{display:inline-flex;padding:0 1rem;.article-card{display:flex;width:300px;flex-direction:column;padding:1rem;border:1px solid #e4e8ec;border-radius:6px;.content{flex:1;justify-content:space-between;}}.article-card:not(:last-child){margin-right:1rem;}}}.see-all-button{width:100%;border-color:#f1f3f5;margin-top:1rem;background:#f1f3f5;color:",";*{pointer-events:none;}}",""],N.M.mbDown,(function(e){var t;return null===(t=e.theme)||void 0===t?void 0:t.colors.gray800}),h.fn?(0,I.iv)(["border:1px solid #f3f3f3;border-radius:1rem;box-shadow:0px 1px 3px rgb(0 0 0 / 8%);"]):""),D=(0,n(44036).k)((function(){return{root:{marginBottom:24}}}));function L(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Z(e){for(var t=1;t div{box-shadow:none;}}.lp--affiliate-product{.arrow-left{left:-20px;}.arrow-right{right:-16px;}}.bullet-nav{bottom:-10px;}"],(function(e){var t,n=e.theme;return(null===n||void 0===n||null===(t=n.colors)||void 0===t?void 0:t.blue50)||""})),I.ZP.div.withConfig({displayName:"subotIntentstyled__SubotInlineIntentFinalRow",componentId:"sc-vkw5h2-10"})(["display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:center;margin:-8px;"]),I.ZP.div.withConfig({displayName:"subotIntentstyled__SubotInlineIntentCol",componentId:"sc-vkw5h2-11"})(["width:",";padding:4px;","{width:100%;}"],(function(e){return e.width||"100%"}),E.M.mbDown)),A=I.ZP.div.withConfig({displayName:"subotIntentstyled__SubotInlineIntentRow",componentId:"sc-vkw5h2-12"})(["display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:center;margin:-4px;"]),R=I.ZP.div.withConfig({displayName:"subotIntentstyled__SubotInlineIntentList",componentId:"sc-vkw5h2-13"})(["margin:20px 0;"]);!function(e){e.BOT_TEXT="bot-text",e.BOT_IMAGE="bot-image",e.BOT_BUTTON="bot-button",e.BOT_URL="bot-url",e.SSO_INTENT="sso-intent"}(i||(i={}));var B=function(e){var t=e.intent;if(!t.url)return(0,a.jsx)(a.Fragment,{});var n=function(){try{return Boolean(JSON.parse((null===t||void 0===t?void 0:t.label)||""))}catch(e){return!1}}();return(0,a.jsx)(Z,{width:"50%",children:(0,a.jsxs)(D,{children:[(0,a.jsx)("img",{src:t.url,alt:t.label,className:"intent-img ".concat(t.label&&"has-label")}),n&&(0,a.jsx)("h4",{className:"intent-img-label",children:t.label})]})})},F=function(e){var t=e.intent,n=![i.SSO_INTENT].includes(null===t||void 0===t?void 0:t.type);return(0,a.jsxs)(N,{children:[(0,a.jsx)(T,{children:n&&t&&[i.BOT_TEXT,i.BOT_BUTTON].includes(null===t||void 0===t?void 0:t.type)&&(0,a.jsx)("div",{className:"title",children:t.label})}),t&&[i.BOT_IMAGE].includes(null===t||void 0===t?void 0:t.type)&&(0,a.jsx)(C,{children:(0,a.jsx)(B,{intent:t})})]})},H=(r={},(0,o.Z)(r,i.BOT_TEXT,(function(e){var t=e.intent;return null!==t&&void 0!==t&&t.label?(0,a.jsx)(Z,{children:(0,a.jsx)(M,{children:null===t||void 0===t?void 0:t.label})}):(0,a.jsx)(a.Fragment,{})})),(0,o.Z)(r,i.BOT_IMAGE,B),(0,o.Z)(r,i.BOT_BUTTON,(function(e){var t=e.intent;return null!==t&&void 0!==t&&t.label?(0,a.jsx)(Z,{width:"60%",children:(0,a.jsx)(S,{size:"lg",color:"primary",onClick:function(){window.location.href=t.url},isBlock:!0,children:null===t||void 0===t?void 0:t.label})}):(0,a.jsx)(a.Fragment,{})})),(0,o.Z)(r,i.BOT_URL,(function(e){var t=e.intent,n=(0,u.useMemo)((function(){return t.label.includes("{")?JSON.parse(t.label):{}}),[t.label]);return(0,a.jsx)(a.Fragment,{children:!!Object.keys(n).length&&(0,a.jsx)(Z,{children:(0,a.jsxs)(L,{children:[(0,a.jsx)("div",{className:"feature",children:(0,a.jsx)("a",{href:null===n||void 0===n?void 0:n.url,className:"feature-wrapper",children:(0,a.jsx)("img",{src:null===n||void 0===n?void 0:n.thumbnail,alt:null===n||void 0===n?void 0:n.title,className:"feature-img"})})}),(0,a.jsx)("div",{className:"body",children:(0,a.jsx)("a",{href:null===n||void 0===n?void 0:n.url,children:(0,a.jsx)("h5",{className:"title",children:null===n||void 0===n?void 0:n.title})})})]})})})})),(0,o.Z)(r,i.SSO_INTENT,(function(e){var t=e.intent,n=function(){try{return null!==t&&void 0!==t&&t.label?JSON.parse(null===t||void 0===t?void 0:t.label):{}}catch(e){return{}}}();return n||null!==n&&void 0!==n&&n.title?(0,a.jsx)(Z,{children:(0,a.jsxs)(P,{children:[t.url&&(0,a.jsx)("img",{src:t.url,className:"icon",alt:""}),(0,a.jsxs)("div",{className:"content",children:[(0,a.jsx)("h3",{className:"title",children:n.title}),(0,a.jsx)("div",{className:"description",children:null===n||void 0===n?void 0:n.description})]})]})}):(0,a.jsx)(a.Fragment,{})})),r);function G(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function V(e){for(var t=1;t *{text-align:center;}}.survey-thankyou-result{margin-top:1rem;}}.survey-question-text-wrapper{margin-bottom:24px;.survey-question-title{margin-bottom:4px;}}.survey-result-total-votes{margin-top:20px;color:",";}"],(function(e){var t;return null===(t=e.theme)||void 0===t?void 0:t.colors.neutral100}),(function(e){var t;return null===(t=e.theme)||void 0===t?void 0:t.colors.white}),(function(e){var t;return null===(t=e.theme)||void 0===t?void 0:t.colors.gray500})),ve=I.ZP.div.withConfig({displayName:"indexstyled__SubotActionPollChoiceResult",componentId:"sc-19e5lcv-1"})(["position:relative;z-index:0;display:flex;overflow:hidden;align-items:center;padding:16px 20px;border-radius:6px;margin-bottom:8px;.number{width:32px;margin-right:14px;font-weight:600;}.content{flex:1;}.icon{width:16px;margin-left:8px;}&:before{position:absolute;z-index:-1;top:0;right:",";bottom:0;left:0;background-color:",";content:'';transition:0.3s all linear;}&:after{position:absolute;z-index:-2;top:0;right:0;bottom:0;left:0;background-color:",";content:'';}","{padding:6px 16px;}"],(function(e){var t=e.percent;return t?"".concat(100-t,"%"):"100%"}),(function(e){var t,n,r=e.theme;return e.is_chosen?(null===r||void 0===r||null===(t=r.colors)||void 0===t?void 0:t.blue50)||"#E3F2FF":(null===r||void 0===r||null===(n=r.colors)||void 0===n?void 0:n.neutral100)||"#E4E8EC"}),(function(e){var t,n=e.theme;return(null===n||void 0===n||null===(t=n.colors)||void 0===t?void 0:t.neutral50)||"#F7F9FC"}),E.M.mbDown);var ge=function(e){var t,n,r,i=e.subotData,o=e.url,l=e.chatBotId,d=e.accountId,p=e.onScrollIntoView,f=e.resultSubot,m=e.onChangeResult,v=i.node,y=(0,g.Z)().formatMessage,w=(0,u.useContext)(h.I).pushNotifications,x=(0,u.useState)(),O=x[0],k=x[1],E=(null===(t=v.intents.find((function(e){return"thank-you-image"===e.type})))||void 0===t?void 0:t.url)||"",I=(null===(n=v.intents.find((function(e){return"thank-you-title"===e.type})))||void 0===n?void 0:n.label)||"Thank you !",S=(null===(r=v.intents.find((function(e){return"thank-you-body"===e.type})))||void 0===r?void 0:r.label)||"We appreaciate your time",P=v.actions.find((function(e){return"result-button"===e.type})),T=function(){var e=(0,c.Z)(s().mark((function e(){var t;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(P){e.next=2;break}return e.abrupt("return");case 2:if(!f){e.next=5;break}return k(f),e.abrupt("return");case 5:return e.prev=5,e.next=8,(0,b.t9)((0,b.jX)(_.SD.TOGETHER.SURVEY.CHAT_WITH_BOT),"POST",{data:{current_score:i.current_score||0,current_selected:i.current_selected||[],current_polls:i.current_polls||{},bot_id:l,cookie_id:(0,b.fj)()||"",window_id:(0,b.ZY)()||"",url:o,title_url:document.title,ga_client_id:(0,b.gP)()||"",account_id:d,mode:"inline",node_id:v.id,action_id:P.id,action_value:P.key,form_submit_meta:[],selected_actions:{}}});case 8:if(!((t=e.sent)&&t._data&&t._data.node)){e.next=14;break}return m(t._data),k(t._data),p&&p(),e.abrupt("return");case 14:throw new Error("Something went wrong");case 17:e.prev=17,e.t0=e.catch(5),w({message:y({id:"notification.comment.somethingWrong"}),type:"danger"});case 20:case"end":return e.stop()}}),e,null,[[5,17]])})));return function(){return e.apply(this,arguments)}}();if(O){var C,N=0,M=(null===(C=O.node.intents.filter((function(e){return"bot-text"===e.type}))[0])||void 0===C?void 0:C.label)||"",D=O.node.actions.filter((function(e){return"poll-choice"===e.type})),L=O.node.actions.find((function(e){return"poll-result"===e.type})),Z=y({id:"survey.totalVotes",defaultMessage:"Total votes"});if(L){var A=L.label.split(":");A&&2===A.length&&(N=parseInt(A[1]))}return(0,a.jsx)(me,{children:(0,a.jsxs)("div",{className:"survey-inner-wrapper",children:[(0,a.jsx)("div",{className:"survey-question-text-wrapper",children:(0,a.jsx)(de.H,{className:"survey-question-title",tag:"h4",children:M})}),D.map((function(e){return(0,a.jsxs)(ve,{percent:(null===e||void 0===e?void 0:e.percent)||0,is_chosen:null===e||void 0===e?void 0:e.is_chosen,children:[(0,a.jsxs)("div",{className:"number",children:[null===e||void 0===e?void 0:e.percent,"%"]}),(0,a.jsx)("div",{className:"content",children:null===e||void 0===e?void 0:e.label}),(0,a.jsx)("div",{className:"icon",children:(null===e||void 0===e?void 0:e.is_chosen)&&(0,a.jsx)(he,{viewBox:"0 0 16 16"})})]},e.id)})),L&&(0,a.jsxs)(pe.T,{size:"c1",type:"semiBold",className:"survey-result-total-votes",children:[Z,": ",N]})]})})}return(0,a.jsx)(me,{children:(0,a.jsx)("div",{className:"survey-inner-wrapper",children:(0,a.jsxs)("div",{className:"survey-thankyou-wrapper-inner",children:[E?(0,a.jsx)("img",{src:E,alt:"",className:"survey-thankyou-image"}):(0,a.jsxs)("svg",{viewBox:"0 0 122 122",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"survey-thankyou-icon",children:[(0,a.jsx)("path",{d:"M61.5 122C94.6371 122 121.5 95.1371 121.5 62C121.5 28.8629 94.6371 2 61.5 2C28.3629 2 1.5 28.8629 1.5 62C1.5 95.1371 28.3629 122 61.5 122Z",fill:"#E3F2FF"}),(0,a.jsx)("ellipse",{cx:"61.5",cy:"110.36",rx:"48",ry:"3.36",fill:"#91CAFF"}),(0,a.jsx)("path",{d:"M82.9048 72.6663H101.5L87.597 40H35.403L21.5 72.6663H40.0952V91H83.0786L82.9048 72.6663Z",fill:"#2C74DF"}),(0,a.jsx)("path",{d:"M74.4004 15.0005H39.863C36.9017 15.0005 34.5 17.4022 34.5 20.3635V72.5769C34.5 75.5383 36.9017 77.9399 39.863 77.9399H83.1357C86.097 77.9399 88.4987 75.5383 88.4987 72.5769V29.0988L88.4987 21.0005C88.4987 17.6868 85.8124 15.0005 82.4987 15.0005H74.4004Z",fill:"white"}),(0,a.jsx)("path",{d:"M88.8529 80.1077H34.1469C31.8699 80.1077 30.06 78.3036 30.06 76.0338V65.3837C30.06 63.1139 31.8699 61.3098 34.1469 61.3098H88.8529C91.1299 61.3098 92.9398 63.1139 92.9398 65.3837V76.0338C92.9398 78.3036 91.1299 80.1077 88.8529 80.1077Z",fill:"#E4E8EC"}),(0,a.jsx)("path",{d:"M90.838 85.4512H32.1618C29.8849 85.4512 28.075 83.6471 28.075 81.3774V70.7272C28.075 68.4575 29.8849 66.6533 32.1618 66.6533H90.7796C93.0566 66.6533 94.8665 68.4575 94.8665 70.7272V81.3774C94.9249 83.6471 93.0566 85.4512 90.838 85.4512Z",fill:"white"}),(0,a.jsx)("path",{d:"M103.748 75.4919V105.755C103.748 107.675 102.172 109.247 100.245 109.247H23.0031C21.0764 109.247 19.5 107.675 19.5 105.755V75.4919C19.5 73.5713 21.0764 72 23.0031 72H42.3866C44.3133 72 45.8897 73.5713 45.8897 75.4919V80.8461C45.8897 81.1952 46.1232 81.428 46.4735 81.428H76.7749C77.1253 81.428 77.3588 81.1952 77.3588 80.8461V75.4919C77.3588 73.5713 78.9352 72 80.8618 72H100.245C102.172 72 103.748 73.5713 103.748 75.4919Z",fill:"#45A4FF"}),(0,a.jsx)("path",{d:"M51.9541 91.3767V94.4612C51.9541 96.0907 53.2386 97.3711 54.8733 97.3711H67.7179C69.3526 97.3711 70.6371 96.0907 70.6371 94.4612V91.3767",stroke:"#2C74DF",strokeWidth:"3",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.jsx)("path",{d:"M120.5 38.0251C118.5 37.7793 117.25 39.3768 118.125 41.22L118.375 41.9573C119.125 43.8006 118 45.398 116 45.1523L115.25 45.0294C113.25 44.7836 112 46.3811 112.875 48.2244L113.25 48.9616C114 50.8049 112.875 52.4025 110.875 52.1567L110.125 52.0337C108.625 51.9109 107.5 52.7712 107.5 54",stroke:"#FE921D",strokeWidth:"1.9096",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.jsx)("path",{d:"M1.53299 62C1.2644 63.413 2.6745 64.337 4.35323 63.8478L5.02472 63.6304C6.70346 63.087 8.11356 64.0109 7.84496 65.4783L7.7107 66.0217C7.4421 67.4348 8.8522 68.3587 10.5309 67.8696L11.2024 67.6522C12.8812 67.1087 14.2913 68.0326 14.0227 69.5L13.8884 70.0435C13.687 71.1304 14.4256 71.8913 15.5 72",stroke:"#00B16A",strokeWidth:"2.8751",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.jsx)("path",{d:"M118 92C119.381 92 120.5 90.8807 120.5 89.5C120.5 88.1193 119.381 87 118 87C116.619 87 115.5 88.1193 115.5 89.5C115.5 90.8807 116.619 92 118 92Z",stroke:"#00B16A",strokeWidth:"2.8751",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.jsx)("path",{d:"M82.0001 3.18747L83.1875 7.53467L87.5347 6.34727L86.3473 2.00007L82.0001 3.18747Z",stroke:"#00B16A",strokeWidth:"2.1628",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.jsx)("path",{d:"M17.0001 28C18.1046 28 19 27.1045 19 25.9999C19 24.8954 18.1046 24 17.0001 24C15.8955 24 15 24.8954 15 25.9999C15 27.1045 15.8955 28 17.0001 28Z",stroke:"#FE921D",strokeWidth:"2.3278",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.jsx)("path",{d:"M61.5 26.6667C54.136 26.6667 48.1667 32.6361 48.1667 40.0001C48.1667 47.3641 54.136 53.3334 61.5 53.3334C68.864 53.3334 74.8334 47.3641 74.8334 40.0001C74.8334 32.6361 68.864 26.6667 61.5 26.6667ZM69.1094 36.9427L59.776 46.2761C59.516 46.5361 59.1747 46.6667 58.8334 46.6667C58.492 46.6667 58.1507 46.5361 57.8907 46.2761L53.8907 42.2761C53.3694 41.7547 53.3694 40.9121 53.8907 40.3907C54.412 39.8694 55.2547 39.8694 55.776 40.3907L58.8334 43.4481L67.224 35.0574C67.7454 34.5361 68.588 34.5361 69.1094 35.0574C69.6307 35.5787 69.6307 36.4214 69.1094 36.9427Z",fill:"#00CB8A"})]}),I&&(0,a.jsx)(de.H,{className:"survey-thankyou-title",tag:"h3",children:I}),S&&(0,a.jsx)(pe.T,{className:"survey-thankyou-subtitle",size:"p3",children:S}),P&&(0,a.jsx)(j.B,{className:"survey-thankyou-result",size:"md",onClick:T,children:P.label})]})})})},be=I.ZP.div.withConfig({displayName:"indexstyled__StyledCardSubot",componentId:"sc-18yx6q7-0"})([".card-subor-survey{input{line-height:1.3;}}"]);function ye(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function we(e){for(var t=1;t0)){n.next=15;break}return r={questions:N,resultSubot:R,headerText:L},i={cookie_id:(0,b.fj)(),account_id:(null===E||void 0===E?void 0:E.id)||(0,b.ld)()||oe||null,bot_id:Number(t),flow_uuid:Y,data:JSON.stringify(r),status:R?"complete":"in_progress",type:"inline_together",market:y.domainLocales[P]},n.prev=5,n.next=8,(0,b.t9)((0,b.jX)(_.SD.TOGETHER.SURVEY.POST_SUBOT_CREATE_LOG),"POST",{data:i});case 8:if(n.sent.data._data){n.next=11;break}throw new Error;case 11:n.next=15;break;case 13:n.prev=13,n.t0=n.catch(5);case 15:case"end":return n.stop()}}),n,null,[[5,13]])})))(),function(){e=!0}}),[N,H,null===E||void 0===E?void 0:E.id]),(0,u.useEffect)((function(){(0,c.Z)(s().mark((function e(){var n,r,i,o,a;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,b.t9)((0,b.jX)(_.SD.TOGETHER.SURVEY.GET_SUBOT_LOG,{botId:t,cookieId:(0,b.fj)(),accountId:(null===E||void 0===E?void 0:E.id)||""}),"GET");case 2:if(null===(i=e.sent)||void 0===i||null===(n=i._data)||void 0===n||!n.data){e.next=17;break}if(e.prev=4,!(o=JSON.parse(i._data.data)).questions){e.next=13;break}return Q(i._data.flow_uuid),M(o.questions),B(o.resultSubot),Z(o.headerText),ae(i._data.account_id),e.abrupt("return");case 13:e.next=17;break;case 15:e.prev=15,e.t0=e.catch(4);case 17:return e.next=19,(0,b.t9)((0,b.jX)(_.SD.TOGETHER.SURVEY.GET_FIRST_NODE,{botId:t}),"GET");case 19:null!==(a=e.sent)&&void 0!==a&&null!==(r=a._data)&&void 0!==r&&r.first_node&&(M([{current_score:a._data.current_score,current_selected:a._data.current_selected,current_polls:a._data.current_polls,node:a._data.first_node}]),Q(a._data.flow_uuid),a._data.inline_headline&&Z(a._data.inline_headline));case 21:case"end":return e.stop()}}),e,null,[[4,15]])})))()}),[t]),(0,u.useEffect)((function(){(0,c.Z)(s().mark((function e(){var t,n,r,i,o;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!(Y&&null!==E&&void 0!==E&&E.id&&"string"===typeof le&&"string"===typeof se&&le)){e.next=11;break}return n=JSON.parse(decodeURIComponent(le)),r=n.questionParams,i=n.currentPolls,e.next=5,(0,b.t9)((0,b.jX)(_.SD.TOGETHER.SURVEY.CHAT_WITH_BOT),"POST",{data:we(we({},r),{},{form_submit_meta:[],account_id:E.id})});case 5:if(null===(o=e.sent)||void 0===o||null===(t=o._data)||void 0===t||!t.node){e.next=10;break}return M((function(e){var t={current_score:o._data.current_score,current_selected:o._data.current_selected,current_polls:i,node:o._data.node};return e[e.length-1].node.actions.find((function(e){return"action-sso-redirect"===e.type}))?(e[e.length-1]=t,(0,m.Z)(e)):e.concat(t)})),re(l.current),e.abrupt("return");case 10:throw new Error("Something went wrong");case 11:e.next=16;break;case 13:e.prev=13,e.t0=e.catch(0),k({message:p({id:"notification.comment.somethingWrong"}),type:"danger"});case 16:case"end":return e.stop()}}),e,null,[[0,13]])})))()}),[null===E||void 0===E?void 0:E.id,Y]);var ce=N[N.length-1],de="https://".concat(Oe?w.fn?"fe.":"discover.":"").concat(y.domainLocales[P]).concat(w.GW).concat(T),pe=(0,u.useMemo)((function(){return ce&&function(e){var t,n,r,i,l,u,d,p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",f=arguments.length>2?arguments[2]:void 0,h=e.node,m=h.is_multi_select,v=h.multi_select_option,g=h.from,y=h.to,w=null===h||void 0===h?void 0:h.actions.some((function(e){return z.includes(e.type)})),_=null===h||void 0===h||null===(t=h.actions.find((function(e){return"user-submit-terms"===e.type})))||void 0===t?void 0:t.label.trim().replace(/\[([^\]]+)\]\(([^\)]+)\)/gim,'$1'),O=!(!w||!_),j=(null===h||void 0===h?void 0:h.type)===x.Jq.FINAL_THANK_YOU,k=!(null!==h&&void 0!==h&&h.actions.length)&&!j,E=!(null===h||void 0===h||!h.actions.find((function(e){return"poll-choice"===e.type}))),I=null===h||void 0===h?void 0:h.actions.filter((function(e){return q.includes(e.type)}))[0],S=null===(n=h.intents)||void 0===n?void 0:n.filter((function(e){return"bot-text"===e.type||"bot-button"===e.type})),P="bot-text"===(null===S||void 0===S||null===(r=S[0])||void 0===r?void 0:r.type)?S[0].label:"",T=P?S.slice(1):S,C=null===(i=h.intents)||void 0===i||null===(l=i.filter((function(e){return"bot-image"===e.type})))||void 0===l||null===(u=l[0])||void 0===u?void 0:u.url,N=w?"textbox":h.is_multi_select||E?"checkbox":"radio",M=h.actions.filter((function(e){return U.includes(e.type)})),D=h.actions.filter((function(e){return z.includes(e.type)})),L=!1;return w||h.is_multi_select||1!==M.length||I||(I=M[0],L=!0),{thankyouFinalProps:j?{subotData:e}:null,thankyouProps:k?{thankyou:P||"Thank you !",thankyouSubtitle:null!==T&&void 0!==T&&T.length?(0,a.jsx)(J,{intents:T}):"We appreaciate your time"}:null,questionProps:k||j?null:{nextText:null===(d=I)||void 0===d?void 0:d.label,isContactForm:O,termAndPolicyText:_?(0,a.jsx)("p",{style:{fontSize:12,lineHeight:"18px"},dangerouslySetInnerHTML:{__html:_}}):void 0,onNextClick:function(){var t=(0,c.Z)(s().mark((function t(n){var r,i,a,l,c,u,d,m,v;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!==(r=I)&&void 0!==r&&r.url&&window.open(null===(l=I)||void 0===l?void 0:l.url,"_blank"),n){t.next=3;break}return t.abrupt("return");case 3:return c={},u=I,d={},m=[],"textbox"===N?m=ee(n,h.actions):E?m=ne(n,h.actions):(v=$(n,h.actions),d=te(n,h.actions),"radio"===N&&(u||(u=v[0]))),0===n.length&&u&&(d=(0,o.Z)({},u.id,u.key)),t.abrupt("return",V({current_score:e.current_score||0,current_selected:e.current_selected||[],cookie_id:(0,b.fj)()||"",window_id:(0,b.ZY)()||"",url:p,title_url:document.title,ga_client_id:(0,b.gP)()||"",account_id:(null===f||void 0===f?void 0:f.id)||null,selected_actions:d,action_id:(null===(i=u)||void 0===i?void 0:i.id)||"",action_value:(null===(a=u)||void 0===a?void 0:a.key)||"",form_submit_meta:m},c));case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),question:V({image:C,type:N,title:P,is_multi_select:m,multi_select_option:v,from:g,to:y,subtitle:(0,a.jsx)(J,{intents:T})},w?{textOptions:X(D,f)}:{options:L?[]:K(M)})}}}(ce,de,E||void 0)}),[ce,null===E||void 0===E?void 0:E.id]),fe=(0,u.useMemo)((function(){if(ce&&ce.node){var e=ce.node,t=p({id:"multiSelectError.required",defaultMessage:"You must choose one options"});return(null===e||void 0===e?void 0:e.multi_select_option)===w.bL.UNLIMITED&&(t=p({id:"multiSelectError.unlimited",defaultMessage:"You must choose at least one options"})),(null===e||void 0===e?void 0:e.multi_select_option)===w.bL.RANGE&&(t=p({id:"multiSelectError.range",defaultMessage:"You must choose from {from} to {to} options"},{from:e.from,to:e.to})),(null===e||void 0===e?void 0:e.multi_select_option)===w.bL.EXACT_NUMBER&&(t=p({id:"multiSelectError.exactNumber",defaultMessage:"You must choose {from} options"},{from:e.from})),t}return""}),[p,ce]);return t?(0,a.jsxs)(be,{className:"no-replace-click ".concat(n),style:r,ref:l,"data-post-id":i,children:[function(){if(ce&&pe.questionProps){var e=ce.node;return e.position===x.Ff.SSO?(0,a.jsx)(ue,{node:e,onPrevClick:function(){return M((function(e){return e.pop(),e.slice()}))}}):(0,a.jsx)(v.p,we(we({className:"card-subor-survey",headerText:L,descriptionText:fe,prevText:N.length>1?"Back":"",onPrevClick:function(){return M((function(e){return e.pop(),e.slice()}))}},pe.questionProps),{},{nextText:pe.questionProps.nextText||"Next",onNextClick:function(){var e=(0,c.Z)(s().mark((function e(t){var n,r,o,a,c,u,d,p;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null===pe||void 0===pe||null===(n=pe.questionProps)||void 0===n||null===(r=n.onNextClick)||void 0===r?void 0:r.call(n,t);case 2:return a=e.sent,e.next=5,(0,b.t9)((0,b.jX)(_.SD.TOGETHER.SURVEY.CHAT_WITH_BOT),"POST",{data:a});case 5:null!==(c=e.sent)&&void 0!==c&&null!==(o=c._data)&&void 0!==o&&o.node&&(M((function(e){return e.concat({current_score:c._data.current_score,current_selected:c._data.current_selected,current_polls:c._data.current_polls,node:c._data.node})})),G(1),re(l.current),(null===c||void 0===c||null===(u=c._data)||void 0===u?void 0:u.node.position)===x.Ff.SSO&&(d={questionParams:a||{},currentPolls:c._data.current_polls||{}},null!==E&&void 0!==E&&E.id||((p=new URL(window.location.href)).searchParams.set(xe,encodeURIComponent(JSON.stringify(d))),p.searchParams.set(_e,String(i)),window.history.pushState({},"",p.toString()))));case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}),ce.node.id)}return null}(),ce&&pe.thankyouProps&&(0,a.jsx)(v.q,we({},pe.thankyouProps)),ce&&pe.thankyouFinalProps&&(0,a.jsx)(ge,{subotData:pe.thankyouFinalProps.subotData,url:de,chatBotId:t,accountId:null===E||void 0===E?void 0:E.id,onScrollIntoView:function(){return re(l.current)},resultSubot:R,onChangeResult:function(e){B(e),G(2)}})]}):null},ke=n(16592);n(86706);function Ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ie(e){for(var t=1;t @hhgtech/hhg-components/subot"]}}),Pe=I.ZP.div.withConfig({displayName:"container__StyledWrapper",componentId:"sc-p4cty5-0"})(["margin-bottom:8px;","{margin-bottom:24px;}"],E.M.mbUp),Te=function(e){var t,r,i=(0,f.useRouter)(),o=(0,u.useContext)(h.I).state,l=(0,u.useState)(null),p=l[0],m=l[1];return(0,u.useEffect)((function(){(0,c.Z)(s().mark((function t(){var r,i;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all([n.e(1255),n.e(2273),n.e(8750),n.e(945)]).then(n.bind(n,76804)).then((function(e){return e.subotInlineFirstNode}));case 2:return r=t.sent,t.next=5,r(e.chatBotId);case 5:i=t.sent,m(null===i||void 0===i?void 0:i._data);case 7:case"end":return t.stop()}}),t)})))()}),[e.chatBotId]),p?(null===(t=p.extra_settings)||void 0===t?void 0:t.subot_type)===d.S.FRU||(null===(r=p.extra_settings)||void 0===r?void 0:r.subot_type)===d.S.ristScreener?(0,a.jsx)(Pe,{children:(0,a.jsx)(Se,{id:p.id,articleLink:i.asPath,userInfo:o.userInfo})}):(0,a.jsx)(ke.u,{children:(0,a.jsx)(je,Ie({},e))}):null},Ce=(0,u.memo)(Te)},51681:function(e,t,n){"use strict";n.d(t,{F:function(){return we}});var r,i,o,a,l=n(85893),s=n(67294),c=(n(11163),n(68558),n(95983)),u=n(809),d=n.n(u),p=n(92447),f=n(91538),h=n(15393),m=n(25559),v=n(2810),g=n(24169),b=n(21124),y=n(43370),w=n(4266),x=n(26381),_=function(){var e=(0,w.d)(),t=(0,y.U)(),n=(0,x.h)().locale,r=(0,s.useState)({}),i=r[0],o=r[1],a=(0,f.u)(n).getHealthToolLink,u=(0,s.useMemo)((function(){return a(c.QO.BABY_POOP)}),[a]),_=(0,b.h0)().authActionWrapper;(0,s.useEffect)((function(){(0,p.Z)(d().mark((function e(){var t;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,g.t9)((0,g.R4)(v.D9.GET_HEALTH_TOOL_BABY_POOP),"GET");case 2:t=e.sent,o((0,m.Ff)(null===t||void 0===t?void 0:t.data));case 4:case"end":return e.stop()}}),e)})))()}),[]);return u?(0,l.jsx)(h.z,{isMobile:e,currentUrl:t,locale:n,babyPoopPage:i,onClickFindOut:function(){var e="".concat(window.location.origin).concat(u);_((function(){window.location.href=e}),{_location:e,source:"baby-poop-checking"})}}):(0,l.jsx)("div",{style:{height:300}})},O=n(26265),j=n(36808),k=n.n(j),E=n(86896),I=n(5886),S=n(27484),P=n.n(S),T=n(19501),C={INVALID_AGE:"babyGrowth.error.invalidAge",INVALID_MEASUREMENT_DATE:"babyGrowth.error.invalidMeasurementDate",MEASUREMENT_DATE_LOWER_THAN_BIRTHDAY:"babyGrowth.error.measurementDateLowerThanBirthday",BIRTHDAY_REQUIRED:"babyGrowth.error.birthdayRequired",HEAD_REQUIRED:"babyGrowth.error.headRequired",HEIGHT_REQUIRED:"babyGrowth.error.heightRequired",WEIGHT_REQUIRED:"babyGrowth.error.weightRequired",INVALID_VALUE:"babyGrowth.error.invalidValue",AT_LEAST_ONE_OF:"babyGrowth.error.atLeastOneOf"};!function(e){e.Boy="boy",e.Girl="girl"}(r||(r={})),function(e){e[e.Weight=0]="Weight",e[e.Height=1]="Height",e[e.Head=2]="Head",e[e.BMI=3]="BMI"}(i||(i={})),function(e){e[e.Weekly=0]="Weekly",e[e.Monthly=1]="Monthly",e[e.Yearly=2]="Yearly"}(o||(o={})),function(e){e[e.Like=1]="Like",e[e.None=2]="None"}(a||(a={})),T.kM(T.Ry,"atLeastOneOf",(function(e,t){return this.test({name:"atLeastOneOf",message:t({id:C.AT_LEAST_ONE_OF,defaultMessage:"Must have at least one of these fields: ${keys}"}),exclusive:!0,params:{keys:e.join(", ")},test:function(t){return null==t||e.some((function(e){return null!=t[e]&&""!=t[e]}))}})}));var N=function(e){return T.Ry().shape({name:T.nK().optional(),gender:T.Z_().required(),birthday:T.hT().required(e({id:C.BIRTHDAY_REQUIRED,defaultMessage:"Birthday is required"})).test({name:"ageIsLowerThanNineteen",test:function(t,n){return!(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date,n=P()(t).diff(P()(e),"week"),r=P()(t).diff(P()(e),"month");return{year:Math.floor(r/12),month:r%12,week:n}}(t||new Date,n.parent.measurementDate).year>19)||n.createError({message:e({id:C.INVALID_AGE,defaultMessage:""},{name:n.parent.name})})}}),height:T.Z_().test("empty-check","Value height must be a number",(function(e){return""===e||void 0===e||!isNaN(Number(e))})),weight:T.Z_().test("empty-check","Value weight must be a number",(function(e){return""===e||void 0===e||!isNaN(Number(e))})),head:T.Z_().test("empty-check","Value head must be a number",(function(e){return""===e||void 0===e||!isNaN(Number(e))})),bmi:T.Rx(),measurementDate:T.hT().required().default(new Date).max(P()().add(1,"day"),e({id:C.INVALID_MEASUREMENT_DATE,defaultMessage:"Measurement day is not valid."})).test("measurementDateTest","",(function(t,n){return!P()(t).isBefore(n.parent.birthday)||n.createError({message:e({id:C.MEASUREMENT_DATE_LOWER_THAN_BIRTHDAY,defaultMessage:"The measurement date must be less than {name} \u2910s birthday."},{name:n.parent.name||e({id:"babyGrowth.emptyName",defaultMessage:"your baby"})})})}))}).atLeastOneOf(["height","weight","head"],e)},M=function(e){var t,n,r;return e&&e.information?{information:null!==(t=e.information.map((function(e){return{title:e.title,description:e.description}})))&&void 0!==t?t:[],reviewBy:{reviewer:(null===(n=e.reviewed_by)||void 0===n?void 0:n.display_name)||(null===(r=e.reviewed_by)||void 0===r?void 0:r.name)||"",date:e.reviewed_date||"",link:(0,m.Lb)(null===e||void 0===e?void 0:e.reviewed_by)},metaTag:e.meta_tag||"",title:e.title||"",description:e.description||"",disclaimer:e.disclaimer||"",is_sponsored:e.is_sponsored||!1,sponsor:e.sponsor,featuredImage:e.featured_image||""}:{}},D=n(89814),L=n(91256),Z=L.ZP.div.withConfig({displayName:"indexstyled__StyledWrapper",componentId:"sc-sdgf61-0"})(["","{.hhgcomp-toolbanner-inner{.embedded-icon{width:73px;}}}"],D.M.mbDown);function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function R(e){for(var t=1;t100)&&(e.age=n({id:"bmi.ageInput.error",defaultMessage:"Please enter a valid age"})),(!parseFloat(P.height)||parseFloat(P.height)<=0||parseFloat(P.height)>300)&&(e.height=n({id:"bmi.heightInput.error",defaultMessage:"Please enter a valid height"})),(!parseFloat(P.weight)||parseFloat(P.weight)<=0||parseFloat(P.weight)>500)&&(e.weight=n({id:"bmi.weightInput.error",defaultMessage:"Please enter a valid weight"})),!!$().isEmpty(e)||(M(re(re({},{}),e)),!1)}()){var t=Math.round(100*("male"===e?66.47+13.75*parseFloat(P.weight||"")+5.003*parseFloat(P.height||"")-6.755*parseFloat(P.age||""):655.1+9.563*parseFloat(P.weight||"")+1.85*parseFloat(P.height||"")-4.676*parseFloat(P.age||""))/100),r=X.parse(document.cookie||"");(0,p.Z)(d().mark((function n(){var a,l,s,u,p,f,h;return d().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,g.t9)((0,g.R4)(v.D9.GET_HEALTH_TOOL_BMR_RESULT,{kcals:t,age:P.age,gender:e}),"GET");case 2:(l=n.sent)&&(s=(0,m.Xj)((null===l||void 0===l?void 0:l.data)||{}),u=c.Nj.findIndex((function(e){return e===s.status}))+1||1,p={account_id:null,site_id:parseInt(c.CX[o].SITE_ID),email:null,ga_client_id:r._ga||"",gender:"male"===e,height:parseFloat(P.height),weight:parseFloat(P.weight),age:parseInt(P.age),active_level:1,objective:1,kcal:Math.floor(t),kcal_level:u},(0,g.t9)((0,g.vf)(v.D9.GET_SIDIS_BMR,{}),"POST",{data:p})),f=k,h=ee.stringifyUrl({url:"".concat(window.location.origin).concat(f),query:(a={result:1},(0,O.Z)(a,c.su.bmr,t),(0,O.Z)(a,c.su.gender,G(e)),(0,O.Z)(a,c.su.age,P.age),(0,O.Z)(a,c.su.height,P.height),(0,O.Z)(a,c.su.weight,P.weight),(0,O.Z)(a,"joincommunity",1),a)},{skipEmptyString:!0,skipNull:!0}),i?window.location.href=h:(0,g.p0)(h+"&joincommunity=1");case 7:case"end":return n.stop()}}),n)})))()}},info:P})}):(0,l.jsx)("div",{style:{height:300}})},oe=n(70027),ae=n(50572),le=function(){var e=(0,w.d)(),t=(0,s.useContext)(I.I).dispatch,n=(0,x.h)().locale,r=(0,b.h0)().authActionWrapper,i=(0,f.u)(n).getHealthToolLink,o=(0,s.useMemo)((function(){return i(c.QO.DUE_DATE)}),[i]),a=(0,s.useState)({}),u=a[0],y=a[1],_=(0,s.useState)(""),O=_[0],j=_[1];(0,s.useEffect)((function(){(0,p.Z)(d().mark((function e(){var t,n;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,g.t9)((0,g.R4)(v.D9.GET_DUE_DATE_INFO),"GET");case 2:n=e.sent,y(null===n||void 0===n?void 0:n.data),j((0,m.Lb)(null===n||void 0===n||null===(t=n.data)||void 0===t?void 0:t.reviewd_by)||"");case 5:case"end":return e.stop()}}),e)})))()}),[]);return o?(0,l.jsx)(h.w,{isMobile:e,locale:n,onSubmitDueDate:function(e,i){var a=(0,oe.Z)((null===e||void 0===e?void 0:e.startDate)||Date.now(),"yyyy-MM-dd"),l="".concat(window.location.origin).concat(o,"?").concat(i);r((function(){window.location.href=l}),{_location:l+"&joincommunity=1",source:"due-date"}),"vi-VN"!==n||localStorage.getItem("hasSubmitEnfaForm")&&"true"===localStorage.getItem("hasSubmitEnfaForm")||(t({type:ae.H.SET_OPEN_DUE_DATE_POPUP,payload:{isOpenDueDatePopup:!0,dueDateRedirectLink:l,dueDate:a}}),(0,g.uu)((0,g.DS)(v.D9.POST_LEAD_IMPRESSION,{campaignCode:c.WT}),"POST",{data:{action:"CLICK",url:window.location.href,title_article:document.title}})),window.location.href=l},dueDatePageInfo:u,expertUrl:O}):(0,l.jsx)("div",{style:{height:300}})},se=function(e,t){var n=t.method,r=t.periodDateStart,i=t.periodLength,o=t.cycle;return"".concat(e,"?mthd=").concat(n,"&dy=").concat((0,oe.Z)(r,"dd-MM-yyyy"),"&le=").concat(o,"&prd=").concat(i)},ce=function(e){var t=e.ovulationPageInfo,n=(0,x.h)().locale,r=(0,w.d)(),i=(0,b.h0)().authActionWrapper,o=(0,f.u)(n).getHealthToolLink,a=(0,s.useMemo)((function(){return o(c.QO.OVULATION)}),[o]),u=(0,s.useState)({}),m=u[0],y=u[1];return(0,s.useEffect)((function(){(0,p.Z)(d().mark((function e(){var t;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,g.t9)((0,g.R4)(v.D9.GET_HEALTH_TOOL_OVULATION_INFO),"GET");case 2:t=e.sent,y(null===t||void 0===t?void 0:t.data);case 4:case"end":return e.stop()}}),e)})))()}),[]),a?(0,l.jsx)(h.O,{locale:n,ovulationPageInfo:t,onSubmitOvulation:function(e){i((function(){!function(e){if(e){var t=se("".concat(window.location.origin).concat(a),e);location.href=t}}(e)}),{_location:se("".concat(window.location.origin).concat(a),e)+"&joincommunity=1",source:"ovulation"})},isMobile:r,ovulationContent:m}):(0,l.jsx)("div",{style:{height:300}})};function ue(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function de(e){for(var t=1;t200)&&(e.weightBefore=r({id:"pregnancyWeightGain.weightInput.error",defaultMessage:"Please enter a valid weight"})),(!parseFloat(k.height)||parseFloat(k.height)<=0||parseFloat(k.height)>300)&&(e.height=r({id:"pregnancyWeightGain.heightInput.error",defaultMessage:"Please enter a valid height"})),(!parseFloat(k.weight)||parseFloat(k.weight)<=40||parseFloat(k.weight)>200||parseFloat(k.weight)0&&(l=a.data.map(c.It),v((function(e){return e.concat(l)})),y(a.data[0].frequency||1),_(1===a.data[0].is_pin),k({current_page:1,last_page:1}));case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),I=Math.floor(r/b),S=(0,l.useRef)(E);S.current=E,(0,l.useEffect)((function(){(x&&3*(I+1)>m.length||3*I>m.length)&&null!==j&&void 0!==j&&j.last_page&&j.current_page