"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[9604],{92866:(e,t,n)=>{n.d(t,{C:()=>s,p:()=>c});var o=n(2787),i=n(40099),r=n(88920),a=n(48933),l=n(99051);function d({data:{mode:e,aspectRatio:t}}){return(0,o.Y)(l.pQ,{mode:e,aspectRatio:t})}const s=(0,i.memo)((function({mode:e,aspectRatio:t=208/276,isMasonry:n,isUser:s}){const{isInProductHoldout:c}=(0,r.Vv)(),u=!c,p=(0,i.useMemo)((()=>{if(!n)return Array(24).fill(t);const e=[3/4,3/4,4/3,16/9,9/16,9/16,9/16,1];return Array.from({length:24},(()=>e[Math.floor(Math.random()*e.length)]))}),[n,t]),h=n?(0,o.Y)(a.k,{items:p.map((t=>({mode:e,aspectRatio:t}))),render:d}):p.map(((t,n)=>(0,o.Y)(d,{index:n,data:{mode:e,aspectRatio:t}},n)));return(0,o.Y)(l.Ct,{mode:e,isMasonry:n,useLargerGrid:s&&u,children:h})})),c=(0,i.memo)((function({row:e=4,gap:t="18px",radius:n="8px",cardWidth:i="226px",cardHeight:r="302px"}){return(0,o.Y)(l.z_,{children:new Array(e).fill(1).map(((e,t)=>e+t)).map((e=>{return a=e,(0,o.Y)(l.C2,{children:new Array(3).fill(1).map(((e,t)=>e+t)).map((e=>(0,o.Y)(l.Ql,{cardWidth:i,cardHeight:r,gap:t,radius:n},e)))},a);var a}))})}))},99051:(e,t,n)=>{n.d(t,{C2:()=>u,Ct:()=>d,Ql:()=>p,pQ:()=>s,z_:()=>c});var o=n(75431),i=n(62186),r=n(72153),a=n(65530);const l=(0,o.i7)({"0%":{backgroundPositionX:"200%"},"100%":{backgroundPositionX:"-150%"}}),d=a.ph,s=(0,i.default)("div",{target:"e15jf4tc0"})((({theme:e,mode:t,aspectRatio:n=208/276})=>[{borderRadius:"explore"===t?"8px":"4px",position:"relative",width:"100%",paddingTop:100/n+"%",backgroundColor:e.colors.BGPlaceholderDefault,backgroundImage:"linear-gradient(90deg, rgba(22, 24, 35, 0) 0%, rgba(22, 24, 35, .04) 50%, rgba(22, 24, 35, 0) 100%)",backgroundSize:"200% 100%",backgroundRepeat:"no-repeat",animation:`${l} cubic-bezier(0, 0, 1, 1) 1.5s infinite`}]),"label:DivSkeletonCard;"),c=(0,i.default)("div",{target:"e15jf4tc1"})({display:"flex",flexDirection:"column",paddingTop:"20px"},"label:DivSkeletonContainerV1;"),u=(0,i.default)("div",{target:"e15jf4tc2"})({display:"flex"},"label:DivSkeletonRowContainer;"),p=(0,i.default)("div",{target:"e15jf4tc3"})((({theme:e,cardWidth:t,cardHeight:n,gap:o,radius:i})=>[(0,r.mp)({direction:e.direction,marginEnd:o}),{width:t,height:n,borderRadius:i,marginBottom:o,display:"block",float:"left",overflow:"hidden",flex:"0 0 auto",backgroundColor:e.colors.BGPlaceholderDefault,backgroundImage:"linear-gradient(90deg, rgba(22, 24, 35, 0) 0%, rgba(22, 24, 35, .04) 50%, rgba(22, 24, 35, 0) 100%)",backgroundSize:"200% 100%",backgroundRepeat:"no-repeat",animation:`${l} cubic-bezier(0, 0, 1, 1) 1.5s infinite`}]),"label:DivSkeletonCardV1;")},40129:(e,t,n)=>{n.r(t),n.d(t,{default:()=>xn});var o=n(2787),i=n(40099),r=n(28591),a=n(43108),l=n(88920),d=n(19442),s=n(25616),c=n(7859),u=n(79995),p=n(13549),h=n(75774),g=n(66691),m=n(65754),x=n(60484),f=n(49057),y=n(96689),v=n(43626),b=n(90159),w=n(65467),C=n(94294),S=n(4474),T=n(11060),k=n(17437),L=n(62186),D=n(33543),E=n(70388),_=n(72153),I=n(97317),Y=n(81659),M=n(65530),R=n(99051),O=n(20182);const B=()=>({isNewLayout:e,isSideNav:t})=>{const n=e?32:48,o=e?12:48,i=t?D.dK:E.EH,r=t?D.pJ:Y.xG;return[{width:`calc(100vw - ${r}px - ${2*n}px)`,minWidth:"unset !important"},e?(0,_.jJ)({max:M.PF,style:{width:`calc(100vw - ${r}px - ${2*o}px)`}}):{},(0,_.jJ)({max:1071,style:{width:`calc(100vw - ${i}px - ${2*o}px)`}}),e?{"@media screen and (max-width: 703px)":{minWidth:"520px"}}:(0,I.s5)()]},P=(0,L.default)("div",{target:"e13i6o240"})((({theme:e,theme:{colors:t},isNewLayout:n,isSticky:o,isSideNav:i,backgroundColor:r=t.BGPrimary})=>[{position:o?"sticky":"fixed",zIndex:1,top:`${(0,O.$)()}px`,height:o?"unset":(n?88:84)+"px",backgroundColor:r,transition:"top .4s ease"},B(),(0,_.jJ)({max:M.PF,style:{height:o?"unset":(n?64:84)+"px"}},{max:688,style:{width:`calc(100vw - ${i?D.dK:E.EH}px - ${n?12:48}px)`}})]),"label:DivCategoryListWrapper;"),z=(0,L.default)("div",{target:"e13i6o241"})((({isNewLayout:e,hasTrendingCard:t})=>[{height:"42px",padding:e?"24px 0":t?"12px 0":"28px 0 16px",position:"relative",boxSizing:"content-box"}]),"label:DivCategoryListContainer;"),W=(0,L.default)("div",{target:"e13i6o242"})((({theme:e,isNewLayout:t})=>[{display:"flex",overflowX:"auto",height:"100%",whiteSpace:"nowrap","::-webkit-scrollbar":{display:"none",width:"0 !important",height:"0 !important"},scrollBehavior:"smooth"},B(),t?(0,_.jJ)({max:M.PF,style:{padding:"12px 0"}}):{}]),"label:DivCategoryList;"),j=(0,L.default)("button",{target:"e13i6o247"})((({theme:{direction:e,colors:t,isDark:n},active:o})=>[{display:"flex",alignItems:"center",padding:"0 12px",height:"42px",backgroundColor:t.BGInput2,borderRadius:"8px",fontSize:"17px",color:n?t.TextSecondary:t.TextPrimary,cursor:"pointer",gap:"6px","&:hover":{color:n?t.TextSecondary:t.TextPrimary,backgroundColor:n?"rgba(255, 255, 255, .1)":"rgba(22, 24, 35, .1)"},"&:not(:last-child)":(0,_.mp)({direction:e,marginEnd:"12px"}),border:"none","&:focus-visible":{outline:`2px solid ${t.Negative}`}},o?{backgroundColor:n?t.ConstBGPlaceholderOpaque:t.BGCreation2,color:n?t.ConstTextPrimary:t.ConstTextInverse}:null]),"label:ButtonCategoryItemContainer;"),$=(0,L.default)("span",{target:"e13i6o248"})((()=>[{fontSize:"16px",lineHeight:"24px",fontWeight:500}]),"label:SpanCategoryName;"),A=(0,L.default)("div",{target:"e13i6o249"})((({theme:{direction:e},right:t})=>[{position:"absolute",zIndex:1,top:0,cursor:"pointer",padding:"inherit",height:"100%",display:"flex",alignItems:"center",pointerEvents:"none",direction:e},(0,_.mp)({direction:e,[t?"end":"start"]:"0px"})]),"label:DivArrowContainer;"),N=(0,L.default)("div",{target:"e13i6o2410"})((({theme:{direction:e,colors:t},right:n,size:o=32,chevronSize:i=16})=>{const r=i/48;return[{zIndex:1,width:`${o}px`,height:`${o}px`,background:t.BGQuinary,borderRadius:"50%",boxShadow:`0px ${o/12}px ${o/2}px rgba(0, 0, 0, .12)`,fontSize:`${i}px`,color:t.TextTertiaryAlt,pointerEvents:"auto",direction:e,display:"flex",alignItems:"center"},(0,_.mp)({direction:e,paddingStart:(o-21.33*r)/2-(n?26.67*r:0)+"px"})]}),"label:DivArrowIconContainer;"),F=(0,L.default)("div",{target:"e13i6o2411"})((({theme:{direction:e},right:t})=>({display:"inline-block",lineHeight:0,transform:t?"ltr"===e?"unset":"rotateY(180deg)":"ltr"===e?"rotateY(180deg)":"unset"})),"label:DivChevron;"),H=(0,L.default)("div",{target:"e13i6o2412"})((({theme:{direction:e,isDark:t},right:n})=>[{position:"absolute",top:0,width:"80px",height:"100%",background:t?"linear-gradient(270deg, #121212 0%, rgba(18, 18, 18, 0) 100%)":"linear-gradient(270.11deg, #FFFFFF 0.09%, rgba(255, 255, 255, 0) 100.83%)",transform:n?"ltr"===e?"unset":"matrix(-1, 0, 0, 1, 0, 0)":"ltr"===e?"matrix(-1, 0, 0, 1, 0, 0)":"unset",backgroundClip:"content-box"},(0,_.mp)({direction:e,[n?"end":"start"]:"0px"})]),"label:DivShadow;"),V=(0,L.default)("div",{target:"e13i6o2413"})((({theme:{colors:e}})=>[{gridColumn:"-2 / -1",gridRow:"1",position:"relative",borderRadius:"8px",background:e.BGPlaceholderDefault,overflow:"hidden",display:"flex",flexDirection:"column"},(0,_.jJ)({max:768,style:{gridColumn:"1 / -1",gridRow:"3",height:"433px"}})]),"label:DivExploreSearchWordCardContainer;"),G=(0,L.default)("div",{target:"e13i6o2414"})((()=>[{display:"flex",flexDirection:"column",width:"100%",position:"absolute",top:0,padding:"16px",fontStyle:"normal",fontWeight:700,lineHeight:"130%",fontSize:"16px"}]),"label:DivExploreSearchWordTitle;"),K=(0,L.default)("div",{target:"e13i6o2415"})((()=>({position:"absolute",top:"40px",bottom:0,width:"100%",overflowY:"scroll",overflowX:"hidden",flex:"1 1"})),"label:DivExploreSearchWordListContainer;"),J=(0,L.default)("ul",{target:"e13i6o2416"})((({theme:{direction:e}})=>[{width:"100%",listStyle:"none","&>li":{paddingBottom:"18px","&:last-child":{paddingBottom:0}}},(0,_.mp)({direction:e,paddingStart:"12px",paddingEnd:"12px"})]),"label:UlExploreSearchWordList;"),U=(0,L.default)("li",{target:"e13i6o2417"})((()=>({display:"flex",lineHeight:"130%",fontWeight:500})),"label:LiExploreSearchWord;"),Q=(0,L.default)("div",{target:"e13i6o2418"})((()=>({width:"20px",height:"20px",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center"})),"label:DivExploreSearchWordListStyle;"),q=(0,L.default)("div",{target:"e13i6o2419"})((({theme:{direction:e}})=>[{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},(0,_.mp)({direction:e,paddingStart:"4px"})]),"label:DivExploreSearchWordText;"),X=(0,L.default)("div",{target:"e13i6o2420"})((({theme:{colors:e}})=>({background:e.TextQuaternary,height:"6px",width:"6px",borderRadius:"50%"})),"label:DivExploreSearchWordListDot;"),Z=(0,L.default)(R.pQ,{target:"e13i6o2421"})((()=>[{borderRadius:"8px",gridColumn:"-2 / -1",gridRow:"1"},(0,_.jJ)({max:768,style:{gridColumn:"1 / -1",gridRow:"3",height:"433px"}})]),"label:DivSkeletonSearchWordCardBody;"),ee=(0,L.default)("div",{target:"e13i6o2422"})((({theme:{colors:e}})=>({color:e.TextPrimary,fontWeight:700,fontSize:20,lineHeight:"25px",marginTop:19})),"label:DivCategoryTitle;");var te=n(97515),ne=n(32125),oe=n(76127),ie=n(67518),re=n(58275);function ae(e=.25,t,n){const[r,a]=(0,i.useState)(null),{direction:l}=(0,ie.u)(),d="ltr"===l,[s,c]=(0,i.useState)(!1),[u,p]=(0,i.useState)(!0),h=(0,b._g)((()=>{if(r){const e=(d?1:-1)*r.scrollLeft,t=r.scrollWidth,n=r.getBoundingClientRect().width;e<=20&&s?c(!1):e>20&&!s&&c(!0),e+n+20>=t&&u?p(!1):e+n+20{(0,i.useEffect)((()=>{t()}),[t]),(0,i.useEffect)((()=>((null==e?void 0:e.addEventListener)&&e.addEventListener("scroll",t,{capture:!1,passive:!0}),()=>{(null==e?void 0:e.removeEventListener)&&e.removeEventListener("scroll",t)})),[e,t])})(r,h);const g=(0,i.useMemo)((()=>window?new window.ResizeObserver((e=>{e[0]&&h()})):null),[]);(0,re.E)((()=>{if(r&&g)return g.observe(r),()=>{g.disconnect()}}),[r]);const m=(0,i.useCallback)((n=>()=>{if(r){const o=n===d?1:-1,i=r.getBoundingClientRect().width;n&&r.scrollLeft+i+20>=r.scrollWidth&&p(!1);const a=i*e,l=t?"content":"category";C.H.handleExploreClickCategoryArrow({type:n?`${l}_right`:`${l}_left`}),r.scrollTo({left:r.scrollLeft+o*a})}}),[r,e,d]),x=(0,i.useCallback)((e=>(0,o.FD)(A,{right:e,style:t,children:[(0,o.Y)(N,{right:e,size:null==n?void 0:n.iconSize,chevronSize:null==n?void 0:n.chevronSize,offset:null==n?void 0:n.iconOffset,onClick:m(e),children:(0,o.Y)(F,{right:e,children:(0,o.Y)(oe.A,{})})}),!(null==n?void 0:n.noShadow)&&(0,o.Y)(H,{right:e})]})),[m,t,n]);return[a,(0,i.useCallback)((()=>(0,o.FD)(o.FK,{children:[s&&x(!1),u&&x(!0)]})),[s,u,x]),h]}var le=n(58542);const de=(0,O.$)()-84,se=(0,i.memo)((function({list:e,onCategoryClick:t}){var n;const{isInNavPhase3:r}=(0,l.vY)(),[{isModalShow:a},d]=(0,m.nO)((e=>({isModalShow:e.isModalShow})),ne.bN),{language:c="en",user:p,abTestVersion:h}=(0,x.L$)((0,f.W)((()=>["language","abTestVersion","user"]),[])),g=(0,i.useCallback)((()=>{d.setIsModalShow(!1)}),[d]),{showLogin:L,loginType:D}=(0,S.parse)((0,T.zy)().search),E=(0,y.K)({query:{enter_method:"login_page_redirect"},loginPath:null!==(n=null==D?void 0:D.toString())&&void 0!==n?n:"/login"}),[_,I]=(0,i.useState)(!0);"1"!==L||p||("/login/download-app"===D?_&&(d.setIsModalShow(!0),I(!1)):E());const Y=(0,s.s)(),[{currentCategory:M,currentCategoryType:R},{setCurrentCategory:B,setCurrentCategoryType:A}]=(0,te.g_)((e=>({currentCategoryType:e.currentCategoryType,currentCategory:e.currentCategory})),ne.bN),N=(0,u.ZX)(),F=(0,i.useRef)(0),[H,V]=(0,i.useState)((0,O.$)()),{isBrowserModeShowing:G}=(0,i.useContext)(v.g),{hasTrendingCard:K}=(0,l.QN)(),J=(0,b._g)((()=>{const e=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop;e<0||G||(e>F.current&&e>=k.hg&&H===(0,O.$)()?V(de):e(window.addEventListener("scroll",J),()=>{window.removeEventListener("scroll",J)})),[J]),(0,i.useEffect)((()=>{G&&V((0,O.$)())}),[G]);const U=(0,i.useCallback)((n=>()=>{const{type:o,name:i}=e[n];if(t)return C.H.handleClickCategory({from_category:M,to_category:i}),void t(n);R!==o&&(B(i),A(o),N.resetExploreList(),N.getExploreList({categoryType:o,language:c,abTestVersion:h,user:p}),C.H.handleClickCategory({from_category:M,to_category:i}),window.scrollTo(0,0))}),[h,M,R,N,c,e,B,A,t,p]),{responsiveVid:Q}=(0,l.mV)(),{isHorizontalLayout:q}=(0,l.ry)(),X="v0"!==Q&&!q,[Z,oe]=ae();return(0,o.FD)(P,{style:{top:K?void 0:`${H}px`},isSticky:K,isNewLayout:X,backgroundColor:r?le.Tj4.UIPageFlat1:void 0,isSideNav:r,children:[K&&(0,o.Y)(ee,{children:Y("pc_web_you_may_like")}),(0,o.FD)(z,{hasTrendingCard:K,isNewLayout:X,children:[oe(),(0,o.Y)(W,{ref:Z,isNewLayout:X,children:e.map((({Icon:e,text:t,name:n},i)=>(0,o.FD)(j,{active:M===n,onClick:U(i),children:[e&&(0,o.Y)(e,{}),(0,o.Y)($,{children:Y(t)})]},i)))})]}),"/login/download-app"===D&&(0,o.Y)(w.u,{visible:a,onClose:g})]})}));var ce=n(36769),ue=n(48615),pe=n(79881),he=n(55453),ge=n(25206),me=n(30085),xe=n(89049),fe=n(25778),ye=n(30434),ve=n(14978),be=n(97335);const we={display:"flex",fontSize:72,fillOpacity:.34},Ce=(0,o.Y)("div",{style:we,children:(0,o.Y)(ye.A,{})}),Se=(0,o.Y)("div",{style:we,children:(0,o.Y)(ve.A,{})}),Te=(0,i.memo)((function({detailInfo:{currentCategoryType:e},listInfo:{statusCode:t}}){const n=(0,u.ZX)(),r=(0,i.useCallback)((()=>{n.resetExploreList(),n.getExploreList({categoryType:e})}),[n,e]);return(0,o.Y)(be.QW,{iconElement:Ce,statusCode:t,onRefresh:r})})),ke=(0,i.memo)((function({detailInfo:{currentCategoryType:e},listInfo:{statusCode:t}}){const n=(0,me.Cw)(),r=(0,i.useCallback)((()=>{n.resetExploreList({categoryType:e}),n.getExploreList({categoryType:e})}),[n,e]);return(0,o.Y)(be.QW,{iconElement:Ce,statusCode:t,onRefresh:r})})),Le=(0,i.memo)((function(){const e=(0,s.s)(),t=(0,i.useMemo)((()=>({title:e("pc_web_empty_state_novid_header"),desc:e("pc_web_empty_state_novid_body")})),[e]),n=(0,te.eO)((e=>e.currentCategory),ne.bN);return(0,i.useEffect)((()=>{C.H.handleNoMoreVideosShow({tab_name:n})}),[n]),(0,o.Y)(be.LL,{iconElement:Se,emptyTip:t})}));var De=n(86902),Ee=n(11236),_e=n(43836),Ie=n(11417),Ye=n(21367),Me=n(78208),Re=n(67169),Oe=n(44926),Be=n(30440),Pe=n(33329),ze=n(31344),We=n(60072),je=n(36764),$e=n(30349);const Ae=(0,L.default)("div",{target:"ex843ls0"})({position:"relative",width:"100%",height:"418px",marginBottom:"40px"},"label:DivHorizontalListContainer;"),Ne=(0,L.default)("div",{target:"ex843ls1"})({position:"relative",width:"100%",overflowX:"auto",overflowY:"hidden",height:"352px"},"label:DivHorizontalListSkeletonContainer;"),Fe=(0,L.default)("div",{target:"ex843ls2"})({position:"relative",width:"100%"},"label:DivHorizontalListsContainer;"),He=(0,L.default)("div",{target:"ex843ls3"})({scrollBehavior:"smooth",scrollbarWidth:"none",scrollbarColor:"transparent transparent","&::-webkit-scrollbar":{display:"none",width:0},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:"transparent"}},"label:DivFeedScroll;"),Ve=(0,i.forwardRef)(((e,t)=>(0,o.Y)(He,Object.assign({ref:t},e)))),Ge=(0,L.default)("h1",{target:"ex843ls4"})((({theme:e})=>({fontSize:"32px",lineHeight:"38.4px",marginBottom:"20px",color:e.colors.TextPrimary,fontFamily:e.fontFamilies.TikTokDisplayFont,fontWeight:e.fontWeights.bold,textAlign:"rtl"===e.direction?"right":"left",width:"100%"})),"label:H1CategoryTitle;");var Ke=n(84827),Je=n(65681);const Ue=(0,i.memo)((function({style:e}){return(0,o.Y)("div",{style:Object.assign(Object.assign({},e),{display:"flex",alignItems:"center",justifyContent:"center",height:"calc(100% - 66px)"}),children:(0,o.Y)(Ke.R,{})})})),Qe=(0,i.memo)((function({index:e,data:t,style:n}){var i,r,a;const{direction:l}=(0,ie.u)();if(e>=t.itemList.length)return(0,o.Y)(Ue,{style:n});const d=t.itemList[e];return(0,o.Y)(Je.x,{index:e,data:t,style:Object.assign(Object.assign(Object.assign({},n),"rtl"===l?{left:Number(null!==(i=n.left)&&void 0!==i?i:0)+M.Oy}:{right:Number(null!==(r=n.right)&&void 0!==r?r:0)+M.Oy}),{width:Number(null!==(a=n.width)&&void 0!==a?a:0)-M.Oy})},d)})),qe={paddingBottom:90},Xe=(0,i.memo)((0,Ie.h)()((function({mode:e="compact",loading:t,itemList:n,pageType:r,itemListKey:a,loadMore:l,frozen:s,borderRadius:c,teaParams:u,searchTopCardType:p,exploreCategoryType:h,autoPlay:g=!0,isActive:m=!1,handleClick:x,handleVideoClick:f,searchType:y,hasMore:b=!0,mute:w=!0,hasSound:C=!1,handleToggleMute:S}){const T=(0,i.useRef)(0),k=(0,Ye.nr)(),L=(0,Ye.GF)();(0,i.useEffect)((()=>{if(L){const e=n.indexOf(L);e>-1&&e!==T.current&&(T.current=e)}}),[L,n]);const D=n[T.current],E=(0,We.F3)((e=>e[D])),{showVideoMask:_}=(0,Me.d)({item:null!=E?E:{},playMode:1}),I=(0,i.useRef)(!1),Y=(0,i.useRef)(a);(0,i.useEffect)((()=>{a!==Y.current&&(I.current=!1,Y.current=a)}),[a]),(0,i.useEffect)((()=>{!_&&!I.current&&m&&g&&n.length&&k.updateVideo({currentVideo:{id:D,index:T.current,mode:1},teaParams:{isThreeColumnAuto:!0},playProgress:0,playType:"automatic"}),I.current=m}),[_,n,g,m,D,k]),(0,Re.Ux)(1);const R=3===r||105===r||107===r||123===r||16===r||61===p,O=(0,i.useRef)([]),B=(0,i.useCallback)((e=>t=>{O.current[e]=t}),[]),P=(0,d.JD)((e=>e.currentIndex)),z=(0,Oe.Sb)(),{isBrowserModeShowing:W}=(0,i.useContext)(v.g),j=(0,je.Gb)(),$=(0,i.useCallback)((()=>{s||t||W||null==l||l()}),[s,t,l,W]),A=(0,i.useRef)(null);(0,i.useEffect)((()=>{let e;if("explore"===a&&W&&0!==P){const{itemListKey:t,index:n}=z.getSourceIndex(P);return t===a&&h===j&&(e=setTimeout((()=>{var t;e=void 0,null===(t=A.current)||void 0===t||t.scrollToItem(n,"center")}),0)),()=>e&&clearTimeout(e)}}),[P,W,a,z,h,j]);const N=(0,$e.N)();(0,Be.V)(n,N);const F=(0,We.F3)((e=>{const t=[];return n.forEach((n=>{if(!N)return;const o=e[n];(null==o?void 0:o.video.subtitleInfos)&&t.push(o)})),t}),ne.bN);(0,Pe.t)(F,N);const H=(0,i.useMemo)((()=>({itemList:n,mode:e,pageType:r,borderRadius:c,itemListKey:a,hasDescUnderItem:R,teaParams:u,searchTopCardType:p,handleClick:x,handleVideoClick:f,searchType:y,mute:w,hasSound:C,handleToggleMute:S,getItemRef:B,exploreCategoryType:h})),[n,e,r,c,a,R,u,p,x,f,y,w,C,S,B,h]),V=(0,i.useMemo)((()=>n.length>=200||!b?n.length:n.length+1),[n.length,b]),G=(0,i.useRef)(V),{direction:K}=(0,ie.u)(),[J,U,Q]=ae(.8,qe,{iconSize:48,chevronSize:24,iconOffset:-24,noShadow:!0});return(0,i.useEffect)((()=>{G.current!==V&&(Q(),G.current=V)}),[V,Q]),(0,o.FD)(Ae,{children:[(0,o.Y)(Ee.Ay,{children:({height:t,width:i})=>(0,o.Y)(De.A,{isItemLoaded:e=>!b||e(0,o.Y)(_e.Y1,{"data-e2e":`${a}-item-list${null!=h?h:0}`,outerElementType:Ve,layout:"horizontal",onItemsRendered:n,ref:e=>{"function"==typeof r&&r(e),A.current=e},direction:K,height:t,width:i,itemData:H,itemCount:V,overscanCount:3,itemSize:(t-90)*ze.f[e].ratio+M.Oy,outerRef:J,children:Qe})})}),U()]})})));function Ze({data:{mode:e,aspectRatio:t,direction:n},style:i}){var r,a,l;return(0,o.Y)(R.pQ,{mode:e,aspectRatio:t,style:Object.assign(Object.assign(Object.assign({},i),"rtl"===n?{left:Number(null!==(r=i.left)&&void 0!==r?r:0)+M.Oy}:{right:Number(null!==(a=i.right)&&void 0!==a?a:0)+M.Oy}),{width:Number(null!==(l=i.width)&&void 0!==l?l:0)-M.Oy})})}const et=(0,i.memo)((function({mode:e,aspectRatio:t=208/276}){const{direction:n}=(0,ie.u)();return(0,o.Y)(Ne,{children:(0,o.Y)(Ee.Ay,{children:({height:i,width:r})=>(0,o.Y)(_e.Y1,{layout:"horizontal",outerElementType:Ve,direction:n,height:i,width:r,itemData:{mode:null!=e?e:"explore",aspectRatio:t,direction:n},itemCount:6,itemSize:352*t+M.Oy,children:Ze})})})})),tt=20-78.4-k.hg;function nt(){const{ratio:e}=(0,l.mV)();return(0,o.Y)(et,{mode:"explore",aspectRatio:e})}const ot=function({listInfo:e,detailInfo:t}){const{list:n,loading:i,preloadList:r}=e,{mute:a,hasSound:d,handleToggleMute:s,currentCategoryType:c,index:u,isActive:p}=t,{isGoogleBot:h}=(0,x.L$)((0,ue.U)((()=>["isGoogleBot"]),[])),g=(0,fe.C1)(c),{loadMoreConfig:m,loadMoreHandler:f}=(0,fe.pn)(c);(0,pe.GL)({itemListKey:"explore",exploreCategoryType:c,config:m,handler:f});const y=(0,l.uT)();return 0===u&&(y?(0,he.xB)(null!=r?r:[]):(0,ge.$D)(null!=r?r:[])),(0,o.Y)(Xe,{mute:a,hasSound:d,exploreCategoryType:c,isActive:p,handleToggleMute:s,pageType:19,itemListKey:"explore",itemList:n,mode:"explore",loading:i,loadMore:g,ssrLimit:16,ssrLimitDisable:h,borderRadius:"8px"})},it=(0,i.memo)((function({index:e,data:t,isActive:n,style:r}){const a=(0,s.s)(),l=t[e],[d,c]=(0,me.V2)((e=>{var t;return null!==(t=e[l.type])&&void 0!==t?t:xe.hA}),ne.bN),{mute:u,volume:h,handleToggleMute:m}=(0,fe.Ys)(),x=(0,i.useMemo)((()=>({statusCode:0,index:e,currentCategory:l.name,currentCategoryType:l.type,mute:u,volume:h,handleToggleMute:m,hasSound:!0,isActive:n})),[l,m,u,h,e,n]);return(0,p.o)((()=>{return e=this,t=void 0,o=function*(){if(0===d.list.length)return c.getExploreList({categoryType:l.type})},new((n=void 0)||(n=Promise))((function(i,r){function a(e){try{d(o.next(e))}catch(e){r(e)}}function l(e){try{d(o.throw(e))}catch(e){r(e)}}function d(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}d((o=o.apply(e,t||[])).next())}));var e,t,n,o}),[l.type,d.list.length,c]),(0,o.FD)("div",{style:r,children:[(0,o.Y)(Ge,{children:a(l.text)}),(0,o.Y)(g.s6,{detailInfo:x,listInfo:d,List:ot,Error:ke,Empty:Le,Skeleton:nt,listKey:"explore"})]})})),rt=(0,i.memo)((function({categories:e,selectedCategory:t}){var n,r;const a=(0,i.useRef)(null),l=(0,ce.XW)({count:e.length,estimateSize:(0,i.useCallback)((()=>516.4),[]),overscan:1,scrollMargin:null!==(r=null===(n=a.current)||void 0===n?void 0:n.offsetTop)&&void 0!==r?r:0});!function(e,t){const n=(0,i.useRef)(t.index);(0,i.useEffect)((()=>{if(e.isScrolling&&n.current===t.index)return;if(n.current=t.index,0===t.index)return void e.scrollToOffset(0);const o=e.scrollOffset,[i]=e.getOffsetForIndex(t.index,"start"),r=i+tt,a=i+-78.4;Math.abs(o-r)<=1||e.scrollToOffset(o>r?r:a)}),[e,t])}(l,t);const d=function(e){const[t,n]=(0,i.useState)(0),o=(0,i.useCallback)((()=>{const t=e.getVirtualItems().map((t=>({index:t.index,ratio:(Math.min(t.end,e.scrollOffset+e.scrollRect.height)-Math.max(t.start,e.scrollOffset))/(t.end-t.start)}))).reduce(((e,t)=>t.ratio>e.ratio?t:e),{index:0,ratio:0});n(t.index)}),[e]);return(0,i.useEffect)((()=>(window.addEventListener("scrollend",o),()=>window.removeEventListener("scrollend",o))),[o]),t}(l);return(0,o.Y)(Fe,{ref:a,children:(0,o.Y)("div",{style:{height:`${l.getTotalSize()}px`,width:"100%",position:"relative"},children:l.getVirtualItems().map((t=>(0,o.Y)(it,{index:t.index,data:e,isActive:d===t.index,style:{position:"absolute",top:0,left:0,width:"100%",height:`${t.size}px`,transform:`translateY(${t.start-l.options.scrollMargin}px)`}},t.key)))})})})),at=(0,L.default)(be.EA,{target:"e1xwrm610"})((({isAspectRatioLayout:e,isHorizontalLayout:t,isCategoriesHidden:n,isTrendingTopicsActive:o})=>{let i=88,r=64,a=k.hg;return n?(i=24,r=24,a=24):t&&(a+=6),o&&(a=19),[{padding:e?`${i}px 32px 32px`:`${a}px 48px 32px`},e?{"@media screen and (max-width: 703px)":{maxWidth:"unset"},"@media screen and (min-width: 704px) and (max-width: 903px)":{maxWidth:"unset"},"@media screen and (min-width: 904px) and (max-width: 1271px)":{maxWidth:"unset"},"@media screen and (min-width: 1272px) and (max-width: 1471px)":{maxWidth:"unset"},"@media screen and (min-width: 1472px) and (max-width: 1671px)":{maxWidth:"unset"},"@media screen and (min-width: 1672px) and (max-width: 1871px)":{maxWidth:"unset"},"@media screen and (min-width: 1872px)":{maxWidth:"unset"}}:{},e?(0,_.jJ)({max:M.PF,style:{padding:`${r}px 12px 32px`}}):{}]}),"label:ExploreLayout;");var lt=n(19744),dt=n(20934),st=n(32337),ct=n(65404),ut=n(34393),pt=n(18499),ht=n(39228),gt=n(39785),mt=n(28086),xt=n(84908),ft=function(e,t,n,o){return new(n||(n=Promise))((function(i,r){function a(e){try{d(o.next(e))}catch(e){r(e)}}function l(e){try{d(o.throw(e))}catch(e){r(e)}}function d(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}d((o=o.apply(e,t||[])).next())}))};const yt=(0,gt.M)({csr:function(e){return ft(this,void 0,void 0,(function*(){return yield ht.hd.get("/api/trending/topics/info",{query:e,baseUrlType:2})}))}}),vt=(0,mt.z)({initState:{statusCode:0,statusMsg:"",trendingTopics:[],loading:!0,gotError:!1},rehydrationDataKey:"desktop.explorePage.trendingTopics",fetchAction:(e,t)=>ft(void 0,void 0,void 0,(function*(){try{const e=yield yt(t),{statusCode:n=0,statusMsg:o="",trendingTopics:i=[]}=e,r=[],a=[],l=i.map((e=>{var t;const n=null==e?void 0:e.item;n&&r.push(n);const o=null==n?void 0:n.author;return o&&a.push(o),{rank:e.rank,searchWords:e.searchWords,id:null!==(t=null==n?void 0:n.id)&&void 0!==t?t:""}}));return(0,pt.unstable_batchedUpdates)((()=>{(0,xt.Gp)().multiSetUser(a),(0,We.ud)().multiSetItem(r)})),{loading:!1,statusCode:n,statusMsg:o,trendingTopics:l,gotError:l.length<9}}catch(t){return Object.assign(Object.assign({},e),{loading:!1,statusCode:-1,gotError:!0})}}))});vt.debugLabel="trendingTopicsAtom";var bt=n(99334);const wt=(0,L.default)("div",{target:"e11xe7oh0"})((({theme:{colors:e}})=>({fontWeight:700,fontSize:"20px",lineHeight:"25px",color:e.TextPrimary,paddingBottom:"8px"})),"label:DivTitle;"),Ct=(0,L.default)("div",{target:"e11xe7oh1"})({width:"100%",height:"339px",marginBottom:13,userSelect:"none"},"label:DivTopicsWrapper;"),St=(0,L.default)("div",{target:"e11xe7oh2"})({flex:"1 1 auto",width:"204px",height:"270px",borderRadius:"12px",boxShadow:"0px 2px 12px 0px rgba(0, 0, 0, 0.12)",borderRight:"8px",overflow:"hidden"},"label:DivPreviewCardWrap;"),Tt=(0,L.default)("div",{target:"e11xe7oh4"})({height:272,position:"relative",display:"flex",justifyContent:"center",alignItems:"center",".swiper-slide":{width:"208px!important"},".swiper-coverflow":{margin:"0 18px","@media screen and (min-width: 1656px)":{maxWidth:"1220px"},"@media screen and (min-width: 1460px) and (max-width: 1655px)":{maxWidth:"1024px"},"@media screen and (min-width: 1232px) and (max-width: 1459px)":{maxWidth:"796px"},"@media screen and (max-width: 1231px)":{maxWidth:"527px"}},".swiper-wrapper":{marginLeft:"2px"}},"label:DivSwiperWrapper;"),kt=(0,L.default)("div",{target:"e11xe7oh5"})((({theme:{colors:e,direction:t}})=>({background:e.BGQuinary,boxShadow:"0px 2px 16px rgba(0, 0, 0, .12)",width:32,height:32,borderRadius:"20px",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:"0",transform:"rtl"===t?"rotate(180deg)":void 0})),"label:DivBtn;"),Lt=(0,L.default)("div",{target:"e11xe7oh6"})((({theme:{colors:e}})=>({color:e.TextPrimary,fontSize:"16px",fontWeight:500,lineHeight:1.3,textAlign:"center",paddingTop:"13px"})),"label:DivKeyWords;"),Dt=(0,L.default)("div",{target:"e11xe7oh7"})((({theme:{colors:e}})=>({width:204,height:272,background:e.BGPlaceholderOpaque,borderRadius:"12px",boxShadow:"0px 2px 12px 0px rgba(0, 0, 0, 0.12)",flexShrink:0,zIndex:"4"})),"label:DivSkeletonCard;");const Et=(0,i.memo)((e=>{const{cardInfo:t,isActive:n}=e,r=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i{C.H.handleTrendingTopicPlay({topic_rank:t.rank})}),[]);return(0,o.Y)(St,{children:(0,o.Y)(bt.g4,Object.assign({id:a,itemListKey:"trending_topics",mode:"compact",pageType:19,hasDescUnderItem:!1,hasSound:n,handleVideoPlay:l},r),a)})}));var _t=n(23532),It=n(43271),Yt=n(46682);const Mt=Math.round(4.5),Rt={rotate:0,stretch:20,depth:120,modifier:1,slideShadows:!1},Ot=[lt.t9,lt.FJ],Bt=(0,i.memo)((()=>{const e=(0,s.s)(),t=(0,i.useRef)(null),{trendingTopics:n,gotError:r}=(()=>{const[{atomState:{trendingTopics:e=[],gotError:t=!1}},n]=(0,mt.I)(vt,{resetStateBeforeDispatch:!1,skipFirstClientDispatch:!1}),{region:o}=(0,x.L$)((0,f.W)((()=>["region"]),[]));(0,p.o)((()=>{return e=void 0,t=void 0,r=function*(){n({region:o})},new((i=void 0)||(i=Promise))((function(n,o){function a(e){try{d(r.next(e))}catch(e){o(e)}}function l(e){try{d(r.throw(e))}catch(e){o(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(a,l)}d((r=r.apply(e,t||[])).next())}));var e,t,i,r}),[n]);let r=[];if(e.length||t){const t=e.filter(((e,t)=>t%2==0)),n=e.filter(((e,t)=>t%2>0));r=t.concat(n.reverse())}else r=new Array(9).fill(null);return(0,i.useMemo)((()=>({trendingTopics:r,gotError:t})),[e,t])})(),a=n.length,l=a>9,c=(0,i.useCallback)((e=>{t.current=e}),[]),{activeIndex:u,handleNext:h,handlePre:g,handleGotoBrowserMode:m,handleAutoNext:y,handleActiveIndexChange:b}=((e,t)=>{var n;const[o,r]=(0,i.useState)(0),a=(0,i.useRef)(""),l=(0,Ye.nr)(),s=(0,i.useRef)(-1),c=(0,i.useRef)(!1),u=(0,i.useRef)(!1),{showBrowserMode:p}=(0,i.useContext)(v.g),h=(0,d.YZ)(),[{list:g,loading:m,hasMore:x},y]=(0,Yt.S)(_t.O,{selector:e=>{var t;return null!==(t=e.search_video)&&void 0!==t?t:{list:[],loading:!1,hasMore:!0}},dependencies:[]}),b=(0,i.useCallback)((()=>{e&&e.slideNext()}),[e]),w=(0,i.useCallback)((()=>{e&&e.slidePrev()}),[e]),S=(0,i.useCallback)((()=>{null==e||e.slideNext()}),[e,t]),T=(0,i.useCallback)((e=>{if(!t||!t.length)return;const n=e.realIndex;if(!t[n])return;c.current?c.current=!1:l.updateVideo({currentVideo:{id:t[n].id,index:n,mode:1},teaParams:{isThreeColumnAuto:!0},playProgress:0});const i=t[o],a=t[n];r(n),C.H.handleTrendingTopicSwitch({scroll_direction:o["user","language","abTestVersion"]),[]))&&void 0!==n?n:{},_=(0,i.useCallback)(((n,o)=>{var i;const r=t.findIndex((e=>e.id===o));s.current=r,y.setItemListById({key:"search_video",list:[o],statusCode:200,hasMore:!0});const l=null!==(i=t[r])&&void 0!==i?i:{searchWords:"",rank:0};a.current=l.searchWords,k.setSearchResult({key:"video",result:{keyword:l.searchWords,loading:!1,hasMore:!0,cursor:0,items:[o]}}),h.setItemListKey("search_video"),p({index:0,itemListKey:"search_video"}),C.H.handleTrendingToBrowserMode({topic_rank:l.rank}),c.current=!0,null==e||e.slideToLoop(r,400,!1)}),[t]),{showingBrowserMode:I,currentIndex:Y}=(0,d.JD)((e=>({showingBrowserMode:e.showingBrowserMode,currentIndex:e.currentIndex})),ne.bN);return(0,i.useEffect)((()=>{t.length>9&&!u.current&&(u.current=!0,l.updateVideo({currentVideo:{id:t[0].id,index:0,mode:1},teaParams:{isThreeColumnAuto:!0},playProgress:0}))}),[t]),(0,i.useEffect)((()=>{!I&&s.current>=0&&(null==e||e.slideToLoop(s.current,200,!1))}),[I,e]),(0,i.useEffect)((()=>{const e=g.length;I&&e-Y<3&&!m&&x&&k.getVideoSearch({filterId:1===e?g[0]:void 0,keyword:a.current,user:L,language:D,abTestVersion:E})}),[I,Y,g,m,x]),{activeIndex:o,handleNext:b,handlePre:w,handleGotoBrowserMode:_,handleAutoNext:S,handleActiveIndexChange:T}})(t.current,n),{mute:w,volume:S,handleToggleMute:T}=(0,fe.Ys)(),k=n[u];return(0,i.useEffect)((()=>{r&&C.H.handleTrendingTopicEmpty()}),[r]),r?null:(0,o.FD)(Ct,{children:[(0,o.Y)(wt,{children:e("Web_explorePage_dynamicCategories_trendingToday")}),(0,o.Y)("link",{rel:"stylesheet",href:st}),(0,o.FD)(Tt,{children:[l?(0,o.Y)(kt,{onClick:g,children:(0,o.Y)(ct.p,{size:16})}):null,(0,o.Y)(dt.RC,{tabIndex:-1,loopedSlides:Mt,onInit:c,speed:400,loop:!0,effect:"coverflow",modules:Ot,centeredSlides:!0,allowSlideNext:!0,allowSlidePrev:!0,preventClicks:!1,onActiveIndexChange:b,mousewheel:!0,coverflowEffect:Rt,preventClicksPropagation:!1,slidesPerView:"auto",children:n.map(((e,n)=>(0,o.Y)(dt.qr,{children:({isDuplicate:i,isActive:r})=>{var l;const d=((e,t,n,o)=>{let i=!1,r=!1;if(o){const o=8,i=n/2;r=e-n<=o&&e-n>0&&ti}else{const n=t+Mt;i=Math.abs(n-e)<=Mt}return i||r})(null===(l=t.current)||void 0===l?void 0:l.activeIndex,n,a,i);return d&&e?(0,o.Y)(Et,{index:n,mute:w,volume:S,handleVideoEnd:y,handleToggleMute:T,handleClick:m,cardInfo:e,isActive:r}):(0,o.Y)(Dt,{})}},n)))}),l?(0,o.Y)(kt,{onClick:h,children:(0,o.Y)(ut.a,{size:16})}):null]}),(0,o.Y)(Lt,{children:null==k?void 0:k.searchWords})]})}));var Pt=n(92866),zt=n(66551),Wt=n(85426),jt=n(34131),$t=n(58305),At=n(58632),Nt=n(64738),Ft=n(34360),Ht=n(71111),Vt=n(50970),Gt=n(54888),Kt=n(71281),Jt=n(9991),Ut=n.n(Jt),Qt=n(43134),qt=n.n(Qt);const Xt=(0,gt.M)({csr:function(){return window.location.search}});const Zt=(0,Ft.y)(Vt.L),en=(0,Ft.y)(Gt.$),tn=(0,Ht.atom)((e=>{var t,n,o;const{appContext:i}=e(Zt),{bizContext:r}=e(en),a=null!==(n=null===(t=null==i?void 0:i.env)||void 0===t?void 0:t.type)&&void 0!==n?n:"prod",l=null!==(o=null==r?void 0:r.canUseQuery)&&void 0!==o&&o,d="ppe"===a||"boe"===a||(0,Kt.tU)();return{isDebugEnv:d||l,isDebugPanelEnable:d}})),nn=(0,mt.z)({initState:{loading:!0},rehydrationDataKey:"shared.debug.queryParams",fetchAction:()=>(0,At.__awaiter)(void 0,void 0,void 0,(function*(){var e;return Object.assign(Object.assign({},null!==(e=function(){const e=Xt(),t=(0,S.parse)(e,{parseNumbers:!0,parseBooleans:!0}),n={};return Object.keys(t).forEach((e=>{if(null!==t[e])if(e.includes(".")){const[o,i]=e.split(".");n[o]=Object.assign(Object.assign({},function(e,t){return qt()(e,t)&&Ut()(e[t])?e[t]:{}}(n,o)),{[i]:t[e]})}else n[e]=t[e]})),n}())&&void 0!==e?e:{}),{loading:!1})}))});var on=n(82715),rn=n(65365),an=n(2584),ln=function(e,t,n,o){return new(n||(n=Promise))((function(i,r){function a(e){try{d(o.next(e))}catch(e){r(e)}}function l(e){try{d(o.throw(e))}catch(e){r(e)}}function d(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}d((o=o.apply(e,t||[])).next())}))};const dn=(0,gt.M)({csr:function(e){return ln(this,void 0,void 0,(function*(){return yield ht.hd.get("/api/trending/searchwords/",{query:e,baseUrlType:2})}))}}),sn=(0,mt.z)({initState:{statusCode:0,statusMessage:"",wordList:[],loading:!0},rehydrationDataKey:"desktop.explorePage.trendingSearchWords",fetchAction:(e,t)=>ln(void 0,void 0,void 0,(function*(){try{const e=yield dn(t),{status_code:n=0,status_msg:o="",trending_search_words:i=[]}=e;return{loading:!1,statusCode:n,statusMessage:o,wordList:i}}catch(t){return Object.assign(Object.assign({},e),{loading:!1,statusCode:-1})}}))});const cn=(0,i.memo)((function({text:e,index:t}){var n;const r=Date.now(),a=on.$T.searchHome(),l=(0,T.zy)(),d=(0,fe.E0)(),s=(0,T.W6)(),c=(0,jt.F)({location:l,to:{pathname:a,search:{q:e,t:r}}}),u=(0,i.useCallback)((n=>{(0,$t.Gu)(n),rn.$G.handleTrendingWordsClick(Object.assign(Object.assign({},d),{words_position:t,words_content:e})),n.metaKey||n.ctrlKey?window.open(c):s.push(c,{enterFrom:"explore_page"})}),[c,t,e,d,s]),p=(0,y.G)({actionWhenUserLoggedIn:u,modalConfig:{query:{enter_method:"explore_all"}},reportClickEvent:()=>{an.O.handleGeneralClick("explore_trending_search",{scene:"explore_page",click_url:c})}}),{searchVideoForLoggedin:h=!1}=null!==(n=(0,ue.U)((()=>["searchVideoForLoggedin"]),[]))&&void 0!==n?n:{};return(0,o.Y)("a",{onClick:h?p:u,children:e})})),un=(0,i.memo)((function({word:e,index:t}){const{trendingSearchWord:n,trendingSearchWordType:r}=e,{colors:a}=(0,ie.u)(),l=(0,fe.E0)(),d=(0,i.useMemo)((()=>r===k.WI.HOT?(0,o.Y)(Wt.A,{width:16,height:16,fill:a.Primary}):(0,o.Y)(X,{})),[r,a]);return(0,i.useEffect)((()=>{rn.$G.handleTrendingWordsShow(Object.assign(Object.assign({},l),{words_position:t,words_content:n}))}),[n,t,l]),(0,o.FD)(U,{children:[(0,o.Y)(Q,{children:d}),(0,o.Y)(q,{"data-e2e":"explore-trendingSearch-item",children:(0,o.Y)(cn,{text:n,index:t})})]})}));(0,i.memo)((function(){const e=(0,s.s)(),t=!1,n=(0,fe.E0)(),{value:r,loading:a}=function({name:e,defaultValue:t,predicate:n}){const[{atomState:o},r]=(0,mt.I)(nn),{isDebugEnv:a}=(0,Nt.useAtomValue)(tn);return(0,p.o)((()=>(0,At.__awaiter)(this,void 0,void 0,(function*(){return a?r():null}))),[a,r]),(0,i.useMemo)((()=>{var i;if(!a)return{value:t,loading:!1};if(!Object.prototype.hasOwnProperty.call(o,e))return{value:t,loading:o.loading};const r=o[e];return null===(i=null==n?void 0:n(r))||void 0===i||i?{value:r,loading:!1}:{value:t,loading:!1}}),[o,e,t,n,a])}({name:"explore_trending_words_count",defaultValue:15}),[{atomState:{statusCode:l,loading:d,wordList:c}},u]=(0,mt.I)(sn,{resetStateBeforeDispatch:!0,skipFirstClientDispatch:!1});return(0,p.o)((()=>{return e=this,t=void 0,o=function*(){},new((n=void 0)||(n=Promise))((function(i,r){function a(e){try{d(o.next(e))}catch(e){r(e)}}function l(e){try{d(o.throw(e))}catch(e){r(e)}}function d(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}d((o=o.apply(e,t||[])).next())}));var e,t,n,o}),[t,r,u,a]),(0,i.useEffect)((()=>{c.length>0&&rn.$G.handleTrendingShow(Object.assign(Object.assign({},n),{words_num:c.length,raw_query:""}))}),[c,n]),d?(0,o.Y)(Z,{}):0!==l||0===c.length?(0,o.Y)(o.FK,{}):(0,o.FD)(V,{children:[(0,o.Y)(G,{"data-e2e":"explore-trendingSearch-title",children:e("pc_web_you_may_like",{},"You may like")}),(0,o.Y)(K,{children:(0,o.Y)(J,{"data-e2e":"explore-trendingSearch-list",children:c.map(((e,t)=>(0,o.Y)(un,{word:e,index:t},e.trendingSearchWord)))})})]})}));var pn=n(98796);function hn(){const{ratio:e,isMasonry:t}=(0,l.mV)();return(0,o.Y)(Pt.C,{mode:"explore",aspectRatio:e,isMasonry:t})}const gn=function({listInfo:e,detailInfo:t}){const{list:n,loading:i,preloadList:r}=e,{mute:a,hasSound:d,handleToggleMute:s,currentCategoryType:c}=t,{isGoogleBot:u}=(0,x.L$)((0,ue.U)((()=>["isGoogleBot"]),[])),p=(0,fe.C1)(),{loadMoreConfig:h,loadMoreHandler:g}=(0,fe.pn)();(0,pe.GL)({itemListKey:"explore",config:h,handler:g}),(0,l.uT)()?(0,he.xB)(null!=r?r:[]):(0,ge.$D)(null!=r?r:[]);const{isMasonry:m}=(0,l.mV)(),{hasTrendingCard:f}=(0,l.QN)(),y=(0,pn.X)(vt,{selector:e=>!!e&&e.gotError,equalityFn:ne.bN}),v=!f||y;return(0,o.Y)(zt.Z,{mute:a,hasSound:d,handleToggleMute:s,pageType:19,itemListKey:"explore",itemList:n,mode:"explore",loading:i,onHitBottom:p,ssrLimit:16,ssrLimitDisable:u,borderRadius:"8px",isMasonry:m,autoPlayFirst:v,children:!1})},mn=(0,i.memo)((function(){const e=(0,te.eO)(),t=(0,u.Ql)(),{mute:n,volume:r,handleToggleMute:a}=(0,fe.Ys)(),l=(0,i.useMemo)((()=>Object.assign(Object.assign({},e),{statusCode:0,mute:n,volume:r,handleToggleMute:a,hasSound:!0})),[e,a,n,r]);return(0,o.Y)(g.s6,{detailInfo:l,listInfo:t,List:gn,Error:Te,Empty:Le,Skeleton:hn,listKey:"explore"})}));const xn=(0,g.JP)("explore")((0,a.c)("explore_page")((function({containerID:e,tabIndex:t}){var n;const{responsiveVid:a}=(0,l.mV)(),{isCategoryEnabled:g,isHorizontalLayout:m,isCategoryInPageJumpEnabled:x}=(0,l.ry)(),{hasTrendingCard:f}=(0,l.QN)(),y=(0,d.JD)((e=>e.jumpSamePageTime)),v=(0,u.ZX)(),[{currentCategory:b,currentCategoryType:w},C]=(0,te.g_)((e=>({currentCategory:e.currentCategory,currentCategoryType:e.currentCategoryType})),ne.bN),S=(0,T.zy)(),k=(0,s.s)();(0,c.f3)(),(0,h.x)("explore_page",y);const L=(0,fe.tZ)(),[D,E]=(0,i.useState)({index:0}),_=null===(n=S.state)||void 0===n?void 0:n.categoryInitialized,I=(0,i.useCallback)((e=>{E({index:e})}),[E]),Y=x?I:void 0;return(0,p.o)((()=>{return e=this,t=void 0,o=function*(){if(!m&&!_){const e=L[0];return!b&&C.setCurrentCategory(e.name),!w&&C.setCurrentCategoryType(e.type),[v.getExploreList({categoryType:e.type}),()=>{C.setCurrentCategory(e.name),C.setCurrentCategoryType(e.type),v.resetExploreList()}]}},new((n=void 0)||(n=Promise))((function(i,r){function a(e){try{d(o.next(e))}catch(e){r(e)}}function l(e){try{d(o.throw(e))}catch(e){r(e)}}function d(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}d((o=o.apply(e,t||[])).next())}));var e,t,n,o}),[L,v,C]),(0,o.FD)(o.FK,{children:[(0,o.FD)(r.mg,{children:[(0,o.Y)("title",{children:k("pc_web_explore_meta_title")}),(0,o.Y)("meta",{name:"description",content:k("pc_web_explore_meta_desc")})]}),(0,o.FD)(at,{id:e,tabIndex:t,isAspectRatioLayout:"v0"!==a&&!m,isHorizontalLayout:m,isCategoriesHidden:!g,isTrendingTopicsActive:f,children:[f&&(0,o.Y)(Bt,{}),g&&(0,o.Y)(se,{list:L,onCategoryClick:Y}),m?(0,o.Y)(rt,{categories:L,selectedCategory:D}):(0,o.Y)(mn,{})]})]})})))},58275:(e,t,n)=>{n.d(t,{E:()=>o});const o=n(40099).useLayoutEffect},22568:(e,t,n)=>{n.d(t,{U:()=>p});var o=n(24643),i=n(40099),r=n(90159),a=n(62186),l=n(72153);const d=(0,a.default)("div",{target:"e1b4u1n0"})({position:"absolute",padding:"0 4px",top:"0",transformOrigin:"right top",transition:"opacity .5s",opacity:0},(({theme:{direction:e}})=>{const t=(0,l.t7)(e,"end");return[(0,l.mp)({direction:e,end:"0"}),{transformOrigin:`${t} top`}]}),"label:DivScrollBar;"),s=(0,a.default)("div",{target:"e1b4u1n1"})({overflowX:"hidden",overflowY:"auto",overscrollBehaviorY:"contain",perspective:"1px",transformStyle:"preserve-3d","::-webkit-scrollbar":{width:0,height:0},[`:hover ${d}`]:{opacity:1}},(({theme:{direction:e}})=>{const t=(0,l.t7)(e,"end");return[(0,l.mp)({direction:e,paddingEnd:"12px"}),{perspectiveOrigin:`${t} top`}]}),"label:DivScrollContainer;"),c=(0,a.default)("div",{target:"e1b4u1n2"})("label:DivScrollWrapper;"),u=(0,a.default)("div",{target:"e1b4u1n3"})((({theme:{colors:e}})=>({width:"6px",height:"100%",borderRadius:"3px",background:e.BGPlaceholderDefault})),"label:DivScrollBarThumb;"),p=(0,i.memo)((0,i.forwardRef)((function({children:e,Wrapper:t=c,onScroll:n,onScrollBottom:a,bottomThreshold:l=100,className:p,style:h,wrapperStyle:g},m){const x=(0,i.useRef)(null),[f,y]=(0,i.useState)(0),[v,b]=(0,i.useState)(0),w=(0,i.useMemo)((()=>{const e=f>=v?0:Math.pow(f,2)/v,t=(f-e)/(v-f);return{height:e,transform:`matrix3d(${[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,-1].join(",")}) scale(${1/t}) translateZ(${1-1/t}px) translateZ(-2px)`}}),[f,v]);(0,i.useImperativeHandle)(m,(()=>({get scrollTop(){var e,t;return null!==(t=null===(e=x.current)||void 0===e?void 0:e.scrollTop)&&void 0!==t?t:0},get dom(){return x.current}})),[]);const C=(0,r._g)((()=>{if(!x.current)return;const{current:e}=x,{height:t}=e.getBoundingClientRect(),{scrollHeight:n}=e;y(t),b(n)}),[],300),S=(0,i.useCallback)((()=>{if(!x.current||!a)return;const{scrollTop:e}=x.current;null==n||n({scrollTop:e}),f+e+l>=v&&a()}),[a,n,f,l,v]);return(0,i.useEffect)((()=>{const e=new window.MutationObserver((function(e){e.length&&C()}));return x.current&&e.observe(x.current,{childList:!0,subtree:!0}),window.addEventListener("resize",C),()=>{window.removeEventListener("resize",C),e.disconnect()}}),[C]),(0,o.jsxs)(s,{ref:x,onScroll:S,className:p,style:h,children:[(0,o.jsx)(t,{style:g,children:e}),(0,o.jsx)(d,{style:w,children:(0,o.jsx)(u,{})})]})})))},70388:(e,t,n)=>{n.d(t,{BX:()=>v,Bs:()=>L,EH:()=>d,FV:()=>S,Fb:()=>s,M7:()=>T,NT:()=>w,R1:()=>u,SL:()=>x,V$:()=>c,V2:()=>k,Vk:()=>C,ah:()=>m,ev:()=>b,f7:()=>D,fd:()=>f,yv:()=>y});var o=n(62186),i=n(17784),r=n(22568),a=n(31355),l=n(72153);const d=72,s=(0,o.default)(r.U,{target:"e14l9ebt0"})((({extraTop:e=0,extraWidth:t,isControlByBtn:n,isShowAll:o,shouldTransparent:i,theme:{colors:r,direction:a}})=>{const s={padding:"0 8px",width:`${d}px`,flex:`0 0 ${d}px`,boxShadow:`0px 2px 8px ${r.ShadowSecondary}`};return[{top:l.uF+e,bottom:"0",width:`${null!=t?t:356}px`,background:i?"transparent":r.BGPrimary,position:"fixed",zIndex:99},n&&{borderRight:"rtl"===a?"none":`1px solid ${r.LineSecondary}`,borderLeft:"rtl"!==a?"none":`1px solid ${r.LineSecondary}`},(0,l.mp)({direction:a,paddingEnd:"8px"}),n&&!1===o&&s,!n&&(0,l.jJ)({max:1071,style:Object.assign(Object.assign({},s),{borderRight:`1px solid ${r.LineSecondary}`})})]}),"label:StyledScroll;"),c=(0,o.default)("div",{target:"e14l9ebt1"})((({transStatus:e,extraWidth:t,isShowAll:n,isControlByBtn:o})=>{const r=e===i.ns||e===i.ze,a={width:`${d}px`,flex:`0 0 ${d}px`};return[{position:"relative",height:"100%",width:`${null!=t?t:356}px`,flex:`0 0 ${null!=t?t:356}px`},(0,l.jJ)({max:767,style:{zIndex:99,[`${s}`]:[null,r?{transition:"all 0.3s"}:null]}}),!o&&(0,l.jJ)({max:1071,style:a}),o&&!1===n&&a,o&&(0,l.jJ)({max:1071,style:{position:"absolute"}})]}),"label:DivSideNavContainer;"),u=(0,o.default)("div",{target:"e14l9ebt2"})((({theme:{direction:e},isControlByBtn:t,isShowAll:n})=>{const o={padding:"12px 0 26px"};return[{flexShrink:0,padding:"20px 0 26px",boxSizing:"border-box",display:"flex",flexDirection:"column",alignItems:"stretch",minHeight:"100%"},(0,l.mp)({direction:e,paddingStart:"8px"}),t&&!1===n&&o,!t&&(0,l.jJ)({max:1071,style:o})]}),"label:DivWrapper;"),p=({theme:e})=>[{position:"relative",display:"flex",justifyContent:"flex-start",alignItems:"center",padding:"8px",boxSizing:"border-box",borderRadius:"4px",fontSize:"32px",":hover":{textDecoration:"none"},":active":{textDecoration:"none"}},(0,l.RE)({theme:e})],h=({theme:e})=>[...p({theme:e}),(0,l.jJ)({max:1071,style:{justifyContent:"center"}})],g=({theme:e})=>[...p({theme:e})],m=(0,o.default)(a.N_,{target:"e14l9ebt4"})(h,"label:StyledLink;"),x=(0,o.default)(a.N_,{target:"e14l9ebt5"})(g,"label:StyledLinkV2;"),f=(0,o.default)("div",{target:"e14l9ebt6"})({flex:"1 1 0px"},"label:DivPlaceholder;"),y=(0,o.default)("span",{target:"e14l9ebt7"})((({active:e,theme:t,isShowAll:n,isControlByBtn:o,theme:{direction:i}})=>[(0,l.zy)({theme:t,fontFamily:"TikTokFont",fontWeight:"bold",typography:"P1",lineHeight:"32px",color:e?"Primary":"Primary2"}),(0,l.mp)({direction:i,marginStart:"8px"}),o&&!1===n&&{display:"none"},!o&&(0,l.jJ)({max:1071,style:{display:"none"}})]),"label:SpanMainNavText;"),v=(0,o.default)("nav",{target:"e14l9ebt8"})([{marginBottom:"8px",padding:"0"},(0,l.jJ)({max:1071,style:{padding:"0"}})],"label:NavMainNavContainer;"),b=(0,o.default)("ul",{target:"e14l9ebt9"})([{padding:0,margin:0,listStyleType:"none"}],"label:UlMainNav;"),w=(0,o.default)("svg",{target:"e14l9ebt12"})({width:"6px",height:"6px",verticalAlign:"top"},"label:SvgRedDot;"),C=(0,o.default)("div",{target:"e14l9ebt13"})((({theme:e})=>[{marginInlineStart:"2px",marginTop:"3px"},(0,l.zy)({theme:e,typography:"P1"})]),"label:DivRedDotContainer;"),S=(0,o.default)("div",{target:"e14l9ebt14"})((({theme:e,theme:{direction:t,colors:n},isShowAll:o,isControlByBtn:i})=>[(0,l.zy)({theme:e,color:"ConstTextInverse"}),{height:"20px",padding:"0 8px",borderRadius:"10px",backgroundColor:n.Primary,fontSize:"13px",lineHeight:"20px",fontWeight:600},(0,l.mp)({direction:t,marginStart:"6px"}),!i&&(0,l.jJ)({max:1071,style:[{display:"none"},(0,l.mp)({direction:t,marginStart:"0"})]}),i&&!1===o&&{display:"none"}]),"label:DivNewLabelContainer;"),T=(0,o.default)("div",{target:"e14l9ebt15"})((({theme:e,isShowAll:t,isControlByBtn:n})=>[{display:"none",marginInlineStart:"2px",marginTop:"3px"},(0,l.zy)({theme:e,typography:"P1"}),!n&&(0,l.jJ)({max:1071,style:{display:"block"}}),n&&!1===t&&{display:"block"}]),"label:DivExploreRedDotContainer;"),k=(0,o.default)("div",{target:"e14l9ebt16"})((({width:e,height:t,padding:n,fontSize:o})=>[{width:`${e}px`,height:`${t}px`,fontSize:`${o}px`,padding:`${n}px`},{display:"flex"}]),"label:DivIconPaddingContainer;"),L=(0,o.default)("img",{target:"e14l9ebt17"})({width:"32px",height:"32px",padding:"4px",borderRadius:"50%"},"label:ImgAvatar;"),D=(0,o.default)("div",{target:"e14l9ebt18"})((({theme:e,theme:{direction:t,colors:n},isControlByBtn:o,isShowAll:i})=>[(0,l.zy)({theme:e,color:"ConstTextInverse"}),{height:"20px",padding:"0 8px",borderRadius:"10px",backgroundColor:n.Primary,fontSize:"13px",lineHeight:"20px",fontWeight:600,marginBottom:"10px"},(0,l.mp)({direction:t,marginStart:"3px"}),!o&&(0,l.jJ)({max:1071,style:[{position:"absolute",top:"3px"},(0,l.mp)({direction:t,start:"27px"})]}),o&&!i&&[{position:"absolute",top:"3px"},(0,l.mp)({direction:t,start:"27px"})]]),"label:DivMessageBadgeContainer;")}}]);