(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[9245],{74499:(e,t,i)=>{"use strict";i.d(t,{A:()=>s});var o=i(24643),n=i(40099),a=i(84987);const r={id:"logo-dark-c4561408",use:"logo-dark-c4561408-usage",viewBox:"0 0 118 42",content:''};function s(e){const t=(0,n.useContext)(a.X);return(0,n.useLayoutEffect)((()=>(t.add(r),()=>{t.remove("logo-dark-c4561408")})),[]),(0,o.jsx)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e,{children:(0,o.jsx)("use",{xlinkHref:"#logo-dark-c4561408"},void 0)}),void 0)}},46102:(e,t,i)=>{"use strict";i.d(t,{A:()=>s});var o=i(24643),n=i(40099),a=i(84987);const r={id:"logo-light-0ca3c974",use:"logo-light-0ca3c974-usage",viewBox:"0 0 118 30",content:''};function s(e){const t=(0,n.useContext)(a.X);return(0,n.useLayoutEffect)((()=>(t.add(r),()=>{t.remove("logo-light-0ca3c974")})),[]),(0,o.jsx)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e,{children:(0,o.jsx)("use",{xlinkHref:"#logo-light-0ca3c974"},void 0)}),void 0)}},84643:(e,t,i)=>{"use strict";i.d(t,{v:()=>r});var o=i(28086),n=i(56070),a=function(e,t,i,o){return new(i||(i=Promise))((function(n,a){function r(e){try{l(o.next(e))}catch(e){a(e)}}function s(e){try{l(o.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,s)}l((o=o.apply(e,t||[])).next())}))};const r=(0,o.z)({initState:{rechargeEntryPermission:!1,isWebRechargedBefore:!1,isFetching:!0},fetchAction:(e,t)=>a(void 0,void 0,void 0,(function*(){const{uid:e,region:i,source:o}=t,r={rechargeEntryPermission:!1,isWebRechargedBefore:!1,isFetching:!1};try{if(!e)return r;const{data:t}=yield(s={user_id:e,local_country:i,live_id:12,source:o},a(void 0,void 0,void 0,(function*(){return yield n.h.get("/webcast/wallet_api/fs/diamond_buy/permission_v2",{query:s,baseUrlType:4})})));return{rechargeEntryPermission:Boolean(t.is_show),isWebRechargedBefore:!t.is_first_web_recharge,isFetching:!1}}catch(e){return r}var s}))})},42712:(e,t,i)=>{"use strict";i.d(t,{Y:()=>l});var o=i(40099),n=i(47172),a=i(8227),r=i(12628),s=i(41271);const l=()=>{const{pathname:e}=(0,n.useLocation)(),t=(0,s.P)(r.C6,{selector:e=>{var t;return!!(null===(t=e.permissionInfo)||void 0===t?void 0:t.topLSEntranceVisible)},dependencies:[]});return(0,o.useMemo)((()=>!(e===a.vI.studioDownload)&&t),[e,t])}},47079:(e,t,i)=>{"use strict";i.d(t,{Q:()=>et,t:()=>it});var o=i(24643),n=i(67518),a=i(28013),r=i(99789),s=i.n(r),l=i(4474),d=i(40099),c=i(47172),u=i(243),p=i.n(u),v=i(25616),_=i(88920),h=i(13990),m=i(61886),g=i(49057),f=i(48615),b=i(5441),y=i(86389),x=i(91825),k=i(40772),w=i(81211),S=i(72688),C=i(16469),j=i(33805),I=i(58305),T=i(22884),L=i(30615),O=i(45297),R=i(71281),E=i(95868),P=i(96689),A=i(21482),D=i(97706),F=i(95481),B=i(13492);const M=(0,i(47236).Ay)({resolved:{},chunkName:()=>"multi-account-controller",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(2318),i.e(1618),i.e(7181),i.e(3392),i.e(241),i.e(4336),i.e(1427),i.e(8564),i.e(7716),i.e(6244),i.e(8873),i.e(5021),i.e(3446),i.e(3290),i.e(8474),i.e(3557),i.e(8177),i.e(1274),i.e(9937),i.e(2618),i.e(2142),i.e(1683),i.e(6514),i.e(5308),i.e(8605),i.e(2486),i.e(1605),i.e(4875),i.e(1493),i.e(3593),i.e(9920),i.e(7899),i.e(4437)]).then(i.bind(i,73318)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>73318});var N=i(84987);const q={id:"tiktok_series-283a8183",use:"tiktok_series-283a8183-usage",viewBox:"0 0 48 48",content:''};function U(e){const t=(0,d.useContext)(N.X);return(0,d.useLayoutEffect)((()=>(t.add(q),()=>{t.remove("tiktok_series-283a8183")})),[]),(0,o.jsx)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e,{children:(0,o.jsx)("use",{xlinkHref:"#tiktok_series-283a8183"},void 0)}),void 0)}var W=i(4929),H=i(12628),z=i(8227),K=i(82715),V=i(87260),G=i(75792),$=i(46682),J=i(41271),Q=i(73580),Y=i(52401),Z=i(42230),X=i(64407),ee=i(82850),te=i(6986),ie=i(82535),oe=i(5321),ne=i(51391),ae=i(38739),re=i(509),se=i(21620),le=i(31974),de=i(8615),ce=i(93608),ue=i(72241),pe=i(96141),ve=i(28086),_e=i(23914),he=i(98332),me=i(63031),ge=i(64),fe=i(98124),be=i(92249),ye=i(29580),xe=i(466),ke=i(85576),we=i(61331),Se=i(28436),Ce=i(21189),je=i(50517),Ie=i(41432),Te=i(69829),Le=i(42832),Oe=i(87664),Re=i(65404),Ee=i(34393),Pe=i(62216),Ae=i(56723),De=i(77734),Fe=i(89076),Be=i(20157),Me=i(62186),Ne=i(12527),qe=i(72153);const Ue=(0,Me.default)("div",{target:"e1xqzoke0"})((({theme:e})=>(0,qe.zy)({theme:e,typography:"P3",fontFamily:"TikTokFont"})),{minWidth:"223px"},"label:DivContainer;"),We=(0,Me.default)("div",{target:"e1xqzoke1"})({display:"flex",alignItems:"center",position:"relative",height:"50px"},"label:DivHeader;"),He=(0,Me.default)(Ne.A,{target:"e1xqzoke2"})((({theme:{direction:e}})=>[(0,qe.mp)({direction:e,marginStart:"28px"}),"ltr"===e?null:{transform:"rotate(180deg)"}]),{width:"20px",height:"20px"},"label:StyledBackIcon;"),ze=(0,Me.default)("p",{target:"e1xqzoke3"})((({theme:e})=>(0,qe.zy)({theme:e,typography:"P2",fontWeight:"semiBold"})),{position:"absolute",left:"50%",transform:"translateX(-50%)"},"label:PTitle;"),Ke=(0,Me.default)("ul",{target:"e1xqzoke4"})({listStyle:"none",margin:0,padding:0,maxHeight:"590px",overflowY:"auto"},"label:UlListWrapper;"),Ve=(0,Me.default)("li",{target:"e1xqzoke5"})((({theme:e,theme:{colors:t},active:i})=>[{padding:"10px 24px",background:i?t.BGPlaceholderDefault:"transparent",":hover":{background:t.BGPlaceholderDefault}},(0,qe.zy)({theme:e,fontFamily:"TikTokDisplayFont"})]),"label:LiListItem;"),Ge=function(e){var t,i;const n=(0,v.s)(),{language:a}=null!==(t=(0,g.W)((()=>["language"]),[]))&&void 0!==t?t:{},r=null!==(i=W.wX.reduce(((e,t)=>(t.value===a?e.unshift(t):e.push(t),e)),[]))&&void 0!==i?i:[],{pathname:s,search:u}=(0,c.useLocation)(),p=(0,Fe.K)(),_=(0,d.useCallback)((e=>()=>{let t;t=(0,E.Iz)(s)?`/${e}`:(0,l.stringifyUrl)({url:s,query:Object.assign(Object.assign({},(0,l.parse)(u)),{lang:e})}),p({lang:e,url:t})}),[s,p,u]),h=(0,d.useCallback)((e=>()=>{_(e)()}),[_]),m=(0,d.useCallback)((e=>t=>{13===t.keyCode&&(t.stopPropagation(),_(e)())}),[_]),{showModal:f,hideModal:b}=(0,Be.g9)();(0,d.useEffect)((()=>(f(),()=>{b()})),[b,f]);const[y,x]=(0,d.useState)(0),k=(0,d.useCallback)((t=>{9===t.keyCode&&(t.shiftKey?y>0&&x(y-1):(y{var t,i;const o=document.querySelector(`#${Ae.lV}`);(null===(t=Array.from(null==o?void 0:o.querySelectorAll("*")))||void 0===t?void 0:t.includes(document.activeElement))||null===(i=e.onBlur)||void 0===i||i.call(e)}),0)))}),[y,e,r.length]);return(0,o.jsxs)(Ue,{children:[(0,o.jsxs)(We,{children:[(0,o.jsx)("i",{onClick:e.onBack,tabIndex:0,onKeyDown:e.onKeyDown,"aria-label":n("accessibilityLabels_forYou_nav_language_back_btn"),role:"button",children:(0,o.jsx)(He,{})}),(0,o.jsx)(ze,{id:Ae.o6,children:n("Language")})]}),(0,o.jsx)(Ke,{id:Ae.lV,onKeyDown:k,role:"listbox","aria-labelledby":Ae.o6,children:r.map((({value:e,label:t},i)=>(0,o.jsx)(Ve,{active:a===e||i===y,tabIndex:0,onClick:h(e),onKeyDown:m(e),role:"option",children:t},e)))})]})};var $e=i(84643),Je=i(49589),Qe=i(31476),Ye=i(33399),Ze=i(42712),Xe=i(21683);const et="series-red-dot",tt={padding:"10px 8px 10px 16px"},it=(0,d.memo)((function({active:e,margin:t=-17,e2eTag:i,onKeyDown:r,onBlur:u,disableToggleTheme:N,logoutTeaReport:q}){var Fe,Be,Me,Ne,qe,Ue,We,He,ze;const{direction:Ke}=(0,n.u)(),Ve=(0,v.s)(),{pathname:it,search:ot}=(0,c.useLocation)(),nt=(0,$.w)(H.p2),at=(0,c.useHistory)(),rt=(0,H.mU)(),{isInProductHoldout:st}=(0,_.Vv)(),{condenseProfileDropdown:lt}=(0,_.E1)(),dt=(0,Ze.Y)(),ct=(0,d.useMemo)((()=>null!=q?q:new Y.S),[q]),{switchedType:ut}=(0,J.P)(h.Eq,{selector:e=>({switchedType:e.switchedType}),dependencies:[]}),pt=(0,Q.Nj)(m.y_),vt=(0,g.W)((()=>["user","language","abTestVersion","region"]),[]),_t=(0,f.U)((()=>["searchVideoForLoggedin","studioDownloadEntrance","liveStudioEnable","liveAnchorEntrance"]),[]),{isElectronApp:ht}=(0,b.B)(),{isVideoDetailExperiment:mt}=(0,_.ac)(),gt=mt||ht,ft=(0,pe.ur)(),bt=(0,d.useCallback)((()=>{Z.R.handleClickGetApp({enter_method:"under_profile_icon_button"}),ft.setIsModalShow(!0)}),[ft]),yt=(0,d.useCallback)((e=>{13===e.keyCode&&bt()}),[bt]),xt=(0,d.useMemo)((()=>{var e,t;return null!==(t=null===(e=W.wX.find((({value:e})=>e===(null==vt?void 0:vt.language))))||void 0===e?void 0:e.label)&&void 0!==t?t:"Language"}),[null==vt?void 0:vt.language]),kt=null==vt?void 0:vt.user,wt=(0,d.useMemo)((()=>it===z.vI.studioDownload),[it]),St=Boolean(null===(Fe=null==_t?void 0:_t.liveAnchorEntrance)||void 0===Fe?void 0:Fe.liveCenter),Ct=Boolean(null===(Be=null==_t?void 0:_t.liveAnchorEntrance)||void 0===Be?void 0:Be.creatorHub),jt=kt?H.HL.PORTRAIT:H.HL.MORE,It=(0,d.useMemo)((()=>(0,H.sw)(it)),[it]),[Tt,Lt]=(0,$.S)(De.GC,{selector:e=>{var t;return null!==(t=e.redDot)&&void 0!==t?t:[]},dependencies:[]});(0,d.useEffect)((()=>{(null==kt?void 0:kt.uid)&&!rt&&nt.getCreateRoomInfo({})}),[nt,null==kt?void 0:kt.uid,rt]),(0,d.useEffect)((()=>{St&&X.Xg.handleLiveCenterShow({anchor_id:null==kt?void 0:kt.uid})}),[St,null==kt?void 0:kt.uid]);const[Ot,Rt]=(0,d.useState)(!1),[Et,Pt]=(0,d.useState)(!1),[At,Dt]=(0,d.useState)("confirmLogout"),{keyboardMenuItem:Ft}=(({setShowKeyboardShortcut:e})=>{const t=(0,d.useCallback)((()=>{e(!0),ie.q.handleEnterKeyboardShortcut(),C.Bv.setItem("hasCloseKeyboardShortcut",!0)}),[e]),i=(0,d.useCallback)((e=>{13===e.keyCode&&t()}),[t]);return{keyboardMenuItem:(0,o.jsx)(Qe.K,{Icon:Je.A,text:"desktop_kb_shortcuts_menu",href:null,onClick:t,onKeyDown:i,e2eTag:"keyboard-shortcut-entrance"})}})({setShowKeyboardShortcut:Rt}),Bt=(0,J.P)(y.i,{selector:e=>e.hasNewFeedbackReply,dependencies:[]}),Mt=(0,d.useCallback)((()=>{if(!(null==kt?void 0:kt.uid)&&(0,x.mR)()){const e=new URLSearchParams(location.search);pt.handleRechargeLoginClick(Object.assign({click_area:m.oD.top_list_feedback,guided_from_app_type:"",request_page:"webapp",enter_from:e.get("enter_from"),enter_source:""},(0,x.h8)()))}ee.S.handleEnterFeedback(Bt?"history":"new")}),[Bt,pt]),Nt=Bt?"/feedback/report":"/feedback",qt=(0,d.useCallback)((e=>{13===e.keyCode&&Mt()}),[Mt]),Ut=(0,k.w)(),Wt=(0,w.U)({pathname:(0,S.fJR)({uniqueId:null!==(Me=null==kt?void 0:kt.uniqueId)&&void 0!==Me?Me:"",secUid:null!==(Ne=null==kt?void 0:kt.secUid)&&void 0!==Ne?Ne:""})}),Ht=(0,d.useCallback)((e=>{te.W.handleClickEntrance(),te.W.handleEnterFavourite("click_my_favourite_entrance"),Ut(e,{href:Wt,state:{isJumpToFavorite:!0},shouldUsePush:!0})}),[Ut,Wt]),zt=(0,d.useCallback)((e=>{13===e.keyCode&&Ht(e)}),[Ht]),Kt=(0,d.useCallback)((()=>{ie.q.handleEnterSet({enter_method:"top_bar"})}),[]),Vt=(0,d.useCallback)((e=>{13===e.keyCode&&Kt()}),[Kt]),Gt=(0,d.useCallback)((()=>{Rt(!1),C.Bv.setItem("hasCloseKeyboardShortcut",!0)}),[]),$t=(0,d.useCallback)((()=>{Pt(!1),null==u||u(),ct.logoutCancel("linkPhoneOrEmailConfirmLogout"===At||"linkPhoneOrEmail"===At?{enter_method:"link_phone_number"}:{})}),[u,At,ct]),[Jt,Qt]=(0,d.useState)(0),[Yt,Zt]=(0,d.useState)(),Xt=(0,d.useCallback)((e=>{Zt(e)}),[]);(0,d.useEffect)((()=>{e?oe.U.handleDarkModeShow():Qt(0)}),[e]);const ei=(0,d.useCallback)((()=>{ne.j.handleLanguageClick({enter_method:"top_bar"}),Qt(1),Xt(Ae.o6)}),[Xt]),ti=(0,d.useCallback)(((e="click")=>{ce.f.sendEvent("click_creator_tools",{enter_method:e}),Qt(2),Xt(Ae.hc)}),[Xt]),ii=(0,d.useCallback)((e=>{var t;13===e.keyCode&&(ei(),null===(t=document.querySelector(`#${Ae.hA}`))||void 0===t||t.focus())}),[ei]),oi=(0,d.useCallback)((e=>{var t;13===e.keyCode&&(ti("keydown"),null===(t=document.querySelector(`#${Ae.hc}`))||void 0===t||t.focus())}),[ti]),ni=(null==_t?void 0:_t.searchVideoForLoggedin)&&[K.$T.searchHome(),K.$T.searchVideo()].includes(it)||[K.$T.messages(),K.$T.upload()].includes(it),ai=(0,l.stringify)(s()((0,l.parse)(ot),"q","t","showLogin","loginType")),ri=ai?`?${ai}`:"",si=`https://www.tiktok.com${K.$T.foryou()}${ri}`,li=(0,d.useCallback)((()=>"undefined"==typeof window?"":`${(0,j.AF)()}${ri}`),[ri]),di=(0,d.useCallback)((()=>{(0,I._S)(T.pF)&&(0,I.sc)(T.pF),(0,I._S)(T.Jq)&&(0,I.sc)(T.Jq);const e="linkPhoneOrEmailConfirmLogout"===At||"linkPhoneOrEmail"===At?{enter_method:"link_phone_number"}:{};ct.clickLogout(e),(0,L.iM)(ni?si:li(),e,ct)}),[si,li,ni,At,ct]),ci=(0,d.useCallback)((({enter_method:e="click",nav_name:t})=>{ce.f.sendEvent("click_nav_back",{enter_method:e,nav_name:t}),Qt(0),Zt(void 0)}),[]),ui=(0,d.useCallback)((({enter_method:e="keydown",nav_name:t})=>i=>{var o;13!==i.keyCode&&32!==i.keyCode||(i.preventDefault(),i.stopPropagation(),ci({enter_method:e,nav_name:t}),null===(o=document.querySelector(`#${Ae.hA}`))||void 0===o||o.focus())}),[ci]),{value:pi,currentThemeOption:vi,setCurrentThemeOption:_i}=(0,d.useContext)(ue.xm),{isInAutoDarkModeControl:hi,isInAutoDarkModeTreatment:mi,isInAutoDarkModeExperiment:gi}=(0,_.WE)(),fi=(0,Q.Nj)(ae.Gs);(0,d.useEffect)((()=>{fi.setIsDarkMode(pi)}),[fi,pi]);const bi=(0,d.useCallback)((e=>{N||(oe.U.handleDarkModeClick(),ht&&p().app.themeChange({isDark:pi}),a.A.set(O.HF,"1",O.Ah),null==_i||_i(e))}),[ht,N]),yi=(0,d.useCallback)((e=>t=>{13===t.keyCode&&bi(e)}),[bi]),xi="ltr"===Ke?"bottomRight":"bottomLeft",ki=(0,Xe.YS)(),wi=(0,d.useCallback)((e=>kt?(0,o.jsx)(Ye.np,{secUid:kt.secUid,uniqueId:kt.uniqueId,shouldStopPropagation:!1,reportTea:!1,teaParams:{to_user_id:kt.uid},style:tt,forceSSR:ki,children:e}):null),[kt]),Si=(0,d.useCallback)((()=>{ie.q.handleEnterProfile({enter_method:"top_bar"})}),[]),Ci=(0,d.useCallback)((e=>{13===e.keyCode&&Si()}),[Si]),ji=(0,d.useCallback)((()=>{re.d.handleClickAnalyticsButton()}),[]),Ii=(0,d.useCallback)((e=>{13===e.keyCode&&ji()}),[ji]),Ti=(0,d.useCallback)((()=>{const e=`${z.vI.studioDownload}?enter_from=profile`;ht&&window.open(e,"_blank"),window.location.href=e}),[ht]),Li=(0,d.useCallback)((e=>{13===e.keyCode&&Ti()}),[Ti]),Oi=(0,d.useCallback)((()=>{-1!==Tt.indexOf(2)&&Lt.updateRedDot({type:2,redirect:`${location.origin}/business-suite`,isElectronApp:ht}),ie.q.handleEnterBusiness()}),[Tt,Lt,ht]),Ri=(0,d.useCallback)((e=>{13===e.keyCode&&Oi()}),[Oi]),[{atomState:Ei}]=(0,ve.I)($e.v),{rechargeEntryPermission:Pi,isWebRechargedBefore:Ai}=Ei,Di=(0,R.qt)(null==vt?void 0:vt.abTestVersion,"expose_recharge_entry_pc"),Fi=Pi&&!It&&(void 0===Di||"v1"===Di),Bi=(0,_.ZO)()&&(null==kt?void 0:kt.suggestAccountBind);(0,d.useEffect)((()=>{Bi&&Dt("linkPhoneOrEmail")}),[Bi]);const[Mi,Ni]=(0,$.S)(H.F0);(0,d.useEffect)((()=>{kt&&Ni.getSubPermissionInfo({sec_anchor_id:null==kt?void 0:kt.secUid,need_current_state:!0})}),[Ni,vt]);const qi=(0,d.useCallback)((()=>{pt.handleLiveWebGetCoinShow({show_page:"setting",is_web_recharged_before:Ai?"yes":"no",request_page:"webapp",style:"icon_and_text"})}),[pt,Ai]);(0,d.useEffect)((()=>{e&&Fi&&qi()}),[e,Fi,qi]);const Ui=(0,d.useCallback)((()=>{pt.handleLiveWebGetCoinClick({show_page:"setting",is_web_recharged_before:Ai?"yes":"no",request_page:"webapp",style:"icon_and_text"})}),[pt,Ai]),Wi=(0,d.useCallback)((()=>{Ui();const e=`${V.I7.coin}?enter_from=web_main_nav`;ht?window.open(e,"_blank"):at.push(e)}),[Ui,ht,at]),Hi=(0,d.useCallback)((e=>{13===e.keyCode&&Wi()}),[Wi]),zi=(0,d.useMemo)((()=>!C.bc.getItem(et)||(null==kt?void 0:kt.hasCollectionsRedDot)),[null==kt?void 0:kt.hasCollectionsRedDot]),Ki=(0,d.useCallback)((()=>{se.I.handleEnterCollectionsPage(),C.bc.setItem(et,!0)}),[]),Vi=(0,d.useCallback)((e=>{13===e.keyCode&&Ki()}),[Ki]),Gi=(0,d.useCallback)((e=>(0,o.jsx)(U,Object.assign({},e))),[]),$i=(0,E.bc)(it,ot),Ji=(0,d.useCallback)((e=>{if(9===e.keyCode){if(!e.target)return;setTimeout((()=>{var e;try{const t=document.querySelector(`#${Ae.hA}`);(null===(e=Array.from(null==t?void 0:t.querySelectorAll("*")))||void 0===e?void 0:e.includes(document.activeElement))||null==u||u()}catch(e){console.error(e)}}),0)}null==r||r(e)}),[u,r]),Qi=null!==(qe=(0,R.qt)(null==vt?void 0:vt.abTestVersion,"webapp_switch_account"))&&void 0!==qe?qe:"v1",Yi="v1"!==(null!==(Ue=(0,R.qt)(null==vt?void 0:vt.abTestVersion,"creator_center_reverse"))&&void 0!==Ue?Ue:"v2")?"/tiktokstudio/analytics/overview?from=dropdown_button":"/analytics",Zi=(0,Q.Nj)(le.$F),Xi=(0,d.useCallback)((()=>{Dt("linkPhoneOrEmail"),Pt(!0),de._.handleLinkPhoneOrEmailPopupShow({enterMethod:"logout"}),null==u||u()}),[Dt,Pt,u]),eo={loginPath:G.tH.linkPhoneOrEmail,isLinkPhoneOrEmail:!0},to=(0,P.K)(eo,void 0,!0),io=(0,d.useCallback)((()=>{try{Pt(!1),null==u||u(),to()}catch(e){}}),[Pt,u,to]),oo=(0,d.useCallback)((()=>{Dt("linkPhoneOrEmailConfirmLogout"),null==u||u(),ct.logoutNotify({enter_method:"link_phone_number"})}),[Dt,ct]),no=(0,d.useCallback)((()=>{Pt(!0),null==u||u(),ct.logoutNotify()}),[Pt,u,ct]),ao=(0,d.useCallback)((()=>{Dt("confirmLogout"),Pt(!0),null==u||u(),ct.logoutNotify()}),[Pt,u,ct]),ro=(0,d.useCallback)((()=>{Dt("switchAccount"),Pt(!0),null==u||u(),Zi.switchAccountClick()}),[u,Zi]),so=Boolean((null==kt?void 0:kt.analyticsOn)&&!(null===(We=kt.proAccountInfo)||void 0===We?void 0:We.businessSuiteEntrance)),lo=(0,o.jsx)(Qe.K,{Icon:he.A,text:"view_analytics",forceSSR:!0,href:Yi,target:ht?"_blank":"_self",e2eTag:"analytics-entrance",onClick:ji,onKeyDown:Ii,style:tt}),co=!!(null==kt?void 0:kt.hasPromoteEntry),uo=(0,d.useCallback)((()=>{ce.f.sendEvent("Promote_entrance_click",{enter_from:"menu_creator_tool"})}),[]);(0,d.useEffect)((()=>{co&&ce.f.sendEvent("Promote_entrance_show",{enter_from:"menu_creator_tool"})}),[co]);const po=(0,o.jsx)(Qe.K,{Icon:Oe.x,text:"Promote_web_entrance_profile",href:"/promote/web/main?enter_from=menu_creator_tool",target:ht?"_blank":"_self",forceSSR:!0,onClick:uo,onKeyDown:()=>{},style:tt}),vo=!wt&&(null===(He=null==_t?void 0:_t.liveAnchorEntrance)||void 0===He?void 0:He.liveStudio)&&!dt,_o=(0,o.jsx)(Qe.K,{Icon:me.A,text:"ls_live_studio",forceSSR:!0,href:null,e2eTag:"live-studio-entrance",onClick:Ti,onKeyDown:Li}),ho=St&&!ht,mo=(0,o.jsx)(Qe.K,{Icon:ge.A,text:"live_center_title",href:`${H.Ox}?enter_from=${H.HL.PROFILE_HOVER}&lang=${null==vt?void 0:vt.language}`,target:ht?"_blank":void 0,forceSSR:!0,e2eTag:"live-center",style:tt}),go=Ct&&!ht,fo=(0,o.jsx)(Qe.K,{Icon:fe.A,text:"live_creator_hub_name",href:`${H.x2}?enter_from=${jt}&lang=${null==vt?void 0:vt.language}®ion=${null==vt?void 0:vt.region}`,target:ht?"_blank":void 0,forceSSR:!0,e2eTag:"live-creator-hub",style:tt}),bo=go||ho||vo||so||co,yo=(0,d.useCallback)((()=>(0,o.jsx)("svg",{style:{width:"16px",height:"20px"}})),[]),xo=(0,d.useCallback)((()=>(0,o.jsxs)(Ye.Dp,{"data-e2e":i,id:Ae.hA,role:"listbox",children:[(0,o.jsx)(Qe.K,{Icon:"ltr"===Ke?Re.p:Ee.a,text:"pc_web_dark_mode",href:null,forceSSR:!0,onClick:()=>Qt(0),onKeyDown:()=>Qt(0)}),It||st||hi?null:(0,o.jsx)(Qe.K,{withBorder:!0,Icon:"auto"===vi?Pe.T:yo,text:"web_dark_mode_automatic",href:null,forceSSR:!0,onClick:()=>bi("auto"),onKeyDown:()=>bi("auto")}),It||!st&&!gi||mi?null:(0,o.jsx)(Qe.K,{withBorder:!0,Icon:"system"===vi?Pe.T:yo,text:"pc_web_device_theme",href:null,forceSSR:!0,onClick:()=>bi("system"),onKeyDown:()=>bi("system")}),(0,o.jsx)(Qe.K,{Icon:"dark"===vi?Pe.T:yo,text:"pc_web_dark_mode",href:null,forceSSR:!0,onClick:()=>bi("dark"),onKeyDown:yi("dark")}),(0,o.jsx)(Qe.K,{Icon:"light"===vi?Pe.T:yo,text:"pc_web_light_mode",href:null,forceSSR:!0,onClick:()=>bi("light"),onKeyDown:yi("light")})]})),[It,pi,vi,Ke,bi]),{colors:ko}=(0,n.u)();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(D.z,{backgroundColor:ko.BGSecondary,placement:xi,active:e,arrowMargin:15,margin:t,id:Ae.hA,onKeyDown:Ji,ariaLabelledBy:Yt,children:(()=>{var e;switch(Jt){case 0:return(0,o.jsxs)(Ye.Dp,{"data-e2e":i,id:Ae.hA,role:"listbox",children:[kt&&(0,o.jsx)(Qe.K,{renderLink:wi,onClick:Si,onKeyDown:Ci,Icon:be.A,text:"View profile",forceSSR:ki,href:null,e2eTag:"profile-info"}),kt&&!lt&&(0,o.jsx)(Qe.K,{onClick:Ht,onKeyDown:zt,Icon:ye.A,text:"sortbyvv_profile_tab_text_favorites",href:null,forceSSR:ki}),Fi&&!ht&&(0,o.jsx)(Qe.K,{Icon:xe.A,text:"WebApp_coin_recharge_1",href:"/coin?enter_from=web_main_nav",target:ht?"_blank":void 0,forceSSR:!0,e2eTag:"recharge-entrance",onClick:Wi,onKeyDown:Hi,style:tt}),lt&&bo&&(0,o.jsx)(Qe.K,{Icon:ge.A,text:"pcWeb_navi_creatorTools",href:null,onClick:()=>ti("click"),onKeyDown:oi,forceSSR:ki,e2eTag:"creator-tools"}),Boolean(null==kt?void 0:kt.hasCollectionsAccess)&&(0,o.jsx)(Qe.K,{Icon:Gi,text:"tiktok_series_webapp_option",href:"/series",target:ht?"_blank":void 0,forceSSR:!0,e2eTag:"tiktok-series-entrance",hasNew:zi,onClick:Ki,onKeyDown:Vi,style:tt}),!lt&&so&&lo,!lt&&co&&po,(!lt&&vo||dt)&&_o,(null===(e=null==kt?void 0:kt.proAccountInfo)||void 0===e?void 0:e.businessSuiteEntrance)&&"personal_account"!==ut&&(0,o.jsx)(Qe.K,{Icon:ke.A,text:"web_business_suite_entry",href:-1!==Tt.indexOf(2)?"":"/business-suite",target:ht?"_blank":void 0,forceSSR:!0,hasNew:-1!==Tt.indexOf(2),onClick:Oi,onKeyDown:Ri,e2eTag:"business-entrance",style:tt}),!lt&&ho&&mo,!lt&&go&&fo,kt&&(0,o.jsx)(Qe.K,{Icon:we.A,text:ht?"desktop_app_accountSettings":"settings",href:"/setting",onClick:Kt,onKeyDown:Vt,forceSSR:!0,e2eTag:"settings-entrance",style:tt}),(0,o.jsx)(Qe.K,{Icon:Se.A,text:xt,href:null,onClick:ei,onKeyDown:ii,e2eTag:"language-select",ariaLabel:Ve("accessibilityLabels_settings_language",{language:xt}),forceSSR:ki}),(0,o.jsx)(Qe.K,{Icon:Ce.A,text:"Feedback and help",href:Nt,onClick:Mt,onKeyDown:qt,hasNew:Bt,forceSSR:!0,e2eTag:"feedback-entrance",style:tt}),!lt&&Ft,$i?(0,o.jsx)(Qe.K,{Icon:je.A,text:"pc_web_dark_mode",href:null,onClick:()=>Qt(3),onKeyDown:()=>Qt(3),ariaLabel:Ve("accessibilityLabels_settings_darkModeOn"),forceSSR:ki}):null,gt&&(0,o.jsx)(Qe.K,{onClick:bt,onKeyDown:yt,Icon:Ie.A,text:"get_app",href:null,forceSSR:!0}),kt&&("v1"!==Qi&&(null==kt?void 0:kt.hasIMPermission)&&!kt.ftcUser?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Qe.K,{withBorder:!0,hasNewLabel:!0,Icon:Te.A,text:"Web_loginDropdown_switchAccount",href:null,forceSSR:!0,onClick:ro,e2eTag:"switch-account-entrance"}),(0,o.jsx)(Qe.K,{Icon:_e.A,text:"log_out",href:null,forceSSR:!0,onClick:ao,e2eTag:"logout-entrance"})]}):(0,o.jsx)(Qe.K,{withBorder:!0,Icon:_e.A,text:"log_out",href:null,forceSSR:!0,onClick:Bi?Xi:no,e2eTag:"logout-entrance"}))]});case 1:return(0,o.jsx)(Ge,{onBack:()=>ci({nav_name:"language_selector"}),onKeyDown:ui({nav_name:"language_selector"}),onBlur:u});case 2:return(0,o.jsxs)(Ye.Dp,{"data-e2e":i,id:Ae.hc,role:"listbox",children:[(0,o.jsxs)(Ye.Nq,{children:[(0,o.jsx)("i",{onClick:()=>ci({nav_name:"creator_tools"}),tabIndex:0,onKeyDown:ui({nav_name:"creator_tools"}),"aria-label":Ve("accessibilityLabels_forYou_nav_language_back_btn"),role:"button",children:(0,o.jsx)(Ye.Ul,{})}),(0,o.jsx)(Ye.T8,{id:Ae.hc,children:Ve("pcWeb_navi_creatorTools")})]}),so&&lo,co&&po,vo&&_o,ho&&mo,go&&fo]});case 3:return xo();default:return null}})()}),(0,o.jsx)(F.aF,{visible:Ot,onClose:Gt,maskCloseable:!1,cancelMouseLeaveBubble:!0,children:(0,o.jsx)(B.S,{onClose:Gt,isModal:!0})}),"v1"!==Qi&&(null===(ze=null==vt?void 0:vt.user)||void 0===ze?void 0:ze.hasIMPermission)&&!vt.user.ftcUser?(0,o.jsx)(M,{shouldShowLogoutConfirm:Et,setShouldShowConfirmLogout:Pt,modalTypeToOpen:At,logoutTeaReport:ct}):(0,o.jsx)(F.aF,{visible:Et,onClose:$t,maskCloseable:!0,cancelMouseLeaveBubble:!0,children:"linkPhoneOrEmail"===At?(0,o.jsxs)(A.h0,{children:[(0,o.jsx)(Le.F,{size:40}),(0,o.jsx)(A.nm,{children:Ve("login_fb_noLonger_LogInEase")}),(0,o.jsx)(A.aX,{children:Ve("login_fb_noLonger_LinkPhoneNumberReminder")}),(0,o.jsx)(A.iZ,{size:"small",onClick:io,children:Ve("login_fb_noLonger_LinkPhone")}),(0,o.jsx)(A.iZ,{size:"small",onClick:oo,children:(0,o.jsxs)("span",{style:{color:"rgba(255, 76, 58, 1)"},children:[" ",Ve("log_out")," "]})})]}):(0,o.jsxs)(A.RA,{children:[(0,o.jsx)(A.C6,{children:Ve("Log_out_sheet_2")}),"linkPhoneOrEmailConfirmLogout"===At&&(0,o.jsx)(A.rI,{children:Ve("login_fb_confirmLogOut_body")}),(0,o.jsxs)(A.rs,{children:[(0,o.jsx)(A.AR,{size:"small",onClick:$t,children:Ve("linkPhoneOrEmailConfirmLogout"===At?"login_fb_confirmLogOut_stay_cta":"Cancel")}),(0,o.jsx)(A.AR,{size:"small",buttonTheme:"line",onClick:di,children:Ve("log_out")})]})]})})]})}))},31476:(e,t,i)=>{"use strict";i.d(t,{K:()=>l});var o,n=i(24643),a=i(40099),r=i(25616),s=i(33399);!function(e){e[e.Main=0]="Main",e[e.Language=1]="Language",e[e.CreatorTools=2]="CreatorTools",e[e.DarkMode=3]="DarkMode"}(o||(o={}));const l=function({Icon:e,text:t,href:i,target:o,renderLink:l,withBorder:d,hasNew:c,hasNewLabel:u,forceSSR:p=!1,e2eTag:v,onClick:_,onKeyDown:h,nativeFocusable:m=Boolean(l)||Boolean(i),isNativeComposite:g=!1,ariaLabel:f,children:b,containerStyle:y,style:x}){const k=(0,r.s)(),w=(0,s.jD)(),S=(0,n.jsxs)(n.Fragment,{children:[e?(0,n.jsx)(e,{className:w}):null,(0,n.jsx)("span",{children:k(t)}),c&&(0,n.jsx)(s.Ff,{}),u&&(0,n.jsx)(s.FV,{children:k("Inbox_New")})]}),C=(0,a.useCallback)((e=>{32===e.keyCode&&!g&&e.preventDefault(),null==h||h(e)}),[h]);return(0,n.jsxs)(s.QB,{withBorder:d,"data-e2e":v,onClick:_,onKeyDown:C,style:y,tabIndex:m?void 0:0,needPadding:!m||g,role:"option","aria-label":f,children:[l?l(S):i?(0,n.jsx)(s.$7,{forceSSR:p,to:null!=i?i:"#",target:null!=o?o:"_self",onKeyDown:C,style:x,children:S}):(0,n.jsx)(s.rG,{style:x,children:S}),b]})}},33399:(e,t,i)=>{"use strict";i.d(t,{$7:()=>_,Dp:()=>c,FV:()=>d,Ff:()=>g,Nq:()=>y,QB:()=>u,T8:()=>x,Ul:()=>b,jD:()=>f,np:()=>h,rG:()=>m});var o=i(66283),n=i(62186),a=i(12527),r=i(67963),s=i(85041),l=i(72153);const d=(0,n.default)("div",{target:"e1q4ouk00"})((({theme:e,theme:{direction:t,colors:i},isShowAll:o,isControlByBtn:n})=>[(0,l.zy)({theme:e,color:"ConstTextInverse"}),{height:"20px",padding:"0 8px",borderRadius:"10px",backgroundColor:i.Primary,fontSize:"13px",lineHeight:"20px",fontWeight:600},(0,l.mp)({direction:t,marginStart:"6px"}),!n&&(0,l.jJ)({max:1071,style:[{display:"none"},(0,l.mp)({direction:t,marginStart:"0"})]}),n&&!1===o&&{display:"none"}]),"label:DivNewLabelContainer;"),c=(0,n.default)("ul",{target:"e1q4ouk01"})((({theme:e})=>(0,l.zy)({theme:e,typography:"P2",fontWeight:"semiBold",fontFamily:"TikTokFont"})),{padding:"8px 0",margin:0,minWidth:"223px",listStyle:"none"},"label:UlPopupContainer;"),u=(0,n.default)("li",{target:"e1q4ouk02"})((({theme:{colors:e},withBorder:t,needPadding:i})=>[{color:e.TextPrimary,padding:i?"10px 8px 10px 16px":0,":hover":{background:e.BGView},display:"flex",justifyContent:"space-between"},t?{borderTop:`1px solid ${e.LineSecondary}`}:null]),"label:LiItemWrapper;"),p={display:"flex",whiteSpace:"nowrap",flexDirection:"row",width:"100%",alignItems:"center",":hover":{textDecoration:"none"}},v=e=>Object.assign(Object.assign({},p),{gap:"8px",color:e.colors.TextPrimary,":hover, :active, :link, :visited":{textDecoration:"none",color:e.colors.TextPrimary}}),_=(0,n.default)(r.N_,{target:"e1q4ouk03"})((({theme:e})=>v(e)),"label:StyledLinkItem;"),h=(0,n.default)(s.E,{target:"e1q4ouk04"})((({theme:e})=>v(e)),"label:StyledUserLink;"),m=(0,n.default)("div",{target:"e1q4ouk05"})((({theme:e})=>v(e)),"label:DivSettingItem;"),g=(0,n.default)("i",{target:"e1q4ouk06"})((({theme:{colors:e}})=>[{width:"8px",height:"8px",borderRadius:"50%",background:e.Primary}]),"label:INewIcon;");function f(){return(0,o.AH)([{width:"20px",height:"20px",flex:"0 0 20px"}])}g.defaultProps=Object.assign(Object.assign({},g.defaultProps),{"data-e2e":"red-dot"});const b=(0,n.default)(a.A,{target:"e1q4ouk08"})((({theme:{direction:e}})=>["ltr"===e?{marginLeft:"16px"}:{transform:"rotate(180deg)",marginRight:"8px"}]),{width:"20px",height:"20px"},"label:StyledBackIcon;"),y=(0,n.default)("div",{target:"e1q4ouk09"})({display:"flex",position:"relative",height:"50px",borderBottom:"1px solid #E3E3E4",paddingTop:"13px"},"label:DivHeader;"),x=(0,n.default)("p",{target:"e1q4ouk010"})((({theme:e})=>[(0,l.zy)({theme:e,typography:"P2",fontWeight:"semiBold"}),(0,l.mp)({direction:e.direction,marginStart:"8px"})]),"label:PTitle;")},12628:(e,t,i)=>{"use strict";i.d(t,{p2:()=>Y,Ox:()=>o,x2:()=>n,sl:()=>a,zp:()=>r,o1:()=>s,HL:()=>l,C6:()=>Je,bG:()=>fe,Ku:()=>_,rd:()=>Pe,QI:()=>Ke,$O:()=>Ve,F0:()=>Xe,sw:()=>h.sw,Py:()=>m,AU:()=>Z,mU:()=>b.mU,FU:()=>f.FU,oQ:()=>X.o,JY:()=>g.J}),i(63705);const o="https://livecenter.tiktok.com",n="https://www.tiktok.com/live/creators",a="https://shop.tiktok.com/streamer/live/product/dashboard",r={us:"en",uk:"en-GB",id:"id-ID",sg:"ms-MY",vn:"vi-VN",my:"ms-MY",ph:"fil-PH",th:"th-TH"},s="https://business.tiktokshop.com",l={PROFILE_HOVER:"profile_hover",PORTRAIT:"portrait",MORE:"more",END_LIVE:"end_view_analytics"};var d=i(58632),c=i(7672),u=i(58305),p=i(45297);const v=6048e5;let _=class{constructor(){this.getGoLiveStreamKeyInfo=(e,t)=>{const i=(0,u._S)("__tiktok_stream_key");if(i){const{streamKey:e,expiration:o,roomId:n}=JSON.parse(i);if(o-Date.now()>1e3&&t===n)return{streamKey:e,expiration:o-Date.now(),roomId:n}}return{streamKey:e,roomId:t,expiration:v}},this.setGoLiveStreamKeyInfo=(e,t)=>{const i={streamKey:e,roomId:t,expiration:Date.now()+v};return(0,u.AP)("__tiktok_stream_key",JSON.stringify(i))},this.getGoLiveTopicId=e=>(0,u._S)("goLive_topic_id"+e),this.setGoLiveTopicId=(e,t)=>(0,u.AP)("goLive_topic_id"+t,e),this.getGoLiveGameTagId=e=>(0,u._S)("goLive_game_tag_id"+e),this.setGoLiveGameTagId=(e,t)=>(0,u.AP)("goLive_game_tag_id"+t,e),this.getGoLiveTopicShow=e=>!!e&&"0"===(0,u._S)(`__tiktok_topic_info${e}`,"0"),this.setGoLiveTopicShow=e=>(0,u.AP)(`__tiktok_topic_info${e}`,"1"),this.setGoLiveEndStreamSetting=e=>(0,u.AP)("go_live_stream_setting",e?"1":"0"),this.getGoLiveEndStreamSetting=()=>"1"===(0,u._S)("go_live_stream_setting","0"),this.setHideGoLiveMatureThemesRedDot=()=>(0,u.AP)("hide_go_live_mature_themes_red_dot","1"),this.getHideGoLiveMatureThemesRedDot=()=>"1"===(0,u._S)("hide_go_live_mature_themes_red_dot","0"),this.getLiveRoomPreviousPage=()=>{try{const{twoPrev:e}=JSON.parse((0,u.Hd)(p.xl));return!(0,u.Hd)(p.iJ)&&e}catch(e){return!1}}}setHasAppliedPermission(e){return(0,u.AP)(`go_live_permission_apply${e}`,"1")}getHasApplyPermissionBefore(e){return"1"===(0,u._S)(`go_live_permission_apply${e}`,"0")}getHasCompleteSubscriptionGuide(){return"1"===(0,u._S)("live_anchor_complete_subscription_guide","0")}setHasCompleteSubscriptionGuide(){return(0,u.AP)("live_anchor_complete_subscription_guide","1")}getSubscriptionSubOnlyChat(){return"1"===(0,u._S)("live_subscription_sub_only_chat","0")}setSubscriptionSubOnlyChat(e){return(0,u.AP)("live_subscription_sub_only_chat",e?"1":"0")}get studioDownloadVisited(){return"1"===(0,u._S)("studio_download_visited","0")}setStudioDownloadVisited(){return(0,u.AP)("studio_download_visited","1")}getSharePlatform(e){const t=(0,u._S)("webapp-share-platform");return t?JSON.parse(t)[e]:{}}setSharePlatform(e,t){return(0,u.AP)("webapp-share-platform",JSON.stringify({[e]:t}))}sortSharePlatform(e,t){var i,o;const n=null!==(i=this.getSharePlatform(e))&&void 0!==i?i:{},a=null!==(o=n[t])&&void 0!==o?o:0;if(n[t]=a+1,a===Number.MAX_SAFE_INTEGER){const e=Object.keys(n).sort(((e,t)=>{var i,o;return(null!==(i=n[e])&&void 0!==i?i:0)-(null!==(o=n[t])&&void 0!==o?o:0)}));e.forEach(((e,t)=>{n[e]=t}))}this.setSharePlatform(e,n)}getLiveCreatorHubPopup(){return"0"===(0,u._S)("webapp-live-creator-hub-popup","0")}setLiveCreatorHubPopup(e){return(0,u.AP)("webapp-live-creator-hub-popup",e?"1":"0")}};_=(0,d.__decorate)([(0,c._)()],_);var h=i(36523);const m=e=>parseInt((e/86400).toString());var g=i(91955),f=i(44672),b=i(99027),y=i(13392),x=i(4126),k=i(64162),w=i(93995),S=i(72916),C=i(95719),j=i(8536),I=i(46657),T=i(23999),L=i(74690),O=i(80339),R=i(20259),E=i(24451),P=i(62564),A=i(26324),D=i(22248),F=i(64407),B=i(11983),M=i(11917),N=i.n(M);const q="REPORT_FIRST_FRAME_SUCCESS_FOR_OPEN_LIVE_FLAG";function U(){(0,u.AP)(q,"1")}function W(){(0,u.sc)(q)}var H=i(11654);let z=class{constructor(e){this.service=e,this.defaultTag={where:"GoLive"},this.defaultMetrics={count:1},this.handlePlayerError=(e,t)=>{this.service.emitEvent("live_sdk_go_live_player_error",this.defaultMetrics,Object.assign(Object.assign({},this.defaultTag),{roomId:String(t),code:String(e.status),message:e.message}))},this.handleTraceSuccess=()=>{this.service.emitEvent("live_sdk_go_live_trace_success",this.defaultMetrics,this.defaultTag)},this.handleTraceError=({errorCode:e,errorMessage:t})=>{this.service.emitEvent("live_sdk_go_live_trace_fail",this.defaultMetrics,Object.assign(Object.assign({},this.defaultTag),{errorCode:e,errorMessage:t}))},this.handleCreateRoomSuccess=()=>{this.service.emitEvent("live_sdk_openLive_success",this.defaultMetrics,this.defaultTag)},this.handleCreateRoomFirstFrameSuccess=()=>{"1"===(0,u._S)(q)&&(this.service.emitEvent("live_sdk_openLive_preview_first_frame_success",this.defaultMetrics,this.defaultTag),W())},this.reportGoLiveError=e=>{this.service.sendLog(null==e?void 0:e.message,"error")},this.handleCreateRoomFail=({errorCode:e,errorMessage:t})=>{this.service.sendLog(null!=t?t:"","error"),this.service.emitEvent("live_sdk_openLive_error",this.defaultMetrics,Object.assign(Object.assign({},this.defaultTag),{errorCode:e,errorMessage:t}))},this.handleCreateRoomWarning=({errorCode:e,errorMessage:t})=>{this.service.emitEvent("live_sdk_openLive_warning",this.defaultMetrics,Object.assign(Object.assign({},this.defaultTag),{errorCode:e,errorMessage:t}))},this.handleGoLiveStreamkeyError=()=>{this.service.emitEvent("live_sdk_openLive_streamkey_error",this.defaultMetrics,this.defaultTag)},this.handleGoLiveStreamurlError=()=>{this.service.emitEvent("live_sdk_openLive_serverUrl_error",this.defaultMetrics,this.defaultTag)},this.handleGetCreateRoomInfoSuccess=()=>{this.service.emitEvent("live_sdk_create_room_info_success",this.defaultMetrics,this.defaultTag)},this.handleGetCreateRoomInfoFail=({errorCode:e,errorMessage:t})=>{this.service.emitEvent("live_sdk_craete_room_info_fail",this.defaultMetrics,Object.assign(Object.assign({},this.defaultTag),{errorCode:e,errorMessage:t}))},this.handleEndLiveSuccess=()=>{this.service.emitEvent("live_sdk_end_live_success",this.defaultMetrics,this.defaultTag)},this.handleEndLiveFail=()=>{this.service.emitEvent("live_sdk_end_live_fail",this.defaultMetrics,this.defaultTag)},this.handleLoadingTooLong=({errorCode:e,errorMessage:t})=>{this.service.emitEvent("live_sdk_go_live_page_loading_too_long",this.defaultMetrics,Object.assign(Object.assign({},this.defaultTag),{errorCode:e,errorMessage:t}))},this.handleEndLiveDataFail=({errorCode:e,errorMessage:t})=>{this.service.emitEvent("live_sdk_end_live_data_fail",this.defaultMetrics,Object.assign(Object.assign({},this.defaultTag),{errorCode:e,errorMessage:t}))},this.handleEndLiveDataSuccess=()=>{this.service.emitEvent("live_sdk_end_live_data_success",this.defaultMetrics,this.defaultTag)}}};z=(0,d.__decorate)([(0,c._)(),(0,d.__metadata)("design:paramtypes",[H.V$])],z);var K=i(16109),V=i(19824),G=i(26325),$=i(55099);function J(e){return(0,j.Z)((t=>{var i,o;return 0!==t.status_code&&(null===(i=t.data)||void 0===i?void 0:i.prompts)?((!e||e&&t.status_code&&(null==e?void 0:e(t.status_code)))&&B.F.open({content:null===(o=t.data)||void 0===o?void 0:o.prompts,duration:3}),(0,T.of)(Object.assign(Object.assign({},t),{error:t}))):(0,T.of)(t)}))}let Q=class{constructor(e){this.fetch=e,this.getCreateInfo=()=>this.fetch.get("/webcast/room/create_info/",{query:{aid:p.xE},baseUrlType:5}),this.updateScreenshotStatus=e=>this.fetch.post("/webcast/room/screenshot_cover/update/",{query:e,baseUrlType:5,headers:{"Content-Type":G.Ty.FORM_ENCODE}}),this.createRoom=e=>this.fetch.post("/webcast/room/create/",{query:e,baseUrlType:5,headers:{"Content-Type":G.Ty.FORM_ENCODE}}).pipe(J((e=>[4003035,20063].includes(e)))),this.endLive=()=>this.fetch.post("/webcast/room/finish_abnormal/",{baseUrlType:5}),this.setTopicTag=e=>this.fetch.post("/webcast/room/hashtag/set/",{query:e,baseUrlType:4,headers:{"Content-Type":G.Ty.FORM_ENCODE}}),this.uploadImage=e=>{const t=new FormData;return t.append("image",e),this.fetch.post("/webcast/room/upload/image/",{body:t,omitContentType:!0,baseUrlType:5})},this.getEndLiveInfo=e=>this.fetch.get("/webcast/data/data_center/room_stats/",{query:e,baseUrlType:5}),this.getLastBanRecord=e=>this.fetch.get("/webcast/review/get_latest_ban_record/",{query:Object.assign(Object.assign({},e),{ban_type:2}),baseUrlType:5})}};Q=(0,d.__decorate)([(0,c._)(),(0,d.__metadata)("design:paramtypes",[$.p])],Q);let Y=class extends k.E{constructor(e,t,i,o,n){super(),this.service=e,this.roomModule=t,this.streamModule=i,this.slardar=o,this.storage=n,this.defaultState={liveStatus:0,roomCreateInfo:null,showSuicidePrevention:!1,showAppealModal:!1,roomStats:null,isTempPermission:!1,streamKey:"",streamKeyExpiration:v,loadingState:{createRoomInfo:0,roomCreateInfo:0,OBSAccessRecallInfo:0}}}setLiveStatus(e,t){e.liveStatus=t}setIsTempPermission(e,t){e.isTempPermission=t}setRoomCreateInfo(e,t){e.roomCreateInfo=t}setRoomStatsData(e,t){e.roomStats=t}setLoadingState(e,t){e.loadingState=Object.assign(Object.assign({},e.loadingState),t)}setSuicidePrevention(e,t){e.showSuicidePrevention=t}setStreamKey(e,t){e.streamKey=t.streamKey,e.streamKeyExpiration=t.expiration}setAppealVisible(e,t){e.showAppealModal=t}getCreateRoomInfo(e){return e.pipe((0,S.n)((e=>{const{shouldGetRoomInfo:t}=e;return this.service.getCreateInfo().pipe((0,C.M)((({status_code:e})=>{(0,D.G)(e,[0])})),(0,j.Z)((({data:e,status_code:i})=>{if(0!==i)return this.slardar.handleGetCreateRoomInfoFail({errorCode:i.toString(),errorMessage:""}),this.slardar.handleTraceError({errorCode:"1002",errorMessage:`status_code: ${i}`}),I.w;const{live_status:o,ban_status:n}=e,a=!(null==n?void 0:n.is_ban),r=[2,1,3].includes(o);var s;return a&&t&&(s=o,N()(s)&&(1===s?U():W())),a&&r&&t?(0,T.of)():(0,T.of)(this.getActions().setRoomCreateInfo(e),this.getActions().setLiveStatus(o))})),(0,L.Z)(this.getActions().setLoadingState({roomCreateInfo:1})),(0,O.q)(this.getActions().setLoadingState({roomCreateInfo:2})),(0,R.W)((e=>(this.slardar.reportGoLiveError(e),this.slardar.handleTraceError({errorCode:"1002",errorMessage:e.message}),this.slardar.handleGetCreateRoomInfoFail({errorCode:"-1",errorMessage:e.message}),(0,T.of)(this.getActions().setLoadingState({roomCreateInfo:3}))))))})))}createRoomInfo(e){return e.pipe((0,E.E)(this.roomModule.state$),(0,j.Z)((([e])=>this.service.createRoom(e).pipe((0,j.Z)((({data:t,status_code:i})=>{var o;if(i&&0!==i)switch(i){case 2403:return this.slardar.handleCreateRoomWarning({errorCode:i.toString(),errorMessage:""}),(0,T.of)(this.getActions().setSuicidePrevention(!0),this.getActions().setLoadingState({createRoomInfo:3}));case 10018:case 4003035:return this.slardar.handleCreateRoomWarning({errorCode:i.toString(),errorMessage:""}),(0,T.of)(this.getActions().setLiveStatus(-1),this.getActions().setLoadingState({createRoomInfo:3}));case 50004:case 20063:case 30009:return this.slardar.handleCreateRoomWarning({errorCode:i.toString(),errorMessage:""}),(0,T.of)(this.getActions().setLoadingState({createRoomInfo:3}));case 4003105:return t.prompts&&B.F.open({content:t.prompts,duration:3}),this.slardar.handleCreateRoomWarning({errorCode:i.toString(),errorMessage:""}),(0,T.of)(this.getActions().setLoadingState({createRoomInfo:3}));default:throw new Error(`status_code: ${i}`)}return this.slardar.handleCreateRoomSuccess(),U(),this.slardar.handleTraceSuccess(),F.Xg.handleLiveStreamReport({anchor_id:null===(o=t.owner)||void 0===o?void 0:o.id_str,room_id:t.id_str,live_type:(null==t?void 0:t.live_type_third_party)?"third_party":"video_live",game_label:"",game_label_id:"",choose_hashtag_id:e.hashtag_id,choose_hashtag_name:"",cover_type:1===e.screenshot_cover_status?"screen_shot":"user_upload"}),(0,T.of)(...this.setRoomInfo(t),this.getActions().setLiveStatus(1),this.getActions().setLoadingState({createRoomInfo:2}))})),(0,L.Z)(this.getActions().setLoadingState({createRoomInfo:1})),(0,R.W)((e=>(this.slardar.handleTraceError({errorCode:"1003",errorMessage:e.message}),this.slardar.handleCreateRoomFail({errorCode:"-1",errorMessage:e.message}),(0,T.of)(this.getActions().setLoadingState({createRoomInfo:3})))))))))}setRoomInfo(e){var t,i;const o=[],[,n]=(0,h.mE)((0,h.aA)(e));if(n&&e.id_str){let t=n;const{streamKey:i,expiration:a}=this.storage.getGoLiveStreamKeyInfo(t,e.id_str);t!==i?t=i:this.storage.setGoLiveStreamKeyInfo(t,e.id_str),o.push(this.getActions().setStreamKey({streamKey:t,expiration:a}))}return o.push(this.roomModule.getActions().setRoomInfo(e)),o.push(this.streamModule.getActions().updateRoomStream({pullData:null===(i=null===(t=e.stream_url)||void 0===t?void 0:t.live_core_sdk_data)||void 0===i?void 0:i.pull_data,streamId:e.id_str})),o}endLive(e){return e.pipe((0,j.Z)((()=>this.service.endLive().pipe((0,j.Z)((()=>(this.slardar.handleEndLiveSuccess(),(0,T.of)(this.getActions().setLiveStatus(4),this.streamModule.getActions().setStreamInfo([]))))),(0,R.W)((e=>(this.slardar.handleEndLiveFail(),this.slardar.reportGoLiveError(e),I.w)))))))}setTopicTag(e){return e.pipe((0,S.n)((e=>this.service.setTopicTag(e).pipe((0,P.T)((()=>this.noop())),(0,R.W)((e=>(this.slardar.reportGoLiveError(e),I.w)))))))}getRoomStatsData(e){return e.pipe((0,j.Z)((e=>this.service.getEndLiveInfo({room_id:e}).pipe((0,C.M)((({status_code:e})=>{(0,D.G)(e,[0])})),(0,j.Z)((({data:e})=>(0,T.of)(this.getActions().setRoomStatsData(e.room_stats)))),(0,R.W)((e=>(this.slardar.reportGoLiveError(e),I.w)))))))}};function Z(){const{liveStatus:e}=(0,y.Ph)(Y);return(0,h.Jf)(e)}(0,d.__decorate)([(0,x.h5)(),(0,d.__metadata)("design:type",Function),(0,d.__metadata)("design:paramtypes",[Object,Number]),(0,d.__metadata)("design:returntype",void 0)],Y.prototype,"setLiveStatus",null),(0,d.__decorate)([(0,x.h5)(),(0,d.__metadata)("design:type",Function),(0,d.__metadata)("design:paramtypes",[Object,Boolean]),(0,d.__metadata)("design:returntype",void 0)],Y.prototype,"setIsTempPermission",null),(0,d.__decorate)([(0,x.h5)(),(0,d.__metadata)("design:type",Function),(0,d.__metadata)("design:paramtypes",[Object,Object]),(0,d.__metadata)("design:returntype",void 0)],Y.prototype,"setRoomCreateInfo",null),(0,d.__decorate)([(0,x.h5)(),(0,d.__metadata)("design:type",Function),(0,d.__metadata)("design:paramtypes",[Object,Object]),(0,d.__metadata)("design:returntype",void 0)],Y.prototype,"setRoomStatsData",null),(0,d.__decorate)([(0,x.h5)(),(0,d.__metadata)("design:type",Function),(0,d.__metadata)("design:paramtypes",[Object,Object]),(0,d.__metadata)("design:returntype",void 0)],Y.prototype,"setLoadingState",null),(0,d.__decorate)([(0,x.h5)(),(0,d.__metadata)("design:type",Function),(0,d.__metadata)("design:paramtypes",[Object,Boolean]),(0,d.__metadata)("design:returntype",void 0)],Y.prototype,"setSuicidePrevention",null),(0,d.__decorate)([(0,x.h5)(),(0,d.__metadata)("design:type",Function),(0,d.__metadata)("design:paramtypes",[Object,Object]),(0,d.__metadata)("design:returntype",void 0)],Y.prototype,"setStreamKey",null),(0,d.__decorate)([(0,x.h5)(),(0,d.__metadata)("design:type",Function),(0,d.__metadata)("design:paramtypes",[Object,Boolean]),(0,d.__metadata)("design:returntype",void 0)],Y.prototype,"setAppealVisible",null),(0,d.__decorate)([(0,x.Mj)(),(0,d.__metadata)("design:type",Function),(0,d.__metadata)("design:paramtypes",[A.c]),(0,d.__metadata)("design:returntype",void 0)],Y.prototype,"getCreateRoomInfo",null),(0,d.__decorate)([(0,x.Mj)(),(0,d.__metadata)("design:type",Function),(0,d.__metadata)("design:paramtypes",[A.c]),(0,d.__metadata)("design:returntype",void 0)],Y.prototype,"createRoomInfo",null),(0,d.__decorate)([(0,x.Mj)(),(0,d.__metadata)("design:type",Function),(0,d.__metadata)("design:paramtypes",[A.c]),(0,d.__metadata)("design:returntype",void 0)],Y.prototype,"endLive",null),(0,d.__decorate)([(0,x.Mj)(),(0,d.__metadata)("design:type",Function),(0,d.__metadata)("design:paramtypes",[A.c]),(0,d.__metadata)("design:returntype",void 0)],Y.prototype,"setTopicTag",null),(0,d.__decorate)([(0,x.Mj)(),(0,d.__metadata)("design:type",Function),(0,d.__metadata)("design:paramtypes",[A.c]),(0,d.__metadata)("design:returntype",void 0)],Y.prototype,"getRoomStatsData",null),Y=(0,d.__decorate)([(0,w.n)("GoLive"),(0,d.__metadata)("design:paramtypes",[Q,K.Q,V.T,z,_])],Y);var X=i(46794),ee=i(24643),te=i(40099),ie=i(62186),oe=i(72153);i(52845);const ne=(0,ie.default)("div",{target:"e1jtqgen1"})((({theme:e})=>[{position:"absolute",top:"50%",transform:`translateY(-50%) rotateY(${"rtl"===e.direction?180:0}deg)`,transformOrigin:"center center",width:"14px",height:"78px",zIndex:2,cursor:"pointer",borderTopRightRadius:13,borderBottomRightRadius:13,backgroundColor:e.colors.BGPrimary,paddingLeft:1},(0,oe.mp)({direction:e.direction,end:-12})]),"label:DivSideNavToggleBtnContainer;"),ae=(0,ie.default)("div",{target:"e1jtqgen2"})((({theme:e,isShowAll:t})=>[{position:"relative",width:"13px",height:"100%",borderTopRightRadius:12,borderBottomRightRadius:12,backgroundColor:e.colors.BGPrimary,display:"flex",justifyContent:"center",alignItems:"center",boxShadow:t?"none":`2px 0px 4px -1px ${e.colors.ShadowSecondary}`,border:`1px solid ${e.colors.LineSecondary}`,borderLeft:"none",":hover svg path":{fill:e.colors.TextPrimary,fillOpacity:1,opacity:1}}]),"label:DivSideNavToggleBtn;"),re=(0,ie.default)("div",{target:"e1jtqgen3"})((({isShowAll:e,theme:{direction:t,colors:i}})=>{const o="rtl"===t;return[{transformOrigin:"center center",width:4.43,height:15.8,"&>svg path":{fill:i.TextPrimary}},e&&{transform:"rotateY(180deg)",marginInlineStart:o?3:0,marginInlineEnd:o?0:3}]}),"label:DivSideNavToggleBtnIconWrapper;");var se=i(84987);const le={id:"side-nav-arrow-icon-a9490a31",use:"side-nav-arrow-icon-a9490a31-usage",viewBox:"0 0 5 16",content:''};function de(e){const t=(0,te.useContext)(se.X);return(0,te.useLayoutEffect)((()=>(t.add(le),()=>{t.remove("side-nav-arrow-icon-a9490a31")})),[]),(0,ee.jsx)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e,{children:(0,ee.jsx)("use",{xlinkHref:"#side-nav-arrow-icon-a9490a31"},void 0)}),void 0)}var ce=i(48007),ue=i(97086),pe=i(95868),ve=i(90159),_e=i(96926),he=i(41484),me=i(47172),ge=i(72687);const fe=()=>{var e,t;const{setShow:i,playerContainerRef:o,isShowAll:n}=(0,ce.r)((e=>({setShow:e.setShow,playerContainerRef:e.playerContainerRef,scrollDomRef:e.scrollDomRef,isShowAll:e.show})),he.A),[a,r]=(0,te.useState)(-1),{enterRoomLoadingState:s}=(0,y.Ph)(K.Q,{selector:e=>({enterRoomLoadingState:e.loadingState.enterRoom}),dependencies:[]}),{handleSideBarToggleBtnClickReport:l}=(()=>{var e;const t=(0,y.Ph)(K.Q,{selector:e=>e.roomInfo,dependencies:[]}),i=(0,te.useCallback)((e=>{var i;const o=(0,h.TC)();ge.fF.handleSideBarToggleBtnClick(Object.assign({type:e,room_id:o?null==t?void 0:t.id_str:void 0,anchor_id:o?null===(i=null==t?void 0:t.owner)||void 0===i?void 0:i.id_str:void 0},(0,h.Gc)()))}),[null==t?void 0:t.id_str,null===(e=null==t?void 0:t.owner)||void 0===e?void 0:e.id_str]);return{handleSideBarToggleBtnClickReport:i}})(),{pathname:d}=(0,me.useLocation)(),c=(0,te.useRef)(n),u=(0,te.useRef)(((0,ue.fU)()?0:null!==(t=null===(e=null===document||void 0===document?void 0:document.documentElement)||void 0===e?void 0:e.offsetWidth)&&void 0!==t?t:1072)+1);c.current=n;const p=(0,te.useCallback)((()=>{const e=document.documentElement.offsetWidth;e=1072&&e<1072&&c.current&&i(!1),u.current=e}),[i]),v=(0,te.useCallback)((()=>{if(!o.current||!(0,pe.qd)(d))return;const{offsetTop:e,offsetHeight:t}=o.current;r(e+t/2)}),[d,o]),_=(0,ve._g)((()=>{p()}),[p],200),m=(0,te.useCallback)((()=>{document.documentElement.offsetWidth<1072&&c.current&&i(!1)}),[i]),g=(0,te.useCallback)((()=>{i(!n),l(n?"close":"open")}),[l,n,i]),f=(0,te.useMemo)((()=>(0,pe.qd)(d)?{top:a,display:a<0?"none":"flex"}:{top:"50%"}),[a,d]);return(0,te.useEffect)((()=>{if(!(0,ue.fU)())return window.addEventListener("resize",_),()=>{window.removeEventListener("resize",_)}}),[_]),(0,te.useEffect)((()=>{(0,ue.fU)()||document.documentElement.offsetWidth<=761&&v()}),[n]),(0,te.useEffect)((()=>{(0,ue.fU)()||document.documentElement.offsetWidth<=761&&2===s&&v()}),[s,v]),(0,_e.w)({element:o,callback:v}),(0,te.useEffect)((()=>{m()}),[m]),(0,ee.jsx)(ne,{onClick:g,style:f,children:(0,ee.jsx)(ae,{isShowAll:n,children:(0,ee.jsx)(re,{isShowAll:n,children:(0,ee.jsx)(de,{width:4.35,height:15.8})})})})};var be=i(25616),ye=i(95481);const xe="=+~#$@",ke={"[]":/\[([^[\]]+)\]/g,"{}":/\{([^{}]*)\}/g,"%s":/%s/g,"<>":/<([^<>]*)>/g},we=({text:e,matchArr:t,replaceComponents:i})=>{const[o,n]=(0,te.useState)([]);return(0,te.useEffect)((()=>{let o=[];const a=[],r=ke[t];let s=e;s=e.replace(r,((...e)=>(a.push(e[1]),xe))),o=s.split(xe);const l=[];o.forEach(((e,t)=>{if(l.push(e),a.length>t&&i.length>0){const e=i[t%i.length];l.push((0,ee.jsx)(e,{text:a[t],matchIndex:t},t))}})),n(l)}),[e,t,i]),(0,ee.jsx)(ee.Fragment,{children:o})};var Se=i(97397);const Ce={id:"video-warning-6aa70834",use:"video-warning-6aa70834-usage",viewBox:"0 0 84 81",content:''};function je(e){const t=(0,te.useContext)(se.X);return(0,te.useLayoutEffect)((()=>(t.add(Ce),()=>{t.remove("video-warning-6aa70834")})),[]),(0,ee.jsx)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e,{children:(0,ee.jsx)("use",{xlinkHref:"#video-warning-6aa70834"},void 0)}),void 0)}const Ie=(0,ie.default)("div",{target:"e7uajn40"})({width:400,display:"flex",flexDirection:"column",alignItems:"center",padding:"36px 19px 32px 19px"},"label:DivContainer;"),Te=(0,ie.default)(je,{target:"e7uajn41"})([{width:83,height:81,marginBottom:24}],"label:StyledVideoWarningIcon;"),Le=(0,ie.default)("div",{target:"e7uajn42"})((({theme:e})=>[(0,oe.zy)({theme:e,typography:"P3",fontFamily:"TikTokFont",color:"TextPrimary"}),{textAlign:"center",marginBottom:24}]),"label:DivContent;"),Oe=(0,ie.default)("div",{target:"e7uajn43"})((({theme:e})=>[(0,oe.zy)({theme:e,typography:"P4",fontFamily:"TikTokFont",color:"TextTertiary"}),{marginBottom:24}]),"label:DivTips;"),Re=(0,ie.default)("span",{target:"e7uajn44"})((({theme:e})=>[(0,oe.zy)({theme:e,typography:"P4",fontFamily:"TikTokFont",color:"Primary"}),{marginBottom:24}]),"label:SpanTipsHighlight;"),Ee=(0,ie.default)(Se.y,{target:"e7uajn45"})((({theme:e})=>[(0,oe.zy)({theme:e,typography:"P3",fontFamily:"TikTokFont",color:"ConstTextInverse",fontWeight:"semiBold"}),{padding:"12px auto",textAlign:"center",width:"100%",backgroundColor:e.colors.Primary,":hover":{backgroundColor:e.colors.Primary}}]),"label:StyledButton;"),Pe=function({onOkClick:e,visible:t,duration:i}){const o=(0,be.s)(),n=(0,te.useMemo)((()=>[({text:e})=>(0,ee.jsx)(Re,{children:e})]),[]);return(0,ee.jsx)(ye.aF,{visible:t,maskClosable:!1,children:(0,ee.jsxs)(Ie,{children:[(0,ee.jsx)(Te,{}),(0,ee.jsx)(Le,{children:o("pm_mt_obs_revoke_desc")}),(0,ee.jsx)(Oe,{children:(0,ee.jsx)(we,{text:o("pm_mt_revoke_duration",{num:i,number:i}).replace("%s",i),matchArr:"%s",replaceComponents:n})}),(0,ee.jsx)(Ee,{type:"submit",onClick:e,children:o("pm_mt_modal_revoke_confirm_btn")})]})})};var Ae=i(47236),De=i(84483),Fe=i(64363),Be=i(56070),Me=i(50970),Ne=i(28623),qe=i(64152);const Ue=()=>{const{user:e}=(0,y.Ph)(Me.L,{selector:e=>{var t;return{user:null===(t=e.appContext)||void 0===t?void 0:t.user}},dependencies:[]}),t=null==e?void 0:e.uid,{data:i}=(0,Ne.A)((()=>function(e){return t=this,i=void 0,n=function*(){const t=yield Be.h.get("/tiktok/event/feed/v1",{query:e,baseUrlType:4});if(0===t.status_code)return(t.data||[]).map((e=>{var t,i;return(null===(t=e.data)||void 0===t?void 0:t.owner.is_verified)&&(e.data.owner.verified=!0),(null===(i=e.data)||void 0===i?void 0:i.owner.unique_id)&&(e.data.owner.display_id=e.data.owner.unique_id),e.data&&(e.data.id_str=e.data.room_id),e}))},new((o=void 0)||(o=Promise))((function(e,a){function r(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof o?i:new o((function(e){e(i)}))).then(r,s)}l((n=n.apply(t,i||[])).next())}));var t,i,o,n}({count:5,query_type:3})),{pollingInterval:6e4,ready:!!t}),o=(0,me.useHistory)();return{renderData:i,handleItemClick:(0,qe.A)((e=>{var t,i;const n=null===(i=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.owner)||void 0===i?void 0:i.display_id;n&&o.push(`/@${n}/live`)})),handleItemVisible:(0,qe.A)((()=>{}))}},We=(0,ie.default)("div",{target:"e198i95u0"})({transition:"transform .4s ease-in"},"label:DivSideNavEventTransition;");var He=i(73580),ze=i(28033);(0,te.memo)((e=>{const{isControlByBtn:t}=e,i=(0,be.s)(),{renderData:o,handleItemClick:n,handleItemVisible:a}=Ue(),r=(0,He.Nj)(ze.h);(0,te.useEffect)((()=>{(null==o?void 0:o.length)&&r.handleLiveSideEvent()}),[o,r]);const s=!!(null==o?void 0:o.length);return(0,ee.jsx)(We,{style:{transform:`translate(${s?"0":"240px"})`},children:s&&(0,ee.jsx)(Fe.T,{title:i("ttep_effect_details_page_category_events"),loading:!1,list:o,onItemClick:n,onItemVisible:a,sideBarTeaType:"event",isControlByBtn:t})})}));const Ke=(0,Ae.Ay)({resolved:{},chunkName:()=>"side-follow-channel",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>i.e(8102).then(i.bind(i,47096)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>47096},{ssr:!1,fallback:(0,ee.jsx)(De.C,{})}),Ve=((0,Ae.Ay)({resolved:{},chunkName:()=>"side-follow-channel",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>i.e(8102).then(i.bind(i,47096)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>47096},{ssr:!1}),(0,Ae.Ay)({resolved:{},chunkName:()=>"side-suggest-channel",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>i.e(4701).then(i.bind(i,20579)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>20579},{ssr:!1,fallback:(0,ee.jsx)(De.C,{})}));(0,Ae.Ay)({resolved:{},chunkName:()=>"side-suggest-channel",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>i.e(4701).then(i.bind(i,20579)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>20579},{ssr:!1});let Ge=class{constructor(e){this.service=e,this.reportErrorLog=e=>{var t;this.service.sendLog(null!==(t=null==e?void 0:e.stack)&&void 0!==t?t:null==e?void 0:e.message,"error")}}};Ge=(0,d.__decorate)([(0,c._)(),(0,d.__metadata)("design:paramtypes",[H.V$])],Ge);let $e=class{constructor(e){this.fetch=e,this.judgeActivityPermission=()=>this.fetch.post("/webcast/game/live_permission/judge_activity_permission/",{baseUrlType:4}).pipe(J()),this.getLivePermission=()=>this.fetch.get("/webcast/room/live_podcast/",{baseUrlType:4}).pipe(J()),this.applyPermission=e=>this.fetch.post("/webcast/room/live_permission/apply/",{query:e,baseUrlType:4}).pipe(J()),this.getApplyInfo=e=>this.fetch.get("/webcast/room/live_permission/apply_info/",{query:e,baseUrlType:4}).pipe(J())}};$e=(0,d.__decorate)([(0,c._)(),(0,d.__metadata)("design:paramtypes",[$.p])],$e);let Je=class extends k.E{constructor(e,t,i){super(),this.service=e,this.errorSlardar=t,this.goLiveSlardar=i,this.defaultState={}}setPermissionData(e,t){e.permissionInfo={canStartLive:t.canStartLive,showComputerLiveEntrance:t.showComputerLiveEntrance,hasOBSLivePermission:t.hasOBSLivePermission,hasLiveApplyPermission:t.hasLiveApplyPermission,showLiveStudio:t.showLiveStudio,topLSEntranceVisible:!!t.topLSEntranceVisible}}getLivePermission(e){return e.pipe((0,j.Z)((()=>this.service.getLivePermission().pipe((0,j.Z)((({data:e,error:t})=>{var i,o,n,a,r,s;if(t)return(0,T.of)(this.getActions().setPermissionData({canStartLive:!1,showComputerLiveEntrance:!1,hasOBSLivePermission:!1,hasLiveApplyPermission:!1,showLiveStudio:!1,topLSEntranceVisible:!1}));if(null==e?void 0:e.can_be_live_podcast){const t=null!==(o=null===(i=null==e?void 0:e.live_scenario)||void 0===i?void 0:i.enable_live_third_party)&&void 0!==o&&o,l=!t&&null!==(a=null===(n=null==e?void 0:e.live_permission_apply)||void 0===n?void 0:n.enable_third_party)&&void 0!==a&&a,d=null!==(r=null==e?void 0:e.show_live_studio)&&void 0!==r&&r,c=!(!(null==e?void 0:e.show_live_studio)||!(null===(s=null==e?void 0:e.live_scenario)||void 0===s?void 0:s.enable_live_studio));return(0,T.of)(this.getActions().setPermissionData({canStartLive:e.can_be_live_podcast,showComputerLiveEntrance:t||l,hasOBSLivePermission:t,hasLiveApplyPermission:l,showLiveStudio:d,topLSEntranceVisible:c}))}return(0,T.of)(this.getActions().setPermissionData({canStartLive:!1,showComputerLiveEntrance:!1,hasOBSLivePermission:!1,hasLiveApplyPermission:!1,showLiveStudio:!1,topLSEntranceVisible:!1}))})),(0,R.W)((e=>(this.goLiveSlardar.handleTraceError({errorCode:"1001",errorMessage:e.message}),this.errorSlardar.reportErrorLog(e),I.w)))))))}};(0,d.__decorate)([(0,x.h5)(),(0,d.__metadata)("design:type",Function),(0,d.__metadata)("design:paramtypes",[Object,Object]),(0,d.__metadata)("design:returntype",void 0)],Je.prototype,"setPermissionData",null),(0,d.__decorate)([(0,x.Mj)(),(0,d.__metadata)("design:type",Function),(0,d.__metadata)("design:paramtypes",[A.c]),(0,d.__metadata)("design:returntype",void 0)],Je.prototype,"getLivePermission",null),Je=(0,d.__decorate)([(0,w.n)("LivePermission"),(0,d.__metadata)("design:paramtypes",[$e,Ge,z])],Je);var Qe=i(35572);let Ye=class{constructor(e){this.service=e,this.defaultTag={where:"Subscription"},this.defaultMetrics={count:1},this.reportError=e=>{this.service.sendLog(null==e?void 0:e.message,"error")},this.handleUploadEmoteError=e=>{this.reportError(e),this.service.emitEvent("live_sdk_subscription_upload_emote_error",this.defaultMetrics,this.defaultTag)},this.handleGetEmoteDetailSuccess=()=>{this.service.emitEvent("live_sdk_subscription_get_emote_success",this.defaultMetrics,this.defaultTag)},this.handleGetEmoteDetailError=(e,t)=>{try{const i=Object.assign({},this.defaultTag);(null==e?void 0:e.message)?(i.status_msg=e.message,this.reportError(e)):t&&(i.status_msg=t),this.service.emitEvent("live_sdk_subscription_get_emote_error",this.defaultMetrics,i)}catch(e){}},this.handleGetBadgeDetailError=e=>{this.reportError(e),this.service.emitEvent("live_sdk_subscription_get_badge_detail_error",this.defaultMetrics,this.defaultTag)},this.handleUpdateBadgeError=e=>{this.reportError(e),this.service.emitEvent("live_sdk_subscription_update_badge_error",this.defaultMetrics,this.defaultTag)},this.handlePermissionError=e=>{this.reportError(e),this.service.emitEvent("live_sdk_subscription_get_permission_error",this.defaultMetrics,this.defaultTag)}}};Ye=(0,d.__decorate)([(0,c._)(),(0,d.__metadata)("design:paramtypes",[H.V$])],Ye);let Ze=class{constructor(e){this.fetch=e,this.getSubPermissionInfo=e=>this.fetch.get("/webcast/sub/privilege/get_sub_info",{query:e,baseUrlType:4}),this.getDetails=e=>this.fetch.get("/webcast/sub/privilege/get_sub_privilege_detail",{query:{sec_anchor_id:e,for_anchor:!0},baseUrlType:4}),this.getBadgeDetail=e=>this.fetch.get("/webcast/sub/privilege/get_sub_badge_detail",{query:e,baseUrlType:4}),this.getSubscriberList=e=>this.fetch.get("/webcast/sub/anchor/subscriber/",{query:e,baseUrlType:4}),this.updateBadge=e=>this.fetch.post("/webcast/sub/privilege/update_badge",{body:JSON.stringify(e),headers:{"Content-Type":"application/json"},baseUrlType:4}),this.getEmoteDetail=e=>this.fetch.get("/webcast/sub/privilege/get_sub_emote_detail/",{query:e,baseUrlType:4}),this.updateEmote=e=>this.fetch.post("/webcast/sub/privilege/update_emote",{body:JSON.stringify(Object.assign({},e)),headers:{"Content-Type":"application/json"},baseUrlType:4}),this.uploadImage=e=>{const t=new FormData;return t.append("data",e),this.fetch.post("/webcast/resource/upload/",{query:{scene:"tikcast_subscription"},body:t,omitContentType:!0,baseUrlType:4})}}};Ze=(0,d.__decorate)([(0,c._)(),(0,d.__metadata)("design:paramtypes",[$.p])],Ze);let Xe=class extends k.E{constructor(e,t){super(),this.service=e,this.slardar=t,this.defaultState={loading:0,showInitModal:!1,showUpdateModal:!1,enableSubscription:!1,initializedSubscription:!1,emoteStatus:0,badgeStatus:0,hasFetchedPermission:!1,initStep:0,hasEditEmote:!1,hasEditBadge:!1}}setEnableSubscription(e,t){e.enableSubscription=t}setInitializedSubscription(e,t){e.initializedSubscription=t}setBadgeStatus(e,t){e.badgeStatus=t}setEmoteStatus(e,t){e.emoteStatus=t}setLoading(e,t){e.loading=t}setShowInitModal(e,t){e.showInitModal=t}setShowUpdateModal(e,t){e.showUpdateModal=t}setInitStep(e,t){e.initStep=t}setHasFetchedPermission(e,t){e.hasFetchedPermission=t}setHasEditEmote(e,t){e.hasEditEmote=t}setHasEditBadge(e,t){e.hasEditBadge=t}getSubPermissionInfo(e){return e.pipe((0,E.E)(this.state$),(0,Qe.p)((([e,{hasFetchedPermission:t}])=>t?(0,T.of)(this.noop()):this.service.getSubPermissionInfo(e).pipe((0,j.Z)((({status_code:e,data:t})=>{var i,o;if(0!==e||!t)return(0,T.of)(this.noop());const{enable:n,initialized:a,badge_info:r,emote_info:s}=t;return(0,T.of)(this.getActions().setEnableSubscription(null!=n&&n),this.getActions().setInitializedSubscription(null!=a&&a),this.getActions().setBadgeStatus(null!==(i=null==r?void 0:r.current_status)&&void 0!==i?i:0),this.getActions().setEmoteStatus(null!==(o=null==s?void 0:s.current_status)&&void 0!==o?o:0),this.getActions().setHasFetchedPermission(!0))})),(0,L.Z)(this.getActions().setLoading(1)),(0,O.q)(this.getActions().setLoading(2)),(0,R.W)((e=>(this.slardar.handlePermissionError(e),(0,T.of)(this.noop()))))))))}};(0,d.__decorate)([(0,x.h5)(),(0,d.__metadata)("design:type",Function),(0,d.__metadata)("design:paramtypes",[Object,Boolean]),(0,d.__metadata)("design:returntype",void 0)],Xe.prototype,"setEnableSubscription",null),(0,d.__decorate)([(0,x.h5)(),(0,d.__metadata)("design:type",Function),(0,d.__metadata)("design:paramtypes",[Object,Boolean]),(0,d.__metadata)("design:returntype",void 0)],Xe.prototype,"setInitializedSubscription",null),(0,d.__decorate)([(0,x.h5)(),(0,d.__metadata)("design:type",Function),(0,d.__metadata)("design:paramtypes",[Object,Number]),(0,d.__metadata)("design:returntype",void 0)],Xe.prototype,"setBadgeStatus",null),(0,d.__decorate)([(0,x.h5)(),(0,d.__metadata)("design:type",Function),(0,d.__metadata)("design:paramtypes",[Object,Number]),(0,d.__metadata)("design:returntype",void 0)],Xe.prototype,"setEmoteStatus",null),(0,d.__decorate)([(0,x.h5)(),(0,d.__metadata)("design:type",Function),(0,d.__metadata)("design:paramtypes",[Object,Number]),(0,d.__metadata)("design:returntype",void 0)],Xe.prototype,"setLoading",null),(0,d.__decorate)([(0,x.h5)(),(0,d.__metadata)("design:type",Function),(0,d.__metadata)("design:paramtypes",[Object,Boolean]),(0,d.__metadata)("design:returntype",void 0)],Xe.prototype,"setShowInitModal",null),(0,d.__decorate)([(0,x.h5)(),(0,d.__metadata)("design:type",Function),(0,d.__metadata)("design:paramtypes",[Object,Boolean]),(0,d.__metadata)("design:returntype",void 0)],Xe.prototype,"setShowUpdateModal",null),(0,d.__decorate)([(0,x.h5)(),(0,d.__metadata)("design:type",Function),(0,d.__metadata)("design:paramtypes",[Object,Number]),(0,d.__metadata)("design:returntype",void 0)],Xe.prototype,"setInitStep",null),(0,d.__decorate)([(0,x.h5)(),(0,d.__metadata)("design:type",Function),(0,d.__metadata)("design:paramtypes",[Object,Boolean]),(0,d.__metadata)("design:returntype",void 0)],Xe.prototype,"setHasFetchedPermission",null),(0,d.__decorate)([(0,x.h5)(),(0,d.__metadata)("design:type",Function),(0,d.__metadata)("design:paramtypes",[Object,Boolean]),(0,d.__metadata)("design:returntype",void 0)],Xe.prototype,"setHasEditEmote",null),(0,d.__decorate)([(0,x.h5)(),(0,d.__metadata)("design:type",Function),(0,d.__metadata)("design:paramtypes",[Object,Boolean]),(0,d.__metadata)("design:returntype",void 0)],Xe.prototype,"setHasEditBadge",null),(0,d.__decorate)([(0,x.Mj)(),(0,d.__metadata)("design:type",Function),(0,d.__metadata)("design:paramtypes",[A.c]),(0,d.__metadata)("design:returntype",void 0)],Xe.prototype,"getSubPermissionInfo",null),Xe=(0,d.__decorate)([(0,w.n)("SubscriptionCommonModule"),(0,d.__metadata)("design:paramtypes",[Ze,Ye])],Xe);var et=i(89933);i.n(et)()("live-shared-lite")("Using the lite mode.")},27231:(e,t,i)=>{},99027:(e,t,i)=>{"use strict";i.d(t,{Pl:()=>s,mU:()=>r});var o=i(40099),n=i(47172),a=i(8227);function r(){const{pathname:e}=(0,n.useLocation)();return(0,o.useMemo)((()=>(0,n.matchPath)(e,{path:a.vI.liveGoLive,exact:!0})),[e])}function s(){const{pathname:e}=(0,n.useLocation)();return(0,o.useMemo)((()=>Boolean((0,n.matchPath)(e,{path:a.vI.liveDiscover,exact:!0}))),[e])}},44672:(e,t,i)=>{"use strict";i.d(t,{nH:()=>r,FU:()=>s}),i(24643),i(32877);var o=i(40099),n=i(49057),a=i(48615);function r(){const e=(0,n.W)((()=>["user"]),[]);return(0,o.useMemo)((()=>Boolean(null==e?void 0:e.user)),[e])}function s(){const e=(0,n.W)((()=>["region"]),[]),t=(0,a.U)((()=>["liveCommonConfig","liveSuggestConfig"]),[]);return(0,o.useMemo)((()=>{var i,o;const n=null===(i=null==t?void 0:t.liveSuggestConfig)||void 0===i?void 0:i.isBlockedArea;return!(!(null===(o=null==t?void 0:t.liveCommonConfig)||void 0===o?void 0:o.regionEntry)||"CN"!==(null==e?void 0:e.region))||!n}),[e,t])}i(47172),i(27231)},28033:(e,t,i)=>{"use strict";i.d(t,{h:()=>r});var o=i(58632),n=i(7672),a=i(11654);let r=class{constructor(e){this.service=e,this.defaultTag={where:"LiveDiscover"},this.defaultMetrics={count:1},this.handleLiveFeedTrending=()=>{this.service.emitEvent("live_sdk_feed_trending",this.defaultMetrics,this.defaultTag)},this.handleLiveFeedFamiliar=()=>{this.service.emitEvent("live_sdk_feed_familiar",this.defaultMetrics,this.defaultTag)},this.handleLiveFeedRecommend=(e="0")=>{this.service.emitEvent("live_sdk_feed_recommend",this.defaultMetrics,Object.assign(Object.assign({},this.defaultTag),{is_feed:String(e)}))},this.handleLiveSideFeedSuggest=()=>{this.service.emitEvent("live_sdk_side_feed_suggest",this.defaultMetrics,this.defaultTag)},this.handleLiveSideFeedFollow=()=>{this.service.emitEvent("live_sdk_side_feed_follow",this.defaultMetrics,this.defaultTag)},this.handleLiveSideEvent=()=>{this.service.emitEvent("live_sdk_side_event",this.defaultMetrics,this.defaultTag)},this.handlePlayerError=(e,t,i="0")=>{this.service.emitEvent("live_sdk_discover_error",this.defaultMetrics,Object.assign(Object.assign({},this.defaultTag),{roomId:String(t),code:String(e.status),message:e.message,is_feed:String(i)}))}}handlePreceptionTextEmpty(e){this.service.emitEvent("live_preception_text_empty",this.defaultMetrics,e)}handleLiveFirstFrameSuccess(e){const{isFeed:t}=null!=e?e:{};this.service.emitEvent("live_sdk_feed_first_frame_success",this.defaultMetrics,Object.assign(Object.assign({},this.defaultTag),{is_feed:null!=t?t:"0"}))}handleLiveDiscoverPageShow(e){var t;this.service.emitEvent("live_sdk_discover_page_success",this.defaultMetrics,Object.assign(Object.assign(Object.assign({},this.defaultTag),e),{isFeed:null!==(t=null==e?void 0:e.isFeed)&&void 0!==t?t:"0"}))}};r=(0,o.__decorate)([(0,n._)(),(0,o.__metadata)("design:paramtypes",[a.V$])],r)},85722:(e,t,i)=>{"use strict";i.d(t,{L5:()=>s,lV:()=>a});var o=i(57431);let n;i(27231);const a=()=>{var e,t,i;if(!n)try{const a=(0,o.x)();n=(null===(i=null===(t=null===(e=null==a?void 0:a.abTestVersion)||void 0===e?void 0:e.parameters)||void 0===t?void 0:t.live_abr_memo)||void 0===i?void 0:i.vid)||"v0"}catch(e){}return"v1"===n};let r;const s=()=>{var e,t,i;if(!r)try{const n=(0,o.x)();r=(null===(i=null===(t=null===(e=null==n?void 0:n.abTestVersion)||void 0===e?void 0:e.parameters)||void 0===t?void 0:t.live_stage_definition)||void 0===i?void 0:i.vid)||"v0"}catch(e){}return"v1"===r}},36523:(e,t,i)=>{"use strict";i.d(t,{Ab:()=>_,Gc:()=>f,Jf:()=>c,TC:()=>h,aA:()=>p,mE:()=>u,sw:()=>v});var o=i(72828),n=i.n(o),a=i(4474),r=i(47172),s=i(97086),l=i(8227);const d=Object.values(l.vI);function c(e){return[1,2,3].includes(e)}function u(e){if(e){const t=e.lastIndexOf("/");return[e.substr(0,t),e.substr(t+1)]}return[]}function p(e){var t,i;const o=null==e?void 0:e.stream_url,n=null===(t=null==o?void 0:o.push_urls)||void 0===t?void 0:t[0];return null!==(i=null!=n?n:null==o?void 0:o.rtmp_push_url)&&void 0!==i?i:""}function v(e){return d.some((t=>n()(t).test(e.replace(/\?(.*)/,""))))}function _(e){return e&&e.length?e.map((e=>{var t,i,o;return(null==e?void 0:e.data)&&((null==(t=e.data)?void 0:t.owner)&&(t.owner.verified=Boolean(null===(i=t.owner.authentication_info)||void 0===i?void 0:i.authentication_badge)),(null==t?void 0:t.link_mic)&&!t.with_linkmic&&Object.defineProperty(t,"with_linkmic",{writable:!0,value:Boolean(t.link_mic.channel_id||(null===(o=t.link_mic.linked_user_list)||void 0===o?void 0:o.length))})),e})):[]}function h(){return Boolean((0,r.matchPath)(null===location||void 0===location?void 0:location.pathname,{path:l.vI.liveRoom,exact:!0}))}const m=["uniqueId","enter_from_merge","enter_method","cover_type","enter_type","from_live_feed","is_auto_play","auto_play_type","manual_play_type","search_type","search_id","search_result_id","search_keyword","from_play_mode","live_room_mode","video_id","request_id","live_event_id","action_type","section_type","content_section_order","content_section_title","impr_position","is_highlight","is_guest_connect","is_landscape","live_lineup_type","entrance_detail"],g=new Set(["live_merge","live_follow","live_lifestyle","category_game","all_categories","games_catalog","lifestyle_catalog","outdoors_catalog","fashion_catalog","talent_catalog","chatting_catalog"]);function f(){const e={enter_from_merge:"others",enter_method:"others",enter_type:"manual",cover_type:"user_upload",action_type:"click",entrance_detail:"others"};if(!(0,s.fU)()){const t=(0,a.parse)(window.location.search),i=(0,r.getRouterState)();m.forEach((o=>{void 0!==t[o]&&""!==t[o]&&(e[o]=String(t[o])),void 0!==(null==i?void 0:i[o])&&""!==i[o]&&(e[o]=String(i[o]))})),!e.enter_from_merge||g.has(e.enter_from_merge)||e.enter_from_merge.startsWith("category_game_")||e.enter_from_merge.endsWith("_game_catalog")||(e.section_type=void 0,e.content_section_order=void 0,e.content_section_title=void 0,e.impr_position=void 0)}return e}},91955:(e,t,i)=>{"use strict";i.d(t,{J:()=>l});var o=i(40099),n=i(72687),a=i(36523),r=i(13392),s=i(16109);const l=()=>{var e,t,i;const l=(0,r.Ph)(s.Q,{selector:e=>e.roomInfo,dependencies:[]}),d=(0,o.useCallback)((e=>{var t;const i=(0,a.TC)();n.fF.handleSideBarTooltipHover(Object.assign({type:e,room_id:i?null==l?void 0:l.id_str:void 0,anchor_id:i?null===(t=null==l?void 0:l.owner)||void 0===t?void 0:t.id_str:void 0},(0,a.Gc)()))}),[null==l?void 0:l.id_str,null===(e=null==l?void 0:l.owner)||void 0===e?void 0:e.id_str]),c=(0,o.useCallback)(((e,t)=>{var i;const o=(0,a.TC)();n.fF.handleSideBarButtonClick(Object.assign({button_name:e,sidebar_status:t,room_id:o?null==l?void 0:l.id_str:void 0,anchor_id:o?null===(i=null==l?void 0:l.owner)||void 0===i?void 0:i.id_str:void 0},(0,a.Gc)()))}),[null==l?void 0:l.id_str,null===(t=null==l?void 0:l.owner)||void 0===t?void 0:t.id_str]),u=(0,o.useCallback)(((e,t)=>{var i;const o=(0,a.TC)();n.fF.handleSideBarButtonHover(Object.assign({button_name:e,sidebar_status:t,room_id:o?null==l?void 0:l.id_str:void 0,anchor_id:o?null===(i=null==l?void 0:l.owner)||void 0===i?void 0:i.id_str:void 0},(0,a.Gc)()))}),[null==l?void 0:l.id_str,null===(i=null==l?void 0:l.owner)||void 0===i?void 0:i.id_str]);return{handleSideBarTooltipHoverReport:d,handleSideBarButtonClickReport:c,handleSideBarButtonHoverReport:u}}},64363:(e,t,i)=>{"use strict";i.d(t,{T:()=>A,H:()=>E});var o=i(24643),n=i(40099),a=i(25616),r=i(89311),s=i(88920),l=i(82858),d=i(41484),c=i(50289);function u(e,t=!0){const i=t?e=>e.toFixed(1):e=>(Math.floor(10*e)/10).toString();let o="",n="";const a=Number(e);if(isNaN(a))return"0";const{length:r}=a.toString();return r>9?(o="B",n=i(a/Math.pow(10,9))):r>6?(o="M",n=i(a/Math.pow(10,6))):r>3?(o="K",n=i(a/Math.pow(10,3))):n=a.toString(),n+o}var p=i(3275),v=i(97086),_=i(84483),h=i(8227),m=i(32862);var g=i(54344);const f=e=>{var t,i,a,r,s,l,d,f,b,y,x,k;const{rank:w,item:S,hideEngagementCount:C,onClick:j,onMount:I,onMouseEnter:T,onMouseLeave:L}=e,{animateStyles:O,handleTransitionEnd:R}=function({rank:e}){const[t,i]=(0,n.useState)({transform:"scale(0.6)",opacity:0}),o=(0,n.useRef)(!0),a=(0,n.useRef)(e);return o.current&&!(0,v.fU)()&&(o.current=!1,requestAnimationFrame((()=>{i({transform:"scale(1)",opacity:1,transitionDuration:"150ms",transitionTimingFunction:"ease",transitionProperty:"transform, opacity"})}))),(0,n.useEffect)((()=>{const t=e-a.current;a.current=e,0!==t&&(i({transform:`translateY(${-36*t}px)`}),requestAnimationFrame((()=>{i({transform:"translateY(0)",transition:"transform ease 150ms"})})))}),[e]),{animateStyles:t,handleTransitionEnd:(0,n.useCallback)((()=>{i({})}),[])}}({rank:w}),E=(0,n.useMemo)((()=>{var e,t,i,o,n,a;return{isShowLive:!0,src:null===(o=null===(i=null===(t=null===(e=S.data)||void 0===e?void 0:e.owner)||void 0===t?void 0:t.avatar_thumb)||void 0===i?void 0:i.url_list)||void 0===o?void 0:o[0],uniqueId:null===(a=null===(n=S.data)||void 0===n?void 0:n.owner)||void 0===a?void 0:a.display_id}}),[S]),P=(0,n.useRef)(S),A=(0,n.useRef)(null),D=(()=>{return"v0"!==("undefined"==typeof window?"v0":null!==(t=null===(e=(0,m.OW)("live_discover_animate_downgrade",{vid:"v0"}))||void 0===e?void 0:e.vid)&&void 0!==t?t:"v0");var e,t})();P.current=S,(0,n.useEffect)((()=>{null==I||I(w,P.current)}),[w]);const F=(0,n.useCallback)((e=>()=>{j(e)}),[j]),B=(0,n.useCallback)((e=>{var t,i,o;return o=`${null===(i=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.owner)||void 0===i?void 0:i.display_id}`,h.O.liveRoom({uniqueId:o}).replace(/^\//,"/@")}),[]),M=(0,n.useCallback)((e=>{e.preventDefault()}),[]),N=(0,n.useCallback)((e=>{var t,i;A.current&&(null===(i=null===(t=null==S?void 0:S.data)||void 0===t?void 0:t.owner)||void 0===i?void 0:i.nickname)&&(e.stopPropagation(),null==T||T(A.current,S.data.owner.nickname))}),[T]),q=(0,n.useCallback)((()=>{null==L||L()}),[L]),U=(0,n.useCallback)((e=>{e.stopPropagation()}),[]);return S.data?(0,o.jsx)(p.dr,{"data-e2e":"live-side-nav-item",canHover:Boolean(S.data),onClick:F(S.data?S:void 0),style:D?{}:O,onTransitionEnd:R,onMouseEnter:N,onMouseLeave:q,onMouseMove:U,ref:A,children:(0,o.jsxs)(p.ah,{forceSSR:!0,to:B(S),onClick:M,children:[(0,o.jsx)("div",{children:(0,o.jsx)(g.W,Object.assign(Object.assign({size:36},E),{isSmallerBadge:!0}))}),(0,o.jsxs)(p.l7,{children:[(0,o.jsxs)(p.PM,{children:[(0,o.jsx)(p.$_,{"data-e2e":"live-side-nav-name",children:null!==(a=null===(i=null===(t=S.data)||void 0===t?void 0:t.owner)||void 0===i?void 0:i.display_id)&&void 0!==a?a:null===(s=null===(r=S.data)||void 0===r?void 0:r.owner)||void 0===s?void 0:s.nickname}),(null===(d=null===(l=S.data)||void 0===l?void 0:l.owner)||void 0===d?void 0:d.verified)?(0,o.jsx)(c.s,{width:16,height:16}):null]}),(0,o.jsx)(p.Qv,{children:null===(b=null===(f=S.data)||void 0===f?void 0:f.owner)||void 0===b?void 0:b.nickname})]}),C||(null===(y=S.data)||void 0===y?void 0:y.is_gated_room)?null:(0,o.jsx)(p.$z,{"data-e2e":"person-count",children:u(null!==(k=null===(x=S.data)||void 0===x?void 0:x.user_count)&&void 0!==k?k:0)})]})}):(0,o.jsx)(_.j,{})};var b=i(48007),y=i(52845),x=i(18499),k=i(62186),w=i(72153);const S=(0,k.default)("div",{target:"e1l28mn90"})((({theme:e})=>[(0,w.zy)({theme:e,fontFamily:"TikTokFont",typography:"P3",color:"ConstTextInverse",fontWeight:"normal"}),{display:"block",position:"fixed",top:0,padding:"14px 12px",borderRadius:"8px",zIndex:10,background:"rgba(84, 84, 84, 0.92)",fontWeight:500}]),"label:DivNavHintContainer;"),C=function({text:e,active:t,style:i}){return t?(0,x.createPortal)((0,o.jsx)(S,{style:i,children:e}),document.body):null};var j=i(91955),I=i(84987);const T={id:"chevron-down-icon-9432e3f8",use:"chevron-down-icon-9432e3f8-usage",viewBox:"0 0 14 15",content:''};function L(e){const t=(0,n.useContext)(I.X);return(0,n.useLayoutEffect)((()=>(t.add(T),()=>{t.remove("chevron-down-icon-9432e3f8")})),[]),(0,o.jsx)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e,{children:(0,o.jsx)("use",{xlinkHref:"#chevron-down-icon-9432e3f8"},void 0)}),void 0)}var O=i(88091),R=i(22985);const E=5,P=Array.from({length:E}).map(((e,t)=>({rid:t,data:null}))),A=(0,n.memo)((({title:e,loading:t=!0,list:i=[],onSeeAllClick:c,onItemClick:u,onItemVisible:v,sideBarTeaType:_,isControlByBtn:h,isDrawerOpen:m,switchRenderItem:g})=>{const x=(0,a.s)(),{isRTL:k}=(0,r.m)(),[w,S]=(0,n.useState)(!0),[I,T]=(0,n.useState)(!0),[A,D]=(0,n.useState)(!1),[F,B]=(0,n.useState)(e),[M,N]=(0,n.useState)(0),q=(0,n.useRef)(null),{isShowAll:U,scrollDomRef:W}=(0,b.r)((e=>({scrollDomRef:e.scrollDomRef,isShowAll:e.show})),d.A),{vid:H}=(0,s.Oj)(),z=(0,n.useMemo)((()=>"v0"!==H),[H]),K=(0,l.Eo)(),V=(0,n.useRef)(),{handleSideBarTooltipHoverReport:G,handleSideBarButtonClickReport:$,handleSideBarButtonHoverReport:J}=(0,j.J)(),Q=(0,n.useRef)(null),Y=(0,n.useCallback)((()=>{if(z)return m||document.documentElement.offsetWidth{const e=Y();$(w?"see_all":"see_less",e?"close":"open")}),[$,w,Y]),X=(0,n.useCallback)((()=>{null==c||c(),Z(),S(!w)}),[c,Z,w]),ee=(0,n.useCallback)(((e,t)=>{(null==t?void 0:t.data)&&v(t,e)}),[v]),te=(0,n.useMemo)((()=>x(w?"see_all":"see_less")),[x,w]),ie=(0,n.useMemo)((()=>i.length>E),[i]),oe=(0,n.useMemo)((()=>t?P:w?i.slice(0,E):i),[t,i,w]);(0,n.useEffect)((()=>{t||i.length?T(!0):T(!1)}),[t,i]);const ne=(0,n.useCallback)((t=>{if(!Y())return;G(_);const{pageY:i}=t;D(!0),N(i),B(e)}),[_,G,e,Y]),ae=(0,n.useCallback)((()=>{F&&F!==e||(D(!1),N(0))}),[F,e]),re=(0,n.useCallback)(((e,t)=>{if(!t||!Y())return;G("anchor_nickname");const i=e.getBoundingClientRect();D(!0),N(i.top+1),B(t),V.current=e}),[G,Y]),se=(0,n.useCallback)((()=>{D(!1),N(0)}),[]),le=(0,n.useCallback)((()=>{J(w?"see_all":"see_less",Y()?"close":"open")}),[J,w,Y]),de=(0,n.useCallback)((e=>{if(e.stopPropagation(),!Q.current||!Y())return;const t=Q.current.getBoundingClientRect();D(!0),N(t.top-11),B(te),V.current=Q.current}),[te,Y]),ce=(0,n.useCallback)((()=>{Y()&&G(w?"see_all":"see_less")}),[Y,G,w]),ue=(0,n.useCallback)((()=>{if(!V.current||!A)return;const e=V.current.getBoundingClientRect();N(e.top+1)}),[A]);(0,n.useEffect)((()=>{if(W.current){const e=W.current;return e.addEventListener("scroll",ue),()=>{e.removeEventListener("scroll",ue)}}}),[ue,W]);const pe=(0,n.useMemo)((()=>k?{right:y.E+4,top:M}:{left:y.E+4,top:M}),[M,k]);return I?(0,o.jsxs)(p.aJ,{ref:q,children:[(0,o.jsxs)(p.PE,{"data-e2e":"live-side-nav-channel",isShowAll:U,isControlByBtn:h,isPhase3Nav:z,isDrawerOpen:m,onMouseMove:ne,onMouseOut:ae,children:[(0,o.jsxs)(p.sI,{"data-e2e":"live-side-nav-channel-title",isControlByBtn:h,isShowAll:U,isPhase3Nav:z,isDrawerOpen:m,className:"flex justify-between items-center",children:[e,g&&w&&0!==oe.length&&!t&&(0,o.jsx)(R.A,{className:"cursor-pointer",onClick:g})]}),(0,o.jsxs)(p.$j,{isControlByBtn:h,isShowAll:U,isPhase3Nav:z,isDrawerOpen:m,children:[oe.map(((e,t)=>{var i,n;return(0,o.jsx)(f,{item:e,rank:t+1,hideEngagementCount:K,onClick:u,onMount:ee,onMouseEnter:re,onMouseLeave:se},null!==(n=null===(i=e.data)||void 0===i?void 0:i.id_str)&&void 0!==n?n:e.rid)})),ie?(0,o.jsxs)(p.Fy,{isControlByBtn:h,isShowAll:U,isPhase3Nav:z,isDrawerOpen:m,onMouseEnter:le,onClick:X,children:[(0,o.jsx)(p.bQ,{isShowAll:U,isFold:w,ref:Q,isControlByBtn:h,isPhase3Nav:z,isDrawerOpen:m,onMouseEnter:ce,onMouseMove:de,onMouseOut:se,children:(0,o.jsx)(L,{width:14,height:14})}),(0,o.jsx)(p.gG,{"data-e2e":"live-side-more-button",isControlByBtn:h,isShowAll:U,isPhase3Nav:z,isDrawerOpen:m,children:te})]}):null]})]}),(0,o.jsx)(C,{active:A,text:F,style:pe})]}):null}))},84483:(e,t,i)=>{"use strict";i.d(t,{C:()=>s,j:()=>r});var o=i(24643),n=i(3275),a=i(11328);const r=()=>(0,o.jsxs)(n.dr,{canHover:!1,children:[(0,o.jsx)(n.ju,{showRing:!1,children:(0,o.jsx)(a.EA.Avatar,{})}),(0,o.jsxs)(n.l7,{style:{gap:8},children:[(0,o.jsx)(a.EA.Title,{style:{width:120}}),(0,o.jsx)(a.EA.Title,{style:{width:72,height:12}})]}),(0,o.jsx)(n.$z,{children:(0,o.jsx)(a.EA.Title,{style:{width:33,height:14}})})]}),s=()=>(0,o.jsx)(n.aJ,{children:(0,o.jsxs)(n.PE,{isShowAll:!0,isLiveOptimized:!1,children:[(0,o.jsx)(n.sI,{isLiveOptimized:!1,isShowAll:!0,children:(0,o.jsx)(a.EA.Title,{})}),(0,o.jsx)(n.$j,{isLiveOptimized:!1,isShowAll:!0,children:Array(5).fill(null).map(((e,t)=>(0,o.jsx)(r,{},t)))})]})})},3275:(e,t,i)=>{"use strict";i.d(t,{$_:()=>p,$j:()=>v,$z:()=>y,Fy:()=>x,PE:()=>c,PM:()=>g,Qv:()=>b,aJ:()=>d,ah:()=>h,bQ:()=>k,dr:()=>_,gG:()=>w,ju:()=>m,l7:()=>f,sI:()=>u});var o=i(62186),n=i(67963),a=i(72153),r=i(50289),s=i(52845),l=i(88091);const d=(0,o.default)("div",{target:"e1fq23160"})((({theme:e})=>({borderWidth:.5,borderStyle:"solid",borderColor:e.colors.LineSecondary,borderLeft:"none",borderRight:"none",borderBottom:"none",position:"relative",margin:"0 8px"})),"label:DivSideNavChannelWrapper;"),c=(0,o.default)("div",{target:"e1fq23161"})((({theme:e,isControlByBtn:t,isShowAll:i,isPhase3Nav:o,isDrawerOpen:n})=>{const r="rtl"===e.direction;return o?[{position:"relative",padding:"16px 8px 16px 4px",width:n?s.E:s.Q},(0,a.mp)({direction:e.direction,start:-16,paddingStart:n?7.5:4,paddingEnd:n?10.5:8}),(0,a.jJ)({max:l.f5.Medium,style:{paddingInlineStart:"7.5px",paddingInlineEnd:"10.5px",width:s.E}})]:[{position:"relative",padding:"16px 8px 16px 4px",width:!t||i?s.Q:s.E},(0,a.mp)({direction:e.direction,start:-16,paddingStart:!t||i?4:7.5,paddingEnd:!t||i?8:10.5}),!t&&(0,a.jJ)({max:1071,style:{paddingLeft:r?10.5:7.5,paddingRight:r?7.5:10.5,width:s.E}})]}),"label:DivSideNavChannel;"),u=(0,o.default)("div",{target:"e1fq23162"})((({theme:e,isControlByBtn:t,isShowAll:i,isPhase3Nav:o,isDrawerOpen:n})=>o?[Object.assign(Object.assign({},e.typography.P3),{color:e.colors.TextSecondary,fontFamily:e.fontFamilies.TikTokFont,marginInlineStart:12,marginInlineEnd:6,fontWeight:600,lineHeight:"22px",marginBottom:"12px"}),(0,a.jJ)({max:l.f5.Medium,style:{display:"none"}}),n&&{display:"none"}]:[Object.assign(Object.assign({},e.typography.P3),{color:e.colors.TextSecondary,fontFamily:e.fontFamilies.TikTokFont,marginInlineStart:12,marginInlineEnd:16,fontWeight:600,lineHeight:"22px",marginBottom:"12px"}),!t&&(0,a.jJ)({max:1071,style:{display:"none"}}),t&&!1===i&&{display:"none"}]),"label:DivSideNavTitle;"),p=(0,o.default)("span",{target:"e1fq23163"})({flexBasis:"auto",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:800},"label:SpanSideNavNickName;"),v=(0,o.default)("div",{target:"e1fq23164"})((({isControlByBtn:e,isShowAll:t,isPhase3Nav:i,isDrawerOpen:o})=>i?[{margin:"8px 0 0"},(0,a.jJ)({max:l.f5.Medium,style:{marginBottom:8}}),o&&{marginBottom:8}]:[{margin:"8px 0 0"},!e&&(0,a.jJ)({max:1071,style:{marginBottom:8}}),e&&{marginBottom:t?0:8}]),"label:DivSideNavContent;"),_=(0,o.default)("div",{target:"e1fq23165"})((({canHover:e,theme:t})=>({height:48,padding:"6px 0",paddingInlineStart:5,marginInlineStart:5,paddingInlineEnd:5,marginInlineEnd:3,cursor:"pointer",overflow:"hidden",display:"flex",borderRadius:2,"&:hover":{backgroundColor:e?t.colors.ShadowSecondary:"initial"}})),"label:DivSideNavItem;"),h=(0,o.default)(n.N_,{target:"e1fq23166"})({width:"100%",height:36,textDecoration:"none",display:"flex",alignItems:"center",":hover":{textDecoration:"none"}},"label:StyledLink;"),m=(0,o.default)("div",{target:"e1fq23167"})((({showRing:e=!0,theme:t})=>({borderRadius:"50%",alignItems:"flex-start",position:"relative",borderWidth:1,borderStyle:"solid",borderColor:e?t.colors.Primary:"transparent"})),"label:DivSideNavAvatarRing;"),g=(0,o.default)("div",{target:"e1fq23169"})((({theme:e})=>Object.assign(Object.assign({display:"flex",color:e.colors.TextPrimary,alignItems:"center",position:"relative"},e.typography.P2),{[`${r.s}`]:{minWidth:"16px",maxWidth:"16px"}})),"label:DivSideNavDisplayId;"),f=(0,o.default)("div",{target:"e1fq231610"})({height:36,flex:"auto",display:"flex",marginInlineStart:8,flexDirection:"column",overflow:"hidden"},"label:DivSideNavNameWrap;"),b=(0,o.default)("div",{target:"e1fq231611"})((({theme:e})=>Object.assign({color:e.colors.TextSecondary,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},e.typography.P4)),"label:DivSideNavNickName;"),y=(0,o.default)("div",{target:"e1fq231612"})((({theme:e})=>Object.assign(Object.assign({color:e.colors.TextPrimary,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},e.typography.P3),{lineHeight:"45px",textAlign:"rtl"===e.direction?"left":"right",marginInlineStart:10,minWidth:40})),"label:DivSideNavPerson;"),x=(0,o.default)("div",{target:"e1fq231613"})((({theme:e,isControlByBtn:t,isShowAll:i,isPhase3Nav:o,isDrawerOpen:n})=>o?[{marginTop:n?4:8,marginInlineStart:n?0:12,display:"flex",alignItems:"center",color:e.colors.Primary},n&&{justifyContent:"center"},(0,a.jJ)({max:l.f5.Medium,style:{marginTop:4,marginInlineStart:0,justifyContent:"center"}})]:[{marginTop:!t||i?8:4,marginInlineStart:!t||i?12:0,display:"flex",alignItems:"center",color:e.colors.Primary},t&&!1===i&&{justifyContent:"center"},!t&&(0,a.jJ)({max:1071,style:{marginTop:4,marginInlineStart:0,justifyContent:"center"}})]),"label:DivSideNavSeeAllWrapper;"),k=(0,o.default)("div",{target:"e1fq231614"})((({isShowAll:e,theme:t,isFold:i,isControlByBtn:o,isPhase3Nav:n,isDrawerOpen:r})=>n?[{width:r?"24px":"auto",height:r?"24px":"auto",display:"flex",justifyContent:"center",alignItems:"center",borderRadius:r?"100%":"unset",overflow:r?"hidden":"auto",cursor:"pointer","&:hover":{backgroundColor:r?t.colors.BGHover:"none"},"&>svg>path":{fill:t.colors.Primary,fillOpacity:1}},(0,a.mp)({direction:t.direction,marginEnd:r?0:"4px"}),(0,a.jJ)({max:l.f5.Medium,style:{width:24,height:24,borderRadius:"100%",overflow:"hidden",marginRight:0,marginLeft:0,"&:hover":{backgroundColor:t.colors.BGHover}}}),!i&&{transform:"rotate(180deg)"}]:[{width:!o||e?"auto":"24px",height:!o||e?"auto":"24px",display:"flex",justifyContent:"center",alignItems:"center",borderRadius:!o||e?"unset":"100%",overflow:!o||e?"auto":"hidden",cursor:"pointer","&:hover":{backgroundColor:!o||e?"none":t.colors.BGHover},"&>svg>path":{fill:t.colors.Primary,fillOpacity:1}},(0,a.mp)({direction:t.direction,marginEnd:!o||e?"4px":0}),!o&&(0,a.jJ)({max:1071,style:{width:24,height:24,borderRadius:"100%",overflow:"hidden",marginRight:0,marginLeft:0,"&:hover":{backgroundColor:t.colors.BGHover}}}),!i&&{transform:"rotate(180deg)"}]),"label:DivSideNavSeeAllIcon;"),w=(0,o.default)("div",{target:"e1fq231615"})((({theme:e,isControlByBtn:t,isShowAll:i,isPhase3Nav:o,isDrawerOpen:n})=>o?[Object.assign(Object.assign({fontWeight:600,cursor:"pointer",fontFamily:e.fontFamilies.TikTokFont},e.typography.P3),{lineHeight:"22px"}),(0,a.jJ)({max:l.f5.Medium,style:{display:"none"}}),n&&{display:"none"}]:[Object.assign(Object.assign({fontWeight:600,cursor:"pointer",fontFamily:e.fontFamilies.TikTokFont},e.typography.P3),{lineHeight:"22px"}),!t&&(0,a.jJ)({max:1071,style:{display:"none"}}),t&&!1===i&&{display:"none"}]),"label:DivSideNavSeeAll;")},52845:(e,t,i)=>{"use strict";i.d(t,{E:()=>n,Q:()=>o});const o=240,n=72},48007:(e,t,i)=>{"use strict";i.d(t,{r:()=>o});const o=(0,i(24299).Ay)((e=>({show:!0,playerContainerRef:{current:null},scrollDomRef:{current:null},setShow:t=>e({show:t}),setPlayerContainer:t=>e({playerContainerRef:t}),setScrollDomRef:t=>e({scrollDomRef:t})})))},63705:(e,t,i)=>{Promise.resolve().then(i.t.bind(i,40099,19))},46794:(e,t,i)=>{"use strict";i.d(t,{o:()=>D});var o=i(73580),n=i(40099),a=i(7859),r=i(9782),s=i(72687),l=i(58632),d=i(7672),c=i(11654);function u(e){return e?`live_sdk_api_${e}`:""}let p=class{constructor(e){this.service=e,this.defaultTag={where:"LiveRoom",is_success:"1"},this.defaultMetrics={count:1}}handleApiSuccess(e){const t=u(e);t&&this.service.emitEvent(t,Object.assign({},this.defaultMetrics),Object.assign({},this.defaultTag))}handleApiFail(e,t){const i=u(e);if(!i)return;const o=Object.assign(Object.assign({},this.defaultTag),{is_success:"0"}),{httpCode:n,statusCode:a,errorMsg:r,errorType:s}=null!=t?t:{};n&&(o.http_code=n),a&&(o.status_code=String(a)),r&&(this.service.sendLog(`${i}-${s}-${r}`,"error"),o.error_msg=r,o.error_type=s),this.service.emitEvent(i,Object.assign({},this.defaultMetrics),o)}handleApiResultReport(e,t){if(void 0===t)return void this.handleApiSuccess(e);const{statusCode:i,errorMsg:o,errorType:n,httpCode:a}=t;let r=o;void 0===i&&void 0===o&&(r="emptyBody"),this.handleApiFail(e,{statusCode:i,httpCode:void 0!==i?200:a,errorType:n,errorMsg:r})}handleEnterRoomApiResultReport(e){this.handleApiResultReport("enter_room",e)}handleFollowUserApiResultReport(e){this.handleApiResultReport("follow_user",e)}handleSendCommentApiResultReport(e){this.handleApiResultReport("send_comment",e)}handleUserInfoApiResultReport(e){this.handleApiResultReport("user_info",e)}handleGetGiftListApiResultReport(e){this.handleApiResultReport("get_gift_list",e)}handleGetGiftEffectApiResultReport(e){this.handleApiResultReport("get_gift_effect",e)}handleSendGiftApiResultReport(e){this.handleApiResultReport("send_gift",e)}handleLiveFeedApiResultReport(e){this.handleApiResultReport("live_feed",e)}handleLiveFeedTabApiResultReport(e){this.handleApiResultReport("live_feed_tab",e)}handleReflowLiveShareApiResultReport(e){this.handleApiResultReport("reflow_live_share",e)}};p=(0,l.__decorate)([(0,d._)(),(0,l.__metadata)("design:paramtypes",[c.V$])],p);var v=i(44672),_=i(64363),h=i(24299),m=i(36523),g=i(56070);function f(e){var t;return g.h.get("/webcast/feed/",{query:Object.assign({device_type:null!==(t=e.device_type)&&void 0!==t?t:"web_h264"},e),baseUrlType:4})}const b=(0,h.Ay)(((e,t)=>({sideFollowList:[],sideSuggestList:[],followLoadingState:1,suggestLoadingState:1,setSideNavLoadingState(t,i){"suggest"===t?e({suggestLoadingState:i}):"follow"===t&&e({followLoadingState:i})},getSideNavList(i,o,n){return a=this,r=void 0,l=function*(){var a;const{sideFollowList:r,sideSuggestList:s}=t();try{const{data:t,status_code:l,message:d}=yield f(o);0!==l?n.handleLiveFeedApiResultReport({statusCode:l,errorMsg:null!==(a=null==t?void 0:t.prompts)&&void 0!==a?a:d}):n.handleLiveFeedApiResultReport();const c=(0,m.Ab)(t);"follow"===i?e({sideFollowList:[...y(r,c)],followLoadingState:2}):"suggest"===i&&e({sideSuggestList:[...y(s,c)],suggestLoadingState:2})}catch(t){"follow"===i?e({followLoadingState:3}):"suggest"===i&&e({suggestLoadingState:3}),n.handleLiveFeedApiResultReport({httpCode:null==t?void 0:t.status,errorMsg:null==t?void 0:t.message,errorType:null==t?void 0:t.name})}},new((s=void 0)||(s=Promise))((function(e,t){function i(e){try{n(l.next(e))}catch(e){t(e)}}function o(e){try{n(l.throw(e))}catch(e){t(e)}}function n(t){var n;t.done?e(t.value):(n=t.value,n instanceof s?n:new s((function(e){e(n)}))).then(i,o)}n((l=l.apply(a,r||[])).next())}));var a,r,s,l}})));function y(e,t){return t.length>=e.length?(t.forEach(((t,i)=>{var o,n,a,r,s,l,d,c;const u=null===(a=null===(n=null===(o=e[i])||void 0===o?void 0:o.data)||void 0===n?void 0:n.owner)||void 0===a?void 0:a.display_id,p=null===(s=null===(r=t.data)||void 0===r?void 0:r.owner)||void 0===s?void 0:s.display_id;u&&u===p&&(null===(l=t.data)||void 0===l?void 0:l.user_count)===(null===(c=null===(d=e[i])||void 0===d?void 0:d.data)||void 0===c?void 0:c.user_count)||(e[i]=t)})),e):e.map(((e,i)=>{var o,n,a,r,s,l,d,c;const u=null===(a=null===(n=null===(o=t[i])||void 0===o?void 0:o.data)||void 0===n?void 0:n.owner)||void 0===a?void 0:a.display_id,p=null===(s=null===(r=e.data)||void 0===r?void 0:r.owner)||void 0===s?void 0:s.display_id;return u?p!==u||(null===(l=e.data)||void 0===l?void 0:l.user_count)!==(null===(c=null===(d=t[i])||void 0===d?void 0:d.data)||void 0===c?void 0:c.user_count)?t[i]:e:null})).filter((e=>null!==e))}var x=i(300),k=i.n(x);const w=(0,h.Ay)(((e,t)=>({feedList:{},topRoomSet:new Set,setSelectedTab(t){e({selectedTab:t})},setDataLiveEnd(i){const{feedList:o}=t(),{type:n,watchingId:a,endIds:r}=i,s=Object.assign({},o[n]);s.data&&(s.data=s.data.filter((e=>{var t,i;return(null===(t=e.data)||void 0===t?void 0:t.id_str)===a||!r.includes(String(null===(i=e.data)||void 0===i?void 0:i.id_str))})),s.data=s.data.map((e=>{var t;return r.includes(String(null===(t=e.data)||void 0===t?void 0:t.id_str))&&e.data?Object.assign(Object.assign({},e),{data:Object.assign(Object.assign({},e.data),{status:4})}):e}))),e({feedList:Object.assign(Object.assign({},o),{[n]:s})})},setDataSubOnlyLive(i){var o;const{feedList:n}=t(),{type:a,watchingId:r}=i,s=Object.assign({},n[a]);(null===(o=s.data)||void 0===o?void 0:o.length)&&(s.data=s.data.map((e=>{var t;return r===String(null===(t=e.data)||void 0===t?void 0:t.id_str)&&e.data?Object.assign(Object.assign({},e),{data:Object.assign(Object.assign({},e.data),{live_sub_only:1})}):e}))),e({feedList:Object.assign(Object.assign({},n),{[a]:s})})},setDataSubscriber(i){var o;const{feedList:n}=t(),{type:a,watchingId:r}=i,s=n[a];(null===(o=null==s?void 0:s.data)||void 0===o?void 0:o.length)&&(s.data=s.data.map((e=>{var t,o;return r===String(null===(t=e.data)||void 0===t?void 0:t.id_str)&&(null===(o=e.data)||void 0===o?void 0:o.owner)?Object.assign(Object.assign({},e),{data:Object.assign(Object.assign({},e.data),{owner:Object.assign(Object.assign({},e.data.owner),{subscribe_info:{is_subscribe:i.isSubscriber}})})}):e}))),e({feedList:Object.assign(Object.assign({},n),{[a]:s})})},setDataLinkedMicUsers(i){var o;const{feedList:n}=t(),{type:a,roomId:r,linkedMicUsers:s}=i,l=n[a];(null===(o=null==l?void 0:l.data)||void 0===o?void 0:o.length)&&(l.data=l.data.map((e=>{var t;return r===String(null===(t=e.data)||void 0===t?void 0:t.id_str)&&e.data&&(e.data.link_mic=Object.assign(Object.assign({},e.data.link_mic),{linked_user_list:s})),Object.assign({},e)}))),e({feedList:Object.assign(Object.assign({},n),{[a]:l})})},deleteLiveEndData(i){const{feedList:o}=t(),{type:n,roomId:a}=i,r=o[n];(null==r?void 0:r.data)&&(r.data=r.data.filter((e=>{var t;return(null===(t=e.data)||void 0===t?void 0:t.id_str)&&a!==String(e.data.id_str)}))),e({feedList:Object.assign(Object.assign({},o),{[n]:r})})},setFeedData(i){var o,n,a;const{feedList:r,topRoomSet:s}=t(),l=Number(i.maxTime)>0?Object.assign({},r[i.key]):{data:[]},d={};i.loadingState&&(d.loadingState=i.loadingState),(null===(o=i.data)||void 0===o?void 0:o.length)&&(d.data=k()([...null!==(n=null==l?void 0:l.data)&&void 0!==n?n:[],...i.data],(e=>{var t;return null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.id_str})),d.data=d.data.filter((e=>{var t;return 8!==(null===(t=e.data)||void 0===t?void 0:t.stream_status)}))),i.extra&&(d.extra=i.extra),void 0!==i.isGameCategoryData&&(d.isGameCategoryData=i.isGameCategoryData),s.clear(),null===(a=d.data)||void 0===a||a.forEach((e=>{var t;"game_tab_top_room"===e.live_reason&&(null===(t=e.data)||void 0===t?void 0:t.id_str)&&(null==s||s.add(e.data.id_str))})),e({feedList:Object.assign(Object.assign({},r),{[i.key]:Object.assign(Object.assign({},l),d)})})},getSubscribeInfo(e,i){const{feedType:o,roomId:n,isLogin:a}=e,r=function(e,t){var i={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(i[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n{var t,a;const{data:r,status_code:l}=e;if(0===l&&r){i.handleGetSubUserInfoSuccess();const e=Boolean(null===(a=null===(t=r.subscribing)||void 0===t?void 0:t.sub_info)||void 0===a?void 0:a.is_subscribing);s({type:o,watchingId:n,isSubscriber:e})}else i.handleGetSubUserInfoError(void 0,l)})).catch((e=>{i.handleGetSubUserInfoError(e)}))},getFeed(e,i,o){const{setFeedData:n}=t();n({key:e,maxTime:i.max_time,loadingState:1,isGameCategoryData:!!i.related_live_tag}),f(i).then((({data:t,extra:a,status_code:r,message:s})=>{var l;0!==r?o.handleLiveFeedApiResultReport({statusCode:r,errorMsg:null!==(l=null==t?void 0:t.prompts)&&void 0!==l?l:s}):o.handleLiveFeedApiResultReport();const d=(0,m.Ab)(t);n({key:e,maxTime:i.max_time,data:d,extra:a,loadingState:2,isGameCategoryData:!!i.related_live_tag})})).catch((t=>{o.handleLiveFeedApiResultReport({httpCode:null==t?void 0:t.status,errorMsg:null==t?void 0:t.message,errorType:null==t?void 0:t.name}),n({key:e,loadingState:3,isGameCategoryData:!!i.related_live_tag})}))}})));var S=i(13392),C=i(49057),j=i(49473),I=i(99027);i(58562);const T=e=>e.streamItems.find((e=>e.isActive));var L=i(19824),O=i(16109),R=i(67518),E=i(64152),P=i(93608);const A={handleBackClick(e){P.f.event("livesdk_side_suggest_switch",Object.assign({},e))}},D=(e,t)=>{const{topRoomSet:i,selectedTab:l}=w(),d=(0,o.Nj)(p),{channelData:c,loadingState:u,getSideNavList:h,setSideNavLoadingState:g}=b((t=>({channelData:"follow"===e?t.sideFollowList:t.sideSuggestList,loadingState:"follow"===e?t.followLoadingState:t.suggestLoadingState,getSideNavList:t.getSideNavList,setSideNavLoadingState:t.setSideNavLoadingState}))),f=(0,n.useMemo)((()=>"follow"===e?"following":"recommend"),[e]),y=(0,v.nH)(),x=function(){var e,t,i,o,a;const{user:r}=null!==(e=(0,C.W)((()=>["user"]),[]))&&void 0!==e?e:{},{liveType:s,roomInfo:l,hotLiveRoomInfo:d,reportLinkType:c}=(0,S.Ph)(O.Q,{selector:e=>({roomInfo:e.roomInfo,liveType:e.liveType,hotLiveRoomInfo:e.hotLiveRoomInfo,reportLinkType:e.reportLinkType}),dependencies:[]}),{vCodecType:u}=(0,S.Ph)(L.T,{selector:e=>{var t,i;return{vCodecType:null!==(i=null===(t=T(e))||void 0===t?void 0:t.vCodecKey)&&void 0!==i?i:""}},dependencies:[]}),p=(0,I.Pl)(),v=(0,n.useMemo)((()=>p?d:l),[p,d,l]);return(0,n.useMemo)((()=>{var e,t,i,o,n,a;return Object.assign({live_type:s,follow_status:null!==(i=null===(t=null===(e=null==v?void 0:v.owner)||void 0===e?void 0:e.follow_info)||void 0===t?void 0:t.follow_status)&&void 0!==i?i:"-1",action_type:"click",room_id:null==v?void 0:v.id_str,enter_method:"others",user_id:null==r?void 0:r.uid,codec_type:u,isSupportedH265:(0,j.gc)()?"1":"0",anchor_id:null===(o=null==v?void 0:v.owner)||void 0===o?void 0:o.id_str,hashtag_id:String(null!==(a=null===(n=null==v?void 0:v.hashtag)||void 0===n?void 0:n.id)&&void 0!==a?a:""),connection_type:c},(0,m.Gc)())}),[null===(t=null==v?void 0:v.hashtag)||void 0===t?void 0:t.id,null==v?void 0:v.id_str,null===(o=null===(i=null==v?void 0:v.owner)||void 0===i?void 0:i.follow_info)||void 0===o?void 0:o.follow_status,null===(a=null==v?void 0:v.owner)||void 0===a?void 0:a.id_str,c,s,null==r?void 0:r.uid,u])}(),{isDark:k}=(0,R.u)(),D=(0,n.useRef)({isDark:k});D.current={isDark:k};const F=(0,E.A)((()=>{y?h("follow",{max_time:0,hidden_banner:!0,channel_id:42,req_from:"pc_web_side_follow_default",content_type:1,device_type:t},d):g("follow",2)})),B=(0,a.OB)(!0),M=(0,E.A)((()=>{h("suggest",{req_from:"pc_web_suggested_host",max_time:0,hidden_banner:!0,channel_id:86,is_non_personalized:B?0:1,content_type:0,device_type:t},d)}));(0,n.useEffect)((()=>{let t=0;const i=()=>{"follow"===e?F():"suggest"===e&&M(),t=window.setTimeout((()=>{i()}),3e4)};return i(),()=>{clearTimeout(t)}}),[]);const N=(0,n.useCallback)(((e,t)=>{var o,n,a,d,c,u;(null===(n=null===(o=null==e?void 0:e.data)||void 0===o?void 0:o.owner)||void 0===n?void 0:n.verified)&&r.mx.handleShowVerifiedIcon(Object.assign(Object.assign({},x),{show_type:"suggested_host",live_type:"third_party",action_type:"click",admin_type:"viewer"})),e.data&&r.mx.handleLiveEntranceShow(Object.assign(Object.assign({},function(e){var t,i,o,n,a,s;return{enter_method:"others",enter_from_merge:"others",hashtag_id:String(null!==(i=null===(t=null==e?void 0:e.hashtag)||void 0===t?void 0:t.id)&&void 0!==i?i:""),anchor_id:null===(o=null==e?void 0:e.owner)||void 0===o?void 0:o.id_str,room_id:e.id_str,live_type:(0,r.FP)(e.live_room_mode),follow_status:null!==(s=null===(a=null===(n=e.owner)||void 0===n?void 0:n.follow_info)||void 0===a?void 0:a.follow_status)&&void 0!==s?s:0,action_type:"click"}}(e.data)),{is_top_room:i.has((null===(a=e.data)||void 0===a?void 0:a.id_str)||"")?s.qw.pin:s.qw.common,is_top_tab:(null===(d=null==l?void 0:l.teaParams)||void 0===d?void 0:d.is_top_tab)||s.qw.common,is_tab_icon:(null===(c=null==l?void 0:l.teaParams)||void 0===c?void 0:c.is_tab_icon)||s.qw.common,rec_no:t,enter_method:"suggested_others_photo",enter_from_merge:f,feed_type:String(e.type),entrance_detail:"others",request_id:e.rid,is_dark_mode:D.current.isDark?"1":"0",is_multi_stream_room:(null===(u=e.data)||void 0===u?void 0:u.multi_stream_url)?"1":"0"}))}),[x,l]),[q,U]=(0,n.useState)([]);return(0,n.useEffect)((()=>{U(c)}),[c]),{loading:[0,1].includes(null!=u?u:2),renderData:q,handleItemVisible:N,switchRenderItem:()=>{const e=q.slice(0,_.H+1),t=q.slice(_.H+1);U(t.concat(e));const{enter_from:i,page_name:o}=P.f.commonParams;A.handleBackClick({enter_from_merge:f,enter_method:"suggested_others_photo",page_name:o,enter_from:i,ops_type:"click"})}}}},16109:(e,t,i)=>{"use strict";i.d(t,{Q:()=>c});var o=i(58632),n=i(64162),a=i(4126),r=i(93995),s=i(9782);const l=e=>2===(null==e?void 0:e.room_layout)&&Boolean(null==e?void 0:e.official_channel),d=e=>{var t,i;if(!(null==e?void 0:e.content))return;const o=JSON.parse(e.content||"{}"),{donation_link:n,desc:a,name:r,organization_id:s}=o;return{donationUrl:n,name:r,iconUrl:null===(i=null===(t=o.icon)||void 0===t?void 0:t.url_list)||void 0===i?void 0:i[0],organization_id:s,desc:a}};let c=class extends n.E{constructor(){super(...arguments),this.defaultState={loadingState:{enterRoom:0},roomInfo:null,anchorId:"",secAnchorId:"",anchorUniqueId:"",roomId:"",hotLiveRoomInfo:null,donationSticker:void 0,liveType:"video_live",reportLinkType:"normal_video_live",enterRoomWithSSR:!1,playMode:"webpage",isGuestConnection:!1,isMultiGuestRoom:!1,showLiveChat:!0,enableChat:!0,isAnswerRoom:!1,isGateRoom:!1,isOfficialChannelRoom:!1,chatWarningText:void 0,requestId:void 0,anchorStatus:void 0,enterRoomMessage:void 0,ntpDiff:0,followStatusMap:{},likeCount:0,userCount:0,totalUserCount:0,programLiveTopFrameSummary:void 0,isLandscapeRoom:!1}}setNtpDiff(e,t){e.ntpDiff=t}setRequestId(e,t){e.requestId=t}setDonationSticker(e,t){e.donationSticker=t}setShowLiveChatWarning(e,t){e.chatWarningText=t}setIsAnswerRoom(e,t){e.isAnswerRoom=t}setIsOfficialChannelRoom(e,t){return Object.assign(Object.assign({},e),{isOfficialChannelRoom:t,reportLinkType:t?"video_anchor_order":e.reportLinkType})}setRoomInfo(e,t){var i,o,n,a,r,c,u,p,v,_,h,m,g,f,b,y,x;const k={anchorId:null!==(o=null===(i=null==t?void 0:t.owner)||void 0===i?void 0:i.id_str)&&void 0!==o?o:"",secAnchorId:null!==(a=null===(n=null==t?void 0:t.owner)||void 0===n?void 0:n.sec_uid)&&void 0!==a?a:"",anchorUniqueId:null!==(c=null===(r=null==t?void 0:t.owner)||void 0===r?void 0:r.display_id)&&void 0!==c?c:"",roomId:null!==(u=null==t?void 0:t.id_str)&&void 0!==u?u:"",liveType:(0,s.FP)(null==t?void 0:t.live_room_mode),roomInfo:t,isAnswerRoom:Boolean(null==t?void 0:t.support_quiz),isGateRoom:Boolean(null==t?void 0:t.is_gated_room),enableChat:Boolean(null===(v=null===(p=null==t?void 0:t.room_auth)||void 0===p?void 0:p.Chat)||void 0===v||v),donationSticker:d(null===(_=null==t?void 0:t.deco_list)||void 0===_?void 0:_[0]),likeCount:null!==(h=null==t?void 0:t.like_count)&&void 0!==h?h:0,userCount:Number(null!==(m=null==t?void 0:t.user_count)&&void 0!==m?m:0),totalUserCount:Number(null!==(f=null===(g=null==t?void 0:t.stats)||void 0===g?void 0:g.total_user)&&void 0!==f?f:0),programLiveTopFrameSummary:null==t?void 0:t.top_frame_summary,isLandscapeRoom:1===(null===(b=null==t?void 0:t.room_auth)||void 0===b?void 0:b.Landscape),reportLinkType:(w=t,(e=>{var t;return!!(null===(t=null==e?void 0:e.link_mic)||void 0===t?void 0:t.battle_info)})(w)?"video_anchor_pk":(e=>{var t,i,o;return(null!==(o=null===(i=null===(t=null==e?void 0:e.social_interaction)||void 0===t?void 0:t.cohost)||void 0===i?void 0:i.linked_users)&&void 0!==o?o:[]).length>1})(w)?"video_anchor_connect":l(w)?"video_anchor_order":(e=>{var t,i,o,n,a;return(null!==(a=null===(n=null===(o=null===(i=null===(t=null==e?void 0:e.social_interaction)||void 0===t?void 0:t.multi_live)||void 0===i?void 0:i.room_multi_guest_linkmic_info)||void 0===o?void 0:o.multi_guest_linkmic_info)||void 0===n?void 0:n.linked_users)&&void 0!==a?a:[]).filter((e=>!!e.linkmic_id_str)).length>0})(w)?"video_anchor_guest_connect":"normal_video_live")};var w;if(t&&l(t)?k.isOfficialChannelRoom=!0:k.isOfficialChannelRoom=!1,(null==t?void 0:t.id_str)&&void 0===e.followStatusMap[null==t?void 0:t.id_str]){const i=null===(x=null===(y=t.owner)||void 0===y?void 0:y.follow_info)||void 0===x?void 0:x.follow_status;k.followStatusMap=Object.assign(Object.assign({},e.followStatusMap),{[t.id_str]:null!=i?i:0})}return Object.assign(Object.assign({},e),k)}setHotLiveRoomInfo(e,t){e.hotLiveRoomInfo=t}setEnterRoomWithSSR(e,t){e.enterRoomWithSSR=t}setEnterRoomMessage(e,t){e.enterRoomMessage=t}setPlayMode(e,t){e.playMode=t}setIsMultiGuestRoom(e,t){e.isMultiGuestRoom=t}setIsGuestConnection(e,t){e.isGuestConnection=t}setLoadingState(e,t){e.loadingState=Object.assign(Object.assign({},e.loadingState),t)}setReportLinkType(e,t){e.reportLinkType=t}setIsGateRoom(e,t){e.isGateRoom=t}multiSetState(e,t){return Object.assign(Object.assign({},e),t)}setLiveChat(e,t){e.showLiveChat=t}setFollowStatus(e,t){e.followStatusMap[t.roomId]=t.followStatus}setAnchorStatus(e,t){e.anchorStatus=t}setEnableChat(e,t){e.enableChat=t}setLiveLikeCount(e,t){e.likeCount=t}};(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Number]),(0,o.__metadata)("design:returntype",void 0)],c.prototype,"setNtpDiff",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",void 0)],c.prototype,"setRequestId",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",void 0)],c.prototype,"setDonationSticker",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",void 0)],c.prototype,"setShowLiveChatWarning",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Boolean]),(0,o.__metadata)("design:returntype",void 0)],c.prototype,"setIsAnswerRoom",null),(0,o.__decorate)([(0,a.HI)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Boolean]),(0,o.__metadata)("design:returntype",Object)],c.prototype,"setIsOfficialChannelRoom",null),(0,o.__decorate)([(0,a.HI)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",Object)],c.prototype,"setRoomInfo",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",void 0)],c.prototype,"setHotLiveRoomInfo",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Boolean]),(0,o.__metadata)("design:returntype",void 0)],c.prototype,"setEnterRoomWithSSR",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",void 0)],c.prototype,"setEnterRoomMessage",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,String]),(0,o.__metadata)("design:returntype",void 0)],c.prototype,"setPlayMode",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Boolean]),(0,o.__metadata)("design:returntype",void 0)],c.prototype,"setIsMultiGuestRoom",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Boolean]),(0,o.__metadata)("design:returntype",void 0)],c.prototype,"setIsGuestConnection",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",void 0)],c.prototype,"setLoadingState",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,String]),(0,o.__metadata)("design:returntype",void 0)],c.prototype,"setReportLinkType",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Boolean]),(0,o.__metadata)("design:returntype",void 0)],c.prototype,"setIsGateRoom",null),(0,o.__decorate)([(0,a.HI)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",Object)],c.prototype,"multiSetState",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Boolean]),(0,o.__metadata)("design:returntype",void 0)],c.prototype,"setLiveChat",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",void 0)],c.prototype,"setFollowStatus",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",void 0)],c.prototype,"setAnchorStatus",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Boolean]),(0,o.__metadata)("design:returntype",void 0)],c.prototype,"setEnableChat",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Number]),(0,o.__metadata)("design:returntype",void 0)],c.prototype,"setLiveLikeCount",null),c=(0,o.__decorate)([(0,r.n)("CurrentRoom")],c)},19824:(e,t,i)=>{"use strict";i.d(t,{T:()=>b});var o=i(58632),n=i(64162),a=i(4126),r=i(93995),s=i(8536),l=i(23999),d=i(24451),c=i(46657),u=i(26324),p=i(54888),v=i(7672),_=i(58305);let h=class{constructor(){this.getAutoDefinitionSelectKey=()=>(0,_._S)("auto_definition_selected_key"),this.setDefinitionSelectKey=e=>(0,_.AP)("definition_selected_key",e),this.getDefinitionSelectKey=()=>(0,_._S)("definition_selected_key"),this.setHideDefinitionRedDot=()=>(0,_.AP)("hide_definition_red_dot","1"),this.getHideDefinitionRedDot=()=>"1"===(0,_._S)("hide_definition_red_dot","0"),this.setMuted=e=>(0,_.AP)("live_player_muted",String(e)),this.getMuted=()=>"1"===(0,_._S)("live_player_muted"),this.setVolume=e=>(0,_.AP)("live_player_volume",e.toString()),this.getVolume=()=>{let e=Number((0,_._S)("live_player_volume","60"));return(e<0||e>1e3||isNaN(e))&&(e=60),e},this.setDailyFrequencyControlCount=(e,t)=>{const i=new Date,o=`${i.getFullYear()}${i.getMonth()}${i.getDate()}`;return(0,_.AP)(e,`${o}-${t.toString()}`)},this.getDailyFrequencyControlCount=e=>{const t=new Date,i=`${t.getFullYear()}${t.getMonth()}${t.getDate()}`,o=(0,_._S)(e);if(!o)return 0;const[n,a]=o.split("-");return n===i?Number(a):0}}};h=(0,o.__decorate)([(0,v._)()],h);var m=i(85722),g=i(58562),f=i(16109);let b=class extends n.E{constructor(e,t,i){super(),this.bizContext=e,this.roomModule=t,this.livePlayerStorage=i,this.defaultState={supportDefinition:!1,streamId:"",streamItems:[],currentDefinitionKey:"auto",abrDefinitionLabel:"",abrDefinitionKey:void 0,abrBitrate:0,networkStatus:"normal",canUpdateActiveStream:!0,isFatal:!1,fatalType:0,needDestroyPlayer:!1,isHevcSoftDecode:!1,isNonStreaming:!1}}setHevcSoftDecode(e,t){e.isHevcSoftDecode=t}setStreamId(e,t){e.streamId=t}setNetworkStatus(e,t){e.networkStatus=t}setStreamInfo(e,t){e.streamItems=t}clearStreamInfo(e){e.streamItems=[],e.abrDefinitionLabel="",e.isFatal=!1,e.streamId=""}setActiveStream(e,t){const{key:i,url:o}=t;e.streamItems=e.streamItems.map((e=>Object.assign(Object.assign({},e),{isActive:i===e.sdkKey,activeUrl:o})))}setCurrentDefinitionKey(e,t){e.currentDefinitionKey=t}setAbrDefinitionLabel(e,t){e.abrDefinitionLabel=t}setAbrDefinitionKey(e,t){e.abrDefinitionKey=t}setAbrBitrate(e,t){e.abrBitrate=t}setFatalType(e,t){e.fatalType=t}setIsFatal(e,t){e.isFatal=t,e.needDestroyPlayer=t}setNeedDestroyPlayer(e,t){e.needDestroyPlayer=t}setIsNonStreaming(e,t){e.isNonStreaming=t}multiSetState(e,t){return Object.assign(Object.assign({},e),t)}updateAbrDefinition(e){return e.pipe((0,s.Z)((e=>{var t,i;return(0,l.of)(this.getActions().multiSetState({abrDefinitionLabel:null!==(t=null==e?void 0:e.definition)&&void 0!==t?t:"",abrDefinitionKey:null==e?void 0:e.sdkKey,abrBitrate:null!==(i=null==e?void 0:e.bitrate)&&void 0!==i?i:0}))})))}updateDefinition(e){return e.pipe((0,d.E)(this.state$,this.bizContext.state$),(0,s.Z)((([e,t])=>{var i,o,n,a;if("auto"===e){const n=[this.getActions().setCurrentDefinitionKey(e)],a=(0,g.J4)(t.streamItems),r=(0,g.MD)(t.streamItems);if("origin"===(null==a?void 0:a.sdkKey)&&r){const e=t.streamItems[1],a={key:null!==(i=e.sdkKey)&&void 0!==i?i:"",url:null!==(o=null==e?void 0:e.url.mainFLV)&&void 0!==o?o:""};n.push(this.getActions().setActiveStream(a),this.getActions().updateAbrDefinition(e))}return(0,l.of)(...n)}{const i=(0,g.aZ)(t.streamItems,e),o={key:null!==(n=null==i?void 0:i.sdkKey)&&void 0!==n?n:"",url:null!==(a=null==i?void 0:i.url.mainFLV)&&void 0!==a?a:""},r=[this.getActions().setCurrentDefinitionKey(e),this.getActions().setActiveStream(o),this.getActions().updateAbrDefinition(i)];return(0,l.of)(...r)}})))}updateDefinitionByBitrate(e){return e.pipe((0,d.E)(this.state$),(0,s.Z)((([e,t])=>{const i=(0,g.jo)(t.streamItems,e);return(null==i?void 0:i.sdkKey)?(0,l.of)(this.getActions().updateAbrDefinition(i)):c.w})))}getDefaultStreamConfig(e,t){var i,o,n,a,r,s;const{streamData:l}=(0,g.XA)(e),d=null!==(o=null===(i=null==e?void 0:e.options)||void 0===i?void 0:i.qualities)&&void 0!==o?o:[];let c=null===(a=null===(n=null==e?void 0:e.options)||void 0===n?void 0:n.default_quality)||void 0===a?void 0:a.sdk_key;const u=d.length>0,p=this.livePlayerStorage.getDefinitionSelectKey(),v=""===p?"auto":p;(0,m.lV)()&&"auto"===v&&(c=this.livePlayerStorage.getAutoDefinitionSelectKey()||c);const _=(0,g.Ay)((0,g.e8)(l,d)),h=(0,g.MD)(_)&&"origin"===c;let f;f="auto"===v?h?"uhd_60":c:v;const b=(0,g.aZ)(_,f,!0),y=null!==(s=null!==(r=null==b?void 0:b.sdkKey)&&void 0!==r?r:c)&&void 0!==s?s:"origin";return{supportDefinition:u,currentDefinitionKey:"auto"===v?"auto":y,streamItems:_.map((e=>(e.sdkKey===y&&(e.isActive=!0,e.activeUrl=t?null==e?void 0:e.url.mainHLS:null==e?void 0:e.url.mainFLV),e))),defaultActiveStream:b}}updateRoomStream(e){return e.pipe((0,d.E)(this.bizContext.state$),(0,s.Z)((([e,t])=>{var i,o,n;const{streamId:a,pullData:r}=e;if(!r)return(0,l.of)();const{supportDefinition:s,streamItems:d,currentDefinitionKey:c,defaultActiveStream:u}=this.getDefaultStreamConfig(r,Boolean(null===(i=t.bizContext)||void 0===i?void 0:i.isIOS));return(0,l.of)(this.getActions().multiSetState({isFatal:!1,supportDefinition:s,streamId:null!=a?a:"",currentDefinitionKey:c,streamItems:d,abrDefinitionLabel:null!==(o=null==u?void 0:u.definition)&&void 0!==o?o:"",abrDefinitionKey:null==u?void 0:u.sdkKey,abrBitrate:null!==(n=null==u?void 0:u.bitrate)&&void 0!==n?n:0}))})))}changeAvailableStream(e){return e.pipe((0,d.E)(this.bizContext.state$),(0,s.Z)((([e,t])=>{var i;const o=Boolean(null===(i=t.bizContext)||void 0===i?void 0:i.isIOS),n=this.state.streamItems.map((e=>e.isActive?Object.assign(Object.assign({},e),{pullFailedCount:e.pullFailedCount+1}):e)),a="auto"===this.state.currentDefinitionKey,r=[],s=(0,g.QC)(n,o),d=(0,g.J4)(s);return d?a?r.push(this.getActions().updateAbrDefinition(d)):r.push(this.getActions().setCurrentDefinitionKey(d.sdkKey)):r.push(this.getActions().setIsFatal(!0),this.roomModule.getActions().setPlayMode("webpage")),(0,l.of)(this.getActions().setStreamInfo(s),...r)})))}};(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Boolean]),(0,o.__metadata)("design:returntype",void 0)],b.prototype,"setHevcSoftDecode",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,String]),(0,o.__metadata)("design:returntype",void 0)],b.prototype,"setStreamId",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,String]),(0,o.__metadata)("design:returntype",void 0)],b.prototype,"setNetworkStatus",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Array]),(0,o.__metadata)("design:returntype",void 0)],b.prototype,"setStreamInfo",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object]),(0,o.__metadata)("design:returntype",void 0)],b.prototype,"clearStreamInfo",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",void 0)],b.prototype,"setActiveStream",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,String]),(0,o.__metadata)("design:returntype",void 0)],b.prototype,"setCurrentDefinitionKey",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,String]),(0,o.__metadata)("design:returntype",void 0)],b.prototype,"setAbrDefinitionLabel",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",void 0)],b.prototype,"setAbrDefinitionKey",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Number]),(0,o.__metadata)("design:returntype",void 0)],b.prototype,"setAbrBitrate",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Number]),(0,o.__metadata)("design:returntype",void 0)],b.prototype,"setFatalType",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Boolean]),(0,o.__metadata)("design:returntype",void 0)],b.prototype,"setIsFatal",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Boolean]),(0,o.__metadata)("design:returntype",void 0)],b.prototype,"setNeedDestroyPlayer",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Boolean]),(0,o.__metadata)("design:returntype",void 0)],b.prototype,"setIsNonStreaming",null),(0,o.__decorate)([(0,a.HI)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",Object)],b.prototype,"multiSetState",null),(0,o.__decorate)([(0,a.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[u.c]),(0,o.__metadata)("design:returntype",u.c)],b.prototype,"updateAbrDefinition",null),(0,o.__decorate)([(0,a.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[u.c]),(0,o.__metadata)("design:returntype",u.c)],b.prototype,"updateDefinition",null),(0,o.__decorate)([(0,a.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[u.c]),(0,o.__metadata)("design:returntype",u.c)],b.prototype,"updateDefinitionByBitrate",null),(0,o.__decorate)([(0,a.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[u.c]),(0,o.__metadata)("design:returntype",u.c)],b.prototype,"updateRoomStream",null),(0,o.__decorate)([(0,a.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[u.c]),(0,o.__metadata)("design:returntype",u.c)],b.prototype,"changeAvailableStream",null),b=(0,o.__decorate)([(0,r.n)("Stream"),(0,o.__metadata)("design:paramtypes",[p.$,f.Q,h])],b)},58562:(e,t,i)=>{"use strict";i.d(t,{MD:()=>m,J4:()=>b,QC:()=>x,aZ:()=>y,Ay:()=>f,jo:()=>k,XA:()=>p,e8:()=>g});var o=i(75741),n=i.n(o),a=i(4474),r=i(97086),s=i(79345);const l=2e6,d=Object.freeze(["auto","origin","uhd_60","uhd","hd_60","hd","sd","ld"]),c=2;var u=i(85722);function p(e){var t,i;try{const o={common:{},data:{}},n=JSON.parse(null!==(t=null==e?void 0:e.stream_data)&&void 0!==t?t:"");if(o.common=n.common,n.data)for(const e in n.data){if(n.data[e].main){const t=JSON.parse(n.data[e].main.sdk_params);o.data[e]={},o.data[e].main=n.data[e].main,o.data[e].main.sdk_params=t}if(n.data[e].backup){const t=JSON.parse(n.data[e].backup.sdk_params);o.data[e]=null!==(i=o.data[e])&&void 0!==i?i:{},o.data[e].backup=n.data[e].backup,o.data[e].backup.sdk_params=t}}return{streamData:o}}catch(e){return{streamData:{}}}}function v(e,t){return t?(0,a.stringifyUrl)({url:e,query:{_session_id:`${t}.${Date.now()}`}}):e}function _(e){var t,i;return!e||(0,r.fU)()||"4g"!==(null===(i=null===(t=null===window||void 0===window?void 0:window.navigator)||void 0===t?void 0:t.connection)||void 0===i?void 0:i.effectiveType)?e:(0,a.stringifyUrl)({url:e,query:{abr_pts:"-2800"}})}function h({url:e,key:t,title:i,isSameBitrate:o,hasUhd:n}){const a=e.includes("/stage/");if(!(a&&"hd"===t&&o&&n))return a&&"uhd"===t?{title:s.qt.hd,key:"hd"}:{title:i,key:t}}function m(e){return Boolean(e)}function g(e,t){var i,o,n,a,r,d,c,p,m,g,f,b,y,x;const k=[],w=e.common.session_id,S=(null===(a=null===(n=null===(o=null===(i=e.data)||void 0===i?void 0:i.uhd)||void 0===o?void 0:o.main)||void 0===n?void 0:n.sdk_params)||void 0===a?void 0:a.vbitrate)===(null===(p=null===(c=null===(d=null===(r=e.data)||void 0===r?void 0:r.hd)||void 0===d?void 0:d.main)||void 0===c?void 0:c.sdk_params)||void 0===p?void 0:p.vbitrate),C=!!(null===(m=e.data)||void 0===m?void 0:m.uhd);for(const[i,o]of Object.entries(e.data)){let e=i,n=null!==(f=null===(g=t.find((e=>e.sdk_key===i)))||void 0===g?void 0:g.name)&&void 0!==f?f:s.qt[i];if(!n)continue;let a=o.main.sdk_params.vbitrate;if("origin"===i&&(a=l),!(0,u.L5)()){const t=h({url:o.main.flv,key:e,title:n,isSameBitrate:S,hasUhd:C});if(!t)continue;e=t.key,n=t.title}k.push({sdkKey:e,definition:n,bitrate:a,url:{mainFLV:_(v(o.main.flv,w)),mainHLS:o.main.hls,backupFLV:(null===(b=o.backup)||void 0===b?void 0:b.flv)?_(v(null===(y=o.backup)||void 0===y?void 0:y.flv,w)):"",backupHLS:null===(x=o.backup)||void 0===x?void 0:x.hls},activeUrl:"",vCodecKey:o.main.sdk_params.VCodec,isActive:!1,pullFailedCount:0})}return k}function f(e){return n()(e,(e=>d.indexOf(e.sdkKey)))}function b(e){return e.find((e=>e.isActive))}function y(e,t,i){const o=e.map((e=>e.sdkKey));let n=o[0];if(t&&o.includes(t))n=t;else if(i&&t){const e=Object.keys(s.qt);let i=t;for(;-1===o.indexOf(i);){const t=e.indexOf(i);i=e[t+1],i||(i=o[o.length-1])}i!==t&&(n=i)}const a=function(e,t){return e.find((e=>e.sdkKey===t))}(e,n);return a||(console.error(`[stream] getMainStream: no stream found by ${t}`),null)}function x(e,t){let i,o=0;const n=c;for(;!i&&oe.pullFailedCount>0&&e.pullFailedCount0===e.pullFailedCount))),o++;if(i){const o=t?null==i?void 0:i.url.backupHLS:null==i?void 0:i.url.backupFLV,n=t?null==i?void 0:i.url.mainHLS:null==i?void 0:i.url.mainFLV,a=o&&i.pullFailedCount>0?o:n;return function(e,t,i){return e.map((e=>Object.assign(Object.assign({},e),{isActive:t===e.sdkKey,activeUrl:i})))}(e,i.sdkKey,a)}return e.map((e=>Object.assign(Object.assign({},e),{isActive:!1})))}function k(e,t){return e.find((e=>e.bitrate===t))}},96141:(e,t,i)=>{"use strict";i.d(t,{nO:()=>d,ur:()=>c,vn:()=>u});var o=i(42230),n=i(14374),a=i(31209),r=i(43723);const s=(0,n._)((0,r.p)("appPromotionAtom@tiktok/webapp-atoms",{isPwaInstallable:!1,isModalShow:!1,isExpand:!1}),{rehydrationKey:"webapp.appPromotion"});let l;const{useAtomService:d,useServiceDispatchers:c,useServiceState:u,getStaticApi:p}=(0,a.i)(s,((e,t)=>({storeDeferredPrompt(e){l=e},setIsPwaInstallable(e){t(s,(t=>Object.assign(Object.assign({},t),{isPwaInstallable:e})))},setIsModalShow(e){t(s,(t=>Object.assign(Object.assign({},t),{isModalShow:e})))},setIsExpand(e){t(s,(t=>Object.assign(Object.assign({},t),{isExpand:e})))},handleShowSnack(e){o.R.handleShowSnack(e)},handleClickDownload(){o.R.handleClickDownload()},handleInstallationClick(){return e=this,t=void 0,n=function*(){if(o.R.handleGetForPC(),!l)return;l.prompt();const e=yield l.userChoice;return"accepted"===e.outcome?o.R.handleInstallApp():console.warn("choice result outcome is not accepted"),"accepted"===e.outcome?this.setIsPwaInstallable(!1):void 0},new((i=void 0)||(i=Promise))((function(o,a){function r(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,s)}l((n=n.apply(e,t||[])).next())}));var e,t,i,n}})))},91872:(e,t,i)=>{"use strict";i.d(t,{O:()=>a});var o=i(40099),n=i(90159);function a({elementRef:e,threshold:t=1e3,onHitBottom:i,onPageBottom:a,shouldRunOnMount:r,onScroll:s}){const l=(0,o.useRef)(null),d=(0,o.useRef)(0),c=(0,o.useRef)(-1),u=(0,o.useRef)(!r),p=(0,o.useCallback)((()=>{"undefined"!=typeof window&&c.current>-1&&(window.clearInterval(c.current),c.current=-1)}),[]),v=(0,n._g)((()=>{var o,n,r,c,v,_;if(!l)return;let h,m;if(e)h=null!==(n=null===(o=e.current)||void 0===o?void 0:o.scrollTop)&&void 0!==n?n:0,m=(null!==(c=null===(r=e.current)||void 0===r?void 0:r.scrollHeight)&&void 0!==c?c:0)-(null!==(_=null===(v=e.current)||void 0===v?void 0:v.clientHeight)&&void 0!==_?_:0)-h;else{const e=document.documentElement||document.body.parentNode||document.body;h=void 0!==window.pageYOffset?window.pageYOffset:e.scrollTop,m=e.scrollHeight-h-window.innerHeight}0!==h&&(null==s||s(h)),!u.current&&m>0&&p(),m-t<=0&&d.current<=h&&(null==i||i(),!u.current&&p()),m<=-60&&h-d.current>=18&&(null==a||a()),d.current=h}),[i,t,a,e,p],100),_=(0,o.useRef)(v);return _.current=v,(0,o.useEffect)((()=>{if(r&&-1===c.current)return c.current=window.setInterval((()=>{var e;null===(e=_.current)||void 0===e||e.call(_)}),100),p}),[]),(0,o.useEffect)((()=>{var t;const i=null!==(t=null==e?void 0:e.current)&&void 0!==t?t:window;return i.addEventListener("scroll",v),()=>{i.removeEventListener("scroll",v)}}),[v,e]),l}},89076:(e,t,i)=>{"use strict";i.d(t,{K:()=>c});var o=i(67823),n=i(40099),a=i(243),r=i.n(a),s=i(4929),l=i(51391),d=i(5441);function c(){const{isElectronApp:e}=(0,d.B)();return(0,n.useCallback)((({lang:t,url:i,currentLang:n,isMobile:a})=>{!function({lang:e,url:t,currentLang:i,isMobile:n}){l.j.handleLanguageChange({language:i,to_language:e,enter_method:n?"top_bar":void 0}),o.A.remove(s.WU),o.A.set(s.WU,e,{secure:!0,expires:300,domain:".tiktok.com"}),window.location.replace(t)}({lang:t,url:i,currentLang:n,isMobile:a}),e&&r().app.langChange({lang:t})}),[e])}},38812:(e,t,i)=>{"use strict";i.d(t,{BL:()=>r,CW:()=>d,FS:()=>a,Y:()=>l,fb:()=>n,pI:()=>s});var o=i(93341);const n=(e,t,i)=>(0,o.MY)((o=>{var n;return(null===(n=o.currentVideo)||void 0===n?void 0:n.mode)===e&&o.currentVideo.id===t&&o.currentVideo.index===i})),a=e=>{const t=(0,o.nU)(e),i=(0,o.RT)();return t&&0===i},r=()=>{var e,t,i;return null!==(i=null===(t=null===(e=(0,o.LM)().getStaticPlayerState())||void 0===e?void 0:e.currentVideo)||void 0===t?void 0:t.index)&&void 0!==i?i:0},s=()=>{var e,t,i;return null!==(i=null===(t=null===(e=(0,o.LM)().getStaticPlayerState())||void 0===e?void 0:e.prevVideo)||void 0===t?void 0:t.index)&&void 0!==i?i:0},l=()=>{var e,t,i;return null!==(i=null===(t=null===(e=(0,o.LM)().getStaticPlayerState())||void 0===e?void 0:e.currentVideo)||void 0===t?void 0:t.id)&&void 0!==i?i:"0"},d=()=>{var e,t,i;return null!==(i=null===(t=null===(e=(0,o.LM)().getStaticPlayerState())||void 0===e?void 0:e.prevVideo)||void 0===t?void 0:t.id)&&void 0!==i?i:"0"}},54344:(e,t,i)=>{"use strict";i.d(t,{W:()=>x});var o=i(58632),n=i(24643),a=i(40099),r=i(62186),s=i(75431),l=i(92846);const d="900ms",c=(0,s.i7)({"0%":{transform:"scale(1)"},"50%":{transform:"scale(.9)"},"100%":{transform:"scale(1)"}}),u=(0,s.i7)({"0%":{transform:"scale(1)"},"40%":{transform:"scale(1.1)"},"45%":{transform:"scale(1.11)"},"95%":{transform:"scale(1)"},"100%":{transform:"scale(1)"}}),p=(0,r.default)("div",{target:"e7u9pde0"})((({showRing:e=!0,theme:t,isAnimating:i=!1})=>({borderRadius:"50%",display:"flex",justifyContent:"center",alignItems:"center",position:"relative",borderWidth:1,borderStyle:"solid",width:"100%",height:"100%",borderColor:e&&!i?t.colors.Primary:"transparent","::after":i?{content:'""',position:"absolute",borderRadius:"50%",top:0,left:0,right:0,bottom:0,border:"1px solid #FF0050",animation:`${u} ${d} ease-out infinite`}:{}})),"label:DivContainer;"),v=(0,r.default)("div",{target:"e7u9pde1"})((({isAnimating:e=!1,isShowLive:t=!1})=>[{overflow:"hidden",borderRadius:"50%",width:t?"90%":"100%",height:t?"90%":"100%",display:"flex",justifyContent:"center",alignItems:"center",position:"relative"},e?{animation:`${c} ${d} ease-out infinite`}:null]),"label:DivAvatarWrapper;"),_=(0,r.default)(l.e,{target:"e7u9pde2"})((({enable:e,theme:{colors:t}})=>[{borderColor:t.LineSecondary,borderWidth:"0.5px",cursor:e?"pointer":"unset",backgroundColor:"rgba(136, 136, 136, 0.5)"}]),"label:StyledAvatar;"),h=(0,r.default)("span",{target:"e7u9pde3"})((({theme:e,isSmallerBadge:t})=>({width:t?"25px":"33px",height:t?"18px":"24px",borderRadius:"8px",position:"absolute",background:"linear-gradient(183.16deg, #FD1A69 8.16%, #EE3392 104.17%)",top:"-9px",left:"50%",transform:"translateX(-50%)",wordBreak:"keep-all",textAlign:"center",lineHeight:t?"28px":"36px",fontSize:t?"6px":"9px",color:e.colors.ConstTextInverse,fontWeight:500})),"label:SpanLiveBadge;");var m=i(60484),g=i(49057),f=i(71281),b=i(47172),y=i(8227);const x=function(e){var{className:t,isShowLive:i=!0,size:r=32,isShowLiveTag:s=!0,e2eTag:l,isSmallerBadge:d}=e,c=(0,o.__rest)(e,["className","isShowLive","size","isShowLiveTag","e2eTag","isSmallerBadge"]);const u=i?r-6:r,x=(0,m.L$)((0,g.W)((()=>["abTestVersion"]),[])),{abTestVersion:k}=x,w=(0,f.qt)(k,"webapp_live_avator_animation"),S=(0,b.useHistory)(),C=(0,a.useMemo)((()=>{const{pathname:e}=S.location,t=(0,b.matchPath)(e,{path:y.vI.liveRoom,exact:!0});return"v1"===w&&i&&!t}),[w,i,S]);return(0,n.jsx)(p,{isAnimating:C,size:r,className:t,"data-e2e":l,showRing:i,style:{width:r,height:r},children:(0,n.jsxs)(v,{isShowLive:i,isAnimating:C,children:[(0,n.jsx)(_,Object.assign({enable:!0,size:u},c,{isAnimating:C})),i&&s&&(0,n.jsx)(h,{isSmallerBadge:d,children:"LIVE"})]})})}},13990:(e,t,i)=>{"use strict";i.d(t,{Eq:()=>S,sg:()=>w,hK:()=>k});var o=i(58632),n=i(64162),a=i(4126),r=i(93995),s=i(340),l=i(35572),d=i(8536),c=i(23999),u=i(20259),p=i(26324),v=i(11983),_=i(64356),h=i(7672),m=i(55099);let g=class{constructor(e){this.fetch=e}checkUserStatusBeforeSwitchout(){return this.fetch.post("/api/ba/business/suite/account/quitcheck",{baseUrlType:2})}switchOutBusinessAccount(){return this.fetch.post("/api/ba/business/suite/account/off",{baseUrlType:2})}};var f,b;g=(0,o.__decorate)([(0,h._)(),(0,o.__metadata)("design:paramtypes",[m.p])],g),function(e){e.None="none",e.PersonalAccount="personal_account",e.ProAccount="pro_account"}(f||(f={})),function(e){e.None="none",e.SwitchConfirmModal="switch_confirm_modal",e.InvalidModal="invalid_modal"}(b||(b={}));const y=[3019001,3019002,3019003,3019018],x="Sorry, something wrong with the server, please try again.",k={3019001:"ttba_ob_switchouterr_title",3019002:"ttba_ob_switchouterr_title_lttfb",3019003:"ttba_ob_switchouterr_title_lmp",3019018:"ttba_ob_switchouterr_title_seller"},w={3019001:"ttba_ob_switchouterr_subtext",3019002:"ttba_ob_switchouterr_subtext_lttfb",3019003:"ttba_ob_switchouterr_subtext_lmp",3019018:"ttba_ob_switchouterr_subtext_seller"};let S=class extends n.E{constructor(e,t){super(),this.service=e,this.t=t,this.defaultState={switchedType:"none",businessAccountModalType:"none",invalidCode:0}}checkSwitchOut(e){return e.pipe((0,l.p)((()=>this.service.checkUserStatusBeforeSwitchout().pipe((0,d.Z)((({statusCode:e,statusMsg:t})=>{if(!y.includes(e)&&0!==e)return v.F.open({content:t,duration:3}),(0,c.of)(this.noop());const i=0===e?"switch_confirm_modal":"invalid_modal";return(0,c.of)(this.getActions().setInvalidCode(e),this.getActions().setBusinessAccountModalType(i))})),this.catchError()))))}switchBusinessAccount(e){return e.pipe((0,l.p)((({action_type:e})=>this.service.switchOutBusinessAccount().pipe((0,d.Z)((({statusCode:t})=>0===t?(v.F.open({content:this.t("switched_to_personal"),duration:3}),(0,c.of)(this.getActions().setSwitchedType(0===e?"personal_account":"pro_account"),this.getActions().setBusinessAccountModalType("none"))):(v.F.open({content:this.t(x),duration:3}),(0,c.of)(this.noop())))),this.catchError()))))}setBusinessAccountModalType(e,t){e.businessAccountModalType=t}setInvalidCode(e,t){e.invalidCode=t}setSwitchedType(e,t){e.switchedType=t}catchError(){return(0,u.W)((()=>(v.F.open({content:this.t(x),duration:3}),(0,c.of)(this.noop()))))}};(0,o.__decorate)([(0,a.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[p.c]),(0,o.__metadata)("design:returntype",void 0)],S.prototype,"checkSwitchOut",null),(0,o.__decorate)([(0,a.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[p.c]),(0,o.__metadata)("design:returntype",void 0)],S.prototype,"switchBusinessAccount",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,String]),(0,o.__metadata)("design:returntype",void 0)],S.prototype,"setBusinessAccountModalType",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Number]),(0,o.__metadata)("design:returntype",void 0)],S.prototype,"setInvalidCode",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,String]),(0,o.__metadata)("design:returntype",void 0)],S.prototype,"setSwitchedType",null),S=(0,o.__decorate)([(0,r.n)("BusinessAccountModule"),(0,o.__param)(1,(0,s.y)(_.hp)),(0,o.__metadata)("design:paramtypes",[g,Function])],S)},51199:(e,t,i)=>{"use strict";i.d(t,{M:()=>d});var o=i(58632),n=i(4126),a=i(93995),r=i(53966),s=i(32329),l=i(34360);let d=class extends r.E{constructor(){super(),this.defaultState={redDotCount:0,hasVisitedFollowing:!1}}setRedDotCount(e,t){(0,s.yX)().setRedDotCount(t)}setHasVisitedFollowing(e,t){(0,s.yX)().setHasVisitedFollowing(t)}};d.jotaiAtom=s.VH,(0,o.__decorate)([(0,n.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Number]),(0,o.__metadata)("design:returntype",void 0)],d.prototype,"setRedDotCount",null),(0,o.__decorate)([(0,n.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Boolean]),(0,o.__metadata)("design:returntype",void 0)],d.prototype,"setHasVisitedFollowing",null),d=(0,o.__decorate)([(0,a.n)("FollowingRedDotModule"),(0,o.__metadata)("design:paramtypes",[])],d),s.VH.__SIGI_MODULE__=d,(0,l.y)(d)},72642:(e,t,i)=>{"use strict";i.d(t,{kK:()=>j,Tu:()=>C});var o=i(58632),n=i(4126),a=i(93995),r=i(53966),s=i(23999),l=i(26324),d=i(8536),c=i(95719),u=i(24451),p=i(35572),v=i(29039),_=i(34360),h=i(22248),m=i(55322),g=i(65729),f=i(88920),b=i(54888),y=i(51199),x=i(40858),k=i(7672),w=i(55099);let S=class{constructor(e){this.fetch=e}getNoticeCount(){return this.fetch.get("/api/notice/count/",{query:{source:7},baseUrlType:2})}getWebNoticeCount(){return this.fetch.get("/api/inbox/notice_count/",{baseUrlType:2})}};S=(0,o.__decorate)([(0,k._)(),(0,o.__metadata)("design:paramtypes",[w.p])],S);const C=509;let j=class extends r.E{constructor(e,t,i,o){super(),this.service=e,this.reportInboxService=t,this.bizContext=i,this.followingRedDotModule=o,this.defaultState={noticeCount:[],reportInbox:{noticeList:[],count:0},isFooterRequest:!1}}setNoticeCount(e,t){(0,v.wU)().setNoticeCount(t)}setIsFooterRequest(e,t){(0,v.wU)().setIsFooterRequest(t)}setReportInboxNoticeList(e,t){(0,v.wU)().setReportInboxNoticeList(t)}setReportInboxNoticeCount(e,t){(0,v.wU)().setReportInboxNoticeCount(t)}updateNoticeList(e){var t;if(0===e.status_code){let i=0;const{isRepostNoticeEnabled:o}=(0,f.Fl)(),n=(null!==(t=e.notice_count)&&void 0!==t?t:[]).filter((e=>(5===e.group&&e.count>0&&(i=e.count),!!(661===e.group||o&&e.group===C)||(0,x.Bl)().indexOf(e.group)>=0&&500!==e.group)));return(0,s.of)(this.getActions().setNoticeCount(n),this.getActions().setIsFooterRequest(!0),this.followingRedDotModule.getActions().setRedDotCount(i))}return(0,s.of)(this.noop())}fetchNoticeCount(e){return e.pipe((0,d.Z)((()=>this.service.getWebNoticeCount().pipe((0,c.M)((e=>{(0,h.G)(e.status_code,[0])})),(0,d.Z)((e=>this.updateNoticeList(e))),(0,m.n)({})))))}fetchReportInbox(e){return e.pipe((0,u.E)(this.bizContext.state$),(0,p.p)((([{region:e="",language:t=""},{bizContext:i}])=>this.reportInboxService.getReportNotices({request_tag_from:(null==i?void 0:i.isMobile)?"h5":"pc",carrier_region:e,sys_region:e,current_region:e,locale:t}).pipe((0,d.Z)((({notice_lists:e})=>{var t;if(!e)return[this.noop()];const{notice_list:i}=e[0];if(!i)return[this.noop()];const o=!1===(null===(t=i[0])||void 0===t?void 0:t.has_read)?1:0;return[this.getActions().setReportInboxNoticeList(i),this.getActions().setReportInboxNoticeCount(o)]})),(0,m.n)({})))))}};j.jotaiAtom=v.pz,(0,o.__decorate)([(0,n.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Array]),(0,o.__metadata)("design:returntype",void 0)],j.prototype,"setNoticeCount",null),(0,o.__decorate)([(0,n.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Boolean]),(0,o.__metadata)("design:returntype",void 0)],j.prototype,"setIsFooterRequest",null),(0,o.__decorate)([(0,n.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Array]),(0,o.__metadata)("design:returntype",void 0)],j.prototype,"setReportInboxNoticeList",null),(0,o.__decorate)([(0,n.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Number]),(0,o.__metadata)("design:returntype",void 0)],j.prototype,"setReportInboxNoticeCount",null),(0,o.__decorate)([(0,n.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[l.c]),(0,o.__metadata)("design:returntype",void 0)],j.prototype,"fetchNoticeCount",null),(0,o.__decorate)([(0,n.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[l.c]),(0,o.__metadata)("design:returntype",void 0)],j.prototype,"fetchReportInbox",null),j=(0,o.__decorate)([(0,a.n)("InboxTooltip"),(0,o.__metadata)("design:paramtypes",[S,g.o,b.$,y.M])],j),v.pz.__SIGI_MODULE__=j,(0,_.y)(j)},31922:(e,t,i)=>{"use strict";i.d(t,{$l:()=>w,Yy:()=>j,qT:()=>C});var o=i(58632),n=i(41271),a=i(40099),r=i(34099),s=i(4725),l=i(56070),d=i(27375),c=i(50970),u=i(72642),p=i(9350),v=i(53737),_=i(7089),h=i(32125),m=i(71281),g=i(88920),f=i(34012),b=i(47172),y=i(82715),x=i(25754),k=i(93608);function w(){var e,t;const i=(0,r.V)(),{user:d,encryptedWebid:u,lang:_,appType:h,abTestVersion:f,env:b,wid:y,$apiUrl:x,$wsUrl:k}=(0,n.P)(c.L,{dependencies:[],selector:e=>{var t,o,n,a,r,s;return{user:null===(t=e.appContext)||void 0===t?void 0:t.user,wid:null===(o=e.appContext)||void 0===o?void 0:o.wid,encryptedWebid:null===(n=e.appContext)||void 0===n?void 0:n.encryptedWebid,appType:null===(a=e.appContext)||void 0===a?void 0:a.appType,lang:e.lang,env:null===(r=e.appContext)||void 0===r?void 0:r.env,$apiUrl:i.imApi,$wsUrl:i.imFrontier,abTestVersion:null===(s=e.appContext)||void 0===s?void 0:s.abTestVersion}}}),w=(0,p.rp)(),S=(0,v._q)(),C="v2"===(null!==(e=(0,m.qt)(f,"web_dm_test_force_http"))&&void 0!==e?e:"v1"),j=(0,g.cV)(),I="v2"===(null!==(t=(0,m.qt)(f,"web_dm_enable_debug"))&&void 0!==t?t:"v1");(0,a.useEffect)((()=>{(()=>{(0,o.__awaiter)(this,void 0,void 0,(function*(){var e;yield l.h.init(_);const t=l.h.getRiskParams(0),i=(0,s.Ri)("msToken")||"";Object.keys(t).forEach((e=>{void 0!==t[e]?t[e]=String(t[e]):t[e]=""})),t.referer||(t.referer=window.location.href);const n={appId:1459,userId:null!==(e=null==d?void 0:d.uid)&&void 0!==e?e:"",secUid:null==d?void 0:d.secUid,deviceId:null!=y?y:"",appKey:"e1bd35ec9db7b8d846de66ed140b1ad9",fpId:9,method:1,apiUrl:x,inboxType:j?[0,1,3]:[0,3],acceptIncorrectInboxType:!0,frontierUrl:k,headers:Object.assign(Object.assign({},t),{from_appID:"1988",app_language:_,locale:_,app_name:"tiktok_web",channel:"web",user_agent:navigator.userAgent,"Web-Sdk-Ms-Token":i}),whaleQueryParams:{aid:"1988",version_code:"1.0.0",app_name:"tiktok_web",device_platform:"web_pc"},extended:{device_id:void 0,ttwid:window.decodeURIComponent(null!=u?u:""),"Web-Sdk-Ms-Token":i},timeout:5e3,disableInitPull:!0,serialSendFileMessage:!0,autoFetchUploadConfig:!0,sortByLocalIndex:!0,enableServerUnreadCount:!0,isStrangerRevamp:!0,eventListener:e=>(0,o.__awaiter)(this,void 0,void 0,(function*(){yield S.handleIMEvent(Object.assign(Object.assign({},e),{abTestVersion:f}))})),monitor:{emitMetrics(e,t={},i={}){if(!window.SlardarClient||"network.request"!==e||"1"!==i.inbox_type)return;const{imsdk_cmd:o,conversation_id:n,error_code:a,inbox_type:r,logid:s}=i;window.SlardarClient.sendEvent({name:"im_request",categories:{imsdk_cmd:o,conversation_id:n,error_code:a,inbox_type:r,logid:s},metrics:Object.assign({count:1},t)})}}};Object.assign(n,{debug:!1,service:5,withCredentials:!0}),C&&(n.webSocketLevel=3),yield w.initSdk(n,f),yield S.startConversationChange(),S.initWebDMLocalStorage(n.secUid)}))})()}),[h,null==b?void 0:b.name,null==d?void 0:d.secUid,null==d?void 0:d.uid,y,u,_,x,k,f,S,w,C,j,I])}const S=/^\(\d+\+?\)/;function C(){const e=(0,v.VB)((e=>e.messageCount),h.bN),t=(0,n.P)(u.kK,{dependencies:[],selector:e=>e.noticeCount.reduce(((e,{count:t})=>e+t),0)}),i=(0,a.useMemo)((()=>e+t),[e,t]);(0,a.useEffect)((()=>{if(i>0){const e=(0,d.lH)(i);S.test(document.title)?document.title=document.title.replace(S,`(${e})`):document.title=`(${e})${document.title}`}else document.title=document.title.replace(S,"")}),[i])}const j=({setCanUseBcVisible:e})=>{var t;const{pathname:i}=(0,b.useLocation)(),o=(0,b.useHistory)(),{language:r,abTestVersion:s}=(0,n.P)(c.L,{selector:({appContext:e})=>{const{language:t,abTestVersion:i}=null!=e?e:{};return{language:t,abTestVersion:i}},dependencies:[]}),{path:l,target:d}=(0,f._Y)(r),u=i.startsWith("/message"),[{businessPermission:p,businessAccountInfoResponse:g},w]=(0,_.hG)((e=>({businessPermission:e.businessPermission,businessAccountInfoResponse:e.businessAccountInfoResponse})),h.bN),S=(0,v.VB)((e=>e.messageCount),h.bN),C="v2"===(null!==(t=(0,m.qt)(s,"web_dm_icon_click_check"))&&void 0!==t?t:"v1");(0,a.useEffect)((()=>{w.getBusinessPermissionList()}),[w]),(0,a.useEffect)((()=>{p.comment&&p.message&&w.getBusinessAccountInfoResponse()}),[p,w]);const j=(0,a.useCallback)((t=>{var n;if(t.preventDefault(),p.message&&(null===(n=g.data)||void 0===n?void 0:n.can_use_bc))g.data.has_bc?(k.f.event("webtt_bc_dm_open"),(()=>{var t;const o=i===y.OZ.messages,n=null===(t=g.data)||void 0===t?void 0:t.redirect_url;n&&(o?location.href=n:window.open(n),e(!1))})()):e(!0);else if("_blank"===d)window.open(l,"_blank");else{if(C&&u)return;i.startsWith("/coin")?window.location.href=l:o.push(l)}x.w.handleEnterChatList(S)}),[S,g,p,u,C,d]);return j}},77181:(e,t,i)=>{"use strict";i.d(t,{oL:()=>j});var o=i(24643),n=i(40099),a=i(47172),r=i(25616),s=i(93608),l=i(68159),d=i(82715),c=i(88091),u=i(40422),p=i(30543),v=i(62186);const _=v.default.div` padding: 1.5rem; /* 24px */ display: flex; justify-content: space-between; gap: 0.75rem; /* 12px */ `,h=v.default.div` flex-shrink: 0; width: 2rem; /* 32px */ height: 2rem; /* 32px */ cursor: pointer; & > svg { width: 100%; height: 100%; } `,m=v.default.div` display: flex; flex-direction: column; gap: 0.25rem; /* 4px */ font-size: 24px !important; line-height: 1.2 !important; font-weight: 500 !important; font-family: TikTokDisplayFont !important; `,g=(0,v.default)("div",{target:"eb49iru0"})((({theme:{colors:e}})=>({color:e.UIText1})),"label:Title;"),f=v.default.div` color: rgba(22, 24, 35, 0.75); font-size: 16px; line-height: 1.5; font-weight: normal; font-family: TikTokFont; `,b=v.default.div` display: flex; justify-content: space-between; padding: 1.5rem; `,y=v.default.div` display: flex; align-items: center; gap: 1rem; /* 16px */ `;function x(e){const{visible:t,title:i,subTitle:a,returnable:r,onReturn:s,closable:l=!0,onClose:d,children:v,footer:x,renderLeftFooter:k,renderRightFooter:w,okText:S,onCancel:C,onOk:j,cancelText:I,okButtonProps:T={},cancelButtonProps:L={}}=e,{isOpen:O,transitionStatus:R,open:E,close:P}=(0,c.eb)({onClose:d});return(0,n.useEffect)((()=>{t?E():P()}),[t]),(0,o.jsxs)(c.nO,{isOpen:O,transitionStatus:R,open:E,close:P,width:"Medium",height:"Compact",children:[(0,o.jsxs)(_,{children:[r&&(0,o.jsx)(h,{onClick:s,children:(0,o.jsx)(u.A,{})}),(0,o.jsxs)(m,{children:[(0,o.jsx)(g,{children:i}),!!a&&(0,o.jsx)(f,{children:a})]}),l&&(0,o.jsx)(h,{onClick:()=>P(),children:(0,o.jsx)(p.A,{})})]}),(0,o.jsx)(c.Qx,{color:"LineSecondary"}),v,x||(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(c.Qx,{color:"LineSecondary"}),(0,o.jsxs)(b,{children:[(0,o.jsx)("div",{children:k}),(0,o.jsx)(y,{children:w||(0,o.jsxs)(o.Fragment,{children:[I&&(0,o.jsx)(c.I0,Object.assign({size:"medium",label:I,onClick:C},L)),S&&(0,o.jsx)(c.I0,Object.assign({size:"medium",label:S,onClick:j},T))]})})]})]})]})}var k=i(45528),w=i(68011),S=i(7089),C=i(32125);const j=function({canUseBcVisible:e,setCanUseBcVisible:t}){const{pathname:i}=(0,a.useLocation)(),u=(0,r.s)(),p=(0,S.VR)((e=>e.businessAccountInfoResponse),C.bN),v=(0,n.useMemo)((()=>[{icon:k.A,title:u("wbs_goto_bc_modal_feature3_title"),description:u("wbs_goto_bc_modal_feature3_content")},{icon:w.A,title:u("wbs_goto_bc_modal_feature1_title"),description:u("wbs_goto_bc_modal_feature1_content")}]),[u]);return(0,n.useEffect)((()=>{s.f.event("webtt_bc_dm_on_popup_window_show")}),[]),(0,o.jsx)(x,{visible:e,onClose:()=>t(!1),title:u("wbs_goto_bc_modal_title"),renderRightFooter:(0,o.jsx)(c.I0,{variant:"primary",size:"medium",label:u("wbs_goto_bc_modal_btn"),onClick:()=>{(()=>{var e;const o=i===d.OZ.messages,n=null===(e=p.data)||void 0===e?void 0:e.redirect_url;n&&(o?location.href=n:window.open(n),t(!1))})(),s.f.event("webtt_bc_dm_go_to_biz_center")}}),children:(0,o.jsx)(l.$m,{children:v.map(((e,t)=>(0,o.jsxs)(l.iS,{children:[(0,o.jsx)("div",{children:(0,n.createElement)(e.icon,{fontSize:24})}),(0,o.jsxs)(l.bP,{children:[(0,o.jsx)(l.Gq,{children:u(e.title)}),(0,o.jsx)(l.k5,{children:u(e.description)})]})]},t)))})})}},68159:(e,t,i)=>{"use strict";i.d(t,{$m:()=>v,F3:()=>u,Gq:()=>m,Nk:()=>c,bP:()=>h,iS:()=>_,k5:()=>g,n5:()=>p,pS:()=>s,vE:()=>d});var o=i(62186),n=i(46508),a=i(14873),r=i(72153);const s=(0,o.default)("div",{target:"e1nx07zo0"})((({theme:{direction:e},removeMarginLeft:t})=>(0,r.mp)({direction:e,marginStart:t?"0px":"16px"})),{cursor:"pointer",height:"32px",padding:"3px 3px 0",position:"relative",WebkitAppRegion:"no-drag"},"label:DivMessageIconContainer;");s.defaultProps=Object.assign(Object.assign({},s.defaultProps),{"data-e2e":"top-dm-icon"});const l=({theme:{direction:e}})=>({width:"26px",height:"26px",transform:"rtl"===e?"rotateY(180deg)":"none"}),d=(0,o.default)(n.A,{target:"e1nx07zo1"})(l,"label:StyledIcon;"),c=(0,o.default)(a.A,{target:"e1nx07zo2"})(l,"label:StyledActiveIcon;"),u=(0,o.default)("sup",{target:"e1nx07zo3"})((({theme:e,long:t})=>[(0,r.zy)({theme:e,fontFamily:"TikTokFont",typography:"P3",color:"ConstTextInverse",fontWeight:"semiBold"}),(0,r.mp)({direction:e.direction,start:"16px"}),{position:"absolute",top:"-7px",minWidth:"20px",borderRadius:"10px",height:"20px",background:e.colors.Primary,textAlign:"center",padding:t?"0 6px":"0"}]),"label:SupMsgBadge;"),p=o.default.div` display: flex; align-items: center; gap: 1rem; /* 16px */ padding-inline-start: 1rem; /* 16px */ `,v=o.default.div` padding: 1.5rem; /* 24px */ display: flex; flex-direction: column; gap: 1.5rem; /* 24px */ `,_=o.default.div` display: flex; gap: 0.75rem; /* 12px */ `,h=o.default.div` display: flex; flex-direction: column; gap: 0.375rem; /* 6px */ `,m=(0,o.default)("div",{target:"e1nx07zo4"})((({theme:{colors:e}})=>({lineHeight:"1.5",fontSize:"16px",fontWeight:"600",fontFamily:"TiktokFont",color:e.TextPrimary})),"label:TextPrimary;"),g=(0,o.default)("div",{target:"e1nx07zo5"})((({theme:{colors:e}})=>({lineHeight:"1.5",fontSize:"16px",fontFamily:"TiktokFont",color:e.TextSecondary})),"label:TextSecondary;")},92925:(e,t,i)=>{"use strict";i.d(t,{b:()=>Vi});var o=i(24643),n=i(40099),a=i(41271),r=i(73580),s=i(22224),l=i(81125),d=i(32125),c=i(46682),u=i(25616),p=i(75972),v=i(11983),_=i(44205),h=i(84827),m=i(63932),g=i(30591),f=i(62186),b=i(72153),y=i(97397);const x=(0,f.default)("div",{target:"eaptjjg0"})((({theme:{direction:e}})=>[{paddingTop:"8px",display:"flex",flexGrow:1,flexDirection:"column",alignItems:"stretch",position:"relative"},(0,b.mp)({direction:e,paddingStart:"16px",paddingEnd:"24px"})]),"label:DivReportDetail;"),k=(0,f.default)(y.y,{target:"eaptjjg1"})({marginTop:"12px",marginBottom:"16px",border:"none"},"label:MoreOptionsButton;"),w=(0,f.default)(y.y,{target:"eaptjjg2"})((({theme:{colors:e}})=>[{marginTop:"auto",marginBottom:"16px",background:e.Primary,color:e.ConstTextInverse}]),"label:MobileMoreOptionsButton;"),S=(0,f.default)("div",{target:"eaptjjg3"})({flexGrow:1,overflowY:"auto",height:"100px"},"label:DivDetailsContainer;");var C=i(18431),j=i(60484),I=i(48615);const T=(0,f.default)("div",{target:"e1itzts50"})({padding:"16px",display:"flex",alignItems:"center"},"label:DivItemContainer;"),L=(0,f.default)("div",{target:"e1itzts51"})((({theme:{colors:e}})=>[{fontSize:"15px",fontStyle:"normal",fontWeight:"600",lineHeight:"130%",color:e.TextPrimary,marginLeft:"17px"}]),"label:DivText;"),O=(0,f.default)("div",{target:"e1itzts52"})((({theme:{colors:e}})=>[{margin:"0px 16px",height:"0.5px",background:e.LineSecondary}]),"label:DivLine;"),R=({text:e,icon:t,onClick:i,hideLine:n=!1})=>(0,o.jsxs)("div",{children:[(0,o.jsxs)(T,{onClick:i,children:[t,(0,o.jsx)(L,{children:e})]}),!1===n&&(0,o.jsx)(O,{})]});var E=i(71863),P=i(81794),A=i(34034),D=i(10263),F=i(74341),B=i(47172),M=i(4474);const N={padding:"0px 0px 16px 0px"},q=({reportId:e,reportType:t})=>{var i;const{reportDetail:{isLoading:r,data:s}}=(0,a.P)(m.j),l=(0,c.w)(m.j),[d,p]=(0,n.useState)(!1),{isMobile:f}=(0,j.L$)((0,I.U)((()=>["isMobile"]),[])),{refreshReport:b,loggedOutCode:y}=(0,a.P)(m.j),T=(0,u.s)(),L=(0,B.useHistory)(),O=(0,n.useCallback)((()=>{l.getReportDetail({reportId:e,reportType:t})}),[e,t,l]);(0,n.useEffect)((()=>{null!==b&&(v.F.open({content:T(b.type),key:`refreshReport ${b.type}`,duration:3,widthType:"half"}),l.setRefreshReport(null))}),[b]),(0,n.useEffect)((()=>{O()}),[O]);const q=(0,n.useCallback)((e=>{switch(e){case C.B8.BLOCK_USER:return(0,o.jsx)(E.O,{size:20});case C.B8.UN_BLOCK_USER:return(0,o.jsx)(P.N,{size:20});case C.B8.REQUEST_ANOTHER_REVIEW:return(0,o.jsx)(A.Z,{size:20});case C.B8.DELETE_REPORT:return(0,o.jsx)(D.u,{size:20});default:return(0,o.jsx)(F._,{size:20})}}),[]),U=()=>{p(!1),O()},W=(0,n.useCallback)((()=>{var t;return null===(t=null==s?void 0:s.see_option_infos)||void 0===t?void 0:t.map(((t,i)=>C.yC.includes(t.code)?(0,o.jsx)(R,{onClick:()=>{(t=>{var i,o,n;let a,r;switch(t.code){case C.B8.RESUBMIT_REPORT:a=`/report/${null!==(i=null==s?void 0:s.object_type_name)&&void 0!==i?i:"video"}`,r=Object.assign({objectId:null!==(o=null==s?void 0:s.object_id)&&void 0!==o?o:"",ownerId:null!==(n=null==s?void 0:s.object_owner_id)&&void 0!==n?n:"",dsa_from_inbox:!0,report_record:JSON.stringify(null==s?void 0:s.report_record),report_id:e},void 0!==y&&{logged_out_code:y}),L.push(`${a}?${(0,M.stringify)(r)}`);break;case C.B8.REQUEST_ANOTHER_REVIEW:a="/violation-appeal",r=Object.assign({reportId:null!=e?e:""},void 0!==y&&{logged_out_code:y}),L.push(`${a}?${(0,M.stringify)(r)}`);break;case C.B8.DELETE_REPORT:l.getDeleteReport({reportId:e}),O();break;case C.B8.UN_BLOCK_USER:l.getBlockUser({toolsType:C.B8.UN_BLOCK_USER,processedUserId:t.extra.unblock_uid}),O();break;case C.B8.BLOCK_USER:l.getBlockUser({toolsType:C.B8.BLOCK_USER,processedUserId:t.extra.block_uid}),O()}})(t),p(!1)},text:t.name,icon:q(t.code),hideLine:i===(null==s?void 0:s.see_option_infos.length)-1},t.code):(0,o.jsx)(o.Fragment,{})))}),[null==s?void 0:s.see_option_infos]),H=(0,n.useCallback)((()=>{var t;return!1===f?(0,o.jsx)(C.Ay,{reportId:e,seeOptionsInfo:null!==(t=null==s?void 0:s.see_option_infos)&&void 0!==t?t:[],visible:d,onActionExecuted:U,onClose:()=>{p(!1)}}):(0,o.jsx)(_.l,{contentStyle:N,needTouchEvents:!1,visible:d,maskClosable:!0,closeStyle:{display:"none"},onClose:()=>{p(!1)},children:W()})}),[f,d,s,e,W]),z=(0,n.useMemo)((()=>f?w:k),[f]);if(r)return(0,o.jsx)(h.R,{center:!0,size:"small"});if(!s)return(0,o.jsx)("div",{});const{text_infos:K}=s,V=void 0!==t;return(0,o.jsxs)(x,{role:"list",style:Object.assign({},f&&{height:"100%"}),children:[(0,o.jsx)(S,{style:Object.assign({},f&&{height:"100%"}),children:null==K?void 0:K.map(((e,t)=>(0,o.jsx)(g.A,{item:e,isV2:V},t)))}),H(),(null===(i=null==s?void 0:s.see_option_infos)||void 0===i?void 0:i.filter((e=>C.yC.includes(e.code))).length)>0&&(0,o.jsx)(z,{onClick:()=>{p(!d)},children:T("dsa_illegal_more_options_link")})]})};var U=i(10745),W=i(46803),H=i(84987);const z={id:"flag-icon-a28d5881",use:"flag-icon-a28d5881-usage",viewBox:"0 0 32 32",content:''};function K(e){const t=(0,n.useContext)(H.X);return(0,n.useLayoutEffect)((()=>(t.add(z),()=>{t.remove("flag-icon-a28d5881")})),[]),(0,o.jsx)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e,{children:(0,o.jsx)("use",{xlinkHref:"#flag-icon-a28d5881"},void 0)}),void 0)}var V=i(8475),G=i(29450);const $={101:"report_inbox_video",102:"report_inbox_comment",103:"report_inbox_account",107:"report_inbox_live",130:"report_inbox_livecomment",106:"report_inbox_directmessage",115:"report_inbox_directmessage",123:"report_inbox_directmessage",105:"report_inbox_sound",119:"report_inbox_hashtag",141:"shoutouts_detail_comment_report_title",142:"tns_intro_reporter_title",160:"%s - qareport_question",230:"profile_page_events_list",210:"photo_name_nocaption"},J={1:"report_inbox_inreview",3:"report_inbox_violation",2:"report_inbox_noviolation",4:"showVidStatus_reportInbox_vidStatusDeleted_label",5:"showVidStatus_reportInbox_vidStatusIneligible_label"};var Q=i(63809);const Y=({report:e,index:t,onClick:i,onKeyDown:a})=>{const{timeTranslator:r}=(0,W.T)(),s=(0,u.s)(),{isMobile:l}=(0,j.L$)((0,I.U)((()=>["isMobile"]),[])),[d,c]=(0,n.useState)(!1),p=$[e.report_type]?s($[e.report_type]):"",v=r(1e3*Number(e.modify_time)),_=(0,n.useCallback)((()=>{i()}),[i]),h=(0,n.useCallback)((()=>{c(!0)}),[]),m=J[e.status]?s(J[e.status]):"";return(0,o.jsxs)(Q.iA,{onClick:_,onKeyDown:a,isMobile:l,tabIndex:0,role:"button","aria-labelledby":`report-item-content-${t}`,children:[(0,o.jsx)(Q.Fs,{children:(0,o.jsx)(K,{width:32,height:32})}),(0,o.jsxs)(Q.eH,{id:`report-item-content-${t}`,children:[(0,o.jsx)(Q.dM,{children:(()=>{if(e.title)return e.title;if(160===e.report_type){const t=` - ${s("qareport_question")||"Question"}`;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Q.WA,{children:e.object_desc}),(0,o.jsx)("span",{children:t.padStart(t.length+1)})]})}return p.replace("%s",e.object_owner_name||e.object_desc||"")})()}),(0,o.jsxs)(Q.tU,{children:[s("report_inbox_status"),": ",m,(0,o.jsx)(Q.hH,{children:v.padStart(v.length+1)})]})]}),e.cover_image?(0,o.jsxs)(Q.$2,{children:[(0,o.jsx)(Q.mW,{isNotLoaded:!d,src:e.cover_image,onLoad:h}),3===e.status&&d&&(0,o.jsx)(Q.xj,{children:(0,o.jsx)(G.A,{width:20,height:20})})]}):(0,o.jsx)(Q.MH,{children:(0,o.jsx)(V.A,{width:16,height:16})})]})},Z=(0,f.default)("div",{target:"eq5dlep0"})({display:"flex",flexGrow:1,flexDirection:"column",alignItems:"stretch",overflow:"auto",height:"100%"},"label:DivReportList;"),X=()=>{const{reportList:{data:e,hasNextPage:t}}=(0,a.P)(m.j),i=(0,c.w)(m.j),r=(0,n.useRef)(null);(0,n.useEffect)((()=>{e.length>0||i.getReportList()}),[i,e.length]);const s=(0,n.useCallback)((()=>{i.getReportList()}),[i]),l=(0,n.useCallback)((e=>()=>{i.updateActiveReport({reportId:e.report_id,reportType:e.report_type})}),[i]),d=(0,n.useCallback)((e=>t=>{13!==t.keyCode&&32!==t.keyCode||i.updateActiveReport({reportId:e.report_id,reportType:e.report_type})}),[i]);return(0,n.useEffect)((()=>{if(t&&e.length>0){if(!r.current)return;const{clientHeight:e,scrollHeight:o}=r.current;!(o>e)&&t&&i.getReportList()}}),[t,r,i,e]),(0,U.O9)({elemRef:r,onHitBottom:s,bottomThreshold:200,throttle:200}),(0,o.jsxs)(Z,{ref:r,children:[e.map(((e,t)=>(0,o.jsx)(Y,{report:e,index:t,onClick:l(e),onKeyDown:d(e)},t))),t&&(0,o.jsx)("div",{children:(0,o.jsx)(h.R,{center:!0,size:"small"})})]})},ee=(0,f.default)("div",{target:"e115u39r0"})({height:"100%",width:"100%",display:"flex",flexDirection:"column",alignItems:"stretch"},"label:DivReportInboxContainer;"),te=(0,f.default)("div",{target:"e115u39r1"})({display:"flex",flexDirection:"row",alignItems:"center",padding:"0 16px",margin:"24px 0 18px"},"label:DivHeader;"),ie=(0,f.default)("span",{target:"e115u39r2"})((({theme:e})=>[(0,b.zy)({theme:e,fontFamily:"TikTokDisplayFont",typography:"H4",color:"TextPrimary",fontWeight:"bold"})]),"label:SpanHeaderTitle;"),oe=(0,f.default)("div",{target:"e115u39r3"})((({theme:{direction:e,colors:t}})=>[Object.assign(Object.assign({width:"24px",height:"24px",cursor:"pointer"},"rtl"===e&&{transform:"rotate(180deg)"}),{"> svg > path":{fill:t.TextPrimary}})]),"label:DivBackButton;"),ne=({onClose:e})=>{var t,i;const{reportDetail:r,activeReport:s}=(0,a.P)(m.j),l=(0,u.s)(),d=(0,c.w)(m.j),v=(0,n.useCallback)((()=>{null===s?e():d.setActiveReport(null)}),[s,d,e]),_=(0,n.useCallback)((e=>{13!==e.keyCode&&32!==e.keyCode||(e.preventDefault(),e.stopPropagation(),v())}),[v]),h=l("report_inbox_title"),g=null!==s&&null!==(i=null===(t=r.data)||void 0===t?void 0:t.tab_title)&&void 0!==i?i:h,f=null!==s?"Back to report list":"Back to notification list";return(0,o.jsxs)(ee,{children:[(0,o.jsxs)(te,{children:[(0,o.jsx)(oe,{onClick:v,onKeyDown:_,tabIndex:0,role:"button","aria-label":f,children:(0,o.jsx)(p.A,{width:24,height:24})}),(0,o.jsx)(ie,{children:g})]}),null!==s?(0,o.jsx)(q,{reportId:s.reportId,reportType:s.reportType}):(0,o.jsx)(X,{})]})};var ae=i(50970),re=i(72642),se=i(91872),le=i(88920),de=i(67518),ce=i(85767),ue=i(91128),pe=i(53602),ve=i(71199),_e=i(71404);const he=(0,f.default)("div",{target:"e1d0xjxi0"})({padding:"88px 32px 0",display:"flex",flexDirection:"column",alignItems:"center"},"label:DivErrorContainer;"),me=(0,f.default)("p",{target:"e1d0xjxi1"})((({theme:e})=>(0,b.zy)({theme:e,typography:"P2",fontWeight:"semiBold"})),{marginTop:"20px"},"label:PErrorTitle;"),ge=(0,f.default)("p",{target:"e1d0xjxi2"})((({theme:e})=>(0,b.zy)({theme:e,typography:"H6",color:"TextSecondary"})),{marginTop:"12px",textAlign:"center"},"label:PErrorDesc;"),fe={500:{title:"inbox_all_activity",desc:"inbox_default_text",Icon:ce.A},2:{title:"Inbox_Comments_on_your_videos",desc:"Inbox_When_someone_comments_on__one_of_your_videos_you_ll_see_it_here",Icon:ue.A},7:{title:"Inbox_New_followers",desc:"Inbox_When_someone_new_follows_you_you_ll_see_it_here",Icon:pe.A},3:{title:"Inbox_Likes_on_your_videos",desc:"Inbox_When_someone_likes_one_of_your_videos_you_ll_see_it_here",Icon:ve.A},505:{title:"Inbox_Likes_on_your_videos",desc:"Inbox_When_someone_likes_one_of_your_videos_you_ll_see_it_here",Icon:ve.A},6:{title:"Inbox_Mentions_of_You",desc:"Inbox_When_someone_mentions_you_you_ll_see_it_here",Icon:_e.A}},be=(0,n.memo)((function({type:e}){const t=(0,u.s)(),{colors:i}=(0,de.u)(),{title:n,desc:a,Icon:r}=fe[e];return(0,o.jsxs)(he,{children:[(0,o.jsx)(r,{width:70,height:70,fill:i.TextQuaternary}),(0,o.jsx)(me,{children:t(n)}),(0,o.jsx)(ge,{children:t(a)})]})})),ye=({item:e,onClick:t})=>{var i,a,r,s,l,d,c;const{isMobile:u=!1}=null!==(i=(0,I.U)((()=>["isMobile"]),[]))&&void 0!==i?i:{},{timeTranslator:p}=(0,W.T)(),v=p(1e3*Number(e.create_time)),_=null!==(s=null===(r=null===(a=e.template_notice)||void 0===a?void 0:a.notice)||void 0===r?void 0:r.content)&&void 0!==s?s:"",h=(0,n.useCallback)((()=>{u?window.location.href="/report/inbox":null==t||t()}),[u,t]),m=(0,n.useCallback)((e=>{13!==e.keyCode&&32!==e.keyCode||(e.preventDefault(),e.stopPropagation(),h())}),[h]);return(0,o.jsxs)(Q.iA,{isNotice:!0,onClick:h,onKeyDown:m,tabIndex:0,role:"button","aria-labelledby":"notice-report-title",children:[(0,o.jsx)(Q.Fs,{children:(0,o.jsx)(K,{width:32,height:32})}),(0,o.jsx)(Q.eH,{children:(0,o.jsxs)(Q.dM,{isNotice:!0,id:"notice-report-title",children:[null===(c=null===(d=null===(l=e.template_notice)||void 0===l?void 0:l.notice)||void 0===d?void 0:d.title)||void 0===c?void 0:c.title,":",(0,o.jsxs)(Q.tU,{isNotice:!0,children:[_.padStart(_.length+1),(0,o.jsx)(Q.hH,{children:v.padStart(v.length+1)})]})]})}),(0,o.jsx)(Q.MH,{children:(0,o.jsx)(V.A,{width:16,height:16})})]})};var xe=i(40858),ke=i(59909),we=i(72688),Se=i(58305),Ce=i(22248),je=i(67963),Ie=i(93608),Te=i(82535),Le=i(40772),Oe=i(81211);function Re({beforeStart:e,href:t,shouldUsePush:i,state:o,newTab:a=!1}){const r=(0,Le.w)();return t=(0,Oe.U)(t),(0,n.useCallback)((n=>{null==e||e(n),a?window.open(t,"_blank"):r(n,{href:t,shouldUsePush:i,state:o})}),[e,r,t,a,i,o])}function Ee(e){let t=e.target;for(;!((null==t?void 0:t.dataset.method)||t===e.currentTarget&&t);)t=t.parentElement;return t.dataset.method}function Pe({uniqueId:e,onClick:t,enter_method:i,enter_from:o,previous_page:r,shouldHandleDom:s}){const l=(0,a.P)(ae.L,{selector:t=>{var i;const{appContext:o}=t;return(null==o?void 0:o.user)&&(null===(i=null==o?void 0:o.user)||void 0===i?void 0:i.uniqueId)===e},dependencies:[e]});return(0,n.useCallback)((e=>{var n;let a=i;s&&(a=null!==(n=Ee(e))&&void 0!==n?n:i),null==t||t(e);const d={enter_method:a,page_name:null!=o?o:"homepage_message",enter_from:null!=o?o:"homepage_message",previous_page:null!=r?r:Ie.f.commonParams.page_name};l?Te.q.handleEnterProfile(d):Te.q.handleEnterUser(d)}),[i,s,t,l,o,r])}var Ae=i(58542),De=i(92846);const Fe=({theme:e})=>[(0,b.zy)({theme:e,typography:"H6"}),b.AB,{display:"flex",flexDirection:"row",padding:"10px 16px",alignItems:"flex-start",cursor:"pointer",":hover":{background:e.colors.BGView}}],Be=(0,f.default)("div",{target:"exfus50"})(Fe,"label:DivItemContainer;"),Me=(0,f.default)(je.N_,{target:"exfus51"})(Fe,"label:LinkItemContainer;"),Ne=(0,f.default)("div",{target:"exfus52"})({position:"relative",width:"48px",height:"48px",flex:"0 0 48px"},"label:DivAvatarContainer;"),qe=(0,f.default)(De.e,{target:"exfus53"})((({size:e,multiple:t,theme:i})=>t?{position:"absolute",border:`1px solid ${i.colors.BGPrimary}`,background:i.colors.BGPrimary,boxSizing:"content-box",":first-of-type":{right:0,top:0},":last-of-type":{left:0,bottom:0}}:{flex:`0 0 ${e}px`}),"label:StyledAvatar;"),Ue=(0,f.default)(y.y,{target:"exfus54"})({alignSelf:"center",flex:"0 0 auto","& > svg":{marginRight:"6px"}},"label:StyledFollowButton;"),We=(0,f.default)("div",{target:"exfus55"})({flex:"0 0 42px",width:"42px",height:"56px",background:"center no-repeat",backgroundSize:"cover",borderRadius:"2px"},"label:DivVideoCover;"),He=(0,f.default)(je.N_,{target:"exfus56"})({flex:"0 0 42px",width:"42px",height:"56px",background:"center no-repeat",backgroundSize:"cover",borderRadius:"2px"},"label:StyledLinkVideoCover;"),ze=(0,f.default)("div",{target:"exfus57"})({padding:"0 12px",flex:"1 1 auto"},"label:DivContentContainer;"),Ke=({theme:e})=>({fontWeight:e.fontWeights.semiBold,wordBreak:"break-all"}),Ve=({theme:e})=>({fontWeight:e.fontWeights.semiBold,wordBreak:"break-all","&:focus":{outline:"none"},"&:focus-visible":{outline:`2px solid ${e.colors.Negative}`}}),Ge=(0,f.default)("p",{target:"exfus58"})((0,b.m4)(1),Ke,"label:PTitleText;"),$e=(0,f.default)("a",{target:"exfus59"})((0,b.m4)(1),Ve,"label:ATitleLink;"),Je=(0,f.default)(je.N_,{target:"exfus510"})((0,b.m4)(1),Ke,"label:StyledTitleTextLink;"),Qe=(0,f.default)("p",{target:"exfus511"})((0,b.m4)(7),(({theme:e})=>({color:e.colors.TextTertiary,maxHeight:130,wordBreak:"break-word"})),"label:PDescText;"),Ye=(0,f.default)("span",{target:"exfus512"})((({theme:{colors:e}})=>({color:e.TextPrimary})),"label:SpanPrimary;"),Ze=(0,f.default)(Qe,{target:"exfus513"})((({theme:e})=>({position:"relative",paddingLeft:"8px",marginTop:"4px",lineClamp:1,WebkitLineClamp:1,"::before":{content:'""',position:"absolute",top:0,left:0,width:"2px",height:"100%",background:e.colors.LineSecondary}})),"label:StyledExtraText;"),Xe=(0,f.default)("div",{target:"exfus514"})({marginTop:"8px"},"label:DivFollowReqButtonWrapper;"),et=(0,f.default)(y.y,{target:"exfus515"})({display:"inline-flex",":not(:first-of-type)":{marginLeft:"8px"}},"label:StyledFollowReqButton;"),tt=(0,f.default)(B.Link,{target:"exfus516"})((({theme:e})=>({"&:focus":{outline:"none"},"&:focus-visible":{outline:`2px solid ${e.colors.Negative}`}})),"label:StyledLink;"),it=(0,f.default)("div",{target:"exfus517"})([Fe,{alignItems:"center"}],"label:DivSystemNotifItemContainer;"),ot=(0,f.default)("div",{target:"exfus518"})([{minWidth:"48px",width:"48px",height:"48px",borderRadius:"24px",border:"1px solid rgba(22, 24, 35, 1)",backgroundColor:"rgba(22, 24, 35, 1)",display:"flex",justifyContent:"center",alignItems:"center"}],"label:DivSystemNotifIconContainer;"),nt=(0,f.default)("div",{target:"exfus519"})((({theme:{direction:e,colors:t}})=>[Object.assign(Object.assign({minWidth:"16px",width:"16px",height:"16px"},"rtl"===e&&{transform:"rotate(180deg)"}),{"> svg > path":{fill:t.TextTertiary}})]),"label:DivArrowContainer;"),at=(0,f.default)("p",{target:"exfus520"})((0,b.m4)(2),(({theme:e})=>({color:e.colors.TextTertiary,maxHeight:130,wordBreak:"break-word"})),"label:PSystemNotifDescText;"),rt=(0,f.default)("div",{target:"exfus521"})((({theme:e})=>({alignItems:"flex-start",backgroundColor:e.isDark?"rgba(54, 54, 54, 1)":"rgba(245, 245, 245, 1)",display:"flex",flexDirection:"column",borderRadius:"4px",margin:"0px 16px",marginBottom:"22px",padding:"16px",":hover":{cursor:"pointer"}})),"label:DivSystemNotifListItem;"),st=(0,f.default)("div",{target:"exfus522"})({display:"flex",alignItems:"center"},"label:DivSystemNotifListItemHeader;"),lt=(0,f.default)("div",{target:"exfus523"})((({theme:e})=>({alignItems:"center",justifyContent:"center",display:"flex",borderRadius:"16px",border:"1px solid "+(e.isDark?"rgba(62, 62, 62, 1)":"rgba(232, 232, 232, 1)"),backgroundColor:e.isDark?"rgba(62, 62, 62, 1)":"rgba(232, 232, 232, 1)",color:e.colors.TextPrimary,minWidth:"32px",width:"32px",height:"32px",marginInlineEnd:"8px"})),"label:DivSystemNotifListItemHeaderIcon;"),dt=(0,f.default)("div",{target:"exfus524"})({marginTop:"8px",flex:1},"label:DivSystemNotifListItemBody;"),ct=(0,f.default)("hr",{target:"exfus525"})((({theme:e})=>({color:e.isDark?"rgb(255, 255, 255)":"rgb(22, 24, 35)",opacity:.1,borderTop:"1px solid",margin:"12px 0px 8px 0px",width:"100%"})),"label:HrDivider;"),ut=(0,f.default)(Ae.Shl,{target:"exfus526"})((({theme:e})=>({transform:`translateX(${"rtl"===e.direction?"-100%":"100%"}) !important`})),"label:StyledBadgeDot;"),pt=(0,n.memo)((function({item:e,content:t}){var i,n;const{timeTranslator:a}=(0,W.T)(),{comment:r,create_time:s}=e,{comment_type:l,reply_comment:d}=r,c=(0,o.jsxs)(o.Fragment,{children:[" ",a(1e3*Number(s))]});return 2===l||11===l?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(Qe,{"data-e2e":"inbox-content",children:[(0,o.jsx)(Ye,{children:t}),c]}),(0,o.jsx)(Ze,{children:`${null!==(n=null===(i=null==d?void 0:d.user)||void 0===i?void 0:i.nickname)&&void 0!==n?n:""}: ${null==d?void 0:d.text}`})]}):(0,o.jsxs)(Qe,{"data-e2e":"inbox-content",children:[(0,o.jsx)(Ye,{children:t}),c]})})),vt=(0,n.memo)((function({item:e}){var t;const{t:i}=(0,W.T)(),{user:n,content:a,itemHref:r,coverUrl:s,handleClickNotice:l,handleClickVideoCover:d}=(0,ke.g)({item:e}),c=(0,we.fJR)({uniqueId:null!==(t=null==n?void 0:n.uniqueId)&&void 0!==t?t:"",secUid:null==n?void 0:n.secUid}),u=Pe({uniqueId:null==n?void 0:n.uniqueId,onClick:Se.dG,enter_method:"click_head"}),p=Pe({uniqueId:null==n?void 0:n.uniqueId,onClick:Se.dG,enter_method:"click_name"});return n?(0,o.jsxs)(Be,{"data-e2e":"inbox-list-item",onClick:l,children:[(0,o.jsx)(je.N_,{to:c,onClick:u,ariaLabel:i("accessibilityLabels_link_userProfile",{username:n.nickname}),children:(0,o.jsx)(qe,{size:48,src:n.avatarThumb,multiple:!1,alt:""})}),(0,o.jsxs)(ze,{children:[(0,o.jsx)(Je,{"data-e2e":"inbox-title",to:c,onClick:p,children:n.nickname}),(0,o.jsx)(pt,{item:e,user:n,content:a})]}),(0,o.jsx)(je.N_,{to:r,onClick:d,children:(0,o.jsx)(We,{style:{backgroundImage:`url(${s})`}})})]}):(0,Ce.d)(["user"])}));var _t=i(17566),ht=i(84908);const mt=(0,n.memo)((function({item:e}){var t,i,a,r,s,l;const{t:c,timeTranslator:u}=(0,W.T)(),p=(0,_t._u)(),v=(0,ht.nW)((t=>{var i;return t.users[null!==(i=e.duet.aweme.author.unique_id)&&void 0!==i?i:""]}),d.bN),_=p({uniqueId:null!==(t=null==v?void 0:v.uniqueId)&&void 0!==t?t:"",secUid:null==v?void 0:v.secUid,videoId:e.duet.aweme.aweme_id,isPhotomode:150===e.duet.aweme.aweme_type}),h=(0,we.fJR)({uniqueId:null!==(i=null==v?void 0:v.uniqueId)&&void 0!==i?i:"",secUid:null==v?void 0:v.secUid}),m=Pe({uniqueId:null==v?void 0:v.uniqueId,enter_method:"click_head"}),g=Pe({uniqueId:null==v?void 0:v.uniqueId,enter_method:"click_name"}),f=Re({href:_,shouldUsePush:!0,beforeStart:function(e){const{vid:t,authorId:i}=e;return(0,n.useCallback)((()=>{Te.q.handleEnterVideo({enter_method:"click_noti",group_id:t,to_group_id:t,to_author_id:i})}),[i,t])}({vid:e.duet.aweme.aweme_id,authorId:e.duet.aweme.author.uid})});return v?(0,o.jsxs)(Be,{"data-e2e":"inbox-list-item",onClick:f,children:[(0,o.jsx)(je.N_,{to:h,onClick:m,ariaLabel:c("accessibilityLabels_link_userProfile",{username:v.nickname}),children:(0,o.jsx)(qe,{size:48,src:v.avatarThumb,alt:""})}),(0,o.jsxs)(ze,{children:[(0,o.jsx)(Je,{"data-e2e":"inbox-title",to:h,onClick:g,children:v.nickname}),(0,o.jsxs)(Qe,{"data-e2e":"inbox-content",children:[c("Inbox_created_a_duet_with_you").replace(/%(s|#)/g,"")," ",u(1e3*Number(e.create_time))]})]}),(0,o.jsx)(We,{style:{backgroundImage:`url(${null===(l=null===(s=null===(r=null===(a=e.duet.aweme)||void 0===a?void 0:a.video)||void 0===r?void 0:r.cover)||void 0===s?void 0:s.url_list)||void 0===l?void 0:l[0]})`}})]}):(0,Ce.d)(["user"])}));var gt=i(39383);const ft=(0,n.memo)((function({item:e}){const{user:t,userHref:i,content:n,followButton:a,handleClickNotice:r}=(0,gt.U)({item:e,isPopup:!1}),{t:s,timeTranslator:l}=(0,W.T)();if(!t)return(0,Ce.d)(["user"]);const d=l(1e3*Number(e.create_time));return(0,o.jsxs)(Be,{"data-e2e":"inbox-list-item",onClick:r,children:[(0,o.jsx)(De.e,{size:48,src:t.avatarThumb,style:{flex:"0 0 48px"},"data-method":"click_head",alt:""}),(0,o.jsxs)(ze,{children:[(0,o.jsx)($e,{"data-e2e":"inbox-title",href:i,onClick:Se.wo,"data-method":"click_name","aria-label":s("accessibilityLabels_link_userProfile",{username:t.nickname}),children:t.nickname}),(0,o.jsxs)(Qe,{"data-e2e":"inbox-content",children:[n," ",d]})]}),a]})}));var bt,yt=i(52757);!function(e){e[e.Single=48]="Single",e[e.Multiple=36]="Multiple"}(bt||(bt={}));const xt=(0,n.memo)((function({users:e}){var t,i,n,a,r;const s=(0,u.s)(),l=Boolean(null==e?void 0:e[1]),d=Pe({uniqueId:null===(t=null==e?void 0:e[0])||void 0===t?void 0:t.uniqueId,enter_method:"click_head"});if(!l){const{uniqueId:t="",secUid:a,nickname:r}=null!==(i=null==e?void 0:e[0])&&void 0!==i?i:{},l=(0,we.fJR)({uniqueId:t,secUid:a});return(0,o.jsx)(Ne,{onClick:Se.dG,children:(0,o.jsx)(tt,{to:l,onClick:d,"aria-label":s("accessibilityLabels_link_userProfile",{username:r}),children:(0,o.jsx)(qe,{size:48,src:null===(n=null==e?void 0:e[0])||void 0===n?void 0:n.avatarThumb,alt:""})})})}return(0,o.jsxs)(Ne,{"data-e2e":"inbox-avatar-multiple",children:[(0,o.jsx)(qe,{size:36,multiple:!0,src:null===(a=null==e?void 0:e[1])||void 0===a?void 0:a.avatarThumb,alt:""}),(0,o.jsx)(qe,{size:36,multiple:!0,src:null===(r=null==e?void 0:e[0])||void 0===r?void 0:r.avatarThumb,alt:""})]})})),kt=function({user:e}){const t=(0,u.s)(),i=Pe({uniqueId:null==e?void 0:e.uniqueId,enter_method:"click_name"});if(!e)return null;const{uniqueId:n,secUid:a,nickname:r}=e,s=(0,we.fJR)({uniqueId:n,secUid:a});return(0,o.jsx)(tt,{to:s,onClick:i,"aria-label":t("accessibilityLabels_link_userProfile",{username:r}),children:e.nickname})},wt=(0,n.memo)((function({item:e,content:t}){var i;const{timeTranslator:n}=(0,W.T)(),a=n(1e3*Number(e.create_time),!0);if(1===e.digg.digg_type)return(0,o.jsxs)(Qe,{"data-e2e":"inbox-content",children:[t," ",a]});if(3===e.digg.digg_type){const{text:n,user:r}=null!==(i=e.digg.comment)&&void 0!==i?i:{};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(Qe,{"data-e2e":"inbox-content",children:[t," ",a]}),(0,o.jsxs)(Ze,{children:[null==r?void 0:r.nickname,": ",n]})]})}return null})),St=function({merge_count:e,users:t}){const i=(0,u.s)();return(null==t?void 0:t[1])?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(kt,{user:null==t?void 0:t[0]}),","," ",(0,o.jsx)(kt,{user:null==t?void 0:t[1]}),"number"==typeof e&&e>2&&(0,o.jsxs)(o.Fragment,{children:[" ",i("Inbox_and")," ",i("Inbox_others").replace(/%d/,String(e-2))]})]}):(0,o.jsx)(kt,{user:null==t?void 0:t[0]})},Ct=(0,n.memo)((function({item:e}){const{users:t,content:i,itemHref:n,coverUrl:a,handleClickNotice:r,handleClickVideoCover:s}=(0,yt.w)({item:e});return(0,o.jsxs)(Be,{"data-e2e":"inbox-list-item",onClick:r,children:[(0,o.jsx)(xt,{users:t}),(0,o.jsxs)(ze,{children:[(0,o.jsx)(Ge,{"data-e2e":"inbox-title",onClick:Se.dG,children:(0,o.jsx)(St,{users:t,merge_count:e.digg.merge_count})}),(0,o.jsx)(wt,{item:e,content:i})]}),(0,o.jsx)(He,{onClick:s,to:n,style:{backgroundImage:`url(${a})`}})]})}));var jt=i(70836);const It=({item:e,content:t})=>{var i;const{timeTranslator:n}=(0,W.T)(),{create_time:a,at:r}=e,{sub_type:s,reply_comment:l}=r,d=(0,o.jsxs)(o.Fragment,{children:[" ",n(1e3*Number(a))]});return 1===s?(0,o.jsxs)(Qe,{"data-e2e":"inbox-content",children:[t,d]}):2===s?(0,o.jsxs)(Qe,{"data-e2e":"inbox-content",children:[(0,o.jsx)(Ye,{children:t}),d]}):5===s?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(Qe,{"data-e2e":"inbox-content",children:[(0,o.jsx)(Ye,{children:t}),d]}),(0,o.jsx)(Ze,{children:null!==(i=null==l?void 0:l.text)&&void 0!==i?i:""})]}):null},Tt=(0,n.memo)((function({item:e}){var t;const{t:i}=(0,W.T)(),{user:n,content:a,itemHref:r,coverUrl:s,handleClickNotice:l,handleClickVideoCover:d}=(0,jt.h)({item:e}),c=(0,we.fJR)({uniqueId:null!==(t=null==n?void 0:n.uniqueId)&&void 0!==t?t:"",secUid:null==n?void 0:n.secUid}),u=Pe({uniqueId:null==n?void 0:n.uniqueId,onClick:Se.dG,enter_method:"click_head"}),p=Pe({uniqueId:null==n?void 0:n.uniqueId,onClick:Se.dG,enter_method:"click_name"});return n?(0,o.jsxs)(Be,{"data-e2e":"inbox-list-item",onClick:l,children:[(0,o.jsx)(je.N_,{to:c,onClick:u,ariaLabel:i("accessibilityLabels_link_userProfile",{username:null==n?void 0:n.nickname}),children:(0,o.jsx)(qe,{size:48,src:n.avatarThumb,alt:""})}),(0,o.jsxs)(ze,{children:[(0,o.jsx)(Je,{"data-e2e":"inbox-title",to:c,onClick:p,children:n.nickname}),(0,o.jsx)(It,{item:e,content:a})]}),(0,o.jsx)(je.N_,{to:r,onClick:d,children:(0,o.jsx)(We,{style:{backgroundImage:`url(${s})`}})})]}):(0,Ce.d)(["user"])}));var Lt,Ot=i(91505);!function(e){e[e.Single=48]="Single",e[e.Multiple=36]="Multiple"}(Lt||(Lt={}));const Rt=(0,n.memo)((function({users:e}){var t,i,n,a,r;const s=(0,u.s)(),l=Boolean(e[1]),d=Pe({uniqueId:null===(t=e[0])||void 0===t?void 0:t.uniqueId,enter_method:"click_head"});if(!l){const{uniqueId:t="",secUid:a,nickname:r}=null!==(i=null==e?void 0:e[0])&&void 0!==i?i:{},l=(0,we.fJR)({uniqueId:t,secUid:a});return(0,o.jsx)(Ne,{onClick:Se.dG,children:(0,o.jsx)(tt,{to:l,onClick:d,"aria-label":s("accessibilityLabels_link_userProfile",{username:r}),children:(0,o.jsx)(qe,{size:48,src:null===(n=e[0])||void 0===n?void 0:n.avatarThumb,alt:""})})})}return(0,o.jsxs)(Ne,{"data-e2e":"inbox-avatar-multiple",children:[(0,o.jsx)(qe,{size:36,multiple:!0,src:null===(a=e[1])||void 0===a?void 0:a.avatarThumb,alt:""}),(0,o.jsx)(qe,{size:36,multiple:!0,src:null===(r=e[0])||void 0===r?void 0:r.avatarThumb,alt:""})]})})),Et=function({user:e}){const t=(0,u.s)(),i=Pe({uniqueId:null==e?void 0:e.uniqueId,enter_method:"click_name"});if(!e)return null;const{uniqueId:n,secUid:a,nickname:r}=e,s=(0,we.fJR)({uniqueId:n,secUid:a});return(0,o.jsx)(tt,{to:s,onClick:i,"aria-label":t("accessibilityLabels_link_userProfile",{username:r}),children:e.nickname})},Pt=(0,n.memo)((function({item:e,content:t}){const{timeTranslator:i}=(0,W.T)(),n=i(1e3*Number(e.create_time),!0);return(0,o.jsxs)(Qe,{"data-e2e":"inbox-content",children:[t," ",n]})})),At=function({mergeCount:e,users:t}){const i=(0,u.s)();return t[1]?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Et,{user:t[0]}),","," ",(0,o.jsx)(Et,{user:t[1]}),"number"==typeof e&&e>2&&(0,o.jsxs)(o.Fragment,{children:[" ",i("Inbox_and")," ",i("Inbox_others").replace(/%d/,String(e-2))]})]}):(0,o.jsx)(Et,{user:t[0]})},Dt=(0,n.memo)((function({item:e}){var t,i,n;const{users:a,content:r,itemHref:s,coverUrl:l,handleClickVideoCover:d}=(0,Ot.A)({item:e});return(0,o.jsxs)(Me,{"data-e2e":"inbox-list-item",onClick:d,to:s,children:[(0,o.jsx)(Rt,{users:a}),(0,o.jsxs)(ze,{children:[(0,o.jsx)(Ge,{"data-e2e":"inbox-title",onClick:Se.dG,children:(0,o.jsx)(At,{users:a,mergeCount:null!==(n=null===(i=null===(t=e.template_notice.notice)||void 0===t?void 0:t.title)||void 0===i?void 0:i.merge_count)&&void 0!==n?n:0})}),(0,o.jsx)(Pt,{item:e,content:r})]}),l&&(0,o.jsx)(He,{onClick:d,to:s,style:{backgroundImage:`url(${l})`}})]})})),Ft=(0,n.memo)((function({item:e,onReportInboxClick:t}){return xe.BS.isFollowNotice(e)?(0,o.jsx)(ft,{item:e}):xe.BS.isLikeNotice(e)?(0,o.jsx)(Ct,{item:e}):xe.BS.isCommentNotice(e)?(0,o.jsx)(vt,{item:e}):xe.BS.isDuetNotice(e)?(0,o.jsx)(mt,{item:e}):xe.BS.isMentionNotice(e)?(0,o.jsx)(Tt,{item:e}):xe.BS.isReportInboxNotice(e)?(0,o.jsx)(ye,{item:e,onClick:t}):xe.BS.isRepostInboxNotice(e)?(0,o.jsx)(Dt,{item:e}):null}));var Bt=i(34393),Mt=i(29039);const Nt={id:"system-notif-inbox-icon-195ebab2",use:"system-notif-inbox-icon-195ebab2-usage",viewBox:"0 0 18 16",content:''};function qt(e){const t=(0,n.useContext)(H.X);return(0,n.useLayoutEffect)((()=>(t.add(Nt),()=>{t.remove("system-notif-inbox-icon-195ebab2")})),[]),(0,o.jsx)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e,{children:(0,o.jsx)("use",{xlinkHref:"#system-notif-inbox-icon-195ebab2"},void 0)}),void 0)}var Ut=i(84798);const Wt=(0,n.memo)((function(e){var t,i;const n=(0,u.s)(),a=(0,Mt.I$)((e=>{for(const t of e.noticeCount)if(661===t.group)return 0===t.count;return!0})),r=Ut.Sb[(0,xe.G6)(e.systemNotif.type)],s=r?n(r.label):null;return s?(0,o.jsxs)(it,{onClick:e.onClick,children:[(0,o.jsx)(ot,{children:(0,o.jsx)(qt,{width:16,height:16})}),(0,o.jsxs)(ze,{children:[(0,o.jsx)(ut,{size:"large",hideBadge:a,children:(0,o.jsx)(Ge,{children:n("system_notifications_inbox_header")})}),(0,o.jsxs)(at,{children:[s,": ",null===(i=null===(t=e.systemNotif.template_notice)||void 0===t?void 0:t.notice)||void 0===i?void 0:i.content]})]}),(0,o.jsx)(nt,{children:(0,o.jsx)(Bt.A,{style:{fontSize:16}})})]}):null}));var Ht=i(16851);const zt=(0,n.memo)((function({uniqueId:e}){var t;const i=(0,u.s)(),r=(0,ht.nW)((t=>t.users[e]),d.bN),s=(0,Ht.Cp)(),l=(0,n.useCallback)((t=>i=>{i.preventDefault(),i.stopPropagation(),s.postFollowReply({approveOrReject:t,uniqueId:e,uid:null==r?void 0:r.id})}),[s,e,null==r?void 0:r.id]),c=(0,n.useCallback)((t=>i=>{13!==i.keyCode&&32!==i.keyCode||(i.preventDefault(),i.stopPropagation(),s.postFollowReply({approveOrReject:t,uniqueId:e,uid:null==r?void 0:r.id}))}),[s,e,null==r?void 0:r.id]),p=(0,we.fJR)({uniqueId:null!==(t=null==r?void 0:r.uniqueId)&&void 0!==t?t:"",secUid:null==r?void 0:r.secUid}),v=Re({href:p,shouldUsePush:!0,beforeStart:Pe({uniqueId:null==r?void 0:r.uniqueId,enter_method:"click_noti",enter_from:"follow_request_page",previous_page:"homepage_message",shouldHandleDom:!0})}),_=function({uniqueId:e,onKeyDown:t,enter_method:i,enter_from:o,previous_page:r,shouldHandleDom:s}){const l=(0,a.P)(ae.L,{selector:t=>{var i;const{appContext:o}=t;return(null==o?void 0:o.user)&&(null===(i=null==o?void 0:o.user)||void 0===i?void 0:i.uniqueId)===e},dependencies:[e]});return(0,n.useCallback)((e=>{var n;let a=i;s&&(a=null!==(n=Ee(e))&&void 0!==n?n:i),null==t||t(e);const d={enter_method:a,page_name:null!=o?o:"homepage_message",enter_from:null!=o?o:"homepage_message",previous_page:null!=r?r:Ie.f.commonParams.page_name};l?Te.q.handleEnterProfile(d):Te.q.handleEnterUser(d)}),[i,s,t,l,o,r])}({uniqueId:null==r?void 0:r.uniqueId,enter_method:"click_noti",enter_from:"follow_request_page",previous_page:"homepage_message",shouldHandleDom:!0}),h=function({beforeStart:e,href:t,shouldUsePush:i,state:o}){const a=(0,Le.w)();return t=(0,Oe.U)(t),(0,n.useCallback)((n=>{null==e||e(n),a(n,{href:t,shouldUsePush:i,state:o})}),[e,a,t,i,o])}({href:p,shouldUsePush:!0,beforeStart:_}),m=(0,n.useCallback)((e=>{13!==e.keyCode&&32!==e.keyCode||(e.preventDefault(),e.stopPropagation(),h(e))}),[h]);return r?(0,o.jsxs)(Be,{"data-e2e":"inbox-list-item",onClick:v,onKeyDown:m,tabIndex:0,role:"listitem","aria-label":i("accessibilityLabels_link_userProfile",{username:r.nickname}),children:[(0,o.jsx)(qe,{size:48,src:r.avatarThumb,"data-method":"click_head",alt:""}),(0,o.jsxs)(ze,{children:[(0,o.jsx)($e,{"data-e2e":"inbox-title",href:p,onClick:Se.wo,"data-method":"click_name",tabIndex:-1,"aria-label":i("accessibilityLabels_link_userProfile",{username:r.nickname}),children:r.uniqueId}),(0,o.jsx)(Qe,{children:r.nickname}),(0,o.jsxs)(Xe,{children:[(0,o.jsx)(et,{size:"tiny",onClick:l(1),onKeyDown:c(1),"aria-label":i("delete"),children:i("delete")}),(0,o.jsx)(et,{"data-e2e":"inbox-request-accept",size:"tiny",buttonTheme:"primary",onClick:l(0),onKeyDown:c(0),"aria-label":i("inbox_request_accept"),children:i("inbox_request_accept")})]})]})]}):(0,Ce.d)(["user"])}));var Kt=i(12527);const Vt=(0,f.default)("div",{target:"e11z9zg00"})({flex:"1 1 auto",overflow:"auto"},"label:DivInboxContentContainer;"),Gt=(0,f.default)("p",{target:"e11z9zg01"})((({theme:e})=>(0,b.zy)({theme:e,typography:"P3",fontWeight:"semiBold",color:"TextTertiary"})),{padding:"0 16px",marginTop:"8px"},"label:PTimeGroupTitle;"),$t=(0,f.default)(je.N_,{target:"e11z9zg02"})({display:"block",width:"54px",height:"72px",background:"center no-repeat",backgroundSize:"cover",borderRadius:"2px",margin:"auto"},"label:StyledAnchor;"),Jt=(0,f.default)("p",{target:"e11z9zg03"})((({theme:e})=>(0,b.zy)({theme:e,typography:"H6",color:"TextTertiary"})),b.PR,{padding:"8px 48px 2px"},"label:PCommentText;"),Qt=(0,f.default)("div",{target:"e11z9zg04"})((({theme:{colors:e}})=>({height:"1px",background:e.LineSecondary,transform:"scaleY(0.5)",margin:"8px 16px"})),"label:DivSplit;"),Yt=(0,f.default)("div",{target:"e11z9zg05"})({cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",marginBottom:"8px"},(({theme:{direction:e}})=>(0,b.mp)({direction:e,marginStart:"16px",marginEnd:"auto"})),"label:DivBack;"),Zt=(0,f.default)(Kt.A,{target:"e11z9zg06"})((({theme:{direction:e}})=>"ltr"===e?null:{transform:"rotate(180deg)"}),"label:StyledChevronLeftOffset;"),Xt=(0,f.default)("div",{target:"e11z9zg07"})((({theme:e})=>(0,b.zy)({theme:e,typography:"P3"})),{padding:"8px 24px 8px 16px",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",cursor:"pointer"},"label:DivFollowReqEntranceContainer;"),ei=(0,f.default)("span",{target:"e11z9zg08"})({display:"flex",flexDirection:"row",alignItems:"center"},"label:SpanHintContainer;"),ti=(0,f.default)("i",{target:"e11z9zg09"})((({theme:{colors:e,direction:t}})=>[{width:"8px",height:"8px",borderRadius:"8px",background:e.Primary},(0,b.mp)({direction:t,marginEnd:"8px"})]),"label:IDot;"),ii=(0,f.default)("span",{target:"e11z9zg010"})((({theme:{colors:e,direction:t}})=>[{color:e.TextTertiary,marginRight:"8px"},(0,b.mp)({direction:t,marginEnd:"8px"})]),"label:SpanHintText;"),oi=(0,f.default)("ul",{target:"e11z9zg011"})({padding:0,margin:0,listStyleType:"none"},"label:UlInboxItemListContainer;"),ni=(0,f.default)("li",{target:"e11z9zg012"})({padding:0,margin:0,listStyleType:"none"},"label:LiInboxItemWrapper;"),ai=(0,n.memo)((function(e){const t=(0,u.s)(),i=(0,n.useMemo)((()=>t("Back")),[t]);return(0,o.jsxs)(Yt,{"data-e2e":"inbox-second-back",onClick:e.onClickBack,onKeyDown:e.onBackKeyDown,tabIndex:0,role:"button","aria-label":i,children:[(0,o.jsx)(Kt.A,{}),(0,o.jsx)("span",{children:i})]})})),ri=(0,n.memo)((function(e){const{item:t}=e;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ai,{onClickBack:e.onClickBack,onBackKeyDown:e.onBackKeyDown}),(0,o.jsx)(Vt,{"data-e2e":"inbox-list",role:"list",children:t.users.map((e=>(0,o.jsx)(zt,{uniqueId:e},e)))})]})}));var si=i(68652);const li=(0,n.memo)((function(e){const{total:t}=e,i=(0,u.s)(),{colors:n}=(0,de.u)();return(0,o.jsxs)(Xt,{"data-e2e":"inbox-follow-request",onClick:e.onClick,onKeyDown:e.onKeyDown,tabIndex:0,role:"button","aria-labelledby":"inbox-follow-req-entrance-header",children:[(0,o.jsx)("h4",{id:"inbox-follow-req-entrance-header",children:i("Inbox_Follow_requests")}),(0,o.jsxs)(ei,{children:[(0,o.jsx)(ti,{}),(0,o.jsx)(ii,{children:t}),(0,o.jsx)(si.A,{fill:n.TextTertiary,width:12,height:12})]})]})}));var di=i(62738),ci=i(40935);const ui=(0,n.memo)((function({uniqueId:e}){var t;const i=(0,u.s)(),a=(0,ht.nW)((t=>t.users[e]),d.bN),{handleFollow:r,isFollowing:s,text:l,relation:c}=(0,ci.Tu)({uniqueId:e,prevent:!0,teaParams:{enter_from:"homepage_message"}}),p=(0,n.useCallback)((e=>{13!==e.keyCode&&32!==e.keyCode||r(e)}),[r]),v=(0,we.fJR)({uniqueId:null!==(t=null==a?void 0:a.uniqueId)&&void 0!==t?t:"",secUid:null==a?void 0:a.secUid}),_=Re({href:v,shouldUsePush:!0,beforeStart:Pe({uniqueId:e,enter_method:"click_noti",shouldHandleDom:!0})});return a?(0,o.jsxs)(Be,{"data-e2e":"inbox-list-item",onClick:_,children:[(0,o.jsx)(qe,{size:48,src:a.avatarThumb,"data-method":"click_head",alt:""}),(0,o.jsxs)(ze,{children:[(0,o.jsx)($e,{"data-e2e":"inbox-title",href:v,onClick:Se.wo,"data-method":"click_name","aria-label":i("accessibilityLabels_link_userProfile",{username:a.nickname}),children:a.uniqueId}),(0,o.jsx)(Qe,{"data-e2e":"inbox-content",children:a.nickname})]}),(0,o.jsxs)(Ue,{onClick:r,onKeyDown:p,size:"tiny",buttonTheme:s?"default":"primary",children:[2===c?(0,o.jsx)(di.A,{}):null,l]})]}):(0,Ce.d)(["user"])})),pi=(0,n.memo)((function(e){var t,i,a;const{item:r}=e,s=(0,u.s)(),l=(0,_t._u)(),[{loading:c,users:p},v]=(0,Ht.P4)((e=>e.diggList),d.bN);(0,n.useEffect)((()=>{var e,t;return v.fetchDiggListData({ref_id:null!==(t=null===(e=r.digg.comment)||void 0===e?void 0:e.cid)&&void 0!==t?t:r.digg.aweme.aweme_id}),()=>{v.setDiggList([]),v.setDiggListLoading(!1)}}),[v,r.digg.aweme.aweme_id,null===(t=r.digg.comment)||void 0===t?void 0:t.cid]);const _=(0,n.useCallback)((()=>c&&!p.length?(0,o.jsx)(h.R,{size:"small",center:!0}):p.map((e=>(0,o.jsx)(ui,{uniqueId:e},e)))),[c,p]),m=l(r),g=(0,Oe.U)(m),f=(0,n.useCallback)((()=>{location.href=g}),[g]);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(Yt,{"data-e2e":"inbox-second-back",onClick:e.onClickBack,onKeyDown:e.onBackKeyDown,tabIndex:0,role:"button","aria-label":s("Back"),children:[(0,o.jsx)(Zt,{}),(0,o.jsx)("span",{children:s("Back")})]}),(0,o.jsxs)(Vt,{"data-e2e":"inbox-list",children:[(0,o.jsx)($t,{to:g,style:{backgroundImage:`url(${null===(i=r.digg.aweme.video.cover.url_list)||void 0===i?void 0:i[0]})`},onClick:f}),(null===(a=r.digg.comment)||void 0===a?void 0:a.text)&&(0,o.jsx)(Jt,{children:r.digg.comment.text}),(0,o.jsx)(Qt,{}),_()]})]})}));var vi;!function(e){e[e.New=0]="New",e[e.Today=1]="Today",e[e.Yesterday=2]="Yesterday",e[e.ThisWeek=3]="ThisWeek",e[e.ThisMonth=4]="ThisMonth",e[e.Previous=5]="Previous"}(vi||(vi={}));const _i={0:"Inbox_New",1:"Inbox_Today",2:"Inbox_Yesterday",3:"Inbox_This_Week",4:"Inbox_This_Month",5:"Inbox_Previous"},hi=[0,1,6,(new Date).getDate()].map((e=>function(e=0){return(new Date).setHours(0,0,0,0)/1e3-86400*e}(e))),mi=e=>{if(!e||!e.has_read)return 0;const t=hi.findIndex((t=>t{var i;let o=(null!==(i=e.notice_list)&&void 0!==i?i:[]).slice();if(g||(o=o.filter((e=>!xe.BS.isRepostInboxNotice(e)))),500!==t||!_)return o;const n=mi(_),a=o;for(let e=0;et.create_time)return a.splice(e,0,_),a}return a.push(_),a}),[t,_,e.notice_list]),b=s&&500===t,y=b?(0,o.jsx)(Wt,{systemNotif:s,onClick:d}):null;(0,n.useEffect)((()=>{b&&m.handleSystemNotificationShow()}),[m,b]);let x=mi(null==f?void 0:f[0]);const k=(0,n.useMemo)((()=>{const e=[];let t=0;if(null==f||f.map(((i,o)=>{if(0===o||0===x&&i.has_read||i.create_timen[0].create_time){e.splice(o,0,[i]);break}if(o===e.length-1&&s.create_time{const t=mi(e[0]),i=(0,o.jsx)(Gt,{children:v(_i[t])});return(0,o.jsxs)(n.Fragment,{children:[i,(0,o.jsx)(oi,{children:e.map(((e,t)=>{var i;const n=null!==(i="nid_str"in e?e.nid_str:e.nid)&&void 0!==i?i:t;return!0===e.isSystemNotif?(0,o.jsx)(ni,{children:y},n):(0,o.jsx)(ni,{children:(0,o.jsx)(Ft,{item:e,onReportInboxClick:a})},n)}))})]},t)}))}):(0,o.jsx)(be,{type:t})})),fi=(0,n.memo)((function(e){var t;const{activeGroup:i,item:a,systemNotifItem:c,reportInboxList:u,followItem:p,showFollow:v,onFollowChange:_,onHitBottom:m,onReportInboxClick:g,onSystemNotifItemClick:f}=e,b=(0,r.Nj)(l.b),[y,{setExpandedLikeItem:x}]=(0,s.nG)((e=>e.expandedLikeItem),d.bN),k=(0,n.useCallback)((()=>{x(null)}),[x]),w=(0,n.useCallback)((e=>{13!==e.keyCode&&32!==e.keyCode||x(null)}),[x]),S=(0,n.useRef)(null);(0,se.O)({elementRef:S,onHitBottom:m,threshold:100});const C=(0,n.useCallback)((()=>{_(!1)}),[_]),j=(0,n.useCallback)((e=>{13!==e.keyCode&&32!==e.keyCode||_(!1)}),[_]),I=(0,n.useCallback)((()=>{_(!0),b.handleEnterFollow({request_cnt:Number(p.total)})}),[p.total,_,b]),T=(0,n.useCallback)((e=>{13!==e.keyCode&&32!==e.keyCode||I()}),[I]),L=(0,xe.Bl)();return y?(0,o.jsx)(pi,{item:y,onClickBack:k,onBackKeyDown:w}):v?(0,o.jsx)(ri,{onClickBack:C,onBackKeyDown:j,item:p}):(0,o.jsxs)(Vt,{"data-e2e":"inbox-list",id:"header-inbox-list",ref:S,tabIndex:0,role:"tabpanel","aria-labelledby":`inbox-tab-${L.indexOf(i)}`,children:[500===i&&Boolean(p.total)&&(0,o.jsx)(li,{onClick:I,onKeyDown:T,total:p.total}),(0,o.jsx)(gi,{item:a,reportInboxList:u,activeGroup:i,onReportInboxClick:g,systemNotifItem:c,onSystemNotifItemClick:f}),Boolean(null===(t=a.notice_list)||void 0===t?void 0:t.length)&&a.loading&&(0,o.jsx)(h.R,{center:!0,size:"small"})]})})),bi=(0,f.default)("div",{target:"e1bp8k4k0"})((({theme:{direction:e}})=>[{paddingTop:"24px",flex:"0 0 auto"},(0,b.mp)({direction:e,paddingStart:"16px"})]),"label:DivInboxHeaderContainer;"),yi=(0,f.default)("h2",{target:"e1bp8k4k1"})([({theme:e})=>(0,b.zy)({theme:e,fontFamily:"TikTokDisplayFont",fontWeight:"bold",typography:"H4",color:"TextPrimary"}),({clickable:e=!1})=>({":hover":{cursor:e?"pointer":"auto"}}),{display:"flex"}],"label:H2InboxTitle;"),xi=(0,f.default)("div",{target:"e1bp8k4k2"})({marginInlineEnd:"22px"},"label:DivTitleIconContainer;"),ki=(0,f.default)("div",{target:"e1bp8k4k3"})((({theme:e})=>(0,b.zy)({theme:e,fontFamily:"TikTokFont",fontWeight:"semiBold",typography:"P3",color:"TextPrimary"})),{marginTop:"16px",display:"flex",flexDirection:"row",flexWrap:"wrap"},"label:DivGroupContainer;"),wi=e=>({0:{color:e.TextPrimary,background:e.BGPlaceholderDefault,":hover":{background:e.ShadowPrimary}},1:{color:e.BGPrimary,background:e.TextPrimary}}),Si=(0,f.default)("button",{target:"e1bp8k4k4"})((({theme:{colors:e,direction:t},active:i})=>[wi(e)[Number(i)],{":not(:last-child)":[(0,b.mp)({direction:t,marginEnd:"8px"})]},{border:"none",padding:"2px 8px",marginBottom:"12px",textAlign:"center",cursor:"pointer",borderRadius:"12px",transition:"all 300ms"}]),"label:ButtonGroupItem;"),Ci={500:"Inbox_All",3:"Inbox_Likes",505:"Inbox_Likes",2:"Inbox_Comments",6:"Inbox_Mentions",7:"Followers"},ji=["all","likes","comments","mentions","followers"],Ii=(0,n.memo)((0,n.forwardRef)((({value:e,onChange:t,onKeyDown:i},a)=>{const r=(0,u.s)(),s=(0,n.useCallback)((e=>()=>{t(e)}),[t]),l=(0,n.useRef)(null),d=(0,xe.Bl)(),c=(0,n.useCallback)((e=>{var t,i;null===(i=null===(t=l.current)||void 0===t?void 0:t.children[d.indexOf(e)])||void 0===i||i.focus()}),[]);return(0,n.useImperativeHandle)(a,(()=>({setFocus:c}))),(0,o.jsxs)(bi,{children:[(0,o.jsx)(yi,{id:"header-inbox-title",children:r("Inbox_Notifications")}),(0,o.jsx)(ki,{"data-e2e":"inbox-bar",id:"header-inbox-bar",onKeyDown:i,ref:l,role:"tablist","aria-labelledby":"header-inbox-title",children:d.map(((t,i)=>(0,o.jsx)(Si,{"data-e2e":ji[i],id:`inbox-tab-${i}`,active:t===e,tabIndex:t===e?0:-1,onClick:s(t),role:"tab","aria-selected":t===e,"aria-controls":"header-inbox-list",children:r(Ci[t])},t)))})]})}))),Ti=(0,f.default)("div",{target:"e32s1fi0"})({height:"100%",display:"flex",flexDirection:"column"},"label:DivInboxContainer;");var Li=i(88091),Oi=i(26290),Ri=i(65467),Ei=i(13947),Pi=i(78305),Ai=i(21512),Di=i(81230),Fi=i(15637),Bi=i(63363);const Mi=(0,n.memo)((function(e){var t,i,a,s,d,u,p,v;const{t:_,timeTranslator:h}=(0,W.T)(),m=(0,c.w)(Di.s),g=(0,c.w)(Ei.L),f=(0,c.w)(Pi.y7),[b,y]=(0,n.useState)(!1),x=(0,n.useCallback)((()=>{y(!1)}),[]),k=(0,r.Nj)(l.b),{notificationShouldBeClickable:w}=(0,Bi.AP)(),S=null!==(i=null===(t=e.notice.template_notice)||void 0===t?void 0:t.schema_url)&&void 0!==i?i:"";S&&(0,xe.Eo)(S)&&Ie.f.event("web_appeal_result_notification_view");const C=(0,n.useCallback)((()=>{var t,i,o,n,a;if(1!==e.notice.display_type)if(2===e.notice.display_type)k.handleSystemNotificationClick({enter_method:"click_get_app_for_pc"}),y(!0);else if(3===e.notice.display_type&&(k.handleSystemNotificationClick({}),window&&void 0!==(null===(t=e.notice.template_notice)||void 0===t?void 0:t.schema_url))){const t=null===(i=e.notice.template_notice)||void 0===i?void 0:i.schema_url;if(t&&t.startsWith(Fi.fZ)){const e=new URLSearchParams(new URL(t).search),i=null!==(o=e.get("object_id"))&&void 0!==o?o:void 0,r=null!==(n=e.get("object_type"))&&void 0!==n?n:void 0,s=null!==(a=e.get("punish_key"))&&void 0!==a?a:void 0;return m.setViolationAppealInfo({objectId:i,objectType:r,punishKey:s}),void m.setVisible(!0)}if(t&&(0,xe.Eo)(t)){if(w){Ie.f.event("web_appeal_result_view_more_click");const e=JSON.parse(t);m.setViolationAppealInfo({objectId:e.vid,objectType:"1",penaltyDetails:e}),m.setVisible(!0)}return}if(t&&t.startsWith(Ai.OD))return void(t.includes(encodeURIComponent("is_appeal=1"))?g.setAppealInfoAndShow({url:t}):f.showRereport({rereportUrl:t}));window.location.href=t}}),[k,e.notice.display_type,null===(a=e.notice.template_notice)||void 0===a?void 0:a.schema_url,m]),j=(0,n.useMemo)((()=>{var t,i,n,a;return 2===e.notice.display_type?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ct,{}),(0,o.jsx)(Li.Fm,{type:"P3-Regular",children:_("system_notifications_details_button")})]}):3===e.notice.display_type&&(null===(i=null===(t=e.notice.template_notice)||void 0===t?void 0:t.schema_url)||void 0===i?void 0:i.includes(Ai.OD))?(null===(a=null===(n=e.notice.template_notice)||void 0===n?void 0:n.schema_url)||void 0===a?void 0:a.includes(encodeURIComponent("is_appeal=1")))?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ct,{}),(0,o.jsx)(Li.Fm,{type:"P3-Regular",children:_("dsa_bi_illegal_more_options_link")})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ct,{}),(0,o.jsx)(Li.Fm,{type:"P3-Regular",children:_("dsa_illegal_report_again_link")})]}):null}),[e.notice.display_type,_]),I=Ut.Sb[(0,xe.G6)(e.notice.type)],T=I?_(I.label):null,L=null===(u=null===(d=null===(s=e.notice.template_notice)||void 0===s?void 0:s.notice)||void 0===d?void 0:d.title)||void 0===u?void 0:u.title,O=null===(v=null===(p=e.notice.template_notice)||void 0===p?void 0:p.notice)||void 0===v?void 0:v.content;if(null===T||null===L||null===O)return null;const R=null!==e.notice.create_time?(0,o.jsxs)(Li.Fm,{type:"P4-Regular",color:"TextQuaternary",children:[" ",h(1e3*e.notice.create_time,!0)]}):null,E=(0,xe.fG)((0,xe.G6)(e.notice.type));return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(rt,{onClick:C,children:[(0,o.jsxs)(st,{children:[(0,o.jsx)(lt,{children:E&&(0,o.jsx)(E,{style:{fontSize:16}})}),(0,o.jsx)(Li.Fm,{type:"P3-Semibold",children:T})]}),(0,o.jsx)(ct,{}),(0,o.jsx)(Oi.F.P3,{style:{maxWidth:"100%",overflowX:"hidden",textOverflow:"ellipsis"},children:L}),(0,o.jsx)(dt,{children:(0,o.jsxs)(Li.Fm,{type:"P4-Regular",children:[O,R]})}),j]}),b&&(0,o.jsx)(Ri.u,{visible:b,onClose:x})]})})),Ni=(0,n.memo)((function({noticeItem:e,onHitBottom:t}){var i;const a=(0,n.useRef)(null);return(0,se.O)({elementRef:a,onHitBottom:t,threshold:100}),(0,o.jsxs)(Vt,{ref:a,tabIndex:0,role:"tabpanel",children:[(null!==(i=e.notice_list)&&void 0!==i?i:[]).map((e=>(0,o.jsx)(ni,{children:(0,o.jsx)(Mi,{notice:e})},e.nid))),e.loading&&(0,o.jsx)(h.R,{center:!0,size:"small"})]})}));var qi=i(4589);const Ui=(0,n.memo)((({onHeaderClick:e})=>{const t=(0,u.s)(),i=(0,o.jsx)(xi,{children:(0,o.jsx)(qi.A,{fontSize:18})});return(0,o.jsx)(bi,{children:(0,o.jsxs)(yi,{id:"header-inbox-title",onClick:e,clickable:null!=e,children:[i,t("system_notifications_inbox_header")]})})})),Wi=(0,f.default)("div",{target:"ewlck080"})({height:"100%",display:"flex",flexDirection:"column"},"label:DivInboxContainer;"),Hi=(0,f.default)("div",{target:"ewlck081"})({padding:"20px 16px"},"label:DivListBox;"),zi=(0,n.memo)((function(e){var t,i;const a=(0,u.s)(),[r,s]=(0,Ht.P4)((e=>e),d.bN),[l,c]=(0,n.useState)([661]);(0,n.useEffect)((()=>{var e;if(661!==r.activeSystemNoticeGroup)return;if(!(null===(e=r.noticeList.notice_list)||void 0===e?void 0:e.length))return void c([661]);const t=[],i=new Set;r.noticeList.notice_list.forEach((e=>{const o=(0,xe.G6)(e.type);i.has(o)||(t.push(o),i.add(o))})),c([661,...t])}),[r.activeSystemNoticeGroup,r.noticeList.notice_list]);const p=(0,n.useRef)(!0),v=(0,n.useCallback)((()=>{p.current||(p.current=!0,s.fetchSystemNoticeData())}),[s]);(0,n.useEffect)((()=>{p.current=Boolean(r.noticeList.loading)}),[r.noticeList.loading]);const _=(0,n.useMemo)((()=>l.map((e=>Ut.Sb[e]?{value:e.toString(),label:a(Ut.Sb[e].label,{},Ut.Sb[e].label)}:null)).filter((e=>null!==e))),[l,a]),h=(0,n.useCallback)((e=>{Object.entries(Ut.Sb).forEach((t=>{t[0].toString()===e&&s.changeActiveSystemNoticeGroup(t[1].value)}))}),[s]),m=(0,o.jsx)(Ui,{onHeaderClick:e.onBack}),g=(0,o.jsx)(Hi,{children:(0,o.jsx)(Li.dB,{block:!0,label:"",hideLabel:!0,value:null!==(i=null===(t=r.activeSystemNoticeGroup)||void 0===t?void 0:t.toString())&&void 0!==i?i:"",onChange:h,placeholder:"",options:_,size:"small"})}),f=(0,o.jsx)(Ni,{onHitBottom:v,noticeItem:r.noticeList});return(0,o.jsxs)(Wi,{children:[m,g,f]})}));var Ki=i(85349);const Vi=(0,n.memo)((function(){const[e,{setIsFollowRequestShowing:t}]=(0,s.nG)((e=>e.isFollowRequestShowing),d.bN),[i,{setActivePage:c}]=(0,s.nG)((e=>e.activePage),d.bN),u=(0,n.useCallback)((()=>{c("report-inbox")}),[c]),p=(0,n.useCallback)((()=>{c("main")}),[c]),v=(0,a.P)(ae.L,{selector:e=>{var t,i,o,n,a;return{uid:null!==(o=null===(i=null===(t=e.appContext)||void 0===t?void 0:t.user)||void 0===i?void 0:i.uid)&&void 0!==o?o:"",did:null!==(a=null===(n=e.appContext)||void 0===n?void 0:n.wid)&&void 0!==a?a:""}},dependencies:[]}),_=(0,a.P)(re.kK,{selector:e=>e.reportInbox.noticeList,dependencies:[]}),[{activeGroup:h,noticeList:m,followRequest:g,latestSystemNotice:f},b]=(0,Ht.P4)((e=>{const{activeGroup:t,noticeList:i,followRequest:o,latestSystemNotice:n}=e;return{activeGroup:t,noticeList:i,followRequest:o,latestSystemNotice:n}}),d.bN),{setExpandedLikeItem:y}=(0,s.i7)(),x=(0,n.useMemo)(xe.Bl,[]),[k,w]=(0,n.useState)(x.indexOf(h)),S=(0,n.useCallback)((e=>{b.changeActiveGroup({group:e}),y(null),t(!1),w(x.indexOf(e))}),[b,y,t,x]),C=(0,r.Nj)(l.b),j=(0,n.useCallback)((()=>{C.handleChangeTab({to_tab_name:"system"}),c("system-notif"),b.changeActiveSystemNoticeGroup(661)}),[b,C,c]);(0,n.useEffect)((()=>{e||setTimeout((()=>{b.fetchNoticeFollowRequest(Object.assign(Object.assign({},v),{refresh:!0}))}),2e3)}),[b,v,e]),(0,n.useEffect)((()=>{g.has_more||0!==g.total?g.has_more&&g.users.length<=10&&b.fetchNoticeFollowRequest(v):t(!1)}),[b,g.has_more,g.total,g.users.length,v,t]);const I=(0,n.useRef)(!0),T=(0,n.useRef)(null),L=(0,n.useCallback)((()=>{I.current||(I.current=!0,b.fetchNoticeData())}),[b]),O=(0,n.useCallback)((e=>{var t,i,o,n;switch(e.keyCode){case 39:e.stopPropagation(),e.preventDefault();const a=k{I.current=Boolean(m.loading)}),[m.loading]),(0,n.useEffect)((()=>{b.fetchLatestSystemNotice()}),[b]);const R=(0,n.useCallback)((()=>{c("main"),S(500)}),[S,c]);return"report-inbox"===i?(0,o.jsx)(ne,{onClose:p}):"system-notif"===i?(0,o.jsx)(zi,{onBack:R}):(0,o.jsx)(Ki.t,{isMobile:!1,containerStyle:{height:"100%",width:"100%"},children:(0,o.jsxs)(Ti,{"data-e2e":"inbox-notifications",children:[(0,o.jsx)(Ii,{value:h,onChange:S,onKeyDown:O,ref:T}),(0,o.jsx)(fi,{activeGroup:h,item:m,onHitBottom:L,followItem:g,showFollow:e,onFollowChange:t,reportInboxList:_,onReportInboxClick:u,systemNotifItem:f,onSystemNotifItemClick:j})]})})}))},65556:(e,t,i)=>{"use strict";i.d(t,{c:()=>O});var o,n,a=i(58632),r=i(40099),s=i(41271),l=i(57432),d=i.n(l),c=i(9953),u=i.n(c),p=i(47172),v=i(34099),_=i(56070),h=i(58305),m=i(32862),g=i(50970),f=i(86510);!function(e){e.IMCloud="5",e.WatchOnPC="134217786",e.KickOffline="3001"}(o||(o={})),function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"}(n||(n={}));var b,y,x=i(93608);!function(e){e.LiveMobileRelayProcess="livesdk_open_on_computer_process"}(b||(b={})),function(e){e.MessageReceived="message_received",e.MessageParseFailed="message_parse_failed",e.OpenLiveRoomStart="open_live_room_start",e.OpenLiveRoomFailed="open_live_room_failed"}(y||(y={}));const k=e=>{x.f.event(b.LiveMobileRelayProcess,e)};var w=i(72688),S=i(45297);const C=e=>{((e,t,i)=>{if(window.SlardarClient)try{window.SlardarClient("sendEvent",{name:"livesdk_open_on_computer_process",categories:i,metrics:{}})}catch(e){}})(0,0,e)},j=({uniqueId:e})=>{try{k({action_type:y.OpenLiveRoomStart}),C({action_type:y.OpenLiveRoomStart});const t=(0,w.G2o)({uniqueId:e});window.location.href=t,(0,h.J2)(S.Nj,JSON.stringify({time:Date.now(),isFromMobileRelay:"1",uniqueId:e}))}catch(e){k({action_type:y.OpenLiveRoomFailed,error_msg:JSON.stringify(e)}),C({action_type:y.OpenLiveRoomFailed,error_msg:JSON.stringify(e)})}};let I;var T=i(89704);let L;const O=()=>{const e=(0,v.V)(),{user:t,encryptedWebid:l,lang:c,env:b,wid:x,$wsUrl:w}=(0,s.P)(g.L,{dependencies:[],selector:t=>{var i,o,n,a;return{user:null===(i=t.appContext)||void 0===i?void 0:i.user,wid:null===(o=t.appContext)||void 0===o?void 0:o.wid,encryptedWebid:null===(n=t.appContext)||void 0===n?void 0:n.encryptedWebid,lang:t.lang,env:null===(a=t.appContext)||void 0===a?void 0:a.env,$wsUrl:e.imFrontier.replace(/\/ws\/v\d+/,"")}}}),O=(0,r.useRef)(),R=(0,m.OW)("webapp_push_init_url",{}).disable_url,{pathname:E}=(0,p.useLocation)(),P=(0,r.useMemo)((()=>!!R&&Boolean((0,p.matchPath)(E,{path:R,exact:!0}))),[R,E]),A=(0,r.useCallback)(((e,t)=>(0,a.__awaiter)(void 0,void 0,void 0,(function*(){const{FWS:n}=yield i.e(4563).then(i.t.bind(i,85885,23)),a=new n(Object.assign({},e));O.current=a,a.onmessage=e=>{((e,t)=>{var i,n;try{const a=String(null!==(n=null===(i=e.message)||void 0===i?void 0:i.service)&&void 0!==n?n:"0");if(a===o.WatchOnPC)return void(({event:e,uid:t})=>{k({action_type:y.MessageReceived}),C({action_type:y.MessageReceived});try{const i=(0,f.l)(e),o=i.UserID.toString(),n=i.DisplayID.toString();if(String(o)!==t)throw new Error("uid not match");"visible"===document.visibilityState?(j({uniqueId:n}),I&&clearTimeout(I),I=setTimeout((()=>{(0,h.sc)(S.S0),clearTimeout(I)}),500)):(0,h.AP)(S.S0,JSON.stringify({time:Date.now(),payload:i}))}catch(e){k({action_type:y.MessageParseFailed,error_msg:JSON.stringify(e)}),C({action_type:y.MessageParseFailed,error_msg:JSON.stringify(e)})}})({event:e,uid:t});if(a===o.KickOffline)return void(0,T.f)({event:e,uid:t})}catch(e){console.log("[dev] frontier onmessage error",JSON.stringify(e))}})(e,t)}}))),[]),D=(0,r.useCallback)((()=>{if(!O.current||P)return;const e=O.current.readyState;[n.closed,n.closing].includes(e)&&O.current.reconnect()}),[O,P]);(0,r.useEffect)((()=>{var e;const i=_.h.getRiskParams(0),o=(0,f.R)("msToken")||"";Object.keys(i).forEach((e=>{void 0!==i[e]?i[e]=String(i[e]):i[e]=""})),i.referer||(i.referer=window.location.href);const n={fpID:"9",aID:"1459",accessKey:u()(`9e1bd35ec9db7b8d846de66ed140b1ad9${x}f8a69f1719916z`).toString(),ttwID:window.decodeURIComponent(null!=l?l:""),url:w,payloadEncoding:{encoding:"",force:!0},payloadType:{type:"application/json",force:!0},enableTransformTextPayload:!0,enableAutoAck:!0,headers:Object.assign(Object.assign({},i),{from_appID:"1988",app_language:c,app_name:"tiktok_web",channel:"web",user_agent:navigator.userAgent,"Web-Sdk-Ms-Token":o}),whaleQueryParams:{aid:"1988",version_code:"1.0.0",app_name:"tiktok_web",device_platform:"web_pc"},"Web-Sdk-Ms-Token":o};Object.assign(n,{debug:!1}),(null==t?void 0:t.uid)&&l&&!(null==O?void 0:O.current)&&!P&&(L&&clearTimeout(L),L=setTimeout((()=>{A(n,t.uid)}),5e3)),P&&(null===(e=null==O?void 0:O.current)||void 0===e||e.close(),L&&clearTimeout(L))}),[null==b?void 0:b.name,c,x,l,w,A,P]),(0,r.useEffect)((()=>{const e=()=>{const e=JSON.parse((0,h._S)(S.S0)||"{}");if(e&&e.time&&e.payload)if(Date.now()-e.time<=6e4){if("visible"===document.visibilityState){const{DisplayID:t}=e.payload;(0,h.sc)(S.S0),j({uniqueId:t})}}else(0,h.sc)(S.S0),k({action_type:y.MessageParseFailed,error_msg:"message expired"}),C({action_type:y.MessageParseFailed,error_msg:"message expired"})};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}}),[]),(0,r.useEffect)((()=>{const e=(0,h.Gz)(d(),D);return()=>{var t;null==e||e(),null===(t=null==O?void 0:O.current)||void 0===t||t.close(),L&&clearTimeout(L)}}),[])}},49730:(e,t,i)=>{"use strict";i.d(t,{E:()=>m});var o=i(58632),n=i(40099),a=i(29909),r=i(97086),s=i(45266),l=i(30247),d=i(58305),c=i(60144),u=i(88920),p=i(34871),v=i(60484),_=i(49057);const h="ENABLED_FYP_CDN_CACHE";function m(e=void 0,t="",i=""){const{streamDeviceType:m}=(0,c.A)(),g=(0,a.sL)(),{abTestVersion:f}=(0,v.L$)((0,_.W)((()=>["abTestVersion"]),[])),b=(0,s.s)(),y=function(){var e;const{user:t,webIdCreatedTime:i}=null!==(e=(0,_.W)((()=>["user","webIdCreatedTime"]),[]))&&void 0!==e?e:{},o=Boolean(t),{inWebappFypCacheExperiment:n}=(0,u.Eg)(),a=(0,p.mv)(i);return n&&!o&&a&&!(0,r.fU)()}();return(0,n.useCallback)((()=>(0,o.__awaiter)(this,void 0,void 0,(function*(){var o,n;i&&g.setRecommendListById({list:[i]});const a=(0,r.fU)()?"":(0,l.ey)(),c=y&&!(0,d._S)(h,"")&&((0,d.AP)(h,"1"),!0),u=function(e,t,i,o){const n=(0,r.fU)()?"":(0,l.ey)();return{itemId:e,pullType:1,ttamParams:(0,s.s)(),fypFeederItemId:t,watchLiveLastTime:n,device_type:i,enableCDNCache:o}}(e,t,m,c),p={itemId:e,pullType:1,ttamParams:b,watchLiveLastTime:a,device_type:m,fypFeederItemId:t};console.debug("[useFYPRecommendListFirstPull]","originParams",p,"expParams",u,JSON.stringify(u)===JSON.stringify(p));const v="v2"!==(null===(n=null===(o=null==f?void 0:f.parameters)||void 0===o?void 0:o.foryou_prefetch)||void 0===n?void 0:n.vid)?p:u;yield g.getRecommendList(v)}))),[f,g,y,m,e,b,t,i])}},91825:(e,t,i)=>{"use strict";function o(){return!!window.liveSdk_recharge_coinsConfigLogId}function n(){return{charge_from:window.liveSdk_recharge_coinsConfigRefhash||"",request_id:window.liveSdk_recharge_coinsConfigLogId||""}}i.d(t,{h8:()=>n,mR:()=>o})},87260:(e,t,i)=>{"use strict";var o,n;i.d(t,{I7:()=>a}),function(e){e.rewardOnboarding="rewardOnboarding",e.rewardOnboardingIframe="rewardOnboardingIframe",e.verifyIdentityForm="verifyIdentityForm",e.verifyIdentityFormV2="verifyIdentityFormV2",e.pipoAppealForm="pipoAppealForm",e.verifyIdentityResult="verifyIdentityResult",e.coin="coin",e.coinWithHash="coinWithHash",e.coinWithUser="coinWithUser",e.coinWithHashAndUser="coinWithHashAndUser",e.coinCashier="coinCashier",e.coinRedeem="coinRedeem",e.coinReferral="coinReferral",e.coinPaymentResult="coinPaymentResult",e.coinTransactions="coinTransactions",e.coinUnavailable="coinUnavailable",e.coinTerms="coinTerms",e.coinTermsGiftCardPolicy="coinTermsGiftCardPolicy",e.coinTransactionsDetail="coinTransactionsDetail",e.coinCardManagement="coinCardManagement",e.coinExchange="coinExchange",e.coinBindInfo="coinBindInfo",e.coinPlaceOrder="coinPlaceOrder",e.coinPlaceOrderWithHash="coinPlaceOrderWithHash",e.tax="tax",e.euTaxForm="euTaxForm",e.w9TaxSelect="w9TaxSelect",e.w9TaxInputIndividual="w9TaxInputIndividual",e.w9TaxInputEntity="w9TaxInputEntity",e.taxPaperlessConsent="taxPaperlessConsent",e.taxComplete="taxComplete",e.taxInfoUs="taxInfoUs",e.w8TaxInput="w8TaxInput",e.taxInfoW8="taxInfoW8",e.taxOverview="taxOverview",e.taxEuWhtInfo="taxEuWhtInfo",e.taxEuWhtInput="taxEuWhtInput",e.taxEuVatInfo="taxEuVatInfo",e.taxEuVatInput="taxEuVatInput",e.taxSelfBilling="taxSelfBilling",e.periodic="periodic",e.periodicDashboard="periodicDashboard",e.periodicPastPayout="periodicPastPayout",e.periodicEarningsTransaction="periodicEarningsTransaction",e.periodicPayoutTransaction="periodicPayoutTransaction",e.coinPIVerifyFAQ="coinPIVerifyFAQ",e.coinPIVerifyForm="coinPIVerifyForm",e.coinPIVerifyStatus="coinPIVerifyStatus",e.taxW9Certify="taxW9Certify",e.emailUnsubscribe="emailUnsubscribe"}(o||(o={})),function(e){e.rewardOnboarding="rewardOnboarding",e.rewardOnboardingIframe="rewardOnboardingIframe",e.verifyIdentityForm="verifyIdentityForm",e.verifyIdentityFormV2="verifyIdentityFormV2",e.pipoAppealForm="pipoAppealForm",e.verifyIdentityResult="verifyIdentityResult",e.coin="coin",e.coinWithHash="coinWithHash",e.coinWithUser="coinWithUser",e.coinWithHashAndUser="coinWithHashAndUser",e.coinCashier="coinCashier",e.coinRedeem="coinRedeem",e.coinReferral="coinReferral",e.coinPaymentResult="coinPaymentResult",e.coinTransactions="coinTransactions",e.coinUnavailable="coinUnavailable",e.coinTerms="coinTerms",e.coinTermsGiftCardPolicy="coinTermsGiftCardPolicy",e.coinTransactionsDetail="coinTransactionsDetail",e.coinCardManagement="coinCardManagement",e.coinExchange="coinExchange",e.coinBindInfo="coinBindInfo",e.coinPlaceOrder="coinPlaceOrder",e.coinPlaceOrderWithHash="coinPlaceOrderWithHash",e.tax="tax",e.euTaxForm="euTaxForm",e.w9TaxSelect="w9TaxSelect",e.w9TaxInputIndividual="w9TaxInputIndividual",e.w9TaxInputEntity="w9TaxInputEntity",e.taxPaperlessConsent="taxPaperlessConsent",e.taxComplete="taxComplete",e.taxInfoUs="taxInfoUs",e.w8TaxInput="w8TaxInput",e.taxInfoW8="taxInfoW8",e.taxOverview="taxOverview",e.taxEuWhtInfo="taxEuWhtInfo",e.taxEuWhtInput="taxEuWhtInput",e.taxEuVatInfo="taxEuVatInfo",e.taxEuVatInput="taxEuVatInput",e.taxSelfBilling="taxSelfBilling",e.periodic="periodic",e.periodicDashboard="periodicDashboard",e.periodicPastPayout="periodicPastPayout",e.periodicEarningsTransaction="periodicEarningsTransaction",e.periodicPayoutTransaction="periodicPayoutTransaction",e.coinPIVerifyFAQ="coinPIVerifyFAQ",e.coinPIVerifyForm="coinPIVerifyForm",e.coinPIVerifyStatus="coinPIVerifyStatus",e.taxW9Certify="taxW9Certify",e.emailUnsubscribe="emailUnsubscribe"}(n||(n={}));const a={rewardOnboarding:"/reward-onboarding",rewardOnboardingIframe:"/reward-onboarding/iframe",verifyIdentityForm:"/coin/verify-identity/form",verifyIdentityFormV2:"/coin/verify-identity/formV2",pipoAppealForm:"/unified-wallet/appeal/pipo-risk/form",verifyIdentityResult:"/coin/verify-identity/result",coin:"/coin",coinWithHash:"/coin/:refhash",coinWithUser:"/coin/@:uniqueId",coinWithHashAndUser:"/coin/:refhash/@:uniqueId",coinCashier:"/coin/cashier",coinRedeem:"/coin/redeem",coinReferral:"/coin/referral",coinPaymentResult:"/coin/payment-result",coinTransactions:"/coin/transaction-history",coinUnavailable:"/coin/unavailable",coinTerms:"/coin/legal/terms-of-purchase-for-coins",coinTermsGiftCardPolicy:"/coin/legal/gift-card-policy",coinTransactionsDetail:"/coin/transaction-history/detail",coinCardManagement:"/coin/card-management",coinExchange:"/coin/exchange",coinBindInfo:"/coin/bind-info",coinPlaceOrder:"/coin/place-order",coinPlaceOrderWithHash:"/coin/place-order/:refhash",tax:"/tax",euTaxForm:"/tax/eu-tax",w9TaxSelect:"/tax/us-w9-tax-select",w9TaxInputIndividual:"/tax/us-w9-tax-input-individual",w9TaxInputEntity:"/tax/us-w9-tax-input-entity",taxPaperlessConsent:"/tax/paperless-consent",taxComplete:"/tax/complete",taxInfoUs:"/tax/info-us",w8TaxInput:"/tax/w8-tax-input",taxInfoW8:"/tax/info-w8",taxOverview:"/tax/tax-overview",taxEuWhtInfo:"/tax/eu-wht-info",taxEuWhtInput:"/tax/eu-wht-input",taxEuVatInfo:"/tax/eu-vat-info",taxEuVatInput:"/tax/eu-vat-input",taxSelfBilling:"/tax/self-billing",periodic:"/periodic",periodicDashboard:"/periodic/dashboard",periodicPastPayout:"/periodic/past-payout",periodicEarningsTransaction:"/periodic/earnings-transaction",periodicPayoutTransaction:"/periodic/payout-transaction",coinPIVerifyFAQ:"/coin/pi-verify-faq",coinPIVerifyForm:"/coin/pi-verify-form",coinPIVerifyStatus:"/coin/pi-verify-status",taxW9Certify:"/tax/w9-certify",emailUnsubscribe:"/wallet/live-rewards/email-unsubscribe"};var r;!function(e){e.rewardOnboarding="rewardOnboarding",e.rewardOnboardingIframe="rewardOnboardingIframe",e.verifyIdentityForm="verifyIdentityForm",e.verifyIdentityFormV2="verifyIdentityFormV2",e.pipoAppealForm="pipoAppealForm",e.verifyIdentityResult="verifyIdentityResult",e.coin="coin",e.coinWithHash="coinWithHash",e.coinWithUser="coinWithUser",e.coinWithHashAndUser="coinWithHashAndUser",e.coinCashier="coinCashier",e.coinRedeem="coinRedeem",e.coinReferral="coinReferral",e.coinPaymentResult="coinPaymentResult",e.coinTransactions="coinTransactions",e.coinUnavailable="coinUnavailable",e.coinTerms="coinTerms",e.coinTermsGiftCardPolicy="coinTermsGiftCardPolicy",e.coinTransactionsDetail="coinTransactionsDetail",e.coinCardManagement="coinCardManagement",e.coinExchange="coinExchange",e.coinBindInfo="coinBindInfo",e.coinPlaceOrder="coinPlaceOrder",e.coinPlaceOrderWithHash="coinPlaceOrderWithHash",e.tax="tax",e.euTaxForm="euTaxForm",e.w9TaxSelect="w9TaxSelect",e.w9TaxInputIndividual="w9TaxInputIndividual",e.w9TaxInputEntity="w9TaxInputEntity",e.taxPaperlessConsent="taxPaperlessConsent",e.taxComplete="taxComplete",e.taxInfoUs="taxInfoUs",e.w8TaxInput="w8TaxInput",e.taxInfoW8="taxInfoW8",e.taxOverview="taxOverview",e.taxEuWhtInfo="taxEuWhtInfo",e.taxEuWhtInput="taxEuWhtInput",e.taxEuVatInfo="taxEuVatInfo",e.taxEuVatInput="taxEuVatInput",e.taxSelfBilling="taxSelfBilling",e.periodic="periodic",e.periodicDashboard="periodicDashboard",e.periodicPastPayout="periodicPastPayout",e.periodicEarningsTransaction="periodicEarningsTransaction",e.periodicPayoutTransaction="periodicPayoutTransaction",e.coinPIVerifyFAQ="coinPIVerifyFAQ",e.coinPIVerifyForm="coinPIVerifyForm",e.coinPIVerifyStatus="coinPIVerifyStatus",e.taxW9Certify="taxW9Certify",e.emailUnsubscribe="emailUnsubscribe"}(r||(r={}))},42230:(e,t,i)=>{"use strict";i.d(t,{R:()=>a});var o,n=i(93608);!function(e){e.ShowSnackbar="show_snackbar",e.ShowSnackbarAuto="show_snackbar_auto",e.ClickDownloadBar="click_download_bar",e.ClickGetForPC="click_get_for_pc",e.InstalWebApp="install_web_app",e.ClickGetApp="click_get_app_for_pc"}(o||(o={}));const a={handleShowSnack:e=>{const t=e?"show_snackbar_auto":"show_snackbar";n.f.event(t)},handleClickDownload:()=>{n.f.event("click_download_bar")},handleGetForPC:()=>{n.f.event("click_get_for_pc")},handleInstallApp:()=>{n.f.event("install_web_app")},handleClickGetApp:({enter_method:e})=>{n.f.event("click_get_app_for_pc",{enter_method:e})}}},5321:(e,t,i)=>{"use strict";i.d(t,{U:()=>n});var o=i(93608);const n={handleDarkModeShow:()=>{o.f.sendEvent("dark_mode_show")},handleDarkModeClick:()=>{o.f.sendEvent("dark_mode_click")},handleDarkModePopUpShow:()=>{o.f.sendEvent("dark_mode_pop_up_show")},handleDarkModePopUpClose:()=>{o.f.sendEvent("dark_mode_pop_up_close")},handleDarkModePopUpDisappear:()=>{o.f.sendEvent("dark_mode_pop_up_disappear")}}},82850:(e,t,i)=>{"use strict";i.d(t,{S:()=>r});var o,n,a=i(93608);!function(e){e.ClickEntry="feedback",e.Confirm="feedback_confirm",e.Continue="feedback_continue",e.Submit="feedback_submit"}(o||(o={})),function(e){e.Yes="yes",e.No="no"}(n||(n={}));const r={handleEnterFeedback:e=>{a.f.event("feedback",{feedback_type:e})},handleSubmitFeedback:()=>{a.f.event("feedback_submit")},handleFeedbackResponseClick:e=>{a.f.event("feedback_confirm",{enter_method:"click_"+(e?"yes":"no")})},handleNeedMoreHelpClick:()=>{a.f.event("feedback_continue")}}},51391:(e,t,i)=>{"use strict";i.d(t,{j:()=>n});var o=i(93608);const n={handleLanguageClick:e=>{o.f.sendEvent("click_change_language",e)},handleLanguageChange:e=>{o.f.sendEvent("change_langauage",e)}}},72687:(e,t,i)=>{"use strict";i.d(t,{fF:()=>p,qw:()=>c});var o,n,a,r,s,l,d,c,u=i(93608);!function(e){e.Default="default",e.ClickBtn="click_btn",e.Mouse="mouse",e.Gesture="gesture",e.Keyboard="keyboard",e.ClickVideo="click_video",e.LiveEnd="live_end",e.AutoPlay="auto_play"}(o||(o={})),function(e){e.Recommend="recommend",e.FollowPage="follow_page",e.Game="category_game",e.Event="event",e.Lifestyle="lifestyle"}(n||(n={})),function(e){e.ClickTab="click_tab",e.EnterUrl="enter_url"}(a||(a={})),function(e){e.Close="close",e.EnterRoom="enter_room",e.NextPreview="next_preview"}(r||(r={})),function(e){e.Auto="auto",e.Manual="manual"}(s||(s={})),function(e){e.Following="following",e.Suggest="suggest",e.AnchorNickname="anchor_nickname",e.ForYou="for_you",e.FollowingIcon="following_icon",e.Friends="friends",e.Live="live",e.Event="event",e.Explore="explore",e.SeeAll="see_all",e.SeeLess="see_less",e.Profile="profile",e.Upload="upload",e.Messages="messages"}(l||(l={})),function(e){e.Open="open",e.Close="close"}(d||(d={})),function(e){e[e.common=0]="common",e[e.pin=1]="pin"}(c||(c={}));const p=new class{handleDuration(e){u.f.event("livesdk_live_window_duration_v2",Object.assign({action_type:"click",enter_method:"live_cover"},e))}handleShow(e){u.f.event("livesdk_live_show",Object.assign({enter_method:"live_cover",action_type:"click",entrance_detail:"live_discover"},e))}handleClick(e){u.f.event("livesdk_rec_live_play",Object.assign({enter_method:"live_cover",action_type:e.action_type||"click",entrance_detail:"live_discover"},e))}handlePause(e){u.f.event("livesdk_live_preview_pause",Object.assign({enter_method:"live_cover"},e))}handleRefresh(e){u.f.event("livesdk_live_preview_refresh",Object.assign({enter_method:"live_cover"},e))}handleVolumeClick(e){u.f.event("livesdk_live_preview_volume_click",Object.assign({enter_method:"live_cover"},e))}handleAutoPlay(e){u.f.event("livesdk_live_preview_autoplay_click",Object.assign({enter_method:"live_cover"},e))}handleStartPlay(e){u.f.event("livesdk_live_window_play",Object.assign({enter_method:"live_cover"},e))}handleDraw(e){u.f.event("livesdk_live_draw",Object.assign({enter_method:"live_cover",is_inner:"0"},e))}handlePreviewPageSwitch(e){u.f.event("livesdk_live_preview_page_switch",Object.assign({},e))}handleSideBarToggleBtnClick(e){u.f.event("livesdk_sidebar_open_icon_click",Object.assign({},e))}handleSideBarTooltipHover(e){u.f.event("livesdk_sidebar_detail_hover_show",Object.assign({},e))}handleSideBarButtonClick(e){u.f.event("livesdk_sidebar_button_click",Object.assign({},e))}handleSideBarButtonHover(e){u.f.event("livesdk_sidebar_button_hover",Object.assign({},e))}handleRightClick(e){u.f.event("livesdk_live_right_click",Object.assign({enter_method:"live_cover",enter_from_merge:"live_merge"},e))}handleNoFollowShow(){u.f.event("livesdk_no_follow_live_show")}handleFeedTabShow(e){u.f.event("livesdk_discover_tab_icon_show",Object.assign({},e))}handleEnterRoomBtnClick(e){u.f.event("livesdk_click_to_watch_live",Object.assign({entrance_detail:"live_discover"},e))}handleEnterRoomBtnHover(e){u.f.event("livesdk_click_to_watch_live_hover",Object.assign({entrance_detail:"live_discover"},e))}handlePreviewPlayFail(e){u.f.event("livesdk_preview_play_fail",Object.assign({enter_method:"live_cover",action_type:"click",section_type:"feeds_section",content_section_order:"1",content_section_title:"feeds_section",entrance_detail:"live_discover"},e))}handleCardHover(e){u.f.event("livesdk_live_cover_hover",Object.assign({enter_method:"live_cover",action_type:"click",entrance_detail:"live_discover"},e))}}},64407:(e,t,i)=>{"use strict";i.d(t,{Xg:()=>d});var o,n,a,r,s,l=i(93608);!function(e){e.GoLivePlayerError="livesdk_go_live_player_error",e.TakePageShow="livesdk_pm_live_takepage_show",e.ScreenshotClick="livesdk_cover_modify_screenshot_click",e.ScreenshotButtonShow="livesdk_cover_modify_screenshot_show",e.Take="livesdk_live_take",e.CoverChange="livesdk_cover_modify_click",e.WebTopicClick="livesdk_web_topic_click",e.AutoStopChange="livesdk_thirdparty_auto_stop",e.ServerUrlCopy="livesdk_server_url_copy",e.StreamKeyCopy="livesdk_stream_key_copy",e.StreamKeyChangePop="livesdk_stream_key_change_pop",e.ThirdPartyStatus="livesdk_thirdparty_status",e.ShareLinkCopy="livesdk_anchor_link_copy",e.EndLiveClick="livesdk_end_live_click",e.LiveOver="livesdk_live_over",e.AppealClick="livesdk_anchor_appeal_click",e.OBSRevokeAnchorPop="livesdk_obs_revoke_anchor_pop",e.OBSRevokeRemind="livesdk_obs_revoke_remind",e.LiveCenterEntranceShow="livesdk_anchor_live_center_entrance_show",e.LiveTakepageShow="livesdk_pm_live_takepage_show",e.LiveContentClick="livesdk_live_content_click",e.LiveContentResultShow="livesdk_live_content_result_show",e.LiveTopicClick="livesdk_live_topic_click",e.LiveMatureThemeIconClick="livesdk_mature_theme_icon_click",e.LiveMatureThemePopup="livesdk_mature_theme_popup",e.LiveMatureThemePopupClick="livesdk_mature_theme_popup_click"}(o||(o={})),function(e){e.FromObs="third_party",e.FromDirect="video_live"}(n||(n={})),function(e){e.On="on",e.Off="off"}(a||(a={})),function(e){e.On="on",e.Off="off"}(r||(r={})),function(e){e[e.Temp=0]="Temp",e[e.Permanent=1]="Permanent"}(s||(s={}));const d={handlePlayerError:(e,t)=>{l.f.event("livesdk_go_live_player_error",{roomId:String(t),code:String(e.status),message:e.message})},getHashTagname:(e,t)=>{var i,o;return null!==(o=null===(i=e.find((e=>e.id===t)))||void 0===i?void 0:i.title)&&void 0!==o?o:"none"},handleScreenshotStatusClick:e=>{l.f.event("livesdk_cover_modify_screenshot_click",Object.assign(Object.assign({},e),{live_type:"third_party"}))},handleScreenshotButtonShow:e=>{l.f.event("livesdk_cover_modify_screenshot_show",Object.assign(Object.assign({},e),{live_type:"third_party"}))},handlePageShow:e=>{l.f.event("livesdk_pm_live_takepage_show",Object.assign(Object.assign({},e),{shoot_way:"",device:"web",live_type:"third_party"}))},handleCoverChange:()=>{l.f.event("livesdk_cover_modify_click")},OBSRevokeAnchorPop:e=>{l.f.event("livesdk_obs_revoke_anchor_pop",e)},OBSRevokeRemindShow:e=>{l.f.event("livesdk_obs_revoke_remind",e)},handleTopicClick:e=>{l.f.event("livesdk_web_topic_click",e)},handleAutoStopChange:e=>{l.f.event("livesdk_thirdparty_auto_stop",e)},handleServerUrlCopyClick:e=>{l.f.event("livesdk_server_url_copy",e)},handleStreamKeyCopyClick:e=>{l.f.event("livesdk_stream_key_copy",e)},handleStreamKeyChangePop:e=>{l.f.event("livesdk_stream_key_change_pop",e)},handleAppealClick:e=>{l.f.event("livesdk_anchor_appeal_click",e)},handleEndLiveClick:()=>{l.f.event("livesdk_end_live_click")},handleLiveOver:e=>{l.f.event("livesdk_live_over",e)},handleShareLinkCopy:()=>{l.f.event("livesdk_anchor_link_copy")},handleLiveStreamReport:e=>{l.f.event("livesdk_live_take",Object.assign({live_type:"third_party",send_gift_type:"open",event_type:"click",is_active_fans_show:0,show_active_user_ucnt:0,event_page:"live_take_button",game_label:e.game_label,game_label_id:e.game_label_id},e))},handleLiveCenterShow:e=>{l.f.event("livesdk_anchor_live_center_entrance_show",{anchor_id:e.anchor_id,enter_from:"profile_hover",app_name:"webapp"})},handleGoLiveShow:()=>{l.f.event("livesdk_pm_live_takepage_show")},handleLiveContentClick:e=>{l.f.event("livesdk_live_content_click",{anchor_id:e.anchor_id})},handleLiveContentConfirm:e=>{l.f.event("livesdk_live_content_result_show",{anchor_id:e.anchor_id,game_label:e.game_label,game_label_id:e.game_label_id})},handleLiveTopicClick:e=>{l.f.event("livesdk_live_topic_click",{anchor_id:e.anchor_id})},handleLiveMatureThemeIconClick:e=>{l.f.event("livesdk_mature_theme_icon_click",{action_type:e.action_type,enter_from:"live",anchor_id:e.anchor_id,source:"web"})},handleLiveMatureThemePopup:e=>{l.f.event("livesdk_mature_theme_popup",{enter_from:"live",anchor_id:e.anchor_id,source:"web"})},handleLiveMatureThemePopupClick:e=>{l.f.event("livesdk_mature_theme_popup_click",{action_type:e.action_type,enter_from:"live",anchor_id:e.anchor_id,source:"web"})}}},23255:(e,t,i)=>{"use strict";i.d(t,{t:()=>n});var o=i(93608);const n={handleClickLogo:()=>{o.f.sendEvent("click_logo")},handleClickNav:e=>{o.f.sendEvent("click_navigation_bar",e)},handleClickHamburgerMenu:()=>{o.f.sendEvent("click_hamburger_menu")},handleEntranceShow:e=>{o.f.sendEvent("eh_web_entrance_show",e)},handleClickEntrance:e=>{o.f.sendEvent("click_eh_web_entrance",e)},handleShowFollowingRedDot:()=>{o.f.sendEvent("red_dot_show")},handleRemoveFollowingRedDot:e=>{o.f.sendEvent("red_dot_exit",e)},handleShowNewLabel:()=>{o.f.sendEvent("new_label_show")},handleRemoveNewLabel:e=>{o.f.sendEvent("new_label_exit",e)}}},21620:(e,t,i)=>{"use strict";i.d(t,{I:()=>a});var o,n=i(93608);!function(e){e.ShowCollectionsTooltip="show_collections_tooltip",e.EnterCollectionsPage="enter_collections_page"}(o||(o={}));const a={handleShowCollectionsTooltip:()=>{n.f.event("show_collections_tooltip")},handleEnterCollectionsPage:()=>{n.f.event("enter_collections_page",{enterMethod:"top_bar"})}}},44205:(e,t,i)=>{"use strict";i.d(t,{l:()=>b});var o=i(24643),n=i(40099),a=i(17784),r=i(21380),s=i(73635),l=i(18499),d=i(62186);const c=(0,d.default)("div",{target:"e1dsngob0"})({position:"fixed",left:0,right:0,top:0,bottom:0,overflow:"hidden",userSelect:"none",pointerEvents:"none"},(({zIndex:e})=>({zIndex:e})),"label:DivContainer;"),u=(0,d.default)("div",{target:"e1dsngob1"})({pointerEvents:"auto",position:"absolute",left:0,top:0,bottom:0,right:0,background:"rgba(0, 0, 0, 0.5)",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.06)",transition:"opacity 0.3s"},(({status:e})=>({opacity:e===a.kp||e===a.ze||e===a.ns?0:1})),"label:DivMask;"),p=(0,d.default)("div",{target:"e1dsngob2"})({pointerEvents:"auto",position:"absolute",left:0,bottom:0,width:"100%",background:"#fff",borderRadius:"12px 12px 0 0",maxHeight:"73vh",transition:"transform 0.3s"},(({status:e})=>({transform:e===a.ze||e===a.kp||e===a.ns?"translateY(100%)":"none"})),"label:DivBodyWrapper;"),v=(0,d.default)("div",{target:"e1dsngob3"})({padding:"16px 20px 20px"},"label:DivContentWrapper;"),_=(0,d.default)("div",{target:"e1dsngob4"})({position:"absolute",top:"16px",width:"24px",height:"24px",zIndex:1,display:"flex",justifyContent:"center",alignItems:"center"},(({theme:e})=>({["rtl"===e.direction?"left":"right"]:"16px"})),"label:DivCloseWrapper;"),h=(0,d.default)("div",{target:"e1dsngob5"})({position:"absolute",top:"16px",width:"24px",height:"24px",zIndex:1,display:"flex",justifyContent:"center",alignItems:"center"},(({theme:e})=>({["rtl"===e.direction?"right":"left"]:"16px"})),"label:DivExtraAction;"),m=(0,d.default)("div",{target:"e1dsngob6"})((({theme:e})=>({padding:"16px 20px",borderBottom:`0.5px solid ${e.colors.LinePrimary}`,display:"flex",justifyContent:"center",alignItems:"center"})),"label:DivHeaderWrapper;"),g=(0,d.default)("div",{target:"e1dsngob7"})({display:"flex"},"label:DivTuxCloseIconWrapper;");var f;!function(e){e.Icon="icon",e.Mask="mask"}(f||(f={}));const b=(0,n.memo)((function(e){const{mask:t=!0,maskClosable:i=!0,onClickMask:d,closeable:f=!0,visible:b=!1,style:y,containerStyle:x,maskStyle:k,needTouchEvents:w=!0,zIndex:S=3001,onClose:C,direction:j,header:I,children:T,contentStyle:L,extraAction:O,bodyE2E:R,e2eTag:E,closeStyle:P,shouldUseTux:A=!1,headerStyle:D={},xAxisTouchOptimization:F=!1,supportSSR:B=!1,bodyTimeout:M=300}=e,[N,q]=(0,n.useState)(B);(0,n.useEffect)((()=>{q(!0)}),[]);const U=(0,n.useRef)(null),W=(0,n.useRef)(null),H=(0,n.useRef)(),z=(0,n.useCallback)((e=>{H.current=e.targetTouches[0].clientY}),[]),K=(0,n.useCallback)((e=>{var t,i;if(!(null===(t=W.current)||void 0===t?void 0:t.contains(e.target)))return e.stopPropagation(),void e.preventDefault();const o=e.targetTouches[0].clientY-(null!==(i=H.current)&&void 0!==i?i:0),n=W.current,a=F?-5:0,r=F?5:0;return n&&Math.abs(n.scrollHeight-n.clientHeight-n.scrollTop)<1&&or?e.preventDefault():void 0}),[]);(0,n.useEffect)((()=>{if(w)return b&&(document.addEventListener("touchstart",z),document.addEventListener("touchmove",K,{passive:!1})),()=>{document.removeEventListener("touchstart",z),document.removeEventListener("touchmove",K)}}),[b,K,z,w]);const V=(0,n.useCallback)((e=>{i&&(null==C||C(e,"mask")),null==d||d(e)}),[i,C]),G=(0,n.useCallback)((e=>{f&&(null==C||C(e,"icon"))}),[f,C]);if(!N)return null;const $=(0,o.jsx)(a.Ay,Object.assign({timeout:300,in:b,nodeRef:U,mountOnEnter:!0,unmountOnExit:!0,onExited:e.onExitEnd},{children:e=>(0,o.jsxs)(c,Object.assign({style:x,zIndex:S,ref:U,status:e},{children:[t&&(0,o.jsx)(u,{status:e,style:k,onClick:V}),(0,o.jsx)(a.Ay,Object.assign({appear:!0,timeout:M,in:b,unmountOnExit:!0},{children:e=>(0,o.jsxs)(p,Object.assign({"data-e2e":R,status:e,style:y},{children:[Boolean(I)&&(0,o.jsx)(m,Object.assign({style:D},{children:I})),f&&(0,o.jsx)(_,Object.assign({direction:j,onClick:G,style:P},{children:A?(0,o.jsx)(g,Object.assign({e2eTag:E},{children:(0,o.jsx)(r.h,{size:24})})):(0,o.jsx)(s.A,{e2eTag:E,style:{width:"100%",height:"100%"}})})),O&&(0,o.jsx)(h,Object.assign({direction:j},{children:O})),(0,o.jsx)(v,Object.assign({style:Object.assign({overflow:"auto"},L),header:Boolean(I),ref:W},{children:T}))]}))}))]}))}));return B?$:(0,l.createPortal)($,document.body)}))}}]);