"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7730],{W9uT:function(e,t,i){i.d(t,{C:function(){return l}});var a=i("xrdX"),n=i("GOBr"),o=i("yNk5");let isNumeric=e=>!isNaN(parseFloat(e))&&isFinite(e),r="hellosehat.com",l=new class{constructor(){this.baseDomain="",this.subPath="",this.getAssetPath=(e,t,i)=>{let a="https://hhg-common."+[t||this.getBaseDomain(),i||this.subPath,e].join("/");return n.y||o.env.JEST_WORKER_ID?a:a+"?v="+Math.floor(new Date().getTime()/1e3/60/3)}}getBaseDomain(){if(this.baseDomain)return this.baseDomain;if("undefined"!=typeof window){let{host:e}=window.location,t=e.split("."),i=a.v[Object.keys(a.v).find(t=>e.includes(a.v[t]))];return t.includes("localhost")||t.includes("hellohealthgroup")||t.every(e=>isNumeric(e))||!i?r:i}return r}};l.subPath="common",l.baseDomain=a.v["vi-VN"]},"2FJ2":function(e,t,i){i.d(t,{A:function(){return Avatar},D:function(){return DistanceTag},I:function(){return IconWrapper},P:function(){return Pin3},S:function(){return ShapedArrowDown}});var a=i("q1tI"),n=i("rBCA"),o=i("iBNF"),r=i("yPD6"),l=i("HKYo");let Pin3=e=>a.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 12 12",fill:"none"},e),a.createElement("g",{clipPath:"url(#clip0_5371_10640)"},a.createElement("path",{d:"M6.6665 4.3335L8.1665 5.8335L6.6665 7.3335",stroke:"#8C8C8C",strokeWidth:.72,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M8.16667 5.8335H5.83333C5.09667 5.8335 4.5 6.43016 4.5 7.16683V7.50016",stroke:"#8C8C8C",strokeWidth:.72,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M6.94331 10.3902L10.3907 6.94281C10.9114 6.42211 10.9114 5.57789 10.3907 5.05719L6.94331 1.60981C6.42261 1.08911 5.57839 1.08911 5.05769 1.60981L1.61031 5.05719C1.08961 5.57789 1.08961 6.42211 1.61031 6.94281L5.05769 10.3902C5.57839 10.9109 6.42261 10.9109 6.94331 10.3902Z",stroke:"#8C8C8C",strokeWidth:.72,strokeLinecap:"round",strokeLinejoin:"round"})),a.createElement("defs",null,a.createElement("clipPath",{id:"clip0_5371_10640"},a.createElement("rect",{width:12,height:12,fill:"white"})))),ShapedArrowDown=e=>a.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"none"},e),a.createElement("path",{d:"M13.5554 9.33398L7.99989 5.55621L2.44434 9.33398",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"})),d=n.Z.div`
background-color: var(--background-color, transparent);
color: white;
cursor: pointer;
img {
--width: var(--width-prop, 40px);
--height: var(--height-prop, 40px);
width: var(--width);
height: var(--height);
}
&[data-has-max='true'] {
img {
max-width: var(--width);
max-height: var(--height);
}
}
&[data-avatar-type='square'] {
img {
--width: var(--width-prop, 72px);
--height: var(--height-prop, 72px);
border-radius: ${o.r.borderRadius};
}
}
&[data-avatar-type='rounded'] {
img {
border-radius: 50%;
}
}
&[data-custom-size='true'] {
display: flex;
overflow: hidden;
overflow: hidden;
width: var(--size);
height: var(--size);
align-items: center;
justify-content: center;
background-size: cover;
font-size: calc(var(--size) / 2);
font-weight: bold;
&[data-avatar-type='square'] {
border-radius: ${o.r.borderRadius};
}
&[data-avatar-type='rounded'] {
border-radius: 50%;
img {
--width: 100%;
--height: 100%;
}
}
img {
object-fit: cover;
}
}
`,s={xs:28,small:32,medium:40,large:48,xl:64,xxl:80,xxxl:96},Avatar=({type:e="square",size:t,avatarImg:i,avatarUrl:n,firstLetter:o,backgroundColor:l,onClick:c,style:p,className:m,width:u,height:g,alt:h})=>{let v=t?s[t]:void 0,[f,x]=(0,a.useState)(!1);(0,a.useEffect)(()=>{if(n){let e=document.createElement("img");e.setAttribute("src",n),e.addEventListener("error",()=>{x(!0)})}},[n,x]);let y=(!n&&!i||f)&&o;return a.createElement(d,{style:Object.assign(Object.assign({},p),{"--size":v?v+"px":void 0,"--width-prop":u?u+"px":void 0,"--height-prop":g?g+"px":void 0,"--background-color":l}),"data-has-max":!!(u&&g),"data-avatar-type":e,onClick:c,className:m,avatarUrl:n,"data-custom-size":!!t},i,n&&!f&&a.createElement(r.I,{src:n,alt:h||"avatar"}),y&&o)},c=n.Z.div`
display: inline-flex;
align-items: center;
gap: 4px;
padding: 4px 8px;
color: ${o.r.colors.red700};
border-radius: 8px;
border: 1px solid ${o.r.colors.neutral100};
font-size: 0.6875rem;
line-height: 1rem;
border-radius: 0.5rem;
`,p=(0,n.Z)(Pin3)`
width: 0.75rem;
height: 0.75rem;
color: ${o.r.colors.gray400};
`;function DistanceTag({value:e,className:t}){return a.createElement(c,{className:t},a.createElement(p,null),a.createElement(l.T,{size:"p3",weight:"regular",color:o.r.colors.gray400},e))}let m=n.Z.div`
display: inline-flex;
align-items: center;
justify-content: center;
flex-grow: 0;
flex-shrink: 0;
width: calc(var(--wrapper-size, var(--icon-size)) * 1px);
height: calc(var(--wrapper-size, var(--icon-size)) * 1px);
&[data-clickable='true'] {
cursor: pointer;
}
> * {
width: calc(var(--icon-size) * 1px);
height: calc(var(--icon-size) * 1px);
}
&[data-svg-custom-stroke='true'] > svg * {
stroke: var(--icon-stroke-color);
}
&[data-svg-custom-fill='true'] > svg * {
fill: var(--icon-fill-color);
}
`,IconWrapper=({children:e,className:t,onClick:i,wrapperSize:n,iconSize:o=24,wrapperStyle:r,iconStyle:l,svgIcon:d,wrapperProps:s})=>a.createElement(m,Object.assign({className:t,onClick:i,style:Object.assign(Object.assign(Object.assign(Object.assign({},n&&{"--wrapper-size":n}),o&&{"--icon-size":o}),d&&Object.assign(Object.assign({},d.fill&&{"--icon-fill-color":d.fill}),d.stroke&&{"--icon-stroke-color":d.stroke})),r),"data-clickable":!!i,"data-svg-custom-stroke":!!(null==d?void 0:d.stroke),"data-svg-custom-fill":!!(null==d?void 0:d.fill)},s),a.cloneElement(e,{style:l}))},pQnK:function(e,t,i){i.d(t,{L:function(){return Loading}});var a=i("q1tI"),n=i("w3RM"),o=i("GXD3"),r=i("AeFk"),l=i("rBCA"),d=i("iBNF");let s=l.Z.div`
display: flex;
align-items: center;
justify-content: center;
padding: 1em;
button {
position: relative;
}
`,c=r.F4`
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
`;l.Z.div`
display: flex;
width: fit-content;
width: -moz-fit-content;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 1rem 2rem;
background: white;
border-radius: ${d.r.borderRadius};
box-shadow: -1px 1px 2px rgba(67, 70, 74, 0.0001),
-2px 2px 5px rgba(67, 86, 100, 0.123689);
.loading-spinner {
width: 24px;
height: 24px;
margin-bottom: 0.5rem;
animation: ${c} 1.2s linear infinite;
}
&[data-is-marrybaby='true'] {
box-shadow: none;
}
`;let Loading=({className:e,size:t="md"})=>{let{t:i}=(0,o.u)();return a.createElement(s,{className:e},a.createElement(n.B,{size:t,color:"transparent",isLoading:!0},i("loading")))}},Dhid:function(e,t,i){i.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 M},d:function(){return getPostFormData},e:function(){return editPost},f:function(){return createPost},g:function(){return getDefaultFailNoti},h:function(){return deletePost},i:function(){return R},j:function(){return deleteComment},k:function(){return decodeCommentBody},l:function(){return likeUnlikeComment},m:function(){return likeUnlikePost},u:function(){return useImagePicker}});var a=i("q1tI"),n=i("w3RM"),o=i("iYxA"),r=i("HKYo"),l=i("HkQG"),d=i("i8i4"),s=i("R7z5"),c=i("rBCA"),p=i("iBNF"),m=i("mHfz"),u=i("3Hk+"),g=i("GXD3"),h=i("BYES"),v=i("zHfJ"),f=i("IQVP"),x=i("q2Ly"),y=i("EOz7"),b=i("pQnK"),w=i("deTL"),E=i("mI9h"),k=i("t/pd"),C=i("fKfj"),N=i("bi52"),_=i("K8yQ"),z=i("/pFO");let useImagePicker=(e,t)=>{let[i,n]=(0,a.useState)(e||[]),o=(0,a.useMemo)(()=>(e||i).map(e=>"string"==typeof e?e:URL.createObjectURL(e)),[e,i]);return{onSelectImages:a=>{let o=a.target.files;if(o){if(t&&e){let a=e||i;t(a.concat(Array.from(o)))}else n(i=>{let a=e||i;return t&&t(a.concat(Array.from(o))),a.concat(Array.from(o))})}},onRemoveImage:i=>{t&&e?(e.splice(i,1),t(e.slice())):n(a=>{let n=e||a;return n.splice(i,1),t&&t(n.slice()),n.slice()})},onRemoveAllImages:()=>{t?t([]):n([])},imageSrcs:o,imageFiles:e||i}},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 i=yield(0,s.e)((0,s.f)(f.yy.POST.LIKE,{id:e,_locale:t}),"GET");return i}),deletePost=({id:e,locale:t})=>(0,m.a)(void 0,void 0,void 0,function*(){if(!e)return;let i=yield(0,s.e)((0,s.f)(f.yy.POST.DELETE,{id:e,_locale:t}),"DELETE");return i}),getPostFormData=({title:e,description:t,communityId:i,imageFiles:a,previewUrl:n,topicIds:o,locale:r,sanitizeFunction:d,categoryCommunityId:s,categoryTopicIds:c,introUrl:p,bannerUrl:u,scheduleTime:g,isAnonymous:h,isAskDoctor:f})=>(0,m.a)(void 0,void 0,void 0,function*(){let m=new FormData,y=(0,x.j)(t),b=(0,x.j)(e),w=(0,x.i)(y);if(m.append("title",b),m.append("description",(0,x.k)(y,d)),s?m.append("category_community",String(s)):i&&m.append("community_id",String(i)),m.append("is_anonymous",h?"1":"0"),m.append("is_question",f?"1":"0"),(null==n?void 0:n.title)&&m.append("preview_title",n.title),(null==n?void 0:n.description)&&m.append("preview_description",n.description),(null==n?void 0:n.url)&&m.append("preview_link",(0,l.c)(n.url)),(null==n?void 0:n.image)&&m.append("preview_image",(0,l.c)(n.image)),null==o||o.forEach(e=>{m.append("topics[]",String(e||""))}),null==c||c.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(i=>{setTimeout(()=>{i((0,x.u)(e,r))},2e3*t)})));null==e||e.filter(Boolean).slice(0,v.M).forEach((e,t)=>{m.append(`images[${t}]`,e)})}else m.append("images","");return null==w||w.forEach(e=>{m.append("mention_ids[]",e)}),m.append("intro_url",p||""),m.append("banner",u||""),g&&(m.append("post_type","scheduled"),m.append("schedule_datetime",g)),m}),createPost=({locale:e,formData:t,isArticleComment:i})=>(0,m.a)(void 0,void 0,void 0,function*(){let a=yield(0,s.e)((0,s.f)(i?f.yy.POST.CREATE_ARTICLE_COMMENT:f.yy.POST.CREATE,{_locale:e}),"POST",{data:t});return a}),editPost=({id:e,locale:t,formData:i})=>(0,m.a)(void 0,void 0,void 0,function*(){let a=yield(0,s.e)((0,s.f)(f.yy.POST.UPDATE,{id:e,_locale:t}),"POST",{data:i});return a}),reportPost=({id:e,reason:t,locale:i})=>{let a=new FormData;return a.append("reason",t),(0,s.e)((0,s.f)(f.yy.POST.REPORT,{_locale:i,id:e}),"POST",{data:a})},T=c.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 ${p.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;
}
`}
`,S=c.Z.div`
cursor: pointer;
display: flex;
align-items: center;
`,PopupFrame=({className:e,style:t,closeIcon:i,heading:n="",children:r,isOpen:l=!1,hasFullscreen:d=!1,disableClickOutside:s=!1,initExpand:c=!1,onExpandChange:p,onClose:m=()=>null})=>{let[u,g]=(0,a.useState)(c);return a.createElement(T,{className:e,style:t,isExpand:u,hasFullscreen:d},a.createElement(N.P,{type:"confirm",onClose:m,isOpen:l,closeIcon:i||a.createElement("img",{src:_.C,loading:"lazy"}),enableAnimation:!d,disableClickOutside:s},a.createElement("div",{className:"header"},a.createElement(o.H,{tag:"h5"},n),d&&a.createElement(S,{onClick:()=>{null==p||p(),g(!u)}},a.createElement(C.Z,{size:14,isExpand:u}))),a.createElement("div",{className:"content"},"function"==typeof r?r(u):r)))};var M="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 I=c.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: ${p.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: ${p.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'] {
${l.M.mbDown} {
top: 100%;
transform: translate(-50%, -100%);
max-width: unset;
width: 100%;
background: unset;
overflow: unset;
}
}
}
.popup-content {
.close-button {
${l.M.mbDown} {
display: none;
}
}
.confirm-dialog {
${l.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;
${l.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 {
${l.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;
}
}
${l.M.mbDown} {
display: flex;
}
}
}
}
}
`,PopupDanger=({className:e,isMarryBaby:t,style:i,title:c,description:p,acceptText:m,cancelText:u,onAccept:g,onCancel:h,thumbnail:v,isThumbnailIcon:f,onClose:x,acceptBtnTracking:y,acceptBtnProps:b,cancelBtnProps:w})=>{let{data:{env:{isMarryBaby:E}}}=(0,a.useContext)(s.T),k="boolean"==typeof t?t:E,[C,N]=(0,a.useState)(!1);return((0,a.useEffect)(()=>((0,l.t)(!0),setTimeout(()=>N(!0),0),()=>(0,l.t)(!1)),[]),"undefined"==typeof window)?null:d.createPortal(a.createElement(I,{"data-is-marrybaby":k,className:e,style:i,"data-open":C},a.createElement(PopupFrame,{className:"popup-frame",isOpen:C,onClose:x},a.createElement("div",{className:"confirm-dialog",onClick:e=>e.stopPropagation()},a.createElement("div",{className:"confirm-content"},v&&a.createElement("div",{className:`thumbnail-container ${f?"is-icon":""}`},a.createElement("img",{className:"thumbnail",src:v,loading:"lazy"})),a.createElement(o.H,{className:"title",tag:"h2"},c),a.createElement(r.T,{className:"desc",size:"lg"},p),a.createElement("div",{className:"btn-group"},a.createElement(n.B,Object.assign({theme:k?"marryBaby":"helloSites",size:"md",color:"tertiary",onClick:()=>{null==g||g(),null==x||x()}},b,y),m),a.createElement(n.B,Object.assign({theme:k?"marryBaby":"helloSites",size:"md",onClick:()=>{null==h||h(),null==x||x()}},w),u)))),k&&v&&a.createElement("div",{className:`thumbnail-container is-mobile ${f?"is-icon":""}`},a.createElement("img",{className:"thumbnail",src:v,loading:"lazy"})))),(0,l.a)())},P=c.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: ${p.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: ${p.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 ${p.r.colors.gray200};
border-radius: ${p.r.borderRadius};
&:active,
&:focus {
border-color: ${p.r.colors.primaryBase};
box-shadow: 0px 0px 2px 2px ${p.r.colors.primary200};
}
&:disabled {
background-color: ${p.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: ${p.r.sizes.fwRegular};
${l.M.mbDown} {
font-size: 22px;
line-height: 1.2;
}
${l.M.mbUp} {
font-size: 26px;
line-height: 1.2;
}
}
}
&[data-size='md'] {
.as-input {
font-weight: ${p.r.sizes.fwRegular};
line-height: 22px;
${l.M.mbDown} {
font-size: 14px;
line-height: 1.2;
}
${l.M.mbUp} {
font-size: 16px;
line-height: 1.2;
}
}
}
&[data-size='sm'] {
.as-input {
font-weight: ${p.r.sizes.fwRegular};
line-height: 20px;
${l.M.mbDown} {
font-size: 13px;
line-height: 1.5;
}
${l.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: ${p.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;
}
}
}
`,$=(0,a.createContext)({}),getCommentFormBody=({postId:e,message:t,photos:i,link:a,locale:n,sanitizeFunction:o,replyingUserId:r,replyingUserName:l,replyingId:d})=>(0,m.a)(void 0,void 0,void 0,function*(){let s=new FormData,c=(0,x.k)(t.replace(/(\ )+/g," "),o),p=(0,x.i)(c);if(i&&i.length>0){let e=yield Promise.all(null==i?void 0:i.map(e=>(0,x.u)(e,n)));e.filter(Boolean).slice(0,v.M).forEach(e=>{s.append("images[]",e)})}return a&&s.append("link",a),null==p||p.forEach(e=>{s.append("mention_ids[]",e)}),s.append("post_id",e),d&&s.append("parent_id",d),r&&(p.unshift(r),c=`[mention+id="${r}"+name="${(l||"").replace('"',"'")}"]${c}`,s.append("parent_user_id",String(r))),s.append("content",c),s.append("content",c),s}),submitComment=(e,t)=>(0,m.a)(void 0,void 0,void 0,function*(){return(0,s.e)((0,s.f)(f.yy.COMMENT.CREATE,{_locale:t}),"POST",{data:e})}),decodeCommentBody=e=>{try{let t=e.match(/\[@([^\]]+)\]/),i=t?t[0].replace("[@","").replace("]",""):"",a=e.replace(/\[@([^\]]+)\]/,"");return{text:a.trim(),replyingTo:i}}catch(e){}return{text:""}},submitReply=(e,t)=>(0,m.a)(void 0,void 0,void 0,function*(){return(0,s.e)((0,s.f)(f.yy.COMMENT.REPLY,{_locale:t}),"POST",{data:e})}),likeUnlikeComment=({commentId:e,setLike:t=!1,locale:i})=>(0,m.a)(void 0,void 0,void 0,function*(){return(0,s.e)((0,s.f)(t?f.yy.COMMENT.LIKE:f.yy.COMMENT.UNLIKE,{_locale:i,id:e}),"GET")}),deleteComment=({id:e,locale:t})=>(0,s.e)((0,s.f)(f.yy.COMMENT.DELETE,{_locale:t,id:e}),"DELETE"),InputCommentBar=({isReply:e,className:t,onClose:i,replyToName:o,style:l,replyingId:d,replyingUser:c,onPostSuccess:p,post:f,isMarryBaby:x})=>{let{action:{pushNotifications:k,sanitizeFunction:C},data:{userInfo:N,locale:_,env:{isMarryBaby:z}}}=(0,a.useContext)(s.T),{t:T}=(0,g.u)(),{onSelectImages:S,onRemoveImage:I,imageSrcs:j,onRemoveAllImages:D,imageFiles:R}=useImagePicker(),[O,B]=(0,a.useState)(""),{trigger:F}=(0,a.useContext)($),[L,A]=(0,a.useState)(!1),Z=(0,a.useRef)(null),H=(0,a.useRef)(null),U=(0,a.useRef)(null),[V,G]=(0,a.useState)([]),[K,Q]=(0,a.useState)([]),[W,q]=(0,a.useState)(null);return(0,a.useEffect)(()=>{var e;null===(e=U.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start"}),setTimeout(()=>{var e;null===(e=H.current)||void 0===e||e.focus()},400)},[F]),a.createElement(P,{"data-is-reply":e,className:t,style:l},e&&a.createElement("div",{className:"reply-to-container"},a.createElement(r.T,{size:"p4"},a.createElement("span",{dangerouslySetInnerHTML:{__html:T("inputComment.replyTo",{name:`@${o||""}`})}})),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:()=>i&&i(),loading:"lazy"})),a.createElement("div",{className:"input-container",ref:U},a.createElement(w.U,{className:`avatar-wrapper ${e?"avatar-wrapper-reply":""}`,avatar:(null==N?void 0:N.id)?N.avatar:v.D,username:(null==N?void 0:N.name)||(null==N?void 0:N.username)}),a.createElement("input",{ref:Z,onChange:S,type:"file",multiple:!0,accept:"image/png,image/jpeg",name:"images",style:{display:"none"}}),a.createElement(u.I,{value:O,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(E.R,{className:"textarea",html:O,onChange:B,onImagePickerClick:()=>{var e;return null===(e=Z.current)||void 0===e?void 0:e.click()},bannedWords:K,onPreviewUrlChange:q,onInvalidUrlsChange:G,setEditorRef:e=>H.current=e,isReplying:e}))}),a.createElement(n.B,{theme:("boolean"==typeof x?x:z)?"marryBaby":"helloSites",className:"send-button",size:"sm",onClick:()=>(0,m.a)(void 0,void 0,void 0,function*(){var t,a,n,o,r,l,s,m,u;if((null==f?void 0:f.id)&&!L){A(!0);try{let g=yield getCommentFormBody(Object.assign({message:O,photos:R,postId:String(f.id),link:null==W?void 0:W.url,sanitizeFunction:C,locale:_},e&&d?{replyingUserId:String((null==c?void 0:c.id)||(null===(t=null==f?void 0:f.author)||void 0===t?void 0:t.id)||""),replyingId:d,replyingUserName:(null==c?void 0:c.name)||(null==c?void 0:c.username)||""}:{})),v=yield e&&d?submitReply(g,_):submitComment(g,_),x=null==v?void 0:v.data;(null==x?void 0:x.id)&&!(null===(n=null===(a=null==v?void 0:v.messages)||void 0===a?void 0:a.moderation)||void 0===n?void 0:n.type)?(e=>{B(""),D(),i&&i();let t=(0,h.g)(e.data);"string"==typeof t.images&&(t.images=JSON.parse(t.images)),p&&p(t)})(v):(null===(r=null===(o=null==v?void 0:v.messages)||void 0===o?void 0:o.moderation)||void 0===r?void 0:r.type)==="banned"?(k({title:T("notification.comment.blocked.title"),message:T("notification.comment.blocked.message"),type:"danger"}),v.messages.moderation.words&&Q(v.messages.moderation.words)):(null===(s=null===(l=null==v?void 0:v.messages)||void 0===l?void 0:l.moderation)||void 0===s?void 0:s.type)==="suspect"?(k({title:T("notification.comment.suspect.title"),message:T("notification.comment.suspect.message"),type:"warning"}),B(""),D(),i&&i()):(null===(m=null==v?void 0:v.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"))}))?(k({message:T("notification.suspend.message"),type:"warning"}),B(""),D(),i&&i()):k({title:"",message:(null===(u=null==v?void 0:v.messages)||void 0===u?void 0:u[0])||T("notification.comment.somethingWrong"),type:"danger"})}catch(e){k({title:"",message:T("notification.comment.somethingWrong"),type:"danger"})}A(!1)}}),isLoading:L,isDisabled:!!(null==V?void 0:V.length)||L||!O||(null==O?void 0:O.length)<2||!O.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==V?void 0:V.length)?a.createElement("div",{className:"error-text"},T("notification.limitUrlDomain")):null,(!j||0===j.length)&&W&&a.createElement("div",{className:"link-preview-wrapper"},W.isFetching?a.createElement(b.L,null):a.createElement(a.Fragment,null,a.createElement(y.C,{title:W.title,url:W.url||"#",image:W.image,noRefetch:!0}),a.createElement("img",{src:M,className:"icon-close",onClick:()=>q(null),loading:"lazy"}))),j&&j.length>0&&a.createElement("div",{className:"preview-images-container"},j.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:M,className:"icon-close-circle",onClick:()=>I(t),loading:"lazy"})))))},SharePopup=({trackingCategory:e,className:t,style:i,url:n,text:o,onClose:r})=>{let{data:{env:{isMarryBaby:d}}}=(0,a.useContext)(s.T),{t:c}=(0,g.u)(),[p,m]=(0,a.useState)(!1);return(0,a.useEffect)(()=>((0,l.t)(!0),setTimeout(()=>m(!0),0),()=>(0,l.t)(!1)),[]),a.createElement(k.h,null,a.createElement(j,{"data-is-marrybaby":d,className:t,style:i},a.createElement(PopupFrame,{className:"share-popup",isOpen:p,onClose:r,heading:c("bottomBar.share")},p&&a.createElement(z.r,{trackingCategory:e,shareUrl:n||("undefined"!=typeof window?window.location.href:""),title:o}))))},j=c.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 ${p.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'] {
${l.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;
}
}
}
`,D=c.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 R="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:i,reasonText:o,onClose:l,postId:d})=>{let{data:{locale:c,env:{isMarryBaby:u}},action:{pushNotifications:h}}=(0,a.useContext)(s.T),{t:v}=(0,g.u)(),[f,x]=(0,a.useState)(!1);return a.createElement(D,{"data-is-marrybaby":u,className:e,style:t},a.createElement("ul",{className:"report-list"},a.createElement("li",{className:"report-item"},a.createElement("img",{src:R,loading:"lazy"}),a.createElement(r.T,{className:"__label",color:p.r.colors.gray800,size:"p4"},o))),a.createElement(n.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(d&&!f){x(!0);try{let e=yield reportPost({id:d,reason:i,locale:c});(null==e?void 0:e.status)===1&&(h({message:"Post reported",type:"success"}),l&&l())}catch(e){}x(!1)}})},v("submit")))}},uI14:function(e,t,i){i.d(t,{D:function(){return DrawerBottom}});var a=i("mHfz"),n=i("q1tI"),o=i("iuhU"),r=i("h8tX"),l=i("rWXb"),d=i("rSBk"),s=i("rBCA"),c=i("iBNF"),p=i("F1xy");(0,s.Z)(l.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: ${c.r.colors.neutral500};
margin: 16px auto;
flex-shrink: 0;
}
`;let m=(0,s.Z)(d.dy.Content)`
position: fixed;
z-index: ${p.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,s.Z)(d.dy.Overlay)`
position: fixed;
inset: 0;
z-index: ${p.Z-9e6};
width: 100%;
max-height: 100%;
background-color: rgb(0, 0, 0, 0.4);
`,g=(0,s.Z)(d.dy.Handle)`
&[data-vaul-handle] {
width: 44px;
height: 3px;
background-color: ${c.r.colors.neutral500};
margin: 16px auto;
flex-shrink: 0;
}
`;function DrawerBottom(e){var{children:t,onClose:i,isOpen:s,onOpenChange:c,isMobile:p,classNames:h,isLinear:v,overlayClassName:f,contentClassName:x,handlerClassName:y,drawerOverlayProps:b}=e,w=(0,a._)(e,["children","onClose","isOpen","onOpenChange","isMobile","classNames","isLinear","overlayClassName","contentClassName","handlerClassName","drawerOverlayProps"]);let{isDragging:E,handleDragStart:k,handleDragEnd:C}=(0,l.u)(),{onDrag:N,onRelease:_}=w,z=(0,a._)(w,["onDrag","onRelease"]);return p?n.createElement(d.dy.Root,Object.assign({},z,{open:s,onOpenChange:c,onClose:i,onDrag:(e,t)=>{k(),null==N||N(e,t)},onRelease:(e,t)=>{C(),null==_||_(e,t)}}),n.createElement(d.dy.Portal,null,n.createElement(u,Object.assign({className:(0,o.default)(f,"drawer__overlay")},b)),n.createElement(m,{isDragging:E,className:(0,o.default)(x,"drawer__content"),"data-is-linear":v},n.createElement(d.dy.Title,{style:{display:"none"}}),n.createElement(g,{className:(0,o.default)(y,"drawer__handle")}),t))):n.createElement(r.u,Object.assign({withCloseButton:!0,centered:!0,zIndex:500,size:"auto",classNames:h,radius:"lg"},w,{onClose:i,opened:s,styles:{root:{maxHeight:"400px"},body:{background:v?"linear-gradient(180deg, #A5D4FF 0%, #FFFFFF 20%)":void 0}}}),t)}},bi52:function(e,t,i){i.d(t,{P:function(){return Popup}});var a=i("q1tI"),n=i("rBCA"),o=i("HkQG"),r=i("iBNF");let l=n.Z.div`
position: fixed;
left: 50%;
padding: 0 16px 32px;
background-color: ${r.r.colors.white};
border-radius: ${r.r.borderRadius};
box-shadow: 0px 4px 8px ${r.r.colors.gray200};
transform: translate(-50%, -50%);
transition: all 0.5s ease-in-out;
visibility: hidden;
&[data-open='true'] {
z-index: 400;
top: 50%;
opacity: 1;
visibility: visible;
}
&[data-open='false'] {
top: -50%;
}
&[data-type='lead'] {
width: 332px;
height: 460px;
div {
top: -15px;
right: -15px;
}
}
&[data-type='form'] {
width: 496px;
height: 548px;
${o.M.mbDown} {
width: 340px;
}
}
&[data-type='confirm'] {
${o.M.mbDown} {
width: calc(100% - 32px);
}
${o.M.mbUp} {
width: 100%;
max-width: 407px;
}
}
.popup-content {
position: relative;
z-index: 111;
height: 100%;
padding: 16px;
}
.close-button {
position: absolute;
top: 16px;
right: 0;
cursor: pointer;
img {
width: 100%;
height: 100%;
border-radius: 50%;
}
}
`,d=n.Z.div`
position: fixed;
z-index: 110;
top: 0;
left: 0;
width: 100%;
height: 100%;
align-items: center;
background: rgba(38, 38, 38, 0.3);
&[data-open='false'] {
display: none;
}
`,Popup=({type:e="lead",closeIcon:t,isOpen:i=!0,onClose:n,children:o,className:r="",enableAnimation:s=!0,disableClickOutside:c=!1})=>a.createElement(a.Fragment,null,a.createElement(l,{"data-open":i,"data-type":e,"data-animation":s},a.createElement("div",{className:`${r||""} popup-content`},!!t&&a.createElement("div",{className:"close-button",onClick:n},t),o)),a.createElement(d,{"data-open":i,onClick:()=>{c||n()}}))},"3xTB":function(e,t,i){i.d(t,{C:function(){return CardPost},S:function(){return SourceList},V:function(){return VerifiedTag},a:function(){return CardPostPopoverMore},b:function(){return CardReply},c:function(){return CardReplyPopover}});var a=i("mHfz"),n=i("q1tI"),o=i("w3RM"),r=i("iYxA"),l=i("GXD3"),d=i("ns0B"),s=i.n(d),c=i("Dhid"),p=i("W9uT"),m=i("zHfJ"),u=i("aZjv"),g=i("R7z5"),h=i("dBRa"),v=i("rBCA"),f=i("HkQG"),x=i("iBNF"),y=i("BYES"),b=i("IQVP"),w=i("EOz7"),E=i("TrPz"),k=i("SOnH"),C=i("K8yQ"),N=i("FkZ+"),_=i("dirz"),z=i("vWP/"),T=i("VLUI"),S=i("h84G"),M=i("MZpI"),I=i("QaGV"),P=i("bpvy"),$=i("3Hk+"),j=i("HKYo"),D=i("pQnK"),R=i("NXAV"),O=i("xrdX"),B="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3cpath fill='%233E3F58' d='M5 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2M19 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2M12 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2'/%3e%3c/svg%3e",F="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='3' height='13' fill='none'%3e%3ccircle cx='1.583' cy='6.417' r='1.25' fill='%23595959' transform='rotate(90 1.583 6.417)'/%3e%3ccircle cx='1.583' cy='1.417' r='1.25' fill='%23595959' transform='rotate(90 1.583 1.417)'/%3e%3ccircle cx='1.583' cy='11.417' r='1.25' fill='%23595959' transform='rotate(90 1.583 11.417)'/%3e%3c/svg%3e",L="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath stroke='%23737373' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='M2 4h12'/%3e%3cpath stroke='%23737373' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M5.333 4V2.667a1.333 1.333 0 0 1 1.334-1.334h2.666a1.334 1.334 0 0 1 1.334 1.334V4m2 0v9.333a1.334 1.334 0 0 1-1.334 1.334H4.667a1.334 1.334 0 0 1-1.334-1.334V4zM6.667 7.333v4M9.333 7.333v4'/%3e%3c/svg%3e";let CardPostPopoverMore=({authorEmail:e,onDeletePost:t,shareUrl:i,post:o,className:r="",popoverClassName:d="",onEditPost:s})=>{let{data:{locale:v,userInfo:f,env:{isMarryBaby:x}}}=(0,n.useContext)(g.T),{t:y}=(0,l.u)(),[b,w]=(0,n.useState)(!1),[E,k]=(0,n.useState)(!1),[C,N]=(0,n.useState)(!1),{authActionWrapper:_}=(0,u.iV)(),z=e&&(null==f?void 0:f.email)&&e===String(null==f?void 0:f.email);return n.createElement("div",{className:r,onClick:e=>{e.preventDefault(),e.stopPropagation()}},C&&n.createElement(c.S,{url:i,text:null==o?void 0:o.title,onClose:()=>N(!1)}),E&&n.createElement(c.P,{thumbnail:p.C.getAssetPath("trash-bin.svg"),isThumbnailIcon:!0,title:y("popup.deletePost.title"),description:y("popup.deletePost.description"),acceptText:y("popup.deletePost.accept"),cancelText:y("popup.deletePost.cancel"),onAccept:()=>(0,a.a)(void 0,void 0,void 0,function*(){if((null==o?void 0:o.id)&&!b){w(!0);try{let e=yield(0,c.h)({id:o.id,locale:v});(null==e?void 0:e.status)===1&&(null==t||t())}catch(e){}w(!1)}}),onClose:()=>k(!1)}),n.createElement(h.b,{className:d,toggleButtonContent:n.createElement("img",{src:x?B:F,loading:"lazy"}),position:"bottom",align:"end",buttonProps:{isLoading:b},data:z?{isShowheader:!1,type:"list",list:[{icon:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath stroke='%23595959' stroke-linecap='round' stroke-linejoin='round' d='M7.17 3.236H2.995a1.193 1.193 0 0 0-1.193 1.192v8.35a1.193 1.193 0 0 0 1.193 1.192h8.35a1.193 1.193 0 0 0 1.192-1.192V8.603'/%3e%3cpath stroke='%23595959' stroke-linecap='round' stroke-linejoin='round' d='M11.643 2.341a1.265 1.265 0 0 1 1.789 1.79L7.766 9.795l-2.385.596.596-2.385z'/%3e%3c/svg%3e",label:y("actionPopover.edit"),onClick:s},{icon:L,label:y("actionPopover.delete"),onClick:()=>{_(()=>k(!0))}}]}:{isShowheader:!1,type:"list",list:[{icon:c.i,label:y("morePopover.report"),subTree:{title:y("morePopover.report.title"),description:y("morePopover.report.description"),isShowheader:!0,type:"list",list:Object.keys(m.R).map(e=>({label:m.R[e].label,reason:m.R[e].reportReasonText,reasonValue:e})).map(e=>({label:y(e.label),subTree:{title:y("morePopover.reportSubmit.title"),description:y("morePopover.reportSubmit.description"),isShowheader:!0,type:"jsx",jsxRenderer:t=>n.createElement(c.b,{reason:e.reasonValue,reasonText:y(e.reason),postId:null==o?void 0:o.id,onClose:()=>t&&t(!1)})}}))}}]}}))},A=v.Z.div`
position: relative;
margin-bottom: 24px;
background: white;
border-radius: ${x.r.borderRadius};
a {
text-decoration: none;
}
${f.M.mbDown} {
margin-bottom: 8px;
}
&.flat-top {
border-top-left-radius: 0;
border-top-right-radius: 0;
}
.post-pin {
padding: 0.5rem 1rem;
border-radius: ${x.r.borderRadius} 6px 0 0;
}
.post-author {
display: flex;
align-items: center;
justify-content: space-between;
&.comment {
padding-right: 2.6rem;
}
.author-avatar-wrapper {
width: 40px;
height: 40px;
font-size: 20px;
${f.M.mbDown} {
width: 32px;
height: 32px;
font-size: 16px;
}
}
}
.post-content-link-wrapper {
color: inherit;
cursor: pointer;
.post-content-title {
padding: 1rem 1rem 0;
word-break: break-word;
}
}
.social-preview-wrapper.has-image {
margin-bottom: 5px;
}
.social-preview-wrapper,
.image-preview-wrapper,
.link-preview-wrapper {
width: 100%;
&[data-is-reply='true'] {
padding-right: 1rem;
padding-left: 1rem;
}
}
.post-topics {
padding: 0 1rem;
}
.post-reaction {
background: none;
border-radius: 0 0 6px 6px;
&.hide-top-border {
::before {
display: none;
}
}
}
.most-engaging-wrapper {
padding: 1rem;
cursor: pointer;
.author-avatar-wrapper {
width: 2rem;
height: 2rem;
font-size: 1rem;
}
.see-more-comments {
width: 100%;
padding: 12px 0 0;
text-align: unset;
}
}
&[data-most-engaging='true'] {
border: none;
${f.M.mbDown} {
margin: 1rem;
border: 1px solid #e4e8ec;
}
}
.top-divider {
border-color: #e4e8ec;
}
.popover {
.popover-menu__btn {
display: flex;
width: 1.5rem;
height: 1rem;
align-items: center;
justify-content: center;
padding: 0;
background: transparent;
&:hover {
background-color: transparent;
}
}
.popover-menu__content {
&.--position-bottom {
&.--align-end {
&::before {
right: 12.5px;
}
}
}
}
}
&[data-is-marrybaby='true'] {
border: 1px solid #f3f3f3;
border-radius: 1rem;
/* shadow */
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.08);
.image-preview-wrapper,
.link-preview-wrapper {
padding-right: 1rem;
padding-left: 1rem;
}
.popover {
.popover-menu__btn {
width: 24px;
height: 24px;
${f.M.mbDown} {
width: 18px;
height: 18px;
}
}
.popover-menu__content {
&.--position-bottom {
&.--align-end {
&::before {
right: 1rem;
}
width: 350px;
${f.M.mbDown} {
max-width: calc(320px - 2rem);
}
}
}
}
}
.most-engaging-wrapper {
position: relative;
padding: 0;
&::before {
position: absolute;
z-index: 5;
top: 0;
left: 50%;
width: calc(100% - 2rem);
height: 1px;
background: #f3f3f3;
content: ' ';
transform: translateX(-50%);
}
}
${f.M.mbDown} {
margin-bottom: 12px;
}
}
`;var Z="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath stroke='%23595959' stroke-linecap='round' stroke-linejoin='round' d='M12 13.333 8 10.37l-4 2.963V3.852c0-.314.12-.616.335-.838.214-.222.505-.347.808-.347h5.714c.303 0 .594.125.808.347s.335.524.335.838z'/%3e%3c/svg%3e";let CardReplyPopover=({onDeleteComment:e,commentId:t,className:i="",popoverClassName:o=""})=>{let{data:{env:{isMarryBaby:r},locale:d},action:{pushNotifications:s}}=(0,n.useContext)(g.T),{t:p}=(0,l.u)(),[m,v]=(0,n.useState)(!1),{authActionWrapper:f}=(0,u.iV)();return n.createElement("div",{className:i,onClick:e=>{e.preventDefault(),e.stopPropagation()}},m&&n.createElement(c.P,{thumbnail:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='17' fill='none'%3e%3cg stroke='%23737373' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' clip-path='url(%23a)'%3e%3cpath d='M2 4.008h12m-8.667 0V2.675a1.333 1.333 0 0 1 1.334-1.333h2.666a1.333 1.333 0 0 1 1.334 1.333v1.333m2 0v9.334a1.333 1.333 0 0 1-1.334 1.333H4.667a1.333 1.333 0 0 1-1.334-1.333V4.008zm-6 3.334v4m2.666-4v4'/%3e%3c/g%3e%3cdefs%3e%3cclipPath id='a'%3e%3cpath fill='white' d='M0 .008h16v16H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",isThumbnailIcon:!0,title:p("popup.deleteComment.title"),description:p("popup.deleteComment.description"),acceptText:p("popup.deletePost.accept"),cancelText:p("popup.deletePost.cancel"),onAccept:()=>(0,a.a)(void 0,void 0,void 0,function*(){var i;if(!t)return;let a=yield(0,c.j)({id:t,locale:d});(null==a?void 0:a.status)===1?(e&&e(),s({title:"",message:p("notification.success"),type:"success"})):s({title:"",message:(null===(i=null==a?void 0:a.messages)||void 0===i?void 0:i[0])||p("notification.failure"),type:"danger"})}),onClose:()=>v(!1)}),n.createElement(h.b,{position:"bottom",align:"end",data:{isShowheader:!1,type:"list",list:[{icon:L,label:p("actionPopover.delete"),onClick:()=>{f(()=>{v(!0)})}}]},className:o,toggleButtonContent:n.createElement("img",{src:r?B:F,loading:"lazy"}),buttonProps:{}}))},H=v.Z.div`
.add-link {
color: ${x.r.colors.primaryBase};
}
`,U=v.Z.div`
margin: 16px 0;
background: ${x.r.colors.yellow50};
padding: 5px 10px;
border-radius: 2px;
.icon {
display: inline-block;
vertical-align: middle;
margin-right: 6px;
}
`,V=v.Z.div`
display: flex;
align-items: center;
gap: 8px;
`,G=v.Z.div`
padding: 8px 16px;
`,K=v.Z.div`
margin-bottom: 12px;
width: 100%;
`,Q=v.Z.div``,W=v.Z.div`
margin-bottom: 16px;
`,q=v.Z.div`
display: flex;
flex-wrap: wrap;
row-gap: 16px;
${f.M.tdUp} {
align-items: center;
column-gap: 24px;
}
`,Y=v.Z.a`
display: flex;
align-items: center;
gap: 16px;
${f.M.mbDown} {
width: 100%;
justify-content: space-between;
}
`,X=v.Z.div`
display: flex;
align-items: center;
gap: 16px;
`,J=v.Z.div`
border-radius: ${x.r.borderRadius};
overflow: hidden;
width: 48px;
height: 48px;
img {
object-fit: cover;
width: 100%;
height: 100%;
}
`,RecommentCategories=({categories:e})=>{let{t}=(0,l.u)(),{data:{locale:i,env:{isMarryBaby:a}}}=(0,n.useContext)(g.T),o=(0,R.g)(i,a);return n.createElement(Q,null,n.createElement(W,null,n.createElement(r.H,{tag:"h6",as:"h5"},t("cardReply.recommentCategories.heading"))),n.createElement(q,null,e.map(e=>n.createElement(Y,{href:o+e.permalink,key:String(e.termId),target:"_blank"},n.createElement(X,null,n.createElement(J,null,n.createElement("img",{src:e.featureImage||p.C.getAssetPath(a?"mb-logo.svg":"/logo/logomark.png"),alt:e.displayName,loading:"lazy"})),n.createElement(j.T,{size:"s3",weight:"bold"},e.displayName)),n.createElement(T.Z,{size:20,color:x.r.colors.gray400})))))},ee=v.Z.a`
padding: 12px 0;
display: flex;
flex-direction: column;
gap: 8px;
border-top: 1px solid ${x.r.colors.neutral100};
text-decoration: none;
&:first-child {
border-top: 0;
}
`,SourceItem=({postTitle:e,articleReviewed:t,modifiedTime:i,href:a})=>{let{t:o}=(0,l.u)(),r=(()=>{let{expert:e,editor:i,is_author:a}=t;if(e){let t={name:e.display_name,role:"expert",avatar:e.avatar};return a?Object.assign({title:o("articleAuthor.title.written-by")},t):"expert"===e.role?Object.assign({title:o("articleAuthor.title.expert")},t):Object.assign({title:o("articleAuthor.title.medical")},t)}if(i)return{title:o("articleAuthor.title.fact-check"),name:i.display_name,avatar:i.avatar}})();return n.createElement(ee,{href:a,title:e,target:"_blank"},n.createElement(j.T,{size:"s3",as:"h5",weight:"bold"},e),n.createElement("div",null,n.createElement(E.C,{avatar:null==r?void 0:r.avatar,avatarProps:{size:32},name:null==r?void 0:r.name,role:null==r?void 0:r.role,hideBackground:!0},n.createElement(E.C.SubTextRow,null,n.createElement(E.C.SubText,null,null==r?void 0:r.title," ",n.createElement("span",{style:{color:x.r.colors.gray800}},null==r?void 0:r.name)),n.createElement(E.C.SubDivider,null),n.createElement(E.C.SubText,null,i)))))};var et={header:"F4mmgSy",chevron:"A7QrQ7A"};let SourceList=e=>{var{listUrl:t,hideSourceList:i,categorySlug:d,editMode:s,collapseSource:c,onListChange:m,isMarryBaby:u}=e,h=(0,a._)(e,["listUrl","hideSourceList","categorySlug","editMode","collapseSource","onListChange","isMarryBaby"]);let{t:v}=(0,l.u)(),[f,w]=(0,n.useState)(t||[]),[E,k]=(0,n.useState)([]),[C,N]=(0,n.useState)([]),[_,T]=(0,n.useState)(!1);(0,n.useEffect)(()=>{i||(0,a.a)(void 0,void 0,void 0,function*(){T(!0);let e=f.map(e=>{let t=new URL(e),i=String(t.pathname).split("/").filter(e=>""!=e),a=t.origin,n=-1!==a.search("marrybaby.vn");return{isMarrySite:n,path:i[i.length-1],href:e}}),t=[...e.map(e=>(0,g.c)(e.isMarrySite?(0,g.s)(b.D9.GET_PREVIEW_ARTICLE,{fullSlug:e.path},!0):(0,g.g)(b.D9.GET_PREVIEW_ARTICLE,{fullSlug:e.path},!0),"GET"))],i=yield Promise.all(t);k(i.map((t,i)=>{var a,n;return(null===(a=null==t?void 0:t.data)||void 0===a?void 0:a.post)&&Object.assign(Object.assign({},(0,y.f)(null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.post)),{href:e[i].href})}).filter(Boolean)),T(!1)})},[]),(0,n.useEffect)(()=>{!i&&(null==E?void 0:E.length)===0&&d&&(0,a.a)(void 0,void 0,void 0,function*(){var e;let t=yield(0,g.c)(u?(0,g.s)(b.D9.GET_CATEGORY_OR_ARTICLE_DETAIL,{fullSlug:d},!0):(0,g.g)(b.D9.GET_CATEGORY_OR_ARTICLE_DETAIL,{fullSlug:d},!0),"GET");(null==t?void 0:t.data)&&N([(0,y.h)(null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.category)])})},[E]);let handleRemoveItem=e=>{w(t=>{let i=[...t];return i.splice(e,1),i}),k(t=>{let i=[...t];return i.splice(e,1),i})};return(0,n.useEffect)(()=>{null==m||m(f)},[f]),n.createElement("div",Object.assign({},h),!s&&n.createElement(U,null,n.createElement("img",{className:"icon",src:p.C.getAssetPath("warning.svg"),alt:"warning",style:{marginBottom:"3px",width:"18px"},loading:"lazy"}),n.createElement(j.T,{size:"s3",as:"span",dangerouslySetInnerHTML:{__html:v("cardReply.disclaimer")}})),i?null:_?n.createElement(D.L,null):E.length>0||s?n.createElement(H,null,n.createElement(P.U,{defaultValue:!c&&"accordion",styles:{control:{borderRadius:"inherit",'&[aria-expanded="false"]':{borderBottom:0}},chevron:{width:"32px",height:"32px"},content:{padding:0,borderBottom:0,borderTop:`1px solid ${x.r.colors.neutral100}`},item:{marginBottom:"16px",borderTopLeftRadius:"8px",borderTopRightRadius:"8px",border:`1px solid ${x.r.colors.neutral100}`,borderBottomLeftRadius:"8px",borderBottomRightRadius:"8px","&[data-active]":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}},chevron:n.createElement("div",{className:et.chevron},n.createElement(S.Z,{color:x.r.colors.gray600,size:20}))},n.createElement(P.U.Item,{value:"accordion"},n.createElement(P.U.Control,null,n.createElement("div",{className:et.header},n.createElement(r.H,{as:"h4",tag:"h6"},v("cardReply.source")))),n.createElement(P.U.Panel,null,n.createElement(G,null,(E||[]).map((e,t)=>n.createElement(V,{key:String(t)},"object"==typeof e?n.createElement(SourceItem,Object.assign({},e)):n.createElement(K,null,n.createElement($.I,{style:{width:"100%"},name:"source-list",value:e||"",size:"sm",onChange:e=>{w(i=>{let a=[...i];return a[t]=e,a}),k(i=>{let a=[...i];return a[t]=e,a})}})),s&&n.createElement(o.B,{size:"md",color:"transparent",icon:n.createElement(M.Z,null),onClick:()=>handleRemoveItem(t)}))),s&&n.createElement(o.B,{className:"add-link",color:"transparent",size:"md",icon:n.createElement(z.Z,{color:x.r.colors.primaryBase,size:18}),onClick:()=>{w(e=>[...e,""]),k(e=>[...e,""])}},"Add source")))))):n.createElement(RecommentCategories,{categories:C}))},ei=v.Z.div`
position: relative;
margin-bottom: 0;
background: white;
border-radius: ${x.r.borderRadius};
.verify-tag {
margin-top: 12px;
}
.post-author {
&.with-popover {
padding-right: 2.6rem;
}
.author-avatar-wrapper {
width: 40px;
height: 40px;
font-size: 20px;
${f.M.mbDown} {
width: 32px;
height: 32px;
font-size: 16px;
}
}
}
.image-preview-wrapper,
.link-preview-wrapper {
width: 100%;
&[data-is-reply='true'] {
padding-right: 1rem;
padding-left: 1rem;
}
}
.post-reaction {
background: none;
border-radius: 0 0 6px 6px;
}
&[data-is-reply='true'] {
> .post-author .author-avatar-wrapper {
width: 20px;
height: 20px;
font-size: 10px;
}
}
&[data-is-reply='false'] {
border: 1px solid #e4e8ec;
}
.expert-wrapper {
width: 100%;
}
&[data-has-booking='true'] {
display: grid;
.post-author {
background-color: ${x.r.colors.primary50};
}
.btn-wrapper {
padding: 0 16px;
.btn-booking {
width: 100%;
margin: 12px 0;
}
}
}
.comment-reply-wrapper {
padding: 0 1rem;
.more-cmt {
.chevron-right {
height: 1rem;
width: 1rem;
vertical-align: middle;
}
}
}
.top-divider {
border-color: #e4e8ec;
}
.popover {
position: absolute;
top: 1.5rem;
right: 1rem;
.popover-menu__btn {
display: flex;
width: 1rem;
height: 1rem;
align-items: center;
justify-content: center;
padding: 0;
background: transparent;
&:hover {
background-color: transparent;
}
.popover-menu__content {
&.--position-bottom {
&.--align-end {
&::before {
right: 12.5px;
}
}
}
}
}
}
&[data-is-marrybaby='true'] {
&[data-is-reply='false'] {
border: none;
}
.image-preview-wrapper,
.link-preview-wrapper {
padding-right: 1rem;
padding-left: 1rem;
}
.popover {
.popover-menu__btn {
width: 24px;
height: 24px;
}
}
margin-left: 56px;
${f.M.mbDown} {
margin-left: 40px;
}
> .post-author {
margin-left: -56px;
${f.M.mbDown} {
margin-left: -40px;
}
.author-info {
align-items: center;
display: flex;
align-items: center;
.author-info-top {
width: 100%;
}
.author-info-text-wrapper {
justify-content: space-between;
}
}
.author-avatar-wrapper {
width: 40px;
height: 40px;
font-size: 20px;
${f.M.mbDown} {
width: 24px;
height: 24px;
font-size: 12px;
}
}
}
&[data-is-reply] {
> .post-author {
.author-avatar-wrapper {
width: 40px;
height: 40px;
font-size: 20px;
${f.M.mbDown} {
width: 24px;
height: 24px;
font-size: 12px;
}
}
}
}
.comment-reply-wrapper {
padding-right: 0;
padding-left: 0;
}
.post-reaction {
&::after {
position: absolute;
bottom: 0;
left: 50%;
width: calc(100% - 2rem);
height: 1px;
background: #f3f3f3;
content: ' ';
transform: translateX(-50%);
}
}
.post-content-wrapper {
padding-top: 0;
padding-bottom: 0;
${f.M.mbDown} {
padding-left: 0.5rem;
}
}
${f.M.mbDown} {
margin-bottom: 12px;
}
}
`,ea=(0,v.Z)(SourceList)`
margin-top: 12px;
padding: 0.5rem 1rem 1rem;
`,VerifiedTag=({userId:e,avatar:t,name:i,role:a,title:r,className:d})=>{let{t:s}=(0,l.u)(),[c,p]=(0,n.useState)(!1);return n.createElement(n.Fragment,null,n.createElement(o.B,{className:`-dzIuHr ${d}`,color:"success",size:"xs",onClick:()=>p(!0),style:{padding:"5px 8px",marginBottom:"12px",borderRadius:"4px"}},n.createElement("span",{className:"text"},n.createElement(I.Z,{isSolid:!0,size:18,color:x.r.colors.green800,className:"icon"}),s("cardReply.verifyBy",{name:`${i||""}`}))),n.createElement(E.c,{open:c,onClose:()=>p(!1),profileModalProps:{zIndex:1e3}},n.createElement(k.a,{authorProps:{userId:e,avatar:t,name:i,role:a,title:r},hideQuestionTab:!0})))},CardReply=({className:e,style:t,comment:i,type:r="comment",level:d=0,replyingId:s,onPostCommentSuccess:p,post:m,onDeleteComment:v,refetchComment:f,hasQuickBookingEnable:x,handleMakeAppointment:y,cardAuthorProps:N,maxChars:z=600,disableShortenContent:T})=>{var S,M,I,P,$,j,D,R,B,F,L,A,Z;let{data:{locale:H,userInfo:U,env:{isMarryBaby:V}}}=(0,n.useContext)(g.T),{t:G}=(0,l.u)(),[K,Q]=(0,n.useState)(i||null),{id:W,countLikes:q,content:Y,replies:X=[],images:J=[],author:ee,liked:et,link:en,mentionedUser:eo,mentions:er}=K,{text:el,replyingTo:ed}=(0,c.k)(Y),{authActionWrapper:es}=(0,u.iV)({_joinCommunityIds:[null===(S=null==m?void 0:m.community)||void 0===S?void 0:S.id],_joinTopicIds:null===(M=null==m?void 0:m.topics)||void 0===M?void 0:M.map(e=>e.id)}),[ec,ep]=(0,n.useState)(4),em=null!=U&&!!U.id&&(null==X?void 0:X.some(e=>e.author.id===U.id)),addNewReply=e=>{Q(t=>{if(!t.replies.find(t=>t.id===e.id)){t.replies.unshift(e);let i=Object.assign(Object.assign({},t),{replies:t.replies.slice(),countReplies:t.countReplies+1});return f&&f(i),i}return t})},[eu,eg]=(0,n.useState)(!1),eh=(0,n.useMemo)(()=>"comment"===r&&X&&0!=X.length?X.sort((e,t)=>{let i=new Date(e.createdAt).getTime(),a=new Date(t.createdAt).getTime();return i>a?-1:i{var e,t;(null==ee?void 0:ee.hospitalId)&&(e=ee.hospitalId,(0,a.a)(void 0,void 0,void 0,function*(){var t;let i=yield(0,g.c)((0,g.b)(b.tC.GET_HOSPITAL_INFO,{hospital_branch_id:e,website_url:O.v[H]}),"get");(null===(t=null==i?void 0:i._data)||void 0===t?void 0:t.branch)&&eC(null==i?void 0:i._data.branch)})),(null==ee?void 0:ee.doctorId)&&(t=ee.doctorId,(0,a.a)(void 0,void 0,void 0,function*(){var e;let i=yield(0,g.c)((0,g.b)(b.tC.GET_DOCTOR_INFO,{doctorId:t,website_url:O.v[H]}),"get");(null===(e=null==i?void 0:i._data)||void 0===e?void 0:e.doctor)&&e_(null==i?void 0:i._data.doctor)}))},[ee.hospitalId,ee.doctorId]);let ez=(null==eN?void 0:eN.valid_outpatient)||(null==eN?void 0:eN.valid_telemedicine),eT=((null==ek?void 0:ek.total_available_service)||(null==ek?void 0:ek.total_available_doctor))>0,eS=x&&(ez||eT),eM=(null===(P=null==K?void 0:K.author)||void 0===P?void 0:P.type)==="chatbot";return n.createElement(u.I_,{defaultParams:{_joinCommunityIds:[null===($=null==m?void 0:m.community)||void 0===$?void 0:$.id],_joinTopicIds:null===(j=null==m?void 0:m.topics)||void 0===j?void 0:j.map(e=>e.id)}},n.createElement(ei,{className:e,style:t,"data-is-reply":!!d,"data-is-marrybaby":V,"data-has-booking":eS},"reply"===r&&n.createElement(_.D,{className:"top-divider",type:"solid"}),n.createElement("div",{style:{padding:"16px 16px 0"}},n.createElement(E.C,Object.assign({avatar:eb,name:ex,username:ey,timeText:null==m?void 0:m.createdTime,community:null==m?void 0:m.community,className:`post-author ${ef?"with-popover":""}`,type:r,userId:null==ee?void 0:ee.id,role:ew,expertId:null==ee?void 0:ee.partnerId,title:null==ee?void 0:ee.title,doctorId:null==ee?void 0:ee.doctorId,hospitalId:null==ee?void 0:ee.hospitalId,hasQuickBooking:eS,handleMakeAppointment:y,isAnonymous:(null==K?void 0:K.isAnonymous)||!!(null==m?void 0:m.isAnonymous)&&(null===(D=null==m?void 0:m.author)||void 0===D?void 0:D.username)===(null==ee?void 0:ee.username),hideBackground:eM,userType:null==ee?void 0:ee.type},N)),!!(null==K?void 0:K.isVerify)&&!(null==K?void 0:K.isOppose)&&n.createElement(VerifiedTag,{title:null===(R=null==K?void 0:K.userVerify)||void 0===R?void 0:R.title,name:null===(B=null==K?void 0:K.userVerify)||void 0===B?void 0:B.name,userId:null===(F=null==K?void 0:K.userVerify)||void 0===F?void 0:F.id,role:null===(L=null==K?void 0:K.userVerify)||void 0===L?void 0:L.role,avatar:null===(A=null==K?void 0:K.userVerify)||void 0===A?void 0:A.avatar,className:"verify-tag"})),n.createElement(k.P,{className:"post-content-wrapper",replyingTo:ed,mentionedUser:eo,description:el,mentions:eE,maxChars:z,disableShortenContent:T}),n.createElement("span",null),n.createElement("span",null),J&&J.length>0?n.createElement("div",{key:"image-preview",className:"image-preview-wrapper","data-is-reply":!0},n.createElement(C.a,{images:J,authorName:null==ee?void 0:ee.username})):null,(!J||0===J.length)&&en?n.createElement("div",{key:"link-preview",className:"link-preview-wrapper","data-is-reply":!0},n.createElement(w.C,{url:en})):null,"most-engaging"!==r?n.createElement(n.Fragment,null,eM&&n.createElement(ea,{listUrl:null==K?void 0:K.source,categorySlug:null==K?void 0:K.categorySlug}),n.createElement(h.C,{type:h.c.reply,loveCount:q,replyCount:ev,className:"post-reaction",liked:et,isReplied:em,hideCommentIcon:"reply"===r||eM,hasShare:!1,onCommentClick:()=>es(()=>eg(e=>!e)),onCommentCountClick:()=>es(()=>{eg(!0)}),onLikeClick:()=>es(()=>(0,a.a)(void 0,void 0,void 0,function*(){if(W){let e=yield(0,c.l)({commentId:W,setLike:!et,locale:H});1===e.status&&Q(e=>Object.assign(Object.assign({},e),{liked:!et,countLikes:e.countLikes+(et?-1:1)}))}}))}),eu&&n.createElement(c.I,{replyingId:s||K.id,replyToName:ex,isReply:!0,onClose:()=>eg(!1),onPostSuccess:e=>{"reply"===r?p&&p(e):addNewReply(e)},post:m,replyingUser:ee}),"comment"===r&&X&&X.length>0?n.createElement("div",{className:"comment-reply-wrapper"},null===(Z=null==eh?void 0:eh.slice(0,ec))||void 0===Z?void 0:Z.map(e=>n.createElement(CardReply,{key:e.id,comment:e,type:"reply",className:"comment-reply-item",level:d+1,replyingId:W,onPostCommentSuccess:addNewReply,post:m,onDeleteComment:()=>{Q(t=>Object.assign(Object.assign({},t),{replies:t.replies.filter(t=>t.id!==e.id),countReplies:t.countReplies-1}))},handleMakeAppointment:y,hasQuickBookingEnable:x})),ev>ec&&n.createElement(n.Fragment,null,n.createElement(_.D,{className:"top-divider",type:"solid"}),n.createElement(o.B,{className:"more-cmt",size:"lg",color:"ghost",onClick:()=>ep(e=>e+4)},G("comment.seeMoreReplies",{count:ev-ec}),n.createElement("img",{className:"chevron-right",src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath stroke='%232D87F3' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 12 4-4-4-4'/%3e%3c/svg%3e",loading:"lazy"})))):null):null,ef&&n.createElement(CardReplyPopover,{onDeleteComment:v,className:"popover",commentId:K.id})))},getMostEngagingComment=(e,t)=>(0,a.a)(void 0,void 0,void 0,function*(){var i,a,n;let o=yield(0,g.t)((0,g.f)(b.yy.COMMENT.LIST,{postId:e,_locale:t,sort:"popularity",perPage:1,withoutReply:1}),"GET");return null===(n=null===(a=null===(i=null==o?void 0:o.data)||void 0===i?void 0:i.comments)||void 0===a?void 0:a.map(y.g))||void 0===n?void 0:n[0]}),CardPost=({className:e,style:t,hideViewMoreComment:i,showMostEngaging:d,onCommentClick:p,onCommentCountClick:v,onMostEngagingCommentClick:f,onPostCommentSuccess:x,disableCardLink:y,disableShortenContent:_,onDeletePost:z,onEditPost:T,post:S,mostEngagingComment:M,onDeleteComment:I,showInputComment:P,InlineCommentsComponent:$,hasQuickBookingEnable:j,handleMakeAppointment:D,onSaveUnsaveSuccess:R,cardAuthorProps:O,verticalReactions:B=!1})=>{let[F,L]=(0,n.useState)(S),[H,U]=(0,n.useState)(!1),[V,G]=(0,n.useState)(M),{community:K,topics:Q,author:W,slug:q,isPin:Y,liked:X,photos:J,mentions:ee,title:et,description:ei,previewUrl:ea,likesCount:en,commentsCount:eo,id:er,commented:el}=F,{data:{locale:ed,togetherUserId:es,userInfo:ec,env:{isMarryBaby:ep,togetherBasePath:em}},action:{pushNotifications:eu}}=(0,n.useContext)(g.T),eg=!!(null==ec?void 0:ec.id),{t:eh}=(0,l.u)(),[ev,ef]=(0,n.useState)(P),ex=`${em}/${(null==K?void 0:K.slug)||"_"}/${q||""}`,ey=`${(0,g.l)(ed)}${ex}`,{authActionWrapper:eb}=(0,u.iV)((null==K?void 0:K.slug)?{_joinCommunityIds:[K.id],_joinTopicIds:null==Q?void 0:Q.map(e=>e.id)}:void 0),[ew,eE]=(0,n.useState)(!1);(0,n.useEffect)(()=>{ef(P)},[P]);let ek=(null==W?void 0:W.name)||(null==W?void 0:W.username)||"",eC=(null==W?void 0:W.username)||(null==W?void 0:W.name)||"",eN=null==W?void 0:W.avatar,e_=(null==F?void 0:F.isAnonymous)?void 0:null==W?void 0:W.role,[ez,eT]=(0,n.useState)(null),[eS,eM]=(0,n.useState)(null);(0,n.useEffect)(()=>{var e,t;(null==W?void 0:W.hospitalId)&&(e=W.hospitalId,(0,a.a)(void 0,void 0,void 0,function*(){var t;let i=yield(0,g.c)((0,g.b)(b.tC.GET_HOSPITAL_INFO,{hospital_branch_id:e,website_url:g.m[ed]}),"get");(null===(t=null==i?void 0:i._data)||void 0===t?void 0:t.branch)&&eT(null==i?void 0:i._data.branch)})),(null==W?void 0:W.doctorId)&&(t=W.doctorId,(0,a.a)(void 0,void 0,void 0,function*(){var e;let i=yield(0,g.c)((0,g.b)(b.tC.GET_DOCTOR_INFO,{doctorId:t,website_url:g.m[ed]}),"get");(null===(e=null==i?void 0:i._data)||void 0===e?void 0:e.doctor)&&eM(null==i?void 0:i._data.doctor)}))},[W.hospitalId,W.doctorId]);let eI=(null==eS?void 0:eS.valid_outpatient)||(null==eS?void 0:eS.valid_telemedicine),eP=((null==ez?void 0:ez.total_available_service)||(null==ez?void 0:ez.total_available_doctor))>0;(0,n.useEffect)(()=>{(0,a.a)(void 0,void 0,void 0,function*(){if(er&&eo&&d&&!(null==M?void 0:M.id)){let e=yield getMostEngagingComment(er,ed);G(e)}})},[er,ed,eo,d,null==M?void 0:M.id]),(0,n.useEffect)(()=>{G(M)},[null==M?void 0:M.id]);let onDeleteComment=e=>(0,a.a)(void 0,void 0,void 0,function*(){if(eo>1&&(null==V?void 0:V.id)&&(null==V?void 0:V.id)===(null==e?void 0:e.id)){let e=yield getMostEngagingComment(er,ed);G(e)}L(e=>Object.assign(Object.assign({},e),{commentsCount:e.commentsCount-1})),I&&I(e)});return n.createElement(u.I_,{defaultParams:(null==K?void 0:K.slug)?{_joinCommunityIds:[K.id],_joinTopicIds:null==Q?void 0:Q.map(e=>e.id)}:void 0},H&&n.createElement(c.S,{url:ey,avatar:m.a,text:et,onClose:()=>U(!1)}),n.createElement(A,{className:e,style:t,"data-is-marrybaby":ep},Y?n.createElement(h.a,{className:"post-pin"}):null,n.createElement("div",{style:{position:"relative",padding:"1rem 1rem 0"}},n.createElement(E.C,Object.assign({avatar:eN,name:ek,username:eC,url:y?void 0:ex,community:K,timeText:null==F?void 0:F.createdTime,className:"post-author",role:e_,userId:null==W?void 0:W.id,expertId:null==W?void 0:W.partnerId,doctorId:null==W?void 0:W.doctorId,hospitalId:null==W?void 0:W.hospitalId,title:null==W?void 0:W.title,hasQuickBooking:j&&(eI||eP),handleMakeAppointment:D,"data-testid":"name",isAnonymous:!!(null==F?void 0:F.isAnonymous),extendEle:n.createElement(CardPostPopoverMore,{authorEmail:String(null==W?void 0:W.email),onDeletePost:z,shareUrl:ey,post:F,className:"popover",onEditPost:T})},O))),n.createElement("a",{href:y?void 0:ex,className:"post-content-link-wrapper"},et&&n.createElement(r.H,{className:"post-content-title",as:"h2",tag:"h5",fontWeight:"bold","data-testid":"Title of the Post"},s()(et)),n.createElement(k.P,{className:"post-content-wrapper",description:ei,disableShortenContent:_,mentions:ee,"data-testid":"Content of the Post"})),n.createElement("span",null),n.createElement("span",null),n.createElement("div",{key:"tag-topic"},Q&&Q.length>0?n.createElement(h.T,{topics:Q,className:"post-topics"}):null),n.createElement("div",{key:"social-preview"},(null==F?void 0:F.introUrl)?n.createElement("div",{className:`social-preview-wrapper ${(null==J?void 0:J.length)?"has-image":""}`},n.createElement(N.S,{url:F.introUrl,image:F.bannerImage})):null),n.createElement("div",{key:"image-preview"},(null==J?void 0:J.length)?n.createElement("div",{className:"image-preview-wrapper"},n.createElement(C.a,{images:J,authorName:null==W?void 0:W.name,isSensitive:!!(null==F?void 0:F.isSensitive)})):null),n.createElement("div",{key:"link-preview"},(null==F?void 0:F.introUrl)||(null==J?void 0:J.length)||null==ea||!ea.url?null:n.createElement("div",{className:"link-preview-wrapper"},n.createElement(w.C,{title:ea.title,url:ea.url,image:ea.image}))),n.createElement(h.C,{isMarryBaby:ep,type:h.c.post,loveCount:en,replyCount:eo,className:`post-reaction ${(null==J?void 0:J.length)||(null==ea?void 0:ea.url)?"hide-top-border":""}`,liked:ew?!X:X,isReplied:el,isSaved:(null==F?void 0:F.bookmarked)||!1,onCommentClick:()=>eb(()=>{p?p():ef(e=>!e)}),onCommentCountClick:()=>{eb(()=>{ep?ef(!0):v?v():y||(window.location.href=ex)})},onShareClick:()=>{U(!0)},onLikeClick:()=>(0,a.a)(void 0,void 0,void 0,function*(){eb(()=>(0,a.a)(void 0,void 0,void 0,function*(){if(er&&!ew){eE(!0);try{let e=yield(0,c.m)({id:er,locale:ed});(null==e?void 0:e.status)!==1?eu((0,c.g)(eh)):L(e=>Object.assign(Object.assign({},e),{likesCount:(e.likesCount||0)+(e.liked?-1:1),liked:!e.liked}))}catch(e){eu((0,c.g)(eh))}eE(!1)}}))}),onSaveClick:()=>{eb(()=>(0,a.a)(void 0,void 0,void 0,function*(){if((null==ec?void 0:ec.id)&&(null==F?void 0:F.id)){if(null==F?void 0:F.bookmarked){let e=yield(0,g.e)((0,g.f)(b.yy.BOOKMARK.DELETE,{_locale:ed}),"DELETE",{headers:{"Content-Type":"application/json"},data:{post_id:String(F.id)}});(null==e?void 0:e.status)===1?(eu({title:"",message:eh("post.remove.success"),type:"success",displayIcon:Z}),null==R||R()):eu({title:"",message:eh("post.remove.failed"),type:"danger",displayIcon:Z})}else{let e=yield(0,g.e)((0,g.f)(b.yy.BOOKMARK.CREATE,{_locale:ed}),"POST",{headers:{"Content-Type":"application/json"},data:{user_id:es||ec.id,post_id:F.id}});(null==e?void 0:e.status)===1?(eu({title:"",message:eh("post.save.success"),type:"success",displayIcon:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23595959'%3e%3cpath stroke='%23595959' stroke-linecap='round' stroke-linejoin='round' d='M12 13.333 8 10.37l-4 2.963V3.852c0-.314.12-.616.335-.838.214-.222.505-.347.808-.347h5.714c.303 0 .594.125.808.347s.335.524.335.838z'/%3e%3c/svg%3e"}),null==R||R()):eu({title:"",message:eh("post.save.failed"),type:"danger",displayIcon:Z})}}}))},onGoToUrl:e=>{let t=e?`${ey}${e}`:ey;eg?window.location.href=t:eb(()=>window.location.href=t)},showingMostEngaging:!!(d&&(null==V?void 0:V.id)),isVertical:B}),ev&&n.createElement(c.I,{isMainCmt:!P,onClose:()=>ef(!1),onPostSuccess:e=>{0!==eo||(null==V?void 0:V.id)||G(e),L(e=>Object.assign(Object.assign({},e),{commentsCount:e.commentsCount+1,commented:!0})),x&&x(e)},post:F}),d&&(null==V?void 0:V.id)?n.createElement("div",{className:"most-engaging-wrapper",onClick:e=>{f?(e.stopPropagation(),f()):window.location.href=ex}},n.createElement(CardReply,{hasQuickBookingEnable:j,handleMakeAppointment:D,comment:V,post:F,onDeleteComment:()=>{onDeleteComment&&onDeleteComment(V)},className:"most-engaging-comment",type:"most-engaging",key:V.id,cardAuthorProps:O}),eo>1&&!i&&n.createElement(o.B,{className:"see-more-comments",color:"ghost",size:"md"},eh("comment.seeMoreComments",{count:eo-1}))):null,$))}},aVPM:function(e,t,i){i.d(t,{F:function(){return Footer}});var a=i("q1tI"),n=i("sdp3"),o=i("Wgwc"),r=i.n(o),l=i("SPK5"),d=i("OAL+"),s=i("Eso5"),c=i("HKYo"),p=i("HkQG"),m=i("yPD6"),u=i("rBCA"),g=i("iBNF"),h=i("xrdX"),v=i("4SxB"),f=i("akOY");let x=u.Z.footer`
background-color: #1b3250;
.inner {
padding: 64px 24px 98px 24px;
margin: 0 auto;
}
.newsletter {
padding: 24px 0;
}
.footer-logo {
max-width: 132px;
max-height: 32px;
&[data-is-sehat='true'] {
max-width: 250px;
}
img {
object-fit: contain;
}
}
.social {
margin-top: 24px;
display: flex;
align-items: center;
gap: 16px;
flex-wrap: wrap;
> .icons {
display: flex;
gap: 16px;
}
}
hr {
height: 1px;
border: none;
margin: 16px 0 16px 0;
background: ${g.r.colors.neutral500};
opacity: 0.1;
outline: none;
}
.footer-menu-column {
min-width: 168px;
}
.footer-menu-title {
margin-bottom: 16px;
}
.footer-menu-link {
display: block;
}
.footer-menu-link-wrapper {
display: flex;
flex-direction: column;
gap: 12px;
}
.copyright {
display: flex;
flex-direction: column;
gap: 16px;
padding-top: 8px;
.copyright-content {
color: ${g.r.colors.neutral500};
font-size: 12px;
}
.copyright-image-wrapper {
flex-shrink: 0;
flex-wrap: wrap;
display: flex;
gap: 16px;
justify-content: flex-end;
.copyright-image {
align-self: flex-start;
img {
height: 32px;
}
}
}
}
.otherSites {
display: flex;
gap: 16px;
align-items: center;
padding: 19px 0;
border-top: 1px solid ${g.r.colors.neutral100}1a;
border-bottom: 1px solid ${g.r.colors.neutral100}1a;
.flags {
display: flex;
gap: 12px;
}
}
.signupButton {
display: none;
border: none;
margin-top: 16px;
outline: none;
text-transform: uppercase;
}
${p.M.mbDown} {
.inner {
padding: 64px 0;
}
.social {
flex-direction: column;
gap: 10px;
align-items: start;
}
hr {
margin-top: 0px;
}
.copyright {
align-items: center;
text-align: center;
}
.copyright-image-wrapper {
justify-content: center;
max-width: unset;
}
.otherSites {
flex-direction: column;
padding: 24px 0;
.linkTitle {
text-align: center;
}
.flags {
flex-wrap: wrap;
justify-content: center;
}
}
.footer-menu-title {
margin-bottom: 12px;
}
.footer-menu {
display: grid;
grid-template-columns: repeat(2, 1fr);
> .footer-menu-column {
padding: 24px 0;
}
> .footer-menu-column:first-child {
grid-column-start: 1;
grid-column-end: 3;
border-top: 1px solid ${g.r.colors.neutral100}1a;
border-bottom: 1px solid ${g.r.colors.neutral100}1a;
> .footer-menu-link-wrapper {
display: grid;
grid-template-columns: repeat(2, 1fr);
}
}
}
.otherSites {
margin-bottom: 24px;
}
}
${p.M.mbUp} {
.newsletter > p {
max-width: 360px;
}
.hrMobile {
display: none;
}
.copyright {
gap: 24px;
flex-direction: row-reverse;
align-items: center;
justify-content: space-between;
}
.otherSites {
margin-bottom: 40px;
}
.columns {
display: flex;
flex-direction: row;
width: 100%;
gap: 16px;
margin-bottom: 40px;
> div:nth-child(1) {
display: flex;
flex-direction: column;
flex: 1;
}
> div:nth-child(2) {
display: flex;
flex-direction: row;
gap: 24px;
}
}
}
`,y=u.Z.img`
width: 32px;
height: 32px;
${p.M.mbDown} {
width: 24px;
height: 24px;
}
.country-flag {
width: 100%;
height: 100%;
}
`,Flag=({url:e,dataEventCategory:t,dataEventAction:i,dataEventLabel:n})=>a.createElement(y,{loading:"lazy",className:"country-flag",src:e,alt:"Country Flag","data-event-category":t,"data-event-action":i,"data-content-label":n}),FooterMenuColumn=({title:e,items:t,locale:i,index:n})=>{let{isMobile:o}=(0,m.u)();return a.createElement("div",{className:"footer-menu-column"},e?a.createElement(c.T,{size:o?"s4":"s3",className:"footer-menu-title",weight:o?"regular":"semiBold",color:"neutral.6"},e):null,a.createElement("div",{className:"footer-menu-link-wrapper"},null==t?void 0:t.map((e,t)=>a.createElement(c.T,{size:o?"p3":"p4",as:"a","data-event-category":"Footer","data-event-action":e.title,"data-event-label":`https://${h.v[i]}${e.url}`,className:"footer-menu-link",href:e.url,key:t,color:"#fff",weight:o&&0===n?"semiBold":"regular"},e.title))))},DiscoverFooter=({className:e,footerInfo:t,locale:i})=>{var o,l,d,s,p,u,g,h,v,f,y;let{isMobile:b}=(0,m.u)(),w=null==t?void 0:t.menu,E=(null===(l=null===(o=null==t?void 0:t.general)||void 0===o?void 0:o.verified)||void 0===l?void 0:l.filter(Boolean))||[];return a.createElement(x,{className:e},a.createElement(n.C,null,a.createElement("div",{className:"inner"},a.createElement("a",{href:"/"},a.createElement("img",{loading:"lazy",className:"footer-logo",src:null===(d=null==t?void 0:t.general)||void 0===d?void 0:d.logo,alt:"Logo","data-is-sehat":"id-ID"===i})),a.createElement("div",{className:"columns"},a.createElement("div",{className:"newsletter"},a.createElement(c.T,{size:b?"s3":"s4",weight:"semiBold",color:"neutral.0"},null===(s=null==t?void 0:t.general)||void 0===s?void 0:s.content),a.createElement("div",{className:"social"},a.createElement(c.T,{size:"p4",color:"neutral.6"},null===(p=null==t?void 0:t.social)||void 0===p?void 0:p.title),a.createElement("div",{className:"icons"},null===(g=null===(u=null==t?void 0:t.social)||void 0===u?void 0:u.socials)||void 0===g?void 0:g.map((e,t)=>a.createElement("a",{key:t,"data-event-category":"Footer","data-event-action":`Follow us - ${e.name}`,"data-content-label":e.url,href:e.url},a.createElement("img",{loading:"lazy","data-event-category":"Footer","data-event-action":`Follow us - ${e.name}`,"data-content-label":e.url,src:e.icon,alt:"Logo Social",className:"social-icon",width:"24",height:"24"})))))),a.createElement("div",{className:"footer-menu"},w&&a.createElement(a.Fragment,null,null==w?void 0:w.map((e,t)=>a.createElement(FooterMenuColumn,{title:e.menu_title,items:e.items,locale:i,key:t,index:t}))))),a.createElement("div",{className:"otherSites"},a.createElement(c.T,{size:"p4",className:"linkTitle",color:"neutral.6",weight:"regular"},null===(h=null==t?void 0:t.branch)||void 0===h?void 0:h.title),a.createElement("div",{className:"flags"},null===(f=null===(v=null==t?void 0:t.branch)||void 0===v?void 0:v.branch)||void 0===f?void 0:f.map((e,t)=>a.createElement("a",{href:e.url,key:t,"data-event-category":"Footer","data-event-action":e.name,"data-event-label":e.url},a.createElement(Flag,{url:e.flag,dataEventCategory:"Footer",dataEventAction:e.name,dataEventLabel:e.url}))))),a.createElement("div",{className:"copyright"},a.createElement("div",{className:"copyright-image-wrapper"},E.length?E.map((e,t)=>a.createElement("a",{href:e.url,key:t,className:"copyright-image"},a.createElement("img",{loading:"lazy",src:e.image,alt:"DMCA Icon"}))):null),a.createElement(c.T,{size:"n1",className:"copyright-content",as:"div",color:"neutral.6",weight:"regular"},a.createElement("div",{dangerouslySetInnerHTML:{__html:null===(y=null==t?void 0:t.general)||void 0===y?void 0:y.copyright.replace(/{currentYear}/gi,r()().get("year").toString())}}))))))},b=u.Z.footer`
position: relative;
overflow: hidden;
.icons {
margin-top: 12px;
margin-bottom: 20px;
> a:not(:last-child) {
margin-right: 16px;
}
}
a {
text-decoration: none;
}
`,w=u.Z.div`
position: relative;
padding: 80px 0 40px;
margin: auto 68px;
display: flex;
justify-content: space-between;
align-items: flex-start;
border-bottom: 1px solid ${g.r.colors.neutral200};
${p.M.tdDown} {
margin: auto 16px;
flex-wrap: wrap;
row-gap: 32px;
column-gap: 16px;
}
${p.M.mbDown} {
margin: auto 0;
}
`,E=u.Z.div`
display: flex;
justify-content: space-between;
gap: 12px;
flex-direction: column;
${p.M.mbDown} {
flex: 1 1 160px;
}
.title {
padding-bottom: 4px;
}
`,k=u.Z.div`
display: flex;
justify-content: space-between;
gap: 12px;
flex-direction: column;
`,C=u.Z.div`
background-color: #{map-get($mbColors, 'dark')};
padding: 16px 0;
position: relative;
img {
width: 89px;
height: 32px;
}
.content {
display: flex;
align-items: center;
justify-content: space-between;
gap: 174px;
margin: auto 68px;
${p.M.tdDown} {
margin: auto 16px;
}
${p.M.mbDown} {
flex-direction: column-reverse;
gap: 16px;
align-items: flex-start;
margin: auto 0;
}
}
.verify {
display: flex;
align-items: flex-start;
gap: 8px;
}
`,N=u.Z.div`
padding: 40px 0;
${p.M.mbUp} {
margin: auto 68px;
}
`,_=u.Z.div`
display: flex;
gap: 16px;
.social-logo {
width: 28px;
}
`,MarryBabyFooter=({logoType:e="marryBaby",footerMenu:t,background:i})=>{var o;if(!t)return null;let{general:p,menu:m,socials:u}=t;return a.createElement(b,{style:{backgroundColor:i||"none"}},a.createElement(n.C,null,a.createElement(w,null,null==m?void 0:m.map(({menu_title:e,items:t},i)=>a.createElement(E,{key:`mbf${i}`},a.createElement(f.M,{className:"title",type:"subtitle-1",color:g.r.mbColors.pink},e),null==t?void 0:t.map(({title:e,url:t},i)=>a.createElement("a",{"data-event-category":"Footer","data-event-action":"Click","data-event-label":`${t}`,className:"link",href:t,key:`footer-links-${i}`},a.createElement(k,{key:`mbitem${i}`},a.createElement(f.M,{type:"bodytext-2",color:g.r.mbColors.gray},e)))))))),a.createElement(n.C,null,a.createElement(N,null,a.createElement(l.k,{gap:"24px",sx:e=>({[e.fn.largerThan("sm")]:{".info-item":{flexGrow:1,width:"50%"}},[e.fn.smallerThan("sm")]:{flexDirection:"column"}})},a.createElement(d.K,{spacing:"24px",className:"info-item"},a.createElement(v.L,{className:"logo",type:e}),a.createElement(c.T,{size:"p4",as:"div"},a.createElement("div",{dangerouslySetInnerHTML:{__html:null==p?void 0:p.content}})),a.createElement(_,null,null==u?void 0:u.map(({icon:e,name:t,url:i},n)=>a.createElement("a",{key:`social${n}`,target:"_blank",rel:"noreferrer","data-event-category":"Footer","data-event-action":`Follow us - ${t}`,"data-content-label":t,href:i},a.createElement("img",{className:"social-logo",loading:"lazy",src:e,alt:t}))))),a.createElement(s.x,{className:"info-item",sx:{paddingTop:"7px"}},a.createElement(c.T,{size:"p4",as:"div"},a.createElement("div",{dangerouslySetInnerHTML:{__html:null==p?void 0:p.information}})))))),a.createElement(C,null,a.createElement(n.C,null,a.createElement("div",{className:"content"},a.createElement(c.T,{size:"p5",color:"#fff",as:"div"},a.createElement("div",{dangerouslySetInnerHTML:{__html:null==p?void 0:p.copyright.replace(/{currentYear}/gi,r()().get("year").toString())}})),a.createElement("div",{className:"verify"},null===(o=null==p?void 0:p.verified)||void 0===o?void 0:o.map(({image:e,url:t},i)=>a.createElement("img",{loading:"lazy",key:`imgMbFt${i}`,src:e,alt:t})))))))},Footer=({locale:e,footerInfo:t,siteType:i,background:n})=>"helloSites"===i?a.createElement(DiscoverFooter,{locale:e,footerInfo:t||{}}):a.createElement(MarryBabyFooter,{footerMenu:t,background:n})},akOY:function(e,t,i){i.d(t,{M:function(){return MarryBabyText},a:function(){return MarryBabyHeading}});var a=i("mHfz"),n=i("q1tI"),o=i("rBCA"),r=i("iBNF");let l=(0,o.Z)(e=>{var{type:t}=e,i=(0,a._)(e,["type"]);return n.createElement(t,i)})`
color: var(--text-color, ${r.r.mbColors.dark});
font-family: Krub;
font-weight: 600;
letter-spacing: -0.2px;
&[data-type='headline-1'] {
font-size: 40px;
line-height: 60px;
}
&[data-type='headline-2'] {
font-size: 32px;
line-height: 48px;
}
&[data-type='headline-3'] {
font-size: 24px;
line-height: 40px;
}
&[data-type='headline-4'] {
font-size: 18px;
line-height: 32px;
}
`,d=o.Z.p`
color: var(--text-color, ${r.r.mbColors.dark});
letter-spacing: -0.2px;
&[data-type='subtitle-1'] {
font-size: 16px;
font-weight: 600;
line-height: 26px;
}
&[data-type='subtitle-2'] {
font-size: 14px;
font-weight: 500;
line-height: 24px;
}
&[data-type='subtitle-3'] {
font-size: 12px;
font-weight: 500;
line-height: 20px;
}
&[data-type='bodytext-1'] {
font-size: 16px;
font-weight: 400;
line-height: 28px;
}
&[data-type='bodytext-2'] {
font-size: 14px;
font-weight: 400;
line-height: 24px;
}
&[data-type='bodytext-3'] {
font-size: 12px;
font-weight: 400;
line-height: 20px;
}
&[data-type='caption-1'] {
font-size: 10px;
font-weight: 500;
letter-spacing: -0.1px;
line-height: 14px;
}
&[data-type='caption-2'] {
font-size: 10px;
font-weight: 400;
letter-spacing: -0.1px;
line-height: 14px;
}
`,MarryBabyHeading=e=>{var{type:t,color:i,style:o}=e,r=(0,a._)(e,["type","color","style"]);return n.createElement(l,Object.assign({type:t,"data-type":{h1:"headline-1",h2:"headline-2",h3:"headline-3",h4:"headline-4"}[t],style:Object.assign(Object.assign({},i&&{"--text-color":i}),o)},r))},MarryBabyText=e=>{var{type:t,color:i,style:o}=e,r=(0,a._)(e,["type","color","style"]);return n.createElement(d,Object.assign({"data-type":t,style:Object.assign(Object.assign({},o),i&&{"--text-color":i})},r))}},iYxA:function(e,t,i){i.d(t,{H:function(){return Heading}});var a=i("mHfz"),n=i("q1tI"),o=i("8vDj"),r=i("HKYo");let Heading=e=>{var{as:t,tag:i,color:l,fontWeight:d,dataEventCategory:s,dataEventAction:c,dataEventLabel:p}=e,m=(0,a._)(e,["as","tag","color","fontWeight","dataEventCategory","dataEventAction","dataEventLabel"]);let u=(0,o.rZ)();return n.createElement(r.T,Object.assign({as:t||i,color:l||u.colors.gray[8],"data-event-category":s,"data-event-action":c,"data-event-label":p,weight:"semibold"===d?"semiBold":"bold",size:i,"data-size":i,"data-font-weight":d||void 0},m))}}}]);