(self.webpackChunkhhgDiscoverV1=self.webpackChunkhhgDiscoverV1||[]).push([[5885],{lxhV:function(e,t,a){"use strict";a.d(t,{P:function(){return PopoverMenu},S:function(){return d}});var n=a("+OUp"),r=a.n(n),i=a("tuDO"),l=a("d/ZZ"),o=a("rBCA"),s=a("iBNF");let c=o.A.div` position: relative; display: content; .popover-menu__btn { /* position: relative; */ > span { width: 100%; height: 100%; > img { width: 100%; height: 100%; } } } .popover-menu__content { position: absolute; z-index: 10; width: 320px; padding: 8px; border: none; background: #fff; border-radius: 8px; box-shadow: 3px 3px 20px rgba(0, 0, 0, 0.1); &::before { position: absolute; width: 16px; height: 8px; background: #fff; content: ''; } &.--position { &-top { bottom: calc(100% + 8px); &.--align { &-start { left: 0; &::before { top: 100%; left: 16px; clip-path: polygon(0 0, 50% 100%, 100% 0); } } &-end { left: 100%; transform: translateX(calc(-100% + 1rem)); &::before { top: 100%; right: 16px; clip-path: polygon(0 0, 50% 100%, 100% 0); } } } } &-right { left: calc(100% + 8px); &.--align { &-start { top: 0; &::before { top: 16px; left: 0; width: 8px; height: 16px; clip-path: polygon(0 50%, 100% 0%, 100% 100%); transform: translateX(-100%); } } &-end { top: 100%; transform: translateX(calc(-100% + 1rem)); &::before { bottom: 16px; left: 0; width: 8px; height: 16px; clip-path: polygon(0 50%, 100% 0%, 100% 100%); transform: translateX(-100%); } } } } &-bottom { top: calc(100% + 8px); &.--align { &-start { left: 0; &::before { bottom: 100%; left: 16px; clip-path: polygon(50% 0%, 0% 100%, 100% 100%); } } &-end { left: 100%; transform: translateX(calc(-100% + 1rem)); &::before { right: 16px; bottom: 100%; clip-path: polygon(50% 0%, 0% 100%, 100% 100%); } } } } &-left { left: -8px; transform: translateX(-100%); &.--align { &-start { top: 0; &::before { top: 16px; left: 100%; width: 8px; height: 16px; clip-path: polygon(0 0%, 100% 50%, 0% 100%); transform: translateX(0); } } &-end { bottom: 0; &::before { bottom: 16px; left: 100%; width: 8px; height: 16px; clip-path: polygon(0 0%, 100% 50%, 0% 100%); transform: translateX(0); } } } } } } &[data-is-marrybaby='true'] { .popover-menu__content { padding: 0; border-radius: 12px; /* &::before { display: none; } */ } } `,d=o.A.div` display: flex; /* max-height: 300px; */ flex-direction: column; cursor: default; .__header { position: relative; display: flex; align-items: center; justify-content: center; padding: 1rem 0; margin-bottom: 8px; .__back-btn { position: absolute; top: 50%; left: 8px; width: 16px; height: 16px; cursor: pointer; transform: translateY(-50%); } } .tree-text-description { padding-right: 8px; padding-left: 8px; margin-top: -8px; margin-bottom: 8px; font-size: 14px; font-weight: 400; line-height: 22px; text-align: left; } .__content { overflow: auto; flex: 1; } .__list { .__item { position: relative; &.bold-item { font-weight: 700; } &:last-child { .__btn { margin-bottom: 0; } } .__btn { position: relative; display: flex; width: 100%; height: 40px; align-items: center; padding: 0 1rem; border: none; margin-bottom: 8px; color: ${s.w.colors.gray800}; cursor: pointer; text-align: left; transition: background 0.3s; /* for better gtm tracking result */ * { pointer-events: none; } &.--checked { color: ${s.w.colors.gray500}; pointer-events: none; } &:hover { background: ${s.w.colors.gray100}; } .__icon { width: 16px; height: 16px; margin-right: 0.4rem; } & > span { position: relative; & > img { width: 16px; height: 16px; margin-right: 0.4rem; } } } .__toggle { position: absolute; top: 50%; right: 16px; width: 16px; height: 16px; pointer-events: none; transform: translateY(-50%); } } } &[data-is-marrybaby='true'] { .__header { padding: 1rem; } .tree-text-description { padding: 0 1rem; } .__list { .__item { &:first-child { .__btn { border-top-left-radius: 12px; border-top-right-radius: 12px; } } &:last-child { .__btn { border-bottom-left-radius: 12px; border-bottom-right-radius: 12px; } } .__btn { height: unset; padding: 1rem; margin-bottom: 0; &:hover { background: ${s.w.mbColors.lightPink}; } } } } } `,PopoverMenu=({className:e,style:t,toggleButtonContent:a,position:o="bottom",align:s="end",children:d,buttonProps:p})=>{let{data:{env:{isMarryBaby:m}}}=(0,n.useContext)(l.T),[g,u]=(0,n.useState)(!1),h=(0,n.useRef)(null),v=(0,n.useRef)(g);return(0,n.useEffect)(()=>{var e;v.current=g,g&&(null===(e=h.current)||void 0===e||e.focus())},[g]),(0,n.useEffect)(()=>{let clickHandler=e=>{var t;(null===(t=h.current)||void 0===t?void 0:t.contains(e.target))||!v.current||u(!1)};return window.addEventListener("click",clickHandler,{passive:!0}),()=>{window.removeEventListener("click",clickHandler)}},[]),r().createElement(c,{"data-is-marrybaby":m,className:e,style:t},r().createElement(i.B,Object.assign({theme:m?"marryBaby":"helloSites",className:"popover-menu__btn",size:"md",color:"transparent",onClick:()=>u(e=>!e)},p),a),g?r().createElement("div",{ref:h,className:`popover-menu__content --position-${o} --align-${s}`,tabIndex:0,onClick:e=>e.stopPropagation()},"function"==typeof d?d({setShow:u}):d):null)}},O6Wk:function(e,t,a){"use strict";a.d(t,{C:function(){return h},I:function(){return ImagePreviewPopup},P:function(){return PostSingleImageViewPopup},a:function(){return PostImagePreview},b:function(){return v}});var n=a("+OUp"),r=a.n(n),i=a("U+Ez"),l=a("CL9C"),o=a("sFNn"),s=a("d/ZZ"),c=a("vH4S"),d=a("uzh1"),p=a("rBCA"),m=a("vEfc"),g=a("iBNF"),u=a("gEnE"),h="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3cpath stroke='%23262626' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M18 6 6 18M6 6l12 12'/%3e%3c/svg%3e",v="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='25' fill='none'%3e%3cpath stroke='%23262626' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='M10.05 18.06 4 12.038l6.05-6.025M4.002 12.035h15'/%3e%3c/svg%3e";let b=p.A.div` padding: 14px 16px 14px 17px; background: ${e=>e.bgColor}; border-left: 3px solid ${e=>e.highlight}; ${l.M.mbUp} { padding: 12px 12px 12px 17px; } `,f=p.A.div` display: flex; `,x=p.A.div` font-size: 12px; line-height: 18px; &[data-has-icon='true'] { margin-left: 10px; } `,w=p.A.div` flex-shrink: 0; `,E=p.A.div` display: grid; grid-gap: 3px; grid-template-columns: 1fr 1fr; grid-template-rows: auto; .img-wrapper { position: relative; overflow: hidden; width: 100%; padding-top: 56.25%; grid-column: auto; & > img { cursor: zoom-in; } .img-preview-blur { position: absolute; top: 50%; left: 50%; width: 110%; height: 110%; /* Add the blur effect */ -webkit-filter: blur(8px); filter: blur(8px); object-fit: cover; object-position: center; opacity: 0.8; transform: translate(-50%, -50%); } .img-preview { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; object-position: center; } .img-more-overlay { position: absolute; top: 0; left: 0; display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.5); z-index: 4; } } &[data-image-count='1'] { .img-wrapper { /* padding-top: 100%; */ grid-column: 1/3; } } &[data-image-count='2'] { .img-wrapper { /* padding-top: 100%; */ } } &[data-image-count='3'] { .img-wrapper { &:first-child { grid-column: 1/3; } } } &[data-image-count='4'] { .img-wrapper { /* padding-top: 100%; */ } } &[data-image-count='5'] { grid-template-columns: repeat(6, 1fr); .img-wrapper { /* padding-top: 100%; */ grid-column: auto/ span 2; &:first-child { padding-top: 56.25%; grid-column: 1/4; } &:nth-child(2) { padding-top: 56.25%; grid-column: 4/7; } } } &[data-is-marrybaby='true'] { grid-gap: 8px; .img-wrapper { padding-top: 66.66%; border-radius: 1rem; .img-preview { object-fit: cover; } } &[data-image-count='3'] { grid-template-columns: 1fr 1fr 1fr; .img-wrapper { &:first-child { padding-top: 100%; grid-column: 1/3; grid-row: 1/3; } } } } `,k=p.A.div` position: fixed; z-index: 999; top: 0; left: 0; display: flex; overflow: hidden; width: 100vw; height: 100vh; flex-direction: column; background: white; opacity: 0; pointer-events: none; transition: opacity 0.2s linear; &[data-open='true'] { opacity: 1; pointer-events: auto; } .top-bar { position: relative; padding: 20px 40px; .icon-arrow-left { position: absolute; top: 50%; left: 20px; height: 24px; width: 24px; cursor: pointer; transform: translateY(-50%); } } .container { flex: 1; overflow-y: auto; .img-preview { width: 100%; min-width: 100%; margin-bottom: 0.5rem; cursor: pointer; max-height: 100%; object-fit: cover; } } `,y=(0,p.A)(e=>{var{icon:t,bgColor:a=g.w.colors.yellow50,highlightColor:n=g.w.colors.yellow800,message:i}=e,l=(0,m.a)(e,["icon","bgColor","highlightColor","message"]);return r().createElement(b,Object.assign({bgColor:a,highlight:n},l),r().createElement(f,null,t&&r().createElement(w,null,t),r().createElement(x,{"data-has-icon":!!t},i)))})` margin-bottom: 16px; &.noti-bottom { border-left: none; margin-top: 4px; padding: 4px 8px; margin-left: 16px; margin-right: 16px; border-radius: 4px; } `,ImagePreviewPopup=({className:e,style:t,authorName:a,images:i,onClose:l,onOpenSingleView:s,alt:p})=>{let{t:m}=(0,o.u)(),[g,u]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{setTimeout(()=>{u(!0)},0)},[]),r().createElement(c.Portal,null,r().createElement(k,{className:e,style:t,"data-open":g},r().createElement("div",{className:"top-bar"},r().createElement("img",{className:"icon-arrow-left",src:v,onClick:l,alt:"go back",loading:"lazy"}),r().createElement(d.T,{size:"p2",weight:"bold",style:{textAlign:"center"}},m("previewPhotos.title",{name:a}))),r().createElement("div",{className:"container"},i.map((e,t)=>r().createElement("img",{className:"img-preview",key:t,src:e,onClick:()=>null==s?void 0:s(t),alt:p,loading:"lazy"})))),",")},C=p.A.div` position: fixed; z-index: 999; top: 0; left: 0; display: flex; width: 100%; height: 100%; flex-direction: column; background: black; opacity: 0; pointer-events: none; transition: opacity 0.2s linear; &[data-open='true'] { opacity: 1; pointer-events: auto; } `,N=p.A.div` padding: 1rem; background: white; .icon-close { width: 26px; height: 26px; cursor: pointer; } `,_=p.A.div` position: relative; flex: 1; overflow: hidden; > img { height: 100%; width: 100%; object-fit: contain; object-position: center; } `,z=p.A.div` --inner-padding: max(16px, 20%); height: 100%; position: absolute; left: 0; padding: 8px; padding-right: var(--inner-padding); display: flex; align-items: center; top: 0; cursor: pointer; &[data-right] { padding-right: 8px; padding-left: var(--inner-padding); left: unset; right: 0; } &[data-disabled='true'] { cursor: not-allowed; } `,T=p.A.div` border-radius: 50%; background: rgba(0, 0, 0, 0.3); display: flex; align-items: center; justify-content: center; padding: 4px; > img { width: 16px; height: 16px; &[data-disabled='true'] { opacity: 0.5; } } ${l.M.tdUp} { padding: 8px; > img { width: 30px; height: 30px; } } `;var S="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='17' fill='none'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='m6 12.813 4-4-4-4'/%3e%3c/svg%3e";let PostSingleImageViewPopup=({initialViewIndex:e,images:t,onClose:a,alt:i})=>{let[l,o]=(0,n.useState)(e),[s,d]=(0,n.useState)(!1);(0,n.useEffect)(()=>{setTimeout(()=>{d(!0)},0)},[]);let p=null==t?void 0:t[l],m=0===l,g=!(null==t?void 0:t.length)||l===(null==t?void 0:t.length)-1;return r().createElement(c.Portal,null,r().createElement(C,{"data-open":s&&!!p},r().createElement(N,null,r().createElement("img",{src:h,className:"icon-close",onClick:a,alt:"close",loading:"lazy"})),p&&l>=0&&r().createElement(r().Fragment,null,r().createElement(_,null,r().createElement("img",{className:"img-preview",src:p,alt:i,loading:"lazy"}),r().createElement(z,{"data-disabled":m,onClick:()=>!m&&o(l-1)},r().createElement(T,null,r().createElement("img",{src:S,style:{transform:"rotate(180deg)"},alt:"left arrow","data-disabled":m,loading:"lazy"}))),r().createElement(z,{"data-right":!0,"data-disabled":g,onClick:()=>!g&&o(l+1)},r().createElement(T,null,r().createElement("img",{src:S,alt:"right arrow","data-disabled":g,loading:"lazy"})))))))},M=(0,u.s)(p.A.div` position: absolute; top: 0; right: 0; left: 0; bottom: 0; background: rgba(0, 0, 0, 0.4); color: white; display: flex; align-items: center; justify-content: center; cursor: pointer; `,"hhgcomp-sensitivemask-inner"),$=p.A.div``,P=p.A.div` position: absolute; bottom: 0; left: 0; width: 100%; height: 100%; z-index: 3; background: white; cursor: pointer; &, * { // transition: all 300ms; transform-origin: bottom left; } img { transition: none; } .img-preview { width: 100%; } &[data-is-blurred='true'] { .img-preview { /* Add the blur effect */ -webkit-filter: blur(24px); filter: blur(24px); } } &[data-is-blurred='false'] { background: transparent; cursor: zoom-in; ${M.classSelector} { top: auto; right: auto; left: 8px; bottom: 8px; background: rgba(0, 0, 0, 0); align-items: flex-end; justify-content: flex-start; } } `,SensitiveMask=({image:e,showIcon:t=!0})=>{let[a,i]=(0,n.useState)(!0);return r().createElement(P,{"data-is-blurred":a,onClick:e=>a&&e.stopPropagation()},r().createElement("img",{loading:"lazy",className:"img-preview",src:e}),r().createElement(M,{onClick:e=>{e.stopPropagation(),i(!a)}},t&&r().createElement($,null,a?r().createElement("svg",{width:"22",height:"20",viewBox:"0 0 22 20",fill:"none"},r().createElement("path",{d:"M1.71 2.54a.996.996 0 0 1 0-1.41c.39-.39 1.03-.39 1.42 0l16.31 16.33a.996.996 0 1 1-1.41 1.41l-2.72-2.72c-1.34.52-2.79.82-4.31.82-5 0-9.27-3.11-11-7.5C.77 7.5 2.06 5.8 3.68 4.51zM16 9.47c0-2.76-2.24-5-5-5-.51 0-1 .1-1.47.24L7.36 2.54c1.15-.37 2.37-.57 3.64-.57 5 0 9.27 3.11 11 7.49-.69 1.76-1.79 3.3-3.18 4.53l-3.06-3.06c.14-.46.24-.95.24-1.46m-5 5c-2.76 0-5-2.24-5-5 0-.77.18-1.5.49-2.14L8.06 8.9c-.03.18-.06.37-.06.57 0 1.66 1.34 3 3 3 .2 0 .38-.03.57-.07l1.57 1.57c-.65.32-1.37.5-2.14.5m2.97-5.33a2.97 2.97 0 0 0-2.64-2.64z",fill:"#fff"})):r().createElement("svg",{width:"23",height:"16",viewBox:"0 0 23 16",fill:"none"},r().createElement("path",{d:"M12 0C5.142 0 1.886 5.879 1.096 7.557c-.132.28-.132.604 0 .884C1.886 10.121 5.142 16 12 16c6.834 0 10.092-5.837 10.896-7.54a1.08 1.08 0 0 0 0-.92C22.092 5.836 18.834 0 12 0m0 3a5 5 0 1 1-.001 10.001 5 5 0 0 1 0-10.001m0 2a3 3 0 1 0 0 6 3 3 0 0 0 0-6",fill:"#2D87F3"})))))},PostImagePreview=({className:e,images:t=[],style:a,authorName:c,isSensitive:d=!1,alt:p,positionAlert:m="top"})=>{let{data:{env:{isMarryBaby:g}}}=(0,n.useContext)(s.T),{t:u}=(0,o.u)(),h=`+ ${(t.length||0)-4}`,[v,b]=(0,n.useState)(!1),[f,x]=(0,n.useState)(-1),w=t.length>5,k=(0,n.useRef)(!1);return(0,n.useEffect)(()=>()=>{k.current&&(0,l.t)(!1)},[]),(0,n.useEffect)(()=>{v||f>=0?((0,l.t)(!0),k.current=!0):((0,l.t)(!1),k.current=!1)},[v,f]),r().createElement(r().Fragment,null,d&&"top"===m&&r().createElement(y,{message:u("sensitiveMask.contentWarningDescription"),icon:r().createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none"},r().createElement("path",{d:"M9 .667A8.336 8.336 0 0 0 .667 9c0 4.6 3.733 8.333 8.333 8.333S17.333 13.6 17.333 9 13.6.667 9 .667m0 9.166A.836.836 0 0 1 8.167 9V5.667c0-.459.375-.834.833-.834s.833.375.833.834V9A.836.836 0 0 1 9 9.833M8.167 11.5v1.667h1.666V11.5z",fill:"#FE921D"}))}),r().createElement(E,{className:e,style:a,"data-image-count":w?5:t.length||0,"data-is-marrybaby":g,"data-cursor-pointer":!d},null==t?void 0:t.slice(0,5).map((e,t)=>{let a=4===t&&w;return r().createElement("div",{className:"img-wrapper",key:t,onClick:()=>{t>=4&&w?b(!0):x(t)}},d&&r().createElement(SensitiveMask,{image:e,showIcon:!a}),!g&&r().createElement("img",{loading:"lazy",className:"img-preview-blur",src:e,alt:p}),r().createElement("img",{loading:"lazy",className:"img-preview",src:e,alt:p}),a&&r().createElement("div",{className:"img-more-overlay"},r().createElement(i.H,{tag:"h1",as:"h2",color:"white"},h)))})),v&&r().createElement(ImagePreviewPopup,{authorName:c||"",images:t,onClose:()=>b(!1),onOpenSingleView:x,alt:p}),f>=0&&r().createElement(PostSingleImageViewPopup,{images:t,initialViewIndex:f,onClose:()=>x(-1),alt:p}),d&&"bottom"===m&&r().createElement(y,{message:u("sensitiveMask.contentWarningDescription.community"),className:"noti-bottom",icon:r().createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none"},r().createElement("path",{d:"M9 .667A8.336 8.336 0 0 0 .667 9c0 4.6 3.733 8.333 8.333 8.333S17.333 13.6 17.333 9 13.6.667 9 .667m0 9.166A.836.836 0 0 1 8.167 9V5.667c0-.459.375-.834.833-.834s.833.375.833.834V9A.836.836 0 0 1 9 9.833M8.167 11.5v1.667h1.666V11.5z",fill:"#FE921D"}))}))}},Bell:function(e,t,a){"use strict";a.d(t,{C:function(){return CardReactions},L:function(){return LabelSortPin},T:function(){return TagTopic},a:function(){return LabelPin},b:function(){return TreePopoverMenu},c:function(){return r}});var n,r,i=a("vEfc"),l=a("+OUp"),o=a.n(l),s=a("sFNn"),c=a("oz0L"),d=a("vH4S"),p=a("+u84"),m=a("uzh1"),g=a("iBNF"),u=a("CL9C"),h=a("RBzE"),v=a("d/ZZ"),b=a("QktA"),f=a("4BRW"),x=a("rBCA"),w=a("U+Ez"),E=a("lxhV");let k=(0,l.createContext)({});var y={wrapper:"vvR-m49"};let LikeWrapper=e=>{var{children:t,className:a=""}=e,n=(0,i.a)(e,["children","className"]);let{isReplied:r,trackingCategory:s,trackingLabel:c,onLikeClick:p}=(0,l.useContext)(k);return o().createElement(d.Box,Object.assign({className:`${y.wrapper} ${a}`,"data-event-category":s,"data-event-action":r?"Like Comment Click":"Like Post Click","data-event-label":c},n,{onClick:()=>{null==p||p()}}),t)},ShareWrapper=e=>{var{children:t,className:a=""}=e,n=(0,i.a)(e,["children","className"]);let{trackingCategory:r,trackingLabel:s,onShareClick:c}=(0,l.useContext)(k);return o().createElement(d.Box,Object.assign({className:`${y.wrapper} ${a}`,"data-event-category":r,"data-event-action":"Share Icon Click","data-event-label":s},n,{onClick:()=>{null==c||c()}}),t)},CommentWrapper=e=>{var{children:t,className:a=""}=e,n=(0,i.a)(e,["children","className"]);let{isReplied:r,trackingCategory:s,trackingLabel:c,onCommentClick:p}=(0,l.useContext)(k);return o().createElement(d.Box,Object.assign({className:`${y.wrapper} ${a}`,"data-event-category":s,"data-event-action":r?"Reply Comment Click":"Comment Text Click","data-event-label":c},n,{onClick:e=>{e.preventDefault(),e.stopPropagation(),null==p||p()}}),t)},SaveWrapper=e=>{var{children:t,className:a=""}=e,n=(0,i.a)(e,["children","className"]);let{trackingCategory:r,trackingLabel:s,onSaveClick:c}=(0,l.useContext)(k);return o().createElement(d.Box,Object.assign({className:`${y.wrapper} ${a}`,"data-event-category":r,"data-event-action":"Save Post Click","data-event-label":s},n,{onClick:e=>{e.preventDefault(),e.stopPropagation(),null==c||c()}}),t)};var C={wrapper:"UhiT4m5",inner:"oEfeTkV",iconTxt:"_9GXHCn3",clickableIcon:"HCsrR0N",labelReaction:"Ierg-Fq",actions:"_674BTR4",statistical:"XlkglSM",releatedStatistical:"KyekKc3",statisticalNoAction:"TTfvZpR"};(n=r||(r={}))[n.post=1]="post",n[n.reply=2]="reply";let CardReactions=e=>{var{type:t,viewCount:a=0,loveCount:n=0,replyCount:d=0,replyPadding:p,liked:u,isReplied:b,isSaved:f,onCommentClick:x,onLikeClick:w,onShareClick:E,onSaveClick:y,onGoToUrl:N,className:_,style:z,showingMostEngaging:T,isMarryBaby:S,hasShare:M=!0,hasSave:$=!0,hasActionStatistical:P=!0,hasShowAction:A=!0,isReleatedPost:j=!1,isVertical:R=!1,trackingCategory:B="Together",trackingLabel:L="",children:I}=e,F=(0,i.a)(e,["type","viewCount","loveCount","replyCount","replyPadding","liked","isReplied","isSaved","onCommentClick","onLikeClick","onShareClick","onSaveClick","onGoToUrl","className","style","showingMostEngaging","isMarryBaby","hasShare","hasSave","hasActionStatistical","hasShowAction","isReleatedPost","isVertical","trackingCategory","trackingLabel","children"]);let{data:{env:{isMarryBaby:D}}}=(0,l.useContext)(v.T),W=S||D,{t:V}=(0,s.u)(),{isMobile:O}=(0,h.u)(),H=(0,l.useMemo)(()=>a>0||d>0,[a,d]),X=(0,l.useMemo)(()=>a>0||n>0||d>0,[a,n,d]),G=(0,l.useCallback)(()=>o().createElement("div",{className:`${C.releatedStatistical} ${P?"":C.statisticalNoAction} session-statistical`},o().createElement("div",{className:"releated-post-statistical"},o().createElement(m.T,{size:"p3",className:C.iconTxt,as:"div",onClick:()=>{P&&(null==N||N())}},a>0&&o().createElement(o().Fragment,null,o().createElement(c.I.Eye,{size:18,isMarryBaby:W}),o().createElement("div",{className:C.labelReaction},a))),o().createElement(m.T,{size:"p3",className:C.iconTxt,as:"div",onClick:()=>{P&&(null==N||N(d>0?"":"?action=comment"))}},o().createElement("div",{className:C.labelReaction},d>0?V("comment.count",{count:d}):V("comment.now"))))),[H,P,W,a,d]),Y=(0,l.useCallback)(()=>X?o().createElement("div",{className:`${C.statistical} ${P?"":C.statisticalNoAction} session-statistical`},o().createElement(m.T,{size:"p3",className:C.iconTxt,as:"div",onClick:()=>{P&&(null==N||N())}},a>0&&o().createElement(o().Fragment,null,o().createElement(c.I.Eye,{size:18,isMarryBaby:W}),o().createElement("div",{className:C.labelReaction},a))),O||R?o().createElement("div",{className:"wrapper-list-statistical"},n>0?o().createElement(m.T,{className:C.iconTxt,size:"p3",as:"div",onClick:()=>{P&&(null==N||N())}},o().createElement("div",{className:C.labelReaction},n," ",V("cardReactions.like"))):o().createElement("div",null),d>0&&o().createElement(m.T,{size:"p3",className:C.iconTxt,as:"div",onClick:()=>{P&&(null==N||N())}},o().createElement("div",{className:C.labelReaction},d," ",V("cardReactions.comment")))):o().createElement(o().Fragment,null,n>0?o().createElement(m.T,{className:C.iconTxt,size:"p3",as:"div",onClick:()=>{P&&(null==N||N())}},o().createElement(c.I.Heart,{isMarryBaby:W,isSolid:!1,size:18,color:"#737373"}),o().createElement("div",{className:C.labelReaction},n)):o().createElement("div",null),d>0&&o().createElement(m.T,{size:"p3",className:C.iconTxt,as:"div",onClick:()=>{P&&(null==N||N())}},o().createElement(c.I.Comment,{size:18,className:"txt-icon",isMarryBaby:W}),o().createElement("div",{className:C.labelReaction},d)))):"",[X,P,W,O,a,n,d]);return o().createElement(k.Provider,{value:{liked:u,loveCount:n,trackingCategory:B,trackingLabel:L,isReplied:b,onLikeClick:w,onShareClick:E,onCommentClick:x,onSaveClick:y}},I||o().createElement("div",Object.assign({className:`${C.wrapper} ${_}`,"data-show-most-engaging":T,"data-type":t===r.post?"post":"reply","data-reply-padding":t===r.reply&&p,"data-is-marrybaby":W,style:z},F),o().createElement("div",{className:`${C.inner} ${R?"direction-vertical":""}`},A&&o().createElement("div",{className:`${C.actions} session-action`},o().createElement(LikeWrapper,{className:`${C.clickableIcon} wrapper-action`},o().createElement(m.T,{className:C.iconTxt,size:"p3",as:"div"},o().createElement(c.I.Heart,{isMarryBaby:W,isSolid:u,size:18,color:u?W?g.w.mbColors.pink:g.w.colors.red800:"#737373"}),o().createElement("div",{className:C.labelReaction},V("cardReactions.like")))),M&&o().createElement(ShareWrapper,{className:`${C.clickableIcon} wrapper-action`},o().createElement(m.T,{size:"p3",className:C.iconTxt,as:"div"},o().createElement(c.I.Share,{size:18,isMarryBaby:W}),o().createElement("div",{className:C.labelReaction},V("share.title")))),$&&o().createElement(SaveWrapper,{className:`${C.clickableIcon} wrapper-action`},o().createElement(m.T,{size:"p3",className:C.iconTxt,as:"div"},f?o().createElement(c.I.Bookmark,{size:18,isMarryBaby:W,color:W?"#3E3F58":"#737373"}):o().createElement(c.I.Save,{size:18,isMarryBaby:W,color:W?"#3E3F58":"#737373"}),o().createElement("div",{className:C.labelReaction},f?V("cardReactions.unSave"):V("cardReactions.save")))),o().createElement(CommentWrapper,{className:`${C.clickableIcon} wrapper-action`},o().createElement(m.T,{size:"p3",className:C.iconTxt,as:"div"},o().createElement(c.I.Comment,{size:18,className:"txt-icon",isMarryBaby:W}),o().createElement("div",{className:C.labelReaction},V("cardReactions.comment"))))),j?G():Y())))};CardReactions.LikeWrapper=LikeWrapper,CardReactions.ShareWrapper=ShareWrapper,CardReactions.CommentWrapper=CommentWrapper;let N=(0,d.createStyles)(e=>({wrapper:{display:"flex",flexWrap:"wrap",width:"100%",padding:"0.5rem 0",gap:"0.5rem"},item:{position:"relative",whiteSpace:"nowrap",padding:"5px 12px",background:e.colors.gray[0],borderRadius:"2rem",cursor:"pointer","-webkit-user-drag":"none",userSelect:"none",textDecoration:"none","*":{pointerEvents:"none"},"&:first-child":{marginLeft:0}},text:{}})),TagTopic=e=>{var{topics:t=[],onClick:a,className:n,style:r,trackingCategory:c="Together",locale:d="vi-VN",classNames:g,styles:u,unstyled:h,shortenedNumber:x=3,shortenedStyle:w}=e,E=(0,i.a)(e,["topics","onClick","className","style","trackingCategory","locale","classNames","styles","unstyled","shortenedNumber","shortenedStyle"]);let{t:k}=(0,s.u)(),{classes:y}=N(void 0,{name:"TagTopic",classNames:g,styles:u,unstyled:h}),{data:{env:{togetherBasePath:C}},action:{sanitizeFunction:_}}=(0,l.useContext)(v.T),[z,T]=(0,l.useState)(!w);return o().createElement("div",Object.assign({onClick:a,className:`${y.wrapper} ${n}`,style:r},E),(z?t:t.slice(0,x)).map((e,t)=>{let a=(null==e?void 0:e.dueDateMonth)&&(null==e?void 0:e.dueDateMonth)!==0&&(null==e?void 0:e.dueDateYear)&&(null==e?void 0:e.dueDateYear)!==0;return o().createElement("a",{className:y.item,key:t,"data-event-category":c,"data-event-action":"Topic in Post Click","data-event-label":`${(0,v.l)(d)}${C}${e.url}`,href:e.isActive&&!e.isHidden?`${C}${e.url}/`:void 0},o().createElement(m.T,{size:"p4"},o().createElement("span",{style:Object.assign({},a&&{textTransform:"capitalize"}),dangerouslySetInnerHTML:{__html:a?`${(0,b.A)(new Date(2020,Number(e.dueDateMonth)-1,1),"MMMM",{locale:p.j[d]})}${d===f.L.Vietnam?"/":" "}${null==e?void 0:e.dueDateYear}`:(null==_?void 0:_(e.name))||e.name}})))}),!z&&t.length>x&&o().createElement("a",{className:y.item,href:"#",onClick:e=>{e.preventDefault(),T(!0)}},o().createElement(m.T,{size:"p4"},"+",k("tagTopic.moreTopics",{number:t.length-x}))))},_=x.A.div` display: flex; align-items: center; justify-content: space-between; padding: 16px; cursor: pointer; &[data-color='gray'] { background: ${g.w.colors.neutral50}; } &[data-color='white'] { border-bottom: 1px solid #e4e8ec; background: ${g.w.colors.white}; } .popover-menu__btn { display: flex; min-width: 2rem; height: 2rem; align-items: center; padding: 8px 0 !important; border: none; margin-left: 0.5rem; background: transparent; > span { display: flex; align-items: center; } &:hover { background: transparent !important; } } &.label-pinned { border-radius: ${g.w.borderRadius} 6px 0 0; .label-sort-pin-icon { width: 16px; height: 16px; vertical-align: middle; } } &[data-is-marrybaby='true'] { padding: 0.75rem 1rem; border-radius: 16px 16px 0px 0px; &[data-color='white'] { border-bottom: none; } &[data-color='gray'] { background: #f3f3f3; } .popover-menu__btn { width: unset; } &.label-pinned { border-bottom: none; background: #fff9eb; border-radius: 1rem 1rem 0 0; .label-sort-pin-icon { margin-right: 8px; } .label-sort-pin-heading { color: #fb8c00; } } &.label-sorting { ${u.M.tdUp} { padding-bottom: 1.5rem; margin-bottom: -0.75rem; } } } `,LabelSortPin=({label:e,rightLabel:t,onClick:a,color:n,className:r,style:i})=>{let{data:{env:{isMarryBaby:s}}}=(0,l.useContext)(v.T);return o().createElement(_,{"data-is-marrybaby":s,"data-color":n,onClick:a,className:r,style:i},o().createElement(m.T,{className:"label-sort-pin-heading",size:s?"p4":"p3",weight:"bold"},e),t)},LabelPin=({onClick:e,color:t,className:a,style:n})=>{let{data:{env:{isMarryBaby:r}}}=(0,l.useContext)(v.T),{t:i}=(0,s.u)();return o().createElement(LabelSortPin,{label:o().createElement(o().Fragment,null,r&&o().createElement("img",{className:"label-sort-pin-icon",src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3cpath stroke='%23FB8C00' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m3.5 20 4.37-4.37'/%3e%3cpath stroke='%23FB8C00' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M4.956 11.294a1 1 0 0 0 0 1.414l2.918 2.918 2.918 2.918a1 1 0 0 0 1.414 0l1.175-1.175a1 1 0 0 0 .293-.707v-3.936l2.9-2.9 2.31.123c.282.015.56-.091.76-.291l.573-.574a1 1 0 0 0 0-1.414l-4.386-4.386a1 1 0 0 0-1.414 0l-.574.574a1 1 0 0 0-.29.76l.122 2.309-2.9 2.9H6.838a1 1 0 0 0-.707.293z' clip-rule='evenodd'/%3e%3cpath stroke='%23FB8C00' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m16.57 9.83-2.9-2.9'/%3e%3c/svg%3e",loading:"lazy"})," ",i("label.pinnedPost")),rightLabel:!r&&o().createElement("img",{className:"label-sort-pin-icon",src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath stroke='%23FEA21E' stroke-linecap='round' d='m7.186 7.682-3.504 6.132'/%3e%3cpath fill='%23FEA21E' stroke='%23FEA21E' stroke-linejoin='round' stroke-width='.5' d='M3.246 7.784a.25.25 0 0 0 .091.342l5.447 3.145a.25.25 0 0 0 .342-.092 3.39 3.39 0 0 0 .11-3.186l1.622-2.808a2.66 2.66 0 0 0 1.606-1.239.25.25 0 0 0-.092-.341l-4.19-2.42a.25.25 0 0 0-.341.092 2.66 2.66 0 0 0-.27 2.01L5.949 6.095a3.39 3.39 0 0 0-2.703 1.69Z'/%3e%3c/svg%3e",loading:"lazy"}),onClick:e,color:"white",className:`label-pinned ${a}`,style:n})},TreePopoverMenu=e=>{var{data:t}=e,a=(0,i.a)(e,["data"]);return o().createElement(E.P,Object.assign({},a),({setShow:e})=>o().createElement(Tree,{data:t,setShow:e}))},getCurrentDataFromPath=(e,t)=>{let a=t.split("."),n=e;return a.forEach(e=>{var t,a;e&&n&&(null==n?void 0:n.type)==="list"&&(n=null===(a=null===(t=null==n?void 0:n.list)||void 0===t?void 0:t[Number(e)])||void 0===a?void 0:a.subTree)}),n},Tree=({data:e,setShow:t})=>{var a;let[n,r]=(0,l.useState)(""),i=(0,l.useMemo)(()=>e&&getCurrentDataFromPath(e,n),[e,n]);if(!e||!i)return null;let handleItemClick=(e,{subTree:a,onClick:n=()=>null})=>{n&&n(),a?r(t=>t.split(".").concat(String(e)).join(".")):t&&t(!1)};return o().createElement(E.S,null,i.isShowheader?o().createElement("div",{className:"__header"},n?o().createElement("img",{className:"__back-btn",src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3cpath stroke='%23262626' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='m15 18-6-6 6-6'/%3e%3c/svg%3e",onClick:()=>r(e=>e.split(".").slice(0,-1).join(".")),loading:"lazy"}):null,i.title?o().createElement(w.H,{className:"__title",tag:"h6"},i.title):null):null,i.description?o().createElement(m.T,{className:"tree-text-description",color:g.w.colors.gray600,size:"p3",weight:"regular"},i.description):null,o().createElement("div",{className:"__content"},"jsx"===i.type?null===(a=null==i?void 0:i.jsxRenderer)||void 0===a?void 0:a.call(i,t):null,"list"===i.type?o().createElement("ul",{className:"__list"},Array.isArray(i.list)?i.list.map((e,t)=>o().createElement("li",{key:t,style:e.style,className:`__item ${e.className}`}," ",o().createElement("div",{className:`__btn ${e.selected?"--checked":""}`,onClick:()=>handleItemClick(t,e),"data-event-category":e.dataEventCategory,"data-event-action":e.dataEventAction,"data-event-label":e.dataEventLabel},e.icon&&o().createElement("img",{className:"__icon",src:e.icon,loading:"lazy"}),o().createElement("span",null,e.label)),e.subTree?o().createElement("img",{className:"__toggle",src:"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' stroke-width='1.5' d='m6 12 4-4-4-4'/%3e%3c/svg%3e",loading:"lazy"}):null,e.selected?o().createElement("img",{className:"__toggle",src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath stroke='%238C8C8C' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M13.333 4 6 11.333 2.667 8'/%3e%3c/svg%3e",loading:"lazy"}):null)):null):null))}},"jbM+":function(e,t,a){var n=a("R/W3");e.exports=function(e,t){return!!(null==e?0:e.length)&&n(e,t,0)>-1}},"Xt/L":function(e){e.exports=function(e,t,a){for(var n=-1,r=null==e?0:e.length;++n0&&a(c)?t>1?baseFlatten(c,t-1,a,i,l):n(l,c):i||(l[l.length]=c)}return l}},"R/W3":function(e,t,a){var n=a("KwMD"),r=a("2ajD"),i=a("CZoQ");e.exports=function(e,t,a){return t==t?i(e,t,a):n(e,r,a)}},"2ajD":function(e){e.exports=function(e){return e!=e}},LGYb:function(e,t,a){var n=a("1hJj"),r=a("jbM+"),i=a("Xt/L"),l=a("xYSL"),o=a("dQpi"),s=a("rEGp");e.exports=function(e,t,a){var c=-1,d=r,p=e.length,m=!0,g=[],u=g;if(a)m=!1,d=i;else if(p>=200){var h=t?null:o(e);if(h)return s(h);m=!1,d=l,u=new n}else u=t?[]:g;e:for(;++c