"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4584],{hDz7:function(e,t,n){n.d(t,{C:function(){return l},F:function(){return i},G:function(){return GlobalTextStyleNew},T:function(){return TemplateProvider},a:function(){return c},u:function(){return useTemplateVariant}});var a,r,l,i,o=n("mYVa"),s=n("q1tI");(a=l||(l={})).LEADGEN="leadgen",a.NONE="none",(r=i||(i={}))[r.regular=400]="regular",r[r.halfBold=500]="halfBold",r[r.semiBold=600]="semiBold",r[r.bold=700]="bold";let c={[l.NONE]:{fontSize:{base:[(0,o.h)(16),(0,o.h)(16)],lg:[(0,o.h)(18),(0,o.h)(16)],md:[(0,o.h)(18),(0,o.h)(16)],sm:[(0,o.h)(16),(0,o.h)(14)],xs:[(0,o.h)(14),(0,o.h)(12)],s1:[(0,o.h)(22),(0,o.h)(18)],s2:[(0,o.h)(18),(0,o.h)(16)],s3:[(0,o.h)(16),(0,o.h)(14)],s4:[(0,o.h)(14),(0,o.h)(12)],s5:[(0,o.h)(12),(0,o.h)(12)],p1:[(0,o.h)(18),(0,o.h)(16)],p2:[(0,o.h)(16),(0,o.h)(16)],p3:[(0,o.h)(16),(0,o.h)(14)],p4:[(0,o.h)(14),(0,o.h)(12)],p5:[(0,o.h)(12),(0,o.h)(12)],c1:[(0,o.h)(16),(0,o.h)(14)],c2:[(0,o.h)(14),(0,o.h)(12)],n1:[(0,o.h)(12),(0,o.h)(12)],label1:[(0,o.h)(14),(0,o.h)(14)],label2:[(0,o.h)(12),(0,o.h)(12)],h1:[(0,o.h)(40),(0,o.h)(26)],h2:[(0,o.h)(32),(0,o.h)(24)],h3:[(0,o.h)(26),(0,o.h)(20)],h4:[(0,o.h)(22),(0,o.h)(18)],h5:[(0,o.h)(18),(0,o.h)(16)],h5New:[(0,o.h)(20),(0,o.h)(18)],h6:[(0,o.h)(16),(0,o.h)(14)],title1:[(0,o.h)(17),(0,o.h)(17)],title2:[(0,o.h)(15),(0,o.h)(15)],body2:[(0,o.h)(15),(0,o.h)(15)]},lineHeight:{base:[(0,o.h)(24),(0,o.h)(24)],lg:[(0,o.h)(32),(0,o.h)(28)],md:[(0,o.h)(32),(0,o.h)(28)],sm:[(0,o.h)(24),(0,o.h)(22)],xs:[(0,o.h)(24),(0,o.h)(18)],s1:[(0,o.h)(32),(0,o.h)(26)],s2:[(0,o.h)(28),(0,o.h)(24)],s3:[(0,o.h)(24),(0,o.h)(24)],s4:[(0,o.h)(22),(0,o.h)(18)],s5:[(0,o.h)(18),(0,o.h)(18)],p1:[(0,o.h)(28),(0,o.h)(28)],p2:[(0,o.h)(24),(0,o.h)(24)],p3:[(0,o.h)(24),(0,o.h)(22)],p4:[(0,o.h)(22),(0,o.h)(18)],c1:[(0,o.h)(24),(0,o.h)(22)],c2:[(0,o.h)(22),(0,o.h)(18)],n1:[(0,o.h)(18),(0,o.h)(18)],label1:[(0,o.h)(22),(0,o.h)(22)],label2:[(0,o.h)(18),(0,o.h)(18)],h1:[(0,o.h)(52),(0,o.h)(34)],h2:[(0,o.h)(42),(0,o.h)(32)],h3:[(0,o.h)(36),(0,o.h)(26)],h4:[(0,o.h)(32),(0,o.h)(26)],h5:[(0,o.h)(28),(0,o.h)(24)],h5New:[(0,o.h)(28),(0,o.h)(24)],h6:[(0,o.h)(24),(0,o.h)(22)],title1:[(0,o.h)(24),(0,o.h)(24)],title2:[(0,o.h)(24),(0,o.h)(24)],body2:[(0,o.h)(24),(0,o.h)(24)]},letterSpacing:{lg:[-.2,0],md:[-.2,0],sm:[0,-.2],s1:[-.6,-.6],s2:[-.4,-.2],s3:[0,-.2],s4:[0,-.2],p1:[-.2,-.2],p2:[0,-.2],p3:[0,-.2],p4:[-.2,0],label1:[0,-.2],h1:[-1.2,-.9],h2:[-1,-.8],h3:[-.8,-.7],h4:[-.6,-.6],h5:[-.2,-.2],h5New:[-.4,-.4],h6:[0,-.2],title1:[-.4,-.4],title2:[-.3,-.3],body2:[-.3,-.3]},fontWeightBySize:{s1:i.semiBold,s2:i.semiBold,s3:i.semiBold,s4:i.semiBold,h1:i.bold,h2:i.bold,h3:i.bold,h4:i.bold,h5:i.bold,h5New:i.semiBold,h6:i.bold},fontWeight:i},[l.LEADGEN]:{fontSize:{base:[(0,o.h)(16),(0,o.h)(16)],lg:[(0,o.h)(18),(0,o.h)(16)],md:[(0,o.h)(18),(0,o.h)(16)],sm:[(0,o.h)(16),(0,o.h)(14)],xs:[(0,o.h)(14),(0,o.h)(12)],s1:[(0,o.h)(22),(0,o.h)(18)],s2:[(0,o.h)(18),(0,o.h)(16)],s3:[(0,o.h)(16),(0,o.h)(14)],s4:[(0,o.h)(14),(0,o.h)(12)],s5:[(0,o.h)(12),(0,o.h)(12)],p1:[(0,o.h)(17),(0,o.h)(17)],p2:[(0,o.h)(15),(0,o.h)(15)],p3:[(0,o.h)(13),(0,o.h)(13)],p4:[(0,o.h)(14),(0,o.h)(12)],p5:[(0,o.h)(12),(0,o.h)(12)],c1:[(0,o.h)(12),(0,o.h)(12)],c2:[(0,o.h)(11),(0,o.h)(11)],n1:[(0,o.h)(12),(0,o.h)(12)],label1:[(0,o.h)(14),(0,o.h)(14)],label2:[(0,o.h)(12),(0,o.h)(12)],h1:[(0,o.h)(40),(0,o.h)(26)],h2:[(0,o.h)(32),(0,o.h)(24)],h3:[(0,o.h)(26),(0,o.h)(22)],h4:[(0,o.h)(22),(0,o.h)(20)],h5:[(0,o.h)(18),(0,o.h)(16)],h5New:[(0,o.h)(20),(0,o.h)(18)],h6:[(0,o.h)(16),(0,o.h)(14)],title1:[(0,o.h)(17),(0,o.h)(17)],title2:[(0,o.h)(15),(0,o.h)(15)],body2:[(0,o.h)(15),(0,o.h)(15)],overline:[(0,o.h)(11),(0,o.h)(11)],subText:[(0,o.h)(10),(0,o.h)(10)]},lineHeight:{base:[(0,o.h)(24),(0,o.h)(24)],lg:[(0,o.h)(32),(0,o.h)(28)],md:[(0,o.h)(32),(0,o.h)(28)],sm:[(0,o.h)(24),(0,o.h)(22)],xs:[(0,o.h)(24),(0,o.h)(18)],s1:[(0,o.h)(32),(0,o.h)(26)],s2:[(0,o.h)(28),(0,o.h)(24)],s3:[(0,o.h)(24),(0,o.h)(24)],s4:[(0,o.h)(22),(0,o.h)(18)],s5:[(0,o.h)(18),(0,o.h)(18)],p1:[(0,o.h)(28),(0,o.h)(28)],p2:[(0,o.h)(24),(0,o.h)(24)],p3:[(0,o.h)(20),(0,o.h)(20)],p4:[(0,o.h)(22),(0,o.h)(18)],c1:[(0,o.h)(16),(0,o.h)(16)],c2:[(0,o.h)(22),(0,o.h)(18)],n1:[(0,o.h)(18),(0,o.h)(18)],label1:[(0,o.h)(22),(0,o.h)(22)],label2:[(0,o.h)(18),(0,o.h)(18)],h1:[(0,o.h)(48),(0,o.h)(34)],h2:[(0,o.h)(40),(0,o.h)(32)],h3:[(0,o.h)(32),(0,o.h)(32)],h4:[(0,o.h)(32),(0,o.h)(28)],h5:[(0,o.h)(28),(0,o.h)(24)],h5New:[(0,o.h)(28),(0,o.h)(24)],h6:[(0,o.h)(24),(0,o.h)(22)],title1:[(0,o.h)(24),(0,o.h)(24)],title2:[(0,o.h)(24),(0,o.h)(24)],body2:[(0,o.h)(24),(0,o.h)(24)],overline:[(0,o.h)(12),(0,o.h)(12)],subText:[(0,o.h)(12),(0,o.h)(12)]},letterSpacing:{lg:[-.2,0],md:[-.2,0],sm:[0,-.2],s1:[-.6,-.6],s2:[-.4,-.2],s3:[0,-.2],s4:[0,-.2],p1:[-.4,-.4],p2:[-.3,-.3],p3:[-.3,-.3],p4:[-.2,0],c1:[-.2,-.2],c2:[-.2,-.2],label1:[0,-.2],h1:[-1.2,-.9],h2:[-1,-.8],h3:[-.6,-.6],h4:[-.6,-.4],h5:[-.2,-.2],h5New:[-.4,-.4],h6:[0,-.2],n1:[-.2,-.2],title1:[-.4,-.4],title2:[-.3,-.3],body2:[-.3,-.3],overline:[-.2,-.2],subText:[-.2,-.2]},fontWeightBySize:{s1:i.semiBold,s2:i.semiBold,s3:i.semiBold,s4:i.semiBold,h1:i.bold,h2:i.bold,h3:i.bold,h4:i.bold,h5:i.bold,h5New:i.semiBold,h6:i.bold},fontWeight:i}},GlobalTextStyleNew=e=>({[l.LEADGEN]:{h1:{fontSize:(0,o.h)(40),lineHeight:(0,o.h)(48),letterSpacing:"-1.2px",[e.fn.smallerThan("sm")]:{fontSize:(0,o.h)(26),lineHeight:(0,o.h)(32),letterSpacing:"-0.6px"}},h2:{fontSize:(0,o.h)(32),lineHeight:(0,o.h)(40),letterSpacing:"-1px",[e.fn.smallerThan("sm")]:{fontSize:(0,o.h)(20),lineHeight:(0,o.h)(28),letterSpacing:"-0.4px"}},h3:{fontSize:(0,o.h)(26),lineHeight:(0,o.h)(32),letterSpacing:"-0.6px",[e.fn.smallerThan("sm")]:{fontSize:(0,o.h)(20),lineHeight:(0,o.h)(28),letterSpacing:"-0.4px"}},p1:{fontSize:(0,o.h)(17),lineHeight:(0,o.h)(28),letterSpacing:"-0.4px"},p2:{fontSize:(0,o.h)(15),lineHeight:(0,o.h)(24),letterSpacing:"-0.3px"}}}),d=(0,s.createContext)(l.NONE),TemplateProvider=({variant:e=l.NONE,children:t})=>s.createElement(d.Provider,{value:e},t),useTemplateVariant=()=>(0,s.useContext)(d)},"16VF":function(e,t,n){n.d(t,{D:function(){return Divider}});var a=n("q1tI"),r=n("rBCA"),l=n("iBNF");let i=r.Z.hr`
border-width: 1px;
border-color: ${l.r.colors.neutral200};
border-style: ${e=>e.dividerType};
`,Divider=({type:e="solid",className:t,style:n})=>a.createElement(i,{style:n,className:t,"data-diver-type":e,dividerType:e})},OFtx:function(e,t,n){n.d(t,{D:function(){return DrawerBottom}});var a=n("HJpP"),r=n("q1tI"),l=n("iuhU"),i=n("h8tX"),o=n("Ostc"),s=n("rSBk"),c=n("rBCA"),d=n("iBNF"),h=n("NGsg");(0,c.Z)(o.D)`
/* max-height: 100vh;
max-height: 100dvh; */
background-color: white;
&[data-vaul-drawer-direction='bottom'] {
top: initial !important;
border-top-left-radius: 16px !important;
border-top-right-radius: 16px !important;
padding-bottom: 32px;
padding-left: 20px;
padding-right: 20px;
}
.drawer__handle {
width: 44px;
height: 3px;
background-color: ${d.r.colors.neutral500};
margin: 16px auto;
flex-shrink: 0;
}
`;let m=(0,c.Z)(s.dy.Content)`
position: fixed;
z-index: ${h.Z-9e6+1};
inset: 0;
background-color: #fff;
outline: none !important;
&[data-is-linear='true'] {
background: linear-gradient(180deg, #c3e3ff 1.86%, #fff 20%) !important;
}
&::-webkit-scrollbar {
width: 6px;
height: 6px;
}
&::-webkit-scrollbar-track {
background-color: transparent;
}
&::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, 0.4);
border-radius: 6px;
}
&[data-vaul-drawer-direction='bottom'] {
top: initial;
border-top-left-radius: 16px;
border-top-right-radius: 16px;
/* padding-bottom: 16px; */
}
${e=>e.isDragging&&`
input {
caret-color: transparent;
}
`}
`,u=(0,c.Z)(s.dy.Overlay)`
position: fixed;
inset: 0;
z-index: ${h.Z-9e6};
width: 100%;
max-height: 100%;
background-color: rgb(0, 0, 0, 0.4);
`,p=(0,c.Z)(s.dy.Handle)`
&[data-vaul-handle] {
width: 44px;
height: 3px;
background-color: ${d.r.colors.neutral500};
margin: 16px auto;
flex-shrink: 0;
}
`;function DrawerBottom(e){var{children:t,onClose:n,isOpen:c,onOpenChange:d,isMobile:h,classNames:g,isLinear:b,overlayClassName:f,contentClassName:E,handlerClassName:v,drawerOverlayProps:w}=e,y=(0,a._)(e,["children","onClose","isOpen","onOpenChange","isMobile","classNames","isLinear","overlayClassName","contentClassName","handlerClassName","drawerOverlayProps"]);let{isDragging:C,handleDragStart:x,handleDragEnd:L}=(0,o.u)(),{onDrag:k,onRelease:S}=y,I=(0,a._)(y,["onDrag","onRelease"]);return h?r.createElement(s.dy.Root,Object.assign({},I,{open:c,onOpenChange:d,onClose:n,onDrag:(e,t)=>{x(),null==k||k(e,t)},onRelease:(e,t)=>{L(),null==S||S(e,t)}}),r.createElement(s.dy.Portal,null,r.createElement(u,Object.assign({className:(0,l.default)(f,"drawer__overlay")},w)),r.createElement(m,{isDragging:C,className:(0,l.default)(E,"drawer__content"),"data-is-linear":b},r.createElement(s.dy.Title,{style:{display:"none"}}),r.createElement(p,{className:(0,l.default)(v,"drawer__handle")}),t))):r.createElement(i.u,Object.assign({withCloseButton:!0,centered:!0,zIndex:500,size:"auto",classNames:g,radius:"lg"},y,{onClose:n,opened:c,styles:{root:{maxHeight:"400px"},body:{background:b?"linear-gradient(180deg, #A5D4FF 0%, #FFFFFF 20%)":void 0}}}),t)}},"93sf":function(e,t,n){n.d(t,{S:function(){return r}});var a=n("2wr/");let r=a.r},NeT8:function(e,t,n){n.d(t,{I:function(){return InputCommentBar},P:function(){return PopupDanger},S:function(){return SharePopup},a:function(){return PopupFrame},b:function(){return SubmitReportForm},c:function(){return j},d:function(){return getPostFormData},e:function(){return editPost},f:function(){return createPost},g:function(){return getDefaultFailNoti},h:function(){return deletePost},i:function(){return F},j:function(){return deleteComment},k:function(){return decodeCommentBody},l:function(){return likeUnlikeComment},m:function(){return likeUnlikePost},u:function(){return useImagePicker}});var a=n("q1tI"),r=n("+6Eu"),l=n("ake8"),i=n("oZWv"),o=n("Efqo"),s=n("i8i4"),c=n("Xfk/"),d=n("rBCA"),h=n("iBNF"),m=n("HJpP"),u=n("D/T2"),p=n("L+vc"),g=n("Ifaq"),b=n("f2kC"),f=n("IQVP"),E=n("sK8H"),v=n("BucA"),w=n("wGwR"),y=n("bgUz"),C=n("S6ja"),x=n("t/pd"),L=n("fKfj"),k=n("7sBR"),S=n("gRZs"),I=n("/pFO");let useImagePicker=(e,t)=>{let[n,r]=(0,a.useState)(e||[]),l=(0,a.useMemo)(()=>(e||n).map(e=>"string"==typeof e?e:URL.createObjectURL(e)),[e,n]);return{onSelectImages:a=>{let l=a.target.files;if(l){if(t&&e){let a=e||n;t(a.concat(Array.from(l)))}else r(n=>{let a=e||n;return t&&t(a.concat(Array.from(l))),a.concat(Array.from(l))})}},onRemoveImage:n=>{t&&e?(e.splice(n,1),t(e.slice())):r(a=>{let r=e||a;return r.splice(n,1),t&&t(r.slice()),r.slice()})},onRemoveAllImages:()=>{t?t([]):r([])},imageSrcs:l,imageFiles:e||n}},getDefaultFailNoti=e=>({message:e("notification.failure"),type:"danger"}),likeUnlikePost=({id:e,locale:t})=>(0,m.a)(void 0,void 0,void 0,function*(){if(!e)return;let n=yield(0,c.e)((0,c.f)(f.yy.POST.LIKE,{id:e,_locale:t}),"GET");return n}),deletePost=({id:e,locale:t})=>(0,m.a)(void 0,void 0,void 0,function*(){if(!e)return;let n=yield(0,c.e)((0,c.f)(f.yy.POST.DELETE,{id:e,_locale:t}),"DELETE");return n}),getPostFormData=({title:e,description:t,communityId:n,imageFiles:a,previewUrl:r,topicIds:l,locale:i,sanitizeFunction:s,categoryCommunityId:c,categoryTopicIds:d,introUrl:h,bannerUrl:u,scheduleTime:p,isAnonymous:g,isAskDoctor:f})=>(0,m.a)(void 0,void 0,void 0,function*(){let m=new FormData,v=(0,E.j)(t),w=(0,E.j)(e),y=(0,E.i)(v);if(m.append("title",w),m.append("description",(0,E.k)(v,s)),c?m.append("category_community",String(c)):n&&m.append("community_id",String(n)),m.append("is_anonymous",g?"1":"0"),m.append("is_question",f?"1":"0"),(null==r?void 0:r.title)&&m.append("preview_title",r.title),(null==r?void 0:r.description)&&m.append("preview_description",r.description),(null==r?void 0:r.url)&&m.append("preview_link",(0,o.c)(r.url)),(null==r?void 0:r.image)&&m.append("preview_image",(0,o.c)(r.image)),null==l||l.forEach(e=>{m.append("topics[]",String(e||""))}),null==d||d.forEach(e=>{m.append("category_topics[]",String(e||""))}),null==a?void 0:a.length){let e=yield Promise.all(a.map((e,t)=>new Promise(n=>{setTimeout(()=>{n((0,E.u)(e,i))},2e3*t)})));null==e||e.filter(Boolean).slice(0,b.M).forEach((e,t)=>{m.append(`images[${t}]`,e)})}else m.append("images","");return null==y||y.forEach(e=>{m.append("mention_ids[]",e)}),m.append("intro_url",h||""),m.append("banner",u||""),p&&(m.append("post_type","scheduled"),m.append("schedule_datetime",p)),m}),createPost=({locale:e,formData:t,isArticleComment:n})=>(0,m.a)(void 0,void 0,void 0,function*(){let a=yield(0,c.e)((0,c.f)(n?f.yy.POST.CREATE_ARTICLE_COMMENT:f.yy.POST.CREATE,{_locale:e}),"POST",{data:t});return a}),editPost=({id:e,locale:t,formData:n})=>(0,m.a)(void 0,void 0,void 0,function*(){let a=yield(0,c.e)((0,c.f)(f.yy.POST.UPDATE,{id:e,_locale:t}),"POST",{data:n});return a}),reportPost=({id:e,reason:t,locale:n})=>{let a=new FormData;return a.append("reason",t),(0,c.e)((0,c.f)(f.yy.POST.REPORT,{_locale:n,id:e}),"POST",{data:a})},O=d.Z.div`
[data-type='confirm'] {
max-width: 468px;
/* height: 486px; */
padding: 0;
.popup-content {
display: flex;
flex-direction: column;
padding: 0;
.close-button {
top: 16px;
right: 16px;
width: 24px;
height: 24px;
z-index: 5;
}
.header {
display: flex;
height: 56px;
align-items: center;
padding: 16px 56px 16px 32px;
border-bottom: 1px solid ${h.r.colors.neutral100};
font-weight: 900;
width: 100%;
justify-content: space-between;
}
.content {
overflow: auto;
flex: 1;
.topic-list-wrapper {
padding: 1rem;
}
}
}
}
> div&[data-open='true'] {
z-index: 250;
&:last-child {
z-index: 200;
}
}
${e=>e.isExpand&&`
& > div[data-open] {
width: 100%;
height: 100%;
max-width: none;
max-height: none;
}
`}
${e=>e.hasFullscreen&&`
& > div[data-open] {
transition: all 0.5s ease-in-out, width 0s, height 0s;
}
`}
`,R=d.Z.div`
cursor: pointer;
display: flex;
align-items: center;
`,PopupFrame=({className:e,style:t,closeIcon:n,heading:r="",children:i,isOpen:o=!1,hasFullscreen:s=!1,disableClickOutside:c=!1,initExpand:d=!1,onExpandChange:h,onClose:m=()=>null})=>{let[u,p]=(0,a.useState)(d);return a.createElement(O,{className:e,style:t,isExpand:u,hasFullscreen:s},a.createElement(k.P,{type:"confirm",onClose:m,isOpen:o,closeIcon:n||a.createElement("img",{src:S.C,loading:"lazy"}),enableAnimation:!s,disableClickOutside:c},a.createElement("div",{className:"header"},a.createElement(l.H,{tag:"h5"},r),s&&a.createElement(R,{onClick:()=>{null==h||h(),p(!u)}},a.createElement(L.Z,{size:14,isExpand:u}))),a.createElement("div",{className:"content"},"function"==typeof i?i(u):i)))};var j="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='25' fill='none'%3e%3cpath fill='%23262626' d='M12 22.984c5.523 0 10-4.477 10-10s-4.477-10-10-10-10 4.478-10 10 4.477 10 10 10'/%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m14.828 10.156-5.657 5.657M9.172 10.156l5.657 5.657'/%3e%3c/svg%3e";let M=d.Z.div`
[data-type='confirm'] {
width: min(360px, 100%);
height: auto;
&[data-open='false'] {
top: calc(-100% - 500px);
}
}
z-index: 600;
.header {
display: none !important;
}
.confirm-dialog {
position: relative;
overflow: auto;
width: 100%;
padding-top: 44px;
background: #fff;
border-radius: ${h.r.borderRadius};
.confirm-content {
display: flex;
flex-direction: column;
align-items: center;
padding: 0 16px 16px;
text-align: center;
.title {
margin-bottom: 8px;
font-size: 24px;
line-height: 32px;
word-break: break-word;
overflow-wrap: break-word;
}
.desc {
margin-bottom: 24px;
color: ${h.r.colors.gray500};
font-size: 18px;
line-height: 24px;
text-align: center;
word-break: break-word;
overflow-wrap: break-word;
}
.btn-group {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
button {
margin: 0 4px 0.5rem;
}
}
}
}
.thumbnail-container {
width: 80px;
height: 80px;
margin-bottom: 32px;
.thumbnail {
width: 100%;
height: 100%;
}
&.is-icon {
display: flex;
align-items: center;
justify-content: center;
background: #e0e9fc;
border-radius: 1rem;
.thumbnail {
width: 40px;
height: 40px;
}
}
}
&[data-is-marrybaby='true'] {
.popup-frame {
> div:first-child {
overflow: hidden;
border-radius: 1rem;
&[data-open='true'] {
${o.M.mbDown} {
top: 100%;
transform: translate(-50%, -100%);
max-width: unset;
width: 100%;
background: unset;
overflow: unset;
}
}
}
.popup-content {
.close-button {
${o.M.mbDown} {
display: none;
}
}
.confirm-dialog {
${o.M.mbDown} {
background: unset;
position: relative;
overflow-x: hidden;
&::before {
content: '';
width: 200%;
background: #fff;
position: absolute;
left: 50%;
top: 0;
transform: translateX(-50%);
z-index: -1;
height: 100%;
border-top-left-radius: 100%;
border-top-right-radius: 100%;
}
}
.confirm-content {
padding: 0 40px 40px;
${o.M.mbDown} {
padding-left: 1.5rem;
padding-right: 1.5rem;
}
.btn-group {
width: 100%;
justify-content: space-between;
button {
flex: 1;
margin: 0;
&:first-child {
margin-right: 0.5rem;
}
}
}
}
}
}
.thumbnail-container {
${o.M.mbDown} {
display: none;
}
&.is-icon {
background: #ffeaf1;
border-radius: 24px;
}
&.is-mobile {
position: absolute;
top: 0;
left: 50%;
display: none;
width: 48px;
height: 48px;
transform: translate(-50%, -50%);
&.is-icon {
border-radius: 1rem;
.thumbnail {
width: 24px;
height: 24px;
}
}
${o.M.mbDown} {
display: flex;
}
}
}
}
}
`,PopupDanger=({className:e,isMarryBaby:t,style:n,title:d,description:h,acceptText:m,cancelText:u,onAccept:p,onCancel:g,thumbnail:b,isThumbnailIcon:f,onClose:E,acceptBtnTracking:v,acceptBtnProps:w,cancelBtnProps:y})=>{let{data:{env:{isMarryBaby:C}}}=(0,a.useContext)(c.T),x="boolean"==typeof t?t:C,[L,k]=(0,a.useState)(!1);return((0,a.useEffect)(()=>((0,o.t)(!0),setTimeout(()=>k(!0),0),()=>(0,o.t)(!1)),[]),"undefined"==typeof window)?null:s.createPortal(a.createElement(M,{"data-is-marrybaby":x,className:e,style:n,"data-open":L},a.createElement(PopupFrame,{className:"popup-frame",isOpen:L,onClose:E},a.createElement("div",{className:"confirm-dialog",onClick:e=>e.stopPropagation()},a.createElement("div",{className:"confirm-content"},b&&a.createElement("div",{className:`thumbnail-container ${f?"is-icon":""}`},a.createElement("img",{className:"thumbnail",src:b,loading:"lazy"})),a.createElement(l.H,{className:"title",tag:"h2"},d),a.createElement(i.T,{className:"desc",size:"lg"},h),a.createElement("div",{className:"btn-group"},a.createElement(r.B,Object.assign({theme:x?"marryBaby":"helloSites",size:"md",color:"tertiary",onClick:()=>{null==p||p(),null==E||E()}},w,v),m),a.createElement(r.B,Object.assign({theme:x?"marryBaby":"helloSites",size:"md",onClick:()=>{null==g||g(),null==E||E()}},y),u)))),x&&b&&a.createElement("div",{className:`thumbnail-container is-mobile ${f?"is-icon":""}`},a.createElement("img",{className:"thumbnail",src:b,loading:"lazy"})))),(0,o.a)())},H=d.Z.div`
padding: 1rem;
border-top: 1px solid #f2f2f2;
&[data-is-reply='true'] {
padding-right: 0;
padding-left: 0;
border-top: 1px solid #e4e8ec;
margin-right: 1rem;
margin-left: 1rem;
}
.error-text {
padding: 1rem;
color: ${h.r.colors.red700};
}
.reply-to-container {
display: flex;
justify-content: space-between;
padding-bottom: 0.75rem;
margin-top: -0.25rem;
.icon-close-comment {
width: 16px;
height: 16px;
cursor: pointer;
}
a {
text-decoration: none;
}
}
.input-container {
display: flex;
align-items: center;
.avatar-wrapper {
display: flex;
flex-shrink: 0;
align-items: center;
margin-right: 0.5rem;
&.avatar-wrapper-reply {
width: 32px;
height: 32px;
.avatar {
width: 32px;
height: 32px;
}
}
}
.input-wrapper {
margin-right: 0.5rem;
&[data-has-error] {
.as-input {
border-color: ${h.r.colors.red700};
}
}
.as-input {
.textarea {
width: 100%;
max-height: 225px;
min-height: 75px;
.ql-toolbar {
padding: 0;
}
.ql-editor {
padding-left: 0;
padding-right: 0;
}
.quill {
height: 0;
}
}
width: 100%;
padding: 12px 16px;
border: solid 1px ${h.r.colors.gray200};
border-radius: ${h.r.borderRadius};
&:active,
&:focus {
border-color: ${h.r.colors.primaryBase};
box-shadow: 0px 0px 2px 2px ${h.r.colors.primary200};
}
&:disabled {
background-color: ${h.r.colors.gray100};
cursor: not-allowed;
}
span {
&[data-error='true'] {
color: red;
text-decoration: underline;
}
}
}
&[data-has-action-icon] {
.as-input {
padding: 12px 48px 12px 16px;
}
}
&[data-has-display-icon] {
.as-input {
padding: 12px 16px 12px 48px;
}
}
&[data-has-action-icon][data-has-display-icon] {
.as-input {
padding: 12px 48px;
}
}
&[data-size='lg'] {
.as-input {
font-size: 16px;
font-weight: ${h.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'] {
.as-input {
font-weight: ${h.r.sizes.fwRegular};
line-height: 22px;
${o.M.mbDown} {
font-size: 14px;
line-height: 1.2;
}
${o.M.mbUp} {
font-size: 16px;
line-height: 1.2;
}
}
}
&[data-size='sm'] {
.as-input {
font-weight: ${h.r.sizes.fwRegular};
line-height: 20px;
${o.M.mbDown} {
font-size: 13px;
line-height: 1.5;
}
${o.M.mbUp} {
font-size: 13px;
line-height: 1.5;
}
}
}
}
.images-input-label {
height: 100%;
cursor: pointer;
.icon-images-input {
width: 24px;
height: 24px;
vertical-align: middle;
}
}
.send-button {
display: flex;
width: 40px;
height: 40px;
flex-shrink: 0;
align-items: center;
justify-content: center;
padding: 0;
border: none;
&.send-button-post {
background: ${h.r.colors.neutral100};
border-radius: 50%;
}
.icon-enter {
width: 20px;
height: 20px;
vertical-align: middle;
}
&[data-is-loading='true'] {
> div {
display: flex;
align-items: center;
justify-content: center;
}
}
}
}
.preview-images-container {
margin-top: 1rem;
.image-src-wrapper {
position: relative;
width: 100%;
padding-top: 66.67%;
&:not(:last-child) {
margin-bottom: 1rem;
}
.preview-image {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
}
.icon-close-circle {
position: absolute;
top: 10px;
right: 10px;
width: 20px;
height: 20px;
cursor: pointer;
}
}
}
`,z=(0,a.createContext)({}),getCommentFormBody=({postId:e,message:t,photos:n,link:a,locale:r,sanitizeFunction:l,replyingUserId:i,replyingUserName:o,replyingId:s})=>(0,m.a)(void 0,void 0,void 0,function*(){let c=new FormData,d=(0,E.k)(t.replace(/(\ )+/g," "),l),h=(0,E.i)(d);if(n&&n.length>0){let e=yield Promise.all(null==n?void 0:n.map(e=>(0,E.u)(e,r)));e.filter(Boolean).slice(0,b.M).forEach(e=>{c.append("images[]",e)})}return a&&c.append("link",a),null==h||h.forEach(e=>{c.append("mention_ids[]",e)}),c.append("post_id",e),s&&c.append("parent_id",s),i&&(h.unshift(i),d=`[mention+id="${i}"+name="${(o||"").replace('"',"'")}"]${d}`,c.append("parent_user_id",String(i))),c.append("content",d),c.append("content",d),c}),submitComment=(e,t)=>(0,m.a)(void 0,void 0,void 0,function*(){return(0,c.e)((0,c.f)(f.yy.COMMENT.CREATE,{_locale:t}),"POST",{data:e})}),decodeCommentBody=e=>{try{let t=e.match(/\[@([^\]]+)\]/),n=t?t[0].replace("[@","").replace("]",""):"",a=e.replace(/\[@([^\]]+)\]/,"");return{text:a.trim(),replyingTo:n}}catch(e){}return{text:""}},submitReply=(e,t)=>(0,m.a)(void 0,void 0,void 0,function*(){return(0,c.e)((0,c.f)(f.yy.COMMENT.REPLY,{_locale:t}),"POST",{data:e})}),likeUnlikeComment=({commentId:e,setLike:t=!1,locale:n})=>(0,m.a)(void 0,void 0,void 0,function*(){return(0,c.e)((0,c.f)(t?f.yy.COMMENT.LIKE:f.yy.COMMENT.UNLIKE,{_locale:n,id:e}),"GET")}),deleteComment=({id:e,locale:t})=>(0,c.e)((0,c.f)(f.yy.COMMENT.DELETE,{_locale:t,id:e}),"DELETE"),InputCommentBar=({isReply:e,className:t,onClose:n,replyToName:l,style:o,replyingId:s,replyingUser:d,onPostSuccess:h,post:f,isMarryBaby:E})=>{let{action:{pushNotifications:x,sanitizeFunction:L},data:{userInfo:k,locale:S,env:{isMarryBaby:I}}}=(0,a.useContext)(c.T),{t:O}=(0,p.u)(),{onSelectImages:R,onRemoveImage:M,imageSrcs:N,onRemoveAllImages:T,imageFiles:F}=useImagePicker(),[P,B]=(0,a.useState)(""),{trigger:A}=(0,a.useContext)(z),[Z,D]=(0,a.useState)(!1),_=(0,a.useRef)(null),V=(0,a.useRef)(null),$=(0,a.useRef)(null),[q,W]=(0,a.useState)([]),[U,G]=(0,a.useState)([]),[Q,Y]=(0,a.useState)(null);return(0,a.useEffect)(()=>{var e;null===(e=$.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start"}),setTimeout(()=>{var e;null===(e=V.current)||void 0===e||e.focus()},400)},[A]),a.createElement(H,{"data-is-reply":e,className:t,style:o},e&&a.createElement("div",{className:"reply-to-container"},a.createElement(i.T,{size:"p4"},a.createElement("span",{dangerouslySetInnerHTML:{__html:O("inputComment.replyTo",{name:`@${l||""}`})}})),a.createElement("img",{src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='17' fill='none'%3e%3ccircle cx='8' cy='8.5' r='6.667' fill='white' stroke='%23404040'/%3e%3cpath stroke='%23404040' stroke-linecap='round' stroke-linejoin='round' d='m10 6.5-4 4M6 6.5l4 4'/%3e%3c/svg%3e",className:"icon-close-comment",onClick:()=>n&&n(),loading:"lazy"})),a.createElement("div",{className:"input-container",ref:$},a.createElement(y.U,{className:`avatar-wrapper ${e?"avatar-wrapper-reply":""}`,avatar:(null==k?void 0:k.id)?k.avatar:b.D,username:(null==k?void 0:k.name)||(null==k?void 0:k.username)}),a.createElement("input",{ref:_,onChange:R,type:"file",multiple:!0,accept:"image/png,image/jpeg",name:"images",style:{display:"none"}}),a.createElement(u.I,{value:P,name:"input",size:"md",className:"input-wrapper",displayIcon:a.createElement("img",{src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3cpath stroke='%232D87F3' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='M10.754 4.854H4.492a1.79 1.79 0 0 0-1.789 1.789v12.524a1.79 1.79 0 0 0 1.79 1.789h12.523a1.79 1.79 0 0 0 1.79-1.79v-6.261'/%3e%3cpath stroke='%232D87F3' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='M17.463 3.512a1.898 1.898 0 0 1 2.684 2.684l-8.498 8.498-3.579.895.895-3.579z'/%3e%3c/svg%3e",loading:"lazy"}),CustomInput:a.createElement("div",{className:"as-input"},a.createElement(C.R,{className:"textarea",html:P,onChange:B,onImagePickerClick:()=>{var e;return null===(e=_.current)||void 0===e?void 0:e.click()},bannedWords:U,onPreviewUrlChange:Y,onInvalidUrlsChange:W,setEditorRef:e=>V.current=e,isReplying:e}))}),a.createElement(r.B,{theme:("boolean"==typeof E?E:I)?"marryBaby":"helloSites",className:"send-button",size:"sm",onClick:()=>(0,m.a)(void 0,void 0,void 0,function*(){var t,a,r,l,i,o,c,m,u;if((null==f?void 0:f.id)&&!Z){D(!0);try{let p=yield getCommentFormBody(Object.assign({message:P,photos:F,postId:String(f.id),link:null==Q?void 0:Q.url,sanitizeFunction:L,locale:S},e&&s?{replyingUserId:String((null==d?void 0:d.id)||(null===(t=null==f?void 0:f.author)||void 0===t?void 0:t.id)||""),replyingId:s,replyingUserName:(null==d?void 0:d.name)||(null==d?void 0:d.username)||""}:{})),b=yield e&&s?submitReply(p,S):submitComment(p,S),E=null==b?void 0:b.data;(null==E?void 0:E.id)&&!(null===(r=null===(a=null==b?void 0:b.messages)||void 0===a?void 0:a.moderation)||void 0===r?void 0:r.type)?(e=>{B(""),T(),n&&n();let t=(0,g.g)(e.data);"string"==typeof t.images&&(t.images=JSON.parse(t.images)),h&&h(t)})(b):(null===(i=null===(l=null==b?void 0:b.messages)||void 0===l?void 0:l.moderation)||void 0===i?void 0:i.type)==="banned"?(x({title:O("notification.comment.blocked.title"),message:O("notification.comment.blocked.message"),type:"danger"}),b.messages.moderation.words&&G(b.messages.moderation.words)):(null===(c=null===(o=null==b?void 0:b.messages)||void 0===o?void 0:o.moderation)||void 0===c?void 0:c.type)==="suspect"?(x({title:O("notification.comment.suspect.title"),message:O("notification.comment.suspect.message"),type:"warning"}),B(""),T(),n&&n()):(null===(m=null==b?void 0:b.messages)||void 0===m?void 0:m.find(e=>{var t;return!!(null===(t=null==e?void 0:e.includes)||void 0===t?void 0:t.call(e,"suspend"))}))?(x({message:O("notification.suspend.message"),type:"warning"}),B(""),T(),n&&n()):x({title:"",message:(null===(u=null==b?void 0:b.messages)||void 0===u?void 0:u[0])||O("notification.comment.somethingWrong"),type:"danger"})}catch(e){x({title:"",message:O("notification.comment.somethingWrong"),type:"danger"})}D(!1)}}),isLoading:Z,isDisabled:!!(null==q?void 0:q.length)||Z||!P||(null==P?void 0:P.length)<2||!P.trim()},a.createElement("img",{src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='20' height='21' fill='none'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m7.5 9.734-3.75 3.75 3.75 3.75'/%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M16.25 4.734v5.569c0 .843-.33 1.653-.915 2.25a3.1 3.1 0 0 1-2.21.931H3.75'/%3e%3c/svg%3e",className:"icon-enter",loading:"lazy"}))),(null==q?void 0:q.length)?a.createElement("div",{className:"error-text"},O("notification.limitUrlDomain")):null,(!N||0===N.length)&&Q&&a.createElement("div",{className:"link-preview-wrapper"},Q.isFetching?a.createElement(w.L,null):a.createElement(a.Fragment,null,a.createElement(v.C,{title:Q.title,url:Q.url||"#",image:Q.image,noRefetch:!0}),a.createElement("img",{src:j,className:"icon-close",onClick:()=>Y(null),loading:"lazy"}))),N&&N.length>0&&a.createElement("div",{className:"preview-images-container"},N.map((e,t)=>a.createElement("div",{key:t,className:"image-src-wrapper"},a.createElement("img",{className:"preview-image",src:e,loading:"lazy"}),a.createElement("img",{src:j,className:"icon-close-circle",onClick:()=>M(t),loading:"lazy"})))))},SharePopup=({trackingCategory:e,className:t,style:n,url:r,text:l,onClose:i})=>{let{data:{env:{isMarryBaby:s}}}=(0,a.useContext)(c.T),{t:d}=(0,p.u)(),[h,m]=(0,a.useState)(!1);return(0,a.useEffect)(()=>((0,o.t)(!0),setTimeout(()=>m(!0),0),()=>(0,o.t)(!1)),[]),a.createElement(x.h,null,a.createElement(N,{"data-is-marrybaby":s,className:t,style:n},a.createElement(PopupFrame,{className:"share-popup",isOpen:h,onClose:i,heading:d("bottomBar.share")},h&&a.createElement(I.r,{trackingCategory:e,shareUrl:r||("undefined"!=typeof window?window.location.href:""),title:l}))))},N=d.Z.div`
.share-popup {
> div:first-child {
height: unset;
}
}
.custom-share__header {
display: flex;
flex-wrap: no-wrap;
align-items: center;
padding: 1rem;
border-bottom: 1px solid ${h.r.colors.neutral100};
margin-bottom: 16px;
.custom-share__header-image {
width: 38px;
height: 38px;
flex-shrink: 0;
& > img {
width: 100%;
height: 100%;
object-fit: cover;
object-position: center;
}
}
.custom-share__header-info {
flex: 1;
padding: 0 8px;
word-break: break-word;
[data-tag='h4'] {
margin-bottom: 8px;
font-size: 14px;
font-weight: bold;
line-height: 14px;
}
[data-size='md'] {
color: #a5a5a5;
font-size: 14px;
line-height: 14px;
}
}
}
&[data-is-marrybaby='true'] {
.share-popup {
> div:first-child {
overflow: hidden;
border-radius: 1rem;
&[data-open='true'] {
${o.M.mbDown} {
max-width: unset;
width: 100%;
top: 100%;
transform: translate(-50%, -100%);
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
}
}
.close-button {
display: block;
}
.popup-content {
.header {
display: block;
padding: 1rem;
background-color: rgb(243, 243, 243);
}
.content {
padding-bottom: 1rem;
}
}
.share-mb-text {
margin: 1rem 1rem 0.5rem;
}
}
}
`,T=d.Z.div`
padding: 0 8px;
margin-top: 18px;
.report-list {
margin-bottom: 18px;
.report-item {
display: flex;
align-items: center;
margin-bottom: 10px;
font-weight: 600;
& > img {
width: 12px;
height: 12px;
margin-right: 8px;
}
.__label {
font-size: 14px;
}
}
}
.report-submit {
width: 100%;
}
&[data-is-marrybaby='true'] {
padding: 0 1rem 1rem;
}
`;var F="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath stroke='%23737373' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12M8 5v3M8 11h.007'/%3e%3c/svg%3e";let SubmitReportForm=({className:e,style:t,reason:n,reasonText:l,onClose:o,postId:s})=>{let{data:{locale:d,env:{isMarryBaby:u}},action:{pushNotifications:g}}=(0,a.useContext)(c.T),{t:b}=(0,p.u)(),[f,E]=(0,a.useState)(!1);return a.createElement(T,{"data-is-marrybaby":u,className:e,style:t},a.createElement("ul",{className:"report-list"},a.createElement("li",{className:"report-item"},a.createElement("img",{src:F,loading:"lazy"}),a.createElement(i.T,{className:"__label",color:h.r.colors.gray800,size:"p4"},l))),a.createElement(r.B,{theme:u?"marryBaby":"helloSites",className:"report-submit",size:"lg",color:"primary",isLoading:f,onClick:()=>(0,m.a)(void 0,void 0,void 0,function*(){if(s&&!f){E(!0);try{let e=yield reportPost({id:s,reason:n,locale:d});(null==e?void 0:e.status)===1&&(g({message:"Post reported",type:"success"}),o&&o())}catch(e){}E(!1)}})},b("submit")))}},s8AM:function(e,t,n){n.d(t,{B:function(){return BmiForm},F:function(){return FitnessToolUnitPicker},H:function(){return N},N:function(){return NewsletterCheckbox},Q:function(){return Question1Label},a:function(){return Question2Label},b:function(){return Question2Description}});var a=n("HJpP"),r=n("q1tI"),l=n("wUmw"),i=n("PHlL"),o=n("f2kC"),s=n("/npG"),c=n("SPK5"),d=n("Eso5"),h=n("8vDj"),m=n("Zo/N"),u=n("mYVa"),p=n("lSJj"),g=n("TIp3"),b=n("OAL+"),f=n("iuhU"),E=n("C/sX"),v=n("StZb"),w=n("oZWv"),y=n("hDz7"),C=n("L+vc"),x=n("1iCw"),L=n("Qcmz"),k=n("SlSK"),S=n("qABS"),I=n("Bw1v"),O=n("xrdX"),R=n("mx4j");let Question1Label=e=>{var{LabelWrapper:t}=e,n=(0,a._)(e,["LabelWrapper"]);let{t:l}=(0,C.u)(),i=t?{}:Object.assign({size:"p2"},n),o=t||w.T;return r.createElement(o,Object.assign({},i),l("bmi.question.weightLossSupport"))},Question2Label=e=>{var{LabelWrapper:t}=e,n=(0,a._)(e,["LabelWrapper"]);let{t:l}=(0,C.u)(),i=t?{}:Object.assign({size:"p2"},n),o=t||w.T;return r.createElement(o,Object.assign({},i),l("bmi.question.glp1Awareness"))},Question2Description=e=>{var{LabelWrapper:t}=e,n=(0,a._)(e,["LabelWrapper"]);let{t:l}=(0,C.u)(),i=t?{}:Object.assign({size:"p2"},n),o=t||w.T;return r.createElement(o,Object.assign({},i),l("bmi.question.glp1Awareness.desc"))},j=(0,r.createContext)({});var M=(0,s.k)(()=>({label:{marginTop:2,cursor:"pointer",userSelect:"none"}}));let NewsletterCheckbox=e=>{var{labelTextProps:t,checked:n,LabelWrapper:l,useCollapse:i=!0}=e,o=(0,a._)(e,["labelTextProps","checked","LabelWrapper","useCollapse"]);let{t:s}=(0,C.u)(),[h,m]=(0,r.useState)(!i),[u,p]=(0,r.useState)(!0),[g,b]=(0,r.useState)(n),f=l?{}:Object.assign({size:"p3"},t),E=l||w.T,{classes:y}=M(void 0,{name:"NewsletterCheckbox"});return r.createElement(c.k,{gap:8,align:"flex-start"},r.createElement(v.d,Object.assign({},o,{label:void 0,size:"sm",checked:g,onChange:e=>{u?p(!1):b(e.currentTarget.checked)},styles:{labelWrapper:{display:"none"}}})),r.createElement(d.x,null,r.createElement(E,Object.assign({},f,{onClick:()=>{i&&m(e=>!e)},className:y.label,lineClamp:h?void 0:1}),s("bmi.newsletter.label"))))},FitnessToolUnitPicker=({displayValue:e,field:t,onChange:n})=>{let a=(0,h.rZ)(),l=a.colors.gray[1],i="height"===t?[{label:"cm",system:"metric"},{label:"ft",system:"imperial"}]:[{label:"kg",system:"metric"},{label:"lbs",system:"imperial"}];return r.createElement(m.v,{position:"bottom-end",withinPortal:!0,offset:0,styles:{dropdown:{backgroundColor:a.white,border:`${(0,u.h)(1)} solid ${l}`,borderRadius:12,boxShadow:"0px 0px 1px 0px #0000000A,0px 2px 8px 0px #0000000A,0px 10px 16px 0px #0000000A",padding:(0,u.h)(4),minWidth:(0,u.h)(90)},item:{fontSize:a.fontSizes.sm,lineHeight:1.4,padding:`${(0,u.h)(6)} ${(0,u.h)(10)}`,borderRadius:a.radius.xs,color:a.colors.dark[9],"&[data-hovered]":{backgroundColor:"transparent"}}}},r.createElement(m.v.Target,null,r.createElement(p.k,{type:"button",sx:e=>({height:"100%",display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%",paddingRight:e.spacing.xs,gap:4})},r.createElement(g.x,{component:"span",size:"sm",sx:{lineHeight:1}},e),r.createElement(L.C,{style:{width:18,height:18}}))),r.createElement(m.v.Dropdown,null,i.map(l=>{let i=e===l.label;return r.createElement(m.v.Item,{key:l.label,onClick:()=>n(l.system,t),sx:{backgroundColor:i?a.colors.gray[1]:void 0,"&[data-hovered]":{backgroundColor:i?a.colors.gray[1]:"transparent"}}},l.label)})))},DefaultForm=e=>{var t,n,i,o,s,h,m;let{t:u,locale:p}=(0,C.u)(),{classes:g={}}=(0,r.useContext)(k.C),{control:E,bmiGenerated:w,linkTool:y,submitProps:L,withAdditionalQuestion:S,classes:R={},enableUnitPicker:M,unitSystem:H,unitHeight:z,unitWeight:T,onUnitChange:F}=(0,r.useContext)(j),P={body:{alignItems:"center"}};return r.createElement(x.H,Object.assign({formLayout:"default"},e),r.createElement(N,{isMobile:e.isMobile,gutter:4},r.createElement(b.K,{spacing:4,px:16},r.createElement(l.Qr,{name:"gender",control:E,rules:null===(t=w.gender)||void 0===t?void 0:t.rule,render:({field:{onChange:e},fieldState:{error:t}})=>r.createElement("div",null,r.createElement(N.GenderControl,{LabelWrapper:N.Label,error:void 0,onChange:e,gap:4}),(null==t?void 0:t.message)&&r.createElement(N.Error,{label:t.message}))}),r.createElement(l.Qr,{name:"age",control:E,rules:null===(n=w.age)||void 0===n?void 0:n.rule,render:({field:{name:e,value:t,onChange:n},fieldState:{error:a}})=>r.createElement("div",null,r.createElement(N.InputNumber,{label:r.createElement(N.Label,null,u("bmi.ageInput")),placeholder:u("tools.inputPlaceholder",{content:"25"}),name:e,value:t,onChange:n,min:0,rightSection:u("bmi.ageInput.desc"),classNames:{rightSection:R.inputRightSection}}),(null==a?void 0:a.message)&&r.createElement(N.Error,{label:a.message}))}),r.createElement(l.Qr,{name:"height",control:E,rules:null===(i=w.height)||void 0===i?void 0:i.rule,render:({field:{name:e,value:t,onChange:n},fieldState:{error:a}})=>r.createElement("div",null,r.createElement(N.InputNumber,{label:r.createElement(N.Label,null,u("bmi.heightInput")),placeholder:u("tools.inputPlaceholder",{content:"imperial"===H?6:170}),name:e,value:t,onChange:n,min:0,precision:1,inputMode:"decimal",rightSection:M?r.createElement(FitnessToolUnitPicker,{displayValue:z,field:"height",onChange:F}):u("bmi.heightInput.desc"),rightSectionWidth:70,classNames:{rightSection:R.inputRightSection},styles:M?void 0:()=>({rightSection:{paddingRight:0}})}),(null==a?void 0:a.message)&&r.createElement(N.Error,{label:a.message}))}),r.createElement(l.Qr,{name:"weight",control:E,rules:null===(o=w.weight)||void 0===o?void 0:o.rule,render:({field:{name:e,value:t,onChange:n},fieldState:{error:a}})=>r.createElement("div",null,r.createElement(N.InputNumber,{label:r.createElement(N.Label,null,u("bmi.weightInput")),placeholder:u("tools.inputPlaceholder",{content:"imperial"===H?130:60}),name:e,value:t,onChange:n,precision:1,inputMode:"decimal",min:0,rightSection:M?r.createElement(FitnessToolUnitPicker,{displayValue:T,field:"weight",onChange:F}):u("bmi.weightInput.desc"),rightSectionWidth:70,classNames:{rightSection:R.inputRightSection},styles:M?void 0:()=>({rightSection:{paddingRight:0}})}),(null==a?void 0:a.message)&&r.createElement(N.Error,{label:a.message}))})),S?r.createElement(r.Fragment,null,r.createElement(b.K,{spacing:4,px:16},r.createElement(l.Qr,{name:"question1",control:E,rules:null===(s=w.question1)||void 0===s?void 0:s.rule,render:({field:{value:e,onChange:t,name:n},fieldState:{error:a}})=>r.createElement("div",null,r.createElement(v.R.Group,{name:n,value:e,onChange:t,sx:{flex:1},label:r.createElement(Question1Label,{LabelWrapper:N.Label}),size:"lg"},r.createElement(c.k,{gap:"lg"},r.createElement(v.R,{size:"sm",value:"1",label:r.createElement(N.OptionLabel,null,u("switchBtn.yes")),styles:P}),r.createElement(v.R,{size:"sm",value:"0",label:r.createElement(N.OptionLabel,null,u("switchBtn.no")),styles:P}))),(null==a?void 0:a.message)&&r.createElement(N.Error,{label:a.message}))}),r.createElement(l.Qr,{name:"question2",control:E,rules:null===(h=w.question2)||void 0===h?void 0:h.rule,render:({field:{name:e,value:t,onChange:n},fieldState:{error:a}})=>r.createElement("div",null,r.createElement(v.R.Group,{name:e,value:t,onChange:n,sx:{flex:1},label:r.createElement(Question2Label,{LabelWrapper:N.Label}),size:"lg",description:p!==I.L.Malaysia&&r.createElement(Question2Description,{LabelWrapper:N.SubLabel})},r.createElement(c.k,{gap:"lg"},r.createElement(v.R,{size:"sm",value:"1",label:r.createElement(N.OptionLabel,null,u("switchBtn.yes")),styles:P}),r.createElement(v.R,{size:"sm",value:"0",label:r.createElement(N.OptionLabel,null,u("switchBtn.no")),styles:P}))),(null==a?void 0:a.message)&&r.createElement(N.Error,{label:a.message}))})),r.createElement(d.x,{className:(0,f.default)(R.newsletterBlock,g.newsletterBlock)},r.createElement(b.K,{spacing:8,px:16,py:12},r.createElement(l.Qr,{name:"newsletter",control:E,rules:null===(m=w.newsletter)||void 0===m?void 0:m.rule,render:e=>{var t=e.field,{value:n,onChange:l,name:i}=t,o=(0,a._)(t,["value","onChange","name"]);return r.createElement(NewsletterCheckbox,Object.assign({size:"sm",onChange:e=>l(e.currentTarget.checked),name:i,checked:!!n},o))}}),r.createElement(x.H.Submit,Object.assign({className:"bmi-btn bmi--btn-submit",dataEventCategory:"Health Tool",dataEventAction:"BMI",dataEventLabel:`https://${O.v[p]}/${y}`,type:"submit",fullWidth:!0},L),u("bmi.submit"))))):r.createElement(d.x,{px:16,sx:{paddingBottom:8}},r.createElement(x.H.Submit,Object.assign({className:"bmi-btn bmi--btn-submit",dataEventCategory:"Health Tool",dataEventAction:"BMI",dataEventLabel:`https://${O.v[p]}/${y}`,type:"submit",fullWidth:!0},L),u("bmi.submit")))))};var H=(0,s.k)(e=>({newsletterBlock:{backgroundColor:e.colors.neutral[0],borderBottomLeftRadius:"inherit",borderBottomRightRadius:"inherit",".bmi-btn":{marginTop:0}},inputRightSection:{fontSize:(0,u.h)(13),lineHeight:(0,u.h)(24),color:e.colors.gray[4],justifyContent:"flex-end",paddingRight:8,whiteSpace:"nowrap"}}));let InlineForm=e=>{var t,n,i,o,s,h,m,p;let{t:g,locale:E}=(0,C.u)(),{control:y,bmiGenerated:L,isTouched:R,linkTool:M,submitProps:H,withAdditionalQuestion:z,enableUnitPicker:N,unitSystem:T,unitHeight:F,unitWeight:P,onUnitChange:B}=(0,r.useContext)(j),{classes:A={},variant:Z}=(0,r.useContext)(k.C),{classes:D={}}=(0,r.useContext)(j);return r.createElement(x.H,Object.assign({formLayout:"inline"},e),r.createElement(l.Qr,{name:"gender",control:y,rules:null===(t=L.gender)||void 0===t?void 0:t.rule,render:({field:{onChange:e},fieldState:{error:t}})=>r.createElement(x.H.FormRow,null,r.createElement(x.H.BorderInlineControl,{label:g("tools.selectGender"),width:"none",errorMess:R&&(null==t?void 0:t.message)},r.createElement(S.G,{type:"radio",hideLabel:!0,error:R?r.createElement(r.Fragment,null):"",onChange:e})))}),r.createElement(l.Qr,{name:"age",control:y,rules:null===(n=L.age)||void 0===n?void 0:n.rule,render:({field:{name:e,value:t,onChange:n},fieldState:{error:a}})=>r.createElement(x.H.FormRow,null,r.createElement(x.H.BorderInlineControl,{label:g("bmi.ageInput"),errorMess:R&&(null==a?void 0:a.message)},r.createElement(v.I.Number,{placeholder:g("tools.inputPlaceholder",{content:"25"}),name:e,value:t,onChange:n,error:R&&(null==a?void 0:a.message)?r.createElement(r.Fragment,null):"",min:0,rightSection:r.createElement(x.H.Unit,null,g("tools.yearsOld")),styles:()=>({rightSection:{width:"auto"}})})))}),r.createElement(l.Qr,{name:"height",control:y,rules:null===(i=L.height)||void 0===i?void 0:i.rule,render:({field:{name:e,value:t,onChange:n},fieldState:{error:a}})=>r.createElement(x.H.FormRow,null,r.createElement(x.H.BorderInlineControl,{label:g("bmi.heightInput"),errorMess:R&&(null==a?void 0:a.message)},r.createElement(v.I.Number,{placeholder:g("tools.inputPlaceholder",{content:"imperial"===T?6:170}),name:e,value:t,onChange:n,min:0,precision:1,inputMode:"decimal",error:R&&(null==a?void 0:a.message)?r.createElement(r.Fragment,null):"",rightSection:N?r.createElement(FitnessToolUnitPicker,{displayValue:F,field:"height",onChange:B}):r.createElement(x.H.Unit,{styles:{root:{paddingRight:0}}},g("bmi.heightInput.desc")),rightSectionWidth:70,styles:N?void 0:()=>({rightSection:{paddingRight:0}})})))}),r.createElement(l.Qr,{name:"weight",control:y,rules:null===(o=L.weight)||void 0===o?void 0:o.rule,render:({field:{name:e,value:t,onChange:n},fieldState:{error:a}})=>r.createElement(x.H.FormRow,null,r.createElement(x.H.BorderInlineControl,{label:g("bmi.weightInput"),errorMess:R&&(null==a?void 0:a.message)},r.createElement(v.I.Number,{placeholder:g("tools.inputPlaceholder",{content:"imperial"===T?130:60}),name:e,value:t,onChange:n,error:R&&(null==a?void 0:a.message)?r.createElement(r.Fragment,null):"",precision:1,inputMode:"decimal",min:0,rightSection:N?r.createElement(FitnessToolUnitPicker,{displayValue:P,field:"weight",onChange:B}):r.createElement(x.H.Unit,{styles:{root:{paddingRight:0}}},g("bmi.weightInput.desc")),rightSectionWidth:70,styles:N?void 0:()=>({rightSection:{paddingRight:0}})})))}),z?r.createElement(r.Fragment,null,r.createElement(l.Qr,{name:"question1",control:y,rules:null===(s=L.question1)||void 0===s?void 0:s.rule,render:({field:{value:e,onChange:t,name:n},fieldState:{error:a}})=>r.createElement(x.H.FormRow,null,r.createElement(v.R.Group,{name:n,value:e,onChange:t,sx:{flex:1},label:r.createElement(w.T,{size:"s4",weight:"semiBold",span:!0},g("bmi.question.weightLossSupport")),size:"lg"},r.createElement(c.k,{gap:"lg",sx:{paddingTop:(0,u.h)(8)}},r.createElement(v.R,{size:"sm",value:"1",label:g("switchBtn.yes")}),r.createElement(v.R,{size:"sm",value:"0",label:g("switchBtn.no")}))),R&&(null==a?void 0:a.message)&&r.createElement(v.e,{label:a.message,textProps:{size:"p4"},sx:{marginTop:6}}))}),r.createElement(l.Qr,{name:"question2",control:y,rules:null===(h=L.question2)||void 0===h?void 0:h.rule,render:({field:{name:e,value:t,onChange:n},fieldState:{error:a}})=>r.createElement(x.H.FormRow,null,r.createElement(v.R.Group,{name:e,value:t,onChange:n,sx:{flex:1},label:r.createElement(w.T,{size:"s4",weight:"semiBold",span:!0},g("bmi.question.glp1Awareness")),size:"lg",description:E!==I.L.Malaysia&&r.createElement(w.T,{style:{fontSize:"10px"},span:!0},g("bmi.question.glp1Awareness.desc"))},r.createElement(c.k,{gap:"lg",sx:{paddingTop:(0,u.h)(8)}},r.createElement(v.R,{size:"sm",value:"1",label:g("switchBtn.yes")}),r.createElement(v.R,{size:"sm",value:"0",label:g("switchBtn.no")}))),R&&(null==a?void 0:a.message)&&r.createElement(v.e,{label:a.message,textProps:{size:"p4"},sx:{marginTop:6}}))}),"gray"===Z||"violet"===Z?r.createElement(r.Fragment,null,r.createElement(l.Qr,{name:"newsletter",control:y,rules:null===(m=L.newsletter)||void 0===m?void 0:m.rule,render:e=>{var t=e.field,{value:n,onChange:l,name:i}=t,o=(0,a._)(t,["value","onChange","name"]);return r.createElement(x.H.FormRow,null,r.createElement(v.d,Object.assign({size:"sm",label:r.createElement(w.T,{size:"p3"},g("bmi.newsletter.label")),onChange:e=>l(e.currentTarget.checked),name:i,checked:!!n},o)))}}),r.createElement(x.H.FormRow,{className:(0,f.default)(A.submitWrapper)},r.createElement(x.H.Submit,Object.assign({className:(0,f.default)("bmi-btn bmi--btn-submit",A.submitBtn),dataEventCategory:"Health Tool",dataEventAction:"BMI",dataEventLabel:`https://${O.v[E]}/${M}`,type:"submit"},H),g("bmi.submit")))):r.createElement(x.H.FormRow,{py:16,className:(0,f.default)(D.newsletterBlock,A.newsletterBlock)},r.createElement(b.K,{spacing:16},r.createElement(l.Qr,{name:"newsletter",control:y,rules:null===(p=L.newsletter)||void 0===p?void 0:p.rule,render:e=>{var t=e.field,{value:n,onChange:l,name:i}=t,o=(0,a._)(t,["value","onChange","name"]);return r.createElement(NewsletterCheckbox,Object.assign({size:"sm",labelTextProps:{size:"p4"},onChange:e=>l(e.currentTarget.checked),name:i,checked:!!n,useCollapse:!1},o))}}),r.createElement(d.x,{className:(0,f.default)(A.submitWrapper)},r.createElement(x.H.Submit,Object.assign({className:(0,f.default)("bmi-btn bmi--btn-submit",A.submitBtn),dataEventCategory:"Health Tool",dataEventAction:"BMI",dataEventLabel:`https://${O.v[E]}/${M}`,type:"submit"},H),g("bmi.submit")))))):r.createElement(x.H.FormRow,{className:(0,f.default)(A.submitWrapper)},r.createElement(x.H.Submit,Object.assign({className:"bmi-btn bmi--btn-submit",dataEventCategory:"Health Tool",dataEventAction:"BMI",dataEventLabel:`https://${O.v[E]}/${M}`,type:"submit"},H),g("bmi.submit"))))},BmiForm=e=>{var{value:t,onChange:n,onSubmit:s,bmiGenerated:c,bmiUnit:d,defaultUnitSystem:h,enableUnitPicker:m=!0,formLayout:u="default",submitProps:p,withAdditionalQuestion:g,isMobile:b}=e,f=(0,a._)(e,["value","onChange","onSubmit","bmiGenerated","bmiUnit","defaultUnitSystem","enableUnitPicker","formLayout","submitProps","withAdditionalQuestion","isMobile"]);let{classes:E}=H(void 0,{name:"BmiForm"}),{locale:v}=(0,C.u)(),[w,x]=(0,r.useState)(!1),L=(0,r.useMemo)(()=>h||"metric",[h]),[k,S]=(0,r.useState)(L),{control:I,handleSubmit:O,setValue:M,watch:z}=(0,l.cI)({defaultValues:{question1:void 0,question2:void 0,newsletter:!0}}),N=z(),{getHealthToolLink:T}=(0,i.u)(v),F=(0,r.useMemo)(()=>T(o.H.OVULATION),[T]),P="imperial"===k?"ft":"cm",B="imperial"===k?"lbs":"kg",convertHeightToCm=e=>"imperial"===k?30.48*e:e,convertWeightToKg=e=>"imperial"===k?.45359237*e:e,onInValid=()=>{x(!0)};(0,r.useEffect)(()=>{Object.keys(t||{}).forEach(e=>{M(e,null==t?void 0:t[e],{shouldTouch:!1,shouldDirty:!1,shouldValidate:!1})})},[t]),(0,r.useEffect)(()=>{n&&n(N)},[N]),(0,r.useEffect)(()=>{S(L)},[L]);let A=Object.assign({onSubmit:O(e=>(0,a.a)(void 0,void 0,void 0,function*(){let t="number"==typeof e.height?e.height:Number(e.height),n="number"==typeof e.weight?e.weight:Number(e.weight),a=m?Object.assign(Object.assign({},e),{bmi:(0,R.F)({height:convertHeightToCm(t),weight:convertWeightToKg(n)}),unit:k}):(()=>{let a=d.heightConvert(t),r=d.weightConvert(n);return Object.assign(Object.assign({},e),{height:a,weight:r,bmi:(0,R.F)({height:a,weight:r})})})();onInValid(),s&&s(a)}),onInValid)},f);return r.createElement(y.T,{variant:y.C.LEADGEN},r.createElement(j.Provider,{value:{control:I,bmiGenerated:c,isTouched:w,linkTool:F,submitProps:p,withAdditionalQuestion:g,classes:E,enableUnitPicker:m,unitSystem:k,unitHeight:P,unitWeight:B,onUnitChange:(e,t)=>{m&&e!==k&&(S(e),M("height","",{shouldDirty:!0,shouldValidate:!1}),M("weight","",{shouldDirty:!0,shouldValidate:!1}))}}},"inline"===u?r.createElement(InlineForm,Object.assign({},A)):r.createElement(DefaultForm,Object.assign({},A,{isMobile:b}))))},z=(0,r.createContext)({}),Error=e=>{let{errorLabelSize:t}=(0,r.useContext)(z);return r.createElement(v.e,Object.assign({textProps:{size:t},sx:{marginTop:5}},e))};var N=Object.assign(e=>{var t,n,l,i,o,s,{children:c,isMobile:d}=e,h=(0,a._)(e,["children","isMobile"]);let m=Object.assign({isMobile:d,labelSize:null!==(t=h.labelSize)&&void 0!==t?t:d?"p2":"s4",subLabelSize:null!==(n=h.subLabelSize)&&void 0!==n?n:"subText",optionLabelSize:null!==(l=h.optionLabelSize)&&void 0!==l?l:d?"p2":"s4",inputSize:null!==(i=h.inputSize)&&void 0!==i?i:d?"sm":"md",gutter:null!==(o=h.gutter)&&void 0!==o?o:d?4:12,errorLabelSize:null!==(s=h.errorLabelSize)&&void 0!==s?s:"p3"},h);return r.createElement(z.Provider,{value:m},c)},{Row:e=>{var{children:t}=e,n=(0,a._)(e,["children"]);let{gutter:l}=(0,r.useContext)(z);return r.createElement(E.r,Object.assign({gutter:l},n),t)},Col:e=>{var{children:t}=e,n=(0,a._)(e,["children"]);return r.createElement(E.r.Col,Object.assign({span:12},n),t)},SubLabel:e=>{var{children:t}=e,n=(0,a._)(e,["children"]);let{subLabelSize:l}=(0,r.useContext)(z);return r.createElement(w.T,Object.assign({size:l},n),t)},Label:e=>{var{children:t}=e,n=(0,a._)(e,["children"]);let{labelSize:l}=(0,r.useContext)(z);return r.createElement(w.T,Object.assign({size:l,weight:"semiBold"},n,{span:!0}),t)},OptionLabel:e=>{var{children:t}=e,n=(0,a._)(e,["children"]);let{optionLabelSize:l}=(0,r.useContext)(z);return r.createElement(w.T,Object.assign({size:l,weight:"regular"},n,{span:!0}),t)},Input:v.I,InputNumber:e=>{var{error:t}=e,n=(0,a._)(e,["error"]);let{inputSize:l}=(0,r.useContext)(z);return r.createElement("div",null,r.createElement(v.I.Number,Object.assign({size:l},n)),t&&r.createElement(Error,{label:t}))},GenderControl:e=>{let{inputSize:t}=(0,r.useContext)(z);return r.createElement(S.G,Object.assign({size:t},e))},Error})},StZb:function(e,t,n){n.d(t,{A:function(){return Avatar},B:function(){return Breadcrumbs},C:function(){return CaretDown},D:function(){return eu},E:function(){return ErrorIcon},F:function(){return Flag},I:function(){return eO},N:function(){return NumberInput},O:function(){return eN},P:function(){return eB},R:function(){return Radio},S:function(){return ea},a:function(){return Carousel},b:function(){return Anchor},c:function(){return AspectRatio},d:function(){return Checkbox},e:function(){return ErrorLabel},f:function(){return CentralCarousel},g:function(){return ChipButton},h:function(){return ErrorBoundary},i:function(){return ef},j:function(){return eH},k:function(){return eM},l:function(){return Accordion},m:function(){return ep},o:function(){return Popover},s:function(){return eP},u:function(){return es}});var a=n("HJpP"),r=n("q1tI"),l=n("h84G"),i=n("/npG"),o=n("mYVa"),s=n("F9pO"),c=n("gHhT"),d=n("gxre"),h=n("CmzK"),m=n("RZSM"),u=n("8vDj"),p=n("Eso5"),g=n("eRSo"),b=n("bpvy"),f=n("jUTz"),E=n("QJsO"),v=n("nVa/"),w=n("9Igr"),y=n("HXNK"),C=n("5LCj"),x=n("SPK5"),L=n("iuhU"),k=n("J8Dw"),S=n("aDCK"),I=n("L0nm"),O=n("nI05"),R=n("0Tuv"),j=n("LES+"),M=n("9n+W"),H=n("1z9F"),z=n("GjY/"),N=n("ChHM"),T=n("jD9D"),F=n("xjta"),P=n("Iblh"),B=n("Y5X8"),A=n("hDz7"),Z=n("1N+i"),D=n("rBCA"),_=n("Zdfy"),V=n("oZWv"),$=n("/TW2"),q=n("iBNF"),W=n("GrzX"),U=n("xXM3"),G=n.n(U),Q=n("+PHJ"),Y=n("PYF6"),K=n("tiWT"),J=n("AeFk"),X=n("QoN1"),ee=n("vWP/"),et=n("XDLp"),en=(0,i.k)((e,{variantStyle:t})=>{let n=t===A.C.LEADGEN,a={fontSize:(0,o.h)(15),lineHeight:(0,o.h)(24),letterSpacing:"-0.3px"};return{input:Object.assign({padding:"12px 16px",background:"#ffffff",border:`1px solid ${e.colors.gray[2]}`,borderRadius:4},n&&Object.assign(Object.assign({borderRadius:8},a),{color:"#111111","&::placeholder":Object.assign(Object.assign({},a),{fontSize:(0,o.h)(13),lineHeight:(0,o.h)(20),letterSpacing:"-0.3px",color:e.colors.gray[4]})}))}});let ea=(0,r.forwardRef)((e,t)=>{var{keepSearch:n=!1}=e,l=(0,a._)(e,["keepSearch"]);return n?r.createElement(er,Object.assign({},l,{ref:t})):r.createElement(el,Object.assign({},l,{ref:t}))}),er=(0,r.forwardRef)((e,t)=>{var{value:n,defaultValue:l,onChange:i,clearable:o}=e,h=(0,a._)(e,["value","defaultValue","onChange","clearable"]);let[m,u]=(0,H.C)({value:n,defaultValue:l,onChange:i});return r.createElement(s.F,Object.assign({ref:t,rightSection:r.createElement(c.E,{src:B.C.getAssetPath("chevron-down.svg"),fit:"none"}),size:"md",maxDropdownHeight:300,onChange:e=>u(e),value:m},h,o&&(null==m?void 0:m.length)>0?{rightSection:r.createElement(d.A,{onClick:()=>{u("")},sx:{cursor:"pointer"}},r.createElement(_IconSelect,null))}:{}))}),el=(0,r.forwardRef)((e,t)=>{var{searchValue:n,onSearchChange:i,styles:o}=e,s=(0,a._)(e,["searchValue","onSearchChange","styles"]);let c=(0,A.u)(),{classes:m}=en({variantStyle:c},{name:"MantineSelect",styles:o}),[u,p]=(0,H.C)({defaultValue:"",value:n,onChange:i});return r.createElement(h.Ph,Object.assign({classNames:{input:m.input},ref:t,rightSection:r.createElement(l.Z,{size:18}),rightSectionProps:{style:{pointerEvents:"none"}},size:"md",maxDropdownHeight:300,onSearchChange:e=>p(e),searchValue:u},s,s.clearable&&(null==u?void 0:u.length)>0?{rightSection:r.createElement(d.A,{onClick:()=>{p("")},sx:{cursor:"pointer"}},r.createElement(_IconSelect,null))}:{}))}),_IconSelect=()=>r.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.6665 9.99996C1.6665 5.39163 5.3915 1.66663 9.99984 1.66663C14.6082 1.66663 18.3332 5.39163 18.3332 9.99996C18.3332 14.6083 14.6082 18.3333 9.99984 18.3333C5.3915 18.3333 1.6665 14.6083 1.6665 9.99996ZM12.4083 13.5831C12.7333 13.9081 13.2583 13.9081 13.5833 13.5831C13.9 13.2581 13.9 12.7247 13.5833 12.4081L11.175 9.99973L13.5833 7.5914C13.9083 7.2664 13.9083 6.7414 13.5833 6.4164C13.2583 6.0914 12.7333 6.0914 12.4083 6.4164L10 8.82473L7.59167 6.4164C7.26667 6.0914 6.74167 6.0914 6.41667 6.4164C6.26063 6.57209 6.17293 6.78347 6.17293 7.0039C6.17293 7.22433 6.26063 7.43571 6.41667 7.5914L8.825 9.99973L6.41667 12.4081C6.26063 12.5638 6.17293 12.7751 6.17293 12.9956C6.17293 13.216 6.26063 13.4274 6.41667 13.5831C6.74167 13.9081 7.26667 13.9081 7.59167 13.5831L10 11.1747L12.4083 13.5831Z",fill:"#8C8C8C"}));let ErrorBoundary=class ErrorBoundary extends r.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){console.error("Uncaught error:",e,t)}render(){return this.state.hasError?this.props.fallback||r.createElement(r.Fragment,null):this.props.children}};let Carousel=e=>{var{slidesToShow:t=1,children:n}=e,l=(0,a._)(e,["slidesToShow","children"]);let i=Array.isArray(n)?n.length:1;return i?r.createElement(ErrorBoundary,null,r.createElement(_.l,Object.assign({slideSize:String(Math.floor(1/t*1e4)/100)+"%",containScroll:"trimSnaps"},l),n)):null};Carousel.Slide=_.l.Slide;let ei=(0,D.Z)(Carousel)`
cursor: grab;
width: 100%;
.mantine-Carousel-control {
background: rgb(255, 255, 255);
opacity: 1;
border: none;
border-radius: 0;
box-shadow: none;
&[data-inactive] {
opacity: 0;
cursor: default;
}
&:first-child {
padding-right: 24px;
background: linear-gradient(
90deg,
rgba(255, 255, 255, 1) 0%,
rgba(255, 255, 255, 1) 50%,
rgba(255, 255, 255, 0) 100%
);
}
&:last-child {
padding-left: 24px;
background: linear-gradient(
270deg,
rgba(255, 255, 255, 1) 0%,
rgba(255, 255, 255, 1) 50%,
rgba(255, 255, 255, 0) 100%
);
}
}
.mantine-Carousel-container {
align-items: center;
}
`;var eo=(0,i.k)((e,t)=>({root:{color:t.color||("hb"===e.primaryColor?e.colors.hb[6]:e.fn.primaryColor())}}));let Anchor=e=>{var{color:t,styles:n,className:l}=e,i=(0,a._)(e,["color","styles","className"]);let{classes:o,cx:s}=eo({color:t},{name:"Anchor",styles:n});return r.createElement(V.T,Object.assign({as:"a",className:s(o.root,l)},i))},BreadcrumbItem=e=>{var{children:t}=e,n=(0,a._)(e,["children"]);return r.createElement(Anchor,Object.assign({size:"p4",color:"gray.8"},n),t)},AspectRatio=e=>r.createElement(m.o,Object.assign({sx:{borderRadius:4,overflow:"hidden","> img":{objectFit:"contain"}}},e)),Breadcrumbs=e=>{var t,{children:n,showHomeIcon:l=!0,homeIconHref:i="/"}=e,o=(0,a._)(e,["children","showHomeIcon","homeIconHref"]);let s=(0,u.rZ)(),c=(null===(t=null==s?void 0:s.other)||void 0===t?void 0:t.template)==="mb",[d,h]=(0,r.useState)(null),{isMobile:m}=(0,Z.u)(),[,b]=(0,r.useState)(!0),f=(0,r.useCallback)(()=>{b(!1)},[]),E=(0,r.useCallback)(()=>{setTimeout(()=>{b(!0)},1e3)},[]);return(0,r.useEffect)(()=>(d&&(d.on("scroll",f),d.on("pointerUp",E)),()=>{d&&(d.off("scroll",f),d.on("pointerUp",E))}),[d,f,E]),r.createElement(ei,Object.assign({align:"center",slideGap:"xs",dragFree:!0,draggable:m,slideSize:"0",getEmblaApi:h,controlsOffset:-52,previousControlIcon:r.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},r.createElement("path",{d:"M6.86589 3.56104C7.03647 3.56104 7.20724 3.62732 7.33724 3.75765L7.39453 3.81494C7.6552 4.07561 7.6552 4.49765 7.39453 4.75765L4.81901 7.33317L13.5326 7.33317C13.9006 7.33317 14.1992 7.63184 14.1992 7.99984C14.1992 8.36784 13.9006 8.6665 13.5326 8.6665L4.81901 8.66651L7.39453 11.242C7.6552 11.5027 7.6552 11.9247 7.39453 12.1847L7.33724 12.242C7.07657 12.5027 6.65453 12.5027 6.39453 12.242L2.6237 8.47119C2.36303 8.21053 2.36303 7.78849 2.6237 7.52849L6.39453 3.75765C6.52487 3.62732 6.6953 3.56104 6.86589 3.56104Z",fill:"#595959"})),nextControlIcon:r.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},r.createElement("path",{d:"M9.13411 12.439C8.96353 12.439 8.79276 12.3727 8.66276 12.2423L8.60547 12.1851C8.3448 11.9244 8.3448 11.5023 8.60547 11.2423L11.181 8.66683L2.46745 8.66683C2.09945 8.66683 1.80078 8.36816 1.80078 8.00016C1.80078 7.63216 2.09945 7.3335 2.46745 7.3335L11.181 7.3335L8.60547 4.75797C8.3448 4.49731 8.3448 4.07527 8.60547 3.81527L8.66276 3.75797C8.92343 3.49731 9.34547 3.49731 9.60547 3.75797L13.3763 7.52881C13.637 7.78947 13.637 8.21152 13.3763 8.47152L9.60547 12.2423C9.47513 12.3727 9.3047 12.439 9.13411 12.439Z",fill:"#595959"}))},o),l&&r.createElement(Carousel.Slide,{style:{borderRight:`1px solid ${$.t.neutral[1]}`}},r.createElement(BreadcrumbItem,{href:i,target:"_blank",className:"pointer-event-child-none"},r.createElement(p.x,{sx:Object.assign({},!c&&{borderRadius:"50%",display:"flex",justifyContent:"center",alignItems:"center"}),bg:!c&&$.t.neutral[0],p:c?0:6},r.createElement(AspectRatio,{ratio:1,w:18},c?r.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.1183 3.67722C12.8727 2.70772 11.1281 2.708 9.88187 3.67718L14.1183 3.67722ZM14.1183 3.67722L19.718 8.03283C20.5589 8.68632 21.05 9.69173 21.05 10.7562V17.6002C21.05 19.5057 19.5055 21.0502 17.6 21.0502H6.40016C4.49466 21.0502 2.9502 19.5057 2.9502 17.6002V10.7562C2.9502 9.69163 3.44113 8.68632 4.28216 8.03283L9.88187 3.67718M10.6799 4.70339L5.08006 9.05916C4.55657 9.46592 4.2502 10.0923 4.2502 10.7562V17.6002C4.2502 18.7878 5.21263 19.7502 6.40016 19.7502H17.6C18.7875 19.7502 19.75 18.7878 19.75 17.6002V10.7562C19.75 10.0923 19.4438 9.46612 18.9204 9.05936L13.3202 4.70335C12.5443 4.09941 11.4571 4.09905 10.6799 4.70339Z",fill:"#3E3F58"}),r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.2373 13.1626C12.5546 12.4794 11.4466 12.4791 10.7629 13.1628C10.0793 13.8464 10.0793 14.9538 10.7629 15.6374C11.4465 16.321 12.5539 16.321 13.2375 15.6374C13.9211 14.9538 13.9211 13.8464 13.2375 13.1628L13.2373 13.1626ZM14.1567 12.2436C12.9661 11.0521 11.0348 11.0525 9.84366 12.2436C8.65237 13.4348 8.65237 15.3653 9.84366 16.5566C11.0349 17.7479 12.9654 17.7479 14.1567 16.5566C15.348 15.3653 15.348 13.4348 14.1567 12.2436Z",fill:"#3E3F58"})):r.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none"},r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.58691 5.59863L8.58691 1.62305C8.83594 1.45898 9.16406 1.45898 9.41309 1.62305L15.4131 5.59863C15.624 5.73926 15.75 5.97363 15.75 6.22559V14.25C15.75 15.0791 15.0791 15.75 14.25 15.75H3.75C2.9209 15.75 2.25 15.0791 2.25 14.25V6.22559C2.25 5.97363 2.37598 5.73926 2.58691 5.59863ZM5.5017 11.7602C5.1717 11.5108 5.17316 11.0321 5.46521 10.7391C5.75775 10.4456 6.24936 10.4292 6.5986 10.6522C7.17818 11.0223 8.12516 11.4889 9.21628 11.4889C10.3074 11.4889 11.2543 11.0223 11.8339 10.6522C12.1832 10.4292 12.6748 10.4456 12.9673 10.7391C13.2594 11.0321 13.2608 11.5108 12.9308 11.7602C11.8743 12.5589 10.535 12.9889 9.21628 12.9889C7.89758 12.9889 6.55824 12.5589 5.5017 11.7602Z",fill:"#595959"})))))),r.createElement(Carousel.Slide,null),r.createElement(Carousel.Slide,null,r.createElement(g.O,{styles:{separator:{marginInline:4}},separator:r.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},r.createElement("path",{d:"M8.71527 7.99969L6.16794 5.45236C5.89194 5.17636 5.89194 4.72836 6.16794 4.45236C6.44394 4.17636 6.89194 4.17636 7.16794 4.45236L10.2439 7.52836C10.5046 7.78903 10.5046 8.21103 10.2439 8.47103L7.16794 11.547C6.89194 11.823 6.44394 11.823 6.16794 11.547C5.89194 11.271 5.89194 10.823 6.16794 10.547L8.71527 7.99969Z",fill:"#8C8C8C"}))},n)))};Breadcrumbs.Item=BreadcrumbItem;var es=(0,i.k)((e,{variantStyle:t})=>{let n=t===A.C.LEADGEN,a={fontSize:(0,o.h)(15),lineHeight:(0,o.h)(24),letterSpacing:"-0.3px"};return{input:Object.assign({padding:"12px 16px",background:"#ffffff",border:`1px solid ${e.colors.gray[2]}`,borderRadius:4},n&&Object.assign(Object.assign({borderRadius:8},a),{color:"#111111","&::placeholder":Object.assign(Object.assign({},a),{fontSize:(0,o.h)(15),lineHeight:(0,o.h)(24),letterSpacing:"-0.3px",color:e.colors.gray[4]})}))}});let ec=(0,D.Z)(b.U)`
.mantine-Accordion-label {
padding: 0;
}
.mantine-Accordion-control {
&:hover {
background-color: transparent;
}
}
.mantine-Accordion-item {
.mantine-Accordion-chevron {
> div {
background-repeat: no-repeat;
width: 16px;
height: 16px;
background-position: center;
background-image: url(${e=>e.closeChevron||B.C.getAssetPath("plus-icon.svg")});
}
}
&[data-active='true'] {
.mantine-Accordion-chevron {
> div {
background-image: url(${e=>e.openChevron||B.C.getAssetPath("minus-icon.svg")});
}
}
}
}
.mantine-Accordion-panel {
border-radius: ${q.r.borderRadius};
}
.mantine-Accordion-content {
white-space: pre-wrap;
}
`,Accordion=e=>{var{children:t}=e,n=(0,a._)(e,["children"]);return r.createElement(ec,Object.assign({chevron:r.createElement("div",null),disableChevronRotation:!0,transitionDuration:300},n),t)};Accordion.Control=b.U.Control,Accordion.Item=b.U.Item,Accordion.Panel=b.U.Panel;let ed=B.C.getAssetPath("avatar.jpg"),Avatar=e=>{var{withIndicator:t=!1,indicatorConfig:n=null,size:l=56,children:i,styles:o,placeholderText:s}=e,c=(0,a._)(e,["withIndicator","indicatorConfig","size","children","styles","placeholderText"]);let generateAvatar=()=>r.createElement(f.q,Object.assign({size:l,radius:"xl"},c,{imageProps:Object.assign({loading:"lazy"},c.imageProps),styles:{placeholder:{backgroundColor:c.color,color:"white"}}}),i||s||r.createElement(Z.I,{src:ed,width:l,alt:c.alt||"avatar"}));return t?r.createElement(E.z,Object.assign({inline:!0,position:"bottom-end",offset:9},n,{styles:Object.assign({indicator:{backgroundColor:r.isValidElement(n.label)&&"transparent",zIndex:1}},o)}),generateAvatar()):generateAvatar()},eh={lg:{height:48,fontSize:(0,o.h)(16),lineHeight:"24px"},md:{height:40,fontSize:(0,o.h)(14),lineHeight:"22px"},sm:{height:32,fontSize:(0,o.h)(14),lineHeight:"22px"},xs:{height:32,fontSize:(0,o.h)(13),lineHeight:(0,o.h)(20),letterSpacing:"-0.3px"}};var em=(0,i.k)((e,{variantStyle:t,size:n})=>{let a=t===A.C.LEADGEN,r=eh[n]||{},l=a?"sm"===n?{height:36,fontSize:(0,o.h)(13),letterSpacing:"-0.3px"}:{fontSize:(0,o.h)(15),letterSpacing:"-0.3px"}:{};return{input:{border:`1px solid ${e.colors.gray[2]}`,transition:`all ${W.A} ease-in-out`,"&:not(.mantine-Textarea-input)":Object.assign(Object.assign({minHeight:"unset"},r),l),"&:hover":{border:`1px solid ${e.fn.primaryColor()}`},"&:focus":{boxShadow:`0px 0px 0px 2px ${e.colors[e.primaryColor][2]}`},'&[data-invalid="true"]':{border:`1px solid ${e.colors.red600}`,color:"#000"}},rightSection:Object.assign({color:e.colors.gray[4]},(()=>{switch(n){case"lg":return Object.assign({fontSize:(0,o.h)(16)},a&&{fontSize:(0,o.h)(15)});case"md":return Object.assign({fontSize:(0,o.h)(14)},a&&{fontSize:(0,o.h)(15),letterSpacing:"-0.3px"});case"sm":return Object.assign({height:32,fontSize:(0,o.h)(14),lineHeight:"22px"},a&&{height:36,fontSize:(0,o.h)(13),letterSpacing:"-0.3px"});case"xs":return{height:32,lineHeight:(0,o.h)(20),fontSize:(0,o.h)(13),letterSpacing:"-0.3px"}}})())}});let eu=300,ep=(0,w.Z)({key:"mantine",prepend:!1}),NumberInput=e=>{var{value:t,onChange:n,size:l="md",styles:i,classNames:o}=e,s=(0,a._)(e,["value","onChange","size","styles","classNames"]);let[c,d]=(0,r.useState)(t),[h]=(0,z.c)(c,eu),m=(0,A.u)(),{classes:u}=em({variantStyle:m,size:l},{name:"MantineInput",styles:i,classNames:o});return(0,r.useEffect)(()=>{null==n||n(h)},[h]),(0,r.useEffect)(()=>{d(t)},[t]),r.createElement(y.Y,Object.assign({stepHoldDelay:500,stepHoldInterval:e=>Math.max(1e3/Math.pow(e,2),25),onChange:d,hideControls:!0,min:0,formatter:e=>0===Number(e)?e:e||"",removeTrailingZeros:!0,value:c},s,{size:l,classNames:{input:u.input,rightSection:u.rightSection}}))},eg=B.C.getAssetPath("EyeVisible.svg"),eb=B.C.getAssetPath("EyeHidden.svg"),RenderVisibleToggleIcon=({reveal:e,size:t})=>r.createElement("img",{src:e?eg:eb,style:{width:t,height:t},loading:"lazy"}),ef=(0,r.forwardRef)((e,t)=>{let{size:n="md",visibilityToggleIcon:l}=e,i=(0,a._)(e,["size","visibilityToggleIcon"]);return r.createElement(C.W,Object.assign({ref:t,size:n,visibilityToggleIcon:l||RenderVisibleToggleIcon},i,{className:`input-control ${(null==i?void 0:i.className)||""}`}))}),ErrorIcon=e=>{var{size:t}=e,n=(0,a._)(e,["size"]);let l=Object.assign({width:t,height:t},n);return r.createElement("svg",Object.assign({width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l),r.createElement("path",{d:"M5.996 6.513q.163 0 .282-.12a.38.38 0 0 0 .118-.28V3.937q0-.15-.118-.268a.4.4 0 0 0-.282-.119.4.4 0 0 0-.281.12.38.38 0 0 0-.119.28v2.175q0 .15.119.269.12.119.281.119m0 1.862a.43.43 0 0 0 .3-.112.4.4 0 0 0 .125-.313.4.4 0 0 0-.125-.3.4.4 0 0 0-.3-.125.4.4 0 0 0-.3.125.4.4 0 0 0-.125.3.4.4 0 0 0 .125.313.43.43 0 0 0 .3.112m0 2.375a4.6 4.6 0 0 1-1.856-.375 4.8 4.8 0 0 1-1.506-1.012A4.8 4.8 0 0 1 1.62 7.857 4.6 4.6 0 0 1 1.246 6q0-.987.375-1.856t1.013-1.506A4.8 4.8 0 0 1 4.14 1.625a4.6 4.6 0 0 1 1.856-.375q.988 0 1.857.375Q8.72 2 9.359 2.638q.637.637 1.012 1.506T10.747 6t-.375 1.857A4.8 4.8 0 0 1 9.36 9.363a4.8 4.8 0 0 1-1.506 1.012q-.87.375-1.857.375",fill:"#F44D2C"}))};ErrorIcon.defaultProps={size:18,color:q.r.colors.gray600,activeColor:q.r.colors.primaryBase};let ErrorLabel=e=>{var{label:t,withIcon:n,textProps:l}=e,i=(0,a._)(e,["label","withIcon","textProps"]);return r.createElement(x.k,Object.assign({align:"center",gap:4},i),n&&r.createElement(ErrorIcon,{size:12}),r.createElement(V.T,Object.assign({size:"c1",variant:"error",dangerouslySetInnerHTML:{__html:t}},l)))},eE=(0,r.createContext)({}),ev=J.iv`
height: 100% !important;
min-height: calc(var(--container-height, 56px) * 24 / 56);
line-height: calc(var(--container-height, 56px) * 24 / 56);
border: none !important;
border-radius: 0 !important;
outline: none !important;
box-shadow: none !important;
padding: 0;
cursor: pointer;
opacity: 0;
::placeholder {
color: ${q.r.colors.gray400};
}
`,ew=J.iv`
height: auto !important;
cursor: text;
opacity: 1;
transition: 0.1s ease-in-out all;
`,ey=J.iv`
position: absolute;
top: calc(var(--container-height) / 2);
left: var(--space-x, 16px);
margin: 0;
z-index: 1;
cursor: pointer;
transform: translateY(-50%);
transition: 0.125s ease-in all;
`,eC=J.iv`
top: var(--space-y-shrink, 6px);
transform: none;
transition: 0.125s ease-out all;
`,ex=J.iv`
min-height: var(--container-height, 56px);
display: flex;
align-items: flex-end;
border: 1px solid ${q.r.colors.gray200};
border-radius: 8px;
background-color: #fff;
padding-inline: var(--space-x, 16px);
padding-block: var(--space-y-not-shrink, 16px);
cursor: pointer;
pointer-events: none;
&:has(.mantine-Input-rightSection) {
padding-right: var(--container-height, 56px);
}
.mantine-Input-icon {
display: none;
}
.mantine-NumberInput-control {
border-color: ${q.r.colors.gray200};
}
`,eL=J.iv`
height: auto;
min-height: var(--container-height, 56px);
padding-block: var(--space-y-shrink, 6px);
cursor: text;
pointer-events: auto;
`,ek=J.iv`
color: ${q.r.colors.red800};
font-size: 12px;
line-height: 1.5;
`,eS=D.Z.div`
--space-x: 16px;
--space-y-not-shrink: 15px;
--space-y-shrink: 6px;
--container-height: 56px;
--label-not-shrink: 16px;
--label-shrink: 12px;
--input: 15px;
position: relative;
min-width: 100px;
max-width: 100%;
display: inline-block;
.textField_wrapper {
display: inline-block;
width: 100%;
cursor: pointer;
}
.mantine-InputWrapper-root {
&[data-invalid='true'] {
.mantine-Input-wrapper {
border-color: ${q.r.colors.red400};
}
}
.mantine-Input-wrapper {
&:has([data-invalid]) {
border-color: ${q.r.colors.red400};
}
}
}
.mantine-InputWrapper-label {
${ey}
}
.mantine-Input-wrapper {
${ex}
+ .mantine-Popover-dropdown[data-position="bottom-start"] {
left: 0 !important;
}
+ .mantine-Popover-dropdown[data-position='top-start'] {
top: unset !important;
left: 0 !important;
bottom: 100% !important;
}
}
.mantine-Input-input {
${ev}
}
&.textField_shrink {
.mantine-InputWrapper-label {
${eC}
}
.mantine-Input-wrapper {
${eL}
&.mantine-Select-wrapper {
.mantine-Select-rightSection {
pointer-events: auto !important;
}
}
}
.mantine-Input-input {
${ew}
}
&:has(.PhoneInput) {
.mantine-InputWrapper-label {
left: var(--space-x, 16px);
}
.PhoneInput {
.PhoneInputInput {
opacity: 1;
}
}
}
}
&:focus-within {
.mantine-Input-wrapper {
transition: 0.25s linear border;
border-color: ${q.r.colors.primary600};
box-shadow: 0 0 4px ${q.r.colors.primary200};
}
}
.PhoneInput {
--phone-select: 75px;
--phone-input-space-x: 8px;
width: 100%;
opacity: 1;
border: none;
.PhoneInputCountry {
background-color: transparent;
border: none;
padding: 0;
width: var(--phone-select, 75px);
}
.PhoneInputInput {
flex: 1;
min-width: 0;
line-height: 1.5;
outline: none !important;
border: none;
box-shadow: none;
font-size: var(--input, 15px);
padding: 0 var(--phone-input-space-x, 8px);
opacity: 0;
color: ${q.r.colors.gray800} !important;
:focus {
color: ${q.r.colors.gray800} !important;
}
}
}
&:has(.PhoneInput) {
.mantine-InputWrapper-label {
left: calc(
var(--space-x, 16px) + var(--phone-select, 75px) +
var(--phone-input-space-x, 8px)
);
}
}
.icon {
position: absolute;
top: calc(var(--container-height) / 2);
right: var(--space-x, 16px);
transform: translateY(-50%);
transition: 0.125s ease-in all;
&.shrink {
top: calc(var(--container-height) / 2 - 4px);
transform: translateY(0);
}
}
`;D.Z.div`
&.leadgen-form_checkbox,
&.leadgen-form_radio {
width: 100%;
}
&.leadgen-form_dropdown {
width: calc(50% - 12px);
}
.mantine-InputWrapper-root {
display: block;
}
.mantine-InputWrapper-label {
margin-bottom: 0.5rem;
color: ${q.r.colors.gray800};
font-size: 16px;
font-weight: 400;
line-height: 1.5;
}
.mantine-Radio-root,
.mantine-Checkbox-root {
gap: 8px;
min-width: calc(50% - 4px);
// input[type='radio'],
// input[type='checkbox'] {
// border-color: ${q.r.colors.gray600};
// width: 18px;
// height: 18px;
// }
// input[type='checkbox'] {
// border-radius: 4px;
// }
// &[data-checked='true'] {
// input[type='radio'],
// input[type='checkbox'] {
// border-color: ${q.r.colors.primary600};
// }
// input[type='radio'] {
// background-color: white;
// }
// }
.mantine-Checkbox-input {
&:checked {
border-color: ${q.r.colors.primary600};
}
}
}
.leadgen-choiceContainer {
display: flex;
flex-wrap: wrap;
align-items: flex-start;
gap: 8px;
}
.mantine-InputWrapper-error {
${ek}
}
`,D.Z.div`
position: absolute;
top: calc(var(--container-height) / 2);
right: var(--space-x, 16px);
`;let FloatingLabelControl=e=>{let{shrink:t,onChangeShrink:n,children:l,className:i}=e,o=(0,a._)(e,["shrink","onChangeShrink","children","className"]),[s,c]=(0,r.useState)(t),[d,h]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{c(t)},[t]),r.createElement(eE.Provider,Object.assign({value:{shrinkProps:t,shrink:s,setShrink:c,onChangeShrink:n,hasIcon:d,setHasIcon:h}},o),r.createElement(eS,Object.assign({shrink:s,className:(0,L.default)(i,"textField",{textField_shrink:!!s})},o),l))};FloatingLabelControl.Control=e=>{let{shrink:t,shrinkProps:n,onChangeShrink:a,setShrink:l,hasIcon:i}=(0,r.useContext)(eE),{children:o}=e,s=(0,N.O)(()=>{n||(l(!1),null==a||a(!1))}),focusInput=e=>{let t=e.querySelectorAll('input:not([disabled]):not([type="submit"]),select:not([disabled]),textarea:not([disabled])'),n=t.item(t.length-1);n&&n.focus({preventScroll:!0})},c=(0,r.useCallback)(e=>{if(t){e.preventDefault(),focusInput(e.currentTarget);return}l(!0),null==a||a(!0),focusInput(e.currentTarget)},[t]);return(0,r.useEffect)(()=>{l(n)},[n]),r.createElement(p.x,{ref:s,onClick:c,className:"FloatingLabelControl_wrapper"},"function"==typeof o?o({shrink:!!t,hasIcon:i}):o)},FloatingLabelControl.Icon=({Icon:e})=>{let{shrink:t,setHasIcon:n}=(0,r.useContext)(eE),a=(0,u.rZ)();return(0,r.useEffect)(()=>{e&&n(!0)},[]),e?r.createElement(e,{className:`icon ${t?"shrink":""}`,shrink:t,size:24,color:a.colors.gray[9]}):null};let eI=(0,r.forwardRef)((e,t)=>{var{label:n,value:l,onChange:i,onChangeRaw:o,maxLength:s,withFloatingLabel:c,styles:d,error:h,size:m="md",debouncedTime:u=eu}=e,p=(0,a._)(e,["label","value","onChange","onChangeRaw","maxLength","withFloatingLabel","styles","error","size","debouncedTime"]);let g=(0,A.u)(),{classes:b}=em({variantStyle:g,size:m},{name:"MantineInput",styles:d}),[f,E]=(0,r.useState)(l||""),[v]=(0,z.c)(f,u);(0,r.useEffect)(()=>{null==i||i(v)},[v]),(0,r.useEffect)(()=>{E(l)},[l]);let w=Object.assign(Object.assign({classNames:{input:b.input,rightSection:b.rightSection},ref:t,size:m,onChange:e=>{"number"==typeof s&&e.currentTarget.value.length>s||(null==o||o(e),E(e.currentTarget.value))},value:f,label:n,error:h},p),{maxLength:s,className:`input-control ${(null==p?void 0:p.className)||""}`});return c?r.createElement(FloatingLabelControl,{shrink:!!f},r.createElement(FloatingLabelControl.Control,null,({shrink:e})=>r.createElement(k.o,Object.assign({},w,{error:h&&r.createElement(ErrorLabel,{label:String(h)}),inputWrapperOrder:["label","input","description","error"],label:r.createElement(V.T,{size:e?"p3":"p2",variant:"secondary",weight:"halfBold"},n),styles:e=>({input:Object.assign(Object.assign({},(0,A.G)(e)[A.C.LEADGEN].p2),{color:e.colors.gray[9],fontWeight:A.F.halfBold})})})))):r.createElement(k.o,Object.assign({},w))}),eO=eI;eO.File=e=>r.createElement(v.S,Object.assign({size:"md"},e)),eO.Password=ef,eO.Number=NumberInput,eO.Wrapper=S.I.Wrapper;let eR=_.l.Slide,ej=(0,r.createContext)({}),findIndexFromLeftSide=(e,t)=>e>=t?e-t:e,findIndexFromRight=(e,t)=>e<0?t+e:e,CentralCarousel=e=>{var{children:t,blurFromCenter:n,blurFromIndex:l,blurLength:o=3,maxBlurOpacity:s=.5,onSlideChange:c,selectSlideWhenClick:d}=e,h=(0,a._)(e,["children","blurFromCenter","blurFromIndex","blurLength","maxBlurOpacity","onSlideChange","selectSlideWhenClick"]);let{width:m}=(0,T.n)(),[u]=(0,F.y)(),p=(0,r.useRef)(null),[g,b]=(0,r.useState)(0),handleStyle=()=>{var e,t,a,r,i;let c=(null===(e=null==p?void 0:p.current)||void 0===e?void 0:e.slideNodes())||[];if((null===(t=null==p?void 0:p.current)||void 0===t?void 0:t.slideNodes().length)<=(null===(a=null==p?void 0:p.current)||void 0===a?void 0:a.slidesInView().length))return c.map(e=>{e.classList.remove("center-slide"),e.style.opacity="1"}),!1;let d=null===(r=null==p?void 0:p.current)||void 0===r?void 0:r.selectedScrollSnap();b(d);let h=c.length,m=null===(i=null==p?void 0:p.current)||void 0===i?void 0:i.slidesInView(),u=m.length,g=n?l+o-1:Math.floor(u/2),f=d+g,E=f===h?0:f>h?f-h:f,v=d-g,w=v<0?h+v:v>0?d-g:0,y=[...new Set(Array(2*g+1).fill("").map((e,t)=>findIndexFromLeftSide(w+t,h)))];c.map((e,t)=>{if(t===d?e.classList.add("center-slide"):e.classList.remove("center-slide"),-1!==y.indexOf(t)){let n=s/o;for(let a=0;a{(null==p?void 0:p.current)&&handleStyle()},[m]);let f=(0,i.k)(()=>{var e,t;return{control:Object.assign({},(null===(e=null==p?void 0:p.current)||void 0===e?void 0:e.slideNodes().length)<=(null===(t=null==p?void 0:p.current)||void 0===t?void 0:t.slidesInView().length)&&{display:"none"})}}),{classes:E}=f();return r.createElement(ej.Provider,{value:{slider:null==p?void 0:p.current,centerSlide:g,selectSlideWhenClick:d}},r.createElement(_.l,Object.assign({classNames:{control:E.control},ref:u,slideSize:"auto",containScroll:"trimSnaps"},{getEmblaApi:e=>{p.current=e},onSlideChange:e=>{handleStyle(),null==c||c(e)}},h,{loop:!0}),"function"==typeof t?t(g):t))};CentralCarousel.Slide=e=>{var{children:t,onClick:n,innerSlideProps:l}=e,i=(0,a._)(e,["children","onClick","innerSlideProps"]);let{slider:o,selectSlideWhenClick:s}=(0,r.useContext)(ej),c=(0,r.useRef)(),d=(0,r.useRef)(""),[h,m]=(0,r.useState)(0);(0,r.useEffect)(()=>{d.current=String(Math.round(1e4*Math.random()))},[]),(0,r.useEffect)(()=>{let e=(null==o?void 0:o.slideNodes())||[];m(e.findIndex(e=>e.dataset.key===d.current))},[o]);let u={ref:c,"data-key":d.current,"data-index":h};return r.createElement(eR,Object.assign({},u,i),r.createElement("div",Object.assign({style:{height:"100%"},onClick:()=>{s&&(null==o||o.scrollTo(h)),null==n||n(h)}},l),t))};let CheckboxWithState=e=>{var{size:t=24,isSolid:n,isActive:l}=e,i=(0,a._)(e,["size","isSolid","isActive"]);return n?r.createElement("svg",Object.assign({width:t,height:t,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i),r.createElement("path",{d:"M10 18C14.4183 18 18 14.4183 18 10C18 5.58173 14.4183 2 10 2C5.58173 2 2 5.58173 2 10C2 14.4183 5.58173 18 10 18Z",fill:"#2D87F3"}),r.createElement("path",{d:"M6.38904 10.2778L8.88904 13.0556L13.6113 6.94446",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),r.createElement("path",{d:"M10 18C14.4183 18 18 14.4183 18 10C18 5.58173 14.4183 2 10 2C5.58173 2 2 5.58173 2 10C2 14.4183 5.58173 18 10 18Z",stroke:"#2D87F3",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})):l?r.createElement("svg",Object.assign({width:t,height:t,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i),r.createElement("path",{opacity:".2",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16",fill:"#2D87F3"}),r.createElement("path",{d:"m6.389 10.278 2.5 2.778 4.722-6.111",stroke:"#2D87F3",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),r.createElement("path",{d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16",stroke:"#2D87F3",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})):r.createElement("svg",Object.assign({width:t,height:t,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i),r.createElement("path",{d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16",fill:"#ADB3BC",fillOpacity:".3"}),r.createElement("path",{d:"m6.389 10.278 2.5 2.778 4.722-6.111",stroke:"#ADB3BC",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),r.createElement("path",{d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16",stroke:"#ADB3BC",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))},Checkbox=e=>{var{color:t="blue",label:n,size:l,styles:i}=e,o=(0,a._)(e,["color","label","size","styles"]);let s=(0,u.rZ)(),c=(0,A.u)(),d=(0,r.useMemo)(()=>{var e,n;return((null==t?void 0:t.includes("."))?null===(e=s.colors[t.split(".")[0]])||void 0===e?void 0:e[t.split(".")[1]]:null===(n=s.colors[t])||void 0===n?void 0:n[s.primaryShade||6])||s.colors.blue[6]},[t]),h=c===A.C.LEADGEN,m=h?20:l;return r.createElement(I.X,Object.assign({color:t,size:m,label:h?r.createElement(V.T,{size:"p2",color:s.colors.gray[8]},n):n,icon:h?e=>{var t=(0,a._)(e,[]);return r.createElement(r.Fragment,null,r.createElement(CheckboxWithState,Object.assign({"data-icon":"true","data-default":"true",size:m},t)),r.createElement(CheckboxWithState,Object.assign({"data-icon":"true","data-hover":"true",isActive:!0,size:m},t)),r.createElement(CheckboxWithState,Object.assign({"data-icon":"true","data-checked":"true",isSolid:!0,size:m},t)))}:void 0,styles:Object.assign({input:Object.assign({"&:hover":{border:`1px solid ${d}`}},h&&{width:m,height:m,backgroundColor:"transparent",borderRadius:"50%","&,&:hover":{border:0},"& ~ [data-icon]":{opacity:0},"& ~ [data-default]":{opacity:1},"&:hover":{"& ~ [data-icon]":{opacity:0},"& ~ [data-hover]":{opacity:1}},"&:checked":{"& ~ [data-icon]":{opacity:0},"& ~ [data-checked]":{opacity:1},"&:hover":{"& ~ [data-icon]":{opacity:0},"& ~ [data-checked]":{opacity:1}}},"&, &:hover, &:checked":{backgroundColor:"transparent",borderColor:"transparent","& ~ svg":{width:"100%",transform:"none",transition:"opacity 0.2s ease"}},[s.fn.smallerThan("sm")]:{"&:hover":{"& ~ [data-icon]":{opacity:0},"& ~ [data-default]":{opacity:1}}}}),label:Object.assign({},h&&{paddingLeft:8}),body:Object.assign({},h&&{alignItems:"flex-start"}),inner:Object.assign({},h&&{paddingTop:2,width:m,height:24})},i)},o))};Checkbox.Group=I.X.Group;let eM=(0,D.Z)(O.i)`
${e=>{let t=e.color||q.r.colors.primaryBase;return`
.mantine-Slider-bar {
background-color: ${t};
}
.mantine-Slider-thumb {
border-color: ${t};
color: ${t};
}
`}}
[data-theme='marryBaby'] & {
${e=>{let t=e.color||q.r.mbColors.pink;return`
.mantine-Slider-bar {
background-color: ${t};
}
.mantine-Slider-thumb {
border-color: ${t};
color: ${t};
}
`}}
}
.mantine-Slider-label {
background-color: transparent;
color: #000;
font-size: 14px;
font-weight: bold;
}
`,eH=D.Z.div`
display: flex;
align-items: center;
.hhg-mantine-slider {
flex-grow: 1;
}
button {
path:not([stroke]) {
stroke: ${q.r.colors.primaryBase};
}
}
[data-theme='marryBaby'] & {
button {
path:not([stroke]) {
stroke: ${q.r.mbColors.pink};
}
}
}
`,RadioWithState=e=>{var{size:t=24,isSolid:n,isActive:l}=e,i=(0,a._)(e,["size","isSolid","isActive"]);return n?r.createElement("svg",Object.assign({width:t,height:t,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i),r.createElement("path",{d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16",stroke:"#2D87F3",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),r.createElement("circle",{cx:"10",cy:"10",r:"4",fill:"#2D87F3"})):l?r.createElement("svg",Object.assign({width:t,height:t,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i),r.createElement("path",{d:"M10 1a9 9 0 1 1 0 18 9 9 0 0 1 0-18",stroke:"#BCDEFF",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),r.createElement("path",{d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16",stroke:"#2D87F3",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})):r.createElement("svg",Object.assign({width:t,height:t,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i),r.createElement("path",{d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16",stroke:"#ADB3BC",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))},Radio=e=>{var{color:t,label:n,size:l,styles:i}=e,o=(0,a._)(e,["color","label","size","styles"]);let s=(0,u.rZ)(),c=(0,A.u)(),d=(0,r.useMemo)(()=>{var e,n;return((null==t?void 0:t.includes("."))?null===(e=s.colors[t.split(".")[0]])||void 0===e?void 0:e[t.split(".")[1]]:null===(n=s.colors[t])||void 0===n?void 0:n[s.primaryShade||6])||s.fn.primaryColor()},[t]),h=c===A.C.LEADGEN,m=h?20:l;return r.createElement(R.Y,Object.assign({label:h?r.createElement(V.T,{size:"p2",color:s.colors.gray[8]},n):n,size:m,icon:h?e=>{var t=(0,a._)(e,[]);return r.createElement(r.Fragment,null,r.createElement(RadioWithState,Object.assign({"data-icon":"true","data-default":"true",size:m},t)),r.createElement(RadioWithState,Object.assign({"data-icon":"true","data-hover":"true",isActive:!0,size:m},t)),r.createElement(RadioWithState,Object.assign({"data-icon":"true","data-checked":"true",isSolid:!0,size:m},t)))}:void 0,styles:Object.assign({radio:Object.assign({"&:hover, &:checked":{border:`1px solid ${d}`},"&:checked + .___ref-icon":{top:"50%",left:"50%",transform:"scale(1) translate(-50%, -50%)"}},h&&{width:m,height:m,backgroundColor:"transparent",marginTop:2,borderRadius:"50%","&,&:hover":{border:0},"& ~ [data-icon]":{opacity:0},"& ~ [data-default]":{opacity:1},"&:hover":{"& ~ [data-icon]":{opacity:0},"& ~ [data-hover]":{opacity:1}},"&:checked":{"& ~ [data-icon]":{opacity:0},"& ~ [data-checked]":{opacity:1},"&:hover":{"& ~ [data-icon]":{opacity:0},"& ~ [data-checked]":{opacity:1}}},"&, &:hover, &:checked":{backgroundColor:"transparent",borderColor:"transparent","& ~ svg":{position:"absolute",width:"100%",transform:"none",transition:"opacity 0.2s ease",top:2,left:0}},[s.fn.smallerThan("sm")]:{"&:hover":{"& ~ [data-icon]":{opacity:0},"& ~ [data-default]":{opacity:1}}}}),icon:{color:d},label:Object.assign({},h&&{paddingLeft:8})},i)},o))};function transferValueToOtp(e,t=6){let n=Array(t).fill("");if(e){let t=e.toString().split("");n.map((e,a)=>{t[a]&&(n[a]=t[a]||"")})}return n}function transferOtpToValue(e){return e.join("")}Radio.Group=R.Y.Group;let ez=(0,r.forwardRef)((e,t)=>{let{maxLength:n=1,placeholder:l,className:i}=e,o=(0,a._)(e,["maxLength","placeholder","className"]);return r.createElement("input",Object.assign({maxLength:n,className:G()("Ia6IojY","otpInput",i),placeholder:l,type:"number"},o,{ref:t}))}),eN=(0,r.forwardRef)((e,t)=>{let{valueLength:n=6,type:a="number",value:l,defaultValue:i,placeholder:o,onChange:s,onBlur:c,otpShareProps:d}=e,h=(0,r.useRef)(Array(n).fill(null)),[m,u]=(0,r.useState)(i||l),[p,g]=(0,r.useState)(-1),[b,f]=(0,r.useState)(()=>transferValueToOtp(m,n)),E=(0,r.useCallback)(()=>{if(-1===p)return;let e=h.current[p];e&&(e.value="",b[p]="",f(b),u(()=>transferOtpToValue(b)),null==s||s(transferOtpToValue(b)))},[p,s,b]),v=(0,r.useCallback)(()=>{if(0===p)return;let e=h.current[p];e&&e.blur();let t=h.current[p-1];t&&t.focus()},[p]),w=(0,r.useCallback)(()=>{if(p===n-1)return;let e=h.current[p];e&&e.blur();let t=h.current[p+1];t&&t.focus()},[p,n]),y=(0,r.useCallback)(e=>{let t=e.target,n=t.value,a=n.toString().slice(0,1),r=h.current.findIndex(e=>e===t);-1!==r&&(b[r]=a,f(b),u(()=>transferOtpToValue(b)),null==s||s(transferOtpToValue(b))),w()},[w,s,b]),C=(0,r.useCallback)(e=>{let t=e.target,n=h.current.findIndex(e=>e===t);"number"===a?t.select():t.setSelectionRange(0,t.value.length,"backward"),-1!==n&&g(n)},[]),L=(0,r.useCallback)(e=>{let t=e.clipboardData.getData("text/plain"),a=transferValueToOtp(t,n),r=transferOtpToValue(a);f(a),u(r),null==s||s(r)},[s,a,n]),k=(0,r.useCallback)(e=>{8===e.keyCode||"Backspace"===e.key?(e.preventDefault(),E(),v()):46===e.keyCode||"Delete"===e.key?(e.preventDefault(),E()):37===e.keyCode||"ArrowLeft"===e.key?(e.preventDefault(),v()):39===e.keyCode||"ArrowRight"===e.key?(e.preventDefault(),w()):(32===e.keyCode||" "===e.key||"Spacebar"===e.key||"Space"===e.key)&&e.preventDefault()},[E,w,v]);return(0,r.useImperativeHandle)(t,()=>h.current[0],[]),(0,r.useEffect)(()=>{f(()=>transferValueToOtp(l,n)),u(l)},[n,l]),r.createElement(x.k,{justify:"center",columnGap:8,className:G()("_2iQs0sk","otpContainer")},b.map((e,t)=>r.createElement(ez,Object.assign({},d,{ref:e=>{h.current[t]=e},key:""+t,value:e,type:a,onChange:y,onFocus:C,onKeyDown:k,onPaste:L,onBlur:c,placeholder:o}))))}),CambodiaRoundIcon=e=>r.createElement(Z.I,Object.assign({alt:"round cambodia flag",src:B.C.getAssetPath("flags/cambodiaRound.png"),style:Object.assign({borderRadius:"50%"},e.style)},e)),CambodiaSquareIcon=e=>r.createElement(Z.I,Object.assign({alt:"square cambodia flag",src:B.C.getAssetPath("flags/cambodiaSquare.png")},e)),EnglishRoundIcon=e=>r.createElement("svg",Object.assign({viewBox:"0 0 20 20",fill:"none",style:Object.assign({borderRadius:"50%"},e.style)},e),r.createElement("g",null,r.createElement("mask",{style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20"},r.createElement("circle",{cx:"10",cy:"10",r:"10",fill:"#C4C4C4"})),r.createElement("path",{d:"M7.49953 0.327881C5.47199 0.850891 3.69346 1.98591 2.37793 3.53444L7.49953 6.6655V0.327881Z",fill:"#3F51B5"}),r.createElement("path",{d:"M2.30273 16.3824C3.62476 17.9749 5.4353 19.1399 7.50034 19.6729V13.2053L2.30273 16.3824Z",fill:"#3F51B5"}),r.createElement("path",{d:"M0.328125 12.5C0.334625 12.526 0.341125 12.5515 0.348125 12.5775L0.474128 12.5H0.328125Z",fill:"white"}),r.createElement("path",{d:"M17.7871 3.73445C16.4571 2.08391 14.6131 0.872891 12.499 0.327881V6.96651L17.7871 3.73445Z",fill:"#3F51B5"}),r.createElement("path",{d:"M12.499 19.6722C14.6506 19.1172 16.5196 17.8707 17.8546 16.1752L12.499 12.9021V19.6722Z",fill:"#3F51B5"}),r.createElement("path",{d:"M0.376626 7.31055C0.359125 7.37305 0.344125 7.43705 0.328125 7.50005H0.686632L0.376626 7.31055Z",fill:"white"}),r.createElement("path",{d:"M19.8745 8.50006C19.827 8.18506 19.7655 7.87555 19.6895 7.57104L18.1699 8.50006H19.8745Z",fill:"white"}),r.createElement("path",{d:"M0.686034 7.50024H0.327527C0.243026 7.82775 0.175524 8.16076 0.124023 8.50026H2.32207L0.686034 7.50024Z",fill:"white"}),r.createElement("path",{d:"M19.7197 12.3148C19.7832 12.0473 19.8337 11.7752 19.8752 11.5002H18.3867L19.7197 12.3148Z",fill:"white"}),r.createElement("path",{d:"M2.10956 11.5002H0.124023C0.175024 11.8398 0.243026 12.1728 0.327527 12.5003H0.47403L2.10956 11.5002Z",fill:"white"}),r.createElement("path",{d:"M8.50002 7.27665V0.124512C8.16051 0.175513 7.82751 0.243514 7.5 0.328016V6.66564L8.50002 7.27665Z",fill:"white"}),r.createElement("path",{d:"M11.5 12.2913V19.8759C11.8395 19.8249 12.1725 19.7569 12.5 19.6724V12.9023L11.5 12.2913Z",fill:"white"}),r.createElement("path",{d:"M7.5 13.205V19.6721C7.82751 19.7566 8.16051 19.8241 8.50002 19.8756V12.594L7.5 13.205Z",fill:"white"}),r.createElement("path",{d:"M11.5925 7.34715L11.7345 7.43415L12.5 6.96614V0.328016C12.1725 0.243514 11.8395 0.176013 11.5 0.124512V7.49865L11.5925 7.34715Z",fill:"white"}),r.createElement("path",{d:"M2.32251 8.50002H7.01761L8.50014 7.594V7.277L7.50011 6.66548L2.37852 3.53442C1.95151 4.03743 1.572 4.58144 1.24949 5.16296L5.02507 7.5H2.29701L0.650482 6.47648C0.54748 6.74949 0.455478 7.02699 0.375977 7.3105L0.686483 7.5L2.32251 8.50002Z",fill:"white"}),r.createElement("path",{d:"M11.7344 7.43419L13.4784 8.50021H18.171L19.6905 7.57119C19.528 6.92118 19.303 6.29767 19.02 5.70516L16.139 7.50019H13.4109L18.317 4.45013C18.1515 4.20313 17.9735 3.96562 17.7875 3.73462L12.4999 6.96618L11.7344 7.43419Z",fill:"white"}),r.createElement("path",{d:"M5.02448 7.50013L1.2494 5.16309C1.0169 5.58259 0.821394 6.0231 0.650391 6.47661L2.29642 7.50013H5.02448Z",fill:"#E53935"}),r.createElement("path",{d:"M16.1392 7.50024L19.0207 5.70521C18.8132 5.2702 18.5837 4.84819 18.3177 4.45068L13.4111 7.50024H16.1392Z",fill:"#E53935"}),r.createElement("path",{d:"M11.5 11.5002V12.2913L12.5 12.9023L17.8556 16.1758C18.2416 15.6853 18.5836 15.1593 18.8736 14.6008L15.4856 12.5003H18.2136L19.4432 13.2673C19.5507 12.9563 19.6432 12.6393 19.7197 12.3153L18.3871 11.5002H11.5Z",fill:"white"}),r.createElement("path",{d:"M13.4785 8.50019L11.7345 7.43417L11.5925 7.34717L11.5 7.49867V8.50019H13.4785Z",fill:"white"}),r.createElement("path",{d:"M8.49934 12.5943V11.5002H2.10921L0.473182 12.5003L0.34668 12.5778C0.522683 13.2383 0.762688 13.8713 1.06319 14.4708L4.16375 12.5003H6.89181L1.80071 15.7168C1.95971 15.9448 2.12471 16.1688 2.30172 16.3823L7.49932 13.2053L8.49934 12.5943Z",fill:"white"}),r.createElement("path",{d:"M7.01758 8.50026H8.50011V7.59424L7.01758 8.50026Z",fill:"white"}),r.createElement("path",{d:"M15.4854 12.5L18.8729 14.6C19.0949 14.173 19.2834 13.727 19.4429 13.2665L18.2134 12.5H15.4854Z",fill:"#E53935"}),r.createElement("path",{d:"M4.16501 12.5L1.06445 14.4705C1.28196 14.9045 1.52596 15.3216 1.80197 15.7166L6.89307 12.5H4.16501Z",fill:"#E53935"}),r.createElement("path",{d:"M13.4785 8.5H11.5V11.5001H18.3871H19.8757C19.9497 11.0095 20.0002 10.511 20.0002 10C20.0002 9.48902 19.9497 8.99051 19.8757 8.5H18.1711H13.4785Z",fill:"#E53935"}),r.createElement("path",{d:"M8.50017 11.5001V8.5H7.01764H2.32255H0.124502C0.050501 8.99051 0 9.48902 0 10C0 10.511 0.050501 11.0095 0.124502 11.5001H2.11004H8.50017Z",fill:"#E53935"}),r.createElement("path",{d:"M11.5001 19.8759V12.2912V11.5002V8.50016V7.49865V0.124502C11.0095 0.050501 10.511 0 10 0C9.48902 0 8.99051 0.050501 8.5 0.124502V7.27664V7.59365V8.50016V11.5002V12.5942V19.8759C8.99051 19.9499 9.48902 20.0004 10 20.0004C10.511 20.0004 11.0095 19.9499 11.5001 19.8759Z",fill:"#E53935"}))),EnglishSquareIcon=e=>r.createElement("svg",Object.assign({viewBox:"0 0 26 26",fill:"none"},e),r.createElement("g",null,r.createElement("mask",{style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"1",y:"5",width:"24",height:"16"},r.createElement("path",{d:"M1.08301 7.41675C1.08301 6.31218 1.97844 5.41675 3.08301 5.41675H22.9163C24.0209 5.41675 24.9163 6.31218 24.9163 7.41675V18.5834C24.9163 19.688 24.0209 20.5834 22.9163 20.5834H3.08301C1.97844 20.5834 1.08301 19.688 1.08301 18.5834V7.41675Z",fill:"#3F51B5"})),r.createElement("path",{d:"M1.08301 5.41675H24.9163V20.5834H1.08301V5.41675Z",fill:"#3F51B5"}),r.createElement("path",{d:"M1.08301 7.70041L12.3551 14.5899L14.05 11.8165L3.57901 5.41675H1.08301V7.70041Z",fill:"white"}),r.createElement("path",{d:"M24.9165 5.41675H22.9616L12.4912 11.816L14.1855 14.5899L24.9165 8.03083V5.41675Z",fill:"white"}),r.createElement("path",{d:"M14.1855 10.9802L12.4912 13.7536L23.6658 20.5834H24.9165V17.5387L14.1855 10.9802Z",fill:"white"}),r.createElement("path",{d:"M1.08301 17.8702V20.5834H2.87592L14.05 13.7541L12.3556 10.9802L1.08301 17.8702Z",fill:"white"}),r.createElement("path",{d:"M1.08301 10.8333H24.9163V15.1666H1.08301V10.8333Z",fill:"white"}),r.createElement("path",{d:"M10.833 5.41675H15.1663V20.5834H10.833V5.41675Z",fill:"white"}),r.createElement("path",{d:"M9.32609 10.8334L1.08301 5.79537V7.06504L7.24826 10.8334H9.32609ZM24.0004 5.41675L15.1376 10.8334H17.2149L24.9163 6.12687V5.41675H24.0004ZM17.9191 15.1667L24.9163 19.4432V18.1735L19.9964 15.1667H17.9191ZM8.62192 15.1667L1.08301 19.7742V20.5834H1.83701L10.6992 15.1667H8.62192ZM1.08301 11.9167H24.9163V14.0834H1.08301V11.9167Z",fill:"#E53935"}),r.createElement("path",{d:"M11.917 5.41675H14.0837V20.5834H11.917V5.41675Z",fill:"#E53935"}))),IndiaRoundIcon=e=>r.createElement(Z.I,Object.assign({alt:"round india flag",src:B.C.getAssetPath("flags/indiaRound.png"),style:Object.assign({borderRadius:"50%"},e.style)},e)),IndiaSquareIcon=e=>r.createElement(Z.I,Object.assign({alt:"square indian flag",src:B.C.getAssetPath("flags/indiaSquare.png")},e)),IndonesiaRoundIcon=e=>{var t=(0,a._)(e,[]);let n=(0,Y.a)();return r.createElement("svg",Object.assign({viewBox:"0 0 20 20",fill:"none"},t),r.createElement("mask",{id:n,style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20"},r.createElement("circle",{cx:"10",cy:"10",r:"10",fill:"#C4C4C4"})),r.createElement("g",{mask:`url(#${n})`},r.createElement("rect",{width:"20",height:"10",fill:"#CE1126"}),r.createElement("rect",{y:"10",width:"20",height:"10",fill:"white"})))},IndonesiaSquareIcon=e=>{var t=(0,a._)(e,[]);let n=(0,Y.a)();return r.createElement("svg",Object.assign({viewBox:"0 0 24 16",fill:"none"},t),r.createElement("g",{clipPath:`url(#${n})`},r.createElement("rect",{y:"0.0166016",width:"24",height:"8",fill:"#CE1126"}),r.createElement("rect",{y:"8.0166",width:"24",height:"8",fill:"white"})),r.createElement("defs",null,r.createElement("clipPath",{id:n},r.createElement("rect",{width:"24",height:"16",rx:"2",fill:"white"}))))},MalaysiaRoundIcon=e=>r.createElement("svg",Object.assign({viewBox:"0 0 20 20",fill:"none",style:Object.assign({borderRadius:"50%"},e.style)},e),r.createElement("g",null,r.createElement("mask",{style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20"},r.createElement("circle",{cx:"10",cy:"10",r:"10",fill:"#C4C4C4"})),r.createElement("rect",{y:"1",width:"20",height:"20",fill:"#CC0001"}),r.createElement("rect",{y:"16.106",width:"20",height:"1.02041",fill:"white"}),r.createElement("rect",{y:"16",width:"20",height:"1.02041",fill:"white"}),r.createElement("rect",{y:"18",width:"20",height:"1.02041",fill:"white"}),r.createElement("rect",{y:"14.0652",width:"20",height:"1.02041",fill:"white"}),r.createElement("rect",{y:"12.0242",width:"20",height:"1.02041",fill:"white"}),r.createElement("rect",{y:"9.9834",width:"20",height:"1.02041",fill:"white"}),r.createElement("rect",{y:"7.94263",width:"20",height:"1.02041",fill:"white"}),r.createElement("rect",{y:"5.90186",width:"20",height:"1.02041",fill:"white"}),r.createElement("rect",{y:"3.86084",width:"20",height:"1.02041",fill:"white"}),r.createElement("rect",{y:"2",width:"20",height:"1.02041",fill:"white"}),r.createElement("rect",{width:"20",height:"1.02041",fill:"white"}),r.createElement("rect",{y:"-1",width:"10",height:"12",fill:"#010066"}),r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.11387 3.86084C2.92711 3.86084 1.96387 5.23232 1.96387 6.92206C1.96387 8.6118 2.92711 9.98329 4.11387 9.98329C4.54263 9.98329 4.94211 9.80406 5.27763 9.4957C5.08225 9.59203 4.87256 9.64471 4.65427 9.64471C3.60193 9.64471 2.74786 8.42866 2.74786 6.93032C2.74786 5.43198 3.60193 4.21594 4.65427 4.21594C4.88682 4.21594 5.10959 4.27527 5.31571 4.38397C4.97256 4.0538 4.5589 3.86084 4.11387 3.86084Z",fill:"#FFCC00"}),r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.67935 8.51573L6.7737 7.8407L7.04147 9.22221L6.43573 8.06657L6.24676 9.47313L6.0609 8.06576L5.4526 9.2188L5.72343 7.83844L4.81629 8.50957L5.49017 7.42963L4.46387 7.48593L5.40732 6.9203L4.46512 6.35062L5.4913 6.41133L4.81981 5.3285L5.72546 6.00353L5.45769 4.62202L6.06343 5.77766L6.25241 4.37109L6.43827 5.77847L7.04656 4.62543L6.77574 6.00579L7.68287 5.33466L7.00899 6.4146L8.0353 6.3583L7.09184 6.92392L8.03404 7.49361L7.00786 7.43289L7.67935 8.51573Z",fill:"#FFCC00"}))),MalaysiaSquareIcon=e=>r.createElement("svg",Object.assign({viewBox:"0 0 24 16",fill:"none"},e),r.createElement("rect",{width:"24",height:"16",rx:"2",fill:"#CC0001"}),r.createElement("rect",{y:"12.2712",width:"24",height:"0.777454",fill:"white"}),r.createElement("rect",{y:"12.1904",width:"24",height:"0.777454",fill:"white"}),r.createElement("rect",{y:"13.7144",width:"24",height:"0.777454",fill:"white"}),r.createElement("rect",{y:"10.7161",width:"24",height:"0.777454",fill:"white"}),r.createElement("rect",{y:"9.16138",width:"24",height:"0.777454",fill:"white"}),r.createElement("rect",{y:"7.60645",width:"24",height:"0.777454",fill:"white"}),r.createElement("rect",{y:"6.05127",width:"24",height:"0.777454",fill:"white"}),r.createElement("rect",{y:"4.49658",width:"24",height:"0.777454",fill:"white"}),r.createElement("rect",{y:"2.94141",width:"24",height:"0.777454",fill:"white"}),r.createElement("rect",{y:"1.52393",width:"24",height:"0.777454",fill:"white"}),r.createElement("rect",{width:"24",height:"0.777454",fill:"white"}),r.createElement("path",{d:"M0 2C0 0.895431 0.895431 0 2 0H12V8.38095H0V2Z",fill:"#010066"}),r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.93644 1.52393C3.51233 1.52393 2.35645 2.56887 2.35645 3.85629C2.35645 5.14371 3.51233 6.18865 4.93644 6.18865C5.45096 6.18865 5.93034 6.05209 6.33296 5.81716C6.09851 5.89054 5.84688 5.93068 5.58492 5.93068C4.32212 5.93068 3.29724 5.00417 3.29724 3.86258C3.29724 2.72099 4.32212 1.79448 5.58492 1.79448C5.86399 1.79448 6.13132 1.83968 6.37865 1.9225C5.96688 1.67094 5.47049 1.52393 4.93644 1.52393Z",fill:"#FFCC00"}),r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.216 5.07041L8.12923 4.55611L8.45055 5.60869L7.72366 4.72819L7.49689 5.79987L7.27386 4.72758L6.5439 5.60609L6.86889 4.55439L5.78033 5.06572L6.58899 4.24291L5.35742 4.28581L6.48957 3.85485L5.35893 3.42081L6.59034 3.46707L5.78456 2.64205L6.87133 3.15636L6.55001 2.10378L7.2769 2.98427L7.50367 1.9126L7.7267 2.98488L8.45666 2.10638L8.13166 3.15808L9.22022 2.64674L8.41157 3.46955L9.64314 3.42666L8.51099 3.85761L9.64163 4.29165L8.41022 4.2454L9.216 5.07041Z",fill:"#FFCC00"})),MyanmarRoundIcon=e=>r.createElement("svg",Object.assign({viewBox:"0 0 20 20",fill:"none",style:Object.assign({borderRadius:"50%"},e.style)},e),r.createElement("g",null,r.createElement("mask",{style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20"},r.createElement("circle",{cx:"10",cy:"10",r:"10",fill:"#C4C4C4"})),r.createElement("rect",{x:"-4",y:"-1",width:"28",height:"11",fill:"#FECB00"}),r.createElement("rect",{x:"-4",y:"10",width:"28",height:"10",fill:"#EA2839"}),r.createElement("rect",{x:"-4",y:"6.7041",width:"28",height:"6.47773",fill:"#34B233"}),r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.56543 10.3272L10.1796 5.15527L11.7938 10.3272H8.56543Z",fill:"white"}),r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.5292 11.2775L7.18336 14.5129L8.91745 9.37991L11.5292 11.2775Z",fill:"white"}),r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.75181 11.8648L5.33182 8.73143L10.7494 8.79447L9.75181 11.8648Z",fill:"white"}),r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.6105 8.78962L15.0281 8.72658L10.6081 11.86L9.6105 8.78962Z",fill:"white"}),r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.4424 9.37686L13.1765 14.5098L8.83064 11.2744L11.4424 9.37686Z",fill:"white"}))),MyanmarSquareIcon=e=>r.createElement("svg",Object.assign({viewBox:"0 0 24 16",fill:"none"},e),r.createElement("rect",{width:"24",height:"16",rx:"2",fill:"#FECB00"}),r.createElement("rect",{y:"8.3811",width:"24",height:"7.61905",rx:"2",fill:"#EA2839"}),r.createElement("rect",{y:"5.86987",width:"24",height:"4.93542",fill:"#34B233"}),r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.7705 8.63046L12.1541 4.68994L13.5377 8.63046H10.7705Z",fill:"white"}),r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.3108 9.35502L9.58574 11.8201L11.0721 7.90925L13.3108 9.35502Z",fill:"white"}),r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.7874 9.80216L7.99884 7.41482L12.6425 7.46285L11.7874 9.80216Z",fill:"white"}),r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.6667 7.4589L16.3104 7.41087L12.5218 9.79821L11.6667 7.4589Z",fill:"white"}),r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.2361 7.90629L14.7225 11.8171L10.9974 9.35207L13.2361 7.90629Z",fill:"white"})),PhilippinesRoundIcon=e=>r.createElement(Z.I,Object.assign({alt:"round philippines flag",src:B.C.getAssetPath("flags/philippineRound.png"),style:Object.assign({borderRadius:"50%"},e.style)},e)),PhilippinesSquareIcon=e=>r.createElement(Z.I,Object.assign({alt:"square philippines flag",src:B.C.getAssetPath("flags/philippineSquare.png")},e)),SingaporeRoundIcon=e=>r.createElement("svg",Object.assign({viewBox:"0 0 20 20",fill:"none",style:Object.assign({borderRadius:"50%"},e.style)},e),r.createElement("g",null,r.createElement("mask",{maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20"},r.createElement("circle",{cx:"10",cy:"10",r:"10",fill:"white"})),r.createElement("rect",{width:"20",height:"10",y:"0",fill:"#EF3340"}),r.createElement("rect",{width:"20",height:"10",y:"10",fill:"#FFFFFF"}),r.createElement("circle",{cx:"6",cy:"5",r:"3",fill:"white"}),r.createElement("circle",{cx:"6.8",cy:"5",r:"2.4",fill:"#EF3340"}),r.createElement("g",{fill:"white",transform:"translate(6 5)"},r.createElement("polygon",{points:"0,-0.9 0.26,-0.26 0.9,0 0.26,0.26 0,0.9 -0.26,0.26 -0.9,0 -0.26,-0.26",transform:"translate(1.8 -2)"}),r.createElement("polygon",{points:"0,-0.9 0.26,-0.26 0.9,0 0.26,0.26 0,0.9 -0.26,0.26 -0.9,0 -0.26,-0.26",transform:"translate(3 -1)"}),r.createElement("polygon",{points:"0,-0.9 0.26,-0.26 0.9,0 0.26,0.26 0,0.9 -0.26,0.26 -0.9,0 -0.26,-0.26",transform:"translate(3 0.5)"}),r.createElement("polygon",{points:"0,-0.9 0.26,-0.26 0.9,0 0.26,0.26 0,0.9 -0.26,0.26 -0.9,0 -0.26,-0.26",transform:"translate(1.8 1.5)"}),r.createElement("polygon",{points:"0,-0.9 0.26,-0.26 0.9,0 0.26,0.26 0,0.9 -0.26,0.26 -0.9,0 -0.26,-0.26",transform:"translate(0.6 0.5)"})))),SingaporeSquareIcon=e=>r.createElement("svg",Object.assign({viewBox:"0 0 24 16",fill:"none"},e),r.createElement("rect",{width:"24",height:"16",rx:"2",fill:"white"}),r.createElement("rect",{width:"24",height:"8",rx:"2",fill:"#EF3340"}),r.createElement("circle",{cx:"6",cy:"4",r:"3",fill:"white"}),r.createElement("circle",{cx:"6.8",cy:"4",r:"2.4",fill:"#EF3340"}),r.createElement("g",{fill:"white",transform:"translate(6 4)"},r.createElement("polygon",{points:"0,-1 0.3,-0.3 1,0 0.3,0.3 0,1 -0.3,0.3 -1,0 -0.3,-0.3",transform:"translate(1.8 -2)"}),r.createElement("polygon",{points:"0,-1 0.3,-0.3 1,0 0.3,0.3 0,1 -0.3,0.3 -1,0 -0.3,-0.3",transform:"translate(3 -1)"}),r.createElement("polygon",{points:"0,-1 0.3,-0.3 1,0 0.3,0.3 0,1 -0.3,0.3 -1,0 -0.3,-0.3",transform:"translate(3 0.5)"}),r.createElement("polygon",{points:"0,-1 0.3,-0.3 1,0 0.3,0.3 0,1 -0.3,0.3 -1,0 -0.3,-0.3",transform:"translate(1.8 1.5)"}),r.createElement("polygon",{points:"0,-1 0.3,-0.3 1,0 0.3,0.3 0,1 -0.3,0.3 -1,0 -0.3,-0.3",transform:"translate(0.6 0.5)"}))),TaiwanRoundIcon=e=>r.createElement("svg",Object.assign({viewBox:"0 0 20 20",fill:"none",style:Object.assign({borderRadius:"50%"},e.style)},e),r.createElement("g",null,r.createElement("mask",{style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20"},r.createElement("circle",{cx:"10",cy:"10",r:"10",fill:"#C4C4C4"})),r.createElement("circle",{cx:"10",cy:"10",r:"10",fill:"#D8D8D8"}),r.createElement("g",null,r.createElement("mask",{style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20"},r.createElement("circle",{cx:"10",cy:"10",r:"10",fill:"white"})),r.createElement("rect",{width:"30",height:"20",fill:"#ED1E24"}),r.createElement("rect",{width:"15",height:"10",fill:"#2B2F84"}),r.createElement("circle",{cx:"7.49791",cy:"4.99913",r:"1.869",fill:"white"}),r.createElement("path",{d:"M7.93582 2.89402L7.49722 1.25732L7.05762 2.89812C7.28902 2.84212 7.64062 2.82912 7.93582 2.89402Z",fill:"white"}),r.createElement("path",{d:"M6.82515 2.95674L5.62695 1.75854L6.06655 3.39934C6.23895 3.23514 6.53695 3.04814 6.82515 2.95674Z",fill:"white"}),r.createElement("path",{d:"M5.89364 3.56677L4.25684 3.12817L5.45794 4.32927C5.52514 4.10107 5.68964 3.79007 5.89364 3.56677Z",fill:"white"}),r.createElement("path",{d:"M5.39266 4.56055L3.75586 4.99915L5.39666 5.43885C5.34066 5.20745 5.32756 4.85585 5.39266 4.56055Z",fill:"white"}),r.createElement("path",{d:"M5.45504 5.67188L4.25684 6.87007L5.89764 6.43047C5.73344 6.25807 5.54634 5.96007 5.45504 5.67188Z",fill:"white"}),r.createElement("path",{d:"M6.06555 6.60278L5.62695 8.23958L6.82815 7.03838C6.59975 6.97128 6.28875 6.80678 6.06555 6.60278Z",fill:"white"}),r.createElement("path",{d:"M7.05859 7.1041L7.49719 8.7409L7.93679 7.1001C7.70549 7.1561 7.35399 7.1692 7.05859 7.1041Z",fill:"white"}),r.createElement("path",{d:"M8.16992 7.04148L9.36812 8.23968L8.92852 6.59888C8.75622 6.76308 8.45822 6.95018 8.16992 7.04148Z",fill:"white"}),r.createElement("path",{d:"M9.10156 6.43145L10.7384 6.87005L9.53726 5.66895C9.47006 5.89725 9.30556 6.20825 9.10156 6.43145Z",fill:"white"}),r.createElement("path",{d:"M9.60263 5.43763L11.2394 4.99903L9.59863 4.55933C9.65463 4.79073 9.66763 5.14223 9.60263 5.43763Z",fill:"white"}),r.createElement("path",{d:"M9.54026 4.32637L10.7385 3.12817L9.09766 3.56777C9.26196 3.74007 9.44896 4.03807 9.54026 4.32637Z",fill:"white"}),r.createElement("path",{d:"M8.92959 3.39534L9.36819 1.75854L8.16699 2.95964C8.39529 3.02674 8.70629 3.19124 8.92959 3.39534Z",fill:"white"})))),TaiwanSquareIcon=e=>r.createElement("svg",Object.assign({viewBox:"0 0 24 16",fill:"none"},e),r.createElement("rect",{width:"24",height:"16",rx:"2",fill:"#ED1E24"}),r.createElement("path",{d:"M0 2C0 0.89543 0.895431 0 2 0H15V10H0V2Z",fill:"#2B2F84"}),r.createElement("circle",{cx:"7.49791",cy:"4.99913",r:"1.869",fill:"white"}),r.createElement("path",{d:"M7.93582 2.89402L7.49722 1.25732L7.05762 2.89812C7.28902 2.84212 7.64062 2.82912 7.93582 2.89402Z",fill:"white"}),r.createElement("path",{d:"M6.82515 2.95674L5.62695 1.75854L6.06655 3.39934C6.23895 3.23514 6.53695 3.04814 6.82515 2.95674Z",fill:"white"}),r.createElement("path",{d:"M5.89364 3.56677L4.25684 3.12817L5.45794 4.32927C5.52514 4.10107 5.68964 3.79007 5.89364 3.56677Z",fill:"white"}),r.createElement("path",{d:"M5.39266 4.56055L3.75586 4.99915L5.39666 5.43885C5.34066 5.20745 5.32756 4.85585 5.39266 4.56055Z",fill:"white"}),r.createElement("path",{d:"M5.45504 5.67188L4.25684 6.87007L5.89764 6.43047C5.73344 6.25807 5.54634 5.96007 5.45504 5.67188Z",fill:"white"}),r.createElement("path",{d:"M6.06555 6.60278L5.62695 8.23958L6.82815 7.03838C6.59975 6.97128 6.28875 6.80678 6.06555 6.60278Z",fill:"white"}),r.createElement("path",{d:"M7.05859 7.1041L7.49719 8.7409L7.93679 7.1001C7.70549 7.1561 7.35399 7.1692 7.05859 7.1041Z",fill:"white"}),r.createElement("path",{d:"M8.16992 7.04148L9.36812 8.23968L8.92852 6.59888C8.75622 6.76308 8.45822 6.95018 8.16992 7.04148Z",fill:"white"}),r.createElement("path",{d:"M9.10156 6.43145L10.7384 6.87005L9.53726 5.66895C9.47006 5.89725 9.30556 6.20825 9.10156 6.43145Z",fill:"white"}),r.createElement("path",{d:"M9.60263 5.43763L11.2394 4.99903L9.59863 4.55933C9.65463 4.79073 9.66763 5.14223 9.60263 5.43763Z",fill:"white"}),r.createElement("path",{d:"M9.54026 4.32637L10.7385 3.12817L9.09766 3.56777C9.26196 3.74007 9.44896 4.03807 9.54026 4.32637Z",fill:"white"}),r.createElement("path",{d:"M8.92959 3.39534L9.36819 1.75854L8.16699 2.95964C8.39529 3.02674 8.70629 3.19124 8.92959 3.39534Z",fill:"white"})),ThailandRoundIcon=e=>r.createElement("svg",Object.assign({viewBox:"0 0 20 20",fill:"none",style:Object.assign({borderRadius:"50%"},e.style)},e),r.createElement("g",null,r.createElement("mask",{style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20"},r.createElement("circle",{cx:"10",cy:"10",r:"10",fill:"#C4C4C4"})),r.createElement("rect",{x:"-4",y:"-0.0166016",width:"28",height:"20",fill:"#ED1C24"}),r.createElement("rect",{x:"-4",y:"3.31665",width:"28",height:"13.3333",fill:"white"}),r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-4 6.65015H24V13.3168H-4V6.65015Z",fill:"#241D4F"}))),ThailandSquareIcon=e=>r.createElement("svg",Object.assign({viewBox:"0 0 24 17",fill:"none"},e),r.createElement("rect",{y:"0.983398",width:"24",height:"16",rx:"2",fill:"#ED1C24"}),r.createElement("rect",{y:"3.65039",width:"24",height:"10.6667",fill:"white"}),r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 6.31689H24V11.6502H0V6.31689Z",fill:"#241D4F"})),VietnamRoundIcon=e=>r.createElement("svg",Object.assign({viewBox:"0 0 20 20",fill:"none",style:Object.assign({borderRadius:"50%"},e.style)},e),r.createElement("g",null,r.createElement("mask",{style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20"},r.createElement("circle",{cx:"10",cy:"10",r:"10",fill:"#C4C4C4"})),r.createElement("rect",{x:"-4",y:"-0.0166016",width:"28",height:"20",fill:"#DA251D"}),r.createElement("path",{d:"M11.7228 10.8677L14.2819 9.00839L11.1187 9.00839L10.1409 6L9.16316 9.00839L6 9.00839L8.5591 10.8677L7.58184 13.8766L10.1409 12.0168L12.7 13.8766L11.7228 10.8677Z",fill:"#FFEB3B"}))),VietnamSquareIcon=e=>r.createElement("svg",Object.assign({viewBox:"0 0 24 16",fill:"none"},e),r.createElement("g",null,r.createElement("clipPath",null,r.createElement("rect",{width:"24",height:"16",fill:"white"})),r.createElement("path",{d:"M2.01386e-10 2C0 0.895431 0.895431 -7.50368e-10 2 -1.67599e-09L22 -1.84359e-08C23.1046 -1.93615e-08 24 0.895431 24 2L24 14C24 15.1046 23.1046 16 22 16L2 16C0.89543 16 1.52092e-09 15.1046 1.4097e-09 14L2.01386e-10 2Z",fill:"#DA251D"}),r.createElement("path",{d:"M13.7823 8.92854L16.6663 6.8332L13.1016 6.8332L11.9997 3.44287L10.8978 6.8332L7.33301 6.8332L10.217 8.92854L9.11567 12.3195L11.9997 10.2235L14.8837 12.3195L13.7823 8.92854Z",fill:"#FFEB3B"})));var eT={flag:"pfaLGRK"};let Flag=({country:e,language:t,rounded:n,height:a,width:l,isTesting:i,className:o})=>{let s,c;switch(t){case"en":s=r.createElement(EnglishSquareIcon,null),c=r.createElement(EnglishRoundIcon,null);break;case"vi":s=r.createElement(VietnamSquareIcon,null),c=r.createElement(VietnamRoundIcon,null);break;case"id":s=r.createElement(IndonesiaSquareIcon,{isTesting:i}),c=r.createElement(IndonesiaRoundIcon,{isTesting:i});break;case"th":s=r.createElement(ThailandSquareIcon,null),c=r.createElement(ThailandRoundIcon,null);break;case"km":s=r.createElement(CambodiaSquareIcon,null),c=r.createElement(CambodiaRoundIcon,null);break;case"ms":s=r.createElement(MalaysiaSquareIcon,null),c=r.createElement(MalaysiaRoundIcon,null);break;case"my":s=r.createElement(MyanmarSquareIcon,null),c=r.createElement(MyanmarRoundIcon,null);break;case"tl":s=r.createElement(PhilippinesSquareIcon,null),c=r.createElement(PhilippinesRoundIcon,null);break;case"hi":s=r.createElement(IndiaSquareIcon,null),c=r.createElement(IndiaRoundIcon,null);break;case"zh":s=r.createElement(TaiwanSquareIcon,null),c=r.createElement(TaiwanRoundIcon,null)}if(!s&&!c)switch(e){case"VN":s=r.createElement(VietnamSquareIcon,null),c=r.createElement(VietnamRoundIcon,null);break;case"ID":s=r.createElement(IndonesiaSquareIcon,{isTesting:i}),c=r.createElement(IndonesiaRoundIcon,{isTesting:i});break;case"TH":s=r.createElement(ThailandSquareIcon,null),c=r.createElement(ThailandRoundIcon,null);break;case"KH":s=r.createElement(CambodiaSquareIcon,null),c=r.createElement(CambodiaRoundIcon,null);break;case"MY":s=r.createElement(MalaysiaSquareIcon,null),c=r.createElement(MalaysiaRoundIcon,null);break;case"MM":s=r.createElement(MyanmarSquareIcon,null),c=r.createElement(MyanmarRoundIcon,null);break;case"PH":s=r.createElement(PhilippinesSquareIcon,null),c=r.createElement(PhilippinesRoundIcon,null);break;case"IN":s=r.createElement(IndiaSquareIcon,null),c=r.createElement(IndiaRoundIcon,null);break;case"TW":s=r.createElement(TaiwanSquareIcon,null),c=r.createElement(TaiwanRoundIcon,null);break;case"SG":s=r.createElement(SingaporeSquareIcon,null),c=r.createElement(SingaporeRoundIcon,null)}return r.createElement("div",{className:`${eT.flag} ${o||""}`,style:{"--width":l||20,"--height":a||20}},n?c:s)},CaretDown=e=>r.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor"},e),r.createElement("path",{d:"M4.81428 7.53044L7.64065 10.3568C7.83849 10.5546 8.15877 10.5546 8.3561 10.3568L11.1825 7.53044C11.5012 7.21168 11.2756 6.66675 10.8247 6.66675H5.172C4.72118 6.66675 4.49552 7.21168 4.81428 7.53044Z"})),eF=Object.values(K.x9).reduce((e,{phoneCountry:t})=>(e.includes(t)||e.push(t),e),[]);var eP={phoneInput:"i-9Ibox",error:"YDWHh9b",selectedCountry:"_87SIJ95"};let eB=(0,r.forwardRef)((e,t)=>{let{isError:l,defaultCountry:i,selectedCountry:o,countries:s=eF,countryCallingCodeEditable:c=!1,defaultValue:d,value:h,onChange:m,flagComponent:u,arrowComponent:g,withFloatingLabel:b,className:f,inputId:E,label:v,error:w}=e,y=(0,a._)(e,["isError","defaultCountry","selectedCountry","countries","countryCallingCodeEditable","defaultValue","value","onChange","flagComponent","arrowComponent","withFloatingLabel","className","inputId","label","error"]),[C,x]=(0,r.useState)(d||h),[L,k]=(0,r.useState)(null),I=(0,r.useCallback)(e=>{if(!L)return;if(u)return u(e);let{country:t,countryName:n,flagUrl:l}=e,i=(0,a._)(e,["country","countryName","flagUrl"]),o=t?`+${L.getCountryCallingCode(t)}`:"";return r.createElement(r.Fragment,null,r.createElement(Flag,Object.assign({country:t,title:n},i)),r.createElement(V.T,{size:"p2",variant:"primary",className:G()(eP.callingCode,"PhoneInputCountryIconCallingCode")},o))},[u,L]),O=(0,r.useCallback)(()=>g?g():r.createElement("div",{className:G()(eP.arrowSelect,"PhoneInputArrowContainer")},r.createElement(CaretDown,null)),[g]);if((0,r.useEffect)(()=>{x(h)},[h]),(0,r.useEffect)(()=>{(0,a.a)(void 0,void 0,void 0,function*(){let e=yield Promise.all([n.e(5231),n.e(7797),n.e(5454),n.e(106),n.e(9803),n.e(5349),n.e(4148),n.e(2509),n.e(1533),n.e(1108),n.e(9124),n.e(4190),n.e(4584),n.e(1829),n.e(2582),n.e(9301),n.e(4291),n.e(3792),n.e(7743),n.e(3929),n.e(891),n.e(137),n.e(4414),n.e(9762),n.e(1079),n.e(7613),n.e(8098),n.e(3416),n.e(2500),n.e(1570),n.e(3506),n.e(1413),n.e(2138),n.e(9467),n.e(4467),n.e(6966),n.e(5243),n.e(8132),n.e(1375),n.e(4561),n.e(1448),n.e(5465),n.e(1217),n.e(5480),n.e(731),n.e(2050),n.e(2008),n.e(8469),n.e(8214),n.e(1482),n.e(6817),n.e(467),n.e(5951),n.e(9357),n.e(747),n.e(5675),n.e(6753),n.e(4802),n.e(3046),n.e(5745),n.e(3437),n.e(252),n.e(6839),n.e(9424),n.e(5702),n.e(8922),n.e(6399),n.e(553),n.e(2902),n.e(4969),n.e(3257),n.e(6611),n.e(7538),n.e(6894),n.e(5341)]).then(n.bind(n,"A9bs"));k(e)})},[]),!L)return null;let R=Object.assign({ref:t,defaultValue:d,label:v,value:C,onChange:e=>{x(e),null==m||m(e)},countries:s,defaultCountry:i||o,countryCallingCodeEditable:c,displayInitialValueAsLocalNumber:!0,className:G()(eP.phoneInput,{isError:l,[eP.error]:l,[eP.selectedCountry]:o},f),flagUrl:void 0,flagComponent:I,countrySelectProps:{arrowComponent:O},id:E},y);return b?r.createElement(FloatingLabelControl,{shrink:!!C},r.createElement(FloatingLabelControl.Control,null,({shrink:e})=>r.createElement(S.I.Wrapper,{size:"md",label:r.createElement(V.T,{size:e?"p3":"p2",variant:"secondary",weight:"halfBold"},v),inputWrapperOrder:["label","input","description","error"],error:w&&r.createElement(ErrorLabel,{label:w})},r.createElement(p.x,{className:"mantine-Input-wrapper",sx:e=>({".PhoneInput .PhoneInputInput":Object.assign(Object.assign({},(0,A.G)(e)[A.C.LEADGEN].p2),{color:e.colors.gray[9],fontWeight:A.F.halfBold})})},r.createElement(L.default,Object.assign({},R)))))):r.createElement(L.default,Object.assign({},R))});(0,r.forwardRef)((e,t)=>{let{defaultCountry:n,id:l,name:i,placeholder:o,label:s,labelElement:c,labelProps:d,description:h,descriptionProps:m,withAsterisk:u,inputMode:p,inputContainer:g,inputWrapperOrder:b,error:f,className:E,classNames:v,style:w,styles:y}=e,C=(0,a._)(e,["defaultCountry","id","name","placeholder","label","labelElement","labelProps","description","descriptionProps","withAsterisk","inputMode","inputContainer","inputWrapperOrder","error","className","classNames","style","styles"]),x=l||(0,Q.Z)()+i;return r.createElement(S.I.Wrapper,{size:"md",label:s,labelElement:c,labelProps:Object.assign({htmlFor:x},d),description:h,descriptionProps:m,withAsterisk:u,inputMode:p,inputContainer:g,inputWrapperOrder:b,error:f,"data-invalid":!!f,className:E,classNames:v,style:w,styles:y},r.createElement("div",{className:"mantine-Input-wrapper"},r.createElement(eB,Object.assign({},C,{id:x,ref:t,name:i,spellCheck:!1,placeholder:o,defaultCountry:n,className:"mantine-Input-input",type:"tel","data-control":"tel"}))))});let eA=(0,r.createContext)({}),Popover=e=>{var{children:t,closeOnClickOutside:n=!0}=e,l=(0,a._)(e,["children","closeOnClickOutside"]);let[i,{close:o,open:s}]=(0,P.q)(!1),c=n?(0,N.O)(o):(0,r.useRef)(),d=Object.assign({},"function"==typeof t?{opened:i}:{});return r.createElement(eA.Provider,{value:{opened:i,close:o,open:s}},r.createElement(j.J,Object.assign({closeOnClickOutside:n},d,l),r.createElement("div",{ref:c},"function"==typeof t?t({open:s,close:o,opened:i}):t)))};Popover.Target=j.J.Target,Popover.Dropdown=j.J.Dropdown;var eZ=(0,i.k)(e=>{var t;return{root:{},iconWrapper:{display:"none"},label:{display:"inline-block",cursor:"pointer",".checked":{display:"none"},".unchecked":{display:"inline-block"},'&[data-checked="true"]':{".checked":{display:"inline-block"},".unchecked":{display:"none"}},'&,&[data-checked="true"]':{padding:0,border:0,height:"auto"}},btnRoot:{pointerEvents:"none",'&[data-variant="secondary"]':{backgroundColor:null===(t=e.colors[e.primaryColor])||void 0===t?void 0:t[0]},".mantine-Button-label":{fontWeight:"normal",fontSize:(0,o.h)(14)}}}});let ChipButton=e=>{var{variant:t="secondary",withIcon:n,children:l,buttonProps:i}=e,o=(0,a._)(e,["variant","withIcon","children","buttonProps"]);let{classes:s,cx:c}=eZ();return r.createElement(M.A,Object.assign({classNames:s},o,{unstyled:!0}),r.createElement(et.B,Object.assign({className:c(s.btnRoot,"checked"),leftIcon:n?r.createElement(X.Z,{size:18,color:"currentColor"}):void 0,variant:t},i),l),r.createElement(et.B,Object.assign({className:c(s.btnRoot,"unchecked"),leftIcon:n?r.createElement(ee.Z,{size:18,color:"currentColor"}):void 0,variant:"tertiary"},i),l))};ChipButton.Group=M.A.Group},BhfW:function(e,t,n){n.d(t,{T:function(){return ThrForm}});var a=n("HJpP"),r=n("q1tI"),l=n("cChf"),i=n("ZFu2"),o=n("PHlL"),s=n("L+vc"),c=n("Y5X8"),d=n("f2kC"),h=n("qABS"),m=n("StZb"),u=n("RL1p"),p=n("oZWv"),g=n("SlSK"),b=n("1iCw"),f=n("xrdX");let E=(0,r.createContext)({}),DefaultForm=e=>{var t,n=(0,a._)(e,[]);let{t:l,locale:i}=(0,s.u)(),{isAdult:o,activeValueNote:c,linkTool:d,form:v,submitProps:w}=(0,r.useContext)(E),{classes:y={}}=(0,r.useContext)(g.C);return r.createElement(b.H,Object.assign({formLayout:"default"},n),r.createElement(b.H.FormRow,null,r.createElement(h.G,Object.assign({},v.getInputProps("gender")))),r.createElement(b.H.FormRow,null,r.createElement(u.D,Object.assign({},v.getInputProps("age"),{placeholder:"DD/MM/YYYY",popoverProps:{withinPortal:!0},label:r.createElement(p.T,{size:"p2",weight:"semiBold"},l("targetHeartRate.ageInput")),maxDate:new Date}))),r.createElement(b.H.FormRow,null,r.createElement(m.I.Number,Object.assign({label:r.createElement(p.T,{size:"p2",weight:"semiBold"},l("targetHeartRate.heartRateInput")),placeholder:l("tools.inputPlaceholder",{content:"60"})},v.getInputProps("heartRate"),{min:40,max:200,styles:()=>({rightSection:{width:"auto"}})}))),o&&r.createElement(b.H.FormRow,null,r.createElement(m.S,Object.assign({label:r.createElement(p.T,{size:"p2",weight:"semiBold"},l("targetHeartRate.selectActive")),defaultValue:null===(t=null==c?void 0:c[0])||void 0===t?void 0:t.value,data:c.map(e=>({value:e.value,label:e.label})),styles:{item:{whiteSpace:"nowrap",padding:"10px 12px",fontSize:"14px"}},withinPortal:!0},v.getInputProps("activeValue")))),r.createElement(b.H.FormRow,{className:y.submitWrapper},r.createElement(b.H.Submit,Object.assign({className:y.submitBtn,type:"submit",dataEventCategory:"Health Tool",dataEventAction:"THR",dataEventLabel:`https://${f.v[i]}/${d}`},w),l("bmi.submit"))))},InlineForm=e=>{var t,n=(0,a._)(e,[]);let{t:l,locale:i}=(0,s.u)(),{isAdult:o,activeValueNote:c,linkTool:d,form:p,submitProps:v}=(0,r.useContext)(E),{classes:w={}}=(0,r.useContext)(g.C);return r.createElement(b.H,Object.assign({formLayout:"inline"},n),r.createElement(b.H.FormRow,null,r.createElement(b.H.BorderInlineControl,{label:l("tools.selectGender"),width:"none"},r.createElement(h.G,Object.assign({type:"radio",hideLabel:!0,error:null},p.getInputProps("gender")))),p.errors.gender&&r.createElement(b.H.Error,null,p.errors.gender)),r.createElement(b.H.FormRow,null,r.createElement(b.H.BorderInlineControl,{label:l("targetHeartRate.ageInput")},r.createElement(u.D,Object.assign({},p.getInputProps("age"),{placeholder:"DD/MM/YYYY",popoverProps:{withinPortal:!0},error:null,maxDate:new Date}))),p.errors.age&&r.createElement(b.H.Error,null,p.errors.age)),r.createElement(b.H.FormRow,null,r.createElement(b.H.BorderInlineControl,{label:l("targetHeartRate.heartRateInput")},r.createElement(m.I.Number,Object.assign({placeholder:l("tools.inputPlaceholder",{content:"60"})},p.getInputProps("heartRate"),{error:null,min:40,max:200,rightSection:r.createElement(b.H.Unit,null,"bmp"),styles:()=>({rightSection:{width:"auto"}})}))),p.errors.heartRate&&r.createElement(b.H.Error,null,p.errors.heartRate)),o&&r.createElement(b.H.FormRow,null,r.createElement(b.H.BorderInlineControl,{label:l("targetHeartRate.selectActive")},r.createElement(m.S,Object.assign({defaultValue:null===(t=null==c?void 0:c[0])||void 0===t?void 0:t.value,data:c.map(e=>({value:e.value,label:e.label})),styles:{item:{whiteSpace:"nowrap",padding:"10px 12px",fontSize:"14px"}},withinPortal:!0},p.getInputProps("activeValue"))))),r.createElement(b.H.FormRow,{className:w.submitWrapper},r.createElement(b.H.Submit,Object.assign({className:w.submitBtn,type:"submit",dataEventCategory:"Health Tool",dataEventAction:"THR",dataEventLabel:`https://${f.v[i]}/${d}`},v),l("bmi.submit"))))},ThrForm=e=>{var{formLayout:t,onSubmit:n,onError:h,submitProps:m}=e,u=(0,a._)(e,["formLayout","onSubmit","onError","submitProps"]);let{t:p,locale:g}=(0,s.u)(),b=(0,r.useRef)(40),{getHealthToolLink:f}=(0,o.u)(g),v=(0,l.c)({initialValues:{heartRate:60,activeValue:"low_intensity"},validate:{gender:(0,i.U)(p("validation.error.requiredField")),age:(0,i.U)(p("validation.error.requiredField")),heartRate:e=>Number(e)>=b.current&&200>=Number(e)?null:p("tools.heartRateRangeErr",{min:b.current,max:200})}}),w=(0,r.useMemo)(()=>f(d.H.THR),[f]),[y,C]=(0,r.useState)(!1),x=[{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}],L=[{value:"low_intensity",label:p("targetHeartRate.lowIntensity.title"),image:c.C.getAssetPath("/low.svg"),imageActive:c.C.getAssetPath("/low-active.svg"),content:p("targetHeartRate.lowIntensity.note")},{value:"moderate_intensity",label:p("targetHeartRate.moderateIntensity.title"),image:c.C.getAssetPath("/moderate.svg"),imageActive:c.C.getAssetPath("/moderate-active.svg"),content:p("targetHeartRate.moderateIntensity.note")},{value:"aerobic_zone",label:p("targetHeartRate.aerobicZone.title"),image:c.C.getAssetPath("/aerobic.svg"),imageActive:c.C.getAssetPath("/aerobic-active.svg"),content:p("targetHeartRate.aerobicZone.note")},{value:"vigorous_intensity",label:p("targetHeartRate.vigorousIntensity.title"),image:c.C.getAssetPath("/vigorous.svg"),imageActive:c.C.getAssetPath("/vigorous-active.svg"),content:p("targetHeartRate.vigorousIntensity.note")},{value:"maximum_intensity",label:p("targetHeartRate.maximumIntensity.title"),image:c.C.getAssetPath("/maximum.svg"),imageActive:c.C.getAssetPath("/maximum-active.svg"),content:p("targetHeartRate.maximumIntensity.note")}];(0,r.useEffect)(()=>{let e=v.getInputProps("age").value,t=v.getInputProps("gender").value;if(e instanceof Date){let n=(new Date().getTime()-e.getTime())/1e3;n>=567648e3?C(!0):C(!1);let a=x.find(e=>n>=31536e3*e.minAge&&n<31536e3*e.maxAge)||x[0];b.current="male"===t?a.rangeMale:a.rangeFemale}},[v]);let k=Object.assign(Object.assign({},u),{onSubmit:v.onSubmit(n,h)});return r.createElement(E.Provider,{value:{isAdult:y,activeValueNote:L,linkTool:w,form:v,submitProps:m}},"inline"===t?r.createElement(InlineForm,Object.assign({},k)):r.createElement(DefaultForm,Object.assign({},k)))}},Ostc:function(e,t,n){n.d(t,{C:function(){return Close},D:function(){return DrawerComponent},u:function(){return useDrawerDrag}});var a=n("q1tI"),r=n("HJpP"),l=n("iuhU"),i=n("rSBk"),o=n("rBCA"),s=n("NGsg");let Close=e=>a.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor"},e),a.createElement("path",{d:"M3.99403 3.32695C3.86141 3.32698 3.73181 3.36657 3.62181 3.44065C3.5118 3.51472 3.42638 3.61992 3.37648 3.7428C3.32658 3.86567 3.31445 4.00064 3.34165 4.13044C3.36885 4.26024 3.43415 4.37898 3.52919 4.47148L7.05784 8.00013L3.52919 11.5288C3.46521 11.5902 3.41413 11.6638 3.37894 11.7452C3.34375 11.8266 3.32516 11.9142 3.32425 12.0029C3.32335 12.0916 3.34015 12.1796 3.37368 12.2617C3.40721 12.3438 3.45678 12.4185 3.5195 12.4812C3.58222 12.5439 3.65682 12.5935 3.73894 12.627C3.82106 12.6605 3.90904 12.6773 3.99774 12.6764C4.08643 12.6755 4.17405 12.6569 4.25547 12.6217C4.33689 12.5865 4.41047 12.5355 4.4719 12.4715L8.00054 8.94283L11.5292 12.4715C11.5906 12.5355 11.6642 12.5865 11.7456 12.6217C11.827 12.6569 11.9147 12.6755 12.0034 12.6764C12.092 12.6773 12.18 12.6605 12.2621 12.627C12.3443 12.5935 12.4189 12.5439 12.4816 12.4812C12.5443 12.4185 12.5939 12.3439 12.6274 12.2617C12.6609 12.1796 12.6777 12.0916 12.6768 12.0029C12.6759 11.9142 12.6573 11.8266 12.6222 11.7452C12.587 11.6638 12.5359 11.5902 12.4719 11.5288L8.94325 8.00013L12.4719 4.47148C12.5682 4.37784 12.634 4.25728 12.6607 4.1256C12.6873 3.99392 12.6735 3.85726 12.6212 3.73354C12.5688 3.60982 12.4803 3.5048 12.3672 3.43224C12.2542 3.35969 12.1218 3.32299 11.9875 3.32695C11.8143 3.33211 11.6499 3.4045 11.5292 3.52877L8.00054 7.05742L4.4719 3.52877C4.40977 3.46491 4.33548 3.41415 4.2534 3.37948C4.17132 3.34482 4.08313 3.32696 3.99403 3.32695Z"})),c=300,useDrawerDrag=(e=c)=>{let[t,n]=(0,a.useState)(!1),r=(0,a.useCallback)(()=>{n(!0)},[]),l=(0,a.useCallback)(()=>{setTimeout(()=>{n(!1)},e)},[e]);return{isDragging:t,handleDragStart:r,handleDragEnd:l}},d=(0,o.Z)(i.dy.Content)`
position: fixed;
z-index: ${s.Z-9e6+1};
inset: 0;
background-color: #fff;
outline: none !important;
&::-webkit-scrollbar {
width: 6px;
height: 6px;
}
&::-webkit-scrollbar-track {
background-color: transparent;
}
&::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, 0.4);
border-radius: 6px;
}
&[data-vaul-drawer-direction='bottom'] {
border-top-left-radius: 8px;
border-top-right-radius: 8px;
}
&[data-vaul-drawer-direction='top'] {
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
}
&[data-vaul-drawer-direction='left'] {
border-top-right-radius: 8px;
border-bottom-right-radius: 8px;
}
&[data-vaul-drawer-direction='right'] {
border-top-left-radius: 8px;
border-bottom-left-radius: 8px;
}
${e=>e.isDragging&&`
input {
caret-color: transparent;
}
`}
`,h=(0,o.Z)(i.dy.Overlay)`
position: fixed;
inset: 0;
z-index: ${s.Z-9e6};
width: 100%;
max-height: 100%;
&[data-state='open'] {
opacity: 0.6 !important;
}
`,DrawerComponent=e=>{let{open:t,onOpenChange:n,snapPoints:o,activeSnapPoint:c,setActiveSnapPoint:m,children:u,overlayClassName:p,className:g,fadeFromIndex:b=s.Z-9e6,onClose:f}=e,E=(0,r._)(e,["open","onOpenChange","snapPoints","activeSnapPoint","setActiveSnapPoint","children","overlayClassName","className","fadeFromIndex","onClose"]),[v,w]=(0,a.useState)(t),[y,C]=(0,a.useState)(o?null==o?void 0:o[0]:null),{isDragging:x,handleDragStart:L,handleDragEnd:k}=useDrawerDrag(),S=(0,a.useCallback)(e=>{w(e),null==n||n(e)},[n]),I=(0,a.useMemo)(()=>o&&o.length?y===o[o.length-1]:v,[y,o]),O=(0,a.useMemo)(()=>{let e={open:v,onOpenChange:S,fadeFromIndex:b};return o&&(null==o?void 0:o.length)&&(e.snapPoints=o,e.activeSnapPoint=y,e.setActiveSnapPoint=e=>{C(e),null==m||m(e)}),e},[v,S,y,C,m,o,b]);return(0,a.useEffect)(()=>{w(t)},[t]),(0,a.useEffect)(()=>{C(c)},[c]),a.createElement(i.dy.Root,Object.assign({onDrag:L,onRelease:k,onClose:f},E,O),a.createElement(i.dy.Portal,null,a.createElement(h,{className:(0,l.default)(p,"drawer__overlay",{drawer__overlay_full:I})}),a.createElement(d,{isDragging:x,className:(0,l.default)(g,"drawer__content",{drawer__content_full:I})},a.createElement(i.dy.Handle,{className:"drawer__handle"}),a.createElement(i.dy.Title,{style:{display:"none"}}),u)))}}}]);