(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,257378,193618,e=>{"use strict";var t=e.i(391398),a=e.i(145246),s=e.i(191788);e.i(966278);var i=e.i(318398),o=e.i(913083),n=e.i(363872),r=e.i(567166),d=e.i(739659),c=e.i(230184),l=e.i(612683),h=e.i(618488),x=e.i(723661),p=e.i(94432),f=e.i(693084);let m=new String('.fact-background.jsx-7697a5abe64d3650{filter:blur(30px);z-index:1;background-position:50%;background-repeat:no-repeat;background-size:cover;width:calc(100% + 100px);height:calc(100% + 100px);position:absolute;top:-50px;left:-50px}.right-area.jsx-7697a5abe64d3650{z-index:9;flex-direction:row;align-items:center;gap:10px;display:flex;position:absolute;top:20px;left:20px}.fact-close.jsx-7697a5abe64d3650{color:#fff;background-color:#0003;border-radius:50px;justify-content:center;align-items:center;width:50px;height:50px;font-size:14px;display:flex}.fact-close.jsx-7697a5abe64d3650:hover{background-color:var(--hover-background);color:var(--text-dark)}.author.jsx-7697a5abe64d3650{align-items:center;display:none}.avatar.jsx-7697a5abe64d3650{border:2px solid var(--border-light);border-radius:50%;width:40px;height:40px}.info.jsx-7697a5abe64d3650{flex-direction:column;align-items:flex-start;display:flex}.author-name.jsx-7697a5abe64d3650{color:var(--color-accent-light);font-size:16px;font-weight:700}.thread-info.jsx-7697a5abe64d3650{color:var(--text-since);font-size:12px}.since.jsx-7697a5abe64d3650{color:var(--color-always-white);margin-right:10px}.view.jsx-7697a5abe64d3650{color:var(--color-always-white)}.view.jsx-7697a5abe64d3650 .icon.jsx-7697a5abe64d3650{color:var(--color-always-white);margin-right:5px}.view.jsx-7697a5abe64d3650:before{content:"●";color:#f1f1f1;margin-right:10px;display:inline-block}.left-area.jsx-7697a5abe64d3650{z-index:9;align-items:center;display:none;position:absolute;top:2rem;right:2rem}.menu.jsx-7697a5abe64d3650{color:var(--color-always-white)}.fact-close-lite.jsx-7697a5abe64d3650{color:#fff;justify-content:center;align-items:center;margin-left:1rem;font-size:18px;display:flex}.report-button.jsx-7697a5abe64d3650{color:var(--text-always-white);margin-top:6px;margin-right:10px;font-size:16px}.report-button.jsx-7697a5abe64d3650:hover{color:var(--color-accent-dark)}.fact-wrapper.jsx-7697a5abe64d3650{align-items:center;width:100%;height:100%;display:flex;position:relative}.next-fact-wrap.jsx-7697a5abe64d3650,.previous-fact-wrap.jsx-7697a5abe64d3650{z-index:3;align-items:center;padding-left:20px;display:flex;position:absolute;inset:0 50% 0 0}.next-fact-wrap.jsx-7697a5abe64d3650:hover,.previous-fact-wrap.jsx-7697a5abe64d3650:hover{cursor:pointer}.next-fact-wrap.jsx-7697a5abe64d3650:hover .next-fact.jsx-7697a5abe64d3650,.next-fact-wrap.jsx-7697a5abe64d3650:hover .previous-fact.jsx-7697a5abe64d3650,.previous-fact-wrap.jsx-7697a5abe64d3650:hover .next-fact.jsx-7697a5abe64d3650,.previous-fact-wrap.jsx-7697a5abe64d3650:hover .previous-fact.jsx-7697a5abe64d3650{background-color:#eeeff2}.next-fact.jsx-7697a5abe64d3650,.previous-fact.jsx-7697a5abe64d3650{color:#000;background-color:#d8d8d8;border-radius:50%;flex:0 0 50px;justify-content:center;align-items:center;width:50px;height:50px;display:flex}.previous-fact-wrap.jsx-7697a5abe64d3650{justify-content:flex-end;padding-right:20px;left:50%;right:0}.previous-fact-wrap.jsx-7697a5abe64d3650:hover .previous-fact.jsx-7697a5abe64d3650{background-color:#eeeff2}.many-attachments.jsx-7697a5abe64d3650{bottom:106px}.fact-video.jsx-7697a5abe64d3650{width:50px;height:50px;bottom:unset;top:unset;padding:0}.next-fact-wrap.fact-video.jsx-7697a5abe64d3650,.fact-video.previous-fact-wrap.jsx-7697a5abe64d3650{left:20px;right:auto}.previous-fact-wrap.fact-video.jsx-7697a5abe64d3650{left:auto;right:20px}.btn-fullscreen.jsx-7697a5abe64d3650{z-index:10;border-radius:50%;width:44px;height:44px;padding:12px;position:absolute;top:8px;right:8px}.btn-fullscreen.jsx-7697a5abe64d3650:hover{cursor:pointer;background-color:#fff3}.fact-images.jsx-7697a5abe64d3650{z-index:2;flex-direction:column;justify-content:center;align-items:center;width:100%;height:100%;display:flex;position:relative}.fact-images.jsx-7697a5abe64d3650>div{flex-direction:column;justify-content:center;width:100%;height:100%;display:flex}.swipe-area.jsx-7697a5abe64d3650{width:100%;height:100%;min-height:0;max-height:100vh}.swipe-area.jsx-7697a5abe64d3650 .LinkExpander.expanded{display:block!important}.swipe-area.jsx-7697a5abe64d3650 .video-js.vjs-fluid{position:absolute;top:50%;transform:translateY(-50%)}.mobile-content.jsx-7697a5abe64d3650{word-break:break-word;-webkit-line-clamp:2;-webkit-box-orient:vertical;padding:15px 10px 0;display:-webkit-box;overflow:hidden}.mobile-content.showAds.jsx-7697a5abe64d3650{height:100%}.mobile-content-post-body.jsx-7697a5abe64d3650{color:var(--color-always-white);font-size:16px}.see-more.jsx-7697a5abe64d3650{color:#ffffff80;padding-left:10px;font-size:.8em}.reaction-counter.jsx-7697a5abe64d3650{padding:0 20px 10px;position:relative}.comment-like-share.jsx-7697a5abe64d3650{z-index:9;width:100%;position:absolute;bottom:1rem}.comment-like-share.jsx-7697a5abe64d3650 .actions.jsx-7697a5abe64d3650{align-items:center;display:flex}.app-download.jsx-7697a5abe64d3650{justify-content:center;align-items:center;margin-bottom:12px;padding:6px;display:flex}.app-download.jsx-7697a5abe64d3650 .app-logo.jsx-7697a5abe64d3650{width:30px;height:30px;margin-right:6px}.app-download.jsx-7697a5abe64d3650 .app-text.jsx-7697a5abe64d3650{color:var(--color-accent-light);font-size:600px}.like-thread.jsx-7697a5abe64d3650,.thread-share.jsx-7697a5abe64d3650,.thread-comment.jsx-7697a5abe64d3650{z-index:2;background-color:var(--hover-background);width:100px;height:40px;color:var(--text-dark);border-radius:20px;flex:0 0 100px;justify-content:center;align-items:center;margin-left:10px;font-size:14px;display:flex}.thread-comment.jsx-7697a5abe64d3650{flex:none;justify-content:center;width:calc(100% - 240px);margin-left:10px;padding:0 10px}.thread-share.jsx-7697a5abe64d3650{margin-right:10px}@media (width<=600px){.fact-images.jsx-7697a5abe64d3650{padding:0 1rem}.next-fact.jsx-7697a5abe64d3650,.previous-fact.jsx-7697a5abe64d3650{flex:0 0 30px;width:30px;height:30px}.fact-wrapper.jsx-7697a5abe64d3650{padding:70px 20px 100px}.logo.jsx-7697a5abe64d3650,.fact-close.jsx-7697a5abe64d3650{display:none}.swipe-area.jsx-7697a5abe64d3650{flex-direction:column;align-items:center;display:flex}}@media (width>=601px){.mobile.jsx-7697a5abe64d3650,.author.jsx-7697a5abe64d3650,.left-area.jsx-7697a5abe64d3650{display:none}}.fact-promo.jsx-7697a5abe64d3650{cursor:pointer;border-radius:20px;min-width:400px;max-width:100%;min-height:500px;max-height:70vh;position:relative}.tinhtefact-promo-content.jsx-7697a5abe64d3650{padding:20px}@media (width<=600px){.tinhtefact-promo-content.jsx-7697a5abe64d3650{padding:0}}.tinhtefact-promo-title.jsx-7697a5abe64d3650{margin-bottom:16px;font-size:18px;font-weight:700}.tinhtefact-promo-description.jsx-7697a5abe64d3650{margin-bottom:24px;font-size:16px}.tinhtefact-promo-cta-container.jsx-7697a5abe64d3650{justify-content:center;align-items:center;display:flex}.cta.jsx-7697a5abe64d3650{background-color:var(--color-accent-dark);max-width:540px;color:var(--text-light);border-radius:5px;padding:10px 15px;font-size:16px;font-weight:700}.loading.jsx-7697a5abe64d3650{margin-top:-10px;margin-left:-10px;position:absolute;top:50%;left:50%}.landscape-warning.jsx-7697a5abe64d3650{display:none}@media only screen and (device-width>=320px) and (device-width<=896px) and (orientation:landscape){.landscape-warning.jsx-7697a5abe64d3650{text-align:center;z-index:100;background:#000;justify-content:center;align-items:center;height:100%;padding:30px;font-size:22px;display:block;position:fixed;inset:0}}.tinhte-logo-link.jsx-7697a5abe64d3650{flex-direction:row;align-items:center;display:flex}@media (width<=600px){.tinhte-logo-link.jsx-7697a5abe64d3650{display:none}}.tinhte-logo.jsx-7697a5abe64d3650{width:50px;height:50px}');m.__hash="7697a5abe64d3650";let j=new String(".view-mobile-popup-area.jsx-36adcfe12d228fb7{width:100%;height:100%;position:absolute;top:0}.view-mobile-popup-mask.jsx-36adcfe12d228fb7{z-index:10;background-color:#00000080;width:100%;height:100%;position:absolute;top:0}.view-mobile-popup.jsx-36adcfe12d228fb7{z-index:11;background-color:var(--thread-background);border-top-left-radius:3px;border-top-right-radius:3px;flex-direction:column;justify-content:flex-end;width:100%;max-height:70%;display:flex;position:absolute;bottom:0;left:0;overflow:hidden}.view-mobile-content.jsx-36adcfe12d228fb7{padding:1rem;overflow:auto}.full-content.jsx-36adcfe12d228fb7{font-size:16px}@media (width>=1025px){.view-mobile-popup-area.jsx-36adcfe12d228fb7{display:none}}");j.__hash="36adcfe12d228fb7";let b=i.f.ApiConsumer(({thread:e,viewFullContent:i})=>{let[o,n]=(0,s.useState)(e);return(0,s.useEffect)(()=>{n({...e})},[e]),(0,t.jsxs)(s.Fragment,{children:[(0,t.jsx)(s.Fragment,{children:(0,t.jsxs)("div",{className:`jsx-${j.__hash} view-mobile-popup-area`,children:[(0,t.jsx)("button",{onClick:()=>i(),className:`jsx-${j.__hash} view-mobile-popup-mask`}),(0,t.jsx)("div",{className:`jsx-${j.__hash} view-mobile-popup`,children:(0,t.jsx)("div",{className:`jsx-${j.__hash} view-mobile-content`,children:(0,t.jsx)("div",{className:`jsx-${j.__hash} full-content`,children:(0,t.jsx)(f.f,{body:o.firstPost.bodyHtml,author:o.firstPost.author.name})})})})]})}),(0,t.jsx)(a.default,{id:j.__hash,children:j})]})});var g=e.i(661655),u=e.i(535044),_=e.i(867507),v=e.i(438311),w=e.i(437994);let k=new String(".view-mobile-popup-area.jsx-ffe0f44a0164d650{width:100%;height:100%;position:absolute;top:0}.view-mobile-popup-mask.jsx-ffe0f44a0164d650{z-index:10;background-color:#00000080;width:100%;height:100%;position:absolute;top:0}.view-mobile-popup.jsx-ffe0f44a0164d650{z-index:11;background-color:var(--thread-background);border-top-left-radius:10px;border-top-right-radius:10px;flex-direction:column;justify-content:flex-end;width:100%;max-height:70%;display:flex;position:absolute;bottom:0;left:0;overflow:hidden}.view-mobile-popup.jsx-ffe0f44a0164d650 .comment-area.jsx-ffe0f44a0164d650{padding-top:20px;padding-bottom:0;overflow:hidden auto}.empty-comment.jsx-ffe0f44a0164d650{flex-direction:column;align-items:center;padding:4rem 2rem;display:flex}.empty-comment.jsx-ffe0f44a0164d650 .icon.jsx-ffe0f44a0164d650{color:var(--thread-fact-background);margin-bottom:1rem;font-size:9rem}.empty-comment.jsx-ffe0f44a0164d650 .text.jsx-ffe0f44a0164d650{color:var(--text-light-2)}.bottom-comment-box.jsx-ffe0f44a0164d650{width:100%;padding:0 20px 20px;position:relative;bottom:0}.posts.jsx-ffe0f44a0164d650{padding:0 20px}.pagination.jsx-ffe0f44a0164d650{justify-content:flex-end;width:100%;margin-bottom:-10px;padding:10px 20px 0;display:flex}@media (width<=1024px){.bottom-comment-box.jsx-ffe0f44a0164d650{border-top:1px solid var(--border-light);width:100%;max-width:none;padding-bottom:0;position:relative}}@media (width>=1025px){.view-mobile-popup-area.jsx-ffe0f44a0164d650{display:none}}");k.__hash="ffe0f44a0164d650";let N=i.f.ApiConsumer(({api:e,thread:i,viewComment:o,goToPage:n})=>{let[r,d]=(0,s.useState)(i),[c]=(0,s.useState)(!1),l=()=>{},h=()=>{};return(0,s.useEffect)(()=>{d({...i})},[i]),(0,t.jsxs)(s.Fragment,{children:[(0,t.jsx)(s.Fragment,{children:(0,t.jsxs)("div",{className:`jsx-${k.__hash} view-mobile-popup-area`,children:[(0,t.jsx)("button",{onClick:()=>o(),className:`jsx-${k.__hash} view-mobile-popup-mask`}),(0,t.jsxs)("div",{className:`jsx-${k.__hash} view-mobile-popup`,children:[r.stats.comment>0?(0,t.jsx)("div",{className:`jsx-${k.__hash} comment-area`,children:(0,t.jsxs)("div",{className:`jsx-${k.__hash} posts`,children:[(0,t.jsx)(u.f,{posts:r.posts,isCommenting:l,isNotCommenting:h,mobileFactComment:!0}),c&&(0,t.jsx)("div",{className:`jsx-${k.__hash} view-thread-detail-container`,children:(0,t.jsx)("button",{onClick:()=>(()=>{let{posts:t,postLink:a}=r;e.get({uri:a,headers:{"Api-Post-Tree":1}}).then(e=>{let{links:a=null}=e,{next:s=""}=a||"";t&&((e,t)=>{let{posts:a}=r,s=(0,w.default)([...a,...e],"id");d({currentThread:{...r,postLink:t,posts:s}})})((0,g.e)(r,t.map(e=>(0,g.U)(e,r))),s)})})(),className:`jsx-${k.__hash} view-thread-detail`,children:"Xem thêm bình luận..."})})]})}):(0,t.jsxs)("div",{className:`jsx-${k.__hash} empty-comment`,children:[(0,t.jsx)("i",{className:`jsx-${k.__hash} icon fas fa-comment-alt`}),(0,t.jsx)("p",{className:`jsx-${k.__hash} text`,children:"Chưa có bình luận nào"})]}),(0,t.jsxs)("div",{className:`jsx-${k.__hash} bottom-comment-box`,children:[r.pagination&&r.pagination.pages&&(0,t.jsx)("div",{className:`jsx-${k.__hash} pagination`,children:(0,t.jsx)(v.f,{currentPage:r.pagination.page,totalPage:r.pagination.pages,onSelected:n})}),(0,t.jsx)(_.f,{api:e,postToReply:r.firstPost,addPost:(e,t)=>{"top"===t?r.posts.unshift(e):"bottom"===t&&r.posts.push(e),r.stats.comment+=1,d({...r})},isCommenting:l,isNotCommenting:h,position:"top",id:"commentBox01"})]})]})]})}),(0,t.jsx)(a.default,{id:k.__hash,children:k})]})});var y=e.i(587388),$=e.i(113503);let P=new String(".fact-video.jsx-72d66dec9483f0e8{cursor:pointer;min-width:100vw;height:100%}.fact-video.jsx-72d66dec9483f0e8 .video-is-processing.jsx-72d66dec9483f0e8{text-align:center;min-height:100%;color:var(--inverse-text);flex-direction:column;justify-content:center;align-items:center;font-size:16px;font-weight:700;display:flex}.fact-video.jsx-72d66dec9483f0e8 .video-is-processing.jsx-72d66dec9483f0e8 .btn-retry.jsx-72d66dec9483f0e8{color:#fff;background-color:#3280f6;border-radius:16px;justify-content:center;align-items:center;width:100px;height:32px;margin-top:16px;font-size:14px;font-weight:600;line-height:20px;display:flex}.fact-video.jsx-72d66dec9483f0e8:focus{outline:none}@media (width>=768px){.fact-video.jsx-72d66dec9483f0e8{min-width:600px}}@media (width>=1600px){.fact-video.jsx-72d66dec9483f0e8{min-width:700px}}.fact-video.jsx-72d66dec9483f0e8>div,.fact-video.jsx-72d66dec9483f0e8 .video-js.vjs-fluid{height:100%}.fact-image-wrapper.jsx-72d66dec9483f0e8{height:100vh;overflow:hidden auto}.fact-image-wrapper.jsx-72d66dec9483f0e8 .fact-image-item.jsx-72d66dec9483f0e8{justify-content:center;align-items:center;display:flex;position:relative}.fact-image-wrapper.jsx-72d66dec9483f0e8 .fact-image-item.jsx-72d66dec9483f0e8:not(:last-child){margin-bottom:1px}.fact-image-wrapper.jsx-72d66dec9483f0e8 .fact-image-item.jsx-72d66dec9483f0e8 .image.jsx-72d66dec9483f0e8{object-fit:contain;max-width:100%;max-height:90vh;display:unset}.fact-image-wrapper.jsx-72d66dec9483f0e8 .only-one-image.jsx-72d66dec9483f0e8{height:100%}.fact-image-wrapper.jsx-72d66dec9483f0e8 .only-one-image.jsx-72d66dec9483f0e8 .image.jsx-72d66dec9483f0e8{object-fit:contain;width:auto;max-width:100%;height:auto;max-height:100vh}.fact-single-image.jsx-72d66dec9483f0e8{overflow-y:hidden}.fact-image.jsx-72d66dec9483f0e8{flex-direction:column;justify-content:center;align-items:center;height:100%;display:flex;position:relative}.attachments.jsx-72d66dec9483f0e8{z-index:3;opacity:.6;background:#000;border-radius:5px;flex:none;justify-content:center;align-items:center;width:100%;margin-top:5px;padding:0 5px;display:flex;position:absolute;bottom:0;overflow-x:auto}.attachments.jsx-72d66dec9483f0e8::-webkit-scrollbar{display:none}.attachments.long.jsx-72d66dec9483f0e8{justify-content:left}.attachment.jsx-72d66dec9483f0e8{cursor:pointer;background-position:50%;background-repeat:no-repeat;background-size:cover;border-radius:4px;flex:none;width:96px;height:96px;margin:5px;position:relative}.attachment.jsx-72d66dec9483f0e8 .attachment-remaining.jsx-72d66dec9483f0e8{color:#fff;background-color:#0009;justify-content:center;align-items:center;font-size:24px;display:flex;position:absolute;inset:0}.attachment.active.jsx-72d66dec9483f0e8{border:2px solid var(--active-indicator)}.image.jsx-72d66dec9483f0e8{object-fit:contain;flex:1;min-height:0;max-height:100%;display:block}.background-fact-text.jsx-72d66dec9483f0e8{color:var(--inverse-text);-webkit-line-clamp:5;-webkit-box-orient:vertical;width:100%;max-width:500px;padding:0 20px;font-size:1.2rem;font-weight:700;line-height:1.4;display:-webkit-box;position:absolute;top:50%;overflow:hidden;transform:translateY(-50%)}@media (width>=768px){.background-fact-text.jsx-72d66dec9483f0e8{-webkit-line-clamp:8;font-size:1.3rem}}@media (width>=992px){.background-fact-text.jsx-72d66dec9483f0e8{-webkit-line-clamp:10}}@media (width>=1200px){.background-fact-text.jsx-72d66dec9483f0e8{-webkit-line-clamp:10}}@media (width<=992px) and (orientation:landscape){.background-fact-text.jsx-72d66dec9483f0e8{display:none}}");P.__hash="72d66dec9483f0e8";var S=e.i(713955);let C=({thread:e,updateFactImage:i,index:o,showLightBox:n,updateShowLightBox:r})=>{let[d,c]=(0,s.useState)(e),[l,h]=(0,s.useState)(e&&e.image?e.image:""),[x,p]=(0,s.useState)(0),[f,m]=(0,s.useState)(!1),[j,b]=(0,s.useState)(!1),g=e=>{if(d.firstPost.attachments[e]){let t=d.firstPost.attachments[e].links.permalink;h(t),i(t),m(d.firstPost.attachments[e].attachment_is_video),b(d.firstPost.attachments[e].attachment_video_is_processing),window&&window.sessionStorage.setItem("currentImageIndex",e)}};return(0,s.useEffect)(()=>{c({...e})},[e]),(0,s.useEffect)(()=>{g(0),window.sessionStorage.setItem("currentImageIndex",0)},[e.link]),(0,s.useEffect)(()=>{d.firstPost.attachments.length&&g(o)},[o]),(0,t.jsxs)(s.Fragment,{children:[(0,t.jsx)(s.Fragment,{children:d&&d.firstPost&&(d.firstPost.videoAttachment&&d.firstPost.videoAttachment.links||f)?(0,t.jsx)("div",{className:"fact-video",children:j?(0,t.jsxs)("div",{className:"video-is-processing",children:[(0,t.jsx)("span",{children:"Video đang được xử lý. Bạn chờ chút nhé!!"}),(0,t.jsx)("button",{onClick:()=>{window.location.reload()},className:"btn-retry",children:"Tải lại"})]}):f?(0,t.jsx)(y.f,{autoplay:!0,muted:!0,preload:"auto",controls:!0,loop:!0,sources:[{src:d.firstPost.attachments[o].links.video_url}],poster:d.firstPost.attachments[o].links.thumbnail,videoRatio:d.firstPost.attachments[o].video_ratio,attachment:d.firstPost.attachments[o],thread:d,post:d.firstPost}):(0,t.jsx)(y.f,{autoplay:!0,muted:!0,preload:"auto",controls:!0,loop:!0,sources:[{src:d.firstPost.videoAttachment.links.video_url||d.firstPost.videoAttachment.links.permalink}],poster:d.firstPost.videoAttachment.links.thumbnail,videoRatio:d.firstPost.videoAttachment.video_ratio,attachment:d.firstPost.videoAttachment,thread:d,post:d.firstPost})}):(()=>{if(d.background.id||!l)return(0,t.jsxs)("div",{className:`jsx-${P.__hash} fact-image`,children:[(0,t.jsx)("span",{className:`jsx-${P.__hash} background-fact-text`,children:e.firstPost.bodyPlain}),(0,t.jsx)("img",{src:l||d.background.url||S.f.DEFAULT_IMAGE_BACKGROUND,alt:d.title,className:`jsx-${P.__hash} image`}),(0,t.jsx)(a.default,{id:P.__hash,children:P})]});{let e,s,i,o,c,l=1===d.firstPost.attachments.length;return(0,t.jsxs)("div",{className:`jsx-${P.__hash} fact-image-wrapper ${1===d.firstPost.attachments.length&&"fact-single-image"}`,children:[d.firstPost.attachments.map(e=>(0,t.jsx)("div",{className:`jsx-${P.__hash} fact-image-item ${l?"only-one-image":""}`,children:(0,t.jsx)("img",{src:e.links.permalink,alt:d.title,loading:"lazy",className:`jsx-${P.__hash} image`})},e.attachment_id)),n&&d&&d.firstPost&&d.firstPost.attachments&&(0,t.jsx)($.f,{mainSrc:(e=d.firstPost.attachments[x])&&e.links&&e.links.permalink?e.links.permalink:"",nextSrc:(i=(s=d.firstPost.attachments)[(x+1)%s.length])&&i.links&&i.links.permalink?i.links.permalink:"",prevSrc:(c=(o=d.firstPost.attachments)[(x+o.length-1)%o.length])&&c.links&&c.links.permalink?c.links.permalink:"",onCloseRequest:r,onMovePrevRequest:()=>p((x+d.firstPost.attachments.length-1)%d.firstPost.attachments.length),onMoveNextRequest:()=>p((x+1)%d.firstPost.attachments.length)}),(0,t.jsx)(a.default,{id:P.__hash,children:P})]})}})()}),(0,t.jsx)(a.default,{id:P.__hash,children:P})]})};var z=e.i(618646),R=e.i(752445);let A=()=>(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",enableBackground:"new 0 0 28 28",viewBox:"0 0 28 28",children:(0,t.jsx)("switch",{children:(0,t.jsx)("g",{children:(0,t.jsx)("path",{fill:"#ffffff",d:"M4,25c-0.9,0-1.3-1.1-0.7-1.7L9.6,17H6c-0.6,0-1-0.4-1-1c0-0.6,0.4-1,1-1h6c0.6,0,1,0.4,1,1v6c0,0.6-0.4,1-1,1c-0.6,0-1-0.4-1-1v-3.6l-6.3,6.3C4.5,24.9,4.3,25,4,25z M22,13h-6c-0.6,0-1-0.4-1-1V6c0-0.6,0.4-1,1-1s1,0.4,1,1v3.6l6.3-6.3c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4L18.4,11H22c0.6,0,1,0.4,1,1S22.6,13,22,13z"})})})}),F=()=>(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,t.jsx)("path",{fill:"none",d:"M0 0h24v24H0Z","data-name":"Path 3668"}),(0,t.jsx)("path",{fill:"#ffffff",d:"M3.3 21.6a.9.9 0 0 1-.9-.9v-5.4a.9.9 0 0 1 .9-.9.9.9 0 0 1 .9.9v3.227l5.2-5.2a.9.9 0 0 1 1.273 0 .9.9 0 0 1 0 1.273l-5.2 5.2H8.7a.9.9 0 0 1 .9.9.9.9 0 0 1-.9.9Zm9.936-10.927a.9.9 0 0 1 0-1.273l5.2-5.2h-3.227a.9.9 0 0 1-.9-.9.9.9 0 0 1 .9-.9h5.4a.9.9 0 0 1 .9.9v5.4a.9.9 0 0 1-.9.9.9.9 0 0 1-.9-.9V5.473l-5.2 5.2a.9.9 0 0 1-.636.264.9.9 0 0 1-.637-.264Z","data-name":"Path 3561"})]}),{SlotName:E,PageName:I}=r.f,T=i.f.ApiConsumer(({thread:i,showAds:o,tinhteFactAdsBlock:n,previousItem:r,nextItem:f,handleCloseModal:j,changeTheme:g,showComment:u,goToPage:_,commenting:v})=>{let[w,k]=(0,s.useState)(!1),[y,$]=(0,s.useState)(i),[P,T]=(0,s.useState)(!1),[B,M]=(0,s.useState)(i&&i.image?i.image:i.background.url),[U,L]=(0,s.useState)(i&&i.firstPost&&i.firstPost.reaction&&i.firstPost.reaction.total),[q,D]=(0,s.useState)(!1),[H,V]=(0,s.useState)(u),[G,X]=(0,s.useState)(0),K="function"==typeof r||G>0,O="function"==typeof j;(0,s.useRef)(null);let Q=s.default.useCallback(()=>T(e=>!e),[]),Y=s.default.useMemo(()=>!!y.firstPost.attachments[G]&&(y.firstPost.attachments[G].attachment_is_video||y.firstPost.attachments[G].attachment_video_is_processing),[G,y]),Z=s.default.useMemo(()=>y.firstPost&&y.firstPost.attachments&&y.firstPost.attachments.length>1,[y]),W=()=>{f&&"function"==typeof f&&(k(!0),f(),X(0))},J=()=>{r&&"function"==typeof r&&(k(!0),r(),X(0))},ee=()=>{"function"==typeof j&&j()},et=()=>{V(!H)},ea=()=>{D(!q)},es=e=>{if(!v)switch(e.keyCode){case 27:e.preventDefault(),e.stopPropagation(),ee();break;case 37:e.preventDefault(),e.stopPropagation(),J();break;case 39:e.preventDefault(),e.stopPropagation(),W()}};return(0,s.useEffect)(()=>(document.addEventListener("keydown",es),()=>{document.removeEventListener("keydown",es)}),[es]),(0,s.useEffect)(()=>{$({...i}),M(i.image||i.background.url),k(!1),L(i&&i.firstPost&&i.firstPost.reaction&&i.firstPost.reaction.total)},[i]),(0,s.useEffect)(()=>{V(u)},[u]),(0,s.useEffect)(()=>{window&&window.sessionStorage.setItem("currentImageIndex",0)},[]),(0,t.jsxs)(s.Fragment,{children:[(0,t.jsxs)(s.Fragment,{children:[(0,t.jsx)("div",{style:{backgroundImage:`linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,1)), url(${i.firstPost.videoAttachment?"":B||S.f.DEFAULT_IMAGE_BACKGROUND})`},className:`jsx-${m.__hash} fact-background`}),(0,t.jsxs)("div",{className:`jsx-${m.__hash} right-area`,children:[(0,t.jsxs)("a",{href:y.author.link,className:`jsx-${m.__hash} author`,children:[(0,t.jsx)("img",{src:o?"/static/images/tinhte_logo_round_only.png":y.author.avatar,alt:o?"Quảng cáo":y.author.name,className:`jsx-${m.__hash} avatar`}),(0,t.jsx)("div",{className:`jsx-${m.__hash} info`,children:o?(0,t.jsx)("div",{className:`jsx-${m.__hash}`,children:(0,t.jsx)("p",{className:`jsx-${m.__hash}`,children:"Quảng cáo"})}):(0,t.jsxs)(s.Fragment,{children:[(0,t.jsx)("div",{className:`jsx-${m.__hash} author-name`,children:y.author.name}),(0,t.jsxs)("div",{className:`jsx-${m.__hash} thread-info`,children:[(0,t.jsx)("span",{className:`jsx-${m.__hash} since`,children:(0,t.jsx)(c.f,{value:y.since})}),(0,t.jsxs)("span",{className:`jsx-${m.__hash} view`,children:[(0,t.jsx)("i",{className:`jsx-${m.__hash} icon fas fa-user-friends`}),(0,t.jsx)(l.f,{value:y.stats.view})," lượt xem"]})]})]})})]}),O?(0,t.jsx)("button",{onClick:()=>ee(),className:`jsx-${m.__hash} fact-close`,children:(0,t.jsx)("i",{className:`jsx-${m.__hash} fas fa-times`})}):(0,t.jsx)("a",{href:"/",className:`jsx-${m.__hash}`,children:(0,t.jsx)("div",{className:`jsx-${m.__hash} fact-close`,children:(0,t.jsx)("i",{className:`jsx-${m.__hash} fas fa-times`})})}),(0,t.jsx)("a",{href:"/",className:`jsx-${m.__hash} tinhte-logo-link`,children:(0,t.jsx)("img",{src:R.default,alt:"Tinhte",className:`jsx-${m.__hash} tinhte-logo`})})]}),(0,t.jsxs)("div",{className:`jsx-${m.__hash} left-area`,children:[(0,t.jsx)("div",{className:`jsx-${m.__hash} menu`,children:(0,t.jsx)(z.f,{thread:y,changeTheme:g})}),O?(0,t.jsx)("button",{onClick:()=>ee(),className:`jsx-${m.__hash} fact-close-lite`,children:(0,t.jsx)("i",{className:`jsx-${m.__hash} fas fa-times`})}):(0,t.jsx)("a",{href:"/",className:`jsx-${m.__hash}`,children:(0,t.jsx)("button",{className:`jsx-${m.__hash} fact-close-lite`,children:(0,t.jsx)("i",{className:`jsx-${m.__hash} fas fa-times`})})})]}),(0,t.jsxs)("div",{className:`jsx-${m.__hash} fact-wrapper`,children:[B&&!Y&&(0,t.jsx)("div",{onClick:Q,className:`jsx-${m.__hash} btn-fullscreen`,children:P?(0,t.jsx)(A,{}):(0,t.jsx)(F,{})}),K&&(0,t.jsx)("div",{onClick:()=>J(),className:`jsx-${m.__hash} next-fact-wrap ${Z?"many-attachments":""} ${(Y||i.isEmbedVideo,"fact-video")}`,children:(0,t.jsx)("button",{className:`jsx-${m.__hash} next-fact`,children:(0,t.jsx)("i",{className:`jsx-${m.__hash} fas fa-chevron-left`})})}),(0,t.jsx)("div",{className:`jsx-${m.__hash} fact-images`,children:(0,t.jsxs)("div",{className:`jsx-${m.__hash}`,children:[w?(0,t.jsx)("i",{className:`jsx-${m.__hash} loading fa fa-spinner fa-spin`}):(0,t.jsx)("div",{className:`jsx-${m.__hash} swipe-area`,children:o?(0,t.jsx)("div",{className:`jsx-${m.__hash} image`,children:(0,t.jsx)(d.f,{slotName:E.nativeInTinhteFact,mobilePageName:I.homeMobileWeb,desktopPageName:I.homeDesktopWeb})}):i.isEmbedVideo?(0,t.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"},className:`jsx-${m.__hash}`,children:(0,t.jsx)("div",{style:{width:"100%",color:"white"},dangerouslySetInnerHTML:{__html:y&&y.firstPost&&y.firstPost.bodyHtml},className:`jsx-${m.__hash}`})}):(0,t.jsx)(C,{thread:y,factImage:B,updateFactImage:M,index:G,showLightBox:P,updateShowLightBox:Q})}),(0,t.jsxs)("div",{className:`jsx-${m.__hash} mobile`,children:[(0,t.jsx)("div",{className:`jsx-${m.__hash} mobile-content ${o?"showAds":""}`,children:o?(0,t.jsx)(()=>(0,t.jsxs)("div",{className:"tinhtefact-promo-content",children:[(0,t.jsx)("p",{className:"tinhtefact-promo-title",children:n.title}),(0,t.jsx)("p",{className:"tinhtefact-promo-description",children:n.description}),(0,t.jsx)("div",{className:"tinhtefact-promo-cta-container",children:(0,t.jsx)("a",{className:"cta",href:n.url,children:"XEM NGAY"})})]}),{className:`jsx-${m.__hash}`}):(0,t.jsx)("span",{className:`jsx-${m.__hash} mobile-content-post-body`,children:y.firstPost&&y.firstPost.bodyPlain})}),y.firstPost&&y.firstPost.bodyPlain&&y.firstPost.bodyPlain.length>74?(0,t.jsx)("button",{onClick:()=>ea(),className:`jsx-${m.__hash} see-more`,children:"Xem thêm ..."}):(0,t.jsx)("div",{className:`jsx-${m.__hash}`})]})]})}),"function"==typeof f&&(0,t.jsx)("div",{onClick:()=>W(),className:`jsx-${m.__hash} previous-fact-wrap ${Z?"many-attachments":""} ${(Y||i.isEmbedVideo,"fact-video")}`,children:(0,t.jsx)("button",{className:`jsx-${m.__hash} previous-fact`,children:(0,t.jsx)("i",{className:`jsx-${m.__hash} fas fa-chevron-right`})})})]}),!o&&(0,t.jsx)(s.Fragment,{children:(0,t.jsxs)("div",{className:`jsx-${m.__hash} comment-like-share mobile`,children:[(0,t.jsx)("div",{className:`jsx-${m.__hash} reaction-counter`,children:(0,t.jsx)(x.f,{totalReaction:U,post:y.firstPost,commentMode:!1})}),(0,t.jsxs)("div",{className:`jsx-${m.__hash} actions`,children:[(0,t.jsx)("div",{className:`jsx-${m.__hash} like-thread`,children:(0,t.jsx)(h.f,{commentMode:!1,post:y&&y.firstPost,onReact:(e,t,a)=>{let s=U;e===p.U.Up&&(s+=1,y.firstPost.reaction.postReactions[t]=y.firstPost.reaction.postReactions[t]+1,y.firstPost.reaction.userReactionId=t),e===p.U.Down&&(s-=1,y.firstPost.reaction.postReactions[a]=y.firstPost.reaction.postReactions[a]-1,y.firstPost.reaction.userReactionId=null),e===p.U.Neutral&&(y.firstPost.reaction.postReactions[a]=y.firstPost.reaction.postReactions[a]-1,y.firstPost.reaction.postReactions[t]=y.firstPost.reaction.postReactions[t]+1,y.firstPost.reaction.userReactionId=t),$({...y}),L(s)}})}),(0,t.jsx)("button",{onClick:()=>et(),className:`jsx-${m.__hash} thread-comment`,children:y.stats.comment>0?`${y.stats.comment} b\xecnh luận`:"Bình luận"}),(0,t.jsx)("button",{onClick:()=>{var t;return t=i.link,void(e.g.FB&&FB.ui({method:"share",display:"popup",href:t},e=>{console.log("xxxx",e)}))},className:`jsx-${m.__hash} thread-share`,children:"Chia sẻ"})]})]})}),H?(0,t.jsx)(N,{thread:y,viewComment:et,goToPage:_}):(0,t.jsx)("div",{className:`jsx-${m.__hash}`}),q?(0,t.jsx)(b,{thread:y,viewFullContent:ea}):(0,t.jsx)("div",{className:`jsx-${m.__hash}`}),(0,t.jsx)("div",{id:"landscape-warning",className:`jsx-${m.__hash}`,children:"Chiều cao màn hình không khả dụng cho nội dung này. Vui lòng xoay dọc màn hình thiết bị."})]}),(0,t.jsx)(a.default,{id:m.__hash,children:m})]})});var B=e.i(6788),M=e.i(298299),U=e.i(565715);let L=new String(".poll-container.jsx-7e5fa66485edf0e7{background:0 0;border:1px solid #e1e1e1;border-radius:8px;margin-bottom:10px;padding:16px;position:relative}.poll-question-wrapper.jsx-7e5fa66485edf0e7{align-items:flex-start;gap:8px;width:calc(100% - 30px);margin-bottom:10px;display:flex;position:relative}.poll-question-wrapper.jsx-7e5fa66485edf0e7 i.jsx-7e5fa66485edf0e7{background-color:var(--button-high-contrast);width:30px;height:30px;color:var(--text-light-1);border-radius:4px;flex:0 0 30px;justify-content:center;align-items:center;display:flex}.poll-question.jsx-7e5fa66485edf0e7{margin:0;font-size:1.2em;font-weight:700}.poll-edit-link.jsx-7e5fa66485edf0e7{color:var(--color-accent-dark);margin-left:10px;font-size:.8em;font-weight:400;text-decoration:underline;position:absolute;top:16px;right:16px}.max-votes-info.jsx-7e5fa66485edf0e7{font-size:.8em;font-weight:400}.poll-input-group.jsx-7e5fa66485edf0e7 input[disabled].jsx-7e5fa66485edf0e7+label.jsx-7e5fa66485edf0e7{opacity:.5}.poll-responses.jsx-7e5fa66485edf0e7{border-top:1px solid #e1e1e1;width:calc(100% - 38px);margin-left:38px}.poll-response-item.jsx-7e5fa66485edf0e7{margin:12px 0}.poll-input-group.jsx-7e5fa66485edf0e7{align-items:center;gap:8px;display:flex}.poll-input-group.jsx-7e5fa66485edf0e7 label.jsx-7e5fa66485edf0e7{cursor:pointer}.poll-input-group.jsx-7e5fa66485edf0e7 label.jsx-7e5fa66485edf0e7 input.jsx-7e5fa66485edf0e7{margin-right:8px}.poll-result-item.jsx-7e5fa66485edf0e7{margin-bottom:12px}.result-header.jsx-7e5fa66485edf0e7{justify-content:space-between;margin-bottom:4px;display:flex}.selected.jsx-7e5fa66485edf0e7{color:var(--color-accent-dark);margin-right:5px;font-size:12px;display:none}.voted.jsx-7e5fa66485edf0e7{flex-direction:row;align-items:center;font-weight:700;display:flex}.voted.jsx-7e5fa66485edf0e7 .selected.jsx-7e5fa66485edf0e7{display:block}.vote-count.jsx-7e5fa66485edf0e7{color:#666;font-size:.9em}.progress-bar.jsx-7e5fa66485edf0e7{background:#f0f0f0;border-radius:4px;height:24px;overflow:hidden}.progress.jsx-7e5fa66485edf0e7{background:var(--color-accent-dark);height:100%;transition:width .3s}.poll-actions.jsx-7e5fa66485edf0e7{justify-content:center;align-items:center;gap:8px;margin-top:16px;display:flex}button.jsx-7e5fa66485edf0e7{cursor:pointer;border-radius:4px;padding:8px 16px;font-size:14px}.vote-button.jsx-7e5fa66485edf0e7,.results-button.jsx-7e5fa66485edf0e7,.change-vote-button.jsx-7e5fa66485edf0e7{background-color:var(--button-high-contrast);color:var(--text-light-1)}");L.__hash="7e5fa66485edf0e7";let q=i.f.ApiConsumer(({threadId:e,api:i})=>{let[o,n]=(0,s.useState)(null),[r,d]=(0,s.useState)(null),[c,l]=(0,s.useState)(null),[h,x]=(0,s.useState)([]),[p,f]=(0,s.useState)(!1),m=async e=>{i.onAuthenticated(()=>{i.get({uri:`/threads/${e}/poll`}).then(e=>{let t;if(!e)return;let a=e.poll||{};n(a),(a.poll_is_voted||!a.permissions.vote&&a.permissions.result)&&f(!0),(t=a.responses.filter(e=>e.response_is_voted).map(e=>e.response_id))&&t.length>0&&(x(t),d(t[0]))}).catch(e=>{console.error("Error fetching poll:",e)})})},j=e=>{let t=o.responses.reduce((e,t)=>e+t.response_vote_count,0);return 0===t?0:(e/t*100).toFixed(1)};return(0,s.useEffect)(()=>{m(e)},[]),(0,s.useEffect)(()=>{i.onAuthenticated(()=>{i&&i.getUserId()&&i.get("users/me").then(e=>{l((0,U.U)(e.user||{}))}).catch(e=>{console.log("#69c275 Fetching user error: ",e)})})},[]),(0,t.jsxs)(s.Fragment,{children:[o&&(0,t.jsxs)("div",{className:`jsx-${L.__hash} poll-container`,children:[(0,t.jsxs)("div",{className:`jsx-${L.__hash} poll-question-wrapper`,children:[(0,t.jsx)("i",{className:`jsx-${L.__hash} fas fa-question`}),(0,t.jsx)("h3",{className:`jsx-${L.__hash} poll-question`,children:o.poll_question})]}),c&&c.isModerator&&(0,t.jsx)("a",{href:`https://tinhte.vn/threads/${e}/poll/edit`,className:`jsx-${L.__hash} poll-edit-link`,children:"Sửa"}),(0,t.jsxs)("div",{className:`jsx-${L.__hash} poll-responses`,children:[0===o.poll_max_votes&&(0,t.jsx)("span",{className:`jsx-${L.__hash} max-votes-info`,children:"(Được chọn nhiều câu trả lời)"}),o.poll_max_votes>1&&(0,t.jsxs)("span",{className:`jsx-${L.__hash} max-votes-info`,children:["(Chọn tối đa ",o.poll_max_votes," câu trả lời)"]}),o.responses.map(e=>(0,t.jsx)("div",{className:`jsx-${L.__hash} poll-response-item`,children:p?(0,t.jsxs)("div",{className:`jsx-${L.__hash} poll-result-item`,children:[(0,t.jsxs)("div",{className:`jsx-${L.__hash} result-header`,children:[(0,t.jsxs)("p",{className:`jsx-${L.__hash} `+((e.response_is_voted?"voted":"")||""),children:[(0,t.jsx)("i",{className:`jsx-${L.__hash} selected fas fa-check-circle`}),e.response_answer]}),(0,t.jsxs)("span",{className:`jsx-${L.__hash} vote-count`,children:[j(e.response_vote_count),"%"," - ",e.response_vote_count," bình chọn"]})]}),(0,t.jsx)("div",{className:`jsx-${L.__hash} progress-bar`,children:(0,t.jsx)("div",{style:{width:`${j(e.response_vote_count)}%`},className:`jsx-${L.__hash} progress`})})]}):(0,t.jsx)("div",{className:`jsx-${L.__hash} poll-input-group`,children:(0,t.jsxs)("label",{htmlFor:`response-${e.response_id}`,className:`jsx-${L.__hash}`,children:[(0,t.jsx)("input",{type:1===o.poll_max_votes?"radio":"checkbox",id:`response-${e.response_id}`,name:"poll-response",value:e.response_id,checked:h.includes(e.response_id),onChange:()=>(e=>{let t=parseInt(e,10);if(0===o.poll_max_votes||o.poll_max_votes>1)if(h.includes(t)){let e=h.filter(e=>e!==t);x(e),d(e[0])}else(0===o.poll_max_votes||o.poll_max_votes>1&&h.length{f(!1),d(null)},className:`jsx-${L.__hash} change-vote-button`,children:h.length>0?"Thay đổi":"Bình chọn"})}):(0,t.jsxs)(s.Fragment,{children:[o.permissions&&o.permissions.vote?(0,t.jsx)("button",{onClick:()=>{(r||0!==h.length)&&i.post({uri:`/threads/${e}/poll/votes`,params:{response_id:r,"response_ids[]":h}}).then(()=>{m(e),f(!0)})},className:`jsx-${L.__hash} vote-button`,children:"Bình chọn"}):(0,t.jsx)("p",{className:`jsx-${L.__hash}`,children:"Đăng nhập để bình chọn"}),o.permissions&&o.permissions.result&&(0,t.jsx)("button",{onClick:()=>f(!0),className:`jsx-${L.__hash} results-button`,children:"Xem kết quả"})]})})]}),(0,t.jsx)(a.default,{id:L.__hash,children:L})]})});e.s(["f",0,q],193618);var D=e.i(758546),H=e.i(109969),V=e.i(602692);let G=new String('.thread-content.jsx-6def17a2d088b91b{height:100%;padding-bottom:60px;overflow:auto}.author-area.jsx-6def17a2d088b91b{flex-direction:row;justify-content:space-between;width:100%;padding:0 20px;display:flex}.author.jsx-6def17a2d088b91b{align-items:center;display:flex}.avatar.jsx-6def17a2d088b91b{border:2px solid var(--border-light);border-radius:50%;width:50px;height:50px}.info.jsx-6def17a2d088b91b{flex-direction:column;align-items:flex-start;display:flex}.author-name.jsx-6def17a2d088b91b{color:var(--color-accent-dark);align-items:center;font-size:16px;font-weight:700;display:flex}.thread-info.jsx-6def17a2d088b91b{color:var(--text-since);font-size:12px}.since.jsx-6def17a2d088b91b{margin-right:10px}.view.jsx-6def17a2d088b91b .icon.jsx-6def17a2d088b91b{margin-right:5px}.view.jsx-6def17a2d088b91b:before{content:"●";color:#f1f1f1;margin-right:10px;display:inline-block}.fact-content.jsx-6def17a2d088b91b{padding:20px}.thread-body-wrapper.jsx-6def17a2d088b91b{max-height:200px;overflow:hidden}.open.jsx-6def17a2d088b91b .thread-body-wrapper.jsx-6def17a2d088b91b{max-height:none}.reaction-counter.jsx-6def17a2d088b91b{padding:0 20px 10px}.like-comment-share.jsx-6def17a2d088b91b{justify-content:space-between;align-items:center;width:100%;padding:10px 20px;display:flex;position:relative}.like-comment-share.jsx-6def17a2d088b91b .reactions{flex:1;height:32px;padding:6px 0}.like-comment-share.jsx-6def17a2d088b91b .reaction-list{left:25px}.like-comment-share.jsx-6def17a2d088b91b .comment-button.jsx-6def17a2d088b91b,.like-comment-share.jsx-6def17a2d088b91b .share-button.jsx-6def17a2d088b91b{flex:1}.like-comment-share.jsx-6def17a2d088b91b button.jsx-6def17a2d088b91b{background-color:#0000;border-radius:4px;justify-content:center;align-items:center;height:32px;padding:6px 0;display:flex}.like-comment-share.jsx-6def17a2d088b91b button.jsx-6def17a2d088b91b .icon.jsx-6def17a2d088b91b{margin-right:5px;display:flex;transform:scale(.9)}.break-line.jsx-6def17a2d088b91b{background-color:var(--border-light);width:100%;height:1px;position:relative}.thread-comment-count.jsx-6def17a2d088b91b{color:var(--color-accent-dark)}.reacted-text.jsx-6def17a2d088b91b{color:var(--primary-color);font-weight:700}.react-item.jsx-6def17a2d088b91b{color:var(--primary-text);align-items:center;gap:4px;font-size:12px;line-height:20px;display:flex}.react-item.jsx-6def17a2d088b91b .reactions{width:unset;min-width:unset}.react-item.jsx-6def17a2d088b91b .reactions .icon{margin-right:0}.react-item.jsx-6def17a2d088b91b .reactions .reaction-text{display:none}.comment-box.jsx-6def17a2d088b91b{padding:0 10px}.comment-box.jsx-6def17a2d088b91b .thread-action{padding-top:0;padding-bottom:10px}.comment-box.jsx-6def17a2d088b91b .thread-login{padding:0}.comment-area.jsx-6def17a2d088b91b{padding:0 10px}.comment-area.jsx-6def17a2d088b91b .xfBody .LinkExpander .block{flex-direction:column}.comment-area.jsx-6def17a2d088b91b .xfBody .LinkExpander .block .thumbnail img{margin:0 0 10px}.comment-area.jsx-6def17a2d088b91b .xfBody .LinkExpander .block .info{padding-left:0}.comment-area.jsx-6def17a2d088b91b .thread-comment__action{margin-top:3px;padding-top:0}.comment-area.jsx-6def17a2d088b91b .total-reactions{top:-10px}.comment-area.jsx-6def17a2d088b91b .thread-comment__content{margin-top:0}.comment-area.jsx-6def17a2d088b91b .comment-menu-toggle{padding-top:0}.comment-area.jsx-6def17a2d088b91b .thread-comments__container{margin-top:5px!important}.comment-area.jsx-6def17a2d088b91b .thread-comment{margin-bottom:12px}.comment-area.jsx-6def17a2d088b91b .thread-comment:last-child{margin-bottom:18px}@media (width>=768px){.comment-area.jsx-6def17a2d088b91b .thread-comment__attachment{flex-basis:unset;flex-wrap:wrap;flex:1;min-width:24%}}.bottom-comment-box.jsx-6def17a2d088b91b{width:100%;padding:0 20px 20px;position:relative;bottom:0}.full-content.jsx-6def17a2d088b91b{font-size:16px}.content-less.jsx-6def17a2d088b91b{text-overflow:ellipsis;-webkit-line-clamp:20;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.read-more.jsx-6def17a2d088b91b{color:var(--color-accent-dark);margin-right:12px;font-weight:600;display:inline-block}@media (width<=1024px){.bottom-comment-box.jsx-6def17a2d088b91b{border-top:1px solid var(--border-light);width:100%;max-width:none;padding-bottom:0;position:relative}.comment-area.jsx-6def17a2d088b91b{padding:0 20px}}.tinhtefact-promo-content.jsx-6def17a2d088b91b{padding:20px}@media (width<=600px){.tinhtefact-promo-content.jsx-6def17a2d088b91b{padding:0}}.tinhtefact-promo-title.jsx-6def17a2d088b91b{margin-bottom:16px;font-size:18px;font-weight:700}.tinhtefact-promo-description.jsx-6def17a2d088b91b{margin-bottom:24px;font-size:16px}.tinhtefact-promo-cta-container.jsx-6def17a2d088b91b{justify-content:center;align-items:center;display:flex}.cta.jsx-6def17a2d088b91b{background-color:var(--color-accent-dark);max-width:540px;color:var(--text-light);border-radius:5px;padding:10px 15px;font-size:16px;font-weight:700}.pagination.jsx-6def17a2d088b91b{justify-content:flex-end;width:100%;margin-top:-20px;padding:0 20px 10px;display:flex}.profile-area.jsx-6def17a2d088b91b{justify-content:flex-end;padding:10px 0;display:flex}');G.__hash="6def17a2d088b91b";let X=function(e=20,t){let a=(0,s.useRef)(null),[i,o]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{let t=a.current;if(!t)return;let s=parseFloat(window.getComputedStyle(t).lineHeight),i=isNaN(s)?20:s;o(t.scrollHeight>i*e)},[t]),{ref:a,isEllipsed:i}},K=i.f.ApiConsumer(({api:e,thread:i,showAds:o,tinhteFactAdsBlock:n,changeTheme:r,goToPage:d,commenting:x,onNewThread:m})=>{let[j,b]=(0,s.useState)(i),[g,w]=(0,s.useState)((0,U.U)({})),{ref:k,isEllipsed:N}=X(20,j),[y,$]=(0,s.useState)(!1),[P,S]=(0,s.useState)(i&&i.firstPost&&i.firstPost.reaction&&i.firstPost.reaction.total),C=()=>{x(!0)},R=()=>{x(!1)},A=(e,t)=>{"top"===t?j.posts.unshift(e):"bottom"===t&&j.posts.push(e),j.stats.comment+=1,b({...j})},F=(e,t,a)=>{let s=P;e===p.U.Up&&(s+=1,j.firstPost.reaction.postReactions[t]=j.firstPost.reaction.postReactions[t]+1,j.firstPost.reaction.userReactionId=t),e===p.U.Down&&(s-=1,j.firstPost.reaction.postReactions[a]=j.firstPost.reaction.postReactions[a]-1,j.firstPost.reaction.userReactionId=null),e===p.U.Neutral&&(j.firstPost.reaction.postReactions[a]=j.firstPost.reaction.postReactions[a]-1,j.firstPost.reaction.postReactions[t]=j.firstPost.reaction.postReactions[t]+1,j.firstPost.reaction.userReactionId=t),b({...j,firstPost:{...j.firstPost}}),S(s)};(0,s.useEffect)(()=>{e.onAuthenticated(()=>e.getUserId()>0?e.get("users/me").then(e=>{w((0,U.U)(e.user||{}))}):null)},[]),(0,s.useEffect)(()=>{b({...i}),$(!1),S(i&&i.firstPost&&i.firstPost.reaction&&i.firstPost.reaction.total)},[i]);let E=(0,s.useMemo)(()=>!!g&&!!g.id&&!!j&&!!j.author&&g.id===j.author.id,[g,j]),I="var(--primary-text)";return j.author&&(I=(0,V.f)(j.author)),(0,t.jsxs)(s.Fragment,{children:[j&&(0,t.jsxs)(s.Fragment,{children:[(0,t.jsx)("div",{className:`jsx-${G.__hash} profile-area`,children:(0,t.jsx)(D.f,{forTinhteFactTheme:!0,user:g})}),(0,t.jsxs)("div",{className:`jsx-${G.__hash} thread-content`,children:[(0,t.jsxs)("div",{className:`jsx-${G.__hash} author-area`,children:[(0,t.jsxs)("a",{href:j.author.link,className:`jsx-${G.__hash} author`,children:[(0,t.jsx)("img",{src:o?"/static/images/tinhte_logo_round_only.png":j.author.avatar,alt:o?"Quảng cáo":j.author.name,className:`jsx-${G.__hash} avatar`}),(0,t.jsx)("div",{className:`jsx-${G.__hash} info`,children:o?(0,t.jsx)("div",{className:`jsx-${G.__hash}`,children:(0,t.jsx)("p",{className:`jsx-${G.__hash}`,children:"Quảng cáo"})}):(0,t.jsxs)(s.Fragment,{children:[(0,t.jsxs)("div",{className:`jsx-${G.__hash} author-name`,children:[(0,t.jsx)("span",{style:{color:I},className:`jsx-${G.__hash}`,children:j.author.name}),j.author.verified_badge&&(0,t.jsx)("i",{style:{marginLeft:7,color:I},className:`jsx-${G.__hash} fas fa-check-circle`}),(0,t.jsx)(H.f,{thread:i})]}),(0,t.jsxs)("div",{className:`jsx-${G.__hash} thread-info`,children:[(0,t.jsx)("span",{className:`jsx-${G.__hash} since`,children:(0,t.jsx)(c.f,{value:j.since})}),(0,t.jsxs)("span",{className:`jsx-${G.__hash} view`,children:[(0,t.jsx)("i",{className:`jsx-${G.__hash} icon fas fa-user-friends`}),(0,t.jsx)(l.f,{value:j.stats.view})," lượt xem"]})]})]})})]}),(0,t.jsx)(z.f,{thread:j,changeTheme:r,tinhteFact:!0,onNewThread:m,commenting:x})]}),o?(0,t.jsx)(()=>(0,t.jsxs)("div",{className:"tinhtefact-promo-content",children:[(0,t.jsx)("p",{className:"tinhtefact-promo-title",children:n.title}),(0,t.jsx)("p",{className:"tinhtefact-promo-description",children:n.description}),(0,t.jsx)("div",{className:"tinhtefact-promo-cta-container",children:(0,t.jsx)("a",{className:"cta",href:n.url,children:"XEM NGAY"})})]}),{className:`jsx-${G.__hash}`}):(0,t.jsxs)(s.Fragment,{children:[(0,t.jsxs)("div",{className:`jsx-${G.__hash} fact-content open`,children:[(0,t.jsx)(q,{threadId:j.id}),(0,t.jsxs)("div",{className:`jsx-${G.__hash} thread-body-wrapper`,children:[(0,t.jsx)("div",{ref:k,className:`jsx-${G.__hash} full-content ${N&&!y?"content-less":""}`,children:!i.isEmbedVideo&&(0,t.jsx)(f.f,{body:j&&j.firstPost&&j.firstPost.bodyHtml,author:j&&j.firstPost&&j.firstPost.author&&j.firstPost.author.name})}),(0,t.jsxs)("div",{className:`jsx-${G.__hash}`,children:[N&&(0,t.jsx)("a",{onClick:()=>{$(e=>!e)},className:`jsx-${G.__hash} read-more`,children:y?"Thu gọn":"Xem thêm"}),E&&(0,t.jsx)("a",{onClick:e=>{let t=document.getElementById("hiddenFactButton");t&&t.click()},className:`jsx-${G.__hash} read-more`,children:"Sửa"})]})]})]}),(0,t.jsx)("div",{className:`jsx-${G.__hash} break-line`}),(0,t.jsxs)("div",{className:`jsx-${G.__hash} like-comment-share no-user-select`,children:[p.q.map(e=>{let a=j&&j.firstPost&&j.firstPost.reaction&&j.firstPost.reaction.userReactionId===e,s=j&&j.firstPost&&j.firstPost.reaction&&j.firstPost.reaction.postReactions[e]||0;return(0,t.jsxs)("div",{className:`jsx-${G.__hash} react-item`,children:[(0,t.jsx)(h.f,{commentMode:!1,post:j.firstPost,onReact:F,reactionButtonId:e}),(0,t.jsx)("span",{className:`jsx-${G.__hash} ${a?"reacted-text":""}`,children:s})]},`${e}`)}),(0,t.jsxs)("a",{href:`${i.link.replace("https://tinhte.vn","")}#comment-box`,className:`jsx-${G.__hash} react-item`,children:[(0,t.jsx)(B.f,{}),(0,t.jsx)("span",{className:`jsx-${G.__hash}`,children:j.stats.comment})]}),(0,t.jsx)("a",{href:`https://www.facebook.com/sharer/sharer.php?u=${i.link}`,rel:"noopener noreferrer",target:"_blank",className:`jsx-${G.__hash} react-item`,children:(0,t.jsx)(M.f,{})})]}),(0,t.jsx)("div",{className:`jsx-${G.__hash} break-line`}),(0,t.jsx)("div",{className:`jsx-${G.__hash} comment-box`,children:(0,t.jsx)(_.f,{api:e,postToReply:j.firstPost,enterToSubmit:!0,addPost:A,isCommenting:C,isNotCommenting:R,position:"top",id:"commentBox01"})}),j.pagination&&j.pagination.pages&&(0,t.jsx)("div",{className:`jsx-${G.__hash} pagination`,children:(0,t.jsx)(v.f,{currentPage:j.pagination.page,totalPage:j.pagination.pages,onSelected:d})}),(0,t.jsx)("div",{className:`jsx-${G.__hash} comment-area`,children:(0,t.jsx)("div",{className:`jsx-${G.__hash} posts`,children:(0,t.jsx)(u.f,{enterToSubmit:!0,posts:j.posts,isCommenting:C,isNotCommenting:R,tinhteFact:!0})})}),j.pagination&&j.pagination.pages&&(0,t.jsx)("div",{className:`jsx-${G.__hash} pagination`,children:(0,t.jsx)(v.f,{currentPage:j.pagination.page,totalPage:j.pagination.pages,onSelected:d})}),j.stats.comment>=8&&(0,t.jsx)("div",{className:`jsx-${G.__hash} bottom-comment-box`,children:(0,t.jsx)(_.f,{api:e,postToReply:j.firstPost,enterToSubmit:!0,addPost:A,isCommenting:C,isNotCommenting:R,position:"bottom",id:"commentBox01"})})]})]})]}),(0,t.jsx)(a.default,{id:G.__hash,children:G})]})}),O=new String(".fact-ui-container.jsx-5e739fcb52d93a16{flex-direction:row;width:100%;height:100%;display:flex;position:absolute;top:0;left:0;overflow:hidden}.left-content.jsx-5e739fcb52d93a16{background-color:#6b6b6b;width:100%;height:100%;position:relative;overflow:hidden}.right-content.jsx-5e739fcb52d93a16{background-color:var(--thread-background);flex:0 0 460px;width:460px;overflow:visible}.right-content.jsx-5e739fcb52d93a16 .thread-comment__attachment{max-width:unset}.right-content.jsx-5e739fcb52d93a16 .user-avatar,.right-content.jsx-5e739fcb52d93a16 .avatar{margin-right:10px!important}");O.__hash="5e739fcb52d93a16";let Q=i.f.ApiConsumer(({api:e,threadId:i,page:r,thread:d,showAds:c,tinhteFactAdsBlock:l,previousItem:h,nextItem:x,handleCloseModal:p,changeTheme:f})=>{let[m,j]=(0,s.useState)(d),[b,g]=(0,s.useState)(!1),[u,_]=(0,s.useState)(!1),v=(t,a)=>{n.isMobile||e.onAuthenticated(()=>{let s={thread_id:i,page:t,fields_include:"*,review_extra_data"};t>1&&g(!0),a&&(s={page_of_post_id:a,fields_include:"*,review_extra_data"},g(!0)),e.get({uri:"/posts",params:s,headers:{"Api-Post-Tree":1}}).then(t=>{let a,s=t.posts?t.posts:[],n=t.links?t.links:{};a=`/threads/${i}`,e.get({uri:a,params:{fields_include:"*,review_extra_data,bdContentList_promote_item"}}).then(e=>{let t=e.thread?e.thread:{};t.posts=s,t.pagination=n,j({...(0,o.U)(t)})})})})},w=e=>{v(e,null)};return(0,s.useEffect)(()=>{j({...d})},[d]),(0,s.useEffect)(()=>{(()=>{let e="",t=r;if(window.location.hash){let[a]=window.location.hash.split("-");"#post"===a?[,e]=window.location.hash.split("-"):"#page"===a&&(e=null,t=parseInt(window.location.hash.split("-")[1],10))}v(t,e)})()},[]),(0,t.jsxs)("div",{className:`jsx-${O.__hash} fact-ui-container`,children:[m&&(0,t.jsxs)(s.Fragment,{children:[(0,t.jsx)("div",{className:`jsx-${O.__hash} left-content`,children:(0,t.jsx)(T,{thread:m,showAds:c,previousItem:h,nextItem:x,handleCloseModal:p,tinhteFactAdsBlock:l,changeTheme:f,showComment:b,goToPage:w,commenting:u})}),(0,t.jsx)("div",{className:`jsx-${O.__hash} right-content`,children:(0,t.jsx)(K,{thread:m,showAds:c,tinhteFactAdsBlock:l,changeTheme:f,goToPage:w,commenting:e=>{_(e)},onNewThread:j})})]}),(0,t.jsx)(a.default,{id:O.__hash,children:O})]})});e.s(["f",0,Q],257378)}]);