(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,[886328,(e,t,n)=>{n.__esModule=!0,n.default=void 0;var o,r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var o=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};o.get||o.set?Object.defineProperty(t,n,o):t[n]=e[n]}}return t.default=e,t}(e.r(191788)),s=e.r(730943),a=(o=e.r(684774))&&o.__esModule?o:{default:o};function i(){return(i=Object.assign||function(e){for(var t=1;ttypeof window&&e.r(986911),n.default=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n={disconnectOnLeave:!1});class o extends r.Component{componentDidMount(){this.initIntersectionObserver(),this.startObserver(this.node,this.observer)}componentDidUpdate(e,t){!this.intersected&&!t.inViewport&&this.observer&&this.node&&(this.observer.unobserve(this.node),this.observer.observe(this.node))}initIntersectionObserver(){this.observer||(this.observer=new IntersectionObserver(this.handleIntersection,t))}componentWillUnmount(){this.stopObserver(this.node,this.observer)}startObserver(e,t){e&&t&&t.observe(e)}stopObserver(e,t){e&&t&&(t.unobserve(e),t.disconnect(),this.observer=null)}handleIntersection(e){let t=this.props,o=t.onEnterViewport,r=t.onLeaveViewport,s=e[0]||{},a=s.isIntersecting,i=s.intersectionRatio,c=void 0!==a?a:i>0;if(!this.intersected&&c){this.intersected=!0,o&&o(),this.setState({inViewport:c,enterCount:this.state.enterCount+1});return}this.intersected&&!c&&(this.intersected=!1,r&&r(),n.disconnectOnLeave&&this.observer&&this.observer.disconnect(),this.setState({inViewport:c,leaveCount:this.state.leaveCount+1}))}setRef(e){this.node=(0,s.findDOMNode)(e)}setInnerRef(e){e&&!this.node&&(this.node=e)}render(){let t=this.props,n=(t.onEnterViewport,t.onLeaveViewport,function(e,t){if(null==e)return{};var n,o,r={},s=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(t,["onEnterViewport","onLeaveViewport"])),o=this.state,s=o.inViewport,a=o.enterCount,c=o.leaveCount,d="function"!=typeof e||e.prototype&&e.prototype.isReactComponent?{ref:this.setRef}:{innerRef:this.setInnerRef};return r.default.createElement(e,i({},n,{inViewport:s,enterCount:a,leaveCount:c},d))}constructor(e){super(e),this.observer=null,this.node=null,this.state={inViewport:!1,enterCount:0,leaveCount:0},this.intersected=!1,this.handleIntersection=this.handleIntersection.bind(this),this.initIntersectionObserver=this.initIntersectionObserver.bind(this),this.setInnerRef=this.setInnerRef.bind(this),this.setRef=this.setRef.bind(this)}}return(0,a.default)(o,e)}},684774,(e,t,n)=>{var o=e.r(767875),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},s={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},i={};function c(e){return o.isMemo(e)?a:i[e.$$typeof]||r}i[o.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i[o.Memo]=a;var d=Object.defineProperty,l=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,u=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;t.exports=function e(t,n,o){if("string"!=typeof n){if(m){var r=p(n);r&&r!==m&&e(t,r,o)}var a=l(n);h&&(a=a.concat(h(n)));for(var i=c(t),f=c(n),b=0;b{var o="function"==typeof Symbol&&Symbol.for,r=o?Symbol.for("react.element"):60103,s=o?Symbol.for("react.portal"):60106,a=o?Symbol.for("react.fragment"):60107,i=o?Symbol.for("react.strict_mode"):60108,c=o?Symbol.for("react.profiler"):60114,d=o?Symbol.for("react.provider"):60109,l=o?Symbol.for("react.context"):60110,h=o?Symbol.for("react.async_mode"):60111,u=o?Symbol.for("react.concurrent_mode"):60111,p=o?Symbol.for("react.forward_ref"):60112,m=o?Symbol.for("react.suspense"):60113,f=o?Symbol.for("react.suspense_list"):60120,b=o?Symbol.for("react.memo"):60115,x=o?Symbol.for("react.lazy"):60116,g=o?Symbol.for("react.block"):60121,_=o?Symbol.for("react.fundamental"):60117,j=o?Symbol.for("react.responder"):60118,v=o?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case h:case u:case a:case c:case i:case m:return e;default:switch(e=e&&e.$$typeof){case l:case p:case x:case b:case d:return e;default:return t}}case s:return t}}}function w(e){return y(e)===u}n.AsyncMode=h,n.ConcurrentMode=u,n.ContextConsumer=l,n.ContextProvider=d,n.Element=r,n.ForwardRef=p,n.Fragment=a,n.Lazy=x,n.Memo=b,n.Portal=s,n.Profiler=c,n.StrictMode=i,n.Suspense=m,n.isAsyncMode=function(e){return w(e)||y(e)===h},n.isConcurrentMode=w,n.isContextConsumer=function(e){return y(e)===l},n.isContextProvider=function(e){return y(e)===d},n.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},n.isForwardRef=function(e){return y(e)===p},n.isFragment=function(e){return y(e)===a},n.isLazy=function(e){return y(e)===x},n.isMemo=function(e){return y(e)===b},n.isPortal=function(e){return y(e)===s},n.isProfiler=function(e){return y(e)===c},n.isStrictMode=function(e){return y(e)===i},n.isSuspense=function(e){return y(e)===m},n.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===u||e===c||e===i||e===m||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===x||e.$$typeof===b||e.$$typeof===d||e.$$typeof===l||e.$$typeof===p||e.$$typeof===_||e.$$typeof===j||e.$$typeof===v||e.$$typeof===g)},n.typeOf=y},767875,(e,t,n)=>{e.i(350461),t.exports=e.r(807705)},724383,959677,240692,e=>{var t=e.i(391398),n=e.i(145246),o=e.i(191788);e.i(966278);var r=e.i(318398),s=e.i(758568),a=e.i(368721),i=e.i(501584),c=e.i(604782),d=e.i(567166),l=e.i(363872),h=e.i(865780);let u=new String("");u.__hash="3a28fab2c71b5470";let p=r.f.ApiConsumer(e=>{let{api:r,children:s,pageName:a,blockId:i}=e,{TrackingUri:c}=d.f,[p,m]=(0,h.E)({threshold:0}),[f,b]=(0,o.useState)(!1),x=(e,t)=>{let{referrer:n}=window.document;e&&r.onAuthenticated(()=>{let o=l.isMobile?a.MOBILE:a.DESKTOP;r.post({uri:e,params:{block_id:i,page:o,referrer:n}}).then(()=>{"function"==typeof t&&t()}).catch(e=>console.log(e))})},g=()=>{x(c.CLICK)};return(0,o.useEffect)(()=>{m&&!f&&x(c.VIEW,()=>b(!0))},[m]),(0,o.useEffect)(()=>{x(c.IMPRESSION)},[]),(0,t.jsxs)("div",{ref:p,onClick:g,onKeyDown:g,className:"jsx-".concat(u.__hash)+" ads-tracking-container",children:[s,(0,t.jsx)(n.default,{id:u.__hash,children:u})]})});e.s(["f",0,p],959677);var m=e.i(750840);let f=new String(".image-loader.jsx-8a52d709136353ac{display:block;position:relative;overflow:hidden}.image-loader.jsx-8a52d709136353ac .spacer.jsx-8a52d709136353ac{background-color:var(--header-menu-button);padding-bottom:100%;display:block}.image-loader.jsx-8a52d709136353ac>img.jsx-8a52d709136353ac{object-fit:cover;width:100%;height:100%;position:absolute;top:0;bottom:0;left:0;right:0}");f.__hash="8a52d709136353ac";let b=e=>{let{src:o,alt:r="Tinhte.vn",height:s="100%",radius:a=0}=e;return(0,t.jsxs)("span",{className:"jsx-".concat(f.__hash)+" image-loader",children:[(0,t.jsx)("span",{style:{paddingBottom:s,borderRadius:a},className:"jsx-".concat(f.__hash)+" spacer"}),(0,t.jsx)("img",{src:o,alt:r,style:{borderRadius:a},className:"jsx-".concat(f.__hash)}),(0,t.jsx)(n.default,{id:f.__hash,children:f})]})};e.s(["f",0,b],240692);let x=new String(".main.jsx-c472807b3f0303a9{border-radius:4px}.info-wrapper.jsx-c472807b3f0303a9{overflow:hidden}.title.jsx-c472807b3f0303a9{margin-top:4px;font-size:14px;font-weight:600}");x.__hash="c472807b3f0303a9";let g=e=>{let{page:o,taFromBlock:r}=e,s=r?"".concat(o.link,"?ta_from_block=").concat(r):o.link;return(0,t.jsxs)("a",{href:(0,m.f)(s,"internal","TinhteHome_Pages"),className:"jsx-".concat(x.__hash)+" main",children:[(0,t.jsx)("div",{className:"jsx-".concat(x.__hash)+" thumb-wrapper",children:(0,t.jsx)(b,{src:o.thumb,alt:"Cộng đồng Tinhte - ".concat(o.title),height:"56.25%",radius:"4px"})}),(0,t.jsx)("div",{className:"jsx-".concat(x.__hash)+" info-wrapper",children:(0,t.jsx)("p",{title:o.title,className:"jsx-".concat(x.__hash)+" title",children:o.title})}),(0,t.jsx)(n.default,{id:x.__hash,children:x})]})},_=new String(".main.jsx-692e3358c65ccb0a{background-color:var(--page-background);border:1px solid var(--primary-border);border-radius:8px;margin-bottom:16px;padding:16px;position:relative}.main.pinned.jsx-692e3358c65ccb0a{margin-bottom:16px}.item-container.jsx-692e3358c65ccb0a{flex-wrap:wrap;margin-left:-4px;margin-right:-4px;display:flex;overflow:auto}.item.jsx-692e3358c65ccb0a{flex:0 0 50%;padding:0 4px 8px;overflow:hidden}.button.jsx-692e3358c65ccb0a{width:100%;color:var(--primary-text);background-color:var(--secondary-button);text-align:center;border-radius:4px;padding:7px 16px;font-size:12px;font-weight:700;position:relative}");_.__hash="692e3358c65ccb0a";let{ContentSolutionSlot:j,PageName:v}=d.f,y={pagesToShow:[],totalPages:0},w=[],I=e=>{let{pages:r=y,pinnedPages:s=w,taFromBlock:a}=e,{pagesToShow:i}=r,{totalPages:c}=r;return s&&s.length>0&&(i=i.filter(e=>s.some(t=>t.fpId!==e.fpId))),(0,t.jsxs)(o.Fragment,{children:[i&&i.length>0&&(0,t.jsxs)("div",{className:"jsx-".concat(_.__hash)+" main",children:[(0,t.jsx)("h3",{className:"jsx-".concat(_.__hash)+" section-heading",children:"Cộng đồng"}),(0,t.jsx)("div",{className:"jsx-".concat(_.__hash)+" item-container",children:i.slice(0,4).map(e=>(0,t.jsx)("div",{id:e.id,className:"jsx-".concat(_.__hash)+" item",children:e.isAds?(0,t.jsx)(p,{blockId:e.blockId,pageName:v.WEB_HOME,children:(0,t.jsx)(g,{page:e,taFromBlock:a})}):(0,t.jsx)(g,{page:e,taFromBlock:a})},e.id))}),(0,t.jsx)("button",{className:"jsx-".concat(_.__hash)+" button",children:(0,t.jsxs)("a",{href:"/community",className:"jsx-".concat(_.__hash),children:["Xem tất cả (",c,")"]})})]}),(0,t.jsx)(n.default,{id:_.__hash,children:_})]})};I.apiFetches={pages:(e,t)=>{let{blocks:n}=t;return{uri:"feature-pages",params:{_bdImageApiFeaturePageThumbnailSize:"144",_bdImageApiFeaturePageThumbnailMode:"sw",order:"promoted",limit:6},success:e=>{let t=(0,s.default)(e,"pages",[]),o=j.SPONSORED_COMMUNITY.key;return n&&n.forEach(e=>{e.slot_name===o&&console.log({fullName:e.title,tagText:e.promote_target_id,links:{permalink:"https://tinhte.vn/".concat(e.promote_target_id,"/"),image:e.image_url,thumbnail:e.image_url},isAds:!0,blockId:e.block_id})}),{pagesToShow:t.map(c.f),totalPages:t.length}}}}};let k=(0,i.f)(a.f.subscribe(r.f.ApiConsumer(I)),{errorMsg:"Lỗi tải danh sách cộng đồng"});e.s(["f",0,k],724383)},566709,e=>{e.s(["U",()=>L,"x",()=>F],566709);var t=e.i(391398),n=e.i(145246),o=e.i(191788),r=e.i(865780),s=e.i(94432),a=e.i(765986),i=e.i(94764);let c=new String(".fact-mobile-item-container.jsx-20b9e24a355410eb{scroll-snap-align:start;background-color:var(--thread-background);flex-direction:column;flex-shrink:0;height:80vh;display:flex;position:relative}@media (max-height:700px){.fact-mobile-item-container.jsx-20b9e24a355410eb{height:85vh}}");c.__hash="20b9e24a355410eb";var d=e.i(230184),l=e.i(612683);let h=new String('.author.jsx-c4b46f47a3a89a11{justify-content:space-between;align-items:center;padding:8px 5px;display:flex}.avatar.jsx-c4b46f47a3a89a11{border:2px solid var(--border-light);border-radius:50%;width:40px;height:40px}.info.jsx-c4b46f47a3a89a11{flex-direction:column;flex:1;align-items:flex-start;margin-left:.5rem;display:flex}.author-name.jsx-c4b46f47a3a89a11{color:var(--color-accent-dark);font-size:16px;font-weight:700;line-height:20px}.thread-info.jsx-c4b46f47a3a89a11{color:var(--text-dark);font-size:14px;line-height:20px}.since.jsx-c4b46f47a3a89a11{color:var(--primary-text);margin-right:10px}.view.jsx-c4b46f47a3a89a11{color:var(--primary-text)}.view.jsx-c4b46f47a3a89a11 .icon.jsx-c4b46f47a3a89a11{color:var(--primary-text);margin-right:5px}.view.jsx-c4b46f47a3a89a11:before{content:"●";color:#f1f1f1;margin-right:10px;display:inline-block}');h.__hash="c4b46f47a3a89a11";var u=e.i(618646);let p=()=>{let{thread:e}=F();return(0,t.jsxs)("div",{className:"jsx-".concat(h.__hash)+" author",children:[(0,t.jsx)("a",{href:e.author.link,style:{display:"flex"},className:"jsx-".concat(h.__hash),children:(0,t.jsx)("img",{src:e.author.avatar,alt:e.author.name,className:"jsx-".concat(h.__hash)+" avatar"})}),(0,t.jsxs)("div",{className:"jsx-".concat(h.__hash)+" info",children:[(0,t.jsx)("a",{href:e.author.link,className:"jsx-".concat(h.__hash)+" author-name",children:e.author.name}),(0,t.jsxs)("div",{className:"jsx-".concat(h.__hash)+" thread-info",children:[(0,t.jsx)("span",{className:"jsx-".concat(h.__hash)+" since",children:(0,t.jsx)(d.f,{value:e.since})}),(0,t.jsxs)("span",{className:"jsx-".concat(h.__hash)+" view",children:[(0,t.jsx)("i",{className:"jsx-".concat(h.__hash)+" icon fas fa-user-friends"}),(0,t.jsx)(l.f,{value:e.stats.view})," lượt xem"]})]})]}),(0,t.jsx)(u.f,{thread:e}),(0,t.jsx)(n.default,{id:h.__hash,children:h})]})};var m=e.i(693084),f=e.i(310717);let b=new String(".attachment-container.jsx-8c911dd2b20c3ac6{flex:1;position:relative}.attachment-container.jsx-8c911dd2b20c3ac6 .image-background.jsx-8c911dd2b20c3ac6{filter:blur(8px);z-index:1;background-position:50%;background-repeat:no-repeat;background-size:cover;position:absolute;top:0;bottom:0;left:0;right:0}.attachment-container.jsx-8c911dd2b20c3ac6 .image-container.jsx-8c911dd2b20c3ac6{z-index:2;justify-content:center;align-items:center;display:flex;position:absolute;top:0;bottom:0;left:0;right:0}.attachment-container.jsx-8c911dd2b20c3ac6 .image-container.jsx-8c911dd2b20c3ac6 .xfBodyContainer{color:var(--primary-text)}.attachment-container.jsx-8c911dd2b20c3ac6 .image-container.jsx-8c911dd2b20c3ac6 .video-container{width:100%}.attachment-container.jsx-8c911dd2b20c3ac6 .image-container.jsx-8c911dd2b20c3ac6 .fact-images,.attachment-container.jsx-8c911dd2b20c3ac6 .image-container.jsx-8c911dd2b20c3ac6 .fact-images .image-item{padding:6px}.attachment-container.jsx-8c911dd2b20c3ac6 .image-container.jsx-8c911dd2b20c3ac6 .fact-images .image-item .image{border-radius:12px}.attachment-container.jsx-8c911dd2b20c3ac6 .image-container.jsx-8c911dd2b20c3ac6{z-index:2;padding:6px;display:flex;position:absolute}.attachment-container.jsx-8c911dd2b20c3ac6 .image-container.jsx-8c911dd2b20c3ac6 .image.jsx-8c911dd2b20c3ac6{object-fit:contain;border-radius:12px;flex:1;min-height:0;max-height:100%;padding:6px;display:block}");b.__hash="8c911dd2b20c3ac6";var x=e.i(713955),g=e.i(158586);let _=e=>{let{showHeader:o}=e,{observerOptions:r,thread:s}=F(),a=s.firstPost?s.firstPost.attachments:[],i=!!s.firstPost&&s.firstPost.isThreadBackground,c=s.firstPost?s.firstPost.videoAttachment:null,{isEmbedVideo:d}=s,l=c?"":s.image||s.background.url||x.f.DEFAULT_IMAGE_BACKGROUND;return(0,t.jsxs)("div",{className:"jsx-".concat(b.__hash)+" attachment-container",children:[(0,t.jsx)("div",{style:{backgroundImage:"var(--background-fact-overlay), url(".concat(l,")")},className:"jsx-".concat(b.__hash)+" image-background"}),(0,t.jsx)("div",{className:"jsx-".concat(b.__hash)+" image-container",children:0===a.length?d?(0,t.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"},className:"jsx-".concat(b.__hash),children:(0,t.jsx)("div",{style:{width:"100%",color:"white"},dangerouslySetInnerHTML:{__html:s.firstPost.bodyHtml},className:"jsx-".concat(b.__hash)})}):i||!c?(0,t.jsx)(f.f,{firstPost:{...s.firstPost,threadBackgroundUrl:l}}):(0,t.jsx)(m.f,{body:s.firstPost.bodyHtml,author:s.firstPost.author.name}):(0,t.jsx)(g.f,{thread:s,post:s.firstPost,horizontal:!0,showMore:!1,rootContainer:r.root,showHeader:o})}),(0,t.jsx)(n.default,{id:b.__hash,children:b})]})};e.i(966278);var j=e.i(318398);let v=new String(".content-container.jsx-e039bdbde978cd1a,.content-container.jsx-e039bdbde978cd1a .content-wrapper.jsx-e039bdbde978cd1a{flex-direction:column;display:flex}.content-container.jsx-e039bdbde978cd1a .body-wrapper.jsx-e039bdbde978cd1a{word-break:break-word;-webkit-line-clamp:7;-webkit-box-orient:vertical;margin:8px 12px 0;display:-webkit-box;overflow:hidden}.content-container.jsx-e039bdbde978cd1a .content-with-header.jsx-e039bdbde978cd1a .attachment-1.jsx-e039bdbde978cd1a,.content-container.jsx-e039bdbde978cd1a .content-with-header.jsx-e039bdbde978cd1a .attachment-2.jsx-e039bdbde978cd1a,.content-container.jsx-e039bdbde978cd1a .content-with-header.jsx-e039bdbde978cd1a .attachment-3.jsx-e039bdbde978cd1a,.content-container.jsx-e039bdbde978cd1a .content-with-header.jsx-e039bdbde978cd1a .attachment-4.jsx-e039bdbde978cd1a,.content-container.jsx-e039bdbde978cd1a .content-with-header.jsx-e039bdbde978cd1a .attachment-5.jsx-e039bdbde978cd1a{-webkit-line-clamp:3}@media (max-height:700px){.content-container.jsx-e039bdbde978cd1a .content-with-header.jsx-e039bdbde978cd1a .attachment-1.jsx-e039bdbde978cd1a,.content-container.jsx-e039bdbde978cd1a .content-with-header.jsx-e039bdbde978cd1a .attachment-2.jsx-e039bdbde978cd1a,.content-container.jsx-e039bdbde978cd1a .content-with-header.jsx-e039bdbde978cd1a .attachment-3.jsx-e039bdbde978cd1a,.content-container.jsx-e039bdbde978cd1a .content-with-header.jsx-e039bdbde978cd1a .attachment-4.jsx-e039bdbde978cd1a,.content-container.jsx-e039bdbde978cd1a .content-with-header.jsx-e039bdbde978cd1a .attachment-5.jsx-e039bdbde978cd1a{-webkit-line-clamp:2}}.content-container.jsx-e039bdbde978cd1a .attachment-5.jsx-e039bdbde978cd1a,.content-container.jsx-e039bdbde978cd1a .attachment-2.jsx-e039bdbde978cd1a{-webkit-line-clamp:3}.content-container.jsx-e039bdbde978cd1a .post-body.jsx-e039bdbde978cd1a{color:var(--primary-text);font-size:16px}.content-container.jsx-e039bdbde978cd1a .view-more.jsx-e039bdbde978cd1a{color:var(--color-accent-dark);align-self:flex-end;margin-right:12px;font-size:16px;font-style:italic;font-weight:700}");v.__hash="e039bdbde978cd1a";var y=e.i(770267),w=e.i(535044),I=e.i(867507);let k=new String(".ReactModal__Content{scrollbar-width:none}.ReactModal__Content::-webkit-scrollbar{display:none}.modal.jsx-b90756c9109a53ca{position:relative}.author{z-index:2;background-color:var(--thread-background);padding:8px 8px 8px 12px;position:fixed;top:0;left:0;right:0}.thread-body-container.jsx-b90756c9109a53ca{flex-direction:column;height:100vh;padding-top:56px;display:flex}.thread-body-container.jsx-b90756c9109a53ca .thread-body.jsx-b90756c9109a53ca{flex-direction:column;flex:1;justify-content:flex-end;padding:12px;display:flex;position:relative}.thread-body-container.jsx-b90756c9109a53ca .thread-body.jsx-b90756c9109a53ca .background-image.jsx-b90756c9109a53ca{opacity:.15;z-index:1;background-position:50%;background-repeat:no-repeat;background-size:cover;border-radius:10px;position:absolute;top:12px;bottom:12px;left:12px;right:12px}.thread-body-container.jsx-b90756c9109a53ca .thread-body.jsx-b90756c9109a53ca .full-content.jsx-b90756c9109a53ca{color:var(--primary-text);padding:6px}.icon-close.jsx-b90756c9109a53ca{color:var(--primary-text);padding:5px 8px;font-size:18px}.comment-container.jsx-b90756c9109a53ca,.comment-box.jsx-b90756c9109a53ca{padding:0 12px}");k.__hash="b90756c9109a53ca";var T=e.i(618488),R=e.i(6788),O=e.i(298299);let N=new String(".thread-actions.jsx-86e7d6e37829e126{color:#bab9b9;flex-flow:wrap;justify-content:space-between;align-items:center;margin:8px 5px;padding:10px 5px;display:flex}.thread-actions.border.jsx-86e7d6e37829e126{border-top:1px solid var(--border-light-1);border-bottom:1px solid var(--border-light-1)}.thread-actions.jsx-86e7d6e37829e126 .thread-comment-count.jsx-86e7d6e37829e126{color:var(--color-accent-dark)}.thread-actions.jsx-86e7d6e37829e126 .reacted-text.jsx-86e7d6e37829e126{color:var(--primary-color);font-weight:700}.thread-actions.jsx-86e7d6e37829e126 .react-item.jsx-86e7d6e37829e126{color:var(--primary-text);align-items:center;gap:4px;font-size:12px;line-height:20px;display:flex}.thread-actions.jsx-86e7d6e37829e126 .react-item.jsx-86e7d6e37829e126 .reactions{width:unset;min-width:unset}.thread-actions.jsx-86e7d6e37829e126 .react-item.jsx-86e7d6e37829e126 .reactions .icon{margin-right:0}.thread-actions.jsx-86e7d6e37829e126 .react-item.jsx-86e7d6e37829e126 .reactions .reaction-text{display:none}");N.__hash="86e7d6e37829e126";let P=()=>{let{thread:e,firstPost:r,onReact:a,commentCount:i}=F();return(0,t.jsxs)(o.Fragment,{children:[(0,t.jsxs)("div",{className:"jsx-".concat(N.__hash)+" thread-actions border",children:[s.q.map(e=>{let n=r&&r.reaction&&r.reaction.userReactionId===e,o=r&&r.reaction&&r.reaction.postReactions[e]||0;return(0,t.jsxs)("div",{className:"jsx-".concat(N.__hash)+" react-item",children:[(0,t.jsx)(T.f,{commentMode:!1,post:r,onReact:a,reactionButtonId:e}),(0,t.jsx)("span",{className:"jsx-".concat(N.__hash)+" "+"".concat(n?"reacted-text":""),children:o})]},"".concat(e))}),(0,t.jsxs)("a",{href:"".concat(e.link.replace("https://tinhte.vn",""),"#comment-box"),className:"jsx-".concat(N.__hash)+" react-item",children:[(0,t.jsx)(R.f,{}),(0,t.jsx)("span",{className:"jsx-".concat(N.__hash),children:i})]}),(0,t.jsx)("a",{href:"https://www.facebook.com/sharer/sharer.php?u=".concat(e.link),rel:"noopener noreferrer",target:"_blank",className:"jsx-".concat(N.__hash)+" react-item",children:(0,t.jsx)(O.f,{})})]}),(0,t.jsx)(n.default,{id:N.__hash,children:N})]})},E={content:{width:"100%",top:"0",left:"0",height:"100%",right:"auto",bottom:"auto",borderRadius:"0px",marginRight:"0",padding:"0px",border:"none",backgroundColor:"var(--thread-background)"},overlay:{zIndex:999}},C=j.f.ApiConsumer(e=>{let{onModalClose:r,isShow:s,api:a}=e,{thread:i,posts:c,addPost:d,scrollToId:l,setScrollToId:h}=F(),u=(0,o.useCallback)(()=>(0,t.jsxs)("div",{onClick:r,className:"jsx-".concat(k.__hash),children:[(0,t.jsx)("i",{className:"jsx-".concat(k.__hash)+" icon-close fas fa-times"}),(0,t.jsx)(n.default,{id:k.__hash,children:k})]}),[]);return(0,o.useEffect)(()=>{let e=setTimeout(()=>{if(s&&l&&"u">typeof document){let e=document.getElementById(l);e&&e.scrollIntoView({block:"start",behavior:"smooth"}),h(null)}},500);return()=>{clearTimeout(e)}},[l,s]),(0,t.jsxs)("div",{className:"jsx-".concat(k.__hash)+" modal",children:[(0,t.jsxs)(y.default,{isOpen:s,onRequestClose:r,style:E,shouldCloseOnOverlayClick:!0,children:[(0,t.jsx)(p,{thread:i,renderRight:u}),(0,t.jsxs)("div",{className:"jsx-".concat(k.__hash)+" thread-body-container",children:[(0,t.jsxs)("div",{className:"jsx-".concat(k.__hash)+" thread-body",children:[(0,t.jsx)("div",{style:{backgroundImage:"url(".concat(i.firstPost.videoAttachment?"":i.image||i.background.url||x.f.DEFAULT_IMAGE_BACKGROUND,")")},className:"jsx-".concat(k.__hash)+" background-image"}),(0,t.jsx)("div",{className:"jsx-".concat(k.__hash)+" full-content",children:(0,t.jsx)(m.f,{body:i.firstPost.bodyHtml,author:i.firstPost.author.name})})]}),(0,t.jsx)(P,{})]}),(0,t.jsx)("div",{id:"comment",className:"jsx-".concat(k.__hash)+" comment-container",children:(0,t.jsx)(w.f,{enterToSubmit:!0,posts:c,tinhteFact:!0})}),(0,t.jsx)("div",{id:"commentBox01",className:"jsx-".concat(k.__hash)+" comment-box",children:(0,t.jsx)(I.f,{api:a,postToReply:i.firstPost,enterToSubmit:!0,addPost:d,position:"bottom"})})]}),(0,t.jsx)(n.default,{id:k.__hash,children:k})]})}),S=j.f.ApiConsumer(e=>{let{showHeader:r}=e,{thread:s,showFullBody:a,setShowFullBody:i}=F(),{isEmbedVideo:c}=s,d=(0,o.useRef)(null),[l,h]=(0,o.useState)(!1),u=(0,o.useMemo)(()=>s.firstPost?s.firstPost.attachments:[],[]),p=(0,o.useMemo)(()=>!!s.firstPost&&s.firstPost.isThreadBackground,[]),m=(0,o.useMemo)(()=>{if(!s.firstPost||!s.firstPost.videoAttachment)return!1;let{videoAttachment:e}=s.firstPost;return e.video_ratio<1},[]);(0,o.useEffect)(()=>{let e=d.current;e&&h(e.scrollHeight>e.clientHeight+1)},[]);let f=(0,o.useCallback)(()=>{i(e=>!e)},[]);return s.firstPost&&s.firstPost.bodyPlain?(0,t.jsxs)("div",{className:"jsx-".concat(v.__hash)+" content-container",children:[u.length>0&&!p&&!c&&(0,t.jsxs)("a",{href:s.link.replace("https://tinhte.vn",""),className:"jsx-".concat(v.__hash)+" "+"content-wrapper ".concat(r?"content-with-header":""),children:[(0,t.jsx)("div",{ref:d,className:"jsx-".concat(v.__hash)+" "+"body-wrapper attachment-".concat(m?5:u.slice(0,5).length),children:(0,t.jsx)("span",{className:"jsx-".concat(v.__hash)+" post-body",children:s.firstPost&&s.firstPost.bodyPlain})}),l&&(0,t.jsx)("span",{className:"jsx-".concat(v.__hash)+" view-more",children:"...Xem thêm"})]}),(0,t.jsx)(P,{}),a&&(0,t.jsx)(C,{isShow:a,onModalClose:f}),(0,t.jsx)(n.default,{id:v.__hash,children:v})]}):(0,t.jsxs)("div",{className:"jsx-".concat(v.__hash)+" content-container",children:[(0,t.jsx)(P,{}),(0,t.jsx)(n.default,{id:v.__hash,children:v})]})}),M=(0,o.createContext)({});function F(){return(0,o.useContext)(M)}let L=e=>{let{thread:d,observerOptions:l,onInView:h,showHeader:u,onNewThread:m}=e,[f,b]=(0,o.useState)(d.firstPost?d.firstPost.reaction.total:0),[x,g]=(0,o.useState)(d.firstPost),[j,v]=(0,o.useState)(d.stats.comment),[y,w]=(0,o.useState)(!1),[I,k]=(0,o.useState)(null),[T,R]=(0,o.useState)([]),O=(0,o.useRef)(null),[N,P]=(0,r.E)({threshold:.5,...l}),E=(0,o.useCallback)(()=>{w(!0),k("commentBox01")},[]),C=(0,o.useCallback)(()=>{w(!0),k("comment")},[]),F=(0,o.useCallback)((e,t)=>{"top"===t?R(t=>[e,...t]):"bottom"===t&&R(t=>[...t,e]),v(e=>e+1)},[]),L=(0,o.useCallback)((e,t,n)=>{let o=f;e===s.U.Up&&(o+=1,x.reaction.postReactions[t]=x.reaction.postReactions[t]+1,x.reaction.userReactionId=t),e===s.U.Down&&(o-=1,x.reaction.postReactions[n]=x.reaction.postReactions[n]-1,x.reaction.userReactionId=null),e===s.U.Neutral&&(x.reaction.postReactions[n]=x.reaction.postReactions[n]-1,x.reaction.postReactions[t]=x.reaction.postReactions[t]+1,x.reaction.userReactionId=t),g({...x}),b(o)},[f,x]);return(0,o.useEffect)(()=>(P&&(O.current&&clearTimeout(O.current),O.current=setTimeout(()=>{h(d)},200)),()=>{O.current&&clearTimeout(O.current)}),[P,d]),(0,t.jsx)(M.Provider,{value:{thread:d,observerOptions:l,posts:T,firstPost:x,totalReaction:f,commentCount:j,showFullBody:y,scrollToId:I,setPosts:R,onReact:L,addPost:F,setShowFullBody:w,onCommentClick:E,setScrollToId:k,onCommentCountClick:C},children:(0,t.jsxs)("div",{id:d.id,ref:N,className:"jsx-".concat(c.__hash)+" fact-mobile-item-container",children:[u&&(0,t.jsxs)(o.Fragment,{children:[(0,t.jsx)(a.f,{}),(0,t.jsx)("div",{style:{padding:"5px 8px"},className:"jsx-".concat(c.__hash),children:(0,t.jsx)(i.f,{createTinhteFact:!0,miniMode:!0,inlineMode:!0,newThread:m,titleTTF:!0})})]}),(0,t.jsx)(p,{}),(0,t.jsx)(_,{showHeader:u}),(0,t.jsx)(S,{showHeader:u}),(0,t.jsx)(n.default,{id:c.__hash,children:c})]})})}},604782,e=>{var t=e.i(33989);let n={fullName:"Không tìm thấy",fpId:null,tagId:null,tagText:"",forumId:null,links:{permalink:"",image:""},values:{"7_days_thread_count":0,follower_count:0,tag_use_count:0,news_count:0},is_followed:!1,permissions:{follow:!0,manage_cover:!1,update_widgets:!1,update_post_info:!1},config:{commentForumID:null,infoPostID:null,resourceID:null,homeTab:"discussion",tabLabels:{info:"Hướng dẫn",news:"Mẹo & Tin",discussion:"Thảo luận"},widgets:[],bannerLink:""},assets:{og:"https://photo2.tinhte.vn/data/attachment-files/2020/07/5075745_OG_newHome_2020_2.jpg",banner:null,bannerMb:null},isAds:!1,blockId:null};e.s(["f",0,(e,o)=>{let r=(0,t.default)(e,n),s=r.links.permalink.match(/\/([\w-]+)\/$/);return{id:s&&s.length>=2?s[1]:-1*o,isAds:r.isAds,blockId:r.blockId,title:r.fullName,image:r.links.image,thumb:r.links.thumbnail||r.links.image,isFollowed:r.is_followed,permission:{canFollow:r.permissions.follow,manageCover:r.permissions.manage_cover,updateWidgets:r.permissions.update_widgets,updatePostInfo:r.permissions.update_post_info},stats:{thread7d:r.values["7_days_thread_count"],followersCount:r.values.follower_count,tagUsedCount:r.values.tag_use_count,newsCount:r.values.news_count},fpId:r.fpId,tagId:r.tagId,tagText:r.tagText,link:r.links.permalink,tinhteDashboards:r.links.tinhte_dashboards||"",config:{commentForumID:r.config.commentForumID,infoPostID:r.config.infoPostID,resourceID:r.config.resourceID,homeTab:r.config.homeTab,tabLabels:{info:r.config.tabLabels.info,news:r.config.tabLabels.news,discussion:r.config.tabLabels.discussion},widgets:r.config.widgets,bannerLink:r.config.bannerLink},assets:{og:r.assets.og,banner:r.assets.banner,bannerMb:r.assets.bannerMb},secondaryTags:r.secondaryTags||[]}}])},750840,e=>{e.s(["f",0,(e,t,n,o,r)=>{if(!e)return null;let s=e;return s=e.includes("?")?"".concat(e,"&utm_source=").concat(t,"&utm_medium=").concat(n):"".concat(e,"?utm_source=").concat(t,"&utm_medium=").concat(n),o&&(s="".concat(s,"&utm_content=").concat(o)),r&&(s="".concat(s,"&utm_campaign=").concat(r)),s=e}])}],986911,(e,t,n)=>{!function(e,t){"use strict";if("IntersectionObserver"in e&&"IntersectionObserverEntry"in e&&"intersectionRatio"in e.IntersectionObserverEntry.prototype){"isIntersecting"in e.IntersectionObserverEntry.prototype||Object.defineProperty(e.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});return}var n=[];function o(e){this.time=e.time,this.target=e.target,this.rootBounds=e.rootBounds,this.boundingClientRect=e.boundingClientRect,this.intersectionRect=e.intersectionRect||c(),this.isIntersecting=!!e.intersectionRect;var t=this.boundingClientRect,n=t.width*t.height,o=this.intersectionRect,r=o.width*o.height;n?this.intersectionRatio=Number((r/n).toFixed(4)):this.intersectionRatio=+!!this.isIntersecting}function r(e,t){var n,o,r,s=t||{};if("function"!=typeof e)throw Error("callback must be a function");if(s.root&&1!=s.root.nodeType)throw Error("root must be an Element");this._checkForIntersections=(n=this._checkForIntersections.bind(this),o=this.THROTTLE_TIMEOUT,r=null,function(){r||(r=setTimeout(function(){n(),r=null},o))}),this._callback=e,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(s.rootMargin),this.thresholds=this._initThresholds(s.threshold),this.root=s.root||null,this.rootMargin=this._rootMarginValues.map(function(e){return e.value+e.unit}).join(" ")}function s(e,t,n,o){"function"==typeof e.addEventListener?e.addEventListener(t,n,o||!1):"function"==typeof e.attachEvent&&e.attachEvent("on"+t,n)}function a(e,t,n,o){"function"==typeof e.removeEventListener?e.removeEventListener(t,n,o||!1):"function"==typeof e.detatchEvent&&e.detatchEvent("on"+t,n)}function i(e){var t;try{t=e.getBoundingClientRect()}catch(e){}return t?(t.width&&t.height||(t={top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.right-t.left,height:t.bottom-t.top}),t):c()}function c(){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}function d(e,t){for(var n=t;n;){if(n==e)return!0;n=l(n)}return!1}function l(e){var t=e.parentNode;return t&&11==t.nodeType&&t.host?t.host:t}r.prototype.THROTTLE_TIMEOUT=100,r.prototype.POLL_INTERVAL=null,r.prototype.USE_MUTATION_OBSERVER=!0,r.prototype.observe=function(e){if(!this._observationTargets.some(function(t){return t.element==e})){if(!(e&&1==e.nodeType))throw Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:e,entry:null}),this._monitorIntersections(),this._checkForIntersections()}},r.prototype.unobserve=function(e){this._observationTargets=this._observationTargets.filter(function(t){return t.element!=e}),this._observationTargets.length||(this._unmonitorIntersections(),this._unregisterInstance())},r.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorIntersections(),this._unregisterInstance()},r.prototype.takeRecords=function(){var e=this._queuedEntries.slice();return this._queuedEntries=[],e},r.prototype._initThresholds=function(e){var t=e||[0];return Array.isArray(t)||(t=[t]),t.sort().filter(function(e,t,n){if("number"!=typeof e||isNaN(e)||e<0||e>1)throw Error("threshold must be a number between 0 and 1 inclusively");return e!==n[t-1]})},r.prototype._parseRootMargin=function(e){var t=(e||"0px").split(/\s+/).map(function(e){var t=/^(-?\d*\.?\d+)(px|%)$/.exec(e);if(!t)throw Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(t[1]),unit:t[2]}});return t[1]=t[1]||t[0],t[2]=t[2]||t[0],t[3]=t[3]||t[1],t},r.prototype._monitorIntersections=function(){!this._monitoringIntersections&&(this._monitoringIntersections=!0,this.POLL_INTERVAL?this._monitoringInterval=setInterval(this._checkForIntersections,this.POLL_INTERVAL):(s(e,"resize",this._checkForIntersections,!0),s(t,"scroll",this._checkForIntersections,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in e&&(this._domObserver=new MutationObserver(this._checkForIntersections),this._domObserver.observe(t,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))))},r.prototype._unmonitorIntersections=function(){this._monitoringIntersections&&(this._monitoringIntersections=!1,clearInterval(this._monitoringInterval),this._monitoringInterval=null,a(e,"resize",this._checkForIntersections,!0),a(t,"scroll",this._checkForIntersections,!0),this._domObserver&&(this._domObserver.disconnect(),this._domObserver=null))},r.prototype._checkForIntersections=function(){var t=this._rootIsInDom(),n=t?this._getRootRect():c();this._observationTargets.forEach(function(r){var s=r.element,a=i(s),c=this._rootContainsTarget(s),d=r.entry,l=t&&c&&this._computeTargetAndRootIntersection(s,n),h=r.entry=new o({time:e.performance&&performance.now&&performance.now(),target:s,boundingClientRect:a,rootBounds:n,intersectionRect:l});d?t&&c?this._hasCrossedThreshold(d,h)&&this._queuedEntries.push(h):d&&d.isIntersecting&&this._queuedEntries.push(h):this._queuedEntries.push(h)},this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)},r.prototype._computeTargetAndRootIntersection=function(n,o){if("none"!=e.getComputedStyle(n).display){for(var r=i(n),s=l(n),a=!1;!a;){var c=null,d=1==s.nodeType?e.getComputedStyle(s):{};if("none"==d.display)return;if(s==this.root||s==t?(a=!0,c=o):s!=t.body&&s!=t.documentElement&&"visible"!=d.overflow&&(c=i(s)),c&&!(r=function(e,t){var n=Math.max(e.top,t.top),o=Math.min(e.bottom,t.bottom),r=Math.max(e.left,t.left),s=Math.min(e.right,t.right),a=s-r,i=o-n;return a>=0&&i>=0&&{top:n,bottom:o,left:r,right:s,width:a,height:i}}(c,r)))break;s=l(s)}return r}},r.prototype._getRootRect=function(){var e;if(this.root)e=i(this.root);else{var n=t.documentElement,o=t.body;e={top:0,left:0,right:n.clientWidth||o.clientWidth,width:n.clientWidth||o.clientWidth,bottom:n.clientHeight||o.clientHeight,height:n.clientHeight||o.clientHeight}}return this._expandRectByRootMargin(e)},r.prototype._expandRectByRootMargin=function(e){var t=this._rootMarginValues.map(function(t,n){return"px"==t.unit?t.value:t.value*(n%2?e.width:e.height)/100}),n={top:e.top-t[0],right:e.right+t[1],bottom:e.bottom+t[2],left:e.left-t[3]};return n.width=n.right-n.left,n.height=n.bottom-n.top,n},r.prototype._hasCrossedThreshold=function(e,t){var n=e&&e.isIntersecting?e.intersectionRatio||0:-1,o=t.isIntersecting?t.intersectionRatio||0:-1;if(n!==o)for(var r=0;rn.indexOf(this)&&n.push(this)},r.prototype._unregisterInstance=function(){var e=n.indexOf(this);-1!=e&&n.splice(e,1)},e.IntersectionObserver=r,e.IntersectionObserverEntry=o}(window,document)}]);