douxiaoyun.js/profiles/douyin-profile/Default/Cache/Cache_Data/f_0003dc
2026-07-17 22:23:39 +08:00

60 lines
524 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"use strict";(self.webpackChunkdouyin_web=self.webpackChunkdouyin_web||[]).push([["84869"],{343475:function(e,t,l){l.r(t),l.d(t,{Helmet:function(){return n}});let n=l(256555).Head},978154:function(e,t,l){l.d(t,{A:function(){return f}}),l("490629");var n=l("101199"),r=l("629686"),i=l("402748");l("706056"),l("679308");var a=l("30995"),o=l("333047"),s=l("494729");let{COMMON_SEARCH_PARAMS:d,DISABLE_SECRET_VIDEO_PARAMS:u,WHALE_CUT_HEADER:c}=a,{ERROR_CODE:v}=o;async function m(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,{result:l}=await (0,s.g8)("/aweme/v1/web/user/dashboard",(0,i._)((0,r._)({},d,u),{UserId:e}),t,e=>!!(null==e?void 0:e.HaveDashBoard));return l}function f(e,t){let[l,r]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{if(!e||!t)return;let l=!1;return(async()=>{try{await m(t)&&!l&&r(!0)}catch(e){}})(),()=>{l=!0}},[e,t]),l}},900429:function(e,t,l){l.d(t,{m:function(){return i}}),l(490629);var n=l(101199),r=l(265412);let i=()=>{let[e,t]=(0,n.useState)();return(0,n.useEffect)(()=>{(0,r.s)()&&t((0,r.s)())},[]),e}},265412:function(e,t,l){l.d(t,{V:function(){return i},s:function(){return a}});var n=l(435712);let r=()=>{let e=document.querySelectorAll(`.${n.tt}`);if(0===e.length)return null;if(1===e.length)return e[0];for(let t=0;t<e.length;t++){let l=e[t];if(null!==l.offsetParent)return l}return e[0]},i=()=>r()||document.documentElement,a=()=>r()||window},402729:function(e,t,l){l.d(t,{J:function(){return r},K:function(){return n}}),l(679308),l(76375);let n=e=>new Promise(t=>setTimeout(t,e));async function r(e,t){let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:500;for(let i=0;i<l;i++)try{let l=await e();if(t(l)){await n(r);continue}return l}catch(e){await n(r);continue}throw Error(`${l} retry times failed`)}},316914:function(e,t,l){var n=l(320165);l(101199);var r=l(412383),i=l(712521);t.Z=e=>{let{children:t,mobileUrl:l,applicableDevice:a}=e,o=(0,r.Yr)();return(0,n.jsx)(i.$,{mobileUrl:l,nonce:o,applicableDevice:a,children:t})}},444729:function(e,t,l){var n=l(320165);l(101199);var r=l(732979),i=l.n(r),a=l(316914);t.Z=e=>{let{videoDetail:t,mobileUrl:l,children:r}=e,{desc:o,authorInfo:s,createTime:d=Date.now()/1e3,video:u,awemeId:c}=t||{},{nickname:v=""}=s||{},{cover:m}=u||{},f=i()(1e3*d).format("YYYYMMDD")||"",h=`${v}在抖音记录美好生活${f}`;return o&&(h=o.slice(0,35)),t?(0,n.jsxs)(a.Z,{mobileUrl:l,children:[r,(0,n.jsx)("meta",{name:"lark:url:enable",content:u?"true":"false"}),(0,n.jsx)("meta",{name:"lark:url:video_icon_url",content:"https://lf1-cdn-tos.bytegoofy.com/goofy/ies/douyin_web/public/favicon.ico"}),(0,n.jsx)("meta",{name:"lark:url:video_title",content:h}),(0,n.jsx)("meta",{name:"lark:url:video_cover_image_url",content:m}),(0,n.jsx)("meta",{name:"lark:url:video_iframe_url",content:`https://www.douyin.com/light/${c}`}),(0,n.jsx)("meta",{name:"lark:url:video_brand_name",content:"抖音"})]}):(0,n.jsx)(a.Z,{mobileUrl:l,children:r})}},910862:function(e,t,l){let n,r,i;l.r(t),l.d(t,{default:function(){return ce}});var a=l("629686");l("656562"),l("992871"),l("490629"),l("414931"),l("112459"),l("759943");var o=l("320165"),s=l("101199"),d=l("121998"),u=l("339808"),c=l("116537"),v=l("656245"),m=l("469935"),f=l.n(m),h=l("983218"),p=l("474149"),g=l("242875"),_=l("66948"),x=l("778018"),C=l("499059"),w=l("661444"),b=l("144506"),I=l("523784"),y=l("377381"),j=l("978154"),k=l("333047"),N=l("414644"),S={errorModule:"PHarbVp9"};function E(e){let{status:t,isSpider:l,statusCode:n,isEmptyUser:r,isUserCanceled:i}=e,{ERROR_USER_FORBIDDEN:a,ERROR_USER_NOTFOUND:s,ERROR_INVALID_PARAM:d}=k.ERROR_CODE;return t>400&&l?404===t?(0,o.jsx)(N.dR,{className:S.errorModule}):(0,o.jsx)(N.nl,{className:S.errorModule}):n===a?(0,o.jsx)(N.nl,{className:S.errorModule,title:"账号被封禁",desc:" "}):0!==n&&(n===s||n===d)||i||r?(0,o.jsx)(N.dR,{className:S.errorModule,title:"用户不存在",desc:" "}):n?(0,o.jsx)(N.nl,{className:S.errorModule,desc:"请稍后重试"}):(0,o.jsx)(N.nl,{className:S.errorModule})}var L=l("440663"),T=l("444729"),M=function(e){let{userInfo:t,uid:l}=e,{nickname:n=""}=t||{},{customVerify:r,enterpriseVerifyReason:i}=t||{},{modalVideoDetail:a}=(0,y.K)(e=>{let{modalVideoDetail:t}=e;return{modalVideoDetail:t}}),s=`${n}的抖音 - 抖音`,d=`${n}, ${n}的抖音`,u=i||r?`${i||r}`:"",c=`${n}${u}。${n}的抖音主页、视频、合集以及作品的粉丝量、点赞量。来抖音,记录美好生活!`;return(0,o.jsxs)(T.Z,{videoDetail:a,mobileUrl:`https://m.douyin.com/share/user/${l}`,children:[(0,o.jsx)("title",{children:s}),(0,o.jsx)("meta",{name:"description",content:c}),(0,o.jsx)("meta",{name:"keywords",content:d}),(0,o.jsx)("script",{type:"application/ld+json",children:`{
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [{
"@type": "ListItem",
"position": 1,
"name": "抖音",
"item": "https://www.douyin.com"
},{
"@type": "ListItem",
"position": 2,
"name": "${n}",
"item": "${(0,L.filterXSS)(`https://www.douyin.com/user/${l}`)}"
}]
}`}),(0,o.jsx)("link",{rel:"canonical",href:`https://www.douyin.com/user/${l}`})]})};l("117232");var R=l("402748");l("374954"),l("706056");var D=l("48795"),P=l("234150"),A=l("220080"),F=l("176449"),B=l("538108"),U=l("638052"),V=l("39765"),O=l("516907"),H=l("419172"),z=l("442022"),Z=l("601034"),W=l("335924"),$=l("414061"),K=l("87897"),Y=l("974648");let G=(0,s.createContext)({isSelf:!1,isSpider:!1,updateFollowStatus:()=>null,haveDashBoard:!1,currentUserInfoDetail:void 0});var q=l("692695");l("228983");var X=l("732979"),Q=l.n(X),J=l("670556"),ee=l("205030"),et=l("81683"),el=l("746517"),en=l("295797"),er=l("70658"),ei=l("396868"),ea=l("645062"),eo=l("36973"),es=l("135657"),ed=l("709292"),eu=l("324160"),ec=l("403285"),ev=l("791559"),em=l("618759"),ef=l("386206"),eh=l("455571"),ep=l("626805"),eg=l("797705");l("362051");var e_=l("618530"),ex=l("163896"),eC=l("120697"),ew=l("316213"),eb=l("312297"),eI=l("264104"),ey=l("133424"),ej={container:"NC3pPAvu",editor:"Ia_mPp1B",textCount:"lrXLgWrA"},ek=e=>{let{userInfo:t,onChangeIntro:l}=e,n=(0,s.useRef)(null),r=(0,s.useRef)(null),[i,d]=(0,s.useState)(t.desc),[u,c]=(0,s.useState)(!1),[v,m]=(0,s.useState)(!1),f=(0,s.useRef)([]),[h,p]=(0,s.useState)({statusCode:0,hasMore:!0,hasFetchData:!1,data:[],preQueryIds:"",searchText:""}),[g,_]=(0,s.useState)({statusCode:0,cursor:0,hasMore:!0,hasFetchData:!1,data:[]}),x=(0,s.useCallback)(async e=>{if(h.hasFetchData)return;let{statusCode:t,userList:l}=await (0,eI.nf)({cursor:20,query:e,penetrateParams:(null==h?void 0:h.searchText)===e?{pre_query_ids:f.current.join()}:null}),n=[];l.forEach(e=>{n.push(e.uid)}),(null==h?void 0:h.searchText)===e?f.current.push(...n):f.current=n,p(n=>({statusCode:t,searchText:e,hasMore:(null==l?void 0:l.length)===20,hasFetchData:!1,data:(null==n?void 0:n.searchText)!==e?l:[].concat(null==n?void 0:n.data,l)}))},[h]),C=(0,s.useCallback)(async()=>{if(g.hasMore){let{statusCode:e,userList:t,cursor:l,hasMore:n}=await (0,eI.Yp)({needPage:!0,cursor:g.cursor,count:20}),r=t.map(e=>(0,R._)((0,a._)({},e),{name:e.nickname}));0===e&&_(e=>e.cursor!==g.cursor?e:{statusCode:0,cursor:l,hasMore:n,hasFetchData:!0,data:[...e.data,...r]})}},[g]);return(0,s.useEffect)(()=>{let{desc:e,descExtra:l=[]}=t,r=[...l];setTimeout(()=>{n.current.setContent(e,r)})},[]),(0,o.jsxs)("div",{className:ej.container,ref:r,onClick:()=>{var e;null===(e=n.current)||void 0===e||e.focus()},children:[(0,o.jsx)(ey.Z,{className:ej.editor,ref:n,refOuterContainer:r,placeholder:"介绍一下你自己",onChange:e=>{var t;let r=null===(t=n.current)||void 0===t?void 0:t.getCommentInfo();d(e),void 0!==e&&void 0!==r&&l(e,r.textExtra.map(e=>({start:e.start,end:e.end,type:e.type,user_id:e.user_id,sec_uid:e.sec_uid})))},atUserSearchData:h,loadSearchAtData:x,atUserDefaultData:g,loadMoreDefaultAtData:C,onEditFocus:()=>{},onEditBlur:()=>{},handlePublishClick:()=>{},isAtIconSelected:u,setIsAtIconSelected:c,isAtIconPoint:v,setIsAtIconPoint:m}),(null==i?void 0:i.length)>0&&242-(null==i?void 0:i.length)<0&&(0,o.jsx)("div",{className:ej.textCount,children:242-(null==i?void 0:i.length)})]})},eN=l("330620"),eS=l.n(eN),eE=l("987826"),eL=l("271727");let eT=(0,s.forwardRef)((e,t)=>(0,o.jsxs)("svg",(0,R._)((0,a._)({width:32,height:32,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:[(0,o.jsxs)("g",{clipPath:"url(#reduceGlass_svg__clip0_1628_36241)",children:[(0,o.jsx)("circle",{cx:16,cy:16,r:15.5}),(0,o.jsx)("path",{clipRule:"evenodd",d:"M8.667 15a6.333 6.333 0 1 1 11.258 3.982l2.449 2.449a.667.667 0 0 1-.943.943l-2.449-2.449A6.333 6.333 0 0 1 8.666 15zM15 10a5 5 0 1 0 0 10 5 5 0 0 0 0-10zm-2.667 5c0-.368.299-.667.667-.667h4a.667.667 0 0 1 0 1.334h-4a.667.667 0 0 1-.667-.667z"})]}),(0,o.jsx)("defs",{children:(0,o.jsx)("clipPath",{id:"reduceGlass_svg__clip0_1628_36241",children:(0,o.jsx)("path",{fill:"#fff",d:"M0 0h32v32H0z"})})})]}))),eM=(0,s.forwardRef)((e,t)=>(0,o.jsxs)("svg",(0,R._)((0,a._)({width:32,height:32,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:[(0,o.jsxs)("g",{clipPath:"url(#increaseGlass_svg__clip0_1612_33738)",children:[(0,o.jsx)("circle",{cx:16,cy:16,r:15.5}),(0,o.jsx)("path",{clipRule:"evenodd",d:"M15 8.667a6.333 6.333 0 1 0 3.982 11.258l2.449 2.449a.667.667 0 1 0 .943-.943l-2.449-2.449A6.333 6.333 0 0 0 15 8.666zM10 15a5 5 0 1 1 10 0 5 5 0 0 1-10 0zm5.667-2a.667.667 0 1 0-1.334 0v1.337l-1.329.002a.667.667 0 0 0 .002 1.333l1.327-.002V17a.667.667 0 0 0 1.334 0v-1.332L17 15.667a.667.667 0 0 0-.002-1.334l-1.332.002V13z"})]}),(0,o.jsx)("defs",{children:(0,o.jsx)("clipPath",{id:"increaseGlass_svg__clip0_1612_33738",children:(0,o.jsx)("path",{fill:"#fff",d:"M0 0h32v32H0z"})})})]}))),eR=()=>({touch:!!("ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),pointerEvents:!!window.PointerEvent&&"maxTouchPoints"in window.navigator&&window.navigator.maxTouchPoints>=0}),eD=(()=>{let e=eR(),t=["touchstart","touchmove","touchend","touchcancel"],l=["mousedown","mousemove","mouseup"];return(null==e?void 0:e.pointerEvents)&&(l=["pointerdown","pointermove","pointerup"]),(null==e?void 0:e.touch)?{start:"touchstart",move:"touchmove",end:"touchend",cancle:"touchcancel"}:{start:l[0],move:l[1],end:l[2]}})(),eP=()=>{let[e,t]=(0,s.useState)({x:0,y:0,width:0,height:0}),[l,n]=(0,s.useState)(0),r=(0,s.useRef)(null),i=(0,s.useRef)(null),o=(0,s.useRef)({width:0,height:0}),d=(0,s.useMemo)(()=>{if(i.current){let t=282/e.width,l=282/e.height;return{width:t,height:l,transform:`translate3d(${-(t*e.x)}px, ${-(l*e.y)}px, 0)`}}return{}},[e]);return(0,s.useEffect)(()=>{if(r.current&&i.current){let e=r.current.getContext("2d");r.current.ctx=e,i.current.crossOrigin="Anonymous",i.current.onload=()=>{var e,l,a;URL.revokeObjectURL(null===(e=i.current)||void 0===e?void 0:e.src),i.current.drawable=!0;let s=null===(l=i.current)||void 0===l?void 0:l.naturalWidth,d=null===(a=i.current)||void 0===a?void 0:a.naturalHeight;if(s>d){let e=s/d;t({x:(e-1)/2/e,y:0,width:1/e,height:1}),o.current={width:1/e,height:1}}else{let e=d/s;t({x:0,y:(e-1)/2/e,width:1,height:1/e}),o.current={width:1,height:1/e}}r.current.width=1080,r.current.height=1080,n(0)},i.current.onerror=()=>{var e;URL.revokeObjectURL(null===(e=i.current)||void 0===e?void 0:e.src),i.current.drawable=!1,t({x:0,y:0,width:1,height:1})}}},[]),(0,s.useEffect)(()=>{if(r.current&&i.current){var t,l,n,a,o;if(null===(t=i.current)||void 0===t?void 0:t.drawable){let t=null===(l=i.current)||void 0===l?void 0:l.naturalWidth,s=null===(n=i.current)||void 0===n?void 0:n.naturalHeight;null===(o=r.current)||void 0===o||null===(a=o.ctx)||void 0===a||a.drawImage(i.current,e.x*t,e.y*s,e.width*t,e.height*s,0,0,r.current.width,r.current.height)}}},[e]),(0,s.useEffect)(()=>{if(0===e.width&&0===e.height)return;let n=e.x+e.width/2,r=e.y+e.height/2,i=n-o.current.width/2,a=r-o.current.height/2,s=l/(l+1),d=o.current.width*(1-s),u=o.current.height*(1-s);t({x:Math.min(Math.max(i+(n-i)*s,0),1-d),y:Math.min(Math.max(a+(r-a)*s,0),1-u),width:d,height:u})},[l]),{canvasRef:r,imgRef:i,imgStyle:d,changeScale:e=>{n(Math.max(Math.min(e,9),0))},enlargeScale:l,imgViewBox:e,changeImgViewBox:e=>{t((0,R._)((0,a._)({},e),{x:Math.min(Math.max(e.x,0),1-e.width),y:Math.min(Math.max(e.y,0),1-e.height)}))}}},eA=e=>{let{changeScale:t,enlargeScale:l}=e,n=(0,s.useRef)(null),r=(0,s.useRef)(null),i=(0,s.useRef)(l),a=(0,s.useRef)(l),o=(0,s.useRef)(-1);return a.current=l,(0,s.useEffect)(()=>{let e=n.current,l=e.offsetWidth,s=r.current,d=n=>{if(o.current="touchstart"===n.type?n.targetTouches[0].pageX:n.pageX,l=e.offsetWidth,(null==n?void 0:n.target)!==s){let e=9*(n.offsetX/l);i.current=e,t(e)}else i.current=a.current},u=e=>{if(-1!==o.current){let n=(("touchmove"===e.type?e.targetTouches[0].pageX:e.pageX)-o.current)/l;t(i.current+9*n)}},c=()=>{o.current=-1};return e.addEventListener(eD.start,d),document.addEventListener(eD.move,u),document.addEventListener(eD.end,c),eD.cancle&&document.addEventListener(eD.cancle,c),()=>{e.removeEventListener(eD.start,d),document.removeEventListener(eD.start,u),document.removeEventListener(eD.start,c),eD.cancle&&document.removeEventListener(eD.cancle,c)}},[]),{sliderProgressRef:n,sliderButtonRef:r}},eF=e=>{let{imgRef:t,imgViewBox:l,changeImgViewBox:n,enlargeScale:r,changeScale:i}=e,o=(0,s.useRef)(l),d=(0,s.useRef)(l),u=(0,s.useRef)({x:-1,y:-1}),c=(0,s.useRef)(r);return o.current=l,c.current=r,(0,s.useEffect)(()=>{let e=t.current,l=e=>{u.current={x:"touchstart"===e.type?e.targetTouches[0].pageX:e.pageX,y:"touchstart"===e.type?e.targetTouches[0].pageY:e.pageY},d.current=o.current},r=t=>{if(!(-1===u.current.x||-1===u.current.y)){let l=e.offsetWidth,r=e.offsetHeight,i={x:"touchmove"===t.type?t.targetTouches[0].pageX:t.pageX,y:"touchmove"===t.type?t.targetTouches[0].pageY:t.pageY};n((0,R._)((0,a._)({},o.current),{x:d.current.x+-((i.x-u.current.x)/l),y:d.current.y+-((i.y-u.current.y)/r)}))}},i=e=>{u.current.x=-1,u.current.y=-1};return e.addEventListener(eD.start,l),document.addEventListener(eD.move,r),document.addEventListener(eD.end,i),eD.cancle&&document.addEventListener(eD.cancle,i),()=>{e.removeEventListener(eD.start,l),document.removeEventListener(eD.move,r),document.removeEventListener(eD.end,i),eD.cancle&&document.addEventListener(eD.cancle,i)}},[]),(0,s.useEffect)(()=>{let e=t.current,l=e=>{let t=Math.max(-1,Math.min(1,e.wheelDelta||-e.deltaY||-e.detail)),l=void 0!==e.wheelDeltaX||void 0!==e.deltaX;(Math.abs(e.wheelDeltaX)<Math.abs(e.wheelDelta)||Math.abs(e.deltaX)<Math.abs(e.deltaY)||!l)&&(t<0?i(c.current-.3):i(c.current+.3))};return e.addEventListener("wheel",l),()=>{e.removeEventListener("wheel",l)}},[]),null};var eB={container:"b2ivjn3S",close:"wT2JQLzk",title:"B7HqRg0d",avatarEditorContainer:"mEXTtmNp",leftContainer:"G0Nej3aB",mainEditor:"Vsmez4OV",loading:"jnAgvmCd",img:"_NFZfmmu",slideContainer:"ureKOyj3",pointer:"nyJ9X76m",disabled:"UIUffdFL",slider:"Vd9aCLBa",progressContainer:"xINreBP5",progress:"fJUJq_TB",progressButton:"HXZivVgD",rightContainer:"cD2bylZd",topContainer:"YK4cyzr8",avatarPreview:"EkXefA8g",avatarPreviewWord:"MsXg0zhm",checkWord:"o5gIAvmz",bottomContainer:"fvtIdYPm",buttonContainer:"PFQVkBpZ",buttonSave:"jyk73wKq"},eU=l("624508"),eV=new eU.h({clickEditProfile:{eventName:"click_edit_profile",params:{}},clickSaveProfile:{eventName:"click_save_profile",params:{action:""}}});let eO=(0,s.forwardRef)((e,t)=>(0,o.jsx)("svg",(0,R._)((0,a._)({width:36,height:36,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,o.jsx)("path",{d:"M24.601 24.6a1.362 1.362 0 0 1-1.927 0L18.5 20.427l-4.174 4.175a1.362 1.362 0 0 1-1.927-1.927l4.174-4.174-4.174-4.175a1.362 1.362 0 0 1 1.927-1.926l4.174 4.174 4.174-4.174a1.362 1.362 0 1 1 1.927 1.927L20.427 18.5l4.174 4.174a1.362 1.362 0 0 1 0 1.927z",fill:"#fff",fillOpacity:".8"})})));var eH=l("581999");let ez=e=>{var t;let{avatarUrl:l,onCloseAvatarEditor:n,onSaveAvatar:r,openFileSelector:i,onClose:a}=e,[d,u]=(0,s.useState)(!1),{dispatch:c,userInfo:v}=null!==(t=(0,eH.useUserInfoContext)())&&void 0!==t?t:{},m=(0,s.useRef)(d);m.current=d;let{canvasRef:p,imgRef:g,imgStyle:_,changeScale:x,enlargeScale:C,imgViewBox:w,changeImgViewBox:b}=eP(),{sliderProgressRef:I,sliderButtonRef:y}=eA({changeScale:x,enlargeScale:C});return eF({imgRef:g,imgViewBox:w,changeImgViewBox:b,enlargeScale:C,changeScale:x}),(0,o.jsxs)("div",{className:eB.container,children:[(0,o.jsx)(F.Z,{className:eB.close,width:36,height:36,onClick:()=>{!m.current&&n()},src:eO}),(0,o.jsx)("div",{className:eB.title,children:"修改头像"}),(0,o.jsxs)("div",{className:eB.avatarEditorContainer,children:[(0,o.jsxs)("div",{className:eB.leftContainer,children:[(0,o.jsxs)("div",{className:eB.mainEditor,children:[(0,o.jsx)("img",{className:eB.img,style:_,src:l,ref:g,draggable:!1}),d&&(0,o.jsx)(h.gb,{className:eB.loading})]}),(0,o.jsxs)("div",{className:eB.slideContainer,children:[(0,o.jsx)(F.Z,{width:32,height:32,viewBox:"0 0 32 32",src:eT,className:f()(eB.pointer,{[eB.disabled]:0===C}),onClick:()=>x(C-1)}),(0,o.jsx)("div",{className:eB.slider,children:(0,o.jsx)("div",{className:eB.progressContainer,ref:I,children:(0,o.jsx)("div",{className:eB.progress,style:{width:`${C/9*100}%`},children:(0,o.jsx)("div",{className:eB.progressButton,ref:y})})})}),(0,o.jsx)(F.Z,{width:32,height:32,viewBox:"0 0 32 32",src:eM,className:f()(eB.pointer,{[eB.disabled]:9===C}),onClick:()=>x(C+1)})]})]}),(0,o.jsxs)("div",{className:eB.rightContainer,children:[(0,o.jsxs)("div",{className:eB.topContainer,children:[(0,o.jsx)("canvas",{className:eB.avatarPreview,ref:p}),(0,o.jsx)("div",{className:eB.avatarPreviewWord,children:"头像预览"}),(0,o.jsx)("div",{className:eB.checkWord,children:"审核通过后展示"})]}),(0,o.jsx)("div",{className:eB.bottomContainer,onClick:()=>{i()},children:"重新上传"})]})]}),(0,o.jsxs)("div",{className:eB.buttonContainer,children:[(0,o.jsx)(D.Button,{className:eB.buttonSave,theme:"solid",onClick:()=>{var e;return null===(e=p.current)||void 0===e?void 0:e.toBlob(async e=>{if(null!==e&&!m.current){u(!0),m.current=!0;let l=new(eS())({userId:v.info.uid,appId:eE.APP_ID,imageConfig:{serviceId:eE.IMAGEX_AVATAR_SERVER_ID}}),{stsToken:n,statusCode:i}=await (0,eL.$y)()||{};if(0===i){var t;let i=null==l?void 0:null===(t=l.addFile)||void 0===t?void 0:t.call(l,{file:e,stsToken:n,type:"image"});l.on("complete",async t=>{var l;let n=await (0,eC.T)({avatar_uri:t.uploadResult.Uri});[0,1].includes(null==n?void 0:null===(l=n.toastBackInfo)||void 0===l?void 0:l.commit_status)?(r(window.URL.createObjectURL(e)),setTimeout(()=>{null==c||c({type:"updateUserInfo"})},2e3),eV.sendLog("clickSaveProfile",{action:"photo"})):(ei.F.info(n.toastBackInfo.toast_msg||n.statusMsg),u(!1))}),l.on("error",e=>{u(!1),ei.F.info("保存失败")}),l.on("progress",e=>{}),l.start(i)}else u(!1),ei.F.info("保存失败")}})},children:"保存"}),(0,o.jsx)(D.Button,{theme:"solid",onClick:()=>{!m.current&&n()},type:"secondary",children:"取消"})]})]})};var eZ={edit:"Ea09HEvK",container:"VEHBC7Qm",box:"Jj9qAJzR",header:"YSCgASqY",title:"Ybl3OgOS",close:"zv36VLR_",avatar:"vc6pXRJt",images:"XXaCOM_Y",iconPhoto:"TkMOTCaB",avatarText:"DcEf6gt_",name:"ZizYdO2g",nameTitle:"TUfFd899",nameInput:"OYBULubi",nameCount:"SNRE0O3y",intro:"kSupovEy",introTitle:"vyOglZNQ",introInput:"QUj_7IIl",buttons:"l0uoiRSG",save:"A2VczAQC",cancel:"rdGfpI98",hide:"iRXrCq6L",icMySetSvg:"x_CLwl3N"};l("968336");let eW=e=>{let{changeImgUrl:t,avatarSrcChange:l}=e,[n,r]=(0,s.useState)(!1),i=(0,s.useRef)(),a=(0,s.useRef)();return(0,s.useEffect)(()=>{if(a.current){let e=a.current,t=()=>{window.URL.revokeObjectURL(e.src)};return e.addEventListener("load",t),()=>{e.removeEventListener("load",t)}}},[]),(0,s.useEffect)(()=>{let e=i.current;if(e){let l="",n=()=>{if(null==e?void 0:e.files[0]){var n;window.URL.revokeObjectURL(l),(null==e?void 0:null===(n=e.files[0].type)||void 0===n?void 0:n.startsWith("image"))?(t(l=window.URL.createObjectURL(null==e?void 0:e.files[0])),r(!0),e.value=""):ei.F.info("格式错误")}};return null==e||e.addEventListener("change",n),()=>{null==e||e.removeEventListener("change",n),window.URL.revokeObjectURL(l)}}},[]),{inputRef:i,imgRef:a,showAvatarEditor:n,onCloseAvatarEditor:()=>{r(!1),t("")},onSaveAvatar:e=>{l(),r(!1),t(e)},openFileSelector:()=>{var e,t;null===(t=i.current)||void 0===t||null===(e=t.click)||void 0===e||e.call(t)}}},e$=e=>{var t;let{userInfo:l,onClose:n}=e,{avatarUrl:r,nickname:i,desc:d}=null!=l?l:{},{dispatch:u}=null!==(t=(0,eH.useUserInfoContext)())&&void 0!==t?t:{},[c,v]=(0,s.useState)(r),[m,h]=(0,s.useState)(i),[p,g]=(0,s.useState)(d),_=(0,s.useRef)(d),x=(0,s.useRef)(),C=(0,s.useRef)(!1),w=(0,s.useRef)(!1),b=(0,s.useMemo)(()=>{let e=0===m.trim().length,t=m===i,l=p===d;return(e||t&&l)&&!C.current},[i,p,m,d,C.current]),I=async()=>{if(w.current)return;let e={},t=!1;if(m!==i&&(e.nickname=m,t=!0),_.current!==d){if(t=!0,""===_.current)e.signature="",e.signature_extra=void 0;else{if(_.current.length>242){ei.F.info("字数已超出最大限制");return}if(_.current.split("\n").length>11){ei.F.info("已超出最大行数");return}let t=_.current.trim();if(e.signature=t,x.current){e.signature_extra=JSON.stringify(x.current),0===x.current.length&&(e.signature_extra=void 0);let t=/^\s+/.exec(_.current);if(t){let l=t[0].length,n=x.current.map(e=>(0,R._)((0,a._)({},e),{start:e.start-l,end:e.end-l}));e.signature_extra=JSON.stringify(n)}}}}if(t){var l,r,o;n();let t=[];void 0!==e.nickname&&t.push("name"),void 0!==e.signature&&t.push("signature"),eV.sendLog("clickSaveProfile",{action:t.join(",")}),w.current=!0;let i=await (0,eC.T)(e);if(w.current=!1,(null==i?void 0:null===(l=i.toastBackInfo)||void 0===l?void 0:l.back)&&setTimeout(()=>{null==u||u({type:"updateUserInfo"})},2e3),null==i?void 0:null===(r=i.toastBackInfo)||void 0===r?void 0:r.toast_msg){ei.F.info(null==i?void 0:null===(o=i.toastBackInfo)||void 0===o?void 0:o.toast_msg);return}if(null==i?void 0:i.statusMsg){ei.F.info(null==i?void 0:i.statusMsg);return}}else{n();return}},y=()=>{n()},{inputRef:j,imgRef:k,showAvatarEditor:N,onCloseAvatarEditor:S,onSaveAvatar:E,openFileSelector:L}=eW({changeImgUrl:e=>{v(e)},avatarSrcChange:()=>C.current=!0});return(0,o.jsxs)(ex.T6,{className:eZ.container,children:[(0,o.jsx)("input",{type:"file",accept:".png,.webp,.jpeg,.pjpeg,.bmp,.jpg",style:{display:"none"},ref:j}),(0,o.jsxs)("div",{"data-bytereplay-mask":"strict",className:f()(eZ.box,{[eZ.hide]:N}),children:[(0,o.jsxs)("div",{className:eZ.header,children:[(0,o.jsx)("span",{className:eZ.title,children:"编辑资料"}),(0,o.jsx)("div",{className:eZ.close,onClick:y,children:(0,o.jsx)(F.Z,{width:36,height:36,src:eO})})]}),(0,o.jsxs)("div",{className:eZ.avatar,children:[(0,o.jsxs)("div",{className:eZ.images,onClick:()=>{var e;null===(e=j.current)||void 0===e||e.click()},children:[(0,o.jsx)("img",{src:c||r,alt:"avatar",ref:k}),(0,o.jsx)("span",{className:eZ.iconPhoto})]}),(0,o.jsx)("div",{className:eZ.avatarText,children:"点击修改头像"})]}),(0,o.jsxs)("div",{className:eZ.name,children:[(0,o.jsx)("div",{className:eZ.nameTitle,children:"名字"}),(0,o.jsxs)("div",{className:eZ.nameInput,children:[(0,o.jsx)("input",{type:"text",placeholder:"记得填写昵称",maxLength:20,onChange:e=>{h(e.target.value)},value:m}),(0,o.jsxs)("span",{className:eZ.nameCount,children:[m.length,"/20"]})]})]}),(0,o.jsxs)("div",{className:eZ.intro,children:[(0,o.jsx)("div",{className:eZ.introTitle,children:"简介"}),(0,o.jsx)("div",{className:eZ.introInput,children:(0,o.jsx)(ek,{userInfo:l,onChangeIntro:(e,t)=>{_.current=e,x.current=t,g(e)}})})]}),(0,o.jsxs)("div",{className:eZ.buttons,children:[(0,o.jsx)(D.Button,{className:eZ.cancel,onClick:y,type:"secondary",theme:"solid",children:"取消"}),(0,o.jsx)(D.Button,{className:eZ.save,disabled:b,onClick:I,theme:"solid",children:"保存"})]})]}),N&&(0,o.jsx)(ez,{avatarUrl:c,onCloseAvatarEditor:S,onSaveAvatar:E,openFileSelector:L,onClose:n})]})};var eK=e=>{let{userInfo:t,className:l,showIconStyle:n=!1}=e,[r,i]=(0,s.useState)(!1),a=()=>{eV.sendLog("clickEditProfile"),i(!0)},d=(0,s.useCallback)(()=>{i(!1)},[]);return(0,o.jsxs)(o.Fragment,{children:[n?(0,o.jsx)(ew.z,{svg:(0,o.jsx)(eb.Z,{}),className:eZ.icMySetSvg,onClick:a}):(0,o.jsx)(D.Button,{className:f()(eZ.edit,l),onClick:a,theme:"solid",children:"编辑资料"}),r&&(0,o.jsx)(e_.h,{children:(0,o.jsx)(e$,{userInfo:t,onClose:d})})]})},eY=l("638183"),eG=l("656266"),eq=l("46892"),eX=l("715360"),eQ={avatarWrap:"gqVonOoH",avatar:"Je6KWMoU",pointer:"MnWq4FCX",avatarDefault:"vPChUSI1",auditing:"w1P1jzPv",screenMask:"Y18dOfPZ"};let eJ=new ex._z,e0=e=>{let{src:t}=e;eJ.render({children:(0,o.jsx)("img",{src:t,style:{width:280,height:280}}),className:eQ.screenMask,onMaskClick:()=>eJ.destroy()})};var e1=e=>{var t,l,n,r,i,d,u,c;let{userInfo:v,logId:m}=e,{uid:h,nickname:p,avatarUrl:g,avatar300Url:_,followStatus:x,roomId:C,secret:w,roomData:b,roomIdStr:I}=null!=v?v:{},y=null!==(d=(0,K._)())&&void 0!==d?d:{},{isSelf:j}=null!==(u=(0,s.useContext)(G))&&void 0!==u?u:{},{userInfo:{isLogin:k,info:N,isSpider:S}}=null!==(c=(0,eH.useUserInfoContext)())&&void 0!==c?c:{},E=(0,s.useMemo)(()=>{var e;return(j||!w||w&&k&&!j&&[1,2].includes(x))&&!!C&&(null==b?void 0:null===(e=b.owner)||void 0===e?void 0:e.web_rid)},[b,w,k,j,x,C]),L=(0,s.useMemo)(()=>{var e;return{web_rid:null==b?void 0:null===(e=b.owner)||void 0===e?void 0:e.web_rid,enter_from_merge:j?"personal_homepage":"web_others_homepage",enter_method:j?"web_video_head":"web_homepage_head",enter_method_temai:"web_video_head",action_type:"click",room_id:I}},[null==b?void 0:null===(t=b.owner)||void 0===t?void 0:t.web_rid,I,j]);(0,s.useMemo)(()=>{var e;return null==b?void 0:null===(e=b.paid_live_data)||void 0===e?void 0:e.paid_type},[b]);let{seasonIds:T}=(0,eX.b)();(0,s.useMemo)(()=>{var e,t;return null==T?void 0:null===(t=T.includes)||void 0===t?void 0:t.call(T,(null==b?void 0:null===(e=b.episode_extra)||void 0===e?void 0:e.season_id_str)||"")},[b,T]);let M=(0,s.useMemo)(()=>v?{authorInfo:{roomData:(0,a._)({},(null==v?void 0:v.roomData)||{}),roomId:null==v?void 0:v.roomIdStr,nickname:null==v?void 0:v.nickname,title:null==v?void 0:v.nickname,secUid:null==v?void 0:v.secUid,desc:null==v?void 0:v.desc,uid:null==v?void 0:v.uid},desc:null==v?void 0:v.desc}:{},[v]);return(0,o.jsx)("div",{className:eQ.avatarWrap,children:E?(0,o.jsx)(eY.nh,{openMultiTaskWindowInWindow:(0,em.DT)(),type:"extra-large",src:S?_:g,alt:`${p}头像`,uid:h,liveRoomUrl:(0,eq.cc)(L),logParams:{enter_from_merge:j?"personal_homepage":"web_others_homepage",small_window_enter_method:j?"personal_homepage_fast_live_hover":"web_homepage_head_hover"},liveRoomParam:{logId:m},isNeedSendLog:!0,isFirstLive:(null==b?void 0:null===(n=b.episode_extra)||void 0===n?void 0:null===(l=n.mod)||void 0===l?void 0:l.episode_stage)===2,isEcomLive:(null==b?void 0:null===(i=b.ecom_data)||void 0===i?void 0:null===(r=i.room_cart_v2)||void 0===r?void 0:r.show_cart)===1,awemeInfo:M,position:"right",fixTop:10,from:"follow",scene:"pc_profile_struct",abtestData:y}):(0,o.jsx)(eG.q,{className:f()(eQ.avatar,{[eQ.pointer]:null==y?void 0:y.hasUserEdit}),defaultClassName:eQ.avatarDefault,src:_,alt:`${p}头像`,isSpider:S,isSelf:j,onClick:()=>{e0({src:_})},children:(null==v?void 0:v.avatarAuditing)&&(null==y?void 0:y.hasUserEdit)?(0,o.jsx)("div",{className:eQ.auditing,children:"审核中"}):null})})},e2=l("988805"),e3=l("431493"),e5=l("157762"),e6=l("31992"),e4=l("880327"),e7=l("394408"),e9="OqQfqiqe",e8="n5jOy41g",te=e=>{var t;let{userInfo:l,type:n,className:r}=e,{uid:i,followStatus:a,followerStatus:s}=l,{userInfo:{isLogin:d,info:u},dispatch:c}=null!==(t=(0,eH.useUserInfoContext)())&&void 0!==t?t:{},{follow:v,unFollow:m}=(0,e3.OM)({selfUid:null==u?void 0:u.uid,actionUid:i,defaultFollowerStatus:s,defaultFollowStatus:a,isLogin:!!d,onLoginSuccess:()=>null==c?void 0:c({type:"updateUserInfo"}),logExtraParams:{to_user_id:i,enter_from:(0,Z.yW)(),is_full_screen:(0,e4.r)()?"1":"0",tab_name:(0,e6.zD)()||(0,W.Rs)("tab_name")||""},fail:e3.GH}),{text:h,buttonType:p,followStatus:g}=(0,e5.r)({selfUid:null==u?void 0:u.uid,actionUid:i,defaultFollowerStatus:s,defaultFollowStatus:a});return(0,o.jsx)(D.Button,{"data-e2e":"user-info-follow-btn",className:f()(e9,r,{[e8]:p!==e2.TT.Active&&"user"===n}),onClick:()=>{(0,e7.V)(g)?m():v()},type:p!==e2.TT.Active?"secondary":"primary",theme:"solid",children:h})};l("88856"),l("679308");var tt=l("851504"),tl=l("368932"),tn=l("399989"),tr=l("542046"),ti={im:"xFYkQW2z",chat:"j85ducYz"},ta=e=>{var t,l;let{userInfo:n,className:r}=e,[i,a]=(0,s.useState)(!1),d=(0,s.useRef)(0),u=(0,s.useRef)(0),c=(0,s.useRef)(0),v=(0,s.useRef)(0);(0,s.useEffect)(()=>$.listen($.EVENT.showHeaderPopUp,e=>{let{type:t,isShow:l}=e;if("im"===t&&l&&(a(!1),d.current>0&&u.current>0)){d.current=0;let e=Date.now()-u.current;(0,tr.G)("im_private_open_time",{duration:e,enter_position:"user_page"})}}),[]),(0,s.useEffect)(()=>$.listen($.EVENT.imChatViewReady,()=>{if(i&&a(!1),c.current>0&&v.current>0){c.current=0;let e=Date.now()-v.current;(0,tr.G)("im_private_ready_open_time",{duration:e,enter_position:"user_page"})}}),[]);let{userInfo:{isLogin:m},dispatch:h}=null!==(l=(0,eH.useUserInfoContext)())&&void 0!==l?l:{},p=async()=>{if((0,tr.G)("click_enter_im_private",{enter_position:"user_page",is_login:!!m,duration:performance.now()}),!m){(0,el.default)({headerText:"登录后即可私信对方",enterMethod:"im_private",success:()=>{h({type:"updateUserInfo"})}});return}if(d.current++,u.current=Date.now(),c.current++,v.current=Date.now(),tn.O.getIsSaasPopup()){a(!0),await (0,tl.a5)().catch(()=>{}).finally(()=>a(!1));let e=Date.now()-u.current;(0,tr.G)("im_private_loading_time",{duration:e,enter_position:"user_page"})}$.emit($.EVENT.sendImUserMsg,{uid:n.uid,enterMethod:"im_private"})};return!(null==n?void 0:null===(t=n.im_role_ids)||void 0===t?void 0:t.includes(tt.L.AiChatBotRole))&&(0,o.jsx)(D.Button,{loading:i,theme:"solid",type:"secondary",className:f()(ti.chat,ti.im,r),onClick:p,children:"私信"})},to=l("935372"),ts=l("205940"),td=l("623594"),tu=l("759894");let tc=(0,s.forwardRef)((e,t)=>(0,o.jsx)("svg",(0,R._)((0,a._)({width:12,height:4,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,o.jsx)("path",{d:"M2.667 2.187a1.333 1.333 0 1 1-2.667 0 1.333 1.333 0 0 1 2.667 0zM7.333 2.187a1.333 1.333 0 1 1-2.666 0 1.333 1.333 0 0 1 2.666 0zM10.667 3.52a1.333 1.333 0 1 0 0-2.667 1.333 1.333 0 0 0 0 2.667z",fill:"currentColor"})})));var tv=new eU.h({blockUser:{eventName:"block_user",params:{action:"",enter_from:"",to_user_id:""}}}),tm={container:"MJM2Upsp",more:"VDBpHQxP",box:"VKLRPv5n",report:"HtDj3qd6",modalBackground:"WRw1MQVD",modal:"iasEiZRS",dropdown:"P65gaWBi",content:"NJ8okw_4",header:"G6Rl_3iU",footer:"w6yKxQHg",cancelBtn:"pkleHHce",confirmBtn:"eavFQiCn"},tf=e=>{let{userInfo:t,dispatch:l,currentUserInfo:n,isLogin:r,className:i}=e,[a,d]=(0,s.useState)(!1),u=(0,K._)(),{isBlock:c}=t,v=(0,s.useRef)(t);v.current=t;let m=async()=>{tv.sendLog("blockUser",{action:"confirm",enter_from:(0,tu.vM)(),to_user_id:null==t?void 0:t.uid});let{status_code:e,block_status:l}=await (0,td.Ox)(null==t?void 0:t.uid,null==t?void 0:t.secUid,c?td.bF.unblock:td.bF.block,td.NE.block);0===e&&(l===td.bF.unblock||l===td.bF.block)?($.emit($.EVENT.userBlockEvent,{uid:null==t?void 0:t.uid,isBlock:l===td.bF.block,action:"block"}),ei.F.info(l===td.bF.unblock?"已解除拉黑":"已拉黑"),d(!1)):ei.F.info("操作失败,稍后重试")};(0,s.useEffect)(()=>{let e=$.listen($.EVENT.userBlockEvent,e=>{var t;let{uid:l,isBlock:n,action:r}=e;l===(null===(t=v.current)||void 0===t?void 0:t.uid)&&("block"===r||v.current.isBlock&&"follow"===r)&&location.reload()});return()=>{e()}},[]);let h=(0,o.jsxs)(D.Dropdown.Menu,{className:tm.box,children:[(0,o.jsx)(D.Dropdown.Item,{className:tm.report,onClick:()=>{(0,to.m)({title:"举报账号",type:"user",object_id:t.uid,owner_id:null==t?void 0:t.uid,owner_sec_id:null==t?void 0:t.secUid,userInfo:n,loginDispatch:l,enter_from:(0,Z.yW)(),pipeline_id:"156",abtestData:u})},children:"举报账号"}),(0,o.jsx)(D.Dropdown.Item,{className:tm.report,onClick:()=>{if(tv.sendLog("blockUser",{action:"click",enter_from:(0,tu.vM)(),to_user_id:null==t?void 0:t.uid}),r)d(!0);else{var e,n;(0,el.default)({headerText:"登录后可以拉黑",enterMethod:"",next:`https://${null===(n=window)||void 0===n?void 0:null===(e=n.location)||void 0===e?void 0:e.host}`,success:async()=>{l({type:"updateUserInfo"})}})}},children:t.isBlock?"解除拉黑":"拉黑"})]});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(D.Dropdown,{className:tm.dropdown,render:h,position:"bottom",children:(0,o.jsx)("div",{id:"tooltip",className:tm.container,children:(0,o.jsx)(D.Button,{className:f()(tm.more,i),theme:"solid",children:(0,o.jsx)(F.Z,{src:tc,width:12,height:4,viewBox:"0, 0, 12, 4"})})})}),a&&(0,o.jsx)(ts.u,{className:tm.modal,modalClassName:tm.modalBackground,type:"custom",onCancel:()=>d(!1),isHide:!a,children:(0,o.jsxs)("div",{className:f()(tm.content),children:[(0,o.jsx)("div",{className:tm.header,children:c?"解除拉黑后,对方可以搜索到你,可以给你发私信":"拉黑后,对方将无法搜索到你,也不能给你发私信"}),(0,o.jsxs)("div",{className:tm.footer,children:[(0,o.jsx)(D.Button,{theme:"solid",type:"secondary",className:tm.cancelBtn,onClick:()=>{d(!1),tv.sendLog("blockUser",{action:"cancel",enter_from:(0,tu.vM)(),to_user_id:null==t?void 0:t.uid})},children:"取消"}),(0,o.jsx)(D.Button,{className:tm.confirmBtn,onClick:m,theme:"solid",children:c?"解除拉黑":"确认拉黑"})]})]})})]})},th=l("611311"),tp=l("726625"),tg=l("692956"),t_=l("981833"),tx={share:"jTJGv9jb",btn:"hRc_Ms_b",text:"C9_cP1HM",box:"D4bNvdvn",code:"qllb0NR_"},tC=e=>{var t,l;let{userInfo:n,isTextType:r,className:i}=e,{uid:a,secret:d}=n,u=null!==(t=(0,K._)())&&void 0!==t?t:{},{userInfo:c,dispatch:v}=null!==(l=(0,eH.useUserInfoContext)())&&void 0!==l?l:{},{type:m,changeType:h}=(0,th.P)({delayDisappear:50,delayShow:50}),p=(0,s.useRef)(!1);return 0===d?(0,o.jsxs)(D.Button,{theme:"borderless",type:"secondary",className:f()(tx.share,tx.btn,i),onMouseEnter:()=>h("share_btn"),onMouseLeave:()=>!p.current&&h(""),id:"frame-user-info-share-button",children:[r?(0,o.jsx)("span",{className:tx.text,children:"分享主页"}):(0,o.jsx)(tg.Z,{type:"fit",ableMiniType:!0,scene:"user"}),(0,o.jsx)(tp.Z,{className:f()(tx.box,tx.code),toast:e=>ei.F.info(e),shareShowMethod:"icon",uid:a,userInfo:n,shareType:t_.y.User,inanyPage:tp.v.UserPage,loginUserInfo:c,hidden:"share_btn"!==m,abtestData:u,handleClose:()=>h(""),loginDispatch:v,onMouseEnter:()=>{},onMouseLeave:()=>{},onFriendSearching:e=>{p.current=e}})]}):null},tw={infoContainer:"WP5BQ83v",videoPerf:"cUO_XMSJ",newUi:"VUXdOe0c",marginTop:"xzIeaVhg",trustLoginSwitch:"PJ_CVOkm",btns:"R0yS0Ag5",moreShare:"dZAvtnGg",shareClass:"moJ0mfEL",moreStyle:"GqJpX7wg",moreGab:"g3vuPDsv",otherShowDownload:"eVXpZCNr",btnContainer:"OIXpergq",follwImEdit:"wZEmnmmY",midBtnContainer:"BUI39UWH",editorClass:"sI6Bib7C",btnBgColor:"Q6Xqww2s",moreGap:"mAGj9jX6",downloadBarText:"Su9Gh2XF",downloadBar:"HUNaCZhl",baseInfoContainer:"j8V94otY",nameInfo:"REOLM3RC",nickname:"m5re_8jG",otherInfo:"XtXz7asc",uniqueId:"enTGrzPh",location:"HhzCXBzZ",tag:"rTzhSEM4",lastdate:"E0QQMsrv",descInfo:"t_m2gjO6",more:"udo3cLwt",login:"TUtx1ODZ",moreDesc:"Pr3bzHyi",liveReplayEntry:"Og4QlqlE",countInfo:"CWN_di6c",item:"A_gLREDy",title:"p72EEHtu",count:"xKUM7x_h",clickable:"tfxaETAB",descContainer:"Ae8QdcOg",moreContainer:"XuFbeDJO",icMySetSvg:"YRO595t2",hasNav:"u81xJT68",frameContainer:"X3WSARgs",topBackground:"cmICj3PS",monthlyRecommendUserTag:"Ohp4rhFx"},tb=l("38724"),tI=l("966473"),ty=l("942645"),tj=JSON.parse('{"v":"5.9.0","fr":30,"ip":0,"op":28,"w":16,"h":16,"nm":"合成 1","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"形状图层 6","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[4.969,10.188,0],"ix":2,"l":2},"a":{"a":0,"k":[-5.312,2.625,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-5.312,-3.75],[-5.312,2.594]],"c":false},"ix":2},"nm":"路径 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[91]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":12,"s":[0]},{"t":28,"s":[91]}],"ix":1},"e":{"a":0,"k":100,"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"修剪路径 1","mn":"ADBE Vector Filter - Trim","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":1.5,"ix":5},"lc":2,"lj":1,"ml":4,"bm":0,"nm":"描边 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"形状 1","np":4,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":30,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"形状图层 5","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[11,10.188,0],"ix":2,"l":2},"a":{"a":0,"k":[-5.312,2.625,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-5.312,-3.438],[-5.312,2.594]],"c":false},"ix":2},"nm":"路径 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[60]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":15,"s":[0]},{"t":28,"s":[60]}],"ix":1},"e":{"a":0,"k":100,"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"修剪路径 1","mn":"ADBE Vector Filter - Trim","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":1.5,"ix":5},"lc":2,"lj":1,"ml":4,"bm":0,"nm":"描边 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"形状 1","np":4,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":30,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"形状图层 4","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[8,10.188,0],"ix":2,"l":2},"a":{"a":0,"k":[-5.312,2.625,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-5.312,-3.625],[-5.312,2.594]],"c":false},"ix":2},"nm":"路径 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[28]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":12,"s":[74]},{"t":28,"s":[28]}],"ix":1},"e":{"a":0,"k":100,"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"修剪路径 1","mn":"ADBE Vector Filter - Trim","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":1.5,"ix":5},"lc":2,"lj":1,"ml":4,"bm":0,"nm":"描边 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"形状 1","np":4,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":30,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"形状图层 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[8,8,0],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[16,16],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"椭圆路径 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[0.996078431373,0.172549019608,0.333333333333,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"椭圆 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":30,"st":0,"bm":0}],"markers":[]}'),tk=l("795653"),tN={live:"lZ8I_nXR",ohosLive:"rqnjnocs",icon:"ksKZC6D7",text:"XcvHY71M",liveWindow:"uZG2RTi4"};let tS=l("630471").s;var tE=new eU.h(tS),tL=e=>{let{liveList:t,onHover:l,loading:n,abTestData:r,requestId:i}=e,{type:a,changeType:s}=(0,th.P)({delayDisappear:100}),d=(0,tk.O)(),u=(0,tI.x)(()=>{let e=null==t?void 0:t[0];tE.sendLog("fastLiveHeadShow",{entrance_type:"personal_homepage",anchor_id:null==e?void 0:e.anchorId,room_id:null==e?void 0:e.roomId,show_type:"default"})});return(0,o.jsxs)("div",{className:f()(tN.live,{[tN.ohosLive]:d}),onClick:e=>{null==e||e.stopPropagation()},onMouseEnter:()=>{s(!0),a||null==l||l(),tE.sendLog("fastLiveHeadHover",{entrance_type:"personal_homepage",hover_show_cnt:t.length})},onMouseLeave:()=>{s(!1)},ref:u,children:[(0,o.jsx)(ty.default,{autoplay:!0,loop:!0,data:tj,className:tN.icon}),(0,o.jsxs)("div",{className:tN.text,children:[t.length,"人正在直播"]}),a&&(0,o.jsx)("div",{className:tN.liveWindow,children:(0,o.jsx)(tb.Z,{abTestData:r,liveList:t,loading:n,hasLimit:!1,logParams:{enter_method:"personal_homepage_fast_live_head",enter_from_merge:(0,Z.yW)(),entrance_type:"personal_homepage",small_window_enter_method:"personal_homepage_fast_live_hover",request_id:i},onItemClick:()=>{s(!1)}})})]})};let tT=e=>!e.hideLocation&&!e.isNotShowBaseTag&&!e.isGovMediaVip&&!e.enterpriseVerifyReason&&!e.isStar&&!0,tM=e=>{let{country:t,province:l,city:n,district:r}=e;if(!tT(e))return"";if(!t)return n;if("中国"!==t)return t;if("台湾"===l)return l;if(!l&&("香港"===n||"澳门"===n))return n;let i=[];return l&&i.push(l),n&&n!==l&&i.push(n),r&&i.push(r),i.slice(0,2).join("\xb7")},tR=(e,t)=>e.map(e=>{var l,n,r;let i=null==e?void 0:null===(l=e.tag)||void 0===l?void 0:l.hotList,a=!(t.length<3)||(null==e?void 0:null===(n=e.tag)||void 0===n?void 0:n.isTop)?void 0:null==i?void 0:i.rank;return a&&!t.includes(null==e?void 0:e.awemeId)&&(null===(r=JSON.parse((null==i?void 0:i.extra)||"{}"))||void 0===r?void 0:r.entrance_relativity)==="100"&&t.push(null==e?void 0:e.awemeId),(null==i?void 0:i.rank)&&(i.rank=a),e}),tD=(e,t)=>{if(!e)return{padding:"0"};let{left:l}=t,n=document.body.clientWidth-t.left-t.width;return{padding:`0 ${n}px 0 ${l}px`}},{CREATOR_DOMAIN:tP,HOME_DOMAIN:tA}=l("513565"),tF={NO:0,REQUEST:4},tB={VIDEO:"video",VS:"vs",USER:"user",Live:"live"},tU={FAVORITE_FOLDER:"favorite_folder",VIDEO:"video",MUSIC:"music",COMPILATION:"compilation",SERIES:"playlet"},tV=[{tab:tU.FAVORITE_FOLDER,title:"收藏夹"},{tab:tU.VIDEO,title:"视频"},{tab:tU.MUSIC,title:"音乐"},{tab:tU.COMPILATION,title:"合集"},{tab:tU.SERIES,title:"短剧"}],tO=`//${tA}/rule/policy?activeId=self_decipline&enter_from=pc_douyin_user_service_agreement`,tH={COMPILATION:"compilation",SERIES:"playlet",VIDEO:"video",SECRET_VIDEO:"private_post"};tU.COMPILATION,tU.SERIES;let tz=[{tab:tH.VIDEO,title:"作品"},{tab:tH.SECRET_VIDEO,title:"私密作品",lock:!0},{tab:tH.COMPILATION,title:"合集"},{tab:tH.SERIES,title:"短剧"}],tZ=[{tab:tH.VIDEO,title:"作品"},{tab:tH.COMPILATION,title:"合集"},{tab:tH.SERIES,title:"短剧"}],tW=(0,s.forwardRef)((e,t)=>(0,o.jsx)("svg",(0,R._)((0,a._)({width:12,height:12,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 1.25a.75.75 0 0 0 0 1.5h1.09L7.54 4.298a.757.757 0 0 0-.058.066 4 4 0 1 0 .968 1.112.752.752 0 0 0 .15-.117L10.25 3.71V5a.75.75 0 0 0 1.5 0V2a.75.75 0 0 0-.75-.75H8zM5 10a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5z",fill:"#168EF9"})}))),t$=(0,s.forwardRef)((e,t)=>(0,o.jsxs)("svg",(0,R._)((0,a._)({width:12,height:12,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:[(0,o.jsx)("mask",{id:"woman_svg__a",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:-2,y:-2,width:16,height:16,children:(0,o.jsx)("path",{fill:"#C4C4C4",d:"M-2-2h16v16H-2z"})}),(0,o.jsxs)("g",{mask:"url(#woman_svg__a)",stroke:"#F5588E",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",children:[(0,o.jsx)("circle",{cx:7.2,cy:4.896,r:3.25}),(0,o.jsx)("path",{d:"M1.617 10.511l3.115-3.115M1.904 7.396l2.828 2.829"})]})]})));var tK=l("776416");let tY=(0,R._)((0,a._)({changeProfileTab:{eventName:"change_profile_tab",params:{enter_from:"",to_user_id:"",tab_name:""}},livesdkLiveShow:{eventName:"livesdk_live_show",params:{enter_from_merge:"web_others_homepage",enter_method:"web_live_btn",anchor_id:"",room_id:"",user_id:"",request_id:""}},livesdkRecLivePlay:{eventName:"livesdk_rec_live_play",params:{anchor_id:"",room_id:"",enter_from_merge:"web_others_homepage",enter_method:"web_live_btn",game_name:"",live_type:"",is_aweme_tied:0,game_live_source:"",url:"",url_path:"",request_id:""}},clickFollowCnt:{eventName:"click_follow_cnt",params:{enter_from:""}},clickFansCnt:{eventName:"click_fans_cnt",params:{enter_from:""}},topknotSettingShow:{eventName:"topknot_setting_show",params:{}},clickTopknotSetting:{eventName:"click_topknot_setting",params:{}},creatorManageEntranceShow:{eventName:"creator_manage_entrance_show",params:{type:"compilation"}},creatorManageEntranceClick:{eventName:"creator_manage_entrance_click",params:{type:"compilation"}},collectionCoverShow:{eventName:"video_cover_show",params:{author_id:"",group_id:"",log_pb:"",enter_from:"",rank:0,from_xigua:0,compilation_id:"",compilation_video_cnt:0,aweme_type:0,tab_name:"",enter_method:"click_tab",is_co_publish:0,co_publish_author_list:void 0}},collectionCoverClick:{eventName:"video_cover_click",params:{author_id:"",group_id:"",log_pb:"",enter_from:"",rank:0,from_xigua:0,compilation_id:"",compilation_video_cnt:0,aweme_type:0}},postVideoCoverClick:{eventName:"video_cover_click",params:{author_id:"",group_id:"",log_pb:"",enter_from:"",rank:0,from_xigua:0,compilation_id:"",compilation_video_cnt:0,aweme_type:0,tab_name:"",enter_method:"click_tab",is_co_publish:0,co_publish_author_list:void 0}},videoCoverClick:{eventName:"video_cover_click",params:{author_id:"",group_id:"",log_pb:"",enter_from:"",rank:0,from_xigua:0,compilation_id:"",compilation_video_cnt:0,aweme_type:0,tab_name:"",enter_method:"click_tab",is_co_publish:0,co_publish_author_list:void 0}},clickFavoriteCollection:{eventName:"click_favorite_collection",params:{author_id:"",group_id:"",content:"video"}}},tK.q),{openRecordShow:{eventName:"open_record_show",params:{}},openRecordClick:{eventName:"open_record_click",params:{}},clickMoreRecord:{eventName:"click_more_record",params:{}},search:{eventName:"search",params:{impr_id:"",enter_from:"",search_type:"general",enter_method:"normal_search",search_keyword:"",duration:0,is_success:0,anti_id:"",tab_name:""}},enterSearch:{eventName:"enter_search",params:{enter_from:"",tab_name:""}},clickLikeTab:{eventName:"click_like_tab",params:{enter_method:""}},noLikeToast:{eventName:"no_like_toast",params:{enter_method:""}},manageEntranceClick:{eventName:"manage_entrance_click",params:{tab_name:"",sub_tab_name:""}},manageExitClick:{eventName:"manage_exit_click",params:{tab_name:"",sub_tab_name:""}},userPageDataFetched:{eventName:"user_page_data_fetched",params:{cost:0,from_cache:0}},manageDeleteClick:{eventName:"manage_delete_click",params:{tab_name:"",sub_tab_name:"",item_cnt:0,icon_name:""}},recordTabClick:{eventName:"record_tab_click",params:{tab_name:""}},recordFilterTabClick:{eventName:"record_filter_tab_click",params:{sub_tab_name:""}},recordFilterConfirm:{eventName:"record_filter_confirm",params:{sub_tab_name:"",click_type:"",click_sub_type:""}},reserveLiveCardShow:{eventName:"reserve_live_card_show",params:{enter_from:"personal_homepage",anchor_id:"",room_id:""}},reserveLiveCardClick:{eventName:"reserve_live_card_click",params:{enter_from:"personal_homepage",anchor_id:"",room_id:""}},reserveLiveCardCancel:{eventName:"reserve_live_card_cancel",params:{enter_from:"personal_homepage",anchor_id:"",room_id:""}},personalShieldAlbumShow:{eventName:"personal_shield_album_show",params:{enter_from:"",tab_name:"",to_user_id:""}}});var tG=new eU.h(tY);let tq=e=>{var t,l;return[1,18,19].includes(null!==(l=null==e?void 0:null===(t=e.punishRemindInfo)||void 0===t?void 0:t.ban_type)&&void 0!==l?l:0)},tX=e=>{let{ban_type:t,prompt_bar:l,punish_content:n}=(null==e?void 0:e.punishRemindInfo)||{},{link_length:r}=l||{},{link_length:i,link_url:a}=n||{};return 2===t&&!!l&&!!n&&(!(r>0)||!(i>0)||!!decodeURIComponent(a).includes("aweme.snssdk.com/magic/eco/runtime/release/6086d26dbe98180570886317"))&&!0};var tQ={notice:"LgaCGnrr",noticeText:"SL6y893x",detailButton:"tDMQhx4Q",content:"ATAb5ds_",yellow:"JOt21mUF"},tJ=l("547304");let t0=e=>{let{isSelf:t}=e;return(0,o.jsxs)("p",{className:tQ.content,children:["由于违反",(0,o.jsx)("a",{className:tQ.yellow,href:`${tO}`,target:"_blank",rel:"noopener noreferrer",children:"《抖音社区自律公约》"}),"的相关规定,该账号已被封禁"]})},t1=e=>{let{isSelf:t}=e;return(0,o.jsxs)("p",{className:tQ.content,children:[t?"您":"该用户","违反",(0,o.jsx)("a",{className:tQ.yellow,href:`${tO}`,target:"_blank",rel:"noopener noreferrer",children:"《抖音社区自律公约》"}),"的相关规定被禁止发布作品"]})},t2=e=>{let{content:t,link_index:l,link_length:n}=e.content||{},r=t.slice(0,l),i=t.slice(l,l+n),a=t.slice(l+n);return(0,o.jsxs)("p",{className:tQ.content,children:[(0,o.jsx)("span",{children:r}),(0,o.jsx)("a",{className:tQ.yellow,href:`${tO}`,target:"_blank",rel:"noopener noreferrer",children:i}),(0,o.jsx)("span",{children:a})]})},t3=e=>{let{isAccountBan:t=!1,isSelf:l=!1}=e;(0,tJ.Z)({title:t?"账号已被封禁":"违规处罚说明",confirmBtnText:"知道了",otherProps:{onlyConfirmButton:!0,renderContent:()=>t?(0,o.jsx)(t0,{isSelf:l}):(0,o.jsx)(t1,{isSelf:l})}})},t5=e=>{let{title:t,content:l}=e;(0,tJ.Z)({title:t,confirmBtnText:"知道了",otherProps:{onlyConfirmButton:!0,renderContent:()=>(0,o.jsx)(t2,{content:l})}})};var t6=new eU.h({personalRiskRemindBarShow:{eventName:"personal_risk_remind_bar_show",params:{enter_from:"",remind_type:"",is_skip:!1,warning_text:"",author_id:""}},personalRiskRemindBarClick:{eventName:"personal_risk_remind_bar_click",params:{enter_from:"",remind_type:"",warning_text:"",author_id:""}}});let t4=(0,s.forwardRef)((e,t)=>(0,o.jsx)("svg",(0,R._)((0,a._)({width:16,height:16,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,o.jsx)("path",{d:"M14.667 8A6.667 6.667 0 1 1 1.334 8a6.667 6.667 0 0 1 13.333 0zM8 4.667c-.366 0-.662.3-.657.666l.05 3.401a.608.608 0 0 0 1.215 0l.05-3.4A.657.657 0 0 0 8 4.666zm.734 6.066a.733.733 0 1 0-1.467 0 .733.733 0 0 0 1.467 0z",fill:"#FE2C55"})}))),t7=e=>{let{punishRemindInfo:t,uid:l}=e,{prompt_bar:n,punish_content:r,punish_title:i,ban_type:a}=t,{content:s,link_index:d,link_length:u}=n||{},c=d>0?s.slice(0,d):s,v=d>0?s.slice(d,d+u):"",m=(0,tI.x)((()=>{t6.sendLog("personalRiskRemindBarShow",{enter_from:(0,tu.vM)(),remind_type:String(a),warning_text:null==n?void 0:n.content,is_skip:!!(d>0&&v),author_id:l})}).bind(null));return(0,o.jsxs)("div",{className:tQ.notice,ref:m,children:[(0,o.jsx)(t4,{}),(0,o.jsx)("span",{className:tQ.noticeText,children:c}),!!(d>0&&v)&&(0,o.jsx)("span",{className:tQ.detailButton,onClick:()=>{t6.sendLog("personalRiskRemindBarClick",{enter_from:(0,tu.vM)(),remind_type:String(a),warning_text:null==n?void 0:n.content,author_id:l}),t5({title:i,content:r})},children:v})]})},t9=e=>{let{desc:t,isFuzzyAuthor:l=!1,descExtra:n}=e,[r,i]=(0,s.useState)(!1),d=null==t?void 0:t.split("\n");if(1===d.length&&d[0].length<=30)return(0,o.jsx)(et.Z,{text:t,textExtra:n,enterMethod:"signature"});let u=(0,ev.i)(d.join(" "),30);return u.length<=30?(0,o.jsx)(et.Z,{text:u,textExtra:n,enterMethod:"signature"}):(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)("div",{className:tw.descContainer,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),children:[(0,o.jsx)(et.Z,{text:u,textExtra:null==n?void 0:n.filter(e=>e.start<=40).map(e=>(0,R._)((0,a._)({},e),{end:31<=(null==e?void 0:e.end)&&(null==e?void 0:e.end)<=33?33:null==e?void 0:e.end})),enterMethod:"signature"}),(0,o.jsx)("div",{className:tw.moreContainer,children:l?(0,o.jsx)("span",{onClick:e=>{var t,l,n;null==e||null===(t=e.preventDefault)||void 0===t||t.call(e),(0,el.default)({success:async()=>{window.location.reload()},enterMethod:"",headerText:"登录后查看全部简介",next:`https://${null===(n=window)||void 0===n?void 0:null===(l=n.location)||void 0===l?void 0:l.host}`})},className:tw.login,children:"登录后查看更多"}):(0,o.jsx)("span",{className:tw.more,children:"更多"})}),!l&&r&&(0,o.jsx)("p",{className:tw.moreDesc,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),children:(0,o.jsx)(et.Z,{text:t,textExtra:n})})]})})},t8=e=>{var t,l,n;let{lastdate:r,isHideImpInfo:i}=e,{nickname:a,desc:d,descExtra:u,followingCount:c,mplatformFollowersCount:v,mplatformFollowersCountStr:m,totalFavorited:h,totalFavoritedStr:p,hideTotalFavorited:g,followStatus:_,customVerify:x,enterpriseVerifyReason:C,uniqueId:w,secret:b,isBlock:I,isBlocked:y,isBan:j,ipLocation:k,generalPermission:N,punishRemindInfo:S,gender:E,age:L,school:T,schoolVisible:M,uid:R,isOverFollower:D,accountCertInfo:P,profileRankLabel:A,cardEntries:B}=null!==(t=e.userInfo)&&void 0!==t?t:{},U=tX(e.userInfo),V=null!==(l=(0,K._)())&&void 0!==l?l:{},{isSelf:O,updateFollowStatus:H}=(0,s.useContext)(G),{userInfo:z,dispatch:Z}=null!==(n=(0,eH.useUserInfoContext)())&&void 0!==n?n:{},W=(0,em._Q)(),{isLogin:Y,info:q}=null!=z?z:{},[X,J]=(0,s.useState)(v),[es,ed]=(0,s.useState)(c),[eu,ev]=(0,s.useState)(!!(W&&!Y)),[eh,e_]=(0,s.useState)(i),{liveList:ex,updateData:eC,loading:ew,requestId:eb}=(0,en.Z)(),eI=(0,er.B)(B||[]);(0,s.useEffect)(()=>{Y&&O&&eC()},[Y,O,V]),(0,s.useEffect)(()=>{ev(!!(W&&!Y)),e_(!1)},[V,Y]);let ey=t=>{let l=t===eg.OK.follower,n=l?"粉丝":"关注";if(!Y){(0,el.default)({headerText:`登录后查看${n}列表`,enterMethod:l?"fans_list":"follow_list",success:()=>{Z({type:"updateUserInfo"})}});return}if(tG.sendLog(l?"clickFansCnt":"clickFollowCnt",{enter_from:O?"personal_homepage":"others_homepage"}),y||!O&&(null==N?void 0:N.following_follower_list_toast)===1||!O&&1===b&&[tF.NO,tF.REQUEST].includes(_)){ei.F.info(`由于该用户隐私设置,${n}列表不可见`);return}if(I){ei.F.info(`由于你已经拉黑对方,${n}列表不可见`);return}if(!O&&tq(e.userInfo)){ei.F.info(`账号违反社区规定,${n}列表不可见`);return}(0,ep.h)({title:t,followerCount:X,followersCountStr:m,setFollowerCount:J,followingCount:es,setFollowingCount:ed,dispatch:Z,isSelf:O,isLogin:Y,currentUserUid:null==q?void 0:q.uid,currentUserInfo:e.userInfo,abtestData:V,selfInfo:z,enterPosition:eg.Hs.HomePage,logParams:{enter_from_merge:"personal_homepage",small_window_enter_method:"web_video_head_hover"}})};(0,s.useEffect)(()=>{let e=ea.a.addCb(e=>{if(O)return;let{action:t}=e;"follow"===t&&(1!==b&&J(e=>e+1),null==H||H()),"unFollow"===t&&(4!==_&&J(e=>Math.max(0,e-1)),null==H||H())});return()=>{e()}},[b,H,_,O]);let ej=tM(e.userInfo),ek=T&&M!==ee.hf.Self;return(0,s.useEffect)(()=>$.listen($.EVENT.UpdateSelfPageFollowCount,e=>{let{action:t}=e;"unFollow"===t?ed(e=>e>0?e-1:e):(t="follow",ed(e=>e+1))}),[]),(0,o.jsxs)("div",{className:tw.baseInfoContainer,"data-e2e":"user-info",children:[(0,o.jsxs)("div",{className:tw.nameInfo,children:[(0,o.jsx)("h1",{className:tw.nickname,children:(0,o.jsx)(et.Z,{text:a})}),(0,o.jsx)(eo.C,{className:tw.badge,accountCertInfo:P}),!!A&&(0,o.jsx)(ec.R,{uid:R,className:tw.monthlyRecommendUserTag,profileRankLabel:A}),O&&(null==V?void 0:V.hasUserEdit)?(0,o.jsx)(eK,{showIconStyle:!0,userInfo:e.userInfo,className:tw.editorClass}):null]}),(0,o.jsxs)("div",{className:tw.countInfo,children:[(0,o.jsxs)("div",{className:f()(tw.item,tw.clickable),"data-e2e":"user-info-follow",onClick:()=>ey(eg.OK.following),children:[(0,o.jsx)("div",{className:tw.title,children:"关注"}),(0,o.jsx)("div",{className:tw.count,children:eh?"":(0,ef.qe)(es,eu)}),O&&(null==ex?void 0:ex.length)>0&&(0,o.jsx)(tL,{liveList:ex,loading:ew,onHover:eC,abTestData:V,requestId:eb})]}),(0,o.jsxs)("div",{className:f()(tw.item,tw.clickable),"data-e2e":"user-info-fans",onClick:()=>ey(eg.OK.follower),children:[(0,o.jsx)("div",{className:tw.title,children:"粉丝"}),(0,o.jsx)("div",{className:tw.count,children:eh?"":!O&&m?m:(0,ef.lN)({number:X,isOver:D,uid:R,isSlice:eu})})]}),(O||1!==g)&&(0,o.jsxs)("div",{className:f()(tw.item),"data-e2e":"user-info-like",children:[(0,o.jsx)("div",{className:tw.title,children:"获赞"}),(0,o.jsx)("div",{className:tw.count,children:eh?"":!O&&p?p:(0,ef.qe)(h,eu)})]})]}),(0,o.jsxs)("p",{className:tw.otherInfo,children:[(0,o.jsxs)("span",{className:tw.uniqueId,children:["抖音号:",w]}),k&&(0,o.jsx)("span",{className:tw.location,children:k}),("number"==typeof E&&0!==E||"number"==typeof L&&-1!==L)&&(0,o.jsxs)("span",{className:tw.tag,children:[0!==E&&(0,o.jsx)(F.Z,{src:1===E?tW:t$,width:12,height:12,viewBox:"0 0 12 12",style:{marginRight:"4px"}}),-1!==L?(0,o.jsxs)("span",{children:[L,"岁"]}):(0,o.jsx)("span",{children:1===E?"男":"女"})]}),ej&&(0,o.jsx)("span",{className:tw.tag,children:ej}),ek&&(0,o.jsx)("span",{className:tw.tag,children:T})]}),r&&(0,o.jsxs)("p",{className:tw.lastdate,children:["最新作品发布时间:",Q()(1e3*r).format("YYYY-MM-DD HH:mm")]}),d&&(0,o.jsx)("div",{className:tw.descInfo,children:(0,o.jsx)(t9,{desc:d,isFuzzyAuthor:eu,descExtra:(null==V?void 0:V.hasUserEdit)?u:void 0})}),eI?(0,o.jsx)(er.x,{className:tw.liveReplayEntry,authorId:R}):null,U&&(0,o.jsx)(t7,{punishRemindInfo:e.userInfo.punishRemindInfo,uid:R})]})};var le=e=>{var t,l,n;let{userInfo:r,logId:i,lastdate:a,isHideImpInfo:d,hideMarginTop:u}=e,{isSelf:c}=null!==(t=(0,s.useContext)(G))&&void 0!==t?t:{},{dispatch:v,userInfo:m}=null!==(l=(0,eH.useUserInfoContext)())&&void 0!==l?l:{},h=null!==(n=(0,K._)())&&void 0!==n?n:{},[p,g]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{g((0,eh.Jo)()||(0,eh.G1)())},[]),(0,o.jsxs)("div",{className:f()(tw.infoContainer,tw.hasNav,tw.newUi,tw.videoPerf,{[tw.marginTop]:u}),children:[(0,o.jsx)(e1,{userInfo:r,logId:i}),(0,o.jsx)(t8,{userInfo:r,lastdate:a,isHideImpInfo:d,abtestData:h}),(0,o.jsx)("div",{className:f()(tw.btns,{[tw.otherShowDownload]:p&&!c}),children:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:tw.moreShare,children:[!c&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(tf,{userInfo:r,dispatch:v,currentUserInfo:null==m?void 0:m.info,isLogin:null==m?void 0:m.isLogin,className:f()(tw.moreStyle,{[tw.moreGap]:0===r.secret})}),(0,o.jsx)(J.NoSSR,{children:(0,o.jsx)(tC,{userInfo:r,isTextType:!0,className:tw.shareClass})})]}),c?(0,o.jsx)(J.NoSSR,{children:(0,o.jsx)(es.Z,{pageIndex:"personal_homepage",classname:tw.trustLoginSwitch,iconPosition:"left",showHoverInfo:!0})}):null]}),(0,o.jsx)("div",{className:tw.midBtnContainer,children:!c&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ta,{userInfo:r,className:tw.btnBgColor}),(0,o.jsx)(te,{userInfo:r,className:tw.btnBgColor,type:"user"})]})}),(0,o.jsxs)("div",{className:tw.btnContainer,children:[(0,o.jsx)("div",{className:tw.follwImEdit,children:!c&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(te,{userInfo:r,className:tw.btnBgColor,type:"user"}),(0,o.jsx)(ta,{userInfo:r,className:tw.btnBgColor})]})}),m.isLogin&&p&&(0,o.jsx)(ed.eD,{hintText:"下载电脑客户端,桌面快捷访问",log:{enterFrom:"personal_homepage",type:"personal_homepage_button",channelId:eu.g.PersonalHomepage},isLogin:!0,className:tw.downloadBar,textContainerClassName:tw.downloadBarText,downloadHintClassName:tw.downloadHintClassName,downloadButtonClassNmae:tw.downloadButtonClassNmae,defaultShow:!1})]})]})})]})},lt=l("692620"),ll=l("929898"),ln=l("980701"),lr=l("372316");let li=(0,s.createContext)({});var la=l("265412"),lo={tabBarContainer:"TK2YSpN3",sticky:"nggRsSpc",inner:"Wn04N7vc",tipContainer:"rTRsuJFB",tipText:"ef4NZ4YR",tabListContainer:"gWlr8S5a",tab:"z5bzCrMf",title:"cwXO7UuJ",count:"cfGc26sp",icon:"WovgAjYD",active:"JY8arcQE",postContainer:"nD6lCwNR"};let ls=(0,s.forwardRef)((e,t)=>(0,o.jsx)("svg",(0,R._)((0,a._)({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.714 16.714a1.286 1.286 0 0 0 2.572 0v-3.428h3.428a1.286 1.286 0 1 0 0-2.572h-3.428V7.286a1.286 1.286 0 0 0-2.572 0v3.428H7.286a1.286 1.286 0 1 0 0 2.572h3.428v3.428z",fill:"#FE2C55"})})));var ld={midInfoContainer:"ZtQ5iCWP",unfollow:"WkRLh6Mj",disabled:"bbgIww4A",avatar:"py_APKnV",follow:"kw9r16ve",chat:"ovFnFy2Z",loading:"enKeK2dq"},lu=e=>{var t,l,n;let{userInfo:r}=e,{uid:i,followStatus:a,followerStatus:d}=r,[u,c]=(0,s.useState)(!1),v=(0,s.useRef)(0),m=(0,s.useRef)(0),p=(0,s.useRef)(0),g=(0,s.useRef)(0),{isSelf:_}=(0,s.useContext)(G),{userInfo:x,dispatch:C}=null!==(n=(0,eH.useUserInfoContext)())&&void 0!==n?n:{},{isLogin:w}=null!=x?x:{};(0,s.useEffect)(()=>$.listen($.EVENT.showHeaderPopUp,e=>{let{type:t,isShow:l}=e;if("im"===t&&l&&(c(!1),v.current>0&&m.current>0)){v.current=0;let e=Date.now()-m.current;(0,tr.G)("im_private_open_time",{duration:e,enter_position:"user_page_mid_info"})}}),[]),(0,s.useEffect)(()=>$.listen($.EVENT.imChatViewReady,()=>{if(u&&c(!1),p.current>0&&g.current>0){p.current=0;let e=Date.now()-g.current;(0,tr.G)("im_private_ready_open_time",{duration:e,enter_position:"user_page_mid_info"})}}),[]);let{follow:b,unFollow:I}=(0,e3.OM)({selfUid:null==x?void 0:null===(t=x.info)||void 0===t?void 0:t.uid,actionUid:i,defaultFollowerStatus:d,defaultFollowStatus:a,isLogin:!!w,onLoginSuccess:()=>null==C?void 0:C({type:"updateUserInfo"}),logExtraParams:{to_user_id:i,enter_from:(0,tu.mo)(),is_full_screen:(0,e4.r)()?"1":"0"}}),{followStatus:y,buttonType:j}=(0,e5.r)({selfUid:null==x?void 0:null===(l=x.info)||void 0===l?void 0:l.uid,actionUid:i,defaultFollowerStatus:d,defaultFollowStatus:a}),k=async()=>{if(!u){if((0,tr.G)("click_enter_im_private",{enter_position:"user_page_mid_info",is_login:!!w,duration:performance.now()}),!w){(0,el.default)({headerText:"登录后即可私信对方",enterMethod:"im_private",success:()=>{C({type:"updateUserInfo"})}});return}if(v.current++,m.current=Date.now(),p.current++,g.current=Date.now(),tn.O.getIsSaasPopup()){c(!0),await (0,tl.a5)().catch(()=>{}).finally(()=>c(!1));let e=Date.now()-m.current;(0,tr.G)("im_private_loading_time",{duration:e,enter_position:"user_page_mid_info"})}$.emit($.EVENT.sendImUserMsg,{uid:r.uid,enterMethod:"im_private"})}},N=j===e2.TT.Active;return _?null:(0,o.jsxs)("div",{className:f()(ld.midInfoContainer,{[ld.unfollow]:N,[ld.disabled]:u}),onClick:N?()=>{(0,e7.V)(y)?I():b()}:k,children:[(0,o.jsx)("img",{className:ld.avatar,src:r.avatarUrl,alt:r.nickname}),N?(0,o.jsxs)("div",{className:ld.follow,children:[(0,o.jsx)(ls,{}),(0,o.jsx)("span",{children:"关注"})]}):(0,o.jsx)("span",{className:ld.chat,children:"私信"}),u&&(0,o.jsx)("div",{className:ld.loading,children:(0,o.jsx)(h.gb,{})})]})};let lc=e=>{let{text:t=""}=e;return(0,o.jsx)(D.Tooltip,{className:lo.tipContainer,position:"bottom",content:(0,o.jsx)("span",{className:lo.tipText,children:t}),children:(0,o.jsx)(lr.Z,{})})},lv=e=>{let{userInfo:{isLogin:t=!1}={}}=(0,eH.useUserInfoContext)()||{},{userAwemeCount:l=-1,userFavoriteCount:n=-1}=(0,s.useContext)(li),r=!!((0,em._Q)()&&!t),{userInfo:i,currentTab:a,setCurrentTab:d,showAiNoteTab:u}=e,{showFavoriteList:c,favoritePermission:v}=i,{isSelf:m}=(0,s.useContext)(G),h=!m&&!c||m&&1===v,p=new Map([["post","user-work-tab"],["like","user-like-tab"],["favorite_collection","user-favorite-tab"],["user-history-tab","user-history-tab"],["watch_later","user-watchlater-tab"]]),g=[{title:"作品",key:"post",modeFrom:"userPost",count:l},{title:"推荐",key:"recommend",modeFrom:"userRecommend",count:-1},{title:"喜欢",key:"like",modeFrom:"userLike",count:n,lock:h},{title:"收藏",key:"favorite_collection",modeFrom:"userCollection",count:-1,lock:!0,lockText:"只能看到自己收藏的列表",hidden:!m},{title:"观看历史",key:"record",modeFrom:"userRecord",lock:!0,count:-1,hidden:!m},{title:"稍后再看",key:"watch_later",modeFrom:"watch_later",lock:!0,count:-1,hidden:!m},{title:"我的预约",key:"my_appointment",modeFrom:"my_appointment",lock:!0,count:-1,hidden:!m},{title:"AI 笔记",key:"ai_note",modeFrom:"ai_note",lock:!0,count:-1,hidden:!m||!u}];(0,s.useEffect)(()=>{if(!!m)$.emit($.EVENT.selfPageCountUpdate,{post:l,like:n})},[l,n,m]);let _=e=>{d(e),(0,ll.d)((0,la.V)(),0,500),tG.sendLog("changeProfileTab",{enter_from:(0,Z.yW)(),tab_name:e,to_user_id:null==i?void 0:i.uid})};return(0,o.jsx)(D.Tabs,{className:lo.tabListContainer,activeKey:a,onChange:e=>_(e),children:g.filter(e=>!e.hidden).map(e=>{let t=(0,ef.qe)(Number(e.count));return(0,o.jsx)(D.TabPane,{itemKey:e.key,"data-e2e":p.get(e.key)||"",tab:(0,o.jsxs)("div",{className:f()(lo.tab,{[lo.active]:a===e.key}),children:["post"===e.key?(0,o.jsxs)("h2",{className:lo.postContainer,children:[(0,o.jsx)("span",{className:lo.title,children:e.title}),-1!==e.count&&(0,o.jsx)("span",{className:lo.count,"data-e2e":"user-tab-count",children:r&&e.count>=100?`${t}+`:t})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{className:lo.title,children:e.title}),-1!==e.count&&(0,o.jsx)("span",{className:lo.count,"data-e2e":"user-tab-count",children:r&&e.count>=100?`${t}+`:t})]}),e.lock&&(0,o.jsx)("div",{className:lo.icon,"data-e2e":"user-tab-icon",children:e.lockText?(0,o.jsx)(lc,{text:e.lockText}):(0,o.jsx)(lr.Z,{})})]})},e.key)})})};var lm=e=>{let{userInfo:t,currentTab:l,setCurrentTab:n,showAiNoteTab:r,children:i,topNavHeight:a=(0,ln.C)()}=e;return(0,o.jsx)(lt.Z,{topOffset:-a,children:e=>{let{style:a,isSticky:s}=e;return(0,o.jsx)("div",{className:f()(lo.tabBarContainer,{[lo.sticky]:s}),style:tD(s,a),id:"user-tabbar",children:(0,o.jsxs)("div",{className:lo.inner,children:[(0,o.jsx)(lv,{userInfo:t,currentTab:l,setCurrentTab:n,showAiNoteTab:r}),s&&(0,o.jsx)(lu,{userInfo:t}),i]})})}})},lf=l("985958"),lh=l("968344"),lp=l("890710"),lg=l("840322");let l_=e=>(0,o.jsx)(lg.ConfirmModal,(0,a._)({},e));var lx=lg.ConfirmModal;let lC=new eU.h({pageView:{eventName:"page_view",params:{url:"",url_path:"",enter_from:"",link_from:"",theme:"light",is_topknot:0,from_push:0,seo_vids:"",physical_screen_num:0,physical_screen_info:"",open_from_page:"",multi_window_order:"",multi_window_open_from:"",sidebar_status:"open"}},pageViewV2:{eventName:"page_view_v2",params:{url:"",url_path:"",enter_from:"",link_from:"",theme:"light",is_topknot:0,from_push:0,seo_vids:"",physical_screen_num:0,physical_screen_info:"",open_from_page:"",multi_window_order:"",multi_window_open_from:""}},pageStayTime:{eventName:"page_stay_time",params:{url:"",url_path:"",enter_from:"",duration:0,is_visible:1,sidebar_status:"open",link_from:"",is_small_window:"0"}},aiSearchEntranceShow:{eventName:"ai_search_entrance_show",params:{enter_from:"",enter_from_merge:""}},aiChatButtonShow:{eventName:"ai_chat_button_show",params:{enter_from:"",ai_chat_button_position:""}},enterPersonalHomepage:{eventName:"enter_personal_homepage",params:{enter_method:"",enter_from:"",from_gid:"",tab_name:"",is_personal_panel_video:0}},enterPersonalDetail:{eventName:"enter_personal_detail",params:{to_user_id:"",is_private:0,enter_method:"",enter_from:"",from_gid:"",is_full_screen:"0",tab_name:"",event_page:"",enter_from_merge:"",relation:void 0}},changeProfileTab:{eventName:"change_profile_tab",params:{enter_from:"",to_user_id:"",tab_name:""}},follow:{eventName:"follow",params:{enter_from:"",to_user_id:"",item_duration_ms:0}},unfollow:{eventName:"unfollow",params:{enter_from:"",to_user_id:""}},collectionCoverShow:{eventName:"video_cover_show",params:{author_id:"",group_id:"",log_pb:"",enter_from:"",rank:0,from_xigua:0,compilation_id:"",compilation_video_cnt:0,aweme_type:""}},collectionCoverClick:{eventName:"video_cover_click",params:{author_id:"",group_id:"",log_pb:"",enter_from:"",rank:0,from_xigua:0,compilation_id:"",compilation_video_cnt:0,aweme_type:""}},clickFavoriteCollection:{eventName:"click_favorite_collection",params:{author_id:"",group_id:"",content:"video"}},openRecordShow:{eventName:"open_record_show",params:{}},openRecordClick:{eventName:"open_record_click",params:{}},clickMoreRecord:{eventName:"click_more_record",params:{}},recordCardShow:{eventName:"record_card_show",params:{}},closeRecordShow:{eventName:"close_record_show",params:{}},closeRecordClick:{eventName:"close_record_click",params:{}},clearAllRecord:{eventName:"clear_all_record",params:{}},clearAllRecordShow:{eventName:"clear_all_record_show",params:{}},creatorManageEntranceShow:{eventName:"creator_manage_entrance_show",params:{type:"compilation"}},creatorManageEntranceClick:{eventName:"creator_manage_entrance_click",params:{type:"compilation"}},managePopupShow:{eventName:"manage_popup_show",params:{tab_name:"",sub_tab_name:"",item_cnt:0}},managePopupConfirm:{eventName:"manage_popup_confirm",params:{tab_name:"",sub_tab_name:"",item_cnt:0,icon_name:""}},managePopupCancel:{eventName:"manage_popup_cancel",params:{tab_name:"",sub_tab_name:"",item_cnt:0}},userCacheInvalid:{eventName:"user_cache_invalid",params:{message:""}}}),lw=e=>{let{isRetry:t=!1,needRetryCount:l=0,itemName:n="选项",operation:r="操作",count:i=0,addedDesc:a=""}=e;return t&&l?{title:`有 ${l} 个${n}未成功${r}`,cancelBtnText:`暂不${r}`,confirmBtnText:`继续${r}`}:{title:`确认${r} ${i} 个${n}, ${r}后不可恢复${a}`,cancelBtnText:`暂不${r}`,confirmBtnText:`确认${r}`}};function lb(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{maxSelectedCount:t=100,operate:l,operateDesc:n={operation:"操作",itemName:"选项"},customModalDesc:r,addDescription:i,onManageEndCallback:o,tabName:d="post",subTabName:u="video",iconName:c="",isListSelectable:v,setIsListSelectable:m,onSessionMultiEnd:f}=e,[h,p]=(0,s.useState)(!1),[g,_]=(0,s.useState)(0),[x,C]=(0,s.useState)([]),w=(0,s.useRef)(!1),[b,I]=(0,s.useState)(!1),[y,j]=(0,s.useState)("initial"),[k,N]=(0,s.useState)([]),[S,E]=(0,s.useState)(!1),[L,T]=(0,s.useState)(!1),M=(0,s.useRef)(()=>{}),D=(0,s.useCallback)(e=>p(e),[]);(0,s.useEffect)(()=>{p(b||!v)},[b,v]);let P=(0,s.useCallback)(e=>{m(e),!e&&(_(0),C([]),N([]),j("initial"),p(!1),I(!1),E(!1),T(!1),w.current=!1)},[m]);(0,s.useEffect)(()=>{!v&&P(!1)},[v]);let A=(0,s.useCallback)(e=>{var t;C(e),_(null!==(t=e.length)&&void 0!==t?t:0)},[]),F=(0,s.useCallback)(e=>{I(e),e&&lC.sendLog("managePopupShow",{item_cnt:g,tab_name:d,sub_tab_name:u})},[I,g,d,u]),B=(0,s.useCallback)(e=>{M.current=e},[]);(0,s.useEffect)(()=>{!b&&(j("initial"),w.current=!1)},[b]),(0,s.useEffect)(()=>{let e=()=>{P(!1)},t=$.listen($.EVENT.openImAwemeModal,e),l=$.listen($.EVENT.openNoticeAwemeModal,e);return()=>{null==t||t(),null==l||l()}},[P]),(0,s.useEffect)(()=>{let e=$.listen($.EVENT.feedbackVisibleChange,e=>{p(null!=e&&e)});return()=>{e()}},[]);let U=(0,s.useCallback)(e=>{var t;null==M||null===(t=M.current)||void 0===t||t.call(M),P(!1),null==o||o({manageCount:g-k.length,selectedItems:e})},[o,P,g,null==k?void 0:k.length]),V=(0,s.useCallback)(async()=>{var e;let{isSuccess:t=!1,fatalIds:r=[],isFailForRisk:i=!1,statusCode:a=-1,statusMsg:o="操作失败, 请稍后重试"}=null!==(e=await (null==l?void 0:l(x)))&&void 0!==e?e:{},{operation:s="取消",itemName:d="视频"}=null!=n?n:{};if(t){ei.F.info(`${s}成功`),P(!1),U(x);return}if(0!==a){ei.F.info(o),j("initial"),P(!1),U(x);return}w.current||i?(r.length>0&&ei.F.info(`有${r.length}个${d}因风险因素未能成功${s}`),P(!1),U(x)):(j("retry"),N(r))},[l,P,U,n,x]),O=(0,s.useCallback)(()=>{var e;if(!b)return null;let t=null!=r?r:lw;return l_((0,R._)((0,a._)({},t((0,R._)((0,a._)({count:g,needRetryCount:k.length,isRetry:"retry"===y||w.current},n),{addedDesc:null!==(e=null==i?void 0:i(x))&&void 0!==e?e:"",items:x}))),{onCancel:()=>{if("loading"!==y)"retry"===y&&U(x),"initial"===y&&lC.sendLog("managePopupCancel",{item_cnt:g,tab_name:d,sub_tab_name:u}),I(!1)},onConfirm:async()=>{if("loading"!==y)"retry"===y&&(w.current=!0),"initial"===y&&lC.sendLog("managePopupConfirm",{item_cnt:g,tab_name:d,sub_tab_name:u,icon_name:c}),j("loading"),await V()}}))},[b,g,I,V,y,U,k,x,r,i,n,d,u,c]);return{isListSelectable:v,changeListSelectable:P,selectedCount:g,maxSelectedCount:t,selectItems:x,setSelectItems:C,changeSelectedItems:A,onSessionMultiEnd:f,showConfirm:b,isSelectDisabled:h,renderConfirmModal:O,changeShowConfirm:F,setResetScrollList:B,resetScrollList:M.current,updateIsSelectDisabled:D,indeterminate:S,setIndeterminate:E,checkAll:L,setCheckAll:T,retryItemIds:k}}let lI=()=>(0,s.createContext)({}),ly=lI(),lj=()=>(0,s.useContext)(ly);var lk={post:"BLr2iXUz",timeLineButtonAugment:"QLVCr4sc",header:"gpk1F4V1",noMarginBottom:"Kk74V_uy",headerBg:"Y3_MSU8Y",tabs:"sx1LR0OO",tabItem:"MyzBbnUC",iconWrapper:"MRvujp1Y",iconLock:"JGYMafpY",iconActive:"myamhjyC",tool:"dlxtet7x",list:"XioRKGro",default:"scLOunJj",divider:"YpbhseN1",createMix:"MEuuRY5_",createMixIc:"XWSMkqYr"},lN=l("604467"),lS=l("206698"),lE=l("540129"),lL=l("328357"),lT=l("398748"),lM=l("502656"),lR=l("775680"),lD=l("317670"),lP=l("433294"),lA=l("190846");l("591964");var lF=(e,t)=>e.reduce((e,l)=>(e.set(t(l),l),e),new Map),lB=e=>{let{dataList:t,setScrollData:l,onSort:n,getSortId:r}=e,[i,a]=(0,s.useState)(lF(t,r)),[o,d]=(0,s.useState)(t.map(e=>r(e))),[u,c]=(0,s.useState)(!1),v=(0,s.useRef)(!1),m=(0,s.useRef)(!1);(0,s.useEffect)(()=>{if(a(lF(t,r)),v.current){m.current=!0;return}d(t.map(e=>r(e)))},[t]);let f=async e=>{var t,i;let{active:a,over:s}=e;if(!(null==a?void 0:a.id)||!(null==s?void 0:s.id)||a.id===s.id)return;let u=o.indexOf(a.id),f=o.indexOf(s.id),h=(0,lT.Rp)(o,u,f),p=0,g=null;l(e=>{var t,l,n;p=null===(l=e.dataList)||void 0===l?void 0:null===(t=l.findIndex)||void 0===t?void 0:t.call(l,e=>r(e)===a.id),g=null===(n=e.dataList)||void 0===n?void 0:n[p];let i=(0,lT.Rp)(e.dataList,u,f);if(m.current){m.current=!1;let t=new Set(h);e.dataList.map(e=>r(e)).filter(e=>!t.has(e)).map(e=>h.push(e))}return{statusCode:e.statusCode,dataList:i}}),d(h),v.current=!1,c(!0),null==n||null===(i=n(a.id,h,p,g))||void 0===i||null===(t=i.then)||void 0===t||t.call(i,e=>{if(c(!1),e)return;let t=[];l(e=>{let l=(0,lT.Rp)(e.dataList,f,u);return t=l.map(e=>r(e)),{statusCode:e.statusCode,dataList:l}}),d(t)})};return{dataMap:i,items:o,dragEndEvent:f,onSortStart:()=>{v.current=!0},isSortingRef:v,isSortFetching:u}},lU=e=>{let{onSort:t,getSortId:l,customDataListCtx:n}=e,{sortDataList:r,setSortDataList:i}=(0,s.useContext)(n),[a,o]=(0,s.useState)(lF(r,l)),[d,u]=(0,s.useState)(r.map(e=>l(e))),[c,v]=(0,s.useState)(!1),m=(0,s.useRef)(!1),f=(0,s.useRef)(!1);(0,s.useEffect)(()=>{if(o(lF(r,l)),m.current){f.current=!0;return}u(r.map(e=>l(e)))},[r]);let h=async e=>{var n,r;let{active:a,over:o}=e;if(!(null==a?void 0:a.id)||!(null==o?void 0:o.id)||a.id===o.id)return;let s=d.indexOf(a.id),c=d.indexOf(o.id),h=(0,lT.Rp)(d,s,c),p=0,g=null;i(e=>{var t;p=null==e?void 0:null===(t=e.findIndex)||void 0===t?void 0:t.call(e,e=>l(e)===a.id),g=null==e?void 0:e[p];let n=(0,lT.Rp)(e,s,c);if(f.current){f.current=!1;let t=new Set(h);e.map(e=>l(e)).filter(e=>!t.has(e)).map(e=>h.push(e))}return n}),u(h),m.current=!1,v(!0),null==t||null===(r=t(a.id,h,p,g))||void 0===r||null===(n=r.then)||void 0===n||n.call(r,e=>{if(v(!1),e)return;let t=[];i(e=>{let n=(0,lT.Rp)(e,c,s);return t=n.map(e=>l(e)),n}),u(t)})};return{dataMap:a,items:d,dragEndEvent:h,onSortStart:()=>{m.current=!0},isSortingRef:m,isSortFetching:c}};let lV=(0,s.createContext)(!1),lO=e=>{let{disabled:t,children:l}=e;return(0,o.jsx)(lV.Provider,{value:t,children:l})},lH=()=>(0,s.useContext)(lV),lz=s.memo(function(e){let{sortId:t,itemClassName:l,index:n,ItemCompnent:r,renderItem:i,itemInfo:d,directRenderItem:u,withMask:c,isHighLight:v,getMaskIndex:m,isSortFetching:h,getItemDragDisabled:p}=e,[g,_]=(0,s.useState)(v),x=lH(),{setNodeRef:C,attributes:w,listeners:b,transform:I}=(0,lT.nB)({id:t,disabled:x||h||(null==p?void 0:p(d))}),y={transform:lR.ux.Transform.toString(I)},[j,k]=(0,s.useState)(null);return((0,s.useEffect)(()=>{if(!j)return;let e=e=>e.stopPropagation();return null==j||j.addEventListener("mousedown",e),null==j||j.addEventListener("mouseup",e),null==j||j.addEventListener("mousemove",e),null==j||j.addEventListener("mouseover",e),()=>{null==j||j.removeEventListener("mousedown",e),null==j||j.removeEventListener("mouseup",e),null==j||j.removeEventListener("mousemove",e),null==j||j.removeEventListener("mouseover",e)}},[j]),u)?i(d,n,d.scrollLogPb):((0,s.useEffect)(()=>{if(_(v),v){let e=setTimeout(()=>{_(!1)},3e3);return()=>{clearTimeout(e)}}},[v]),(0,o.jsx)("li",{className:f()(l,lP.default.item,lP.default.sortItem,{[lP.default.coveredMask]:c,[lP.default.highLight]:g&&v}),children:(0,o.jsxs)("div",(0,R._)((0,a._)({ref:C},w),{style:y,children:[r?(0,o.jsx)(r,{itemInfo:d,index:n,logPb:d.scrollLogPb}):i(d,n,d.scrollLogPb),null==c?void 0:c(d,null==m?void 0:m(d,n)),!x&&(0,o.jsx)("div",{ref:k,children:(0,o.jsx)(ew.z,(0,a._)({svg:(0,o.jsx)(lD.Z,{}),className:lP.default.dragBtn},b))})]}))}))}),lZ=e=>{var t;return null!==(t=null==e?void 0:e.awemeId)&&void 0!==t?t:null==e?void 0:e.mixId},lW=e=>{let{dataList:t,setScrollData:l,itemClassName:n,ItemCompnent:r,renderItem:i,withMask:a,directRenderItem:d,highLightAwemeId:u,getMaskIndex:c,customDataListCtx:v,useSortListHook:m,onSort:f,getSortId:h=lZ,getItemDragDisabled:p}=e,{dataMap:g,items:_,dragEndEvent:x,onSortStart:C,isSortFetching:w}=m({dataList:t,setScrollData:l,onSort:f,getSortId:h,customDataListCtx:v}),b=lH();return(0,o.jsx)(lL.LB,{onDragStart:C,onDragEnd:x,modifiers:[lM.lv],children:(0,o.jsx)(lT.Fo,{items:_,disabled:b,children:_.filter(e=>g.get(e)).map((e,t)=>{let l=g.get(e);return(0,s.createElement)(lz,{itemClassName:n,index:t,ItemCompnent:r,renderItem:i,withMask:a,getMaskIndex:c,itemInfo:l,key:e,directRenderItem:d,isHighLight:u&&u===(null==l?void 0:l.awemeId),sortId:e,isSortFetching:w,getItemDragDisabled:p})})})})},l$=e=>{let{customDataListCtx:t}=e;return t?(0,o.jsx)(lW,(0,R._)((0,a._)({},e),{customDataListCtx:t,useSortListHook:lU})):(0,o.jsx)(lW,(0,R._)((0,a._)({},e),{useSortListHook:lB}))};var lK=s.forwardRef(function(e,t){return(0,o.jsx)(lA.Z,(0,R._)((0,a._)({},e),{ref:t,SortComponent:l$}))}),lY=l("550514"),lG=l("452718"),lq=l("767666"),lX=l("30995"),lQ=l("732199"),lJ=l("911429");let{COMMON_SEARCH_PARAMS:l0}=lX||{};function l1(e){let{status_msg:t="",status_code:l=-1,fatal_ids:n=[],unprocessed_ids:r=[]}=e;return{fatalIds:n,statusMsg:t,statusCode:l,unprocessedIds:r}}async function l2(e){let{mixIds:t}=e,l=await (0,lJ.v_)("/web/api/mix/destroy/multi",(0,a._)({},l0),{mix_ids:t},{});return(0,lQ.RL)(l,l1)}async function l3(e){let{mixIds:t}=e,l=t.split(","),n=[];for(let e=0;e<l.length;e+=50){let t=await l2({mixIds:l.slice(e,e+50).join(",")});n.push(t)}let r={fatalIds:[],statusCode:-1,statusMsg:"服务异常,请稍后再试"};return n.some(e=>0===e.statusCode)?(r.statusCode=0,r.statusMsg="",n.forEach(e=>{var t;(null===(t=e.fatalIds)||void 0===t?void 0:t.length)&&(r.fatalIds=r.fatalIds.concat(e.fatalIds))})):(r.statusCode=n[0].statusCode,r.statusMsg=n[0].statusMsg),r}async function l5(e){let{mixIds:t,setStatus:l}=e,n=await (0,lJ.v_)("/web/api/mix/update/status/multi",(0,a._)({},l0),{mix_ids:t,set_status:l},{});return(0,lQ.RL)(n,l1)}async function l6(e){let{mixIds:t,setStatus:l}=e,n=t.split(","),r=[];for(let e=0;e<n.length;e+=50){let t=await l5({mixIds:n.slice(e,e+50).join(","),setStatus:l});r.push(t)}let i={unprocessedIds:[],fatalIds:[],statusCode:-1,statusMsg:"服务异常,请稍后再试"};return r.some(e=>0===e.statusCode)?(i.statusCode=0,i.statusMsg="",r.forEach(e=>{var t,l;(null===(t=e.fatalIds)||void 0===t?void 0:t.length)&&(i.fatalIds=i.fatalIds.concat(e.fatalIds)),(null===(l=e.unprocessedIds)||void 0===l?void 0:l.length)&&(i.unprocessedIds=i.unprocessedIds.concat(e.unprocessedIds))})):(i.statusCode=r[0].statusCode,i.statusMsg=r[0].statusMsg),i}function l4(e){var t;let{status_code:l=-1,extra:n,status_msg:r=""}=e;return{statusCode:l,statusMsg:r,logId:null!==(t=null==n?void 0:n.logid)&&void 0!==t?t:""}}async function l7(e){let{currentMixId:t,mixIdAfterCurrent:l}=e,n=await (0,lJ.v_)("/web/api/mix/order/update",(0,a._)({},l0),{mix_id_a:t,mix_id_b:l},{});return(0,lQ.RL)(n,l4)}async function l9(e){let{mixId:t,mixName:l,mixDesc:n,mixCover:r}=e,i=await (0,lJ.v_)("/web/api/mix/update",(0,a._)({},l0),{mix_id:t,mix_name:l,mix_desc:n,mix_cover:r},{});return(0,lQ.RL)(i,l4)}function l8(e){var t;let{status_code:l=-1,status_msg:n="",mix_id:r="",extra:i}=e;return{statusCode:0===l&&r?0:l||4,statusMsg:n,mixId:r,logId:null!==(t=null==i?void 0:i.logid)&&void 0!==t?t:""}}async function ne(e){let{mixName:t,mixDesc:l,mixCover:n}=e,r=await (0,lJ.v_)("/web/api/mix/create",(0,a._)({},l0),{mix_name:t,mix_desc:l,mix_cover:n},{});return(0,lQ.RL)(r,l8)}async function nt(e){let{mixId:t,addItemIds:l,itemIds:n,delItemIds:r}=e,i=await (0,lJ.v_)("/web/api/mix/item/editlist",(0,a._)({},l0),{mix_id:t,add_item_ids:l,item_ids:n,del_item_ids:r},{});return(0,lQ.RL)(i,l4)}var nl=l("196074"),nn=l("900429"),nr=l("497860"),ni=l.n(nr),na=l("708003"),no=l("908219"),ns=l.n(no),nd=l("939165");let nu=(0,s.createContext)({isActive:!0,tabName:"",cacheEnabled:!1}),nc=()=>(0,s.useContext)(nu),nv=(e,t,l)=>{let{scrollTop:n,scrollLeft:r,clientWidth:i,clientHeight:a}=l;return"down"===e?{x:t.x+t.width,y:a+n}:"up"===e?{x:t.x+t.width,y:n}:"left"===e?{x:r,y:t.y+t.height}:"right"===e?{x:i+r,y:t.y+t.height}:{x:t.x,y:t.y}},nm=(e,t)=>Math.abs(e.x-t.x)<=(e.width+t.width)/2&&Math.abs(e.y-t.y)<=(e.height+t.height)/2,nf=(e,t)=>{var l;let{top:n,left:r}=null===(l=t.getBoundingClientRect)||void 0===l?void 0:l.call(t);return{x:e.clientX-r,y:e.clientY-n}},nh=(e,t)=>({x:(t.x+e.x)/2,y:(t.y+e.y)/2,width:Math.abs(e.x-t.x),height:Math.abs(e.y-t.y)}),np=(e,t,l,n)=>e.map(e=>{let{clientHeight:r,clientWidth:i}=t,{scrollTop:a,scrollLeft:o}=l,s=e.y+e.height>a+n.top,d=Math.max(0,a+n.top-e.y),u=e.y<a+r-n.bottom,c=Math.max(0,e.y+e.height-a-r),v=e.x+e.width>o+n.left,m=Math.max(0,o+n.left-e.x),f=e.x<o+i-n.right,h=Math.max(0,e.x+e.width-o-i);return{item:e.item,desc:e.item.desc,isShow:s&&u&&v&&f,rect:{x:e.x+e.width/2+m/2-h/2,y:e.y+e.height/2+d/2-c/2,height:e.height-d-c,width:e.width-m-h}}});var ng=l("59850"),n_={container:"huaAoiK4",mask:"evZKtTmv",checkBox:"i55V7LjC",disableIcon:"NIjfhhJ6",descIcon:"yohXZadT",maskDisabled:"qomqvAx2",fullMask:"Sbm0be28",count:"hxZlFCx7",disabledDescription:"UZyMghfK",tip:"LCqJBX22",tipText:"pOKCgXGF",coverShadowLayer:"NWh9vMMV"};let nx=(0,s.forwardRef)((e,t)=>(0,o.jsx)("svg",(0,R._)((0,a._)({width:15,height:16,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.501 1.75a6.25 6.25 0 1 0 0 12.5 6.25 6.25 0 0 0 0-12.5zm-.954 4.103c-.191.201-.296.48-.296.772a.625.625 0 0 1-1.25 0c0-.583.208-1.18.641-1.634.441-.463 1.079-.741 1.859-.741s1.418.278 1.859.74c.433.456.641 1.052.641 1.635 0 .995-.642 1.587-1.077 1.988l-.06.056c-.482.447-.738.726-.738 1.206h-1.25c0-1.067.663-1.682 1.119-2.105l.018-.017c.504-.468.738-.712.738-1.128 0-.292-.105-.57-.296-.772C8.27 5.66 7.97 5.5 7.5 5.5s-.77.16-.954.353zm1.735 5.428a.781.781 0 1 1-1.562 0 .781.781 0 0 1 1.562 0z",fill:"#fff",fillOpacity:".34"})}))),nC=e=>{let{maskShadowStyle:t={},maskClassName:l="",isSelected:n=!1,onClickCard:r,info:i,disabled:a=!1,disabledDesc:d="",disabledTipType:u="icon",disabledToastInfo:c="",index:v}=e,m=(0,s.useRef)(null),h="number"==typeof v,p=a&&!n,g=p&&c,_=p&&d&&!h;return(0,o.jsx)("div",{className:n_.container,children:(0,o.jsx)("div",{className:f()(n_.mask,{[n_.maskDisabled]:a&&!n}),onClick:e=>{g&&ei.F.info(c),i&&(null==r||r(e,i))},children:(0,o.jsxs)("div",{className:f()(n_.coverShadowLayer,l),style:t,children:[h&&(0,o.jsx)("div",{className:f()(n_.fullMask,n_.count),children:v}),_?"icon"===u?(0,o.jsx)("div",{className:n_.disableIcon,children:(0,o.jsx)(D.Tooltip,{position:"bottomRight",content:(0,o.jsx)("span",{className:n_.tipText,children:d}),getPopupContainer:()=>m.current||document.body,children:(0,o.jsx)("div",{className:n_.tip,ref:m,children:(0,o.jsx)(F.Z,{src:nx,className:n_.descIcon,viewBox:"0 0 16 16",height:16,width:16})})})}):"toast"===u?(0,o.jsx)("div",{className:f()(n_.fullMask,n_.disabledDescription),children:d}):null:null,(0,o.jsx)(D.Checkbox,{disabled:a&&!n,checked:n,className:n_.checkBox})]})})})},nw=e=>(0,o.jsx)(nC,(0,a._)({},e)),nb=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{containerEl:t,scrollEl:l}=e,n=(0,s.useRef)(t),r=(0,s.useRef)(l);return(0,s.useEffect)(()=>{n.current=null!=t?t:document.querySelector("#user_detail_element"),r.current=null!=l?l:(0,la.V)()},[t,l]),{containerEleRef:n,scrollEleRef:r}};function nI(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ly,{getItemId:l,dataList:n=[],containerEleRef:r,scrollEleRef:i,stickyArea:a,getColumnCount:o,firstItem:d,itemMargin:u,isSupportMulti:c=!0,getItemSelectedDisabled:v,maskShadowStyle:m,getAllItems:f}=e,{isActive:h}=nc(),{isListSelectable:p,maxSelectedCount:g=0,selectedCount:_=0,changeSelectedItems:x,selectItems:C=[],setIndeterminate:w,setCheckAll:b}=(0,s.useContext)(t),I=(0,s.useRef)({}),[y,j]=(0,s.useState)(""),k=(0,s.useRef)(!1),N=(0,s.useRef)(!1);(0,s.useEffect)(()=>{!p&&(k.current=!1,N.current=!1,j(""))},[p]),(0,s.useEffect)(()=>{if(!k.current&&l){let e={};null==C||C.forEach(t=>e[l(t)]=!0),I.current=e}},[C,l]);let S=(0,s.useCallback)(function(){var e,t;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return l?null!==(t=null==n?void 0:null===(e=n.filter)||void 0===e?void 0:e.call(n,e=>{var t;return null==r?void 0:null===(t=r.includes)||void 0===t?void 0:t.call(r,null==l?void 0:l(e))}))&&void 0!==t?t:[]:[]},[n,l]),E=(0,s.useCallback)(e=>{if(!h)return;let{itemsKeyInSelectedArea:t,isNotInMulti:l=!1,allSelect:n=!1,allDel:r=!1}=e;k.current=!l;let i=ni()(I.current),a=[];!1===n&&!1===r?t.forEach(e=>{i[e]?delete i[e]:a.push(e)}):!0===n?t.forEach(e=>{!i[e]&&a.push(e)}):!0===r&&t.forEach(e=>{delete i[e]});let o=Object.keys(i);(null==o?void 0:o.length)+(null==a?void 0:a.length)>g&&!N.current&&(na.F.info(`单次批量操作已达${g}个上限哦~`),N.current=!0,setTimeout(()=>{N.current=!1},3e3));let s=S([...o,...a.slice(0,g-o.length)]);s=s.filter(e=>{var t;return!(null==v?void 0:null===(t=v(e))||void 0===t?void 0:t.disabled)}),null==x||x(s)},[x,g,S,v,h]),L=(0,s.useCallback)(e=>{var t,n;return(null===(n=C.filter)||void 0===n?void 0:null===(t=n.call(C,t=>(null==l?void 0:l(t))===e))||void 0===t?void 0:t.length)>0},[C,l]),T=(0,s.useCallback)((e,t)=>{var n,r;let i=null==l?void 0:l(e);if(!p||!nw||!i)return null;let{disabled:a=!1,disabledDesc:o="",type:s="icon",disabledToastInfo:d}=null!==(n=null==v?void 0:v(e))&&void 0!==n?n:{};return nw({info:e,isSelected:null!==(r=null==L?void 0:L(i))&&void 0!==r&&r,onClickCard:()=>{c?j(i):null==E||E({itemsKeyInSelectedArea:[i],isNotInMulti:!0})},disabled:a||_>=g,disabledDesc:o,disabledTipType:s,disabledToastInfo:d,maskShadowStyle:m,index:t})},[p,L,_,g,l,v,m,c,E]),{getItemPosList:M}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{dataList:t=[],firstItem:l,getColumnCount:n,itemMargin:r={top:0,bottom:0,left:0,right:0},containerEleRef:i,getAllItems:a}=e;return{getItemPosList:(0,ng.Z)(()=>{var e,o,s,d,u,c,v;if(!(null==i?void 0:null===(e=i.current)||void 0===e?void 0:e.getBoundingClientRect)||!l&&!a)return[];let{top:m,left:f}=null==i?void 0:null===(o=i.current)||void 0===o?void 0:o.getBoundingClientRect();if(l){let e=null!==(d=null==n?void 0:n())&&void 0!==d?d:0;if(0===e)return[];let{height:i=0,width:a=0,top:o,left:v}=null!==(u=null==l?void 0:null===(s=l.getBoundingClientRect)||void 0===s?void 0:s.call(l))&&void 0!==u?u:{},h=v-f,p=o-m;return null!==(c=null==t?void 0:t.map((t,l)=>{let n=Math.floor(l/e),o=Math.floor(l%e);return{item:t,x:h+(e+1)*r.left+o*(a+r.left+r.right),y:p+(n+1)*r.top+n*(i+r.top+r.bottom),height:i,width:a}}))&&void 0!==c?c:[]}if(a){let e=a();return null!==(v=null==t?void 0:t.map((t,l)=>{var n,r,i;let{height:a=0,width:o=0,top:s,left:d}=null!==(i=null==e?void 0:null===(r=e[l])||void 0===r?void 0:null===(n=r.getBoundingClientRect)||void 0===n?void 0:n.call(r))&&void 0!==i?i:{};return{item:t,x:d-f,y:s-m,height:a,width:o}}))&&void 0!==v?v:[]}return[]})}}({getColumnCount:o,dataList:n,firstItem:d,containerEleRef:r,itemMargin:u,getAllItems:f});return!function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ly,{containerEleRef:l,scrollEleRef:n,getItemPosList:r,stickyArea:i={top:0,bottom:0,left:0,right:0},updateSelectedList:a,latestClickedCardId:o,getItemId:d,isDisabledMultiSelected:u=!1}=e,[c,v]=(0,s.useState)(!1),m=(0,s.useRef)(!1),f=(0,s.useRef)(!1),{isActive:h}=nc(),p=(0,s.useRef)({x:-1,y:-1}),g=(0,s.useRef)({x:-1,y:-1}),_=(0,s.useRef)({x:-1,y:-1}),x=(0,s.useRef)(null),{isListSelectable:C,isSelectDisabled:w,setSelectItems:b,onSessionMultiEnd:I}=(0,s.useContext)(t),y=(0,s.useRef)([]),[j,k]=(0,s.useState)([]),N=(0,s.useRef)([]),S=(0,s.useCallback)(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(!r)return;let t=np(r(),null==l?void 0:l.current,null==n?void 0:n.current,E.current.stickyArea),i=nh(p.current,g.current),a=null==t?void 0:t.filter(e=>e.isShow);return null==a||a.forEach(t=>{var l,n,r,a,o,s;let d=t.item,u=null===(l=(n=E.current).getItemId)||void 0===l?void 0:l.call(n,d);if(!u||e.includes(u))return;let c=nm(i,t.rect),v=null!==(a=null===(r=N.current)||void 0===r?void 0:r.indexOf(u))&&void 0!==a?a:-1,m=-1!==v;c&&!m&&(null===(o=N.current)||void 0===o||o.push(u)),!c&&m&&(null===(s=N.current)||void 0===s||s.splice(v,1))}),k(N.current),N.current},[l]),E=(0,s.useRef)({stickyArea:i,updateSelectedList:a,getItemId:d,updateRectCrossSelected:S});E.current={stickyArea:i,updateSelectedList:a,getItemId:d,updateRectCrossSelected:S},(0,nd.o)(()=>{let e=()=>{if(x.current){let e=x.current.getContext("2d");e&&e.clearRect(0,0,x.current.width,x.current.height),document.body.removeChild(x.current),x.current=null}},t=t=>{if(!h||w||!(null==l?void 0:l.current))return;v(!0),null==b||b(e=>(y.current=e,e)),m.current=!0,f.current=!0,p.current=nf(t,l.current),_.current={x:t.clientX,y:t.clientY},e();let n=document.createElement("canvas");n.style.position="fixed",n.style.top="0",n.style.left="0",n.style.width="100vw",n.style.height="100vh",n.style.pointerEvents="none",n.style.zIndex="9999",n.width=window.innerWidth,n.height=window.innerHeight,document.body.appendChild(n),x.current=n},n=t=>{var n,r;if(!!h&&!!f.current&&!!(null==l?void 0:l.current))g.current=nf(t,l.current),S(),null===(n=(r=E.current).updateSelectedList)||void 0===n||n.call(r,{itemsKeyInSelectedArea:N.current,isNotInMulti:!0}),v(!1),null==b||b(e=>(null==I||I(y.current,e),y.current=e,e)),m.current=!1,f.current=!1,N.current=[],k([]),e(),_.current={x:-1,y:-1}},r=e=>{var t,n;if(!(2>Math.abs(e.clientX-_.current.x)&&2>Math.abs(e.clientY-_.current.y))&&!!h&&!!f.current&&!!(null==l?void 0:l.current)){if(g.current=nf(e,l.current),S(),null===(t=(n=E.current).updateSelectedList)||void 0===t||t.call(n,{itemsKeyInSelectedArea:N.current}),x.current&&-1!==_.current.x){let t=x.current.getContext("2d");if(t){let l=_.current.x,n=_.current.y,r=e.clientX,i=e.clientY;t.clearRect(0,0,x.current.width,x.current.height),t.fillStyle="rgba(254, 44, 85, 0.2)",t.fillRect(Math.min(l,r),Math.min(n,i),Math.abs(r-l),Math.abs(i-n)),t.strokeStyle="rgba(254, 44, 85, 1)",t.lineWidth=2,t.strokeRect(Math.min(l,r),Math.min(n,i),Math.abs(r-l),Math.abs(i-n))}}}};if(!h||u||!(null==l?void 0:l.current)||!C)return;let i=l.current;return null==i||i.addEventListener("mousedown",t),null==i||i.addEventListener("mouseup",n),null==i||i.addEventListener("mousemove",r),null==i||i.addEventListener("mouseover",r),()=>{null==i||i.removeEventListener("mousedown",t),null==i||i.removeEventListener("mouseup",n),null==i||i.removeEventListener("mousemove",r),null==i||i.removeEventListener("mouseover",r)}},[null==l?void 0:l.current,C,w,u,S,h]);let L=(0,s.useRef)(!1);(0,s.useEffect)(()=>{let e=e=>{var t,l,n;return null===(n=r())||void 0===n?void 0:null===(l=n.filter)||void 0===l?void 0:null===(t=l.call(n,t=>{var l,n;return(null===(l=(n=E.current).getItemId)||void 0===l?void 0:l.call(n,null==t?void 0:t.item))===e}))||void 0===t?void 0:t[0]},t=t=>{var l,i;if(!(null==n?void 0:n.current)||!o||!r)return;let a=e(o);p.current={x:a.x,y:a.y},N.current=[],g.current=nv(t,a,n.current),S([o]),null===(l=(i=E.current).updateSelectedList)||void 0===l||l.call(i,{itemsKeyInSelectedArea:N.current})},i=e=>{if(!h||f.current)return;if("ShiftLeft"===e.code||"ShiftRight"===e.code){v(!0),null==b||b(e=>(y.current=e,e)),m.current=!0,L.current=!0,document.body.style.overflow="hidden";return}if(!e.shiftKey)return;if(e.stopPropagation(),e.preventDefault(),!!["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(e.code))"ArrowDown"===e.code?t("down"):"ArrowUp"===e.code?t("up"):"ArrowLeft"===e.code?t("left"):"ArrowRight"===e.code&&t("right")},a=e=>{if(!e.shiftKey&&L.current){var t,l;null===(t=(l=E.current).updateSelectedList)||void 0===t||t.call(l,{itemsKeyInSelectedArea:N.current,isNotInMulti:!0}),v(!1),null==b||b(e=>(null==I||I(y.current,e),y.current=e,e)),m.current=!1,L.current=!1,document.body.style.overflow="",N.current=[],k([])}},s=ns()(e=>{L.current&&(e.preventDefault(),e.deltaY<0?t("down"):e.deltaY>0?t("up"):e.deltaX<0?t("left"):e.deltaX>0&&t("right"))},500,{leading:!0});if(!u&&!!h&&!!(null==l?void 0:l.current)&&!f.current&&!!o&&!w)return document.addEventListener("keydown",i,!0),document.addEventListener("keyup",a,!0),document.addEventListener("wheel",s),()=>{document.removeEventListener("keydown",i,!0),document.removeEventListener("keyup",a,!0),document.removeEventListener("wheel",s)}},[l,S,w,u,o,h])}({containerEleRef:r,scrollEleRef:i,getItemPosList:M,stickyArea:a,updateSelectedList:E,latestClickedCardId:y,getItemId:l,isDisabledMultiSelected:!c},t),(0,s.useEffect)(()=>{var e,t;if(!h)return;let r=null==n?void 0:null===(e=n.filter(e=>{var t;return!(null==v?void 0:null===(t=v(e))||void 0===t?void 0:t.disabled)}))||void 0===e?void 0:e.length,i=null==C?void 0:null===(t=C.filter(e=>null==n?void 0:n.find(t=>(null==l?void 0:l(t))===(null==l?void 0:l(e)))))||void 0===t?void 0:t.length;if(0===i)null==w||w(!1),null==b||b(!1);else{null==w||w(!0);let e=i>=g||i===r;null==b||b(e)}},[C,n,w,b,v,g,h]),(0,s.useEffect)(()=>{if(!h)return;let e=$.listen($.EVENT.batchToolBarCheckAllChanged,e=>{var t;if(!h)return;let{checked:r}=e;E({itemsKeyInSelectedArea:null==n?void 0:null===(t=n.filter(e=>{var t;return!(null==v?void 0:null===(t=v(e))||void 0===t?void 0:t.disabled)}))||void 0===t?void 0:t.map(e=>(null==l?void 0:l(e))||""),isNotInMulti:!0,allSelect:r,allDel:!r})});return()=>{e()}},[n,v,l,E,h]),{updateSelectedList:E,withMask:T,latestClickedCardId:y}}var ny={Pending:0,0:"Pending",Reviewing:1,1:"Reviewing",Public:2,2:"Public",SelfSee:3,3:"SelfSee"},nj=l("933524"),nk=l("227831"),nN=l("234235"),nS={item:"YyyT9cuj",cover:"r4Xik7uR",payTag:"i40Vhjmg",image:"NIAEX1XE",content:"kkkb5D0g",title:"zGJOAgka",name:"D1utYGbz",singleLine:"CvV05rOP",updatedTag:"_HHVTZFG",statusTag:"WCUh9RHr",count:"JKoOKg6r",episode:"FuzBeZQW",unreadMixCount:"r4z9vnr2",iconSvg:"zK5c_l0I",tag:"S_zw3qQq",more:"_wpcG7OQ",moreIcon:"lmjyjS72",active:"KczpfFBr",morePanel:"NTgFFNYm",visible:"giS507GB",btn:"K39P8eIL",pointer:"OXpG8dML",mixCard:"dxnn9TsC"},nE=l("278670"),nL=l("341623"),nT=l("337835"),nM="LZwjF2_Q",nR="xPiKZWuE",nD="kIAnNEA9",nP="pX1gqhOZ";let nA=()=>{};var nF=e=>{var t;let{userInfo:l,mixInfo:n,onChangeIntro:r,textMaxLength:i}=e,a=(0,s.useRef)(null),d=(0,s.useRef)(null),[u,c]=(0,s.useState)(null!==(t=null==n?void 0:n.desc)&&void 0!==t?t:""),[v,m]=(0,s.useState)(!1),[h,p]=(0,s.useState)(!1);(0,s.useRef)([]);let[g,_]=(0,s.useState)({statusCode:0,hasMore:!0,hasFetchData:!1,data:[],preQueryIds:"",searchText:""}),[x,C]=(0,s.useState)({statusCode:0,cursor:0,hasMore:!0,hasFetchData:!1,data:[]});return(0,s.useEffect)(()=>{setTimeout(()=>{a.current.setContent(null==n?void 0:n.desc)})},[]),(0,o.jsxs)("div",{className:nM,ref:d,onClick:()=>{var e;null===(e=a.current)||void 0===e||e.focus()},children:[(0,o.jsx)(ey.Z,{className:nR,ref:a,refOuterContainer:d,placeholder:"请输入合集的简介",onChange:e=>{var t;let l=null===(t=a.current)||void 0===t?void 0:t.getCommentInfo();c(e),void 0!==e&&void 0!==l&&r(e,l.textExtra.map(e=>({start:e.start,end:e.end,type:e.type,user_id:e.user_id,sec_uid:e.sec_uid})))},atUserSearchData:g,loadSearchAtData:nA,atUserDefaultData:x,loadMoreDefaultAtData:nA,onEditFocus:nA,onEditBlur:nA,handlePublishClick:nA,isAtIconSelected:!1,setIsAtIconSelected:nA,isAtIconPoint:!1,setIsAtIconPoint:nA}),(0,o.jsxs)("div",{className:f()(nD,{[nP]:i<(null==u?void 0:u.length)}),children:[null==u?void 0:u.length,"/",i]})]})},nB={container:"N6cnXTU3",close:"_KbRjxCG",title:"oXQJUujM",avatarEditorContainer:"XdIbgAm5",leftContainer:"GAIRjhHP",mainEditor:"Fn_mUeYG",loading:"F7FL5rx4",img:"MoghN9cA",slideContainer:"rMpEqVAf",pointer:"zpxkYMu7",disabled:"RiZhMjsc",slider:"umt51U3u",progressContainer:"ADjkgXOC",progress:"IIgXnhn8",progressButton:"I5R6RuEV",rightContainer:"p3pjQ9Lb",topContainer:"pi3csZ1X",avatarPreview:"ust_Zr0s",avatarPreviewWord:"vHMvjjru",reUpload:"BscDhGSj",buttonContainer:"Iijm6Wcr",button:"yCW7CvRd"};let nU=(0,s.forwardRef)((e,t)=>(0,o.jsxs)("svg",(0,R._)((0,a._)({width:32,height:32,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:[(0,o.jsxs)("g",{clipPath:"url(#increaseGlass_svg__clip0_1612_33738)",children:[(0,o.jsx)("circle",{cx:16,cy:16,r:15.5}),(0,o.jsx)("path",{clipRule:"evenodd",d:"M15 8.667a6.333 6.333 0 1 0 3.982 11.258l2.449 2.449a.667.667 0 1 0 .943-.943l-2.449-2.449A6.333 6.333 0 0 0 15 8.666zM10 15a5 5 0 1 1 10 0 5 5 0 0 1-10 0zm5.667-2a.667.667 0 1 0-1.334 0v1.337l-1.329.002a.667.667 0 0 0 .002 1.333l1.327-.002V17a.667.667 0 0 0 1.334 0v-1.332L17 15.667a.667.667 0 0 0-.002-1.334l-1.332.002V13z"})]}),(0,o.jsx)("defs",{children:(0,o.jsx)("clipPath",{id:"increaseGlass_svg__clip0_1612_33738",children:(0,o.jsx)("path",{fill:"#fff",d:"M0 0h32v32H0z"})})})]}))),nV=(0,s.forwardRef)((e,t)=>(0,o.jsxs)("svg",(0,R._)((0,a._)({width:32,height:32,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:[(0,o.jsxs)("g",{clipPath:"url(#reduceGlass_svg__clip0_1628_36241)",children:[(0,o.jsx)("circle",{cx:16,cy:16,r:15.5}),(0,o.jsx)("path",{clipRule:"evenodd",d:"M8.667 15a6.333 6.333 0 1 1 11.258 3.982l2.449 2.449a.667.667 0 0 1-.943.943l-2.449-2.449A6.333 6.333 0 0 1 8.666 15zM15 10a5 5 0 1 0 0 10 5 5 0 0 0 0-10zm-2.667 5c0-.368.299-.667.667-.667h4a.667.667 0 0 1 0 1.334h-4a.667.667 0 0 1-.667-.667z"})]}),(0,o.jsx)("defs",{children:(0,o.jsx)("clipPath",{id:"reduceGlass_svg__clip0_1628_36241",children:(0,o.jsx)("path",{fill:"#fff",d:"M0 0h32v32H0z"})})})]}))),nO=e=>{var t;let{avatarUrl:l,onCloseAvatarEditor:n,onSaveAvatar:r,openFileSelector:i,setUploadUri:a}=e,[d,u]=(0,s.useState)(!1),{dispatch:c,userInfo:v}=null!==(t=(0,eH.useUserInfoContext)())&&void 0!==t?t:{},m=(0,s.useRef)(d);m.current=d;let{canvasRef:p,imgRef:g,imgStyle:_,changeScale:x,enlargeScale:C,imgViewBox:w,changeImgViewBox:b}=eP(),{sliderProgressRef:I,sliderButtonRef:y}=eA({changeScale:x,enlargeScale:C});return eF({imgRef:g,imgViewBox:w,changeImgViewBox:b,enlargeScale:C,changeScale:x}),(0,o.jsxs)("div",{className:nB.container,children:[(0,o.jsx)(ew.z,{svg:(0,o.jsx)(nL.Z,{}),className:f()(nB.close),onClick:()=>{!m.current&&n()}}),(0,o.jsx)("div",{className:nB.title,children:"修改合集封面"}),(0,o.jsxs)("div",{className:nB.avatarEditorContainer,children:[(0,o.jsxs)("div",{className:nB.leftContainer,children:[(0,o.jsxs)("div",{className:nB.mainEditor,children:[(0,o.jsx)("img",{className:nB.img,style:_,src:l,ref:g,draggable:!1}),d&&(0,o.jsx)(h.gb,{className:nB.loading})]}),(0,o.jsxs)("div",{className:nB.slideContainer,children:[(0,o.jsx)(F.Z,{width:32,height:32,viewBox:"0 0 32 32",src:nV,className:f()(nB.pointer,{[nB.disabled]:0===C}),onClick:()=>x(C-1)}),(0,o.jsx)("div",{className:nB.slider,children:(0,o.jsx)("div",{className:nB.progressContainer,ref:I,children:(0,o.jsx)("div",{className:nB.progress,style:{width:`${C/9*100}%`},children:(0,o.jsx)("div",{className:nB.progressButton,ref:y})})})}),(0,o.jsx)(F.Z,{width:32,height:32,viewBox:"0 0 32 32",src:nU,className:f()(nB.pointer,{[nB.disabled]:9===C}),onClick:()=>x(C+1)})]})]}),(0,o.jsx)("div",{className:nB.rightContainer,children:(0,o.jsxs)("div",{className:nB.topContainer,children:[(0,o.jsx)("canvas",{className:nB.avatarPreview,ref:p}),(0,o.jsx)("div",{className:nB.avatarPreviewWord,children:"封面预览"}),(0,o.jsx)("div",{className:nB.reUpload,onClick:i,children:"重新上传封面"})]})})]}),(0,o.jsxs)("div",{className:nB.buttonContainer,children:[(0,o.jsx)(D.Button,{theme:"solid",className:nB.button,onClick:()=>{!m.current&&n()},type:"secondary",children:"取消"}),(0,o.jsx)(D.Button,{theme:"solid",className:nB.button,onClick:()=>{var e;return null===(e=p.current)||void 0===e?void 0:e.toBlob(async e=>{if(null!==e&&!m.current){u(!0),m.current=!0;let l=new(eS())({userId:v.info.uid,appId:eE.APP_ID,imageConfig:{serviceId:eE.IMAGEX_AVATAR_SERVER_ID}}),{stsToken:n,statusCode:i}=await (0,eL.$y)()||{};if(0===i){var t;let i=null==l?void 0:null===(t=l.addFile)||void 0===t?void 0:t.call(l,{file:e,stsToken:n,type:"image"});l.on("complete",async t=>{var l,n;let i=(null==t?void 0:null===(l=t.uploadResult)||void 0===l?void 0:l.ImageUri)||(null==t?void 0:null===(n=t.uploadResult)||void 0===n?void 0:n.Uri);i?(a(i),r(window.URL.createObjectURL(e))):ei.F.info("保存失败"),u(!1)}),l.on("error",e=>{u(!1),ei.F.info("保存失败")}),l.on("progress",e=>{}),l.start(i)}else u(!1),ei.F.info("保存失败")}})},children:"保存"})]})]})};var nH={container:"G2sSXNaM",box:"ZqbPC1mH",close:"pCoAXYyh",header:"UWBqJGjd",title:"UaYb9LUr",avatar:"dlQK5oeQ",images:"iMDLxYpp",avatarBtn:"TPfiDUKd",upload:"ednuHpsx",uploadIcon:"wwghnwDJ",uploadDesc:"p5CLCsHq",avatarText:"H2t2W1vk",name:"i2SxG0_v",nameTitle:"ZSlkJ7dS",nameInput:"MfBHZZDQ",nameCount:"LueanUv6",intro:"AfhO8cBK",introTitle:"orXH0hjn",introInput:"ORNl2WTm",buttons:"sjGNHYIe",save:"Cn2mTKju",cancel:"WSu5JIhd",hide:"MEnhVL5P",necessaryText:"K0G9jvxs"};let nz=e=>{let{changeImgUrl:t,avatarSrcChange:l,originUrl:n}=e,[r,i]=(0,s.useState)(!1),a=(0,s.useRef)(),o=(0,s.useRef)();return(0,s.useEffect)(()=>{let e=a.current,l=null;if(e){let n="",r=()=>{var r;let a=null==e?void 0:e.files[0];if(!a)return;if(!["image/jpeg","image/png"].includes(a.type)){ei.F.info("文件格式错误");return}if(a.size>5242880){ei.F.info("文件超过5MB请重新选择");return}n=window.URL.createObjectURL(a);let o=null!==(r=C.Le.getConfig(C.gI.MixEditorUrlList))&&void 0!==r?r:[];o.push(n),C.Le.setConfig(C.gI.MixEditorUrlList,o),(l=new Image).onload=()=>{if(!l)return;let{width:r,height:a}=l;r<100||a<100?ei.F.info("图片分辨率需大于100\xd7100请重新选择"):(t(n),i(!0)),l=null,e.value=""},l.onerror=()=>{ei.F.info("图片读取失败,请重新选择"),l=null,e.value=""},l.src=n};return null==e||e.addEventListener("change",r),()=>{null==e||e.removeEventListener("change",r),l=null}}},[]),{inputRef:a,imgRef:o,showAvatarEditor:r,onCloseAvatarEditor:()=>{i(!1),t(n)},onSaveAvatar:e=>{l(),i(!1),t(e)},openFileSelector:()=>{var e,t;null===(t=a.current)||void 0===t||null===(e=t.click)||void 0===e||e.call(t)}}};var nZ=new eU.h({compilationCreateClick:{eventName:"compilation_create_click",params:{}},createCompilationComfirm:{eventName:"create_compilation_comfirm",params:{compilation_id:"",compilation_name:"",status:"",function_name:""}},dragDropCompilation:{eventName:"drag_drop_compilation",params:{compilation_id:"",compilation_name:"",author_id:"",status:"",before_rank_order:0,after_rank_order:0}},modifyCompilationClick:{eventName:"modify_compilation_click",params:{compilation_id:"",compilation_name:"",status:""}},postManageClick:{eventName:"post_manage_click",params:{compilation_id:"",compilation_name:"",status:""}},addPostClick:{eventName:"add_post_click",params:{compilation_id:"",compilation_name:"",status:""}},modifyCompilationComfirm:{eventName:"modify_compilation_comfirm",params:{compilation_id:"",compilation_name:"",status:"",function_name:""}},compilationPostConfirm:{eventName:"compilation_post_confirm",params:{tab_name:"",compilation_id:"",compilation_name:"",status:"",is_effective_operation:0,function_name:""}},dragDropCompilationPost:{eventName:"drag_drop_compilation_post",params:{compilation_id:"",compilation_name:"",status:"",author_id:"",group_id:"",before_rank_order:0,after_rank_order:0}}});let nW=e=>{var t,l,n,r;let{userInfo:i,mixInfo:a,onClose:d,edit:u,title:c,type:v}=e,m=null!==(t=null==a?void 0:a.mixName)&&void 0!==t?t:"",h=null!==(l=null==a?void 0:a.desc)&&void 0!==l?l:"",p=null!==(n=null==a?void 0:a.cover)&&void 0!==n?n:"",g=null!==(r=null==a?void 0:a.coverUri)&&void 0!==r?r:"",[_,x]=(0,s.useState)(p),[C,w]=(0,s.useState)(g),[b,I]=(0,s.useState)(m),[y,j]=(0,s.useState)(h),k=(0,s.useRef)(h),N=(0,s.useRef)(),S=(0,s.useRef)(!1),E=(0,s.useRef)(!1),L=(0,s.useMemo)(()=>{let e=0===b.trim().length,t=0===_.length,l=b===m,n=y===h,r=_===p,i=(null==y?void 0:y.length)>200;return e||t||l&&n&&r||i},[_,y,b,m,h,p]),T=async()=>{if(E.current)return;if((null==y?void 0:y.length)>200){ei.F.info("简介超过最大限制");return}let e=await u({mixId:null==a?void 0:a.mixId,name:b,desc:y,avatar:_,avatarUri:C});e?ei.F.info(e):(ei.F.info("操作成功"),d())},M=e=>{"create"===v?nZ.sendLog("createCompilationComfirm",{compilation_id:"",compilation_name:"",status:"private",function_name:"button"===e?"cancel_icon":"cancel_x"}):"edit"===v&&nZ.sendLog("modifyCompilationComfirm",{compilation_id:null==a?void 0:a.mixId,compilation_name:m,status:(null==a?void 0:a.status)===ny.Public?"public":"private",function_name:"button"===e?"cancel_icon":"cancel_x"}),d()},{inputRef:R,imgRef:P,showAvatarEditor:A,onCloseAvatarEditor:F,onSaveAvatar:B,openFileSelector:U}=nz({changeImgUrl:e=>{x(e)},avatarSrcChange:()=>S.current=!0,originUrl:p});return(0,o.jsxs)(ex.T6,{className:nH.container,children:[(0,o.jsx)("input",{type:"file",accept:".png,.jpeg,.jpg",style:{display:"none"},ref:R}),(0,o.jsxs)("div",{"data-bytereplay-mask":"strict",className:f()(nH.box,{[nH.hide]:A}),children:[(0,o.jsx)(ew.z,{initialMounted:!0,svg:(0,o.jsx)(nL.Z,{}),className:f()(nH.close),onClick:()=>M("icon")}),(0,o.jsx)("div",{className:nH.header,children:(0,o.jsx)("span",{className:nH.title,children:c})}),(0,o.jsxs)("div",{className:nH.avatar,children:[_?(0,o.jsxs)("div",{className:nH.images,onClick:()=>{var e;return null===(e=R.current)||void 0===e?void 0:e.click()},children:[(0,o.jsx)("img",{src:_,alt:"avatar",ref:P}),(0,o.jsx)("div",{className:nH.avatarBtn,children:"修改合集封面"})]}):(0,o.jsxs)("div",{className:f()(nH.images,nH.upload),onClick:()=>{var e;return null===(e=R.current)||void 0===e?void 0:e.click()},children:[(0,o.jsx)(ew.z,{initialMounted:!0,svg:(0,o.jsx)(nT.Z,{}),className:f()(nH.uploadIcon)}),(0,o.jsx)("p",{className:f()(nH.uploadDesc,nH.necessaryText),children:"上传合集封面"})]}),(0,o.jsx)("p",{className:nH.avatarText,children:"文件大小不超过5M分辨率至少为100*1001080*1080最佳"})]}),(0,o.jsxs)("div",{className:nH.name,children:[(0,o.jsx)("div",{className:f()(nH.nameTitle,nH.necessaryText),children:"合集标题"}),(0,o.jsxs)("div",{className:nH.nameInput,children:[(0,o.jsx)("input",{type:"text",placeholder:"请输入合集标题",maxLength:20,onChange:e=>{I(e.target.value)},value:b}),(0,o.jsxs)("span",{className:nH.nameCount,children:[b.length,"/20"]})]})]}),(0,o.jsxs)("div",{className:nH.intro,children:[(0,o.jsx)("div",{className:nH.introTitle,children:"合集简介"}),(0,o.jsx)("div",{className:nH.introInput,children:(0,o.jsx)(nF,{textMaxLength:200,mixInfo:a,userInfo:i,onChangeIntro:(e,t)=>{k.current=e,N.current=t,j(e)}})})]}),(0,o.jsxs)("div",{className:nH.buttons,children:[(0,o.jsx)(D.Button,{className:nH.cancel,onClick:()=>M("button"),type:"secondary",theme:"solid",children:"取消"}),(0,o.jsx)(D.Button,{className:nH.save,disabled:L,onClick:T,theme:"solid",children:"保存"})]})]}),A&&(0,o.jsx)(nO,{avatarUrl:_,onCloseAvatarEditor:F,onSaveAvatar:B,openFileSelector:U,onClose:d,setUploadUri:w})]})};var n$=l("927306"),nK=l.n(n$),nY=l("280647"),nG=l("117961"),nq={container:"A45ge1vn",panel:"ALk1Ww8Y",keepAlive:"GMI7dRz6",header:"zQ8NenDh",title:"gxMa2WpJ",mixName:"vBDYv8hM",buttons:"a8sq11Gn",save:"mYtDad8m",cancel:"a2G6eWUI",tabPanel:"LDxUmcxv"},nX=l("897471"),nQ=l.n(nX),nJ=l("855357"),n0=l("68608"),n1=l("172558"),n2=l("263832"),n3=l("800513"),n5={item:"zRN47Sq1",container:"qNGlTpDr"},n6=l("659054"),n4={container:"cPDrcaOY",item:"AhHE71Bq",hasLookPos:"o_qukSPM",overflowXHidden:"d22k0Qt2"};let n7=!1,n9=function(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];n7=e},n8=()=>n7,re={post:"userPost",like:"userLike",favorite_collection:"userCollection",record:"userRecord",watch_later:"userWatchLater"},rt={top:0,bottom:24,left:0,right:16},rl=e=>{var t,l,n;let{info:r,isSelf:i,tab:a,uid:u,rank:c,keyword:v,onClick:m,isInSearch:f,isSpider:h,className:p,id:g,children:_,logParams:x,onNicknameClick:C,showPermissionIcon:w}=e,[b,I]=(0,nj.Z)();(0,s.useRef)(!1);let y={};i&&"post"===a?y.playCount=null==r?void 0:null===(l=r.stats)||void 0===l?void 0:l.playCount:y.likeCount=null==r?void 0:null===(n=r.stats)||void 0===n?void 0:n.diggCount;let j=(0,eq.Wg)(r,d.stringify({previous_page:i?"personal_homepage":"others_homepage",modeFrom:re[a],cursor:null==r?void 0:r.cursor,count:10,secUid:u,enter_method:a}));return(0,o.jsxs)("div",{className:p,id:g,children:[(0,o.jsx)(n6.J,{awemeInfo:r,isSpider:h||(0,em._Q)(),src:null==r?void 0:null===(t=r.video)||void 0===t?void 0:t.cover,playCount:y.playCount,likeCount:y.likeCount,isSelf:i,videoHref:j,onClick:e=>{null==m||m(e)},onNicknameClick:()=>{!j.startsWith("/lvdetail/")&&(null==C||C())},uid:u,onShow:()=>{},showTitle:!0,showHasLook:!1,scene:a,from:"user",logParams:x,userTabKey:a,showPermissionIcon:w}),(0,o.jsx)("div",{className:n4.hasLookPos,ref:b}),_]})},rn=e=>null==e?void 0:e.awemeId,rr=function(){let{panelNoData:e,handleLoadEnd:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return((0,s.useEffect)(()=>{null==t||t(),n9()},[]),e)?(0,o.jsx)(o.Fragment,{children:e}):(0,o.jsx)(V.H,{title:"暂无内容",icon:(0,o.jsx)(lq.Z,{})})};var ri=s.memo(s.forwardRef((e,t)=>{var l,n,r,i,d;let{modalInnerFeedCard:u="",defaultRes:c,currentTab:v,tab:m,uid:f,itemClassName:h,fetchMoreData:p,panelNoMoreData:g,panelNoData:_,pause:w,isInSearch:b,retryTimes:I,setUserPostList:y,updateAwemeList:j,getItemSelectedDisabled:k,topNavHeight:N=60,topOffset:S=0,handleLoadEnd:E,columnCount:L,scrollRef:T,keyword:M,logParams:D,collectionFolderInfo:P,modalEnterFrom:A,scrollContainerEl:F,onClose:B,highLightAwemeId:U,showPermissionIcon:V,defaultFetchAllData:O,getMaskIndex:H,dataListWrapper:Z,sortDataList:W,customDataListCtx:$,getSortId:K,onSort:Y}=e,q=(0,s.useRef)(null),{isSelf:X,currentUserInfoDetail:Q,isSpider:J}=(0,s.useContext)(G)||{},[ee,et]=(0,s.useState)([]),el=(0,s.useRef)(),en=(0,s.useRef)(),er=(0,s.useRef)();er.current=D;let ei=(0,s.useRef)(u);b&&C.Le.setConfig(C.gI.HasInUserSearch,{isUsed:b});let ea=(0,s.useCallback)(e=>{et(e),null==y||y(e),null==j||j(e)},[y,j]),eo=(0,s.useCallback)((e,t)=>(0,o.jsx)(rl,{info:e,isSelf:X,logParams:er.current,tab:m,uid:f,keyword:M,isSpider:J,rank:t,onClick:t=>{null==t||t.preventDefault(),ei.current=u,en.current=e},isInSearch:b,onNicknameClick:()=>{ei.current="author_card",en.current=e},showPermissionIcon:V}),[]),es=null===(n=el.current)||void 0===n?void 0:null===(l=n.getDataList)||void 0===l?void 0:l.call(n),ed=(0,s.useMemo)(()=>{var e;return null!==(e=null==Z?void 0:Z(null!=es?es:[]))&&void 0!==e?e:es},[es,Z]),eu=nb({scrollEl:null==T?void 0:T.current,containerEl:null!==(d=null==q?void 0:q.current)&&void 0!==d?d:void 0}),ec=(0,s.useRef)({height:"auto",paddingBottom:"133%",borderRadius:"12px"}),{withMask:ev,updateSelectedList:em}=nI((0,R._)((0,a._)({maskShadowStyle:ec.current,getItemId:rn,dataList:null!=W?W:ed,isSupportMulti:!0},eu),{firstItem:null===(i=el.current)||void 0===i?void 0:null===(r=i.getTargetNode)||void 0===r?void 0:r.call(i,0),getColumnCount:()=>L,itemMargin:rt,getItemSelectedDisabled:k}));(0,s.useImperativeHandle)(t,()=>{var e,t,l,n,r,i,a,o;return{loadMoreData:null===(e=el.current)||void 0===e?void 0:e.loadMoreData,locateSelectVideo:null===(t=el.current)||void 0===t?void 0:t.locateSelectVideo,reset:null===(l=el.current)||void 0===l?void 0:l.reset,reload:null===(n=el.current)||void 0===n?void 0:n.reload,getTotal:null===(r=el.current)||void 0===r?void 0:r.getTotal,resetRes:null===(i=el.current)||void 0===i?void 0:i.resetRes,setScrollData:null===(a=el.current)||void 0===a?void 0:a.setScrollData,getDataList:null===(o=el.current)||void 0===o?void 0:o.getDataList,updateSelectedList:em}});let ef=(0,s.useMemo)(()=>K?lK:lA.Z,[]);return(0,o.jsx)(lO,{disabled:!1,children:(0,o.jsx)("div",{ref:q,className:n4.overflowXHidden,children:(0,o.jsx)(ef,{ref:el,highLightAwemeId:U,handleLoadEnd:E,defaultDataList:(null==c?void 0:c.data)||[],defaultHasMoreFlag:(null==c?void 0:c.hasMore)||1,defaultStatusCode:(null==c?void 0:c.statusCode)||0,defaultWhaleDecisionCustom:null==c?void 0:c.whaleDecisionCustom,containerClassName:n4.container,itemClassName:null!=h?h:n4.item,panelNoData:(0,o.jsx)(rr,{panelNoData:_,handleLoadEnd:E}),panelNoMoreData:g,scrollContainerEl:F,skeletonNum:0,renderItem:eo,withMask:ev,fetchMoreData:async()=>{(0,z.B1)({tag:x.w3.fetchers.fetcher_user_start,once:!0});let e=await p();return(0,z.B1)({tag:x.w3.fetchers.fetcher_user_end,once:!0}),e},setDataList:ea,pause:null!=w?w:v!==m,retryTimes:I,blockType:"post"===m||"like"===m,listFilterFn:(e,t)=>{let l=e.map(e=>null==e?void 0:e.awemeId),n=(t||[]).filter(e=>!l.includes(null==e?void 0:e.awemeId));return e.concat(n||[])},defaultFetchAllData:O,getMaskIndex:H,customDataListCtx:$,getSortId:K,onSort:Y})})})}));let ra=(0,s.createContext)(null),ro=(0,s.createContext)(null),rs=e=>{var t;let{mixInfo:l,children:n}=e,r=null!==(t=null==l?void 0:l.totalEpisode)&&void 0!==t?t:0,[i,a]=(0,s.useState)(r),d=(0,s.useRef)(r),u=(0,s.useRef)(Array(r+1).fill(1).map((e,t)=>({val:t,id:""}))),c=(0,s.useRef)(new Map),v=(0,s.useRef)(new Map),[m,f]=(0,s.useState)([]),h=(0,s.useRef)(0===i),p=(0,s.useRef)(!1),g={getCurrentAwemeIDList:()=>Array.from(c.current.keys()),mapIndexArray:e=>{var t,l;return null!==(l=null===(t=u.current[e])||void 0===t?void 0:t.val)&&void 0!==l?l:-1},getIndexArrayAwemeId:e=>{var t,l;return null!==(l=null===(t=u.current[e])||void 0===t?void 0:t.id)&&void 0!==l?l:""},isInCurrentList:e=>c.current.has(e),getCurrentNumber:e=>c.current.get(e),getAwemeInfo:e=>{var t;return null===(t=v.current)||void 0===t?void 0:t.get(e)},isInOriginalList:e=>{var t;return(null===(t=e.mixInfo)||void 0===t?void 0:t.mixId)===l.mixId},getOriginNumber:e=>{var t,l;return null!==(l=null===(t=e.mixInfo)||void 0===t?void 0:t.currentEpisode)&&void 0!==l?l:-1},getIndexRecord:()=>{let e={};return g.getCurrentAwemeIDList().forEach(t=>{e[c.current.get(t).toString()]=t}),e}},_={pureUpdate:(e,t)=>{c.current.set(e,t)},remove:e=>{let t=c.current.get(e);if(!!t)c.current.delete(e),g.getCurrentAwemeIDList().forEach(e=>{let l=c.current.get(e);l>t&&_.pureUpdate(e,l-1)})},updateIndexArray:(e,t,l)=>{u.current[e]={val:t,id:l}},syncMixAwemeList:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",l=g.getIndexRecord(),n=[],r=Object.keys(l).length;for(let e=1;e<=r;e++){let t=l[`${e}`];if(!t)break;n.push(g.getAwemeInfo(t))}f(l=>e?n:(l.forEach((e,l)=>{!g.isInCurrentList(null==e?void 0:e.awemeId)&&(n="add"===t?[...n,e]:[...n.slice(0,l),e,...n.slice(l)])}),n))},updateMixCount:e=>{d.current=e,a(e)}},x=(0,s.useCallback)(e=>{let t=[];return e.forEach(e=>{let{awemeId:l}=e;if(!v.current.has(l)&&v.current.set(l,e),!g.isInOriginalList(e))return;let n=g.getOriginNumber(e),r=g.mapIndexArray(n);!g.getIndexArrayAwemeId(n)&&_.updateIndexArray(n,r,l),r>0&&!g.isInCurrentList(l)&&(_.pureUpdate(l,r),_.syncMixAwemeList(),t.push(e))}),!h.current&&c.current.size===d.current&&(h.current=!0),t},[]),C=(0,s.useCallback)(e=>{let t=d.current;e.forEach(e=>{if(!g.isInCurrentList(e.awemeId))t++,_.pureUpdate(e.awemeId,t),_.syncMixAwemeList(!1,"add"),g.isInOriginalList(e)&&_.updateIndexArray(g.getOriginNumber(e),t,e.awemeId)}),_.updateMixCount(t)},[]),w=(0,s.useCallback)(e=>{let t=d.current;e.forEach(e=>{if(!!g.isInCurrentList(e.awemeId)){if(t--,_.remove(e.awemeId),g.isInOriginalList(e)){let t=g.getOriginNumber(e),l=g.mapIndexArray(t);_.updateIndexArray(t,-1,e.awemeId),u.current=u.current.map(e=>{let{val:t,id:n}=e;return{val:t>l?t-1:t,id:n}})}}}),_.updateMixCount(t)},[]),b=(0,s.useCallback)((e,t)=>{let l=g.getCurrentNumber(e);if(!l||l===t)return;!p.current&&(p.current=!0),g.getCurrentAwemeIDList().forEach(e=>{let n=g.getCurrentNumber(e);if(n===l){_.pureUpdate(e,t);return}if(l<t){if(n<l||n>t)return;_.pureUpdate(e,n-1);return}if(!(n<t)&&!(n>l))_.pureUpdate(e,n+1)});let n=g.getAwemeInfo(e);g.getOriginNumber(n)>0&&(_.updateIndexArray(g.getOriginNumber(n),t,e),l>t?u.current=u.current.map(e=>{let{val:n,id:r}=e;return{val:n>0&&n<=t&&n>l?n+1:n,id:r}}):l<t&&(u.current=u.current.map(e=>{let{val:n,id:r}=e;return{val:n>0&&n>l&&n<=t?n-1:n,id:r}})))},[]),I=(0,s.useCallback)(e=>g.getCurrentNumber(e),[]),y=(0,s.useCallback)(()=>{var e,t,n;let r={mixId:l.mixId,itemIds:"",delItemIds:"",addItemIds:""},i=[],a=u.current.filter(e=>-1===e.val).map(e=>e.id),o=Array(d.current+1);g.getCurrentAwemeIDList().forEach(e=>{let t=g.getAwemeInfo(e);o[g.getCurrentNumber(e)]=t}),o.forEach(e=>{-1===g.getOriginNumber(e)&&i.push(e.awemeId)}),r.itemIds=o.filter(e=>e.awemeId).map(e=>e.awemeId).join(","),a.length&&(r.delItemIds=a.join(",")),i.length&&(r.addItemIds=i.join(","));let s=(null==r?void 0:null===(e=r.delItemIds)||void 0===e?void 0:e.length)>0||(null==r?void 0:null===(t=r.addItemIds)||void 0===t?void 0:t.length)>0||(null==u?void 0:null===(n=u.current)||void 0===n?void 0:n.some((e,t)=>{let{val:l}=e;return l!==t}));return{result:r,currentAwemeList:o,hasOperate:s}},[]),j=(0,s.useCallback)(e=>!!g.isInCurrentList(e.awemeId)||!!(c.current.size<100)||!(g.getCurrentAwemeIDList().filter(e=>!g.isInOriginalList(g.getAwemeInfo(e))).length>=100)&&!0,[]),k=(0,s.useCallback)(()=>{_.syncMixAwemeList(!0)},[]);return(0,o.jsx)(ro.Provider,{value:{loadVideos:x,addVideos:C,removeVideos:w,moveVideo:b,getManageResult:y,getCurrentNumber:I,checkCanAddToMix:j,syncMixAwemeListOnTabChange:k,mixCount:i,isOldMixAwemeListLoadedRef:h},children:(0,o.jsx)(ra.Provider,{value:{sortDataList:m,setSortDataList:f},children:n})})},rd=(0,s.createContext)(null),ru=e=>{let{value:t,children:l}=e;return(0,o.jsx)(rd.Provider,{value:t,children:l})},rc=()=>(0,s.useContext)(rd),rv=(0,s.createContext)(()=>{});l("76375");var rm=l("276343"),rf={listContainer:"yJN03xGz",container:"lYP0ujrY",content:"Qys7HZ3U",loading:"SF0pM6eS"};let rh=e=>{let{permissionValue:t="public",changePermissionValue:l}=e;return(0,o.jsx)("div",{className:rf.listContainer,children:(0,o.jsxs)(D.RadioGroup,{className:"test",value:t,onChange:e=>{var t;l(null==e?void 0:null===(t=e.target)||void 0===t?void 0:t.value)},direction:"horizontal",children:[(0,o.jsx)(D.Radio,{value:"public",children:(0,o.jsx)("span",{children:"公开\xb7所有人可见"})}),(0,o.jsx)(D.Radio,{value:"friend",children:(0,o.jsx)("span",{children:"互相关注的人可见"})}),(0,o.jsx)(D.Radio,{value:"secret",children:(0,o.jsx)("span",{children:"私密\xb7仅自己可见"})})]})})},rp=e=>{let{selectItems:t=[],onCancel:l,currentSubTab:n,currentTab:r,onConfirm:i,resetScrollList:a}=e,[d,u]=(0,s.useState)(!1),[c,v]=(0,s.useState)(!1),[m,f]=(0,s.useState)("public"),p={public:"public",friend:"mutual_followers",secret:"private"},{mixItems:g,seriesItems:_,payItems:x}=(0,s.useMemo)(()=>{let e=t.filter(e=>{var t,l;return!!(null===(t=e.mixInfo)||void 0===t?void 0:t.mixId)&&!(null===(l=e.seriesInfo)||void 0===l?void 0:l.seriesId)}),l=new Set;e.forEach(e=>{var t;let n=null===(t=e.mixInfo)||void 0===t?void 0:t.mixId;!l.has(n)&&l.add(n)});let n=t.filter(e=>{var t;return!!(null===(t=e.seriesInfo)||void 0===t?void 0:t.seriesId)}),r=new Set;return n.forEach(e=>{var t;let l=null===(t=e.seriesInfo)||void 0===t?void 0:t.seriesId;!r.has(l)&&r.add(l)}),{mixItems:e,seriesItems:n,payItems:t.filter(e=>{var t;return!!(null==e?void 0:null===(t=e.chargeInfo)||void 0===t?void 0:t.is_charge_content)}),mixSet:l,seriesSet:r}},[t]),{onlyHasMix:C,isAllCanNotOprate:w,hasCanNotOprateItem:b}=(0,s.useMemo)(()=>{let e=[...new Set([...x.map(e=>e.awemeId),..._.map(e=>e.awemeId)])];return{onlyHasMix:g.length>0&&0===_.length&&0===x.length,hasCanNotOprateItem:x.length>0||_.length>0,isAllCanNotOprate:e.length===t.length}},[g,_,x,t]),I=(0,s.useCallback)(async()=>{var e;if(w){if("public"===m){ei.F.info("已经设为所有人可见");return}ei.F.info("付费作品/短剧需公开可见,不支持修改权限");return}v(!0);let l=new Date().getTime(),i=t.filter(e=>{var t,l;return!(null===(t=e.seriesInfo)||void 0===t?void 0:t.seriesId)&&!(null===(l=e.chargeInfo)||void 0===l?void 0:l.is_charge_content)}).map(e=>e.awemeId),{isSuccess:o=!1,fatalIds:s=[],statusCode:d=-1,statusMsg:u="操作失败, 请稍后重试"}=null!==(e=await (0,rm.TY)({awemeIds:i.join(","),actionType:m}))&&void 0!==e?e:{};if(U.logInstance.sendLog("functionDeleteStatus",{tab_name:r,sub_tab_name:n,function_name:"permission_setting",status:0===d?1:0,item_cnt:i.length}),U.logInstance.sendLog("multiDeletePerformance",{status_code:d,type:m,fail_cnt:s.length,cost:new Date().getTime()-l,item_cnt:i.length}),v(!1),0!==d){ei.F.info(u),null==a||a({method:"permission",fatalIdsCount:0,permissionValue:m,modifyItemIds:[]});return}if(o){b?"public"===m?ei.F.info("已经设为所有人可见"):ei.F.info("已完成批量操作"):"public"===m?ei.F.info("已经设为所有人可见"):"friend"===m?ei.F.info("已经设为互相关注的人可见"):"secret"===m&&ei.F.info("已经设为仅自己可见"),null==a||a({method:"permission",fatalIdsCount:0,permissionValue:m,modifyItemIds:i});return}if(s.length>0){ei.F.info(`已完成批量操作。${s.length}个作品操作失败,请稍后再试`),null==a||a({method:"permission",fatalIdsCount:s.length,permissionValue:m,modifyItemIds:i.filter(e=>!s.includes(e))});return}},[t,a,m,w,b,n,r]),y=(0,s.useMemo)(()=>C?{content:"你选中了公开可见的合集作品,更改权限作品将自动移出合集",title:"选中的合集作品将从合集中移除"}:{title:"仅对普通作品生效",content:"设为非公开作品后,合集作品将自动移出合集,付费作品和短剧作品仍公开可见"},[C]);return d?(0,o.jsx)(lx,{className:rf.container,onCancel:async()=>{null==l||l(),U.logInstance.sendLog("removeConfirmClick",{tab_name:r,sub_tab_name:n,item_cnt:t.length,function_name:"cancel",last_function:"setting"})},onConfirm:async()=>{if(!c)U.logInstance.sendLog("removeConfirmClick",{tab_name:r,sub_tab_name:n,item_cnt:t.length,function_name:"confirm",last_function:"setting"}),await I(),null==i||i()},title:y.title,renderContent:()=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("p",{className:rf.content,children:y.content}),c&&(0,o.jsx)(h.gb,{className:rf.loading})]}),closeBtn:!1,maskClosable:!1,cancelBtnText:"取消",confirmBtnText:"确认"}):(0,o.jsx)(lx,{className:rf.container,onCancel:()=>{null==l||l(),U.logInstance.sendLog("functionConfirmClick",{tab_name:r,sub_tab_name:n,item_cnt:t.length,status:p[m],function_name:"cancel"})},onConfirm:async()=>{if(!c){if(U.logInstance.sendLog("functionConfirmClick",{tab_name:r,sub_tab_name:n,item_cnt:t.length,status:p[m],function_name:"confirm"}),(b||C)&&"public"!==m&&!w){u(!0);return}await I(),null==i||i()}},title:"修改作品权限",closeBtn:!1,renderContent:()=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(rh,{permissionValue:m,changePermissionValue:f}),c&&(0,o.jsx)(h.gb,{className:rf.loading})]}),cancelBtnText:"取消",confirmBtnText:"确认",maskClosable:!1})};var rg={container:"pP3SeVw0",content:"EatFay3z",loading:"UZqVFED_"},r_=e=>{let{selectItems:t=[],onCancel:l,currentTab:n,currentSubTab:r,onConfirm:i,resetScrollList:a}=e||{},[d,u]=(0,s.useState)(!1),[c,v]=(0,s.useState)(!1),{mixItems:m,seriesItems:f,payItems:p,seriesSet:g,mixSet:_}=(0,s.useMemo)(()=>{let e=t.filter(e=>{var t,l;return!!(null===(t=e.mixInfo)||void 0===t?void 0:t.mixId)&&!(null===(l=e.seriesInfo)||void 0===l?void 0:l.seriesId)}),l=new Set;e.forEach(e=>{var t;let n=null===(t=e.mixInfo)||void 0===t?void 0:t.mixId;!l.has(n)&&l.add(n)});let n=t.filter(e=>{var t;return!!(null===(t=e.seriesInfo)||void 0===t?void 0:t.seriesId)}),r=new Set;return n.forEach(e=>{var t;let l=null===(t=e.seriesInfo)||void 0===t?void 0:t.seriesId;!r.has(l)&&r.add(l)}),{mixItems:e,seriesItems:n,payItems:t.filter(e=>{var t;return!!(null==e?void 0:null===(t=e.chargeInfo)||void 0===t?void 0:t.is_charge_content)}),mixSet:l,seriesSet:r}},[t]),{onlyHasMix:x,isAllCanNotOprate:C,hasCanNotOprateItem:w}=(0,s.useMemo)(()=>{let e=[...new Set([...p.map(e=>e.awemeId),...f.map(e=>e.awemeId)])];return{onlyHasMix:m.length>0&&0===f.length&&0===p.length,hasCanNotOprateItem:p.length>0||f.length>0,isAllCanNotOprate:e.length===t.length}},[m,f,p,t]),b=0===m.length?`删除后作品将无法找回${"private_post"===r?"":",建议设为私密作品"}`:`删除后作品将无法找回${"private_post"===r?"":",建议设为私密作品"}(其中${m.length}个作品在${_.size}个合集中,删除或设为私密后作品将自动移出合集)`,I=(0,s.useCallback)(async()=>{var e;v(!0);let l=new Date().getTime(),{isSuccess:i=!1,fatalIds:o=[],isFailForRisk:s=!1,statusCode:d=-1,statusMsg:u="操作失败, 请稍后重试"}=null!==(e=await (0,rm.TY)({awemeIds:t.map(e=>e.awemeId).join(",")}))&&void 0!==e?e:{};v(!1),U.logInstance.sendLog("functionDeleteStatus",{tab_name:n,sub_tab_name:r,function_name:"delete",status:0===d?1:0,item_cnt:t.length}),U.logInstance.sendLog("multiDeletePerformance",{status_code:d,type:"delete",fail_cnt:s?o.length:0,cost:new Date().getTime()-l,item_cnt:t.length});let c="删除";if(i){ei.F.info(`${c}成功`),null==a||a({method:"delete",fatalIdsCount:0});return}if(0!==d){ei.F.info(u),null==a||a({method:"delete",fatalIdsCount:0});return}s&&o.length>0&&(ei.F.info(`有${o.length}个作品因风险因素未能成功${c}`),null==a||a({method:"delete",fatalIdsCount:o.length}))},[t,a,n,r]),y=(0,s.useCallback)(async()=>{var e;if(C){ei.F.info("付费作品/短剧需公开可见,不支持修改权限");return}let l=new Date().getTime();v(!0);let i=t.filter(e=>{var t,l;return!(null===(t=e.seriesInfo)||void 0===t?void 0:t.seriesId)&&!(null===(l=e.chargeInfo)||void 0===l?void 0:l.is_charge_content)}).map(e=>e.awemeId),{isSuccess:o=!1,fatalIds:s=[],statusCode:d=-1,statusMsg:u="操作失败, 请稍后重试"}=null!==(e=await (0,rm.TY)({awemeIds:i.join(","),actionType:"secret"}))&&void 0!==e?e:{};if(U.logInstance.sendLog("functionDeleteStatus",{tab_name:n,sub_tab_name:r,function_name:"permission_setting",status:0===d?1:0,item_cnt:i.length}),U.logInstance.sendLog("multiDeletePerformance",{status_code:d,type:"secret",fail_cnt:s.length,cost:new Date().getTime()-l,item_cnt:i.length}),v(!1),0!==d){ei.F.info(u),null==a||a({method:"permission",fatalIdsCount:0,permissionValue:"secret"});return}if(o){w?ei.F.info("已完成批量操作"):ei.F.info("已经设为仅自己可见"),null==a||a({method:"permission",fatalIdsCount:0,permissionValue:"secret"});return}if(s.length>0){ei.F.info(`已完成批量操作。${s.length}个作品操作失败,请稍后再试`),null==a||a({method:"permission",fatalIdsCount:s.length,permissionValue:"secret"});return}},[t,a,C,w,n,r]),j=(0,s.useMemo)(()=>x?{title:"选中的合集作品将从合集中移除",content:"你选中了公开可见的合集作品,更改权限作品将自动移出合集"}:{title:"仅对普通作品生效",content:"设为非公开作品后,合集作品将自动移出合集,付费作品和短剧作品仍公开可见"},[x]);return d?(0,o.jsx)(lx,{className:rg.container,onCancel:async e=>{if(!c)null==l||l(),U.logInstance.sendLog("removeConfirmClick",{tab_name:n,sub_tab_name:r,item_cnt:t.length,function_name:"cancel",last_function:"delete"})},onConfirm:async()=>{if(!c)U.logInstance.sendLog("removeConfirmClick",{tab_name:n,sub_tab_name:r,item_cnt:t.length,function_name:"confirm",last_function:"delete"}),await y(),null==i||i()},title:j.title,renderContent:()=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("p",{className:rg.content,children:j.content}),c&&(0,o.jsx)(h.gb,{className:rg.loading})]}),closeBtn:!1,maskClosable:!1,cancelBtnText:"取消",confirmBtnText:"确认"}):(0,o.jsx)(lx,{className:rg.container,onCancel:async e=>{if(!c){if(U.logInstance.sendLog("deleteConfirmClick",{tab_name:n,sub_tab_name:r,item_cnt:t.length,function_name:e&&"private_post"!==r?"private":"cancel"}),!e||"private_post"===r){null==l||l();return}if(w&&!C){u(!0);return}e&&await y(),null==l||l()}},onConfirm:async()=>{if(!c)U.logInstance.sendLog("deleteConfirmClick",{tab_name:n,sub_tab_name:r,item_cnt:t.length,function_name:"delete"}),await I(),null==i||i()},title:`确认删除${t.length}个作品?`,closeBtn:!0,maskClosable:!1,renderContent:()=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("p",{className:rg.content,children:b}),c&&(0,o.jsx)(h.gb,{className:rg.loading})]}),cancelBtnText:"private_post"===r?"取消":"设为私密",confirmBtnText:"确认删除"})},rx="qpMvbQmA",rC=l("58686"),rw=l("694646"),rb=l("330336");let rI=s.forwardRef(function(){let{awemeInfo:e,collected:t,collectMethod:l,selectType:n,disabledCollectionIds:r,disabledScrollBar:i=!0,awaysReset:a,onMove:d,onClose:u}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{selectType:"multi"},c=arguments.length>1?arguments[1]:void 0,[v,m]=(0,s.useState)(!1),f=(0,s.useCallback)(()=>m(!0),[]),h=(0,s.useCallback)(()=>m(!1),[]);return(0,s.useImperativeHandle)(c,()=>({open:f,close:h})),(0,rC.Z)(v,"favorites_modal"),(0,rw.Z)(v,"modal"),(0,s.useEffect)(()=>i?(v?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}):()=>{},[v,i]),(0,o.jsx)(ts.u,{type:"custom",maskClosable:!1,className:rx,isHide:!v,onCancel:()=>m(!1),children:(0,o.jsx)(rb.Z,{show:v,type:"modal",selectType:n,awemeInfo:e,collected:t,collectMethod:l,disabledCollectionIds:r,awaysReset:a,onClose:()=>{m(!1),null==u||u()},onCollectDone:()=>m(!1),onMove:d})})});var ry=l("795568");let rj=e=>{let{onConfirmShow:t,resetScrollList:l,currentSubTab:n,currentTab:r}=e||{},[i,a]=(0,s.useState)(!1),[d,u]=(0,s.useState)(!1),c=(0,s.useRef)(null),v=(0,s.useCallback)(e=>{u(e),null==t||t({confirmType:"delete",visible:e})},[u,t]),m=(0,s.useCallback)(e=>{a(e),null==t||t({confirmType:"permission",visible:e})},[a,t]),f=(0,s.useCallback)(e=>{var l,n;e?null===(l=c.current)||void 0===l||l.open():null===(n=c.current)||void 0===n||n.close(),null==t||t({confirmType:"addCollects",visible:e})},[t]),h=(0,s.useCallback)(e=>{if(!d)return;let{selectItems:t=[]}=e||{};return(0,o.jsx)(r_,{currentSubTab:n,currentTab:r,resetScrollList:l,onCancel:()=>{v(!1)},onConfirm:()=>{v(!1)},selectItems:t})},[d,l,v,r,n]),p=(0,s.useCallback)(e=>{if(!i)return;let{selectItems:t=[]}=e||[];return(0,o.jsx)(rp,{currentSubTab:n,currentTab:r,resetScrollList:l,onCancel:()=>{m(!1)},onConfirm:()=>{m(!1)},selectItems:t})},[i,l,m,r,n]),g=(0,s.useCallback)(async(e,t)=>{await Promise.all(e.map(async e=>{let{status_code:l}=await (0,ry.RX)({item_ids:t.map(e=>e.awemeId),item_type:2,to_collects_id:e,update_collects_sort:!0});if(l)throw Error()}))},[]),_=(0,s.useCallback)(async(e,t)=>{if(!!t.length)try{await g(e,t),na.F.info("添加至收藏夹成功")}catch(e){na.F.info("添加视频失败")}finally{f(!1)}},[g]);return{renderDeleteConfirmModal:h,renderPermissionConfirmModal:p,renderAddCollectsModal:(0,s.useCallback)(e=>{let{selectItems:t=[]}=e||[];return(0,o.jsx)(rI,{ref:c,selectType:"multi",awaysReset:!0,disabledScrollBar:!0,onMove:e=>_(e,t)})},[]),changeShowDeleteConfirm:v,changeShowPermissionConfirm:m,changeShowAddCollectsConfirm:f}},rk=e=>{let{permissionValue:t="public",changePermissionValue:l}=e;return(0,o.jsx)("div",{className:rf.listContainer,children:(0,o.jsxs)(D.RadioGroup,{className:"test",value:t,onChange:e=>{var t;l(null==e?void 0:null===(t=e.target)||void 0===t?void 0:t.value)},direction:"horizontal",children:[(0,o.jsx)(D.Radio,{value:"public",children:(0,o.jsx)("span",{children:"公开\xb7所有人可见"})}),(0,o.jsx)(D.Radio,{value:"secret",children:(0,o.jsx)("span",{children:"私密\xb7仅自己可见"})})]})})},rN=e=>{let{selectItems:t=[],onCancel:l,currentSubTab:n,currentTab:r,onConfirm:i,resetScrollList:a}=e,[d,u]=(0,s.useState)(!1),[c,v]=(0,s.useState)("public"),m={public:"public",secret:"private"},f=(0,s.useCallback)(async()=>{var e;if(t.every(e=>e.status===ny.Reviewing)){ei.F.info("选中合集审核中,暂不支持设置公开范围");return}if(t.every(e=>e.status===ny.Pending)){ei.F.info("选中合集待发布,暂不支持设置公开范围");return}if(t.every(e=>e.status===ny.Reviewing||e.status===ny.Pending)){ei.F.info("选中合集待发布/审核中,暂不支持设置公开范围");return}u(!0);let l=t.map(e=>e.mixId),{unprocessedIds:i=[],fatalIds:a=[],statusCode:o=-1,statusMsg:s="操作失败, 请稍后重试"}=null!==(e=await l6({mixIds:l.join(","),setStatus:"public"===c?ny.Public:ny.SelfSee}))&&void 0!==e?e:{},d=l.filter(e=>!a.includes(e)&&!i.includes(e));U.logInstance.sendLog("functionDeleteStatus",{tab_name:r,sub_tab_name:n,function_name:"permission_setting",status:0===o?1:0,item_cnt:d.length}),u(!1);let v=0===o&&0===a.length,m=0===o&&a.length>0;return v?(ei.F.info("public"===c?"已经设为所有人可见":"已经设为仅自己可见"),d):m?(ei.F.info(`${a.length}个合集操作失败。仅审核通过的合集支持修改。`),d):(ei.F.info(s),[])},[t,c]);return(0,o.jsx)(lx,{className:rf.container,onCancel:()=>{null==l||l(),U.logInstance.sendLog("functionConfirmClick",{tab_name:r,sub_tab_name:n,item_cnt:t.length,status:m[c],function_name:"cancel"})},onConfirm:async()=>{if(d)return;U.logInstance.sendLog("functionConfirmClick",{tab_name:r,sub_tab_name:n,item_cnt:t.length,status:m[c],function_name:"confirm"});let e=await f();null==i||i(e,"public"===c?ny.Reviewing:ny.SelfSee)},title:"修改合集权限",closeBtn:!1,renderContent:()=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(rk,{permissionValue:c,changePermissionValue:v}),d&&(0,o.jsx)(h.gb,{className:rf.loading})]}),cancelBtnText:"取消",confirmBtnText:"确认",maskClosable:!1})};var rS=e=>{let{selectItems:t=[],onCancel:l,currentTab:n,currentSubTab:r,onConfirm:i}=e||{},[a,d]=(0,s.useState)(!1),u=(0,s.useCallback)(async()=>{var e;d(!0);let l=t.map(e=>e.mixId),{fatalIds:i=[],statusCode:a=-1,statusMsg:o="操作失败, 请稍后重试"}=null!==(e=await l3({mixIds:l.join(",")}))&&void 0!==e?e:{};d(!1),U.logInstance.sendLog("functionDeleteStatus",{tab_name:n,sub_tab_name:r,function_name:"delete",status:0===a?1:0,item_cnt:t.length});let s=0===a&&0===i.length,u=0===a&&i.length>0;if(s)return ei.F.info("删除成功"),l;if(!u)return ei.F.info(o),[];{ei.F.info(`有${i.length}个合集未能成功删除`);let e=new Set(i);return l.filter(t=>!e.has(t))}},[t]);return(0,o.jsx)(lx,{className:rg.container,onCancel:async e=>{if(!a)U.logInstance.sendLog("deleteConfirmClick",{tab_name:n,sub_tab_name:r,item_cnt:t.length,function_name:"cancel"}),null==l||l()},onConfirm:async()=>{if(a)return;U.logInstance.sendLog("deleteConfirmClick",{tab_name:n,sub_tab_name:r,item_cnt:t.length,function_name:"delete"});let e=await u();null==i||i(e)},title:`确认删除${t.length}个合集?`,closeBtn:!0,maskClosable:!1,renderContent:()=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("p",{className:rg.content,children:"合集中的作品仍保留"}),a&&(0,o.jsx)(h.gb,{className:rg.loading})]}),cancelBtnText:"取消",confirmBtnText:"确认删除"})};let rE=e=>{let{onConfirmShow:t,currentSubTab:l,currentTab:n,confirmCallback:r}=e||{},[i,a]=(0,s.useState)(!1),[d,u]=(0,s.useState)(!1),c=(0,s.useCallback)(e=>{u(e),null==t||t({confirmType:"delete",visible:e})},[u,t]),v=(0,s.useCallback)(e=>{a(e),null==t||t({confirmType:"permission",visible:e})},[a,t]),m=(0,s.useCallback)(e=>{if(!d)return;let{selectItems:t=[]}=e||{};return(0,o.jsx)(rS,{currentSubTab:l,currentTab:n,onCancel:()=>{c(!1)},onConfirm:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];c(!1),null==r||r(e,"delete")},selectItems:t})},[d,c,n,l,r]);return{renderDeleteConfirmModal:m,renderPermissionConfirmModal:(0,s.useCallback)(e=>{if(!i)return;let{selectItems:t=[]}=e||[];return(0,o.jsx)(rN,{currentSubTab:l,currentTab:n,onCancel:()=>{v(!1)},onConfirm:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;v(!1),null==r||r(e,"permission",t)},selectItems:t})},[i,v,n,l,r]),changeShowDeleteConfirm:c,changeShowPermissionConfirm:v}};var rL={PUBLIC:0,0:"PUBLIC",PRIVATE:1,1:"PRIVATE",FRIEND:2,2:"FRIEND"};let rT=s.forwardRef((e,t)=>{let{updateIsSelectDisabled:l,setIsListSelectable:n,selectItems:r,currentTab:i,subTab:a,listRef:d}=e,{renderDeleteConfirmModal:u,renderPermissionConfirmModal:c,changeShowPermissionConfirm:v,changeShowDeleteConfirm:m}=rE({onConfirmShow:e=>{let{visible:t}=e;l(t)},currentSubTab:a,currentTab:i,confirmCallback:(0,s.useCallback)((e,t,l)=>{let r=(null==e?void 0:e.length)>0;if(n(!1),!!r&&!!(null==d?void 0:d.current)){if("delete"===t){setTimeout(()=>{var t;null==d||null===(t=d.current)||void 0===t||t.removeMixes(e)},0);return}if("permission"===t){setTimeout(()=>{var t;null==d||null===(t=d.current)||void 0===t||t.editMixesPermission(e,l)},0);return}}},[])});return(0,s.useImperativeHandle)(t,()=>({changeShowPermissionConfirm:v,changeShowDeleteConfirm:m}),[v,m]),(0,o.jsxs)(o.Fragment,{children:[null==u?void 0:u({selectItems:r}),null==c?void 0:c({selectItems:r})]})}),rM=s.forwardRef((e,t)=>{let{updateIsSelectDisabled:l,setIsListSelectable:n,onManageEndCallback:r,resetScroll:i,selectItems:d,selectedCount:u,listRef:c,currentTab:v,subTab:m,setModifyList:f}=e,{renderDeleteConfirmModal:h,renderPermissionConfirmModal:p,changeShowPermissionConfirm:g,changeShowDeleteConfirm:_}=rj({onConfirmShow:e=>{let{visible:t}=e;l(t)},resetScrollList:e=>{let{fatalIdsCount:t,method:l,permissionValue:o,modifyItemIds:s=[]}=e||{};if(n(!1),"delete"===l)m===tH.VIDEO&&r({manageCount:u-t}),null==i||i();else{if(m===tH.VIDEO){if("permission"===l&&"secret"===o)r({manageCount:u-t}),null==i||i();else if("permission"===l&&["friend","public"].includes(o)){var d,v,h,p;if(0===s.length){null==i||i();return}let e=(null===(v=c.current)||void 0===v?void 0:null===(d=v.getDataList)||void 0===d?void 0:d.call(v))||[];f(s.map(e=>({id:e,permissionValue:o}))),s.forEach(t=>{let l=e.find(e=>e.awemeId===t);l&&("public"===o&&(l.status=(0,R._)((0,a._)({},l.status),{privateStatus:0})),"friend"===o&&(l.status=(0,R._)((0,a._)({},l.status),{privateStatus:2})))}),null===(p=c.current)||void 0===p||null===(h=p.setScrollData)||void 0===h||h.call(p,{dataList:[...e]})}}m===tH.SECRET_VIDEO&&"secret"!==o&&"permission"===l&&(r({manageCount:u-t,isAdd:!0}),null==i||i())}},currentSubTab:m,currentTab:v});return(0,s.useImperativeHandle)(t,()=>({changeShowPermissionConfirm:g,changeShowDeleteConfirm:_}),[g,_]),(0,o.jsxs)(o.Fragment,{children:[null==h?void 0:h({selectItems:d}),null==p?void 0:p({selectItems:d})]})});var rR=s.forwardRef((e,t)=>{let{subTab:l}=e;return l===tH.COMPILATION?(0,o.jsx)(rT,(0,R._)((0,a._)({},e),{ref:t})):(0,o.jsx)(rM,(0,R._)((0,a._)({},e),{ref:t}))});let rD=s.forwardRef((e,t)=>{let{currentMixId:l,currentMixInfo:n,userInfo:r,topOffset:i=0,topNavHeight:a=60,abTestData:d}=e,u=(0,s.useRef)(null),[c,v]=(0,s.useState)(),{setSelectItems:m}=(0,s.useContext)(ly),{getCurrentNumber:f,loadVideos:h}=(0,s.useContext)(ro),p=(0,s.useContext)(rv),{sortDataList:g}=(0,s.useContext)(ra),_=(0,s.useCallback)(e=>nQ()([].concat(e).concat(g),e=>"string"==typeof e?e:null==e?void 0:e.awemeId),[g]),x=(0,nl.o)(null==r?void 0:r.secUid),C=(0,s.useRef)(),w=(0,s.useRef)(0),b=(0,s.useRef)({}),I=(0,s.useRef)(1),y=(0,s.useRef)(!0),j=(0,s.useCallback)(async()=>{var e,t;let{data:r=[],maxCursor:i=0,hasMore:a=0,statusCode:o,whaleInfo:s}=await n1.dP.request({cached:!1,consume:!0,params:{userId:x,maxCursor:w.current,count:18,whaleCutToken:null===(e=b.current)||void 0===e?void 0:e.whaleCutToken,needTimeList:!1},fetcherOptions:{expired:12e5,resetExpiredCacheBefore:!1,hoverDelay:!1}}),d=r.filter(e=>{var t,l,n,r,i,a,o;let s=(null!==(a=null==e?void 0:null===(t=e.status)||void 0===t?void 0:t.privateStatus)&&void 0!==a?a:rL.PUBLIC)===rL.PUBLIC&&(null!==(o=null==e?void 0:null===(l=e.status)||void 0===l?void 0:l.partSee)&&void 0!==o?o:n2.mI.All)===n2.mI.All,d=((null==e?void 0:null===(r=e.cooperationInfo)||void 0===r?void 0:null===(n=r.cooperationCreators)||void 0===n?void 0:n.length)||0)>1,u=(0,n3.$m)(e,!0),c=e.tag.inReviewing||[1,2,4].includes(null==e?void 0:null===(i=e.tag)||void 0===i?void 0:i.reviewStatus),v=null==e?void 0:e.isSlides,m=(null==e?void 0:e.awemeType)===nJ.e.Article;return s&&!v&&!c&&!d&&!u&&!m});I.current=a,!o&&(w.current=i),y.current=!1;let u=null===(t=(null!=d?d:[]).find(e=>{var t;return(null===(t=e.mixInfo)||void 0===t?void 0:t.mixId)===l}))||void 0===t?void 0:t.mixInfo;if(u){let e=4===u.status,t=Number(u.updateTime)>Number(n.updateTime);(e||t)&&p(e?null:u,"all")}let c=h(d);return null==m||m(e=>0===c.length?e:[...e,...c]),{data:d,maxCursor:i,hasMore:a,statusCode:o,whaleDecisionCustom:null==s?void 0:s.whaleDecisionCustom,clearBefore:!1}},[x,d]),k=(0,s.useCallback)(e=>{var t;let n=!!(null==e?void 0:null===(t=e.mixInfo)||void 0===t?void 0:t.mixId)&&e.mixInfo.mixId!==l;return n?{disabled:n,disabledDesc:"已在其他合集",disabledToastInfo:"该作品无法加入合集",type:"toast"}:{disabled:!1,disabledDesc:""}},[l]);(0,s.useImperativeHandle)(t,()=>{var e,t,l,n,r,i,a,o,s;return{loadMoreData:null===(e=C.current)||void 0===e?void 0:e.loadMoreData,locateSelectVideo:null===(t=C.current)||void 0===t?void 0:t.locateSelectVideo,reset:null===(l=C.current)||void 0===l?void 0:l.reset,reload:null===(n=C.current)||void 0===n?void 0:n.reload,getTotal:null===(r=C.current)||void 0===r?void 0:r.getTotal,resetRes:null===(i=C.current)||void 0===i?void 0:i.resetRes,setScrollData:null===(a=C.current)||void 0===a?void 0:a.setScrollData,getDataList:null===(o=C.current)||void 0===o?void 0:o.getDataList,scrollCheck:null===(s=C.current)||void 0===s?void 0:s.scrollCheck}});let N=(0,s.useCallback)((e,t)=>{var l;return null!==(l=f(e.awemeId))&&void 0!==l?l:null},[]),S=(0,n0.U)();return(0,nd.o)(()=>{var e,t;null===(t=C.current)||void 0===t||null===(e=t.scrollCheck)||void 0===e||e.call(t)},[]),(0,o.jsx)("div",{className:n5.container,ref:e=>{if(!!e)v(e),u.current=e},children:(0,o.jsx)(ri,{pause:!S,ref:C,uid:x,tab:"post",currentTab:"post",fetchMoreData:j,retryTimes:5,getItemSelectedDisabled:k,topNavHeight:a,topOffset:i,itemClassName:n5.item,columnCount:5,panelNoData:(0,o.jsx)(V.H,{className:n5.empty,icon:(0,o.jsx)(lq.Z,{}),title:"暂无内容",desc:"暂无可添加作品~"}),showPermissionIcon:!0,scrollRef:u,getMaskIndex:N,scrollContainerEl:c,dataListWrapper:_})})}),rP=s.forwardRef((e,t)=>{let{currentMixId:l,currentMixInfo:n,userInfo:r,getSortId:i}=e,{moveVideo:a,loadVideos:d,getCurrentNumber:u,isOldMixAwemeListLoadedRef:c}=(0,s.useContext)(ro),{sortDataList:v}=(0,s.useContext)(ra),m=(0,s.useRef)(v),f=(0,s.useRef)(null),[h,p]=(0,s.useState)(),{setSelectItems:g}=(0,s.useContext)(ly),_=(0,s.useContext)(rv),x=(0,nl.o)(null==r?void 0:r.secUid),C=(0,s.useRef)(),w=(0,s.useRef)(0),b=(0,s.useRef)(0),I=(0,s.useRef)(1),y=(0,s.useRef)(!0),j=(0,s.useCallback)(async()=>{let{mixInfo:e,statusCode:t=-1}=await (0,lG.vf)({mixId:l});if(0===t){let t=4===e.status,l=Number(e.updateTime)>Number(n.updateTime);(t||l)&&_(t?null:e,"selected")}if(c.current)return{data:m.current,maxCursor:0,hasMore:0,statusCode:0};let{logPb:r,statusCode:i,data:a=[],cursor:o,hasMore:s}=await (0,lG.FF)({mixId:l,cursor:b.current,count:50,mixScene:1});I.current=1===s?1:0,!i&&(w.current=b.current,b.current=o),y.current=!1;let u=d(a);return null==g||g(e=>0===u.length?e:[...e,...u]),{data:a,maxCursor:o,hasMore:s,statusCode:i}},[x]),k=(0,s.useCallback)(e=>({disabled:!1,disabledDesc:""}),[]);(0,s.useImperativeHandle)(t,()=>{var e,t,l,n,r,i,a,o;return{loadMoreData:null===(e=C.current)||void 0===e?void 0:e.loadMoreData,locateSelectVideo:null===(t=C.current)||void 0===t?void 0:t.locateSelectVideo,reset:null===(l=C.current)||void 0===l?void 0:l.reset,reload:null===(n=C.current)||void 0===n?void 0:n.reload,getTotal:null===(r=C.current)||void 0===r?void 0:r.getTotal,resetRes:null===(i=C.current)||void 0===i?void 0:i.resetRes,setScrollData:null===(a=C.current)||void 0===a?void 0:a.setScrollData,getDataList:null===(o=C.current)||void 0===o?void 0:o.getDataList}});let N=(0,s.useCallback)((e,t)=>{var l;return null!==(l=u(e.awemeId))&&void 0!==l?l:null},[]),S=(0,s.useCallback)(async(e,t,l,r)=>{var i,o,s,d;let c=t.findIndex(t=>t===e),v=null!==(o=u(t[c]))&&void 0!==o?o:-1;if(v<=0)return!0;let m=-1,f=-1;for(let e=c+1;e<t.length;e++){let l=null!==(s=u(t[e]))&&void 0!==s?s:-1;if(l>0){m=l;break}}if(1===m)f=1;else if(-1===m)for(let e=c-1;e>=0;e--){let l=null!==(d=u(t[e]))&&void 0!==d?d:-1;if(l>0){f=Math.max(v,l);break}}else f=v>m?m:m-1;return f>=1&&a(e,f),nZ.sendLog("dragDropCompilationPost",{compilation_id:null==n?void 0:n.mixId,compilation_name:null==n?void 0:n.mixName,status:(null==n?void 0:n.status)===ny.Public?"public":"private",author_id:null==n?void 0:null===(i=n.author)||void 0===i?void 0:i.uid,group_id:null==r?void 0:r.awemeId,before_rank_order:v-1,after_rank_order:f-1}),!0},[]);return(0,o.jsx)("div",{className:n5.container,ref:e=>{if(!!e)p(e),f.current=e},children:(0,o.jsx)(ri,{ref:C,uid:x,tab:"post",currentTab:"post",fetchMoreData:j,retryTimes:5,getItemSelectedDisabled:k,itemClassName:n5.item,columnCount:5,panelNoData:(null==v?void 0:v.length)>0?(0,o.jsx)("div",{}):(0,o.jsx)(V.H,{className:n5.empty,icon:(0,o.jsx)(lq.Z,{}),title:"暂无内容",desc:"暂无已选作品,请去添加"}),showPermissionIcon:!0,scrollContainerEl:h,scrollRef:f,getMaskIndex:N,getSortId:i,onSort:S,sortDataList:v,customDataListCtx:ra,defaultFetchAllData:!0})})}),rA=e=>e.awemeId,rF=[{key:"all",label:"添加作品"},{key:"selected",label:"已选作品"}],rB=e=>{let{userInfo:t,mixInfo:l,onClose:n,currentTab:r,setCurrentTab:i}=e,{mixCount:a,getManageResult:d,syncMixAwemeListOnTabChange:u,isOldMixAwemeListLoadedRef:c}=(0,s.useContext)(ro),{editMixAweme:v}=rc(),m=async()=>{let{result:e,currentAwemeList:t,hasOperate:i}=d();if(!c.current){ei.F.info("当前合集内视频尚未加载完成,请稍后再试");return}if(e.addItemIds.split(",").length>100){ei.F.info("单次最多添加100个视频");return}nZ.sendLog("compilationPostConfirm",{tab_name:"all"===r?"add_post":"select_post",compilation_id:null==l?void 0:l.mixId,compilation_name:null==l?void 0:l.mixName,status:(null==l?void 0:l.status)===ny.Public?"public":"private",is_effective_operation:i?1:0,function_name:"save"});let{statusCode:o=4,statusMsg:s="服务异常,请稍后再试"}=await nt(e);if(0===o){ei.F.info("操作成功");let e=t.reduce((e,t)=>{var l,n;return e+(null!==(n=null==t?void 0:null===(l=t.stats)||void 0===l?void 0:l.playCount)&&void 0!==n?n:0)},0);v(l.mixId,a,e)}else ei.F.info(s);n()};return(0,nY.Z)(()=>{"selected"===r&&(null==u||u())},[r]),(0,o.jsxs)("div",{className:nq.panel,children:[(0,o.jsxs)("div",{className:nq.header,children:[(0,o.jsxs)("div",{className:nq.title,children:[(0,o.jsx)("div",{className:nq.mixName,children:l.mixName}),(0,o.jsxs)("div",{children:["共",a,"集"]})]}),(0,o.jsxs)("div",{className:nq.buttons,children:[(0,o.jsx)(D.Button,{className:nq.cancel,onClick:()=>{nZ.sendLog("compilationPostConfirm",{tab_name:"all"===r?"add_post":"select_post",compilation_id:null==l?void 0:l.mixId,compilation_name:null==l?void 0:l.mixName,status:(null==l?void 0:l.status)===ny.Public?"public":"private",is_effective_operation:0,function_name:"cancel_icon"}),n()},type:"secondary",theme:"solid",children:"取消"}),(0,o.jsx)(D.Button,{className:nq.save,onClick:m,theme:"solid",children:"保存"})]})]}),(0,o.jsx)(D.Tabs,{keepDOM:!0,type:"line",lazyRender:!1,activeKey:r,onTabClick:(e,t)=>{i(e)},className:f()(nq.tabs,"user-mix-manage-modal"),tabPaneMotion:!1,children:null==rF?void 0:rF.map(e=>(0,o.jsxs)(D.TabPane,{tab:e.label,itemKey:e.key,className:nq.tabPanel,children:["all"===e.key&&(0,o.jsx)(nG.O,{active:"all"===r,className:nq.keepAlive,children:(0,o.jsx)(rD,{userInfo:t,currentMixId:l.mixId,currentMixInfo:l})}),"selected"===e.key&&(0,o.jsx)(nG.O,{active:"selected"===r,className:nq.keepAlive,children:(0,o.jsx)(rP,{userInfo:t,currentMixId:l.mixId,currentMixInfo:l,getSortId:rA})})]},`panelKey_${e.key}`))})]})},rU=e=>{let[t,l]=(0,s.useState)(!0),{addVideos:n,removeVideos:r}=(0,s.useContext)(ro),{initTab:i}=e,[d,u]=(0,s.useState)(i),c=lb({maxSelectedCount:1e5,addDescription:()=>"",onManageEndCallback:()=>{},tabName:"mix",subTabName:"video",isListSelectable:t,setIsListSelectable:l,onSessionMultiEnd:(0,s.useCallback)((e,t)=>{let l=[],i=[];(null==t?void 0:t.length)===0&&(null==e?void 0:e.length)?i=e:(null==e?void 0:e.length)===0&&(null==t?void 0:t.length)?l=t:(l=nK()(t,e,e=>e.awemeId),i=nK()(e,t,e=>e.awemeId)),l.length&&n(l),i.length&&r(i)},[])});return(0,o.jsx)(ly.Provider,{value:(0,a._)({},c),children:(0,o.jsx)(rB,(0,R._)((0,a._)({},e),{currentTab:d,setCurrentTab:u}))})},rV=e=>{let{mixInfo:t,initTab:l,onClose:n}=e,{refreshMixInfo:r,removeMixes:i}=rc(),[d,u]=(0,s.useState)(Date.now().toString()),[c,v]=(0,s.useState)(l),m=(0,s.useCallback)(function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l;e?r(e):i([t.mixId]),v(a);let o=null===e;ei.F.info(o?"检测到当前合集已被删除,当前列表将关闭":"检测到合集有变更,当前列表将刷新获取最新数据"),setTimeout(()=>{o?n():u(Date.now().toString())},1e3)},[]);return(0,o.jsx)(rv.Provider,{value:m,children:(0,o.jsx)(ex.T6,{className:nq.container,children:(0,o.jsx)(rs,{mixInfo:t,children:(0,o.jsx)(rU,(0,R._)((0,a._)({},e),{initTab:c}))})},d)})},rO=e=>{let{mixInfo:t,userInfo:l,className:n,onClick:r,type:i,edit:a,children:d,disableDescription:u=""}=e,[c,v]=(0,s.useState)(!1),m=(0,s.useCallback)(()=>{v(!1)},[]),h="create"===i?"创建合集":"修改合集";return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{onClick:()=>{u?ei.F.info(u):v(!0),null==r||r()},className:nS.pointer,children:d||(0,o.jsx)(D.Button,{className:f()(nS.btn,n),theme:"solid",children:h})}),c&&(0,o.jsx)(e_.h,{children:(0,o.jsx)(nW,{type:i,title:h,userInfo:l,mixInfo:t,onClose:m,edit:a})})]})},rH=s.forwardRef((e,t)=>{let{mixInfo:l,userInfo:n,className:r,onClick:i,type:a,title:d,disableDescription:u}=e,[c,v]=(0,s.useState)(!1),m=(0,s.useCallback)(()=>{u?ei.F.info(u):v(!0),null==i||i()},[u,i]),h=(0,s.useCallback)(()=>{v(!1)},[]);return(0,s.useImperativeHandle)(t,()=>({openModal:m})),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(D.Button,{className:f()(nS.btn,r),onClick:m,theme:"solid",children:d}),c&&(0,o.jsx)(e_.h,{children:(0,o.jsx)(rV,{initTab:a,userInfo:n,mixInfo:l,onClose:h})})]})}),rz=s.forwardRef((e,t)=>{var l;let{className:n="",userInfo:r,mixInfo:i}=e,{type:a,changeType:d}=(0,th.P)({delayDisappear:100}),[u,c]=(0,s.useState)(null);(0,s.useEffect)(()=>{if(!u)return;let e=()=>{d(!0)},t=()=>{d(!1)};return u.addEventListener("mouseenter",e),u.addEventListener("mouseleave",t),()=>{u.removeEventListener("mouseenter",e),u.removeEventListener("mouseleave",t)}},[u,d]);let{editMixInfo:v}=rc(),m=(0,s.useCallback)(async e=>{let{mixId:t,name:l,desc:n,avatar:r,avatarUri:a}=e,{statusCode:o,statusMsg:s}=await l9({mixId:t,mixName:l,mixDesc:n,mixCover:a});return(nZ.sendLog("modifyCompilationComfirm",{compilation_id:t,compilation_name:l,status:(null==i?void 0:i.status)===ny.Public?"public":"private",function_name:"save"}),0===o)?(setTimeout(()=>{v({mixId:t,mixName:l,mixDesc:n,mixCover:r,coverUri:a})},0),""):s||"服务异常,请稍后再试"},[]),h=e=>{nZ.sendLog(e,{compilation_id:null==i?void 0:i.mixId,compilation_name:null==i?void 0:i.mixName,status:(null==i?void 0:i.status)===ny.Public?"public":"private"}),d(!1)},p=(null==i?void 0:i.status)===ny.Reviewing,g=!!(null==i?void 0:null===(l=i.chargeInfo)||void 0===l?void 0:l.chargeType),_="";return p?_="合集审核中,暂不支持编辑":g&&(_="付费合集不支持编辑"),(0,o.jsxs)("div",{onClick:e=>{e.stopPropagation(),"INPUT"!==e.target.tagName&&e.preventDefault()},ref:c,title:"",className:nS.more,children:[(0,o.jsx)(ew.z,{svg:(0,o.jsx)(nE.Z,{}),className:f()(nS.moreIcon,nS.tabType,n,{[nS.active]:a})}),(0,o.jsxs)("div",{className:f()(nS.morePanel,{[nS.visible]:a}),children:[(0,o.jsx)(rO,{type:"edit",disableDescription:_,userInfo:r,mixInfo:i,edit:m,onClick:()=>h("modifyCompilationClick")}),(0,o.jsx)(rH,{type:"selected",title:"作品管理",disableDescription:_,userInfo:r,mixInfo:i,onClick:()=>h("postManageClick")}),(0,o.jsx)(rH,{ref:t,type:"all",title:"添加作品",disableDescription:_,userInfo:r,mixInfo:i,onClick:()=>h("addPostClick")})]})]})});var rZ=e=>{var t,l,n;let{info:r,rank:i,userInfo:a,currentTab:d}=e,{isSeries2Mix:u}=r,{isSelf:c}=(0,s.useContext)(G)||{},[v,m]=(0,nj.Z)(),[h,p]=(0,s.useState)(!1),g=(null==r?void 0:r.status)===ny.SelfSee,_=(null==r?void 0:r.status)===ny.Pending,x=(null==r?void 0:r.status)===ny.Reviewing,C=lH(),w=c&&C&&!u,[b,I]=(0,s.useState)(!!u||!_&&!x),y=(0,s.useRef)(null),j="favorite_collection"===d&&!!r.hasUpdatedEpisode&&b,k=c?24:0;j&&(k+=((null==y?void 0:null===(n=y.current)||void 0===n?void 0:n.offsetWidth)||42)+4),g?k+=0===k?14:16:(_||x)&&(k+=40);let N=(0,s.useMemo)(()=>u?(0,eq.$y)(null==r?void 0:r.seriesId,1,`previous_page=${(0,Z.yW)()}`):(0,eq.$y)(null==r?void 0:r.mixId,1,`previous_page=${(0,Z.yW)()}`),[u,null==r?void 0:r.seriesId,null==r?void 0:r.mixId]),S=(0,s.useRef)(null),{getLatestCreatedMixId:E,clearLatestCreatedMixId:L}=rc();(0,s.useEffect)(()=>{if(E()===r.mixId){var e;L(),null===(e=S.current)||void 0===e||e.openModal()}},[]),(0,s.useEffect)(()=>{if(m&&!h){if(p(!0),"favorite_collection"===d){U.logInstance.sendLog("compilationCoverShow",{enter_from:(0,Z.yW)(),tab_name:"favorite_collection",group_id:"",compilation_id:(null==r?void 0:r.isSeries2Mix)?r.seriesId:r.mixId});return}tG.sendLog("collectionCoverShow",{enter_from:(0,Z.yW)(),compilation_id:(null==r?void 0:r.isSeries2Mix)?r.seriesId:r.mixId,compilation_video_cnt:r.totalEpisode,author_id:a.uid,group_id:""})}},[m]);let T=(null==r?void 0:null===(t=r.chargeInfo)||void 0===t?void 0:t.chargeType)===1||(null==r?void 0:null===(l=r.chargeInfo)||void 0===l?void 0:l.chargeType)===3,M=u?r.seriesName:r.mixName;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(P.a,{className:nS.mixCard,href:N,title:M,target:"_blank",rel:"noopener noreferrer",onClick:e=>{if("favorite_collection"===d){U.logInstance.sendLog("compilationCoverClick",{enter_from:(0,Z.yW)(),tab_name:"favorite_collection",group_id:"",compilation_id:(null==r?void 0:r.isSeries2Mix)?r.seriesId:r.mixId}),I(!1);return}tG.sendLog("collectionCoverClick",{enter_from:(0,Z.yW)(),compilation_id:(null==r?void 0:r.isSeries2Mix)?r.seriesId:r.mixId,compilation_video_cnt:r.totalEpisode,author_id:a.uid,rank:i}),!r.totalEpisode&&(ei.F.info("创作者还没有为这个合集添加视频"),e.preventDefault())},children:(0,o.jsxs)("div",{className:nS.item,ref:v,children:[(0,o.jsxs)("div",{className:nS.cover,children:[(0,o.jsx)(nk.Q,{src:r.cover,alt:M,iconWidth:30,iconHeight:88,imgClass:nS.image}),T&&(0,o.jsx)("div",{className:nS.payTag,children:"付费"})]}),(0,o.jsxs)("div",{className:nS.content,children:[(0,o.jsxs)("div",{className:f()(nS.title,nS.singleLine),children:[(0,o.jsx)("div",{className:nS.name,style:{maxWidth:`calc(100% - ${k}px)`},children:M}),(0,o.jsx)(()=>g?(0,o.jsx)(ew.z,{initialMounted:!0,svg:(0,o.jsx)(nN.Z,{}),className:f()(nS.iconSvg,{[nS.tag]:j})}):_||x?(0,o.jsx)("span",{className:nS.statusTag,children:x?"审核中":"待发布"}):null,{}),j&&(0,o.jsxs)("span",{ref:y,className:nS.updatedTag,children:["更新",r.hasUpdatedEpisode,"集"]})]}),(0,o.jsxs)("p",{className:nS.count,children:[(0,ef.qe)(r.playVV)," 播放"]}),(0,o.jsxs)("p",{className:nS.episode,children:[(0,o.jsxs)("span",{children:["更新至 ",r.totalEpisode," 集"]}),!!r.watchedEpisode&&(0,o.jsxs)("span",{children:["(上次看到 ",r.watchedEpisode," 集)"]})]})]})]})}),w&&(0,o.jsx)(rz,{ref:S,userInfo:a,mixInfo:r})]})},rW={collection:"P3ZoBJh8",header:"em1jCNhF",title:"uZqY5Msg",enter:"iQxtbbXM",expand:"Qo6qtaza",down:"VXqSmV58",list:"PzUBAH7u",container:"CUazp9pu",item:"Dhfwzkg2",more:"ikqXfRUe",noMore:"psRADbpT"},r$=l("229757"),rK=l.n(r$);let rY=e=>{let{scrollListRef:t,userInfo:l}=e,n=(0,s.useRef)(""),r=(0,s.useCallback)(()=>n.current,[]),i=(0,s.useCallback)(()=>{n.current=""},[]),a=(0,s.useCallback)(e=>{var l;if(!(null==t?void 0:t.current))return;let n=t.current.getDataList();null==t||null===(l=t.current)||void 0===l||l.setScrollData({dataList:n.map(t=>{if(t.mixId!==e.mixId)return t;let l=rK()(t);return l.mixName=e.mixName,l.desc=e.desc,l.cover=e.cover,l.status=e.status,l.updateTime=e.updateTime,l.currentEpisode=e.currentEpisode,l.totalEpisode=e.totalEpisode,l.playVV=e.playVV,l})})},[]),o=(0,s.useCallback)(e=>{var r;let{mixId:i,mixName:a,mixDesc:o,mixCover:s,coverUri:d}=e;if(!(null==t?void 0:t.current))return;let u={cover:s,coverUri:d,desc:o,mixId:i,mixName:a,status:0,playVV:0,collectVV:0,currentEpisode:0,totalEpisode:0,hasUpdatedEpisode:0,isCollected:0,author:{uid:null==l?void 0:l.uid,secret:l.secret},mixType:0,updateTime:(Date.now()+6e4).toString().slice(0,-3)},c=t.current.getDataList();n.current=i,null==t||null===(r=t.current)||void 0===r||r.setScrollData({dataList:[u,...c]})},[]),d=(0,s.useCallback)(e=>{var l;if(!(null==t?void 0:t.current))return;let n=t.current.getDataList(),r=new Set(e);null==t||null===(l=t.current)||void 0===l||l.setScrollData({dataList:n.filter(e=>!r.has(e.mixId))})},[]),u=(0,s.useCallback)(e=>{var l;let{mixId:n,mixName:r,mixDesc:i,mixCover:a,coverUri:o}=e;if(!(null==t?void 0:t.current))return;let s=t.current.getDataList();null==t||null===(l=t.current)||void 0===l||l.setScrollData({dataList:s.map(e=>{if(e.mixId!==n)return e;let t=rK()(e);return t.mixName=r,t.desc=i,t.cover=a,t.coverUri=o,t.updateTime=(Date.now()+6e4).toString().slice(0,-3),t.status=t.status===ny.Public?ny.Reviewing:t.status,t})})},[]),c=(0,s.useCallback)((e,l)=>{var n;if(!(null==t?void 0:t.current))return;let r=t.current.getDataList(),i=new Set(e);null==t||null===(n=t.current)||void 0===n||n.setScrollData({dataList:r.map(e=>{if(!i.has(e.mixId))return e;let t=rK()(e);return t.status=l,t.updateTime=(Date.now()+6e4).toString().slice(0,-3),t})})},[]),v=(0,s.useCallback)((e,l,n)=>{var r;if(!(null==t?void 0:t.current))return;let i=t.current.getDataList();null==t||null===(r=t.current)||void 0===r||r.setScrollData({dataList:i.map(t=>{if(t.mixId!==e)return t;let r=rK()(t);return r.totalEpisode=l,r.playVV=n,r.updateTime=(Date.now()+6e4).toString().slice(0,-3),r.status===ny.Pending&&l&&(r.status=ny.Reviewing),r})})},[]);return(0,s.useMemo)(()=>({createMix:o,removeMixes:d,editMixInfo:u,editMixesPermission:c,editMixAweme:v,getLatestCreatedMixId:r,clearLatestCreatedMixId:i,refreshMixInfo:a}),[o,d,u,c,v,r,i,a])};var rG=l("923575"),rq=l("987692");let rX=e=>{let{currentNumber:t,setCurrentNumber:l,awemeInfoList:n,setAwemeInfoList:r,mixInfo:i,close:o}=e,d=(0,s.useRef)({cursor:0,hasMore:1,statusCode:-1,lastMixVideoIndex:-1}),u=(0,s.useRef)(t),c=(0,s.useRef)(!1);return(0,s.useEffect)(()=>{let e=!1;return(async()=>{var t,n,s,u,v;c.current=!0;let m=await (0,rG.Lz)({mixId:null==i?void 0:i.mixId,cursor:null===(t=d.current)||void 0===t?void 0:t.cursor,count:20});if(c.current=!1,(null!==(s=null==m?void 0:null===(n=m.data)||void 0===n?void 0:n.length)&&void 0!==s?s:0)!==0){d.current={cursor:null==m?void 0:m.cursor,hasMore:null==m?void 0:m.hasMore,statusCode:null==m?void 0:m.statusCode,lastMixVideoIndex:(null==m?void 0:null===(u=m.data)||void 0===u?void 0:u.length)-1};let t=null==m?void 0:null===(v=m.data)||void 0===v?void 0:v.map(e=>{let{cover:t,status:l,playVV:n}=i||{};return e.mixInfo&&(e.mixInfo.cover=t,e.mixInfo.status=l,e.mixInfo.playVV=n),(0,a._)({},e)});if(e)return;r(t||[]),l(0)}else(null==m?void 0:m.statusCode)===0?ei.F.info("当前作品不可见"):ei.F.info("服务异常,请稍后重试"),o()})(),()=>{e=!0}},[i]),(0,s.useEffect)(()=>{-1!==u.current&&-1!==t&&t>u.current&&t>d.current.lastMixVideoIndex&&u.current===d.current.lastMixVideoIndex&&ei.F.info("暂无更多合集, 已为你播放推荐视频"),u.current=t},[t]),(0,s.useEffect)(()=>{5>Math.abs(Number(null==n?void 0:n.length)-t)&&-1!==t&&!c.current&&(async()=>{var e,l,a,o;if((null===(e=d.current)||void 0===e?void 0:e.hasMore)===1){c.current=!0;let e=await (0,rG.Lz)({mixId:null==i?void 0:i.mixId,cursor:null===(l=d.current)||void 0===l?void 0:l.cursor,count:20});c.current=!1,d.current={cursor:null==e?void 0:e.cursor,hasMore:null==e?void 0:e.hasMore,statusCode:null==e?void 0:e.statusCode,lastMixVideoIndex:(null==n?void 0:n.length)+(null==e?void 0:null===(a=e.data)||void 0===a?void 0:a.length)-1},r(t=>[...t,...(null==e?void 0:e.data)||[]])}else{c.current=!0;let e=await (0,rq.b)({awemeId:null===(o=n[t])||void 0===o?void 0:o.awemeId,count:20,filterGids:n.map(e=>null==e?void 0:e.awemeId).join(",")||""});c.current=!1,r(t=>[...t,...(null==e?void 0:e.awemeList)||[]])}})()},[n,t]),null};var rQ=l("85703");function rJ(e){let{fetchAllData:t,scrollListRef:l,onComplete:n}=e,r=(0,s.useRef)(!1);return{doSilentReload:(0,s.useCallback)(async()=>{if(!r.current){r.current=!0;try{var e,i,a;let r=await t();if(!r)return;let{dataList:o,hasMore:s}=r;(null==l?void 0:null===(e=l.current)||void 0===e?void 0:e.resetRes)?l.current.resetRes({dataList:o,statusCode:0,hasMore:s?1:0}):null==l||null===(a=l.current)||void 0===a||null===(i=a.setScrollData)||void 0===i||i.call(a,{dataList:o,statusCode:0}),null==n||n(s)}catch(e){}finally{r.current=!1}}},[t,l,n])}}var r0=l("68901");function r1(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],{isActive:l,cacheEnabled:n}=nc(),r=(0,s.useRef)(l),i=(0,s.useRef)(!0),a=(0,s.useRef)(e);a.current=e;let o=(0,s.useRef)(l);o.current=l;let d=(0,s.useRef)(n);d.current=n,(0,s.useEffect)(()=>{if(!n)return;if(i.current){i.current=!1,r.current=l;return}let e=l&&!r.current;r.current=l,e&&a.current()},[l,n,...t]),(0,s.useEffect)(()=>{let e=location.pathname,t=!0;return r0.history.listen(()=>{let l=location.pathname.startsWith(e);l&&!t&&o.current&&d.current&&a.current(),t=l})},[])}let r2=e=>(null==e?void 0:e.isSeries2Mix)?e.seriesId:e.mixId,r3=e=>e.isSeries2Mix,r5=e=>{var t;return e.isSeries2Mix?{disabled:!0,disabledDesc:"该合集不支持批量管理",disabledToastInfo:"该合集不支持批量管理",type:"toast"}:(null==e?void 0:null===(t=e.chargeInfo)||void 0===t?void 0:t.chargeType)?{disabled:!0,disabledDesc:"付费合集不支持批量管理",disabledToastInfo:"付费合集不支持批量管理",type:"toast"}:{disabled:!1,disabledDesc:""}},r6={top:0,bottom:16,left:0,right:16};var r4=s.forwardRef((e,t)=>{var l,n,r;let{userInfo:i,currentTab:d,isListSelectable:u,topNavHeight:c=60}=e,v=(0,nl.o)(null==i?void 0:i.secUid),{isSelf:m,updateFollowStatus:h}=(0,s.useContext)(G)||{},p=(0,eH.useUserInfoContext)()||{},g=(0,K._)()||{},{isActive:_}=nc(),[x,w]=(0,s.useState)(!1),[b,I]=(0,s.useState)(),[y,j]=(0,s.useState)(0),k=(0,s.useRef)(0),N=(0,s.useRef)(!0),S=(0,s.useRef)(0),E=(0,s.useRef)(0),L=(0,s.useRef)(!0),T=(0,s.useMemo)(()=>{let{isBlock:e,isBlocked:t,secret:l,followStatus:n}=i;return!!(e||t||!m&&l&&2!==n)},[m,i]),{reloadForPostDelete:M,isPostDelete:D}=(0,s.useContext)(li),P=(0,s.useRef)(null),A=(0,s.useCallback)(()=>{var e,t,l,n;L.current=!0,S.current=0,w(!1),null==P||null===(t=P.current)||void 0===t||null===(e=t.reset)||void 0===e||e.call(t),k.current=0,null==P||null===(n=P.current)||void 0===n||null===(l=n.reload)||void 0===l||l.call(n)},[]);(0,s.useEffect)(()=>{D&&A()},[D,A]);let{doSilentReload:F}=rJ({fetchAllData:(0,s.useCallback)(async()=>{let e=await (0,lY.Kl)({uid:v,cursor:0,count:18,readNewMix:!0});if(e.statusCode)return null;let t=[...e.data||[]],l=e.hasMore,n=!0,r=0;if(!l&&t.length<18){let e=await (0,lG.HN)({uid:v,cursor:0,count:18,listScene:3});!e.statusCode&&(t.push(...e.data||[]),r=e.cursor,n=e.hasMore)}return L.current=l,S.current=l?e.cursor:0,k.current=r,N.current=l||n,E.current=e.total||E.current,{dataList:t,hasMore:l||n}},[v]),scrollListRef:P,onComplete:(0,s.useCallback)(e=>{N.current=e},[])});r1(F,[v]);let B=(0,s.useCallback)(async()=>{if(L.current){let{data:e,cursor:t,hasMore:l,statusCode:n,total:r}=await (0,lY.Kl)({uid:v,cursor:S.current,count:18,readNewMix:!0});return S.current=t,E.current=r,!l&&(L.current=!1),{data:e,cursor:t,hasMore:!0,statusCode:n}}let{data:e,cursor:t,hasMore:l,statusCode:n,total:r}=await (0,lG.HN)({uid:v,cursor:k.current,count:18,listScene:3});return k.current=t,N.current=l,0===y&&r&&j(r+E.current),{data:e,cursor:t,hasMore:l,statusCode:n}},[v,y]);(0,s.useEffect)(()=>{m&&y&&tG.sendLog("creatorManageEntranceShow",{type:"compilation"})},[m,y]);let U=(0,s.useCallback)((e,t)=>(0,o.jsx)("div",{onClick:t=>{(null==e?void 0:e.totalEpisode)!==0&&(t.preventDefault(),I(e))},children:(0,o.jsx)(rZ,{info:e,rank:t,userInfo:i})}),[i]),O=(0,nn.m)(),{updateIsSelectDisabled:H}=lj(),z=(0,s.useCallback)(async(e,t,l,n)=>{var r,i;let a=t.findIndex(t=>t===e);nZ.sendLog("dragDropCompilation",{compilation_id:null==n?void 0:n.mixId,compilation_name:null==n?void 0:n.mixName,author_id:null==n?void 0:null===(r=n.author)||void 0===r?void 0:r.uid,status:(null==n?void 0:n.status)===ny.Public?"public":"private",before_rank_order:l,after_rank_order:a}),null==H||H(!0);let{statusCode:o=-1}=await l7({currentMixId:e,mixIdAfterCurrent:null!==(i=t[a+1])&&void 0!==i?i:0});null==H||H(!1);let s=0===o;return!s&&ei.F.info("移动失败,请稍后再试"),s},[H]),[Z,$]=(0,s.useState)([]),Y=nb(),q=(0,s.useRef)({borderRadius:"12px"}),{withMask:X}=nI((0,R._)((0,a._)({maskShadowStyle:q.current,getItemId:r2,dataList:Z,isSupportMulti:!0},Y),{firstItem:null===(n=P.current)||void 0===n?void 0:null===(l=n.getTargetNode)||void 0===l?void 0:l.call(n,0),getColumnCount:()=>3,stickyArea:{top:c+58+72,bottom:0,left:0,right:0},itemMargin:r6,getItemSelectedDisabled:r5})),Q=rY({scrollListRef:P,userInfo:i});(0,s.useImperativeHandle)(t,()=>(0,a._)({reloadMixList:A},Q),[A]),(0,s.useEffect)(()=>()=>{var e;(null!==(e=C.Le.getConfig(C.gI.MixEditorUrlList))&&void 0!==e?e:[]).forEach(e=>window.URL.revokeObjectURL(e))},[]);let J=(0,s.useCallback)((e,t)=>t?e.filter(e=>-1===t.findIndex(t=>(null==t?void 0:t.mixId)?(null==t?void 0:t.mixId)===e.mixId:(null==t?void 0:t.seriesId)===e.seriesId)):e,[]);return T?null:(0,o.jsx)(ru,{value:Q,children:(0,o.jsx)(lO,{disabled:!u,children:(0,o.jsxs)("div",{className:rW.collection,children:[(0,o.jsx)("div",{className:f()(rW.list,{[rW.more]:x}),children:(0,o.jsx)(lK,{retryTimes:50,isListSelectable:u,scrollContainerEl:O,ref:P,skeletonNum:0,setDataList:$,dataFilter:J,defaultHasMoreFlag:N.current,renderItem:U,fetchMoreData:B,containerClassName:rW.container,itemClassName:rW.item,pause:"post"!==d||!_,panelNoMoreData:(0,o.jsx)("div",{className:rW.noMore}),panelNoData:(0,o.jsx)(V.H,{className:rW.empty,icon:(0,o.jsx)(lq.Z,{}),title:"暂无内容",desc:"该账号还未发布过合集哦~"}),containerNoLineHeight:!0,withMask:X,onSort:z,getSortId:r2,getItemDragDisabled:r3})}),b&&(0,o.jsx)(lN.default,(0,a._)({modalEnterFrom:lS.a.UserPostMix,isActive:!0,isSelf:m,userContext:p,abtestData:g,uid:v,notCanMixListen:!0,moreBoxShowList:{notInterestingIcon:!1,unfollow:!0,report:!0,deleteSelfPost:m},logParams:{enter_from:m?"personal_homepage":"others_homepage",enter_from_merge:m?"personal_homepage":"others_homepage",enter_method:(0,W.Rs)("enter_method"),tab_name:"compilation"},close:()=>{I(void 0),h(),null==M||M()},shortCutFilteredList:[null===(r=lE.getShortcut().dislike)||void 0===r?void 0:r.key]},b.isSeries2Mix?{modalInnerFeedCard:"series",seriesInfo:b,awemeSeriesInfo:b,anyHooks:rQ.w}:{modalInnerFeedCard:"mix",mixInfo:b,awemeMixInfo:b,anyHooks:rX}))]})})})}),r7={item:"aYMwZ89O",cover:"oCAQjmFt",payTag:"TGxHLuNA",image:"wkNyHfnB",content:"aqY3HqVU",name:"UEc2tdhC",count:"l6yhwBYw",episode:"GHa_Fpqv",unreadMixCount:"pKman3kb"},r9=e=>{var t,l;let{info:n,rank:r,userInfo:i,currentTab:a}=e,[d,u]=(0,nj.Z)(),[c,v]=(0,s.useState)(!1),[m,f]=(0,s.useState)(!0),h=(0,eq.$y)(null==n?void 0:n.seriesId,1,`previous_page=${(0,Z.yW)()}`);return(0,s.useEffect)(()=>{if(u&&!c){if(v(!0),"favorite_collection"===a){U.logInstance.sendLog("compilationCoverShow",{enter_from:(0,Z.yW)(),tab_name:"favorite_collection",group_id:"",compilation_id:n.seriesId});return}tG.sendLog("collectionCoverShow",{enter_from:(0,Z.yW)(),compilation_id:n.seriesId,compilation_video_cnt:n.totalEpisode,author_id:i.uid,group_id:""})}},[u]),(0,o.jsx)(P.a,{href:h,title:n.seriesName,target:"_blank",rel:"noopener noreferrer",onClick:e=>{if("favorite_collection"===a){U.logInstance.sendLog("compilationCoverClick",{enter_from:(0,Z.yW)(),tab_name:"favorite_collection",group_id:"",compilation_id:n.seriesId}),f(!1);return}tG.sendLog("collectionCoverClick",{enter_from:(0,Z.yW)(),compilation_id:n.seriesId,compilation_video_cnt:n.totalEpisode,author_id:i.uid,rank:r}),!n.totalEpisode&&(ei.F.info("创作者还没有为这个短剧添加视频"),e.preventDefault())},children:(0,o.jsxs)("div",{className:r7.item,ref:d,children:[(0,o.jsxs)("div",{className:r7.cover,children:[(0,o.jsx)(nk.Q,{src:n.cover,alt:n.seriesName,iconWidth:30,iconHeight:88,imgClass:r7.image}),((null==n?void 0:null===(t=n.chargeInfo)||void 0===t?void 0:t.chargeType)===1||(null==n?void 0:null===(l=n.chargeInfo)||void 0===l?void 0:l.chargeType)===3)&&(0,o.jsx)("div",{className:r7.payTag,children:"付费"})]}),(0,o.jsxs)("div",{className:r7.content,children:[(0,o.jsx)("div",{className:r7.name,children:n.seriesName}),(0,o.jsxs)("p",{className:r7.count,children:[(0,ef.qe)(n.playVV)," 播放"]}),(0,o.jsxs)("p",{className:r7.episode,children:[(0,o.jsxs)("span",{children:["更新至 ",n.totalEpisode," 集"]}),"favorite_collection"===a&&!!n.hasUpdatedEpisode&&m&&(0,o.jsxs)("span",{className:r7.unreadMixCount,children:["更新",n.hasUpdatedEpisode,"集"]})]})]})]})})},r8={collection:"fplz0c9r",header:"lcFgVopx",title:"YiP8cQJP",enter:"MaR_HOHH",expand:"Vdp_D47k",down:"ycKSEuQ3",list:"WQt4FcRN",container:"ihbJPwUK",item:"Gddw9dRc",more:"q2MmSH5M",noMore:"JbUkP1eK"},ie=s.forwardRef((e,t)=>{var l,n,r;let{userInfo:i,currentTab:a,defaultSeriesRes:d,setIsExpand:u,updateDataList:c}=e,{isActive:v}=nc(),m=(0,nl.o)(null==i?void 0:i.secUid),{isSelf:h,updateFollowStatus:p}=(0,s.useContext)(G)||{},g=(0,eH.useUserInfoContext)()||{},_=(0,K._)()||{},[x,C]=(0,s.useState)(!1),[w,b]=(0,s.useState)(),[I,y]=(0,s.useState)((null==d?void 0:d.total)||0),j=(0,s.useRef)(null!==(n=null==d?void 0:d.cursor)&&void 0!==n?n:0),k=(0,s.useRef)(null===(r=null==d?void 0:d.hasMore)||void 0===r||r),N=(0,s.useMemo)(()=>(null==d?void 0:d.data)||[],[d]),S=(0,s.useMemo)(()=>{let{isBlock:e,isBlocked:t,secret:l,followStatus:n}=i;return!!(e||t||!h&&l&&2!==n)},[h,i]),{reloadForPostDelete:E,isPostDelete:L}=(0,s.useContext)(li),T=(0,s.useRef)(null),M=(0,s.useCallback)(()=>{var e,t,l,n;C(!1),null==T||null===(t=T.current)||void 0===t||null===(e=t.reset)||void 0===e||e.call(t),j.current=0,null==T||null===(n=T.current)||void 0===n||null===(l=n.reload)||void 0===l||l.call(n)},[]);(0,s.useEffect)(()=>{L&&M()},[L,M]);let{doSilentReload:R}=rJ({fetchAllData:(0,s.useCallback)(async()=>{let e=await (0,lY.Kl)({uid:m,cursor:0,count:18});return e.statusCode?null:(j.current=e.cursor,k.current=e.hasMore,{dataList:e.data||[],hasMore:e.hasMore})},[m]),scrollListRef:T,onComplete:(0,s.useCallback)(e=>{k.current=e},[])});r1(R,[m]),(0,s.useImperativeHandle)(t,()=>({reloadSeriesList:M}),[M]);let D=(0,s.useCallback)(async()=>{let{data:e,cursor:t,hasMore:l,statusCode:n,total:r}=await (0,lY.Kl)({uid:m,cursor:j.current,count:18});return j.current=t,k.current=l,0===I&&r&&y(r),{data:e,cursor:t,hasMore:l,statusCode:n}},[m,I]);(0,s.useEffect)(()=>{h&&I&&tG.sendLog("creatorManageEntranceShow",{type:"compilation"})},[h,I]);let P=(0,s.useCallback)((e,t)=>(0,o.jsx)("div",{onClick:t=>{(null==e?void 0:e.totalEpisode)!==0&&(t.preventDefault(),b(e))},children:(0,o.jsx)(r9,{info:e,rank:t,userInfo:i})}),[i]),A=(0,nn.m)();return S?null:(0,o.jsxs)("div",{className:r8.collection,children:[(0,o.jsx)("div",{className:f()(r8.list,{[r8.more]:x}),children:(0,o.jsx)(lA.Z,{scrollContainerEl:A,ref:T,skeletonNum:0,retryTimes:50,defaultDataList:N,defaultHasMoreFlag:k.current,renderItem:P,fetchMoreData:D,containerClassName:r8.container,itemClassName:r8.item,pause:"post"!==a||!v,setDataList:c,containerNoLineHeight:!0,panelNoMoreData:(0,o.jsx)("div",{className:r8.noMore}),panelNoData:(0,o.jsx)(V.H,{className:r8.empty,icon:(0,o.jsx)(lq.Z,{}),title:"暂无内容",desc:"该账号还未发布过短剧哦~"}),buttomClassName:r8.bottom})}),w&&(0,o.jsx)(lN.default,{modalEnterFrom:lS.a.UserPostSeries,modalInnerFeedCard:"series",isSelf:h,seriesInfo:w,userContext:g,abtestData:_,uid:m,awemeSeriesInfo:w,anyHooks:rQ.w,notCanMixListen:!0,moreBoxShowList:{notInterestingIcon:!1,unfollow:!0,report:!0,deleteSelfPost:h},logParams:{enter_from:h?"personal_homepage":"others_homepage",enter_from_merge:h?"personal_homepage":"others_homepage",enter_method:(0,W.Rs)("enter_method"),tab_name:"compilation"},close:()=>{b(void 0),p(),null==E||E()},shortCutFilteredList:[null===(l=lE.getShortcut().dislike)||void 0===l?void 0:l.key]})]})}),it={},il=l("140726"),ir=l("556265"),ii=e=>{let{resetStatusFunc:t,scrollListRef:l,scrollElementRef:n,topOffset:r=0}=e,{setResetScrollList:i,isListSelectable:a}=(0,s.useContext)(ly);(0,s.useEffect)(()=>{a&&(null==i||i(()=>{var e,i,a,o,s;null==l||null===(i=l.current)||void 0===i||null===(e=i.reset)||void 0===e||e.call(i),null==t||t(),null===(a=n.current)||void 0===a||a.scrollTo({top:r}),null==l||null===(s=l.current)||void 0===s||null===(o=s.reload)||void 0===o||o.call(s)}))},[a,i,t,n,l,r])},ia=l("816453"),io=l("660905");let is=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:6;if("undefined"==typeof window)return e;let t=document.documentElement.classList.contains(io.xe),l=ia.I+(t?io.JU:0);return window.innerWidth>l?6:3};var id=l("773775"),iu=l("628077"),ic=l("326367"),iv="J8e3L2VE";let im=e=>{var t,l,n;let{info:r,isSelf:i,tab:a,uid:u,rank:c,keyword:v,onClick:m,isInSearch:f,isSpider:h,className:p,id:g,children:_,logParams:w,onNicknameClick:b,showPermissionIcon:I,reuseConfig:y}=e,[j,k]=(0,nj.Z)(),[N,S]=(0,s.useState)(!1),E=(0,s.useRef)(!1),L={};i&&"post"===a?L.playCount=null==r?void 0:null===(l=r.stats)||void 0===l?void 0:l.playCount:L.likeCount=null==r?void 0:null===(n=r.stats)||void 0===n?void 0:n.diggCount;let T=(0,eq.Wg)(r,d.stringify({previous_page:i?"personal_homepage":"others_homepage",modeFrom:iI[a],cursor:null==r?void 0:r.cursor,count:10,secUid:u,enter_method:a}));C.Le.setConfig(C.gI.EnterDetailUrl,{[null==r?void 0:r.awemeId]:T});let M=()=>{var e,t,l,n,i,o,s,d,u,m;f?tG.sendLog("search_result_click",{enter_from:(0,Z.yW)(),enter_from_merge:(0,Z.yW)(),author_id:null==r?void 0:null===(e=r.authorInfo)||void 0===e?void 0:e.uid,group_id:null==r?void 0:r.awemeId,search_type:"general",from_xigua:(null==r?void 0:r.awemeType)===nJ.e.XgVideo?1:0,aweme_type:null==r?void 0:r.awemeType,tab_name:a,rank:c,search_keyword:v,enter_method:f?"search_post":"click_tab",is_co_publish:Number(null==r?void 0:null===(l=r.cooperationInfo)||void 0===l?void 0:null===(t=l.cooperationCreators)||void 0===t?void 0:t.length)>1?1:0,co_publish_author_list:null===(i=r.cooperationInfo)||void 0===i?void 0:null===(n=i.cooperationCreators)||void 0===n?void 0:n.filter(e=>e.roleId!==ee.iG.Author).map(e=>`${e.uid}_${null==e?void 0:e.roleId}`)}):tG.sendLog("videoCoverClick",{enter_from:(0,Z.yW)(),author_id:null==r?void 0:null===(o=r.authorInfo)||void 0===o?void 0:o.uid,group_id:null==r?void 0:r.awemeId,from_xigua:(null==r?void 0:r.awemeType)===nJ.e.XgVideo?1:0,aweme_type:null==r?void 0:r.awemeType,tab_name:a,rank:c,enter_method:"click_tab",is_co_publish:Number(null==r?void 0:null===(d=r.cooperationInfo)||void 0===d?void 0:null===(s=d.cooperationCreators)||void 0===s?void 0:s.length)>1?1:0,co_publish_author_list:null===(m=r.cooperationInfo)||void 0===m?void 0:null===(u=m.cooperationCreators)||void 0===u?void 0:u.filter(e=>e.roleId!==ee.iG.Author).map(e=>`${e.uid}_${null==e?void 0:e.roleId}`)})};return(0,s.useEffect)(()=>{let e=(0,W.Rs)("vid"),{isUsed:t}=C.Le.getConfig(C.gI.HasInUserSearch)||{};(null==r?void 0:r.awemeId)===e&&"post"===a&&!t&&S(!0)},[]),(0,s.useEffect)(()=>{if(N&&!E.current){var e;$.emit($.EVENT.userHasLook,{isInView:k,position:null===(e=j.current)||void 0===e?void 0:e.offsetTop,rank:c}),E.current=k}},[N,k,c]),(0,o.jsxs)("div",{className:p,id:g,children:[(0,o.jsx)(n6.J,{awemeInfo:r,isSpider:h||(0,em._Q)(),src:null==r?void 0:null===(t=r.video)||void 0===t?void 0:t.cover,playCount:L.playCount,likeCount:L.likeCount,isSelf:i,videoHref:T,onClick:e=>{M(),T.startsWith("/lvdetail/")?(e.preventDefault(),window.open(T,(0,ic.f)()?"_self":"_blank","noopener")):null==m||m(e)},onNicknameClick:()=>{!T.startsWith("/lvdetail/")&&(null==b||b())},uid:u,onShow:()=>{var e,t,l,n,i,o,s,d,u,c;f?tG.sendLog("search_result_show",{enter_from:(0,Z.yW)(),enter_from_merge:(0,Z.yW)(),search_type:"general",author_id:null==r?void 0:null===(e=r.authorInfo)||void 0===e?void 0:e.uid,group_id:null==r?void 0:r.awemeId,from_xigua:(null==r?void 0:r.awemeType)===nJ.e.XgVideo?1:0,aweme_type:null==r?void 0:r.awemeType,tab_name:a,enter_method:"click_tab",search_keyword:v,is_co_publish:Number(null==r?void 0:null===(l=r.cooperationInfo)||void 0===l?void 0:null===(t=l.cooperationCreators)||void 0===t?void 0:t.length)>1?1:0,co_publish_author_list:null===(i=r.cooperationInfo)||void 0===i?void 0:null===(n=i.cooperationCreators)||void 0===n?void 0:n.filter(e=>e.roleId!==ee.iG.Author).map(e=>`${e.uid}_${null==e?void 0:e.roleId}`)}):tG.sendLog("collectionCoverShow",{enter_from:(0,Z.yW)(),author_id:null==r?void 0:null===(o=r.authorInfo)||void 0===o?void 0:o.uid,group_id:null==r?void 0:r.awemeId,from_xigua:(null==r?void 0:r.awemeType)===nJ.e.XgVideo?1:0,aweme_type:null==r?void 0:r.awemeType,tab_name:a,enter_method:"click_tab",is_co_publish:Number(null==r?void 0:null===(d=r.cooperationInfo)||void 0===d?void 0:null===(s=d.cooperationCreators)||void 0===s?void 0:s.length)>1?1:0,co_publish_author_list:null===(c=r.cooperationInfo)||void 0===c?void 0:null===(u=c.cooperationCreators)||void 0===u?void 0:u.filter(e=>e.roleId!==ee.iG.Author).map(e=>`${e.uid}_${null==e?void 0:e.roleId}`)})},showTitle:!0,showHasLook:!i&&N,scene:a,from:"user",logParams:w,onLoad:()=>{if(!n8()){var e;let t;n9(),(0,z.B1)({tag:x.w3.moment.first_img_render_time});let l=(t=x.w3.moment.first_img_render_time,(0,iu.I)()?(0,z.J1)(t)-(0,z.J1)(x.w3.page.page_init_time):(0,z.J1)(t)),n=(0,z.J1)(x.w3.fetchers.fetcher_user_start),r=(0,z.J1)(x.w3.fetchers.fetcher_user_end),i=!!(0,z.J1)("user_tab_change"),a=i?"tab_change":(null===(e=document.getElementById("sw-tag"))||void 0===e?void 0:e.innerHTML)==="1"?"cache":(0,iu.I)()?"route":"url",o=l;i&&(o=(0,z.J1)(x.w3.moment.first_img_render_time)-(0,z.J1)("user_tab_change")),U.logInstance.sendLog("webPerfTiming",{enter_from:(0,Z.yW)(),from:a,[x.w3.moment.first_img_render_time]:o,[x.w3.fetchers.fetcher_user_start]:n,[x.w3.fetchers.fetcher_user_end]:r,[x.w3.fetchers.fetcher_user_duration]:r-n}),(0,z.tl)("user_tab_change")}},userTabKey:a,showPermissionIcon:I,reuseConfig:y}),(0,o.jsx)("div",{className:iv,ref:j}),_]})};var ih=l("811603"),ip=l("709705"),ig=l("426038"),i_=l("855436");let ix=e=>{let{currentNumber:t,setCurrentNumber:l,awemeInfoList:n,setAwemeInfoList:r,userAwemeList:i,scrollRef:a,modalVideoIndex:o,additionalDistance:d=-60,notSeenItemList:u=[]}=e,[c,v]=(0,s.useState)(!1),m=(0,s.useRef)(t),f=(0,s.useRef)(-1),h=(0,s.useRef)(!1),p=(0,s.useRef)(o);return(0,s.useEffect)(()=>{p.current=o},[o]),(0,s.useEffect)(()=>()=>{var e;if(p.current===m.current)return;let t=is(),l=e=>Math.floor(e/t);if(l(p.current)!==l(m.current))null===(e=a.current)||void 0===e||e.locateSelectVideo(m.current<=f.current?m.current:f.current,d)},[]),(0,s.useEffect)(()=>{(null==n?void 0:n.length)>o&&-1===t&&l(o||0)},[n]),(0,s.useEffect)(()=>{r(()=>(f.current=(null==i?void 0:i.length)-1,i))},[i]),(0,s.useEffect)(()=>{-1!==m.current&&-1!==t&&t>m.current&&t>f.current&&m.current===f.current&&ei.F.info("暂无更多作品, 已为你播放推荐视频"),m.current<f.current?v(!1):v(!0),m.current=t},[t]),(0,s.useEffect)(()=>{5>Math.abs(Number(null==n?void 0:n.length)-t)&&-1!==t&&!h.current&&(async()=>{var e,l,i,o,s,d;if(null===(l=a.current)||void 0===l?void 0:null===(e=l.getHasMore)||void 0===e?void 0:e.call(l))h.current=!0,await (null===(i=a.current)||void 0===i?void 0:i.loadMoreData()),h.current=!1;else{h.current=!0;let e=await (0,rq.b)({awemeId:null===(o=n[t])||void 0===o?void 0:o.awemeId,count:20,filterGids:n.map(e=>null==e?void 0:e.awemeId).join(",")||""});h.current=!1;let l=null==e?void 0:null===(s=(d=e.awemeList).map)||void 0===s?void 0:s.call(d,e=>(e.dataType="releated",e));r(e=>[...e,...l||[]])}})()},[t,n]),(0,s.useEffect)(()=>{let e=null==n?void 0:n[t],l=null==u?void 0:u.indexOf(null==e?void 0:e.awemeId);(null==e?void 0:e.awemeId)&&-1!==l&&(0,eI.qA)({item_id_list:null==e?void 0:e.awemeId,type:1})},[n,t]),{isTabFeed:c}},iC=(0,i_.ZP)(()=>Promise.all([l.e("23634"),l.e("73286"),l.e("41162"),l.e("42422"),l.e("15799"),l.e("21133"),l.e("28161"),l.e("73356"),l.e("69855"),l.e("5974"),l.e("42794"),l.e("15915"),l.e("72230"),l.e("68055"),l.e("44077"),l.e("51705"),l.e("24882"),l.e("73481"),l.e("10771"),l.e("6593"),l.e("6757"),l.e("44882"),l.e("64942"),l.e("26973"),l.e("74352"),l.e("90597")]).then(l.bind(l,604467)),{ssr:!1}),iw=e=>{var t,l,n,r,i,d,u;let{uid:c,tab:v,currentTab:m,awemeInfo:f,userAwemeList:h,scrollRef:p,modalIndex:g=-1,setModalIndex:_,currentUserInfoDetail:x,modeFrom:C,showModal:w=!1,customMadeHook:b,onClose:I,logParams:y,modalInnerFeedCard:j,reuseConfig:k}=e,N=(0,ih._)(e,["uid","tab","currentTab","awemeInfo","userAwemeList","scrollRef","modalIndex","setModalIndex","currentUserInfoDetail","modeFrom","showModal","customMadeHook","onClose","logParams","modalInnerFeedCard","reuseConfig"]),{list:S=[],uid:E}=(0,ip.$o)(ig.LocalStorageKeys.NotSeenItemList)||{},L=(null==x?void 0:x.uid)===E?S:[],{isSelf:T,updateFollowStatus:M,haveDashBoard:R}=null!==(i=(0,s.useContext)(G))&&void 0!==i?i:{},D=null!==(d=(0,K._)())&&void 0!==d?d:{},P=null!==(u=(0,eH.useUserInfoContext)())&&void 0!==u?u:{},A=null==P?void 0:null===(l=P.userInfo)||void 0===l?void 0:null===(t=l.info)||void 0===t?void 0:t.uid,F=(0,s.useMemo)(()=>T&&R&&"post"===m,[R,T,m]),{reloadForPostDelete:B}=(0,s.useContext)(li);return -1!==g||w?(0,o.jsx)(iC,(0,a._)({modalInnerFeedCard:j,modalEnterFrom:C,uid:c,userContext:P,abtestData:D,isSelf:T,anyHooks:null!=b?b:ix,originAwemeInfo:f,userAwemeList:h,scrollRef:p,modalVideoIndex:g,additionalDistance:-150,moreBoxShowList:{notInterestingIcon:!1,unfollow:!0,report:(null==f?void 0:null===(n=f.authorInfo)||void 0===n?void 0:n.uid)!==A,dataAnalysis:F,deleteSelfPost:T},logParams:(0,a._)({enter_from:T?"personal_homepage":"others_homepage",enter_from_merge:T?"personal_homepage":"others_homepage",enter_method:(0,W.Rs)("enter_method"),is_personal_panel_video:Number((0,W.Rs)("is_personal_panel_video"))||0,tab_name:v,sub_tab_name:"video"},y),close:()=>{null==I||I(),null==_||_(-1),M(),null==B||B()},shortCutFilteredList:[null===(r=lE.getShortcut().dislike)||void 0===r?void 0:r.key],notSeenItemList:L,scene:v,reuseConfig:k},N)):null},ib=s.memo(lA.Z,(e,t)=>{let l=C.Le.getConfig(C.gI.AbtestData);if(!(null==l?void 0:l.enableZustand))return!1;for(let l in e)if(e[l]!==t[l])return!1;return!0}),iI={post:"userPost",like:"userLike",favorite_collection:"userCollection",record:"userRecord",watch_later:"userWatchLater"},iy=e=>null==e?void 0:e.awemeId,ij=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:60;return{top:e+58+72,bottom:0,left:0,right:0}},ik=function(){let{panelNoData:e,handleLoadEnd:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return((0,s.useEffect)(()=>{null==t||t(),n9()},[]),e)?(0,o.jsx)(o.Fragment,{children:e}):(0,o.jsx)(V.H,{title:"暂无内容",icon:(0,o.jsx)(lq.Z,{})})};var iN=s.memo(s.forwardRef((e,t)=>{var l,n,r,i,d,u;let{modalInnerFeedCard:c="",defaultRes:v,currentTab:m,tab:f,uid:h,itemClassName:p,fetchMoreData:g,panelNoMoreData:_,panelNoData:w,pause:b,isInSearch:I,retryTimes:y,setUserPostList:j,updateAwemeList:k,getItemSelectedDisabled:N,resetStatusFunc:S,topNavHeight:E=60,topOffset:L=0,handleLoadEnd:T,listSelectContext:M,columnCount:D,containerRef:P,scrollRef:A,keyword:F,customStickyArea:B,logParams:U,collectionFolderInfo:V,modalEnterFrom:O,scrollContainerEl:H,onClose:K,highLightAwemeId:Y,showPermissionIcon:q,reloadNum:X}=e,{isSelf:Q,currentUserInfoDetail:J,isSpider:ee}=(0,s.useContext)(G)||{},[et,en]=(0,s.useState)([]),[er,ei]=(0,s.useState)(-1),ea=(0,s.useRef)(),eo=(0,s.useRef)(),es=(0,s.useRef)();es.current=U;let ed=(0,s.useRef)(c);I&&C.Le.setConfig(C.gI.HasInUserSearch,{isUsed:I});let eu=(0,s.useCallback)(e=>{en(e),null==j||j(e),null==k||k(e)},[j,k]),ec=e=>{var t,l,n;null==e||null===(t=e.preventDefault)||void 0===t||t.call(e),(0,el.default)({success:async()=>{window.location.reload()},enterMethod:"nologin_video_guide",headerText:"登录后即可看更多最新作品",next:`https://${null===(n=window)||void 0===n?void 0:null===(l=n.location)||void 0===l?void 0:l.host}`})},ev=e=>{var t;let{itemInfo:l}=e;tG.sendLog("personalShieldAlbumShow",{enter_from:(0,Z.yW)(),to_user_id:null==l?void 0:null===(t=l.authorInfo)||void 0===t?void 0:t.uid,tab_name:f})},em=(0,s.useCallback)((e,t)=>{if(e.awemeType===nJ.e.NoLoginVideoGuide){var l;return(0,o.jsx)(id.V,{src:null==e?void 0:null===(l=e.video)||void 0===l?void 0:l.cover,desc:null==e?void 0:e.desc,showTitle:!0,name:null==e?void 0:e.name,onClick:ec,onShow:()=>ev({itemInfo:e}),iconWidth:50,cardStyle:id.U.AllVideo})}return(0,o.jsx)(im,{info:e,isSelf:!!Q,logParams:es.current,tab:f,uid:h,keyword:F,isSpider:ee,rank:t,onClick:l=>{null==l||l.preventDefault();let n=`${x.w3.modal.modal_first_video_play}_start`;if((0,z.tl)(n),(0,z.B1)({tag:n}),null==e?void 0:e.awemeId){var r;null===il.YY||void 0===il.YY||null===(r=il.YY.setPlayerReuseAble)||void 0===r||r.call(il.YY,ir.v.User,e.awemeId)}ed.current=c,ei(t),eo.current=e},isInSearch:I,onNicknameClick:()=>{ed.current="author_card",ei(t),eo.current=e},showPermissionIcon:q,reuseConfig:{scene:ir.v.User,reuseId:null==e?void 0:e.awemeId,autoCreate:!0}})},[]),ef=null===(n=ea.current)||void 0===n?void 0:null===(l=n.getDataList)||void 0===l?void 0:l.call(n),[eh,ep]=(0,s.useState)(null!=B?B:ij(E));(0,s.useEffect)(()=>{ep(null!=B?B:ij(E))},[E,B]);let eg=nb({scrollEl:null==A?void 0:A.current,containerEl:null==P?void 0:P.current}),e_=(0,s.useRef)({height:"auto",paddingBottom:"133%",borderRadius:"12px"}),{withMask:ex,updateSelectedList:eC}=nI((0,R._)((0,a._)({maskShadowStyle:e_.current,getItemId:iy,dataList:ef,isSupportMulti:!0},eg),{firstItem:null===(i=ea.current)||void 0===i?void 0:null===(r=i.getTargetNode)||void 0===r?void 0:r.call(i,0),getColumnCount:()=>D||is(3),stickyArea:eh,itemMargin:{top:0,bottom:16,left:0,right:16},getItemSelectedDisabled:N}),M);ii({resetStatusFunc:S,scrollListRef:ea,scrollElementRef:eg.scrollEleRef}),(0,s.useImperativeHandle)(t,()=>{var e,t,l,n,r,i,a,o;return{loadMoreData:null===(e=ea.current)||void 0===e?void 0:e.loadMoreData,locateSelectVideo:null===(t=ea.current)||void 0===t?void 0:t.locateSelectVideo,reset:null===(l=ea.current)||void 0===l?void 0:l.reset,reload:null===(n=ea.current)||void 0===n?void 0:n.reload,getTotal:null===(r=ea.current)||void 0===r?void 0:r.getTotal,resetRes:null===(i=ea.current)||void 0===i?void 0:i.resetRes,setScrollData:null===(a=ea.current)||void 0===a?void 0:a.setScrollData,getDataList:null===(o=ea.current)||void 0===o?void 0:o.getDataList,updateSelectedList:eC}});let ew=(0,nn.m)();(0,s.useEffect)(()=>{let e=(0,W.Rs)("aweme_id");if(e&&et&&(null==et?void 0:et.length)>0){var t;let l=null==et?void 0:null===(t=et.findIndex)||void 0===t?void 0:t.call(et,t=>(null==t?void 0:t.awemeId)===e);e&&-1!==l&&ei(l),(0,W.U$)(["aweme_id"])}},[et]),(0,s.useEffect)(()=>$.listen($.EVENT.openUserModal,e=>{let{awemeId:t}=e,l=(0,W.Rs)("aweme_id");if(l&&t===l&&et&&(null==et?void 0:et.length)>0){var n;let e=null==et?void 0:null===(n=et.findIndex)||void 0===n?void 0:n.call(et,e=>(null==e?void 0:e.awemeId)===l);-1!==e&&ei(e),(0,W.U$)(["aweme_id"])}}),[et]),(0,s.useEffect)(()=>{},[et]);let eb=(0,s.useCallback)(async()=>{(0,z.B1)({tag:x.w3.fetchers.fetcher_user_start,once:!0});let e=await g();return(0,z.B1)({tag:x.w3.fetchers.fetcher_user_end,once:!0}),e},[g]),eI=(0,s.useMemo)(()=>(0,o.jsx)(ik,{panelNoData:w,handleLoadEnd:T}),[w,T]),ey=(0,s.useCallback)((e,t)=>{let l=e.map(e=>null==e?void 0:e.awemeId),n=(t||[]).filter(e=>!l.includes(null==e?void 0:e.awemeId));return e.concat(n||[])},[]),ej=(0,s.useRef)([]);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ib,{ref:ea,highLightAwemeId:Y,handleLoadEnd:T,defaultDataList:(null==v?void 0:v.data)||ej.current,defaultHasMoreFlag:(null==v?void 0:v.hasMore)||1,defaultStatusCode:(null==v?void 0:v.statusCode)||0,defaultWhaleDecisionCustom:null==v?void 0:v.whaleDecisionCustom,containerClassName:n4.container,itemClassName:null!=p?p:n4.item,panelNoData:eI,panelNoMoreData:_,scrollContainerEl:ew,skeletonNum:0,renderItem:em,withMask:ex,fetchMoreData:eb,setDataList:eu,pause:null!=b?b:m!==f,retryTimes:y,reloadNum:X,blockType:"post"===f||"like"===f,listFilterFn:ey}),(0,o.jsx)(iw,{modalInnerFeedCard:ed.current,uid:h,tab:f,modeFrom:O||iI[f]||"",currentTab:m,awemeInfo:eo.current,userAwemeList:et.filter(e=>e.awemeType!==nJ.e.NoLoginVideoGuide),scrollRef:ea,modalIndex:Math.max(-1,(null==et?void 0:null===(d=et[0])||void 0===d?void 0:d.awemeType)===nJ.e.NoLoginVideoGuide?er-1:er),setModalIndex:ei,currentUserInfoDetail:J,logParams:U,collectionFolderInfo:V,onClose:()=>{(0,W.U$)(["aweme_id"]),(0,W.U$)(["is_personal_panel_video"]),null==K||K();let e=C.Le.getConfig(C.gI.AbtestData);il.YY.clearAllReusePlayer(!!(null==e?void 0:e.jxTopCardCache))},reuseConfig:{scene:ir.v.User,reuseId:null===(u=eo.current)||void 0===u?void 0:u.awemeId,autoCreate:!1}})]})})),iS=l("119778"),iE=e=>{var t,l;let{currentTab:n,topOffset:r=0,topNavHeight:i=60}=e,{userInfo:a}=(0,eH.useUserInfoContext)()||{},{isActive:d}=nc(),u=null!==(l=(0,nl.o)(null==a?void 0:null===(t=a.info)||void 0===t?void 0:t.secUid))&&void 0!==l?l:"",[c,v]=(0,s.useState)([]),[m,f]=(0,s.useState)(),h=(0,s.useRef)(),p=(0,s.useRef)(0),g=(0,s.useCallback)(()=>{p.current=0},[]),{doSilentReload:_}=rJ({fetchAllData:(0,s.useCallback)(async()=>{var e;let t=await (0,iS.fetchUserSecretPost)({count:18,userId:u,maxCursor:0});return 0!==t.statusCode?null:(p.current=null!==(e=t.maxCursor)&&void 0!==e?e:0,{dataList:t.data||[],hasMore:!!t.hasMore})},[u]),scrollListRef:h});r1(_,[u]);let x=(0,s.useCallback)(async()=>{try{let t=await (0,iS.fetchUserSecretPost)({count:18,userId:u,maxCursor:p.current});if(0===t.statusCode){var e;return p.current=null!==(e=t.maxCursor)&&void 0!==e?e:0,{data:t.data,maxCursor:t.maxCursor,hasMore:t.hasMore,statusCode:0}}return{data:[],maxCursor:0,hasMore:!1,statusCode:0}}catch(e){return{data:[],maxCursor:0,hasMore:!1,statusCode:0}}},[]);return(0,o.jsx)("div",{className:it.content,children:(0,o.jsx)(iN,{ref:h,resetStatusFunc:g,uid:u,highLightAwemeId:m,tab:"post",currentTab:n,defaultRes:{statusCode:0,hasMore:0,cursor:0,data:[]},fetchMoreData:x,setUserPostList:v,retryTimes:5,topNavHeight:i,topOffset:r,panelNoData:(0,o.jsx)(V.H,{className:it.empty,icon:(0,o.jsx)(lq.Z,{}),title:"暂无内容",desc:"该账号还未发布过作品哦~"}),pause:"post"!==n||!d})})},iL=l("506887"),iT=l("37821"),iM=l("35845"),iR=l("566118"),iD=l("18586"),iP={hasLook:"zo7FFqvh",btn:"CDSuSnES",text:"yjoesIpl",empty:"GSzRmUbF"};let iA=(0,s.forwardRef)((e,t)=>(0,o.jsx)("svg",(0,R._)((0,a._)({width:12,height:12,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,o.jsx)("path",{d:"M1.95 6.5L6 10.1l4.05-3.6M1.95 2L6 5.6 10.05 2",stroke:"#2F3035",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})}))),iF=e=>{let{currentNumber:t,setCurrentNumber:l,awemeInfoList:n,setAwemeInfoList:r,userAwemeList:i,notSeenItemList:a=[],originAwemeInfo:o,fetchBackWard:d,fetchForward:u,swiper:c,hasMore:v,scrollToTarget:m}=e,[f,h]=(0,s.useState)(!1),p=(0,s.useRef)(t),g=(0,s.useRef)(-1),_=(0,s.useRef)(!1),x=(0,s.useRef)();return x.current=()=>{let e=n[t];m({target:document.getElementById(`videocard-${null==e?void 0:e.awemeId}`),speed:100})},(0,s.useEffect)(()=>()=>{x.current()},[]),(0,s.useEffect)(()=>{let e=null==n?void 0:n.findIndex(e=>(null==e?void 0:e.awemeId)===(null==o?void 0:o.awemeId));-1!==e&&-1===t&&l(e)},[n]),(0,s.useEffect)(()=>{let e=n[t];r(()=>(g.current=(null==i?void 0:i.length)-1,i));let a=null==i?void 0:i.findIndex(t=>(null==t?void 0:t.awemeId)===(null==e?void 0:e.awemeId));if(a!==t&&-1!==t){if(c){var o;null==c||null===(o=c.slideToSync)||void 0===o||o.call(c,a),setTimeout(()=>{l(a)})}else l(a)}},[i]),(0,s.useEffect)(()=>{-1!==p.current&&-1!==t&&t>p.current&&t>g.current&&p.current===g.current&&ei.F.info("暂无更多作品, 已为你播放推荐视频"),p.current<g.current?h(!1):h(!0),p.current=t},[t]),(0,s.useEffect)(()=>{-1!==t&&(5>Math.abs(Number(null==n?void 0:n.length)-t)?v?null==d||d():!_.current&&(async()=>{var e;_.current=!0;let l=await (0,rq.b)({awemeId:null===(e=n[t])||void 0===e?void 0:e.awemeId,count:20,filterGids:n.map(e=>null==e?void 0:e.awemeId).join(",")||""});_.current=!1,r(e=>[...e,...(null==l?void 0:l.awemeList)||[]])})():t<4&&(null==u||u()))},[t,n]),(0,s.useEffect)(()=>{let e=null==n?void 0:n[t],l=null==a?void 0:a.indexOf(null==e?void 0:e.awemeId);(null==e?void 0:e.awemeId)&&-1!==l&&(0,eI.qA)({item_id_list:null==e?void 0:e.awemeId,type:1})},[n,t]),{isTabFeed:f}};var iB={documentOverFlowAnchorDisable:"gslCe8ev",container:"YZ29QFqc",noMoreText:"qY3ZFZ1G",opBtn:"zGsPT8Ic"};let iU=()=>{var e,t,l;return n=null!=n?n:null===(e=document.getElementById("douyin-header"))||void 0===e?void 0:e.offsetHeight,r=null!=r?r:null===(t=document.getElementById("user-tabbar"))||void 0===t?void 0:t.offsetHeight,i=null!=i?i:null===(l=document.getElementById("user-tabbar-2"))||void 0===l?void 0:l.offsetHeight,n+r+i},iV=e=>{let t=Q()(e),l=t.year(),n=t.month()+1;return`${l}-${n}`},iO=e=>{var t;let{container:l,index:n,speed:r=0,target:i}=e,a=null!=i?i:null==l?void 0:null===(t=l.childNodes)||void 0===t?void 0:t[n];if(!a)return;let o=null==a?void 0:a.offsetParent,s=null==a?void 0:a.offsetTop;for(;o!==document.body;)s+=o.offsetTop,o=o.offsetParent;(0,ll.d)((0,la.V)(),s-(iU()-1),r)};var iH=l("466442"),iz={monthVideoBox:"qz4Dj1p0",item:"QUxDBqJQ",coveredMask:"NowO0IwO",timeLine:"k1pPsX1U",date:"vYJgMJMg",monthAndYear:"__Q5LOBg"};let iZ=e=>{let{awemeList:t,setCurrentScrollTime:l,onItemClick:n,withMask:r,uid:i,isSelf:a,tab:d}=e,u=(0,s.useRef)(0),c=(0,s.useMemo)(()=>{var e;return(null==t?void 0:null===(e=t[t.length-1])||void 0===e?void 0:e.createTime)*1e3},[t]);(0,s.useEffect)(()=>{let e=()=>{let e=document.getElementById(`${iV(c)}-monthvideobox`);e&&(u.current=null==e?void 0:e.offsetHeight)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[t]);let v=(0,nn.m)(),[m,h]=(0,s.useState)(!1);(0,iH.D)((e,t)=>{h(e>-4&&e<u.current-100)},200,{trailing:!0});let p=e=>{var t,l,n;null==e||null===(t=e.preventDefault)||void 0===t||t.call(e),(0,el.default)({success:async()=>{window.location.reload()},enterMethod:"nologin_video_guide",headerText:"登录后即可看更多最新作品",next:`https://${null===(n=window)||void 0===n?void 0:null===(l=n.location)||void 0===l?void 0:l.host}`})},g=e=>{var t;let{itemInfo:l}=e;tG.sendLog("personalShieldAlbumShow",{enter_from:(0,Z.yW)(),to_user_id:null==l?void 0:null===(t=l.authorInfo)||void 0===t?void 0:t.uid,tab_name:d})};return(0,s.useEffect)(()=>{m&&l(iV(c))},[m]),(0,o.jsxs)("div",{id:`${iV(c)}-monthvideobox`,children:[(0,o.jsx)("div",{className:f()(iz.timeLine),children:(0,o.jsx)("div",{className:f()(iz.date),children:(0,o.jsx)("div",{className:iz.monthAndYear,children:`${iV(c).split("-")[0]}年${iV(c).split("-")[1]}月`})})}),(0,o.jsx)(A.W,{scrollListener:v,className:iz.monthVideoBox,children:t.map((e,t)=>{if(e.awemeType===nJ.e.NoLoginVideoGuide){var l;return(0,o.jsx)(id.V,{className:iz.item,src:null==e?void 0:null===(l=e.video)||void 0===l?void 0:l.cover,desc:null==e?void 0:e.desc,showTitle:!0,onClick:p,onShow:()=>g({itemInfo:e}),name:null==e?void 0:e.name,iconWidth:50,cardStyle:id.U.MonthVideo})}return(0,o.jsx)(im,{info:e,isSelf:a,tab:"post",uid:i,className:f()(iz.item,"video-card-in-user-timeline-list",{[iz.coveredMask]:r}),rank:t,onClick:t=>{null==t||t.preventDefault(),null==n||n(e)},id:`videocard-${null==e?void 0:e.awemeId}`,showPermissionIcon:!0,children:r(e)},null==e?void 0:e.awemeId)})})]})};var iW=l("357378"),i$={searchList:"gQxJOn2m",header:"jY4KZ5M4",headerBg:"e291svGo",searchText:"OBAPjnL7",noPaddingMargin:"Sc6_O0jP",errorPanel:"EBeA5nTf",btn:"Zdm3C88B",timeLineButtonAugment:"zWJGQPcZ",tool:"RO07uQfA",divider:"dfuIyi4J"},iK=l("350856"),iY=l.n(iK),iG=l("912586"),iq=l("235586"),iX=l("391302"),iQ={header:"fXtIOLrX",sticky:"g7l3GctZ",noBgImage:"Snh6vAJG"},iJ=e=>{var t;let{children:l,topOffset:n=0,needSticky:r=!0,headerHeight:i,topNavHeight:d=60,noBgImage:u}=e,{isSelf:c}=null!==(t=(0,s.useContext)(G))&&void 0!==t?t:{};(0,K._)();let v=null!=i?i:44;(0,s.useEffect)(()=>{let e=iY()(()=>{let e=(0,la.s)(),{x:t=0,y:l=0}=(0,iG.F)(e)||{};(0,iq.X)({top:l+1,left:t},e),(0,iq.X)({top:l,left:t},e)},100);return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]);let m=(0,iX.sF)();return r?(0,o.jsx)(lt.Z,{topOffset:n-v-4,children:e=>{let{style:t,isSticky:n}=e;return(0,o.jsx)("div",{className:f()(iQ.header,{[iQ.sticky]:n,subTabSticky:n,[iQ.noBgImage]:u}),style:(0,a._)({height:`${v}px`},tD(n,t),n?{top:`${(m?0:d)+58}px`}:{}),children:l})}}):l},i0=l("793571"),i1=l("993905"),i2=l("250755"),i3=l("425672"),i5={batchToolBar:"NFT9nh_k",selectedDesc:"fZtV8L6V",selectedDescActive:"KFL3V1L1",dividerItem:"flM7Plu7",buttonContainer:"PIl10N89",desc:"ModbyxXs",svgIcon:"i5GMTbQN",disabled:"p04ub_AC",operateButton:"Hv__rJ7e"};let i6=e=>{let{icon:t,text:l,textClass:n,onClick:r,disabled:i=!1,className:a,disabledToast:d,onShow:u}=e,{run:c}=(0,i0.Z)(e=>ei.F.info(e),500),v=(0,s.useCallback)(()=>{if(i){d&&c(d);return}null==r||r()},[i,r,d,c]),m=(0,tI.x)(()=>{null==u||u()});return(0,o.jsxs)("div",{ref:m,className:f()(i5.buttonContainer,a,{[i5.disabled]:i}),onClick:v,children:[t,(0,o.jsx)("span",{className:f()(i5.desc,n),children:l})]})},i4=e=>"permission_set"===e?(0,o.jsx)(ew.z,{svg:(0,o.jsx)(i1.Z,{}),className:i5.svgIcon}):"move"===e?(0,o.jsx)(ew.z,{svg:(0,o.jsx)(i2.Z,{}),className:i5.svgIcon}):"add_favorite"===e?(0,o.jsx)(ew.z,{svg:(0,o.jsx)(lh.Z,{}),className:i5.svgIcon}):["cancel_favorite","remove_videos","remove_collects","cancel_like","watch_later","cancel_post"].includes(e)?(0,o.jsx)(ew.z,{svg:(0,o.jsx)(i3.Z,{}),className:i5.svgIcon}):null,i7=e=>{let{selectedText:t="作品",operateBtns:l=[],currentSubTab:n,currentTab:r}=e,{selectedCount:i=0,setCheckAll:a,setIndeterminate:d,checkAll:u,indeterminate:c}=(0,s.useContext)(ly),v=(0,s.useMemo)(()=>"watch_later"===r||"like"===r?tH.VIDEO:n,[r,n]),m=(0,tI.x)(()=>{U.logInstance.sendLog("selectAllShow",{tab_name:r,sub_tab_name:v})});return(0,o.jsxs)("div",{className:i5.batchToolBar,ref:m,children:[(0,o.jsx)(D.Checkbox,{indeterminate:c,onChange:e=>{null==a||a(e.target.checked),null==d||d(!1),$.emit($.EVENT.batchToolBarCheckAllChanged,{checked:e.target.checked}),!u&&U.logInstance.sendLog("selectAllClick",{tab_name:r,sub_tab_name:v})},checked:u,children:u?"取消全选":"全选"}),(0,o.jsxs)("span",{className:f()(i5.selectedDesc,{[i5.selectedDescActive]:i>0}),children:["已选 ",i," 个",t]}),l.length>0&&(0,o.jsx)(D.Divider,{layout:"vertical",margin:"16px",className:i5.dividerItem}),l.map((e,t)=>(0,o.jsx)(i6,{icon:i4(e.key),text:e.actionText,onClick:e.onClick,onShow:e.onShow,disabled:0===i,className:i5.operateButton},e.key||`key_${t}`))]})};var i9=l("202089"),i8={container:"in2DSrCP",selected:"HFcgY7Ev",text:"Pz0ls4LI",date:"akphhpBx",arrow:"fsXKfqAH",isListSelectable:"yKgBtE9q",disabled:"Gc6n9so7",TimeListSelector:"quzg640v",item:"vT0_aokQ",hover:"y2zp3jMu",itemContainer:"_FsAyJJR",vertialLine:"FfZunIfn",noVisibility:"tnNenICc"},ae=new eU.h({timelinePanelShow:{eventName:"timeline_panel_show",params:{enter_from:"",tab_name:""}},timelinePanelClick:{eventName:"timeline_panel_click",params:{enter_from:"",tab_name:"",year_month:""}}});let at=(0,s.forwardRef)((e,t)=>(0,o.jsx)("svg",(0,R._)((0,a._)({width:16,height:16,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,o.jsx)("path",{d:"M12 6l-4 4-4-4",stroke:"#2F3035",strokeOpacity:".4",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})}))),al=e=>{var t,l;let{postTimeList:n,onRef:r,onTimeClick:i,setShowSelector:d,currentScrollTime:u,logParams:c,onMouseEnter:v,onMouseLeave:m,style:h}=e,[p,g]=(0,s.useState)(null==u?void 0:null===(t=u.split("-"))||void 0===t?void 0:t[0]),_=(0,s.useRef)(),x=(0,s.useMemo)(()=>{let e={};for(let t=0;t<n.length;t++){let l=n[t].split("\xb7")[0],r=n[t].split("\xb7")[1];e[l]?e[l].push(r):e[l]=[r]}return e},[n]);return(0,s.useEffect)(()=>{var e,t;null===(t=_.current)||void 0===t||null===(e=t.scroll)||void 0===e||e.call(t,0,0)},[p]),(0,s.useEffect)(()=>{ae.sendLog("timelinePanelShow",(0,a._)({},c))},[]),(0,o.jsxs)("div",{className:i8.TimeListSelector,ref:e=>null==r?void 0:r(e),onClick:e=>e.nativeEvent.stopImmediatePropagation(),onMouseEnter:v,onMouseLeave:m,style:h,children:[(0,o.jsxs)("div",{className:i8.itemContainer,children:[(0,o.jsx)("div",{onMouseEnter:()=>g("all"),className:f()(i8.item,{[i8.selected]:"all"===u}),onClick:()=>{i("all"),d(!1)},children:"全部"}),Object.keys(x).sort((e,t)=>t-e).map((e,t)=>{var l;return(0,o.jsx)("div",{onMouseEnter:()=>g(e),className:f()(i8.item,{[i8.hover]:p===e,[i8.selected]:Number(null==u?void 0:null===(l=u.split("-"))||void 0===l?void 0:l[0])===Number(e)}),onClick:()=>{i(`${p}-${x[e][0]}`),d(!1),ae.sendLog("timelinePanelClick",(0,R._)((0,a._)({},c),{year_month:`${p}${String(x[e][0]).padStart(2,"0")}`}))},children:`${e}年`},t)})]}),(0,o.jsx)("div",{className:f()(i8.vertialLine,{[i8.noVisibility]:"all"===p})}),(0,o.jsx)("div",{className:i8.itemContainer,ref:_,children:"all"!==p&&(0,o.jsx)(o.Fragment,{children:null===(l=x[p])||void 0===l?void 0:l.map((e,t)=>{var l,n;return(0,o.jsx)("div",{className:f()(i8.item,{[i8.selected]:Number(null==u?void 0:null===(l=u.split("-"))||void 0===l?void 0:l[1])===Number(e)&&Number(p)===Number(null==u?void 0:null===(n=u.split("-"))||void 0===n?void 0:n[0])}),onClick:()=>{i(`${p}-${e}`),d(!1),ae.sendLog("timelinePanelClick",(0,R._)((0,a._)({},c),{year_month:`${p}${String(e).padStart(2,"0")}`}))},children:`${e}月`},t)})})})]})},an=e=>{let{postTimeList:t,onTimeClick:l,currentScrollTime:n,logParams:r,isSelf:i,className:a="",disabled:d=!1,disabledText:u="",isListSelectable:c=!1}=e,[v,m]=(0,s.useState)(!1),h=(0,s.useRef)(),{updateIsSelectDisabled:p}=(0,s.useContext)(ly);return(0,s.useEffect)(()=>{null==p||p(v)},[v,p]),(0,s.useEffect)(()=>{let e=()=>{m(!1)};return document.addEventListener("click",e),()=>{document.removeEventListener("click",e)}},[]),(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)("div",{className:f()(i8.container,{[i8.selected]:v},{[i8.disabled]:d},{[i8.isListSelectable]:c},a),onMouseEnter:()=>{if(!d)m(!0),clearTimeout(h.current)},onMouseLeave:()=>{h.current=setTimeout(()=>{m(!1)},500)},onClick:()=>{if(d&&u){ei.F.info(u);return}},children:[(0,o.jsx)(ew.z,{svg:(0,o.jsx)(i9.Z,{}),className:i8.date}),(0,o.jsx)("div",{className:i8.text,children:"all"===n?"日期筛选":n.split("-").map((e,t)=>`${e}${0===t?"年":"月"}`).join("")}),(0,o.jsx)(F.Z,{src:at,className:i8.arrow,viewBox:"0 0 16 16",width:16,height:16}),v&&(0,o.jsx)(al,{postTimeList:t,onTimeClick:l,setShowSelector:m,currentScrollTime:n,logParams:r,onMouseEnter:()=>{m(!0),clearTimeout(h.current)},onMouseLeave:()=>{h.current=setTimeout(()=>{m(!1)},500)},style:{right:i?-9:35}})]})})};var ar={PUBLIC:0,0:"PUBLIC",PRIVATE:1,1:"PRIVATE",FRIEND:2,2:"FRIEND"};let ai=(e,t)=>{if(!e)return"暂未找到该用户的相关视频";if("post"===t)return"暂未找到发布的相关视频";if("favorite_collection"===t)return"暂未找到收藏的相关视频";else if("record"===t)return"暂未找到观看过的相关视频";else return"暂未找到赞过的相关视频"},aa=e=>{let{isSelf:t,tab:l,primaryAction:n,secondaryAction:r}=e;return(0,s.useEffect)(()=>{tG.sendLog("noLikeToast",{enter_method:"post"===l?"search_post":"search_like"})},[l]),(0,o.jsxs)(V.H,{className:i$.errorPanel,icon:(0,o.jsx)(lq.Z,{}),title:"暂无内容",desc:ai(t,l),children:[(0,o.jsx)(D.Button,{theme:"solid",className:i$.btn,type:"primary",onClick:n,children:"返回全部视频"}),(0,o.jsx)(D.Button,{theme:"solid",className:i$.btn,type:"secondary",onClick:r,children:"搜索更多视频"})]})},ao=e=>{var t;let{uid:l,currentTab:n,getSearchRes:r,homeText:i,keyword:d,abTestData:u,exitSearch:c,topNavHeight:v=60,showSearchBar:m,searchBarSlot:h,isListSelectable:p,setIsListSelectable:g}=e,{isSelf:_}=null!==(t=(0,s.useContext)(G))&&void 0!==t?t:{},x=(0,s.useRef)(""),C=(0,s.useRef)(null),[w,b]=(0,s.useState)([]);(0,s.useEffect)(()=>{if(d&&d!==x.current){var e,t,l,n;x.current=d,null===(t=C.current)||void 0===t||null===(e=t.reset)||void 0===e||e.call(t),null===(n=C.current)||void 0===n||null===(l=n.reload)||void 0===l||l.call(n)}},[d]);let I=(0,s.useCallback)(()=>{tG.sendLog("clickLikeTab",{enter_method:"post"===n?"search_post":"search_like"}),c()},[n,c]),y=(0,s.useCallback)(()=>{window.open((0,eq.Sp)(x.current,`tab_name=${"post"===n?"post_result":"like_result"}`),(0,ic.f)()?"_self":"_blank","noopener")},[n]),j=(0,s.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if("post"===n)return(0,rm.FD)({awemeIds:e.map(e=>e.awemeId).join(",")});let t={},l=[];return(e.forEach(e=>{l.push(e.awemeId),t[e.awemeId]=(0,iW.I)(e.awemeType)}),"favorite_collection"===n)?(0,rm.VD)({awemeIds:l.join(","),awemeTypeMap:t}):(0,rm.g)({awemeIds:l.join(","),itemTypeMap:t})},[n]),{updateAwemeCount:k,updateFavoriteCount:N,isPostDelete:S}=(0,s.useContext)(li),E=(0,s.useCallback)(e=>{let{manageCount:t=0}=e;"post"===n&&(null==k||k(-t,!0)),"like"===n&&(null==N||N(-t,!0))},[n,k,N]),L=lb({maxSelectedCount:100,operate:j,operateDesc:{operation:"post"===n?"删除":"取消",itemName:`${"post"===n?"":"favorite_collection"===n?"收藏的":"喜欢的"}作品`},onManageEndCallback:E,tabName:n,subTabName:"video",isListSelectable:p,setIsListSelectable:g}),T=(0,s.useCallback)(()=>{null==c||c()},[c]),{changeShowConfirm:M,renderConfirmModal:P,changeListSelectable:A,selectedCount:F,selectItems:B=[],updateIsSelectDisabled:V,resetScrollList:O}=L;(0,s.useEffect)(()=>{A(!1)},[d,A]),(0,s.useEffect)(()=>{if(S){var e,t;null===(t=C.current)||void 0===t||null===(e=t.reset)||void 0===e||e.call(t),T()}},[S,T]);let{renderDeleteConfirmModal:H,renderPermissionConfirmModal:z,renderAddCollectsModal:Z,changeShowPermissionConfirm:W,changeShowDeleteConfirm:$,changeShowAddCollectsConfirm:K}=rj({onConfirmShow:e=>{let{visible:t}=e;V(t),A(t)},resetScrollList:e=>{let{fatalIdsCount:t,method:l,permissionValue:n,modifyItemIds:r=[]}=e||{};if(g(!1),"delete"===l)E({manageCount:F-t}),null==O||O();else if("permission"===l&&"secret"===n)E({manageCount:F-t}),null==O||O();else if("permission"===l&&["friend","public"].includes(n)){var i,o,s,d;if(0===r.length){null==O||O();return}let e=(null===(o=C.current)||void 0===o?void 0:null===(i=o.getDataList)||void 0===i?void 0:i.call(o))||[];r.forEach(t=>{let l=e.find(e=>e.awemeId===t);l&&("public"===n&&(l.status=(0,R._)((0,a._)({},l.status),{privateStatus:0})),"friend"===n&&(l.status=(0,R._)((0,a._)({},l.status),{privateStatus:2})))}),null===(d=C.current)||void 0===d||null===(s=d.setScrollData)||void 0===s||s.call(d,{dataList:[...e]})}},currentTab:n,currentSubTab:"video"}),Y=(0,s.useMemo)(()=>{let e={key:"cancel_like",actionText:"post"===n?"删除作品":"favorite_collection"===n?"取消收藏":"取消喜欢",onClick:()=>{"post"===n?$(!0):M(!0),U.logInstance.sendLog("functionIconClick",{tab_name:n,sub_tab_name:"video",item_cnt:F,function_name:"delete"})}};if("post"===n)return[e,{key:"permission_set",actionText:"权限设置",onClick:()=>{if((null==B?void 0:B.length)!==0)U.logInstance.sendLog("functionIconClick",{tab_name:n,sub_tab_name:"video",item_cnt:F,function_name:"permission_setting"}),W(!0)}}];let t=[e];return"favorite_collection"===n&&t.push({key:"add_favorite",actionText:"加入收藏夹",onClick:()=>{if((null==B?void 0:B.length)!==0)K(!0),U.logInstance.sendLog("pc_favourite_batch_manage_click",{tab_name:"favorite_collection"})},onShow:()=>{U.logInstance.sendLog("pc_favourite_batch_manage_show",{tab_name:"favorite_collection"})}}),t},[n,F,B,W,$,M]);return(0,o.jsxs)(ly.Provider,{value:(0,a._)({},L),children:[(0,o.jsxs)("div",{className:f()(i$.searchList,{[i$.noPaddingMargin]:_}),children:[(0,o.jsx)(iJ,{topNavHeight:v,headerHeight:p?72:44,children:(0,o.jsxs)("div",{className:f()(i$.header,{[i$.headerBg]:p}),children:[p?(0,o.jsx)(i7,{selectedText:"post"===n?"删除作品":"favorite_collection"===n?"收藏的视频":"取消喜欢",operateBtns:Y,currentSubTab:"video",currentTab:n}):(0,o.jsx)("div",{className:f()(i$.searchText,{[i$.noPaddingMargin]:_}),children:i}),(0,o.jsxs)("div",{className:i$.tool,children:[m&&h,"post"===n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(D.Divider,{className:i$.divider,layout:"vertical",margin:"12px"}),(0,o.jsx)(an,{currentScrollTime:"all",disabled:!0,className:i$.timeLineButtonAugment,disabledText:"搜索后,暂不支持日期筛选",isListSelectable:p})]})]})]})}),(0,o.jsx)(iN,{ref:C,keyword:d,resetStatusFunc:T,updateAwemeList:b,uid:l,tab:n,pause:!1,currentTab:n,defaultRes:{statusCode:0,data:[],hasMore:1,cursor:0,maxCursor:10},fetchMoreData:r,panelNoMoreData:(0,o.jsx)(o.Fragment,{}),panelNoData:(0,o.jsx)(aa,{isSelf:_,tab:n,primaryAction:I,secondaryAction:y}),isInSearch:!0,showPermissionIcon:"post"===n})]}),null==P?void 0:P(),null==H?void 0:H({selectItems:B}),null==z?void 0:z({selectItems:B}),null==Z?void 0:Z({selectItems:B})]})},as=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:60;return{top:e+58+72,bottom:0,left:0,right:0}};function ad(e){let{reload:t}=e;return(0,o.jsxs)("div",{className:iB.noMoreText,children:["服务异常,重新",(0,o.jsx)("span",{onClick:t,className:iB.opBtn,children:"刷新"}),"拉取数据"]})}let au=e=>{var t;let{modifyList:l=[],selectPartilarTime:n,scrollEl:r,setCurrentScrollTime:i,defaultUserPostList:d,defaultHasMore:u,setUserPostList:c,uid:v,tab:m,isSelf:f,currentTab:p,setSelectPartilarTime:g,setHideUserInfo:_,resetStatusFunc:x,getItemSelectedDisabled:C,onBan:w,rebackParamRef:b,topNavHeight:I}=e,[y,j]=(0,s.useState)([]),[k,N]=(0,s.useState)(),[S,E]=(0,s.useState)([0,0,0]);(0,nY.Z)(()=>{j(e=>(l.forEach(t=>{let{id:l,permissionValue:n}=t,r=e.find(e=>e.awemeId===l);r&&("public"===n&&(r.status=(0,R._)((0,a._)({},r.status),{privateStatus:ar.PUBLIC})),"friend"===n&&(r.status=(0,R._)((0,a._)({},r.status),{privateStatus:ar.FRIEND})))}),[...e]))},[l]);let{setResetScrollList:L}=(0,s.useContext)(ly);null==L||L(()=>{g("all"),i("all"),_(!1),(0,la.V)().scrollTo(0,0),c([]),null==x||x()});let T=(0,s.useRef)(!0),M=(0,s.useRef)(u?0:1e3*d[d.length-1].createTime),D=(0,s.useRef)(!1),P=(0,s.useRef)(!1),A=(0,s.useRef)(),F=(0,s.useRef)(0),B=(0,s.useRef)([d]),U=(0,s.useRef)(0),V=(0,s.useRef)(!1),O=(0,ng.Z)(async()=>{var e,t,l,r;let[i,a]=n.split("-");i=Number(i),i+=Math.floor(((a=Number(a))+1)/12),a=(a+1)%12;let o=1e3*Q()(`${i}-${String(a).padStart(2,"0")}-01`).unix(),s=B.current[Math.max(U.current-1,0)],d=1e3*s[s.length-1].createTime,u=await (0,iS.fetchUserPost)({userId:v,maxCursor:o,timeListQuery:!0,forwardEndCursor:d,whaleCutToken:null===(e=b.current)||void 0===e?void 0:e.whaleCutToken});(null===(t=u.whaleInfo)||void 0===t?void 0:t.whaleBlockTimeSelect)==="1"&&w(),b.current={whaleCutToken:null===(l=u.whaleInfo)||void 0===l?void 0:l.whaleCutToken},0===u.statusCode&&u.data?(B.current[U.current]=u.data,0===u.forwardHasMore&&U.current>0&&(B.current[U.current-1]=[...B.current[U.current-1],...B.current[U.current]],B.current.splice(U.current,1),U.current-=1),j(B.current[U.current])):E(e=>[e[0],u.statusCode,e[2]]),T.current=null!==(r=T.current)&&void 0!==r?r:1===u.hasMore,0===u.hasMore&&u.data&&(M.current=1e3*u.data[u.data.length-1].createTime)}),H=(0,ng.Z)(async e=>{var t,l,n,r,i,a,o;let{from:s}=e,d=B.current[U.current];if(P.current||(null===(t=d[d.length-1])||void 0===t?void 0:t.createTime)*1e3===M.current||0!==S[2]&&"reload"!==s)return;P.current=!0;let u=1e3*d[d.length-1].createTime,c=await (0,iS.fetchUserPost)({userId:v,maxCursor:u,count:30,whaleCutToken:null===(l=b.current)||void 0===l?void 0:l.whaleCutToken});if((null===(n=c.whaleInfo)||void 0===n?void 0:n.whaleBlockTimeSelect)==="1"&&w(),b.current={whaleCutToken:null===(r=c.whaleInfo)||void 0===r?void 0:r.whaleCutToken},T.current=null!==(i=T.current)&&void 0!==i?i:1===c.hasMore,0===c.statusCode&&c.data){let e=[...B.current[U.current],...c.data||[]],t=B.current[U.current+1];if(t){let l=-1;for(let n=0;n<e.length;n++)if((null==t?void 0:null===(a=t[0])||void 0===a?void 0:a.awemeId)===(null==e?void 0:null===(o=e[n])||void 0===o?void 0:o.awemeId)){l=n;break}-1!==l?(B.current[U.current]=[...e.slice(0,l),...t],B.current.splice(U.current+1,1)):B.current[U.current]=e,j(B.current[U.current])}else B.current[U.current]=e,j(B.current[U.current])}else E(e=>[e[0],e[1],c.statusCode]);0===c.hasMore&&c.data&&(M.current=1e3*c.data[c.data.length-1].createTime),P.current=!1}),z=(0,ng.Z)(async e=>{var t,l,n,r,i;let{from:a}=e;if(D.current||0===U.current||0!==S[0]&&"reload"!==a)return;D.current=!0,F.current=(0,la.V)().scrollHeight;let o=B.current[U.current-1],s=B.current[U.current],d=await (0,iS.fetchUserPost)({userId:v,forwardEndCursor:(null==o?void 0:null===(t=o[(null==o?void 0:o.length)-1])||void 0===t?void 0:t.createTime)*1e3,forwardAnchorCursor:(null==s?void 0:null===(l=s[0])||void 0===l?void 0:l.createTime)*1e3,count:30,whaleCutToken:null===(n=b.current)||void 0===n?void 0:n.whaleCutToken});(null===(r=d.whaleInfo)||void 0===r?void 0:r.whaleBlockTimeSelect)==="1"&&w(),b.current={whaleCutToken:null===(i=d.whaleInfo)||void 0===i?void 0:i.whaleCutToken},0===d.statusCode&&d.data?(B.current[U.current]=[...d.data||[],...B.current[U.current]],0===d.forwardHasMore&&(B.current[U.current-1]=[...B.current[U.current-1],...B.current[U.current]],B.current.splice(U.current,1),U.current-=1),j(B.current[U.current])):E(e=>[d.statusCode,e[1],e[2]]),D.current=!1}),Z=(0,s.useMemo)(()=>{let e=[];for(let o=0;o<(null==y?void 0:y.length);o++){var t,l,n,r,i,a;let s=e[e.length-1],d=Q()((null==s?void 0:null===(t=s[s.length-1])||void 0===t?void 0:t.createTime)*1e3),u=d.year(),c=d.month()+1,v=Q()((null===(l=y[o])||void 0===l?void 0:l.createTime)*1e3),m=v.year(),f=v.month()+1;(m===u&&f===c||(null===(r=y[o])||void 0===r?void 0:null===(n=r.tag)||void 0===n?void 0:n.isTop)||(null==s?void 0:null===(a=s[(null==s?void 0:s.length)-1])||void 0===a?void 0:null===(i=a.tag)||void 0===i?void 0:i.isTop))&&e[e.length-1]?e[e.length-1].push(y[o]):e.push([y[o]])}return e},[y]),[W,K]=(0,s.useState)(as(I));(0,s.useEffect)(()=>{K(as(I))},[I]);let Y=nb(),G=(0,s.useRef)({height:"auto",paddingBottom:"133%",borderRadius:"4px"}),{withMask:q}=nI((0,R._)((0,a._)({getItemId:e=>null==e?void 0:e.awemeId,dataList:y,isSupportMulti:!0},Y),{maskShadowStyle:G.current,stickyArea:W,getItemSelectedDisabled:C,getAllItems:()=>document.querySelectorAll(".video-card-in-user-timeline-list")})),X=e=>{let{direction:t}=e;return"forward"===t&&0!==S[0]||"backward"===t&&0!==S[2]?(0,o.jsx)(ad,{reload:()=>{E(e=>[0,0,0]),"forward"===t?z({from:"reload"}):H({from:"reload"})}}):(0,o.jsx)(h.gb,{})};(0,s.useEffect)(()=>{let e=(0,la.s)(),t=r||e,l=e=>{var t;if(0===B.current[U.current].length)return;let l=0,n=null===(t=A.current)||void 0===t?void 0:t.getBoundingClientRect();if(r){let e=r.getBoundingClientRect();l=n.bottom-e.bottom}else l=n.bottom-window.innerHeight;l<48&&T.current&&H({from:"normal"}),n.top>120&&0!==U.current&&z({from:"normal"})};return t.addEventListener("scroll",l),()=>{t.removeEventListener("scroll",l)}},[]),(0,s.useEffect)(()=>{if(0!==y.length&&0!==F.current){let e=(0,la.V)();e.scrollTo(0,e.scrollHeight-F.current+e.scrollTop),F.current=0}else if(V.current&&0!==y.length){V.current=!1;let e=Z.findIndex(e=>{var t;let l=Q()((null===(t=e[e.length-1])||void 0===t?void 0:t.createTime)*1e3),r=String(l.year()),i=String(l.month()+1).padStart(2,"0");return n.split("-").every((e,t)=>0===t?e===r:e===i)});-1!==e&&iO({container:A.current,index:e+(y.length&&0!==U.current?1:0),speed:0})}else 0===y.length&&(0,la.V)().scrollTo(0,0);0===U.current&&0!==y.length&&(null==c||c(y))},[y]),(0,s.useEffect)(()=>{let[e,t]=n.split("-"),l=Q()(`${e}-${t}-01`),r=l.add(1,"month"),i=1e3*l.unix(),a=1e3*r.unix(),o=-1,s=!1;for(let e=0;e<B.current.length;e++){for(let t=0;t<B.current[e].length;t++){var d,u;let l=1e3*B.current[e][t].createTime;if(null===(u=B.current[e][t])||void 0===u?!void 0:null===(d=u.tag)||void 0===d?!void 0:!d.isTop){if(l<=a&&l>=i){o=e,s=!0;break}if(l<i){U.current=e,B.current.splice(U.current,-1,[]),s=!0;break}else e===B.current.length-1&&t===B.current[e].length-1&&(U.current=B.current.length,B.current.splice(U.current,-1,[]),s=!0)}}if(s)break}if(-1!==o){let e=Z.findIndex(e=>{var t;let l=Q()((null===(t=e[e.length-1])||void 0===t?void 0:t.createTime)*1e3),r=String(l.year()),i=String(l.month()+1).padStart(2,"0");return n.split("-").every((e,t)=>0===t?e===r:e===i)});if(-1!==e)iO({container:A.current,index:e+(y.length&&0!==U.current?1:0),speed:100});else{let e=B.current[o];U.current=o,j(e),V.current=!0}}else j([]),O(),V.current=!0},[n]),(0,s.useEffect)(()=>{if(0!==U.current)return _(!0),document.body.classList.add(iB.documentOverFlowAnchorDisable),$.emit($.EVENT.headerAbleTransparent,!1),()=>{_(!1),document.body.classList.remove(iB.documentOverFlowAnchorDisable),$.emit($.EVENT.headerAbleTransparent,!0)}},[U.current]);let J=(null===(t=y[y.length-1])||void 0===t?void 0:t.createTime)*1e3!==M.current;return 0!==S[1]?(0,o.jsx)(ad,{reload:()=>{E(e=>[0,0,0]),O()}}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:iB.container,ref:A,children:[!!y.length&&0!==U.current&&X({direction:"forward"}),Z.map((e,t)=>{var l;return e.length>0&&(0,o.jsx)(iZ,{index:t,awemeList:e,setCurrentScrollTime:i,onItemClick:e=>N(e),withMask:q,uid:v,isSelf:f,tab:m},iV((null===(l=e[e.length-1])||void 0===l?void 0:l.createTime)*1e3))}),J&&X({direction:"backward"})]}),(0,o.jsx)(iw,{uid:v,tab:m,modeFrom:iI[m],currentTab:p,awemeInfo:k,userAwemeList:y.filter(e=>e.awemeType!==nJ.e.NoLoginVideoGuide),showModal:!!k,onClose:()=>N(void 0),customMadeHook:iF,fetchBackWard:H,fetchForward:z,hasMore:J,scrollToTarget:iO})]})};function ac(e){let{getExistingList:t,fetchData:l,setDataList:n,idKey:r="awemeId"}=e,i=(0,s.useRef)(!1);return{doIncrementalUpdate:(0,s.useCallback)(async()=>{if(!i.current){i.current=!0;try{var e,a;let o=t();if(!(null==o?void 0:o.length)){let e=await l(0);!e.statusCode&&(null===(a=e.data)||void 0===a?void 0:a.length)&&n(e.data),i.current=!1;return}let s=null===(e=o[0])||void 0===e?void 0:e[r];if(!s){i.current=!1;return}let d=[],u=0,c=10;for(;c>0;){c--;let e=await l(u);if(e.statusCode)break;let t=e.data||[];if(!t.length)break;let n=t.findIndex(e=>e[r]===s);if(n>=0){d.push(...t.slice(0,n));break}if(d.push(...t),u=e.maxCursor,!e.hasMore)break}if(d.length>0){let e=new Set(o.map(e=>e[r])),t=d.filter(t=>!e.has(t[r]));if(t.length>0){let e=[...t,...o];n(e)}}}catch(e){}finally{i.current=!1}}},[t,l,n,r])}}async function av(e,t){let l,n=t;for(let t=0;t<10;t++){var r;if(n=(l=await e(n)).cursor,!l.hasMore||!!(null===(r=l.data)||void 0===r?void 0:r.length))break}return l}let am=s.forwardRef((e,t)=>{var l,n,r,i;let{userInfo:d,currentTab:u,defaultPostRes:c,topOffset:v=0,topNavHeight:m=60,setHideUserInfo:f,abTestData:h,setPostTimeList:p,selectPartilarTime:g,setSelectPartilarTime:_,currentScrollTime:x,setCurrentScrollTime:C,modifyList:w}=e,[b,I]=(0,s.useState)([]),[y,j]=(0,s.useState)(),[k,N]=(0,s.useState)(!1),[S,E]=(0,s.useState)(),{userInfo:L}=null!==(r=(0,eH.useUserInfoContext)())&&void 0!==r?r:{},{isActive:T}=nc(),M=(0,nl.o)(null==d?void 0:d.secUid),{isSelf:D}=null!==(i=(0,s.useContext)(G))&&void 0!==i?i:{},[P,A]=(0,s.useState)(!1),F=(0,s.useRef)(),B=(0,s.useRef)(0),U=(0,s.useRef)((null==c?void 0:c.cursor)||0),O=(0,s.useRef)(null!=c&&null!==(l=c.data)&&void 0!==l&&!!l[0]&&(0,iM.P$)(null==c?void 0:null===(n=c.data)||void 0===n?void 0:n[0])),H=(0,s.useRef)(!0),z=(0,s.useRef)({}),Z=(0,s.useRef)(1),K=(0,s.useRef)(-1),Y=(0,s.useRef)(!0);(0,s.useEffect)(()=>{D&&d.awemeCount&&tG.sendLog("creatorManageEntranceShow",{type:"post"})},[D,d.awemeCount]);let q=(0,s.useRef)(null==c?void 0:c.hasLocateItem),X=(0,s.useRef)([]),Q=(0,s.useRef)([]),J=(0,s.useCallback)(async()=>{var e,t,l;let n=(0,W.Rs)("vid"),r=!(null==c?void 0:null===(e=c.data)||void 0===e?void 0:e.find(e=>e.awemeId===n))&&q.current;q.current=!1;let i=D&&(null==Y?void 0:Y.current)&&0===U.current&&n1.dP.hasCache;iL.z.markStart("user_post_fetch_data",{once:!0});let{data:a=[],maxCursor:o=0,hasMore:s,statusCode:u,whaleInfo:v,timeList:m,notLoginModule:f}=await av(e=>{var t;return n1.dP.request({cached:i,consume:!0,params:{userId:M,maxCursor:e,count:r?120:18,locateItemId:n,locateQuery:r,needTimeList:0===e,whaleCutToken:null===(t=z.current)||void 0===t?void 0:t.whaleCutToken},fetcherOptions:{expired:12e5,resetExpiredCacheBefore:!1,hoverDelay:!1}})},U.current);if(iL.z.markEnd("user_post_fetch_data",{once:!0}),(null==v?void 0:v.whaleBlockTimeSelect)==="1"&&N(!0),performance.getEntriesByName("user_page_init").length>0){performance.mark("user_post_fetched"),performance.measure("userMountedToFetched","user_page_init","user_post_fetched");let e=null===(t=performance.getEntriesByName("userMountedToFetched")[0])||void 0===t?void 0:t.duration,n=(null===(l=document.getElementById("sw-tag"))||void 0===l?void 0:l.innerHTML)==="1";!isNaN(e)&&tG.sendLog("userPageDataFetched",{cost:Math.floor(e),from_cache:n?0:1}),performance.clearMarks("user_page_init"),performance.clearMarks("user_post_fetched"),performance.clearMeasures("userMountedToFetched"),n&&0===U.current&&0===u&&a.length>0&&a.map(e=>({item_id:e.awemeId,dy_q:e.dyQ,tag:e.isAds?2:0,potential_risk_level:0,authentication_token:""}))}let h=a;h=await (0,iD.x)(h),m&&p(m);let g=h.length<6?B.current:U.current;h.map(e=>(e.cursor=g,e)),Z.current=i?1:s,!u&&(i?setTimeout(()=>{var e,t;null===(t=F.current)||void 0===t||null===(e=t.loadMoreData)||void 0===e||e.call(t)},200):(B.current=U.current,U.current=o),z.current={whaleCutToken:null==v?void 0:v.whaleCutToken});let _=tR(h,X.current).filter(e=>!Q.current.includes(e.awemeId));return f&&f.guideLoginTipExist&&(_=[{awemeId:iT.P.NoLoginVideoGuide,awemeType:nJ.e.NoLoginVideoGuide,name:f.guideLoginTipText,desc:f.guideLoginTipDesc,video:{cover:f.guideLoginTipCover},authorInfo:{uid:d.uid},createTime:f.guideLoginTipCreateTime},...a],O.current=!0),Y.current=!1,{data:_,maxCursor:i?0:o,hasMore:i?1:s,statusCode:i?0:u,whaleDecisionCustom:null==v?void 0:v.whaleDecisionCustom,clearBefore:!i&&0===B.current}},[M,h,D]);(0,s.useEffect)(()=>{var e,t;let l=(0,W.Rs)("vid");!(null==c?void 0:null===(e=c.data)||void 0===e?void 0:e.find(e=>e.awemeId===l))&&q.current&&(null===(t=F.current)||void 0===t||t.loadMoreData());let n=$.listen($.EVENT.userHasLook,e=>{var t;A(!e.isInView),K.current=null!==(t=e.rank)&&void 0!==t?t:-1});return()=>{n()}},[]),(0,s.useEffect)(()=>{var e;(null==h?void 0:null===(e=h.AuthorBlock)||void 0===e?void 0:e.type)?N(!0):N(!1)},[h]);let ee=(0,s.useMemo)(()=>{var e;let t=tR(null!==(e=null==c?void 0:c.data)&&void 0!==e?e:[],X.current);return(0,R._)((0,a._)({},c),{data:t})},[c]),et=(0,s.useMemo)(()=>{var e;return{statusCode:0,data:b,maxCursor:(null===(e=b[b.length-1])||void 0===e?void 0:e.createTime)*1e3,hasMore:1,cursor:0}},[b]),el=(0,s.useCallback)(()=>{U.current=0,z.current={}},[]),{doIncrementalUpdate:en}=ac({getExistingList:()=>{var e,t;return(null===(t=F.current)||void 0===t?void 0:null===(e=t.getDataList)||void 0===e?void 0:e.call(t))||[]},fetchData:async e=>{var t;let l=await n1.dP.request({cached:!1,consume:!0,params:{userId:M,maxCursor:e,count:18}});return{data:l.data||[],maxCursor:l.maxCursor||0,hasMore:null!==(t=l.hasMore)&&void 0!==t?t:0,statusCode:l.statusCode}},setDataList:e=>{var t,l;null===(l=F.current)||void 0===l||null===(t=l.setScrollData)||void 0===t||t.call(l,{dataList:e}),I(e)}});r1(en,[M]);let{updateAwemeCount:er,isPostDelete:ei}=(0,s.useContext)(li);(0,s.useEffect)(()=>{var e,t,l,n,r;(ei||(null==L?void 0:L.isLogin)&&!H.current&&O.current)&&(null==F||null===(t=F.current)||void 0===t||null===(e=t.reset)||void 0===e||e.call(t),el(),null==F||null===(n=F.current)||void 0===n||null===(l=n.reload)||void 0===l||l.call(n),_("all"),C("all"),f(!1),I([])),H.current=null!==(r=null==L?void 0:L.isLogin)&&void 0!==r&&r},[ei,el,f,null==L?void 0:L.isLogin]);let ea=(0,s.useCallback)(e=>{var t,l,n,r;let i=((null==e?void 0:null===(l=e.cooperationInfo)||void 0===l?void 0:null===(t=l.cooperationCreators)||void 0===t?void 0:t.length)||0)>1,a=!1;i&&(null==e||null===(r=e.cooperationInfo)||void 0===r||null===(n=r.cooperationCreators)||void 0===n||n.forEach(e=>{"作者"===e.roleTitle&&e.secUid===M&&(a=!0)}));let o=i&&!a,s=(0,iR.i)(e),d="";return o?d="共创视频无删除权限":s&&(d="版权视频不可操作"),{disabled:o||s,disabledDesc:d}},[M]),eo=(0,s.useCallback)(()=>{b.length<100&&(null==er||er(b.length,!1))},[er,b.length]);return(0,s.useEffect)(()=>{let e=(0,W.Rs)("high_light_aweme_id");e&&(E(e),(0,W.U$)(["high_light_aweme_id"]))},[]),(0,s.useImperativeHandle)(t,()=>{var e,t,l,n,r,i,a,o;return{loadMoreData:null===(e=F.current)||void 0===e?void 0:e.loadMoreData,locateSelectVideo:null===(t=F.current)||void 0===t?void 0:t.locateSelectVideo,reset:null===(l=F.current)||void 0===l?void 0:l.reset,reload:null===(n=F.current)||void 0===n?void 0:n.reload,getTotal:null===(r=F.current)||void 0===r?void 0:r.getTotal,resetRes:null===(i=F.current)||void 0===i?void 0:i.resetRes,setScrollData:null===(a=F.current)||void 0===a?void 0:a.setScrollData,getDataList:null===(o=F.current)||void 0===o?void 0:o.getDataList}}),(0,o.jsxs)(o.Fragment,{children:["all"===g||k?(0,o.jsx)(iN,{ref:F,resetStatusFunc:el,handleLoadEnd:eo,uid:M,highLightAwemeId:S,tab:"post",currentTab:u,defaultRes:b.length>0?et:ee,fetchMoreData:J,setUserPostList:I,retryTimes:5,getItemSelectedDisabled:ea,topNavHeight:m,topOffset:v,panelNoData:(0,o.jsx)(V.H,{className:iP.empty,icon:(0,o.jsx)(lq.Z,{}),title:"暂无内容",desc:"该账号还未发布过作品哦~"}),showPermissionIcon:!0,pause:"post"!==u||!T}):(0,o.jsx)(au,{modifyList:w,userInfo:d,selectPartilarTime:g,setCurrentScrollTime:C,defaultUserPostList:b,defaultHasMore:Z.current,setUserPostList:I,uid:M,isSelf:D,tab:"post",currentTab:u,setSelectPartilarTime:_,setHideUserInfo:f,resetStatusFunc:el,getItemSelectedDisabled:ea,onBan:()=>N(!0),rebackParamRef:z,topNavHeight:m}),!D&&P&&"all"===g&&(0,o.jsx)("div",{className:iP.hasLook,onClick:()=>{var e;null===(e=F.current)||void 0===e||e.locateSelectVideo(K.current,-150)},children:(0,o.jsxs)("div",{className:iP.btn,children:[(0,o.jsx)("span",{className:iP.text,children:"刚刚看过"}),(0,o.jsx)(iA,{})]})})]})}),af=()=>{let e=(0,s.useRef)(),t=(0,s.useCallback)(async t=>{let{name:l,desc:n,avatar:r,avatarUri:i}=t,{statusCode:a,statusMsg:o="",mixId:s}=await ne({mixName:l,mixDesc:n,mixCover:i});return(nZ.sendLog("createCompilationComfirm",{compilation_id:s,compilation_name:l,status:"private",function_name:"save"}),0===a)?(setTimeout(()=>{var t;null===(t=e.current)||void 0===t||t.createMix({mixId:s,mixName:l,mixDesc:n,mixCover:r,coverUri:i})},0),""):o||"服务异常,请稍后再试"},[]);return{mixRef:e,onMixCreated:t}},ah=s.memo(e=>{let{isActive:t,tabName:l,cacheEnabled:n,children:r}=e,{isActive:i}=nc(),a=i&&t,d=(0,s.useMemo)(()=>({isActive:a,tabName:l,cacheEnabled:n}),[a,l,n]);return(0,o.jsx)(nu.Provider,{value:d,children:(0,o.jsx)("div",{style:{display:t?void 0:"none"},children:r})})});ah.displayName="SubTabCachePane";var ap=s.memo(e=>{let{currentSubTab:t,tabs:l,cacheEnabled:n}=e,[r,i]=(0,s.useState)(()=>new Set([t]));return((0,s.useEffect)(()=>{i(e=>{if(e.has(t))return e;let l=new Set(e);return l.add(t),l})},[t]),n)?(0,o.jsx)(o.Fragment,{children:l.map(e=>{let l=e.key===t,i=!1!==e.visible;if(e.noCache)return l&&i?(0,o.jsx)(s.Fragment,{children:e.children},e.key):null;return r.has(e.key)&&i?(0,o.jsx)(ah,{isActive:l,tabName:e.key,cacheEnabled:n,children:e.children},e.key):null})}):(0,o.jsx)(o.Fragment,{children:l.map(e=>{let l=!1!==e.visible;return e.key===t&&l?(0,o.jsx)(s.Fragment,{children:e.children},e.key):null})})}),ag=e=>{var t,l,n;let{userInfo:r,currentTab:i,defaultPostRes:d,topOffset:u=0,topNavHeight:v=60,setHideUserInfo:m,hideUserInfo:h,abTestData:p,currentSubTab:g=tH.VIDEO,onSubTabChange:_,defaultMixRes:w,defaultSeriesRes:b,showSearchBar:I,searchBarSlot:y,isListSelectable:j,setIsListSelectable:k}=e,N=(0,s.useRef)(null),[S,E]=(0,s.useState)([]),[L,T]=(0,s.useState)([]),[M,R]=(0,s.useState)("all"),[P,A]=(0,s.useState)("all"),[F,B]=(0,s.useState)(),[V,O]=(0,s.useState)(!1),[H,z]=(0,s.useState)(),[Z,$]=(0,s.useState)([]),{isSelf:K}=null!==(n=(0,s.useContext)(G))&&void 0!==n?n:{},[Y,q]=(0,s.useState)(!1),X=(0,s.useRef)(),Q=(0,s.useRef)((null==d?void 0:d.cursor)||0),J=(0,s.useRef)({});(0,c.C)(x.w3.components.user_post);let{cacheEnabled:ee}=nc(),{mixRef:et,onMixCreated:el}=af();(0,s.useEffect)(()=>{K&&r.awemeCount&&tG.sendLog("creatorManageEntranceShow",{type:"post"})},[K,r.awemeCount]),(0,s.useEffect)(()=>{var e;(null==p?void 0:null===(e=p.AuthorBlock)||void 0===e?void 0:e.type)?O(!0):O(!1)},[p]);let en=(0,s.useCallback)(()=>{Q.current=0,J.current={}},[]),{isPostDelete:er,reloadForPostDelete:ei,reloadForPostAdd:ea}=(0,s.useContext)(li);(0,s.useEffect)(()=>{if("post"===i)!Object.values(tH).includes(g)&&(null==_||_(tH.VIDEO)),R("all"),A("all")},[g,_,i]),(0,s.useEffect)(()=>{if(er){var e,t,l,n;null==X||null===(t=X.current)||void 0===t||null===(e=t.reset)||void 0===e||e.call(t),en(),null==X||null===(n=X.current)||void 0===n||null===(l=n.reload)||void 0===l||l.call(n),R("all"),A("all"),m(!1),E([])}},[er,en,m]);let eo=(0,s.useCallback)(e=>{let{manageCount:t=0,isAdd:l=!1}=e;l?(C.Le.setConfig(C.gI.AddPostList,Array(t).fill("")),null==ea||ea()):(C.Le.setConfig(C.gI.DeletePostList,Array(t).fill("")),null==ei||ei())},[ei,ea]),es=K&&g===tH.COMPILATION,ed=lb({maxSelectedCount:100,onManageEndCallback:eo,tabName:"post",subTabName:es?"mix":"video",isListSelectable:j,setIsListSelectable:k}),{updateIsSelectDisabled:eu,selectedCount:ec,selectItems:ev,resetScrollList:em}=ed,ef=e=>{if(!!e)null==_||_(e),e!==g&&(0,la.V)().scrollTo(0,0)};(0,s.useEffect)(()=>{let e=(0,W.Rs)("high_light_aweme_id");e&&(z(e),(0,W.U$)(["high_light_aweme_id"]))},[]);let eh=(0,s.useRef)(null);return(0,o.jsxs)(ly.Provider,{value:(0,a._)({},ed),children:[(0,o.jsxs)("div",{className:lk.post,children:[(0,o.jsx)(iJ,{headerHeight:j?72:44,topNavHeight:v,topOffset:h?-200:u,children:(0,o.jsxs)("div",{className:f()(lk.header,{[lk.noMarginBottom]:K},{[lk.headerBg]:j}),id:"user-tabbar-2",children:[j?(0,o.jsx)(i7,{currentSubTab:g,currentTab:i,selectedText:es?"合集":"作品",operateBtns:[{key:"cancel_post",actionText:"删除",onClick:()=>{var e,t;if((null==ev?void 0:ev.length)!==0)U.logInstance.sendLog("functionIconClick",{tab_name:i,sub_tab_name:g,item_cnt:ec,function_name:"delete"}),null===(t=eh.current)||void 0===t||null===(e=t.changeShowDeleteConfirm)||void 0===e||e.call(t,!0)}},{key:"permission_set",actionText:"权限设置",onClick:()=>{var e,t;if((null==ev?void 0:ev.length)!==0)U.logInstance.sendLog("functionIconClick",{tab_name:i,sub_tab_name:g,item_cnt:ec,function_name:"permission_setting"}),null===(t=eh.current)||void 0===t||null===(e=t.changeShowPermissionConfirm)||void 0===e||e.call(t,!0)}}]}):(0,o.jsx)(D.Tabs,{type:"button",className:lk.tabs,activeKey:g,onChange:e=>ef(e),children:(K?tz:tZ).map(e=>(0,o.jsx)(D.TabPane,{itemKey:e.tab,tab:(0,o.jsxs)("div",{className:lk.tabItem,children:[(0,o.jsx)("span",{children:e.title}),e.lock&&(0,o.jsx)("div",{className:lk.iconWrapper,children:(0,o.jsx)(ew.z,{className:f()(lk.iconLock,{[lk.iconActive]:e.tab===g}),svg:(0,o.jsx)(lf.Z,{})})})]})},e.tab))}),(0,o.jsxs)("div",{className:lk.tool,ref:B,children:[g===tH.VIDEO&&(0,o.jsxs)(o.Fragment,{children:[I&&y,!V&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(D.Divider,{className:lk.divider,layout:"vertical",margin:"12px"}),(0,o.jsx)(an,{postTimeList:L,onTimeClick:e=>{R(e),A(e),"all"===e&&(0,la.V)().scrollTo(0,0)},isSelf:K,currentScrollTime:P,logParams:{enter_from:K?"personal_homepage":"others_homepage",tab_name:"post"},className:lk.timeLineButtonAugment,isListSelectable:j})]})]}),K&&g===tH.COMPILATION&&!j&&(0,o.jsx)(rO,{type:"create",userInfo:r,edit:el,children:(0,o.jsxs)("div",{className:lk.createMix,onClick:()=>nZ.sendLog("compilationCreateClick"),children:[(0,o.jsx)(ew.z,{svg:(0,o.jsx)(lh.Z,{}),className:lk.createMixIc}),"创建合集"]})})]})]})}),(0,o.jsx)("div",{className:f()(lk.list,{[lk.default]:!j}),"data-e2e":"user-post-list",children:(0,o.jsx)(ap,{currentSubTab:g,cacheEnabled:ee,tabs:[{key:tH.VIDEO,children:(0,o.jsx)(am,{ref:N,userInfo:r,currentTab:i,defaultPostRes:d,topOffset:0,topNavHeight:60,setHideUserInfo:m,hideUserInfo:h,abTestData:p,postTimeList:L,setPostTimeList:T,selectPartilarTime:M,setSelectPartilarTime:R,currentScrollTime:P,setCurrentScrollTime:A,modifyList:Z})},{key:tH.SECRET_VIDEO,children:(0,o.jsx)(iE,{currentTab:i})},{key:tH.COMPILATION,children:(0,o.jsx)(r4,{ref:et,topNavHeight:60,isListSelectable:j,currentTab:i,userInfo:r,defaultMixRes:(null==w?void 0:null===(t=w.data)||void 0===t?void 0:t.length)>0?w:void 0})},{key:tH.SERIES,children:(0,o.jsx)(ie,{currentTab:i,userInfo:r,defaultSeriesRes:(null==b?void 0:null===(l=b.data)||void 0===l?void 0:l.length)>0?b:void 0})}]})})]}),(0,o.jsx)(rR,{ref:eh,updateIsSelectDisabled:eu,setIsListSelectable:k,onManageEndCallback:eo,resetScroll:em,selectItems:ev,selectedCount:ec,listRef:es?et:N,currentTab:i,subTab:g,setModifyList:$})]})},a_=l("809849"),ax=l("518278");let aC=(0,s.forwardRef)((e,t)=>(0,o.jsx)("svg",(0,R._)((0,a._)({width:16.5,height:12,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,o.jsx)("path",{d:"M7.158 11.693c-.41.41-1.073.41-1.482 0l-4.81-4.81a1.248 1.248 0 0 1 0-1.765L5.676.307a1.048 1.048 0 1 1 1.482 1.482L3.995 4.953h11.982a1.048 1.048 0 0 1 0 2.095H3.996l3.162 3.163c.41.41.41 1.073 0 1.482z",fill:"#000"})})));var aw=l("227677");let ab=e=>{let{width:t=16.5,height:l=12,className:n}=e;return(0,o.jsx)(aw.A,(0,R._)((0,a._)({},e),{width:t,height:l,src:aC,id:"svg_arrow_right",viewBox:"0 0 16.5 12",defaultWidth:16.5,defaultHeight:12,className:n}))};var aI=l("65480"),ay=l("944526"),aj="OZE2kIDd",ak="AUbotU02",aN="uc1yRLoo",aS=e=>{let{title:t="暂无喜欢的视频",desc:l="快到首页寻找更多视频吧",className:n,type:r="like"}=e,i=(0,s.useCallback)(()=>{U.logInstance.sendLog("clickBackRecommend",{enter_from:(0,tu.vM)()})},[]),a=new Map([["like",(0,o.jsx)(aI.Z,{},"like")],["collect",(0,o.jsx)(ay.Z,{},"collect")]]).get(r||"like");return(0,o.jsx)(V.H,{className:f()(aj,n),icon:a,title:t,desc:l,children:(0,o.jsxs)(ax.a,{href:"/?enter=guide",className:ak,target:"_self",onClick:i,children:[(0,o.jsx)(ab,{}),(0,o.jsx)("p",{className:aN,children:"去首页"})]})})},aE={header:"jdec3Lrf",headerBg:"S48spRLM",like:"onX9a5tB",likeNoMarginTop:"GXgk8pUR",errorContent:"h0LoNRKO",fuFang:"Uc14SueU",empty:"OVIlgreO",descText:"bNsVZQQL"},aL=e=>{var t,l;let{userInfo:n,currentTab:r,topNavHeight:i=60,abTestData:d,showSearchBar:u,searchBarSlot:v,isListSelectable:m,setIsListSelectable:h}=e,p={statusCode:0,data:[],hasMore:1,cursor:0,maxCursor:0},g=(0,nl.o)(null==n?void 0:n.secUid),{isSelf:_}=null!==(l=(0,s.useContext)(G))&&void 0!==l?l:{},C=(0,s.useRef)(0),w=(0,s.useRef)(0),b=(0,s.useRef)({}),I=(0,s.useRef)([]),[y,j]=(0,s.useState)([]),[k,N]=(0,s.useState)(),S=(0,s.useRef)(!0);(0,c.C)(x.w3.components.user_like);let E=(0,s.useRef)(),{doIncrementalUpdate:L}=ac({getExistingList:()=>{var e,t;return(null===(t=E.current)||void 0===t?void 0:null===(e=t.getDataList)||void 0===e?void 0:e.call(t))||[]},fetchData:async e=>{var t;let l=await n1.$w.request({cached:!1,consume:!0,params:{userId:g,maxCursor:e,count:18}});return{data:l.data||[],maxCursor:l.maxCursor||0,hasMore:null!==(t=l.hasMore)&&void 0!==t?t:0,statusCode:l.statusCode}},setDataList:e=>{var t,l;null===(l=E.current)||void 0===l||null===(t=l.setScrollData)||void 0===t||t.call(l,{dataList:e}),j(e)}});r1(L,[g]);let T=(0,s.useCallback)(async()=>{let e=_&&(null==S?void 0:S.current)&&n1.$w.hasCache;iL.z.markStart("user_like_fetch_data",{once:!0});let{data:t=[],maxCursor:l=0,hasMore:n,statusCode:r,logPb:i,whaleInfo:a}=await av(t=>{var l;return n1.$w.request({cached:e,consume:!0,params:{userId:g,maxCursor:t,count:18,whaleCutToken:null===(l=b.current)||void 0===l?void 0:l.whaleCutToken},fetcherOptions:{expired:12e5,resetExpiredCacheBefore:!1,hoverDelay:!1}})},w.current);iL.z.markEnd("user_like_fetch_data",{once:!0});let o=t.length<6?C.current:w.current;return t.map(e=>(e.cursor=o,e)),!r&&(e?setTimeout(()=>{var e,t;null===(t=E.current)||void 0===t||null===(e=t.loadMoreData)||void 0===e||e.call(t)},200):(C.current=w.current,w.current=l),b.current={whaleCutToken:null==a?void 0:a.whaleCutToken}),S.current=!1,{data:tR(t,I.current),maxCursor:e?0:l,hasMore:e?1:n,statusCode:e?0:r,whaleDecisionCustom:null==a?void 0:a.whaleDecisionCustom,logPb:i,clearBefore:!e&&0===C.current}},[g,d,_]),M=(0,s.useCallback)(()=>{w.current=0,b.current={}},[]),R=(0,s.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t={},l=[];return e.forEach(e=>{l.push(e.awemeId),t[e.awemeId]=(0,iW.I)(e.awemeType)}),(0,rm.g)({awemeIds:l.join(","),itemTypeMap:t})},[]),{updateFavoriteCount:D,isPostDelete:P}=(0,s.useContext)(li);(0,s.useEffect)(()=>{if(P){var e,t,l,n;null==E||null===(t=E.current)||void 0===t||null===(e=t.reset)||void 0===e||e.call(t),M(),null==E||null===(n=E.current)||void 0===n||null===(l=n.reload)||void 0===l||l.call(n)}},[P,M]);let A=(0,s.useCallback)(e=>{let{manageCount:t=0}=e;null==D||D(-t,!0)},[D]),F=(0,s.useCallback)(()=>{y.length<100&&(null==D||D(y.length,!1))},[D,y.length]),B=lb({maxSelectedCount:100,operate:R,operateDesc:{operation:"取消",itemName:"喜欢的作品"},onManageEndCallback:A,tabName:"like",subTabName:"video",isListSelectable:m,setIsListSelectable:h}),{changeShowConfirm:O,renderConfirmModal:H,selectedCount:z,selectItems:Z=[]}=B,[W,$]=(0,s.useState)((null==y?void 0:y.length)>0||(null==p?void 0:null===(t=p.data)||void 0===t?void 0:t.length)>0);return((0,s.useMemo)(()=>(0,o.jsxs)("div",{className:f()(aE.descText,aE.fuFang),children:[(0,o.jsx)("p",{children:"找不到内容?"}),(0,o.jsx)("p",{children:"1.某些内容格式电脑端暂不支持查看,请在 APP 查看"}),(0,o.jsx)("p",{children:"2.某些内容因作者删除或设置私密,暂时无法查看"})]}),[]),(0,s.useEffect)(()=>{var e;$((null==y?void 0:y.length)>0||(null==p?void 0:null===(e=p.data)||void 0===e?void 0:e.length)>0)},[y,null==p?void 0:p.data]),_||n.showFavoriteList)?(0,o.jsxs)(ly.Provider,{value:(0,a._)({},B),children:[(0,o.jsxs)("div",{className:f()(aE.like,{[aE.likeNoMarginTop]:_}),"data-e2e":"user-like-list",children:[_&&(0,o.jsx)(iJ,{headerHeight:m?72:44,topNavHeight:i,children:(0,o.jsxs)("div",{className:f()(aE.header,{[aE.headerBg]:m}),children:[m?(0,o.jsx)(i7,{currentSubTab:"",currentTab:r,selectedText:"喜欢的作品",operateBtns:[{key:"cancel_like",actionText:"取消喜欢",onClick:()=>{if((null==Z?void 0:Z.length)!==0)O(!0),U.logInstance.sendLog("functionIconClick",{tab_name:"like",sub_tab_name:"video",item_cnt:z,function_name:"like_cancel"})}}]}):(0,o.jsx)("div",{}),u&&v]})}),(0,o.jsx)(iN,{ref:E,handleLoadEnd:F,resetStatusFunc:M,uid:g,tab:"like",currentTab:r,defaultRes:p,fetchMoreData:T,retryTimes:5,panelNoData:_?(0,o.jsx)(aS,{className:aE.empty}):void 0,updateAwemeList:j,topNavHeight:i})]}),null==H?void 0:H()]}):(0,o.jsx)(V.H,{icon:(0,o.jsx)(a_.Z,{}),title:"喜欢内容不可见",desc:"该用户已将喜欢设为私密",className:aE.errorContent})},aT=l("901393"),aM=l("941293"),aR=l("598154"),aD=l("103680"),aP=l("545467"),aA=l("16360"),aF={header:"biPeq9Mr",container:"CIhQbCUb",item:"w3Hhjm5i",empty:"U5DDby_c"};function aB(e){let t=Q()(e);if(!t.isValid())return"";let l=C.Le.getConfig(C.gI.ServerTime),n=l?Q()(l):Q()(),r=t.isSame(n,"day"),i=t.isSame(n.subtract(1,"day"),"day");return r?"今天":i?"昨天":n.format("YYYY")===t.format("YYYY")?t.format("MM月DD日"):t.format("YY年MM月DD日")}let aU=(0,i_.ZP)(()=>Promise.all([l.e("23634"),l.e("73286"),l.e("41162"),l.e("42422"),l.e("15799"),l.e("21133"),l.e("28161"),l.e("73356"),l.e("69855"),l.e("5974"),l.e("42794"),l.e("15915"),l.e("72230"),l.e("68055"),l.e("44077"),l.e("51705"),l.e("24882"),l.e("73481"),l.e("10771"),l.e("6593"),l.e("6757"),l.e("44882"),l.e("64942"),l.e("26973"),l.e("74352"),l.e("90597")]).then(l.bind(l,604467)),{ssr:!1});var aV=s.forwardRef(function(e,t){var l,n,r,i;let{currentTab:d,tab:u,setHasClean:c,userInfo:v,topNavHeight:m=60}=e,h=(0,nl.o)(null==v?void 0:v.secUid),{isSelf:p}=(0,s.useContext)(G)||{},g=null!==(r=(0,K._)())&&void 0!==r?r:{},_=null!==(i=(0,eH.useUserInfoContext)())&&void 0!==i?i:{},[C,w]=(0,s.useState)([]),[b,I]=(0,s.useState)(-1),[y,j]=(0,s.useState)(""),k=(0,s.useRef)(),N=(0,s.useRef)(),S=(0,s.useRef)(0),E=(0,s.useRef)();r1(async()=>{try{let{data:l,cursor:n,hasMore:r,statusCode:i}=await n1.vF.request({cached:!1,consume:!0,params:{maxCursor:0,count:20}});if(!i){var e,t;S.current=n,D.current=0,null==k||null===(t=k.current)||void 0===t||null===(e=t.resetRes)||void 0===e||e.call(t,{statusCode:0,dataList:l,hasMore:r}),l.length>0&&c(!0)}}catch(e){}},[]);let{reloadForPostDelete:L,isPostDelete:T}=(0,s.useContext)(li),M=(0,s.useRef)({}),R=(0,s.useRef)(!0),D=(0,s.useRef)(0);(0,s.useEffect)(()=>{if(T){var e,t,l,n;null==k||null===(t=k.current)||void 0===t||null===(e=t.reset)||void 0===e||e.call(t),S.current=0,null==k||null===(n=k.current)||void 0===n||null===(l=n.reload)||void 0===l||l.call(n)}},[T]);let P=async()=>{var e;let t=p&&(null==R?void 0:R.current)&&0===S.current&&n1.vF.hasCache;iL.z.markStart("user_record_fetch_data",{once:!0});let{data:l,cursor:n,hasMore:r,statusCode:i}=await n1.vF.request({cached:t,consume:!0,params:(0,a._)({maxCursor:S.current,count:20},null!==(e=null==M?void 0:M.current)&&void 0!==e?e:{}),fetcherOptions:{expired:12e5,resetExpiredCacheBefore:!1,hoverDelay:!1}});return iL.z.markEnd("user_record_fetch_data",{once:!0}),l.length>0&&c(!0),!i&&(t?setTimeout(()=>{var e,t;null===(t=k.current)||void 0===t||null===(e=t.loadMoreData)||void 0===e||e.call(t)},200):(D.current=S.current,S.current=n)),R.current=!1,{data:l,hasMore:t?1:r,statusCode:t?0:i,clearBefore:!t&&0===D.current}},A=async e=>{var t,l,n,r;S.current=0,M.current=e,null==k||null===(l=k.current)||void 0===l||null===(t=l.resetRes)||void 0===t||t.call(l,{statusCode:0,dataList:[],hasMore:!0});let{statusCode:i,data:a=[],hasMore:o}=await (null==P?void 0:P());null==k||null===(r=k.current)||void 0===r||null===(n=r.resetRes)||void 0===n||n.call(r,{statusCode:i,dataList:a,hasMore:o})},F=(0,s.useCallback)((e,t)=>(0,o.jsx)(im,{rank:t,info:e,isSelf:p,tab:u,uid:h,onClick:l=>{null==l||l.preventDefault();let n=`${x.w3.modal.modal_first_video_play}_start`;if((0,z.tl)(n),(0,z.B1)({tag:n}),null==e?void 0:e.awemeId){var r;null===il.YY||void 0===il.YY||null===(r=il.YY.setPlayerReuseAble)||void 0===r||r.call(il.YY,ir.v.User,e.awemeId)}E.current="",I(t),N.current=e},onNicknameClick:()=>{E.current="author_card",I(t),N.current=e},reuseConfig:{scene:ir.v.User,reuseId:null==e?void 0:e.awemeId,autoCreate:!0}}),[]);(0,s.useEffect)(()=>{C.length&&j(e=>{var t,l;let n=aB(null!==(l=null===(t=C[0])||void 0===t?void 0:t.historyTime)&&void 0!==l?l:0);return""!==e?e:n});let e=(0,la.s)(),t=()=>{let t=document.querySelector(".record_card");if(t){var l,n,r;let i=(null==t?void 0:t.clientHeight)+24;if((null==t?void 0:t.offsetTop)-220>(0,iG.F)(e).y)j(aB(null!==(n=null===(l=C[0])||void 0===l?void 0:l.historyTime)&&void 0!==n?n:0));else{let t=is(),l=Math.floor(((0,iG.F)(e).y-220)/i);if(l>=0){let e=C[l*t];j(aB(null!==(r=null==e?void 0:e.historyTime)&&void 0!==r?r:0))}}}};return e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)},[C]);let B=(0,nn.m)();return(0,s.useEffect)(()=>{let e=(0,W.Rs)("aweme_id");if(e&&C&&(null==C?void 0:C.length)>0){var t;let l=null==C?void 0:null===(t=C.findIndex)||void 0===t?void 0:t.call(C,t=>(null==t?void 0:t.awemeId)===e);e&&-1!==l&&I(l),(0,W.U$)("aweme_id")}},[C]),(0,s.useEffect)(()=>$.listen($.EVENT.openUserModal,e=>{let{awemeId:t}=e,l=(0,W.Rs)("aweme_id");if(l&&t===l&&C&&(null==C?void 0:C.length)>0){var n;let e=null==C?void 0:null===(n=C.findIndex)||void 0===n?void 0:n.call(C,e=>(null==e?void 0:e.awemeId)===l);-1!==e&&I(e),(0,W.U$)("aweme_id")}}),[C]),(0,s.useImperativeHandle)(t,()=>({reloadList:A})),(0,o.jsxs)(o.Fragment,{children:[C.length>0&&(0,o.jsx)(iJ,{headerHeight:44,topNavHeight:m+44,noBgImage:!0,children:(0,o.jsx)("div",{className:aF.header,children:y})}),(0,o.jsx)(lA.Z,{scrollContainerEl:B,ref:k,containerClassName:aF.container,itemClassName:f()(aF.item,"record_card"),panelNoData:(0,o.jsx)(V.H,{className:aF.empty,icon:(0,o.jsx)(aR.Z,{}),title:"暂无内容",desc:"暂时还没有观看历史记录哦"}),skeletonNum:0,renderItem:F,fetchMoreData:P,setDataList:w,pause:d!==u,dataFilter:(e,t)=>t?e.filter(e=>-1===t.findIndex(t=>(null==t?void 0:t.awemeId)===e.awemeId)):e}),-1!==b&&(0,o.jsx)(aU,{modalEnterFrom:lS.a.UserRecord,modalInnerFeedCard:E.current,uid:h,userContext:_,abtestData:g,isSelf:p,anyHooks:aA.a,originAwemeInfo:N.current,userAwemeList:C,scrollRef:k,modalVideoIndex:b,additionalDistance:-150,close:()=>{var e;il.YY.clearAllReusePlayer(!!(null==g?void 0:g.jxTopCardCache)),I(-1),null==L||L(),(0,W.U$)("aweme_id"),(0,W.U$)("is_personal_panel_video"),(null==M?void 0:null===(e=M.current)||void 0===e?void 0:e.status)===ee.fN.Watching&&A(null==M?void 0:M.current)},moreBoxShowList:{notInterestingIcon:!1,unfollow:!0,report:!0,deleteSelfPost:p},logParams:{enter_from:"personal_homepage",enter_from_merge:"personal_homepage",enter_method:(0,W.Rs)("enter_method"),is_personal_panel_video:Number((0,W.Rs)("is_personal_panel_video"))||0,tab_name:"record_card",sub_tab_name:"video"},shortCutFilteredList:[null===(l=lE.getShortcut().dislike)||void 0===l?void 0:l.key],scene:"record",reuseConfig:{scene:ir.v.User,reuseId:null===(n=N.current)||void 0===n?void 0:n.awemeId,autoCreate:!1}})]})}),aO=l("297738"),aH=l.n(aO),az=l("138899");let aZ=(0,s.forwardRef)((e,t)=>(0,o.jsx)("svg",(0,R._)((0,a._)({width:20,height:21,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,o.jsxs)("g",{opacity:".9",fill:"#AEAFB3",children:[(0,o.jsx)("path",{d:"M14.873 15.507h-.45V14.21a4.28 4.28 0 0 0-2.398-3.846 4.28 4.28 0 0 0 2.398-3.845V5.22h.45c.232 0 .42-.191.42-.428a.424.424 0 0 0-.42-.429H5.42a.424.424 0 0 0-.42.429c0 .237.188.428.42.428h.442V6.52a4.28 4.28 0 0 0 2.398 3.845 4.28 4.28 0 0 0-2.398 3.846v1.297H5.42a.424.424 0 0 0-.42.429c0 .236.188.428.42.428h9.453c.232 0 .42-.192.42-.428a.424.424 0 0 0-.42-.429zM6.719 6.492v-1.27h6.872v1.27a3.436 3.436 0 0 1-6.872 0zm6.872 9.015H6.719v-1.27a3.436 3.436 0 0 1 6.872 0v1.27z"}),(0,o.jsx)("path",{d:"M10.578 8.656a.429.429 0 0 0-.43-.429c-.96 0-1.712-.752-1.712-1.712a.429.429 0 0 0-.858 0c0 1.441 1.13 2.57 2.57 2.57a.429.429 0 0 0 .43-.429z"})]})})));var aW={container:"VSfj0iJL",leftWrap:"Xl2HAbzF",cover:"Cj57wwG6",msec:"OR8jJ1C5",skeleton:"iDQCRFlR",rightWrap:"sdL0tN61",title:"XDy7Y3Dt",updateWrap:"cJSzA4Dy",updateTip:"FWEzYcPP",updateCount:"HKW5nvkN",process:"zhyG7QdR",processText:"HmZlyZ4H"};Q().extend(aH());var a$=e=>{var t;let{info:l,rank:n,query:r}=e,[i,d]=(0,nj.Z)();(0,s.useEffect)(()=>{var e,t,r;tG.sendLog("vsVideoShow",(0,R._)((0,a._)({},l.eventParams),{enter_from_merge:"personal_homepage",enter_method:"history",sub_tab_type:"",recommend_rank_num:n})),tG.sendLog("vsVideoSeasonCoverShowV2",(0,R._)((0,a._)({},l.eventParams),{enter_from_merge:"personal_homepage",enter_method:"history",previous_page:"",previous_page_enter_method:"",previous_page_sub_tab:"",to_vs_episode_id:null===(e=l.eventParams)||void 0===e?void 0:e.vs_episode_id,to_vs_ep_group_id:null===(t=l.eventParams)||void 0===t?void 0:t.vs_eq_group_id,to_room_id:null===(r=l.eventParams)||void 0===r?void 0:r.room_id,recommend_rank_num:n}))},[d,n,l]);let u=(0,az.iV)(null==l?void 0:l.albumId);return(0,o.jsx)(P.a,{href:`/${u?"vsdetail":"lvdetail"}/${l.episodeId}${r?`?${r}`:""}`,target:"_blank",rel:"noopener noreferrer",onClick:()=>{var e,t,r;tG.sendLog("vsVideoSeasonCoverClickV2",(0,R._)((0,a._)({},l.eventParams),{enter_from_merge:"personal_homepage",enter_method:"history",previous_page:"",previous_page_enter_method:"",previous_page_sub_tab:"",to_vs_episode_id:null===(e=l.eventParams)||void 0===e?void 0:e.vs_episode_id,to_vs_ep_group_id:null===(t=l.eventParams)||void 0===t?void 0:t.vs_eq_group_id,to_room_id:null===(r=l.eventParams)||void 0===r?void 0:r.room_id,recommend_rank_num:n}))},children:(0,o.jsxs)("div",{className:aW.container,ref:i,children:[(0,o.jsxs)("div",{className:aW.leftWrap,children:[(0,o.jsx)(nk.Q,{iconWidth:52,iconHeight:60,src:l.coverUrl,alt:l.title,imgClass:aW.cover,skeletonClass:aW.skeleton}),(0,o.jsx)("span",{className:aW.msec,children:(t=l.msec,Q().duration(t).format("HH:mm:ss"))}),(0,o.jsx)(n3.zx,{type:{3:"primary",4:"limited",6:"default"}[l.labelV2]})]}),(0,o.jsxs)("div",{className:aW.rightWrap,children:[(0,o.jsxs)("div",{className:aW.title,children:[l.titleBefore?`${l.titleBefore} | `:"",l.titleAfter]}),(0,o.jsxs)("div",{className:aW.updateWrap,children:[l.hasUpdate&&(0,o.jsx)("span",{className:aW.updateTip,children:"有更新"}),l.hasUpdate&&(0,o.jsx)("span",{className:aW.updateCount,children:l.updatedEpisode})]}),(0,o.jsxs)("div",{className:aW.process,children:[(0,o.jsx)(F.Z,{className:aW.icon,src:aZ,width:20,height:20,viewBox:"0 0 20 20"}),(0,o.jsxs)("span",{className:aW.processText,children:["观看到",l.progress,"%"]})]})]})]})})},aK={container:"qRmCr04U",content:"YZdBFT0u",date:"qN94sKlx",list:"XCReStgr",card:"rPEcBLNk",bottom:"WM9KWONn",noMore:"uTeRchtM",noMoreText:"Rh_hVywu",opBtn:"NSx3OvcX",error:"pJTE0KzR"};let aY=(e,t)=>(t.forEach(t=>{let l=aB(1e3*t.playTime);e[l]?e[l].push(t):e[l]=[t]}),(0,a._)({},e)),aG=e=>{let{children:t}=e;return(0,o.jsx)("div",{className:aK.noMoreText,children:t})},aq=e=>{let{onReload:t}=e;return(0,o.jsxs)(aG,{children:["服务异常,重新",(0,o.jsx)("span",{onClick:t,className:aK.opBtn,children:"刷新"}),"拉取数据"]})};var aX=e=>{let{setHasClean:t}=e,[l,n]=(0,s.useState)({}),[r,i]=(0,s.useState)(!1),[a,u]=(0,s.useState)(!1),c=(0,s.useRef)(r);c.current=r;let v=(0,s.useRef)(null),m=(0,s.useRef)(0),f=(0,s.useRef)(!0),p=(0,s.useCallback)(async()=>{i(!0),u(!1);try{let{data:e,cursor:l,hasMore:r,statusCode:a}=await (0,aP.TF)({cursor:m.current,count:20});return e.length>0&&t(!0),a?u(!0):(m.current=l,f.current=r),n(t=>aY(t,e)),i(!1),{list:e,hasMore:r,statusCode:a}}catch(e){u(!0)}},[]),g=(0,s.useCallback)(async()=>{v.current&&f.current&&!c.current&&v.current.getBoundingClientRect().bottom-window.innerHeight<=600&&await p()},[]);return((0,s.useEffect)(()=>{let e=iY()(g,50),t=(0,la.s)();return t.addEventListener("scroll",e),()=>{t.removeEventListener("scroll",e)}},[]),(0,s.useEffect)(()=>{p()},[]),r1(async()=>{try{let{data:e,cursor:l,hasMore:r,statusCode:i}=await (0,aP.TF)({cursor:0,count:20});!i&&(m.current=l,f.current=r,n(aY({},e)),e.length>0&&t(!0))}catch(e){}},[]),0!==Object.keys(l).length||f.current)?(0,o.jsxs)("div",{className:aK.container,ref:v,children:[(0,o.jsx)("div",{className:aK.content,children:Object.keys(l).map(e=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:aK.date,children:e}),(0,o.jsx)("ul",{className:aK.list,children:l[e].map((e,t)=>(0,o.jsx)("li",{className:aK.card,children:(0,o.jsx)(a$,{info:e,rank:t,query:d.stringify({t:Math.floor((null==e?void 0:e.msec)/1e3)})})},t))})]}))}),(0,o.jsxs)("div",{className:aK.bottom,children:[r&&(0,o.jsx)(h.gb,{}),a&&(0,o.jsx)(aq,{onReload:p}),!r&&!f.current&&(0,o.jsx)("div",{className:aK.noMore,children:"暂时没有更多了"})]})]}):(0,o.jsx)("div",{className:aK.error,children:(0,o.jsx)(V.H,{icon:(0,o.jsx)(aR.Z,{}),title:"暂无内容",desc:"暂时还没有观看历史记录哦"})})},aQ=l("593124"),aJ=l("600767"),a0=l("300027"),a1=l("277764");let a2=e=>{let{notSeenItemList:t=[],originAwemeInfo:l,setAwemeInfoList:n,setCurrentNumber:r,currentAwemeInfo:i}=e,a=(0,s.useRef)({});(0,s.useEffect)(()=>{l&&(n([l]),r(0))},[l]),(0,s.useEffect)(()=>{if((null==t?void 0:t.length)>0){var e;null==t||null===(e=t.forEach)||void 0===e||e.call(t,e=>{(0,a0.b)({awemeId:e,countOnce:1,scene:lS.a.UserCard})})}},[t]),(0,s.useEffect)(()=>{var e;(null==i?void 0:i.awemeId)&&!a.current[null==i?void 0:i.awemeId]&&(null==i?void 0:i.awemeId)&&(null==t?void 0:t.length)>0&&(null==t?void 0:null===(e=t.includes)||void 0===e?void 0:e.call(t,null==i?void 0:i.awemeId))&&(a.current[null==i?void 0:i.awemeId]=!0,(0,eI.qA)({item_id_list:null==i?void 0:i.awemeId,type:1}),(0,a1.O)({awemeInfo:i}))},[i,t])};var a3={user:"PElzWV_t",container:"n7mMETYv",listSortByTime:"S0krRXOD",date:"rEpcwhST",hidden:"zxOGVFWw",cardList:"jvRpYFts",cardContainer:"AXzt2ddw",loading:"ShrdclBy",empty:"kTKV6IBt"},a5={userVisitedCard:"PdUlaOyW",avatarWrap:"e_9OrSl8",avatar:"z2CUolQz",info:"EtPHFY2g",desc:"PM5F1Lwu",nameInfo:"VJ4kVovJ",nickname:"dksSP9uz",badge:"xizHYL7h",badgeIcon:"kvTilfiF",extraLine:"sNTBO6w9",extra:"Q8YJsukw",liveExtraText:"BzSEcdzl",followButton:"kVss2mKl",contentBlock:"B8i6JAkQ"};let a6=function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",l=null==t?void 0:null===(e=t.indexOf)||void 0===e?void 0:e.call(t,"\n");return l>=0?`${t.substring(0,l)}`:t};var a4={User:"user",Live:"live"};function a7(e){var t,l,n,r,i,d;let{scene:u="user",abtestData:c,logId:v="",isSelf:m,logParams:h={},selfUid:p,isLogin:g,dispatch:_,selfSecUid:x,userVisitedInfo:C,className:w,onClick:b}=e,{nickname:I,uid:y,secUid:j,avatarSrc:k,followStatus:N,followerStatus:S,notSeenItemIdList:E,roomData:L,infoStruct:T,accountCertInfo:M,desc:R,roomIdStr:P,scheduledText:A}=C||{},F=!!(null==L?void 0:null===(t=L.owner)||void 0===t?void 0:t.web_rid),B=(0,s.useRef)(v),U=(0,s.useMemo)(()=>(null==T?void 0:T.priority)===ee.L4.HAS_NEW_PUBLISH?(null==T?void 0:T.text)||null:"",[T]),V=(0,s.useMemo)(()=>{var e;return(0,a._)({web_rid:null==L?void 0:null===(e=L.owner)||void 0===e?void 0:e.web_rid,enter_from_merge:"personal_homepage",action_type:"click",room_id:P},h||{})},[P,null==L?void 0:null===(l=L.owner)||void 0===l?void 0:l.web_rid,h]),O=(0,s.useMemo)(()=>L?{authorInfo:{roomData:L,roomId:P,nickname:I,title:I,secUid:j,desc:R,uid:y},desc:R}:{},[L,R,P,I,y,j]),{follow:H,unFollow:z}=(0,e3.OM)({selfUid:p,actionUid:y,defaultFollowerStatus:S,defaultFollowStatus:N,isLogin:g,onLoginSuccess:()=>null==_?void 0:_({type:"updateUserInfo"}),success:e=>{let{action:t}=e;("unFollow"===t||"follow"===t)&&m&&$.emit($.EVENT.UpdateSelfPageFollowCount,{action:t})},fail:e3.GH}),{followStatus:Z,text:W,buttonType:K}=(0,e5.r)({selfUid:p,actionUid:y,defaultFollowerStatus:S,defaultFollowStatus:N});return(0,o.jsxs)("div",{className:f()(a5.userVisitedCard,w),onClick:e=>{var t;return null==b?void 0:b(e,{isLiving:F,actionUid:y,webRid:null==L?void 0:null===(t=L.owner)||void 0===t?void 0:t.web_rid,roomId:P,actionSecUid:j,notSeenItemIdList:E})},children:[(0,o.jsx)("div",{className:a5.avatarWrap,children:F?(0,o.jsx)(eY.nh,{openMultiTaskWindowInWindow:(0,em.DT)(),type:"large",src:k,alt:`${I}头像`,uid:y,liveRoomUrl:(0,eq.cc)(V),isNeedSendLog:!0,liveRoomParam:{logId:B.current,episodeExtra:null==L?void 0:L.episode_extra},isFirstLive:(null==L?void 0:null===(r=L.episode_extra)||void 0===r?void 0:null===(n=r.mod)||void 0===n?void 0:n.episode_stage)===2,isEcomLive:(null==L?void 0:null===(d=L.ecom_data)||void 0===d?void 0:null===(i=d.room_cart_v2)||void 0===i?void 0:i.show_cart)===1,onClick:e=>{e.preventDefault()},abtestData:c,logParams:h,awemeInfo:O,position:"right",from:"follow",scene:"pc_profile_struct",zIndex:1e4}):(0,o.jsx)(eG.q,{className:a5.avatar,src:k,alt:`${I}头像`})}),(0,o.jsxs)("div",{className:a5.info,children:[(0,o.jsxs)("div",{className:a5.nameInfo,children:[(0,o.jsx)("div",{className:a5.nickname,children:(0,o.jsx)(et.Z,{text:I})}),(0,o.jsx)(eo.C,{iconClassName:a5.badgeIcon,accountCertInfo:M,className:a5.badge,isRoleNameShow:!1})]}),R&&(null==R?void 0:R.length)>0?(0,o.jsx)("div",{className:a5.desc,children:(0,o.jsx)(et.Z,{text:a6(R)})}):null,"user"===u&&!!U&&(0,o.jsx)("div",{className:a5.extraLine,children:(0,o.jsx)("span",{className:a5.extra,children:U})}),"live"===u&&(0,o.jsxs)(o.Fragment,{children:[!F&&!!A&&(0,o.jsx)("div",{className:a5.liveExtraText,children:A}),F&&!!(null==L?void 0:L.title)&&(0,o.jsx)("div",{className:a5.liveExtraText,children:null==L?void 0:L.title})]})]}),(0,o.jsx)(D.Button,{className:a5.followButton,type:K===e2.TT.Active?"primary":"secondary",onClick:e=>{e.stopPropagation(),(0,e7.V)(Z)?z():H()},theme:"solid",children:(0,o.jsx)("div",{className:a5.contentBlock,children:W})})]})}var a9=e=>{var t,l,n,r;let{setHasClean:i,currentTab:a,tab:u,topNavHeight:c=60}=e,v=null!==(l=(0,K._)())&&void 0!==l?l:{},m=null!==(n=(0,eH.useUserInfoContext)())&&void 0!==n?n:{},{isSelf:p}=null!==(r=(0,s.useContext)(G))&&void 0!==r?r:{},{dispatch:g,userInfo:_}=m,[x,C]=(0,s.useState)(),[w,b]=(0,s.useState)([]),[I,y]=(0,s.useState)(!1),j=(0,s.useRef)();r1(async()=>{try{let{statusCode:l,userVisitedInfos:n,cursor:r,hasMore:a}=await (0,iS.fetchUserVisitedList)({cursor:void 0,count:20});if(0===l){var e,t;N.current=r,null==j||null===(t=j.current)||void 0===t||null===(e=t.resetRes)||void 0===e||e.call(t,{statusCode:0,dataList:n,hasMore:a}),(null==n?void 0:n.length)>0&&i(!0)}}catch(e){}},[]);let k=(0,nn.m)(),N=(0,s.useRef)(),S=(0,s.useRef)({}),[E,L]=(0,s.useState)(!1),[T,M]=(0,s.useState)(""),R=async e=>{var t;let{data:l=[],statusCode:n,whaleInfo:r}=await (0,iS.fetchUserPost)({userId:e,count:10,needTimeList:!1,whaleCutToken:null===(t=S.current)||void 0===t?void 0:t.whaleCutToken});return 0===n&&(S.current={whaleCutToken:null==r?void 0:r.whaleCutToken}),{statusCode:n,data:l}},D=async(e,t)=>{var l;null==e||null===(l=e.preventDefault)||void 0===l||l.call(e);let{isLiving:n,actionSecUid:r,webRid:i,roomId:a,notSeenItemIdList:o=[]}=t||{};if(n){let e=(0,eq.cc)({web_rid:i,enter_from_merge:"personal_homepage",enter_method:"live_user_page_visit",enter_method_temai:"live_user_page_visit",action_type:"click",room_id:a});window.open(e,"_blank","noopener")}else try{if(L(!0),(null==o?void 0:o.length)>0){b(o);let e=await (0,aJ.m_)({awemeId:o[0],originType:iT.F.UserRecord});if(L(!1),(null==e?void 0:e.statusCode)===0){let{detail:t}=e||{};C(t),y(!0)}else ei.F.info("服务异常,请重试")}else{if(!r){ei.F.info("服务异常,请重试"),L(!1);return}let{statusCode:e,data:t}=await R(r);if(L(!1),0===e){if(t&&(null==t?void 0:t.length)>0){let e=t.sort((e,t)=>t.createTime-e.createTime)[0];C(e),y(!0)}else{let e=(0,eq.HC)(r,(0,d.stringify)({enter_from:"personal_homepage",is_search:0}));window.open(e,"_blank","noopener")}}else ei.F.info("服务异常,请重试")}}catch(e){ei.F.info("服务异常,请重试"),L(!1)}},P=async()=>{let{statusCode:e,userVisitedInfos:t,cursor:l,hasMore:n}=await (0,iS.fetchUserVisitedList)({cursor:N.current,count:20});return 0===e&&(N.current=l,(null==t?void 0:t.length)>0&&i(!0)),{statusCode:e,hasMore:n,data:t}},A=()=>{var e,t,l,n;null==j||null===(t=j.current)||void 0===t||null===(e=t.reset)||void 0===e||e.call(t),N.current=void 0,null==j||null===(n=j.current)||void 0===n||null===(l=n.reload)||void 0===l||l.call(n)};return(0,s.useEffect)(()=>{let e=(0,la.s)(),t=()=>{let t;let l=(0,iG.F)(e).y,n=document.querySelectorAll(".user_record_date");if(l<148)t=n[0];else{var r;let e=[];null==n||null===(r=n.forEach)||void 0===r||r.call(n,t=>{(null==t?void 0:t.offsetTop)<Math.abs(l-148)&&e.push(t)}),(null==e?void 0:e.length)>0&&(t=e[e.length-1])}t&&M(null==t?void 0:t.innerText)};return e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)},[]),(0,o.jsxs)("div",{className:a3.user,children:[T&&(0,o.jsx)(iJ,{headerHeight:44,topNavHeight:c+44,noBgImage:!0,children:(0,o.jsx)("div",{className:a3.date,children:T})}),(0,o.jsx)(lA.Z,{ref:j,scrollContainerEl:k,itemClassName:a3.cardContainer,containerClassName:a3.container,fetchMoreData:P,skeletonNum:0,pause:a!==u,panelNoData:(0,o.jsx)(V.H,{className:a3.empty,icon:(0,o.jsx)(aR.Z,{}),title:"暂无内容",desc:"暂时还没有用户历史记录哦"}),renderList:e=>{var t,l,n;let r=Object.entries(null==e?void 0:null===(t=e.reduce)||void 0===t?void 0:t.call(e,(e,t)=>{let{visitTime:l}=t,n=Q().unix(l).format("YYYY-MM-DD"),r=e[n];return e[n]=[...r||[],t],e},{})).sort((e,t)=>e[0]>t[0]?-1:0).map(e=>{let[t,l]=e;return{date:aB(t),list:l}});return!T&&M(null===(n=r[0])||void 0===n?void 0:n.date),(0,o.jsx)(o.Fragment,{children:null==r?void 0:null===(l=r.map)||void 0===l?void 0:l.call(r,(e,t)=>{var l;let{date:n,list:r}=e;return(0,o.jsxs)("div",{className:a3.listSortByTime,children:[(0,o.jsx)("div",{className:f()(a3.date,"user_record_date",{[a3.hidden]:T&&0===t}),children:n}),(0,o.jsx)("div",{className:a3.cardList,children:null==r?void 0:null===(l=r.map)||void 0===l?void 0:l.call(r,e=>{var t,l;return(0,o.jsx)(a7,{scene:a4.User,className:a3.cardContainer,userVisitedInfo:e,selfUid:null==_?void 0:null===(t=_.info)||void 0===t?void 0:t.uid,selfSecUid:null==_?void 0:null===(l=_.info)||void 0===l?void 0:l.secUid,dispatch:g,abtestData:v,isSelf:p,isLogin:null==_?void 0:_.isLogin,onClick:D,logParams:{enter_method:"live_user_page_visit",enter_method_temai:"live_user_page_visit"}},e.uid)})})]},n)})})}}),I&&(0,o.jsx)(lN.default,{modalInnerFeedCard:"author_card",defaultForceOpenTab:aQ.L.Author,isActive:!0,abtestData:v,isSelf:p,uid:null==_?void 0:null===(t=_.info)||void 0===t?void 0:t.uid,anyHooks:a2,userContext:m,originAwemeInfo:x,notSeenItemList:w,modalEnterFrom:lS.a.UserCard,logParams:{enter_from:"personal_homepage",enter_from_merge:"personal_homepage",enter_method:(0,W.Rs)("enter_method"),tab_name:"record_card",sub_tab_name:"user"},close:()=>{A(),y(!1),C(void 0)}}),E&&(0,o.jsx)(h.gb,{className:a3.loading})]})},a8={live:"K1_A83ha",container:"ccB5kc0l",listSortByTime:"ZgMLL6LK",date:"mhazSCOD",hidden:"PM315OF1",cardList:"YLalLVlU",cardContainer:"uTtmwqKC",loading:"yI0vgsdy",empty:"D7PtND4T"},oe=e=>{var t,l,n,r;let{setHasClean:i,currentTab:a,tab:u,topNavHeight:c=60}=e,v=null!==(l=(0,K._)())&&void 0!==l?l:{},m=null!==(n=(0,eH.useUserInfoContext)())&&void 0!==n?n:{},{isSelf:p}=null!==(r=(0,s.useContext)(G))&&void 0!==r?r:{},{dispatch:g,userInfo:_}=m,[x,C]=(0,s.useState)(),[w,b]=(0,s.useState)(!1),I=(0,s.useRef)();r1(async()=>{try{let{statusCode:n,userVisitedInfos:r,cursor:a,hasMore:o}=await (0,iS.fetchWebcastFeedList)({cursor:"0"});if(0===n){var e,t,l;j.current=a,null==I||null===(t=I.current)||void 0===t||null===(e=t.resetRes)||void 0===e||e.call(t,{statusCode:0,dataList:r,hasMore:o}),(null==r?void 0:null===(l=r.filter)||void 0===l?void 0:l.call(r,e=>(null==e?void 0:e.type)===12).length)>0&&i(!0)}}catch(e){}},[]);let y=(0,nn.m)(),j=(0,s.useRef)("0"),k=(0,s.useRef)({}),[N,S]=(0,s.useState)(!1),[E,L]=(0,s.useState)(),T=async e=>{var t;let{data:l=[],statusCode:n,whaleInfo:r}=await (0,iS.fetchUserPost)({userId:e,count:10,needTimeList:!1,whaleCutToken:null===(t=k.current)||void 0===t?void 0:t.whaleCutToken});return 0===n&&(k.current={whaleCutToken:null==r?void 0:r.whaleCutToken}),{statusCode:n,data:l}},M=async(e,t)=>{var l;null==e||null===(l=e.preventDefault)||void 0===l||l.call(e);let{isLiving:n,actionSecUid:r,webRid:i,roomId:a}=t||{};if(n){let e=(0,eq.cc)({web_rid:i,enter_from_merge:"personal_homepage",enter_method:"live_history_enter",enter_method_temai:"live_history_enter",action_type:"click",room_id:a});window.open(e,"_blank","noopener")}else try{if(S(!0),!r){ei.F.info("服务异常,请重试"),S(!1);return}let{statusCode:e,data:t}=await T(r);if(S(!1),0===e){if(t&&(null==t?void 0:t.length)>0){let e=t.sort((e,t)=>t.createTime-e.createTime)[0];C(e),b(!0)}else{let e=(0,eq.HC)(r,(0,d.stringify)({enter_from:"personal_homepage",is_search:0}));window.open(e,"_blank","noopener")}}else ei.F.info("服务异常,请重试")}catch(e){ei.F.info("服务异常,请重试"),S(!1)}},R=async()=>{let{statusCode:e,userVisitedInfos:t,cursor:l,hasMore:n}=await (0,iS.fetchWebcastFeedList)({cursor:j.current});if(0===e){var r;j.current=l,(null==t?void 0:null===(r=t.filter)||void 0===r?void 0:r.call(t,e=>(null==e?void 0:e.type)===12).length)>0&&i(!0)}return{statusCode:e,hasMore:n,data:t}};return(0,s.useEffect)(()=>{let e=(0,la.s)(),t=()=>{let t;let l=(0,iG.F)(e).y,n=document.querySelectorAll(".user_record_date");if(l<148)t=n[0];else{var r;let e=[];null==n||null===(r=n.forEach)||void 0===r||r.call(n,t=>{(null==t?void 0:t.offsetTop)<Math.abs(l-148)&&e.push(t)}),(null==e?void 0:e.length)>0&&(t=e[e.length-1])}t&&L(null==t?void 0:t.innerText)};return e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)},[]),(0,o.jsxs)("div",{className:a8.live,children:[E&&(0,o.jsx)(iJ,{headerHeight:44,topNavHeight:c+44,noBgImage:!0,children:(0,o.jsx)("div",{className:a8.date,children:E})}),(0,o.jsx)(lA.Z,{ref:I,scrollContainerEl:y,itemClassName:a8.cardContainer,containerClassName:a8.container,fetchMoreData:R,skeletonNum:0,pause:a!==u,panelNoData:(0,o.jsx)(V.H,{className:a8.empty,icon:(0,o.jsx)(aR.Z,{}),title:"暂无内容",desc:"暂时还没有直播观看记录哦"}),renderList:e=>{var t,l,n;let r=null==e?void 0:null===(t=e.reduce)||void 0===t?void 0:t.call(e,(e,t)=>{if((null==t?void 0:t.type)===11){let l={date:null==t?void 0:t.timeTitle,list:[]};null==e||e.push(l)}else if((null==t?void 0:t.type)===12){var l,n;let r=null==e?void 0:e[(null==e?void 0:e.length)-1];null==r||null===(n=r.list)||void 0===n||null===(l=n.push)||void 0===l||l.call(n,t)}return e},[]);return!E&&L(null==r?void 0:null===(n=r[0])||void 0===n?void 0:n.date),(0,o.jsx)(o.Fragment,{children:null==r?void 0:null===(l=r.map)||void 0===l?void 0:l.call(r,(e,t)=>{var l;let{date:n,list:r}=e;return(0,o.jsxs)("div",{className:a8.listSortByTime,children:[(0,o.jsx)("div",{className:f()(a8.date,"user_record_date",{[a8.hidden]:E&&0===t}),children:n}),(0,o.jsx)("div",{className:a8.cardList,children:null==r?void 0:null===(l=r.map)||void 0===l?void 0:l.call(r,e=>{var t,l;return(0,o.jsx)(a7,{scene:a4.Live,className:a8.cardContainer,userVisitedInfo:e,selfUid:null==_?void 0:null===(t=_.info)||void 0===t?void 0:t.uid,selfSecUid:null==_?void 0:null===(l=_.info)||void 0===l?void 0:l.secUid,dispatch:g,abtestData:v,isSelf:p,isLogin:null==_?void 0:_.isLogin,onClick:M,logParams:{enter_method:"live_history_enter",enter_method_temai:"live_history_enter"}},e.uid)})})]},n)})})}}),w&&(0,o.jsx)(lN.default,{modalInnerFeedCard:"author_card",defaultForceOpenTab:aQ.L.Author,isActive:!0,abtestData:v,isSelf:p,uid:null==_?void 0:null===(t=_.info)||void 0===t?void 0:t.uid,anyHooks:a2,userContext:m,originAwemeInfo:x,modalEnterFrom:lS.a.UserCard,logParams:{enter_from:"personal_homepage",enter_from_merge:"personal_homepage",enter_method:(0,W.Rs)("enter_method"),tab_name:"record_card",sub_tab_name:"live"},close:()=>{b(!1),C(void 0)}}),N&&(0,o.jsx)(h.gb,{className:a8.loading})]})},ot={record:"tzdbnTbm",header:"cd0OHHUI",sticky:"F_Copcs3",tabs:"Q_RFWwo2",title:"rDa0DuuF",vs:"l9hMswES",setting:"NQbSh2pf",clean:"D6H_O6jn",cleanText:"HJLUm3hQ",cleanNew:"pPYP8XZg",cleanPannel:"MJYzrn3l",ohosCleanPannel:"NOMb2V6j",button:"oZz_Lp49",tipClassName:"PXnnP4Dm",iconClassName:"CnjNwMMI",desc:"VwIJG4q6",descText:"iLe0cXoF",fuFang:"fYjKFoNK",close:"olltAOya",list:"BNzVFJgd",error:"NQdODflJ",divider:"IgPyaifJ",comfirmText:"aHuOtjBQ",openButton:"Yb9u4p7k",ohosFuFang:"uEuFQ0bG",tipSvg:"woWbtso3",tipSvgNew:"cwCZTfAm",empty:"q6vNkLF5",iconSvg:"R_T7D2IX"},ol=l("534451");let on=(0,s.forwardRef)((e,t)=>(0,o.jsx)("svg",(0,R._)((0,a._)({width:16,height:16,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,o.jsx)("path",{d:"M12 6l-4 4-4-4",stroke:"#fff",strokeOpacity:".5",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})));var or={videoFilterPannel:"NFwaafPg",optionsContainer:"sEZ9tDDp",title:"_XRT6oLq",options:"zvhHOcya",option:"osg4rQov",active:"HuQznFz4",disabled:"vsG5g7aU",videoFilter:"xhWhWapM",btn:"bALvjwE9",filterIcon:"_N9eypZF",arrowIcon:"Y_pw6tgK",pannel:"R_kIQN8Y"};let oi=[{label:"不限",value:ee.fN.NoLimit},{label:"未看完",value:ee.fN.Watching},{label:"已看完",value:ee.fN.Watched}],oa=[{label:"不限",value:ee.IH.NoLimit},{label:"小于1分钟",value:ee.IH.LessThenOne},{label:"1-3分钟",value:ee.IH.OneToThree},{label:"3-10分钟",value:ee.IH.ThreeToTen},{label:"10分钟以上",value:ee.IH.MoreThenTen}],oo=[{label:"不限",value:ee.f8.NoLimit},{label:"二次元",value:ee.f8.SecondDimension},{label:"音乐",value:ee.f8.Music},{label:"体育",value:ee.f8.Sports},{label:"电影",value:ee.f8.Movie},{label:"游戏",value:ee.f8.Game}],os=e=>{let{label:t,value:l,isActive:n,onClick:r,disabled:i}=e;return(0,o.jsx)("div",{className:f()(or.option,{[or.active]:n,[or.disabled]:i}),onClick:e=>!i&&(null==r?void 0:r(e,{label:t,value:l})),children:t})},od=e=>{let{value:t,onChange:l,className:n,disabled:r}=e,{status:i=ee.fN.NoLimit,directory:s=ee.IH.NoLimit,category:d=ee.f8.NoLimit}=t||{};return(0,o.jsxs)("div",{className:f()(or.videoFilterPannel,n),children:[(0,o.jsxs)("div",{className:or.optionsContainer,children:[(0,o.jsx)("div",{className:or.title,children:"观看进度"}),(0,o.jsx)("div",{className:or.options,children:oi.map(e=>(0,o.jsx)(os,{onClick:(e,n)=>(null==t?void 0:t.status)!==(null==n?void 0:n.value)&&(null==l?void 0:l((0,R._)((0,a._)({},t),{status:n.value}),{click_type:"progress",click_sub_type:n.label})),label:e.label,value:e.value,isActive:e.value===i,disabled:r},e.value))})]}),(0,o.jsxs)("div",{className:or.optionsContainer,children:[(0,o.jsx)("div",{className:or.title,children:"视频时长"}),(0,o.jsx)("div",{className:or.options,children:oa.map(e=>(0,o.jsx)(os,{onClick:(e,n)=>(null==t?void 0:t.directory)!==(null==n?void 0:n.value)&&(null==l?void 0:l((0,R._)((0,a._)({},t),{directory:n.value}),{click_type:"duration",click_sub_type:n.label})),label:e.label,value:e.value,isActive:e.value===s,disabled:r},e.value))})]}),(0,o.jsxs)("div",{className:or.optionsContainer,children:[(0,o.jsx)("div",{className:or.title,children:"视频分类"}),(0,o.jsx)("div",{className:or.options,children:oo.map(e=>(0,o.jsx)(os,{onClick:(e,n)=>(null==t?void 0:t.category)!==(null==n?void 0:n.value)&&(null==l?void 0:l((0,R._)((0,a._)({},t),{category:n.value}),{click_type:"classification",click_sub_type:n.label})),label:e.label,value:e.value,isActive:e.value===d,disabled:r},e.value))})]})]})};var ou=e=>{let{className:t,value:l,onChange:n,subTab:r,disabled:i,onRef:a}=e,[d,u]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{d&&tG.sendLog("recordFilterTabClick",{sub_tab_name:r})},[d]),(0,o.jsxs)("div",{className:f()(or.videoFilter,t),onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),ref:e=>null==a?void 0:a(e),children:[(0,o.jsxs)("div",{className:or.btn,children:[(0,o.jsx)(ew.z,{svg:(0,o.jsx)(ol.Z,{}),className:or.filterIcon}),(0,o.jsx)("span",{children:"筛选"}),(0,o.jsx)(on,{className:or.arrowIcon})]}),d&&(0,o.jsx)(od,{disabled:i,className:or.pannel,value:l,onChange:n})]})},oc={container:"Z1yVlOZd",arrow:"GcpZnr3n"};let ov=(0,s.forwardRef)((e,t)=>(0,o.jsx)("svg",(0,R._)((0,a._)({width:4,height:17,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,o.jsx)("path",{d:"M0 0a8 8 0 0 0 2.168 5.476l1.174 1.25a2 2 0 0 1 0 2.738l-1.174 1.25A8 8 0 0 0 0 16.19V0z",fill:"#323442"})}))),om=e=>{let{popcorn:t,text:l,disable:n=!1}=e,[r,i]=(0,s.useState)(!1),a=(0,s.useRef)();return(0,s.useEffect)(()=>{!(0,ip.$o)(ig.LocalStorageKeys.SelfUserRecordFilterTip)&&!n&&((0,ip.qQ)(ig.LocalStorageKeys.SelfUserRecordFilterTip,1),i(!0),a.current=setTimeout(()=>i(!1),2e4))},[]),r?(0,lp.createPortal)((0,o.jsxs)("div",{className:oc.container,onClick:()=>{clearTimeout(a.current),i(!1)},children:[(0,o.jsx)(F.Z,{src:ov,viewBox:"0 0 4 17",width:4,height:17,className:oc.arrow}),l]}),t):null},of={[tB.VIDEO]:"清空观看历史",[tB.VS]:"清空观看历史",[tB.USER]:"清空用户历史",[tB.Live]:"清空直播历史"},oh={[tB.VIDEO]:"确认要清空观看历史?",[tB.VS]:"确认要清空观看历史?",[tB.USER]:"确认要清空用户历史?",[tB.Live]:"确认要清空直播历史?"},op={[tB.VIDEO]:"是否要关闭观看历史功能?",[tB.VS]:"是否要关闭观看历史功能?",[tB.USER]:"是否要关闭用户历史功能?",[tB.Live]:"是否要关闭直播历史功能?"},og={[tB.VIDEO]:"暂无观看历史记录",[tB.VS]:"暂无观影历史记录",[tB.USER]:"暂无用户历史记录",[tB.Live]:"暂无直播历史记录"};var o_=e=>{var t;let{currentTab:l,osInfo:n,topNavHeight:r=60,userInfo:i,currentSubTab:d=tB.VIDEO,onSubTabChange:u,abTestData:v,userSettings:m={freqVisitPerm:!0,webcastRecords:!0},showSearchBar:h,searchBarSlot:p}=e,[g,_]=(0,s.useState)(!1),[C,w]=(0,s.useState)(),{dispatch:b}=null!==(t=(0,eH.useUserInfoContext)())&&void 0!==t?t:{},[I,y]=(0,s.useState)(!!(null==i?void 0:i.viewHistoryPermission)),[j,k]=(0,s.useState)(null==m?void 0:m.freqVisitPerm),[N,S]=(0,s.useState)(null==m?void 0:m.webcastRecords),[E,L]=(0,s.useState)(!1),[T,M]=(0,s.useState)(!1),[R,P]=(0,s.useState)({status:ee.fN.NoLimit,directory:ee.IH.NoLimit,category:ee.f8.NoLimit}),[A,F]=(0,s.useState)(!1),B=(0,s.useRef)(!1),U=(0,s.useRef)(null),O=(0,tk.O)();(0,c.C)(x.w3.components.user_record);let{cacheEnabled:H}=nc(),z=(0,s.useMemo)(()=>{if(d===tB.VS||d===tB.VIDEO)return I;if(d===tB.USER)return j;if(d===tB.Live)return N;return!0},[I,j,N,d]);(0,s.useEffect)(()=>{tG.sendLog(z?"closeRecordShow":"openRecordShow",{})},[v]),(0,s.useEffect)(()=>{tG.sendLog("recordCardShow",{enter_from:"personal_homepage",record_tab:d===tB.VIDEO?"video":"film"})},[d]);let Z=async(e,t)=>{var l;if(null==B?!void 0:!B.current)B.current=!0,F(!0),P(e),await (null==U?void 0:null===(l=U.current)||void 0===l?void 0:l.reloadList(e)),F(!1),B.current=!1,tG.sendLog("recordFilterConfirm",(0,a._)({sub_tab_name:d},t))},$=async()=>{if(L(!0),M(!1),tG.sendLog("clearAllRecord",{}),d===tB.VIDEO)return await (0,aP.N1)({});if(d===tB.VS)return await (0,aP.tp)();if(d===tB.USER)return await (0,aP.fl)();else if(d===tB.Live)return await (0,aP.tI)()},K=()=>{L(!0),d===tB.VIDEO||d===tB.VS?(y(!1),M(!1),tG.sendLog("closeRecordClick",{}),(0,aP.Yi)({on:!1})):d===tB.USER?(k(!1),(0,aP.a3)({on:!1,field:"freq_visit_perm"})):d===tB.Live&&(S(!1),(0,aP.a3)({on:!1,field:"webcast_records"})),setTimeout(()=>b({type:"updateUserInfo"}),1e3)},Y=e=>{if(!!e)tG.sendLog("recordTabClick",{tab_name:e}),null==u||u(e),M(!1),L(!1),P({}),n9()};return(0,s.useMemo)(()=>(0,o.jsxs)("div",{className:f()(ot.descText,ot.fuFang,{[ot.ohosFuFang]:O}),children:[(0,o.jsx)("p",{children:"找不到内容?"}),(0,o.jsx)("p",{children:"1.某些内容格式电脑端暂不支持查看,请在 APP 查看"}),(0,o.jsx)("p",{children:"2.某些内容因作者删除或设置私密,暂时无法查看"})]}),[]),(0,s.useEffect)(()=>{if("record"===l)!Object.values(tB).includes(d)&&(null==u||u(tB.VIDEO))},[d,l]),(0,s.useEffect)(()=>{k(null==m?void 0:m.freqVisitPerm),S(null==m?void 0:m.webcastRecords)},[m]),(0,s.useEffect)(()=>{let e=(0,la.V)();e&&(0,iq.X)({top:0},e)},[d]),(0,s.useEffect)(()=>{(async()=>{if((0,em.DT)()&&window.TTE_ENV){let e=await aD.invoke("GET_CHANNEL_ID");(null==e?void 0:e.data)==="30033"&&_(!0)}else(0,W.CY)("xigua_webid")&&_(!0)})()},[]),(0,o.jsxs)("div",{className:ot.record,children:[(0,o.jsx)(iJ,{headerHeight:44,topNavHeight:r,children:(0,o.jsxs)("div",{className:ot.header,children:[(0,o.jsxs)(D.Tabs,{type:"button",className:ot.tabs,activeKey:d,onChange:e=>Y(e),children:[(0,o.jsx)(D.TabPane,{tab:(0,o.jsx)("span",{className:ot.title,children:"用户"}),itemKey:tB.USER}),(0,o.jsx)(D.TabPane,{tab:(0,o.jsx)("span",{className:ot.title,children:"视频"}),itemKey:tB.VIDEO}),!((null==n?void 0:n.isMas)||(0,em.xo)())&&(0,o.jsx)(D.TabPane,{itemKey:tB.VS,tab:(0,o.jsx)("span",{className:ot.title,children:"影视综"})}),(0,o.jsx)(D.TabPane,{tab:(0,o.jsx)("span",{className:ot.title,children:"直播"}),itemKey:tB.Live})]}),(0,o.jsxs)("div",{className:ot.setting,children:[d===tB.VIDEO&&h&&(0,o.jsxs)(o.Fragment,{children:[p,(0,o.jsx)(D.Divider,{layout:"vertical",margin:"12px",className:ot.divider})]}),z&&T&&d===tB.VIDEO&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(om,{popcorn:C,text:"观看历史支持筛选啦"}),(0,o.jsx)(ou,{className:ot.videoFilterBtn,value:R,onChange:Z,subTab:d,onRef:w,disabled:A}),(0,o.jsx)(D.Divider,{layout:"vertical",margin:"12px",className:ot.divider})]}),(T||z)&&(0,o.jsxs)("div",{className:ot.cleanNew,children:[(0,o.jsx)(ew.z,{svg:(0,o.jsx)(aM.Z,{}),className:ot.iconSvg}),(0,o.jsxs)("div",{className:f()(ot.cleanPannel,{[ot.ohosCleanPannel]:O}),children:[T&&(0,o.jsx)("div",{className:ot.button,onClick:()=>{(0,tJ.Z)({title:oh[d]||"确认要清空观看历史?",cancelBtnText:"取消",confirmBtnText:"清空",onConfirm:async()=>{$()},otherProps:{renderContent:()=>(0,o.jsx)("div",{className:ot.comfirmText,children:"清空后不可恢复"})}})},children:of[d]||"清空观看历史"}),z&&(0,o.jsx)("div",{className:ot.button,onClick:()=>{(0,tJ.Z)({title:op[d]||"是否要关闭观看历史功能?",cancelBtnText:"取消",confirmBtnText:"关闭",onConfirm:async()=>{K()},otherProps:{renderContent:()=>(0,o.jsx)("div",{className:ot.comfirmText,children:"关闭后将同时清空所有观看历史"})}})},children:"清空并关闭功能"})]})]})]})]})}),(0,o.jsxs)("div",{className:ot.list,children:[!z&&(0,o.jsxs)("div",{className:ot.error,children:[(0,o.jsx)(V.H,{className:ot.empty,icon:(0,o.jsx)(aR.Z,{}),title:"历史记录已关闭",needRenderIconInSSR:!0,desc:"开启后可以查看在电脑端和手机端浏览过的内容"}),(0,o.jsx)(aT.zx,{onClick:()=>{d===tB.VIDEO||d===tB.VS?(y(!0),tG.sendLog("openRecordClick",{}),(0,aP.Yi)({on:!0})):d===tB.USER?(k(!0),(0,aP.a3)({on:!0,field:"freq_visit_perm"})):d===tB.Live&&(S(!0),(0,aP.a3)({on:!0,field:"webcast_records"})),setTimeout(()=>b({type:"updateUserInfo"}),1e3)},className:ot.openButton,children:"开启功能"})]}),z&&E&&(0,o.jsx)("div",{className:ot.error,children:(0,o.jsx)(V.H,{className:ot.empty,needRenderIconInSSR:!0,icon:(0,o.jsx)(aR.Z,{}),title:og[d]||"暂无历史记录"})}),(0,o.jsx)(ap,{currentSubTab:d,cacheEnabled:H,tabs:[{key:tB.USER,children:(0,o.jsx)(a9,{setHasClean:M,tab:"record",currentTab:l,topNavHeight:r}),visible:z&&!E},{key:tB.VIDEO,children:(0,o.jsx)(aV,{ref:U,tab:"record",currentTab:l,setHasClean:M,userInfo:i,topNavHeight:r}),visible:z&&!E},{key:tB.VS,children:(0,o.jsx)(aX,{tab:"record",currentTab:l,setHasClean:M}),visible:z&&!E},{key:tB.Live,children:(0,o.jsx)(oe,{tab:"record",currentTab:l,setHasClean:M,topNavHeight:r}),visible:z&&!E}]})]})]})},ox=l("161397"),oC=l("442379");let ow=()=>{var e;return null!==(e=(0,s.useContext)(G))&&void 0!==e?e:{}};var ob={header:"sU3T5O8W",headerRight:"hK3fmH43",headerBg:"C12s6gze",container:"_KaPIrez",errorContent:"piT6IqrM",removeButton:"o9mcbWP4",empty:"Layk7ejl",icon:"FykIn1M_",iconSvg:"JYUT7j9A"};let oI=(0,s.forwardRef)((e,t)=>(0,o.jsx)("svg",(0,R._)((0,a._)({width:32,height:32,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,o.jsx)("path",{d:"M21.102 17.505A1 1 0 0 1 22 18.5v2h2a1 1 0 1 1 0 2h-2v2l-.005.102a1 1 0 0 1-.893.893L21 25.5a1 1 0 0 1-1-1v-2h-2a1 1 0 1 1 0-2h2v-2a1 1 0 0 1 1-1l.102.005zM13 20.5a1 1 0 1 1 0 2H8a1 1 0 1 1 0-2h5zM24 14a1 1 0 0 1 0 2H8a1 1 0 1 1 0-2h16zm0-6a1 1 0 0 1 0 2H8a1 1 0 0 1 0-2h16z",fill:"#fff"})})));var oy=()=>(0,o.jsx)(V.H,{className:ob.empty,icon:(0,o.jsx)(lq.Z,{}),title:"暂未添加稍后再看视频",desc:(0,o.jsxs)(o.Fragment,{children:["可在视频底部或预览时点击【",(0,o.jsx)(oI,{className:ob.icon}),"】添加"]})}),oj=e=>{let{userInfo:t,currentTab:l,topNavHeight:n=60,abTestData:r,isListSelectable:i,setIsListSelectable:d}=e,u=(0,nl.o)(null==t?void 0:t.secUid),{isSelf:v}=ow(),m=(0,s.useRef)(0),[h,p]=(0,s.useState)([]),g=(0,s.useRef)(!0),_=(0,s.useRef)(0);(0,c.C)(x.w3.components.watch_later);let w=(0,s.useRef)(),{doIncrementalUpdate:b}=ac({getExistingList:()=>{var e,t;return(null===(t=w.current)||void 0===t?void 0:null===(e=t.getDataList)||void 0===e?void 0:e.call(t))||[]},fetchData:async e=>{var t;let l=await n1.be.request({cached:!1,consume:!0,params:{cursor:e}});return{data:l.data||[],maxCursor:l.cursor||0,hasMore:null!==(t=l.hasMore)&&void 0!==t?t:0,statusCode:l.statusCode}},setDataList:e=>{var t,l;null===(l=w.current)||void 0===l||null===(t=l.setScrollData)||void 0===t||t.call(l,{dataList:e}),p(e)}});r1(b,[u]);let I=(0,s.useCallback)(async()=>{let e=v&&(null==g?void 0:g.current)&&n1.be.hasCache;iL.z.markStart("watch_later_fetch_data",{once:!0});let{data:t=[],cursor:l=0,hasMore:n,statusCode:r,logPb:i}=await n1.be.request({cached:e,consume:!0,params:{cursor:m.current},fetcherOptions:{expired:12e5,resetExpiredCacheBefore:!1,hoverDelay:!1}});return iL.z.markEnd("watch_later_fetch_data",{once:!0}),!r&&(e?setTimeout(()=>{var e,t;null===(t=w.current)||void 0===t||null===(e=t.loadMoreData)||void 0===e||e.call(t)},200):(_.current=m.current,m.current=l)),g.current=!1,{data:t,maxCursor:e?0:l,hasMore:e?1:n,statusCode:e?0:r,logPb:i,clearBefore:!e&&0===_.current}},[u,r,v]),y=(0,s.useMemo)(()=>v?(0,o.jsx)(oy,{}):void 0,[v]),[j,k]=(0,s.useState)((null==h?void 0:h.length)>0);(0,s.useEffect)(()=>{var e;k((null==h?void 0:h.length)>0);let{store:t={}}=C.Le.getConfig(C.gI.WatchLater)||{},l=(null==h?void 0:null===(e=h.map)||void 0===e?void 0:e.call(h,e=>e.awemeId))||[],n=null==l?void 0:l.join(",");C.Le.setConfig(C.gI.WatchLater,{store:t,list:n})},[h]);let N=(0,s.useCallback)(()=>{m.current=0},[]),S=(0,s.useCallback)(()=>{var e,t,l,n;null==w||null===(t=w.current)||void 0===t||null===(e=t.reset)||void 0===e||e.call(t),N(),null==w||null===(n=w.current)||void 0===n||null===(l=n.reload)||void 0===l||l.call(n)},[N]),{isPostDelete:E}=(0,s.useContext)(li);(0,s.useEffect)(()=>{E&&S()},[E,S]);let L=(0,s.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t={},l=[];return e.forEach(e=>{l.push(e.awemeId),t[e.awemeId]=(0,iW.I)(e.awemeType)}),(0,oC.iH)({awemeIds:l,remove_type:oC.L7.selectItems})},[]),T=function(e){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if((null==r?void 0:r.jxWatchLaterPip)&&v&&(null==t?void 0:t.uid)){let n=(0,ip.$o)(ig.LocalStorageKeys.watchLaterPipNewAddList)||{},r=n[null==t?void 0:t.uid]||[];n[null==t?void 0:t.uid]=(null==l?void 0:l.length)>0?r.filter(e=>{var t,n;return!(null==l?void 0:null===(n=l.map)||void 0===n?void 0:null===(t=n.call(l,e=>e.awemeId))||void 0===t?void 0:t.includes(e))}):[],(0,ip.qQ)(ig.LocalStorageKeys.watchLaterPipNewAddList,n),$.emit($.EVENT.resetWatchLaterPipData,{type:e,selectedItems:l})}},M=lb({maxSelectedCount:50,operate:L,operateDesc:{operation:"取消",itemName:"稍后再看的作品"},tabName:"watch_later",subTabName:"video",iconName:"取消稍后再看",isListSelectable:i,setIsListSelectable:d,onManageEndCallback:e=>{let{selectedItems:t}=e;T("selected",t)}}),{changeShowConfirm:R,renderConfirmModal:D,selectedCount:P}=M,A=()=>{tG.sendLog("manageDeleteClick",{tab_name:"watch_later",sub_tab_name:"video",icon_name:"移除已看完视频"}),(0,tJ.Z)({title:"是否确认取消已看完的作品,取消后不可恢复",cancelBtnText:"暂不取消",confirmBtnText:"确认取消",onConfirm:async()=>{lC.sendLog("managePopupConfirm",{tab_name:"watch_later",sub_tab_name:"video",icon_name:"移除已看完视频"});let{isSuccess:e,removedNum:t}=await (0,oC.iH)({awemeIds:[],remove_type:oC.L7.viewedItems});if(!e){ei.F.info("服务异常,请稍后再试");return}if(0===t){ei.F.info("无已看完作品");return}ei.F.info("取消成功"),T("seen"),S()}})};return((0,s.useEffect)(()=>{var e;let t=(null===(e=C.Le.getConfig(C.gI.WatchLater))||void 0===e?void 0:e.list)||"";return C.Le.setConfig(C.gI.WatchLater,{store:{},list:t}),()=>{var e;let t=(null===(e=C.Le.getConfig(C.gI.WatchLater))||void 0===e?void 0:e.list)||"";C.Le.setConfig(C.gI.WatchLater,{store:null,list:t})}},[]),v)?(0,o.jsxs)(ly.Provider,{value:(0,a._)({},M),children:[(0,o.jsxs)("div",{className:ob.container,"data-e2e":"user-watchlater-tab",children:[v&&(0,o.jsx)(iJ,{headerHeight:i?72:44,topNavHeight:n,children:(0,o.jsxs)("div",{className:f()(ob.header,{[ob.headerBg]:i}),children:[i?(0,o.jsx)(i7,{currentSubTab:"video",currentTab:l,selectedText:"稍后再看的作品",operateBtns:[{key:"watch_later",actionText:"取消稍后再看",onClick:()=>{R(!0),U.logInstance.sendLog("functionIconClick",{tab_name:"watch_later",sub_tab_name:"video",item_cnt:P,function_name:"watch_later_cancel"})}}]}):(0,o.jsx)("div",{}),(0,o.jsx)("div",{className:ob.headerRight,children:!i&&j&&(0,o.jsxs)("div",{className:ob.removeButton,onClick:e=>{A()},children:[(0,o.jsx)(ew.z,{svg:(0,o.jsx)(ox.Z,{}),className:ob.iconSvg}),"移除已看完的视频"]})})]})}),(0,o.jsx)(iN,{ref:w,resetStatusFunc:N,uid:u,tab:"watch_later",currentTab:l,fetchMoreData:I,retryTimes:5,panelNoData:y,updateAwemeList:p,topNavHeight:n})]}),null==D?void 0:D()]}):(0,o.jsx)(V.H,{icon:(0,o.jsx)(H.Z,{}),title:"内容不可见",desc:"内容不可见",className:ob.errorContent})};l("240148");var ok=l("687581"),oN=l("494729");let{COMMON_SEARCH_PARAMS:oS}=lX,oE={search_channel:"aweme_video_web",search_source:"normal_search",search_scene:"douyin_search",sort_type:0,publish_time:0,is_filter_search:0,query_correct_type:1};var oL={Home:"aweme_personal_home_video",Favorite:"aweme_favorite_video",Collect:"aweme_collect_video",Viewed:"aweme_viewed_video"};let oT=e=>{let{aweme_list:t,global_doodle_config:l,cursor:n,has_more:r,status_code:i,log_pb:a}=e;return{data:(0,lQ.TN)({awemeList:t.map(e=>e.item)||[]}),globalDoodleConfig:{homeText:null==l?void 0:l.home_text,jumpGeneral:null==l?void 0:l.jump_general,keyword:null==l?void 0:l.keyword},cursor:n,hasMore:r,statusCode:i,logId:null==a?void 0:a.impr_id}};async function oM(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,{keyword:l="",search_id:n="",offset:r=0,count:i=10,enable_history:o,search_channel:s=oE.search_channel,from_user:d}=e,{result:u}=await (0,oN.g8)("/aweme/v1/web/home/search/item/",(0,R._)((0,a._)({},oS,oE),{keyword:l,enable_history:o,search_id:n,offset:r,count:i,search_channel:s,from_user:d}),t,oT);return u}let oR=e=>{switch(e){case"post":default:return oL.Home;case"like":return oL.Favorite;case"favorite_collection":return oL.Collect;case"record":return oL.Viewed}},oD=e=>{switch(e){case"like":return"like_result";case"post":return"post_result";case"favorite_collection":return"favorite_collection";case"record":return"record_card";default:return"watch_later"}},oP=e=>{let{currentTab:t,uid:l,isSelf:n,showSearchBar:r,abTestData:i,onChangeKeyword:a}=e,o="",{userInfo:{isLogin:d,info:u}}=(0,eH.useUserInfoContext)()||{userInfo:{}},[c,v]=(0,s.useState)(""),[m,f]=(0,s.useState)(""),h=(0,s.useRef)(0),p=(0,s.useRef)(""),g=(0,s.useRef)(10),_=(0,s.useRef)(!1),x=(0,s.useRef)(""),C=(0,s.useRef)(0),w=(0,s.useRef)(0),b=(0,s.useRef)(!1),I=(0,s.useRef)(0),y=(0,s.useRef)(0),j=(0,s.useCallback)(e=>{tG.sendLog("search",{enter_from:(0,Z.yW)(),tab_name:oD(t),search_keyword:p.current,is_success:b.current?1:0,duration:w.current-C.current,impr_id:e})},[t]),k=(0,s.useCallback)(e=>{ok.oe.event.error({name:ok.Mo.UserSearchReturnCountLess,report:{keyword:p.current,tabName:t,userId:l,logId:e}})},[t,l]),N=(0,s.useCallback)(async()=>{if(!!l&&!_.current){p.current!==x.current&&(x.current=p.current,h.current=0),_.current=!0;try{C.current=performance.now();let e=await oM({search_channel:oR(t),from_user:l,search_id:o,enable_history:Number(null==u?void 0:u.viewHistoryPermission),keyword:p.current,offset:h.current,count:g.current});w.current=performance.now();let{statusCode:n,cursor:r,globalDoodleConfig:i,data:a,hasMore:s,logId:c}=e||{};if(0===n){let e=a.length,t=0===e&&0===s,l=0===h.current;if(o=c,t||(b.current=!0),h.current=r,y.current+=e,v(e=>{if(!l)return e;{let e=(null==i?void 0:i.homeText)||"";return t||(I.current=Number(e.match(/\d+/))),t?"":e}}),!s){let e=y.current===I.current;d&&!e&&k(c)}}return _.current=!1,j(c),e}catch(e){_.current=!1;return}}},[t,l,j,k,d]),S=(0,s.useCallback)(()=>{h.current=0,I.current=0,y.current=0,p.current="",x.current="",f(""),v("")},[]),E=(0,s.useCallback)(e=>{p.current=e,I.current=0,y.current=0,f(e),null==a||a()},[]);return{keyword:m,homeText:c,getSearchRes:N,exitSearch:S,changeKeyword:E,isAllowSearch:(0,s.useMemo)(()=>(n?["like","post","favorite_collection","record"]:["post"]).includes(t)&&r,[n,t,r])}},oA=(0,s.forwardRef)((e,t)=>(0,o.jsx)("svg",(0,R._)((0,a._)({width:16,height:16,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14zm2.776-3.48a.746.746 0 0 0 .527-1.272L9.02 7.965l2.283-2.283a.746.746 0 0 0-1.054-1.054L7.966 6.91 5.682 4.628a.746.746 0 1 0-1.054 1.054l2.283 2.284-2.283 2.283a.747.747 0 0 0 .526 1.278.746.746 0 0 0 .528-.224L7.966 9.02l2.283 2.283c.14.14.33.218.527.218z",fill:"#fff"})}))),oF=(0,s.forwardRef)((e,t)=>(0,o.jsx)("svg",(0,R._)((0,a._)({width:16,height:16,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,o.jsx)("path",{d:"M10.604 11.547a5.333 5.333 0 1 1 .943-.943l2.258 2.258a.667.667 0 1 1-.943.943l-2.258-2.258zm.73-4.214a4 4 0 1 0-8 0 4 4 0 0 0 8 0z",fill:"#fff"})})));var oB={container:"lSerC07g",new:"Jtx8rYsk",blurStyle:"Disq5oac",searchIcon:"MzsteXR3",closeIcon:"jiGAEqGJ",active:"FY1XuzxA",hasValue:"OEKbRpGT",input:"T8xy9wSH",hide:"dhHtn6GF",isListSelectable:"haxHDgWq"};let oU=(e,t)=>{if(!e)return"搜索 Ta 的作品";if("post"===t)return"搜索你发布的作品";if("like"===t)return"搜索你赞过的作品";else if("favorite_collection"===t)return"搜索你收藏的作品";else if("record"===t)return"搜索你观看的作品";else return""},oV=e=>{var t;let{changeKeyword:l,exitSearch:n,keyword:r,currentTab:i,isListSelectable:a=!1}=e,{isSelf:d}=null!==(t=(0,s.useContext)(G))&&void 0!==t?t:{},[u,c]=(0,s.useState)(!1),[v,m]=(0,s.useState)(r),h=(0,s.useRef)(null),p=(0,s.useCallback)(()=>{let{value:e=""}=h.current||{};e?l(e):n(),(0,iq.X)({top:172,behavior:"smooth"},(0,la.V)())},[l,n]);(0,s.useEffect)(()=>{let e=h.current,t=t=>{"Enter"===t.key&&(null==e||e.blur(),p())};return null==e||e.addEventListener("keydown",t),()=>{null==e||e.removeEventListener("keydown",t)}},[p]),(0,s.useEffect)(()=>{if(""!==r)return;let e=h.current;e&&(e.value=r,m(r))},[r]);let[g,_]=(0,s.useState)(!1),x=(0,s.useRef)(null),C=e=>{clearTimeout(x.current),x.current=setTimeout(()=>{_(e)},300)},w=u||g;return(0,o.jsx)("div",{className:f()(oB.container,oB.new,{[oB.active]:w,[oB.hasValue]:null==v?void 0:v.length,[oB.isListSelectable]:a}),onMouseEnter:()=>C(!0),onMouseLeave:()=>C(!1),children:(0,o.jsxs)(o.Fragment,{children:[!w&&""===v&&(0,o.jsxs)("div",{className:oB.blurStyle,children:[(0,o.jsx)(F.Z,{className:oB.searchIcon,src:oF,viewBox:"0 0 16 16"}),(0,o.jsx)("span",{children:oU(d,i)})]}),(w||""!==v)&&(0,o.jsx)(F.Z,{className:oB.searchIcon,src:oF,viewBox:"0 0 16 16",onClick:p}),(0,o.jsx)(D.Input,{ref:h,value:v,className:f()(oB.input,{[oB.hide]:!w&&""===v}),onFocus:()=>{c(!0),tG.sendLog("enterSearch",{enter_from:(0,Z.yW)(),tab_name:"post"===i?"post_result":"like_result"})},onBlur:()=>c(!1),onChange:e=>m(e),placeholder:oU(d,i)}),""!==v&&(0,o.jsx)(F.Z,{className:oB.closeIcon,src:oA,viewBox:"0 0 16 16",onClick:()=>{l(""),m(""),n();let e=h.current;e&&(e.value=""),null==e||e.focus()}})]})})};var oO=l("409250"),oH="YBryIOkr",oz="g6oSVgEV",oZ="cNOJubw_",oW="nkDUuoSX";let o$=e=>{let{currentNumber:t,setCurrentNumber:l,awemeInfoList:n,setAwemeInfoList:r,mixInfo:i,close:o,refNextVideoCallBack:d}=e,{watchedEpisode:u,totalEpisode:c}=i||{},v=(0,s.useRef)({cursor:Math.max(Number(u>c?c:null!=u?u:0)-1,0),hasMore:1,statusCode:-1,lastMixVideoIndex:-1}),m=(0,s.useRef)(!1);return(0,s.useEffect)(()=>{let e=!1;return(async()=>{var t,n,s,d,u;m.current=!0;let c=await (0,lG.FF)({mixId:null==i?void 0:i.mixId,cursor:null===(t=v.current)||void 0===t?void 0:t.cursor,count:20});if(m.current=!1,(null!==(s=null==c?void 0:null===(n=c.data)||void 0===n?void 0:n.length)&&void 0!==s?s:0)!==0){v.current={cursor:null==c?void 0:c.cursor,hasMore:null==c?void 0:c.hasMore,statusCode:null==c?void 0:c.statusCode,lastMixVideoIndex:(null==c?void 0:null===(d=c.data)||void 0===d?void 0:d.length)-1};let t=null==c?void 0:null===(u=c.data)||void 0===u?void 0:u.map(e=>{let{cover:t,status:l,playVV:n}=i||{};return e.mixInfo&&(e.mixInfo.cover=t,e.mixInfo.status=l,e.mixInfo.playVV=n),(0,a._)({},e)});if(e)return;r(t||[]),l(0)}else ei.F.info("该合集暂无法查看,请浏览其他内容"),o()})(),d.current=()=>ei.F.infoInModalVideo("暂无更多作品"),()=>{e=!0}},[i]),(0,s.useEffect)(()=>{5>Math.abs(Number(null==n?void 0:n.length)-t)&&-1!==t&&!m.current&&(async()=>{var e,t,l;if((null===(e=v.current)||void 0===e?void 0:e.hasMore)===1){m.current=!0;let e=await (0,lG.FF)({mixId:null==i?void 0:i.mixId,cursor:null===(t=v.current)||void 0===t?void 0:t.cursor,count:20});m.current=!1,v.current={cursor:null==e?void 0:e.cursor,hasMore:null==e?void 0:e.hasMore,statusCode:null==e?void 0:e.statusCode,lastMixVideoIndex:(null==n?void 0:n.length)+(null==e?void 0:null===(l=e.data)||void 0===l?void 0:l.length)-1},r(t=>[...t,...(null==e?void 0:e.data)||[]])}})()},[n,t,i]),null};var oK={item:"uUM99GKx",cover:"AstiF77P",payTag:"B1auRhHI",image:"CmLVjJjf",content:"_0EoPbxbz",title:"TaD5oaTw",name:"iZr1iZyA",singleLine:"OkKJMsMr",updatedTag:"PBePUf0x",count:"GekX5T7I",episode:"Is2zmOX6"},oY=e=>{var t,l,n;let{info:r,rank:i,userInfo:a,currentTab:d,abTestData:u}=e,[c,v]=(0,nj.Z)(),[m,h]=(0,s.useState)(!1),[p,g]=(0,s.useState)(!0),_=(0,s.useRef)(null),x="favorite_collection"===d&&!!r.hasUpdatedEpisode&&p,C=x?((null==_?void 0:null===(t=_.current)||void 0===t?void 0:t.offsetWidth)||42)+4:0,w=(0,eq.$y)(null==r?void 0:r.mixId,1,`previous_page=${(0,Z.yW)()}`);return(0,s.useEffect)(()=>{if(v&&!m){if(h(!0),"favorite_collection"===d){U.logInstance.sendLog("compilationCoverShow",{enter_from:(0,Z.yW)(),tab_name:"favorite_collection",group_id:"",compilation_id:r.isSeries2Mix?r.seriesId:r.mixId});return}tG.sendLog("collectionCoverShow",{enter_from:(0,Z.yW)(),compilation_id:r.isSeries2Mix?r.seriesId:r.mixId,compilation_video_cnt:r.totalEpisode,author_id:a.uid,group_id:""})}},[v]),(0,o.jsx)(P.a,{href:w,title:r.mixName,target:"_blank",rel:"noopener noreferrer",onClick:e=>{if("favorite_collection"===d){U.logInstance.sendLog("compilationCoverClick",{enter_from:(0,Z.yW)(),tab_name:"favorite_collection",group_id:"",compilation_id:r.isSeries2Mix?r.seriesId:r.mixId}),g(!1);return}tG.sendLog("collectionCoverClick",{enter_from:(0,Z.yW)(),compilation_id:r.isSeries2Mix?r.seriesId:r.mixId,compilation_video_cnt:r.totalEpisode,author_id:a.uid,rank:i}),!r.totalEpisode&&(ei.F.info("创作者还没有为这个合集添加视频"),e.preventDefault())},children:(0,o.jsxs)("div",{className:oK.item,ref:c,children:[(0,o.jsxs)("div",{className:oK.cover,children:[(0,o.jsx)(nk.Q,{src:r.cover,alt:r.mixName,iconWidth:30,iconHeight:88,imgClass:oK.image}),((null==r?void 0:null===(l=r.chargeInfo)||void 0===l?void 0:l.chargeType)===1||(null==r?void 0:null===(n=r.chargeInfo)||void 0===n?void 0:n.chargeType)===3)&&(0,o.jsx)("div",{className:oK.payTag,children:"付费"})]}),(0,o.jsxs)("div",{className:oK.content,children:[(0,o.jsxs)("div",{className:f()(oK.title,oK.singleLine),children:[(0,o.jsx)("div",{className:oK.name,style:{maxWidth:`calc(100% - ${C}px)`},children:r.mixName}),x&&(0,o.jsxs)("span",{ref:_,className:oK.updatedTag,children:["更新",r.hasUpdatedEpisode,"集"]})]}),(0,o.jsxs)("p",{className:oK.count,children:[(0,ef.qe)(r.playVV)," 播放"]}),(0,o.jsxs)("p",{className:oK.episode,children:[(0,o.jsxs)("span",{children:["更新至 ",r.totalEpisode," 集"]}),!!r.watchedEpisode&&(0,o.jsxs)("span",{children:["(上次看到 ",r.watchedEpisode," 集)"]})]})]})]})})};let oG=e=>e.mixId;var oq=e=>{var t,l,n,r;let{userInfo:i,topNavHeight:d=60,setItemCount:u,abTestData:c}=e,v=(0,nl.o)(null==i?void 0:i.secUid),{isSelf:m,updateFollowStatus:f}=(0,s.useContext)(G)||{},h=(0,eH.useUserInfoContext)()||{},p=(0,K._)()||{},g=(0,s.useRef)(0),_=(0,s.useRef)(1),[x,C]=(0,s.useState)(),[w,b]=(0,s.useState)([]);(0,s.useEffect)(()=>{var e;null==u||u(null!==(e=null==w?void 0:w.length)&&void 0!==e?e:0)},[null==w?void 0:w.length,u]);let I=(0,s.useCallback)(async()=>{let{data:e,cursor:t,hasMore:l,statusCode:n}=await (0,ry.bZ)({cursor:g.current,count:12});return 0===n&&(g.current=t,_.current=l),{data:e,cursor:t,hasMore:l,statusCode:n}},[]),y=(0,s.useCallback)((e,t)=>(0,o.jsx)("div",{onClick:t=>{t.preventDefault();let l=e;(async()=>{var t,n,r,o,s;let d=await ((null==e?void 0:e.isSeries2Mix)?(0,lY.l3)({seriesId:null==e?void 0:e.mixId}):(0,lG.vf)({mixId:null==e?void 0:e.mixId}));(null==(l=(0,R._)((0,a._)({},((null==e?void 0:e.isSeries2Mix)?null==d?void 0:d.seriesInfo:null==d?void 0:d.mixInfo)||{}),{watchedEpisode:null==l?void 0:l.watchedEpisode,watchedItem:null==l?void 0:l.watchedItem}))?void 0:l.totalEpisode)===0||(null==l?void 0:null===(t=l.author)||void 0===t?void 0:t.isBlockedV2)||(null==l?void 0:null===(n=l.author)||void 0===n?void 0:n.userNotSee)||(null==l?void 0:null===(r=l.author)||void 0===r?void 0:r.secret)&&((null==l?!void 0:null===(o=l.author)||void 0===o?!void 0:!o.secret)||(null==l?void 0:null===(s=l.author)||void 0===s?void 0:s.uid)!==i.uid)?ei.F.info("该合集为空,请浏览其他内容"):C(l)})()},children:(0,o.jsx)(oY,{info:e,rank:t,userInfo:i,currentTab:"favorite_collection",abTestData:c})}),[i]),j=(0,s.useRef)(),k=nb(),N=null===(l=j.current)||void 0===l?void 0:null===(t=l.getDataList)||void 0===t?void 0:t.call(l),S=(0,s.useRef)({borderRadius:"6px"}),{withMask:E}=nI((0,R._)((0,a._)({maskShadowStyle:S.current,getItemId:oG,dataList:N,isSupportMulti:!0},k),{firstItem:null===(r=j.current)||void 0===r?void 0:null===(n=r.getTargetNode)||void 0===n?void 0:n.call(r,0),getColumnCount:()=>3,stickyArea:{top:d+58+72,bottom:0,left:0,right:0},itemMargin:{top:0,bottom:16,left:0,right:16}})),L=(0,s.useCallback)(()=>{g.current=0},[]);ii({resetStatusFunc:L,scrollListRef:j,scrollElementRef:k.scrollEleRef});let{reloadForPostDelete:T,isPostDelete:M}=(0,s.useContext)(li),D=(0,s.useCallback)(()=>{var e,t,l,n,r;null==j||null===(t=j.current)||void 0===t||null===(e=t.reset)||void 0===e||e.call(t),null==L||L(),null===(l=k.scrollEleRef.current)||void 0===l||l.scrollTo({top:0}),null==j||null===(r=j.current)||void 0===r||null===(n=r.reload)||void 0===n||n.call(r)},[L]);(0,s.useEffect)(()=>{M&&(null==D||D())},[M,D]);let P=(0,nn.m)();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:oH,children:(0,o.jsx)(lA.Z,{ref:j,scrollContainerEl:P,skeletonNum:0,defaultDataList:[],defaultHasMoreFlag:_.current,renderItem:y,fetchMoreData:I,containerClassName:oz,itemClassName:oZ,panelNoData:(0,o.jsx)(V.H,{className:oW,icon:(0,o.jsx)(lq.Z,{}),title:"暂无内容",desc:"暂时还没有收藏过合集内容哦"}),withMask:E,setDataList:b})}),x&&(0,o.jsx)(lN.default,(0,a._)({modalEnterFrom:lS.a.UserCollectionMix,isActive:!0,userContext:h,abtestData:p,close:()=>{C(void 0),f(),null==T||T(),null==D||D()},uid:v,notCanMixListen:!0,moreBoxShowList:{notInterestingIcon:!1,unfollow:!0,report:!0,deleteSelfPost:m},logParams:{enter_from_merge:m?"personal_homepage":"others_homepage",tab_name:"favorite_collection",enter_method:(0,W.Rs)("enter_method"),sub_tab_name:"compilation"},shortCutFilteredList:[],isDefaultShowRelatedCard:!1},x.isSeries2Mix?{modalInnerFeedCard:"series",seriesInfo:x,awemeSeriesInfo:x,anyHooks:rQ.w,defaultForceOpenTab:aQ.L.Series}:{modalInnerFeedCard:"mix",mixInfo:x,awemeMixInfo:x,anyHooks:o$,defaultForceOpenTab:aQ.L.Mix}))]})},oX="yaY7mXK7",oQ="d9rmlz9X",oJ="h1GquUyN",o0="P7Yv5_mr",o1={item:"bA0q2Urb",cover:"ZD_zt2Be",payTag:"UWFkh87f",image:"VQixlxic",content:"d3oyACe7",name:"qnGzmKR4",count:"VYrgRaXO",episode:"HetnGY8h",unreadMixCount:"I8SWg9DE"},o2=e=>{var t,l;let{info:n,rank:r,userInfo:i,currentTab:a}=e,[d,u]=(0,nj.Z)(),[c,v]=(0,s.useState)(!1),[m,f]=(0,s.useState)(!0),h=(0,eq.$y)(null==n?void 0:n.seriesId,1,`previous_page=${(0,Z.yW)()}`);return(0,s.useEffect)(()=>{if(u&&!c){if(v(!0),"favorite_collection"===a){U.logInstance.sendLog("compilationCoverShow",{enter_from:(0,Z.yW)(),tab_name:"favorite_collection",group_id:"",compilation_id:n.seriesId});return}tG.sendLog("collectionCoverShow",{enter_from:(0,Z.yW)(),compilation_id:n.seriesId,compilation_video_cnt:n.totalEpisode,author_id:i.uid,group_id:""})}},[u]),(0,o.jsx)(P.a,{href:h,title:n.seriesName,target:"_blank",rel:"noopener noreferrer",onClick:e=>{if("favorite_collection"===a){U.logInstance.sendLog("compilationCoverClick",{enter_from:(0,Z.yW)(),tab_name:"favorite_collection",group_id:"",compilation_id:n.seriesId}),f(!1);return}tG.sendLog("collectionCoverClick",{enter_from:(0,Z.yW)(),compilation_id:n.seriesId,compilation_video_cnt:n.totalEpisode,author_id:i.uid,rank:r}),!n.totalEpisode&&(ei.F.info("创作者还没有为这个短剧添加视频"),e.preventDefault())},children:(0,o.jsxs)("div",{className:o1.item,ref:d,children:[(0,o.jsxs)("div",{className:o1.cover,children:[(0,o.jsx)(nk.Q,{src:n.cover,alt:n.seriesName,iconWidth:30,iconHeight:88,imgClass:o1.image}),((null==n?void 0:null===(t=n.chargeInfo)||void 0===t?void 0:t.chargeType)===1||(null==n?void 0:null===(l=n.chargeInfo)||void 0===l?void 0:l.chargeType)===3)&&(0,o.jsx)("div",{className:o1.payTag,children:"付费"})]}),(0,o.jsxs)("div",{className:o1.content,children:[(0,o.jsx)("div",{className:o1.name,children:n.seriesName}),(0,o.jsxs)("p",{className:o1.count,children:[(0,ef.qe)(n.playVV)," 播放"]}),(0,o.jsxs)("p",{className:o1.episode,children:[(0,o.jsxs)("span",{children:["更新至 ",n.totalEpisode," 集"]}),"favorite_collection"===a&&!!n.hasUpdatedEpisode&&m&&(0,o.jsxs)("span",{className:o1.unreadMixCount,children:["更新",n.hasUpdatedEpisode,"集"]})]})]})]})})};let o3=e=>e.seriesId;var o5=e=>{var t,l,n,r;let{userInfo:i,topNavHeight:d=60,setItemCount:u}=e,c=(0,nl.o)(null==i?void 0:i.secUid),{isSelf:v,updateFollowStatus:m}=(0,s.useContext)(G)||{},f=(0,eH.useUserInfoContext)()||{},h=(0,K._)()||{},p=(0,s.useRef)(0),g=(0,s.useRef)(1),[_,x]=(0,s.useState)(),[C,w]=(0,s.useState)([]);(0,s.useEffect)(()=>{var e;null==u||u(null!==(e=null==C?void 0:C.length)&&void 0!==e?e:0)},[null==C?void 0:C.length,u]);let b=(0,s.useCallback)(async()=>{let{data:e,cursor:t,hasMore:l,statusCode:n}=await (0,ry.DD)({cursor:p.current,count:12});return 0===n&&(p.current=t,g.current=l),{data:e,cursor:t,hasMore:l,statusCode:n}},[]),I=(0,s.useCallback)((e,t)=>(0,o.jsx)("div",{onClick:t=>{t.preventDefault();let l=e;(async()=>{var t,n,r,o,s;let d=await (0,lY.l3)({seriesId:null==e?void 0:e.seriesId});(null==(l=(0,R._)((0,a._)({},(null==d?void 0:d.seriesInfo)||{}),{watchedEpisode:null==l?void 0:l.watchedEpisode,watchedItem:null==l?void 0:l.watchedItem}))?void 0:l.totalEpisode)===0||(null==l?void 0:null===(t=l.author)||void 0===t?void 0:t.isBlockedV2)||(null==l?void 0:null===(n=l.author)||void 0===n?void 0:n.userNotSee)||(null==l?void 0:null===(r=l.author)||void 0===r?void 0:r.secret)&&((null==l?!void 0:null===(o=l.author)||void 0===o?!void 0:!o.secret)||(null==l?void 0:null===(s=l.author)||void 0===s?void 0:s.uid)!==i.uid)?ei.F.info("该短剧为空,请浏览其他内容"):x(l)})()},children:(0,o.jsx)(o2,{info:e,rank:t,userInfo:i,currentTab:"favorite_collection"})}),[i]),y=(0,s.useRef)(),j=nb(),k=null===(l=y.current)||void 0===l?void 0:null===(t=l.getDataList)||void 0===t?void 0:t.call(l),N=(0,s.useCallback)(()=>{p.current=0},[]);ii({resetStatusFunc:N,scrollListRef:y,scrollElementRef:j.scrollEleRef});let{reloadForPostDelete:S,isPostDelete:E}=(0,s.useContext)(li),L=(0,s.useCallback)(()=>{var e,t,l,n,r;null==y||null===(t=y.current)||void 0===t||null===(e=t.reset)||void 0===e||e.call(t),null==N||N(),null===(l=j.scrollEleRef.current)||void 0===l||l.scrollTo({top:0}),null==y||null===(r=y.current)||void 0===r||null===(n=r.reload)||void 0===n||n.call(r)},[N]);(0,s.useEffect)(()=>{E&&(null==L||L())},[E,L]);let T=(0,s.useRef)({borderRadius:"6px"}),{withMask:M}=nI((0,R._)((0,a._)({maskShadowStyle:T.current,getItemId:o3,dataList:k,isSupportMulti:!0},j),{firstItem:null===(r=y.current)||void 0===r?void 0:null===(n=r.getTargetNode)||void 0===n?void 0:n.call(r,0),getColumnCount:()=>3,stickyArea:{top:d+58+72,bottom:0,left:0,right:0},itemMargin:{top:0,bottom:16,left:0,right:16}})),D=(0,nn.m)();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:oX,children:(0,o.jsx)(lA.Z,{scrollContainerEl:D,ref:y,skeletonNum:0,defaultDataList:[],defaultHasMoreFlag:g.current,renderItem:I,fetchMoreData:b,containerClassName:oQ,itemClassName:oJ,panelNoData:(0,o.jsx)(V.H,{className:o0,icon:(0,o.jsx)(lq.Z,{}),title:"暂无内容",desc:"暂时还没有收藏过短剧内容哦"}),withMask:M,setDataList:w})}),_&&(0,o.jsx)(lN.default,{modalEnterFrom:lS.a.UserCollectionSeries,seriesInfo:_,userContext:f,abtestData:h,close:()=>{x(void 0),m(),null==S||S()},uid:c,awemeSeriesInfo:_,anyHooks:rQ.w,modalInnerFeedCard:"series",notCanMixListen:!0,moreBoxShowList:{notInterestingIcon:!1,unfollow:!0,report:!0,deleteSelfPost:v},logParams:{enter_from_merge:v?"personal_homepage":"others_homepage",enter_method:(0,W.Rs)("enter_method"),tab_name:"favorite_collection",sub_tab_name:"playlet"},shortCutFilteredList:[],isDefaultShowRelatedCard:!1,defaultForceOpenTab:aQ.L.Series})]})},o6=l("514023");let o4=(0,s.createContext)({});var o7={Loop:"loop",Order:"order",Random:"random"},o9="Oaq2edBw",o8="pnlFczYH",se="quQhKiDQ",st="ZzAsOJAX",sl=l("118616"),sn=l("182424");let sr=(0,s.forwardRef)((e,t)=>(0,o.jsx)("svg",(0,R._)((0,a._)({width:36,height:36,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 10.282C11 9.574 11.514 9 12.149 9h1.596c.634 0 1.149.574 1.149 1.282v15.436c0 .708-.515 1.282-1.15 1.282H12.15C11.514 27 11 26.426 11 25.718V10.282zm11 0C22 9.574 22.514 9 23.149 9h1.596c.634 0 1.149.574 1.149 1.282v15.436c0 .708-.515 1.282-1.15 1.282H23.15C22.514 27 22 26.426 22 25.718V10.282z",fill:"#0A0C20"})})));var si=l("540075"),sa=l("253262"),so="HFIw3Tb4",ss="s_OsPAh2",sd="vtRMSuNC",su="nyfZtiS4",sc="dfDeerS0",sv="iiRxMmKG",sm=new eU.h({musicCoverShow:{eventName:"music_cover_show",params:{music_id:""}},musicCoverClick:{eventName:"music_cover_click",params:{music_id:""}},musicMoreClick:{eventName:"music_more_click",params:{music_id:"",action:"cancel_favorite"}},clickAudioPlayMode:{eventName:"click_audio_play_mode",params:{auto_play_mode:""}},audioPlay:{eventName:"audio_play",params:{enter_from:"personal_homepage",music_id:"",is_visible:0,auto_play_mode:""}},audioOver:{eventName:"audio_over",params:{music_id:"",is_visible:0,duration:0,auto_play_mode:""}},audioError:{eventName:"audio_error",params:{music_id:"",error_msg:"",error_code:0,error_type:"",player_version:""}}});let sf=()=>na.F.info("取消成功"),sh=()=>na.F.info("操作失败,请稍后重试");var sp=e=>{let{musicId:t,removeCurrentMusic:l,pause:n}=e,{type:r,changeType:i}=(0,th.P)({delayDisappear:100}),a=(0,s.useCallback)(()=>{sf(),null==l||l(t)},[l,t]),{unCollect:d}=(0,sa.S)({musicId:t,disableSuccessToast:!0,isLogin:!0,success:a,fail:sh,clickMethod:"music_collection"});return(0,o.jsxs)("div",{className:so,onClick:e=>e.stopPropagation(),children:[(0,o.jsx)("div",{onMouseEnter:()=>{i("active")},onMouseLeave:()=>{i()},children:(0,o.jsx)(sl.Z,{height:24,width:24,viewBox:"2 2 32 32",src:si.Z,className:f()(ss,{[sd]:!!r})})}),(0,o.jsxs)("ul",{className:f()(su,{[sc]:!!r}),onMouseEnter:e=>{e.stopPropagation(),i("active")},onMouseLeave:e=>{e.stopPropagation(),i()},onClick:e=>i(),children:[(0,o.jsx)("li",{className:sv,onClick:e=>{var l;null==n||n(),sm.sendLog("musicMoreClick",{action:"use",music_id:t}),null===(l=window)||void 0===l||l.open(`https://creator.douyin.com/creator-micro/content/cloud-edit?music_id=${t}`,"_blank")},children:"去使用"}),(0,o.jsx)("li",{className:sv,onClick:()=>{sm.sendLog("musicMoreClick",{action:"cancel_favorite",music_id:t}),(0,tJ.Z)({title:"是否取消收藏该音乐?",cancelBtnText:"暂不取消",confirmBtnText:"确认",onConfirm:()=>new Promise(async e=>{null==n||n(),await d(),i(),e()}),onCancel(){i()}})},children:"取消收藏"})]})]})},sg={container:"OIOXG1C5",cover:"SRlgJOQ4",img:"CFVgP4TN",defaultCover:"ioPvGaH9",playStatusIcon:"dWQVA1Jn",loading:"e9FmAljg",detail:"iMt1_O9h",infoContainer:"rIbfc9pG",title:"ny8BLQ3T",author:"kfdw79bQ",player:"jjjGncca",mode:"y3bvLKFC",modeTip:"qyUYx3Yz",time:"_QZrNPNQ",playTime:"ecihcSPi",playedTime:"QaVEuXlM",more:"dDT8SkwG",playing:"kyHr9IOi"},s_=l("734123"),sx=l("390923"),sC=l("435132"),sw=l("480333");l("527553");var sb=l("358986");class sI extends s_.Plugin{static get pluginName(){return"customVolume"}static get defaultConfig(){return{position:sb.POSITIONS.CONTROLS_RIGHT,index:5,className:"xgplayer-row-volume",disable:!1,showValueLabel:!1,default:.6,miniVolume:.2}}afterCreate(){if(this._timerId=null,this._d={isStart:!1,isMoving:!1,isActive:!1},this.config.disable)return;let{commonStyle:e,volume:t}=this.playerConfig;(null==e?void 0:e.volumeColor)&&(this.find(".xgplayer-drag").style.backgroundColor=e.volumeColor),this.changeMutedHandler=this.hook("mutedChange",e=>{this.changeMuted(e)},{pre:e=>{e.preventDefault(),e.stopPropagation()}}),this._onMouseenterHandler=this.hook("mouseenter",this.onMouseenter),this._onMouseleaveHandler=this.hook("mouseleave",this.onMouseleave),"mobile"!==s_.Sniffer.device&&"mobile"!==this.playerConfig.isMobileSimulateMode&&(this.bind("mouseenter",this._onMouseenterHandler),this.bind(["blur","mouseleave"],this._onMouseleaveHandler),this.bind(".xgplayer-slider","mousedown",this.onBarMousedown),this.bind(".xgplayer-slider","mousemove",this.onBarMouseMove),this.bind(".xgplayer-slider","mouseup",this.onBarMouseUp)),this.bind(".xgplayer-icon",["click","touchend"],this.changeMutedHandler),this.on(s_.Events.VOLUME_CHANGE,this.onVolumeChange),this.once(s_.Events.LOADED_DATA,this.onVolumeChange),"Number"!==sb.Util.typeOf(t)&&(this.player.volume=this.config.default),this.onVolumeChange()}updateVolumePos(e,t){let{player:l}=this,n=this.find(".xgplayer-drag"),r=this.find(".xgplayer-bar");if(!r||!n)return;let i=parseInt(e/r.getBoundingClientRect().width*1e3,10);n.style.width=`${e}px`;let a=Math.max(Math.min(i/1e3,1),0),o={volume:{from:l.volume,to:a}};l.muted&&(o.muted={from:!0,to:!1}),this.emitUserAction(t,"change_volume",{muted:l.muted,volume:l.volume,props:o}),l.volume=Math.max(Math.min(i/1e3,1),0),l.muted&&(l.muted=!1),this.config.showValueLabel&&this.updateVolumeValue()}updateVolumeValue(){let{volume:e,muted:t}=this.player,l=this.find(".xgplayer-value-label"),n=Math.max(Math.min(e,1),0);l.innerText=t?0:Math.ceil(100*n)}focus(){let{player:e}=this;e.focus({autoHide:!1}),this._timerId&&(sb.Util.clearTimeout(this,this._timerId),this._timerId=null),sb.Util.addClass(this.root,"slide-show")}unFocus(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],l=arguments.length>2?arguments[2]:void 0,{_d:n,player:r}=this;if(!n.isActive)this._timerId&&(sb.Util.clearTimeout(this,this._timerId),this._timerId=null),this._timerId=sb.Util.setTimeout(this,()=>{!n.isActive&&(t?r.blur():r.focus(),sb.Util.removeClass(this.root,"slide-show"),n.isStart&&this.onBarMouseUp(l)),this._timerId=null},e)}changeMuted(e){e&&e.stopPropagation();let{player:t,_d:l}=this;l.isStart&&this.onBarMouseUp(e),this.emitUserAction(e,"change_muted",{muted:t.muted,volume:t.volume,props:{muted:{from:t.muted,to:!t.muted}}}),t.volume>0&&(t.muted=!t.muted),t.volume<.01&&(t.volume=this.config.miniVolume)}animate(e,t){e||0===t?this.setAttr("data-state","mute"):t<.5?this.setAttr("data-state","small"):this.setAttr("data-state","normal")}destroy(){this._timerId&&(sb.Util.clearTimeout(this,this._timerId),this._timerId=null),this.unbind("mouseenter",this.onMouseenter),this.unbind(["blur","mouseleave"],this.onMouseleave),this.unbind(".xgplayer-slider","mousedown",this.onBarMousedown),this.unbind(".xgplayer-slider","mousemove",this.onBarMouseMove),this.unbind(".xgplayer-slider","mouseup",this.onBarMouseUp),document.removeEventListener("mouseup",this.onBarMouseUp),this.unbind(".xgplayer-icon",["click","touchend"],this.changeMutedHandler)}render(){if(this.config.disable)return;let e=this.config.default||this.player.volume,t=this.config.showValueLabel;return`
<xg-icon class="xgplayer-row-volume" data-state="normal">
<div class="xgplayer-icon">
<svg class="xg-volume" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M5.25 10.4002C5.25 9.57173 5.92157 8.90015 6.75 8.90015H7.5L10.7699 6.17527C11.2584 5.76819 12 6.11556 12 6.75143V17.0489C12 17.6847 11.2584 18.0321 10.7699 17.625L7.5 14.9002H6.75C5.92157 14.9002 5.25 14.2286 5.25 13.4002V10.4002Z" fill="white"/>
<path d="M13.5 14.1502L13.5 9.65015C14.7426 9.65015 15.75 10.6575 15.75 11.9002C15.75 13.1428 14.7426 14.1502 13.5 14.1502Z" fill="white"/>
<path d="M18.9375 11.9001C18.9375 14.9843 16.5354 17.5074 13.5 17.7007L13.5 15.82C15.4987 15.6312 17.0625 13.9483 17.0625 11.9001C17.0625 9.85198 15.4987 8.16908 13.5 7.98024V6.09952C16.5354 6.2928 18.9375 8.81594 18.9375 11.9001Z" fill="white"/>
</svg>
<svg class="xg-volume-small" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6.75 9.00001C5.92157 9.00001 5.25 9.67158 5.25 10.5V13.5C5.25 14.3284 5.92157 15 6.75 15H7.5L10.7699 17.7249C11.2584 18.132 12 17.7846 12 17.1487V6.85129C12 6.21541 11.2584 5.86804 10.7699 6.27512L7.5 9.00001H6.75Z" fill="white"/>
<path d="M13.5 9.75001L13.5 14.25C14.7426 14.25 15.75 13.2426 15.75 12C15.75 10.7574 14.7426 9.75001 13.5 9.75001Z" fill="white"/>
<path opacity="0.3" fill-rule="evenodd" clip-rule="evenodd" d="M13.5 6.19934C16.5355 6.39255 18.9376 8.91572 18.9376 11.9999C18.9376 15.0842 16.5355 17.6073 13.5 17.8006V15.9198C15.4988 15.7311 17.0626 14.0481 17.0626 11.9999C17.0626 9.95176 15.4988 8.26882 13.5 8.08006V6.19934Z" fill="white" fill-opacity="0.9"/>
</svg>
<svg class="xg-volume-mute" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6.75 9.00001C5.92157 9.00001 5.25 9.67158 5.25 10.5V13.5C5.25 14.3284 5.92157 15 6.75 15H7.5L10.7699 17.7249C11.2584 18.132 12 17.7846 12 17.1487V6.85129C12 6.21541 11.2584 5.86804 10.7699 6.27512L7.5 9.00001H6.75Z" fill="white" fill-opacity="0.9"/>
<path d="M17.6255 15.3778L15.7515 13.1622L13.8775 15.3778L12.7504 14.391L14.7706 12.0024L12.75 9.61332L13.8771 8.62647L15.7515 10.8427L17.6259 8.62647L18.753 9.61332L16.7324 12.0024L18.7526 14.391L17.6255 15.3778Z" fill="white" fill-opacity="0.9"/>
</svg>
</div>
<xg-slider class="xgplayer-slider">
${t?`<div class="xgplayer-value-label">${100*e}</div>`:""}
<div class="xgplayer-bar">
<xg-drag class="xgplayer-drag" style="width: ${100*e}%"></xg-drag>
</div>
</xg-slider>
</xg-icon>`}constructor(...e){super(...e),(0,sw._)(this,"_timerId",void 0),(0,sw._)(this,"_d",void 0),(0,sw._)(this,"onBarMousedown",e=>{let{player:t}=this,l=this.find(".xgplayer-bar");sb.Util.event(e);let n=l.getBoundingClientRect(),r=sb.Util.getEventPos(e,t.zoom),i=n.right-r.clientX;if(r.w=i,r.barW=n.width,this.pos=r,!(i<-2))return this.updateVolumePos(i,e),document.addEventListener("mouseup",this.onBarMouseUp),this._d.isStart=!0,!1}),(0,sw._)(this,"onBarMouseMove",e=>{let{_d:t}=this;if(!t.isStart)return;let{pos:l,player:n}=this;e.preventDefault(),e.stopPropagation(),sb.Util.event(e);let r=sb.Util.getEventPos(e,n.zoom);t.isMoving=!0;let i=l.clientX-r.clientX+l.w;if(!(i>l.barW))this.updateVolumePos(i,e)}),(0,sw._)(this,"onBarMouseUp",e=>{sb.Util.event(e),document.removeEventListener("mouseup",this.onBarMouseUp);let{_d:t}=this;t.isStart=!1,t.isMoving=!1}),(0,sw._)(this,"onMouseenter",e=>{this._d.isActive=!0,this.focus(),this.emit("icon_mouseenter",{pluginName:this.pluginName})}),(0,sw._)(this,"onMouseleave",e=>{this._d.isActive=!1,this.unFocus(100,!1,e),this.emit("icon_mouseleave",{pluginName:this.pluginName})}),(0,sw._)(this,"onVolumeChange",e=>{if(!this.player)return;let{muted:t,volume:l}=this.player;!this._d.isMoving&&(this.find(".xgplayer-drag").style.width=t||0===l?"4px":`${100*l}%`,this.config.showValueLabel&&this.updateVolumeValue()),this.animate(t,l)})}}let sy=e=>Q().duration(e,"seconds").format("mm:ss");var sj=e=>{let{rank:t,musicInfo:l,onClickToPlay:n,onClickToPause:r,abTestData:i}=e,[o,d]=(0,s.useState)(!1),[u,c]=(0,s.useState)(!1),[v,m]=(0,s.useState)(!1),[f,h]=(0,s.useState)("00:00"),p=(0,s.useRef)(),g=(0,s.useRef)(null),_=(0,s.useRef)(!1),x=(0,s.useRef)(0),C=(0,s.useRef)(0),w=(0,s.useMemo)(()=>sy(l.duration),[l]),{updateActive:b,resetActive:I,mode:y,cleanHasListen:j}=(0,s.useContext)(o4),k=(0,s.useRef)(y);(0,s.useEffect)(()=>{k.current=y},[y]);let N=(0,s.useCallback)(()=>{sm.sendLog("audioPlay",{enter_from:"personal_homepage",music_id:null==l?void 0:l.mid,is_visible:"visible"===document.visibilityState?1:0,auto_play_mode:k.current})},[null==l?void 0:l.mid]),S=(0,s.useCallback)(()=>{sm.sendLog("audioOver",{music_id:null==l?void 0:l.mid,is_visible:"visible"===document.visibilityState?1:0,duration:Date.now()-C.current,auto_play_mode:k.current}),C.current=Date.now()},[null==l?void 0:l.mid]),E=(0,s.useCallback)(()=>{if(p.current){let{volume:e,autoplayMuted:t}=(0,sC.J)(i);p.current.muted=t,p.current.volume=e}},[]),L=(0,s.useCallback)(()=>{C.current=Date.now(),E(),c(!0)},[E]),T=(0,s.useCallback)(()=>{var e,t;c(!1),(null===(e=p.current)||void 0===e?void 0:e.duration)!==(null===(t=p.current)||void 0===t?void 0:t.currentTime)&&S()},[S]),M=(0,s.useCallback)(e=>{let{currentTime:t}=e;h(sy(t))},[]),R=(0,s.useCallback)(e=>{if(!!p.current&&(null==e?void 0:e.isInternalOp)!==!0)setTimeout(()=>{if(!!p.current)0===(0,ip.$o)(ig.LocalStorageKeys.PLAYER_IS_MUTE)&&p.current.muted&&(0,ip.qQ)(ig.LocalStorageKeys.PREVIEW_IS_MUTE,1),(0,ip.qQ)(ig.LocalStorageKeys.PLAYER_VOLUME,p.current.volume),(0,ip.qQ)(ig.LocalStorageKeys.PLAYER_IS_MUTE,p.current.muted?1:0),(0,sC.c)({isMute:p.current.muted,volume:p.current.volume})})},[]),D=(0,s.useCallback)(e=>{var t,l,n,r,i;(null===(t=p.current)||void 0===t?void 0:t.isPlaying)&&S(),null===(n=p.current)||void 0===n||null===(l=n.offAll)||void 0===l||l.call(n),null===(i=p.current)||void 0===i||null===(r=i.destroy)||void 0===r||r.call(i),e&&m(!1),e&&d(!1),e&&c(!1)},[S]),P=(0,s.useCallback)(()=>{var e;if(!g.current)return;let{volume:t,autoplayMuted:n}=(0,sC.J)(i),r={vtype:"MP3",url:null==l?void 0:null===(e=l.playUrl)||void 0===e?void 0:e.urlList.map(e=>({src:e})),autoplay:!0,loop:!1,closeFocusVideoFocus:!0,closeControlsBlur:!0,closePlayVideoFocus:!0,closeVideoPreventDefault:!0,closeVideoStopPropagation:!1,closeVideoDblclick:!0,controls:{mode:"flex",autoHide:!1,initShow:!0},plugins:[sx.Z,sI],autoplayMuted:n,volume:t},o=new s_.SimplePlayer((0,a._)({el:g.current,width:"100%",height:"100%"},r));m(!0),null==o||o.once(s_.Events.PLAY,N),o.on(s_.Events.PLAY,L),o.on(s_.Events.PAUSE,T),o.on(s_.Events.TIME_UPDATE,M),o.on(s_.Events.USER_ACTION,R),o.on(s_.Events.LOADED_DATA,()=>{d(!0),m(!1)}),o.on(s_.Events.WAITING,()=>m(!0)),o.on(s_.Events.CANPLAY,e=>{m(!1),_.current&&(_.current=!1,setTimeout(()=>{o.pause()},0))});o.on(s_.Events.ERROR,e=>{var t;if(null===(t=p.current)||void 0===t||t.pause(),sm.sendLog("audioError",{music_id:null==l?void 0:l.mid,error_msg:null==e?void 0:e.message,error_code:null==e?void 0:e.errorCode,error_type:null==e?void 0:e.errorType,player_version:null==e?void 0:e.playerVersion}),!(Date.now()-x.current<3e3))x.current=Date.now(),ei.F.info("歌曲播放失败,请点击重试")}),p.current=o},[l,L,T,M,R,N]);(0,s.useEffect)(()=>{if(p.current){let e=()=>{if(y===o7.Loop){var e;null===(e=p.current)||void 0===e||e.play();return}null==b||b(t,null==l?void 0:l.mid)};return p.current.on(s_.Events.ENDED,e),()=>{var t;return null===(t=p.current)||void 0===t?void 0:t.off(s_.Events.ENDED,e)}}},[y,p.current,i]),(0,s.useEffect)(()=>{let e=!1;return u&&(e=!0,window.addEventListener("beforeunload",S)),()=>{e&&window.removeEventListener("beforeunload",S)}},[u]);let A=(0,s.useCallback)(function(){var e,t,l;let i=!(arguments.length>0)||void 0===arguments[0]||arguments[0];if(v){null===(e=p.current)||void 0===e||e.pause(),m(!1),null==r||r(),_.current=!0;return}if(u){null===(t=p.current)||void 0===t||t.pause(),m(!1),null==r||r();return}o?(E(),null===(l=p.current)||void 0===l||l.play()):(P(),!i&&(null==I||I(),null==j||j())),null==n||n()},[o,u,P,E,n,r,v]),F=(0,s.useCallback)(()=>{u&&o&&(null==A||A())},[A,u,o]),B=(0,s.useCallback)(()=>{o&&p.current&&(p.current.currentTime=0,null==F||F())},[F,o]);return(0,s.useEffect)(()=>D,[D]),(0,s.useEffect)(()=>{let e=()=>{F()},t=$.listen($.EVENT.openImAwemeModal,e),l=$.listen($.EVENT.openNoticeAwemeModal,e),n=$.listen($.EVENT.liveModalShow,e),r=$.listen($.EVENT.videoPause,e);return()=>{null==t||t(),null==l||l(),null==n||n(),null==r||r()}},[F]),{playedTime:f,duration:w,clickMusicCard:A,containerRef:g,isPlaying:u,isActive:o,destroyPlayer:D,pause:F,resetPlayer:B,isBuffering:v}};let sk=(0,s.forwardRef)((e,t)=>(0,o.jsx)("svg",(0,R._)((0,a._)({width:36,height:42,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,o.jsx)("path",{opacity:".3",d:"M30.621 8.779c-2.223-1.433-3.829-3.726-4.33-6.398A9.642 9.642 0 0 1 26.124.6h-7.097l-.012 28.11c-.119 3.147-2.74 5.674-5.954 5.674a5.985 5.985 0 0 1-2.767-.678c-1.898-.988-3.199-2.955-3.199-5.219 0-3.25 2.678-5.896 5.966-5.896.614 0 1.203.1 1.761.273v-7.16a13.286 13.286 0 0 0-1.761-.125C5.86 15.579 0 21.369 0 28.489c0 4.369 2.209 8.234 5.577 10.57a13.092 13.092 0 0 0 7.486 2.341c7.203 0 13.063-5.791 13.063-12.91V14.233A17.01 17.01 0 0 0 36 17.372v-7.015a9.908 9.908 0 0 1-5.379-1.578z",fill:"#fff",fillOpacity:".34"})}))),sN=(0,s.forwardRef)((e,t)=>(0,o.jsx)("svg",(0,R._)((0,a._)({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.803 5.161a.6.6 0 0 1 .848 0l1.273 1.273a.8.8 0 0 1 0 1.131l-1.272 1.273a.6.6 0 0 1-.85-.849l.237-.236H8.75a3.25 3.25 0 0 0-3.25 3.25v2a3.25 3.25 0 0 0 3.25 3.25h1a.75.75 0 0 1 0 1.5h-1A4.75 4.75 0 0 1 4 13.003v-2a4.75 4.75 0 0 1 4.75-4.75h1.298l-.244-.243a.6.6 0 0 1 0-.849zm4.304 13.678a.6.6 0 0 1-.848 0l-1.273-1.273a.8.8 0 0 1 0-1.131l1.273-1.273a.6.6 0 0 1 .848.848l-.243.243h1.386a3.25 3.25 0 0 0 3.25-3.25v-2a3.25 3.25 0 0 0-3.25-3.25h-1a.75.75 0 0 1 0-1.5h1a4.75 4.75 0 0 1 4.75 4.75v2a4.75 4.75 0 0 1-4.75 4.75h-1.38l.237.237a.6.6 0 0 1 0 .849z",fill:"#fff",fillOpacity:".5"})}))),sS=(0,s.forwardRef)((e,t)=>(0,o.jsx)("svg",(0,R._)((0,a._)({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.803 5.176a.6.6 0 0 1 .849 0l1.272 1.273a.8.8 0 0 1 0 1.13l-1.272 1.274a.6.6 0 1 1-.849-.849l.236-.236H8.75a3.25 3.25 0 0 0-3.25 3.25v2a3.25 3.25 0 0 0 3.25 3.25h6.5a3.25 3.25 0 0 0 3.25-3.25v-2a3.25 3.25 0 0 0-3.25-3.25h-1a.75.75 0 0 1 0-1.5h1a4.75 4.75 0 0 1 4.75 4.75v2a4.75 4.75 0 0 1-4.75 4.75H8.745A4.75 4.75 0 0 1 4 13.018v-2a4.75 4.75 0 0 1 4.75-4.75h1.297l-.244-.244a.6.6 0 0 1 0-.848zm3.147 4.842h-.958a3.124 3.124 0 0 1-.63.49c-.252.14-.384.205-.608.261l-.004.9a2.367 2.367 0 0 0 1.035-.576l.004 3.473h1.16l.001-4.548z",fill:"#fff",fillOpacity:".5"})}))),sE=(0,s.forwardRef)((e,t)=>(0,o.jsx)("svg",(0,R._)((0,a._)({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.551 8.573a.5.5 0 0 0 .01-.845l-2.043-1.324a.5.5 0 0 0-.772.42v.522h-.272c-.69 0-1.355.304-1.8.848-.206.251-.379.467-.544.672-.25.312-.483.602-.786.961a.75.75 0 0 0 1.148.966c.31-.367.564-.684.825-1.01.165-.204.332-.412.518-.639a.825.825 0 0 1 .64-.298h.27v.562a.5.5 0 0 0 .763.425l2.043-1.26zM5.18 15.696c0 .414.336.75.75.75H7.484c.791 0 1.48-.402 1.93-.964.211-.263.365-.421.57-.632.136-.14.295-.302.506-.533a.75.75 0 0 0-1.105-1.014c-.144.157-.28.297-.412.434-.247.255-.481.498-.73.807-.21.264-.492.402-.76.402H5.93a.75.75 0 0 0-.75.75zm0-7.258a.75.75 0 0 1 .75-.75h1.656a2.35 2.35 0 0 1 1.797.837l5.441 6.46a.85.85 0 0 0 .65.303h.303v-.696a.5.5 0 0 1 .763-.426l2.043 1.26a.5.5 0 0 1 .009.846l-2.043 1.324a.5.5 0 0 1-.772-.42v-.388h-.303a2.35 2.35 0 0 1-1.797-.836L8.236 9.491a.85.85 0 0 0-.65-.303H5.93a.75.75 0 0 1-.75-.75z",fill:"#fff",fillOpacity:".5"})})));Q().extend(aH());let sL=e=>{var t,l,n,r,i,a,o,s;return(null==e?void 0:null===(l=e.avatarThumb)||void 0===l?void 0:null===(t=l.urlList)||void 0===t?void 0:t[0])?null==e?void 0:null===(a=e.avatarThumb)||void 0===a?void 0:null===(i=a.urlList)||void 0===i?void 0:i[0]:"string"==typeof(null==e?void 0:e.avatarThumb)?null==e?void 0:e.avatarThumb:(null==e?void 0:null===(r=e.coverMedium)||void 0===r?void 0:null===(n=r.urlList)||void 0===n?void 0:n[0])?null==e?void 0:null===(s=e.coverMedium)||void 0===s?void 0:null===(o=s.urlList)||void 0===o?void 0:o[0]:"string"==typeof(null==e?void 0:e.coverMedium)?null==e?void 0:e.coverMedium:""};var sT=e=>{let{rank:t,musicInfo:l,currentMusicId:n="",removeCurrentMusic:r,onClickCard:i,abTestData:a}=e,[d,u]=(0,s.useState)(!1),[c,v]=(0,s.useState)(!1),{active:m,mode:p,updateActive:g,updateMode:_,cleanHasListen:x,updatePosition:C}=(0,s.useContext)(o4),[w,b]=(0,nj.Z)(void 0,{threshold:1}),{playedTime:I,containerRef:y,clickMusicCard:j,duration:k,isPlaying:N,isActive:S,destroyPlayer:E,pause:L,isBuffering:T}=sj({musicInfo:l,abTestData:a,rank:t}),M=sL(l),R=n===(null==l?void 0:l.mid);(0,s.useEffect)(()=>{t===m&&(j(),null==i||i(l),!b&&(null==C||C(t)))},[t,m]),(0,s.useEffect)(()=>{!R&&S&&(null==E||E(!0))},[R,S,E]);let D=(0,tI.x)(()=>{sm.sendLog("musicCoverShow",{music_id:null==l?void 0:l.mid})});return(0,o.jsxs)("div",{className:f()({[sg.container]:!0,"use-music-mode":!0,"collect-music-player":!0,[sg.playing]:N,"is-music-focus":R}),ref:D,children:[(0,o.jsxs)("div",{ref:w,className:sg.cover,onClick:e=>{sm.sendLog("musicCoverClick",{music_id:null==l?void 0:l.mid}),j(!1),null==i||i(l)},children:[M&&(0,o.jsx)("img",{className:sg.img,src:M,onLoad:e=>u(!0),onError:e=>u(!1)}),!d&&(0,o.jsx)("div",{className:sg.defaultCover,children:(0,o.jsx)(sl.Z,{height:36,width:42,viewBox:"0 0 36 42",src:sk})}),T&&R?(0,o.jsx)(h.gb,{className:sg.loading}):(0,o.jsx)(sl.Z,{height:32,width:32,viewBox:"2 2 34 34",className:sg.playStatusIcon,src:N?sr:sn.Z})]}),(0,o.jsxs)("div",{className:sg.detail,children:[(0,o.jsxs)("div",{className:sg.infoContainer,children:[(0,o.jsx)(et.Z,{text:l.title,className:sg.title}),(0,o.jsx)(et.Z,{text:l.author,className:sg.author})]}),(0,o.jsxs)("div",{className:sg.player,children:[(0,o.jsx)("div",{ref:y,onClick:e=>e.stopPropagation()}),R?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:sg.playTime,children:[(0,o.jsxs)("span",{className:f()(sg.time,sg.playedTime),children:[I,"\xa0/\xa0"]}),(0,o.jsx)("span",{className:sg.time,children:k})]}),(0,o.jsxs)("div",{className:sg.mode,onClick:()=>{if(p===o7.Order){null==_||_(o7.Loop),sm.sendLog("clickAudioPlayMode",{auto_play_mode:o7.Loop});return}if(p===o7.Loop){null==_||_(o7.Random),sm.sendLog("clickAudioPlayMode",{auto_play_mode:o7.Random});return}if(p===o7.Random){null==_||_(o7.Order),null==x||x(),sm.sendLog("clickAudioPlayMode",{auto_play_mode:o7.Order});return}},onMouseOver:()=>v(!0),onMouseOut:()=>v(!1),children:[c&&(0,o.jsx)("div",{className:sg.modeTip,children:p===o7.Order?"顺序播放":p===o7.Random?"随机播放":"单曲循环"}),p===o7.Order&&(0,o.jsx)(sl.Z,{height:24,width:24,viewBox:"0 0 24 24",src:sN}),p===o7.Random&&(0,o.jsx)(sl.Z,{height:24,width:24,viewBox:"0 0 24 24",src:sE}),p===o7.Loop&&(0,o.jsx)(sl.Z,{height:24,width:24,viewBox:"0 0 24 24",src:sS})]})]}):(0,o.jsx)("span",{className:sg.time,children:k})]})]}),(0,o.jsx)("div",{className:sg.more,children:(0,o.jsx)(sp,{musicId:null==l?void 0:l.mid,pause:L,removeCurrentMusic:r})})]})},sM=e=>{let{userInfo:t,abTestData:l}=e;(0,nl.o)(null==t?void 0:t.secUid);let n=(0,s.useRef)(0),r=(0,s.useRef)(1),[i,a]=(0,s.useState)([]),d=(0,s.useRef)(),u=(0,s.useCallback)(async()=>{let{data:e,cursor:t,hasMore:l,statusCode:i}=await (0,o6.u)({cursor:n.current,count:20});return 0===i&&(n.current=t,r.current=l),{data:e,cursor:t,hasMore:l,statusCode:i}},[]),[c,v]=(0,s.useState)(-1),[m,f]=(0,s.useState)(o7.Order),[h,p]=(0,s.useState)([]),g=(0,s.useCallback)(e=>{p(t=>t.concat(e))},[]),_=(0,s.useCallback)(()=>{p([])},[]),x=(0,s.useCallback)((e,t)=>{if(m===o7.Order&&v(e===i.length-1?0:e+1),m===o7.Random){var l;let n=Math.floor(Math.random()*i.length);if(h.length===i.length-1){v(n),_();return}for(;n===e||h.includes(null===(l=i[n])||void 0===l?void 0:l.mid);)(n+=1)===i.length&&(n=0);v(n),g(t)}},[i,h,m]),C=(0,s.useCallback)(()=>{v(-1)},[]),w=(0,s.useCallback)(e=>{f(e)},[m]),b=(0,s.useCallback)(e=>{d.current&&d.current.locateSelectVideo(e,-200)},[]),I=(0,s.useCallback)(function(){var e,t,l,n;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(!r||!(null==d?void 0:null===(e=d.current)||void 0===e?void 0:e.setScrollData))return;let i=null!==(n=null===(t=(l=d.current).getDataList)||void 0===t?void 0:t.call(l))&&void 0!==n?n:[];d.current.setScrollData({dataList:i.filter(e=>(null==e?void 0:e.mid)!==r)}),p(e=>e.filter(e=>e!==r))},[]),[y,j]=(0,s.useState)(""),k=(0,s.useCallback)((e,n)=>(0,o.jsx)(sT,{musicInfo:e,rank:n,userInfo:t,currentTab:"music",currentMusicId:y,removeCurrentMusic:I,onClickCard:e=>{var t;j(null!==(t=null==e?void 0:e.mid)&&void 0!==t?t:"")},abTestData:l}),[l,t,y]),N=(0,nn.m)();return(0,o.jsx)(o4.Provider,{value:{active:c,updateActive:x,resetActive:C,mode:m,hasListen:h,updateMode:w,updateHasListen:g,cleanHasListen:_,updatePosition:b},children:(0,o.jsx)("div",{className:o9,children:(0,o.jsx)(lA.Z,{scrollContainerEl:N,ref:d,skeletonNum:0,defaultHasMoreFlag:r.current,renderItem:k,fetchMoreData:u,containerClassName:o8,itemClassName:se,panelNoData:(0,o.jsx)(V.H,{className:st,icon:(0,o.jsx)(lq.Z,{}),title:"暂无内容",desc:"暂时还没有收藏过音乐哦"}),setDataList:a})})})},sR={container:"aHhZPPPC",header:"bw4YxRpe",headerBg:"rM2Pqucc",tabs:"YqjzP_P8",right:"llyMyXEq",default:"RusLluHU",fuFang:"QDmkWofr",descText:"GfKwmmSo"};l("559352");let sD=new eU.h({pc_favourite_batch_manage_show:{eventName:"pc_favourite_batch_manage_show",params:{tab_name:""}},pc_favourite_batch_manage_click:{eventName:"pc_favourite_batch_manage_click",params:{tab_name:""}},favorite_folder_show:{eventName:"favorite_folder_show",params:{folder_name:"",folder_id:"",enter_from_merge:"",enter_from:""}},favorite_folder_click:{eventName:"favorite_folder_click",params:{folder_name:"",folder_id:"",enter_from_merge:"",enter_from:""}},favorite_folder_more_action_show:{eventName:"favorite_folder_more_action_show",params:{folder_name:"",folder_id:"",enter_from_merge:"",enter_from:""}},edit_favorite_folder_click:{eventName:"edit_favorite_folder_click",params:{folder_name:"",folder_id:"",status:0,enter_from_merge:"",enter_from:""}},edit_favorite_folder_confirm:{eventName:"edit_favorite_folder_confirm",params:{folder_name:"",folder_id:"",status:0,item_cnt:0,enter_from_merge:"",enter_from:""}},delete_favorite_folder_click:{eventName:"delete_favorite_folder_click",params:{folder_name:"",folder_id:"",status:0,item_cnt:0,enter_from_merge:"",enter_from:""}},delete_favorite_folder_confirm:{eventName:"delete_favorite_folder_confirm",params:{folder_name:"",folder_id:"",status:0,item_cnt:0,enter_from_merge:"",enter_from:""}},create_favorite_folder_click:{eventName:"create_favorite_folder_click",params:{click_position:"",enter_from_merge:"",enter_from:""}},create_favorite_folder_confirm:{eventName:"create_favorite_folder_confirm",params:{folder_name:"",folder_id:"",status:0,click_position:"",enter_from_merge:"",enter_from:""}},remove_favorite_video_click:{eventName:"remove_favorite_video_click",params:{folder_name:"",folder_id:"",enter_from_merge:"",enter_from:""}},remove_favorite_video_confrm:{eventName:"remove_favorite_video_confrm",params:{folder_name:"",folder_id:"",item_cnt:0,enter_from_merge:"",enter_from:""}},move_favorite_video_click:{eventName:"move_favorite_video_click",params:{folder_name:"",folder_id:"",enter_from_merge:"",enter_from:""}},move_favorite_video_confirm:{eventName:"move_favorite_video_confirm",params:{folder_name:"",folder_id:"",item_cnt:0,enter_from_merge:"",enter_from:""}},add_favorite_video_click:{eventName:"add_favorite_video_click",params:{folder_name:"",folder_id:"",enter_from_merge:"",enter_from:"",enter_method:""}},add_favorite_video_confirm:{eventName:"add_favorite_video_confirm",params:{folder_name:"",folder_id:"",item_cnt:0,enter_from_merge:"",enter_from:""}}}),sP=(e,t)=>sD.sendLog(e,(0,a._)({enter_from_merge:(0,Z.yW)(),enter_from:(0,tu.vM)()},t));var sA=l("402729");let sF=(e,t)=>{let l=function(e){let{selectItems:t=[],isListSelectable:l=!1,changeListSelectable:n,updateIsSelectDisabled:r}=e;return{state:{selectItems:t,selectable:l},action:{changeListSelectable:n,updateIsSelectDisabled:r}}}(e),[n,r]=(0,s.useState)(!1),[i,o]=(0,s.useState)(),[d,u]=(0,s.useState)(),[c,v]=(0,s.useState)([]),[m,f]=(0,s.useState)({}),h=(0,s.useRef)({});h.current=m;let p=(0,s.useRef)({cursor:0,hasMore:!0,statusCode:0}),g=(0,s.useMemo)(()=>c.reduce((e,t)=>{var l;return e[t.collectionFolderId]={info:t,videoList:(null===(l=m[t.collectionFolderId])||void 0===l?void 0:l.data)||[]},e},{}),[c,m]),_=(0,s.useMemo)(()=>{let e=d||i;return e?g[e]:void 0},[i,d,g]),x=(0,s.useCallback)(e=>{o(e),(0,iq.X)({top:0},(0,la.V)())},[]),C=(0,s.useCallback)(async e=>{var t;if(!e)return{data:[],cursor:0,hasMore:!1,statusCode:0};let l=h.current[e]||{cursor:0,hasMore:!0,data:[]};if(!l.hasMore)return{data:[],cursor:l.cursor,hasMore:l.hasMore,statusCode:0};let{data:n,cursor:r,hasMore:i,statusCode:o}=await (0,ry.d6)({collectsId:e,cursor:l.cursor,offset:10}),s=!!i;return h.current=(0,R._)((0,a._)({},h.current),{[e]:{cursor:r,hasMore:s,data:[...(null===(t=h.current[e])||void 0===t?void 0:t.data)||[],...n]}}),f(h.current),{data:n,cursor:r,hasMore:s,statusCode:o}},[]),w=(0,s.useCallback)(async()=>{if(!p.current.hasMore&&!p.current.statusCode)return await (0,sA.K)(500),{data:[],cursor:p.current.cursor,hasMore:p.current.hasMore,statusCode:p.current.statusCode};let{data:e,cursor:t,hasMore:l,statusCode:n}=await (0,ry.So)({cursor:p.current.cursor,offset:10});return 0===n&&(p.current.cursor=t,p.current.hasMore=l,p.current.statusCode=n),v(t=>[...t,...e]),Promise.all(e.map(e=>C(e.collectionFolderId))),{data:e,cursor:t,hasMore:l,statusCode:n}},[C]),b=(0,s.useCallback)(e=>{v(t=>{let l=t.map(e=>e.collectionFolderId);return[...e.filter(e=>!l.includes(e.collectionFolderId)),...t]})},[]),I=(0,s.useCallback)(e=>v(t=>{let l=t.findIndex(t=>t.collectionFolderId===e.collectionFolderId);if(-1===l)return t;let n=[...t];return n[l]=e,n}),[]),y=(0,s.useCallback)((e,t)=>{l.action.updateIsSelectDisabled(!0);let n={folder_name:e.map(e=>e.collectionFolderName).join(","),folder_id:e.map(e=>e.collectionFolderId).join(","),folder_cnt:e.length};sP("delete_favorite_folder_click",n),(0,tJ.Z)({title:"确认删除该收藏夹吗,删除后视频依旧可在收藏视频中查看~",cancelBtnText:"暂不删除",confirmBtnText:"确认删除",otherProps:{maskClosable:!1},async onConfirm(){null==t||t();try{await Promise.all(e.map(e=>(0,ry.yN)(e.collectionFolderId))),sP("delete_favorite_folder_confirm",n);let t=c.filter(t=>{let l=e.findIndex(e=>e.collectionFolderId===t.collectionFolderId);return -1===l});if(-1!==e.findIndex(e=>e.collectionFolderId===i)){if(t.length){let e=c.findIndex(e=>e.collectionFolderId===i),t=c[e+1],l=t?t.collectionFolderId:c[0].collectionFolderId;x(l)}else x("")}v(t),f(t=>{let l=(0,a._)({},t);for(let t of e)delete l[t.collectionFolderId];return l}),na.F.info("删除收藏夹成功")}catch(e){na.F.info("删除收藏夹失败")}finally{l.action.updateIsSelectDisabled(!1),l.action.changeListSelectable(!1)}},onCancel(){l.action.updateIsSelectDisabled(!1)}})},[c,i,l.action.updateIsSelectDisabled,l.action.changeListSelectable,x]),j=(0,s.useCallback)(e=>{var t,n;x(e),null===(t=(n=l.action).changeListSelectable)||void 0===t||t.call(n,!1)},[l.action.changeListSelectable,x]),k=(0,s.useCallback)((e,t,l)=>{let n=h.current[t],r=[...(null==n?void 0:n.data)||[]],i=l.map(e=>e.awemeId),o=[],s=0;if("remove"===e)o=r.filter(e=>!i.includes(e.awemeId)),s=-(r.length-o.length);else if("add"===e){o=r;let e=r.map(e=>e.awemeId);for(let t of l){if(!e.includes(t.awemeId))o.unshift(t),s+=1}}h.current=(0,R._)((0,a._)({},h.current),{[t]:(0,R._)((0,a._)({},n),{data:o})}),f(h.current),v(e=>{var l;let n=e.findIndex(e=>e.collectionFolderId===t);if(-1===n)return e;let r=(0,R._)((0,a._)({},e[n]),{videoTotal:(null===(l=e[n])||void 0===l?void 0:l.videoTotal)+s}),i=[...e];return i.splice(n,1,r),i})},[]),N=(0,s.useCallback)(async(e,t)=>{let l=c.find(t=>t.collectionFolderId===e),{status_code:n}=await (0,ry.RX)({item_ids:t.map(e=>e.awemeId),item_type:2,from_collects_id:e,collects_name:(null==l?void 0:l.collectionFolderName)||""});if(n){na.F.info("操作失败");return}na.F.info("操作成功");k("remove",e,t)},[l.action.changeListSelectable,c]),S=(0,s.useCallback)(async(e,t)=>{k("remove",e,t)},[k]),E=(0,s.useCallback)(async function(e,t){let l=!(arguments.length>2)||void 0===arguments[2]||arguments[2],n=e.map(e=>{var t,l;return null===(l=g[e])||void 0===l?void 0:null===(t=l.info)||void 0===t?void 0:t.collectionFolderId});if(await Promise.all(e.map(async e=>{var l,r;let{status_code:i}=await (0,ry.RX)({item_ids:t.map(e=>e.awemeId),item_type:2,to_collects_id:e,collects_name:(null===(r=g[e])||void 0===r?void 0:null===(l=r.info)||void 0===l?void 0:l.collectionFolderName)||"",move_collects_list:n,update_collects_sort:!0});if(i)throw Error()})),l)for(let l of e)k("add",l,t)},[g,k]),L=(0,s.useCallback)(()=>{x(""),u(""),v([]),f({}),h.current={},p.current={cursor:0,hasMore:!0}},[x]),T=(0,s.useCallback)(()=>{var e;null==r||r(!0),null===(e=t.changeListSelectable)||void 0===e||e.call(t,!0)},[t.changeListSelectable]),M=(0,s.useCallback)(()=>{var e;null==r||r(!1),null===(e=t.changeListSelectable)||void 0===e||e.call(t,!1)},[t.changeListSelectable]);return{multi:l,addVideo:t,state:{currentCollectsId:i,tempCurrentCollectsId:d,collects:c,collectMap:g,currentCollectsInfo:_,videoResRef:h,collectResRef:p,isAddVideoModalShow:n},action:{setTempCurrentCollectsId:u,getCollects:w,createCollection:b,editCollection:I,removeCollections:y,selectCollection:j,getVideoList:C,reset:L,removeVideosFromCollection:N,moveVideosToCollections:E,removeVideoForDeleted:S,openAddVideoModal:T,cancelAddVideoModal:M}}},sB=(0,s.createContext)(null),sU=()=>(0,s.useContext)(sB);var sV=l("194961"),sO={manage:"zISK2uZe",myReturn:"iprPb2Zb",divider:"moywEH3t"},sH="ANSjRowS",sz="uG_ICok0",sZ="gKk3zTVP";let sW=e=>{let{icon:t,text:l,textClass:n,onClick:r,disabled:i=!1,className:a,disabledToast:d}=e,{run:u}=(0,i0.Z)(e=>ei.F.info(e),500),c=(0,s.useCallback)(()=>{if(i){d&&u(d);return}null==r||r()},[i,r,d,u]);return(0,o.jsxs)("div",{className:f()(sH,a,{[sZ]:i}),onClick:c,children:[t,(0,o.jsx)("span",{className:f()(sz,n),children:l})]})};var s$={btn:"guD8j58H",iconAdd:"WnbqPogi",textBtn:"I9y9xAnR",myAddSvg:"Rk3wN_6z",modal:"RJSMekZ8",header:"i5w2sw6C",title:"hU3JXfff",btnGroup:"Lco0Ni9C",wrapper:"E8K39aa5",content:"fZVrW1rH",item:"QAjjU8lg"},sK=l("590555"),sY="qEbpV4OX",sG="SuUZMLI1";let sq={top:0,bottom:0,left:0,right:0};var sX=e=>{let{currentTab:t,userInfo:l,topNavHeight:n=60,itemClassName:r,listSelectContext:i,columnCount:d,isInModal:u=!1,setItemCount:c,abTestData:v,scrollContainerEl:m}=e,f=sU(),h=(0,nl.o)(null==l?void 0:l.secUid)||"",p=(0,s.useRef)(0),g=(0,s.useRef)(0),_=(0,s.useRef)([]),[x,C]=(0,s.useState)([]),w=(0,s.useRef)(!u);(0,s.useEffect)(()=>{var e;null==c||c(null!==(e=null==x?void 0:x.length)&&void 0!==e?e:0)},[null==x?void 0:x.length,c]);let b=(0,s.useCallback)(()=>{g.current=0},[]),I=async()=>{var e;let t=(null==w?void 0:w.current)&&n1.UG.hasCache;iL.z.markStart("user_collect_fetch_data",{once:!0});let{data:l=[],maxCursor:n=0,hasMore:r,statusCode:i}=await av(e=>n1.UG.request({cached:t,consume:!0,params:{maxCursor:e},fetcherOptions:{expired:12e5,resetExpiredCacheBefore:!1,hoverDelay:!1}}),g.current);iL.z.markEnd("user_collect_fetch_data",{once:!0});let o=l.length<6?p.current:g.current,s=l.map(e=>(0,R._)((0,a._)({},e),{cursor:o}));!i&&(t?setTimeout(()=>{var e,t;null===(t=j.current)||void 0===t||null===(e=t.loadMoreData)||void 0===e||e.call(t)},200):(p.current=g.current,g.current=n)),w.current=!1;let d=tR(s,_.current);return{data:nK()(d,(null===(e=f.state.currentCollectsInfo)||void 0===e?void 0:e.videoList)||[],"awemeId"),maxCursor:t?0:n,hasMore:t?1:r,statusCode:t?0:i,clearBefore:!u&&!t&&0===p.current}},{isPostDelete:y}=(0,s.useContext)(li),j=(0,s.useRef)();(0,s.useEffect)(()=>{if(y){var e,t,l,n;null==j||null===(t=j.current)||void 0===t||null===(e=t.reset)||void 0===e||e.call(t),b(),null==j||null===(n=j.current)||void 0===n||null===(l=n.reload)||void 0===l||l.call(n)}},[y,b]);let k=(0,s.useRef)(null),N=(0,sK.d)(m);return(0,o.jsx)("div",{className:sY,"data-e2e":"user-favorite-list",ref:k,children:(0,o.jsx)("div",{className:sG,"data-e2e":"user-post-list",children:(0,o.jsx)(iN,{ref:j,resetStatusFunc:b,uid:h,tab:"favorite_collection",currentTab:t,defaultRes:{statusCode:0,data:[],hasMore:1,cursor:0,maxCursor:0},fetchMoreData:I,retryTimes:5,reloadNum:3,panelNoData:(0,o.jsx)(aS,{title:"暂无收藏的视频",type:"collect"}),topNavHeight:n,itemClassName:r,listSelectContext:i,columnCount:d,containerRef:u?k:void 0,scrollRef:u?N:void 0,customStickyArea:u?sq:void 0,updateAwemeList:C})})})};let sQ=(0,s.forwardRef)((e,t)=>(0,o.jsx)("svg",(0,R._)((0,a._)({xmlns:"http://www.w3.org/2000/svg",width:17,height:16,fill:"none",ref:t},e),{children:(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.75 13.333a.75.75 0 0 0 1.5 0V8.75h4.583a.75.75 0 0 0 0-1.5H9.249V2.667a.75.75 0 1 0-1.5 0V7.25H3.166a.75.75 0 1 0 0 1.5h4.583v4.583z",fill:"#fff"})}))),sJ=lI();var s0=e=>{var t,l,n,r,i;let{btnType:a="button"}=e,d=sU(),u=d.state.isAddVideoModalShow,{userInfo:c}=(0,eH.useUserInfoContext)()||{},v=(0,s.useRef)(void 0),m=(0,s.useCallback)(async()=>{try{var e,t,l;if(!d.state.currentCollectsId&&!d.state.tempCurrentCollectsId)return;let n=null===(e=d.addVideo)||void 0===e?void 0:e.selectItems;sP("add_favorite_video_confirm",{folder_name:(null===(t=d.state.currentCollectsInfo)||void 0===t?void 0:t.info.collectionFolderName)||"",folder_id:(null===(l=d.state.currentCollectsInfo)||void 0===l?void 0:l.info.collectionFolderId)||"",item_cnt:(null==n?void 0:n.length)||0});let r=d.state.tempCurrentCollectsId||d.state.currentCollectsId;await d.action.moveVideosToCollections([r],n||[]),d.action.cancelAddVideoModal(),d.action.selectCollection(r),d.action.setTempCurrentCollectsId(""),na.F.info("添加视频成功")}catch(e){d.action.cancelAddVideoModal(),d.action.setTempCurrentCollectsId(""),na.F.info("添加视频失败",null==v?void 0:v.current)}},[d.action.cancelAddVideoModal,d.action.moveVideosToCollections,d.state.currentCollectsId,null===(t=d.addVideo)||void 0===t?void 0:t.selectItems]),f=(0,s.useCallback)(()=>{var e,t;sP("add_favorite_video_click",{folder_name:(null===(e=d.state.currentCollectsInfo)||void 0===e?void 0:e.info.collectionFolderName)||"",folder_id:(null===(t=d.state.currentCollectsInfo)||void 0===t?void 0:t.info.collectionFolderId)||""}),d.action.openAddVideoModal()},[d.action.openAddVideoModal,d.state.currentCollectsInfo]),h=(0,s.useCallback)(()=>{d.action.setTempCurrentCollectsId(""),d.action.cancelAddVideoModal()},[d.action.cancelAddVideoModal]);return(0,s.useEffect)(()=>(u?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[u]),(0,o.jsxs)(sJ.Provider,{value:d.addVideo,children:["button"===a?(0,o.jsxs)(D.Button,{newStyle:!0,className:s$.btn,onClick:f,theme:"solid",children:[(0,o.jsx)(F.Z,{src:sQ,className:s$.iconAdd,viewBox:"0 0 17 16"}),"添加视频"]}):(0,o.jsx)(sW,{className:s$.textBtn,icon:(0,o.jsx)(ew.z,{svg:(0,o.jsx)(lh.Z,{}),className:s$.myAddSvg}),text:"添加视频",disabledToast:"需退出「批量管理」才可以添加视频哦~",disabled:d.multi.state.selectable,onClick:f}),(0,o.jsxs)(ts.u,{className:s$.modal,isHide:!u,maskClosable:!1,type:"custom",onCancel:h,children:[(0,o.jsxs)("div",{className:s$.header,children:[(0,o.jsxs)("p",{className:s$.title,children:["添加视频(",(null===(n=d.addVideo)||void 0===n?void 0:null===(l=n.selectItems)||void 0===l?void 0:l.length)||0,""]}),(0,o.jsxs)("div",{className:s$.btnGroup,children:[(0,o.jsx)(D.Button,{newStyle:!0,className:s$.btn,size:"small",type:"secondary",onClick:h,theme:"solid",children:"取消"}),(0,o.jsx)(D.Button,{newStyle:!0,disabled:!(null===(i=d.addVideo)||void 0===i?void 0:null===(r=i.selectItems)||void 0===r?void 0:r.length),className:s$.btn,size:"small",onClick:m,theme:"solid",children:"确定"})]})]}),(0,o.jsx)("div",{className:s$.wrapper,children:(0,o.jsx)("div",{ref:v,className:s$.content,children:u&&(0,o.jsx)(sX,{currentTab:"favorite_collection",userInfo:c,itemClassName:s$.item,listSelectContext:sJ,columnCount:5,isInModal:!0,scrollContainerEl:v.current})})})]})]})},s1=l("566408"),s2={btn:"OPcEV0JK",iconAdd:"agrIIH3e",textBtn:"rSsHx_xO",myAddSvg:"J8QzxEjy"},s3=e=>{let{btnType:t="button"}=e,l=sU(),n=(0,s.useCallback)(e=>{l.action.createCollection([e]),sP("favorite_folder_show",{folder_name:e.collectionFolderName,folder_id:e.collectionFolderId})},[l.action.createCollection]),{open:r,modal:i,show:a}=(0,s1.Z)({toastInGlobal:!0,logParams:{click_position:"favorite_folder_tab"},onDone:n});return(0,s.useEffect)(()=>(a?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[a]),(0,o.jsxs)(o.Fragment,{children:["button"===t?(0,o.jsxs)(D.Button,{newStyle:!0,className:s2.btn,onClick:r,theme:"solid",children:[(0,o.jsx)(F.Z,{src:sQ,className:s2.iconAdd,viewBox:"0 0 17 16"}),"新建收藏夹"]}):(0,o.jsx)(sW,{className:s2.textBtn,icon:(0,o.jsx)(ew.z,{svg:(0,o.jsx)(lh.Z,{}),className:s2.myAddSvg}),text:"新建收藏夹",disabledToast:"需退出「批量管理」才可以新建收藏夹哦~",disabled:l.multi.state.selectable,onClick:r}),i]})},s5=()=>{let e=sU(),t=(0,s.useMemo)(()=>e.state.currentCollectsId||!e.state.collects.length?null:(0,o.jsx)(s3,{btnType:"text"}),[e.state.currentCollectsId,e.action.selectCollection,e.state.collects]);return(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)("div",{className:sO.manage,children:[t,(e.state.currentCollectsId||e.state.tempCurrentCollectsId)&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s0,{btnType:"text"}),(0,o.jsx)(D.Divider,{layout:"vertical",margin:"12px",className:sO.divider}),(0,o.jsx)(sW,{text:"返回",icon:(0,o.jsx)(ew.z,{svg:(0,o.jsx)(sV.Z,{}),className:sO.myReturn}),onClick:()=>e.action.selectCollection("")})]})]})})},s6=l("985748"),s4={card:"OUwG8uvr",cover:"zscvS7e6",header:"h9T7CQMW",left:"rHOsituu",title:"EL2m9FJy",secret:"lEB8Ffzj",count:"j9W6qw1b",digit:"sch4r5Pq",coverList:"pZnOIHUE",tip:"H73IeZsD"},s7=l("304036"),s9={cover:"AZ5pxxim",wrapper:"nL9Nuldr",icon:"hjvXz_8s",large:"x7FEfZvS"},s8=e=>{let{src:t,className:l,alt:n,size:r="default"}=e,[i,a]=(0,s.useState)("");return(0,s.useEffect)(()=>{if(!t)return;let e=new Image;e.onload=()=>{a(t)},e.src=t},[t]),(0,o.jsx)("div",{className:f()([s9.cover,l,"large"===r&&s9.large]),children:(0,o.jsx)("div",{className:s9.wrapper,children:i?(0,o.jsx)("img",{src:i,alt:n}):(0,o.jsx)(F.Z,{src:s7.Z,className:s9.icon,viewBox:"0 0 105 120"})})})},de=l("431170"),dt="ZiAv_kt2",dl="tRkLPXX2",dn="skYaSWXd";let dr=(0,s.forwardRef)((e,t)=>(0,o.jsx)("svg",(0,R._)((0,a._)({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,o.jsx)("path",{d:"M16.5 12a1.5 1.5 0 1 0 3 0 1.5 1.5 0 0 0-3 0zM10.5 12a1.5 1.5 0 1 0 3 0 1.5 1.5 0 0 0-3 0zM5 12a1.5 1.5 0 1 0 3 0 1.5 1.5 0 0 0-3 0z",fill:"#fff",fillOpacity:".5"})})));var di=e=>{let{className:t,data:l}=e,n=sU(),{open:r,modal:i}=(0,s1.Z)({collectsInfo:l,toastInGlobal:!0,onDone:n.action.editCollection}),[d,u]=(0,s.useState)(),[c,v]=(0,s.useState)(),{styles:m,attributes:h,update:p}=(0,de.D)(d,c,{placement:"bottom"}),g=(0,s.useRef)(),_=(0,s.useCallback)(e=>{g.current&&clearTimeout(g.current),null==c||c.setAttribute("data-show",""),!e&&sP("favorite_folder_more_action_show",{folder_id:l.collectionFolderId,folder_name:l.collectionFolderName}),null==p||p()},[c,p,l]),x=(0,s.useCallback)(()=>{g.current=setTimeout(()=>{null==c||c.removeAttribute("data-show")},100)},[c,p]),C=(0,s.useCallback)(()=>{x(),n.action.openAddVideoModal(),n.action.setTempCurrentCollectsId(l.collectionFolderId),sP("add_favorite_video_click",{folder_id:l.collectionFolderId,folder_name:l.collectionFolderName,status:l.status,enter_method:n.state.currentCollectsId?"sec_panel_more":"first_panel_more"})},[n.action.openAddVideoModal,x,l]),w=(0,s.useCallback)(()=>{x(),r(),sP("edit_favorite_folder_click",{folder_id:l.collectionFolderId,folder_name:l.collectionFolderName,status:l.status})},[r,x,l]),b=(0,s.useCallback)(async()=>{x();let e={folder_id:l.collectionFolderId,folder_name:l.collectionFolderName,status:l.status,item_cnt:l.videoTotal};sP("delete_favorite_folder_click",e),n.action.removeCollections([l],()=>sP("delete_favorite_folder_confirm",e))},[n.action.removeCollections,l,x]);return(0,s.useEffect)(()=>{let e=ns()(x,50);return document.addEventListener("wheel",e),()=>{document.removeEventListener("wheel",e)}},[x]),(0,s.useEffect)(()=>{null==p||p()},[]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{ref:u,className:f()([dt,t]),onClick:e=>e.stopPropagation(),children:[(0,o.jsx)(F.Z,{src:dr,viewBox:"0 0 24 24",onMouseEnter:()=>_(!1),onMouseLeave:x}),i]}),(0,lp.createPortal)((0,o.jsxs)("ul",(0,R._)((0,a._)({ref:v,className:dl,style:m.popper,onMouseEnter:()=>_(!0),onMouseLeave:x},h.popper),{onClick:e=>e.stopPropagation(),children:[(0,o.jsx)("li",{className:dn,onClick:C,children:"添加视频"}),(0,o.jsx)("li",{className:dn,onClick:w,children:"编辑收藏夹"}),(0,o.jsx)("li",{className:dn,onClick:b,children:"删除收藏夹"})]})),document.body)]})},da=e=>{let{data:t}=e,l=sU(),n=(0,s.useMemo)(()=>{var e;let n=((null===(e=l.state.collectMap[t.collectionFolderId])||void 0===e?void 0:e.videoList)||[]).map(e=>{var t;return null===(t=e.video)||void 0===t?void 0:t.cover});return Array(6).fill(void 0).map((e,t)=>{let l=n[t];return{key:l||t,value:l}})},[t,l.state.collectMap]),r=(0,tI.x)(()=>{sP("favorite_folder_show",{folder_name:t.collectionFolderName,folder_id:t.collectionFolderId})}),i=(0,s.useCallback)(()=>{l.action.selectCollection(t.collectionFolderId),sP("favorite_folder_click",{folder_name:t.collectionFolderName,folder_id:t.collectionFolderId})},[t.collectionFolderId,t.collectionFolderName]);return(0,o.jsxs)("div",{ref:r,className:s4.card,onClick:i,children:[(0,o.jsxs)("div",{className:s4.header,children:[(0,o.jsxs)("div",{className:s4.left,children:[(0,o.jsx)(D.Tooltip,{className:s4.tip,style:24>=(0,s6.V)(t.collectionFolderName)?{display:"none"}:{},content:t.collectionFolderName,position:"right",children:(0,o.jsx)("p",{className:s4.title,children:t.collectionFolderName})}),0===t.status&&(0,o.jsx)(ew.z,{className:s4.secret,svg:(0,o.jsx)(lf.Z,{})})]}),!l.multi.state.selectable&&(0,o.jsx)(di,{data:t})]}),(0,o.jsxs)("p",{className:s4.count,children:["共",(0,o.jsx)("span",{className:s4.digit,children:t.videoTotal}),"作品"]}),(0,o.jsx)("div",{className:s4.coverList,children:n.map(e=>(0,o.jsx)(s8,{className:s4.cover,src:e.value},e.key))})]})},ds="KlCBO4S6",dd="W4n61X0W",du=l("364861"),dc={},dv=e=>{let{isListSelectable:t,setIsListSelectable:l}=e,n=!!sU().state.currentCollectsId;return(0,o.jsx)("div",{className:dc.empty,children:(0,o.jsx)(V.H,{icon:n?(0,o.jsx)(lq.Z,{}):(0,o.jsx)(du.Z,{}),title:n?"暂无内容":"暂无收藏夹",desc:n?"":"赶快去新建属于自己的收藏夹吧",children:n?(0,o.jsx)(s0,{isListSelectable:t,setIsListSelectable:l}):(0,o.jsx)(s3,{})})})},dm=()=>{var e,t;let l=sU(),n=(0,s.useRef)(),r=(0,s.useCallback)(e=>(0,o.jsx)(da,{data:e}),[l.state.collects]);(0,s.useEffect)(()=>{var e;null==n||null===(e=n.current)||void 0===e||e.setScrollData({dataList:l.state.collects})},[l.state.collects]);let i=nb(),d=(0,s.useRef)({borderRadius:"6px"}),{withMask:u}=nI((0,R._)((0,a._)({maskShadowStyle:d.current,getItemId:e=>e.collectionFolderId,dataList:l.state.collects,isSupportMulti:!0},i),{firstItem:null===(t=n.current)||void 0===t?void 0:null===(e=t.getTargetNode)||void 0===e?void 0:e.call(t,0),getColumnCount:()=>3,stickyArea:{top:190,bottom:0,left:0,right:0},itemMargin:{top:0,bottom:16,left:0,right:16}})),c=(0,nn.m)();return(0,o.jsx)("div",{className:ds,children:(0,o.jsx)(lA.Z,{scrollContainerEl:c,ref:n,skeletonNum:0,defaultDataList:[],defaultHasMoreFlag:1,renderItem:r,fetchMoreData:l.action.getCollects,itemClassName:dd,panelNoData:(0,o.jsx)(dv,{}),withMask:u})})},df=l("853464"),dh={wrapper:"G_2cENIE",navigation:"b84D9moV",item:"yKNs6LhU",arrow:"IOiSXeYB",arrowBg:"SoetzBod",arrowOuter:"hwm2QbAG",disabled:"pU41cuCR",active:"rsXcs5vD",more:"vtpRqhg8",cover:"xAxjj6Oe",icon:"RtBgpDq9",right:"yZIxUtCF",top:"YKLJSIhS",name:"Dgf4E3Yx",secret:"z6wfKLgM",total:"ICHy1sDK",bgWrapper:"MstsqZTB",bg:"onNbhhjm",loading:"bnAtKQyB",tip:"_kTNqyA8"};let dp=(0,s.forwardRef)((e,t)=>(0,o.jsx)("svg",(0,R._)((0,a._)({xmlns:"http://www.w3.org/2000/svg",width:9,height:21,fill:"none",ref:t},e),{children:(0,o.jsx)("path",{d:"M7.991 9.154c1.296.87 1.265 2.874-.027 3.748C5.374 14.655 1.794 17.53 0 21V0c2.156 4.549 4.619 6.89 7.991 9.154z",fill:"#454650"})}))),dg=e=>{let t=(0,tI.x)(()=>{if(!!e.id)sP("favorite_folder_show",{folder_id:e.id,folder_name:e.name})}),l=(0,s.useCallback)(()=>{var t;if(!e.isDisabled)e.id&&sP("favorite_folder_click",{folder_id:e.id,folder_name:e.name}),null===(t=e.onClick)||void 0===t||t.call(e)},[e.onClick,e.id,e.name,e.isDisabled]);return(0,o.jsxs)("div",{ref:t,className:f()([dh.item,e.active&&dh.active,e.isDisabled&&dh.disabled]),onClick:l,children:[e.isPlus?(0,o.jsx)(ew.z,{className:dh.icon,svg:(0,o.jsx)(df.Z,{})}):(0,o.jsx)(s8,{size:"large",className:dh.cover,src:e.src,alt:e.name}),(0,o.jsxs)("div",{className:dh.right,children:[(0,o.jsxs)("div",{className:dh.top,"data-tip":e.name,children:[(0,o.jsx)(D.Tooltip,{position:"right",showArrow:!1,style:14>=(0,s6.V)(e.name)?{display:"none"}:{},content:(0,o.jsx)("span",{style:{lineHeight:"26px"},children:e.name}),className:dh.tip,children:(0,o.jsx)("p",{className:dh.name,children:e.name})}),e.secret&&(0,o.jsx)(ew.z,{className:dh.secret,svg:(0,o.jsx)(lf.Z,{})})]}),void 0!==e.total&&(0,o.jsx)("span",{className:dh.total,children:e.total})]}),(0,o.jsx)("div",{className:dh.bgWrapper,children:(0,o.jsx)(ew.z,{className:dh.bg,svg:(0,o.jsx)(du.Z,{})})}),(0,o.jsxs)("div",{className:dh.arrow,children:[(0,o.jsx)(F.Z,{className:dh.arrowBg,src:dp,viewBox:"0 0 9 21"}),(0,o.jsx)(F.Z,{className:dh.arrowOuter,src:dp,viewBox:"0 0 9 21"})]}),!e.isDisabled&&e.children]})};var d_=e=>{let{isListSelectable:t}=e,l=sU(),n=(0,s.useCallback)(e=>{l.action.createCollection([e]),l.action.selectCollection(e.collectionFolderId)},[l.action.createCollection,l.action.selectCollection]),{open:r,modal:i}=(0,s1.Z)({toastInGlobal:!0,onDone:n,logParams:{click_position:"favorite_folder_tab"}}),[d,u]=(0,nj.Z)();return((0,s.useEffect)(()=>{if(!!u)l.action.getCollects()},[u]),(0,s.useEffect)(()=>{let e=document.querySelector(".user-page-footer"),t=document.querySelector("#collection-navigation"),l=ns()(()=>{var l;let n=document.body.clientHeight,r=(null==e?void 0:e.getBoundingClientRect().top)||0,{top:i=0,height:a=0}=null!==(l=null==t?void 0:t.getBoundingClientRect())&&void 0!==l?l:{},o=0;if(!!a)o=r>n?n-i:r-i,(null==t?void 0:t.style)&&o&&(t.style.height=`${o}px`)},10),n=(0,la.s)();return n.addEventListener("scroll",l),()=>{n.removeEventListener("scroll",l)}},[]),l.state.collects.length)?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:dh.wrapper,children:(0,o.jsx)(lt.Z,{topOffset:-60,children:e=>{let{style:n,isSticky:i}=e;return(0,o.jsxs)("div",{id:"collection-navigation",className:dh.navigation,style:i?(0,R._)((0,a._)({},n),{position:"fixed",top:176}):void 0,children:[(0,o.jsx)(dg,{name:"新建收藏夹",isPlus:!0,onClick:r,isDisabled:t}),l.state.collects.map(e=>{var n,r,i,a;return(0,o.jsx)(dg,{id:e.collectionFolderId,active:e.collectionFolderId===l.state.currentCollectsId,name:e.collectionFolderName,src:null===(a=l.state.collectMap[e.collectionFolderId])||void 0===a?void 0:null===(i=a.videoList)||void 0===i?void 0:null===(r=i[0])||void 0===r?void 0:null===(n=r.video)||void 0===n?void 0:n.cover,secret:0===e.status,total:e.videoTotal,onClick:()=>l.action.selectCollection(e.collectionFolderId),isDisabled:e.collectionFolderId!==l.state.currentCollectsId&&t,children:(0,o.jsx)(di,{data:e,className:dh.more})},e.collectionFolderId)}),l.state.collectResRef.current.hasMore&&(0,o.jsx)("div",{ref:d,className:dh.loading,children:(0,o.jsx)(h.gb,{})})]})}})}),i]}):null},dx="uTD_M4Fh",dC="c3Bbl7oC",dw=e=>{var t,l,n,r,i,a;let{isListSelectable:d,setIsListSelectable:u}=e,c=sU(),{userInfo:v}=(0,eH.useUserInfoContext)()||{},m=null!==(a=(0,nl.o)(null==v?void 0:null===(t=v.info)||void 0===t?void 0:t.secUid))&&void 0!==a?a:"",f=(0,s.useRef)(),h=(0,s.useCallback)(()=>c.action.getVideoList(c.state.currentCollectsId),[c.state.currentCollectsId]),{isPostDelete:p}=(0,s.useContext)(li);return(0,s.useEffect)(()=>{if(p&&c.state.currentCollectsId){var e;let t=null!==(e=C.Le.getConfig(C.gI.DeletePostList))&&void 0!==e?e:[];c.action.removeVideoForDeleted(c.state.currentCollectsId,t)}},[p,c.action,c.state.currentCollectsId]),(0,s.useEffect)(()=>{var e,t,l;if(!c.state.currentCollectsId){null==f||null===(l=f.current)||void 0===l||l.resetRes({statusCode:0,hasMore:!1,dataList:[]});return}let n=c.state.videoResRef.current[c.state.currentCollectsId]||{cursor:0,hasMore:0};null==f||null===(t=f.current)||void 0===t||t.resetRes({statusCode:0,hasMore:n.hasMore,dataList:(null===(e=c.state.currentCollectsInfo)||void 0===e?void 0:e.videoList)||[]})},[c.state.currentCollectsInfo,c.state.currentCollectsId]),(0,o.jsx)("div",{className:dx,children:(0,o.jsx)(iN,{ref:f,itemClassName:dC,uid:m,tab:"favorite_collection",currentTab:"favorite_collection",modalInnerFeedCard:"collect_folder",defaultRes:{statusCode:0,hasMore:0,cursor:0,data:(null===(l=c.state.currentCollectsInfo)||void 0===l?void 0:l.videoList)||[]},fetchMoreData:h,collectionFolderInfo:null===(n=c.state.currentCollectsInfo)||void 0===n?void 0:n.info,modalEnterFrom:lS.a.CollectionFolder,columnCount:5,panelNoData:(0,o.jsx)(dv,{isListSelectable:d,setIsListSelectable:u}),logParams:{folder_id:(null===(r=c.state.currentCollectsInfo)||void 0===r?void 0:r.info.collectionFolderId)||"",folder_name:(null===(i=c.state.currentCollectsInfo)||void 0===i?void 0:i.info.collectionFolderName)||"",sub_tab_name:"folder"}})})},db="rEFK_ZZG",dI=e=>{let{isEntry:t,isListSelectable:l,setIsListSelectable:n}=e,r=sU(),[i,a]=(0,s.useState)(!1),d=(0,s.useCallback)(async()=>{if(!!t)try{a(!0),await r.action.getCollects()}catch(e){}finally{a(!1)}},[t,r.action.getCollects]);return(0,s.useEffect)(()=>{d()},[d]),(0,s.useEffect)(()=>{if(!r.state.currentCollectsId&&!!r.state.collects.length)r.action.selectCollection(r.state.collects[0].collectionFolderId)},[r.state.currentCollectsId,r.state.collects]),(0,o.jsx)("div",{className:db,children:i?(0,o.jsx)(h.gb,{}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d_,{isListSelectable:l}),(0,o.jsx)(dw,{isListSelectable:l,setIsListSelectable:n})]})})},dy=e=>{let{isListSelectable:t,setIsListSelectable:l}=e;return sU().state.currentCollectsId?(0,o.jsx)(dI,{isListSelectable:t,setIsListSelectable:l}):(0,o.jsx)(dm,{})};let dj=(0,s.forwardRef)((e,t)=>(0,o.jsx)("svg",(0,R._)((0,a._)({width:16,height:16,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,o.jsx)("path",{d:"M4.436 14.15L2.259 3.003a.75.75 0 0 1 1.095-.802l9.936 5.42a.47.47 0 0 1-.184.88l-4.527.395a.94.94 0 0 0-.754.506l-2.51 4.871a.47.47 0 0 1-.88-.125z",fill:"#fff",fillOpacity:".5"})}))),dk=e=>{if(e===tU.COMPILATION)return"收藏合集";if(e===tU.VIDEO);else if(e===tU.SERIES)return"收藏短剧";return"收藏作品"};var dN=e=>{let{userInfo:t,currentTab:l,topNavHeight:n=60,abTestData:r,currentSubTab:i=tU.VIDEO,onSubTabChange:d,showSearchBar:u,searchBarSlot:v,isListSelectable:m,setIsListSelectable:h}=e,[p,g]=(0,s.useState)(!1);(0,c.C)(x.w3.components.user_collection_list);let _=(0,s.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(i===tU.VIDEO){let t={},l=[];return e.forEach(e=>{l.push(e.awemeId),t[e.awemeId]=(0,iW.I)(e.awemeType)}),(0,rm.VD)({awemeIds:l.join(","),awemeTypeMap:t})}if(i===tU.COMPILATION){let t=e.map(e=>e.mixId).join(",");return(0,rm._A)({mixIds:t})}if(i===tU.SERIES){let t=e.map(e=>e.seriesId).join(",");return(0,rm.eh)({seriesIds:t})}},[i]),C=lb({maxSelectedCount:i===tU.VIDEO?100:50,operate:_,operateDesc:{operation:"取消",itemName:dk(i)},tabName:"favorite_collection",subTabName:i,isListSelectable:m,setIsListSelectable:h}),w=sF(C,lb({maxSelectedCount:50,isListSelectable:m,setIsListSelectable:h})),{changeListSelectable:b,changeShowConfirm:I,renderConfirmModal:y,selectedCount:j}=C;(0,s.useMemo)(()=>(0,o.jsxs)("div",{className:f()(sR.descText,sR.fuFang),children:[(0,o.jsx)("p",{children:"找不到内容?"}),(0,o.jsx)("p",{children:"1.某些内容格式电脑端暂不支持查看,请在 APP 查看"}),(0,o.jsx)("p",{children:"2.某些内容因作者删除或设置私密,暂时无法查看"})]}),[]);let k=e=>{if(!!e)null==d||d(e),n9(),e!==i&&(0,la.V)().scrollTo(0,0),i===tU.FAVORITE_FOLDER&&e!==tU.FAVORITE_FOLDER&&w.action.reset(),U.logInstance.sendLog("favoriteCollectionTabClick",{tab_name:e})};(0,s.useEffect)(()=>{if("favorite_collection"===l&&i===tU.COMPILATION){var e;let t=oO.Q.getItem({sKey:ig.CookieKeys.SelfTabRedDotControl})||[],l=null==t?void 0:null===(e=t.map)||void 0===e?void 0:e.call(t,e=>{let{id:t,u:l}=e;return{id:t,u:l,c:l}});oO.Q.setItem(ig.CookieKeys.SelfTabRedDotControl,l,31536e3)}},[r,l,i]),(0,s.useEffect)(()=>{null==b||b(!1)},[i,b]),tU.COMPILATION,tU.VIDEO,tU.SERIES;let[N,S]=(0,s.useState)(0);(0,s.useEffect)(()=>{!Object.values(tU).includes(i)&&(null==d||d(tU.VIDEO))},[i]),(0,s.useEffect)(()=>{(async()=>{if((0,em.DT)()&&window.TTE_ENV){let e=await aD.invoke("GET_CHANNEL_ID");(null==e?void 0:e.data)==="30033"&&g(!0)}else(0,W.CY)("xigua_webid")&&g(!0)})()},[]);let{selectItems:E,selectable:L}=w.multi.state,T=(0,s.useRef)(null),M=(0,s.useRef)(null),R=(0,s.useCallback)(async e=>{if(!!E.length&&!!L)try{await w.action.moveVideosToCollections(e,E,!1),na.F.info("添加至收藏夹成功")}catch(e){na.F.info("添加视频失败")}finally{var t;w.multi.action.updateIsSelectDisabled(!1),w.multi.action.changeListSelectable(!1),null===(t=M.current)||void 0===t||t.close()}},[w.action.moveVideosToCollections,E,L]),P=(0,s.useCallback)(async(e,t)=>{var l,n,r,i,a;try{let a=w.state.currentCollectsId;if(!E.length||!L||!a)return;let o={folder_id:"",folder_name:"",item_cnt:E.length};if(null==t?void 0:t.length)w.action.createCollection(t),o.folder_id=(null===(l=t[0])||void 0===l?void 0:l.collectionFolderId)||"",o.folder_name=(null===(n=t[0])||void 0===n?void 0:n.collectionFolderName)||"";else{let t=w.state.collectMap[e[0]];o.folder_id=(null==t?void 0:null===(r=t.info)||void 0===r?void 0:r.collectionFolderId)||"",o.folder_name=(null==t?void 0:null===(i=t.info)||void 0===i?void 0:i.collectionFolderName)||""}await w.action.removeVideosFromCollection(a,E),await w.action.moveVideosToCollections(e,E),sP("move_favorite_video_confirm",o),na.F.info("移动视频成功")}catch(e){na.F.info("移动视频失败")}finally{w.multi.action.updateIsSelectDisabled(!1),w.multi.action.changeListSelectable(!1),null===(a=T.current)||void 0===a||a.close()}},[E,L,w.state.currentCollectsId,w.state.currentCollectsInfo,w.state.collectMap,w.multi.action.updateIsSelectDisabled,w.multi.action.changeListSelectable]),A=(0,s.useCallback)(()=>{var e,t;let l=w.state.currentCollectsId;if(!!E.length&&!!L&&!!l)sP("remove_favorite_video_click",{folder_id:(null===(e=w.state.currentCollectsInfo)||void 0===e?void 0:e.info.collectionFolderId)||"",folder_name:(null===(t=w.state.currentCollectsInfo)||void 0===t?void 0:t.info.collectionFolderName)||""}),U.logInstance.sendLog("functionIconClick",{tab_name:"favorite_collection",sub_tab_name:"favorite_folder",item_cnt:j,function_name:"remove"}),w.multi.action.updateIsSelectDisabled(!0),(0,tJ.Z)({title:"是否确认移出该收藏夹?",cancelBtnText:"暂不移除",confirmBtnText:"确认移除",otherProps:{maskClosable:!1},async onConfirm(){var e,t;sP("remove_favorite_video_confrm",{folder_id:(null===(e=w.state.currentCollectsInfo)||void 0===e?void 0:e.info.collectionFolderId)||"",folder_name:(null===(t=w.state.currentCollectsInfo)||void 0===t?void 0:t.info.collectionFolderName)||"",item_cnt:E.length}),w.multi.action.updateIsSelectDisabled(!1),await w.action.removeVideosFromCollection(l,E),w.multi.action.changeListSelectable(!1)},onCancel(){w.multi.action.updateIsSelectDisabled(!1)}})},[E,L,w.state.currentCollectsId,w.state.currentCollectsInfo,w.action.removeVideosFromCollection,w.multi.action.updateIsSelectDisabled,w.multi.action.changeListSelectable]),B=(0,s.useCallback)(async()=>{let e=w.state.currentCollectsId;if(!!E.length&&!!L&&!e)U.logInstance.sendLog("functionIconClick",{tab_name:"favorite_collection",sub_tab_name:"favorite_folder",item_cnt:j,function_name:"delete_favorites"}),w.action.removeCollections(E)},[E,L,w.state.currentCollectsId,w.action.removeCollections,j]),V=(0,s.useMemo)(()=>{if([tU.VIDEO,tU.COMPILATION,tU.SERIES].includes(i)){let e=[{key:"cancel_favorite",actionText:"取消收藏",onClick:()=>{null==I||I(!0),U.logInstance.sendLog("functionIconClick",{tab_name:"favorite_collection",sub_tab_name:i,item_cnt:j,function_name:"favorite_cancel"})}}];return i===tU.VIDEO&&e.push({key:"add_favorite",actionText:"加入收藏夹",onClick:()=>{var e;null===(e=M.current)||void 0===e||e.open(),sP("pc_favourite_batch_manage_click",{tab_name:"favorite_collection"})},onShow:()=>{sP("pc_favourite_batch_manage_show",{tab_name:"favorite_collection"})}}),e}return w.state.currentCollectsId?[{key:"remove_videos",actionText:"从收藏夹移除",onClick:A},{key:"move",actionText:"移动到",icon:(0,o.jsx)(F.Z,{width:16,height:16,src:dj,viewBox:"0 0 16 17"}),onClick:()=>{var e,t,l;sP("move_favorite_video_click",{folder_id:(null===(e=w.state.currentCollectsInfo)||void 0===e?void 0:e.info.collectionFolderId)||"",folder_name:(null===(t=w.state.currentCollectsInfo)||void 0===t?void 0:t.info.collectionFolderName)||""}),U.logInstance.sendLog("functionIconClick",{tab_name:"favorite_collection",sub_tab_name:"favorite_folder",item_cnt:j,function_name:"move_favorites"}),w.multi.action.updateIsSelectDisabled(!0),null===(l=T.current)||void 0===l||l.open()}}]:[{key:"remove_collects",actionText:"删除收藏夹",onClick:B}]},[j,w.state.currentCollectsId,A,B,w.multi.action.updateIsSelectDisabled,w.state.currentCollectsInfo,i,I]),O=(0,s.useMemo)(()=>{if(i===tU.VIDEO||w.state.currentCollectsId)return"收藏的视频";if(i===tU.COMPILATION)return"收藏的合集";if(i===tU.SERIES)return"收藏的短剧";else return"收藏夹"},[i,w.state.currentCollectsId]);return(0,o.jsx)(ly.Provider,{value:(0,a._)({},C),children:(0,o.jsxs)(sB.Provider,{value:w,children:[(0,o.jsxs)("div",{className:sR.container,children:[(0,o.jsx)(iJ,{headerHeight:m?72:44,topNavHeight:n,children:(0,o.jsxs)("div",{className:f()(sR.header,{[sR.headerBg]:m}),children:[m?(0,o.jsx)(i7,{selectedText:O,operateBtns:V,currentSubTab:i,currentTab:l}):(0,o.jsx)(D.Tabs,{type:"button",className:sR.tabs,activeKey:i,onChange:e=>k(e),children:tV.map(e=>(0,o.jsx)(D.TabPane,{itemKey:e.tab,tab:(0,o.jsx)("span",{children:e.title})},e.tab))}),(0,o.jsxs)("div",{className:sR.right,children:[i===tU.VIDEO&&u&&v,(w.state.isAddVideoModalShow||!m)&&i===tU.FAVORITE_FOLDER&&(0,o.jsx)(s5,{})]})]})}),(0,o.jsxs)("div",{className:f()({[sR.default]:!m}),children:[i===tU.FAVORITE_FOLDER&&(0,o.jsx)(dy,{isListSelectable:m,setIsListSelectable:h}),i===tU.VIDEO&&(0,o.jsx)(sX,{currentTab:l,userInfo:t,topNavHeight:n,setItemCount:S,abTestData:r}),i===tU.MUSIC&&(0,o.jsx)(sM,{currentTab:l,userInfo:t,abTestData:r}),i===tU.COMPILATION&&(0,o.jsx)(oq,{userInfo:t,topNavHeight:n,setItemCount:S,abTestData:r}),i===tU.SERIES&&(0,o.jsx)(o5,{userInfo:t,topNavHeight:n,setItemCount:S})]})]}),null==y?void 0:y(),(0,o.jsx)(rI,{ref:T,selectType:"single",disabledCollectionIds:w.state.currentCollectsId?[w.state.currentCollectsId]:[],awaysReset:!0,disabledScrollBar:!0,onMove:P,onClose:()=>w.multi.action.updateIsSelectDisabled(!1)}),(0,o.jsx)(rI,{ref:M,selectType:"multi",disabledCollectionIds:w.state.currentCollectsId?[w.state.currentCollectsId]:[],awaysReset:!0,disabledScrollBar:!0,onMove:R,onClose:()=>w.multi.action.updateIsSelectDisabled(!1)})]})})},dS=l("418456"),dE={container:"Ps5HE9cr",defaultBg:"alWptK1L",backgroundBox:"dfVnv5LQ",background:"HLuzYX59",gradient:"ZhKg8rse",gradientBottom:"QYdoNmxX",gradientTop:"KcyplRnU",gradientRight:"NBYc3u2f"};let dL=e=>{var t,l,n,r;let i;let{headImageInfo:a,abTestData:s,isSelf:d}=e||{},{coverUrl:u,darkCoverColor:c}=a||{};u&&c&&(i=(0,dS.p)((0,dS.s)(c),s));let v=1;return((null==s?void 0:null===(t=s.userUiUpdate)||void 0===t?void 0:t.type)===1||!d&&(null==s?void 0:null===(l=s.userUiUpdate)||void 0===l?void 0:l.type)===2)&&(v=null==s?void 0:null===(r=s.userUiUpdate)||void 0===r?void 0:r.opacity),u?(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)("div",{className:dE.container,children:[(0,o.jsx)("div",{className:dE.backgroundBox,children:(0,o.jsx)("div",{className:dE.background,style:{backgroundImage:`url(${null==u?void 0:null===(n=u.urlList)||void 0===n?void 0:n[0]})`,opacity:v}})}),(0,o.jsx)("div",{className:dE.gradient,style:{"--bg-color":i}}),(0,o.jsx)("div",{className:dE.gradientBottom}),(0,o.jsx)("div",{className:dE.gradientTop}),(0,o.jsx)("div",{className:dE.gradientRight})]})}):(0,o.jsx)("div",{className:f()(dE.container,dE.defaultBg)})};var dT={frameContainer:"x02b7nYS",videoPerf:"RAFtOaPH",notMargin:"ZfKmVobg",batchBtn:"FmoW3iJu",tipsIcon:"zeeSspts",container:"kmCV0AYr",userContentWithSideArea:"LAXO9MqZ",userContentMain:"QZd0lRPB",userLayoutSideCard:"VNoUtV5x",listBoxContainer:"YDT737JG",notHeaderPadding:"cKXz7j16",topBackground:"bKKytpUO",listContainer:"_FpZno9W",errorContent:"sO0Sy_z_",banContainer:"MhMeOW7I",desc:"X29NVk1a",text:"CfxtQMQb",link:"uUhHQsyh",tabinner:"GMlZJGUP",tip:"N6PsT4N6",tipText:"fIIUHqLL",hasNavTab:"iNuOX3ka"};function dM(e){let{userInfo:t,children:l}=null!=e?e:{},{awemeCount:n=-1,favoritingCount:r=-1,showFavoriteList:i=!1,favoritePermission:a=0}=null!=t?t:{},{isSelf:d}=(0,s.useContext)(G),u=!d&&!i||d&&1===a,[c,v]=(0,s.useState)(n),[m,f]=(0,s.useState)(u?-1:r),[h,p]=(0,s.useState)(!1),g=(0,s.useCallback)((e,t)=>{v(l=>{let n=t?l+e:e;return n<0?0:n})},[]),_=(0,s.useCallback)((e,t)=>{!u&&f(l=>{let n=t?l+e:e;return n<0?0:n})},[u]);(0,s.useEffect)(()=>{h&&(p(!1),C.Le.setConfig(C.gI.DeletePostList,[]))},[h]);let x=(0,s.useCallback)(()=>{var e,t;let l=null!==(t=null===(e=C.Le.getConfig(C.gI.DeletePostList))||void 0===e?void 0:e.length)&&void 0!==t?t:0;l>0&&!h&&(g(-l,!0),p(!0),(0,ll.d)((0,la.V)(),0,500))},[g,h]),w=(0,s.useCallback)(()=>{var e,t;let l=null!==(t=null===(e=C.Le.getConfig(C.gI.AddPostList))||void 0===e?void 0:e.length)&&void 0!==t?t:0;l>0&&!h&&(g(l,!0),p(!0),(0,ll.d)((0,la.V)(),0,500))},[g,h]);return(0,o.jsx)(li.Provider,{value:{userAwemeCount:c,userFavoriteCount:m,updateAwemeCount:g,updateFavoriteCount:_,reloadForPostDelete:x,reloadForPostAdd:w,isPostDelete:h},children:l})}var dR=l("282390"),dD={user:"N_DlKep6",emptyWrapper:"P8ptpCmn",listSortByTime:"WSjVT7nc",date:"kYntc3B5",cardList:"qmtVkvqe",cardContainer:"RpmDkegm",loading:"ZTEzBEEL",errorWrapper:"XEgAx4L0"},dP={appointmentCard:"QUB0Cz3M",avatarWrap:"NLSm_Vff",avatar:"BYnoJkWT",info:"K4BP2umv",nameInfo:"XBL1M2Hs",nickname:"btvYmQpH",badge:"skGJZUVz",badgeIcon:"zdbJfLcV",liveExtraText:"Y4HnidVF",appointmentButton:"yDV0Jjjb",contentBlock:"OWCfhs10"};let dA=e=>{let{info:t,className:l,onClick:n,onBtnClick:r}=e,{appointmentId:i,userId:a,userSecUid:d,userAvatar:u,userNickname:c,currentRoomId:v,webRid:m,accountCertInfo:h}=t,p=(0,tI.Y)(()=>{tG.sendLog("reserveLiveCardShow",{anchor_id:a,room_id:v})}),g=!!v,_=(0,s.useMemo)(()=>({web_rid:m,enter_from_merge:"personal_homepage",action_type:"click",enter_method:"web_appointment",room_id:v}),[v]),x=(0,s.useMemo)(()=>({authorInfo:{roomData:{},roomId:v,nickname:c,title:c,secUid:d,uid:a}}),[v,c,c,d,a]);return(0,o.jsxs)("div",{className:f()(dP.appointmentCard,l),ref:p,onClick:()=>{tG.sendLog("reserveLiveCardClick",{anchor_id:a,room_id:v}),null==n||n({webRid:m,currentRoomId:v,userSecUid:d,isLiving:g})},children:[(0,o.jsx)("div",{className:dP.avatarWrap,children:g?(0,o.jsx)(eY.nh,{type:"large",src:u,alt:`${c}头像`,uid:a,liveRoomUrl:(0,eq.cc)(_),isNeedSendLog:!0,onClick:e=>{e.preventDefault()},awemeInfo:x,position:"right",zIndex:1e4}):(0,o.jsx)(eG.q,{className:dP.avatar,defaultClassName:dP.avatar,src:u,alt:`${c}头像`})}),(0,o.jsxs)("div",{className:dP.info,children:[(0,o.jsxs)("div",{className:dP.nameInfo,children:[(0,o.jsx)("div",{className:dP.nickname,children:(0,o.jsx)(et.Z,{text:c})}),(0,o.jsx)(eo.C,{iconClassName:dP.badgeIcon,accountCertInfo:h,className:dP.badge,isRoleNameShow:!1})]}),(0,o.jsx)("div",{className:dP.liveExtraText,children:function(e){let t=null==e?void 0:e.dueStartTime,l=(null==e?void 0:e.cycle)===1,n=null==e?void 0:e.scheduledWeekdays,r=["","一","二","三","四","五","六","日"];try{let e=function(e,t){if(!e)return"";let l=Q()(e),n=Q()(t),r=l.format("yyyy-MM-dd HH:mm:ss"),i=t>0?n.format("yyyy-MM-dd HH:mm:ss"):"";return i&&"00:00:00"===r.split(" ")[1]&&"23:59:59"===i.split(" ")[1]?l.isSame(n,"day")?l.format("M月D日"):`${l.format("M月D日")} ~ ${n.format("M月D日")}`:i?l.isSame(n,"day")?`${l.format("M月D日 HH:mm")} ~ ${n.format("HH:mm")}`:`${l.format("M月D日 HH:mm")} ~ ${n.format("M月D日 HH:mm")}`:l.format("M月D日 HH:mm")}(1e3*t,0);if(l){let t=null==n?void 0:n.map(e=>0===e?7:e),l=null==t?void 0:t.sort(),i=null==l?void 0:l.length;if(i){let t=l[i-1]-l[0]+1===i;if(t&&7===i)e=`${e}(每天开播)`;else if(t&&i>1)e=`${e}(每周${r[l[0]]}至周${r[l[i-1]]}开播)`;else{let t="";null==l||l.map(e=>{t+=r[e]}),e=`${e}(每周${t}开播)`}}}return e}catch(e){return""}}(t)})]}),(0,o.jsx)(D.Button,{className:dP.appointmentButton,type:"secondary",theme:"solid",onClick:e=>{e.stopPropagation(),null==r||r({appointmentId:i,userId:a,currentRoomId:v})},children:(0,o.jsx)("div",{className:dP.contentBlock,children:"已预约"})})]})};var dF=()=>{var e;let[t,l]=(0,s.useState)({}),[n,r]=(0,s.useState)(!1),[i,a]=(0,s.useState)([]),[u,v]=(0,s.useState)(!0),[m,p]=(0,s.useState)(!1),[g,_]=(0,s.useState)(!1);(0,c.C)(x.w3.components.appointment);let w=(0,s.useCallback)(async e=>{try{p(!1),_(!1),!(null==e?void 0:e.silent)&&v(!0),iL.z.markStart("user_appointment_fetch_data",{once:!0});let{statusCode:l,list:n}=await (0,iS.fetchAppointmentList)();if(iL.z.markEnd("user_appointment_fetch_data",{once:!0}),0!==l)v(!1),p(!0);else{var t;let e=null==n?void 0:null===(t=n.reduce)||void 0===t?void 0:t.call(n,(e,t)=>{let{dueStartTime:l}=t,n=Q().unix(l).format("YYYY-MM-DD"),r=e[n];return e[n]=[...r||[],t],e},{}),l=Object.entries(e).sort((e,t)=>e[0]<t[0]?-1:0).map(e=>{let[t,l]=e;return{date:function(e){let t=Q()(e);if(!t.isValid())return"";let l=C.Le.getConfig(C.gI.ServerTime),n=l?Q()(l):Q()(),r=t.isSame(n,"day"),i=t.isSame(n.subtract(1,"day"),"day"),a=t.isSame(n.add(1,"day"),"day");if(r)return"今天";if(i)return"昨天";if(a)return"明天";return n.format("YYYY")===t.format("YYYY")?t.format("MM月DD日"):t.format("YY年MM月DD日")}(t),list:l}});v(!1),a(l)}}catch(e){v(!1),_(!0)}},[]);r1(()=>{w({silent:!0})},[w]);let b=(0,s.useCallback)(async()=>{try{var e;let{appointmentId:l,userId:n,currentRoomId:i}=t,o=await (0,iS.cancelAppointment)({appointment_id:l});(null==o?void 0:o.statusCode)===0&&(null==o?void 0:null===(e=o.data)||void 0===e?void 0:e.responseStatus)===1?(tG.sendLog("reserveLiveCardCancel",{anchor_id:n,room_id:i}),r(!1),a(e=>(e.forEach((t,n)=>{let{list:r}=t,i=r.findIndex(e=>e.appointmentId===l);i>-1&&(r.splice(i,1),0===r.length&&e.splice(n,1))}),[...e]))):ei.F.info("取消预约失败")}catch(e){ei.F.info("取消预约失败")}},[t]),I=(0,s.useCallback)(e=>{l(e),r(!0)},[]),y=(0,s.useCallback)(e=>{let{webRid:t,currentRoomId:l,userSecUid:n,isLiving:r}=e;if(r){let e=(0,eq.cc)({web_rid:t,enter_from_merge:"personal_homepage",enter_method:"web_appointment",action_type:"click",room_id:l});window.open(e,"_blank","noopener")}else{let e=(0,eq.HC)(n,(0,d.stringify)({enter_from:"personal_homepage",enter_method:"web_appointment"}));window.open(e,"_blank","noopener")}},[]);return(0,s.useEffect)(()=>{w()},[]),(0,o.jsxs)("div",{className:dD.user,children:[null==i?void 0:null===(e=i.map)||void 0===e?void 0:e.call(i,e=>{var t;let{date:l,list:n}=e;return(0,o.jsxs)("div",{className:dD.listSortByTime,children:[(0,o.jsx)("div",{className:f()(dD.date,"user_record_date"),children:l}),(0,o.jsx)("div",{className:dD.cardList,children:null==n?void 0:null===(t=n.map)||void 0===t?void 0:t.call(n,e=>(0,o.jsx)(dA,{info:e,className:dD.cardContainer,onClick:y,onBtnClick:I},e.appointmentId))})]},l)}),!u&&!m&&!g&&0===i.length&&(0,o.jsx)(V.H,{className:dD.emptyWrapper,needRenderIconInSSR:!0,icon:(0,o.jsx)(lq.Z,{}),title:"暂无内容",desc:"暂无预约记录"}),u&&(0,o.jsx)(h.gb,{className:dD.loading}),m&&(0,o.jsx)("div",{className:dD.errorWrapper,children:(0,o.jsx)(N.nl,{secondaryButtonTitle:"刷新",secondaryButtonAction:w})}),g&&(0,o.jsx)("div",{className:dD.errorWrapper,children:(0,o.jsx)(N.oO,{secondaryButtonAction:w})}),(0,o.jsx)(dR.Z,{show:n,setShow:r,contentText:"确认取消该直播预约吗?",confirmText:"取消预约",cancelText:"返回",onConfirm:b})]})},dB={header:"fWiOTFlF",headerBg:"AJ4GLtlp",like:"qOowT99m",likeNoMarginTop:"X8Xvnrn_",errorContent:"EKmK80cC",empty:"AUX6rIsK",privacySetting:"q2cWt4VD",content:"WhMvmWYU",lockIcon:"FcbAAHX7",downIcon:"RrHC7wcS",dropDownPanel:"cXZFmMrd",item:"xtyEeoMK",active:"HIeb0jbJ"};let dU=(0,s.forwardRef)((e,t)=>(0,o.jsx)("svg",(0,R._)((0,a._)({xmlns:"http://www.w3.org/2000/svg",width:15,height:15,fill:"none",ref:t},e),{children:(0,o.jsx)("path",{d:"M7.5.938a3.516 3.516 0 0 0-3.516 3.515v1.735A1.72 1.72 0 0 0 2.5 7.89v4.453c0 .949.77 1.719 1.719 1.719h6.562c.95 0 1.719-.77 1.719-1.72V7.892a1.72 1.72 0 0 0-1.484-1.703V4.453A3.516 3.516 0 0 0 7.5.937zm2.11 5.234H5.39V4.453a2.11 2.11 0 0 1 4.22 0v1.719z",fill:"#fff",fillOpacity:".5"})}))),dV=(0,s.forwardRef)((e,t)=>(0,o.jsx)("svg",(0,R._)((0,a._)({xmlns:"http://www.w3.org/2000/svg",width:16,height:17,fill:"none",ref:t},e),{children:(0,o.jsx)("path",{d:"M12 6.5l-4 4-4-4",stroke:"#fff",strokeOpacity:".5",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})}))),dO={0:"互相关注的人可见",1:"粉丝可见"},dH=[{id:0,label:dO[0]},{id:1,label:dO[1]}],dz=()=>{let[e,t]=(0,s.useState)(0),[l,n]=(0,s.useState)(!1),r=e=>{t(e),(0,aP.a3)({on:!!e,field:"recommend_visibility"})};return(0,s.useEffect)(()=>{(async()=>{let{data:e,statusCode:l}=await (0,aP.s$)();if(0===l){let{recommendVisibility:l}=e;t(l)}})()},[]),(0,o.jsxs)("div",{className:dB.privacySetting,onMouseEnter:()=>{n(!0)},onMouseLeave:()=>{n(!1)},children:[(0,o.jsxs)("div",{className:dB.content,children:[(0,o.jsx)(sl.Z,{className:dB.lockIcon,src:dU,width:15,height:15,viewBox:"0 0 15 15"}),"仅",dO[e],(0,o.jsx)(sl.Z,{className:dB.downIcon,src:dV,width:16,height:17,viewBox:"0 0 16 17"})]}),l&&(0,o.jsx)("div",{className:dB.dropDownPanel,children:dH.map(t=>(0,o.jsx)("div",{className:f()(dB.item,{[dB.active]:t.id===e}),onClick:()=>r(t.id),children:t.label},t.id))})]})};var dZ=e=>{var t;let{userInfo:l,currentTab:n,topNavHeight:r=60,abTestData:i,showSearchBar:a,searchBarSlot:d,isListSelectable:u}=e,v=(0,nl.o)(null==l?void 0:l.secUid),{isSelf:m}=null!==(t=(0,s.useContext)(G))&&void 0!==t?t:{},h=(0,s.useRef)(0),p=(0,s.useRef)(0),g=(0,s.useRef)({}),_=(0,s.useRef)([]);(0,c.C)(x.w3.components.user_like);let C=(0,s.useRef)(),{doIncrementalUpdate:w}=ac({getExistingList:()=>{var e,t;return(null===(t=C.current)||void 0===t?void 0:null===(e=t.getDataList)||void 0===e?void 0:e.call(t))||[]},fetchData:async e=>{var t;let l=await n1.qy.request({cached:!1,consume:!0,params:{userId:v,maxCursor:e,count:18}});return{data:l.data||[],maxCursor:l.maxCursor||0,hasMore:null!==(t=l.hasMore)&&void 0!==t?t:0,statusCode:l.statusCode}},setDataList:e=>{var t,l;null===(l=C.current)||void 0===l||null===(t=l.setScrollData)||void 0===t||t.call(l,{dataList:e})}});r1(w,[v]);let b=(0,s.useCallback)(async()=>{iL.z.markStart("user_recommend_fetch_data",{once:!0});let{data:e=[],maxCursor:t=0,hasMore:l,statusCode:n,logPb:r,whaleInfo:i}=await av(e=>{var t;return n1.qy.request({consume:!0,params:{userId:v,maxCursor:e,count:18,whaleCutToken:null===(t=g.current)||void 0===t?void 0:t.whaleCutToken},fetcherOptions:{resetExpiredCacheBefore:!1,hoverDelay:!1}})},p.current);iL.z.markEnd("user_recommend_fetch_data",{once:!0});let a=e.length<6?h.current:p.current;return e.map(e=>(e.cursor=a,e)),!n&&(h.current=p.current,p.current=t,g.current={whaleCutToken:null==i?void 0:i.whaleCutToken}),{data:tR(e,_.current),maxCursor:t,hasMore:l,statusCode:n,whaleDecisionCustom:null==i?void 0:i.whaleDecisionCustom,logPb:r,clearBefore:0===h.current}},[v,i,m]),I=(0,s.useCallback)(()=>{p.current=0,g.current={}},[]),{profileTabInfo:y}=l||{},j=(0,s.useMemo)(()=>{var e,t;return null==y?void 0:null===(t=y.profile_tab_list_v2)||void 0===t?void 0:null===(e=t.find)||void 0===e?void 0:e.call(t,e=>(null==e?void 0:e.name_en)==="familiar_recommend_tab")},[y]);return m||j?(0,o.jsxs)("div",{className:f()(dB.like,{[dB.likeNoMarginTop]:m}),"data-e2e":"user-like-list",children:[m&&(0,o.jsx)(iJ,{headerHeight:u?72:44,topNavHeight:r,children:(0,o.jsxs)("div",{className:f()(dB.header,{[dB.headerBg]:u}),children:[a&&d,(0,o.jsx)(dz,{})]})}),(0,o.jsx)(iN,{modalEnterFrom:lS.a.UserRecommend,ref:C,resetStatusFunc:I,uid:v,tab:"recommend",currentTab:n,defaultRes:{statusCode:0,data:[],hasMore:1,cursor:0,maxCursor:0},fetchMoreData:b,retryTimes:5,panelNoData:m?(0,o.jsx)(aS,{className:dB.empty,title:"暂无推荐的视频"}):void 0,topNavHeight:r})]}):(0,o.jsx)(V.H,{icon:(0,o.jsx)(lq.Z,{}),title:"推荐内容不可见",className:dB.errorContent})},dW=l("614170"),d$="vkgoGDrs",dK="lcnQvLO6",dY="eM_dLX8_";l("313036");var dG=l("226210"),dq=l("970473"),dX={aiNoteCardWrapper:"DuD_Y7ev",topContent:"eS4rz5KU",moreInfo:"lwn6bwIG",moreIconContainer:"n3Xq8PeO",title:"c90akOT0",description:"f_heiu3o",date:"stTQ5vYU",moreBtn:"u23udUeP",bottomContent:"MqllYoPR",videoImage:"cWPVoqOl",videoTitle:"Z_e9Zf4u",dropdownMenuItem:"bJYXfoaP"};l("683656");let dQ=e=>e?e.replace(/#{1,6}\s+/g,"").replace(/(\*\*|__)(.*?)\1/g,"$2").replace(/(\*|_)(.*?)\1/g,"$2").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/!\[([^\]]*)\]\([^)]+\)/g,"$1").replace(/`([^`]+)`/g,"$1").replace(/```[\s\S]*?```/g,"").replace(/^[*-+]\s+/gm,"").replace(/^\d+\.\s+/gm,"").replace(/^>\s+/gm,"").replace(/^[-*_]{3,}\s*$/gm,"").replace(/\n{3,}/g,"\n\n").trim():"",dJ=e=>{let t=null==e?void 0:e.match(/#([\s\S]*?)(?=\n|$)/);return t?dQ(t[1]):""},d0=e=>{if(!e)return"";if(!dJ(e))return dQ(e);let t=e.split("\n"),l=t.findIndex(e=>""!==e.trim());if(-1===l)return"";let n=t.slice(l+1);return 0===n.length?"":dQ(n.join("\n").replace(/<chaptertime\s+data-time=['"]((?:\d{1,2}:)?\d{1,2}:\d{2})['"]\s*\/>/g,(e,t)=>t.startsWith("00:")?t.substring(3):t))},d1="ai_note",d2=e=>{var t;let{aiNote:l,onClick:n,onDeleteSuccess:r,index:i}=e,{title:d,description:u,modifyTime:c,relatedItemInfo:v,draft:m,isRunning:f}=l,h=d||dJ(u)||dJ(m)||(f?"AI 笔记生成中":"未命名新笔记"),p=d0(u)||d0(m)||(f?"请等待 1-2 分钟":"记录你的想法,一键生成 AI 笔记"),g=(null==v?void 0:v.name)||(null==v?void 0:v.desc)||"",_=null==v?void 0:null===(t=v.video)||void 0===t?void 0:t.cover,[x,C]=(0,s.useState)(!1),w=async e=>{var t,n,i;e.stopPropagation(),C(!1);let o={enter_from:(0,Z.yW)(),enter_method:"personal_homepage",note_id:l.noteId,group_id:null===(t=l.relatedItemInfo)||void 0===t?void 0:t.awemeId,author_id:null===(i=l.relatedItemInfo)||void 0===i?void 0:null===(n=i.authorInfo)||void 0===n?void 0:n.uid};dq.K.sendLog("pcAiNoteDeletePopShow",o),(0,tJ.Z)({title:"是否确认删除该 AI 笔记",cancelBtnText:"暂不删除",confirmBtnText:"确认删除",onConfirm:async()=>{if(!!l.noteId)try{let e=await (0,Y.HV)({noteId:l.noteId});if(0===e.statusCode)r(l.noteId),dq.K.sendLog("pcAiNoteDeleteResult",(0,a._)({result_type:"success"},o));else throw Error("删除失败")}catch(e){ei.F.info("删除失败"),dq.K.sendLog("pcAiNoteDeleteResult",(0,a._)({result_type:"fail"},o))}}})},b=(0,tI.x)(()=>{var e,t,n,r,i,a,o,s,d,u,c,v,m,f;dq.K.sendLog("aiNoteButtonShow",{enter_from:(0,Z.yW)(),enter_method:"personal_homepage",note_id:l.noteId,group_id:null===(e=l.relatedItemInfo)||void 0===e?void 0:e.awemeId,author_id:null===(n=l.relatedItemInfo)||void 0===n?void 0:null===(t=n.authorInfo)||void 0===t?void 0:t.uid,player_display_mode:(0,tu.Ok)()}),tG.sendLog("collectionCoverShow",{tab_name:d1,enter_from:(0,Z.yW)(),note_id:l.noteId,author_id:null===(i=l.relatedItemInfo)||void 0===i?void 0:null===(r=i.authorInfo)||void 0===r?void 0:r.uid,group_id:null===(a=l.relatedItemInfo)||void 0===a?void 0:a.awemeId,from_xigua:(null===(o=l.relatedItemInfo)||void 0===o?void 0:o.awemeType)===nJ.e.XgVideo?1:0,aweme_type:null===(s=l.relatedItemInfo)||void 0===s?void 0:s.awemeType,enter_method:"click_tab",is_co_publish:Number(null===(c=l.relatedItemInfo)||void 0===c?void 0:null===(u=c.cooperationInfo)||void 0===u?void 0:null===(d=u.cooperationCreators)||void 0===d?void 0:d.length)>1?1:0,co_publish_author_list:null===(f=l.relatedItemInfo)||void 0===f?void 0:null===(m=f.cooperationInfo)||void 0===m?void 0:null===(v=m.cooperationCreators)||void 0===v?void 0:v.filter(e=>e.roleId!==ee.iG.Author).map(e=>`${e.uid}_${null==e?void 0:e.roleId}`)})});return(0,o.jsxs)("div",{ref:b,className:dX.aiNoteCardWrapper,onClick:()=>{var e,t,r,a,o,s,d,u;n(),dq.K.sendLog("aiNoteButtonEnter",{enter_from:(0,Z.yW)(),enter_method:"personal_homepage",note_id:l.noteId,group_id:null===(e=l.relatedItemInfo)||void 0===e?void 0:e.awemeId,author_id:null===(r=l.relatedItemInfo)||void 0===r?void 0:null===(t=r.authorInfo)||void 0===t?void 0:t.uid,player_display_mode:(0,tu.Ok)()}),tG.sendLog("collectionCoverClick",{tab_name:d1,note_id:l.noteId,author_id:null===(o=l.relatedItemInfo)||void 0===o?void 0:null===(a=o.authorInfo)||void 0===a?void 0:a.uid,group_id:null===(s=l.relatedItemInfo)||void 0===s?void 0:s.awemeId,enter_from:(0,Z.yW)(),from_xigua:(null===(d=l.relatedItemInfo)||void 0===d?void 0:d.awemeType)===nJ.e.XgVideo?1:0,aweme_type:null===(u=l.relatedItemInfo)||void 0===u?void 0:u.awemeType,rank:i})},children:[(0,o.jsxs)("div",{className:dX.topContent,children:[(0,o.jsx)("div",{className:dX.title,children:h}),(0,o.jsx)("div",{className:dX.description,children:p}),(0,o.jsxs)("div",{className:dX.moreInfo,children:[(0,o.jsx)("div",{className:dX.date,children:c?Q()(1e3*Number(c)).format("YYYY年MM月DD日 \xb7 HH:mm"):""}),(0,o.jsx)(D.Dropdown,{trigger:"custom",visible:x,onClickOutSide:e=>{e.stopPropagation(),C(!1)},position:"bottomLeft",stopPropagation:!0,render:(0,o.jsx)(D.Dropdown.Menu,{children:(0,o.jsx)(D.Dropdown.Item,{onClick:w,className:dX.dropdownMenuItem,disabled:f,children:"删除"})}),children:(0,o.jsx)("div",{className:dX.moreIconContainer,onClick:e=>{e.stopPropagation(),C(!0)},children:(0,o.jsx)(ew.z,{svg:(0,o.jsx)(dG.Z,{}),className:dX.moreIcon})})})]})]}),(0,o.jsxs)("div",{className:dX.bottomContent,children:[(0,o.jsx)("img",{src:_,className:dX.videoImage}),(0,o.jsx)("div",{className:dX.videoTitle,children:g})]})]})},d3=e=>{let{abTestData:t}=e,[l,n]=(0,s.useState)(1),[r,i]=(0,s.useState)([]),a=(0,s.useMemo)(()=>r.map(e=>e.relatedItemInfo),[r]),o=e=>e.filter(e=>!!e.relatedItemInfo);return{setAiNoteList:i,aiNoteAwemeList:a,fetchMoreData:async()=>{try{var e;let t=await (0,Y.yu)({offset:(10*(l-1)).toString(),count:"10",filter_draft:!0});if(!t)return{statusCode:-1,data:[],hasMore:!1};if(0!==t.statusCode)return{statusCode:t.statusCode||-1,data:[],hasMore:!1};return t.hasMore&&n(l+1),{statusCode:0,data:o(t.aiNoteList||[]),hasMore:null!==(e=t.hasMore)&&void 0!==e&&e}}catch(e){return{statusCode:-1,data:[],hasMore:!1}}},dataFilter:o}};var d5="B56m6MUL";let d6=()=>(0,o.jsxs)(D.Skeleton,{className:d5,active:!0,children:[(0,o.jsxs)("div",{children:[(0,o.jsx)(D.Skeleton.Title,{}),(0,o.jsx)(D.Skeleton.Paragraph,{rows:2})]}),(0,o.jsxs)("div",{children:[(0,o.jsx)(D.Skeleton.Image,{}),(0,o.jsx)(D.Skeleton.Title,{})]})]}),d4=e=>{let{currentNumber:t,setCurrentNumber:l,awemeInfoList:n,setAwemeInfoList:r,aiNoteAwemeList:i,scrollRef:a,modalVideoIndex:o,additionalDistance:d=-60}=e,[u,c]=(0,s.useState)(!1),v=(0,s.useRef)(t),m=(0,s.useRef)(-1),f=(0,s.useRef)(o);return(0,s.useEffect)(()=>{f.current=o},[o]),(0,s.useEffect)(()=>()=>{var e;if(f.current===v.current)return;let t=is(),l=e=>Math.floor(e/t);if(l(f.current)!==l(v.current))null===(e=a.current)||void 0===e||e.locateSelectVideo(v.current<=m.current?v.current:m.current,d)},[]),(0,s.useEffect)(()=>{(null==n?void 0:n.length)>o&&-1===t&&l(o||0)},[n]),(0,s.useEffect)(()=>{r(()=>(m.current=(null==i?void 0:i.length)-1,i))},[i]),{isTabFeed:u}},d7=(0,i_.ZP)(()=>Promise.all([l.e("23634"),l.e("73286"),l.e("41162"),l.e("42422"),l.e("15799"),l.e("21133"),l.e("28161"),l.e("73356"),l.e("69855"),l.e("5974"),l.e("42794"),l.e("15915"),l.e("72230"),l.e("68055"),l.e("44077"),l.e("51705"),l.e("24882"),l.e("73481"),l.e("10771"),l.e("6593"),l.e("6757"),l.e("44882"),l.e("64942"),l.e("26973"),l.e("74352"),l.e("90597")]).then(l.bind(l,604467)),{ssr:!1}),d9=(0,s.forwardRef)((e,t)=>{var{scrollRef:l}=e,n=(0,ih._)(e,["scrollRef"]);let r=e=>{var t;let n=(null===(t=l.current)||void 0===t?void 0:t.getDataList())||[];return e.map(e=>{if("relatedItemInfo"in e)return e;let t=n.find(t=>{var l;return(null===(l=t.relatedItemInfo)||void 0===l?void 0:l.awemeId)===e.awemeId});return t?(0,R._)((0,a._)({},t),{relatedItemInfo:e}):null}).filter(Boolean)};return(0,s.useImperativeHandle)(t,()=>l.current?(0,R._)((0,a._)({},l.current),{setScrollData:e=>{var t;let n=r(e.dataList);null===(t=l.current)||void 0===t||t.setScrollData((0,R._)((0,a._)({},e),{dataList:n}))}}):{},[l]),(0,o.jsx)(d7,(0,a._)({scrollRef:t},n))}),d8=e=>{var t,l,n,r,i,a,d,u,c;let{userInfo:v}=e,m=null!==(d=(0,K._)())&&void 0!==d?d:{},{setAiNoteList:f,aiNoteAwemeList:h,fetchMoreData:p,dataFilter:g}=d3({abTestData:m}),_=(0,nn.m)(),x=(0,s.useRef)(null),C=(0,nl.o)(null==v?void 0:v.secUid),w=null!==(u=(0,eH.useUserInfoContext)())&&void 0!==u?u:{},{isSelf:b}=null!==(c=(0,s.useContext)(G))&&void 0!==c?c:{},[I,y]=(0,s.useState)(-1),j=null==w?void 0:null===(l=w.userInfo)||void 0===l?void 0:null===(t=l.info)||void 0===t?void 0:t.uid,k=(0,s.useRef)(null),N=(0,s.useRef)(),[S,E]=(0,s.useState)(!1),L=(e,t)=>{if(!!e)N.current=e,y(t),E(!0)},T=e=>{if(!x.current)return;let t=x.current.getDataList().filter(t=>t.noteId!==e);x.current.setScrollData({dataList:t}),ei.F.info("删除成功")};return r1(async()=>{try{let n=await (0,Y.yu)({offset:"0",count:"10",filter_draft:!0});if(n&&0===n.statusCode){var e,t,l;let r=(n.aiNoteList||[]).filter(e=>!!e.relatedItemInfo);null===(t=x.current)||void 0===t||null===(e=t.resetRes)||void 0===e||e.call(t,{statusCode:0,dataList:r,hasMore:null!==(l=n.hasMore)&&void 0!==l&&l})}}catch(e){}},[]),(0,o.jsxs)("div",{className:d$,children:[(0,o.jsx)(lA.Z,{ref:x,scrollContainerEl:_,renderItem:(e,t)=>(0,o.jsx)(d2,{aiNote:e,onClick:()=>L(e.relatedItemInfo,t),onDeleteSuccess:T,index:t},e.noteId),itemClassName:dY,dataFilter:g,fetchMoreData:p,panelNoData:(0,o.jsx)(V.H,{className:dK,needRenderIconInSSR:!0,icon:(0,o.jsx)(lq.Z,{}),title:"暂无内容",desc:"暂无 AI 笔记"}),needSkelton:!0,skeletonNum:16,retryTimes:5,SkeletonComponent:d6,setDataList:f}),S&&(0,o.jsx)(d9,{defaultOpenedCardType:"ai",defaultOpenedCardExtraProps:{tab:dW.X.Note,aiNoteEnterMethod:"personal_homepage",awemeId:null===(n=N.current)||void 0===n?void 0:n.awemeId},modalEnterFrom:"aiNote",uid:C,userContext:w,abtestData:m,isSelf:b,anyHooks:d4,originAwemeInfo:N.current,aiNoteAwemeList:h,scrollRef:x,ref:k,modalVideoIndex:I,additionalDistance:-150,moreBoxShowList:{notInterestingIcon:!1,unfollow:!0,report:(null===(i=N.current)||void 0===i?void 0:null===(r=i.authorInfo)||void 0===r?void 0:r.uid)!==j,dataAnalysis:!1,deleteSelfPost:b},logParams:{tab_name:"ai_note"},close:()=>{y(-1),E(!1)},shortCutFilteredList:[null===(a=lE.getShortcut().dislike)||void 0===a?void 0:a.key],scene:"ai_note"})]})},ue=s.memo(e=>{let{tabName:t,isActive:l,cacheEnabled:n,children:r}=e;return(0,o.jsx)(nu.Provider,{value:{isActive:l,tabName:t,cacheEnabled:n},children:(0,o.jsx)("div",{style:{display:l?"block":"none"},children:r})})});ue.displayName="TabCachePane";var ut=e=>{let{currentTab:t,tabs:l,enableCache:n=!1,cacheTtl:r=36e5}=e,i=(0,s.useRef)(new Map),a=(0,s.useCallback)(e=>(!i.current.has(e)&&i.current.set(e,{visited:!1,lastActiveTime:0,version:0}),i.current.get(e)),[]),d=(0,s.useMemo)(()=>{let e=Date.now();return l.map(l=>{let n=a(l.name),i=l.name===t,o=!!l.noCache;return i&&(n.visited?!o&&n.lastActiveTime>0&&e-n.lastActiveTime>r&&(n.version+=1):(n.visited=!0,n.lastActiveTime=e),n.lastActiveTime=e),{name:l.name,render:l.render,isActive:i,noCache:o,visited:n.visited,version:n.version}})},[t,l,a,r]);if(!n){let e=l.find(e=>e.name===t);return e?(0,o.jsx)(nu.Provider,{value:{isActive:!0,tabName:t,cacheEnabled:!1},children:e.render()}):null}return(0,o.jsx)(o.Fragment,{children:d.map(e=>{if(e.noCache)return e.isActive?(0,o.jsx)(ue,{tabName:e.name,isActive:!0,cacheEnabled:!1,children:e.render()},`${e.name}-nocache`):null;return e.visited?(0,o.jsx)(ue,{tabName:e.name,isActive:e.isActive,cacheEnabled:!0,children:e.render()},`${e.name}-v${e.version}`):null})})};let ul=(0,s.forwardRef)((e,t)=>(0,o.jsx)("svg",(0,R._)((0,a._)({width:15,height:16,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.5 15.473a7.5 7.5 0 1 0 0-15 7.5 7.5 0 0 0 0 15zm.034-12c-.956 0-1.842.367-2.45 1.076-.076.089-.162.22-.243.36-.209.357-.056.805.308.999l.027.014c.396.211.842-.003 1.114-.36.3-.393.715-.588 1.244-.588.787 0 1.338.327 1.338.992 0 .536-.427.94-.91 1.371l-.03.028c-.517.469-1.05.953-1.277 1.857-.01.04-.02.088-.028.14-.077.464.31.86.779.86.423 0 .753-.33.858-.74a.984.984 0 0 1 .027-.092c.185-.512.535-.848.885-1.152.676-.6 1.324-1.227 1.324-2.272 0-1.619-1.366-2.493-2.966-2.493zm-.034 7.5a1.125 1.125 0 1 0 0 2.25 1.125 1.125 0 0 0 0-2.25z",fill:"#2F3035",fillOpacity:".4"})}))),un={[ee.n0.DEFAULT]:60,[ee.n0.HEADER_VARIANT_66]:66,[ee.n0.HEADER_VARIANT_68]:68,[ee.n0.HEADER_VARIANT_72]:72},ur=()=>{let e=document.documentElement.getAttribute("header-variant");return e===ee.n0.HEADER_VARIANT_66?66:e===ee.n0.HEADER_VARIANT_72?72:56},ui=()=>{let[e,t]=(0,s.useState)(ur());return(0,s.useEffect)(()=>{60===e&&t(un[ee.n0.HEADER_VARIANT_68])},[e]),(0,s.useEffect)(()=>{let e=$.listen($.EVENT.headerHeightChange,e=>{let{header_type:l}=e;t(un[l])});return()=>{null==e||e()}},[]),{topNavHeight:e}};var ua=l("356336"),uo=l("237869"),us=l("19277"),ud=l("449716"),uu=l("991742"),uc=l("532375"),uv=l("995898"),um=l("193143");let uf=e=>"record"===e?"record_card":e,uh=(e,t)=>{var l,n,r,i,o,s;let u=null==e?void 0:e.uid;if(!u)return;let c={post:null==e?void 0:e.awemeCount,like:null==e?void 0:e.favoritingCount,favorite_collection:null==e?void 0:null===(r=e.userCollectCount)||void 0===r?void 0:null===(n=r.collectCountList)||void 0===n?void 0:null===(l=n[0])||void 0===l?void 0:l.collectCount,watch_later:null==e?void 0:e.watchLaterCount},{query:v={}}=d.parseUrl(location.href),m=uf(null!==(o=null!==(i=v.showTab)&&void 0!==i?i:(0,W.Rs)("showTab"))&&void 0!==o?o:"post"),f=c[m],h={};["enter_from","enter_method","from_gid","is_full_screen","tab_name","list_name","is_search","nt","event_page","enter_from_merge","fir_previous_page","is_personal_panel_video","from_tab_name"].forEach(e=>{var t;return h[e]=null!==(t=v[e])&&void 0!==t?t:(0,W.Rs)(e)}),lC.sendLog(t?"enterPersonalHomepage":"enterPersonalDetail",(0,R._)((0,a._)({},h),{to_user_id:u,is_private:Number(!t&&(null==e?void 0:e.secret)),tab_name:m,video_num:f,relation:!t&&(null==e?void 0:e.followStatus),is_personal_panel_video:Number((null!==(s=v.is_personal_panel_video)&&void 0!==s?s:(0,W.Rs)("is_personal_panel_video"))||0)}))},up=e=>{let{isSelf:t,userInfo:l,tab:n}=e,r=(0,s.useRef)(!0);(0,s.useEffect)(()=>{if(!!t){if(r.current){r.current=!1;return}uh(l,t)}},[t,null==l?void 0:l.uid,n])};var ug=l("50331"),u_=l("147597"),ux=new eU.h({personalPageWidgetAddShow:{eventName:"personal_page_widget_add_show",params:{}},personalPageWidgetAddClick:{eventName:"personal_page_widget_add_click",params:{}},personalPageWidgetAddClose:{eventName:"personal_page_widget_add_close",params:{}}}),uC="qYHEbWl_",uw="S61OiM_3",ub="ExacA9eu",uI="xIzoG6Cr",uy="R5E8jIfy",uj="T511e4ne";let uk=e=>{let{showTab:t}=e,[l,n]=(0,s.useState)(!1),r=()=>{n(!0),(0,ip.qQ)(ig.LocalStorageKeys.DesktopSelfPageWidgetLastShowTime,Date.now());let e=Number((0,ip.$o)(ig.LocalStorageKeys.DesktopSelfPageWidgetShowNum))||0;(0,ip.qQ)(ig.LocalStorageKeys.DesktopSelfPageWidgetShowNum,e+1)},i=async()=>{if(l||!t||!["like","favorite_collection","record"].includes(t))return;let e=Number((0,ip.$o)(ig.LocalStorageKeys.DesktopSelfPageWidgetLastShowTime))||0;if((Number((0,ip.$o)(ig.LocalStorageKeys.DesktopSelfPageWidgetShowNum))||0)>=3||Date.now()-e<6048e5)return;let{data:n}=await aD.invoke("canSetDesktopSelfPageWidget"),{data:i}=await aD.invoke("hasSetDesktopSelfPageWidget");!i&&n&&r()};(0,s.useEffect)(()=>{i()},[t]);let a=(0,s.useCallback)(()=>{n(!1),ux.sendLog("personalPageWidgetAddClose")},[]),d=(0,s.useCallback)(()=>{ux.sendLog("personalPageWidgetAddClick"),aD.invoke("setDesktopSelfPageWidgetState",!0).then(e=>{(null==e?void 0:e.code)===ug.jK.Success?(n(!1),D.Toast.info("添加成功")):D.Toast.info("添加失败")})},[]);return((0,s.useEffect)(()=>{l&&ux.sendLog("personalPageWidgetAddShow")},[l]),l)?(0,o.jsxs)("div",{className:uC,children:[(0,o.jsx)("div",{className:ub}),(0,o.jsx)("div",{className:uj,onClick:a,children:(0,o.jsx)(ew.z,{svg:(0,o.jsx)(u_.Z,{style:{fontSize:"16px"}})})}),(0,o.jsxs)("div",{className:uI,children:[(0,o.jsx)("h2",{children:"添加「喜欢/收藏/历史」到桌面"}),(0,o.jsx)("p",{className:uy,children:"添加后,可在桌面快速复访内容"}),(0,o.jsx)(D.Button,{type:"primary",theme:"solid",className:uw,onClick:d,children:"立即添加"})]})]}):(0,o.jsx)(o.Fragment,{})},uN=e=>{let{toUid:t,fromUid:l,isSelf:n,isLogin:r,recordParams:i,abTestData:a}=e,o=(0,s.useRef)({}),d=(0,s.useMemo)(()=>`${l}_${t}`,[l,t]),u=async()=>{if(!!i)try{let e=await (0,iS.reportUserVisitedRecord)({recordParams:i});(null==e?void 0:e.statusCode)===0?o.current[d]=!0:o.current[d]=!1}catch(e){o.current[d]=!1}};(0,s.useEffect)(()=>{!o.current[d]&&!n&&r&&(o.current[d]=!0,u())},[n,r,d,i,a])},uS=e=>{let{uid:t,abTestData:l,isSelf:n}=e,r=(0,s.useRef)({}),[i,a]=(0,s.useState)({freqVisitPerm:!0,webcastRecords:!0}),o=async()=>{if(r.current[t])return;let{data:e,statusCode:l}=await (0,aP.s$)();0===l&&(a(e),r.current[t]=!0)};return(0,s.useEffect)(()=>{n&&t&&o()},[n,t]),i};var uE=l("889429");let uL=e=>{let{abTestData:t}=e;return!(0,uE.km)(78)},uT=["favorite_collection"],uM=(e,t)=>{let l=["post","like","recommend","favorite_collection","record","watch_later","my_appointment"];return t&&l.push("ai_note"),e?l:["post","like","recommend"]};var uR=e=>{var t,l,n,r,i,u,c,v,m,h,p,_,C,w,b,I,y,j,k,N,S,E,L;let{userInfo:T,showTab:M,showSubTab:X,locationSearch:Q,isOnUserPage:J,logId:ee,defaultMixRes:et,defaultSeriesRes:el,defaultPostRes:en,lastdate:er,isClient:ei,osInfo:ea,isHideImpInfo:eo}=e,{uid:es,secret:ed,followStatus:eu}=T||{},{isSelf:ec=!1}=null!==(v=(0,s.useContext)(G))&&void 0!==v?v:{},ev=(0,s.useRef)(null),em=null!==(m=(0,K._)())&&void 0!==m?m:{},ef=uL({abTestData:em}),eh=!!(null==em?void 0:em.disabledAiNoteEntry),[ep,eg]=(0,s.useState)(!1),e_=ef&&(!eh||ep),{isMobile:ex,isiPad:eC}=(0,g.X)(),ew=uS({isSelf:ec,uid:es,abTestData:em}),{userInfo:eb,dispatch:eI}=null!==(h=(0,eH.useUserInfoContext)())&&void 0!==h?h:{},ey=uM(ec,e_),ej=ey.includes(M)?M:"post",[ek,eN]=(0,s.useState)(ej),[eS,eE]=(0,s.useState)(X||tH.VIDEO),eL=(0,s.useRef)({[ej]:X||tH.VIDEO}),eT=!!(null==em?void 0:null===(t=em.userPageCache)||void 0===t?void 0:t.enable),eM=(0,s.useRef)(new Set([ej])),eR=(0,s.useRef)(J);(0,s.useEffect)(()=>{let e=!1===eR.current;if(eR.current=J,!J||!e)return;let t=new URLSearchParams(window.location.search).get("showTab")||M,l=ey.includes(t)?t:"post";if(l!==ek){eN(l);let e=eL.current[l];void 0!==e&&eE(e)}eT&&((0,z.tl)("page_cache_active_time"),(0,z.tl)("user_tab_change"),(0,z.tl)("user_tab_change_cache"),(0,z.B1)({tag:"page_cache_active_time"}),requestAnimationFrame(()=>{(0,z.B1)({tag:x.w3.moment.first_img_render_time});let e=(0,z.J1)(x.w3.moment.first_img_render_time)-(0,z.J1)("page_cache_active_time");U.logInstance.sendLog("webPerfTiming",{enter_from:(0,Z.yW)(),from:"page_cache",[x.w3.moment.first_img_render_time]:e}),(0,z.tl)("page_cache_active_time")}))},[J]);let[eD,eP]=(0,s.useState)(!1),[eA,eF]=(0,s.useState)(!1),[eB,eU]=(0,s.useState)(0),eV=(0,s.useRef)(),[eO,ez]=(0,s.useState)(!1);up({isSelf:ec,userInfo:T,tab:ek}),(0,s.useEffect)(()=>{var e;null===(e=eV.current)||void 0===e||e.notifySubscribers({})},[eD]);let{getSearchRes:eZ,exitSearch:eW,changeKeyword:e$,homeText:eK,keyword:eY,isAllowSearch:eG}=oP({uid:es,currentTab:ek,isSelf:ec,showSearchBar:!0,abTestData:em,onChangeKeyword:()=>eP(!1)}),{topNavHeight:eq}=ui();uN({fromUid:null==eb?void 0:null===(l=eb.info)||void 0===l?void 0:l.uid,toUid:es,isSelf:ec,isLogin:null==eb?void 0:eb.isLogin,recordParams:null==T?void 0:T.profileRecordParams,abTestData:em});let eX=(0,s.useCallback)((e,t)=>{var l,n,r,i;(0,z.tl)("user_tab_change"),(0,z.tl)("user_tab_change_cache"),(0,z.tl)("page_cache_active_time"),eT&&!uT.includes(e)&&eM.current.has(e)?((0,z.B1)({tag:"user_tab_change_cache"}),requestAnimationFrame(()=>{(0,z.B1)({tag:x.w3.moment.first_img_render_time});let e=(0,z.J1)(x.w3.moment.first_img_render_time)-(0,z.J1)("user_tab_change_cache");U.logInstance.sendLog("webPerfTiming",{enter_from:(0,Z.yW)(),from:"tab_change_cache",[x.w3.moment.first_img_render_time]:e}),(0,z.tl)("user_tab_change_cache")})):((0,z.B1)({tag:"user_tab_change"}),n9(!1)),eM.current.add(e);let{url:o,query:s}=d.parseUrl(null===(l=location)||void 0===l?void 0:l.href);s.showTab=e,eL.current[ek]=eS;let u=eL.current[e];u?s.showSubTab=u:delete s.showSubTab,null===(i=window)||void 0===i||null===(r=i.history)||void 0===r||null===(n=r.replaceState)||void 0===n||n.call(r,null,"",d.stringifyUrl({url:o,query:s})),(0,W.no)((0,R._)((0,a._)({},d.parse((0,W.ht)())||{}),{showTab:e})),eN(e),void 0!==u&&eE(u),eW(),eP(!1)},[eW,ek,eS]),eQ=(0,s.useCallback)(e=>{var t,l,n,r;let{url:i,query:a}=d.parseUrl(null===(t=location)||void 0===t?void 0:t.href);a.showSubTab=e,null===(r=window)||void 0===r||null===(n=r.history)||void 0===n||null===(l=n.replaceState)||void 0===l||l.call(n,null,"",d.stringifyUrl({url:i,query:a})),eE(e),eL.current[ek]=e},[ek]);(0,s.useEffect)(()=>$.listen($.EVENT.userChangeTab,e=>{let{tab:t,subTab:l,source:n,awemeId:r,isPersonalPanelVideo:i,enterMethod:o}=e;(0,W.no)((0,a._)({},d.parse((0,W.ht)())||{},r?{aweme_id:r}:{},i?{is_personal_panel_video:i}:{},o?{enter_method:o}:{})),eX(t,n),l&&eQ(l),r&&$.emit($.EVENT.openUserModal,{awemeId:r})}),[eX,em]);let[eJ,e0]=(0,s.useState)(ei);(0,s.useEffect)(()=>{var e,t;e0(["MAIN_WINDOW","MULTI_WINDOW"].includes(null===(t=window)||void 0===t?void 0:null===(e=t.TTE_ENV)||void 0===e?void 0:e.windowName))},[ei]),(0,s.useEffect)(()=>{if(!ec||!ef||!eh){eg(!1);return}let e=!1;return(0,Y.yu)({offset:"0",count:"1",filter_draft:!0}).then(t=>{var l;if(e)return;let n=!!(null==t?void 0:null===(l=t.aiNoteList)||void 0===l?void 0:l.some(e=>!!e.relatedItemInfo));eg((null==t?void 0:t.statusCode)===0&&n)}).catch(()=>{!e&&eg(!1)}),()=>{e=!0}},[eh,ef,ec]);let e1=null!==(p=(0,nl.o)(null==T?void 0:T.secUid))&&void 0!==p?p:"",[e2,e3]=(0,s.useState)(!1),e5=tq(T);(0,s.useEffect)(()=>{e5&&ec&&t3({isAccountBan:!0,isSelf:ec})},[e5,ec]),(0,s.useEffect)(()=>()=>{n9(!1)},[]),(0,s.useEffect)(()=>{if(ex||eC){let e=()=>{var e;if(!!ev.current)(null===(e=ev.current)||void 0===e?void 0:e.clientWidth)<846?eF(!0):eF(!1)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}},[ex,eC]);let e6=(0,nn.m)(),e4=`${ek}_${eS}`;(0,B._)({scene:e4,scrollListenerEl:e6,enableRecordFrameTime:!0,enableRecordLongTask:!0,crashFPSThreshold:24,slideEndDelay:300,logParams:{enter_from:ec?"personal_homepage":"others_homepage",enter_from_merge:ec?"personal_homepage":"others_homepage",tab_name:ek,sub_tab_name:eS,enter_method:(0,W.Rs)("enter_method"),is_personal_panel_video:Number((0,W.Rs)("is_personal_panel_video"))||0},abTestData:em});let e7=(0,s.useMemo)(()=>{if(ec)return!(["my_appointment","record","recommend","ai_note"].includes(ek)||"post"===ek&&[tH.SERIES].includes(eS||"")||"favorite_collection"===ek&&[tU.MUSIC].includes(eS||""))&&!0;return!1},[ec,ek,eS]),e9=(0,s.useMemo)(()=>!!ec&&"ai_note"===ek,[ec,ek]);(0,s.useEffect)(()=>{if(ez(!1),e7){let e=eS;("watch_later"===ek||"like"===ek)&&(e=tH.VIDEO),U.logInstance.sendLog("batchManageShow",{tab_name:ek,sub_tab_name:e})}},[ek,eS]);let e8=eY&&eG;return e5&&!ec?(0,o.jsxs)("div",{className:f()(dT.frameContainer,dT.notMargin,dT.videoPerf),children:[(null==em?void 0:null===(_=em.userUiUpdate)||void 0===_?void 0:_.type)?(0,o.jsx)(dL,{headImageInfo:null==T?void 0:null===(w=T.coverAndHeadImageInfo)||void 0===w?void 0:null===(C=w.profileCoverList)||void 0===C?void 0:C[0],abTestData:em,isSelf:ec}):(0,o.jsx)("div",{className:dT.topBackground}),(0,o.jsx)(le,{userInfo:T,logId:ee,isHideImpInfo:eo}),(0,o.jsxs)("div",{className:f()(dT.banContainer,dT.videoPerf),children:[(0,o.jsx)(V.H,{icon:(0,o.jsx)(O.Z,{}),title:"账号已被封禁",className:dT.errorContent}),(0,o.jsxs)("div",{className:dT.desc,children:[(0,o.jsx)("span",{className:dT.text,children:"由于违反"}),(0,o.jsx)(P.a,{className:dT.link,href:tO,target:"_blank",rel:"noopener noreferrer",children:"《抖音社区自律公约》"}),(0,o.jsx)("span",{className:dT.text,children:"的相关规定,该账号已被封禁"})]})]})]}):T.isBlock?(0,o.jsxs)("div",{className:f()(dT.frameContainer,dT.notMargin,dT.videoPerf),children:[(null==em?void 0:null===(b=em.userUiUpdate)||void 0===b?void 0:b.type)?(0,o.jsx)(dL,{headImageInfo:null==T?void 0:null===(y=T.coverAndHeadImageInfo)||void 0===y?void 0:null===(I=y.profileCoverList)||void 0===I?void 0:I[0],abTestData:em,isSelf:ec}):(0,o.jsx)("div",{className:dT.topBackground}),(0,o.jsx)(le,{userInfo:T,logId:ee,isHideImpInfo:eo}),(0,o.jsx)(V.H,{title:"你已经拉黑对方,无法查看其作品",icon:(0,o.jsx)(H.Z,{}),className:dT.errorContent}),";"]}):T.isBlocked?(0,o.jsxs)("div",{className:f()(dT.frameContainer,dT.notMargin,dT.videoPerf),children:[(null==em?void 0:null===(j=em.userUiUpdate)||void 0===j?void 0:j.type)?(0,o.jsx)(dL,{headImageInfo:null==T?void 0:null===(N=T.coverAndHeadImageInfo)||void 0===N?void 0:null===(k=N.profileCoverList)||void 0===k?void 0:k[0],abTestData:em,isSelf:ec}):(0,o.jsx)("div",{className:dT.topBackground}),(0,o.jsx)(le,{userInfo:T,logId:ee,isHideImpInfo:eo}),(0,o.jsx)(V.H,{title:"由于对方的隐私设置你无法查看TA的作品",icon:(0,o.jsx)(H.Z,{}),className:dT.errorContent}),";"]}):!ec&&ed&&1!==eu&&2!==eu?(0,o.jsxs)("div",{className:f()(dT.frameContainer,dT.notMargin,dT.videoPerf),children:[(null==em?void 0:null===(S=em.userUiUpdate)||void 0===S?void 0:S.type)?(0,o.jsx)(dL,{headImageInfo:null==T?void 0:null===(L=T.coverAndHeadImageInfo)||void 0===L?void 0:null===(E=L.profileCoverList)||void 0===E?void 0:E[0],abTestData:em,isSelf:ec}):(0,o.jsx)("div",{className:dT.topBackground}),(0,o.jsx)(le,{userInfo:T,logId:ee,isHideImpInfo:eo}),(0,o.jsx)(V.H,{title:"私密账号",desc:"发起关注请求,通过后即可查看该账号内容",icon:(0,o.jsx)(H.Z,{}),className:dT.errorContent})]}):(0,o.jsxs)("div",{className:f()(dT.frameContainer,dT.hasNavTab,dT.notMargin,dT.videoPerf,{[dT.fixedHeaderPadding]:eJ}),children:[!eD&&(0,o.jsx)(dL,{headImageInfo:null==T?void 0:null===(r=T.coverAndHeadImageInfo)||void 0===r?void 0:null===(n=r.profileCoverList)||void 0===n?void 0:n[0],abTestData:em,isSelf:ec}),(0,o.jsxs)("div",{className:dT.userContentWithSideArea,children:[(0,o.jsxs)("div",{className:dT.userContentMain,children:[!eD&&(0,o.jsx)(le,{userInfo:T,logId:ee,lastdate:er,isHideImpInfo:eo}),(0,o.jsx)("div",{className:dT.container,children:(0,o.jsx)("div",{ref:ev,className:f()(dT.listBoxContainer,dT.videoPerf),children:(0,o.jsx)(dM,{userInfo:T,children:(0,o.jsxs)(A.W,{ref:eV,scrollListener:e6,children:[(0,o.jsx)(lm,{userInfo:T,currentTab:ek,setCurrentTab:e=>{eX(e,"user_self")},topNavHeight:eD?200:eq,showAiNoteTab:e_,children:(0,o.jsxs)("div",{className:dT.tabinner,children:[e7&&(0,o.jsx)("div",{className:dT.batchBtn,onClick:()=>{null==ez||ez(!eO);let e=eS;("watch_later"===ek||"like"===ek)&&(e=tH.VIDEO),!eO&&U.logInstance.sendLog("batchManageClick",{tab_name:ek,sub_tab_name:e})},children:eO?"退出管理":"批量管理"}),e9&&(0,o.jsx)(D.Tooltip,{style:{width:240},showArrow:!1,position:"bottom",content:"笔记状态与视频绑定,若视频下线,或作者设置为仅自己可见,笔记也将下线。为避免笔记丢失,建议您及时自行保存或备份笔记内容。",children:(0,o.jsx)("div",{className:dT.tipsIcon,children:(0,o.jsx)(F.Z,{src:ul,width:15,height:16,viewBox:"0 0 15 16"})})})]})}),(0,o.jsxs)("div",{className:f()(dT.listContainer,dT.videoPerf),children:[!e8&&(0,o.jsx)(ut,{currentTab:ek,enableCache:!!(null==em?void 0:null===(i=em.userPageCache)||void 0===i?void 0:i.enable),cacheTtl:null==em?void 0:null===(u=em.userPageCache)||void 0===u?void 0:u.ttl,tabs:[{name:"post",render:()=>{var e;return(0,o.jsx)(ag,{topNavHeight:eq,currentTab:ek,userInfo:T,defaultPostRes:en,topOffset:eB,setHideUserInfo:eP,hideUserInfo:eD,abTestData:em,currentSubTab:eS,onSubTabChange:eQ,defaultMixRes:et,defaultSeriesRes:el,showSearchBar:!eA&&eG,searchBarSlot:(0,o.jsx)(oV,{changeKeyword:e$,exitSearch:eW,keyword:eY,currentTab:ek,showNewUi:!!(null==em?void 0:null===(e=em.userUiUpdate)||void 0===e?void 0:e.type),isListSelectable:eO}),isListSelectable:eO,setIsListSelectable:ez})}},{name:"recommend",render:()=>{var e;return(0,o.jsx)(dZ,{topNavHeight:eq,currentTab:ek,userInfo:T,abTestData:em,showSearchBar:!eA&&eG,searchBarSlot:(0,o.jsx)(oV,{changeKeyword:e$,exitSearch:eW,keyword:eY,currentTab:ek,showNewUi:!!(null==em?void 0:null===(e=em.userUiUpdate)||void 0===e?void 0:e.type),isListSelectable:eO}),isListSelectable:eO,setIsListSelectable:ez})}},{name:"like",render:()=>{var e;return(0,o.jsx)(aL,{abTestData:em,topNavHeight:eq,currentTab:ek,userInfo:T,showSearchBar:!eA&&eG,searchBarSlot:(0,o.jsx)(oV,{changeKeyword:e$,exitSearch:eW,keyword:eY,currentTab:ek,showNewUi:!!(null==em?void 0:null===(e=em.userUiUpdate)||void 0===e?void 0:e.type),isListSelectable:eO}),isListSelectable:eO,setIsListSelectable:ez})}},{name:"favorite_collection",noCache:!0,render:()=>{var e;return(0,o.jsx)(dN,{topNavHeight:eq,currentTab:ek,currentSubTab:eS,onSubTabChange:eQ,userInfo:T,abTestData:em,showSearchBar:!eA&&eG,searchBarSlot:(0,o.jsx)(oV,{changeKeyword:e$,exitSearch:eW,keyword:eY,currentTab:ek,showNewUi:!!(null==em?void 0:null===(e=em.userUiUpdate)||void 0===e?void 0:e.type),isListSelectable:eO}),isListSelectable:eO,setIsListSelectable:ez})}},{name:"record",render:()=>{var e;return(0,o.jsx)(o_,{osInfo:ea,currentTab:ek,userInfo:T,topNavHeight:eq,currentSubTab:eS,onSubTabChange:eQ,abTestData:em,userSettings:ew,showSearchBar:!eA&&eG,searchBarSlot:(0,o.jsx)(oV,{changeKeyword:e$,exitSearch:eW,keyword:eY,currentTab:ek,showNewUi:!!(null==em?void 0:null===(e=em.userUiUpdate)||void 0===e?void 0:e.type),isListSelectable:eO})})}},{name:"watch_later",render:()=>(0,o.jsx)(oj,{osInfo:ea,currentTab:ek,userInfo:T,topNavHeight:eq,abtest:em,isListSelectable:eO,setIsListSelectable:ez,abTestData:em})},{name:"my_appointment",render:()=>(0,o.jsx)(dF,{osInfo:ea,currentTab:ek,userInfo:T,topNavHeight:eq,abTestData:em})},...e_?[{name:"ai_note",render:()=>(0,o.jsx)(d8,{userInfo:T})}]:[]]}),e8&&(0,o.jsx)(ao,{uid:e1,currentTab:ek,getSearchRes:eZ,homeText:eK,keyword:eY,setCurrentTab:eN,exitSearch:eW,topNavHeight:eq,abTestData:em,showSearchBar:!eA&&eG,searchBarSlot:(0,o.jsx)(oV,{changeKeyword:e$,exitSearch:eW,keyword:eY,currentTab:ek,showNewUi:!!(null==em?void 0:null===(c=em.userUiUpdate)||void 0===c?void 0:c.type),setIsListSelectable:ez}),isListSelectable:eO,setIsListSelectable:ez})]})]})})})})]}),(0,o.jsx)(q.Z,{className:dT.userLayoutSideCard})]}),ec&&(0,o.jsx)(uk,{showTab:ek})]})},uD=l("931334");function uP(){let{Context:e}=uD,{userInfo:t}=(0,eH.useUserInfoContext)()||{},{isSpider:l,info:n,isLogin:r,statusCode:i}=t||{};return{isSpider:l,userInfo:t,userInfoDetail:n,isLogin:r,statusCode:i}}var uA={container:"QXjpCPLw",leftContainer:"h_HzCUgm",trustLoginSwitch:"b87t9OzE",userInfoWrapper:"lJThMmnK",recommendWrapper:"aDwYgDSb",collectionsWrapper:"Hsv2IX9c",leftPlaceHolderRight:"iGtZn9rt",leftPlaceHolderLeft:"fOhZ_eAo",rightPlaceHolderRight:"E8PpJbiF",rightContainer:"HBBaAW8n",errorRight:"yXZlpagq",errorWrapper:"QxxtORqO",errorContent:"ByfTpJAl",notFound:"nQr4dBsF",loading:"ijuCjZi_",noPadding:"ORh80xYh",hasNavTab:"lTGEQn8J",userPageWithSideCard:"LSOoeXZS",userPageMain:"jZD54Y3D"};function uF(e){var t;let{isClient:l,isHideImpInfo:n,userInfo:r,osInfo:i,queryParam:a,otherUserLogId:d,defaultPostRes:u,defaultMixRes:c,defaultSeriesRes:v,locationSearch:m,isOnUserPage:f}=e,{isSpider:h}=uP();t=(0,K._)();let p=(0,s.useMemo)(()=>{var e,t,l,n;return h?null==u?void 0:null===(n=u.data)||void 0===n?void 0:null===(l=n.map)||void 0===l?void 0:null===(t=l.call(n,e=>null==e?void 0:e.createTime))||void 0===t?void 0:null===(e=t.sort((e,t)=>t-e))||void 0===e?void 0:e[0]:void 0},[null==u?void 0:u.data,h]);return(0,o.jsx)("div",{"data-e2e":"user-detail",id:"user_detail_element",className:uA.container,"data-bytereplay-mask":"strict",children:(0,o.jsx)(uR,{userInfo:r,showTab:null==a?void 0:a.showTab,locationSearch:m,isOnUserPage:f,showSubTab:null==a?void 0:a.showSubTab,logId:d,defaultPostRes:u,defaultMixRes:c,defaultSeriesRes:v,showSearchBar:!0,lastdate:p,isClient:l,isHideImpInfo:n,osInfo:i})})}let uB=()=>{let e=(0,em.DT)(),t=(0,tk.fV)(),l=(0,em.FJ)().awemePcClient;return{isClient:e,osInfo:t,clientVersion:null!=l?l:""}};function uU(e){let{user:t,queryUid:l}=e;return!t||!t.uid||t.secUid!==l}var uV=l("509619"),uO=l("699651"),uH=l("785701"),uz={frameContainer:"I3eDLT5O",videoPerf:"uQAg6fHc",isNewLogin:"gdP4UiZc",topBackground:"BjKgpNkE",loginGuide:"m_ESkw8s",loginGuideTitle:"C0cWCTFs",loginGuideDesc:"g3E6HXdJ",hasNavTab:"PVsCzfD0"},uZ="k1lUlpam",uW="xhzORF9i",u$="uXGknm0o",uK="SfJyoR7E",uY="nO3oXD7t",uG="fmaX7rox",uq="OZDxDQVB",uX="i4SwDz1b",uQ="t2QwkiFX";function uJ(){let e={title:"粉丝",count:"-",onclick:null},t={title:"关注",count:"-",onclick:null},l={title:"获赞",count:"-",onclick:null};return(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)("div",{className:uZ,children:[(0,o.jsx)("div",{className:uW,children:(0,o.jsx)("div",{className:u$})}),(0,o.jsxs)("div",{className:uK,children:[(0,o.jsx)("h1",{className:uY,children:"未登录"}),(0,o.jsx)("div",{className:uG,children:[t,e,l].map((e,t)=>(0,o.jsxs)("div",{className:f()(uq),children:[(0,o.jsx)("p",{className:uX,children:e.title}),(0,o.jsx)("p",{className:uQ,children:e.count})]},t))})]})]})})}var u0="wq9uCGx6",u1="BH8MrgxT",u2="c41bUbE2",u3="y2SLpe3I",u5="zmXKOnnl";let u6=e=>{let{abTestData:t}=e,l=[{title:"作品",key:"post"},{title:"推荐",key:"recommend"},{title:"喜欢",key:"like"},{title:"收藏",key:"favorite_collection"},{title:"观看历史",key:"record"},{title:"稍后再看",key:"watch_later"},{title:"我的预约",key:"my_appointment"},...uL({abTestData:t})?[{title:"AI 笔记",key:"ai_note"}]:[]];return(0,o.jsx)("div",{className:u2,children:l.map(e=>(0,o.jsx)("div",{className:f()(u3),children:(0,o.jsx)("span",{className:u5,children:e.title})},e.key))})};var u4=e=>{let{abTestData:t}=e;return(0,o.jsx)("div",{className:u0,children:(0,o.jsx)("div",{className:u1,children:(0,o.jsx)(u6,{abTestData:t})})})},u7=e=>{var t;let{isClient:l,abTestData:n}=e,r=(0,s.useCallback)(()=>void location.reload(),[]);return(0,nd.o)(()=>{(0,uO.iV)()&&(0,uH.a)();let e="game_desktop_widget"===(0,W.Rs)("enter_from");return(0,el.showAccountPage)({success:r,headerText:e?"登录后即可体验游戏助手":"登录后即可观看喜欢、收藏的视频",enterMethod:"personal_tab"}),()=>{(0,uH.a)(),$.emit($.EVENT.hideModal),el.loginPanelInfo.isShowingAccount=!1,el.loginPanelInfo.isInAccountPage=!1}},[]),(0,o.jsxs)("div",{className:f()(uz.frameContainer,uz.hasNavTab,uz.videoPerf,{[uz.fixedHeaderPadding]:l,[uz.isNewLogin]:!0}),children:[!(null==n?void 0:null===(t=n.userUiUpdate)||void 0===t?void 0:t.type)&&(0,o.jsx)("div",{className:uz.topBackground}),(0,o.jsx)(uJ,{}),(0,o.jsx)(u4,{abTestData:n})]})};function u9(e){let{isClient:t,abTestData:l}=e;return(0,o.jsx)("div",{"data-e2e":"user-detail",className:f()(uA.container,uA.noPadding,uA.hasNavTab),children:(0,o.jsx)(u7,{isClient:t,abTestData:l})})}var u8=l("316914"),ce=(0,I.C)(e=>{var t,l,n,r;let{id:i}=(0,v.U)(),{user:m,mix:w,series:I,post:k,status:N,isHideImpInfo:S=!1,isClient:L,osInfo:T,redirectFrom:D}=e||{},{isiPad:P,isMobile:A}=(0,g.X)();(0,c.C)(x.w3.components.user_page),(0,s.useEffect)(()=>{let e=new URL(window.location.href),t=e.searchParams.get("_sw")||"";t&&"unknown"!==t&&(e.searchParams.delete("_sw"),history.replaceState(null,"",e.toString()))},[]);let F=(0,u.a)(),B=(0,s.useRef)(i),U=(0,s.useRef)(F),V=!!i;V&&(B.current=i,U.current=F);let O=V?i:null!==(t=B.current)&&void 0!==t?t:i,H=V?F:U.current,z="self"===O,Y=null!==(l=(0,K._)())&&void 0!==l?l:{},{innerLink:q,tccConfig:X}=(0,y.K)(e=>{let{innerLink:t,tccConfig:l}=e;return{innerLink:t,tccConfig:l}}),Q=(0,s.useMemo)(()=>(0,d.parse)(null==H?void 0:H.search),[null==H?void 0:H.search]);(0,s.useEffect)(()=>{let e=(0,d.parse)(location.search).showTab;"/user/self"!==location.pathname&&(!e||"post"===e)&&performance.mark("user_page_init")},[]),(0,s.useEffect)(()=>{try{navigator.serviceWorker&&navigator.serviceWorker.addEventListener("message",e=>{try{if("reload"===e.data.action){var t;window.location.reload(),lC.sendLog("userCacheInvalid",{message:null!==(t=e.data.reason)&&void 0!==t?t:""})}}catch(e){}})}catch(e){}},[]);let{isClient:J,osInfo:ee}=function(e){let{isClient:t,clientVersion:l,osInfo:n}=e;return(0,s.useMemo)(()=>{if(void 0===t||void 0===l||void 0===n){let e=uB();return{isClient:e.isClient,clientVersion:e.clientVersion,osInfo:e.osInfo}}return{isClient:t,clientVersion:l,osInfo:n}},[t,l,n])}({isClient:L,osInfo:T}),{isSpider:et,userInfoDetail:el,isLogin:en}=uP();z&&(O=null!==(n=null==el?void 0:el.secUid)&&void 0!==n?n:"");let{otherUserLogId:er,isEmptyUser:ei,isUserCanceled:ea,statusCode:eo,isSelf:es,userInfo:ed,setUserInfo:eu}=function(e,t){let{isLogin:l,statusCode:n,userInfoDetail:r}=uP(),i=(0,nl.o)(t),a=(0,s.useMemo)(()=>(function(e){let{currentUser:t,isLogin:l,uid:n,otherInfo:r}=e,i={isEmptyUser:!1,isUserCanceled:!1,isSelf:!1,userInfo:{},statusCode:0};if(function(e){let{isLogin:t,queryUid:l,currentUid:n}=e;return!!t&&l===n}({isLogin:l,queryUid:n,currentUid:null==t?void 0:t.secUid}))i.userInfo=t,i.isSelf=!0,i.statusCode=0;else{let{user:e,statusCode:t}=r||{};uU({user:e,queryUid:n})&&(i.isEmptyUser=!0),i.isUserCanceled=!!(null==e?void 0:e.userCanceled),i.statusCode=t||0,i.userInfo=e,i.isSelf=!1}return i})({currentUser:r,isLogin:l,uid:i,otherInfo:e}),[i,r,l,e]),{userInfo:o,isEmptyUser:d,isUserCanceled:u,isSelf:c,statusCode:v}=a||{},[m,f]=(0,s.useState)(""),[h,p]=(0,s.useState)(o),[g,_]=(0,s.useState)(d),[x,w]=(0,s.useState)(u),[b,I]=(0,s.useState)(c),[y,j]=(0,s.useState)(v);(0,s.useEffect)(()=>{C.Le.setConfig(C.gI.UserProfileSelf,!!b)},[b]),(0,s.useEffect)(()=>{_(d),w(u),I(c),p(o),j(v)},[a]);let k=async()=>await (0,iS.fetchUserProfile)(i,null,void 0,!0)||{};return(0,s.useEffect)(()=>{if(void 0!==l&&(!1!==l||"self"!==i))(async()=>{if(l&&r&&i===(null==r?void 0:r.secUid))p(r),I(!0),j(n);else{let{user:e,statusCode:t,logPb:l}=await k(),n=()=>{var n;_(uU({user:e,queryUid:i})),w(!!(null==e?void 0:e.userCanceled)),j(t),p(e),f(null!==(n=null==l?void 0:l.impr_id)&&void 0!==n?n:""),I(!1)};try{(0,lp.unstable_batchedUpdates)(()=>{n()})}catch(e){n()}}})()},[r,a]),{otherUserLogId:m,isEmptyUser:g,isUserCanceled:x,statusCode:y,isSelf:b,userInfo:h,setUserInfo:p}}(m,z?null==el?void 0:el.secUid:void 0),ec=(0,s.useCallback)(()=>{!z&&!es&&eu(e=>{var t,l;let n=null===(t=C.Le.getConfig(C.gI.FollowStatusCache))||void 0===t?void 0:t[null==e?void 0:e.uid];return e.followStatus=null!==(l=null==n?void 0:n.followStatus)&&void 0!==l?l:e.followStatus,(0,a._)({},e)})},[es,eu,z]);!function(e){let{isSelf:t,userInfo:l,isSelfPage:n,abTestData:r}=e;(0,nd.o)(()=>{let e=null==l?void 0:l.uid,n=e=>{(0,Z.TU)(e?"personal_homepage":"others_homepage")};e&&t?n(!0):e&&void 0!==t&&!t?n(!1):(0,Z.TU)("error_homepage")},[t,null==l?void 0:l.uid]);let i=(0,s.useRef)(location.pathname);(0,s.useEffect)(()=>{if(!(null==l?void 0:l.uid))return;uh(l,t);let e=(0,W.Rs)("previous_page")||"",o=location.href,s={app_code_link:"app_code",web_code_link:"web_code"};if(!n)!async function(){let t=await (0,uo.Re)();lC.sendLog("pageView",(0,a._)({enter_from:(0,Z.yW)(),url:location.href,url_path:location.pathname,link_from:(0,ic.f)()?"pwa":s[e]||"",theme:(0,us.bS)(oO.Q.getItem({sKey:ig.CookieKeys.Theme})),from_push:oO.Q.getItem({sKey:ig.CookieKeys.FromClientPush})?1:0,seo_vids:ud.t("seo_vids")||"",physical_screen_num:t.physical_screen_num,physical_screen_info:t.physical_screen_info,sidebar_status:(0,uu.GE)()},(0,uo.Wc)(uo.rh.PAGE_VIEW))),[ua.AISearchPage.V1,ua.AISearchPage.V3].includes(null==r?void 0:r.aiSearchPage)&&(lC.sendLog("aiSearchEntranceShow",{enter_from:(0,Z.yW)(),enter_from_merge:(0,Z.yW)()}),lC.sendLog("aiChatButtonShow",{enter_from:(0,Z.yW)(),ai_chat_button_position:"right_search"})),lC.sendLog("pageViewV2",(0,a._)({enter_from:(0,Z.yW)(),url:location.href,url_path:location.pathname,link_from:(0,ic.f)()?"pwa":s[e]||"",theme:(0,us.bS)(oO.Q.getItem({sKey:ig.CookieKeys.Theme})),from_push:oO.Q.getItem({sKey:ig.CookieKeys.FromClientPush})?1:0,seo_vids:ud.t("seo_vids")||"",physical_screen_num:t.physical_screen_num,physical_screen_info:t.physical_screen_info},(0,uo.Wc)(uo.rh.PAGE_VIEW)))}(),(0,uc.vP)({key:location.pathname,event:(t,l,n)=>{let r=location.pathname,d=i.current,u=(0,uv.Nr)(r),c=(0,uv.Nr)(d),v=r!==d&&u&&c,m=u&&"page_visible_change"===n;if(l>0&&(0,Z.yW)()&&!v&&!m){var f,h,p,g,_,x;let r=(null===(f=window.EXPOSE_DATA)||void 0===f?void 0:f.landingPage)==="discover",i=(null===(h=window.EXPOSE_DATA)||void 0===h?void 0:h.landingPage)==="follow",d=r&&(null===(p=window.EXPOSE_DATA)||void 0===p?void 0:p.landingMode)!==2&&(null===(g=window.EXPOSE_DATA)||void 0===g?void 0:g.landingMode)!==3,u=null!==(x=null!==(_=(0,W.Rs)("enter_method"))&&void 0!==_?_:r||i?"default_landing":void 0)&&void 0!==x?x:"other";lC.sendLog("pageStayTime",(0,R._)((0,a._)({},(0,uo.Wc)(uo.rh.PAGE_VIEW)),{enter_from:"others_homepage",url:o,url_path:location.pathname,duration:l,is_visible:c?0:Number(t),link_from:(0,ic.f)()?"pwa":s[e]||"",sidebar_status:(0,uu.GE)(),reason:c?`exit_child_route_${n}`:n,is_recommend:"default_landing"===u?Number(d):void 0,is_small_window:(0,um.A)()?"1":"0"}),!1)}i.current=location.pathname}})},[null==l?void 0:l.uid])}({userInfo:ed,isSelf:es,isSelfPage:z,abTestData:Y}),!function(e){let{isEmptyUser:t,isUserCanceled:l}=e;(0,s.useEffect)(()=>{var e,n;t&&ok.oe.event.info({name:ok.Mo.UserNotExist,report:{url:null===(e=location)||void 0===e?void 0:e.pathname}}),l&&ok.oe.event.info({name:ok.Mo.UserUnregister,report:{url:null===(n=location)||void 0===n?void 0:n.pathname}})},[t,l])}({isEmptyUser:ei,isUserCanceled:ea});let ev=(0,j.A)(es,null==el?void 0:el.uid);return(!function(e){let{isSelfPage:t}=e;if((0,s.useEffect)(()=>{t&&!(0,uV.Pt)(uV.$S.Reversion)&&(0,uV.br)(!0)},[t]),(0,s.useEffect)(()=>$.listen($.EVENT.refreshPage,()=>{location.reload()}),[]),!t);}({isSelfPage:z}),(0,b.Z)({isLogin:en}),(0,s.useEffect)(()=>{let e="";return document.body&&(e=document.body.style.minWidth,P||A?document.body.style.minWidth="100%":document.body.style.minWidth="1024px"),()=>{document.body.style.minWidth=e}},[P,A]),z&&!en)?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(u8.Z,{children:(0,o.jsx)("title",{children:"抖音-记录美好生活"})}),(0,o.jsx)(u9,{isClient:J,abTestData:Y})]}):function(e){let{status:t,isSpider:l,statusCode:n,isEmptyUser:r,isUserCanceled:i,userInfo:a}=e;return t>400&&l||0!==n||!!(null==a?void 0:a.uid)&&r||!!(null==a?void 0:a.uid)&&i}({status:N,isSpider:et,statusCode:eo,isEmptyUser:ei,isUserCanceled:ea,userInfo:ed})?(0,o.jsx)(E,{status:N,isSpider:et,statusCode:eo,isEmptyUser:ei,isUserCanceled:ea}):(0,o.jsx)(G.Provider,{value:{updateFollowStatus:ec,isSelf:es,haveDashBoard:ev,currentUserInfoDetail:el,isSpider:et},children:(0,o.jsx)("div",{className:uA.userPageWithSideCard,children:(0,o.jsx)("div",{className:uA.userPageMain,children:(0,o.jsxs)("div",{className:f()(uA.container,uA.containerMargin,{userNewUi:null==Y?void 0:null===(r=Y.userUiUpdate)||void 0===r?void 0:r.type}),children:[(0,o.jsx)(M,{userInfo:ed,uid:O,isSpider:et,redirectFrom:D}),(null==ed?void 0:ed.uid)?(0,o.jsx)(uF,{isHideImpInfo:S,isClient:J,osInfo:ee,userInfo:ed,queryParam:Q,otherUserLogId:er,defaultPostRes:k,defaultMixRes:w,defaultSeriesRes:I,locationSearch:null==H?void 0:H.search,isOnUserPage:V,key:ed.uid}):(0,o.jsx)(h.gb,{text:"数据加载中",className:uA.loading}),(0,o.jsx)(p.$,{className:"user-page-footer",innerLink:(null==q?void 0:q.data)||[],defaultValue:null==X?void 0:X[_.TccKey.SiteFooter]})]})})})})},e=>(0,w.h$)(e))},85703:function(e,t,l){l.d(t,{w:function(){return o}});var n=l(629686);l(490629);var r=l(101199),i=l(396868),a=l(550514);let o=e=>{var t;let{currentNumber:l,setCurrentNumber:o,awemeInfoList:s,setAwemeInfoList:d,seriesInfo:u,close:c,refNextVideoCallBack:v}=e,m=(0,r.useRef)({cursor:Math.max(Number(null!==(t=u.watchedEpisode)&&void 0!==t?t:0)-1,0),hasMore:1,statusCode:-1,lastSeriesVideoIndex:-1}),f=(0,r.useRef)(!1);return(0,r.useEffect)(()=>{let e=!1;return(async()=>{var t,l,r,s,v;f.current=!0;let h=await (0,a.Ab)({seriesId:(null==u?void 0:u.mixId)||(null==u?void 0:u.seriesId),cursor:null===(t=m.current)||void 0===t?void 0:t.cursor,count:20});if(f.current=!1,(null!==(r=null==h?void 0:null===(l=h.data)||void 0===l?void 0:l.length)&&void 0!==r?r:0)!==0){m.current={cursor:null==h?void 0:h.cursor,hasMore:null==h?void 0:h.hasMore,statusCode:null==h?void 0:h.statusCode,lastSeriesVideoIndex:(null==h?void 0:null===(s=h.data)||void 0===s?void 0:s.length)-1};let t=null==h?void 0:null===(v=h.data)||void 0===v?void 0:v.map(e=>{let{cover:t,status:l,playVV:r}=u||{};return e.seriesInfo&&(e.seriesInfo.cover=t,e.seriesInfo.status=l,e.seriesInfo.playVV=r),(0,n._)({},e)});if(e)return;d(t||[]),o(0)}else i.F.info("该合集暂无法查看,请浏览其他内容"),c()})(),v.current=()=>i.F.infoInModalVideo("暂无更多作品"),()=>{e=!0}},[u]),(0,r.useEffect)(()=>{5>Math.abs(Number(null==s?void 0:s.length)-l)&&-1!==l&&!f.current&&(async()=>{var e,t,l;if((null===(e=m.current)||void 0===e?void 0:e.hasMore)===1){f.current=!0;let e=await (0,a.Ab)({seriesId:(null==u?void 0:u.mixId)||(null==u?void 0:u.seriesId),cursor:null===(t=m.current)||void 0===t?void 0:t.cursor,count:20});f.current=!1,m.current={cursor:null==e?void 0:e.cursor,hasMore:null==e?void 0:e.hasMore,statusCode:null==e?void 0:e.statusCode,lastSeriesVideoIndex:(null==s?void 0:s.length)+(null==e?void 0:null===(l=e.data)||void 0===l?void 0:l.length)-1},d(t=>[...t,...(null==e?void 0:e.data)||[]])}})()},[s,l,u]),null}},196074:function(e,t,l){l.d(t,{o:function(){return i}});var n=l(101199),r=l(656245);function i(e){var t;let{id:l}=(0,r.U)(),i=(0,n.useRef)(l),a=!!l;a&&(i.current=l);let o=a?l:null!==(t=i.current)&&void 0!==t?t:l;return"self"===o&&null!=e?e:o}},18586:function(e,t,l){l.d(t,{x:function(){return c}});var n=l(629686),r=l(402748);l(228983),l(759943),l(14275),l(679308);var i=l(165030),a=l(528937),o=l(66948),s=l(729477),d=l(618759);let u=/^\/video|user|hashtag\/.*?/;async function c(e,t){let l=await a.get({key:o.TccKey.PovertyContentConfig,defaultValue:o.TCC_DEFAULT_VALUE_MAP.get(o.TccKey.PovertyContentConfig),ctx:t}),c=window.location.pathname;if(0===l.openApi||!(0,d._Q)(t)||(0,d.We)(t)||!e||0===e.length||!u.test(c))return e;let v=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return e.map(e=>`${t}_${e.awemeId}`).join(" ")}(e,2),m=e,f=await (0,s.Ts)(v,t);return 0===f.statusCode&&(m=function(e,t){let l=t.map(e=>(0,r._)((0,n._)({},e),{targetId:e.targetId.split("_")[1]}));return e.map(e=>{var t;let a=l.find(t=>t.targetId===e.awemeId);return(0,r._)((0,n._)({},e),{isHighQuality:null!==(t=null==a?void 0:a.hitStatus)&&void 0!==t?t:i.HighQualityStatus.HighQuality})})}(e,f.data)),m}},205940:function(e,t,l){l.d(t,{u:function(){return g}}),l("490629");var n=l("320165"),r=l("101199"),i=l("890710"),a=l("406372"),o=l("469935"),s=l.n(o),d=l("928826");l("311771");var u=l("629686"),c=l("402748");let v=(0,r.forwardRef)((e,t)=>(0,n.jsx)("svg",(0,c._)((0,u._)({width:13,height:13,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,n.jsx)("path",{d:"M12.601 12.601a1.362 1.362 0 0 1-1.927 0L6.5 8.427 2.326 12.6a1.362 1.362 0 0 1-1.927-1.927L4.573 6.5.4 2.326A1.362 1.362 0 1 1 2.326.399L6.5 4.573 10.674.4a1.362 1.362 0 1 1 1.927 1.927L8.427 6.5l4.174 4.174a1.362 1.362 0 0 1 0 1.927z",fill:"#2F3035",fillOpacity:".9"})})));var m=l("118616"),f={default:1,1:"default",custom:2,2:"custom"};let h=!!("undefined"!=typeof window&&window.document&&window.document.createElement),p=e=>{var t,l,n,r,i;if(!h)return null;let a=document.createElement("div"),o=(null===(t=document)||void 0===t?void 0:t.fullscreenElement)||(null===(l=document)||void 0===l?void 0:l.msFullscreenElement)||(null===(n=document)||void 0===n?void 0:n.mozFullScreenElement)||(null===(r=document)||void 0===r?void 0:r.webkitFullscreenElement)||null;return o?o.appendChild(a):null===(i=null!=e?e:document.body)||void 0===i||i.appendChild(a),a},g=r.forwardRef((e,t)=>{let{className:l,modalClassName:o,onCancel:u,onOk:c,type:g="default",size:_="default",mask:x=!0,isHide:C=!0,closable:w=!0,title:b,message:I,okText:y,cancelText:j,maskClosable:k=!0,children:N,mountEl:S}=e,[E,L]=(0,r.useState)(C),T=(0,r.useRef)(null),M=(0,r.useRef)(E);M.current=E;let R=(0,r.useRef)(),D=(0,r.useRef)(),P=(0,r.useRef)(!1);!P.current&&h&&(D.current=p(S),R.current=D.current.parentNode,P.current=!0),(0,r.useImperativeHandle)(t,()=>D.current),(0,r.useEffect)(()=>(null===D.current.parentNode&&null!==R.current&&R.current.appendChild(D.current),()=>{var e,t;null===(t=D.current)||void 0===t||null===(e=t.parentNode)||void 0===e||e.removeChild(D.current)}),[]),(0,r.useEffect)(()=>{L(C)},[C]);let A=async e=>{if(!!k&&T.current===e.target)await L(!0),null==u||u(e,M.current)},F=async e=>{await L(!0),null==u||u(e,M.current)},B=async e=>{await L(!0),null==c||c(e,M.current)};return D.current?i.createPortal((0,n.jsx)(a.Z,{in:!E,classNames:"modal-mask",timeout:{enter:400,exit:150},appear:!0,children:(0,n.jsx)("div",{ref:T,onClick:e=>A(e),className:s()(d.default.maskLayerWap,{[d.default.maskLayer]:x,[d.default.visible]:E,[d.default.mountEl]:!!S},o),children:(0,n.jsxs)("div",{className:s()("modal-pannel",{mountEl:!!S}),children:[(0,n.jsxs)("div",{className:s()(d.default.modalWap,d.default[_],{[d.default.defaultType]:2===f[g]},l),children:[(0,n.jsx)(m.Z,{onClick:e=>F(e),className:s()(d.default.closeIcon,{[d.default.closeIconHide]:!w}),src:v,width:13,height:13,viewBox:"0 0 13 13"}),(0,n.jsx)("h2",{className:s()(d.default.title),children:b}),(0,n.jsx)("p",{className:s()(d.default.message),children:I}),(0,n.jsxs)("div",{className:s()(d.default.btn,{[d.default.btnHide]:!y&&!j}),children:[(0,n.jsx)("a",{href:"#",onClick:e=>B(e),className:s()(d.default.okText,{[d.default.okBtnHide]:!y}),children:y}),(0,n.jsx)("a",{href:"#",onClick:e=>F(e),className:s()(d.default.okText,d.default.cancelText,{[d.default.cancelBtnHide]:!j}),children:j})]})]}),(0,n.jsx)("div",{className:s()(d.default.modalWap,d.default[_],{[d.default.customType]:1===f[g]},l),children:N})]})})}),D.current):null})},38724:function(e,t,l){l.d(t,{Z:function(){return N}});var n=l("320165"),r=l("101199"),i=l("469935"),a=l.n(i),o=l("339808"),s=l("383280"),d=l("661444"),u=l("46892"),c=l("969255"),v=l("624508"),m=new v.h({fastLiveHeadClickMore:{eventName:"fast_live_head_click_more",params:{entrance_type:"",hover_show_cnt:0}},fastLiveHeadShow:{eventName:"fast_live_head_show",params:{entrance_type:"",anchor_id:"",room_id:"",show_type:""}}}),f=l("629686"),h=l("402748");l("490629"),l("228983"),l("759943");var p=l("933524"),g=l("121998"),_=l("966473"),x=l("518278"),C=l("392430"),w=l("772227"),b=l("414061"),I=l("105928"),y=l("638183"),j=e=>{var t,l;let{data:i,logParams:o,abTestData:s,liveList:d,index:c,defaultShowCount:v,isInDouyinWeb:j,onItemClick:k,itemClass:N,awemeInfo:S,isLogin:E}=e,[L,T]=(0,p.Z)(),M=(0,_.x)(()=>{m.sendLog("fastLiveHeadShow",{entrance_type:o.entrance_type,anchor_id:null==i?void 0:i.anchorId,room_id:null==i?void 0:i.roomId,show_type:"hover"})}),R=(0,u.cc)((0,f._)({web_rid:null==i?void 0:i.webRid,room_id:null==i?void 0:i.roomId,action_type:"click"},o)),D={episodeExtra:null==i?void 0:i.episodeExtra,logId:(null==o?void 0:o.request_id)||"0"},P=(0,r.useMemo)(()=>"String"!==(0,C.tQ)(R)?null:(0,w.D)(R.split("?",2)[1]),[R]);(0,r.useCallback)(()=>(0,h._)((0,f._)({},o),{show_rank:`${c+1}`,show_cnt:v}),[o,v,c]);let A=(0,r.useCallback)(()=>{b.emit(b.EVENT.videoPause,"AvatarItem_pauseMedia"),b.emit(b.EVENT.livePause),b.emit(b.EVENT.searchMusicPause)},[]),F=r.useRef(),B=r.useMemo(()=>{var e,t,l;return(null==S?void 0:null===(l=S.authorInfo)||void 0===l?void 0:null===(t=l.roomData)||void 0===t?void 0:null===(e=t.others)||void 0===e?void 0:e.web_enter_benefit_point_data)||{has_ongoing_lottery:!1,has_ongoing_lucky_money:!1}},[S]),U=(0,y.gE)(s,B.has_ongoing_lottery,B.has_ongoing_lucky_money,!0),V=(0,r.useMemo)(()=>{let[e,t]=R.split("?"),l=g.parse(t||"");return!l.anchor_id&&delete l.anchor_id,`${e}?${g.stringify(l)}`},[R,S]),O=e=>{A()};return(0,n.jsx)("div",{ref:L,children:(0,n.jsx)("div",{ref:M,onMouseEnter:e=>{var t;null===(t=F.current)||void 0===t||t.mouseEnterHandler(e)},onMouseLeave:e=>{var t;null===(t=F.current)||void 0===t||t.mouseLeaveHandler(e)},children:(0,n.jsxs)(x.a,{href:V,rel:"noopener noreferrer",target:"_blank",className:a()(I.default.liveItem,N),onClick:e=>{(0,y.tw)(null==i?void 0:i.anchorId,P,D,0,null==i?void 0:i.isEcomLive),k(),O(e)},children:[(0,n.jsx)(y.nh,{isEcomLive:null==i?void 0:i.isEcomLive,isShow:T,src:null==i?void 0:i.coverSrc,className:I.default.avatar,uid:null==i?void 0:i.anchorId,type:"extra-small",isFirstLive:(null==i?void 0:null===(l=i.episodeExtra)||void 0===l?void 0:null===(t=l.mod)||void 0===t?void 0:t.episode_stage)===2,liveRoomUrl:R,liveRoomParam:D,disableAllAnim:!0,awemeInfo:S,from:"follow",position:"right",isLogin:E,fixLeft:104,handlerRef:F,disableSelfEvent:!0,wrapStyle:{display:"flex"},useRedPack:!1,logParams:o,abtestData:s}),(0,n.jsxs)("div",{className:I.default.nameWrap,children:[(0,n.jsx)("div",{className:I.default.name,children:null==i?void 0:i.userName}),U.icon&&(0,n.jsxs)("div",{className:I.default.redPackWrap,children:[(0,n.jsx)("img",{src:U.icon,className:I.default.redPackImg}),(0,n.jsx)("span",{className:I.default.redPackText,children:U.text})]})]})]})})})},k=l("234150"),N=e=>{var t;let{liveList:l=[],hasLimit:i,loading:v,logParams:f,abTestData:h,onItemClick:p,isLogin:g}=e,_=(0,o.a)(),x=(0,d.En)(_.pathname),C=(null===(t=window)||void 0===t?void 0:t.location.hostname)==="www.douyin.com"&&!x,w=i?l.slice(0,3):l,b=w.length<6?w.length:5,I=(0,r.useRef)();return(0,r.useEffect)(()=>{let e=e=>{null==e||e.preventDefault(),null==e||e.stopPropagation()},t=I.current,l=i||w.length<5;return l&&(null==t||t.addEventListener("wheel",e)),()=>{l&&(null==t||t.removeEventListener("wheel",e))}},[i]),(0,n.jsx)("div",{ref:I,className:a()(c.default.container,c.default.hideScrollbar,{[c.default.longList]:!i}),children:v?(0,n.jsx)(s.g,{className:c.default.loading}):(0,n.jsxs)("div",{className:c.default.list,children:[w.map((e,t)=>(0,n.jsx)(j,{data:e,logParams:f,index:t,abTestData:h,liveList:l,defaultShowCount:b,isInDouyinWeb:C,onItemClick:p,itemClass:t!==w.length-1||i?"":c.default.avatarItem,awemeInfo:e.__fakeAwemeInfo,isLogin:g},e.anchorId)),i&&(0,n.jsx)(k.a,{className:c.default.more,spa:C,href:(0,u.ff)(),onClick:()=>{m.sendLog("fastLiveHeadClickMore",{entrance_type:f.entrance_type,hover_show_cnt:l.length})},children:"查看更多"})]})})}},879375:function(e,t,l){l.d(t,{G9:function(){return S},UU:function(){return N}}),l(490629);var n=l(320165),r=l(101199),i=l(469935),a=l.n(i),o=l(809798),s=l(339808),d=l(734123),u=l.n(d),c=l(280647),v=l(72430),m=l(499059),f=l(995898),h=l(661444),p=l(414061),g=l(596678),_=l(47014),x=l(486463),C=l(9352),w=l(435712),b=l(332009),I=l(91627),y=l(117961),j=l(536065);let k=[m.gI.PlayerCardInfo,m.gI.isVideoPlayed,m.gI.IsInModalVideo],N=()=>{let e=(0,r.useRef)(!1),{pathname:t}=(0,s.a)(),l=(0,r.useRef)(t),n=(0,r.useRef)(!1);return(0,f.Nr)(t)?n.current=!0:(n.current?(n.current=!1,e.current=l.current===t):e.current=!1,l.current=t),e},S=e=>{let{children:t,parentRouteClassName:l,checkIsActive:i}=e,{pathname:d}=(0,s.a)(),S=!0;i&&(S=i(d));let E=S&&(0,f.Nr)(d),L=(0,f.Nr)(d)||!S,T=(0,r.useRef)(),M=N(),R=(0,r.useRef)(d),D=(0,r.useRef)(d),P=(0,r.useMemo)(()=>(0,h.oS)(null==R?void 0:R.current)?v.lT.Recommend:(0,h.i8)(null==R?void 0:R.current)?v.lT.Follow:(0,h.z1)(null==R?void 0:R.current)?v.lT.Friend:(0,h.e2)(null==R?void 0:R.current)?v.lT.Modal:(0,h.h$)(null==R?void 0:R.current)?v.lT.User:(0,h.Q5)(null==R?void 0:R.current)?v.lT.AiSearch:void 0,[]);return L&&(D.current=d),(0,r.useLayoutEffect)(()=>{L&&p.emit(p.EVENT.videoPause,{isInChildRoute:!0})},[L]),(0,r.useEffect)(()=>()=>{if(E){let e=p.getPageScope(R.current);p.emit(p.EVENT.exitChildRoute,null,e),"child_route"!==e&&p.emit(p.EVENT.exitChildRoute,null,"child_route")}else p.emit(p.EVENT.enterChildRoute)},[E]),(0,r.useEffect)(()=>{if(L){let e=!1,t=t=>{e=!0};return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t),e&&setTimeout(()=>{window.dispatchEvent(new Event("resize"))},20)}}},[L]),(0,r.useLayoutEffect)(()=>{if(L){let e=k.map(e=>m.Le.getConfig(e));return m.Le.setConfig(m.gI.SlideStartTime,{slideStartTime:0}),()=>{k.forEach((t,l)=>{m.Le.setConfig(t,e[l])}),m.Le.setConfig(m.gI.SlideStartTime,{slideStartTime:0})}}},[L]),(0,r.useLayoutEffect)(()=>{!M.current&&(0,j.S)()&&(0,g._)()},[]),(0,c.Z)(()=>{let e=window.location.pathname;if(!L)return(!M.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 t,l,n,r,i;let a=null===(t=m.Le.getConfig(m.gI.IsInModalVideo))||void 0===t?void 0:t.isInModal,o=P&&!a?null===(l=b.s.getLastRegisterPlayerIdByScene)||void 0===l?void 0:l.call(b.s,P):(0,x.OB)();o&&(0,x.wS)(o,!1);let s=null===u()||void 0===u()?void 0:null===(r=u().instManager)||void 0===r?void 0:null===(n=r.find)||void 0===n?void 0:n.call(r,e=>(null==e?void 0:e.playerId)===o);if((0,f.dH)(e)){null==s||null===(i=s.pause)||void 0===i||i.call(s);let e=b.s.getPlayerInfoMap();m.Le.setConfig(m.gI.TempPlayerMap,e),b.s.clearPlayerInfoMap()}return()=>{var t,l,n,r;let i=!1,s=null!==(l=m.Le.getConfig(m.gI.TempPlayerMap))&&void 0!==l?l:null;if(s){if(M.current)null===(r=b.s.setPlayerInfoMap)||void 0===r||r.call(b.s,s);else{let t=new Map;s.forEach((e,l)=>{if(e.scene===v.lT.Modal){var n;null===(n=b.s.unRegister)||void 0===n||n.call(b.s,{id:l})}else t.set(l,e)}),(0,f.dH)(e),null===(n=b.s.setPlayerInfoMap)||void 0===n||n.call(b.s,t)}m.Le.setConfig(m.gI.TempPlayerMap,null)}(0,f.dH)(e)&&!M.current&&a&&(i=!0);let d=P&&(!a||i)?null===(t=b.s.getLastRegisterPlayerIdByScene)||void 0===t?void 0:t.call(b.s,P):(0,x.OB)(),u=i&&d?d:o||d;u&&(0,x.wS)(u,!0);let c=setTimeout(()=>{let e=(0,x.OB)(),t=b.s.getPlayersByScene(P).find(t=>t.playerId===e),l=b.s.getAllPlayer().find(e=>(null==e?void 0:e.playerId)===u);if(l&&!(t&&e!==u)){var n;!(0,f.Nr)(D.current)&&l.once("play",()=>{(0,_.yr)({fromCache:1})}),null==l||null===(n=l.play)||void 0===n||n.call(l)}},500);m.Le.setConfig(m.gI.BackToCacheDelayPlayTimer,c)}}},[L]),(0,r.useEffect)(()=>{if(L)return;let e=T.current,t=e=>p.emit(p.EVENT.routePageScroll,e);return null==e||e.addEventListener("scroll",t),()=>{null==e||e.removeEventListener("scroll",t)}},[L]),(0,r.useEffect)(()=>{E&&p.emit(p.EVENT.childRouteRender)},[E]),(0,r.useEffect)(()=>{!m.Le.getConfig(m.gI.SvgDirectRender)&&m.Le.setConfig(m.gI.SvgDirectRender,!0)},[]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(y.O,{active:!L,className:a()({[w.tt]:!L,[C.default.withoutscrollbar]:P===v.lT.User},l,w.ei,C.default.routeContainer),ref:T,children:t}),E&&(0,n.jsx)(I.w,{isActive:E,children:(0,n.jsx)("div",{className:a()(w.WV,w.ei,C.default.routeContainer,C.default.childRoute,{[C.default.enterChildRoute]:!S}),children:(0,n.jsx)(o.Outlet,{})})})]})}},523784:function(e,t,l){l.d(t,{C:function(){return m}});var n=l("629686"),r=l("402748"),i=l("320165"),a=l("36807"),o=l.n(a);l("101199");var s=l("879375"),d=l("939165"),u=l("414061"),c=l("435712");let v=()=>{(0,d.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,t,l){return function(a){v();let d=(0,i.jsx)(e,(0,n._)({},a));return(0,i.jsx)(s.G9,(0,r._)((0,n._)({checkIsActive:t,parentRouteClassName:l},o()),{children:d}))}}},660030:function(e,t,l){l.d(t,{X:function(){return n}});let n=(0,l(101199).createContext)(null)},133424:function(e,t,l){l.d(t,{Z:function(){return ey}});var n=l("629686"),r=l("402748");l("490629"),l("559352"),l("679308"),l("374954");var i=l("320165"),a=l("101199"),o=l("205005"),s=l("745568"),d=l("469935"),u=l.n(d),c=l("414061"),v=l("81683"),m=l("350856"),f=l.n(m);let h=(0,a.createContext)(null);l("76375");var p=l("431170"),g=l("973725"),_=l("983218"),x=l("660030");function C(e){let{searchText:t}=e;return(0,i.jsx)("div",{className:g.default.middle,children:t?"没有搜索到相关用户":"没有数据"})}function w(e){let{isMiddle:t}=e;return(0,i.jsx)("div",{className:u()({[g.default.middle]:t}),children:(0,i.jsx)(_.gb,{})})}function b(e){let{isMiddle:t,onLoadMoreData:l}=e;return(0,i.jsxs)("div",{className:u()({[g.default.middle]:t}),children:["用户信息获取失败,请",(0,i.jsx)("span",{className:g.default.reload,onMouseDown:()=>{l()},children:"刷新"}),"重试"]})}function I(e){var t,l,n;let{suggestData:r,searchText:a,onLoadMoreData:o,isLoading:s}=e,d=null;return(null==r?void 0:r.statusCode)===0||s?(null==r?void 0:r.hasMore)?d=(0,i.jsx)(w,{isMiddle:(null==r?void 0:null===(n=r.data)||void 0===n?void 0:n.length)===0}):(null==r?void 0:r.hasFetchData)&&(null==r?void 0:null===(t=r.data)||void 0===t?void 0:t.length)===0&&(d=(0,i.jsx)(C,{searchText:a})):d=(0,i.jsx)(b,{isMiddle:(null==r?void 0:null===(l=r.data)||void 0===l?void 0:l.length)===0,onLoadMoreData:o}),d}function y(e){let{children:t,className:l,targetEl:n,isSearch:r,searchText:o,onLoadMoreData:s,suggestData:d}=e,c=(0,a.useRef)(null),[v,m]=(0,a.useState)(null),[_,C]=(0,a.useState)(!1),w=(0,a.useRef)(null),b=(0,a.useRef)(!1),y=(0,a.useContext)(x.X),{isDetail:j}=null!=y?y:{},{refOuterContainer:k}=(0,a.useContext)(h)||{},{styles:N}=(0,p.D)(n,v,{placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[0,16]}}]}),S=(0,a.useCallback)(()=>{var e,t;return j?{}:{marginTop:-((null==k?void 0:null===(t=k.current)||void 0===t?void 0:null===(e=t.querySelector(".richtext-container"))||void 0===e?void 0:e.offsetHeight)+200)}},[]);w.current=s;let E=(0,a.useCallback)(f()(async()=>{if(!!v&&!b.current){if(v.scrollTop+v.clientHeight+100>v.scrollHeight){var e;await (null===(e=w.current)||void 0===e?void 0:e.call(w))}}},500),[v]);return(0,a.useEffect)(()=>{v&&(v.scrollTop=0)},[o,v]),(0,a.useEffect)(()=>{if(!!v&&(null==d?void 0:d.statusCode)===0&&!!(null==d?void 0:d.hasMore))return b.current=!1,v.addEventListener("scroll",E),()=>{b.current=!0,v&&v.removeEventListener("scroll",E)}},[v,E,d]),(0,i.jsxs)("div",{className:u()(g.default.container,l,"atBox-outside-container",g.default.atIcon),ref:m,style:S(),onMouseDown:e=>{e.preventDefault()},children:[(0,i.jsx)("div",{className:u()(g.default.innerContainer,"atBox-inner-container",{[g.default.isSearch]:r}),ref:c,children:t}),(0,i.jsx)(I,{suggestData:d,searchText:o,isLoading:_,onLoadMoreData:async()=>{C(!0),await s(),C(!1)}})]})}function j(e){let{children:t,store:l}=e,{onLoadMoreData:n,suggestData:r,searchText:o,isAtIconSelected:s}=(0,a.useContext)(h);return(0,i.jsx)(y,{searchText:o,targetEl:null==l?void 0:l.getReferenceElement(),onLoadMoreData:n,suggestData:r,isAtIconSelected:s,children:t})}var k=l("811603"),N=l("759894"),S=l("182046"),E=l("966473");let L=(0,a.forwardRef)((e,t)=>(0,i.jsxs)("svg",(0,r._)((0,n._)({width:13,height:12,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:[(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.611 11a4.889 4.889 0 1 0 0-9.777 4.889 4.889 0 0 0 0 9.777z",fill:"#FE2C55"}),(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.691 7.23a.612.612 0 0 0 0 .863.612.612 0 0 0 .863 0l2.697-2.697a.61.61 0 1 0-.864-.864L5.691 7.23z",fill:"url(#icon-avater-select_svg__paint0_linear_37464_5518)"}),(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.418 7.229a.612.612 0 0 1-.864 0l-.431-.432-1.288-1.288a.612.612 0 0 0-.864 0 .612.612 0 0 0 0 .864l1.72 1.72a.612.612 0 0 0 .863 0l.864-.864z",fill:"#fff"}),(0,i.jsx)("rect",{x:1.355,y:".856",width:10.511,height:10.511,rx:5.256,stroke:"#363741",strokeWidth:".733"}),(0,i.jsx)("defs",{children:(0,i.jsxs)("linearGradient",{id:"icon-avater-select_svg__paint0_linear_37464_5518",x1:7.925,y1:3.112,x2:5.088,y2:5.809,gradientUnits:"userSpaceOnUse",children:[(0,i.jsx)("stop",{stopColor:"#fff"}),(0,i.jsx)("stop",{offset:1,stopColor:"#ECEDED"})]})})]})));var T=l("836619"),M=l("176449"),R=l("656266");function D(e){var{className:t,mention:l,awemeInfo:o,selectOn:s,onClick:d}=e,c=(0,k._)(e,["className","mention","awemeInfo","selectOn","onClick"]);let[v,m]=(0,a.useState)(!1),f=(0,E.x)(()=>{S.Z.sendLog("commentAtShow",{author_id:`${null==o?void 0:o.authorUserId}`,group_id:null==o?void 0:o.awemeId,log_pb:null==o?void 0:o.logPb,enter_from:(0,N.vM)(),to_user_id:null==l?void 0:l.uid})}),h=(0,a.useCallback)(e=>{null==d||d(e),s&&m(e=>!e)},[d,s]),p=(0,a.useCallback)(()=>(0,i.jsx)("i",{className:T.default.mask}),[]);return(0,i.jsx)("div",(0,r._)((0,n._)({className:u()(T.default.container,t),onClick:e=>h(e)},c),{ref:f,children:(0,i.jsxs)("div",{className:T.default.innerContainer,children:[v?(0,i.jsx)(M.Z,{width:14,height:14,viewBox:"0 0 14 14",src:L,className:T.default.icon}):null,(0,i.jsx)(R.q,{src:l.avatarUri,type:"extraSmall",maskConf:{showMask:v,MaskItem:p}}),(0,i.jsx)("span",{className:T.default.userName,children:l.remarkName||l.nickname||""})]})}))}function P(e){var{children:t,mention:l,onMouseDown:n,onMouseUp:r,onMouseEnter:o}=e;(0,k._)(e,["children","mention","onMouseDown","onMouseUp","onMouseEnter"]);let{awemeInfo:s}=(0,a.useContext)(h);return(0,i.jsx)("div",{onMouseDown:n,onMouseUp:r,onMouseEnter:o,onMouseDown:e=>{n(e)},onMouseDownCapture:e=>{n(e)},onMouseUp:e=>{S.Z.sendLog("commentAtClick",{author_id:`${null==s?void 0:s.authorUserId}`,group_id:null==s?void 0:s.awemeId,log_pb:null==s?void 0:s.logPb,enter_from:(0,N.vM)(),to_user_id:null==l?void 0:l.uid}),r(e)},onClick:e=>{r(e)},onMouseEnter:()=>{},children:(0,i.jsx)(D,{mention:l,awemeInfo:s})})}function A(e){let{SuggestionComponent:t,loadSearchAtData:l,loadMoreDefaultAtData:n,atUserDefaultData:r,atUserSearchData:o,awemeInfo:s,editorState:d,addUserMention:u,isAtIconSelected:c,setIsAtIconSelected:v,refOuterContainer:m,setIsAtIconPoint:p}=e,[g,_]=(0,a.useState)(!1),[C,w]=(0,a.useState)(null==o?void 0:o.searchText),b=(0,a.useMemo)(()=>(null==o?void 0:o.hasMore)&&c,[o,c]),I=(0,a.useMemo)(()=>C?o:r,[o,r,C]),y=(0,a.useContext)(x.X),{isActive:k=!0}=null!=y?y:{};(0,a.useEffect)(()=>{(g||c)&&0===r.data.length&&0===r.statusCode&&r.hasMore&&n()},[g,r,n,c,k]),(0,a.useEffect)(()=>{!k&&_(!1)},[k]),(0,a.useEffect)(()=>{C&&l(C)},[C]);let N=(0,a.useCallback)(()=>C?l(C):n(),[C,l,n]),S=(0,a.useCallback)(f()(e=>{w(e.value)},300,{leading:!1,trailing:!0}),[]);return(0,i.jsx)(h.Provider,{value:{onLoadMoreData:N,suggestData:I,searchText:C,awemeInfo:s,editorState:d,addUserMention:u,isAtIconSelected:c,setIsAtIconSelected:v,refOuterContainer:m,setIsAtIconPoint:p},children:(0,i.jsx)(t,{open:g,onOpenChange:e=>{_(e)},suggestions:I.data,onSearchChange:e=>{S(e)},renderEmptyPopup:b,popperOptions:{loadMoreDefaultAtData:n,loadSearchAtData:l,suggestData:I,searchText:C},popoverContainer:j,entryComponent:P,hasMore:null==I?void 0:I.hasMore,isActive:k})})}l("117232"),l("374285"),l("566071"),l("759943"),l("414931"),l("409954");var F=l("947601"),B=l.n(F),U=(e,t,l)=>{let n=t.getAnchorKey(),r=t.getAnchorOffset();return function(e,t,l){let n=e.substr(0,t),r=l.map(e=>B()(e)).join("|"),i=RegExp(`(${r})`,"g"),a=n.matchAll(i),o=0,s=0;for(let e of a){let t=e[1].length;s=(o=e.index||0)+t}let d=n.slice(s);return{begin:o,end:n.length,matchingString:d}}(e.getCurrentContent().getBlockForKey(n).getText(),r,l)};function V(e){return"@"===e?"mention":`${e}mention`}function O(e,t,l,n,r){let i=e.getCurrentContent().createEntity(V(n),r,{mention:t}).getLastCreatedEntityKey(),a=e.getSelection(),{begin:s,end:d}=U(e,a,[n]),u=a.merge({anchorOffset:s,focusOffset:d}),c=o.Modifier.replaceText(e.getCurrentContent(),u,`${l}${t.name}`,void 0,i),v=u.getAnchorKey();e.getCurrentContent().getBlockForKey(v).getLength()===d&&(c=o.Modifier.insertText(c,c.getSelectionAfter()," "));let m=o.EditorState.push(e,c,"insert-fragment");return o.EditorState.forceSelection(m,c.getSelectionAfter())}let H=e=>{let t=e.getCurrentContent(),l=t.createEntity("mention","IMMUTABLE",{}).getLastCreatedEntityKey(),n=o.Modifier.insertText(t,t.getSelectionAfter(),"@",null,l);return o.EditorState.push(e,n,"insert-fragment")},z=(e,t)=>O(e,t,"@","@","IMMUTABLE"),Z=(e,t)=>{let l=e.getCurrentContent(),n=l.createEntity("mention","IMMUTABLE",{mention:t}).getLastCreatedEntityKey(),r=e.getSelection(),i=o.Modifier.removeRange(l,r,"backward"),a=o.Modifier.insertText(i,i.getSelectionAfter()," "),s=o.Modifier.insertText(a,a.getSelectionAfter(),`@${t.name}`,void 0,n);s=o.Modifier.insertText(s,s.getSelectionAfter()," ");let d=o.EditorState.push(e,s,"insert-fragment");return o.EditorState.forceSelection(d,s.getSelectionAfter())},W=(e,t)=>{let l=e.getCurrentContent(),n=l.createEntity("emoji","IMMUTABLE",{emojiInfo:t}).getLastCreatedEntityKey(),r=e.getSelection(),i=o.Modifier.removeRange(l,r,"backward"),a=o.Modifier.insertText(i,i.getSelectionAfter()," "),s=o.Modifier.insertText(a,a.getSelectionAfter(),`${t.text}`,void 0,n);s=o.Modifier.insertText(s,s.getSelectionAfter()," ");let d=o.EditorState.push(e,s,"insert-fragment");return o.EditorState.forceSelection(d,s.getSelectionAfter())};function $(e,t,l){let i=[],a=-1;return t.findEntityRanges(t=>{let n=t.getEntity();if(!n)return!1;let r=e.getEntity(n),o="mention"===r.getType();if(o){var s,d;let e=r.getData();i[++a]={user_id:null===(s=e.mention)||void 0===s?void 0:s.uid,sec_uid:null===(d=e.mention)||void 0===d?void 0:d.secUid,type:0,start:l+0,end:l+0}}return o},(e,t)=>{i[a]=(0,r._)((0,n._)({},i[a]),{start:l+e,end:l+t})}),i}let K=e=>({text:Y(e),textExtra:(function(e){let t=e.getCurrentContent(),l=t.getFirstBlock(),n=t.getLastBlock(),r=l.getKey();if(r===n.getKey())return $(t,l,0);{let e=[];for(let l=r,n=0;l;l=t.getKeyAfter(l)){let r=t.getBlockForKey(l);e.push(...$(t,r,n)),n+=r.text.length+1}return e}})(e).filter(e=>null==e?void 0:e.user_id)}),Y=e=>{let t=e.getCurrentContent().getBlocksAsArray(),l=[];for(let e=0;e<t.length;e++)l.push(t[e].text);return l.join("\n")},G=function(e,t){let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=0,a=e.getCurrentContent();if(0===l.length)return a=o.Modifier.insertText(a,a.getSelectionAfter(),t),o.EditorState.push(e,a,"insert-fragment");let s=l.sort((e,t)=>e.start-t.start);for(;t.length>i;)if(s.length>0&&s[0].start===i){let e=s[0],l=(0,r._)((0,n._)({},e),{uid:e.userId,name:t.slice(e.start,e.end)}),d=a.createEntity("mention","IMMUTABLE",{mention:l}),u=d.getLastCreatedEntityKey();a=o.Modifier.insertText(d,d.getSelectionAfter(),`${l.name}`,void 0,u),s.shift(),i=e.end}else{let e=s.length>0?s[0]:{start:t.length},l=t.slice(i,e.start);a=o.Modifier.insertText(a,a.getSelectionAfter(),l),i=e.start}return o.EditorState.push(e,a,"insert-fragment")},q=13;var X=l("11148"),Q=l("39282");function J(e){let{mention:t,children:l,className:n}=e;return(0,i.jsx)("a",{href:t.link,className:n,spellCheck:!1,"data-testid":"mentionLink",children:l})}function ee(e){let{children:t,className:l}=e;return(0,i.jsx)("span",{className:l,spellCheck:!1,"data-testid":"mentionText",children:t})}function et(e){let{entityKey:t,theme:l={},mentionComponent:n,children:r,decoratedText:a,className:o,contentState:s}=e,d=(0,Q.default)(l.mention,o),u=s.getEntity(t).getData().mention,c=n||(u.link?J:ee);return(0,i.jsx)(c,{entityKey:t,mention:u,theme:l,className:d,decoratedText:a,children:r})}var el=l("480333"),en=l("622689"),er=l.n(en);let ei=e=>{let{onMentionSelect:t,mention:l,theme:n,index:r,onMentionFocus:o,isFocused:s,id:d,searchValue:u,entryComponent:c}=e,v=(0,a.useRef)(!1),m=(0,a.useRef)(null);(0,a.useEffect)(()=>{s&&requestAnimationFrame(()=>{var e;return null===(e=m.current)||void 0===e?void 0:e.scrollIntoView({behavior:"smooth",block:"nearest"})})},[s]),(0,a.useEffect)(()=>{v.current=!1});let f=s?n.mentionSuggestionsEntryFocused:n.mentionSuggestionsEntry;return(0,i.jsx)("div",{ref:m,children:(0,i.jsx)(c,{className:f,onMouseDown:e=>{e.preventDefault(),v.current=!0},onMouseUp:()=>{v.current&&(t(l),v.current=!1)},onMouseEnter:()=>{o(r)},role:"option",id:d,"aria-selected":s?"true":void 0,theme:n,mention:l,isFocused:s,searchValue:u})})};ei.propTypes={entryComponent:er().any.isRequired,searchValue:er().string,onMentionSelect:er().func};function ea(e){let{mention:t,theme:l={}}=e;return t.avatar?(0,i.jsx)("img",{src:t.avatar,className:l.mentionSuggestionsEntryAvatar,role:"presentation"}):null}function eo(e){let{mention:t,theme:l,isFocused:a,searchValue:o}=e,s=(0,k._)(e,["mention","theme","isFocused","searchValue"]);return(0,i.jsxs)("div",(0,r._)((0,n._)({},s),{children:[(0,i.jsx)(ea,{mention:t,theme:l}),(0,i.jsx)("span",{className:null==l?void 0:l.mentionSuggestionsEntryText,children:t.name})]}))}let es=e=>e?"static"!==window.getComputedStyle(e).getPropertyValue("position")?e:es(e.parentElement):null;function ed(e){let t,l,n,{decoratorRect:r,popover:i,props:a}=e,o=es(i.parentElement);if(o){let e=o.getBoundingClientRect();t={scrollLeft:o.scrollLeft,scrollTop:o.scrollTop,left:r.left-e.left,top:r.bottom-e.top}}else t={scrollTop:window.pageYOffset||document.documentElement.scrollTop,scrollLeft:window.pageXOffset||document.documentElement.scrollLeft,top:r.bottom,left:r.left};let s=t.left+t.scrollLeft,d=t.top+t.scrollTop;return a.open&&(a.suggestions.length>0?(l="scale(1)",n="all 0.25s cubic-bezier(.3,1.2,.2,1)"):(l="scale(0)",n="all 0.35s cubic-bezier(.3,1,.2,1)")),{left:`${s}px`,top:`${d}px`,transform:l,transformOrigin:"1em 0%",transition:n}}l("228983"),l("527553");var eu=e=>{let[t,l,n]=e.split("-");return{blockKey:t,decoratorKey:parseInt(l,10),leafKey:parseInt(n,10)}};function ec(e){return void 0!==e}function ev(e){let{store:t,children:l,theme:o,popperOptions:s={placement:"bottom-start"}}=e,[d,u]=(0,a.useState)(()=>(0,Q.default)(o.mentionSuggestions,o.mentionSuggestionsPopup)),[c,v]=(0,a.useState)(null),{styles:m,attributes:f}=(0,p.D)(t.getReferenceElement(),c,s);return(0,a.useEffect)(()=>{requestAnimationFrame(()=>u((0,Q.default)(o.mentionSuggestions,o.mentionSuggestionsPopup,o.mentionSuggestionsPopupVisible)))},[o]),(0,i.jsx)("div",(0,r._)((0,n._)({ref:v,style:m.popper},f.popper),{className:d,children:l}))}var em=l("264034");let ef=l.n(em)()(e=>{});class eh extends a.Component{componentDidUpdate(){if(this.popover){let e=this.props.suggestions.length;if(e>0&&this.state.focusedOptionIndex>=e&&this.setState({focusedOptionIndex:e-1}),!this.props.store.getAllSearches().has(this.activeOffsetKey))return;let t=this.props.store.getPortalClientRect(this.activeOffsetKey);for(let[e,l]of Object.entries((this.props.positionSuggestions||ed)({decoratorRect:t,props:this.props,popover:this.popover})))this.popover.style[e]=l}}componentWillUnmount(){this.props.callbacks.onChange=void 0}render(){if(!this.props.open)return null;let e=this.props,{entryComponent:t,popoverComponent:l,popperOptions:o,popoverContainer:s=ev,onOpenChange:d,onAddMention:u,onSearchChange:c,suggestions:v,ariaProps:m,callbacks:f,theme:h={},store:p,entityMutability:g,positionSuggestions:_,mentionTriggers:x,mentionPrefix:C}=e,w=(0,k._)(e,["entryComponent","popoverComponent","popperOptions","popoverContainer","onOpenChange","onAddMention","onSearchChange","suggestions","ariaProps","callbacks","theme","store","entityMutability","positionSuggestions","mentionTriggers","mentionPrefix"]);return l||_?(ef("The properties `popoverComponent` and `positionSuggestions` are deprecated and will be removed in @draft-js-plugins/mentions 6.0 . Use `popperOptions` instead"),a.cloneElement(l||(0,i.jsx)("div",{}),(0,r._)((0,n._)({},w),{className:h.mentionSuggestions,role:"listbox",id:`mentions-list-${this.key}`,ref:e=>{this.popover=e}}),null==v?void 0:v.map((e,l)=>(0,i.jsx)(ei,{onMentionSelect:this.onMentionSelect,onMentionFocus:this.onMentionFocus,isFocused:this.state.focusedOptionIndex===l,mention:e,index:l,id:`mention-option-${this.key}-${l}`,theme:h,searchValue:this.lastSearchValue,entryComponent:t||eo},null!==e.id?e.id:e.name)))):this.props.renderEmptyPopup||0!==v.length?(0,i.jsx)(s,{store:this.props.store,popperOptions:o,theme:h,children:null==v?void 0:v.map((e,l)=>(0,i.jsx)(ei,{onMentionSelect:this.onMentionSelect,onMentionFocus:this.onMentionFocus,isFocused:this.state.focusedOptionIndex===l,mention:e,index:l,id:`mention-option-${this.key}-${l}`,theme:h,searchValue:this.lastSearchValue,entryComponent:t||eo},null!==e.id?e.id:e.uid))}):null}constructor(e){super(e),(0,el._)(this,"state",{focusedOptionIndex:0}),(0,el._)(this,"key",(0,o.genKey)()),(0,el._)(this,"popover",void 0),(0,el._)(this,"activeOffsetKey",void 0),(0,el._)(this,"lastSearchValue",void 0),(0,el._)(this,"lastActiveTrigger",""),(0,el._)(this,"lastSelectionIsInsideWord",void 0),(0,el._)(this,"onEditorStateChange",e=>{let t=this.props.store.getAllSearches();if(0===t.size)return e;let l=function(e,t,l){let n=e.getSelection(),r=n.getAnchorKey(),i=n.getAnchorOffset();if(!n.isCollapsed()||!n.getHasFocus())return null;let a=t.map(e=>eu(e)).filter(e=>e.blockKey===r).map(t=>{var l;return null==e?void 0:null===(l=e.getBlockTree(t.blockKey))||void 0===l?void 0:l.getIn([t.decoratorKey])});if(a.every(e=>void 0===e))return null;let o=e.getCurrentContent().getBlockForKey(r).getText(),s=a.filter(ec).map(e=>{let{start:t,end:n}=e;return l.map(e=>0===t&&i>=t+e.length&&o.substr(0,e.length)===e&&i<=n||l.length>1&&i>=t+e.length&&(o.substr(t+1,e.length)===e||o.substr(t,e.length)===e)&&i<=n||1===l.length&&i>=t+e.length&&i<=n?e:void 0).filter(ec)[0]}).filter(ec);if(s.isEmpty())return null;let[d,u]=s.entrySeq().first();return{activeOffsetKey:d,activeTrigger:u}}(e,t,this.props.mentionTriggers);if(!l)return(()=>(this.props.store.resetEscapedSearch(),this.closeDropdown(),e))();let n=this.activeOffsetKey;return this.activeOffsetKey=l.activeOffsetKey,this.onSearchChange(e,e.getSelection(),this.activeOffsetKey,n,l.activeTrigger),!this.props.store.isEscaped(this.activeOffsetKey||"")&&this.props.store.resetEscapedSearch(),!this.props.open&&!this.props.store.isEscaped(this.activeOffsetKey||"")&&this.openDropdown(),n!==this.activeOffsetKey&&this.setState({focusedOptionIndex:0}),e}),(0,el._)(this,"onSearchChange",(e,t,l,n,r)=>{let{matchingString:i}=U(e,t,[r]);(this.lastActiveTrigger!==r||this.lastSearchValue!==i||l!==n)&&(this.lastActiveTrigger=r,this.lastSearchValue=i,this.props.onSearchChange({trigger:r,value:i}))}),(0,el._)(this,"onDownArrow",e=>{e.preventDefault();let t=this.state.focusedOptionIndex+1;this.onMentionFocus(t>=this.props.suggestions.length?0:t)}),(0,el._)(this,"onTab",e=>{e.preventDefault(),this.commitSelection()}),(0,el._)(this,"onUpArrow",e=>{if(e.preventDefault(),this.props.suggestions.length>0){let e=this.state.focusedOptionIndex-1;this.onMentionFocus(e<0?this.props.suggestions.length-1:e)}}),(0,el._)(this,"onEscape",e=>{e.preventDefault(),this.props.store.escapeSearch(this.activeOffsetKey||""),this.closeDropdown(),this.props.store.setEditorState(this.props.store.getEditorState())}),(0,el._)(this,"onMentionSelect",e=>{if(!e)return;this.props.onAddMention&&this.props.onAddMention(e),this.closeDropdown();let t=O(this.props.store.getEditorState(),e,this.props.mentionPrefix,this.lastActiveTrigger||"",this.props.entityMutability);this.props.store.setEditorState(t)}),(0,el._)(this,"onMentionFocus",e=>{let t=`mention-option-${this.key}-${e}`;this.props.ariaProps.ariaActiveDescendantID=t,this.setState({focusedOptionIndex:e}),this.props.store.setEditorState(this.props.store.getEditorState())}),(0,el._)(this,"commitSelection",()=>{let e=this.props.suggestions[this.state.focusedOptionIndex];return this.props.store.getIsOpened()&&e?(this.onMentionSelect(e),"handled"):"not-handled"}),(0,el._)(this,"openDropdown",()=>{this.props.callbacks.handleReturn=this.commitSelection,this.props.callbacks.keyBindingFn=e=>{40===e.keyCode&&this.onDownArrow(e),38===e.keyCode&&this.onUpArrow(e),27===e.keyCode&&this.onEscape(e),9===e.keyCode&&this.onTab(e)};let e=`mention-option-${this.key}-${this.state.focusedOptionIndex}`;this.props.ariaProps.ariaActiveDescendantID=e,this.props.ariaProps.ariaOwneeID=`mentions-list-${this.key}`,this.props.ariaProps.ariaHasPopup="true",this.props.ariaProps.ariaExpanded=!0,this.props.onOpenChange(!0)}),(0,el._)(this,"closeDropdown",()=>{this.props.callbacks.handleReturn=void 0,this.props.callbacks.keyBindingFn=void 0,this.props.ariaProps.ariaHasPopup="false",this.props.ariaProps.ariaExpanded=!1,this.props.ariaProps.ariaActiveDescendantID=void 0,this.props.ariaProps.ariaOwneeID=void 0,this.props.onOpenChange(!1)}),this.props.callbacks.onChange=this.onEditorStateChange}}(0,el._)(eh,"propTypes",{open:er().bool.isRequired,onOpenChange:er().func.isRequired,entityMutability:er().oneOf(["SEGMENTED","IMMUTABLE","MUTABLE"]),entryComponent:er().func,onAddMention:er().func,suggestions:er().array.isRequired});let ep="undefined"!=typeof window?a.useLayoutEffect:a.useEffect;function eg(e){let t=(0,a.useRef)(),l=e=>{e.store.updatePortalClientRect(e.offsetKey,()=>t.current.getBoundingClientRect())};return ep(()=>(e.store.register(e.offsetKey),e.store.setIsOpened(!0),l(e),e.store.setEditorState(e.store.getEditorState()),()=>{e.store.unregister(e.offsetKey),e.store.setIsOpened(!1),e.store.setReferenceElement(null)}),[]),(0,a.useEffect)(()=>{l(e)}),(0,i.jsx)("span",{ref:l=>{t.current=l,e.store.setReferenceElement(l)},children:e.children})}var e_=e=>(t,l,n)=>{t.findEntityRanges(t=>{let l=t.getEntity();return null!==l&&e.some(e=>n.getEntity(l).getType()===V(e))},l)};l("14275");let ex=/\s/,eC=(e,t,l,n)=>{let r=t.getText();t.findEntityRanges(e=>!e.getEntity(),(t,i)=>{let a=r.slice(t,i);l?!function(e,t,l,n){let r,i;let a=e.lastIndex;for(;null!==(r=e.exec(t));){var o,s;if(e.lastIndex===a)break;a=e.lastIndex;let t=(i=l+r.index)+r[0].length;o=0,s=r.index;n(i,t)}}(e,a,t,n):!function(e,t,l,n){let r,i;let a=e.lastIndex;for(;null!==(r=e.exec(t))&&e.lastIndex!==a;){;a=e.lastIndex;let o=(i=l+r.index)+r[0].length;ex.test(t[i])&&(i+=1),n(i,o)}}(e,a,t,n)})};var ew=(e,t,l)=>{let n=`(${e.map(e=>B()(e)).join("|")})`,r=t?RegExp(`${n}(${l}|\\s)*`,"g"):RegExp(`(\\s|^)${n}${l}*`,"g");return(e,l)=>{eC(r,e,t,l)}},eb=l("280647"),eI=e=>{let{suggestions:t,onSearchChange:l,popoverContainer:n,hasMore:r}=e,{editorState:s,awemeInfo:d,addUserMention:u,isAtIconSelected:c,setIsAtIconSelected:v,setIsAtIconPoint:m}=(0,a.useContext)(h);return((0,eb.Z)(()=>{var e,t,n,r,i;let a=s.getCurrentContent(),d=a.getPlainText(),u=s.getSelection().getAnchorOffset(),c=null===(n=(0,o.convertToRaw)(a))||void 0===n?void 0:null===(t=n.blocks)||void 0===t?void 0:null===(e=t[0])||void 0===e?void 0:e.entityRanges,f=null==c?void 0:null===(i=c.reverse)||void 0===i?void 0:null===(r=i.call(c))||void 0===r?void 0:r.find(e=>e.offset<u);if(d){if(f){let{offset:e,length:t}=f,n=d.substring(e+t-1,u),r=n.indexOf("@");r>-1?l({value:n.slice(r+1)}):v(!1)}else{let e=d.indexOf("@");e>-1?l({value:d.slice(e+1)}):v(!1)}}else v(!1),m(!1),l({value:""})},[s,l]),c&&((null==t?void 0:t.length)||!1!==r))?(0,i.jsx)(n,{children:null==t?void 0:t.map(e=>(0,i.jsx)("div",{id:`search_${e.uid}`,children:(0,i.jsx)(D,{mention:e,awemeInfo:d,onClick:t=>{t.stopPropagation(),S.Z.sendLog("commentAtClick",{author_id:`${null==d?void 0:d.authorUserId}`,group_id:null==d?void 0:d.awemeId,log_pb:null==d?void 0:d.logPb,enter_from:(0,N.vM)(),to_user_id:null==e?void 0:e.uid}),u(e),l({value:""}),v(!1),m(!1)}})},`search_${e.uid}`))}):null};l("418982"),l("130604");var ey=a.forwardRef(function(e,t){let{placeholder:l,onChange:d,loadSearchAtData:m,loadMoreDefaultAtData:f,atUserDefaultData:h,atUserSearchData:p,onEditFocus:g,onEditBlur:_,awemeInfo:x,handlePublishClick:C,isAtIconSelected:w,setIsAtIconSelected:b,refOuterContainer:I,setIsAtIconPoint:y,isAtIconPoint:j,className:k,readOnly:N,maxLength:S,player:E}=e,L=(0,a.useRef)(null),T=(0,a.useRef)(null),[M,R]=(0,a.useState)(()=>o.EditorState.createEmpty()),D=(0,a.useRef)([]),P=(0,a.useRef)(!1),[F,B]=(0,a.useState)(!1),U=(0,a.useMemo)(()=>(function(){let e,t,l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a={keyBindingFn:void 0,handleKeyCommand:void 0,handleReturn:void 0,onChange:void 0},o={ariaHasPopup:"false",ariaExpanded:!1,ariaOwneeID:void 0,ariaActiveDescendantID:void 0},s=(0,X.Map)(),d=(0,X.Map)(),u=!1,c={getEditorState:void 0,setEditorState:void 0,getPortalClientRect:e=>d.get(e)(),getAllSearches:()=>s,isEscaped:t=>e===t,escapeSearch:t=>{e=t},resetEscapedSearch:()=>{e=void 0},register:e=>{s=s.set(e,e)},updatePortalClientRect:(e,t)=>{d=d.set(e,t)},unregister:e=>{s=s.delete(e),d=d.delete(e)},getIsOpened:()=>u,setIsOpened:e=>{u=e},getReferenceElement:()=>t,setReferenceElement:e=>{t=e}},{mentionPrefix:v="",theme:m={},positionSuggestions:f,mentionComponent:h,mentionSuggestionsComponent:p=eh,entityMutability:g="SEGMENTED",mentionTrigger:_="@",mentionRegExp:x="[\\w-\xc0-\xd6\xd8-\xf6\xf8-\xffĀ-ňŊ-ſА-я぀-ゟ゠-ヿ㄰-㆏가-힣一-龥؀-ۿ\xc0-ỹ。.><》《+。。,]",supportWhitespace:C=!1,popperOptions:w}=l,b="string"==typeof _?[_]:_,I={ariaProps:o,callbacks:a,theme:m,store:c,entityMutability:g,positionSuggestions:f,mentionTriggers:b,mentionPrefix:v,popperOptions:w};return{MentionSuggestions:e=>(0,i.jsx)(p,(0,n._)({},e,I)),decorators:[{strategy:e_(b),component:e=>(0,i.jsx)(et,(0,r._)((0,n._)({},e),{theme:m,mentionComponent:h}))},{strategy:ew(b,C,x),component:e=>(0,i.jsx)(eg,(0,r._)((0,n._)({},e),{store:c}))}],getAccessibilityProps:()=>({role:"combobox",ariaAutoComplete:"list",ariaHasPopup:o.ariaHasPopup,ariaExpanded:o.ariaExpanded,ariaActiveDescendantID:o.ariaActiveDescendantID,ariaOwneeID:o.ariaOwneeID}),initialize:e=>{let{getEditorState:t,setEditorState:l}=e;c.getEditorState=t,c.setEditorState=l},keyBindingFn:e=>a.keyBindingFn&&a.keyBindingFn(e),handleReturn:e=>a.handleReturn&&a.handleReturn(e),onChange:e=>a.onChange?a.onChange(e):e}})({entityMutability:"IMMUTABLE",mentionPrefix:"@",mentionTrigger:"@",supportWhitespace:!0,mentionComponent:e=>(0,i.jsx)("span",{className:u()(e.className,"douyin_mention_word"),children:e.children})}),[]),{MentionSuggestions:V}=U||{},O=[];O.unshift(U);let $=(0,a.useCallback)(e=>{let t=z(M,e);R(t),null==d||d(Y(t)),c.emit(c.EVENT.videoStopPlayNext)},[M,d]);(0,a.useImperativeHandle)(t,()=>({addUserMention:e=>{let t=Z(M,e);R(t),null==d||d(Y(t)),c.emit(c.EVENT.videoStopPlayNext)},addEmoji:e=>{let t=W(M,{text:`${(null==e?void 0:e.text)||"[微笑]"}`});R(t),null==d||d(Y(t)),c.emit(c.EVENT.videoStopPlayNext)},getCommentInfo:()=>{let e=K(M);return(0,r._)((0,n._)({},e),{pastedText:D.current})},getCommentText:()=>Y(M),clearInput:()=>new Promise(e=>{R(t=>(D.current=[],e(t),o.EditorState.createEmpty())),null==d||d("")}),resetInput:e=>{let t=e.getSelection(),l=e.getCurrentContent().getBlockMap().last(),n=t.merge({anchorKey:l.getKey(),anchorOffset:l.getLength(),focusKey:l.getKey(),focusOffset:l.getLength(),isBackward:!1,hasFocus:!0}),r=o.EditorState.forceSelection(e,n);R(r),null==d||d(Y(r))},focus:()=>{setTimeout(()=>{var e,t;null===(t=L.current)||void 0===t||null===(e=t.focus)||void 0===e||e.call(t)},200)},blur:()=>{setTimeout(()=>{var e,t;null===(t=L.current)||void 0===t||null===(e=t.blur)||void 0===e||e.call(t)},200)},addAtIcon:()=>{let e=H(M),t=o.EditorState.moveFocusToEnd(e);R(t),null==d||d(Y(t))},setContent:(e,t)=>{let l=G(M,e,t);R(l),null==d||d(Y(l))}}),[M,d]);let Q=(0,a.useCallback)(e=>{let{keyCode:t}=e,l=e.ctrlKey||e.metaKey;return t!==q||l?(0,o.getDefaultKeyBinding)(e):(C(),"noop")},[C,E]);return(0,a.useEffect)(()=>{B(!0)},[]),(0,i.jsx)("div",{className:u()("richtext-container",k),ref:T,children:F?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.ZP,{readOnly:N,editorState:M,onChange:e=>{R(e),null==d||d(Y(e))},stripPastedStyles:!0,keyBindingFn:Q,plugins:O,handlePastedText:(e,t,l)=>S>0&&l.getCurrentContent().getPlainText().length+e.length>S?"handled":(D.current.push(e),"not-handled"),placeholder:(0,i.jsx)(v.Z,{text:l}),handleBeforeInput:(e,t)=>S>0&&t.getCurrentContent().getPlainText().length+e.length>S?"handled":"not-handled",ref:L,onFocus:()=>{var e;!P.current&&setTimeout(()=>{R(e=>{let t=e.getCurrentContent().getLastBlock(),l=t.getKey(),n=t.getLength(),r=o.SelectionState.createEmpty(l).merge({anchorOffset:n,focusOffset:n});return o.EditorState.forceSelection(e,r)})}),P.current=!0,null==g||g(),c.emit(c.EVENT.videoStopPlayNext),j&&(null==p?void 0:null===(e=p.data)||void 0===e?void 0:e.length)>0&&b(!0)},onBlur:()=>{P.current=!1,null==_||_(),c.emit(c.EVENT.videoRemoveStopPlayNext)},isAtIconSelected:w}),(0,i.jsx)(A,{SuggestionComponent:w?eI:V,loadSearchAtData:m,loadMoreDefaultAtData:f,atUserDefaultData:h,atUserSearchData:p,awemeInfo:x,editorState:M,addUserMention:$,isAtIconSelected:w,setIsAtIconSelected:b,refOuterContainer:I,setIsAtIconPoint:y})]}):(0,i.jsx)("div",{className:"placeholder-default",children:(0,i.jsx)("span",{children:l})})})})},182046:function(e,t,l){var n=l(629686),r=l(624508),i=l(216951);let a=(0,n._)({},(0,i.n)({includeEnterMethod:!0,includeExtendedParams:!0}),(0,i.z)());t.Z=new r.h(a)},282390:function(e,t,l){var n=l(320165),r=l(101199),i=l(469935),a=l.n(i),o=l(48795),s=l(477667),d=l(905771),u=l(163896),c=l(176449);t.Z=e=>{let{title:t,titleChildren:l,contentText:i,children:v,confirmText:m,cancelText:f,closeButton:h,cancelButton:p=!0,okBtnInRight:g,onConfirm:_,onCancel:x,onClose:C,className:w,show:b,setShow:I}=e,y=(0,r.useCallback)(()=>{if(!C||!1!==C())I(!1)},[C,I]),j=(0,r.useCallback)(()=>{if(!_||!1!==_())I(!1)},[_,I]),k=(0,r.useCallback)(()=>{if(!x||!1!==x())I(!1)},[x,I]);return(0,n.jsx)("div",{children:b&&(0,n.jsx)(u.T6,{className:d.default.mask,onClick:y,children:(0,n.jsxs)("div",{className:a()(d.default.modalContainer,w),children:[h&&(0,n.jsx)("div",{className:d.default.close,onClick:y,children:(0,n.jsx)(c.Z,{width:36,height:36,src:s.Z,color:"#A9AAB7"})}),t&&(0,n.jsx)("div",{className:d.default.title,children:t}),(0,n.jsxs)("div",{className:d.default.content,children:[i&&(0,n.jsx)("p",{children:i}),v]}),(0,n.jsxs)("div",{className:d.default.footer,children:[p&&(0,n.jsx)(o.Button,{theme:"solid",className:d.default.button,type:"secondary",onClick:k,children:f||"取消"}),(0,n.jsx)(o.Button,{theme:"solid",className:d.default.button,type:"primary",onClick:j,children:m||"确定"})]})]})})})}},709292:function(e,t,l){l.d(t,{eD:function(){return x}}),l("490629");var n=l("320165"),r=l("101199"),i=l("469935"),a=l.n(i),o=l("863005"),s=l("618759"),d=l("537056"),u=l("499059"),c=l("65387"),v=l("629686"),m=l("402748");let f=(0,r.forwardRef)((e,t)=>(0,n.jsx)("svg",(0,m._)((0,v._)({width:14,height:15,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.646 7.146L8 9.793V2.5H7v7.293L4.354 7.146l-.708.708 3.5 3.5.354.353.354-.353 3.5-3.5-.708-.708zM3 12.5v1h9v-1H3z",fill:"#fff",stroke:"#fff",strokeWidth:".5"})})));var h=l("755881"),p=l("176449"),g=l("589297"),_=l("455571");let x=(0,r.memo)(e=>{let{className:t,hintText:l,log:i,isLogin:v,defaultHeighlight:m=!0,isShow:x,style:C,textContainerClassName:w,showDivider:b=!1,defaultShow:I=!0,showAnimation:y=!1,downloadHintClassName:j,downloadButtonClassNmae:k,autoCancelHeighlight:N=!0,onClick:S,onVisibilityChange:E}=e,{downloadHref:L,downloadAttr:T}=(0,g.o)({channelId:i.channelId}),[M,R]=(0,o.C)({value:x,defaultValue:I}),[D,P]=(0,r.useState)(m),A=(0,r.useRef)(null);return((0,r.useEffect)(()=>{null==E||E(M)},[M,E]),(0,r.useEffect)(()=>{(async()=>{!(0,s.DT)()&&!(0,s.tq)()&&(0,_.D5)()&&!M&&v&&!await (0,d.Y)(!0)&&R(!0)})(),M&&h.Z.sendLog("addToDesktopShow",{enter_from:null==i?void 0:i.enterFrom,type:null==i?void 0:i.type,guide_type:null==i?void 0:i.guideType,channel_id:null==i?void 0:i.channelId,ug_channel_id:u.Le.getConfig(u.gI.WebUgChannelId)||""})},[M,v,i,R]),(0,r.useEffect)(()=>(D&&!A.current&&M&&N&&(A.current=setTimeout(()=>{P(!1),clearTimeout(A.current),A.current=null},5e3)),()=>{clearTimeout(A.current),A.current=null}),[D,M]),y||M)?(0,n.jsxs)("div",{className:a()(c.default.container,t,{[c.default.withDivider]:b,[c.default.hide]:!M}),style:C,children:[(0,n.jsxs)("div",{className:a()(c.default.downloadHint,j),children:[(0,n.jsx)("div",{className:a()(c.default.downloadHintText,w),children:null!=l?l:"下载电脑客户端,随时访问抖音"}),(0,n.jsxs)("a",{href:L,download:T,className:a()(c.default.downloadButton,k,{[c.default.highlight]:D}),onClick:()=>{if(S)return S(),!1;h.Z.sendLog("addToDesktopClick",{enter_from:null==i?void 0:i.enterFrom,type:null==i?void 0:i.type,guide_type:null==i?void 0:i.guideType,group_id:null==i?void 0:i.groupId,channel_id:null==i?void 0:i.channelId,ug_channel_id:u.Le.getConfig(u.gI.WebUgChannelId)||""})},children:[(0,n.jsx)(p.Z,{className:c.default.downloadIcon,src:f,width:14,height:14,viewBox:"0 0 14 14"}),(0,n.jsx)("span",{children:"下载"})]})]}),b&&(0,n.jsx)("div",{className:c.default.divider})]}):(0,n.jsx)(n.Fragment,{})})},474149:function(e,t,l){l.d(t,{$:function(){return h}}),l(490629),l(591964),l(679308);var n=l(320165),r=l(101199),i=l(469935),a=l.n(i),o=l(670556),s=l(440863),d=l(214676),u=l(729477),c=l(346674),v=l(234150),m=l(684103),f={light:"isLight",dark:"isDark"};function h(e){var t,l;let{theme:i,linkItems:h,subLinkItems:p,innerLink:g=[],showInnerLink:_=!0,fetchInnerLinkAfterLCP:x=!1,className:C,defaultValue:w}=e,[b,I]=(0,r.useState)(()=>null==g?void 0:g.reduce((e,t)=>e.concat(null==t?void 0:t.links),[])),y=(0,m.u)({defaultValue:w}),j=h||(null==y?void 0:null===(t=y.footer)||void 0===t?void 0:t.links)||[],k=p||(null==y?void 0:null===(l=y.footer)||void 0===l?void 0:l.subLinks)||[];return(0,r.useEffect)(()=>{let e=null==g?void 0:g.reduce((e,t)=>e.concat(null==t?void 0:t.links),[]),t=!1;if(!(null==e?void 0:e.length)&&_){let e=()=>{(async()=>{var e,l;let[n,r]=await Promise.all([(0,u.Ws)(),(0,u.F8)()]),i=(null==n?void 0:n.statusCode)===0?null==n?void 0:n.data:[],a=(null==r?void 0:r.statusCode)===0?[{links:null==r?void 0:null===(l=r.data)||void 0===l?void 0:null===(e=l.map)||void 0===e?void 0:e.call(l,e=>({url:null==e?void 0:e.url,anchor:null==e?void 0:e.keyword}))}]:[];!t&&I(i.concat(a).reduce((e,t)=>e.concat(null==t?void 0:t.links),[]))})()};x?s.H(e):e()}return()=>{t=!0}},[]),(0,r.useEffect)(()=>{_&&!(null==b?void 0:b.length)&&(null==g?void 0:g.length)&&I(null==g?void 0:g.reduce((e,t)=>e.concat(null==t?void 0:t.links),[]))},[g,_,b]),(0,n.jsx)("footer",{className:a()(f[i],C),"data-e2e":"page-footer",children:(0,n.jsxs)("div",{className:c.default.footerWrapper,children:[(0,n.jsxs)(o.NoSSR,{children:[(0,n.jsx)("div",{className:c.default.linkItems,children:!!j.length&&j.map((e,t)=>(0,n.jsx)("div",{className:c.default.linkItem,children:(0,n.jsx)(v.a,{href:e.url,target:"_blank",rel:`noopener noreferrer ${(0,d.P)(e.title)}`,isNeedSeoOpt:!(null==e?void 0:e.needExtraParams),children:e.title})},t))}),!!k.length&&k.map((e,t)=>(0,n.jsx)("div",{className:c.default.subLinkItems,children:!!e.length&&e.map((e,t)=>(0,n.jsxs)("div",{className:c.default.subLinkItem,children:[e.icon&&(0,n.jsx)("img",{className:c.default.icon,src:e.icon,alt:"icon"}),e.url?(0,n.jsx)(v.a,{href:e.url,target:"_blank",rel:"noopener noreferrer nofollow",children:e.title}):(0,n.jsx)("span",{children:e.title})]},t))},`group_${t}`))]}),!!b.length&&_&&(0,n.jsxs)("div",{className:c.default.innerLinkContainer,children:[(0,n.jsx)("span",{className:c.default.divide}),(0,n.jsx)("span",{className:c.default.innerLinkTitle,children:"热门:"}),b.map(e=>(0,n.jsx)("span",{className:c.default.innerLinkItem,children:(0,n.jsx)(v.a,{href:e.url,target:"_blank",rel:"noopener noreferrer",children:e.anchor})},e.url))]})]})})}},712521:function(e,t,l){l.d(t,{$:function(){return u}}),l(490629);var n=l(320165),r=l(101199),i=l(343475),a=l(889429),o=l(19277),s=l(409250),d=l(426038);function u(e){let{children:t,mobileUrl:l,nonce:u,applicableDevice:c="pc,mobile"}=e,[v,m]=r.useState(!1);r.useEffect(()=>{(0,a.GP)()&&m(!0)},[]);let f=r.useMemo(()=>(0,o.Dr)(s.Q.getItem({sKey:d.CookieKeys.Theme})),[]);return(0,n.jsxs)(i.Helmet,{children:[(0,n.jsx)("meta",{charSet:"utf-8"}),t,(0,n.jsx)("meta",{httpEquiv:"Cache-Control",content:"no-transform"}),(0,n.jsx)("meta",{httpEquiv:"Cache-Control",content:"no-siteapp"}),(0,n.jsx)("meta",{httpEquiv:"x-dns-prefetch-control",content:"on"}),(0,n.jsx)("meta",{name:"applicable-device",content:l?"pc":c}),l&&(0,n.jsx)("meta",{name:"mobile-agent",content:`format=[html5]; url=${l}`}),l&&(0,n.jsx)("link",{rel:"alternate",media:"only screen and (max-width: 640px)",href:l}),(0,n.jsx)("meta",{name:"baidu-site-verification",content:"code-2WPwEy0bEv"}),(0,n.jsx)("meta",{name:"google",content:"notranslate"}),(0,n.jsx)("meta",{name:"theme-color",content:`${"light"===f?"#ffffff":"#161823"}`}),(0,n.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,n.jsx)("link",{rel:"manifest",href:"https://p-pc-weboff.byteimg.com/tos-cn-i-9r5gewecjs/pwa/manifest.json"}),(0,n.jsx)("link",{href:"//fonts.bytedance.com/dfd/api/v1/css?family=DFPKingGothicGB-Medium:500&display=swap",rel:"stylesheet",media:"print",id:"media1"}),(0,n.jsx)("link",{href:"//fonts.bytedance.com/dfd/api/v1/css?family=DFPKingGothicGB-Regular:500&display=swap",rel:"stylesheet",media:"print",id:"media2"}),(0,n.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;
});
`})]})}},16360:function(e,t,l){l.d(t,{a:function(){return o}});var n=l(101199),r=l(601034),i=l(816453),a=l(396868);let o=e=>{let{currentNumber:t,setCurrentNumber:l,awemeInfoList:o,setAwemeInfoList:s,userAwemeList:d,scrollRef:u,modalVideoIndex:c,additionalDistance:v=-60,refNextVideoCallBack:m}=e,f=(0,n.useRef)(t),h=(0,n.useRef)(!1),p=(0,n.useRef)(c);return(0,n.useEffect)(()=>{p.current=c},[c]),(0,n.useEffect)(()=>()=>{var e;if(p.current!==f.current){if("personal_homepage"===(0,r.yW)()||"others_homepage"===(0,r.yW)()){let e=window.innerWidth<=i.I?3:6,t=t=>Math.floor(t/e);if(t(p.current)===t(f.current))return}null===(e=u.current)||void 0===e||e.locateSelectVideo(f.current,v)}},[]),(0,n.useEffect)(()=>{(null==o?void 0:o.length)>c&&-1===t&&l(c||0)},[o]),(0,n.useEffect)(()=>{s(d)},[d]),(0,n.useEffect)(()=>{5>Math.abs(Number(null==o?void 0:o.length)-t)&&-1!==t&&!h.current&&(async()=>{var e,t,l;(null===(t=u.current)||void 0===t?void 0:null===(e=t.getHasMore)||void 0===e?void 0:e.call(t))?(h.current=!0,await (null===(l=u.current)||void 0===l?void 0:l.loadMoreData()),h.current=!1):m.current=()=>a.F.info("暂时没有更多了")})(),f.current=t},[t,o]),null}},190846:function(e,t,l){l.d(t,{Z:function(){return P}});var n=l("629686"),r=l("402748");l("490629"),l("374954"),l("679308");var i=l("320165"),a=l("101199"),o=l("350856"),s=l.n(o),d=l("469935"),u=l.n(d),c=l("30995"),v=l("855357"),m=l("929898"),f=l("433294"),h=l("48795"),p=l("383280"),g=l("601034"),_=l("624508"),x=new _.h({loiginButtonClick:{eventName:"login_button_click",params:{enter_from:"",url_path:""}},loiginButtonShow:{eventName:"login_button_show",params:{enter_from:"",url_path:""}}}),C=l("746517");function w(e){let{enterMethod:t}=e;return(0,a.useEffect)(()=>{x.sendLog("loiginButtonShow",{enter_from:(0,g.yW)(),url_path:window.location.pathname||""})},[]),(0,i.jsxs)("div",{className:f.default.abContainer,children:[(0,i.jsx)("div",{className:f.default.abNoMoreText,children:"登录后可查看更多精彩视频"}),(0,i.jsx)("div",{className:f.default.abOpBtn,onClick:()=>{(0,C.default)({success:()=>{location.reload()},enterMethod:t}),x.sendLog("loiginButtonClick",{enter_from:(0,g.yW)(),url_path:window.location.pathname||""})},children:"点击登录"})]})}function b(e){let{reload:t,isLiveCategory:l}=e;return(0,i.jsxs)("div",{className:f.default.noMoreText,children:[l?"暂时没有更多了,可以一会":"服务异常,重新",(0,i.jsx)("span",{onClick:t,className:f.default.opBtn,children:"刷新"}),l?"试试":"拉取数据"]})}function I(e){let{statusCode:t,dataList:l,renderNoDataError:n,loginNeedLogMethod:r,panelNoData:a,panelLoginError:o,panelNoMoreData:s,panelReloadDataError:d,reload:u,hasMoreData:c,onClickPauseBtn:v,isNeedFirstPause:m,isClickMore:g,upperLoadingLayer:_=!1,isLiveCategory:x=!1}=e,C=null;return 2===t?C=o||(0,i.jsx)(w,{enterMethod:r}):0===t?C=c?m&&!g?(0,i.jsx)("div",{className:f.default.firstReqBtnWrapper,children:(0,i.jsx)(h.Button,{theme:"solid",type:"secondary",style:{width:"100%"},size:"small",onClick:v,children:"点击查看更多"})}):(0,i.jsx)(p.g,{text:"",upperLayer:_}):0===l.length?a||(0,i.jsx)("div",{className:f.default.noMoreText,children:"没有数据"}):s||(0,i.jsx)("div",{className:f.default.noMoreText,children:"暂时没有更多了"}):(0===l.length&&(C=null==n?void 0:n(t)),!C&&(C=d||(0,i.jsx)(b,{reload:u,isLiveCategory:x}))),(0,i.jsx)(i.Fragment,{children:C})}l("706056");var y=l("426038"),j=l("709705"),k=l("867129");let N=e=>{var t,l;let{abTestData:n,refBlockShowMore:r,actionCloseBlock:a,isLogin:o,setActionCloseBlock:s,blockNum:d,setBlockNum:u,dispatch:c,refLoginBlock:v,handleJumpBlock:m,disableFetchRef:p,loadMoreData:g,handleUnLoginClick:_,transition:x,notAnimate:w,children:b}=e;if([2,4].includes(null==n?void 0:null===(t=n.authorBlock)||void 0===t?void 0:t.type)&&r.current&&!a&&!o)return(0,i.jsx)(k.w,{close:()=>{r.current=!1,s(!0),(0,j.qQ)(y.LocalStorageKeys.AuthorBlock,{lastTimes:Date.now(),actionClose:!0})},blockNum:d,enterMethod:"authorcard_force_qrcode",change:()=>{null==c||c({type:"updateUserInfo"}),r.current=!1},onShow:()=>{[3,4].includes(null==n?void 0:n.authorBlock.type)&&v.current&&u(e=>{let t=e<2?e+1:e;return e<2&&(0,j.qQ)(y.LocalStorageKeys.AuthorBlock,{total:t,lastTimes:Date.now()}),t})},text:"登录查看更多视频",transition:x,notAnimate:w});if((null==n?void 0:null===(l=n.authorBlock)||void 0===l?void 0:l.type)&&r.current&&!a&&!o)return(0,i.jsx)(k.E,{isDetail:!1,blockNum:d,refBlockShowMore:r.current,handleJumpBlock:m,handleUnLogin:e=>{var t,l,n;null==e||null===(t=e.preventDefault)||void 0===t||t.call(e),(0,C.default)({success:async()=>{null==c||c({type:"updateUserInfo"}),p.current=!1,r.current=!1,g()},enterMethod:"authorcard_force_click",headerText:"登录后查看更多作品",next:`https://${null===(n=window)||void 0===n?void 0:null===(l=n.location)||void 0===l?void 0:l.host}`})},text:"登录查看更多视频",blockText:"跳过登录,继续看视频",enterMethod:"authorcard_force_click",onShow:()=>{[3,4].includes(null==n?void 0:n.authorBlock.type)&&u(e=>{let t=e<2?e+1:e;return e<2&&(0,j.qQ)(y.LocalStorageKeys.AuthorBlock,{total:t,lastTimes:Date.now()}),t})}});if(!o&&p.current)return(0,i.jsxs)("div",{className:f.default.loginBtnWrapper,children:[(0,i.jsx)("div",{children:"登录后查看更多作品"}),(0,i.jsx)(h.Button,{theme:"solid",className:f.default.loginBtn,onClick:_,children:"立即登录"})]});else return b};var S=l("687581");let E=e=>{let{refFetchMore:t,setScrollData:l,refLoading:i,disableFetchRef:o,refBlockShowMore:s,refPageId:d,refTotalReloadNum:u,refAvailableReloadNum:c,getBlockNum:v,actionCloseBlock:m,whaleDecisionCustom:f,setWhaleDecisionCustom:h,refListLength:p,refLoginBlock:g,isLogin:_,abTestData:x,WHALE_CUT_HEADER:C,dataFilter:w,dataListRef:b,hasMoreRef:I,listFilterFn:j,refScrollCheck:k,blockType:N,hideListRef:E,needReCheckScroll:L}=e,T=(0,a.useRef)(_);return T.current=_,{loadMore:a.useCallback(async function(){let{errorRetry:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!t.current){l(e=>(0,r._)((0,n._)({},e),{statusCode:1}));return}if(!i.current&&!o.current&&!s.current){i.current=!0;try{var a,_;let r=d.current,M=c.current,{statusCode:R,data:D,hasMore:P,logPb:A,whaleDecisionCustom:F,clearBefore:B=!1}=await t.current(r,M);h(F);let{actionClose:U}=v(y.LocalStorageKeys.AuthorBlock);p.current+D.length>=18&&g.current&&!T.current&&N&&([1,2].includes(null==x?void 0:null===(a=x.authorBlock)||void 0===a?void 0:a.type)||[3,4].includes(null==x?void 0:null===(_=x.authorBlock)||void 0===_?void 0:_.type)&&!(U||m))&&(s.current=!0),f===C&&(o.current=!0);let V=!1;if(i.current=!1,r===d.current){let t=w?w(D,B?[]:b.current):D,r=R;0===R&&(I.current=!!o.current||!!s.current||P),0===R&&(0===D.length&&P?M<=0&&f!==C?r=-1:c.current=M-1:c.current=u.current),t.forEach(e=>{e.scrollLogPb=A}),!(e&&-1===r)&&l(e=>{if(e.statusCode=r,0===e.statusCode){let l=B?[]:e.dataList,n=j?j(l,t):l.concat(t||[]),r=0;n.length%6!=0&&f===C&&(r=(null==n?void 0:n.length)-(null==n?void 0:n.length)%6),s.current&&n.length>18&&(r=18),r>0&&(E.current=n.slice(r),n=null==n?void 0:n.slice(0,r)),e.dataList=n}return(0,n._)({},e)}),0===r&&(V=!0)}else V=!0;return V&&I.current&&L&&setTimeout(()=>{k.current()},0),(0!==R||P&&(!D||(null==D?void 0:D.length)===0))&&S.oe.event.error({name:S.Mo.ListServerError,report:{logId:A}}),{statusCode:R,data:D,hasMore:P,logPb:A}}catch(e){i.current=!1,l(e=>(0,r._)((0,n._)({},e),{statusCode:1}))}}},[])}};var L=l("87897"),T=l("889570"),M=l("581999");let{WHALE_CUT_HEADER:R}=c,D=a.memo(function(e){let{itemClassName:t,itemStyle:l,index:n,ItemCompnent:r,renderItem:o,itemInfo:s,directRenderItem:d,withMask:c,isHighLight:v,getMaskIndex:m}=e,[h,p]=(0,a.useState)(v);return d?o(s,n,s.scrollLogPb):((0,a.useEffect)(()=>{if(p(v),v){let e=setTimeout(()=>{p(!1)},3e3);return()=>{clearTimeout(e)}}},[v]),(0,i.jsxs)("li",{className:u()(t,f.default.item,{[f.default.coveredMask]:c,[f.default.highLight]:h&&v}),style:l,children:[r?(0,i.jsx)(r,{itemInfo:s,index:n,logPb:s.scrollLogPb}):o(s,n,s.scrollLogPb),null==c?void 0:c(s,null==m?void 0:m(s,n))]}))});var P=a.forwardRef(function(e,t){var l,o;let{defaultDataList:d=[],defaultHasMoreFlag:c=!0,defaultStatusCode:h=0,fetchMoreData:p,scrollContainerEl:g,containerClassName:_="",itemClassName:x="",itemStyle:w={},pageId:b="",renderItem:y,isHorizontal:j=!1,pause:k=!1,reloadNum:S=0,skeletonNum:P=20,renderSkeleton:A=null,panelLoginError:F=null,panelReloadDataError:B=null,panelNoData:U=null,panelNoMoreData:V=null,renderNoDataError:O=null,handleLoadEnd:H,dataFilter:z,onListRenderFinish:Z,loginNeedLogMethod:W="",needSkelton:$=!1,needFirstPause:K=!1,SkeletonComponent:Y=null,ItemCompnent:G=null,setDataList:q=null,retryTimes:X=0,defaultWhaleDecisionCustom:Q="",listFilterFn:J,directRenderItem:ee=!1,withMask:et,containerNoLineHeight:el=!1,needReCheckScroll:en=!0,buttomClassName:er,scrollListStyle:ei={},blockType:ea,isLiveCategory:eo=!1,renderList:es,highLightAwemeId:ed,getMaskIndex:eu,defaultFetchAllData:ec=!1,SortComponent:ev=null,customDataListCtx:em,getSortId:ef,getItemDragDisabled:eh,onSort:ep}=e,{dispatch:eg,userInfo:{isLogin:e_=!1}={}}=(0,M.useUserInfoContext)()||{},ex=(0,L._)(),eC=d||[],[ew,eb]=(0,a.useState)({dataList:z?z(eC):eC,statusCode:h}),{dataList:eI,statusCode:ey}=ew,ej=(0,a.useRef)(c),ek=(0,a.useRef)(null),eN=(0,a.useRef)(!1),eS=(0,a.useRef)(null),eE=(0,a.useRef)(null),eL=(0,a.useRef)(null),eT=(0,a.useRef)(null),eM=(0,a.useRef)(!0),eR=(0,a.useRef)(!1),eD=(0,a.useRef)(!1),eP=(0,a.useRef)(!1),eA=(0,a.useRef)(S),eF=(0,a.useRef)(S),[eB,eU]=(0,a.useState)($),eV=(0,a.useRef)(eI),[eO,eH]=(0,a.useState)(Q),ez=(0,a.useRef)(1===c&&!e_&&Q===R),eZ=(0,a.useRef)([]);eV.current=eI,eR.current=K,eM.current=!eI.length,eT.current=b,eE.current=j,eS.current=p,eP.current=k;let eW=(0,a.useRef)((null==d?void 0:d.length)||0);eW.current=(null==eI?void 0:eI.length)||0;let{blockNum:e$,setBlockNum:eK,actionCloseBlock:eY,setActionCloseBlock:eG,refBlockShowMore:eq,handleJumpBlock:eX,refLoginBlock:eQ,getBlockNum:eJ,transition:e0,isShowDebounce:e1}=(0,T._g)({effectiveTime:null==ex?void 0:null===(l=ex.authorBlock)||void 0===l?void 0:l.effective_time,type:null==ex?void 0:null===(o=ex.authorBlock)||void 0===o?void 0:o.type,abtestData:ex,isLogin:e_});(0,a.useEffect)(()=>{if(e_||eO!==R&&(!eq.current||eY)){var e;ez.current=!1,(null===(e=eZ.current)||void 0===e?void 0:e.length)>0&&eb(e=>{var t;let l=[...eZ.current];return eZ.current=[],{statusCode:e.statusCode,dataList:null==e?void 0:null===(t=e.dataList)||void 0===t?void 0:t.concat(l)}})}else eO===R&&(ez.current=!0)},[e_,eI,eO,eY]);let e2=(0,a.useMemo)(()=>{let e=[];for(let t=0;t<P;t++)e.push({type:1,data:e});return e},[A||Y?P:0]),{loadMore:e3}=E({refFetchMore:eS,setScrollData:eb,refLoading:eN,disableFetchRef:ez,refBlockShowMore:eq,refPageId:eT,refTotalReloadNum:eA,refAvailableReloadNum:eF,getBlockNum:eJ,actionCloseBlock:eY,whaleDecisionCustom:eO,setWhaleDecisionCustom:eH,refListLength:eW,refLoginBlock:eQ,isLogin:e_,abTestData:ex,WHALE_CUT_HEADER:R,dataFilter:z,dataListRef:eV,hasMoreRef:ej,listFilterFn:J,refScrollCheck:eL,blockType:ea,hideListRef:eZ,needReCheckScroll:en}),e5=a.useCallback(async()=>{let e;for(let l=0;l<X;l++){var t;if(!((null==(e=await e3({errorRetry:l!==X-1}))?void 0:e.hasMore)&&(null==e?void 0:null===(t=e.data)||void 0===t?void 0:t.length)===0))break}return e},[X,e3]),e6=(0,a.useMemo)(()=>X?e5:e3,[e5,e3]);eL.current=a.useCallback(async()=>{if(!!ek.current&&!eP.current&&!!ej.current&&(!eR.current||!!eD.current||!!eM.current))if(eM.current)await e6();else{let e=0,t=0,l=ek.current.getBoundingClientRect();if(g){let n=g.getBoundingClientRect();e=l.right-n.right,t=l.bottom-n.bottom}else e=l.right-window.innerWidth,t=l.bottom-window.innerHeight;(null==ek?void 0:ek.current)&&!eP.current&&(!eE.current&&(t<=800||ec)?await e6():eE.current&&(e<=500||ec)&&await e6())}},[]);let e4=a.useCallback(async()=>{eD.current=!1,eb(e=>(0,r._)((0,n._)({},e),{statusCode:0})),await e6()},[]),e7=a.useCallback(e=>{eD.current=!1,ej.current=!0,!(null==e?void 0:e.length)&&eU(!0),eb(t=>(0,r._)((0,n._)({},t),{statusCode:0,dataList:e||[]})),eZ.current=[]},[]);return(0,a.useImperativeHandle)(t,()=>({reload:e4,reset:e7,getTotal:()=>eI.length,getDataList:()=>eI,getStatusCode:()=>ey,getListClientRect:()=>{var e,t;return null===(t=ek.current)||void 0===t?void 0:null===(e=t.getBoundingClientRect)||void 0===e?void 0:e.call(t)},getTargetNode:function(){var e,t;let l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return null===(t=ek.current)||void 0===t?void 0:null===(e=t.childNodes)||void 0===e?void 0:e[l]},locateSelectVideo:function(e){var t,l;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:500,i=null===(l=ek.current)||void 0===l?void 0:null===(t=l.childNodes)||void 0===t?void 0:t[e];if(!i)return;let a=null==i?void 0:i.offsetParent,o=null==i?void 0:i.offsetTop;for(;a&&a!==document.body&&a!==g;)o+=null==a?void 0:a.offsetTop,a=a.offsetParent;(0,m.d)(g||window,o+n,r)},getHasMore:()=>ej.current,scrollCheck:()=>{eL.current()},setScrollData:e=>{eb(t=>{var l,i;let a=null==t?void 0:null===(l=t.dataList)||void 0===l?void 0:l.find(e=>e.awemeType===v.e.NoLoginVideoGuide);if(a){let l=(null==e?void 0:null===(i=e.dataList)||void 0===i?void 0:i.filter(e=>e.awemeType!==v.e.NoLoginVideoGuide))||[];return(0,r._)((0,n._)({},t,e),{dataList:[a,...l]})}return(0,n._)({},t,e)})},loadMoreData:async function(){for(var e=arguments.length,t=Array(e),l=0;l<e;l++)t[l]=arguments[l];return ej.current?await e6(...t):{statusCode:0,data:[],hasMore:0,logPb:""}},resetRes:e=>{ej.current=e.hasMore,eb({statusCode:e.statusCode,dataList:e.dataList})}}),[e4,e7,eI,ey,e6,g]),(0,a.useEffect)(()=>{null==q||q(eI),eI.length>0&&(null==Z||Z())},[eI]),(0,a.useEffect)(()=>{if(k)return;let e=g||document,t=s()(()=>{eL.current()},50,{leading:!0,trailing:!0,maxWait:100}),l=s()(()=>{let e=ek.current.getBoundingClientRect();if(!!e.width&&!!e.height)eL.current()},50,{leading:!0,trailing:!0,maxWait:100});return!ej.current&&H&&H(),e&&ej.current&&0===ey&&(e.addEventListener("scroll",t),window.addEventListener("resize",l),t()),()=>{e&&(e.removeEventListener("scroll",t),window.removeEventListener("resize",l))}},[g,e6,H,ey,k]),(0,a.useEffect)(()=>{(null==eI?void 0:eI.length)||0!==ey||!ej.current?eU(!1):eU(!0)},[eI,ej,ey]),(0,i.jsxs)(i.Fragment,{children:[ev?(0,i.jsx)("ul",{className:u()(_,{[f.default.noLineHeight]:et||el}),ref:ek,style:ei,"data-e2e":"scroll-list",children:(0,i.jsx)(ev,{dataList:eI,setScrollData:eb,itemClassName:x,itemStyle:w,ItemCompnent:G,renderItem:y,withMask:et,directRenderItem:ee,highLightAwemeId:ed,getMaskIndex:eu,customDataListCtx:em,onSort:ep,getSortId:ef,getItemDragDisabled:eh})}):es?(0,i.jsx)("div",{className:u()(_,{[f.default.noLineHeight]:et||el}),ref:ek,style:ei,"data-e2e":"scroll-list",children:null==es?void 0:es(eI)}):(0,i.jsxs)("ul",{className:u()(_,{[f.default.noLineHeight]:et||el}),ref:ek,style:ei,"data-e2e":"scroll-list",children:[eI.map((e,t)=>(0,a.createElement)(D,{itemClassName:x,itemStyle:w,index:t,ItemCompnent:G,renderItem:y,withMask:et,getMaskIndex:eu,itemInfo:e,key:(null==e?void 0:e.key)||`li_${t}`,directRenderItem:ee,isHighLight:ed&&ed===(null==e?void 0:e.awemeId)})),eB&&e2.map((e,t)=>(0,i.jsx)("li",{className:u()(x,f.default.item),style:w,children:Y&&(0,i.jsx)(Y,{})||A()},`li_skelton_${t}`))]}),(0,i.jsx)(N,{abTestData:ex,refBlockShowMore:eq,actionCloseBlock:eY,isLogin:e_,setActionCloseBlock:eG,blockNum:e$,setBlockNum:eK,dispatch:eg,refLoginBlock:eQ,handleJumpBlock:eX,disableFetchRef:ez,loadMoreData:e6,handleUnLoginClick:e=>{var t,l,n;null==e||null===(t=e.preventDefault)||void 0===t||t.call(e),(0,C.default)({success:async()=>{null==eg||eg({type:"updateUserInfo"}),ez.current=!1,eq.current=!1,e6()},enterMethod:"",headerText:"登录后查看更多作品",next:`https://${null===(n=window)||void 0===n?void 0:null===(l=n.location)||void 0===l?void 0:l.host}`})},notAnimate:!0,children:(0,i.jsx)("div",{className:u()(f.default.bottomWrap,er),style:{width:j?"auto":"100%"},children:(0,i.jsx)(I,{statusCode:ey,dataList:eI,renderNoDataError:O,loginNeedLogMethod:W,panelNoData:U,panelLoginError:F,panelNoMoreData:V,panelReloadDataError:B,reload:e4,hasMoreData:ej.current,onClickPauseBtn:async()=>{eD.current=!0,eb(e=>(0,n._)({},e)),await e6()},isNeedFirstPause:eR.current,isClickMore:eD.current,upperLoadingLayer:!1,isLiveCategory:eo})})})]})})},70658:function(e,t,l){l.d(t,{x:function(){return b},B:function(){return I}});var n=l("629686"),r=l("402748");l("490629"),l("362051"),l("679308");var i=l("320165"),a=l("101199"),o=l("469935"),s=l.n(o),d=l("121998"),u=l("550514"),c=l("601034"),v=l("414061"),m=l("46892");let f=(0,a.forwardRef)((e,t)=>(0,i.jsx)("svg",(0,r._)((0,n._)({width:16,height:16,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,i.jsx)("path",{d:"M4.627 1.106a.75.75 0 0 1 1.023.279l1.494 2.614h1.708l1.494-2.614a.75.75 0 0 1 1.302.744l-1.068 1.87h2.087a2 2 0 0 1 2 2V12a2 2 0 0 1-2 2H3.333a2 2 0 0 1-2-2V5.999a2 2 0 0 1 2-2h2.083l-1.068-1.87a.75.75 0 0 1 .279-1.023zm5.282 7.453L7.526 6.995a.527.527 0 0 0-.816.44v3.128c0 .42.465.67.816.44L9.909 9.44a.527.527 0 0 0 0-.88z",fill:"#fff"})}))),h=(0,a.forwardRef)((e,t)=>(0,i.jsx)("svg",(0,r._)((0,n._)({width:16,height:16,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.862 2.195c.26-.26.682-.26.943 0l5.333 5.334c.26.26.26.682 0 .942l-5.333 5.334a.667.667 0 1 1-.943-.943L9.724 8 4.862 3.138a.667.667 0 0 1 0-.943z",fill:"#fff"})}))),p=(0,a.forwardRef)((e,t)=>(0,i.jsxs)("svg",(0,r._)((0,n._)({width:16,height:16,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:[(0,i.jsx)("g",{filter:"url(#tv-shadow_svg__filter0_d_2936_6928)",children:(0,i.jsx)("path",{d:"M4.627 1.106a.75.75 0 0 1 1.023.279l1.494 2.614h1.708l1.494-2.614a.75.75 0 1 1 1.302.744l-1.068 1.87h2.087a2 2 0 0 1 2 2V12a2 2 0 0 1-2 2H3.333a2 2 0 0 1-2-2V5.999a2 2 0 0 1 2-2h2.083l-1.068-1.87a.75.75 0 0 1 .279-1.023zm5.282 7.453L7.525 6.995a.527.527 0 0 0-.815.44v3.128c0 .42.465.67.815.44L9.91 9.44a.527.527 0 0 0 0-.88z",fill:"#fff"})}),(0,i.jsx)("defs",{children:(0,i.jsxs)("filter",{id:"tv-shadow_svg__filter0_d_2936_6928",x:".333",y:1.007,width:15.333,height:14.993,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,i.jsx)("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),(0,i.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,i.jsx)("feOffset",{dy:1}),(0,i.jsx)("feGaussianBlur",{stdDeviation:".5"}),(0,i.jsx)("feComposite",{in2:"hardAlpha",operator:"out"}),(0,i.jsx)("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"}),(0,i.jsx)("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_2936_6928"}),(0,i.jsx)("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_2936_6928",result:"shape"})]})})]}))),g=(0,a.forwardRef)((e,t)=>(0,i.jsxs)("svg",(0,r._)((0,n._)({width:16,height:16,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:[(0,i.jsx)("g",{filter:"url(#right-shadow_svg__filter0_d_2936_6930)",children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.862 2.195c.26-.26.682-.26.943 0l5.333 5.334c.26.26.26.682 0 .942l-5.333 5.334a.667.667 0 1 1-.943-.943L9.724 8 4.862 3.138a.667.667 0 0 1 0-.943z",fill:"#fff"})}),(0,i.jsx)("defs",{children:(0,i.jsxs)("filter",{id:"right-shadow_svg__filter0_d_2936_6930",x:3.667,y:2,width:8.667,height:14,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,i.jsx)("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),(0,i.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,i.jsx)("feOffset",{dy:1}),(0,i.jsx)("feGaussianBlur",{stdDeviation:".5"}),(0,i.jsx)("feComposite",{in2:"hardAlpha",operator:"out"}),(0,i.jsx)("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"}),(0,i.jsx)("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_2936_6930"}),(0,i.jsx)("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_2936_6930",result:"shape"})]})})]})));var _=l("624508");let x=new _.h({livesdkPcReplayEntranceShow:{eventName:"livesdk_pc_replay_entrance_show",params:{enter_from:"",video_id:"",author_id:""}},livesdkPcReplayEntranceClick:{eventName:"livesdk_pc_replay_entrance_click",params:{enter_from:"",video_id:"",author_id:""}}});var C=l("364404"),w=l("396868");let b=e=>{let{className:t,authorId:l,shadow:o=!1,videoId:_,autoSize:b=!1,enterFrom:I=(0,c.yW)()}=e,[y,j]=(0,a.useState)(""),k=_?{video_id:_}:{},N=(0,a.useCallback)(async()=>{if(!y){w.F.info("主播暂无回放");return}v.emit(v.EVENT.videoPause,"LiveReplayEntry_handleClick"),x.sendLog("livesdkPcReplayEntranceClick",(0,n._)({enter_from:I,author_id:l},k));let e=(0,m.Hk)(y,(0,d.stringify)({previous_page:I,extra_params:JSON.stringify((0,r._)((0,n._)({},_?{from_video_id:_}:{}),{from_author_id:l}))}));window.open(e,"_blank")},[l,_,I,y]);return((0,a.useEffect)(()=>{y&&x.sendLog("livesdkPcReplayEntranceShow",(0,n._)({enter_from:I,author_id:l},k))},[_,y]),(0,a.useEffect)(()=>{(async function e(){if(l){var e;let t=(null===(e=(await (0,u.E_)({authorId:l})).data)||void 0===e?void 0:e.replayId)||"";t&&j(t)}})()},[l]),y)?(0,i.jsxs)("div",{onClick:N,className:s()(C.default.liveReplayEntryContainer,t,{[C.default.autoSize]:b}),children:[(0,i.jsxs)("div",{className:C.default.liveReplayEntryLeft,children:[o?(0,i.jsx)(p,{className:C.default.tvIcon}):(0,i.jsx)(f,{className:C.default.tvIcon}),(0,i.jsx)("div",{className:C.default.liveReplayEntryTitle,style:{textShadow:o?"0 1px rgba(0, 0, 0, .2)":"none"},children:"精彩直播回放"})]}),o?(0,i.jsx)(g,{className:C.default.rightIcon}):(0,i.jsx)(h,{className:C.default.rightIcon})]}):null},I=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return void 0!==e.find(e=>6===e.type)}},840322:function(e,t,l){l.r(t),l.d(t,{ConfirmModal:function(){return h}});var n=l(629686),r=l(402748),i=l(320165),a=l(101199),o=l(469935),s=l.n(o),d=l(48795),u=l(477667),c=l(273245),v=l(176449),m=l(163896);let f=e=>{let{children:t,title:l,onCancel:n,closeBtn:r,panelStyle:o={},titleStyle:d={},maskClosable:f=!0,className:h,renderContent:p,content:g}=e,_=a.useCallback(e=>{e.stopPropagation(),f&&n&&n(!1)},[n,f]),x=a.useCallback(e=>{e.stopPropagation(),n&&n(!1)},[n]);return(0,i.jsx)("div",{onMouseDown:e=>e.stopPropagation(),onMouseUp:e=>e.stopPropagation(),children:(0,i.jsx)(m.T6,{className:c.default.mask,onClick:_,children:(0,i.jsxs)("div",{className:s()(c.default.modalContainer,h),style:o,onClick:e=>{e.stopPropagation()},children:[r&&(0,i.jsx)("div",{className:c.default.close,onClick:x,children:(0,i.jsx)(v.Z,{width:36,height:36,src:u.Z,color:"#A9AAB7"})}),l&&(0,i.jsx)("div",{className:c.default.title,style:d,children:l}),"function"==typeof p?p():g?(0,i.jsx)("p",{className:c.default.content,children:g}):void 0,(0,i.jsx)("div",{className:c.default.buttonCt,children:t})]})})})},h=e=>{let{cancelBtnText:t="取消",confirmBtnText:l="确认",onCancel:a,onConfirm:o,onlyConfirmButton:u=!1,confirmBtnProps:v={},children:m,className:h}=e;return(0,i.jsx)(f,(0,r._)((0,n._)({},e),{children:(0,i.jsxs)("div",{className:c.default.buttonSpaceBetween,children:[!u&&(0,i.jsx)(d.Button,{theme:"solid",type:"secondary",className:s()(c.default.button,c.default.cancel),onClick:()=>{a(!0)},children:t}),(0,i.jsx)(d.Button,(0,r._)((0,n._)({theme:"solid",className:s()(c.default.button),onClick:o},v),{children:l}))]})}))};t.default=h},403285:function(e,t,l){l.d(t,{R:function(){return u}});var n=l(320165);l(101199);var r=l(469935),i=l.n(r),a=l(966473),o=l(638052),s=l(601034),d=l(280717);let u=e=>{let{profileRankLabel:t,className:l,onClick:r,uid:u}=e,{iconUrl:c,text:v,bgColorStart:m,bgColorEnd:f,textColorStart:h,textColorEnd:p}=t||{},g=(0,a.x)(()=>{o.logInstance.sendLog("monthlyAuthorShow",{enter_from:(0,s.yW)(),author_id:u})});return c&&v?(0,n.jsx)("div",{ref:g,className:i()(d.default.monthlyRecommendUserTagContainer,l),onClick:r,children:(0,n.jsxs)("div",{className:i()(d.default.monthlyRecommendUserTag),style:m&&f?{background:`linear-gradient(90deg, ${m}, ${f})`}:{},children:[(0,n.jsx)("img",{className:d.default.icon,src:c,alt:""}),(0,n.jsx)("div",{className:d.default.text,style:h&&p?{background:`linear-gradient(204deg, ${h}, ${p})`,"background-clip":"text","-webkit-background-clip":"text","-webkit-text-fill-color":"transparent"}:{},children:v})]})}):null}},773775:function(e,t,l){l.d(t,{U:function(){return u},V:function(){return c}}),l(228983),l(759943);var n=l(320165);l(101199);var r=l(469935),i=l.n(r),a=l(966473),o=l(935427),s=l(227831),d=l(889429),u={SideCardVideo:"sideCardVideo",MonthVideo:"monthVideo",AllVideo:"allVideo"};let c=e=>{let{onClick:t,src:l,iconWidth:r=80,desc:u,showTitle:c=!1,className:v,name:m="看更多\n最新作品",onShow:f,cardStyle:h}=e,p=m.split("\n"),g=(0,a.x)(f);return(0,n.jsxs)("div",{className:i()(o.default.noLoginVideoGuide,v),ref:g,onClick:t,children:[(0,n.jsxs)("div",{className:i()(o.default.wrapper),children:[(0,n.jsx)("div",{className:o.default.imageContainer,children:(0,n.jsx)(s.Q,{className:i()(o.default.videoImg,{[o.default.isSafari]:(0,d.G6)()}),src:l,iconWidth:r,isSpider:!1})}),(0,n.jsxs)("div",{className:i()(o.default.playLoadingWrap,{[o.default.sideCard]:"sideCardVideo"===h,[o.default.allVideo]:"allVideo"===h,[o.default.monthVideo]:"monthVideo"===h}),style:{zIndex:c?0:10},children:[p.map(e=>(0,n.jsx)("div",{className:o.default.playLoadingText,children:e},e)),(0,n.jsx)("div",{className:i()("text-no-shadow",o.default.btn),children:"登录"})]})]}),c&&(0,n.jsx)("p",{className:i()(o.default.title,o.default.single),children:u})]})}},867129:function(e,t,l){l.d(t,{E:function(){return g},w:function(){return p}});var n=l(629686),r=l(402748);l(490629);var i=l(320165),a=l(101199),o=l(933524),s=l(469935),d=l.n(s),u=l(48795),c=l(687581),v=l(759894),m=l(374135),f=l(60446),h=l(587734);l(315422);let p=e=>{let{success:t=null,host:l=null,next:s=null,enterMethod:u="author_card_login_guide",destroy:v=null,change:m=()=>null,close:f,className:p,blockNum:g,onShow:_,text:x,transition:C,notAnimate:w}=e,b=(0,a.useRef)(null),[I,y]=(0,a.useState)(!0),j=(0,a.useRef)(null),[k,N]=(0,o.Z)();(0,a.useEffect)(()=>{N&&_()},[N]);let S=()=>{var e;null===(e=b.current)||void 0===e||e.call(b),null==v||v()},E=async()=>{y(!0);let e=await (0,h.HJ)({success:t,next:s,enterMethod:u}),l=await (0,h._j)();j.current=new l((0,r._)((0,n._)({},e),{scanCodeDesc:()=>(0,i.jsx)(i.Fragment,{}),success:t=>{var l;setTimeout(S,0),null==e||null===(l=e.success)||void 0===l||l.call(e,t),null==m||m()}})),c.oe.event.info({name:c.Mo.PassportLoginEntry,report:{enterMethod:u,entry:"RelatedVideoCard"}}),y(!1)};(0,a.useEffect)(()=>{E()},[]);let L=(0,a.useCallback)(()=>{var e,t;return(null===(e=j.current)||void 0===e?void 0:e.LoginContainer)?null===(t=j.current)||void 0===t?void 0:t.LoginContainer():(0,i.jsx)("div",{})},[]);return(0,i.jsx)("div",{className:d()("related-video-card-login-guide-block",p,{showBlockBtn:2===g,animate__fadeInUpBig:C,notAnimate:w}),ref:k,children:I?null:(0,i.jsx)(a.Fragment,{children:(0,i.jsxs)("div",{className:"related-video-card-login-guide-block__content",children:[(0,i.jsx)(L,{}),(0,i.jsxs)("div",{className:"related-video-card-login-guide-block__desc",children:[(0,i.jsx)("p",{children:x}),(0,i.jsx)("p",{className:"related-video-card-login-guide-block__text",children:"打开【抖音】扫码登录"}),2===g&&(0,i.jsx)("div",{className:"related-video-card-login-guide-block__close",onClick:()=>{f()},children:(0,i.jsx)("span",{children:"跳过登录"})})]})]})})})},g=e=>{let{blockNum:t,isDetail:l,handleUnLogin:n,handleJumpBlock:r,onShow:s,text:c,blockText:h,enterMethod:p}=e,[g,_]=(0,o.Z)();return(0,a.useEffect)(()=>{_&&(m.Z.sendLog("loginGuideShow",{enter_from:(0,v.vM)(),enter_method:p,params_for_special:"uc_login"}),null==s||s())},[_]),(0,i.jsxs)("div",{ref:g,className:d()(f.default.loginBtnWrapper,{[f.default.isDetail]:l}),children:[2===t?(0,i.jsx)("div",{className:f.default.jumpBlock,onClick:r,children:(0,i.jsx)("span",{children:h})}):(0,i.jsx)("div",{children:c}),(0,i.jsx)(u.Button,{className:f.default.loginBtn,onClick:()=>{m.Z.sendLog("loginGuideClick",{enter_from:(0,v.vM)(),enter_method:p,params_for_special:"uc_login"}),n()},theme:"solid",children:"立即登录"})]})}},374135:function(e,t,l){var n=l(624508);t.Z=new n.h({loginGuideShow:{eventName:"login_guide_show",params:{enter_from:"",enter_method:"",params_for_special:""}},loginGuideClick:{eventName:"login_guide_click",params:{enter_from:"",enter_method:"",params_for_special:""}}})},220080:function(e,t,l){l.d(t,{W:function(){return v}});var n=l(629686),r=l(402748),i=l(811603),a=l(320165),o=l(101199),s=l(59850),d=l(679785),u=l(912469);let c=["resize","scroll","touchstart","touchmove","touchend","pageshow","load"],v=(0,o.forwardRef)((e,t)=>{let{scrollListener:l}=e,v=(0,i._)(e,["scrollListener"]),m=(0,o.useRef)({subscribers:[],framePending:!1,node:null,rafHandle:null}),f=(0,o.useCallback)(e=>{m.current.subscribers=m.current.subscribers.concat(e)},[]),h=(0,o.useCallback)(e=>{m.current.subscribers=m.current.subscribers.filter(t=>t!==e)},[]),p=l||"undefined"!=typeof window&&window,g=(0,s.Z)(e=>{!m.current.framePending&&(m.current.rafHandle=window.requestAnimationFrame(()=>{if(!m.current.node)return;m.current.framePending=!1;let{top:e,bottom:t}=m.current.node.getBoundingClientRect();m.current.subscribers.forEach(l=>l({distanceFromTop:e,distanceFromBottom:t,eventSource:(0,d.S)(p)?p:document.documentElement}))}),m.current.framePending=!0)});(0,o.useEffect)(()=>()=>{window.cancelAnimationFrame(m.current.rafHandle)},[]),(0,o.useEffect)(()=>{if(p)return c.forEach(e=>{p.addEventListener(e,g)}),g({}),()=>{c.forEach(e=>{p.removeEventListener(e,g)})}},[p,g]);let _=(0,o.useRef)({subscribe:f,unsubscribe:h,getParent:()=>m.current.node});return(0,o.useImperativeHandle)(t,()=>({notifySubscribers:g}),[g]),(0,a.jsx)(u.X.Provider,{value:_.current,children:(0,a.jsx)("div",(0,r._)((0,n._)({},v),{ref:e=>m.current.node=e,onScroll:g,onTouchStart:g,onTouchMove:g,onTouchEnd:g}))})})},692620:function(e,t,l){l.d(t,{Z:function(){return s}});var n=l(480333);l(490629);var r=l(320165),i=l(101199),a=l(890710),o=l(912469);class s extends i.Component{componentDidMount(){this.context.subscribe(this.handleContainerEvent)}componentWillUnmount(){this.context.unsubscribe(this.handleContainerEvent)}componentDidUpdate(){this.placeholder.style.paddingBottom=this.props.disableCompensation?"0":`${this.state.isSticky?this.state.calculatedHeight:0}px`}render(){let e=i.cloneElement(this.props.children({isSticky:this.state.isSticky,wasSticky:this.state.wasSticky,distanceFromTop:this.state.distanceFromTop,distanceFromBottom:this.state.distanceFromBottom,calculatedHeight:this.state.calculatedHeight,style:this.state.style}),{ref:e=>{this.content=a.findDOMNode(e)}});return(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{ref:e=>this.placeholder=e}),e]})}constructor(...e){super(...e),(0,n._)(this,"state",{isSticky:!1,wasSticky:!1,style:{},distanceFromTop:0,distanceFromBottom:0,calculatedHeight:0}),(0,n._)(this,"placeholder",void 0),(0,n._)(this,"content",void 0),(0,n._)(this,"context",void 0),(0,n._)(this,"handleContainerEvent",e=>{let{distanceFromTop:t,distanceFromBottom:l,eventSource:n}=e,r=this.context.getParent(),i=!1;this.props.relative&&(i=n!==r,t=-(n.scrollTop+n.offsetTop)+this.placeholder.offsetTop);let a=this.placeholder.getBoundingClientRect(),o=this.content.getBoundingClientRect().height,s=l-this.props.bottomOffset-o,d=!!this.state.isSticky,u=i?d:t<=-this.props.topOffset&&l>-this.props.bottomOffset;l=(this.props.relative?r.scrollHeight-r.scrollTop:l)-o;let c=u?{position:"fixed",top:s>0?this.props.relative?r.offsetTop-r.offsetParent.scrollTop:0:s,left:a.left,width:a.width}:{};!this.props.disableHardwareAcceleration&&(c.transform="translateZ(0)"),this.setState({isSticky:u,wasSticky:d,distanceFromTop:t,distanceFromBottom:l,calculatedHeight:o,style:c})})}}(0,n._)(s,"defaultProps",{relative:!1,topOffset:0,bottomOffset:0,disableCompensation:!1,disableHardwareAcceleration:!1}),(0,n._)(s,"contextType",o.X)},912469:function(e,t,l){l.d(t,{X:function(){return n}});let n=l(101199).createContext(null)},512674:function(e,t,l){l.d(t,{U:function(){return v}}),l(490629);var n=l(101199),r=l(732979),i=l.n(r),a=l(297738),o=l.n(a),s=l(414061),d=l(499059),u=l(386206);i().extend(o());let c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if("number"!=typeof e||e<=0)return"";let t="H时m分s秒";return e<6e4?t="s秒":e<36e5&&(t="m分s秒"),`已看${i().duration(e,"milliseconds").format(t)}`},v=(e,t)=>{var l,r,i,a,o;let v=null!==(i=e.video.duration)&&void 0!==i?i:0,[m,f]=(0,n.useState)(null!==(a=null==e?void 0:null===(l=e.playProgress)||void 0===l?void 0:l.play_progress)&&void 0!==a?a:0),[h,p]=(0,n.useState)(null!==(o=null==e?void 0:null===(r=e.playProgress)||void 0===r?void 0:r.watch_times)&&void 0!==o?o:0);return(0,n.useEffect)(()=>s.listen(s.EVENT.WatchLaterProgressChange,()=>{var t,l,n,r,i,a,o;let{store:s={}}=null!==(i=d.Le.getConfig(d.gI.WatchLater))&&void 0!==i?i:{},u=null!==(a=null===(t=s[e.awemeId])||void 0===t?void 0:t.progress)&&void 0!==a?a:null==e?void 0:null===(l=e.playProgress)||void 0===l?void 0:l.play_progress,c=null!==(o=null===(n=s[e.awemeId])||void 0===n?void 0:n.loop)&&void 0!==o?o:null==e?void 0:null===(r=e.playProgress)||void 0===r?void 0:r.watch_times;f(null!=u?u:0),p(null!=c?c:0)}),[]),{pctFormat:v>0?(0,u.Sb)(m,v,h):c(m),isWatchLaterTab:"watch_later"===t}}},659054:function(e,t,l){l.d(t,{J:function(){return q}});var n=l("629686");l("679308"),l("490629"),l("374954"),l("706056");var r=l("320165"),i=l("101199"),a=l("469935"),o=l.n(a),s=l("732979"),d=l.n(s),u=l("855436"),c=l("205030"),v=l("72430"),m=l("263832"),f=l("855357"),h=l("242875"),p=l("593124"),g=l("966473"),_=l("165030"),x=l("499059"),C=l("386206"),w=l("889429"),b=l("414061"),I=l("601034"),y=l("629896"),j=l("402748");let k=(0,i.forwardRef)((e,t)=>(0,r.jsxs)("svg",(0,j._)((0,n._)({width:19,height:19,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:[(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.533 14.824a.625.625 0 0 0 1.25 0 7.391 7.391 0 0 0-3.371-6.208 5.115 5.115 0 0 0 1.113-3.195 5.107 5.107 0 0 0-1.506-3.636A5.107 5.107 0 0 0 10.384.28c-.815 0-1.594.185-2.316.55a.625.625 0 1 0 .564 1.116 3.896 3.896 0 0 1 5.643 3.476 3.862 3.862 0 0 1-1.165 2.776.756.756 0 0 0 .172 1.203 6.145 6.145 0 0 1 3.251 5.424zm-3.119 2.32a.625.625 0 0 0 1.25 0 7.19 7.19 0 0 0-3.262-6.027 4.982 4.982 0 0 0 1.071-3.095c0-1.338-.52-2.595-1.466-3.54a4.974 4.974 0 0 0-3.54-1.467c-1.337 0-2.595.52-3.54 1.466a4.974 4.974 0 0 0-1.467 3.54 4.974 4.974 0 0 0 1.071 3.096A7.19 7.19 0 0 0 .27 17.145a.625.625 0 0 0 1.25 0 5.943 5.943 0 0 1 3.143-5.247.752.752 0 0 0 .172-1.196 3.729 3.729 0 0 1-1.125-2.68 3.76 3.76 0 0 1 3.757-3.757 3.76 3.76 0 0 1 3.756 3.757c0 1.016-.399 1.967-1.124 2.68a.752.752 0 0 0 .171 1.197 5.943 5.943 0 0 1 3.144 5.246z",fill:"#fff"}),(0,r.jsx)("path",{d:"M17.783 14.824h.25-.25zm-3.371-6.208l-.196-.156-.171.216.231.15.136-.21zm.7-1.172l-.23-.099.23.099zm-1.093-5.659l-.177.177.177-.177zM8.068.83l.113.223L8.068.83zm-.276.84l-.223.113.223-.113zm.84.276l-.113-.223.113.223zm4.478 6.252l-.175-.179.175.179zm-.218.645l-.247.036.247-.036zm.39.557l-.118.22.118-.22zm-1.88 1.718l-.196-.155-.17.215.23.15.136-.21zm.669-1.125l-.23-.099.23.099zm-1.064-5.51l-.177.176.177-.177zm-7.08 0l.176.176-.176-.177zm-1.064 5.51l.23-.099-.23.099zm.668 1.125l.137.21.229-.15-.17-.214-.196.154zm1.132.781l-.118-.22.118.22zm.389-.554l.247.035-.247-.035zm-.217-.642l.175-.179-.175.179zm5.264 0l-.175-.179.175.179zm-.217.642l.247-.036-.247.036zm.388.554l.118-.22-.118.22zm6.888 3.301a.375.375 0 0 1-.375-.375h-.5c0 .483.392.875.875.875v-.5zm.375-.375a.375.375 0 0 1-.375.375v.5a.875.875 0 0 0 .875-.875h-.5zm-3.257-5.998a7.141 7.141 0 0 1 3.257 5.998h.5a7.641 7.641 0 0 0-3.485-6.418l-.272.42zm.606-1.48a4.869 4.869 0 0 1-.666 1.114l.392.312c.298-.375.543-.787.733-1.23l-.46-.197zm.393-1.925c0 .668-.132 1.315-.393 1.924l.46.197a5.358 5.358 0 0 0 .433-2.121h-.5zm-1.433-3.46a4.858 4.858 0 0 1 1.433 3.46h.5c0-1.44-.561-2.795-1.579-3.813l-.354.354zM10.384.53c1.307 0 2.534.509 3.458 1.433l.354-.354A5.358 5.358 0 0 0 10.384.03v.5zm-2.203.523A4.838 4.838 0 0 1 10.384.53v-.5c-.854 0-1.671.194-2.429.577l.226.446zm-.166.504a.375.375 0 0 1 .166-.504L7.955.606a.875.875 0 0 0-.386 1.176l.446-.226zm.504.166a.375.375 0 0 1-.504-.166l-.446.226a.875.875 0 0 0 1.175.386l-.225-.446zm1.865-.443a4.1 4.1 0 0 0-1.865.443l.225.446a3.6 3.6 0 0 1 1.64-.389v-.5zm4.141 4.142a4.146 4.146 0 0 0-4.141-4.142v.5a3.646 3.646 0 0 1 3.641 3.642h.5zm-1.24 2.954a4.113 4.113 0 0 0 1.24-2.954h-.5c0 .985-.387 1.907-1.09 2.597l.35.357zm-.145.432a.508.508 0 0 1 .146-.432l-.35-.357a1.007 1.007 0 0 0-.291.86l.495-.071zm.26.372a.506.506 0 0 1-.26-.372l-.495.07c.045.315.239.592.52.743l.235-.441zm3.383 5.645A6.395 6.395 0 0 0 13.4 9.18l-.236.44a5.895 5.895 0 0 1 3.12 5.205h.5zM14.04 17.52a.375.375 0 0 1-.375-.375h-.5c0 .483.392.875.875.875v-.5zm.375-.375a.375.375 0 0 1-.375.375v.5a.875.875 0 0 0 .875-.875h-.5zm-3.149-5.818a6.94 6.94 0 0 1 3.15 5.818h.5a7.439 7.439 0 0 0-3.376-6.237l-.274.419zm.576-1.434a4.73 4.73 0 0 1-.635 1.07l.393.31c.284-.362.52-.758.701-1.183l-.46-.197zm.382-1.871c0 .65-.128 1.279-.382 1.871l.46.197c.28-.655.422-1.351.422-2.068h-.5zM10.83 4.658a4.724 4.724 0 0 1 1.393 3.364h.5a5.224 5.224 0 0 0-1.54-3.717l-.353.353zM7.467 3.265c1.27 0 2.464.495 3.363 1.393l.354-.353a5.224 5.224 0 0 0-3.717-1.54v.5zM4.103 4.658a4.724 4.724 0 0 1 3.364-1.393v-.5a5.224 5.224 0 0 0-3.717 1.54l.353.353zM2.71 8.022c0-1.271.495-2.465 1.393-3.364l-.353-.353a5.224 5.224 0 0 0-1.54 3.717h.5zm.383 1.871a4.724 4.724 0 0 1-.383-1.871h-.5c0 .717.143 1.413.423 2.068l.46-.197zm.635 1.07a4.73 4.73 0 0 1-.635-1.07l-.46.197c.182.425.418.821.702 1.182l.393-.31zM.52 17.145a6.939 6.939 0 0 1 3.148-5.818l-.273-.419A7.439 7.439 0 0 0 .02 17.145h.5zm.375.375a.375.375 0 0 1-.375-.375h-.5c0 .483.391.875.875.875v-.5zm.375-.375a.375.375 0 0 1-.375.375v.5a.875.875 0 0 0 .875-.875h-.5zm3.275-5.467a6.193 6.193 0 0 0-3.275 5.467h.5a5.693 5.693 0 0 1 3.012-5.027l-.237-.44zm.26-.37a.503.503 0 0 1-.26.37l.237.44c.279-.15.472-.425.517-.739l-.495-.07zm-.146-.428a.504.504 0 0 1 .145.428l.495.071a1.004 1.004 0 0 0-.29-.856l-.35.357zM3.46 8.022c0 1.083.426 2.099 1.2 2.858l.35-.357a3.479 3.479 0 0 1-1.05-2.501h-.5zm4.007-4.007A4.01 4.01 0 0 0 3.46 8.022h.5a3.51 3.51 0 0 1 3.507-3.507v-.5zm4.006 4.007a4.01 4.01 0 0 0-4.006-4.007v.5a3.51 3.51 0 0 1 3.506 3.507h.5zm-1.199 2.858a3.979 3.979 0 0 0 1.2-2.858h-.5a3.48 3.48 0 0 1-1.05 2.501l.35.357zm-.145.428a.504.504 0 0 1 .145-.428l-.35-.357a1.003 1.003 0 0 0-.29.856l.495-.07zm.26.37a.503.503 0 0 1-.26-.37l-.495.071c.046.314.239.59.518.74l.236-.441zm3.275 5.467a6.193 6.193 0 0 0-3.276-5.467l-.236.44a5.693 5.693 0 0 1 3.012 5.027h.5z",fill:"#fff"})]})));var N=l("178986"),S=l("190953"),E=l("612859"),L=l("365184");let T=(0,i.forwardRef)((e,t)=>(0,r.jsx)("svg",(0,j._)((0,n._)({width:32,height:32,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 0C7.163 0 0 7.163 0 16c0 8.836 7.163 16 16 16 8.836 0 16-7.164 16-16 0-8.837-7.164-16-16-16zm-1.944 9.594c-1.062-.725-2.502.036-2.502 1.322v10.168c0 1.286 1.44 2.046 2.502 1.321l7.06-4.82a1.92 1.92 0 0 0 0-3.171l-7.06-4.82z",fill:"#fff"})})));var M=l("512674"),R=l("769304"),D=l("59850");let P=e=>{let{previewUrlList:t,onVideoEnded:l,onVideoStopped:n,onVideoPlaying:r,hoverPreviewVideoElement:a}=e,[o,s]=(0,i.useState)(!1),[d,u]=(0,i.useState)(!1),c=(0,i.useRef)(),v=(0,i.useRef)();(0,i.useEffect)(()=>()=>{window.clearTimeout(v.current)},[]);let m=(0,R.Z)(),f=(0,D.Z)(e=>{window.clearTimeout(v.current),s(e)}),h=(0,D.Z)(e=>{if(window.clearTimeout(v.current),!m()){window.clearTimeout(v.current);return}v.current=window.setTimeout(()=>{if(!!m())s(!0)})}),p=(0,D.Z)(()=>{if(!!m())f(!1)}),g=(0,i.useMemo)(()=>t.length>0&&o,[t,o]),_=(0,i.useRef)(g);(0,i.useLayoutEffect)(()=>{!g&&_.current&&(null==n||n(),u(!1))},[g,n]),(0,i.useEffect)(()=>{_.current=g},[g]);let x=(0,D.Z)(()=>{null==l||l()}),C=(0,D.Z)(()=>{u(!0),null==r||r()});return(0,i.useEffect)(()=>{if(a)return a.addEventListener("mouseenter",h),a.addEventListener("mouseleave",p),()=>{a.removeEventListener("mouseenter",h),a.removeEventListener("mouseleave",p)}},[a]),{onMouseEnter:h,onMouseLeave:p,isPlay:g,isHovered:o,setIsHovered:f,onEnded:x,onPlaying:C,isReady:d,previewImageRef:c}};var A=l("116553"),F=l("176449"),B=l("264417"),U=l("227831"),V=l("645062"),O=l("166414"),H=l("800513"),z=l("87897"),Z=l("316213"),W=l("387382"),$=l("581999"),K=l("771410");let Y=(0,u.ZP)(()=>Promise.all([l.e("73286"),l.e("28161"),l.e("73356"),l.e("87978")]).then(l.bind(l,689308)),{resolveComponent:e=>{let{Preview:t}=e;return t},ssr:!1}),G=e=>{var t,l,n,a,s,d,u,h,p,g,_,w,b;let{scene:I,awemeInfo:y,isSelf:j,uid:N,canShowUnLook:S,canShowCooperationTag:E=!0,from:T,abTestData:R,userInfo:D,showPermissionIcon:P=!1}=e,{pctFormat:U,isWatchLaterTab:O}=(0,M.U)(y,I),z=(0,i.useCallback)(()=>(0,r.jsx)(F.Z,{viewBox:"0 0 19 19",src:k}),[]),Z=I===c._f.authorCard,$=[{key:"reviewStatus",El:A.p4},{key:"isTop",El:A.Bf},{key:"labelFriend",El:z},{key:"labelPartSee",El:z},{key:"weeklyRecommend",El:W.n},{key:"hotList",El:A.ac},{key:"relationLabels",El:A.qZ},{key:"cooperation",El:A.A1}],K=[],Y=[],[G,q]=(0,i.useState)(S&&(p=(null===(l=x.Le.getConfig(x.gI.UnLookVideos))||void 0===l?void 0:null===(t=l[null==y?void 0:y.awemeId])||void 0===t?void 0:t.status)===v.Pl.UnLook,true)&&p);if((0,i.useEffect)(()=>{var e,t;if(!S)return;q((null===(t=x.Le.getConfig(x.gI.UnLookVideos))||void 0===t?void 0:null===(e=t[null==y?void 0:y.awemeId])||void 0===e?void 0:e.status)===v.Pl.UnLook);let l=V.a.addCb(e=>{let{action:t,awemeId:l}=e;"lookVideo"===t&&l===y.awemeId&&G&&q(!1)});return()=>{l()}},[y,S]),G&&K.push((0,r.jsx)("div",{className:o()(L.default.tag,"user-video-tag"),children:(0,r.jsx)(A.Yd,{})},"unLookTag")),!G){if(O&&j&&U&&K.push((0,r.jsx)("div",{className:o()(L.default.tag,"user-video-tag"),children:(0,r.jsx)(A.Vp,{className:o()(L.default.historyProgressRate,L.default.bg),children:U})},"watchlater")),j&&"user"===T&&(null==y?void 0:y.historyProgressRate)){let e=(0,r.jsx)("div",{className:o()(L.default.tag,"user-video-tag"),children:(0,r.jsx)(A.Vp,{className:o()(L.default.historyProgressRate,L.default.bg),children:null==y?void 0:y.historyProgressRate})},"historyProgressRate");"record"===I&&K.push(e)}$.forEach((e,t)=>{"user"===T&&"weeklyRecommend"===e.key&&(0,W.$)({awemeInfo:y,abTestData:R})&&0===K.length&&K.push((0,r.jsx)(e.El,{scene:"videoCard",awemeInfo:y}));let l=null==y?void 0:y.tag[e.key];if(l){var n,i,a,s,d,u,c;switch(e.key){case"reviewStatus":if(0===K.length){let l=(0,C.As)(null==y?void 0:null===(i=y.status)||void 0===i?void 0:null===(n=i.reviewResult)||void 0===n?void 0:n.extra)||{};K.push((0,r.jsx)("div",{className:o()(L.default.tag,"user-video-tag"),children:(0,r.jsx)(A.Vp,{className:o()(L.default.historyProgressRate,L.default.bg),children:null==l?void 0:l.status_desc_label})},`${e.key}_${t}`))}break;case"isTop":0===K.length&&K.push((0,r.jsx)("div",{className:o()(L.default.tag,"user-video-tag"),children:(0,r.jsx)(e.El,{})},`${e.key}_${t}`));break;case"labelFriend":case"labelPartSee":!1===P&&0===K.length&&j&&(null==y?void 0:null===(a=y.authorInfo)||void 0===a?void 0:a.secUid)===N&&((null==y?void 0:null===(s=y.status)||void 0===s?void 0:s.privateStatus)===2||(null==y?void 0:null===(d=y.status)||void 0===d?void 0:d.partSee)===m.mI.Friend||(null==y?void 0:null===(u=y.status)||void 0===u?void 0:u.partSee)===m.mI.Part)&&K.push((0,r.jsx)("div",{className:o()(L.default.tag,"user-video-tag"),children:(0,r.jsx)(A.Vp,{className:o()(L.default.historyProgressRate,L.default.bg),children:"朋友可见"})},`${e.key}_${t}`));break;case"hotList":(null===(c=JSON.parse((null==l?void 0:l.extra)||"{}"))||void 0===c?void 0:c.entrance_relativity)==="100"&&(null==l?void 0:l.rank)&&0===K.length&&K.push((0,r.jsx)("div",{className:o()(L.default.tag,"user-video-tag"),children:(0,r.jsx)(e.El,{name:null==l?void 0:l.header,top:(null==l?void 0:l.header)==="热榜"&&(null==l?void 0:l.rank)<=10?null==l?void 0:l.rank:0})},`${e.key}_${t}`));break;default:0===K.length&&K.push((0,r.jsx)("div",{className:o()(L.default.tag,"user-video-tag"),children:(0,r.jsx)(e.El,{})},`${e.key}_${t}`))}}})}0===K.length&&(null===(a=y.cooperationInfo)||void 0===a?void 0:null===(n=a.cooperationCreators)||void 0===n?void 0:n.length)>1&&E&&K.push((0,r.jsx)("div",{className:o()(L.default.tag,"user-video-tag"),children:(0,r.jsx)(A.Vp,{className:o()(L.default.historyProgressRate,L.default.bg),children:"共创"})},"cooperationIcon"));let X=(0,H.$m)(y,(null==y?void 0:null===(s=y.authorInfo)||void 0===s?void 0:s.uid)===(null==D?void 0:null===(d=D.info)||void 0===d?void 0:d.uid));0===K.length&&X&&K.push((0,r.jsx)(H.zx,{className:L.default.paidTag,type:X}));let Q=(null==y?void 0:y.awemeType)===f.e.Article;return(null==y?void 0:y.awemeType)===f.e.Lvideo&&(null==y?void 0:null===(h=y.entertainmentVideoPaidWay)||void 0===h?void 0:null===(u=h.paid_ways[0])||void 0===u?void 0:u.paid_way)===9?(0,r.jsx)("div",{className:L.default.jingxuanTag,children:"精选会员"}):(Q?Y.push((0,r.jsx)("div",{className:o()(L.default.tag,L.default.rightTag,"user-video-tag"),children:(0,r.jsx)(B.PE,{className:o()({[L.default.bg]:!Z})})},"longArticleIcon")):(null==y?void 0:y.awemeType)===f.e.Note&&((null==R?void 0:R.liveicon)&&(null==y?void 0:null===(_=y.images)||void 0===_?void 0:null===(g=_.every)||void 0===g?void 0:g.call(_,e=>5===e.clipType))?Y.push((0,r.jsx)("div",{className:o()(L.default.tag,L.default.rightTag,"user-video-tag"),children:(0,r.jsx)(B.G3,{className:o()({[L.default.bg]:!Z})})},"pictureWordIcon")):(!(null==y?void 0:y.isSlides)||(null==y?void 0:null===(b=y.images)||void 0===b?void 0:null===(w=b.every)||void 0===w?void 0:w.call(b,e=>[2,5].includes(e.clipType))))&&Y.push((0,r.jsx)("div",{className:o()(L.default.tag,L.default.rightTag,"user-video-tag"),children:(0,r.jsx)(B.eD,{className:o()({[L.default.bg]:!Z})})},"pictureWordIcon"))),(0,r.jsxs)(r.Fragment,{children:[!!K.length&&(0,r.jsx)("div",{className:o()(L.default.tags,"user-video-stats-tag",L.default.topLeft),children:K}),!!Y.length&&(0,r.jsx)("div",{className:o()(L.default.tags,L.default.topRight),children:Y})]}))};function q(e){var t,l,a,s,u,v,x,j,k,M;let{videoHref:R,className:D,src:A,awemeInfo:F,likeCount:B,playCount:V,isSpider:H=!1,showTag:W=!0,iconWidth:q=80,isSelf:X,onClick:Q,onShow:J,iconColor:ee="rgba(169, 170, 183, 1)",skeletonClass:et,skeletonIconStyle:el,uid:en,showTitle:er=!1,showHasLook:ei=!1,canShowUnLook:ea=!1,canShowCooperationTag:eo=!0,onVideoStopped:es,onVideoEnded:ed,onVideoPlaying:eu,scene:ec,logParams:ev,children:em,hoverNoOverFlow:ef=!0,tab:eh,onLoad:ep,from:eg,userTabKey:e_,onNicknameClick:ex,showPermissionIcon:eC=!1,reuseConfig:ew}=e,eb=(0,i.useMemo)(()=>{var e,t;return null==F?void 0:null===(t=F.video)||void 0===t?void 0:null===(e=t.playAddr)||void 0===e?void 0:e.map(e=>e.src||"")},[F]),{setIsHovered:eI,isPlay:ey,onEnded:ej,onPlaying:ek,isReady:eN,previewImageRef:eS,onMouseEnter:eE,onMouseLeave:eL}=P({previewUrlList:eb,onVideoStopped:es,onVideoEnded:ed,onVideoPlaying:eu}),[eT,eM]=(0,i.useState)(!1),[eR,eD]=(0,i.useState)(null),{isiPad:eP}=(0,h.X)(),eA=F.awemeType!==f.e.Note&&F.awemeType!==f.e.Article&&![c._f.authorCard].includes(ec)&&eh!==p.L.CollectFolder,eF=ey&&eA&&(!(0,w.vU)()||F),eB=(0,g.x)(J),eU=(0,i.useRef)(B),eV=(0,i.useMemo)(()=>{var e,t;let l=null==F?void 0:null===(e=F.video)||void 0===e?void 0:e.width;return(null==F?void 0:null===(t=F.video)||void 0===t?void 0:t.height)/l},[F]),eO=(0,i.useCallback)(e=>{if((null==F?void 0:F.awemeType)===f.e.Article){var t,l,n,r,i;e.preventDefault(),b.emit(b.EVENT.videoPause,"article_detail_click"),K.Z.report("video_cover_click",{enter_from:(0,I.yW)(),author_id:null==F?void 0:null===(t=F.authorInfo)||void 0===t?void 0:t.uid,group_id:null==F?void 0:F.awemeId,aweme_type:null==F?void 0:F.awemeType,enter_method:"click_tab",is_co_publish:Number(null==F?void 0:null===(n=F.cooperationInfo)||void 0===n?void 0:null===(l=n.cooperationCreators)||void 0===l?void 0:l.length)>1?1:0,co_publish_author_list:null===(i=F.cooperationInfo)||void 0===i?void 0:null===(r=i.cooperationCreators)||void 0===r?void 0:r.filter(e=>e.roleId!==c.iG.Author).map(e=>`${e.uid}_${null==e?void 0:e.roleId}`)});let a=`/article/${F.awemeId}`;window.open(a,"_blank");return}if(null==Q||Q(e),(null==eb?void 0:eb.length)!==0)eI(!1)},[eI,Q,eb,F]);(0,i.useEffect)(()=>{!eF&&eM(!1)},[eF]),(0,i.useEffect)(()=>{eU.current=B},[B]),(0,i.useEffect)(()=>{let e=eB.current;if(e&&!eP){let t=y.mouseEnter(e,eE),l=y.mouseLeave(e,eL);return()=>{t(),l()}}},[eE,eL,eP]);let eH=(0,z._)(),{userInfo:ez}=(0,$.useUserInfoContext)()||{},eZ=(null==F?void 0:null===(t=F.video)||void 0===t?void 0:t.width)>=(null==F?void 0:null===(l=F.video)||void 0===l?void 0:l.height),eW="user"===eg&&eZ;return(0,r.jsxs)(O.B,{onClick:eO,className:o()(L.default.userVideo,D,{[L.default.hoverNoOverflow]:ef}),href:R,target:"_blank",rel:"noopener noreferrer",isNeedSeoOpt:!0,isUseALink:(null==F?void 0:F.isHighQuality)!==_.HighQualityStatus.NotHighQuality,children:[(0,r.jsxs)("div",{className:o()(L.default.wrapper,{[L.default.animationScaleOne]:50===q,[L.default.canAnimation]:!eA}),ref:e=>{eB.current=e,eD(e)},children:[!!A&&(0,r.jsx)("div",{className:L.default.imageContainer,children:(0,r.jsx)(U.Q,{className:o()(L.default.videoImg,{[L.default.isSafari]:(0,w.G6)(),[L.default.containBlur]:eW&&eF&&eT}),src:A,iconWidth:q,isSpider:H,iconColor:ee,skeletonClass:et,iconStyle:el,isPreviewing:eF&&eT&&!eW,onLoad:ep,alt:(null==F?void 0:F.desc)?`${null==F?void 0:null===(a=F.authorInfo)||void 0===a?void 0:a.nickname}${null==F?void 0:F.desc}`:`${null==F?void 0:null===(s=F.authorInfo)||void 0===s?void 0:s.nickname}于${d().unix(1633782931).format("YYYYMMDD")}发布的作品`})}),eF&&(0,r.jsx)(Y,{previewUrlList:eb,className:o()(L.default.previewContainer),isHorizontal:eZ,onReady:()=>{null==ek||ek(),eM(!0)},isOperable:!0,onEnded:ej,ratio:eV,isMute:null==F?void 0:null===(v=F.status)||void 0===v?void 0:null===(u=v.videoMute)||void 0===u?void 0:u.isMute,fakeHorizontalInfo:F.fakeHorizontalInfo,ref:eS,forceContainerCover:"user"===eg,forceFitContain:eW,logParams:(0,n._)({awemeInfo:F,tab_name:ec},ev),awemeInfo:F,container:eR,scene:ec,user:ez,reuseConfig:ew}),(0,r.jsx)("div",{className:L.default.mask}),W&&!eF&&(0,r.jsx)(G,{scene:ec,awemeInfo:F,isSelf:X,uid:en,canShowUnLook:ea,canShowCooperationTag:eo,from:eg,abTestData:eH,userInfo:ez,showPermissionIcon:eC}),void 0!==B&&(0,r.jsxs)("span",{className:o()(L.default.likeCount,"author-card-user-video-like",{[L.default.invisible]:eF}),children:[!H&&(0,r.jsx)(Z.z,{style:{fontSize:"20px"},svg:(0,r.jsx)(N.Z,{})}),(0,r.jsx)("span",{className:L.default.countText,children:(0,C.qe)(eU.current)})]}),void 0!==V&&(0,r.jsxs)("div",{className:o()(L.default.playCount,{[L.default.invisible]:eF}),children:[(0,r.jsx)(Z.z,{style:{fontSize:"20px"},svg:(0,r.jsx)(S.Z,{})}),(0,r.jsx)("span",{className:L.default.countText,children:(0,C.qe)(V)})]}),X&&eC&&(null==F?void 0:null===(x=F.authorInfo)||void 0===x?void 0:x.secUid)===en&&((null==F?void 0:null===(j=F.status)||void 0===j?void 0:j.privateStatus)===2||(null==F?void 0:null===(k=F.status)||void 0===k?void 0:k.partSee)===m.mI.Friend||(null==F?void 0:null===(M=F.status)||void 0===M?void 0:M.partSee)===m.mI.Part)&&(0,r.jsx)("div",{className:o()(L.default.playPermission,{[L.default.invisible]:eF}),children:(0,r.jsx)(Z.z,{style:{fontSize:"18px"},svg:(0,r.jsx)(E.Z,{})})}),(0,r.jsx)("p",{className:o()(L.default.hidden,{[L.default.invisible]:eF}),children:null==F?void 0:F.desc}),(null==F?void 0:F.unidate)&&(0,r.jsxs)("p",{className:o()(L.default.hidden,{[L.default.invisible]:eF}),children:["发布时间:",d()((null==F?void 0:F.unidate)*1e3).format("YYYY-MM-DD HH:mm")]}),ei&&(0,r.jsxs)("div",{className:o()(L.default.look,{[L.default.invisible]:eF}),children:[(0,r.jsx)(T,{}),(0,r.jsx)("span",{className:L.default.text,children:"刚刚看过"})]})]}),er&&(0,r.jsx)("p",{className:o()(L.default.title,L.default.single),children:null==F?void 0:F.desc}),em]})}},166414:function(e,t,l){l.d(t,{B:function(){return c}});var n=l(629686),r=l(402748),i=l(811603),a=l(320165);l(101199);var o=l(469935),s=l.n(o),d=l(47946),u=l(234150);function c(e){let{isUseALink:t=!0,children:l,className:o}=e,c=(0,i._)(e,["isUseALink","children","className"]);if(!t){let{onClick:e}=c;return(0,a.jsx)("div",(0,r._)((0,n._)({className:s()(d.default.aLink,o),onClick:e},c),{children:l}))}return(0,a.jsx)(u.a,(0,r._)((0,n._)({className:o},c),{children:l}))}},715360:function(e,t,l){l.d(t,{b:function(){return o}}),l(490629);var n=l(101199),r=l(528937),i=l(66948),a=l(499059);let o=()=>{let[e,t]=(0,n.useState)(a.Le.getConfig(a.gI.AsiangameSeasonIds)||[]);return(0,n.useEffect)(()=>{0===e.length&&(async()=>{let e=await r.get({key:i.TccKey.AsiangameSeasonIds,defaultValue:[]});a.Le.setConfig(a.gI.AsiangameSeasonIds,e),t(e)})()},[]),{seasonIds:e}}},295797:function(e,t,l){l.d(t,{Z:function(){return i}}),l(490629);var n=l(101199),r=l(197393);let i=()=>{let[e,t]=(0,n.useState)([]),[l,i]=(0,n.useState)(!1),[a,o]=(0,n.useState)(0);return{liveList:e,updateData:(0,n.useCallback)(async()=>{i(!0);let e=await (0,r.yQ)({});i(!1);let{data:l,statusCode:n,logId:a}=e;0===n&&(t(l),o(a))},[]),loading:l,requestId:a}}},131653:function(e,t,l){l.d(t,{Z:function(){return r}});var n=l(480333);l(679308);class r{constructor(){(0,n._)(this,"promise",void 0),(0,n._)(this,"resolve",void 0),(0,n._)(this,"reject",void 0),this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}}},368932:function(e,t,l){l.d(t,{a5:function(){return c},cl:function(){return d},iY:function(){return s},uX:function(){return u}}),l(679308);var n=l(131653),r=l(31584),i=l(399989);let a=new n.Z,o=new n.Z;function s(e){a.resolve(e)}function d(e){o.resolve(e)}let u=()=>o.promise,c=()=>(0,r.Z)()?a.promise:i.O.getIsSaasPopup()?o.promise:Promise.resolve(void 0);t.ZP=c},31584:function(e,t){t.Z=()=>"/chat"===window.location.pathname},117961:function(e,t,l){l.d(t,{O:function(){return a}});var n=l(320165),r=l(101199),i=l(91627);let a=r.forwardRef((e,t)=>{let{active:l,children:a,className:o}=e,s=(0,r.useMemo)(()=>l?{}:{display:"none"},[l]);return(0,n.jsx)(i.w,{isActive:l,children:(0,n.jsx)("div",{className:o,ref:t,style:s,children:a})})})}}]);