30 lines
196 KiB
Plaintext
30 lines
196 KiB
Plaintext
"use strict";(self.webpackChunkdouyin_web=self.webpackChunkdouyin_web||[]).push([["63258"],{693731:function(e,l){l.Z={card:"wbu8wE8a",cover:"Sr5AiNEW",noMargin:"MDKKeZhe",title:"Y3ZJ0jCz"}},343475:function(e,l,i){i.r(l),i.d(l,{Helmet:function(){return t}});let t=i(256555).Head},517836:function(e,l,i){i.d(l,{Hh:function(){return a},vE:function(){return r},xB:function(){return o}}),i(313036),i(706056);var t=i(165030);let n=(e,l)=>{var i;return null==e?void 0:null===(i=e.trim())||void 0===i?void 0:i.slice(0,l)},o=e=>{let l,i;let{desc:o,nickname:r,createTimeStr:a,likeCount:d,textExtra:s=[],ocrContent:u}=e,c=s.filter(e=>e.type===t.TextType.HashTag).map(e=>e.hashtagName).join(","),v=`${r}在抖音记录美好生活${a} - 抖音`,m=`${r}于${a}发布在抖音,已经收获了${d}个喜欢,来抖音,记录美好生活!`,f="抖音,抖音短视频,抖音官网";return o?(l=`${n(o,200)} - 抖音`,i=`${n(o,120)} - ${m}`):(l=u.length<30?v:`${n(u,30)} - 抖音`,i=u.length<30?m:`${n(u,120)} - ${m}`),{title:l,description:i,keywords:c?`${c},${f}`:f}},r=e=>{let{desc:l="",nickname:i,createTimeStr:r,likeCount:a,keyword:d="",source:s=0,ocrContent:u,keywordList:c=[]}=e,v=`${i}于${r}发布在抖音,已经收获了${a}个喜欢,来抖音,记录美好生活!`,{title:m,description:f,keywords:_}=o(e);return t.HOT_KEYWORD_TYPE_LIST.includes(s)?(m=l.includes(d)?m:`${d}-${l}-抖音`,_=`${d},抖音`):(m=`${d}-抖音`,_=`${c.slice(0,3).join(",")},抖音`),{title:m,description:f=`${d}${n(u,120)} - ${v}`,keywords:_}},a=e=>{let{desc:l,nickname:i,createTimeStr:t,likeCount:r,ocrContent:a=""}=e,d=`${i}于${t}发布在抖音,已经收获了${r}个喜欢,来抖音,记录美好生活!`,{description:s,keywords:u}=o(e),c=a.length<30?`${l} - ${i} - 抖音`:`${n(a,30)} - 抖音`;return{title:c,description:a.length<30?s:`${n(a,120)} - ${d}`,keywords:u}}},294474:function(e,l,i){i.d(l,{l:function(){return x}});var t=i("629686"),n=i("402748");i("414931"),i("490629");var o=i("320165"),r=i("101199"),a=i("469935"),d=i.n(a),s=i("227831"),u=i("601034"),c=i("759894"),v=i("414061"),m=i("649368");let f=(0,r.forwardRef)((e,l)=>(0,o.jsx)("svg",(0,n._)((0,t._)({width:8,height:8,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:l},e),{children:(0,o.jsx)("path",{opacity:".7",d:"M.455 6.435a.78.78 0 0 0 1.103 1.103l2.434-2.435 2.435 2.435A.78.78 0 0 0 7.53 6.435L5.095 4 7.53 1.566A.78.78 0 0 0 6.427.463L3.992 2.897 1.558.463A.78.78 0 0 0 .455 1.566L2.889 4 .455 6.435z",fill:"#fff"})})));var _={cardAd:"bBs4xzZ1",cover:"DCb8_YKh",douyinIcon:"mqrzgybY",coverContent:"giVAcgZD",coverImg:"poN__kpH",info:"KV5nP_1r",title:"WVOzY7Qo",actions:"piAnaDvK",link:"wn9vGZge",button:"Eh2YnHAq",secondary:"OoVdrBx_",tertiary:"rODyI_9e",adTag:"HHmxKT3C",withBackground:"Zke_vxRK"},h=i("624508");let g={enter_from_merge:"",enter_from:"",sub_tab_name:"",source_id:"",card_type:"not_fixed_card",card_rank:"",is_card_mark:0,button_num:0};var p={firstButton:"first_button",secondButton:"second_button",clickCaption:"click_caption",otherLocation:"other_location"};let w=new h.h({feedAdCardShow:{eventName:"feed_ad_card_show",params:(0,t._)({},g)},feedAdCardClick:{eventName:"feed_ad_card_click",params:(0,n._)((0,t._)({},g),{click_location:""})},feedAdCardClose:{eventName:"feed_ad_card_close",params:(0,t._)({},g)}});var C=i("933524");let x=e=>{let{cardAd:l,cardStyle:i,onClose:a,onShow:h,logParams:g,enterMethod:x}=e,{id:b,order:I,permanent:y,postUrl:L,title:j,showAdTag:T}=l||{},k=(0,r.useMemo)(()=>(null==l?void 0:l.actions)?"link"===l.actions[0].type?[l.actions[0]]:l.actions.filter(e=>!!(null==e?void 0:e.text)&&(!!e.is_open_JX_modal||!!(null==e?void 0:e.link)))||[]:[],[null==l?void 0:l.actions]),E=()=>({enter_from_merge:(0,u.yW)(),enter_from:(0,c.vM)(),sub_tab_name:(null==g?void 0:g.sub_tab_name)||"",source_id:b.toString(),card_type:y?"fixed_card":"not_fixed_card",card_rank:I.toString(),is_card_mark:T?1:0,button_num:k.length}),[S,N]=function(e){let[l,i]=(0,C.Z)(),t=(0,r.useRef)(!1);return!t.current&&i&&(e&&e(),t.current=!0),[l,i]}(()=>{null==h||h(l),w.sendLog("feedAdCardShow",(0,t._)({},E()))}),P=()=>{null==a||a(l),w.sendLog("feedAdCardClose",(0,t._)({},E()))},R=(e,l)=>{let{link:i}=e||{};if(null==e?void 0:e.is_open_JX_modal){w.sendLog("feedAdCardClick",(0,n._)((0,t._)({},E()),{click_location:l})),v.emit(v.EVENT.OpenJXModal,{source:x});return}if(!!i)window.open(i,"_blank","noopener"),w.sendLog("feedAdCardClick",(0,n._)((0,t._)({},E()),{click_location:l}))};return(0,r.useEffect)(()=>v.listen(v.EVENT.RefreshFeedList,()=>{N&&w.sendLog("feedAdCardShow",(0,t._)({},E()))}),[N]),(0,o.jsxs)("div",{className:d()(_.cardAd,{[_.withBackground]:"with-background"===i}),onClick:e=>{e.stopPropagation(),R(k[0],p.otherLocation)},ref:S,children:[(0,o.jsx)("div",{className:_.cover,children:(0,o.jsx)(s.Q,{imgClass:_.coverImg,className:_.coverContent,src:L,iconWidth:24,iconHeight:28,showImageInSSR:!1,imageReady:!0,skeletonClass:_.douyinIcon})}),(0,o.jsxs)("div",{className:_.info,children:[(0,o.jsx)("div",{className:_.title,onClick:e=>{e.stopPropagation(),R(k[0],p.clickCaption)},children:j}),(0,o.jsx)("div",{className:_.actions,children:k.map((e,l)=>(0,o.jsxs)("span",{className:d()({[_.link]:"link"===e.type,[_.button]:"button"===e.type,[_.secondary]:"button"===e.type&&0===l,[_.tertiary]:"button"===e.type&&1===l}),onClick:i=>{i.stopPropagation(),R(e,0===l?p.firstButton:p.secondButton)},children:[e.text,(0,o.jsx)(m.Z,{})]},l))})]}),T&&(0,o.jsxs)("div",{className:_.adTag,children:[(0,o.jsx)("span",{children:"广告"}),(0,o.jsx)("span",{onClick:e=>{e.stopPropagation(),P()},children:(0,o.jsx)(f,{})})]})]})}},316914:function(e,l,i){var t=i(320165);i(101199);var n=i(412383),o=i(712521);l.Z=e=>{let{children:l,mobileUrl:i,applicableDevice:r}=e,a=(0,n.Yr)();return(0,t.jsx)(o.$,{mobileUrl:i,nonce:a,applicableDevice:r,children:l})}},444729:function(e,l,i){var t=i(320165);i(101199);var n=i(732979),o=i.n(n),r=i(316914);l.Z=e=>{let{videoDetail:l,mobileUrl:i,children:n}=e,{desc:a,authorInfo:d,createTime:s=Date.now()/1e3,video:u,awemeId:c}=l||{},{nickname:v=""}=d||{},{cover:m}=u||{},f=o()(1e3*s).format("YYYYMMDD")||"",_=`${v}在抖音记录美好生活${f}`;return a&&(_=a.slice(0,35)),l?(0,t.jsxs)(r.Z,{mobileUrl:i,children:[n,(0,t.jsx)("meta",{name:"lark:url:enable",content:u?"true":"false"}),(0,t.jsx)("meta",{name:"lark:url:video_icon_url",content:"https://lf1-cdn-tos.bytegoofy.com/goofy/ies/douyin_web/public/favicon.ico"}),(0,t.jsx)("meta",{name:"lark:url:video_title",content:_}),(0,t.jsx)("meta",{name:"lark:url:video_cover_image_url",content:m}),(0,t.jsx)("meta",{name:"lark:url:video_iframe_url",content:`https://www.douyin.com/light/${c}`}),(0,t.jsx)("meta",{name:"lark:url:video_brand_name",content:"抖音"})]}):(0,t.jsx)(r.Z,{mobileUrl:i,children:n})}},493168:function(e,l,i){i.d(l,{R:function(){return m}}),i("490629"),i("706056");var t=i("320165");i("101199");var n=i("469935"),o=i.n(n),r=i("386206"),a=i("633570"),d=i("991798"),s=i("65480"),u=i("408674"),c={tagContainer:"Kv7PETi8",tagText:"uWiJZfvp",yellow:"FYunIgSm",green:"ZsqzgWnD",recommended:"JOG0CfiP"};a.Z,d.Z,s.Z,u.Z;let v=new Map([["follow",{text:"你的关注"}],["recommended",{text:"为你推荐"}],["collect",{text:"收藏"}],["digg",{text:"点赞"}],["comment",{text:"评论"}]]),m=e=>{let{count:l,type:i,className:n,abTestData:a}=e,d=v.get("recommended"===i?"recommended":"follow");return(0,t.jsx)(t.Fragment,{children:d&&(0,t.jsx)("span",{className:o()(c.tagContainer,n,{[c.yellow]:"collect"===i,[c.green]:"comment"===i,[c.green]:"follow"===i,[c.recommended]:"recommended"===i}),children:(0,t.jsx)("span",{className:o()(c.tagText),children:`${["follow","recommended"].includes(i)?"":(0,r.qe)(l||0)}${d.text}`})})})}},16993:function(e,l,i){i.d(l,{Z:function(){return eZ}});var t=i("629686"),n=i("402748");i("679308"),i("313036"),i("490629"),i("938445"),i("644892");var o=i("320165"),r=i("101199"),a=i("469935"),d=i.n(a),s=i("473228"),u=i("116537"),c=i("855436"),v=i("537694"),m=i("59850"),f=i("121998"),_=i("426112"),h=i("966473"),g=i("638052"),p=i("762167"),w=i("988805"),C=i("242875"),x=i("165030"),b=i("295207"),I=i("645062"),y=i("166414"),L=i("55938"),j=i("176449"),T=i("234150"),k=i("706869"),E=i("365169"),S=i("778018"),N=i("499059"),P=i("386206"),R=i("759894"),A=i("414061"),M=i("394408"),D=i("601034"),B=i("629896"),F=i("573031"),V=i("889429"),H=i("618759"),O=i("799155"),U={more:"tnMCp_nY",videoCard:"Yhcama3d",cardInfo:"t9xvAX3z",bgChange:"b1yCOhzF",videoImg:"lqHJZHlC",imgAspectRatio:"rlA406kt",hover:"Lc758leV",hotMask:"IDc6Z1e0",hotBottomInfo:"XxWlWSvl",hotCount:"kbiKo6Sq",hotText:"IwCAMLOP",hotDuration:"lF7lmbZM",coverBg:"C8cWVlQK",coverMask:"tSB8H3Hu",cardInfoContainer:"yk_ZBkpk",transparent:"tU3CrOiv",decs:"gkRBxZW6",userText:"rEDnbfEe",userTextContent:"WLnPrnPW",userName:"A3X582LE",text:"qpAHFYJ5",marginRight:"Wy1zQssh",highlightTag:"v4ZZeZgZ",highlightTagWithoutMarginRight:"x8rgFZVb",divider:"LmWY5FU7",interactiveBox:"QwXjhhOU",contents:"JCtE_mVb",icon:"r7PWEsJ1",barContainer:"ZuzWC83V",barIcon:"dRiWcZvo",barText:"U3blhGsU",barDivide:"SdB2q2OO",barDesc:"uwZ5pA1S",createTime:"joR8Ar6v",hasMarginRight:"QhmQS6Gv",flexColumn:"ZH8C4ExR",needScale:"hs14M2DI",imageChange:"TEaMSvjJ",at:"LnMBgJGl",report:"QL8zjIah",bottom:"uBWlz6ED",bigCard:"e8HoAtZd",isBigCardCutVideo:"xo8b9wh_",jxThemeColor:"tlCtWfqZ",moreBtnBgChange:"k18v1BQR"},Z=i("280647"),W=i("56924"),Y=i("855357"),z=i("396868"),J=i("227831"),$=i("887736"),q=i("314946"),Q=i("249478"),K={videoImage:"qZOOK9od",videoBox:"MVEmDJ0t",videoBoxUnsetBg:"_OcYfB8a",img:"XTdkxrLI",gaosi:"NjJpbpa1",imgCover:"hI8bEuRg",videoInfo:"IptnJcJT",discoverWatchLaterToast:"agCEOJq8"},G=i("573495"),X={playingCover:"QdOt__70",safari:"cqKihnD3",playingCoverInner:"aCJcdL3Z"};let ee=()=>(0,o.jsx)("div",{className:d()(X.playingCover,{[X.safari]:(0,V.G6)()}),onClick:e=>{e.stopPropagation(),e.preventDefault()},children:(0,o.jsxs)("div",{className:X.playingCoverInner,children:[(0,o.jsx)(G.WaveLineAnimation,{className:X.icon}),(0,o.jsx)("span",{children:"播放中"})]})}),el=e=>{let{previewUrlList:l,onVideoEnded:i,onVideoStopped:t,onVideoPlaying:n,topAwemeId:o,isTopCard:a=!1}=e,d=(0,E.Iq)(e=>{let{pipWindow:l}=e;return{pipWindow:l}}),[s,u]=(0,r.useState)(!1),[c,v]=(0,r.useState)(!1),[f,_]=(0,r.useState)(!1),h=(0,r.useRef)(),g=(0,r.useRef)(0);(0,r.useEffect)(()=>{c&&(null==n||n())},[c]);let p=(0,m.Z)(e=>{v(e)}),w=(0,m.Z)(()=>{v(!0)}),C=(0,m.Z)(()=>{p(!1)}),x=(0,r.useMemo)(()=>{let e=l.length>0,i=!!(null==d?void 0:d.pipWindow);return e&&!i&&(a?s:c)},[l,c,a,s,null==d?void 0:d.pipWindow]),b=(0,r.useRef)(x);(0,r.useLayoutEffect)(()=>{!x&&b.current&&(_(!1),null==t||t(Date.now()-g.current))},[x,t]),(0,W.C)(()=>{u(!0)},[]),(0,Z.Z)(()=>{if(!a){if(c)return A.emit(A.EVENT.JingxuanTopCard,{action:"pause",awemeId:o,from:"hover_other_cover"}),A.listen(A.EVENT.JingxuanTopCard,e=>{let{action:l}=e;"pauseOtherCard"===l&&v(!1)});A.emit(A.EVENT.JingxuanTopCard,{action:"play",awemeId:o,from:"cancel_hover_other_cover"})}},[c,a]),(0,r.useEffect)(()=>{b.current=x},[x]);let I=(0,m.Z)(()=>{null==i||i()});return{onMouseEnter:w,onMouseLeave:C,isPlay:x,isHovered:c,setIsHovered:p,onEnded:I,onPlaying:(0,m.Z)(()=>{_(!0)}),isReady:f,previewImageRef:h}},ei=e=>{let{awemeInfo:l,useOuterProgress:i=!1}=e,[t,n]=(0,r.useState)(!1),[o,a]=(0,r.useState)(0),[d,s]=(0,r.useState)(0),[u,c]=(0,r.useState)(0);return(0,r.useEffect)(()=>{if(!i||!l.awemeId)return;let e=e=>{let{awemeId:i}=e;if(i!==l.awemeId)return;let t=N.Le.getConfig(N.gI.JxOuterProgress),o=(null==t?void 0:t[i])||{};(null==o?void 0:o.isWatchedEnd)||(null==o?void 0:o.progress)?(n(!0),a((null==o?void 0:o.progress)||0),s((null==o?void 0:o.startTime)||0),c((null==o?void 0:o.duration)||0)):(n(!1),a(0),s(0))};e({awemeId:l.awemeId});let t=A.listen(A.EVENT.UpdateJxOuterProgress,e);return()=>{null==t||t()}},[i,l]),{showOuterProgress:t,outerProgress:o,outerStartTime:d,outerDuration:u}};var et="R28u3nGX",en="xRT23fY9";let eo=e=>{let{progress:l,outerClassName:i,onShow:t}=e,n=(0,h.x)(()=>{null==t||t()});return(0,o.jsx)("div",{ref:n,className:d()(et,i),children:(0,o.jsx)("div",{className:en,style:{width:`${l}%`}})})};var er=i("771410");let ea=r.lazy(()=>Promise.all([i.e("73286"),i.e("28161"),i.e("73356"),i.e("86828")]).then(i.bind(i,407309)));var ed={OutSide:0,0:"OutSide",Inner:1,1:"Inner"};let es=e=>{z.F.info(e)},eu=e=>{let{isTopCard:l,isPlay:i,isPreviewPlayCache:t,isTabActive:n,isTopCardActive:o,isModalPlayingCurrentVideo:a,isHovered:d}=e,[s,u]=(0,r.useState)(i),c=(0,E.Iq)(e=>{let{pipWindow:l,isWebMiniWin:i}=e;return{pipWindow:l,isWebMiniWin:i}});return(0,W.C)(()=>{var e,l,t;let n=(null===(e=N.Le.getConfig(N.gI.IsInModalVideo))||void 0===e?void 0:e.isInModal)||!1;(null===(t=window)||void 0===t?void 0:null===(l=t.__QUICK_PLAYER)||void 0===l?void 0:l.player)||n?u(!1):u(i)},[i]),(0,Z.Z)(()=>{var e,r,d;if(!l)return;let s=(null===(e=N.Le.getConfig(N.gI.IsInModalVideo))||void 0===e?void 0:e.isInModal)||!1,v=null===(d=window)||void 0===d?void 0:null===(r=d.__QUICK_PLAYER)||void 0===r?void 0:r.player,m=!!(!s&&n&&o);t&&(m=!a),u(i&&!(null==c?void 0:c.isWebMiniWin)&&!(null==c?void 0:c.pipWindow)&&!v&&m)},[l,o,n,i,!(null==c?void 0:c.pipWindow),!(null==c?void 0:c.isWebMiniWin),d]),(0,r.useEffect)(()=>{if(l&&!t){let e;let l=!!(n&&o);!t&&(e=A.listen(A.EVENT.videoPause,()=>{u(!1)}));let r=A.listen(A.EVENT.exitModalVideo,()=>{u(i&&!(null==c?void 0:c.pipWindow)&&!(null==c?void 0:c.isWebMiniWin)&&!!(t||l))});return()=>{null==e||e(),null==r||r()}}},[l,t,n,o,i,null==c?void 0:c.pipWindow,null==c?void 0:c.isWebMiniWin]),s};var ec=(0,r.forwardRef)((e,l)=>{var i;let{style:a,className:u,imageClassName:c,imgClass:v,imageSkeletonClass:m="",imgUrl:f="",children:_,onClick:h,defaultImageColor:g,onVideoStopped:p,onVideoPlaying:w,previewUrlList:x=[],width:b,height:I,fakeHorizontalInfo:y,onVideoEnded:L,isHorizontal:j=!1,isSpider:T,debugInfo:k,appendPlayerConfig:S,alt:N,awemeInfo:P,onMouseEnter:R,onMouseLeave:A,showProgressBar:M,onPreviewChange:F,logParams:H,showImageInSSR:U,forceContainerCover:Z=!1,renderExtension:z,onImgLoad:G,onLoadedData:X,priority:et,videoImageWidth:en,videoImageHeight:ed,decoding:ec,scene:ev,user:em,onRef:ef,disablePreview:e_=!1,disableByMoreAction:eh=!1,enableNotePreview:eg=!1,blurLightCover:ep=!1,needOperateHidden:ew=!1,isBigCard:eC=!1,isTopCard:ex=!1,isTopCardActive:eb,isTabActive:eI,isModalPlayingCurrentVideo:ey,topAwemeId:eL,showWatchLater:ej=!1,imageReady:eT,tab:ek,enableCardHoverPreview:eE,canCancelWatchLater:eS,withBlurBg:eN,withBlurBgPerf:eP,enableImageX:eR,scrollContainerRef:eA,reuseConfig:eM,showAiEntry:eD,onClickAiEntry:eB,abTestData:eF,onClickPipIcon:eV,isPipPlaying:eH,dislikeCoverVisible:eO,useOuterProgress:eU=!1,forceHiddenOuterProgress:eZ=!1}=e,eW=(0,r.useRef)(!1),[eY,ez]=(0,r.useState)(null),[eJ,e$]=(0,r.useState)(null),eq=(null==P?void 0:P.awemeType)===Y.e.Note,eQ=(0,r.useRef)(),{showOuterProgress:eK,outerProgress:eG,outerStartTime:eX,outerDuration:e0}=ei({awemeInfo:P,useOuterProgress:eU}),{isWebMiniWin:e1=!1,pipWindow:e3}=(0,E.Iq)(e=>{let{isWebMiniWin:l,pipWindow:i}=e;return{isWebMiniWin:l,pipWindow:i}}),{setIsHovered:e2,isPlay:e5,onMouseEnter:e6,onMouseLeave:e4,onEnded:e9,onPlaying:e8,isReady:e7,previewImageRef:le,isHovered:ll}=el({previewUrlList:x,onVideoStopped:p,onVideoEnded:L,onVideoPlaying:w,isTopCard:ex,topAwemeId:eL}),li=(0,r.useCallback)(()=>{if(null==h||h(),(null==x?void 0:x.length)!==0)e2(!1)},[e2,h,x]);(0,W.C)(()=>{if(eC&&eQ.current){let e=document.getElementById("jx-temp-player-container");e&&e.childNodes.length>0&&(Array.from(e.childNodes).forEach(e=>{eQ.current.appendChild(e)}),e.remove(),window.__JX_TEMP_CONTAINER_CLEANUP&&(window.__JX_TEMP_CONTAINER_CLEANUP(),delete window.__JX_TEMP_CONTAINER_CLEANUP))}},[eC]),(0,r.useEffect)(()=>{"discover"===ev&&eC&&window.jxHydrateReadyCb&&window.jxHydrateReadyCb(null==eQ?void 0:eQ.current)},[ev,eC]);let lt=eu({isPlay:e5,isTopCard:ex,isTopCardActive:eb,isPreviewPlayCache:(null==eF?void 0:eF.jxTopCardCache)||0,isTabActive:eI,isModalPlayingCurrentVideo:ey}),ln=(!(0,V.vU)()||P)&<&&(null==x?void 0:x.length)>0;(0,r.useEffect)(()=>{null==F||F(ln)},[ln]);let{isiPad:lo}=(0,C.X)(),lr=(0,r.useCallback)(()=>{e6(),null==R||R()},[e6,R,e1]),la=(0,r.useCallback)(()=>{e4(),null==A||A()},[e4,A]);(0,r.useEffect)(()=>{if(eY&&!eh&&!eE&&!lo){let e=B.mouseEnter(eY,lr,!0),l=B.mouseLeave(eY,la);return()=>{e(),l()}}},[eY,eh,eE,lo,lr,la]),(0,r.useImperativeHandle)(l,()=>({enter(){eY&&!eh&&lr()},leave(){eY&&!eh&&la()}}),[eY,eh,lr,la]),(0,r.useEffect)(()=>{let e=()=>{"hidden"===document.visibilityState&&la()};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[la]),(0,r.useEffect)(()=>{e1&&la()},[e1]);let ld=(ll||ln)&&ej&&(0,Q.D)(P)&&!eO,ls=(0,r.useMemo)(()=>{let e=(0,D.yW)();return(0,n._)((0,t._)({},H),{enter_from:e,enter_from_merge:e,tab_name:null!=ek?ek:e,click_method:`${e}_preview`})},[H]),lu=(0,r.useMemo)(()=>eS?(0,n._)((0,t._)({},P),{watchLaterInfo:null}):P,[eS,P]),lc=(0,r.useMemo)(()=>({watchLaterAwemeInfo:lu,user:em}),[lu,em]),lv=(0,r.useCallback)(()=>{var e,l,i,t;if(!eW.current)eW.current=!0,er.Z.report("pc_theme_progress_bar_show",{enter_from:(0,D.yW)(),enter_from_merge:(0,D.yW)(),enter_method:"",tab_name:null==H?void 0:H.tab_name,sub_tab_name:null==H?void 0:H.sub_tab_name,aweme_type:null==H?void 0:null===(e=H.awemeInfo)||void 0===e?void 0:e.awemeType,group_id:null==H?void 0:null===(l=H.awemeInfo)||void 0===l?void 0:l.awemeId,author_id:null==H?void 0:null===(t=H.awemeInfo)||void 0===t?void 0:null===(i=t.authorInfo)||void 0===i?void 0:i.uid,item_duration_ms:e0})},[H,e0]);return(0,o.jsxs)("div",{style:a,onClick:li,className:d()(K.videoImage,u,"videoImage"),ref:e=>{ez(e),null==ef||ef(e)},children:[(0,o.jsxs)("div",{className:d()(K.videoBox,{[K.videoBoxUnsetBg]:!ln}),ref:e=>{e$(e)},children:[(0,o.jsx)(J.Q,{skeletonStyle:{background:g},className:d()(c),imgClass:d()(K.img,v,{[K.imgCover]:Z,[K.gaosi]:e_&&!(0,V.G6)()}),skeletonClass:m,src:f,isPreviewing:e7&&ln,isSpider:T,alt:N,showImageInSSR:U,imageReady:eT,onHandleImgLoad:G,priority:et,width:en,height:ed,decoding:ec,blurLightCover:ep,withBlurBgPerf:eP,withBlurBg:eN,imgUrlList:(null==P?void 0:null===(i=P.video)||void 0===i?void 0:i.coverUrlList)||[],enableImageX:eR,scrollContainerRef:eA}),ln&&!e_&&(!eq||eg)&&(0,o.jsx)(s.SV,{Slardar:(0,O.f5)(),children:(0,o.jsx)(r.Suspense,{fallback:(0,o.jsx)("div",{}),children:(0,o.jsx)(ea,{startTime:eK?eX:void 0,needOperateHidden:ew,previewUrlList:x||[],isHorizontal:j,onReady:e8,onLoadedData:X,onEnded:e9,ratio:I/b,fakeHorizontalInfo:y,showProgressBar:M,ref:le,logParams:H,awemeInfo:P,appendPlayerConfig:S,container:eY,coverContainer:eJ,renderExtension:z,forceContainerCover:Z,scene:ev,user:em,reuseBigCardQuickPlayer:ex,isTopCard:ex,isBigCard:eC,reuseConfig:eM,isShowWatchLater:ld&&ex,watchLaterProps:lc,enableNote:!0,pip:{show:"discover"===ev,onClick:()=>{null==eV||eV()}}})})}),ln&&eq&&(null==z?void 0:z({type:Y.e.Note})),(0,V.vU)()&&(null==z?void 0:z()),!ln&&(0,o.jsx)("div",{className:d()(K.videoInfo),children:r.Children.toArray(_).map(e=>{var l;if((null==e?void 0:null===(l=e.props)||void 0===l?void 0:l.slot)===1)return e})}),ld&&!ex&&(0,o.jsx)(q.nf,{abtest:eF,awemeInfo:lu,isActive:!0,isPreview:!0,isLogin:null==em?void 0:em.isLogin,userInfo:null==em?void 0:em.info,loginDispatch:null==em?void 0:em.dispatch,logParams:ls,toast:e=>es({text:e,className:eS?K.discoverWatchLaterToast:""}),canCancelWatchLater:eS}),eH&&!eO&&(0,o.jsx)(ee,{}),eK&&!eZ&&!ln&&(0,o.jsx)(eo,{onShow:lv,progress:eG}),eC&&(0,o.jsx)("div",{className:"bigCardQuickPlayerContainer",ref:eQ})]}),r.Children.toArray(_).map(e=>{var l;if((null==e?void 0:null===(l=e.props)||void 0===l?void 0:l.slot)===0)return e}),k&&(0,o.jsx)($.W,{req:null==k?void 0:k.web_debug_req,video:null==k?void 0:k.client_rec_debug_info,isLeft:!1,showPanelRightside:!0})]})}),ev=i("800513"),em=i("387382"),ef=i("316213"),e_=i("178986"),eh=i("931334"),eg={videoCoverContainer:"Cp7YkbVA",jingxuanTag:"RHnWEl2F",weeklyRecommendTag:"ehHr5hgJ",topContain:"r7B85O2f",tag:"LmalMOeS",icon:"uhonq6h2",homeTag:"IXJUWcq0",homeTagText:"qIGDoBfa",homeTagHot:"jwd_VLkA",homeTagRank:"L9YeWK0z",homeTagContainer:"RGawYsyk",adTag:"BaZHeNQf",time:"bxpxnS0I",likes:"siuIMJAL"};let ep=(0,r.forwardRef)((e,l)=>(0,o.jsxs)("svg",(0,n._)((0,t._)({width:10,height:12,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:l},e),{children:[(0,o.jsx)("path",{d:"M.616 4.435a.75.75 0 0 1 0-1.292l3.622-2.135a1.5 1.5 0 0 1 1.524 0l3.622 2.135a.75.75 0 0 1 0 1.292L5.762 6.57a1.5 1.5 0 0 1-1.524 0L.616 4.435z",fill:"#fff"}),(0,o.jsx)("path",{d:"M.07 5.785a.5.5 0 0 1 .684-.177l3.738 2.204a1 1 0 0 0 1.016 0l3.738-2.204a.5.5 0 1 1 .508.862L6.016 8.673a2 2 0 0 1-2.032 0L.246 6.47a.5.5 0 0 1-.177-.685z",fill:"#fff"}),(0,o.jsx)("path",{d:"M.754 7.858a.5.5 0 1 0-.508.862l3.738 2.203a2 2 0 0 0 2.032 0L9.754 8.72a.5.5 0 1 0-.508-.862l-3.738 2.204a1 1 0 0 1-1.016 0L.754 7.857z",fill:"#fff"})]}))),ew=(0,r.forwardRef)((e,l)=>(0,o.jsxs)("svg",(0,n._)((0,t._)({width:14,height:14,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:l},e),{children:[(0,o.jsx)("g",{filter:"url(#ic_home_note_svg__filter0_d_3305_2957)",children:(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.917 1.75c-.645 0-1.167.522-1.167 1.167V8.75c0 .644.522 1.167 1.167 1.167H8.75c.644 0 1.167-.523 1.167-1.167V2.917c0-.645-.523-1.167-1.167-1.167H2.917zm2.333 10.5a1.167 1.167 0 0 1-1.167-1.167H8.75a2.333 2.333 0 0 0 2.333-2.333V4.083c.645 0 1.167.523 1.167 1.167v4.667a2.333 2.333 0 0 1-2.333 2.333H5.25z",fill:"#fff"})}),(0,o.jsx)("defs",{children:(0,o.jsxs)("filter",{id:"ic_home_note_svg__filter0_d_3305_2957",x:-1,y:-1,width:16,height:16,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,o.jsx)("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),(0,o.jsx)("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,o.jsx)("feOffset",{}),(0,o.jsx)("feGaussianBlur",{stdDeviation:".5"}),(0,o.jsx)("feComposite",{in2:"hardAlpha",operator:"out"}),(0,o.jsx)("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0"}),(0,o.jsx)("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_3305_2957"}),(0,o.jsx)("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_3305_2957",result:"shape"})]})})]}))),eC=(0,r.forwardRef)((e,l)=>(0,o.jsxs)("svg",(0,n._)((0,t._)({width:14,height:14,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:l},e),{children:[(0,o.jsxs)("g",{filter:"url(#ic_home_collect_svg__filter0_d_3305_2200)",fill:"#fff",clipPath:"url(#ic_home_collect_svg__clip0_3305_2200)",children:[(0,o.jsx)("path",{d:"M11.922 5.212a.63.63 0 0 0 .293-.545.631.631 0 0 0-.292-.545L7.275 1.355a.495.495 0 0 0-.511-.001L2.079 4.12a.63.63 0 0 0-.294.544c0 .23.112.44.292.546l4.65 2.774c.16.095.352.096.512 0l4.683-2.773z"}),(0,o.jsx)("path",{d:"M12.145 6.7c.148.297.053.673-.211.839l-4.686 2.937a.495.495 0 0 1-.532 0L2.068 7.582c-.265-.165-.36-.54-.214-.838.147-.298.48-.406.745-.24L6.98 9.231l4.419-2.77c.264-.166.598-.06.745.238z"}),(0,o.jsx)("path",{d:"M11.934 9.872c.264-.166.359-.541.211-.839-.147-.297-.48-.404-.745-.238l-4.42 2.77L2.6 8.835c-.265-.165-.598-.057-.745.241-.147.298-.051.673.214.838l4.648 2.896a.495.495 0 0 0 .532 0l4.686-2.938z"})]}),(0,o.jsxs)("defs",{children:[(0,o.jsxs)("filter",{id:"ic_home_collect_svg__filter0_d_3305_2200",x:".785",y:".283",width:12.43,height:13.604,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,o.jsx)("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),(0,o.jsx)("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,o.jsx)("feOffset",{}),(0,o.jsx)("feGaussianBlur",{stdDeviation:".5"}),(0,o.jsx)("feComposite",{in2:"hardAlpha",operator:"out"}),(0,o.jsx)("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0"}),(0,o.jsx)("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_3305_2200"}),(0,o.jsx)("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_3305_2200",result:"shape"})]}),(0,o.jsx)("clipPath",{id:"ic_home_collect_svg__clip0_3305_2200",children:(0,o.jsx)("path",{fill:"#fff",d:"M0 0h14v14H0z"})})]})]}))),ex=(0,r.forwardRef)((e,l)=>(0,o.jsxs)("svg",(0,n._)((0,t._)({width:14,height:14,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:l},e),{children:[(0,o.jsx)("path",{d:"M1.283 7a2.917 2.917 0 0 1 3.792-2.783.583.583 0 1 0 .35-1.113 4.083 4.083 0 1 0 0 7.793.583.583 0 0 0-.35-1.114A2.917 2.917 0 0 1 1.283 7z",fill:"#fff"}),(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.8 2.917a4.083 4.083 0 1 0 0 8.166 4.083 4.083 0 0 0 0-8.166zM6.883 7a2.917 2.917 0 1 1 5.834 0 2.917 2.917 0 0 1-5.834 0z",fill:"#fff"})]})));var eb=i("87897"),eI=r.memo(e=>{var l,i,t,n,a;let{style:s,className:u,showTag:c,tagName:v,showTime:m,time:f,showAdTag:_,adTagText:h,showLikes:g,likes:p,showIntegrationTag:w,showCooperationTag:C=!0,showHomeNote:x,showHomeCollect:b,showHomeHot:I,awemeInfo:y,scene:L}=e,T=(0,eb._)(),{userInfo:k}=(0,eh.useUserContext)(),{uid:E=""}=null!==(n=null==k?void 0:k.info)&&void 0!==n?n:{},S=(0,ev.$m)(y,(null==y?void 0:null===(l=y.authorInfo)||void 0===l?void 0:l.uid)===E),P=(0,em.$)({awemeInfo:y,abTestData:T}),R=(0,r.useMemo)(()=>{var e,l;return(null==y?void 0:y.awemeType)===Y.e.Lvideo&&(null==y?void 0:null===(l=y.entertainmentVideoPaidWay)||void 0===l?void 0:null===(e=l.paid_ways[0])||void 0===e?void 0:e.paid_way)===9},[y]);return(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)("div",{style:s,className:d()(eg.videoCoverContainer,u),children:[P&&(0,o.jsx)(em.n,{scene:"videoCard",className:eg.weeklyRecommendTag,awemeInfo:y}),R&&(0,o.jsx)("div",{className:d()(eg.jingxuanTag),children:"精选会员"}),!P&&!R&&(0,o.jsx)(ev.zx,{type:S}),!P&&!S&&!R&&(0,o.jsxs)("div",{className:d()(eg.topContain),children:[w&&(0,o.jsxs)("div",{className:d()(eg.homeTag),children:[(0,o.jsx)(j.Z,{width:10,height:12,viewBox:"0 0 10 12",src:ep,className:eg.icon}),(0,o.jsx)("span",{className:eg.homeTagText,children:"合集"})]}),c&&v&&(0,o.jsx)("div",{className:d()(eg.tag),children:v}),C&&!w&&!(c&&v)&&!x&&!b&&!I&&Number(null!==(a=null==y?void 0:null===(t=y.cooperationInfo)||void 0===t?void 0:null===(i=t.cooperationCreators)||void 0===i?void 0:i.length)&&void 0!==a?a:0)>1&&(0,o.jsxs)("div",{className:d()(eg.homeTag),children:[(0,o.jsx)(j.Z,{width:14,height:14,viewBox:"0 0 14 14",src:ex,className:eg.icon}),(0,o.jsx)("span",{className:eg.homeTagText,children:"共创"})]})]}),!P&&!S&&!R&&(0,o.jsxs)("div",{className:d()(eg.homeTagContainer),children:[x&&(0,o.jsxs)("div",{className:d()(eg.homeTag),children:[(0,o.jsx)(j.Z,{width:14,height:14,viewBox:"0 0 14 14",src:ew,className:eg.icon}),(0,o.jsx)("span",{className:eg.homeTagText,children:"图文"})]}),b&&(0,o.jsxs)("div",{className:d()(eg.homeTag),children:[(0,o.jsx)(j.Z,{width:14,height:14,viewBox:"0 0 14 14",src:eC,className:eg.icon}),(0,o.jsx)("span",{className:eg.homeTagText,children:"合集"})]}),I&&(0,o.jsxs)("div",{className:d()(eg.homeTag,eg.homeTagHot),children:[(0,o.jsx)("span",{className:eg.homeTagText,children:"热榜"}),(0,o.jsx)("span",{className:eg.homeTagRank,children:"TOP"})]})]}),_&&(0,o.jsx)("div",{className:d()(eg.adTag),children:h||"广告"}),m&&!_&&(0,o.jsx)("div",{className:d()(eg.time),children:f}),g&&(0,o.jsxs)("div",{className:d()(eg.likes),children:[(0,o.jsx)(ef.z,{initialMounted:!!N.Le.getConfig(N.gI.isCSRRender),style:"discover"===L?{marginRight:"2px"}:{fontSize:"20px",marginRight:"2px"},svg:(0,o.jsx)(e_.Z,{className:eg.icon})}),(0,o.jsx)("span",{children:p})]})]})})}),ey=i("493168");let eL=(0,r.forwardRef)((e,l)=>(0,o.jsxs)("svg",(0,n._)((0,t._)({width:12,height:12,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:l},e),{children:[(0,o.jsxs)("g",{clipPath:"url(#ic_hot_svg__clip0_3118_121700)",children:[(0,o.jsx)("mask",{id:"ic_hot_svg__a",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:1,y:-2,width:10,height:14,children:(0,o.jsx)("path",{d:"M1.5-1.05h9.208v8.233a4.516 4.516 0 0 1-4.516 4.516A4.692 4.692 0 0 1 1.5 7.007V-1.05z",fill:"#C4C4C4"})}),(0,o.jsxs)("g",{mask:"url(#ic_hot_svg__a)",children:[(0,o.jsx)("path",{d:"M9.393 3.552c.961 1.062 1.316 2.125 1.316 3.187 0 1.417-.068 1.797 0 1.771-1.859.738-5.123-.93-6.021-3.187-.899-2.258.38-4.25 2.353-5.313.078-.041.126.028.126.133 0 1.638 1.265 2.346 2.226 3.409z",fill:"url(#ic_hot_svg__paint0_linear_3118_121700)"}),(0,o.jsx)("path",{d:"M10.545 8.87c.191-.348.557 1.057.164-1.226.354-1.967-1.142-2.745-2.125-2.321-1.645.708-2.48.708-3.542.354-.69-.23-1.638-.708-1.934-1.77-.329 1.416.66 4.065 2.157 4.964 1.497.898 5.09.348 5.28 0z",fill:"url(#ic_hot_svg__paint1_linear_3118_121700)"}),(0,o.jsx)("path",{d:"M2.775 3.338C2.534 3.58 1.5 4.825 1.5 6.815c0 1.99 1.063 4.884 4.604 4.884 3.542 0 4.931-1.406 5.313-3.255-3.188 1.771-5.656 0-6.021-.354-.9-.872-2.125-2.411-2.338-4.604-.029-.301-.042-.39-.283-.148z",fill:"url(#ic_hot_svg__paint2_linear_3118_121700)"})]})]}),(0,o.jsxs)("defs",{children:[(0,o.jsxs)("linearGradient",{id:"ic_hot_svg__paint0_linear_3118_121700",x1:4.536,y1:".278",x2:8.934,y2:6.742,gradientUnits:"userSpaceOnUse",children:[(0,o.jsx)("stop",{offset:".021",stopColor:"#FADF32"}),(0,o.jsx)("stop",{offset:".451",stopColor:"#EB9B46"}),(0,o.jsx)("stop",{offset:".782",stopColor:"#EB5854"})]}),(0,o.jsxs)("linearGradient",{id:"ic_hot_svg__paint1_linear_3118_121700",x1:3.616,y1:4.788,x2:11.598,y2:9.516,gradientUnits:"userSpaceOnUse",children:[(0,o.jsx)("stop",{stopColor:"#FFC533"}),(0,o.jsx)("stop",{offset:".436",stopColor:"#F26461"}),(0,o.jsx)("stop",{offset:".809",stopColor:"#FF0544"})]}),(0,o.jsxs)("linearGradient",{id:"ic_hot_svg__paint2_linear_3118_121700",x1:9.195,y1:11.126,x2:1.577,y2:4.974,gradientUnits:"userSpaceOnUse",children:[(0,o.jsx)("stop",{offset:".134",stopColor:"#FA0951"}),(0,o.jsx)("stop",{offset:".354",stopColor:"#FA3E65"}),(0,o.jsx)("stop",{offset:".881",stopColor:"#F2AE49"}),(0,o.jsx)("stop",{offset:".998",stopColor:"#FAC032"})]}),(0,o.jsx)("clipPath",{id:"ic_hot_svg__clip0_3118_121700",children:(0,o.jsx)("path",{fill:"#fff",d:"M0 0h12v12H0z"})})]})]}))),ej=e=>{let{awemeInfo:l,isModalPlayingCurrentVideo:i,onClickPipIcon:t}=e,{isWebMiniWin:n,pipWindow:o,isListenVideoMiniWin:a}=(0,E.Iq)(e=>{let{isWebMiniWin:l,pipWindow:i,isListenVideoMiniWin:t}=e;return{isWebMiniWin:l,pipWindow:i,isListenVideoMiniWin:t}}),d=(0,r.useMemo)(()=>(n||a)&&i,[n,l,i,a]),[s,u]=(0,r.useState)(!1),c=s||d;return(0,r.useEffect)(()=>{if(o){let e=()=>{u(!1)};return o.addEventListener("pagehide",e),()=>{o.removeEventListener("pagehide",e)}}},[o]),(0,r.useEffect)(()=>{!d&&u(!1)},[d]),{isPipPlaying:c,handleClickPipIcon:()=>{u(!0),null==t||t()}}};var eT=i("46892");let ek=(e,l)=>{var i,t,n,o,a,d,s,u;let c=!!e.authorInfo.roomId,v=(0,r.useMemo)(()=>{var i,t,n,o,r;return{web_rid:null===(n=e.authorInfo)||void 0===n?void 0:null===(t=n.roomData)||void 0===t?void 0:null===(i=t.owner)||void 0===i?void 0:i.web_rid,room_id:null===(o=e.authorInfo)||void 0===o?void 0:o.roomId,request_id:null==e?void 0:e.logPb,anchor_id:null===(r=e.authorInfo)||void 0===r?void 0:r.uid,live_position:l}},[null===(i=e.authorInfo)||void 0===i?void 0:i.uid,null===(o=e.authorInfo)||void 0===o?void 0:null===(n=o.roomData)||void 0===n?void 0:null===(t=n.owner)||void 0===t?void 0:t.web_rid,null===(a=e.authorInfo)||void 0===a?void 0:a.roomId,null==e?void 0:e.logPb,l]);return{isAuthorLiving:c,handleJumpToLiveRoom:(0,r.useCallback)(()=>{var i,t,n;let o=(0,eT.cc)({anchor_id:null===(i=e.authorInfo)||void 0===i?void 0:i.uid,web_rid:null===(n=e.authorInfo.roomData)||void 0===n?void 0:null===(t=n.owner)||void 0===t?void 0:t.web_rid,enter_from_merge:"web_homepage_discover",enter_method:"web_video_card",enter_method_temai:"web_video_card",action_type:"click",room_id:e.authorInfo.roomId,request_id:null==e?void 0:e.logPb,live_position:l,__is_replaced_live__:(null==e?void 0:e.__is_replaced_live__)?"1":"0"});window.open(o,"_blank","noopener")},[null===(d=e.authorInfo)||void 0===d?void 0:d.uid,null===(u=e.authorInfo.roomData)||void 0===u?void 0:null===(s=u.owner)||void 0===s?void 0:s.web_rid,e.authorInfo.roomId,null==e?void 0:e.logPb,l]),liveParams:v}};var eE="SXckAXDi",eS="zcYdttQy",eN="tNpBBFnp";let eP=e=>{let{onClick:l}=e;return(0,o.jsxs)("div",{className:eE,onClick:l,children:[(0,o.jsx)("div",{className:eS,children:(0,o.jsx)(G.default,{size:7})}),(0,o.jsx)("div",{className:eN,children:"正在直播"})]})};var eR=i("350856"),eA=i.n(eR),eM=i("273372");let eD=(e,l)=>l&&1e-4>Math.abs(e/l-16/9),eB=e=>{let{awemeInfo:l,isBigCard:i,scene:t,abTestData:n,ref:o}=e,[a,d]=(0,r.useState)(!1),s=(e,i)=>{let t=e?1:0,n=i&&i.length>5?1:0;er.K.report("pc_video_cut_result",{group_id:null==l?void 0:l.awemeId,is_cut:t,cut_protect_type:n}),(0,N.Sl)(null==l?void 0:l.awemeId,{isCut:t,cutProtectType:n})};return(0,r.useEffect)(()=>{var e,n,r;if("discover"!==t||!i||(null==l?void 0:l.webCardType)||!l.pcBlockedAreaRatio||(null!==(r=null==l?void 0:l.createTime)&&void 0!==r?r:0)*1e3<=17304192e5||!(null==l?void 0:null===(e=l.video)||void 0===e?void 0:e.height)||!(null==l?void 0:null===(n=l.video)||void 0===n?void 0:n.width)||eD(l.video.width,l.video.height)){s(!1);return}let a=eA()(()=>{if(o.current&&l&&l.video){let e=o.current.getBoundingClientRect(),{width:i}=e,t=e.height;if(i/t<l.video.width/l.video.height){let e=l.pcBlockedAreaRatio,n=(1-l.video.height/l.video.width*i/t)/2;if(!e){let l=n<.05;d(l),s(l,e);return}if(e&&e.length<=5){s(!1,e);return}let o=Math.min(null==e?void 0:e[6],100-(null==e?void 0:e[7]))-100*n>=1,r=n<.05&&o;d(r),s(r,e)}if(i/t>l.video.width/l.video.height){let e=l.pcBlockedAreaRatio,n=(1-l.video.width/l.video.height*t/i)/2;if(!e){let l=n<.05;d(l),s(l,e);return}if(e&&e.length<=5){s(!1,e);return}let o=Math.min(100-(null==e?void 0:e[8]),null==e?void 0:e[9])-100*n>=1,r=n<.05&&o;d(r),s(r,e)}}},0);a();let u=eM.Z.bind(o.current,a);return()=>u()},[t,i,null==l?void 0:l.awemeId,n]),a},eF=e=>{let{awemeInfo:l,abTestData:i}=e,[t,n]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{if(null==i?void 0:i.jxWatchLaterPip){let e=A.listen(A.EVENT.updateWatchLaterPipData,e=>{let{currentAwemeId:i}=e;i&&(i===(null==l?void 0:l.awemeId)?n(!0):n(!1))}),i=A.listen(A.EVENT.hiddenJxVideoCardPlaying,()=>{n(!1)});return()=>{e(),i()}}},[l,i]),{watchLaterPipPlaying:t}},eV=(0,c.ZP)(()=>i.e("19304").then(i.bind(i,693816)),{ssr:!1,resolveComponent:e=>{let{More:l}=e;return l}}),eH="data-feed-ad-click-refer",eO=e=>"cover"===e||"name"===e||"title"===e||"blank"===e,eU=e=>{let{hotInfo:l}=e;return(0,o.jsx)("div",{className:d()(U.hotMask),children:(0,o.jsxs)("div",{className:U.hotBottomInfo,children:[(null==l?void 0:l.header)?(0,o.jsxs)("div",{className:U.hotCount,children:[(0,o.jsx)("img",{src:"//p-pc-weboff.byteimg.com/tos-cn-i-9r5gewecjs/hot.png",alt:"热点icon"}),(0,o.jsx)("span",{className:U.hotText,children:null==l?void 0:l.hotTitle})]}):null,(null==l?void 0:l.footer)?(0,o.jsx)("span",{className:d()(U.hotDuration,U.hotTextHide),children:null==l?void 0:l.footer}):null]})})};var eZ=e=>{var l,i,a,c,Z,W,Y,z,J,$,q,Q,K,G,X,ee,el,ei,et,en,eo,er;let{style:ea,className:es,imageClassName:eu,imgClass:ev,imageSkeletonClass:em,imageBoxClassName:ef,cardInfoClassName:e_,cardIndex:eh,description:eg,userName:ep,likesCount:ew,videoTime:eC,userHref:ex,userHrefTarget:eb,imgUrl:eT,onClick:eE,onShow:eS,onMouseEnter:eN,onMouseLeave:eR,width:eA=0,height:eM=0,showLikes:eD=!0,fakeHorizontalInfo:eZ,previewUrlList:eW,isHorizontal:eY,showIntegrationTag:ez,showHomeNote:eJ,showHomeHot:e$,awemeInfo:eq,showHotInfo:eQ,hotInfo:eK,url:eG,isSpider:eX,debugInfo:e0,appendPlayerConfig:e1,showHighLightTag:e3=!1,isShowCreateTime:e2=!1,isShowDescription:e5=!0,blurLightCover:e6=!1,isNameFirst:e4=!1,willJump:e9=!1,videoInteractionTags:e8=[],showProgressBar:e7,onVideoPlaying:le,onVideoStopped:ll,coverMask:li,onVideoImageMouseEnter:lt,onVideoImageMouseLeave:ln,onLoadedData:lo,tab:lr,videoImageStyle:la,showImageInSSR:ld,forceContainerCover:ls=!1,renderExtension:lu,useStyleInUserLink:lc=!1,children:lv,onCoverLoad:lm,videoImageHeight:lf,videoImageWidth:l_,videoImagePriority:lh,decoding:lg,scene:lp,user:lw,abTestData:lC,enableNotePreview:lx,needOperateHidden:lb,hasNoFollow:lI,isBigCard:ly=!1,isTopCard:lL=!1,isTabActive:lj=!0,isTopCardActive:lT,topAwemeId:lk,showMore:lE=!1,showWatchLater:lS,logParams:lN,imageReady:lP,enableCardHoverPreview:lR=!1,onMorePopperShow:lA,onMorePopperHidden:lM,withBlurBg:lD,disabledALink:lB,enableImageX:lF,scrollContainerRef:lV,reuseConfig:lH,onClickAiEntry:lO,onClickPipIcon:lU,isModalPlayingCurrentVideo:lZ}=e,{isListenVideoMiniWin:lW}=(0,E.Iq)(e=>{let{isListenVideoMiniWin:l}=e;return{isListenVideoMiniWin:l}}),[lY,lz]=(0,r.useState)(!1),lJ=(0,r.useRef)(null),l$=(0,r.useRef)(null),[lq,lQ]=(0,r.useState)(ew),[lK,lG]=(0,r.useState)(null!==(eo=null===(i=N.Le.getConfig(N.gI.CollectStatusCache))||void 0===i?void 0:null===(l=i[null==eq?void 0:eq.awemeId])||void 0===l?void 0:l.count)&&void 0!==eo?eo:null==eq?void 0:null===(a=eq.stats)||void 0===a?void 0:a.collectCount),[lX,l0]=(0,r.useState)(null!==(er=null===(W=N.Le.getConfig(N.gI.FollowStatusCache))||void 0===W?void 0:null===(c=W[null==eq?void 0:null===(Z=eq.authorInfo)||void 0===Z?void 0:Z.uid])||void 0===c?void 0:c.followStatus)&&void 0!==er?er:null==eq?void 0:null===(Y=eq.authorInfo)||void 0===Y?void 0:Y.followStatus),[l1,l3]=(0,r.useState)(!1),[l2,l5]=(0,r.useState)({cover:{done:!1,success:!1},node:!1}),[l6,l4]=(0,r.useState)(!1),{isPipPlaying:l9,handleClickPipIcon:l8}=ej({awemeInfo:eq,isModalPlayingCurrentVideo:lZ,onClickPipIcon:lU}),{watchLaterPipPlaying:l7}=eF({awemeInfo:eq,abTestData:lC}),ie=l7||l9,il=!!(null==eq?void 0:eq.isAds),ii=il&&(0,_.Gu)(eq),it="discover"===lp&&ii,io=lS&&!("discover"===lp&&ii),ir=!!(ex&&!(0,_.gc)(eq)),ia=l6||ie,[id,is]=(0,r.useState)(!1),[iu,ic]=(0,r.useState)(!1),iv=(0,r.useRef)(0),im=r.useMemo(()=>{var e,l,i;return`/root/live/${null===(i=eq.authorInfo)||void 0===i?void 0:null===(l=i.roomData)||void 0===l?void 0:null===(e=l.owner)||void 0===e?void 0:e.web_rid}`},[null===($=eq.authorInfo)||void 0===$?void 0:null===(J=$.roomData)||void 0===J?void 0:null===(z=J.owner)||void 0===z?void 0:z.web_rid]),i_=r.useCallback(()=>{if(im){var e,l,i,o,r,a,d;let s=`${im}?${f.stringify((0,n._)((0,t._)({},lN),{anchor_id:null===(e=eq.authorInfo)||void 0===e?void 0:e.uid,web_rid:null===(i=eq.authorInfo.roomData)||void 0===i?void 0:null===(l=i.owner)||void 0===l?void 0:l.web_rid,enter_from_merge:"web_homepage_discover",enter_method:"web_video_card",enter_method_temai:"web_video_card",action_type:"click",room_id:eq.authorInfo.roomId,request_id:null==eq?void 0:eq.logPb,live_position:eh,__is_replaced_live__:(null==eq?void 0:eq.__is_replaced_live__)?"1":"0"}))}`;(0,k.X)({href:s,reusePlayer:0,webRid:null===(a=eq.authorInfo)||void 0===a?void 0:null===(r=a.roomData)||void 0===r?void 0:null===(o=r.owner)||void 0===o?void 0:o.web_rid,abtestData:lC,roomId:null===(d=eq.authorInfo)||void 0===d?void 0:d.roomId,usePreCreate:!0})}},[im,lN,null===(K=eq.authorInfo)||void 0===K?void 0:null===(Q=K.roomData)||void 0===Q?void 0:null===(q=Q.owner)||void 0===q?void 0:q.web_rid,null===(ee=eq.authorInfo)||void 0===ee?void 0:null===(X=ee.roomData)||void 0===X?void 0:null===(G=X.owner)||void 0===G?void 0:G.id_str,null===(ei=eq.authorInfo.roomData)||void 0===ei?void 0:null===(el=ei.owner)||void 0===el?void 0:el.web_rid,eq.authorInfo.roomId,null==eq?void 0:eq.logPb]),{isAuthorLiving:ih,handleJumpToLiveRoom:ig,liveParams:ip}=ek(eq,eh,i_);(0,u.C)(S.w3.components.video_card);let iw=(0,r.useMemo)(()=>(null==eq?void 0:eq.createTime)>0?(0,P.MH)((null==eq?void 0:eq.createTime)*1e3):"",[null==eq?void 0:eq.createTime]),iC=(0,h.Y)(()=>{g.logInstance.sendLog("postTimeShow",{enter_from:(0,R.mo)(),group_id:eq.awemeId,post_time:iw})}),ix=(0,r.useMemo)(()=>eq?(0,_.Rx)(eq):void 0,[eq]),ib=(0,r.useCallback)(e=>{if(!!il)(0,p.E)("realtime_click",{tag:"multiple_list_feed",value:null==ix?void 0:ix.creative_id,log_extra:null==ix?void 0:ix.log_extra,refer:e})},[ix,il]),iI=(0,r.useCallback)(e=>{var l,i;let t=null===(l=e.closest(`[${eH}]`))||void 0===l?void 0:l.getAttribute(eH);return eO(t)?t:(null===(i=lJ.current)||void 0===i?void 0:i.contains(e))?"cover":"blank"},[]);(0,r.useEffect)(()=>{let e=I.a.addCb(e=>{var l,i,t;let{action:n,diggCount:o,awemeId:r,actionUid:a,followStatus:d,collectCount:s}=e;(null==eq?void 0:eq.awemeId)===r&&(lQ((0,P.qe)(null!=o?o:null==eq?void 0:null===(i=eq.stats)||void 0===i?void 0:i.diggCount)),lG(null!=s?s:null==eq?void 0:null===(t=eq.stats)||void 0===t?void 0:t.collectCount)),("follow"===n||"unFollow"===n)&&a===(null==eq?void 0:null===(l=eq.authorInfo)||void 0===l?void 0:l.uid)&&l0(d)});return()=>{e()}},[eq]);let iy=(0,m.Z)(function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!!lL)A.emit(A.EVENT.JingxuanTopCard,{action:"topCardReplace",awemeId:lk,cancelReplace:e})}),iL=(0,h.x)(()=>{l5(e=>(0,n._)((0,t._)({},e),{node:!0})),it&&ix&&(0,p.E)("show",{tag:"multiple_list_feed",value:null==ix?void 0:ix.creative_id,log_extra:null==ix?void 0:ix.log_extra})});(0,r.useEffect)(()=>{l2.node&&(null==eS||eS())},[l2.node,eS]);let ij=(0,r.useCallback)(e=>{let l=void 0===e||e;l5(e=>(0,n._)((0,t._)({},e),{cover:{success:l,done:!0}}))},[eT]);(0,r.useEffect)(()=>{if(!!l2.cover.done&&!!l2.node)null==lm||lm(l2.cover.success,eT)},[l2.cover.done,l2.node,l2.cover.success,lm,eT]);let iT=e3&&(null==eq?void 0:eq.insertId),ik=e3&&(0,M.F)(lX)&&!iT,iE=e3&&lX!==w.$u.FollowEach&&lX!==w.$u.Followed&&!iT&&(null==e8?void 0:e8[0]),iS=()=>{ln&&ln(),null==eR||eR()},iN=(0,r.useRef)(null);(0,r.useEffect)(()=>{if(!ia&&lR){let e=B.mouseEnter(iL.current,()=>{var e,l;lR&&(null==iN||null===(l=iN.current)||void 0===l||null===(e=l.enter)||void 0===e||e.call(l))},!0),l=B.mouseLeave(iL.current,()=>{var e,l;lR&&(null==iN||null===(l=iN.current)||void 0===l||null===(e=l.leave)||void 0===e||e.call(l))});return()=>{e(),l()}}},[ia,lR]);let iP=(0,r.useRef)({is_first_large_card_outflow:ly?1:0});iP.current.is_first_large_card_outflow=ly?1:0;let iR=eB({awemeInfo:eq,isBigCard:ly,scene:lp,ref:iL}),{isiPad:iA}=(0,C.X)(),iM="discover"===lp,iD=iM&&!!(null==lC?void 0:lC.themeColorOptimize)&&!ly,iB=(0,r.useCallback)(()=>{l4(!0)},[]),iF=(0,r.useCallback)(()=>{l4(!1)},[]),iV=(0,r.useCallback)(()=>{clearTimeout(iv.current),ic(!0)},[]),iH=(0,r.useCallback)(()=>{clearTimeout(iv.current),iv.current=setTimeout(()=>{ic(!0)},250)},[]),iO=(0,r.useCallback)(()=>{var e,l;is(!0),null==iN||null===(l=iN.current)||void 0===l||null===(e=l.leave)||void 0===e||e.call(l),lz(!0)},[]),iU=(0,r.useCallback)(()=>{is(!1),lz(!1)},[]),iZ=(0,r.useCallback)(()=>{lz(!0)},[]),iW=(0,r.useMemo)(()=>F.H.newVideoInfo(lC),[lC]),iY=(0,r.useMemo)(()=>({is_first_large_card_outflow:ly?1:0}),[ly]);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(y.B,{target:"_blank",rel:`noopener noreferrer${lI?" nofollow":""}`,href:eG,isNeedSeoOpt:!0,className:d()(U.videoCard,es,{[U.hover]:iu,otherVideoCard:!iM,[U.bigCard]:ly,[U.isBigCardCutVideo]:iR}),style:ea,onClick:e=>{!e9&&e.preventDefault(),ib(iI(e.target)),null==eE||eE(e),null==iS||iS()},isUseALink:!lB&&(null==eq?void 0:eq.isHighQuality)!==x.HighQualityStatus.NotHighQuality,onMouseEnter:iA?void 0:()=>{clearTimeout(iv.current),ic(!0)},onMouseLeave:iA?void 0:()=>{iv.current=setTimeout(()=>{ic(!1)},250)},children:[(0,o.jsxs)("div",{ref:iL,className:U.flexColumn,children:[(0,o.jsxs)(ec,{abTestData:lC,onMouseEnter:()=>{lt&<(),null==eN||eN(),N.Le.setConfig(N.gI.VideoCardMouseOverTime,Date.now()),g.logInstance.sendLog("coverMouseover",{enter_from_merge:(0,D.yW)(),request_id:null==eq?void 0:eq.logPb,content_sdk:"video",group_id:null==eq?void 0:eq.awemeId,aweme_type:null==eq?void 0:eq.awemeType})},onMouseLeave:iS,className:d()(ef,{[U.report]:iM&&!id&&l6}),imageClassName:d()(U.videoImg,{[U.imgAspectRatio]:iM},eu),imgClass:ev,imageSkeletonClass:em,imgUrl:eT,debugInfo:(null==eq?void 0:eq.debugInfo)||e0,width:eA,height:eM,videoImageWidth:l_,videoImageHeight:lf,priority:lh,decoding:lg,fakeHorizontalInfo:eZ,appendPlayerConfig:e1,previewUrlList:eW,awemeInfo:eq,isHorizontal:eY,onLoadedData:lo,onVideoPlaying:le,onVideoStopped:ll,onPreviewChange:e=>{e?l3(!0):l3(!1)},showProgressBar:e7,isSpider:eX,alt:(0,V.vU)()?"":eg,style:la,showImageInSSR:ld,logParams:(0,t._)({awemeInfo:eq,tab_name:lr||""},lN),forceContainerCover:ls,renderExtension:lu,onImgLoad:ij,scene:lp,blurLightCover:e6,user:lw,onRef:e=>lJ.current=e,disablePreview:ia,disableByMoreAction:l6,enableNotePreview:lx,needOperateHidden:lb,isBigCard:ly,isTopCard:lL,topAwemeId:lk,showWatchLater:io,tab:lr,imageReady:lP,ref:iN,enableCardHoverPreview:lR,canCancelWatchLater:iM,withBlurBg:lD,withBlurBgPerf:iM,enableImageX:lF,scrollContainerRef:lV,reuseConfig:lH,showAiEntry:iM,onClickAiEntry:lO,onClickPipIcon:l8,isPipPlaying:l7||ie,dislikeCoverVisible:id,isTopCardActive:lT,isTabActive:lj,isModalPlayingCurrentVideo:lZ,useOuterProgress:iD,forceHiddenOuterProgress:lY,children:[(0,o.jsx)(e=>(0,o.jsx)("div",{className:d()(U.coverBg)}),{slot:ed.Inner}),!ia&&(0,o.jsx)(eI,{scene:lp,showIntegrationTag:ez,showTime:!eJ,showLikes:eD,likes:lq,time:eC,slot:ed.Inner,awemeInfo:eq,showHomeNote:eJ,showAdTag:it,adTagText:it?"广告":""}),eQ&&eK&&!l1&&(0,o.jsx)(eU,{slot:ed.OutSide,hotInfo:eK}),(0,o.jsx)(e=>li?(0,o.jsx)("div",{className:d()(U.coverMask),children:li}):null,{slot:ed.OutSide})]}),(0,o.jsx)("div",{className:d()(U.cardInfo,e_),ref:l$,children:(0,o.jsxs)("div",{className:d()(U.cardInfoContainer,{[U.transparent]:iM&&l6}),children:[e5&&!e4&&(0,o.jsx)("div",{className:d()(U.decs),children:(0,o.jsx)("span",{"data-feed-ad-click-refer":"title",children:eg})}),(0,o.jsxs)("div",{className:d()(U.userText,{[U.bottom]:e4}),onClick:e=>{if(ih){i_(),e.preventDefault(),e.stopPropagation();return}},children:[iM?(0,o.jsxs)("span",{className:U.userTextContent,onClick:e=>{var l;if(ib(iI(e.target)),lW&&v.T.exit(),e.preventDefault(),e.stopPropagation(),ih){i_();return}if(!!ir)null===(l=window)||void 0===l||l.open(ex,(0,H.DT)()?"_blank":eb,"noopener")},children:[(0,o.jsxs)("span",{className:d()(U.text,{[U.marginRight]:!ik&&!iE&&!iT&&!e2}),"data-feed-ad-click-refer":"name",children:["@",(0,o.jsx)("span",{className:U.userName,children:ep})]}),e2&&!ih&&!iE&&!iT&&!ik&&(0,o.jsxs)("span",{className:d()(U.createTime,{[U.hasMarginRight]:lE}),ref:iC,children:["\xa0\xb7\xa0",iw]})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("span",{onClick:e=>{var l;if(ib("name"),lW&&v.T.exit(),e.preventDefault(),e.stopPropagation(),ih){i_();return}if(!!ir)null===(l=window)||void 0===l||l.open(ex,(0,H.DT)()?"_blank":eb,"noopener")},className:d()(U.text,{[U.marginRight]:!ik&&!iE&&!iT&&!e2}),"data-feed-ad-click-refer":"name",children:[(0,o.jsx)("span",{className:d()(U.at),children:"@"}),(0,o.jsx)("span",{className:d()(U.userName),children:ep})]}),e2&&!ih&&!iE&&!iT&&!ik&&(0,o.jsx)("span",{className:d()(U.createTime,{[U.hasMarginRight]:lE}),ref:iC,children:` \xb7 ${iw}`})]}),(ik||iT)&&(0,o.jsx)(ey.R,{abTestData:lC,className:d()(ih?U.highlightTagWithoutMarginRight:U.highlightTag,{[U.jxThemeColor]:iM&&!!(null==lC?void 0:lC.themeColorOptimize)}),type:iT?"recommended":"follow"}),iE&&(0,o.jsx)(ey.R,{abTestData:lC,className:d()(U.highlightTag,{[U.jxThemeColor]:iM&&!!(null==lC?void 0:lC.themeColorOptimize)}),type:e8[0],count:{collect:lK,comment:null==eq?void 0:null===(et=eq.stats)||void 0===et?void 0:et.commentCount}[e8[0]]||0}),ih&&(0,o.jsx)(eP,{onClick:e=>{e.preventDefault(),e.stopPropagation(),g.logInstance.sendLog("liveCardClickEvent",(0,t._)({enter_method:"web_video_card",enter_from_merge:"web_homepage_discover",action_type:"click"},ip));let l=L.e.getPipWindow({scene:b.d.ListenVideo})||L.e.getPipWindow({scene:b.d.WebVideo});l&&l.close(),i_()}}),lE&&(0,o.jsx)(s.SV,{Slardar:(0,O.f5)(),children:(0,o.jsx)(eV,{awemeInfo:eq,isFeedAd:il,className:U.more,cardInfoContainerRef:l$,imageContainerRef:lJ,onCoverHover:iW?iB:()=>l4(!0),onCoverCancelHover:iW?iF:()=>l4(!1),user:lw,tab:lr,onMouseEnter:iW?iV:()=>{clearTimeout(iv.current),ic(!0)},onMouseLeave:iW?iH:()=>{clearTimeout(iv.current),iv.current=setTimeout(()=>{ic(!0)},250)},logParams:iW?iY:iP.current,enableCardHoverPreview:lR||iM,onPopperShow:lA,onPopperHidden:lM,onDislikeCoverShow:iW?iO:()=>{var e,l;is(!0),null==iN||null===(l=iN.current)||void 0===l||null===(e=l.leave)||void 0===e||e.call(l),lz(!0)},onDislikeCoverHidden:iW?iU:()=>{is(!1),lz(!1)},onReportCoverShow:iW?iZ:()=>{lz(!0)},onReplaceTopCard:iy})})]}),e5&&e4&&(0,o.jsx)("div",{className:d()(U.decs),children:(0,o.jsx)("span",{"data-feed-ad-click-refer":"title",children:eg})}),e$&&(0,o.jsxs)("div",{className:U.barContainer,children:[(0,o.jsx)(j.Z,{className:U.barIcon,width:12,height:12,viewBox:"0 0 12 12",src:eL}),(0,o.jsxs)("span",{className:U.barText,children:["热榜:",null==eq?void 0:null===(en=eq.hotList)||void 0===en?void 0:en.title]})]})]})})]}),lv]}),eX&&(0,o.jsx)(T.a,(0,n._)((0,t._)({style:lc?(0,n._)((0,t._)({},ea),{width:"auto",height:"auto"}):{},href:ex,target:"_blank",isNeedSeoOpt:!0},lI?{rel:"nofollow"}:{}),{children:ep}))]})}},654529:function(e,l,i){var t=i(624508);l.Z=new t.h({waterfallSlideFeatureV2:{eventName:"waterfall_slide_feature_v2",params:{velocity:0}},waterfallSlideFeature:{eventName:"waterfall_slide_feature",params:{duration:0}},discoverSlide:{eventName:"discover_slide",params:{tab_name:"",sub_tab_name:"",direction:"down",gid_list:"",visit_id:""}},waterfallProcessStat:{eventName:"waterfall_process_stat",params:{enter_from:"",from:"",skeleton_show_time:0,waterfall_fetch_end:0,first_img_load_time:0,init_duration:0,data_duration:0,cover_duration:0}},waterfallLoadmoreStat:{eventName:"waterfall_loadmore_stat",params:{enter_from:"",duration:0}},discoverFeedRequest:{eventName:"discover_feed_request",params:{scene:""}},discoverFeedResponse:{eventName:"discover_feed_response",params:{duration:0,scene:""}}})},836287:function(e,l,i){i.d(l,{x:function(){return f}}),i(414931);var t=i(121998),n=i(581999),o=i(939165),r=i(987826),a=i(771410),d=i(414061),s=i(335924),u=i(600767),c=i(396868),v=i(37821),m=i(746517);let f=function(e,l){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],f=(0,n.useUserInfoContext)()||{},{isLogin:_}=(null==f?void 0:f.userInfo)||{};(0,o.o)(()=>{if(!e)return;let n=null,o=d.listen(d.EVENT.discoverInsertVideo,e=>{let{aweme_id:i,play_progress:t,from_device_id:o,record_type:d,url_source:h,enter_from_on_cellphone:g,previous_page_on_cellphone:p,is_landscape_status_on_cellphone:w,enter_method_on_cellphone:C,item_duration:x,from_user_id:b,from_app_id:I,sync_play_src:y}=e;(0,u.m_)({awemeId:i,originType:v.F.DiscoverPage}).then(e=>{var u,v,L,j,T;if(0===e.statusCode&&e.detail){let i=e.detail;i.continationInfo={playProgress:t,continationVideoAlreadyConsume:!1,fromDeviceId:o,recordType:d,urlSource:h,enterFromOnCellphone:g,previousPageOnCellphone:p,isLandscapeStatusOnCellphone:w,enterMethodOnCellphone:C,itemDuration:x,fromUserId:b,syncPlaySrc:y},n=setTimeout(()=>{var e;null==l||null===(e=l.current)||void 0===e||e.call(l,i),c.F.info("正在播放手机端的视频")},300),a.Z.report("continuing_remind_show",{scene:"video",enter_from_on_cellphone:g,previous_page_on_cellphone:p,is_landscape_status_on_cellphone:w,enter_method_on_cellphone:C,item_duration:null==i?void 0:null===(u=i.video)||void 0===u?void 0:u.duration,aweme_type:null==i?void 0:i.awemeType,item_id:null==i?void 0:i.awemeId,from_device_id:o,from_user_id:b,from_app_name:r.AppID2AppName[(null!=I?I:"").toString()],sync_play_src:y}),"lan"===y&&"app_continued"===h&&!_&&(0,m.default)({headerText:"登录后畅享高清视频",enterMethod:"lan_continued",success:()=>{var e;null==f||null===(e=f.dispatch)||void 0===e||e.call(f,{type:"updateUserInfo"})}})}else"app_continued"===h&&a.Z.report("continued_broadcast_receive_sync_message",{scene:"video",stage:"fetch_aweme_fail",stage_detail:"insert",is_end:1,item_id:i,status_code:null==e?void 0:e.statusCode,log_pb:null==e?void 0:e.logPb,filter_reason:null==e?void 0:null===(v=e.filterDetail)||void 0===v?void 0:v.filterReason,filter_detail:null==e?void 0:null===(L=e.filterDetail)||void 0===L?void 0:L.detailMsg,is_charge_video:!!(null==e?void 0:null===(T=e.detail)||void 0===T?void 0:null===(j=T.chargeInfo)||void 0===j?void 0:j.is_charge_content),from_app_id:I,sync_play_src:(0,s.Rs)("sync_play_src")})})});if(i){let{url:e,query:l}=t.parseUrl(location.href),i=l.item_id;if("insert_discover"===l.feed_operation&&"string"==typeof i){var h;d.emit(d.EVENT.discoverInsertVideo,{aweme_id:i,play_progress:Number(null!==(h=(0,s.Rs)("play_progress"))&&void 0!==h?h:0),from_device_id:(0,s.Rs)("from_device_id"),record_type:(0,s.Rs)("record_type"),url_source:(0,s.Rs)("url_source"),enter_from_on_cellphone:(0,s.Rs)("enter_from_on_cellphone"),previous_page_on_cellphone:(0,s.Rs)("previous_page_on_cellphone"),is_landscape_status_on_cellphone:Number((0,s.Rs)("is_landscape_status_on_cellphone")),enter_method_on_cellphone:(0,s.Rs)("enter_method_on_cellphone"),item_duration:Number((0,s.Rs)("item_duration")),from_user_id:(0,s.Rs)("from_user_id"),from_app_id:Number((0,s.Rs)("from_app_id")),sync_play_src:(0,s.Rs)("sync_play_src")});let n=["item_id","feed_operation","play_progress","from_device_id","record_type","url_source","enter_from_on_cellphone","previous_page_on_cellphone","is_landscape_status_on_cellphone","item_duration","from_user_id"];(0,s.U$)(n),n.map(e=>delete l[e]),window.history.replaceState(null,"",t.stringifyUrl({url:e,query:l}))}}return()=>{null==o||o(),n&&clearTimeout(n)}},[e,_])}},950310:function(e,l,i){i.d(l,{b:function(){return p}}),i(490629);var t=i(101199),n=i(897471),o=i.n(n),r=i(590555),a=i(367340),d=i(186090),s=i(384884),u=i(356336),c=i(573031),v=i(795653),m=i(36897),f=i(836287),_=i(975193),h=i(654529),g=i(365169);let p=e=>{let{currentNumber:l,setCurrentNumber:i,awemeInfoList:n,setAwemeInfoList:p,modalAwemeInfo:w,abtestData:C,preloadReady:x,preloadAwemeList:b,preloadTargetGid:I,tagId:y,isActiveTab:L,isCourseTab:j}=e,{awemeFeed:T}=(0,m.j)(),{pipWindow:k,isWebMiniWin:E}=(0,g.Iq)(e=>{let{pipWindow:l,isWebMiniWin:i}=e;return{pipWindow:l,isWebMiniWin:i}}),S=(0,r.d)(!!(E||k)),N=(0,t.useRef)(!1),P=(0,t.useRef)(""),R=(0,t.useRef)(!1),[A,M]=(0,t.useState)(!1);(0,t.useEffect)(()=>{let e=null==C?void 0:C.mainHoverPreload;(e.action===u.MainHoverPreloadAction.click||e.action===u.MainHoverPreloadAction.hover)&&1===l&&e.cache===u.MainHoverPreloadCache.on&&_.Z.clearCache(null==w?void 0:w.awemeId)},[l]);let D=(0,r.d)(e=>{var t,o;T.dispatch("modalAwemeInfo",null),P.current=null==e?void 0:e.awemeId;let r=null==n?void 0:n[l],a=(null==r?void 0:r.awemeId)===(null==e?void 0:e.awemeId);p([e]),i(0),a&&"object"==typeof window&&(null===(t=window.player)||void 0===t?void 0:t.seek)&&"number"==typeof(null==e?void 0:null===(o=e.continationInfo)||void 0===o?void 0:o.playProgress)&&window.player.seek(e.continationInfo.playProgress)});(0,f.x)(!0,D);let B=(0,t.useRef)(0),F=(0,t.useRef)({isCourseFeed:j,offset:0,emptyFetchCount:0,ids:{[null==w?void 0:w.awemeId]:1}}),V=(0,t.useCallback)(async()=>{var e,l;if(L){let{statusCode:e,awemeList:l=[]}=await (0,a.bJ)({awemeId:P.current,count:8,filterGids:n.map(e=>null==e?void 0:e.awemeId).join(",")||""});return{statusCode:e,awemeList:l}}if(F.current.isCourseFeed){let{statusCode:e,awemeList:i=[],hasMore:t,offset:n}=await (0,d.F)({tabId:"screen_course_page",offset:F.current.offset,size:6,tagIdList:"[0,0,0]",idList:Object.keys(F.current.ids).join(",")});0===e&&(F.current.offset=n,null==i||null===(l=i.map)||void 0===l||l.call(i,e=>{(null==e?void 0:e.awemeId)&&(F.current.ids[e.awemeId]=1)}));let o=0===e&&0===i.length&&t;if(F.current.emptyFetchCount=o?F.current.emptyFetchCount+1:0,F.current.isCourseFeed=t&&F.current.emptyFetchCount<3,F.current.emptyFetchCount<3)return{statusCode:e,awemeList:i}}let i=P.current;B.current+=1;let t=8;c.H.jXSlide(C)&&1===B.current&&(t=2);let o=(null==C?void 0:null===(e=C.moduleFeedTimeout)||void 0===e?void 0:e.inner)||0;h.Z.sendLog("discoverFeedRequest",{scene:"inner"});let r=performance.now(),{statusCode:u,awemeList:v=[]}=await (0,s.fetchHomeModuleFeed)({useV2:1,moduleId:3003101,referType:10,count:t,seoFlag:0,targetGid:i,refreshIndex:B.current,tagId:y},void 0,{},o?{timeout:o}:void 0);return h.Z.sendLog("discoverFeedResponse",{duration:performance.now()-r,scene:"inner"}),{statusCode:u,awemeList:v}},[n,L,y,C]);(0,t.useEffect)(()=>{let e=e=>{var l,i;let t=(0,v.Q5)()&&(e.metaKey&&"w"===e.key||e.metaKey&&"q"===e.key);if((null===(l=document.activeElement)||void 0===l?void 0:l.tagName)!=="INPUT"&&!t&&(null==e?void 0:null===(i=e.target)||void 0===i?void 0:i.contentEditable)!=="true")null==e||e.preventDefault()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[]),(0,t.useEffect)(()=>{if(null==C?!void 0:!C.jxModalPreloadOptimize)b.length&&p(e=>o()([...e,...b],"awemeId"))},[b,p,null==C?void 0:C.jxModalPreloadOptimize]),(0,t.useEffect)(()=>{(null==C?void 0:C.jxModalPreloadOptimize)&&b.length&&I===(null==w?void 0:w.awemeId)&&p(e=>o()([...e,...b],"awemeId"))},[b,p,null==w?void 0:w.awemeId,null==C?void 0:C.jxModalPreloadOptimize]),(0,t.useEffect)(()=>{n.length>0&&-1===l&&i(0)},[n]),(0,t.useEffect)(()=>{let e=null==R?void 0:R.current;n.length-l<=2&&!N.current&&e&&(async()=>{N.current=!0;for(let e=0;e<3;e++){let{statusCode:e,awemeList:l=[]}=await V();if(0!==l.length){N.current=!1,0===e&&p(e=>o()([...e,...l],"awemeId"));break}}})()},[l,n,V,C]),(0,t.useEffect)(()=>{R.current=x},[x]),(0,t.useEffect)(()=>{w&&((null==C?void 0:C.jxModalPreloadOptimize)&&!S.current?p(e=>{var l;return(null==e?void 0:null===(l=e.find)||void 0===l?void 0:l.call(e,e=>(null==e?void 0:e.awemeId)===(null==w?void 0:w.awemeId)))?e:[w,...e]}):p([w]),i(0),P.current=null==w?void 0:w.awemeId)},[w,null==C?void 0:C.jxModalPreloadOptimize])}},975193:function(e,l,i){var t=i(480333);let n=new class e{setCache(e,l){let i=Date.now()+this._cacheTime;this._cache[e]={value:l,expireTime:i,loading:!1}}setCacheLaoading(e){let l=Date.now()+this._cacheTime;this._cache[e]={value:[],expireTime:l,loading:!0}}getCache(e){let l=this._cache[e];return l?l.expireTime<Date.now()?(this.clearCache(e),null):l:null}clearCache(e){delete this._cache[e]}clearAllCache(){this._cache={}}setCacheTime(e){this._cacheTime=6e4*e}constructor(e){(0,t._)(this,"_cacheTime",void 0),(0,t._)(this,"_cache",{}),this._cacheTime=e.cacheTime,this._cache={}}}({cacheTime:18e5});l.Z=n},351373:function(e,l,i){i.r(l),i.d(l,{default:function(){return tI}}),i("490629"),i("706056"),i("656562"),i("992871");var t=i("320165"),n=i("101199"),o=i("656245"),r=i("116537"),a=i("813458"),d=i("778018"),s=i("618759"),u=i("661444"),c=i("523784"),v=i("47014"),m=i("377381"),f=i("629686"),_=i("402748");i("679308"),i("559561"),i("374954");var h=i("121998"),g=i("469935"),p=i.n(g),w=i("890710"),C=i("339808"),x=i("48795"),b=i("855436"),I=i("480333"),y=i("436698"),L=i("59850"),j=i("487543"),T=i("314810"),k=i("878217");let E=(0,n.createContext)(null);class S{updateState(e,l){if(void 0!==e.container&&(this.container=e.container),void 0!==e.playParams){var i,t;this.playParams=(0,_._)((0,f._)({},this.playParams,e.playParams),{playerConfig:(0,_._)((0,f._)({},null===(i=this.playParams)||void 0===i?void 0:i.playerConfig,null===(t=e.playParams)||void 0===t?void 0:t.playerConfig),{onPlay:()=>{var l,i;this.isPlaying=!0,null===(i=e.playParams.playerConfig)||void 0===i||null===(l=i.onPlay)||void 0===l||l.call(i)},onPause:()=>{var l,i;this.isPlaying=!1,null===(i=e.playParams.playerConfig)||void 0===i||null===(l=i.onPause)||void 0===l||l.call(i)},onEnd:()=>{var l,i;this.isPlaying=!1,null===(i=e.playParams.playerConfig)||void 0===i||null===(l=i.onEnd)||void 0===l||l.call(i)}})})}void 0!==e.isPlaying&&(this.isPlaying=e.isPlaying),null==l||l(),this.lastUsed=Date.now()}clearVideoClasses(){var e,l,i;let t=null===(i=this.ref)||void 0===i?void 0:null===(l=i.current)||void 0===l?void 0:null===(e=l.getPlayer)||void 0===e?void 0:e.call(l);(null==t?void 0:t.video)&&(t.video.className="")}assignTo(e,l){this.updateState({container:e,playParams:l,isPlaying:!0},void 0)}release(){this.updateState({container:null,playParams:null,isPlaying:!1},void 0)}isAvailable(){return null===this.container}pause(){this.updateState({isPlaying:!1},()=>{var e,l;let i=null===(e=this.ref.current)||void 0===e?void 0:e.getPlayer();null==i||null===(l=i.pause)||void 0===l||l.call(i)})}play(){this.updateState({isPlaying:!0},()=>{var e,l,i;let t=null===(e=this.ref.current)||void 0===e?void 0:e.getPlayer();null==t||null===(l=t.resetState)||void 0===l||l.call(t),null==t||null===(i=t.play)||void 0===i||i.call(t).catch(()=>{})})}constructor(e){(0,I._)(this,"id",void 0),(0,I._)(this,"container",void 0),(0,I._)(this,"playParams",void 0),(0,I._)(this,"isPlaying",void 0),(0,I._)(this,"lastUsed",void 0),(0,I._)(this,"ref",void 0),this.id=e,this.container=null,this.playParams=null,this.isPlaying=!1,this.lastUsed=Date.now(),this.ref=n.createRef()}}class N{addActiveListener(e){this.activeListeners.add(e)}removeActiveListener(e){this.activeListeners.delete(e)}notifyActiveChange(){let e=this.getActiveInstances();this.activeListeners.forEach(l=>l(e))}getInstanceByContainer(e){return this.instances.find(l=>l.container===e)}assignInstance(e,l){let i=this.getInstanceByContainer(e);if(i)return i.clearVideoClasses(),i.assignTo(e,l),this.notifyActiveChange(),i;let t=this.instances.find(e=>e.isAvailable());if(t)return t.clearVideoClasses(),t.assignTo(e,l),this.notifyActiveChange(),t;let n=new S(`player_${Date.now()}`);return n.assignTo(e,l),n.clearVideoClasses(),this.instances.push(n),this.notifyActiveChange(),n}pause(e){let l=this.getInstanceByContainer(e);l&&l.pause()}release(e){let l=this.getInstanceByContainer(e);l&&(l.release(),this.notifyActiveChange())}getActiveInstances(){return this.instances.filter(e=>!e.isAvailable())}cleanupIdleInstances(){let e=Date.now();this.instances=this.instances.filter(l=>(!l.isAvailable()||!(e-l.lastUsed>3e4))&&!0)}startCleanupTimer(){!this.cleanupInterval&&(this.cleanupInterval=setInterval(()=>{this.cleanupIdleInstances()},1e4))}stopCleanupTimer(){this.cleanupInterval&&(clearInterval(this.cleanupInterval),this.cleanupInterval=null)}clearAll(){this.instances=[],this.stopCleanupTimer(),this.notifyActiveChange()}constructor(){this.instances=[],this.cleanupInterval=null,this.activeListeners=new Set}}let P=(0,n.memo)(e=>{let{playerPool:l,instance:i,plugins:o}=e,{container:r,playParams:a,ref:d}=i,{playerConfig:s,style:u,pluginSchema:c={}}=a||{};n.useRef(0);let v=n.useRef(!1);return(n.useEffect(()=>{var e,l,i,t,n,o,a;!(null==d?void 0:null===(t=d.current)||void 0===t?void 0:null===(i=t.getPlayer())||void 0===i?void 0:null===(l=i._core)||void 0===l?void 0:null===(e=l._src)||void 0===e?void 0:e.includes(null==s?void 0:s.url))&&!v.current&&r&&(v.current=!0,null==d||null===(a=d.current)||void 0===a||null===(o=a.getPlayer())||void 0===o||null===(n=o.retry)||void 0===n||n.call(o))},[r]),r&&a)?(0,w.createPortal)((0,t.jsx)(n.Fragment,{children:(0,t.jsxs)(y.N,(0,_._)((0,f._)({className:"liveCardPlayer",style:(0,f._)({height:"100%"},u),ref:e=>{d.current={getPlayer:()=>null==e?void 0:e.player,getPlayerLogger:()=>null==e?void 0:e.logger}},role:"consumer",scene:"LiveCardPlayer"},s),{children:[c&&Object.entries(c).map(e=>{let[l,i]=e,n=o[l];return n?(0,t.jsx)(n,(0,f._)({},i.props),l):null}),(0,t.jsx)(k.h,{source:"LiveCardPlayer"})]}))},i.id),r):null}),R=(0,n.memo)(e=>{let{playerPool:l,plugins:i}=e,[o,r]=(0,n.useState)([]);return(0,n.useEffect)(()=>{let e=e=>{r(e)};return l.addActiveListener(e),r(l.getActiveInstances()),()=>{l.removeActiveListener(e)}},[l]),(0,t.jsx)(t.Fragment,{children:o.map(e=>(0,t.jsx)(n.Fragment,{children:(0,t.jsx)(P,{playerPool:l,instance:(0,f._)({},e),plugins:i})},`${e.id}`))})}),A=e=>{let{children:l}=e,i=(0,n.useRef)(new N),o=(0,n.useRef)({VipLiveBoundaryPlugin:j.VipLiveBoundaryPlugin,AdaptedBySEIPlugin:T.AdaptedBySEIPlugin});(0,n.useEffect)(()=>(i.current.startCleanupTimer(),()=>i.current.stopCleanupTimer()),[]);let r=(0,L.Z)(e=>{o.current=(0,f._)({},o.current,e)}),a=(0,L.Z)((e,l)=>e?i.current.assignInstance(e,l):null),d=(0,L.Z)(e=>{try{i.current.pause(e),i.current.release(e)}catch(e){}}),s=(0,L.Z)(e=>i.current.getInstanceByContainer(e)),u=(0,L.Z)(()=>{i.current.clearAll()});(0,n.useEffect)(()=>()=>{u()},[]);let c=(0,n.useMemo)(()=>({play:a,pause:d,getInstance:s,clearAllPlayers:u,plugins:o.current,registerPlugin:r}),[]);return(0,t.jsxs)(E.Provider,{value:c,children:[l,(0,t.jsx)(R,{playerPool:i.current,plugins:o.current})]})};var M=i("473228"),D=i("56924"),B=i("295207"),F=i("939165"),V=i("590555"),H=i("206698"),O=i("913285"),U=i("604467"),Z=i("983218"),W=i("499059"),Y=i("414061"),z=i("995898"),J=i("628077"),$=i("384884"),q=i("356336"),Q=i("675403"),K=i("59103"),G=i("117961"),X=i("31992"),ee=i("140726"),el=i("556265"),ei=i("55938"),et=i("68608"),en=i("414986"),eo=i("524053");let er=()=>Promise.all([i.e("53016"),i.e("16970")]).then(i.bind(i,818520)),ea=(0,n.forwardRef)(function(e,l){return(0,t.jsx)(eo.o,(0,f._)({innerRef:l,id:"island_79fa5",load:er},e))});var ed=i("799155"),es=i("950310"),eu={waterfallPage:"_bpJj4nI",waterfallPageWithSubTab:"ulQ3V2lH",topicPage:"cuqv4HQZ",topicPageWithDiscoverCardOptimize:"g2zggpKc",feedTitle:"jjvDBNJw",wrapperMarin:"bnAnKmj1",bannerContainer:"XHgOvmj5",tabs:"qjOtIUTj",switchBtn:"HBxZXI10",hasTabExpand:"gfQK1HAa",hasSubList:"DnL86o70",jxThemeColor:"YPEzw7OC",tabPanelCt:"YVnauB2P",discoverTabBar:"bBh5UYSe",subTabStickyContainer:"zAN2L5mv",subTag:"xEHxPflC",active:"dZTn2I9M",loadingContainer:"kPwTyTug",hidden:"VZuoi05b"},ec=i("975193");i("431723"),i("88856");var ev=i("506887"),em=i("333047"),ef=i("538108"),e_=i("186090"),eh=i("235586"),eg=i("87897"),ep=i("581999"),ew=i("294474");i("240148"),i("759943");var eC=i("227831"),ex=i("649368"),eb=i("933524"),eI=i("624508");let ey=new eI.h({subTabLiveShow:{eventName:"discover_sub_tab_live_show",params:{order:0,link:"",id:"",title:""}},subTabLiveClick:{eventName:"discover_sub_tab_live_click",params:{order:0,link:"",id:"",title:""}}});var eL="edutzzs0",ej="qE2851Nd",eT="YtC0dU_v",ek="wCD0FR4B",eE="k1npNCtl",eS="tzInqS99",eN="u9nRUvdb",eP="sICq01yZ",eR="TtOsf4wb",eA="_dhwaynf";let eM=e=>{let{cardLiveInfo:l,cardStyle:i}=e,{live_title:o,live_cover:r,live_btn:a,live_link:d,live_idx:s}=l||{},[u,c]=function(e){let[l,i]=(0,eb.Z)(),t=(0,n.useRef)(!1);return!t.current&&i&&(e&&e(),t.current=!0),[l,i]}(()=>{var e,l;ey.sendLog("subTabLiveShow",{title:o,link:d,order:s,id:null==d?void 0:null===(l=d.match)||void 0===l?void 0:null===(e=l.call(d,/\d+/))||void 0===e?void 0:e[0]})}),v=e=>{var l,i;window.open(e,"_blank","noopener"),ey.sendLog("subTabLiveClick",{title:o,link:e,order:s,id:null==e?void 0:null===(i=e.match)||void 0===i?void 0:null===(l=i.call(e,/\d+/))||void 0===l?void 0:l[0]})};return(0,t.jsxs)("div",{className:p()(eL,{[eA]:"with-background"===i}),onClick:e=>{e.stopPropagation(),v(d)},ref:u,children:[(0,t.jsx)("div",{className:ej,children:(0,t.jsx)(eC.Q,{imgClass:eE,className:ek,src:r,iconWidth:24,iconHeight:28,showImageInSSR:!1,imageReady:!0,skeletonClass:eT})}),(0,t.jsxs)("div",{className:eS,children:[(0,t.jsx)("div",{className:eN,onClick:e=>{e.stopPropagation(),v(d)},children:o}),(0,t.jsx)("div",{className:eP,children:(0,t.jsxs)("span",{className:eR,onClick:e=>{e.stopPropagation(),v(d)},children:[a,(0,t.jsx)(ex.Z,{})]})})]})]})};var eD={CardAd:"card_ad",SubTabLive:"sub_tab_live"};i("683656");var eB=i("350856"),eF=i.n(eB),eV=i("855357"),eH=i("442022"),eO=i("687581"),eU=i("880327"),eZ=i("489113"),eW=i("632982"),eY=i("630582"),ez=i("507909"),eJ=i("414644"),e$={waterfallWrapper:"ny627FHf",noScrollParent:"I91s31zd",waterfallContainer:"vg6ZqNFG",skeletonContainer:"AE2sog1J",item:"OeaWUf2h",contentVisible:"wsHpfZHO",emptyItem:"Ihfp7fqL",placeHolder:"I22w4He4",imgBox:"lvGSE56u",infoBox:"hEUr929r",opBtn:"TgGssGUJ",noMoreText:"eAsa11Zw"};let eq=em.ERROR_CODE,eQ=e=>{let{statusCode:l,isGaiaTab:i}=e;if(i)return(0,t.jsx)(eJ.nl,{title:"活动已下线"});switch(l){case eq.ERROR_404:return(0,t.jsx)(eJ.dR,{title:"暂无更多数据",desc:" "});case eq.ERROR_502:case eq.ERROR_NO_NETWORK:return(0,t.jsx)(eJ.oO,{});default:return(0,t.jsx)(eJ.nl,{})}},eK=e=>{let{reload:l,statusCode:i,className:n}=e,o=i===eq.ERROR_502?"超时":"异常";return(0,t.jsxs)("div",{className:p()(e$.noMoreText,n),children:["服务",o,",重新",(0,t.jsx)("span",{onClick:l,className:e$.opBtn,children:"刷新"}),"拉取数据"]})};var eG=i("30368"),eX=e=>{let{containerClassName:l}=e,i=(0,n.useMemo)(()=>Array(60).fill({id:"skeleton"}),[]);return(0,r.C)(d.w3.components.discover_skeleton_component),(0,t.jsx)("div",{className:p()(e$.waterfallContainer,e$.skeletonContainer,l),children:i.map((e,l)=>(0,t.jsx)("div",{className:p()(e$.item),children:(0,t.jsx)(eG.P,{className:e$.placeHolder,imgBoxClassName:e$.imgBox,infoBoxClassName:e$.infoBox,useNewLogo:!0})},`${null==e?void 0:e.id}_${l}`))})},e0={LOADING:0,0:"LOADING",SUCCESS:1,1:"SUCCESS",FAILED:2,2:"FAILED"},e1={LOADING:0,0:"LOADING",SUCCESS:1,1:"SUCCESS",FAILED:2,2:"FAILED"};let e3=4/3;var e2=n.forwardRef((e,l)=>{let{renderItem:i,fetchStatus:o,showDataList:a,containerClassName:s,statusCode:u,onload:c,update:v,reload:m,onCoverShow:f,abTestData:_={},setLoadingElement:h,setWaterfallContainer:g,showReplaceLoading:w}=e,C=(0,n.useRef)(!1),x=(0,n.useRef)(0),[b,I]=(0,n.useState)(0);return(0,r.C)(d.w3.components.discover_success_component),(0,n.useEffect)(()=>{(null==_?void 0:_.discoverTaskOptimize)||I(a.length),a.length&&!C.current&&(C.current=!0,null==c||c())},[a,c,_]),(0,n.useEffect)(()=>{let e=(null==_?void 0:_.discoverTaskOptimize)?a.length:b;e!==x.current&&(x.current=e,null==v||v())},[b,v,a,_]),(0,t.jsxs)(O.k,{componentName:"SuccessComponent",children:[(0,t.jsx)("div",{className:p()(e$.waterfallContainer,s),ref:e=>{l.current=e,g(e)},children:null==a?void 0:a.map((e,n)=>{var o,r,d;let{id:s,displayId:u,render:c,inView:v}=e,m=(null==a?void 0:null===(o=a[0])||void 0===o?void 0:o.isTopCard)?null==a?void 0:null===(r=a[0])||void 0===r?void 0:r.awemeId:"";return(0,t.jsx)("div",{className:p()(e$.item,"discover-video-card-item",e$.contentVisible,{[e$.emptyItem]:!v}),id:s,"data-aweme-id":null!==(d=null==e?void 0:e.awemeId)&&void 0!==d?d:"",style:{backgroundColor:e.bgColor},children:v?c?null==c?void 0:c(e):null==i?void 0:i(e,f,void 0,n,l,m):null},u||s)})}),(0,t.jsx)("div",{ref:e=>{e&&(null==h||h(e))},children:!w&&o===e1.LOADING&&(0,t.jsx)(Z.gb,{})}),o===e1.FAILED&&(0,t.jsx)(eK,{reload:m,statusCode:u})]})});i("591964");var e5=i("205030"),e6=i("654529");e5.Q5.slow,e5.Q5.fast;let e4={[e5.Q5.normal]:150,[e5.Q5.fast]:220};class e9{calcHeight(e){let l=this.scrollParentEl||this.waterfallWrapperRef.current;if(l){let{scrollTop:i}=l;if(!e){let e=i-this.preTop,l=Date.now()-this.preTime;this.addSimple({velocity:Math.abs(e/l*1e3)})}this.preTop=i,this.preTime=Date.now()}}onScroll(){this.calcHeight(!1)}init(){let e=this.scrollParentEl||this.waterfallWrapperRef.current;this.onScrollHandler=eF()(()=>{this.onScroll()},200),null==e||e.addEventListener("scroll",this.onScrollHandler),this.calcHeight(!0)}sendLog(){this.queue.length>=this.coldStartNumberThreshold&&e6.Z.sendLog("waterfallSlideFeatureV2",{velocity:this.getFeatureVal()})}getFeatureType(){return this.featureType||e5.Q5.normal}calcFeatureType(){let e;if(this.queue.length<this.coldStartNumberThreshold)return;let l=this.getFeatureVal();e=l>=e4[e5.Q5.fast]?e5.Q5.fast:l>=e4[e5.Q5.normal]&&l<e4[e5.Q5.fast]?e5.Q5.normal:e5.Q5.slow,this.featureType=e,W.Le.setConfig(W.gI.HomeFastSlowSlideFeature,e)}addSimple(e){if(!((null==e?void 0:e.velocity)<0))this.queue.length>=this.maxCacheCount&&this.deleteSimple(),this.queue.push(e),this.calcFeatureType(),this.sendLog()}deleteSimple(){this.queue.shift()}clearSimple(){this.queue=[]}getFeatureVal(){return this.queue.reduce((e,l)=>e+=l.velocity,0)/this.queue.length}destroy(){this.clearSimple();let e=this.scrollParentEl||this.waterfallWrapperRef.current;null==e||e.removeEventListener("scroll",this.onScrollHandler),this.onScrollHandler=null}constructor(e){(0,I._)(this,"maxCacheCount",void 0),(0,I._)(this,"coldStartNumberThreshold",void 0),(0,I._)(this,"queue",[]),(0,I._)(this,"timer",void 0),(0,I._)(this,"preTime",void 0),(0,I._)(this,"preTop",void 0),(0,I._)(this,"scrollParentEl",void 0),(0,I._)(this,"waterfallWrapperRef",void 0),(0,I._)(this,"featureType",e5.Q5.normal),(0,I._)(this,"onScrollHandler",void 0);let{maxCacheCount:l,scrollParentEl:i,waterfallWrapperRef:t}=e;this.scrollParentEl=i,this.waterfallWrapperRef=t,this.maxCacheCount=l,this.coldStartNumberThreshold=2,this.preTop=0,this.preTime=0,this.onScroll=this.onScroll.bind(this)}}let e8=e=>{let{scrollParentEl:l,waterfallWrapperRef:i,abTestData:t}=e,o=(0,n.useRef)(null);(0,n.useEffect)(()=>{var e,n;return(null==t?void 0:null===(e=t.homeFastSlowSlide)||void 0===e?void 0:e.isOpen)?(o.current=new e9({maxCacheCount:5,scrollParentEl:l,waterfallWrapperRef:i}),null===(n=o.current)||void 0===n||n.init(),()=>{var e;null==o||null===(e=o.current)||void 0===e||e.destroy(),o.current=null}):()=>{}},[t,l,i])},e7=(e,l)=>{if(e){let{scrollTop:i,clientHeight:t,scrollHeight:n}=e;return i+t+l>n&&t>0}return!1},le=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e.filter((e,t)=>!(l.find(l=>l.id===e.id)||l.find(l=>l.awemeId===e.awemeId))&&(e.displayId=`${e.id}_${Date.now()}_${t}`,e.awemeType===eV.e.LiveCard&&(e.width=240,e.height=320),i&&e.awemeType===eV.e.Note&&(e.width=320,e.height=240,e.video.width=320,e.video.height=240),e.height&&e.width||e.ratio))},ll=e=>{var l;let i=[],t=[];null==e||null===(l=e.filter(e=>!(null==e?void 0:e.isAds)))||void 0===l||l.forEach(e=>{e.awemeType===eV.e.LiveCard?i.push(e):t.push(e)});let n=i.map(e=>e.awemeId),o=i.map(e=>e.encodedAwemeId).filter(e=>void 0!==e),r=t.map(e=>e.awemeId);return{liveIds:n,liveEncodedIds:o,ids:r,encodedIds:t.map(e=>e.encodedAwemeId).filter(e=>void 0!==e)}};var li=i("908219"),lt=i.n(li);i("559352"),i("932651"),i("117232"),i("414931");var ln=i("144174");let lo=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(0===l)return;let i=e[l];e.splice(l,1),e.unshift(i)},lr=e=>{var l;if(!(null==e?void 0:null===(l=e.awemeList)||void 0===l?void 0:l.length))return[];let i=e.awemeList.map(e=>Object.assign({},e,{inView:!0})),t=(0,ln.D)(i);return t>=0&&(lo(i,t),i[0].isTopCard=!0,i[0].isBigCard=!0),i};var la=i("53702"),ld=i("732199"),ls=i("37821");i("228983");let lu=e=>{if(e.watchLaterInfo){var l,i,t;let{list:n=""}=null!==(l=W.Le.getConfig(W.gI.WatchLater))&&void 0!==l?l:{};if(!(n&&n.includes(e.awemeId))){let l=null!==(i=W.Le.getConfig(W.gI.WatchLater))&&void 0!==i?i:{},n=null!==(t=l.list)&&void 0!==t?t:"",o=Array.from(new Set([...n?n.split(","):[],e.awemeId]));W.Le.setConfig(W.gI.WatchLater,(0,_._)((0,f._)({},l),{list:o.join(",")}))}}},lc=e=>{let{renderList:l,fetchDataListRef:i,scrollParentEl:t,waterfallWrapperRef:o}=e,r=(0,n.useRef)(0);(0,D.C)(()=>{if(!(0,s.DT)())return;let e=Y.listen(Y.EVENT.changeLynxDiscoverAwemeList,e=>{let{awemeList:t,scrollTop:n}=e,o={},a=[...t,...i.current].filter((e,l)=>((null==e?!void 0:!e.awemeId)||!o[null==e?void 0:e.awemeId])&&(0!==l&&((null==e?void 0:e.isTopCard)||(null==e?void 0:e.isBigCard))&&(e.isTopCard=!1,e.isBigCard=!1),o[null==e?void 0:e.awemeId]=!0,!0));i.current=a,window.fetchDataListRef=i.current,r.current=n,null==l||l()});return()=>{null==e||e()}},[t,l,i.current]),(0,D.C)(()=>{if(!!(0,s.DT)()){if(t&&o.current&&r.current>0){let e=r.current;r.current=0;let l=t||o.current;l&&l.scrollTo({top:e})}t&&o.current&&Y.emit(Y.EVENT.switchTab)}},[t,r.current])},lv=em.ERROR_CODE;function lm(e){var l,i,o,a;let{awemeIdsRef:u,fetchMore:c,fetchMoreDistance:m=3600,renderItem:_,abTestData:h,containerClassName:g,onListLoad:C,onError:x,children:b,scrollParentEl:I,scrollListenerEl:y=I,className:j,perfProps:T,firstBigCard:k=!1,isGaiaTab:E=!1,tagId:S,selectedTab:N,setLoadingElement:P,setShowReplaceLoading:R,showReplaceLoading:A}=e,[M,B]=(0,n.useState)(e0.LOADING),[O,U]=(0,n.useState)(e1.LOADING),[Z,z]=(0,n.useState)(0),J=(0,n.useRef)(""),q=(0,n.useRef)(null),[Q,K]=(0,n.useState)(null),G=(0,V.d)(h),X=(0,V.d)(null==h?void 0:h.jingxuanModalAds),{homeFetchData:ee,updateSubTabLiveCardList:el,updateFeedCardAdResourceList:ei}=(0,ez.useDiscoverCommonContext)((0,en.P1)(["homeFetchData","updateFeedCardAdResourceList","updateSubTabLiveCardList"])),eo=(0,n.useRef)([]),er=(0,n.useRef)([]),ea=(0,n.useRef)([]),ed=(0,n.useRef)((null==ee?void 0:ee.isCourse)&&null!==(i=null==ee?void 0:ee.offset)&&void 0!==i?i:0),es=(0,n.useRef)(0),eu=(0,n.useRef)(!1),ec=(0,n.useRef)(e1.LOADING),ev=(0,n.useRef)(!1),em=(0,n.useRef)(!0),ef=(0,n.useRef)(null),e_=(0,n.useRef)(!1),eh=(0,n.useRef)(!1),eg=(0,n.useRef)(!1),ep=(0,n.useRef)(null),{showDataList:ew,isTopBigCard:eC,resetTopAweme:ex,renderList:eb,showAwemeList:eI,fetchDataListRef:ey,needReplaceTopCardRef:eL,onReplaceBigCard:ej,clearNeedReplaceTopCard:eT}=function(e){var l;let{abTestData:i,selectedTab:t,isGaiaTab:o,tagId:r,scrollListenerEl:a,waterfallContainer:d,awemeIdsRef:u}=e,c=(0,V.d)(a),v=(0,n.useRef)({scrollHeight:0,scrollWidth:0,columnCount:0,itemHeight:0,itemWidth:0}),m=(0,n.useRef)(!0),_=(0,n.useRef)(!1),h=(0,et.U)(),g=(0,V.d)(h),p=(0,n.useRef)(0),w=(0,n.useRef)(!1),{homeFetchData:C,finalFeedCardAdListMap:x,activeSubTab:b}=(0,ez.useDiscoverCommonContext)((0,en.P1)(["homeFetchData","finalFeedCardAdListMap","activeSubTab"])),I=lr(C),y=(0,n.useRef)(I),[j,T]=(0,n.useState)(I),k=(0,n.useRef)(!((null==I?void 0:I.length)>0)||(null===(l=I[0])||void 0===l?void 0:l.isTopCard)),E=(0,n.useRef)(!0),[S,N]=(0,n.useState)(!0),P=(0,n.useRef)(!0),R=(0,n.useMemo)(()=>(null==x?void 0:x[t])||[],[x,t]),A=(0,L.Z)(function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!c.current||!_.current||!d)return;let l=d.children[1],{height:i,width:t}=c.current.getBoundingClientRect(),{height:n,width:o}=l.getBoundingClientRect(),r=0,a=Array.from(d.children).slice(0,6).map(e=>e.getBoundingClientRect()),s=a.map(e=>e.top);s.forEach(l=>{l===s[0]&&(r+=0===r&&e&&Math.abs(a[0].width-a[1].width)>10?3:1)}),v.current={scrollHeight:i,scrollWidth:t,columnCount:r,itemHeight:n,itemWidth:o},m.current=!1}),M=(0,L.Z)(()=>{k.current=!0}),B=(0,L.Z)(e=>{if(!y.current.length){M();return}let l=y.current[0],i=l.isTopCard,t=l.isBigCard;if(!E.current){t&&(l.isTopCard=!1,l.isBigCard=!1,M());return}if(!i&&k.current){let l=e?y.current.slice(e):y.current.slice(0,20),i=(0,ln.D)(l);if(-1===i)k.current=!1;else{lo(y.current,i+(e||0));let l=y.current[0];l.isTopCard=!0,l.isBigCard=!0}}}),O=(0,L.Z)(e=>{B(null==e?void 0:e.topCardStartIndex),T([...y.current]),u&&(u.current=y.current.map(e=>e.awemeId))}),U=(0,n.useMemo)(()=>{var e,l,t;let n=[...j],a=null===(e=n[0])||void 0===e?void 0:e.isTopCard,d=n.length,u=null==R?void 0:R.sort((e,l)=>e.order-l.order),h=a?1:0,w=0;null==u||u.forEach(e=>{let l=(0,f._)({itemType:eD.CardAd,inView:!0,displayId:e.id.toString()},e);if(!(e.order>d+1))n.splice(e.order+w-1+h,0,l),w++}),o&&n.length>0&&(null!==(t=null==b?void 0:null===(l=b.find(e=>e.id===Number(r)))||void 0===l?void 0:l.lives)&&void 0!==t?t:[]).forEach(e=>{let l=(0,f._)({itemType:eD.SubTabLive,inView:!0,displayId:e.live_title+e.live_idx},e);n.splice(e.live_idx-1+h,0,l)});let C=n.length>=100;return C!==_.current&&(_.current=C&&!(0,s.tq)()),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(!c.current||!_.current)return(null==i?void 0:i.discoverTaskOptimize)?e.map(e=>(e.inView=!0,e)):e.map(e=>Object.assign({},e,{inView:!0}));let l=e[0].isBigCard;m.current&&A(l);let{columnCount:t,itemHeight:o,scrollHeight:r}=v.current,a=o+24,d=c.current.scrollTop;g.current?p.current=d:d=p.current;let s=Math.ceil(r/a),u=Math.floor(d/a)*t,f=Math.min(u+(s+1)*t,n.length),h=Math.max(u-2*t,0),w=f+2*t,C=e=>e>=h&&e<w;return e.map((e,n)=>{let o=!0;return(o=l?n>=t+3?C(n+5):0===n?C(0)||C(t):C(n+3):C(n),null==i?void 0:i.discoverTaskOptimize)?(e.inView=o,e):Object.assign({},e,{inView:o})})}(n)},[b,R,j,24]);(0,D.C)(()=>{let e=innerWidth>=1536;E.current=e,N(e),!E.current&&O()},[1536]);let Z=(0,n.useRef)(!1),z=(0,L.Z)(e=>{Z.current=!0,e()}),J=(0,L.Z)(e=>{if(!!Z.current)Z.current=!1,k.current=e,!e&&(k.current=!1,y.current=y.current.slice(1),O())}),$=(0,L.Z)(()=>{let e=innerWidth>=1536;E.current=e,N(e),m.current=!0,O()});return(0,F.o)(()=>{if(!a||!d)return;let e=eF()(()=>O(),100),l=eF()(()=>{let e=W.Le.getConfig(W.gI.IsInModalVideo);(null==e?void 0:e.isInModal)&&(null==e?void 0:e.modalEnterFrom)!==H.a.WatchLaterPip?w.current=!0:null==$||$()},100);window.addEventListener("resize",l);let i=_.current,t=!1;return i&&(null==a||a.addEventListener("scroll",e),t=!0),()=>{window.removeEventListener("resize",l),t&&(null==a||a.removeEventListener("scroll",e))}},[a,d,null==U?void 0:U.length,$]),(0,F.o)(()=>Y.listen(Y.EVENT.exitModalVideo,()=>{w.current&&(w.current=!1,null==$||$())}),[$]),(0,F.o)(()=>{if(P.current){P.current=!1;return}null==$||$()},[$]),{showAwemeList:j,fetchDataListRef:y,showDataList:U,renderList:O,isTopBigCard:S&&!!(!(null==U?void 0:U.length)||U[0].isBigCard),resetTopAweme:M,needReplaceTopCardRef:Z,onReplaceBigCard:z,clearNeedReplaceTopCard:J}}({abTestData:h,selectedTab:N,isGaiaTab:E,tagId:S,scrollListenerEl:y,waterfallContainer:Q,awemeIdsRef:u});lc({renderList:eb,fetchDataListRef:ey,scrollParentEl:I,waterfallWrapperRef:ep});let ek=(0,V.d)(c),eE=0===Z&&!ey.current.length&&M===e0.LOADING,eS=(0,V.d)(eE);(0,r.C)(d.w3.components.discover_waterfall_comp),!function(e){let{firstLoadStatus:l,fetchStatus:i,statusCode:t,logId:o,onError:r}=e;(0,n.useEffect)(()=>{if((l===e0.FAILED||i===e1.FAILED)&&0!==t){let e={statusCode:t,firstLoadStatus:l,fetchStatus:i,logId:o};r(e),eO.oe.event.error({name:eO.Mo.WaterfallLoadError,report:(0,f._)({},e)})}},[l,i,r,t,o])}({statusCode:Z,firstLoadStatus:M,fetchStatus:O,logId:null==J?void 0:J.current,onError:x}),(0,n.useEffect)(()=>()=>{ev.current=!0},[]);let eN=(0,n.useRef)(0);(0,F.o)(()=>{if(!y)return;let e=eF()(()=>{var e;let l=y.scrollTop,i=l>eN.current,t=W.Le.getConfig(W.gI.JingXuanVisitId);e6.Z.sendLog("discoverSlide",{tab_name:"discover",sub_tab_name:null!==(e=eY.z0[Number(null!=S?S:0)])&&void 0!==e?e:S,direction:i?"down":"up",gid_list:"",visit_id:t||""}),eN.current=l},300,{leading:!1,trailing:!0});return null==y||y.addEventListener("scroll",e),()=>{null==y||y.removeEventListener("scroll",e)}},[y]),e8({scrollParentEl:I,waterfallWrapperRef:ep,abTestData:h});let eP=(0,n.useCallback)(()=>{ey.current.length||eo.current.length?B(e0.SUCCESS):B(e0.FAILED),U(e1.FAILED),ec.current=e1.FAILED,eu.current=!1},[]),{fetchWholeFirstFeedAndOverWrite:eR}=function(e){let{fetchDataListRef:l,renderList:i,abTestData:t,tagId:n}=e,o=e=>{null==e||e.forEach(e=>{let i=l.current.findIndex(l=>e.awemeId===l.awemeId);if(-1!==i){let t=l.current[i];l.current[i]=(0,f._)({},l.current[i],e),l.current[i].video.cover=t.video.cover,l.current[i].video.coverUrlList=t.video.coverUrlList,l.current[i].video.cover169UrlList=t.video.cover169UrlList,l.current[i].video.cover169BigUrlList=t.video.cover169BigUrlList,l.current[i].webRawData.cutTitle=t.webRawData.cutTitle,t.awemeType===eV.e.Note&&(l.current[i].video.width=t.width,l.current[i].video.height=t.height),lu(e)}}),i()},r=e=>{(0,la.q)({itemIds:e,from:"overWriteByIds",originType:ls.F.DiscoverPage}).then(e=>{if((null==e?void 0:e.status_code)===0){var l,i;let t=null===(i=e.aweme_details)||void 0===i?void 0:null===(l=i.map)||void 0===l?void 0:l.call(i,e=>(0,ld.s0)(e));(null==t?void 0:t.length)&&o(t)}})},a=async e=>{var l;let{ids:i=[],encodedIds:t=[],liveIds:a=[],liveEncodedIds:d=[],responseFrom:s,logId:u,timeout:c}=e||{},v=await (0,$.fetchHomeModuleFeed)({useV2:1,moduleId:3003101,referType:10,count:20,seoFlag:0,refreshIndex:1,liteType:2,logId:u,provider:s,preIds:i.toString(),encodedPreIds:t.toString(),preRoomIds:a.toString(),encodedPreRoomIds:d.toString(),tagId:n},void 0,{},c?{timeout:c}:void 0);if((null==v?void 0:v.statusCode)===0&&(null==v?void 0:null===(l=v.awemeList)||void 0===l?void 0:l.length)){o(v.awemeList);let e=i.filter(e=>{var l;return!(null==v?void 0:null===(l=v.awemeList)||void 0===l?void 0:l.find(l=>(null==l?void 0:l.awemeId)===e))});e.length&&r(e)}else r(i)};return{overWrite:o,overWriteByIds:r,fetchWholeFirstFeedAndOverWrite:a}}({fetchDataListRef:ey,renderList:eb,abTestData:h,tagId:S}),eA=(0,n.useCallback)(async function(){let{isReload:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{if(ev.current||eu.current)return;if(e)z(0);else if((!em.current||ec.current===e1.FAILED)&&eI.length){eL.current&&eT(!1);return}!ef.current&&(ef.current=setTimeout(()=>{if(ec.current===e1.LOADING){try{(0,w.unstable_batchedUpdates)(()=>{z(lv.ERROR_502),eP()})}catch(e){z(lv.ERROR_502),eP()}e_.current=!0}ef.current=null},2e4)),U(e1.LOADING),ec.current=e1.LOADING,eu.current=!0;let l=Date.now();(0,eH.B1)({tag:d.w3.fetchers.fetcher_waterfall_start,once:!0});let{data:i,hasMore:t,statusCode:n,logPb:o,maxCursor:r,responseFrom:a}=await ek.current(ed.current,e);if(ev.current)return;(0,eH.B1)({tag:d.w3.fetchers.fetcher_waterfall_end,once:!0}),Y.emit(Y.EVENT.discoverPageLcp),Y.emit(Y.EVENT.getHotList),(0,eW.C6)();let s=Date.now();0===n&&(ed.current=r);let u=function(e){try{if(!e)return"";let l={impr_id:""};return"string"==typeof e&&(l=JSON.parse(e)),(null==l?void 0:l.impr_id)||""}catch(e){return""}}(o);eO.oe.event.info({name:eO.Mo.WaterfallFetchTime,metrics:{duration:s-l},report:{logId:u,firstLoadStatus:M}}),ef.current&&(clearTimeout(ef.current),ef.current=null),J.current=u;let c=le(i,ey.current,!!a);c.forEach(e=>{var l,i,t,n,o,r,a,d,s,u,c,v,m,f,_,h,g,p,w,C,x,b,I;if(e.awemeType===eV.e.LiveCard){if(null===(r=e.cellRoom)||void 0===r?void 0:null===(o=r.rawdata)||void 0===o?void 0:null===(n=o.cover)||void 0===n?void 0:null===(t=n.url_list)||void 0===t?void 0:null===(i=t[0])||void 0===i?void 0:null===(l=i.includes)||void 0===l?void 0:l.call(i,".heif?")){let l=null===(a=e.cellRoom)||void 0===a?void 0:a.rawdata.cover.url_list[0].replace(".heif?",".jpeg?");e.cellRoom.rawdata.cover.url_list[0]=l}}else{if(null==e?void 0:null===(c=e.video)||void 0===c?void 0:null===(u=c.coverUrlList)||void 0===u?void 0:null===(s=u[0])||void 0===s?void 0:null===(d=s.includes)||void 0===d?void 0:d.call(s,".heif?")){let l=e.video.coverUrlList[e.video.coverUrlList.length-1];e.video.cover=l}if((null==e?void 0:null===(m=e.video)||void 0===m?void 0:null===(v=m.cover169UrlList)||void 0===v?void 0:v[0])&&(null==e?void 0:null===(g=e.video)||void 0===g?void 0:null===(h=g.cover169UrlList)||void 0===h?void 0:null===(_=h[0])||void 0===_?void 0:null===(f=_.includes)||void 0===f?void 0:f.call(_,".heif?"))){let l=e.video.cover169UrlList[e.video.cover169UrlList.length-1];e.video.cover169UrlList[0]=l}if((null==e?void 0:null===(w=e.video)||void 0===w?void 0:null===(p=w.cover169BigUrlList)||void 0===p?void 0:p[0])&&(null==e?void 0:null===(I=e.video)||void 0===I?void 0:null===(b=I.cover169BigUrlList)||void 0===b?void 0:null===(x=b[0])||void 0===x?void 0:null===(C=x.includes)||void 0===C?void 0:C.call(x,".heif?"))){let l=e.video.cover169BigUrlList[e.video.cover169BigUrlList.length-1];e.video.cover169BigUrlList[0]=l}}lu(e)});if((()=>{if(e_.current){e_.current=!1;return}if(0!==n){z(n),eP();return}if((null==I?void 0:I.clientHeight)===0){ec.current=e1.SUCCESS,U(e1.SUCCESS),eu.current=!1;return}if(t&&!c.length){z(lv.ERROR_404),eP();return}if(!t&&(em.current=!1),M===e0.LOADING&&B(e0.SUCCESS),a&&c.length){var e;!(null==h?void 0:h.discoverEnableWebp)&&c.forEach(e=>{var l;if(null==e?void 0:null===(l=e.video)||void 0===l?void 0:l.coverUrlList){let l=e.video.coverUrlList.find(e=>e.includes(".jpeg?"));l&&(e.video.cover=l)}});let{ids:l,encodedIds:i,liveIds:t,liveEncodedIds:n}=ll(c),o=null==h?void 0:null===(e=h.moduleFeedTimeout)||void 0===e?void 0:e.csr;eR({ids:l,encodedIds:i,liveIds:t,liveEncodedIds:n,responseFrom:a,logId:u,timeout:o||void 0})}return ec.current=e1.SUCCESS,0===ey.current.length&&c.length>0&&(0,v.Fp)(),U(e1.SUCCESS),!0})()){let e=-1;eL.current?(ey.current=ey.current.slice(1),e=ey.current.length,ey.current=[...ey.current,...c],eL.current=!1,eb({topCardStartIndex:e})):(ey.current=[...ey.current,...c],eb())}else eL.current&&eT(!1)}catch(e){eP(),eL.current&&eT(!1)}},[M,eP,eb,I]);(0,n.useEffect)(()=>Y.listen(Y.EVENT.JingxuanTopCard,e=>{var l;let{action:i,awemeId:t,cancelReplace:n}=e;"topCardReplace"===i&&t===(null==ew?void 0:null===(l=ew[0])||void 0===l?void 0:l.awemeId)&&(n?eL.current&&eT(!0):ej(eA))}),[ej,eA,null==ew?void 0:null===(l=ew[0])||void 0===l?void 0:l.awemeId]);let eM=(0,n.useCallback)(async()=>{let e=I||ep.current;if(!(0,eU.r)()&&ec.current!==e1.FAILED){if(e){var l,i,t,n,o;let r=0;if(null===(i=G.current)||void 0===i?void 0:null===(l=i.homeFastSlowSlide)||void 0===l?void 0:l.isOpen){let e=W.Le.getConfig(W.gI.HomeFastSlowSlideFeature);r=(null===(o=G.current)||void 0===o?void 0:null===(n=o.homeFastSlowSlide)||void 0===n?void 0:null===(t=n.distanceMap)||void 0===t?void 0:t[e])||0}e7(e,m+r)&&!eu.current&&(Y.emit(Y.EVENT.homeLoadMoreReach),await eA())}}},[eA,m,I]),eB=(0,n.useCallback)(()=>{let e=ep.current,l=I||e;if(!eE)eh.current=!0,l&&e7(l,m)&&eM(),eb(),eh.current=!1},[eE,eb,m,eM,I]),eJ=(0,n.useRef)(!1),eq=(0,V.d)(()=>{if(!eJ.current)return;let e=ep.current,l=I||e;l&&e7(l,m)&&eM()});(0,F.o)(()=>((null==eS?void 0:eS.current)?eA():eq.current(),()=>{eJ.current=!0}),[]),!function(e){let{waterfallWrapperRef:l,needSkeleton:i,onResizeEvent:t,onScrollEvent:n,scrollListenerEl:o}=e;(0,F.o)(()=>{let e=()=>{if(!t)return;let e=eF()(()=>{if(!!(null==l?void 0:l.current)&&0!==l.current.clientHeight)null==t||t()},300);return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}};if(i){let l=e();return()=>{null==l||l()}}let r=e(),a=(()=>{if(!n||!(null==l?void 0:l.current))return;let e=o||l.current;if(!e)return()=>void 0;let i=lt()(()=>{null==n||n()},50);return null==e||e.addEventListener("scroll",i),null==e||e.addEventListener("wheel",i),()=>{null==e||e.removeEventListener("scroll",i),null==e||e.removeEventListener("wheel",i)}})();return()=>{null==r||r(),null==a||a()}},[i,t,n,l,o])}({waterfallWrapperRef:ep,scrollListenerEl:y,scrollParentEl:I,needSkeleton:eE,onResizeEvent:eB,onScrollEvent:eM}),(0,n.useEffect)(()=>{if(eE){var e;null==T||null===(e=T.onSkeletonShow)||void 0===e||e.call(T),ea.current=[]}},[eE]),(0,n.useEffect)(()=>{var e;null==T||null===(e=T.onLoadMoreShow)||void 0===e||e.call(T,O)},[O]),(0,n.useEffect)(()=>{(async()=>{var e,l,i,t,n,o,r;if(ee&&(null==ee?void 0:null===(e=ee.awemeList)||void 0===e?void 0:e.length)&&!ee.isCourse){let e=!!X.current;if(!e&&(["sort","new_hottest_id","old_hottest_id"].includes(null!==(t=null==ee?void 0:ee.responseFrom)&&void 0!==t?t:"")||(null==ee?void 0:null===(i=ee.awemeList)||void 0===i?void 0:null===(l=i.some)||void 0===l?void 0:l.call(i,e=>{var l,i;return(null==e?void 0:e.awemeType)!==eV.e.LiveCard&&(null==e?void 0:null===(i=e.video)||void 0===i?void 0:null===(l=i.playAddr)||void 0===l?void 0:l.length)===0})))&&(e=!0),(null==ee?void 0:ee.responseFrom)&&e){let{ids:e,encodedIds:l,liveIds:i,liveEncodedIds:t}=ll(null==ee?void 0:ee.awemeList),a=null==h?void 0:null===(n=h.moduleFeedTimeout)||void 0===n?void 0:n.csr;await eR({ids:e,encodedIds:l,liveIds:i,liveEncodedIds:t,responseFrom:null==ee?void 0:ee.responseFrom,logId:J.current||(null===(r=window.SSR_RENDER_DATA)||void 0===r?void 0:null===(o=r.app)||void 0===o?void 0:o.logId)||"",timeout:a||void 0})}await eM()}})()},[ee]),(0,F.o)(()=>(0,eW.oX)(async()=>{var e,l,i,t;if(N===eY._D[eY.JY.Course]||E){Y.emit(Y.EVENT.refreshPage);return}if(!eg.current)ex(),eg.current=!0,ey.current=(null===(l=ey.current)||void 0===l?void 0:null===(e=l.slice)||void 0===e?void 0:e.call(l,es.current+1))||[],er.current=null===(t=er.current)||void 0===t?void 0:null===(i=t.filter)||void 0===i?void 0:i.call(t,e=>ey.current.some(l=>l.id===e.id)),es.current=0,ed.current=0,eb(),eM(),await Promise.allSettled([eA(),null==ei?void 0:ei(N),null==el?void 0:el()]),eg.current=!1}),[N]);let eK=(0,n.useCallback)((e,l)=>{!(null==e?void 0:e.insertId)&&(es.current=Math.max(es.current,l))},[]),eG=(0,n.useCallback)((e,l,i,t,n,o)=>_(e,l,(null==h?void 0:h.discoverTaskOptimize)?eK:()=>{!(null==e?void 0:e.insertId)&&(es.current=Math.max(es.current,t))},t,n,o),[_]),e3=(0,n.useCallback)((e,l,i)=>{var t;null==T||null===(t=T.onCoverLoad)||void 0===t||t.call(T,e,l,i)},[null==T?void 0:T.onCoverLoad]),e5=M===e0.FAILED,e4=O===e1.SUCCESS,e9=(0,n.useCallback)(e=>{ey.current=e,eb()},[]);return(0,t.jsxs)("div",{className:p()(j,e$.waterfallWrapper,{[e$.noScrollParent]:!I},"jingxuan-scroll-element"),ref:ep,children:[b,e5&&!e4&&(0,t.jsx)(eQ,{isGaiaTab:E,statusCode:Z}),eE?(0,t.jsx)(eX,{containerClassName:p()({bigCardWaterfallContainer:!0},g)}):(0,t.jsx)(t.Fragment,{children:ew.length?(0,t.jsx)(e2,{ref:q,setWaterfallContainer:K,renderItem:eG,hideSecond:k&&(null==ew?void 0:ew[0])&&ew[0].awemeType!==eV.e.LiveCard&&(null!==(o=ew[0].width)&&void 0!==o?o:0)>(null!==(a=ew[0].height)&&void 0!==a?a:0),fetchStatus:O,showDataList:ew,containerClassName:p()({bigCardWaterfallContainer:eC},g),statusCode:Z,onload:C,reload:()=>{eA({isReload:!0})},update:()=>{eu.current=!1,eM()},onCoverShow:e3,abTestData:h,setLoadingElement:P,showReplaceLoading:A}):!e5&&!e4&&(0,t.jsx)(eQ,{statusCode:Z})}),(0,t.jsx)(eZ.IsLivingPlugin,{activeIndex:-1,dataList:eI,setDataList:e9,scene:"jingxuan_card"})]})}var lf=(0,n.forwardRef)((e,l)=>{let[i,o]=(0,n.useState)(!0),r=(0,n.useRef)(!1),{onError:a,onListLoad:d,perfLogFunctions:s}=e||{},{onSkeletonShow:u,onCoverLoad:c,onReload:v,onLoadMoreShow:m,isActiveTab:h}=s||{},g=()=>{if(!!r.current)null==v||v(),o(!1),setTimeout(()=>{o(!0),r.current=!1},0)};(0,n.useImperativeHandle)(l,()=>({reloadList:g,isListLoadEndRef:r}));let p=(0,n.useCallback)(function(){for(var l=arguments.length,i=Array(l),t=0;t<l;t++)i[t]=arguments[t];(null==h?void 0:h(e.selectedTab))&&(null==c||c(...i))},[c]),w=(0,n.useMemo)(()=>({onSkeletonShow:u,onCoverLoad:p,onLoadMoreShow:m}),[]);return i&&(0,t.jsx)(lm,(0,_._)((0,f._)({onError:e=>{r.current=!0,null==a||a(e)},onListLoad:()=>{r.current=!0,null==d||d()}},e),{perfProps:w}))});let l_=(e,l)=>{let i=[];return e.forEach((e,l)=>{var t,n;i[l]=e,i[l].height=null==e?void 0:null===(t=e.video)||void 0===t?void 0:t.height,i[l].width=null==e?void 0:null===(n=e.video)||void 0===n?void 0:n.width,i[l].id=null==e?void 0:e.awemeId}),i};var lh=i("431356"),lg=i.n(lh),lp=i("310274"),lw=i.n(lp),lC=i("460926"),lx=i.n(lC),lb=i("426038"),lI=i("709705"),ly=i("810069"),lL=i("752285");let lj=(e,l)=>{if(lg()(e))return lx()(e,l)},lT=e=>{let{selectedTab:l}=e,{setClosedCardAdIdListMap:i}=(0,ez.useDiscoverCommonContext)(e=>{let{setClosedCardAdIdListMap:l}=e;return{setClosedCardAdIdListMap:l}}),{userInfo:t}=(0,ep.useUserInfoContext)(),o=e=>{var i,n,o;if(!l)return;let r=null!==(o=(0,lI.$o)(lb.LocalStorageKeys.DiscoverFeedCardAdUnique))&&void 0!==o?o:{},a=(null==t?void 0:t.isLogin)?null==t?void 0:null===(i=t.info)||void 0===i?void 0:i.uid:(null===(n=(0,ly.Es)())||void 0===n?void 0:n.user_unique_id)||"",d=lw()({},r,{[a]:{[l]:[e]}},lj);(0,lI.qQ)(lb.LocalStorageKeys.DiscoverFeedCardAdUnique,d),(0,lL.EN)({uidKey:a})},r=(0,n.useCallback)(e=>{null==i||i(i=>{if(void 0===l)return i;let t=(0,f._)({},i),n=(null==t?void 0:t[l])||[];return n.push(e),t[l]=n,t})},[i]);return{onShow:e=>{!e.permanent&&o(e.id)},onClose:e=>{if(!!e.id)o(e.id),null==r||r(e.id)}}},lk=e=>(0,V.d)(!1);var lE=i("811603");i("313036"),i("362051");var lS=i("31024"),lN=i("602052"),lP=i("667897"),lR="pi1IW_DT",lA="dIwOiSyM",lM=e=>{let{title:l,children:i}=e;return(0,t.jsxs)("div",{className:lR,children:[(0,t.jsx)("h1",{className:lA,"data-e2e":"live-room-name",children:l}),i]})},lD=i("935095"),lB=i("397176"),lF=i("394408"),lV=i("889429"),lH=i("142763"),lO={liveCard:"se6qccKY",borderRadius:"_HYNt8UU",liveCover:"_4pAq8I0",coverMask:"jmrvtYl_",cardInfo:"sGT0bFU7"},lU=i("536793"),lZ={liveTag:"geJmrS4y",hasRedPack:"wenoX1qE",isFirstLive:"i3YlaXRT",liveTagText:"qzIvakEj",redPack:"ftk8j5Pb",realText:"IjhDtphn"},lW=i("638183"),lY=e=>{var l,i;let{roomData:o}=e,r=(0,lU.T)(),a=n.useMemo(()=>{var e;return(null==o?void 0:null===(e=o.others)||void 0===e?void 0:e.web_enter_benefit_point_data)||{has_ongoing_lottery:!1,has_ongoing_lucky_money:!1}},[o]),d=(0,lW.gE)(r,a.has_ongoing_lottery,a.has_ongoing_lucky_money,!0),s=null==o?void 0:null===(i=o.episode_extra)||void 0===i?void 0:null===(l=i.mod)||void 0===l?void 0:l.episode_stage;return(0,t.jsx)("div",{className:p()(lZ.liveTag,{[lZ.hasRedPack]:!0,[lZ.isFirstLive]:s}),children:(0,t.jsxs)("span",{className:p()(lZ.liveTagText),"data-e2e":"user-info-living",children:[d.icon&&(0,t.jsx)("img",{src:d.icon,className:lZ.redPack}),(0,t.jsx)("span",{className:lZ.realText,children:s?"首播中":"直播中"})]})})};i("76375");let lz=()=>{let e=n.useContext(E);if(!e)throw Error("useLiveCard must be used within LiveCardProvider");let{play:l,pause:i,clearAllPlayers:t,getInstance:o}=e;return{play:l,pause:i,getInstance:o,clearAllPlayers:t}};var lJ=i("181208"),l$=i("198412"),lq=i.n(l$),lQ=i("815848"),lK={cardInfo:"g66yb18R",cardInfoContainer:"IM5nVz8q",decs:"adgWzWpW",userText:"ZE4HL5VM",text:"Zeg_124V",marginRight:"j3BA0uuo",at:"Iq3lDaXY",userName:"EsH9tSJD"},lG=i("386206"),lX=i("633570"),l0=i("991798"),l1=i("65480"),l3=i("408674"),l2={tagContainer:"gNFlnxt1",tagText:"EIYc93Ty",yellow:"E7HgbCKM",green:"DGT4bCA7",recommended:"qfNyRN7B"};lX.Z,l0.Z,l1.Z,l3.Z;let l5=new Map([["follow",{text:"你的关注"}],["recommended",{text:"为你推荐"}],["collect",{text:"收藏"}],["digg",{text:"点赞"}],["comment",{text:"评论"}]]),l6=e=>{let{count:l,type:i,className:n}=e,o=l5.get("recommended"===i?"recommended":"follow");return(0,t.jsx)(t.Fragment,{children:o&&(0,t.jsx)("span",{className:p()(l2.tagContainer,n,{[l2.yellow]:"collect"===i,[l2.green]:"comment"===i,[l2.green]:"follow"===i,[l2.recommended]:"recommended"===i}),children:(0,t.jsx)("span",{className:p()(l2.tagText),children:`${["follow","recommended"].includes(i)?"":(0,lG.qe)(l||0)}${o.text}`})})})};var l4=e=>{let{text:l,userName:i,className:n,roomhref:o,onEnterLive:r,isShowFollowHighlightTag:a}=e;return(0,t.jsx)("div",{className:p()(lK.cardInfo,n),children:(0,t.jsx)("div",{target:"_blank",rel:"noopener noreferrer",onClick:r,children:(0,t.jsxs)("div",{className:p()(lK.cardInfoContainer),children:[(0,t.jsx)("div",{className:p()(lK.decs),children:l}),(0,t.jsx)("div",{className:p()(lK.userText),children:(0,t.jsxs)("div",{className:p()(lK.text),children:["@",(0,t.jsx)("span",{className:p()(lK.userName),children:i}),a&&(0,t.jsx)(l6,{className:lK.highlightTag,type:"follow"})]})})]})})})},l9=i("666552"),l8=i("589864"),l7=i("706869"),ie=i("806217"),il=i("622063"),ii=i("591987"),it=i("680065"),io=i("690193");let ir=e=>{var l,i,o,r,a,d;let{isFirstPageItem:s,anchorId:u,webRid:c,roomId:v,onMouseEnter:m,onMouseLeave:g,onHoverChange:w,userCount:C,cover:x,source:b,title:I,scale:y,onVideoClick:j,onLog:T,coverClassName:k,className:E,playerConfig:S,playerStyle:N,isActive:P,lazyLoad:R=!1,fit:A="cover",isLogReady:M,instanceId:D="default",rawData:B,isEnd:V,linkerMap:H,sceneId:O=253,teaLogParams:U,search_params:Z="",detail:Y,description:J,onEnterLive:$}=e,[q,Q]=n.useState(!1),K=n.useRef(null),G=n.useRef(null),[X,ee]=n.useState(!1),el=n.useRef(null),ei=(0,lU.T)(),[et,en]=n.useState(V),{play:eo,pause:er,getInstance:ea}=lz(),[ed,es]=n.useState(!1),eu=n.useRef(!1),ec=n.useRef(null),ev=n.useMemo(()=>{var e,l,i,t,n,o;let r=null!==(o=null===(i=W.Le.getConfig(W.gI.FollowStatusCache))||void 0===i?void 0:null===(e=i[null==B?void 0:null===(l=B.owner)||void 0===l?void 0:l.id])||void 0===e?void 0:e.followStatus)&&void 0!==o?o:null==B?void 0:null===(n=B.owner)||void 0===n?void 0:null===(t=n.follow_info)||void 0===t?void 0:t.follow_status;return(0,lF.F)(r)},[B]),[em,ef]=n.useState(!1),e_=(null==B?void 0:null===(o=B.paid_live_data)||void 0===o?void 0:null===(i=o.privilege_info_map)||void 0===i?void 0:null===(l=i[101])||void 0===l?void 0:l.paid_live_type)===101,eh=n.useMemo(()=>!!((null==H?void 0:H[5])||(null==H?void 0:H[8])||(null==H?void 0:H[12])),[H]),eg=lq()(B,"AnchorABMap",{}),ep=lq()(eg,"linkmic_video_equal_layout_frame_opt","0"),ew=n.useMemo(()=>!et&&!em&&!eh&&!e_&&!!B&&P,[P,eh,em,et,e_,B]),eC=(null==B?void 0:null===(r=B.paid_live_data)||void 0===r?void 0:r.paid_type)===1,ex=n.useMemo(()=>ew||q||ed?(ee(!0),1):(ee(!1),0),[q,ew,ed]),eb=()=>{!ed&&Q(!1),(0,l8.bi)(U),j&&j()},eI=n.useCallback(()=>{(0,l8.JW)(U),T&&T()},[U]);n.useEffect(()=>{V&&en(!0)},[V]);let ey=n.useCallback(()=>{en(!0)},[]),eL=n.useCallback(()=>(0,lQ.Y)(u,O).then(e=>{let{status_code:l,data:i=[]}=e.data;0===l&&en(!i.some(e=>{let l=lq()(e,"user_live",[])[0];return 1===lq()(l,"live_status")}))}),[u,O]);n.useEffect(()=>{if(G.current){var e,l;el.current=(0,_._)((0,f._)({},el.current),{width:(null===(e=G.current)||void 0===e?void 0:e.offsetWidth)||"100%",height:(null===(l=G.current)||void 0===l?void 0:l.offsetHeight)||"100%"})}},[G.current]);let ej=n.useMemo(()=>et?(0,t.jsx)(lJ.PlayerEndCover,{cover:x,children:"直播已结束"}):em||e_?(0,t.jsx)(lJ.PlayerEndCover,{cover:x,children:"会员直播中"}):(q||ew)&&eh?(0,t.jsx)(lJ.PlayerEndCover,{cover:x,children:"直播连麦中"}):(q||ew)&&eC?(0,t.jsx)(lJ.PlayerEndCover,{cover:x,children:"付费直播中"}):null,[et,ew,x,q,eh,eC,e_]),eT=n.useCallback(()=>{let e=!1;if(!lB.s){var l;e=(null===(l=navigator.userAgent)||void 0===l?void 0:l.indexOf("Firefox"))!==-1}if(e)return;if(m){m();return}if(!ew&&!!B)Q(!0)},[m,ew,Q,B]),ek=n.useCallback(e=>{var l;if(!(null===(l=K.current)||void 0===l?void 0:l.contains(e.relatedTarget))){if(g){g();return}if(ew)return;Q(!1)}},[g,ew]),eE=(0,L.Z)(()=>{var e,l,i,n;let o={playerConfig:(0,f._)({onEnd:ey,updatePlayer:{autoPlay:!0},baseConfig:(0,f._)({autoplay:!0,muted:!0,volume:0,decryption:null,mediaAttributes:{muted:!0}},null==S?void 0:S.baseConfig),logOptions:{ext:{is_all_265:!((0,ii.ld)(null==B?void 0:B.stream_url)||(0,ii.ld)(null==B?void 0:B.additional_stream_url)),anchor_id:u,room_id:v}}},S),style:N||el.current||{},container:G.current,pluginSchema:{VipLiveBoundaryPlugin:{props:{customContent:(0,t.jsx)(lJ.PlayerEndCover,{cover:x,children:"会员直播中"}),roomId:v,paidLiveData:null==B?void 0:B.paid_live_data,onShowVipLiveBoundary:e=>{ef(e)},abTestData:ei}},AdaptedBySEIPlugin:{linkmicVideoEqualLayoutFrameOpt:ep}}};(0,io.WH)("livecard_stream_plugin_decision",{disableSceneKey:"LiveCardPlayer",disableScenes:"",disabledByScene:0,willUseStreamPlugin:1,roomId:v,anchorId:u,rawData:B});let r={enable:!0,streamData:{h264PullData:null==B?void 0:null===(l=B.stream_url)||void 0===l?void 0:null===(e=l.live_core_sdk_data)||void 0===e?void 0:e.pull_data,h265PullData:null==B?void 0:null===(n=B.additional_stream_url)||void 0===n?void 0:null===(i=n.live_core_sdk_data)||void 0===i?void 0:i.pull_data},checkShouldIgnoreError:()=>!!et};return o.playerConfig.pluginsConfig={[it.Y]:r},o});(0,F.o)(()=>{eu.current&&il.Z&&!(0,z.Nr)(location.pathname)&&(G.current.style.display="block",il.Z.destroy(),eu.current=!1,es(!1),Q(!1))},[il.Z,G.current]);let eS=(0,L.Z)(e=>{(0,l8.wp)((0,f._)({play_type:e},U))}),eN=(0,L.Z)(()=>{if(!et&&!em&&!eh&&!e_)ec.current&&clearTimeout(ec.current),ec.current=setTimeout(()=>{let e=eE(),{container:l}=e;eo(l,(0,lE._)(e,["container"])),eS(q?l8.F7.HOVER:l8.F7.AUTO)},200)}),eP=(0,L.Z)(()=>{ec.current&&(clearTimeout(ec.current),ec.current=null)},[]);n.useEffect(()=>{ew&&(Q(!1),eL(),eN())},[ew]),n.useEffect(()=>{q&&(eL(),eN())},[q]);let eR=n.useRef(!0);n.useEffect(()=>{if(eR.current){eR.current=!1;return}!q&&!ew&&G.current&&!ed&&(er(G.current),eP())},[q,ew,G.current,ed]),n.useEffect(()=>()=>{eP()},[]),n.useMemo(()=>{let{room_id:e,anchor_id:l,enter_method:i,enter_from_merge:t,live_position:n,request_id:o}=U;return(0,l9.h)(c,{from_search:"true",search_params:JSON.stringify(Z),enter_from_merge:t,enter_method:i,live_position:n,request_id:o,room_id:e,anchor_id:l})},[Z,U,c]);let eA=(0,ie.Z)(()=>`/root/live/${c}`),eM=n.useMemo(()=>{var e;return Object.values((null==B?void 0:null===(e=B.stream_url)||void 0===e?void 0:e.pull_datas)||{}).length>0&&!(0,lV.G6)()},[B]),eD=n.useCallback(()=>{var e,l,i,t,n,o;null==$||$();let r=eA(),a=ea(G.current),d=null==a?void 0:null===(i=a.ref)||void 0===i?void 0:null===(l=i.current)||void 0===l?void 0:null===(e=l.getPlayer)||void 0===e?void 0:e.call(l),s=null==a?void 0:null===(o=a.ref)||void 0===o?void 0:null===(n=o.current)||void 0===n?void 0:null===(t=n.getPlayerLogger)||void 0===t?void 0:t.call(n),u=!eM&&d;if(r){let e=`${r}?${h.stringify((0,_._)((0,f._)({},U),{use_new_preview:!!u}))}`;(0,l7.X)({href:e,reusePlayer:u?1:0,_reusePlayer:u?1:0,webRid:c,reuseId:u?`f_${c}`:void 0,abtestData:ei,roomId:v,usePreCreate:!u}),u&&(eu.current=!0,es(!0),G.current.style.display="none",il.Z.save(d,s))}},[$,U,c,ea,il.Z,G.current]);return(0,t.jsx)("div",{ref:K,style:{height:"100%"},onMouseEnter:e=>{eT(),null==w||w(!0)},onMouseOut:e=>{!e.currentTarget.contains(e.relatedTarget)&&(ek(e),null==w||w(!1))},onClick:e=>{eb(),e.stopPropagation()},children:(0,t.jsx)(lN.Z,{className:p()(lO.liveCard,E),cover:(0,t.jsx)(lP.G,{target:"_blank",rel:"noopener noreferrer",onClick:eD,children:(0,t.jsx)(lS.Z,{className:p()(lO.liveCover,k,lO.borderRadius),isFirstPageItem:s,fit:A,scale:y,lazyLoad:R,isLogReady:M,onLog:eI,mask:(0,t.jsx)("div",{id:D,ref:G,className:lO.coverMask,children:ej&&ej}),onEnterLive:eD,maskZIndex:ex,imageSrc:x,assist_label:null!==(d=null==B?void 0:B.assist_label)&&void 0!==d?d:null==B?void 0:null===(a=B.room)||void 0===a?void 0:a.assist_label,rightTag:(0,t.jsx)(lY,{roomData:B}),hoverImg:X,leftMarker:C&&(0,t.jsx)(lH.A,{count:C})})}),title:I&&(0,t.jsx)(lM,{title:I}),meta:b&&(0,t.jsx)(lD.Hw,(0,f._)({},b)),detail:Y||(0,t.jsx)("div",{className:lO.cardInfo,children:(0,t.jsx)(l4,{onEnterLive:eD,text:J,userName:null==b?void 0:b.userName,isShowFollowHighlightTag:ev})})})})};var ia=i("638052"),id=i("773300"),is=i("46892"),iu=i("601034"),ic=i("759894"),iv=i("870327"),im=i("434441"),i_=i("688736"),ih=i("600767"),ig=i("16993"),ip="E9YjJ4ry",iw="T4rl9zNi",iC="fmgIPVvz",ix="THR_9AUt";let ib=e=>{var l,i,t;let{rawdata:n}=e.cellRoom||{},o=(null==n?void 0:null===(l=n.room_view_stats)||void 0===l?void 0:l.is_hidden)?"":null==n?void 0:null===(i=n.room_view_stats)||void 0===i?void 0:i.display_short;return{cellRoomRowData:n,userCount:o,requestId:null!==(t=null==e?void 0:e.logPb)&&void 0!==t?t:""}};var iI=i("666266");let iy=e=>{let{itemInfo:l,itemRef:i,index:t,topAwemeId:o,isTabActive:r}=e,{visibleLiveCards:a,setVisibleLiveCards:d}=(0,ez.useDiscoverCommonContext)((0,en.P1)(["visibleLiveCards","setVisibleLiveCards"])),s=(0,iI.c)(e=>{var l;return!!o&&!!(null===(l=e.cards[o])||void 0===l?void 0:l.preventLiveAutoPlay)}),u=(0,L.Z)(e=>{if(!!s)Y.emit(Y.EVENT.JingxuanTopCard,{action:e?"pause":"play",awemeId:o,from:e?"hover_other_cover":"cancel_hover_other_cover"})});(0,n.useEffect)(()=>{if(l.awemeType!==eV.e.LiveCard||!i.current||!d||void 0===t)return;let e=new IntersectionObserver(e=>{let[i]=e;i.isIntersecting?d(e=>[...e,{id:l.awemeId,index:t}]):d(e=>e.filter(e=>e.id!==l.awemeId))},{threshold:.5}),n=i.current;return e.observe(n),()=>{e.unobserve(n),d(e=>e.filter(e=>e.id!==l.awemeId))}},[l.awemeType,l.awemeId,t,d]);let c=(0,n.useMemo)(()=>!!a&&0!==a.length&&!s&&a.reduce((e,l)=>e.index<l.index?e:l).id===l.awemeId,[a,l.awemeId,o,s]);return{isActiveLiveCard:c,canLivePlay:c&&r,onHoverChange:u}},iL=e=>{let{itemInfo:l,tabName:i,isActiveTabConfig:t,abTestData:o,componentPathname:r}=e,{register:a,unregister:d,handlePlayPause:s,setReported:u,checkActiveOnModalExit:c}=iI.c.getState();return(0,n.useEffect)(()=>(null==l?void 0:l.awemeId)&&r?(a(l.awemeId,r,location.pathname),()=>{d(l.awemeId)}):()=>{},[null==l?void 0:l.awemeId,r]),(0,n.useEffect)(()=>{let e=Y.listen(Y.EVENT.exitModalVideo,()=>{u(l.awemeId,!1),c(l.awemeId),s(l.awemeId,"play","exitModalVideo")}),i=Y.listen(Y.EVENT.videoPause,()=>{s(l.awemeId,"pause","videoPause")});return()=>{null==e||e(),null==i||i()}},[null==l?void 0:l.awemeId,null==o?void 0:o.jxTopCardCache]),null};var ij=new eI.h({waterfallProcessStat:{eventName:"waterfall_process_stat",params:{enter_from:"",from:"",skeleton_show_time:0,waterfall_fetch_end:0,first_img_load_time:0,init_duration:0,data_duration:0,cover_duration:0}},waterfallLoadmoreStat:{eventName:"waterfall_loadmore_stat",params:{enter_from:"",duration:0}},videoCoverShow:{eventName:"video_cover_show",params:{enter_from:"discover",tab_name:"",author_id:"",group_id:"",cover_url:"",rank:0,trending_topic:"",logPb:"",module_id:-1,channel:"",aweme_type:"",is_compilation_anchor:0,badge:"",sub_tab_name:"",is_co_publish:0,co_publish_author_list:void 0,video_scale:0,from_click_group_id:"",if_first_big_card:0,visit_id:"",gid_rank:0,is_first_screen:0,page_rank:0,loading_duration:0,filter_name:"",boost_task_id:"",page_mode:"",is_first_large_card_outflow:"0",is_theme_progress_bar:""}},videoCoverLoad:{eventName:"video_cover_load",params:{enter_from:"discover",tab_name:"",author_id:"",group_id:"",cover_url:"",rank:0,trending_topic:"",logPb:"",module_id:-1,channel:"",aweme_type:"",is_compilation_anchor:0,badge:"",sub_tab_name:"",is_co_publish:0,co_publish_author_list:void 0,video_scale:0,from_click_group_id:"",if_first_big_card:0,first_page_item:0,cover_show_time:0,page_mode:""}},videoCoverClick:{eventName:"video_cover_click",params:{aweme_info:{},enter_from:"discover",tab_name:"",author_id:"",group_id:"",cover_url:"",rank:0,trending_topic:"",logPb:"",module_id:-1,channel:"",aweme_type:"",is_compilation_anchor:0,badge:"",sub_tab_name:"",is_co_publish:0,co_publish_author_list:void 0,from_click_group_id:"",if_first_big_card:0,visit_id:"",gid_rank:0,is_first_screen:0,page_rank:0,loading_duration:0,filter_name:"",boost_task_id:"",page_mode:"",is_first_large_card_outflow:"0",is_theme_progress_bar:""}},clickRefresh:{eventName:"click_refresh",params:{enter_from:"discover",tab_name:"",module_id:-1,channel:""}},loadingMore:{eventName:"loading_more",params:{enter_from:"discover",tab_name:"",url_path:"",module_id:-1}},clickDiscoverTab:{eventName:"click_discover_tab",params:{tab_name:"",module_id:-1}},clickLoadMore:{eventName:"click_load_more",params:{tab_name:"",click_position:"",enter_from:"discover"}},hoverPlayTime:{eventName:"hover_play_time",params:{group_id:"",author_id:"",enter_from:"",tab_name:"",duration:0,is_full_screen:"0",video_scale:0,if_first_big_card:0,visit_id:"",gid_rank:0,is_first_screen:0}},hoverPlay:{eventName:"hover_play",params:{group_id:"",author_id:"",enter_from:"",tab_name:"",is_full_screen:"0",video_scale:0,if_first_big_card:0,aweme_info:{},visit_id:"",gid_rank:0,is_first_screen:0}},autoVideoPlay:{eventName:"auto_video_play",params:{group_id:"",author_id:"",enter_from:"",tab_name:"",is_full_screen:"0"}},autoPlayTime:{eventName:"auto_play_time",params:{group_id:"",author_id:"",enter_from:"",tab_name:"",duration:0,is_full_screen:"0"}},noMoreContentShow:{eventName:"no_more_content_show",params:{enter_from:"discover"}},noMoreContentClick:{eventName:"no_more_content_click",params:{enter_from:"discover"}},pageView:{eventName:"page_view",params:{url:"",url_path:"",enter_from:"",link_from:"",tab_name:"",enter_method:"",aweme_type:0,theme:"light",is_topknot:0,abtest:"",ischange:"",old_ttwid:"",enter_by_tab:0,browser_height:0,browser_width:0,browser_ratio:0,redirect_from:"",from_push:0,seo_vids:"",url_source:"",url_source_method:"",word_strategy:"",physical_screen_num:0,physical_screen_info:"",match_id:"",enter_from_merge:"",is_small_window:0,is_mobile:0,is_ipad:0,is_apad:0,if_from_widget:0,theme_raw_value:"",reason:"",open_from_page:"",multi_window_order:"",multi_window_open_from:"",is_child_route:!1,is_support_wasm:!1,sub_tab_name:""}},pageStayTime:{eventName:"page_stay_time",params:{url:"",url_path:"",enter_from:"",enter_from_merge:"",previous_page:"",enter_method:"",duration:0,is_visible:1,link_from:"",tab_name:"",aweme_type:0,player_paused:0,player_muted:0,reason:"",is_child_route:!1,sub_tab_name:"",is_small_window:"0"}},filterPageStayTime:{eventName:"filter_page_stay_time",params:{duration:0,filter_list:"",filter_name:"",sub_tab_name:"",enter_method:"",enter_from:""}},firstScreenCount:{eventName:"first_screen_count",params:{tab_name:"",count:0,scene:"",pathname:"",log_id:""}},clickDiscoverTabReload:{eventName:"click_discover_tab_reload",params:{tab_name:""}},discoverClose:{eventName:"discover_close",params:{visit_id:"",close_method:"change_tab",to_page:""}},discoverCourserFilterListClick:{eventName:"discover_courser_filter_list_click",params:{filter_list:"",filter_name:"",sub_tab_name:"",enter_method:"",enter_from:""}}});let iT=e=>{let{cover:l,cover169UrlList:i,coverUrlList:t,cover169BigUrlList:n}=(null==e?void 0:e.video)||{};return(null==e?void 0:e.isTopCard)&&(null==n?void 0:n[0])||(null==i?void 0:i[0])||l||(null==t?void 0:t[0])};var ik=i("452154");let iE={},iS=()=>{let e=ei.e.getPipWindow({scene:B.d.ListenVideo})||ei.e.getPipWindow({scene:B.d.WebVideo});e&&e.close()},iN=new Set(["onShow","onMouseEnter","onClick","onClickPipIcon"]),iP=new Set(["reuseConfig","logParams"]);var iR=n.memo(e=>{var l,i,o,a,s,u,c,v,m,h,g,w,C,x,b,I,y,L,j,T,k,E,S,N,P,R,A,M,D,B,F,H,O,U,Z;let{isTabActive:Y=!1,isTopCardActive:z=!1,isModalPlayingCurrentVideo:J,itemInfo:$,appendPlayerConfig:Q,abTestData:K={},onClick:G,onCoverLoad:X,onLoadedData:ei,minAspectRatio:et,maxAspectRatio:eo,onShow:er,onMouseEnter:ea,onMouseLeave:ed,isBigCard:es=!1,isTopCard:eu=!1,scene:ec,tabName:ev,onMorePopperShow:em,onMorePopperHidden:ef,logParams:e_={},isFirstPageItem:eh,containerScrolled:eg,index:ew,scrollContainerRef:eC,reuseConfig:ex,onClickPipIcon:eb,modalAwemeInfoRef:eI,setModalAwemeInfo:ey,setDefaultModalAwemeInfo:eL,topAwemeId:ej,isActiveTabConfig:eT,componentPathname:ek}=e,{awemeType:eE,mixInfo:eS}=$,{latestClickAwemeIdRef:eN,homeFetchData:eP,updateLatestClickAwemeIdRef:eR}=(0,ez.useDiscoverCommonContext)((0,en.P1)(["latestClickAwemeIdRef","homeFetchData","updateLatestClickAwemeIdRef"])),eA=!!(null==eS?void 0:eS.mixId),eM=eE===eV.e.Note,eD=(null==K?void 0:K.jxCoverPreload)===q.JxCoverPreload.V2||(null==K?void 0:K.jxCoverPreload)===q.JxCoverPreload.V3,eB=eD&&eh,eF=eD?ew:$.index,eO={videoImageWidth:null==$?void 0:$.calculateWidth,videoImageHeight:null==$?void 0:$.calculateHeight,videoImagePriority:eB||!!(void 0!==eF&&eF<=10),decoding:"async"},[eU,eZ]=(0,n.useState)(!eg),[eW,eY]=(0,n.useState)({}),eJ=(0,n.useRef)(null),e$=(0,id.u)({value:(null==$?void 0:null===(l=$.video)||void 0===l?void 0:l.width)/(null==$?void 0:null===(i=$.video)||void 0===i?void 0:i.height),max:eo,min:et}),eq=(0,ik.V1)(),{userInfo:eQ,dispatch:eK}=(0,ep.useUserInfoContext)()||{},{info:eG,isLogin:eX}=eQ,e0=(0,n.useMemo)(()=>{if("discover"===ec){var e,l;if(eu)return!eq;return!((null==$?void 0:null===(e=$.video)||void 0===e?void 0:e.width)>(null==$?void 0:null===(l=$.video)||void 0===l?void 0:l.height))&&!0}return!1},[eq,eu,ec,K]),e1=(0,n.useRef)(!1);(0,r.C)(d.w3.components.discover_waterfall_item),(0,n.useEffect)(()=>{var e,l,i;e1.current&&(null==eN?void 0:eN.current)===(null==$?void 0:$.awemeId)&&((null==$?void 0:null===(l=$.video)||void 0===l?void 0:null===(e=l.playAddr)||void 0===e?void 0:e.length)||(null==$?void 0:null===(i=$.video)||void 0===i?void 0:i.playApi))&&(G(eW),e1.current=!1)},[null==$?void 0:null===(o=$.video)||void 0===o?void 0:o.playAddr,null==$?void 0:null===(a=$.video)||void 0===a?void 0:a.playApi,eW,G]);let e3=iT($),e2=(0,n.useRef)(0),e5=(0,n.useMemo)(()=>{var e;let l=((null==$?void 0:null===(e=$.video)||void 0===e?void 0:e.coverUrlList)||[]).find(e=>e.includes(".heif?"));return!eh&&!!l&&("discover"===ec||(null==ev?void 0:ev.includes("channel")))},[eh,$,ec,ev]),e6=(0,n.useMemo)(()=>(0,_._)((0,f._)({},e_),{visit_id:W.Le.getConfig(W.gI.JingXuanVisitId)||"",is_first_screen:Number(eU),gid_rank:(ew||0)+1}),[e_,ew,eU]),e4=(0,n.useMemo)(()=>(null==$?void 0:$.awemeType)===eV.e.Note?(0,is.Wr)($.awemeId):(0,is.JF)($.awemeId),[$.awemeId,null==$?void 0:$.awemeType]),e9=(0,n.useMemo)(()=>{var e,l,i,t,n,o,r,a,d,s;return{userHref:(0,is.HC)(null==$?void 0:null===(e=$.authorInfo)||void 0===e?void 0:e.secUid,`enter_from=${(0,iu.yW)()}&enter_method=video_cover_title&from_gid=${null==$?void 0:$.awemeId}`),likesCount:(0,lG.qe)($.stats.diggCount),videoTime:(0,lG.$y)($.video.duration),previewUrlList:(null==$?void 0:null===(i=$.video)||void 0===i?void 0:null===(l=i.playAddr)||void 0===l?void 0:l.length)||(null==$?void 0:null===(t=$.video)||void 0===t?void 0:t.playApi)?[...null!==(s=null==$?void 0:null===(r=$.video)||void 0===r?void 0:null===(o=r.playAddr)||void 0===o?void 0:null===(n=o.map)||void 0===n?void 0:n.call(o,e=>e.src||""))&&void 0!==s?s:[]].concat((null==$?void 0:null===(a=$.video)||void 0===a?void 0:a.playApi)?null==$?void 0:null===(d=$.video)||void 0===d?void 0:d.playApi:[]):[]}},[null==$?void 0:$.video,null==$?void 0:null===(s=$.authorInfo)||void 0===s?void 0:s.secUid,null==$?void 0:null===(u=$.stats)||void 0===u?void 0:u.diggCount,null==$?void 0:null===(c=$.video)||void 0===c?void 0:c.duration]),e8=(null===(v=W.Le.getConfig(W.gI.JxOuterProgress))||void 0===v?void 0:v[null==$?void 0:$.awemeId])||{},e7=(0,V.d)((0,f._)({video_scale:(null==$?void 0:null===(m=$.video)||void 0===m?void 0:m.width)/(null==$?void 0:null===(h=$.video)||void 0===h?void 0:h.height),enter_from:(0,ic.vM)(),enter_from_merge:(0,ic.vM)(),group_id:null==$?void 0:$.awemeId,aweme_type:null==$?void 0:$.awemeType,is_compilation_anchor:0,from_click_group_id:null!==(N=null==$?void 0:$.insertId)&&void 0!==N?N:"",tab_name:ev,if_follow:null!==(P=null===(C=W.Le.getConfig(W.gI.FollowStatusCache))||void 0===C?void 0:null===(g=C[null==$?void 0:null===(w=$.authorInfo)||void 0===w?void 0:w.uid])||void 0===g?void 0:g.followStatus)&&void 0!==P?P:null==$?void 0:null===(x=$.authorInfo)||void 0===x?void 0:x.followStatus,pc_source:null==$?void 0:null===(b=$.chanFeedVideo)||void 0===b?void 0:b.source,video_source:(0,i_.B)($),first_page_item:eh,cover_show_time:Date.now()-(null==e2?void 0:e2.current),visit_id:W.Le.getConfig(W.gI.JingXuanVisitId)||"",is_first_screen:Number(eU),gid_rank:(ew||0)+1,page_rank:$.refreshIndex,boost_task_id:(null==$?void 0:$.boostTaskId)||"",is_theme_progress_bar:(null==e8?void 0:e8.isWatchedEnd)||(null==e8?void 0:e8.progress)?"1":"0"},e_)),le=(0,n.useCallback)(()=>{!iE[$.awemeId]&&(iE[$.awemeId]=!0,e2.current=Date.now(),null==er||er(),eZ(!eg),ij.sendLog("videoCoverShow",e7.current))},[$.awemeId,eg,e7,er]),ll=(0,n.useCallback)((e,l)=>{null==X||X(e,l,{isTopCard:null==$?void 0:$.isTopCard,isBigCard:null==$?void 0:$.isBigCard}),ij.sendLog("videoCoverLoad",e7.current)},[X,null==$?void 0:$.isTopCard,null==$?void 0:$.isBigCard]),li=(0,n.useCallback)(e=>{null==ei||ei((0,_._)((0,f._)({},e),{isTopCard:null==$?void 0:$.isTopCard,isBigCard:null==$?void 0:$.isBigCard}))},[ei,null==$?void 0:$.isTopCard,null==$?void 0:$.isBigCard]),lt=async e=>{let l=await (0,ih.m_)({awemeId:e,originType:ls.F.DiscoverOpen});(null==l?void 0:l.statusCode)===0&&(null==l?void 0:l.detail)&&(null==eN?void 0:eN.current)===e&&!(null==eI?void 0:eI.current)&&(null==eL||eL(null==l?void 0:l.detail),null==ey||ey(null==l?void 0:l.detail))},ln=(0,n.useCallback)(()=>{var e,l,i,t,n;$.awemeId&&(null===ee.YY||void 0===ee.YY||null===(n=ee.YY.setPlayerReuseAble)||void 0===n||n.call(ee.YY,el.v.Discover,$.awemeId)),null==eR||eR(null==$?void 0:$.awemeId),(0,iv.Vw)(im.H.video_cover_click,(0,f._)({aweme_info:$},e7.current)),ij.sendLog("videoCoverClick",e7.current);let o=`${d.w3.modal.modal_first_video_play}_start`;(0,eH.tl)(o),(0,eH.B1)({tag:o}),(null==$?void 0:null===(e=$.images)||void 0===e?void 0:e.length)||(null==$?void 0:null===(i=$.video)||void 0===i?void 0:null===(l=i.playAddr)||void 0===l?void 0:l.length)||(null==$?void 0:null===(t=$.video)||void 0===t?void 0:t.playApi)?G({visit_id:W.Le.getConfig(W.gI.JingXuanVisitId)||"",is_first_screen:Number(eU),gid_rank:(ew||0)+1,is_outflow:1,from_gid:null==$?void 0:$.awemeId,item_rank:1}):(e1.current=!0,(null==eP?void 0:eP.redisMode)==="replace"&&eh&<($.awemeId),eY({visit_id:W.Le.getConfig(W.gI.JingXuanVisitId)||"",is_first_screen:Number(eU),gid_rank:(ew||0)+1,is_outflow:1,from_gid:null==$?void 0:$.awemeId,item_rank:1}))},[e7,ew,$,null==$?void 0:$.awemeId,null==$?void 0:$.images,null==$?void 0:null===(I=$.video)||void 0===I?void 0:I.playAddr,null==$?void 0:null===(y=$.video)||void 0===y?void 0:y.playApi,G,eU,eh,eP,eR]),lo=eh||iE[$.awemeId],lr=$.awemeType===eV.e.LiveCard,{isActiveLiveCard:la,onHoverChange:ld,canLivePlay:lu}=iy({itemInfo:$,itemRef:eJ,index:ew,topAwemeId:ej,isTabActive:Y}),{cellRoomRowData:lc,userCount:lv,requestId:lm}=ib($);return lr?(0,t.jsx)("div",{ref:eJ,style:{height:"100%"},children:(0,t.jsx)(ir,{onHoverChange:ld,onEnterLive:iS,isFirstPageItem:eh,awemeInfo:$,isActive:lu,rawData:lc,instanceId:la?"AUTOPLAY_LIVE_CARD":"MULTI_PLAY_LIVE_CARD",description:(null==lc?void 0:lc.title)||"",anchorId:(null==lc?void 0:null===(R=lc.owner)||void 0===R?void 0:R.id_str)||"",roomId:(null==lc?void 0:null===(M=lc.owner)||void 0===M?void 0:null===(A=M.own_room)||void 0===A?void 0:A.room_ids_str[0])||"",webRid:(null==lc?void 0:null===(D=lc.owner)||void 0===D?void 0:D.web_rid)||"",userCount:lv,cover:(null==lc?void 0:null===(F=lc.cover)||void 0===F?void 0:null===(B=F.url_list)||void 0===B?void 0:B[0])||"",isEnd:(null==lc?void 0:lc.status)!==2,teaLogParams:{live_position:(ew||0)+1,anchor_id:null==lc?void 0:null===(H=lc.owner)||void 0===H?void 0:H.id_str,room_id:(null==lc?void 0:null===(U=lc.owner)||void 0===U?void 0:null===(O=U.own_room)||void 0===O?void 0:O.room_ids_str[0])||"",enter_from_merge:"web_homepage_discover",enter_method:"web_live_card",is_aweme_tied:eX?1:0,request_id:lm},source:{userName:null==lc?void 0:null===(Z=lc.owner)||void 0===Z?void 0:Z.nickname},title:(null==lc?void 0:lc.title)||"",isLogReady:!!eX,linkerMap:null==lc?void 0:lc.linker_map,scale:4/3})}):(0,t.jsxs)(t.Fragment,{children:[eu?(0,t.jsx)(iL,{itemInfo:$,tabName:ev,isActiveTabConfig:eT,abTestData:K,componentPathname:ek}):null,(0,t.jsx)(ig.Z,(0,_._)((0,f._)({className:p()("waterfall-videoCardContainer",{jingxuanVideoCard:"discover"===ec,jxBorderRadiusOptimize:(null==K?void 0:K.jxBorderRadiusOptimize)===1,isSmallCard:!es}),cardIndex:ew,imageBoxClassName:ix,imgClass:p()("discover-video-card-img",{"jingxuan-top-card-img":eu}),onLoadedData:li,logParams:e6,enableCardHoverPreview:!1,showHighLightTag:!0,appendPlayerConfig:Q,showImageInSSR:eh,disabledALink:!0,imageReady:lo,showHomeNote:eM,showHomeCollect:eA,awemeInfo:$,url:e4,description:(null==$?void 0:null===(L=$.webRawData)||void 0===L?void 0:L.cutTitle)||$.desc,imgUrl:e3,onClick:ln,onMouseLeave:ed,onMouseEnter:ea,imageClassName:ip,imageSkeletonClass:p()({[iC]:(null==$?void 0:null===(j=$.video)||void 0===j?void 0:j.cover)==="cache"}),userName:$.authorInfo.nickname,userHref:e9.userHref,userHrefTarget:"_blank",likesCount:e9.likesCount,videoTime:e9.videoTime,width:null==$?void 0:null===(T=$.video)||void 0===T?void 0:T.width,height:null==$?void 0:null===(k=$.video)||void 0===k?void 0:k.height,previewUrlList:e9.previewUrlList,isHorizontal:(null==$?void 0:null===(E=$.video)||void 0===E?void 0:E.width)>(null==$?void 0:null===(S=$.video)||void 0===S?void 0:S.height),fakeHorizontalInfo:null==$?void 0:$.fakeHorizontalInfo,isShowCreateTime:!0,videoImageStyle:{paddingTop:`${1/e$*100}%`},onShow:le,onCoverLoad:ll,onUserNameClick:()=>{var e;ia.logInstance.sendLog("clickNickname",{enter_from:(0,iu.yW)(),to_user_id:null==$?void 0:null===(e=$.authorInfo)||void 0===e?void 0:e.uid,group_id:null==$?void 0:$.awemeId})},scene:ec,blurLightCover:!1,user:{info:eG,isLogin:eX,dispatch:eK},abTestData:K,enableNotePreview:!0,needOperateHidden:!eu,topAwemeId:ej,isTopCard:eu,isBigCard:es,isTabActive:Y,isTopCardActive:z,isModalPlayingCurrentVideo:J},eO),{showMore:!0,tab:ev,showWatchLater:!0,onMorePopperHidden:ef,onMorePopperShow:em,withBlurBg:e0,cardInfoClassName:p()({[iw]:"discover"===ec}),enableImageX:e5,scrollContainerRef:eC,reuseConfig:ex,onClickPipIcon:eb}),`${$.awemeId}${eu?"-topcard":""}`)]})},(e,l)=>{var i;if(!(null===(i=W.Le.getConfig(W.gI.AbtestData))||void 0===i?void 0:i.enableJingxuanZustand))return!1;for(let i in l){if(!(iN.has(i)||iP.has(i))){if(!Object.is(e[i],l[i]))return!1}}return!0}),iA=i("910849"),iM=i("795653"),iD=i("326367");let iB=e=>{var l;let{abTestData:i,className:n,country:o}=e,r={wid:(null===(l=(0,ly.Es)())||void 0===l?void 0:l.user_unique_id)||""},a={clientType:(0,s.DT)()?"Client":"Web",os:(0,iM.fV)().os,isInPWA:(0,iD.f)()},d={teaInstance:ia.logInstance};return i.homeBanner===q.HomeBannerABVal.On?(0,t.jsx)(iA.Z,{className:n,userInfo:r,systemInfo:a,logConfig:d,country:o,clickAction:()=>{Y.emit(Y.EVENT.OpenJXModal,{source:"discover_banner"})}}):null},iF=em.ERROR_CODE,iV=(e,l)=>{var i;let t=null===(i=(0,K.oZ)(l))||void 0===i?void 0:i.fetcher;return t?t.request({cached:!0,consume:!0,params:e,fetcherOptions:{expired:36e5,resetExpiredCacheBefore:!1,hoverDelay:!0}}):(0,e_.F)(e)};var iH=e=>{var l,i,o,a;let{tab:s,subTagInfoRef:u,filterName:c,request:v,isTabActive:m,selectedTab:h,modalAwemeInfo:g,setModalAwemeInfo:w,setDefaultModalAwemeInfo:C,defaultList:x,perfLogFunctions:b,preloadModuleFeed:I,onVideoCardMouseLeave:y,onVideoCardClick:L,country:j,className:T,onClickPipIcon:k,setLogParams:E,appendPlayerConfig:S,showReplaceLoading:N,setShowReplaceLoading:P}=e,R=(0,V.d)(g),A=(0,n.useRef)(null),M=(0,n.useRef)(),D=(0,n.useRef)(),B=(0,ep.useUserInfoContext)()||{},H=(0,eg._)()||{},O=eY.z0[h],[U,Z]=(0,n.useState)(),[z,J]=(0,n.useState)(),[$,K]=(0,n.useState)(!1),{homeFetchData:G,isDefaultLanding:X,updateFeedCardAdResourceList:ei,updateSubTabLiveCardList:et,pageMode:eo}=(0,ez.useDiscoverCommonContext)((0,en.P1)(["homeFetchData","isDefaultLanding","updateFeedCardAdResourceList","updateSubTabLiveCardList","pageMode"])),er=(0,n.useRef)((null==G?void 0:G.isCourse)&&null!==(o=null==G?void 0:null===(i=G.awemeList)||void 0===i?void 0:null===(l=i.map)||void 0===l?void 0:l.call(i,e=>null==e?void 0:e.awemeId))&&void 0!==o?o:[]),ed=(0,n.useRef)(0);(0,r.C)(d.w3.components.discover_tab);let{setLoadingElement:es}=(0,ef._)({scrollListenerEl:z,scene:O,enableRecordFrameTime:!0,enableRecordLongTask:!0,enableRecordLoadingShow:!0,crashFPSThreshold:24,slideEndDelay:300,logParams:(0,f._)({sub_tab_name:null!==(a=eY.z0[h])&&void 0!==a?a:h},X?{enter_method:"default_landing"}:{}),abTestData:H});!function(e){let{scrollEl:l,onSideBarShow:i}=e;(0,F.o)(()=>{if(!l)return;Y.emit(Y.EVENT.globalScrollEl,l);let e=Y.listen(Y.EVENT.sideBarShow,()=>{Y.emit(Y.EVENT.globalScrollEl,l),null==i||i()});return()=>{e()}},[l])}({scrollEl:z});let{targetResource:ec}=(0,Q.II)(e=>{let{targetResource:l}=e;return{targetResource:l}}),{stuff_detail:em}=ec||{},e_=(0,n.useRef)(!0),eC=lk(H),ex=(0,n.useCallback)(async()=>{var e,l;let i;ev.z.markStart("discover_csr_fetch_data",{once:!0});let t=G&&(null==G?void 0:null===(e=G.awemeList)||void 0===e?void 0:e.length),n=!t&&e_.current,o={tagId:"0"===h?"":h,activeId:s.is_active_tab?s.key:"",isActiveTab:s.is_active_tab},r=eC.current&&"0"===h,a={useV2:1};if(!t&&e_.current&&(a.liteType=1,r&&(a.pullType=8)),e_.current&&(e_.current=!1),n){let[e]=await Promise.allSettled([v(n,(0,f._)({},a,o)),null==ei?void 0:ei(h),null==et?void 0:et()]).finally(()=>e_.current=!1);i=(0,f._)({},(null==e?void 0:e.status)==="fulfilled"&&(null==e?void 0:e.value)||{})}else{let e=null==H?void 0:null===(l=H.moduleFeedTimeout)||void 0===l?void 0:l.csr;e6.Z.sendLog("discoverFeedRequest",{scene:"waterfall"});let t=performance.now();i=await v(n,(0,_._)((0,f._)({},a,o),{timeout:e})).finally(()=>e_.current=!1),e6.Z.sendLog("discoverFeedResponse",{duration:performance.now()-t,scene:"waterfall"})}return ev.z.markEnd("discover_csr_fetch_data",{once:!0}),i},[v,s,h,G,ei]),eb=(0,n.useRef)(!0);(0,F.o)(()=>{if(eb.current){eb.current=!1;return}b.onCacheTabActive(h)},[]),(0,F.o)(()=>{if(U){let e=()=>{K(!0)};return U.addEventListener("scroll",e),()=>{U.removeEventListener("scroll",e)}}},[U]),(0,F.o)(()=>{if(g)return()=>{};if(!M.current)return;let e=e=>{if("ArrowDown"===e.code||"ArrowUp"===e.code){let i="ArrowUp"===e.code,t=M.current;if(t){var l;(0,eh.X)({top:Math.min(Math.max((null!==(l=t.scrollTop)&&void 0!==l?l:0)+(i?-100:100),0),t.scrollHeight),behavior:"smooth"},t)}}};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[g]);let eI=(0,n.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;arguments.length>1&&arguments[1];for(let l=0;l<3;l++){let i;if(h===eY._D[eY.JY.Course]){let l=0===(i=await iV({tabId:"screen_course_page",offset:e,size:6,tagIdList:u.current.courseTagIdStr,idList:er.current.join(",")},u.current.courseTagIdStr)).statusCode&&0===i.awemeList.length&&i.hasMore;ed.current=l?ed.current+1:0,i.hasMore=i.hasMore&&ed.current<3}else i=await ex();let{statusCode:t,hasMore:n,awemeList:o=[],offset:r=0,logPb:a="",responseFrom:d=""}=i;if(0===t&&0!==o.length||2===l)return{data:l_(o,H),hasMore:!!n,statusCode:t,logPb:a,responseFrom:d,maxCursor:r}}return{data:[],hasMore:!1,statusCode:iF.ERROR_UNKNOWN,logPb:""}},[B,ex,h,u]);(0,F.o)(()=>()=>{(null==M?void 0:M.current)&&(M.current.style.overflow="auto")},[]);let{onShow:ey,onClose:eL}=lT({selectedTab:h}),ej=(e,l)=>{if(E(l),W.Le.setConfig(W.gI.ModalStartOpenTime,Date.now()),L(e.awemeId),3===H.discoverOptimize){let l=(0,f._)({},e);l.video.originCover=iT(e,H),w(l)}else w(e)},eT=e=>{if(e.awemeId){var l;null===ee.YY||void 0===ee.YY||null===(l=ee.YY.setPlayerReuseAble)||void 0===l||l.call(ee.YY,el.v.Discover,e.awemeId)}if(k(),L(e.awemeId),3===H.discoverOptimize){let l=(0,f._)({},e);l.video.originCover=iT(e,H),w(l)}else w(e)},ek=(0,n.useMemo)(()=>{var e;return(0,f._)({sub_tab_name:null!==(e=eY.z0[h])&&void 0!==e?e:h,filter_name:c||""},X?{enter_method:"default_landing"}:{})},[X,h,c]),eE=(0,n.useCallback)(()=>{M.current&&(M.current.style.overflow="auto")},[]),eS=(0,n.useCallback)(()=>{if(M.current){let{scrollTop:e}=M.current;M.current.style.overflow="hidden",M.current.scrollTop=e}},[]),eN=(0,n.useMemo)(()=>{var e;let l=s.is_active_tab?s.key:null!==(e=eY.z0[Number(s.key)])&&void 0!==e?e:"all";return"all"===l?"/jingxuan":`/jingxuan/${l}`},[s.key,s.is_active_tab]);(0,n.useEffect)(()=>()=>{(0,iI.M)(eN)},[eN]);let eP=(0,n.useCallback)((e,l,i,n,o,r)=>{var a,d,u;let v=!!(null==G?void 0:null===(d=G.awemeList)||void 0===d?void 0:null===(a=d.find)||void 0===a?void 0:a.call(d,l=>(null==l?void 0:l.awemeId)===e.awemeId));return e.itemType===eD.CardAd?(0,t.jsx)(ew.l,{cardAd:e,cardStyle:"transparent",onShow:ey,onClose:eL,logParams:{sub_tab_name:eY.z0[h],filter_name:c||""},enterMethod:"discover_ad_card"}):e.itemType===eD.SubTabLive?(0,t.jsx)(eM,{cardLiveInfo:e,cardStyle:"transparent"}):(0,t.jsx)(iR,{isTabActive:m,isTopCardActive:(null==e?void 0:e.isTopCard)?!g:void 0,isModalPlayingCurrentVideo:(null==e?void 0:e.awemeId)===(null==g?void 0:g.awemeId),appendPlayerConfig:S,isFirstPageItem:v,containerScrolled:$,minAspectRatio:e3,maxAspectRatio:e3,scene:"discover",onCoverLoad:l,onLoadedData:b.onLoadedData,reuseConfig:{scene:el.v.Discover,reuseId:null==e?void 0:e.awemeId,autoCreate:!0,keepPlayer:null==e?void 0:e.isTopCard},onShow:()=>{null==i||i()},index:n,onMouseEnter:()=>{null==I||I(e.awemeId,q.MainHoverPreloadAction.hover,!0)},onMouseLeave:y,itemInfo:e,abTestData:H,onClick:l=>ej(e,l),onClickPipIcon:()=>eT(e),isBigCard:null==e?void 0:e.isBigCard,isTopCard:null==e?void 0:e.isTopCard,topAwemeId:r,onMorePopperShow:eS,onMorePopperHidden:eE,logParams:(0,_._)((0,f._)({sub_tab_name:null!==(u=eY.z0[h])&&void 0!==u?u:h,filter_name:c||"",is_first_large_card_outflow:(null==e?void 0:e.isBigCard)?"1":"0"},X?{enter_method:"default_landing"}:{}),{page_mode:eo}),scrollContainerRef:o,modalAwemeInfoRef:R,setModalAwemeInfo:w,setDefaultModalAwemeInfo:C,tabName:s.key,isActiveTabConfig:s.is_active_tab,componentPathname:eN})},[H,I,y,h,m,G,X,$,g,S,ek,s.key,s.is_active_tab]);return(0,t.jsxs)("div",{className:p()(eu.waterfallPage,T),ref:e=>{if(!!e){D.current=e;M.current=e,Z(e),J(e)}},children:["0"===h&&(0,t.jsx)(iB,{className:eu.bannerContainer,abTestData:H,country:j}),em&&"300205"===h?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ea,{islandMode:"load",disableTDK:!0,className:p()(eu.topicPage,eu.topicPageWithDiscoverCardOptimize)}),(0,t.jsx)("div",{className:eu.feedTitle,style:{paddingLeft:28},children:(0,t.jsx)("h2",{children:"更多热门"})})]}):null,(0,t.jsx)("div",{className:p()(eu.wrapperMarin,"jingxuanFeedList"),children:(0,t.jsx)(lf,{ref:A,awemeIdsRef:er,defaultList:x,scrollParentEl:U,scrollListenerEl:z,renderItem:eP,fetchMore:eI,modalAwemeInfo:g,abTestData:H,selectedTab:h,isGaiaTab:s.is_active_tab,tagId:"0"!==h&&h?h:"",perfLogFunctions:b,setLoadingElement:es,setShowReplaceLoading:P,showReplaceLoading:N})})]})},iO=i("558878"),iU=i("771410"),iZ=()=>{let e=(0,n.useRef)({step:{init:!1,skeleton:!1,cover:!1,loadmore:0,top_card_cover:!1,top_card_load_data:!1},info:{reload:!1,tabChange:!1,log:!1,activeKey:"",sub_tab_name:"",filter_name:""}}),l=()=>{let l=(0,J.I)()?"route":"url",i=e.current.info.reload?"reload":l;return e.current.info.tabChange&&(i=`tab-change-${e.current.info.activeKey}`),{enter_from:(0,iu.yW)(),from:i}},i=l=>(0,J.I)()||e.current.info.reload?(0,eH.J1)(l)-(0,eH.J1)(d.w3.page.page_init_time):(0,eH.J1)(l),t=l=>{if((0,J.I)()||e.current.info.reload){let e=(0,eH.J1)(d.w3.page.page_tab_click_time);return e?((0,eH.tl)(d.w3.page.page_tab_click_time),(0,eH.J1)(l)-e):(0,eH.J1)(l)-(0,eH.J1)(d.w3.page.page_init_time)}if(!e.current.info.tabChange)return(0,eH.J1)(l);{var i;let e=null!==(i=(0,eH.J1)("discover_tab_change"))&&void 0!==i?i:0;return(0,eH.J1)(l)-e}},o=(0,n.useCallback)(l=>e.current.info.activeKey===l,[]);(0,F.o)(()=>Y.listen(Y.EVENT.RefreshFeedList,l=>{(0,eH.B1)({tag:d.w3.page.page_init_time}),e.current.step.cover=!1,e.current.step.top_card_cover=!1,e.current.step.top_card_load_data=!1,e.current.info.reload=!0,e.current.info.tabChange=!1,e.current.info.log=!1}),[]),(0,a.w)(()=>{(0,eH.tl)("discover_tab_change")},[]);let r=async function(){var n,o,r,a;if(arguments.length>0&&void 0!==arguments[0]&&arguments[0],e.current.info.log||(null===(r=W.Le.getConfig(W.gI.LynxInfo))||void 0===r?void 0:null===(o=r.discover)||void 0===o?void 0:null===(n=o.awemeList)||void 0===n?void 0:n.length))return;let{enter_from:u,from:c}=l();if(W.Le.getConfig(W.gI.DiscoverPageCache)){let e=(0,eH.J1)(d.w3.page.cache_page_active_time)-(0,eH.J1)("click_discover_tab");iU.Z.report("web_perf_timing",{enter_from:u,from:"cache",[d.w3.moment.first_img_render_time]:e});return}let v=i(d.w3.moment.skeleton_render_time),m=i(d.w3.fetchers.fetcher_waterfall_start),h=i(d.w3.fetchers.fetcher_waterfall_end),g=t(d.w3.moment.first_img_render_time),p={enter_from:u,from:c,[d.w3.fetchers.fetcher_waterfall_start]:m,[d.w3.fetchers.fetcher_waterfall_end]:h,[d.w3.fetchers.fetcher_waterfall_duration]:h-m,[d.w3.moment.skeleton_render_time]:v,[d.w3.moment.first_img_render_time]:g};if(performance.getEntriesByName("img-loaded")[0]&&"url"===c&&(null===(a=window.pageDirectRender)||void 0===a?void 0:a.imageLoadedTime)){let e=window.pageDirectRender.imageLoadedTime;(0,eH.tl)("img-loaded");let l=(0,s.DT)()?await (0,iO.PQ)(e):{};iU.Z.report("web_perf_timing",(0,_._)((0,f._)({},l,p),{from:"url",[d.w3.moment.first_img_render_time]:e,scene:window.JX_CACHE?"first_screen_cache":""}))}else{let e=(0,s.DT)()?await (0,iO.PQ)(g):{};iU.Z.report("web_perf_timing",(0,f._)({},e,p))}e.current.info.log=!0},u=()=>{e.current.step.loadmore=0},c=(0,n.useCallback)(()=>{!e.current.step.skeleton&&((0,eH.B1)({tag:d.w3.moment.skeleton_render_time}),e.current.step.skeleton=!0)},[]),v=(0,n.useCallback)(async(i,n,o)=>{if((null==o?void 0:o.isTopCard)&&i&&!e.current.step.top_card_cover){var a,u,c;if(e.current.step.top_card_cover=!0,W.Le.getConfig(W.gI.DiscoverPageCache))return;(0,eH.B1)({tag:"jingxuan_top_card_img_loaded"});let{from:i}=l(),n=null===(a=performance.getEntriesByName("jingxuan_top_card_img_loaded"))||void 0===a?void 0:a[0],r=null===(u=performance.getEntriesByName("jingxuan_cache_top_card_img_loaded"))||void 0===u?void 0:u[0],d=null!==(c=null==n?void 0:n.startTime)&&void 0!==c?c:0,v=t("jingxuan_top_card_img_loaded");r&&(d=r.startTime,v=r.startTime,(0,eH.tl)("jingxuan_cache_top_card_img_loaded"));let m=(0,s.DT)()?await (0,iO.VU)(v,d):{};iU.Z.report("jingxuan_perf_timing",(0,_._)((0,f._)({},m),{from:i,first_img_load_time:v,is_first_large_card_outflow:(null==o?void 0:o.isBigCard)?"1":"0",sub_tab_name:e.current.info.sub_tab_name,filter_name:e.current.info.filter_name,scene:"url"===i&&window.JX_CACHE?"first_screen_cache":""}))}!e.current.step.cover&&i&&((0,eH.B1)({tag:d.w3.moment.first_img_render_time}),e.current.step.cover=!0,r(n))},[]),m=(0,n.useCallback)(async i=>{if((null==i?void 0:i.isTopCard)&&!e.current.step.top_card_load_data){var n,o;e.current.step.top_card_load_data=!0;let{from:r}=l(),a=null===(n=performance.getEntriesByName("jx-top-card-quickstart-first-frame"))||void 0===n?void 0:n[0],d=null===(o=performance.getEntriesByName("jx-top-card-first-frame"))||void 0===o?void 0:o[0],u=t("jx-top-card-first-frame"),c="";"url"===r&&window.JX_CACHE&&(c="first_screen_cache"),"url"===r&&a&&(u=t("jx-top-card-quickstart-first-frame"),(0,eH.tl)("jx-top-card-quickstart-first-frame"),c=window.JX_CACHE?"first_screen_cache_quickstart":"quickstart");let v=a?a.startTime:null==d?void 0:d.startTime,m=(0,s.DT)()?await (0,iO.Qq)(u,v):{};iU.Z.report("jingxuan_perf_timing",(0,_._)((0,f._)({},m),{from:r,cost:null==i?void 0:i.cost,first_data_load_time:u,is_first_large_card_outflow:(null==i?void 0:i.isBigCard)?"1":"0",sub_tab_name:e.current.info.sub_tab_name,filter_name:e.current.info.filter_name,scene:c})),(0,eH.tl)("jx-top-card-first-frame")}},[]),h=(0,n.useCallback)(e=>{let{enter_from:i}=l();(0,eH.B1)({tag:"discover_tab_active"});let t=(0,eH.J1)("discover_tab_change");if(!t)return;let n=(0,eH.J1)("discover_tab_active");iU.Z.report("web_perf_timing",{enter_from:i,from:`tab-change-${e}-cache`,[d.w3.moment.first_img_render_time]:n-t})},[]),g=(0,n.useCallback)(l=>{e.current.info.activeKey=l},[]),p=(0,n.useCallback)(l=>{e.current.info.sub_tab_name=l.sub_tab_name,e.current.info.filter_name=l.filter_name},[]),w=(0,n.useCallback)(l=>{e.current.step.cover=!1,e.current.info.reload=!1,e.current.info.log=!1,e.current.step.top_card_cover=!1,e.current.step.top_card_load_data=!1,g(l),e.current.info.tabChange=!0,(0,eH.B1)({tag:"discover_tab_change"})},[]),C=(0,n.useCallback)(l=>{l===e1.LOADING&&0===e.current.step.loadmore&&(e.current.step.loadmore=1,(0,eH.B1)({tag:"page_discover_loadmore_show",detail:{status:l}})),l===e1.SUCCESS&&1===e.current.step.loadmore&&(e.current.step.loadmore=2,(0,eH.B1)({tag:"page_discover_loadmore_hidden",detail:{status:l}}),u())},[]),x=(0,n.useCallback)(()=>{(0,eH.B1)({tag:d.w3.page.page_init_time}),(0,eH.tl)(d.w3.fetchers.fetcher_waterfall_start),(0,eH.tl)(d.w3.fetchers.fetcher_waterfall_end);let{step:l,info:i}=e.current;l.cover=!1,l.top_card_cover=!1,l.top_card_load_data=!1,l.skeleton=!1,l.loadmore=0,i.log=!1,i.reload=!0,i.tabChange=!1},[]);return!e.current.step.init&&((0,eH.B1)({tag:d.w3.page.page_init_time}),e.current.step.init=!0),(0,F.o)(()=>{W.Le.getConfig(W.gI.DiscoverPageCache)&&((0,eH.B1)({tag:d.w3.page.cache_page_active_time}),r())},[]),(0,a.w)(()=>{W.Le.setConfig(W.gI.DiscoverPageCache,!0),e.current.info.log=!1},[]),(0,n.useEffect)(()=>{let e=()=>r();return document.addEventListener("visibilitychange",e),window.addEventListener("beforeunload",e),()=>{document.removeEventListener("visibilitychange",e),window.removeEventListener("beforeunload",e),r(),(0,eH.tl)(d.w3.fetchers.fetcher_waterfall_start),(0,eH.tl)(d.w3.fetchers.fetcher_waterfall_end)}},[]),(0,n.useRef)({onSkeletonShow:c,onLoadMoreShow:C,onCoverLoad:v,onLoadedData:m,onReload:x,onCacheTabActive:h,updateTabInfo:g,updateLogInfo:p,onTabChange:w,isActiveTab:o}).current},iW=i("836287");let iY=eY._D[eY.JY.Course],iz=e=>(null==e?void 0:e.length)?[{tagId:0,tagLevel:0,tagTitle:"全部"},...e]:[],iJ=e=>{var l;return e?`[${null!==(l=e.parentTagId)&&void 0!==l?l:e.tagId},${e.parentTagId?e.tagId:0},0]`:"[0,0,0]"};var i$=i("234150"),iq={container:"hX5lpjyD",switchBtn:"BwtI4Y8W",tabList:"X8TYWV2w",tabExpand:"BYNRTKtL",tab:"g8GwTJme",disabled:"KhI1SPfq",active:"UY7sMIXM"};let iQ=(0,b.ZP)(()=>i.e("56877").then(i.bind(i,174315)),{ssr:!1}),iK=[{label:"全部",key:"0"},{label:"公开课",key:"100000"},{label:"游戏",key:"300205"},{label:"二次元",key:"300206"},{label:"音乐",key:"300209"},{label:"美食",key:"300204"},{label:"知识",key:"300213"},{label:"体育",key:"300207"}],iG=e=>{let l=(0,n.useMemo)(()=>(null==e?void 0:e.length)?e:iK,[e]);return(0,n.useEffect)(()=>{(0,K.mi)(l)},[l]),l};var iX=e=>{var l;let{className:i,tabClassName:o,style:r,onTabClick:a,tabList:d,activeKey:s,onTabChange:u,disabled:c=!1,abTestData:v,isSpider:m}=e,f=(0,n.useRef)(null),_=(0,n.useRef)(null),h=iG(d),g=(e,l)=>{null==a||a(e,l),!c&&(null==e?void 0:e.key)!==s&&(null==u||u(e,l))};return(0,n.useEffect)(()=>{var e,l;null==_||null===(l=_.current)||void 0===l||null===(e=l.updateButtonStatus)||void 0===e||e.call(l)},[h]),(0,t.jsxs)("div",{className:p()(iq.container,iq.tabExpand,i),style:r,children:[(0,t.jsx)("div",{className:iq.tabList,ref:f,children:null==h?void 0:null===(l=h.map)||void 0===l?void 0:l.call(h,(e,l)=>{var i;let{label:n,key:r}=e,a=null!==(i=eY.z0[Number(r)])&&void 0!==i?i:"all",d="all"===a?"/jingxuan":`/jingxuan/${a}`,u=`https://www.douyin.com${d}`;return(0,t.jsx)("div",{className:p()(iq.tab,{[iq.active]:r===s,[iq.disabled]:c},o),onClick:i=>{var t,n;g(e,l),null==_||null===(n=_.current)||void 0===n||null===(t=n.onItemClick)||void 0===t||t.call(n,i,l)},onMouseEnter:()=>{var e;let{predictor:l}=null!==(e=(0,K.Z1)(r))&&void 0!==e?e:{};if(r!==s&&!c&&!!l)l.enter({params:{useV2:1,liteType:1,tagId:r},fetcherOptions:{expired:3e4,resetExpiredCacheBefore:!1,hoverDelay:!0}})},children:m?(0,t.jsx)(i$.a,{target:"_blank",href:u,children:n}):n},r)})}),(0,t.jsx)(M.SV,{Slardar:ed.oe,children:(0,t.jsx)(n.Suspense,{fallback:null,children:(0,t.jsx)(iQ,{ref:_,className:iq.switchBtn,scrollRef:f})})})]})};let i0=(e,l)=>{let i=(0,n.useMemo)(()=>((null==e?void 0:e.length)?e:iK).some(e=>e.key===l)?l:"0",[l,e]),t=(0,n.useRef)(i);return(0,n.useEffect)(()=>{t.current=i},[i]),(0,n.useEffect)(()=>{let e=new URL(location.href);e.searchParams.get("tag_id")&&(e.searchParams.delete("tag_id"),window.history.replaceState(null,"",e))},[]),{selectedTab:i,selectedTabRef:t}};var i1=i("365169"),i3=i("742841");let i2=(0,b.ZP)(()=>i.e("56877").then(i.bind(i,174315)),{ssr:!1}),i5={mp4encryptplayer:{config:{waitingTimeOut:7500,canplayTimeout:7500,timeout:4500}},DASHPlugin:{waitingTimeOut:7500,canplayTimeout:7500,timeout:4500}},i6=n.forwardRef((e,l)=>{let{request:i,resetRefreshIndex:o,tabs:s,country:c,defaultTagId:v,onChannelTabChange:m,onChannelTabReload:g,defaultSubTags:b,quickPlayerReuseEffectCb:I}=e,{homeFetchData:y,setHomeFetchData:L,isDefaultLanding:j,updateFeedCardAdResourceList:T,updateSubTabLiveCardList:k,ssrTagId:E}=(0,ez.useDiscoverCommonContext)((0,en.P1)(["homeFetchData","setHomeFetchData","isDefaultLanding","updateFeedCardAdResourceList","updateSubTabLiveCardList","ssrTagId"])),{isListenVideoMiniWin:S,jxRedisMode:N}=(0,i1.Iq)(e=>{let{isListenVideoMiniWin:l,jxRedisMode:i}=e;return{isListenVideoMiniWin:l,jxRedisMode:i}}),[P,R]=(0,n.useState)(null),[eo,er]=(0,n.useState)(null),[ev,em]=(0,n.useState)({}),[ef,eh]=(0,n.useState)(!1),ew=(0,n.useRef)(null);(0,n.useRef)(null);let eC=(0,n.useRef)(null),[ex,eb]=(0,n.useState)(null),eI=iG(s),{selectedTab:ey,selectedTabRef:eL}=i0(eI,v),ej=(0,ep.useUserInfoContext)()||{},{isLogin:eT}=(null==ej?void 0:ej.userInfo)||{},ek=(0,eg._)()||{},eE=(0,n.useMemo)(()=>{var e;return(null==ek?void 0:null===(e=ek.jxCacheExpire)||void 0===e?void 0:e.componentCache)||3e5},[ek]),{targetResource:eS,handleTagChange:eN,resourceList:eP}=(0,Q.II)(e=>{let{targetResource:l,handleTagChange:i,resourceList:t}=e;return{targetResource:l,handleTagChange:i,resourceList:t}}),{stuff_detail:eR}=eS||{},{keep_old_component:eA}=eR||{},eM=null==eo?void 0:eo.awemeId,eD=iZ(),eB="replace"===N&&E===ey,[eF,eV]=(0,n.useState)(eB),eH=lk(ek);(0,r.C)(d.w3.components.discover_feed_list);let eO=(0,n.useMemo)(()=>{var e;return null==eP?void 0:null===(e=eP.find)||void 0===e?void 0:e.call(eP,e=>{try{var l;let i=JSON.parse(null==e?void 0:e.stuff_detail);return(null==i?void 0:i.reuse_tab)&&(null==i?void 0:null===(l=i.tab)||void 0===l?void 0:l.includes("300205"))}catch(e){return!1}})},[eP]);(0,n.useImperativeHandle)(l,()=>({setShowReplaceLoading:eV}));let{enableSaveCacheCsr:eU}=(0,i3.o)({abTestData:ek,selectedTab:ey}),{checkOnLocationChange:eZ}=iI.c.getState();(0,n.useEffect)(()=>{var e;let l=null==ek?void 0:null===(e=ek.jxCacheMode)||void 0===e?void 0:e.expire;if(y&&eU&&l){let e=Date.now()+1e3*l;W.Le.setConfig(W.gI.JxRedisExpireTime,e)}},[]),(0,D.C)(()=>{var e,l,i,t,n,o,r,a,d,s,u,c,v,m,f,_,h,g,p,w,C,x,b,I,y,L,j,T,k,E,S,N,P,A,M,D,B,F,V;if(window.JX_IS_HYDRATED=!0,(null===(l=window)||void 0===l?void 0:null===(e=l.__QUICK_PLAYER)||void 0===e?void 0:e.removeCardHandlers)&&(window.__QUICK_PLAYER.removeCardHandlers.forEach(e=>"function"==typeof e&&e()),delete window.__QUICK_PLAYER.removeCardHandlers),(null===(t=window)||void 0===t?void 0:null===(i=t.__QUICK_PLAYER)||void 0===i?void 0:i.player)&&(null===(o=window)||void 0===o?void 0:null===(n=o.__QUICK_PLAYER)||void 0===n?void 0:n.awemeInfo))R(null===(c=window)||void 0===c?void 0:null===(u=c.__QUICK_PLAYER)||void 0===u?void 0:u.awemeInfo),er(null===(m=window)||void 0===m?void 0:null===(v=m.__QUICK_PLAYER)||void 0===v?void 0:v.awemeInfo),ee.YY.setReusePlayer(el.v.Discover,null===(h=window)||void 0===h?void 0:null===(_=h.__QUICK_PLAYER)||void 0===_?void 0:null===(f=_.awemeInfo)||void 0===f?void 0:f.awemeId,null===(p=window)||void 0===p?void 0:null===(g=p.__QUICK_PLAYER)||void 0===g?void 0:g.player),ee.YY.setPlayerReuseAble(el.v.Discover,null===(x=window)||void 0===x?void 0:null===(C=x.__QUICK_PLAYER)||void 0===C?void 0:null===(w=C.awemeInfo)||void 0===w?void 0:w.awemeId);else if((null===(a=window)||void 0===a?void 0:null===(r=a.__JX_BIG_CARD_QUICK_PLAYER)||void 0===r?void 0:r.player)&&(null===(s=window)||void 0===s?void 0:null===(d=s.__JX_BIG_CARD_QUICK_PLAYER)||void 0===d?void 0:d.mountType)==="modal"){let e=null===(I=window)||void 0===I?void 0:null===(b=I.__JX_BIG_CARD_QUICK_PLAYER)||void 0===b?void 0:b.awemeInfo;e.isTopCard=!0,!window.__QUICK_PLAYER&&(window.__QUICK_PLAYER={}),window.__QUICK_PLAYER.pageName="jingxuan",window.__QUICK_PLAYER.player=null===(L=window)||void 0===L?void 0:null===(y=L.__JX_BIG_CARD_QUICK_PLAYER)||void 0===y?void 0:y.player,window.__QUICK_PLAYER.playerId=null===(T=window)||void 0===T?void 0:null===(j=T.__JX_BIG_CARD_QUICK_PLAYER)||void 0===j?void 0:j.playerId,window.__QUICK_PLAYER.awemeInfo=e,window.__QUICK_PLAYER.destroyQuickPlayerDom=()=>{var e,l,i,t;null===(e=window.__QUICK_PLAYER)||void 0===e||delete e.player,null===(t=window)||void 0===t||null===(i=t.__JX_BIG_CARD_QUICK_PLAYER)||void 0===i||null===(l=i.destroyQuickPlayerDom)||void 0===l||l.call(i)},R(e),er(e),ee.YY.setReusePlayer(el.v.Discover,null===(S=window)||void 0===S?void 0:null===(E=S.__QUICK_PLAYER)||void 0===E?void 0:null===(k=E.awemeInfo)||void 0===k?void 0:k.awemeId,null===(P=window)||void 0===P?void 0:null===(N=P.__QUICK_PLAYER)||void 0===N?void 0:N.player),ee.YY.setPlayerReuseAble(el.v.Discover,null===(D=window)||void 0===D?void 0:null===(M=D.__QUICK_PLAYER)||void 0===M?void 0:null===(A=M.awemeInfo)||void 0===A?void 0:A.awemeId),null===(F=window)||void 0===F||null===(B=F.removeBigCardQuickPlayerCrossVolume)||void 0===B||B.call(F)}else null===(V=window)||void 0===V||delete V.__QUICK_PLAYER},[]),(0,D.C)(()=>{let e=Y.listen(Y.EVENT.changeLynxDiscoverAwemeModal,e=>{er(e)});return()=>{null==e||e()}},[er]),(0,n.useEffect)(()=>{let{url:e,query:l}=h.parseUrl(location.href);(null==l?void 0:l.modal_id)&&eJ(e=>(0,_._)((0,f._)({},e),{targetGid:null==l?void 0:l.modal_id,ready:!0}))},[]);let[eW,eJ]=(0,n.useState)({ready:!1,awemeList:[],targetGid:""}),e$=(0,n.useRef)(""),eq=(0,n.useMemo)(()=>(K.WB.setDelay(2e3),{action:q.MainHoverPreloadAction.hover,cache:q.MainHoverPreloadCache.off,cacheTime:0,count:8}),[]);(0,n.useEffect)(()=>{(null==eq?void 0:eq.cache)===q.MainHoverPreloadCache.on&&ec.Z.setCacheTime(null==eq?void 0:eq.cacheTime)},[eq]),(0,n.useEffect)(()=>{var e,l,i,t,n;e$.current=null==eo?void 0:eo.awemeId,eo&&(null===(i=window)||void 0===i?void 0:null===(l=i.__JX_BIG_CARD_QUICK_PLAYER)||void 0===l?void 0:null===(e=l.awemeInfo)||void 0===e?void 0:e.awemeId)!==(null==eo?void 0:eo.awemeId)&&(null===(t=(n=window).disabledBigCardQuickPlayer)||void 0===t||t.call(n,"pause"))},[eo]);let eQ=(0,n.useMemo)(()=>{let e=[],l=!1,i="";return(null==eq?void 0:eq.action)===q.MainHoverPreloadAction.hover||(null==eq?void 0:eq.action)===q.MainHoverPreloadAction.click?(null==ek?void 0:ek.jxModalPreloadOptimize)?(e=eW.awemeList,l=eW.ready,i=null==eW?void 0:eW.targetGid):(e=(null==eo?void 0:eo.awemeId)===(null==eW?void 0:eW.targetGid)?eW.awemeList:[],l=(null==eo?void 0:eo.awemeId)===(null==eW?void 0:eW.targetGid)&&eW.ready):l=!0,{preloadAwemeList:e,preloadReady:l,preloadTargetGid:i}},[eq,eW,null==eo?void 0:eo.awemeId,ek]),eK=(0,n.useCallback)(async(e,l,i)=>{var t;if(null===(t=eI.find(e=>e.key===ey))||void 0===t?void 0:t.is_active_tab)return;let n=(null==eq?void 0:eq.cache)===q.MainHoverPreloadCache.on;if((null==eq?void 0:eq.action)===l){if(n){let l=ec.Z.getCache(e);if(l){!l.loading&&eJ({ready:!0,awemeList:null==l?void 0:l.value,targetGid:e});return}}let l={targetGid:e,tagId:"0"===ey?"":ey,onRequestBefore:()=>{n&&ec.Z.setCacheLaoading(e)},callback:l=>{n&&ec.Z.setCache(e,l),((null==ek?void 0:ek.jxModalPreloadOptimize)||e$.current===e)&&eJ({ready:!0,awemeList:l,targetGid:e})},useV2:1,count:(null==eq?void 0:eq.count)||8};i?null===K.WB||void 0===K.WB||K.WB.enter({params:l,fetcherOptions:{hoverDelay:!1}}):null===K.ky||void 0===K.ky||(0,K.ky)(l)}},[eq,ey,ek]),eG=(0,n.useCallback)(()=>{(null==eq?void 0:eq.action)===q.MainHoverPreloadAction.hover&&(null===K.WB||void 0===K.WB||K.WB.leave())},[K.WB,eq]),eX=(0,n.useCallback)(e=>{if((null==eq?void 0:eq.action)===q.MainHoverPreloadAction.hover){let l=(null==eq?void 0:eq.cache)===q.MainHoverPreloadCache.on?ec.Z.getCache(e):null;l?!l.loading&&eJ({awemeList:null==l?void 0:l.value,targetGid:e,ready:!0}):(null===K.WB||void 0===K.WB||K.WB.leave(),eJ(l=>(0,_._)((0,f._)({},l),{targetGid:e,ready:!0})))}null==eK||eK(e,q.MainHoverPreloadAction.click,!1)},[eK,eq,ek]),e0=(0,n.useCallback)(e=>{if(eX(e),null==ek?void 0:ek.jxWatchLaterPip){var l,i,t,n,o,r,a,d,s;let e=ei.e.getPipWindow({scene:B.d.WebVideo});((null==e?void 0:null===(n=e.document)||void 0===n?void 0:null===(t=n.documentElement)||void 0===t?void 0:null===(i=t.classList)||void 0===i?void 0:null===(l=i.contains)||void 0===l?void 0:l.call(i,"watchLaterPipHtml"))||(null==e?void 0:null===(d=e.document)||void 0===d?void 0:null===(a=d.body)||void 0===a?void 0:null===(r=a.classList)||void 0===r?void 0:null===(o=r.contains)||void 0===o?void 0:o.call(r,"hasWatchLater")))&&(null==e||null===(s=e.close)||void 0===s||s.call(e),ei.e.unRegister({scene:B.d.WebVideo}),Y.emit(Y.EVENT.changeMinWinWeb,{isMiniWinWeb:!1,pipWindow:null})),Y.emit(Y.EVENT.closeWatchLaterPip)}},[eX,ek]),e1=(0,n.useCallback)(async()=>{if(S){var e;let l=ei.e.getPipWindow({scene:B.d.ListenVideo});null==l||null===(e=l.close)||void 0===e||e.call(l)}eh(!0)},[S]),{subTags:e3,subTagInfoRef:e2,currentSubTag:e5,preloadTagOnHover:e6,onSubTagClick:e4,getSubTabKey:e9,refReloadSubTab:e8}=function(e){let{selectedTab:l,defaultSubTags:i,setHomeFetchData:t}=e,[o,r]=(0,n.useState)(iz(null==i?void 0:i[iY])),[a,d]=(0,n.useState)(l===iY&&(null==o?void 0:o.length)?o:[]),[s,u]=(0,n.useState)(a[0]),[c,v]=(0,n.useState)(0),m=(0,n.useRef)({courseTagIdStr:"[0,0,0]"});m.current.courseTagIdStr=iJ(s),(0,n.useEffect)(()=>{let e=l===iY&&(null==o?void 0:o.length)?o:[];d(e),u(e[0])},[l,o]),(0,n.useEffect)(()=>{if(null==o?void 0:o.length){(0,K.mk)(o.map(iJ));return}let e=!1;return(0,e_.W)({tabId:"screen_course_page"}).then(l=>{if(!e&&0===l.statusCode){let e=iz(l.tagList);r(e),e.length&&(0,K.mk)(e.map(iJ)),W.Le.setConfig(W.gI.JxCourseFilterList,l.tagList.map(e=>e.tagTitle).join(","))}}),()=>{e=!0}},[]);let f=(0,V.d)(()=>{t(void 0),u(a[0]),v(0)});{let e=null==i?void 0:i[iY];e&&!W.Le.getConfig(W.gI.JxCourseFilterList)&&W.Le.setConfig(W.gI.JxCourseFilterList,e.map(e=>e.tagTitle).join(","))}return{subTags:a,subTagInfoRef:m,currentSubTag:s,onSubTagClick:(e,l)=>{t(void 0),(null==s?void 0:s.tagId)===e.tagId?v(Math.floor(1e4*Math.random())):(u(e),v(0)),l===iY&&ij.sendLog("discoverCourserFilterListClick",{filter_list:W.Le.getConfig(W.gI.JxCourseFilterList)||"",filter_name:e.tagTitle,sub_tab_name:"course",enter_method:"other",enter_from:"discover"})},preloadTagOnHover:(e,l)=>{if(l===iY){var i,t;if(e.tagTitle===(null==s?void 0:s.tagTitle))return;let l=iJ(e),n=null===(i=(0,K.oZ)(l))||void 0===i?void 0:i.predictor;null==n||null===(t=n.enter)||void 0===t||t.call(n,{params:{tabId:"screen_course_page",offset:0,size:6,tagIdList:l,idList:""},fetcherOptions:{expired:36e5,resetExpiredCacheBefore:!1,hoverDelay:!0}})}},refReloadSubTab:f,getSubTabKey:e=>{if(e===iY)return`${m.current.courseTagIdStr}-${c}`}}}({selectedTab:ey,defaultSubTags:b,setHomeFetchData:L}),[e7,le]=(0,n.useState)(new Map().set(ey,{timeStamp:Date.now(),key:`tabPanelCt-${ey}-1`})),ll=(0,n.useCallback)(e=>{if(null==g||g(e),eD.updateTabInfo(e),eD.onReload(),e===eY._D[eY.JY.Course]){var l;null===(l=e8.current)||void 0===l||l.call(e8)}le(l=>{let i=new Map;return Array.from(l.entries()).forEach(l=>{let[t,n]=l;i.set(t,t===e?{timeStamp:Date.now(),key:`tabPanelCt-${t}-${n.key.endsWith("1")?"0":"1"}`}:n)}),i})},[]);(0,F.o)(()=>Y.listen(Y.EVENT.refreshPage,()=>{ll(ey)}),[ll,ey]);let li=(0,C.u)(),lt=(0,n.useCallback)(e=>{var l,i,t,n,r;null==m||m(e),null==o||o();let a=(null===(l=eI.find(l=>l.key===e))||void 0===l?void 0:l.is_active_tab)?e:null!==(i=eY.z0[Number(e)])&&void 0!==i?i:"all";li("all"===a?"/jingxuan":`/jingxuan/${a}`),null==eN||eN(e),eD.onTabChange(e);let d=new Map;Array.from(e7.entries()).forEach(e=>{let[l,i]=e;d.set(l,i)});let s=d.get(ey);d.set(ey,{timeStamp:Date.now(),key:null!==(t=null==s?void 0:s.key)&&void 0!==t?t:`tabPanelCt-${ey}-1`});let u=d.get(e),c="300205"===e&&eO;(!u||c||u.timeStamp+eE<Date.now())&&(d.set(e,{timeStamp:Date.now(),key:`tabPanelCt-${e}-${(null==u?void 0:null===(r=u.key)||void 0===r?void 0:null===(n=r.endsWith)||void 0===n?void 0:n.call(r,"1"))?"0":"1"}`}),null==o||o()),le(d)},[o,eN,eO,e7,ey,eE]),ln=(0,n.useCallback)(e=>{e===ey&&(ij.sendLog("clickDiscoverTabReload",{tab_name:ey||"0"}),null==T||T(ey),null==k||k(),ll(ey))},[ey,ll]),lo=(0,V.d)(lt);(0,a.w)(()=>{(0,z.Nr)(location.pathname)||0===Number(eL.current)||lo.current("0")},[]);let lr=(0,n.useCallback)(()=>{null==I||I()},[I]);(0,n.useEffect)(()=>{var e,l;let i=e=>{var l,i,t,n,o,r,a,d,s,u;let{target:c}=e;if(!c||(null===(i=c.classList)||void 0===i?void 0:null===(l=i.contains)||void 0===l?void 0:l.call(i,"semi-tabs-tab-active")))return;let v=null==c?void 0:null===(n=c.dataset)||void 0===n?void 0:null===(t=n.tabkey)||void 0===t?void 0:t.slice(7);if(!v||Date.now()-(null!==(a=null===(o=e7.get(v))||void 0===o?void 0:o.timeStamp)&&void 0!==a?a:0)<=eE)return;if(v===eY._D[eY.JY.Course]){let e=null===(d=(0,K.oZ)("[0,0,0]"))||void 0===d?void 0:d.predictor;null==e||null===(s=e.enter)||void 0===s||s.call(e,{params:{tabId:"screen_course_page",offset:0,size:6,tagIdList:"[0,0,0]",idList:""},fetcherOptions:{expired:36e5,resetExpiredCacheBefore:!1,hoverDelay:!0}});return}let{predictor:m}=null!==(u=(0,K.Z1)(v))&&void 0!==u?u:{};if(v===eL.current||!m)return;let f=null===(r=eI.find(e=>e.key===v))||void 0===r?void 0:r.is_active_tab;m.enter({params:{useV2:1,liteType:1,tagId:v,activeId:f?v:"",isActiveTab:f,pullType:eH.current&&"0"===v?8:void 0},fetcherOptions:{expired:3e4,resetExpiredCacheBefore:!1,hoverDelay:!0}})},t=[];return null===(l=document.querySelectorAll(".discover-tab-bar .semi-tabs-tab-top.semi-tabs-tab-single"))||void 0===l||null===(e=l.forEach)||void 0===e||e.call(l,e=>{e.addEventListener("mouseenter",i),t.push(()=>{e.removeEventListener("mouseenter",i)})}),()=>{t.forEach(e=>null==e?void 0:e()),t=[]}},[eI,e7,ek,eE]);let la=(0,C.a)(),ld=(0,u.e2)(la.pathname)&&!(0,z.Nr)(la.pathname);(0,n.useEffect)(()=>{eZ(la.pathname)},[la.pathname]);let ls=(0,V.d)(e=>{Y.emit(Y.EVENT.triggerModalPlayerClose),Y.emit(Y.EVENT.closeImConversation),er(e),W.Le.setConfig(W.gI.ModalStartOpenTime,Date.now()),eX(null==e?void 0:e.awemeId)});(0,iW.x)(!eo,ls,!0),(0,n.useEffect)(()=>{var e;let l=document.querySelector(".discover-tab-container.semi-tabs.semi-tabs-top"),i=document.querySelector(".discover-tab-bar.semi-tabs-bar.semi-tabs-bar-line.semi-tabs-bar-top");eC.current=i,eb(l);let t=setTimeout(()=>{var e,l;null==ew||null===(l=ew.current)||void 0===l||null===(e=l.updateButtonStatus)||void 0===e||e.call(l)},200),n=e=>{var l,i;null==e||e.stopPropagation(),null==ew||null===(i=ew.current)||void 0===i||null===(l=i.updateButtonStatus)||void 0===l||l.call(i)};return null==i||null===(e=i.addEventListener)||void 0===e||e.call(i,"scroll",n),()=>{var e;null==i||null===(e=i.removeEventListener)||void 0===e||e.call(i,"scroll",n),clearTimeout(t)}},[eI]),(0,n.useEffect)(()=>{try{var e,l,i;if((0,J.I)())return;let t=(null==y?void 0:y.redisVersion)?"normal":"";(null==y?void 0:y.redisMode)==="replace"&&(t="replace"),ij.sendLog("firstScreenCount",{tab_name:(0,X.zD)(),pathname:location.pathname,scene:t,count:null!==(l=null==y?void 0:null===(e=y.awemeList)||void 0===e?void 0:e.length)&&void 0!==l?l:-1,log_id:null!==(i=null==y?void 0:y.logId)&&void 0!==i?i:""})}catch(e){}},[]);let lu=(0,n.useMemo)(()=>{if(ey===eY._D[eY.JY.Course])return i5},[ey]),lc=(0,et.U)(),lv=(0,n.useMemo)(()=>{var e;return(0,f._)({enter_from:"discover",enter_from_merge:"discover",cover_group_id:eM,from_group_id:eM,api_path:$.API_PATH_MODULE_FEED,live_log_params:(0,_._)((0,f._)({},ev||{}),{enter_from_merge:"web_homepage_discover",enter_method:"web_live_cell",cover_group_id:eM,from_group_id:eM,api_path:$.API_PATH_MODULE_FEED}),if_first_big_card:!1,sub_tab_name:null!==(e=eY.z0[ey])&&void 0!==e?e:ey,filter_name:ey===eY._D[eY.JY.Course]&&(null==e5?void 0:e5.tagTitle)||"",is_first_large_card_outflow:(null==eo?void 0:eo.isBigCard)?"1":"0"},j?{enter_method:"default_landing"}:{})},[eM,null==e5?void 0:e5.tagTitle,j,ev,null==eo?void 0:eo.isBigCard,ey]);return(0,n.useEffect)(()=>{eD.updateTabInfo(null!=ey?ey:"")},[ey]),(0,n.useEffect)(()=>{var e;eD.updateLogInfo({sub_tab_name:null!==(e=eY.z0[ey])&&void 0!==e?e:ey,filter_name:ey===eY._D[eY.JY.Course]&&(null==e5?void 0:e5.tagTitle)||""})},[ey,null==e5?void 0:e5.tagTitle]),(0,t.jsx)(O.k,{componentName:"FeedList",onError:lr,children:(0,t.jsxs)(A,{children:[(0,t.jsx)(x.Tabs,{keepDOM:!0,type:"line",lazyRender:!0,activeKey:ey,onChange:lt,onTabClick:(e,l)=>{var i,t,n;if("keydown"===l.type&&"Space"===l.code)return;ln(e);let o=null==eI?void 0:null===(i=eI.findIndex)||void 0===i?void 0:i.call(eI,l=>l.key===e);null==ew||null===(n=ew.current)||void 0===n||null===(t=n.onItemClick)||void 0===t||t.call(n,l,o)},className:p()("discover-tab-container",eu.tabs,{jxThemeColorOptimize:!!(null==ek?void 0:ek.themeColorOptimize),[eu.jxThemeColor]:!!(null==ek?void 0:ek.themeColorOptimize)}),tabBarClassName:p()("discover-tab-bar",eu.discoverTabBar,eu.hasTabExpand,{[eu.hasSubList]:e3.length>0}),tabPaneMotion:!1,children:null==eI?void 0:eI.map(e=>{var l;return(0,t.jsx)(x.TabPane,{tab:e.label,itemKey:e.key,children:(0,t.jsx)(G.O,{active:e.key===ey&&ld,className:eu.tabPanelCt,children:eR&&!eA&&"300205"===ey?(0,t.jsx)(ea,{islandMode:"load",disableTDK:!0,className:eu.topicPage}):(0,t.jsxs)(t.Fragment,{children:[e3.length>0&&(0,t.jsx)("div",{className:p()(eu.subTabStickyContainer),children:e3.map(l=>(0,t.jsx)("div",{className:p()(eu.subTag,{[eu.active]:l.tagId===(null==e5?void 0:e5.tagId)}),onClick:()=>{e4(l,e.key)},onMouseEnter:()=>{if(l.tagId!==(null==e5?void 0:e5.tagId))e6(l,e.key)},children:l.tagTitle},l.tagId))}),eB&&(0,t.jsx)("div",{className:p()(eu.loadingContainer,{[eu.hidden]:!eF}),children:(0,t.jsx)(Z.gb,{})}),(0,t.jsx)(iH,{tab:e,isTabActive:lc&&ey===e.key,appendPlayerConfig:e.key===eY._D[eY.JY.Course]?i5:void 0,className:p()({[eu.waterfallPageWithSubTab]:e3.length>0}),subTagInfoRef:e2,filterName:e.key===eY._D[eY.JY.Course]?null==e5?void 0:e5.tagTitle:void 0,abTestData:ek,request:i,resetRefreshIndex:o,selectedTab:e.key,modalAwemeInfo:eo,setModalAwemeInfo:er,setDefaultModalAwemeInfo:R,setLogParams:em,perfLogFunctions:eD,country:c,preloadModuleFeed:eK,onVideoCardClick:e0,onVideoCardMouseLeave:eG,onClickPipIcon:e1,setShowReplaceLoading:eV,showReplaceLoading:eF},e9(e.key))]})},null===(l=e7.get(e.key))||void 0===l?void 0:l.key)},`panelKey_${e.key}`)})}),(0,t.jsx)(M.SV,{Slardar:ed.oe,children:(0,t.jsx)(n.Suspense,{fallback:null,children:ex?(0,w.createPortal)((0,t.jsx)(i2,{ref:ew,className:eu.switchBtn,scrollRef:eC}),ex):null})}),eo&&(0,t.jsx)(U.default,{appendPlayerConfig:lu,preloadReady:eQ.preloadReady||P,preloadAwemeList:eQ.preloadAwemeList,preloadTargetGid:eQ.preloadTargetGid,isUseChannelFeed:!1,modalAwemeInfo:eo,userContext:ej,abtestData:ek,modalEnterFrom:H.a.WaterFall,close:()=>{if(Y.emit(Y.EVENT.UpdateJxOuterProgress,{awemeId:null==eo?void 0:eo.awemeId}),null==eo?void 0:eo.isTopCard){let l=ee.YY.pureGetReusePlayer(el.v.Discover,eo.awemeId);if(l){var e;let i=null!==(e=W.Le.getConfig(W.gI.JingxuanCardProgress))&&void 0!==e?e:{};i[eo.awemeId]=l.currentTime,W.Le.setConfig(W.gI.JingxuanCardProgress,i)}}P&&R(null),er(null),ee.YY.clearAllReusePlayer(!!(null==ek?void 0:ek.jxTopCardCache),(null==eo?void 0:eo.isTopCard)?[null==eo?void 0:eo.awemeId]:[]),((null==eq?void 0:eq.action)===q.MainHoverPreloadAction.click||(null==eq?void 0:eq.action)===q.MainHoverPreloadAction.hover)&&eJ({ready:!1,targetGid:"",awemeList:[]})},anyHooks:e=>{var l;let i="0"===ey?"":ey,t=i===eY._D[eY.JY.Course];t&&(i=eY._D[eY.JY.Knowledge]);let n=null===(l=eI.find(e=>e.key===ey))||void 0===l?void 0:l.is_active_tab;return(0,es.b)((0,_._)((0,f._)({},e),{tagId:i,isActiveTab:n,isCourseTab:t}))},scene:"waterFall",reuseConfig:{scene:el.v.Discover,reuseId:null==eo?void 0:eo.awemeId,autoCreate:!1,keepPlayer:null==eo?void 0:eo.isTopCard},logParams:lv,hideModalWhenPip:!0,hideModalByPipInitial:ef,setHideModalByPipInitial:eh,autoOpenPip:!0})]})})});i("897471");let i4=e=>{var l;let i=(0,eg._)(),t=!!(e&&(null==e?void 0:null===(l=e.awemeList)||void 0===l?void 0:l.length)),o=(0,n.useRef)(t?1:0),r=(0,n.useCallback)(async(e,l)=>{o.current+=1;let t=K.MX;if(null==l?void 0:l.tagId){var n,r;t=null!==(r=null===(n=(0,K.Z1)(l.tagId))||void 0===n?void 0:n.fetcher)&&void 0!==r?r:K.MX}return await t.request({cached:e,consume:!0,params:(0,f._)({useV2:1,refreshIndex:o.current,discoverTaskOptimize:null==i?void 0:i.discoverTaskOptimize},(null==i?void 0:i.jxOutFeedAd)===1?{is_out_feed:1,enable_ad:1}:{},l),fetcherOptions:{resetExpiredCacheBefore:!1,hoverDelay:!0}})},[i]);return{request:r,resetRefreshIndex:(0,n.useCallback)(()=>{o.current=0},[])}};var i9={containerWrapper:"vQyJKU8K",videoListContainer:"iSmIPzbS",channelTabs:"ifH0VVeP",cardWrapper:"mcsFO2Ig"};let i8=4/3;var i7=e=>{let{videoList:l}=e;return(0,t.jsx)(x.List,{grid:{gutter:20,span:12,lg:{span:8},xl:{span:6},xxl:{span:4}},dataSource:l,renderItem:(e,l)=>{var i,n,o;return(0,t.jsx)(x.List.Item,{children:(0,t.jsx)(ig.Z,{url:e.awemeType===eV.e.Note?(0,is.Wr)(e.awemeId):(0,is.JF)(e.awemeId),awemeInfo:e,description:e.desc,imgUrl:e.video.cover,userName:e.authorInfo.nickname,userHrefTarget:"_self",likesCount:(0,lG.qe)(e.stats.diggCount),videoTime:(0,lG.$y)(e.video.duration),width:e.video.width,height:e.video.height,userHref:(0,is.HC)(null==e?void 0:null===(i=e.authorInfo)||void 0===i?void 0:i.secUid),showIntegrationTag:!1,willJump:!0,showImageInSSR:!0,isSpider:!0,isHorizontal:(null==e?void 0:null===(n=e.video)||void 0===n?void 0:n.width)>(null==e?void 0:null===(o=e.video)||void 0===o?void 0:o.height),fakeHorizontalInfo:null==e?void 0:e.fakeHorizontalInfo,isShowCreateTime:!0,videoImageStyle:{paddingTop:`${1/i8*100}%`},previewUrlList:[],style:{width:"100%"},useStyleInUserLink:!0},l)})}})},te={container:"p1fQHUX4",progressWrap:"nVGPITZ6",blur:"C0k_tlBp",leftWrap:"wCroerDh",rightWrap:"f0wQKtiw",textCtl:"a3jrHKp1",ctlBtn:"FPmmIfng",playBtn:"YL4SQhp7",textWrap:"x9LhyEVi",nickName:"BS2SANtW",title:"IV6rqFXI",infoWrap:"vghpRLck",interaction:"z1EJqkeO"};let tl=e=>{let{text:l,count:i}=e;return(0,t.jsxs)("div",{className:te.interaction,children:[(0,t.jsx)("span",{className:te.interactType,children:l}),(0,t.jsx)("span",{className:te.interactNum,children:i})]})},ti=e=>{let{children:l}=e;return(0,t.jsx)("div",{className:te.ctlBtn,children:l})};var tt=e=>{var l,i,n;let{videoInfo:o}=e;return(0,t.jsxs)("div",{className:te.container,children:[(0,t.jsx)("video",{poster:null==o?void 0:null===(l=o.video)||void 0===l?void 0:l.cover}),(0,t.jsxs)("div",{className:te.textWrap,children:[(0,t.jsxs)("div",{className:te.nickName,children:[(0,t.jsx)("a",{target:"_blank",href:(0,is.HC)(null==o?void 0:null===(i=o.authorInfo)||void 0===i?void 0:i.secUid),rel:"noreferrer nofollow",children:null==o?void 0:null===(n=o.authorInfo)||void 0===n?void 0:n.nickname}),(0,t.jsx)("span",{children:(0,lG.YW)((null==o?void 0:o.createTime)*1e3)})]}),(0,t.jsx)("a",{className:te.title,target:"_blank",href:(0,is.$N)(null==o?void 0:o.awemeId),rel:"noreferrer nofollow",children:null==o?void 0:o.desc})]}),(0,t.jsxs)("div",{className:te.progressWrap,children:[(0,t.jsxs)("div",{className:te.leftWrap,children:[(0,t.jsx)(ti,{children:(0,t.jsx)("span",{className:te.playBtn})}),(0,t.jsx)(ti,{children:(0,t.jsxs)("span",{className:te.textCtl,children:["00:00 / ",(0,lG.$y)(null==o?void 0:o.video.duration)]})})]}),(0,t.jsxs)("div",{className:te.rightWrap,children:[(0,t.jsx)(ti,{children:(0,t.jsx)("span",{className:te.textCtl,children:"连播"})}),(0,t.jsx)(ti,{children:(0,t.jsx)("span",{className:te.textCtl,children:"清屏"})}),(0,t.jsx)(ti,{children:(0,t.jsx)("span",{className:te.textCtl,children:"智能"})}),(0,t.jsx)(ti,{children:(0,t.jsx)("span",{className:te.textCtl,children:"倍速"})})]})]}),(0,t.jsx)("div",{className:te.infoWrap,children:(0,t.jsx)(tl,{text:"点赞",count:(0,lG.qe)(null==o?void 0:o.stats.diggCount)})})]})};let tn=e=>{let{homeSeoDataResult:l,tabs:i,defaultTagId:n,modalVideoDetail:o}=e,{selectedTab:r}=i0(i,n);return l?(0,t.jsxs)("div",{className:i9.containerWrapper,children:[o&&(0,t.jsx)("div",{className:i9.cardWrapper,children:(0,t.jsx)(tt,{videoInfo:o})}),(0,t.jsx)(iX,{tabList:i,className:i9.channelTabs,activeKey:r,isSpider:!0}),(0,t.jsx)("div",{className:i9.videoListContainer,children:(0,t.jsx)(i7,{videoList:null==l?void 0:l.videoList})})]}):null};i("968336");var to=i("732979"),tr=i.n(to),ta=i("412383"),td=i("297719"),ts=i("444729"),tu=i("517836");let tc=e=>{switch(e){case eY.JY.Game:return{title:"抖音游戏_游戏解说_游戏视频推荐_游戏攻略 - 抖音精选电脑版",keyword:"抖音游戏,游戏解说,游戏推荐,游戏攻略",description:"涵盖游戏视频、游戏攻略、游戏解说、游戏推荐等海量优质视频内容,系列合集内容连续看,有用又有趣,无论是休闲解压、消遣下饭,还是发现爱好、获取知识,你想要的好内容,都在抖音精选。"};case eY.JY.Acg:return{title:"抖音二次元_二次元视频大全 - 抖音精选电脑版",keyword:"抖音二次元,二次元视频大全",description:"涵盖二次元视频等海量优质视频内容,系列合集内容连续看,有用又有趣,无论是休闲解压、消遣下饭,还是发现爱好、获取知识,你想要的好内容,都在抖音精选。"};case eY.JY.Music:return{title:"抖音音乐_抖音神曲_抖音热门歌曲 - 抖音精选电脑版",keyword:"抖音音乐,抖音神曲,抖音热门歌曲",description:"涵盖抖音音乐、抖音神曲、抖音热门歌曲等海量优质视频内容,系列合集内容连续看,有用又有趣,无论是休闲解压、消遣下饭,还是发现爱好、获取知识,你想要的好内容,都在抖音精选。"};case eY.JY.Food:return{title:"抖音美食_抖音美食推荐 - 抖音精选电脑版",keyword:"抖音美食,抖音美食推荐",description:"涵盖抖音美食等海量优质视频内容,系列合集内容连续看,有用又有趣,无论是休闲解压、消遣下饭,还是发现爱好、获取知识,你想要的好内容,都在抖音精选。"};case eY.JY.Knowledge:return{title:"抖音知识 - 抖音精选电脑版",keyword:"抖音知识",description:"涵盖抖音知识等海量优质视频内容,系列合集内容连续看,有用又有趣,无论是休闲解压、消遣下饭,还是发现爱好、获取知识,你想要的好内容,都在抖音精选。"};case eY.JY.Sports:return{title:"抖音体育 - 抖音精选电脑版",keyword:"抖音体育",description:"涵盖抖音体育等海量优质视频内容,系列合集内容连续看,有用又有趣,无论是休闲解压、消遣下饭,还是发现爱好、获取知识,你想要的好内容,都在抖音精选。"};default:return{title:"抖音精选电脑版 - 抖音旗下优质视频平台",keyword:"抖音精选,抖音精选电脑版,抖音精选网页版",description:"海量优质视频内容,涵盖游戏、二次元、美食、音乐、知识、体育运动、旅行、生活等各类题材,系列合集内容连续看,有用又有趣,无论是休闲解压、消遣下饭,还是发现爱好、获取知识,你想要的好内容,都在抖音精选。"}}},tv=e=>{let l=e?tr()(e):tr()(),i=l.hour(7).minute(52).second(22),t=i,n=i;i.isAfter(l)&&(t=i.subtract(1,"day"),n=i.subtract(1,"day"));let o=t.format("YYYY-MM-DDTHH:mm:ssZ[Z]")||"";return[o,n.format("YYYY-MM-DDTHH:mm:ssZ[Z]")||""]},tm=e=>{let{modalVideoDetail:l,subPage:i="",videoList:n=[]}=e,o=(0,ta.Yr)(),r="",a="",d="",s="",u="";if(l){let{desc:e,authorInfo:i,createTime:t=Date.now()/1e3,textExtra:n,seoInfo:o,awemeId:a}=l;r=`https://www.douyin.com/jingxuan?modal_id=${a}`;let{nickname:c,totalFavorited:v=0}=i||{},m=tr()(1e3*t).format("YYYYMMDD")||"",f=(0,lG.qe)(v),{title:_,keywords:h,description:g}=(0,tu.xB)({desc:e,nickname:c,createTimeStr:m,likeCount:f,textExtra:n,ocrContent:(null==o?void 0:o.ocrContent)||""});d=_,s=h,u=g}else{var c;let{title:e,keyword:l,description:t}=tc(i);d=e,s=l,u=t;let o=i?`/jingxuan/${i}`:"/jingxuan";r=`https://www.douyin.com${o}`;let[v,m]=tv(W.Le.getConfig(W.gI.ServerTime)),f=JSON.stringify((null==n?void 0:null===(c=n.slice(0,3))||void 0===c?void 0:c.map(e=>{var l;let i=null==e?void 0:null===(l=e.video)||void 0===l?void 0:l.cover;return(null==i?void 0:i.startsWith("//"))?`https:${i}`:i}))||[]);a=`{
|
|
"@context": "https://ziyuan.baidu.com/contexts/cambrian.jsonld",
|
|
"@id": "${r}",
|
|
"title": "${d}",
|
|
"images": ${f},
|
|
"description": "${u}",
|
|
"pubDate": "${v}",
|
|
"upDate": "${m}"
|
|
}`}return(0,F.o)(()=>{(0,td.J)({title:d,description:u,keywords:s})},[]),(0,t.jsxs)(ts.Z,{videoDetail:l,children:[(0,t.jsx)("title",{children:d}),(0,t.jsx)("meta",{name:"description",content:u}),(0,t.jsx)("meta",{name:"keywords",content:s}),(0,t.jsx)("link",{rel:"canonical",href:r}),a&&(0,t.jsx)("script",{type:"application/ld+json",nonce:o,children:a})]})};var tf=i("120701");let t_={next_real_cnt:1,scene:1,report_rate:.8,range:0,enter_from:"discover",predict:{video:{enable:1},waterfall:{enable:1},comment:{enable:1}},real:{video:{enable:1},waterfall:{enable:1},comment:{enable:1}}},th=e=>{(0,n.useEffect)(()=>{var l;return null===(l=(0,iv.lZ)())||void 0===l||l.registerScene(tf.P.HOME_PAGE_PRELOAD,(0,_._)((0,f._)({},t_),{abTestData:e,enableInference:!0})),()=>{var e;null===(e=(0,iv.lZ)())||void 0===e||e.unregisterScene(tf.P.HOME_PAGE_PRELOAD)}},[])};var tg=i("36897"),tp=i("614269"),tw=i("532375");let tC=()=>{(0,F.o)(()=>{let e=W.Le.getConfig(W.gI.JingXuanVisitId);return!e&&(W.Le.setConfig(W.gI.JingXuanVisitId,String(Date.now())),e=W.Le.getConfig(W.gI.JingXuanVisitId)),()=>{W.Le.setConfig(W.gI.JingXuanVisitId,""),ij.sendLog("discoverClose",{visit_id:e||"",close_method:"change_tab",to_page:""})}},[]),(0,F.o)(()=>((0,tw.vP)({key:"jingxuan_visit",event:(e,l,i)=>{if("page_unload"===i){let e=W.Le.getConfig(W.gI.JingXuanVisitId);ij.sendLog("discoverClose",{visit_id:e||"",close_method:"exit_douyin"},!1)}}}),()=>{(0,tw.xC)("jingxuan_visit")}),[])},tx=e=>{let{homeFetchData:l}=e;(0,n.useEffect)(()=>{var e;if(!!(null==l?void 0:l.redisVersion))W.Le.setConfig(W.gI.JingxuanCacheAwmeInfoIds,(null===(e=l.awemeList)||void 0===e?void 0:e.map(e=>e.awemeId))||[])},[l])};var tb=i("994185"),tI=(0,c.C)(function(e){let{defaultSubTags:l,homeSeoDataResult:i,homeFetchData:u,isSpider:c=(0,s._Q)(),discoverTab:f,tagId:_,landingPage:h}=e,g=(0,eg._)()||{},p=(0,o.U)(),w=null==p?void 0:p.tag,C=(0,n.useRef)({}),x=(0,tp.h)({ssrDiscoverTab:f,ssrHomeFetchData:u,landingPage:h,ssrTagId:_}),{finalTabList:b,homeFetchData:I,setHomeFetchData:y,setIsDefaultLanding:L}=g.enableJingxuanZustand?x.discoverCommonStore.getState():x,[j,T]=(0,n.useState)(!1),k=(0,n.useMemo)(()=>{var e;return j&&b.find(e=>e.is_active_tab&&e.key===w)?w:(w&&!eY._D[w]&&history.replaceState({},"","/jingxuan"),w&&null!==(e=eY._D[w])&&void 0!==e?e:"0")},[w,j,b]),{country:E}=(0,i1.Iq)(e=>{let{country:l}=e;return{country:l}}),{request:S,resetRefreshIndex:N}=i4(I),{modalVideoDetail:P}=(0,m.K)(e=>{let{modalVideoDetail:l}=e;return{modalVideoDetail:l}}),R=(0,n.useCallback)(()=>{var e,l,i,t;window.jxHydrateReadyCb&&(null===(i=(t=window).jxHydrateReadyCb)||void 0===i||i.call(t)),null===(l=window)||void 0===l||null===(e=l.disabledBigCardQuickPlayer)||void 0===e||e.call(l,"pause")},[]);return(0,r.C)(d.w3.components.discover_page),th(g),(0,v.$I)(),!function(){let{awemeFeed:e}=(0,tg.j)(),l=(0,n.useRef)(!1),i=(0,n.useRef)(!0);(0,F.o)(()=>{var e;if(i.current){i.current=!1;return}let l=null!==(e=W.Le.getConfig(W.gI.CachePage))&&void 0!==e?e:[];!(null==l?void 0:l.includes("/jingxuan"))&&W.Le.setConfig(W.gI.CachePage,[...l,"/jingxuan"])},[]),(0,n.useEffect)(()=>()=>{var e,l;let i=null!==(l=W.Le.getConfig(W.gI.CachePage))&&void 0!==l?l:[];W.Le.setConfig(W.gI.CachePage,null==i?void 0:null===(e=i.filter)||void 0===e?void 0:e.call(i,e=>"/jingxuan"===e))},[]),(0,n.useLayoutEffect)(()=>Y.listen(Y.EVENT.exitChildRoute,()=>{"/jingxuan"!==location.pathname&&l.current&&(l.current=!1,e.dispatch({modalAwemeInfo:null,nextAwemeInfo:null,prevAwemeInfo:null}))}),[])}(),tx({homeFetchData:I}),(0,tb.t)({landingMode:null==e?void 0:e.landingMode,landingReason:null==e?void 0:e.landingReason,isSelectPreferUser:null==e?void 0:e.isSelectPreferUser}),(0,n.useEffect)(()=>{try{var e;if(null===(e=location.href)||void 0===e?void 0:e.includes("pip")){let e=new URL(window.location.href);e.searchParams.delete("pip"),e.searchParams.delete("modal_id"),window.history.replaceState({},"",e)}}catch(e){}},[]),(0,a.w)(()=>{var e,l;null==L||L(!1),null==C||null===(l=C.current)||void 0===l||null===(e=l.setShowReplaceLoading)||void 0===e||e.call(l,!1),null==R||R()},[]),tC(),(0,t.jsxs)(tp.O.Provider,{value:x,children:[(0,t.jsx)(tm,{modalVideoDetail:P,subPage:w,videoList:c?null==i?void 0:i.videoList:null==I?void 0:I.awemeList}),c?(0,t.jsx)(tn,{modalVideoDetail:P,homeSeoDataResult:i,tabs:b,defaultTagId:k}):(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(i6,{ref:C,defaultSubTags:l,abTestData:g,request:S,resetRefreshIndex:N,tabs:b,defaultTagId:k,country:E,quickPlayerReuseEffectCb:R,onChannelTabChange:e=>{var l,i,t,n;T(!0),I&&e!==_&&(null==y||y(void 0)),null==C||null===(i=C.current)||void 0===i||null===(l=i.setShowReplaceLoading)||void 0===l||l.call(i,!1),null==L||L(!1),null===(n=window)||void 0===n||null===(t=n.disabledBigCardQuickPlayer)||void 0===t||t.call(n,"pause")},onChannelTabReload:e=>{var l,i;null==y||y(void 0),null==L||L(!1),null===(i=window)||void 0===i||null===(l=i.disabledBigCardQuickPlayer)||void 0===l||l.call(i,"destroy")}})})]})},e=>(0,u.e2)(e),"Pd_8dYLs")},614269:function(e,l,i){i.d(l,{O:function(){return p},h:function(){return C}});var t=i(629686),n=i(402748);i(490629),i(706056);var o=i(101199),r=i(280647),a=i(958396),d=i(752285),s=i(384884),u=i(810069),c=i(499059),v=i(365169),m=i(630582),f=i(87897),_=i(581999),h=i(330548),g=i(507909);let p=(0,o.createContext)({}),w=e=>(null==e?void 0:e.redisMode)==="replace"?"replace":(null==e?void 0:e.redisVersion)?"append":"",C=e=>{var l;let{ssrDiscoverTab:i,ssrHomeFetchData:p,landingPage:C,ssrTagId:x}=e||{},b=(0,o.useRef)(w(p)),I=(0,a.d)(),{userInfo:y}=(0,_.useUserInfoContext)(),{discoverFeedCardAdList:L=[],discoverActiveSubTabList:j=[]}=(0,v.Iq)(e=>{let{discoverFeedCardAdList:l,discoverActiveSubTabList:i}=e;return{discoverFeedCardAdList:l,discoverActiveSubTabList:i}}),{enableJingxuanZustand:T}=(0,f._)()||{},[k,E]=(0,o.useState)(i),[S,N]=(0,o.useState)("discover"===C),[P,R]=(0,o.useState)(j),A=(0,o.useRef)(),[M,D]=(0,o.useState)([]),[B,F]=(0,o.useState)(p),[V,H]=(0,o.useState)({}),O=(0,o.useCallback)(e=>{A.current=e},[]),U=(0,o.useMemo)(()=>{var e;return(null==k?void 0:null===(e=k.filter)||void 0===e?void 0:e.call(k,e=>(null==e?!!void 0:!!e.is_active_tab)||m.mh.includes(e.key)))||[]},[k]),Z=(0,o.useMemo)(()=>{var e,l;return(null==y?void 0:y.isLogin)?null==y?void 0:null===(e=y.info)||void 0===e?void 0:e.uid:null===(l=(0,u.Es)())||void 0===l?void 0:l.user_unique_id},[y]),W=(0,o.useMemo)(()=>(0,d.lE)({feedCardAdList:L,ctx:I})||{},[L,I]),[Y,z]=(0,o.useState)(W),J=(0,o.useMemo)(()=>(0,g.createDiscoverCommonStore)({ssrTagId:x,finalTabList:U,finalFeedCardAdListMap:W,activeSubTab:P,feedCardAdListMap:W,isDefaultLanding:S,homeFetchData:B,feedCardAdList:L,ssrCtx:I,latestClickAwemeIdRef:A,pageMode:b.current}),[]),$=(0,h.oR)(J,e=>e.closedCardAdIdListMap),q=V;q=T?$:q;let Q=(0,h.oR)(J,e=>e.setFinalTabList);(0,o.useEffect)(()=>{T&&Q(U)},[U,T]);let K=(0,h.oR)(J,e=>e.setSsrTagId);(0,o.useEffect)(()=>{T&&K(x)},[x,T]);let G=Y,X=(0,h.oR)(J,e=>e.feedCardAdListMap);G=T?X:G;let ee=(0,o.useMemo)(()=>{let e={};for(let i of Object.keys(G||{})){var l;e[i]=(null===(l=G[i])||void 0===l?void 0:l.filter(e=>{var l,t;return!(null==q?void 0:null===(t=q[i])||void 0===t?void 0:null===(l=t.includes)||void 0===l?void 0:l.call(t,null==e?void 0:e.id))}))||[]}return e},[G,q]),el=(0,h.oR)(J,e=>e.setFinalFeedCardAdListMap);(0,o.useEffect)(()=>{T&&el(ee)},[ee,T]);let ei=(0,o.useCallback)(async e=>{let l=await (0,d.to)(I),i=(0,d.lE)({feedCardAdList:l});e?z(l=>(0,n._)((0,t._)({},l),{[e]:(null==i?void 0:i[e])||[]})):z(i)},[]),et=(0,h.oR)(J,e=>e.updateFeedCardAdResourceList);ei=T?et:ei,(0,o.useEffect)(()=>{!(null==i?void 0:i.length)&&(0,s.getChannelSetting)({},void 0).then(e=>{(null==e?void 0:e.status_code)===0&&E(null==e?void 0:e.config_info)})},[i]);let en=(0,o.useCallback)(async()=>{(0,d.hz)(I).then(e=>{R(null!=e?e:[])})},[]),eo=(0,h.oR)(J,e=>e.setActiveSubTab);(0,o.useEffect)(()=>{!j.length&&(0,d.hz)(I).then(e=>{if(T){eo(null!=e?e:[]);return}R(null!=e?e:[])})},[j,T]),(0,r.Z)(()=>{(0,d.EN)({uidKey:Z}),ei()},[Z]);let er=null==U?void 0:null===(l=U.map(e=>null==e?void 0:e.key))||void 0===l?void 0:l.join();c.Le.setConfig(c.gI.DiscoverTabList,er);let ea=(0,o.useRef)((0,n._)((0,t._)({},g.defaultContextVal),{discoverCommonStore:J}));return T?ea.current:{finalTabList:U,finalFeedCardAdListMap:ee,activeSubTab:P,feedCardAdListMap:G,isDefaultLanding:S,setIsDefaultLanding:N,homeFetchData:B,setHomeFetchData:F,feedCardAdList:L,setClosedCardAdIdListMap:H,updateFeedCardAdResourceList:ei,updateSubTabLiveCardList:en,visibleLiveCards:M,setVisibleLiveCards:D,latestClickAwemeIdRef:A,updateLatestClickAwemeIdRef:O,ssrTagId:x,pageMode:b.current,ssrCtx:I,discoverCommonStore:J}}},507909:function(e,l,i){i.r(l),i.d(l,{createDiscoverCommonStore:function(){return v},defaultContextVal:function(){return f},useDiscoverCommonContext:function(){return m}});var t=i(629686),n=i(402748);i(679308);var o=i(101199),r=i(752285),a=i(414986),d=i(330258),s=i(330548),u=i(946114),c=i(614269);let v=e=>(0,a.MT)((l,i)=>(0,t._)({finalTabList:[],setFinalTabList:e=>{l({finalTabList:e})},finalFeedCardAdListMap:{},setFinalFeedCardAdListMap:e=>{l({finalFeedCardAdListMap:e})},activeSubTab:[],setActiveSubTab:e=>{l({activeSubTab:e})},feedCardAdListMap:{},isDefaultLanding:!1,setIsDefaultLanding:e=>{l({isDefaultLanding:e})},homeFetchData:void 0,setHomeFetchData:e=>{l({homeFetchData:e})},feedCardAdList:[],visibleLiveCards:[],setVisibleLiveCards:e=>{l(l=>({visibleLiveCards:e(l.visibleLiveCards||[])}))},closedCardAdIdListMap:{},setClosedCardAdIdListMap:e=>{l(l=>({closedCardAdIdListMap:e(l.closedCardAdIdListMap||{})}))},latestClickAwemeIdRef:void 0,ssrTagId:"",setSsrTagId:e=>{l({ssrTagId:e})},pageMode:"",updateLatestClickAwemeIdRef:e=>{let{latestClickAwemeIdRef:l}=i();l&&(l.current=e||"")},ssrCtx:void 0,updateFeedCardAdResourceList:async e=>{let o=await (0,r.to)(i().ssrCtx),a=(0,r.lE)({feedCardAdList:o});e?l(l=>({feedCardAdListMap:(0,n._)((0,t._)({},l.feedCardAdListMap),{[e]:(null==a?void 0:a[e])||[]})})):l({feedCardAdListMap:a})},updateSubTabLiveCardList:async()=>{(0,r.hz)(i().ssrCtx).then(e=>{l({activeSubTab:null!=e?e:[]})})}},e)),m=function(e,l){let i=(0,d.U)(),t=(0,o.useContext)(c.O),n=(0,s.oR)(t.discoverCommonStore,e,l||u.Z);return i.enableJingxuanZustand?n:t},f={finalTabList:[],finalFeedCardAdListMap:{},activeSubTab:[],feedCardAdListMap:{},isDefaultLanding:!1,setIsDefaultLanding:()=>{},homeFetchData:void 0,setHomeFetchData:()=>{},feedCardAdList:[],setClosedCardAdIdListMap:()=>{},latestClickAwemeIdRef:void 0,updateLatestClickAwemeIdRef:()=>{},visibleLiveCards:[],setVisibleLiveCards:()=>{},updateFeedCardAdResourceList:()=>Promise.resolve(),updateSubTabLiveCardList:()=>Promise.resolve(),ssrTagId:"",pageMode:""}},602052:function(e,l,i){var t=i(320165);i(101199);var n=i(693731),o=i(469935),r=i.n(o);l.Z=e=>{let{width:l,title:i,cover:o,meta:a,detail:d,className:s,onMouseEnter:u,onMouseLeave:c,onClick:v}=e;return(0,t.jsxs)("div",{style:{width:l},onMouseEnter:u,onMouseLeave:c,onClick:v,className:r()(n.Z.card,s),children:[(0,t.jsx)("div",{className:r()(n.Z.cover,{[n.Z.noMargin]:d}),children:o}),d||(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:n.Z.title,children:i}),(0,t.jsx)("div",{children:a})]})]})}},31024:function(e,l,i){i.d(l,{Z:function(){return _}});var t=i("629686"),n=i("402748");i("490629");var o=i("320165"),r=i("101199"),a=i("498332"),d={cover:"mnPpPGWz",content:"QD5tiQ2l",leftTag:"qj5BZEf6",assistTagLabel:"TWpeD5Mn",rightTag:"bbjckVh9",backgroundLoading:"mxSYZQ4O",backgroundMask:"ZehvnrKC",backgroundMaskNotLoad:"zlbp2B3v",mask:"Rx_F9bhb",background:"reyTcGQ3",hoverImg:"PeVh1KTe",hideImage:"cOwt0r4G",footer:"oUJTyPXf",title:"LZCdUS9f",markers:"V7dEpkTQ",hideMarkers:"aS5dE6jb",hideTags:"oimFNWAi",hideMarkersAnimation:"zP8JvQMd",showMarkersAnimation:"xI4lDMhZ"},s=i("980572"),u=i("469935"),c=i.n(u),v=e=>{let{onLog:l,isReady:i}=e,t=r.useRef(!1);return r.useEffect(()=>{i&&!t.current&&(t.current=!0,l&&l())},[l,i]),null},m=i("536793");let f=e=>{var l;let{isFirstPageItem:i=!1,imageSrc:t,scale:n=16/9,title:u,fit:f="cover",mask:_,leftMarker:h,rightMarker:g,className:p,hideMarkers:w=!1,hideTags:C=!1,onMouseLeave:x,onMouseEnter:b,onClick:I,maskZIndex:y=2,alt:L,animation:j,hideShadow:T,forwardRef:k,onLog:E,lazyLoadOffset:S=600,lazyLoad:N=!1,isLogReady:P,rightTag:R,leftTag:A,assist_label:M,hoverImg:D}=e,B="object"==typeof M&&null!==M&&22===Number(null==M?void 0:M.label_type)&&(null==M?void 0:M.splice_label)?M.splice_label:null,{followTagExpose:F}=null!==(l=(0,m.T)())&&void 0!==l?l:{},[V,H]=r.useState(i),O=r.useRef(null);r.useEffect(()=>{O.current&&O.current.complete&&H(!0)},[]);let U=r.useCallback(()=>{!V&&H(!0)},[V]),Z=r.useMemo(()=>(0,o.jsx)("img",{alt:L,ref:O,src:t,onLoad:U,className:c()(d.background,{[d.hideImage]:!V,[d.hoverImg]:D}),style:{objectFit:f}}),[L,O,t,U,V,f,D]);return(0,o.jsxs)("div",{ref:k,title:"",className:c()(d.cover,p),style:{paddingTop:`${1/n*100}%`},onMouseEnter:b,onMouseLeave:x,onClick:I,children:[_&&(0,o.jsx)("div",{style:{zIndex:y},className:d.mask,children:_}),(0,o.jsx)("div",{className:d.backgroundLoading,children:(0,o.jsx)(a.Z,{})}),(0,o.jsx)(v,{onLog:E,isReady:P}),N?(0,o.jsx)(s.default,{height:"100%",offset:S,once:!0,children:Z}):Z,!T&&(0,o.jsx)("div",{className:c()(d.backgroundMask,{[d.backgroundMaskNotLoad]:!V})}),(0,o.jsxs)("div",{className:c()(d.content,{[d.hideTags]:C}),children:[(A||1===Number(F)&&B)&&(0,o.jsxs)("div",{className:d.leftTag,children:[A,1===Number(F)&&B&&(()=>{var e,l,i,t,n,r;let a=null!==(t=null===(l=B.background_image)||void 0===l?void 0:null===(e=l.url_list)||void 0===e?void 0:e[0])&&void 0!==t?t:null===(i=B.background_image)||void 0===i?void 0:i.uri;return(0,o.jsx)("div",{className:d.assistTagLabel,style:{color:null!==(n=B.text_color)&&void 0!==n?n:"#000000",backgroundColor:a?void 0:"#ffffff",backgroundImage:a?`url(${a})`:void 0},children:null!==(r=B.text)&&void 0!==r?r:""})})()]}),R&&(0,o.jsx)("div",{className:d.rightTag,children:R})]}),(0,o.jsxs)("div",{className:c()(d.footer,{[d.hideMarkersAnimation]:j&&w,[d.showMarkersAnimation]:j&&!w,[d.hideMarkers]:!j&&w}),children:[(0,o.jsx)("div",{className:d.title,children:u}),(0,o.jsxs)("div",{className:d.markers,children:[h,g]})]})]})};var _=r.forwardRef((e,l)=>(0,o.jsx)(f,(0,n._)((0,t._)({},e),{forwardRef:l})))},879375:function(e,l,i){i.d(l,{G9:function(){return k},UU:function(){return T}}),i(490629);var t=i(320165),n=i(101199),o=i(469935),r=i.n(o),a=i(809798),d=i(339808),s=i(734123),u=i.n(s),c=i(280647),v=i(72430),m=i(499059),f=i(995898),_=i(661444),h=i(414061),g=i(596678),p=i(47014),w=i(486463),C=i(9352),x=i(435712),b=i(332009),I=i(91627),y=i(117961),L=i(536065);let j=[m.gI.PlayerCardInfo,m.gI.isVideoPlayed,m.gI.IsInModalVideo],T=()=>{let e=(0,n.useRef)(!1),{pathname:l}=(0,d.a)(),i=(0,n.useRef)(l),t=(0,n.useRef)(!1);return(0,f.Nr)(l)?t.current=!0:(t.current?(t.current=!1,e.current=i.current===l):e.current=!1,i.current=l),e},k=e=>{let{children:l,parentRouteClassName:i,checkIsActive:o}=e,{pathname:s}=(0,d.a)(),k=!0;o&&(k=o(s));let E=k&&(0,f.Nr)(s),S=(0,f.Nr)(s)||!k,N=(0,n.useRef)(),P=T(),R=(0,n.useRef)(s),A=(0,n.useRef)(s),M=(0,n.useMemo)(()=>(0,_.oS)(null==R?void 0:R.current)?v.lT.Recommend:(0,_.i8)(null==R?void 0:R.current)?v.lT.Follow:(0,_.z1)(null==R?void 0:R.current)?v.lT.Friend:(0,_.e2)(null==R?void 0:R.current)?v.lT.Modal:(0,_.h$)(null==R?void 0:R.current)?v.lT.User:(0,_.Q5)(null==R?void 0:R.current)?v.lT.AiSearch:void 0,[]);return S&&(A.current=s),(0,n.useLayoutEffect)(()=>{S&&h.emit(h.EVENT.videoPause,{isInChildRoute:!0})},[S]),(0,n.useEffect)(()=>()=>{if(E){let e=h.getPageScope(R.current);h.emit(h.EVENT.exitChildRoute,null,e),"child_route"!==e&&h.emit(h.EVENT.exitChildRoute,null,"child_route")}else h.emit(h.EVENT.enterChildRoute)},[E]),(0,n.useEffect)(()=>{if(S){let e=!1,l=l=>{e=!0};return window.addEventListener("resize",l),()=>{window.removeEventListener("resize",l),e&&setTimeout(()=>{window.dispatchEvent(new Event("resize"))},20)}}},[S]),(0,n.useLayoutEffect)(()=>{if(S){let e=j.map(e=>m.Le.getConfig(e));return m.Le.setConfig(m.gI.SlideStartTime,{slideStartTime:0}),()=>{j.forEach((l,i)=>{m.Le.setConfig(l,e[i])}),m.Le.setConfig(m.gI.SlideStartTime,{slideStartTime:0})}}},[S]),(0,n.useLayoutEffect)(()=>{!P.current&&(0,L.S)()&&(0,g._)()},[]),(0,c.Z)(()=>{let e=window.location.pathname;if(!S)return(!P.current||m.Le.getConfig(m.gI.NeedExitFullScreenAndModal))&&(m.Le.setConfig(m.gI.NeedExitFullScreenAndModal,!1),(0,g._)()),()=>{!(0,f.dH)(location.pathname)&&!(0,f.yk)(location.pathname)&&(0,g._)()};{var l,i,t,n,o;let r=null===(l=m.Le.getConfig(m.gI.IsInModalVideo))||void 0===l?void 0:l.isInModal,a=M&&!r?null===(i=b.s.getLastRegisterPlayerIdByScene)||void 0===i?void 0:i.call(b.s,M):(0,w.OB)();a&&(0,w.wS)(a,!1);let d=null===u()||void 0===u()?void 0:null===(n=u().instManager)||void 0===n?void 0:null===(t=n.find)||void 0===t?void 0:t.call(n,e=>(null==e?void 0:e.playerId)===a);if((0,f.dH)(e)){null==d||null===(o=d.pause)||void 0===o||o.call(d);let e=b.s.getPlayerInfoMap();m.Le.setConfig(m.gI.TempPlayerMap,e),b.s.clearPlayerInfoMap()}return()=>{var l,i,t,n;let o=!1,d=null!==(i=m.Le.getConfig(m.gI.TempPlayerMap))&&void 0!==i?i:null;if(d){if(P.current)null===(n=b.s.setPlayerInfoMap)||void 0===n||n.call(b.s,d);else{let l=new Map;d.forEach((e,i)=>{if(e.scene===v.lT.Modal){var t;null===(t=b.s.unRegister)||void 0===t||t.call(b.s,{id:i})}else l.set(i,e)}),(0,f.dH)(e),null===(t=b.s.setPlayerInfoMap)||void 0===t||t.call(b.s,l)}m.Le.setConfig(m.gI.TempPlayerMap,null)}(0,f.dH)(e)&&!P.current&&r&&(o=!0);let s=M&&(!r||o)?null===(l=b.s.getLastRegisterPlayerIdByScene)||void 0===l?void 0:l.call(b.s,M):(0,w.OB)(),u=o&&s?s:a||s;u&&(0,w.wS)(u,!0);let c=setTimeout(()=>{let e=(0,w.OB)(),l=b.s.getPlayersByScene(M).find(l=>l.playerId===e),i=b.s.getAllPlayer().find(e=>(null==e?void 0:e.playerId)===u);if(i&&!(l&&e!==u)){var t;!(0,f.Nr)(A.current)&&i.once("play",()=>{(0,p.yr)({fromCache:1})}),null==i||null===(t=i.play)||void 0===t||t.call(i)}},500);m.Le.setConfig(m.gI.BackToCacheDelayPlayTimer,c)}}},[S]),(0,n.useEffect)(()=>{if(S)return;let e=N.current,l=e=>h.emit(h.EVENT.routePageScroll,e);return null==e||e.addEventListener("scroll",l),()=>{null==e||e.removeEventListener("scroll",l)}},[S]),(0,n.useEffect)(()=>{E&&h.emit(h.EVENT.childRouteRender)},[E]),(0,n.useEffect)(()=>{!m.Le.getConfig(m.gI.SvgDirectRender)&&m.Le.setConfig(m.gI.SvgDirectRender,!0)},[]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.O,{active:!S,className:r()({[x.tt]:!S,[C.default.withoutscrollbar]:M===v.lT.User},i,x.ei,C.default.routeContainer),ref:N,children:l}),E&&(0,t.jsx)(I.w,{isActive:E,children:(0,t.jsx)("div",{className:r()(x.WV,x.ei,C.default.routeContainer,C.default.childRoute,{[C.default.enterChildRoute]:!k}),children:(0,t.jsx)(a.Outlet,{})})})]})}},523784:function(e,l,i){i.d(l,{C:function(){return m}});var t=i("629686"),n=i("402748"),o=i("320165"),r=i("36807"),a=i.n(r);i("101199");var d=i("879375"),s=i("939165"),u=i("414061"),c=i("435712");let v=()=>{(0,s.o)(()=>{let e=Array.from(document.querySelectorAll(`.${c.ei}`)).find(e=>e.getBoundingClientRect().height>0)||window;return u.emit(u.EVENT.globalScrollEl,e),u.listen(u.EVENT.sideBarShow,()=>{u.emit(u.EVENT.globalScrollEl,e)})},[])};function m(e,l,i){return function(r){v();let s=(0,o.jsx)(e,(0,t._)({},r));return(0,o.jsx)(d.G9,(0,n._)((0,t._)({checkIsActive:l,parentRouteClassName:i},a()),{children:s}))}}},712521:function(e,l,i){i.d(l,{$:function(){return u}}),i(490629);var t=i(320165),n=i(101199),o=i(343475),r=i(889429),a=i(19277),d=i(409250),s=i(426038);function u(e){let{children:l,mobileUrl:i,nonce:u,applicableDevice:c="pc,mobile"}=e,[v,m]=n.useState(!1);n.useEffect(()=>{(0,r.GP)()&&m(!0)},[]);let f=n.useMemo(()=>(0,a.Dr)(d.Q.getItem({sKey:s.CookieKeys.Theme})),[]);return(0,t.jsxs)(o.Helmet,{children:[(0,t.jsx)("meta",{charSet:"utf-8"}),l,(0,t.jsx)("meta",{httpEquiv:"Cache-Control",content:"no-transform"}),(0,t.jsx)("meta",{httpEquiv:"Cache-Control",content:"no-siteapp"}),(0,t.jsx)("meta",{httpEquiv:"x-dns-prefetch-control",content:"on"}),(0,t.jsx)("meta",{name:"applicable-device",content:i?"pc":c}),i&&(0,t.jsx)("meta",{name:"mobile-agent",content:`format=[html5]; url=${i}`}),i&&(0,t.jsx)("link",{rel:"alternate",media:"only screen and (max-width: 640px)",href:i}),(0,t.jsx)("meta",{name:"baidu-site-verification",content:"code-2WPwEy0bEv"}),(0,t.jsx)("meta",{name:"google",content:"notranslate"}),(0,t.jsx)("meta",{name:"theme-color",content:`${"light"===f?"#ffffff":"#161823"}`}),(0,t.jsx)("script",{nonce:u,children:`
|
|
(function(win, export_obj) {
|
|
win['TeaAnalyticsObject'] = export_obj;
|
|
if (!win[export_obj]) {
|
|
function _collect() {
|
|
_collect.q.push(arguments);
|
|
}
|
|
_collect.q = _collect.q || [];
|
|
win[export_obj] = _collect;
|
|
}
|
|
win[export_obj].l = +new Date();
|
|
})(window, 'collectEvent');
|
|
`}),!v&&(0,t.jsx)("link",{rel:"manifest",href:"https://p-pc-weboff.byteimg.com/tos-cn-i-9r5gewecjs/pwa/manifest.json"}),(0,t.jsx)("link",{href:"//fonts.bytedance.com/dfd/api/v1/css?family=DFPKingGothicGB-Medium:500&display=swap",rel:"stylesheet",media:"print",id:"media1"}),(0,t.jsx)("link",{href:"//fonts.bytedance.com/dfd/api/v1/css?family=DFPKingGothicGB-Regular:500&display=swap",rel:"stylesheet",media:"print",id:"media2"}),(0,t.jsx)("script",{nonce:u,children:`
|
|
document.getElementById("media1").addEventListener("load", function () {
|
|
this.media = "all";
|
|
this.onload = null;
|
|
});
|
|
document.getElementById("media2").addEventListener("load", function () {
|
|
this.media = "all";
|
|
this.onload = null;
|
|
});
|
|
`})]})}},935095:function(e,l,i){i.d(l,{Dx:function(){return _},Hw:function(){return h},zT:function(){return g}}),i(683656),i(759943),i(490629),i(14275);var t=i(320165),n=i(101199),o=i(469935),r=i.n(o),a=i(304036),d=i(253714),s=i(656266),u=i(234150),c=i(116553),v=i(81683),m=i(176449);let f=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.replace(/\n/g,"")},_=e=>{let{url:l,text:i,textSize:o="normal",clamp:a=2,showTip:s=!1,onVideoClick:c,className:m}=e,[_,h]=(0,n.useState)(!1),g=f(i);return(0,t.jsxs)(u.a,{target:"_blank",rel:"noopener noreferrer",href:l,onClick:c,className:r()(d.default.link,d.default.titleWrapper),isNeedSeoOpt:!0,children:[(0,t.jsx)("h2",{onMouseEnter:e=>{let l=e.currentTarget;s&&l.scrollHeight>l.clientHeight&&h(!0)},onMouseLeave:()=>s&&h(!1),className:r()(d.default.title,m,{[d.default.titleClamp1]:1===a,[d.default.titleSizeSmall]:"small"===o,[d.default.titleSizeNormal]:"normal"===o}),children:(0,t.jsx)(v.Z,{text:g})}),_&&(0,t.jsx)("div",{className:d.default.dialog,children:(0,t.jsx)(v.Z,{text:g})})]})},h=e=>{let{url:l,avatar:i,avatarType:n="extraExtraSmall",userName:o,nameSize:a="normal",time:m,timeSize:_="normal",onAuthorClick:h,followStatus:g}=e;return(0,t.jsxs)("div",{className:d.default.source,children:[(0,t.jsxs)(u.a,{target:"_blank",rel:"noopener noreferrer",href:l,className:r()(d.default.link,d.default.userInfo),onClick:h,isNeedSeoOpt:!0,children:[i&&(0,t.jsx)(s.q,{type:n,src:i,alt:`${o}头像`}),(0,t.jsx)("p",{className:r()(d.default.name,{[d.default.nameGap]:!!i,[d.default.nameSizeSmall]:"small"===a,[d.default.nameSizeNormal]:"normal"===a}),children:(0,t.jsx)(v.Z,{text:f(o)})}),!!g&&(0,t.jsx)(c.Xg,{className:d.default.followStatus})]}),m&&(0,t.jsx)("span",{className:r()(d.default.time,{[d.default.timeSizeSmall]:"small"===_,[d.default.timeSizeNormal]:"normal"===_}),children:m})]})},g=e=>{let{size:l="normal",titleClamp:i=2,className:n,hideSource:o}=e;return(0,t.jsxs)("div",{className:d.default.imgContentSkeleton,children:[(0,t.jsx)("div",{className:r()(d.default.imgWrapper,n),children:(0,t.jsx)("div",{className:d.default.imgSkeleton,children:(0,t.jsx)(m.Z,{width:"small"===l?74:105,height:"small"===l?85:120,needRenderInSSR:!0,src:a.Z,viewBox:"0 0 105 120"})})}),(0,t.jsx)("div",{className:d.default.titleSkeleton}),i>=2&&(0,t.jsx)("div",{className:r()(d.default.titleSkeleton,d.default.titleSkeletonSecond)}),!o&&(0,t.jsx)("div",{className:d.default.sourceSkeleton})]})}},30368:function(e,l,i){i.d(l,{P:function(){return m}});var t=i("320165"),n=i("101199"),o=i("469935"),r=i.n(o),a=i("304036"),d=i("629686"),s=i("402748");let u=(0,n.forwardRef)((e,l)=>(0,t.jsx)("svg",(0,s._)((0,d._)({width:114,height:114,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:l},e),{children:(0,t.jsx)("path",{d:"M91.638 22.852c-6.101-4.005-10.508-10.41-11.883-17.876A27.433 27.433 0 0 1 79.295 0H59.818l-.034 78.542c-.325 8.794-7.521 15.854-16.34 15.854-2.738 0-5.32-.69-7.594-1.892-5.209-2.762-8.778-8.258-8.778-14.584 0-9.082 7.347-16.475 16.373-16.475 1.684 0 3.3.282 4.833.763V42.202a35.857 35.857 0 0 0-4.833-.35C23.68 41.852 7.6 58.034 7.6 77.926c0 12.205 6.062 23.004 15.307 29.534 5.82 4.111 12.904 6.54 20.543 6.54 19.77 0 35.85-16.182 35.85-36.074v-39.83a46.117 46.117 0 0 0 27.1 8.766V27.263a26.843 26.843 0 0 1-14.762-4.411z",fill:"#33343F"})})));var c=i("962178"),v=i("176449");let m=e=>{let{style:l,className:i,imgBoxClassName:n,infoBoxClassName:o,imgBoxStyle:d,useNewLogo:s=!1}=e;return(0,t.jsxs)("div",{style:l,className:r()(c.default.PlaceholderCard,i),children:[(0,t.jsx)("div",{className:r()(c.default.imgBox,n),style:d,children:(0,t.jsx)("div",{className:r()(c.default.imgContainer),children:s?(0,t.jsx)(v.Z,{width:114,height:114,viewBox:"0 0 114 114",src:u,className:c.default.newIcon}):(0,t.jsx)(v.Z,{width:105,height:120,viewBox:"0 0 105 120",src:a.Z,className:c.default.icon})})}),(0,t.jsxs)("div",{className:r()(c.default.infoBox,o),children:[(0,t.jsx)("div",{style:{width:"100px"},className:r()(c.default.rect,c.default.first)}),(0,t.jsx)("div",{className:r()(c.default.rect,c.default.second)}),(0,t.jsx)("div",{className:r()(c.default.rect,c.default.third)})]})]})}},166414:function(e,l,i){i.d(l,{B:function(){return c}});var t=i(629686),n=i(402748),o=i(811603),r=i(320165);i(101199);var a=i(469935),d=i.n(a),s=i(47946),u=i(234150);function c(e){let{isUseALink:l=!0,children:i,className:a}=e,c=(0,o._)(e,["isUseALink","children","className"]);if(!l){let{onClick:e}=c;return(0,r.jsx)("div",(0,n._)((0,t._)({className:d()(s.default.aLink,a),onClick:e},c),{children:i}))}return(0,r.jsx)(u.a,(0,n._)((0,t._)({className:a},c),{children:i}))}},117961:function(e,l,i){i.d(l,{O:function(){return r}});var t=i(320165),n=i(101199),o=i(91627);let r=n.forwardRef((e,l)=>{let{active:i,children:r,className:a}=e,d=(0,n.useMemo)(()=>i?{}:{display:"none"},[i]);return(0,t.jsx)(o.w,{isActive:i,children:(0,t.jsx)("div",{className:a,ref:l,style:d,children:r})})})},630582:function(e,l,i){i.d(l,{JY:function(){return t},_D:function(){return o},mh:function(){return r},z0:function(){return n}});var t={All:"all",Course:"course",Game:"game",Acg:"acg",Music:"music",Food:"food",Knowledge:"knowledge",Sports:"sports",Theater:"theater",Film:"film",Vlog:"vlog",Child:"child",Car:"car",Agriculture:"agriculture",Animal:"animal",Travel:"travel",Beauty:"beauty"};let n={0:"all",1e5:"course",300205:"game",300206:"acg",300209:"music",300204:"food",300213:"knowledge",300207:"sports",300214:"theater",300215:"film",300216:"vlog",300217:"child",300218:"car",300219:"agriculture",300220:"animal",300221:"travel",300222:"beauty"},o={course:"100000",game:"300205",acg:"300206",music:"300209",food:"300204",knowledge:"300213",sports:"300207",theater:"300214",film:"300215",vlog:"300216",child:"300217",car:"300218",agriculture:"300219",animal:"300220",travel:"300221",beauty:"300222"};o.game,o.acg,o.music,o.food,o.knowledge,o.sports,o.theater,o.film,o.vlog,o.child,o.agriculture,o.animal,o.travel,o.beauty;let r=[{label:"全部",key:"0"},{label:"公开课",key:"100000"},{label:"游戏",key:"300205"},{label:"二次元",key:"300206"},{label:"音乐",key:"300209"},{label:"美食",key:"300204"},{label:"知识",key:"300213"},{label:"体育",key:"300207"},{label:"小剧场",key:"300214"},{label:"影视",key:"300215"},{label:"生活vlog",key:"300216"},{label:"亲子",key:"300217"},{label:"汽车",key:"300218"},{label:"三农",key:"300219"},{label:"动物",key:"300220"},{label:"旅行",key:"300221"},{label:"美妆穿搭",key:"300222"}].map(e=>null==e?void 0:e.key)},649368:function(e,l,i){var t=i(629686),n=i(402748),o=i(320165),r=i(101199);let a=(0,r.forwardRef)((e,l)=>(0,o.jsx)("svg",(0,n._)((0,t._)({width:12,height:13,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:l},e),{children:(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.102 10.42a.563.563 0 0 1 0-.795l3.353-3.352L4.101 2.92a.562.562 0 1 1 .796-.795l3.75 3.75c.22.22.22.576 0 .795l-3.75 3.75a.563.563 0 0 1-.796 0z",fill:"currentColor",fillOpacity:".9"})})));l.Z=a},498332:function(e,l,i){var t=i(629686),n=i(402748),o=i(320165),r=i(101199);let a=(0,r.forwardRef)((e,l)=>(0,o.jsx)("svg",(0,n._)((0,t._)({width:105,height:120,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:l},e),{children:(0,o.jsx)("path",{d:"M89.013 24.055C82.55 19.84 77.883 13.098 76.427 5.238A28.704 28.704 0 0 1 75.939 0H55.31l-.035 82.675c-.345 9.257-7.967 16.689-17.307 16.689-2.902 0-5.636-.726-8.044-1.992-5.517-2.907-9.299-8.692-9.299-15.35 0-9.56 7.783-17.343 17.343-17.343 1.783 0 3.495.297 5.119.803V44.423a38.211 38.211 0 0 0-5.12-.368C17.034 44.055 0 61.088 0 82.027c0 12.848 6.42 24.216 16.213 31.088A37.749 37.749 0 0 0 37.973 120c20.939 0 37.972-17.033 37.972-37.973V40.101a49.054 49.054 0 0 0 28.704 9.227v-20.63a28.56 28.56 0 0 1-15.636-4.643z",fill:"#121423",fillOpacity:".9",opacity:".04"})})));l.Z=a}}]); |