"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3792],{uzCT:function(e,t,r){r.d(t,{B:function(){return BabyPoopForm}});var a=r("HJpP"),n=r("q1tI"),o=r("/npG"),i=r("mYVa"),l=r("Eso5"),s=r("iuhU"),c=r("oZWv"),d=r("XDLp"),p=r("L+vc"),h=r("SlSK"),u=r("1iCw"),g=(0,o.k)((e,{hasOnClickFn:t})=>({root:{position:"relative",display:"flex",flexDirection:"column",gap:(0,i.h)(16)},sponsorBox:{display:"flex",gap:(0,i.h)(12),alignItems:"center",backgroundColor:e.colors.neutral[0],border:`1px solid ${e.colors.neutral[1]}`,borderRadius:(0,i.h)(4),padding:"4px 12px",alignSelf:"flex-start"},sponsorLogo:{maxHeight:(0,i.h)(32)},btn:{minWidth:(0,i.h)(180),[e.fn.largerThan("sm")]:{alignSelf:"flex-end"},visibility:t?"visible":"hidden"}}));let BabyPoopForm=e=>{var{babyPoopPage:t,onClickFindOut:r,currentUrl:o,sponsorLogo:i,btnProps:m,styles:b,classNames:x}=e,f=(0,a._)(e,["babyPoopPage","onClickFindOut","currentUrl","sponsorLogo","btnProps","styles","classNames"]);let{t:v}=(0,p.u)(),{classes:w}=g({hasOnClickFn:!!r},{name:"BabyPoopForm",styles:b,classNames:x}),{classes:y={}}=(0,n.useContext)(h.C);return n.createElement(u.H.FormRow,null,n.createElement(l.x,Object.assign({className:w.root},f),i&&n.createElement(l.x,{className:w.sponsorBox},n.createElement(c.T,{size:"p4"},v("common.sponsoredBy")),n.createElement("img",{loading:"lazy",src:i,alt:"sponsor",className:w.sponsorLogo})),n.createElement(c.T,{size:"p3",as:"div",className:"description",dangerouslySetInnerHTML:{__html:t.description}}),n.createElement(d.B,Object.assign({className:(0,s.default)(w.btn,y.submitBtn),onClick:r,dataEventCategory:"Health Tool",dataEventAction:"Baby Stool Inquiry",dataEventLabel:o},m),v("babyPoop.findOut"))))}},bk1f:function(e,t,r){r.d(t,{C:function(){return Checkbox},I:function(){return ImageWrapV2},P:function(){return Pagination},S:function(){return w},a:function(){return b},b:function(){return SearchInput},c:function(){return Search2}});var a=r("q1tI"),n=r("rBCA"),o=r("Efqo"),i=r("iBNF"),l=r("HJpP"),s=r("D/T2"),c=r("StZb"),d=r("Ostc");let Search2=e=>a.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 24 25",fill:"none"},e),a.createElement("path",{d:"M11 18.957C14.866 18.957 18 15.823 18 11.957C18 8.09104 14.866 4.95703 11 4.95703C7.13401 4.95703 4 8.09104 4 11.957C4 15.823 7.13401 18.957 11 18.957Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M20 20.957L16 16.957",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),p=n.Z.div` display: flex; cursor: pointer; &[data-theme='marryBaby'] { input { width: 20px; height: 20px; border: 1.3px solid ${i.r.mbColors.midGray}; border-radius: 9px; cursor: inherit; transition: border-color 0.4s, box-shadow 0.4s; &:hover, &:active { border-color: ${i.r.mbColors.cobalt}; box-shadow: 0 0 2px 2px ${i.r.mbColors.cobalt}; } &:focus-visible { border: 2px solid ${i.r.mbColors.cobalt}; } &:checked { border: 0; background: ${i.r.mbColors.cobalt} url("data:image/svg+xml,%3Csvg width='9' height='7' viewBox='0 0 9 7' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.5 4L3.45455 6L8 1' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A") no-repeat center center; } } label { max-width: 15rem; margin-left: 8px; width: calc(100% - 24px); cursor: inherit; font-weight: 600; font-size: 12px; line-height: 20px; letter-spacing: -0.2px; color: ${i.r.mbColors.gray}; } } input { width: 20px; height: 20px; border: solid 1px ${i.r.colors.gray500}; border-radius: 2px; cursor: inherit; transition: border-color 0.4s, box-shadow 0.4s; &:hover, &:active { border-color: ${i.r.colors.primaryBase}; box-shadow: 0 0 2px 2px ${i.r.colors.primary200}; } &:focus-visible { border: 2px solid ${i.r.colors.primaryActive}; } &:checked { border: 0; background: ${i.r.colors.primaryBase} url("data:image/svg+xml,%3Csvg width='12' height='9' viewBox='0 0 12 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 1L4.125 8L1 4.81819' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A") no-repeat center center; } } label { max-width: 15rem; margin-left: 8px; font-weight: ${i.r.sizes.fwRegular}; width: calc(100% - 24px); cursor: inherit; ${o.M.mbDown} { font-size: 14px; line-height: 24px; } ${o.M.mbUp} { font-size: 16px; line-height: 22px; } } &[data-is-rectangle] > input { position: relative; width: unset; height: unset; padding: 5px 12px; border: 1px solid ${i.r.colors.neutral100}; border-radius: 32px; &::after { color: ${i.r.colors.gray800}; content: attr(data-label-text); font-size: 13px; } &:checked { border-color: ${i.r.colors.primary50}; &::after { color: ${i.r.colors.primaryBase}; } } &:checked { background: ${i.r.colors.primary50}; } } &[data-disabled] { color: ${i.r.colors.gray300}; cursor: not-allowed; input { border-color: ${i.r.colors.gray300}; &:hover { border-color: ${i.r.colors.gray300}; box-shadow: none; } } } `,Checkbox=({label:e,name:t,checked:r,className:n,isDisabled:o,onChange:i,value:l,isRectangle:s,inputDataTestId:c,siteType:d})=>a.createElement(p,{className:n,"data-disabled":o||void 0,"data-is-rectangle":s||void 0,"data-label-text":e,"data-theme":d},a.createElement("input",{type:"checkbox",checked:r,name:t,onChange:()=>i(l,!r),disabled:o,value:l,id:`${t}-${l}`,"data-label-text":e,"data-testid":c}),!s&&a.createElement("label",{htmlFor:`${t}-${l}`},e)),h=n.Z.div` display: flex; align-items: center; justify-content: space-between; user-select: none; li { transition: all 0.3s ease; } [data-page-active] { background: ${i.r.colors.primaryBase}; color: ${i.r.colors.white}; > a { color: ${i.r.colors.white}; } } `,u=n.Z.div` display: flex; width: 32px; height: 32px; box-sizing: border-box; align-items: center; justify-content: center; border: 1px solid ${i.r.colors.gray200}; margin: 0 2px; border-radius: 4px; color: ${i.r.colors.gray800}; cursor: pointer; font-size: 14px; font-weight: ${i.r.sizes.fwBold}; &[data-last-page] { border: none; background-color: ${i.r.colors.gray100}; cursor: not-allowed; pointer-events: none; svg { path { stroke: ${i.r.colors.gray300}; } } } `,g=n.Z.li` display: flex; width: 32px; height: 32px; align-items: center; justify-content: center; margin: 0 2px; border-radius: 4px; color: ${i.r.colors.gray800}; cursor: pointer; font-size: 14px; font-weight: ${i.r.sizes.fwBold}; > a { color: ${i.r.colors.gray800}; text-decoration: unset; display: block; width: 100%; height: 100%; line-height: 32px; text-align: center; } `,RenderPagiWithDots=({pagesAmount:e,activePage:t,handlePageChange:r,handleClick:n,href:i,queryPageName:l="page"})=>{let s=[...Array(e)].map((e,t)=>t+1),[c,d]=(0,a.useState)(t<=4?s.slice(0,5):t>=s.length-3?s.slice(s.length-5,s.length):s.slice(t-2,t+1));return(0,a.useEffect)(()=>{t<=4?d(s.slice(0,5)):t>=s.length-3?d(s.slice(s.length-5,s.length)):d(s.slice(t-2,t+1))},[t]),a.createElement(a.Fragment,null,t>4&&a.createElement(a.Fragment,null,a.createElement(g,{onClick:()=>r(1)},i?a.createElement("a",{href:i,onClick:n},1):1),a.createElement(g,null,"...")),c.map(e=>a.createElement(g,{key:`pagination+${e}`,"data-page-active":e===t||void 0,onClick:()=>r(e)},i?a.createElement("a",{href:(0,o.f)(i,e,l),onClick:n},e):e)),tr(s.length)},i?a.createElement("a",{href:(0,o.f)(i,s.length,l),onClick:n},s.length):s.length)))},Pagination=({className:e,pagesAmount:t,currentPage:r,onChange:n,onClick:i,style:l,href:s,queryPageName:c="page"})=>{let d=[...Array(t)].map((e,t)=>t+1),[p,m]=(0,a.useState)(r),b=(0,a.useMemo)(()=>s&&s.endsWith("&page=")?s.replace("&page=",""):s,[s]),x=t-1,handlePageChange=e=>{e<=t&&e>0&&(m(e),n(e))},handleClick=e=>{i&&i(e)};return(0,a.useEffect)(()=>{m(r)},[r]),a.createElement(h,{className:e,style:l},a.createElement(u,{className:"prev-page",onClick:()=>handlePageChange(p-1),"data-last-page":1===p||void 0},b?a.createElement("a",{href:(0,o.f)(b,p,c),onClick:handleClick},a.createElement("svg",{width:"7",height:"10",viewBox:"0 0 7 10",fill:"none"},a.createElement("path",{d:"M5.5 9L1.5 5L5.5 1",stroke:"#2D87F3",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))):a.createElement("svg",{width:"7",height:"10",viewBox:"0 0 7 10",fill:"none"},a.createElement("path",{d:"M5.5 9L1.5 5L5.5 1",stroke:"#2D87F3",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))),d.length>8?a.createElement(RenderPagiWithDots,{pagesAmount:t,activePage:p,handlePageChange:handlePageChange,handleClick:handleClick,href:b,queryPageName:c}):d.map(e=>a.createElement(g,{key:`pagination+${e}`,"data-page-active":e===p||void 0,onClick:()=>handlePageChange(e)},b?a.createElement("a",{href:(0,o.f)(b,e,c),onClick:handleClick},e):e)),a.createElement(u,{className:"next-page",onClick:()=>handlePageChange(p+1),"data-last-page":p===x+1||void 0},b?a.createElement("a",{href:(0,o.f)(b,p,c),onClick:handleClick},a.createElement("svg",{width:"7",height:"10",viewBox:"0 0 7 10",fill:"none"},a.createElement("path",{d:"M1.5 9L5.5 5L1.5 1",stroke:"#2D87F3",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))):a.createElement("svg",{width:"7",height:"10",viewBox:"0 0 7 10",fill:"none"},a.createElement("path",{d:"M1.5 9L5.5 5L1.5 1",stroke:"#2D87F3",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))))},m=n.Z.div` position: relative; width: 100%; &[data-has-error] { input { border-color: ${i.r.colors.red700}; } } input { width: 100%; padding: 12px 16px; border: solid 1px ${i.r.colors.gray200}; border-radius: ${i.r.borderRadius}; &:active, &:focus, .focused & { border-color: ${i.r.colors.primaryBase}; box-shadow: 0px 0px 2px 2px ${i.r.colors.primary200}; } &:disabled { background-color: ${i.r.colors.gray100}; cursor: not-allowed; } } &[data-has-action-icon] { input { padding: 12px 48px 12px 16px; } } &[data-has-display-icon] { input { padding: 12px 16px 12px 48px; } } &[data-has-action-icon][data-has-display-icon] { input { padding: 12px 48px; } } &[data-size='lg'] { input { font-size: 16px; font-weight: ${i.r.sizes.fwRegular}; ${o.M.mbDown} { font-size: 22px; line-height: 1.2; } ${o.M.mbUp} { font-size: 26px; line-height: 1.2; } } } &[data-size='md'] { input { font-weight: ${i.r.sizes.fwRegular}; ${o.M.mbDown} { font-size: 14px; line-height: 1.2; } ${o.M.mbUp} { font-size: 16px; line-height: 1.2; } } } &[data-size='sm'] { input { font-weight: ${i.r.sizes.fwRegular}; ${o.M.mbDown} { font-size: 13px; line-height: 1.5; } ${o.M.mbUp} { font-size: 13px; line-height: 1.5; } } } `,b=a.forwardRef((e,t)=>{var{name:r,errorMessage:n,autoComplete:o="off",defaultValue:i,actionIcon:c,displayIcon:d,isDeleteAction:p,onActionClick:h,label:u,placeholder:g,className:b,onChange:x,onKeyPress:f,isDisabled:v,CustomInput:w,size:y,style:k,autoFocus:C,type:E="text",isNumerousKeyboard:$=!1,onFocus:L,enterKeyHint:z,nativeOnChange:B}=e,S=(0,l._)(e,["name","errorMessage","autoComplete","defaultValue","actionIcon","displayIcon","isDeleteAction","onActionClick","label","placeholder","className","onChange","onKeyPress","isDisabled","CustomInput","size","style","autoFocus","type","isNumerousKeyboard","onFocus","enterKeyHint","nativeOnChange"]);let[P,I]=(0,a.useState)(i),handleOnChange=e=>{I(e),x(e)};return a.createElement(m,{"data-size":y,className:b,"data-has-action-icon":!!c||void 0,"data-has-display-icon":!!d||void 0,"data-has-error":n&&n.length>0||void 0,style:k},u&&a.createElement(s.L,{size:"label2",htmlFor:r,className:"inputLabel"},u),a.createElement("div",{style:{position:"relative"}},w||a.createElement("input",Object.assign({id:r,name:r,placeholder:g,onChange:null!=B?B:e=>handleOnChange(e.target.value),onKeyPress:f,type:E,"aria-label":E,disabled:v,value:P,autoComplete:o,ref:t,autoFocus:C,inputMode:$||"number"===E?"numeric":E,pattern:$?"[0-9]*":".*",onFocus:L,enterKeyHint:z},S)),d&&a.createElement(s.S,{className:"displayIcon"},d),c&&a.createElement(s.a,{className:"actionIcon",onClick:()=>{var e;p&&(I(""),null===(e=t.current)||void 0===e||e.focus()),h&&h()}},c)),n&&n.length>0&&a.createElement(s.b,{className:"errorLabel"},n))});b.displayName="PureInput";let x=[320,420,640,750,828,1080,1200,1440,1920,2048],defaultLoader=({src:e,width:t,quality:r})=>{try{let a=new URL(e,"undefined"!=typeof window?window.location.origin:"http://localhost");return a.searchParams.set("w",String(t)),a.searchParams.set("q",String(null!=r?r:75)),a.toString()}catch(t){return e}},ImageWrapV2=e=>{var{alt:t,backupSrc:r,src:n,placeholderSrc:o,style:i,ref:s,unoptimized:c=!1,quality:d,sizes:p,width:h}=e,u=(0,l._)(e,["alt","backupSrc","src","placeholderSrc","style","ref","unoptimized","quality","sizes","width"]);let[g,m]=(0,a.useState)(!1),b=(0,a.useMemo)(()=>c?[]:function(e){if(e.sizes)return x;if(e.width){let t=Math.max(1,Math.round(e.width));return Array.from(new Set([t,Math.min(2*t,2048)])).sort((e,t)=>e-t)}return x}({sizes:p,width:h}),[p,h,c]),v=(0,a.useMemo)(()=>{if(!c)return b.map(e=>`${defaultLoader({src:n,width:e,quality:d})} ${e}w`).join(", ")},[c,b,n,d]),w=(0,a.useMemo)(()=>{if(c)return n;let e=b.length?b[b.length-1]:null!=h?h:1920;return defaultLoader({src:n,width:e,quality:d})},[c,b,n,d,h]);return a.createElement(f,Object.assign({loading:"lazy",alt:t,srcSet:v,onError:()=>!g&&m(!0),src:g?r||w:w||r,style:Object.assign(Object.assign({},o?{backgroundImage:`url(${o})`}:{}),i),"data-has-placeholder":!!o,sizes:p,ref:s},u))},f=n.Z.img` &[data-has-placeholder='true'] { background-position: center; background-repeat: no-repeat; background-size: cover; } `,v=(0,n.Z)(c.I)` box-shadow: 0px 0px 1px 0px #0000000a, 0px 2px 8px 0px #0000000a, 0px 10px 16px 0px #0000000a; border-radius: 0.75rem; overflow: hidden; input.mantine-Input-input { border: none; font-size: 0.8125rem; line-height: 1.25rem; } .close-icon-wrapper { display: none; background-color: ${i.r.colors.gray400}; border-radius: 100%; cursor: pointer; width: 20px; height: 20px; padding: 2px; svg { pointer-events: none; } &[data-is-disabled='true'] { opacity: 0.2; cursor: not-allowed; pointer-events: none; } } input.mantine-Input-input:focus ~ .mantine-Input-rightSection .close-icon-wrapper, input.mantine-Input-input:not(:placeholder-shown) ~ .mantine-Input-rightSection .close-icon-wrapper { display: flex; } `,w=(0,n.Z)(Search2)` color: ${i.r.colors.primaryBase}; width: 20px; height: 20px; `,SearchInput=e=>{let{loading:t,disabled:r,placeholder:n,value:o,onChange:i,icon:s=a.createElement(w,null),className:c,style:p,enableClear:h}=e,u=(0,l._)(e,["loading","disabled","placeholder","value","onChange","icon","className","style","enableClear"]);return a.createElement(v,Object.assign({disabled:t||r,size:"lg",value:o,onChangeRaw:e=>{i(e.currentTarget.value)},type:"text",placeholder:n,className:c,icon:s,style:p,rightSection:h?a.createElement("div",{className:"close-icon-wrapper",onClick:()=>{i("")},"data-is-disabled":!o},a.createElement(d.C,{fill:"white",width:"100%",height:"100%"})):void 0},u,{"data-event-label":o}))}},dfDy:function(e,t,r){r.d(t,{T:function(){return Tabs}});var a=r("HJpP"),n=r("q1tI"),o=r("aKYm"),i=r("VLUI"),l=r("/npG"),s=r("mYVa"),c=r("rlLN"),d=r("vaps"),p=r("XDLp"),h=r("oZWv"),u=(0,l.k)((e,t)=>{let{variant:r}=t,a={content:"none",top:0,bottom:0,zIndex:1,width:(0,s.h)(56)};return Object.assign({},"inline"===r&&{root:{},tabsList:{gap:(0,s.h)(24),borderBottom:"none",flexWrap:"nowrap"},tab:{padding:`${(0,s.h)(8)} 0`,color:e.colors.gray[4],borderColor:"transparent",borderBottomWidth:(0,s.h)(2),marginBottom:(0,s.h)(-1),transition:"border 0.2s ease","&:hover":{backgroundColor:"initial",borderColor:"transparent"},"&[data-active='true']":{color:e.fn.primaryColor(),borderColor:e.fn.primaryColor()}},tabRightSection:{},tabLabel:{},tabIcon:{},panel:{},scrollArea:{position:"relative","&.prev-bg":{"&:before":Object.assign(Object.assign({},a),{content:'""',position:"absolute",left:0,background:"linear-gradient(90deg, #FFF 0%, rgba(255, 255, 255, 0.00) 100%)"})},"&.next-bg":{"&:after":Object.assign(Object.assign({},a),{content:'""',position:"absolute",right:0,background:"linear-gradient(90deg, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 100%)"})}},list:{borderBottom:`1px solid ${e.colors.neutral[1]}`},btn:{position:"absolute",top:"50%",zIndex:2,transform:"translate(0, -50%)",width:(0,s.h)(28),height:(0,s.h)(28),padding:0,background:"white",borderRadius:"50%",cursor:"pointer",filter:"drop-shadow(0px 0px 1px rgba(0, 0, 0, 0.04)) drop-shadow(0px 2px 8px rgba(0, 0, 0, 0.04)) drop-shadow(0px 10px 16px rgba(0, 0, 0, 0.04))",".mantine-Button-icon":{display:"flex",alignItems:"center",justifyContent:"center"},"&.disabled":{opacity:0,zIndex:0}},prevBtn:{left:0},nextBtn:{right:0}})});let Tabs=e=>{var t,{variant:r="inline",value:l,styles:s,children:g,dataList:m=[],tabProps:b,listProps:x,panelProps:f,TabComponentDisplay:v,startPadding:w=40,defaultValue:y}=e,k=(0,a._)(e,["variant","value","styles","children","dataList","tabProps","listProps","panelProps","TabComponentDisplay","startPadding","defaultValue"]);let{cx:C,classes:E}=u({variant:r},{name:"Tabs",styles:s}),$=(0,n.useRef)(null),L=(0,n.useRef)([]),[z,B]=(0,n.useState)(y||(null===(t=null==m?void 0:m[0])||void 0===t?void 0:t.value)),[S,P]=(0,n.useState)(0),[I,j]=(0,n.useState)(!1),[N,M]=(0,n.useState)(!0),[O,T]=(0,n.useState)({x:0,y:0}),F=(0,n.useRef)(null),D=Object.assign({defaultValue:y,classNames:E},g?{value:l}:{value:z,onTabChange:e=>B(e)});(0,n.useEffect)(()=>{B(l)},[l]),(0,n.useEffect)(()=>{var e,t,r;null===(e=F.current)||void 0===e||e.scrollTo({left:(null===(r=null===(t=null==L?void 0:L.current)||void 0===t?void 0:t[S])||void 0===r?void 0:r.offsetLeft)-w,behavior:"smooth"})},[S]),(0,n.useEffect)(()=>{P(m.findIndex(e=>e.value==z))},[z]),(0,n.useEffect)(()=>{var e,t;M(0===O.x),j((null===(e=null==F?void 0:F.current)||void 0===e?void 0:e.clientWidth)+O.x===(null===(t=null==F?void 0:F.current)||void 0===t?void 0:t.scrollWidth))},[O]);let TabTextComponent=({text:e,dataEventCategory:t,dataEventAction:r,dataEventLabel:a})=>v?n.createElement(v,null,e):n.createElement(h.T,{size:"s3",color:"inherit",weight:"semiBold","data-event-category":t,"data-event-action":r,"data-event-label":a},e);return n.createElement(c.m,Object.assign({},D,k),g||n.createElement(n.Fragment,null,n.createElement(d.x,{className:C(E.scrollArea,`${N?"":"prev-bg"} ${I?"":"next-bg"}`),scrollbarSize:0,viewportRef:F,onScrollPositionChange:T},n.createElement(c.m.List,Object.assign({className:E.list,ref:$},x),m.map((e,t)=>n.createElement(c.m.Tab,Object.assign({ref:e=>L.current[t]=e,className:E.tab,key:String(e.value),value:String(e.value)},b),n.createElement(TabTextComponent,Object.assign({},e))))),n.createElement(p.B,{className:C(E.btn,E.prevBtn,N?"disabled":""),unstyled:!0,onClick:()=>P(S-1>-1?S-1:0),leftIcon:n.createElement(o.Z,{size:16})}),n.createElement(p.B,{className:C(E.btn,E.nextBtn,I?"disabled":""),unstyled:!0,onClick:()=>P(S+1n.createElement(c.m.Panel,Object.assign({value:String(e.value),key:String(e.value)},f),e.content))))};Tabs.List=c.m.List,Tabs.Tab=c.m.Tab,Tabs.Panel=c.m.Panel}}]);