"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[13],{50190:(e,t,o)=>{o.d(t,{g:()=>w});var n=o(24643),i=o(47236),a=o(40099),r=o(47172),l=o(25616),s=o(49730),d=o(95868),c=o(29909),u=o(82715),p=o(23255),h=o(74499),g=o(46102),m=o(62186),f=o(67963);const b=(0,m.default)(f.N_,{target:"eih5y5d0"})({fontSize:0},"label:StyledLinkLogo;");b.defaultProps=Object.assign(Object.assign({},b.defaultProps),{"data-e2e":"tiktok-logo"});var x=o(21683);const v=(0,i.Ay)({resolved:{},chunkName:()=>"logo-muted-white.svg",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!o.m[t]},importAsync:()=>o.e(976).then(o.bind(o,6060)),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 o(t)},resolve:()=>6060}),y=(0,i.Ay)({resolved:{},chunkName:()=>"logo-muted-black.svg",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!o.m[t]},importAsync:()=>o.e(4666).then(o.bind(o,90758)),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 o(t)},resolve:()=>90758}),w=(0,a.memo)((function({isDark:e,isGrayFilter:t,style:o={}}){const i=(0,l.s)(),{pathname:m}=(0,r.useLocation)(),f=(0,c.sL)(),w=(0,x.YS)(),_=(0,s.E)(),k=(0,a.useCallback)((e=>{(0,d.tO)(m)&&(e.preventDefault(),f.resetRecommendList({}),_()),p.t.handleClickLogo()}),[m,f,_]),C=i("TikTok i18n title"),A=(0,a.useMemo)((()=>e?t?(0,n.jsx)(v,{height:42,width:118}):(0,n.jsx)(g.A,{alt:C,height:42,width:118}):t?(0,n.jsx)(y,{height:42,width:118}):(0,n.jsx)(h.A,{height:42,width:118,alt:C})),[e,t,C]);return(0,n.jsxs)(b,{to:u.OZ.home,onClick:k,style:Object.assign({position:"relative"},o),ariaLabel:i("accessibilityLabels_forYou_nav_tiktok_btn"),forceSSR:w,children:[A,(0,n.jsx)("strong",{children:C})]})}))},91164:(e,t,o)=>{o.d(t,{W:()=>m});var n=o(24643),i=o(41271),a=o(40099),r=o(50970),l=o(88920),s=o(85041),d=o(56723),c=o(62186),u=o(72153);const p=(0,c.default)("div",{target:"eub0wve0"})((({theme:{direction:e}})=>(0,u.mp)({direction:e,marginStart:"24px"})),{position:"relative",width:"32px",height:"32px",background:"center no-repeat",backgroundSize:"cover",borderRadius:"50%",cursor:"pointer",WebkitAppRegion:"no-drag"},"label:DivProfileContainer;");p.defaultProps=Object.assign(Object.assign({},p.defaultProps),{"data-e2e":"profile-icon"});var h=o(82535),g=o(21683);const m=(0,a.memo)((function(e){var t,o,c;const{children:u,style:m={},id:f,ariaLabel:b,ariaExpanded:x,hasPopup:v=!0}=e,{appContext:y}=(0,i.P)(r.L),{enableClickTopRightIcon:w}=(0,l.eb)(),_=null==y?void 0:y.user,k=(0,a.useCallback)((()=>{h.q.handleEnterProfile({enter_method:"profile_icon"})}),[]),C=null!==(t=null==_?void 0:_.suggestAccountBind)&&void 0!==t&&t;return(0,g.L2)(C),_?w?(0,n.jsxs)("div",{id:f,tabIndex:v?0:void 0,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onKeyDown:e.onKeyDown,role:"button","aria-label":b,"aria-expanded":x,"aria-haspopup":v?"true":void 0,"aria-controls":x?d.hA:"",children:[(0,n.jsx)(s.E,{secUid:_.secUid,uniqueId:_.uniqueId,shouldStopPropagation:!0,reportTea:!1,teaParams:{to_user_id:_.uid},onClick:k,children:(0,n.jsx)(p,{style:Object.assign({backgroundImage:`url(${null===(o=y.user)||void 0===o?void 0:o.avatarUri[0]})`},m)})}),u]}):(0,n.jsx)(p,{id:f,tabIndex:v?0:void 0,style:Object.assign({backgroundImage:`url(${null===(c=y.user)||void 0===c?void 0:c.avatarUri[0]})`},m),onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onKeyDown:e.onKeyDown,role:"button","aria-label":b,"aria-expanded":x,"aria-haspopup":v?"true":void 0,"aria-controls":x?d.hA:"",children:u}):null}))},22941:(e,t,o)=>{o.d(t,{PO:()=>i,nj:()=>a,wt:()=>r});const n="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",i=62,a=(e,t)=>{if(10===t||![2,8,16,62].includes(t))return e;const o=[];let i,a,r,l,s;for(;e.length>0;){for(r="",i=0,a=0;an[e])).join("")},r=(e,t)=>{const o=[];let i,a,r,l,s;for(;e.length>0;){for(r="",i=0,a=0;a{o.r(t),o.d(t,{default:()=>Mn});var n=o(2787),i=o(21683),a=o(40099),r=o(11060),l=o(5441),s=o(84506),d=o(88920),c=o(95868),u=o(75431),p=o(62186);const h=(0,u.i7)({from:{transform:"rotateZ(0)"},to:{transform:"rotateZ(-360deg)"}}),g=(0,p.default)("div",{target:"e1dilpaq0"})((({theme:{direction:e},isRefreshing:t=!1})=>[{width:"32px",height:"32px",display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",marginInlineEnd:"16px",transform:`rotateY(${"rtl"===e?180:0}deg)`},t?{animation:`${h} 1s infinite`}:{}]),"label:DivBackIconContainer;"),m=(0,p.default)("div",{target:"e1dilpaq1"})((({marginInlineStart:e="unset"})=>({display:"flex",alignItems:"center",height:"32px",marginInlineStart:e,WebkitAppRegion:"no-drag"})),"label:DivAppButtonsContainer;");var f=o(24643),b=o(91066),x=o(243),v=o.n(x),y=o(93608);const w=(0,a.memo)((()=>{const e=(0,a.useCallback)((()=>{y.f.sendEvent("click_go_home_btn"),v().app.mainWindowMoveTop()}),[]);return(0,f.jsx)(g,{onClick:e,children:(0,f.jsx)(b.p,{size:32})})}));var _=o(47172),k=o(65404),C=o(72081);const A=(0,a.memo)((()=>{const{pathname:e}=(0,_.useLocation)(),t=(0,c.Tc)(e)||(0,c.b8)(e),o=(0,a.useCallback)((()=>{y.f.sendEvent("click_go_back_btn"),v().app.navigationGoBack()}),[]);return t?null:(0,f.jsx)(g,{onClick:o,children:(0,f.jsx)(k.p,{size:24})})})),I=(0,a.memo)((()=>{const[e,t]=(0,a.useState)(!1),o=(0,a.useCallback)((()=>{t(!0),y.f.sendEvent("click_refresh_button"),window.location.reload()}),[]);return(0,f.jsx)(g,{onClick:o,isRefreshing:e,children:(0,f.jsx)(C.S,{size:24})})}));o(28591),o(77966);var j=o(41271),S=o(50970),T=o(54888),D=o(20157),P=o(25616),M=o(70142),E=o(33805),L=o(72153),z=o(97397);const N=(0,p.default)(z.y,{target:"e145h5950"})((({theme:e,isFocus:t})=>[{position:"absolute",top:t?"6px":"-9999px",zIndex:99999,padding:"0 48px",height:"48px",fontSize:"16px",fontWeight:700,background:e.colors.BGPrimary,border:"1px solid #e3e3e5",borderRadius:"4px"},(0,L.mp)({direction:e.direction,start:"8px"})]),"label:StyledButton;");function R(){const e=(0,P.s)(),{pathname:t}=(0,_.useLocation)(),o=(0,E.N2)(t),n=[String("homepage_hot"),String("homepage_follow"),String("others_homepage"),String("explore_page")],i=(0,a.useMemo)((()=>"unknown"===o?"":`main-content-${o}`),[o]),[r,l]=(0,a.useState)(!1),s=(0,a.useCallback)((()=>{l(!0)}),[]),d=(0,a.useCallback)((()=>{l(!1)}),[]),c=(0,a.useCallback)((e=>{e.preventDefault(),(e=>{var t;try{if(!e)return;const o=document.querySelector(`#${e}`);if(!o)return;const n=(0,M.ke)(o);n.length>0?null===(t=n[0])||void 0===t||t.focus():o.focus()}catch(e){}})(i)}),[i]);return n.includes(o)?(0,f.jsx)(N,{isFocus:r,onFocus:s,onBlur:d,onClick:c,children:e("accessibilityLabels_home_skipContentFeed")}):null}const B=(0,p.default)("div",{target:"e1as599v0"})((({scrollWidth:e=0,shouldTransparent:t=!1,theme:{colors:o}})=>[{display:"flex",justifyContent:"space-around",boxShadow:`0px 1px 1px ${o.ShadowPrimary}`,height:L.uF,width:`calc(100% - ${e}px)`,top:0,position:"fixed",alignItems:"center",background:t?"transparent":o.BGPrimary,zIndex:3e3}]),"label:DivHeaderContainer;"),W=(0,p.default)("div",{target:"e1as599v1"})({width:"100%",display:"flex",height:"100%",flexDirection:"row",justifyContent:"space-between",alignItems:"center",WebkitAppRegion:"drag"},(({expand:e})=>e?{}:{maxWidth:L.hj}),(({theme:{direction:e}})=>(0,L.mp)({direction:e,paddingStart:"20px",paddingEnd:"24px"})),"label:DivHeaderWrapperMain;"),O=(0,p.default)(W,{target:"e1as599v2"})([{maxWidth:"100%"},({theme:{direction:e}})=>(0,L.mp)({direction:e,paddingStart:"16px",paddingEnd:"24px"})],"label:StyledDivHeaderWrapperMainV2;");var U=o(50190),G=o(85245),F=o(46682),H=o(47236),Y=o(28086),Z=o(48881),K=o(64127),V=o(89311),q=o(86389),Q=o(60484),J=o(49057),$=o(71281),X=o(38812),ee=o(60342),te=o(58305),oe=o(45297),ne=o(95197),ie=o(34012),ae=o(27375),re=o(67963),le=o(31922),se=o(68159),de=o(65556),ce=o(53737),ue=o(7089),pe=o(32125),he=o(77181);const ge=function({removeMarginLeft:e,style:t}){const o=(0,P.s)(),{pathname:n}=(0,_.useLocation)(),i=n.startsWith("/message")?se.Nk:se.vE,{lang:r}=(0,j.P)(S.L,{dependencies:[],selector:e=>{var t;return{lang:e.lang,abTestVersion:null===(t=e.appContext)||void 0===t?void 0:t.abTestVersion}}}),l=(0,ce.VB)((e=>e.messageCount),pe.bN),[{businessPermission:s},d]=(0,ue.hG)((e=>e),pe.bN),[c,u]=(0,a.useState)(!1),p=(0,ae.lH)(l),{target:h}=(0,ie._Y)(r),g=(0,le.Yy)({setCanUseBcVisible:u});(0,le.$l)(),(0,de.c)(),(0,le.qT)(),(0,a.useEffect)((()=>{d.getBusinessPermissionList()}),[d]),(0,a.useEffect)((()=>{s.comment&&s.message&&d.getBusinessAccountInfoResponse()}),[s,d]);const m=(0,a.useMemo)((()=>(0,f.jsx)(ne.m,{overlay:o("webdm_message_button"),placement:"bottom",children:(0,f.jsxs)(se.pS,{removeMarginLeft:e,children:[(0,f.jsx)(re.N_,{forceSSR:!1,to:"#",target:h,onClick:e=>{g(e)},ariaLabel:o("accessibilityLabels_forYou_nav_messages_btn"),children:(0,f.jsx)("span",{children:(0,f.jsx)(i,{})})}),l>0&&(0,f.jsx)(se.F3,{long:l>=10,children:p})]})})),[g,l,e]);return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(se.n5,{style:t,children:m}),c&&(0,f.jsx)(he.oL,{canUseBcVisible:c,setCanUseBcVisible:u})]})};var me=o(52401),fe=o(6986),be=o(509),xe=o(16680),ve=o(56723),ye=o(77734),we=o(91164),_e=o(67518),ke=o(48615),Ce=o(82902),Ae=o(97706),Ie=o(84987);const je={id:"pc-dark-fa706b14",use:"pc-dark-fa706b14-usage",viewBox:"0 0 116 100",content:''};function Se(e){const t=(0,a.useContext)(Ie.X);return(0,a.useLayoutEffect)((()=>(t.add(je),()=>{t.remove("pc-dark-fa706b14")})),[]),(0,f.jsx)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e,{children:(0,f.jsx)("use",{xlinkHref:"#pc-dark-fa706b14"},void 0)}),void 0)}const Te={id:"pc-light-47856b85",use:"pc-light-47856b85-usage",viewBox:"0 0 116 100",content:''};function De(e){const t=(0,a.useContext)(Ie.X);return(0,a.useLayoutEffect)((()=>(t.add(Te),()=>{t.remove("pc-light-47856b85")})),[]),(0,f.jsx)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e,{children:(0,f.jsx)("use",{xlinkHref:"#pc-light-47856b85"},void 0)}),void 0)}const Pe=(0,p.default)("div",{target:"e17vztu20"})({paddingTop:"21px",minWidth:"216px",maxWidth:"320px",display:"flex",flexDirection:"column",alignItems:"center"},"label:DivDownloadContainerV1;"),Me=(0,p.default)(z.y,{target:"e17vztu21"})((({theme:e})=>[(0,L.zy)({theme:e,typography:"P3",fontFamily:"TikTokFont",fontWeight:"semiBold"}),{height:"48px",borderRadius:"0 0 12px 12px",marginTop:"18px",cursor:"pointer",width:"100%"}]),"label:FullButton;"),Ee=(0,p.default)("p",{target:"e17vztu25"})((({theme:e})=>[(0,L.zy)({theme:e,typography:"P3",fontFamily:"TikTokFont",fontWeight:"bold",color:"TextPrimary"}),{fontSize:"16px",lineHeight:"21px",textAlign:"center",marginTop:"8px",padding:"0 12px"}]),"label:PTitle;"),Le=(0,p.default)("p",{target:"e17vztu26"})((({theme:e})=>[(0,L.zy)({theme:e,fontFamily:"TikTokFont",color:"TextTertiary"}),{fontSize:"12px",lineHeight:1.3,textAlign:"center",marginTop:"8px",padding:"0 12px"}]),"label:PSubTitle;"),ze=(0,p.default)(Se,{target:"e17vztu27"})({width:"116px",height:"100px"},"label:StyledPCDarkIcon;"),Ne=(0,p.default)(De,{target:"e17vztu28"})({width:"116px",height:"100px"},"label:StyledPCLightIcon;");var Re=o(22941);const Be=(0,a.memo)((function({active:e,margin:t=-17,onKeyDown:o,onBlur:n,onStartLoading:i,onEndLoading:r}){const{direction:l,colors:s,isDark:d}=(0,_e.u)(),c=(0,P.s)(),u="ltr"===l?"bottomRight":"bottomLeft",[p,h]=(0,a.useState)(!1),{wid:g=""}=(0,Q.L$)((0,J.W)((()=>["wid"]),[])),{config:m,os:b}=(0,Q.L$)((0,ke.U)((()=>["config","os"]),[])),{desktopAppDownloadLink:x}=(0,Q.L$)(m),{mac:v="",win:w=""}=(0,Q.L$)(x),{downloadHref:_,downloadAttr:k}=(0,a.useMemo)((()=>{const e=(0,Re.nj)(g,Re.PO),t="mac"===b?v:w,o="mac"===b?".dmg":".exe";return{downloadHref:t,downloadAttr:`${t.split(o)[0].substring(t.lastIndexOf("/")+1)}-wid-${e}${o}`}}),[v,b,g,w]),C=(0,a.useCallback)((()=>{return e=this,t=void 0,n=function*(){p||(y.f.sendEvent("click_download_app_btn"),h(!0),i(),(yield(0,Ce.k)({cors:!0,downloadAddr:_,fileName:k}))||(yield(0,Ce.k)({cors:!1,downloadAddr:_,fileName:k})),y.f.sendEvent("desktop_app_download_success"),h(!1),r())},new((o=void 0)||(o=Promise))((function(i,a){function r(e){try{s(n.next(e))}catch(e){a(e)}}function l(e){try{s(n.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(r,l)}s((n=n.apply(e,t||[])).next())}));var e,t,o,n}),[k,_,p]),A=(0,a.useCallback)((e=>{if(9===e.keyCode){if(!e.target)return;setTimeout((()=>{var e;try{const t=document.querySelector(`#${ve.mS}`);(null===(e=Array.from(null==t?void 0:t.querySelectorAll("*")))||void 0===e?void 0:e.includes(document.activeElement))||null==n||n()}catch(e){console.error(e)}}),0)}null==o||o(e)}),[n,o]);return(0,f.jsx)(Ae.z,{style:{borderRadius:"12px"},backgroundColor:s.BGSecondary,placement:u,active:e,arrowMargin:58,margin:t,id:ve.mS,onKeyDown:A,ariaLabelledBy:"",children:(0,f.jsxs)(Pe,{children:[d?(0,f.jsx)(ze,{}):(0,f.jsx)(Ne,{}),(0,f.jsx)(Ee,{children:c("desktop_app_downloadPopup_header")}),(0,f.jsx)(Le,{children:c("pcWeb_desktopApp_maintainPopup_body")}),(0,f.jsx)(Me,{buttonTheme:"primary",onClick:C,loading:p,children:c("desktop_app_downloadPopup_cta")})]})})}));var We=o(11983),Oe=o(31476),Ue=o(33399);const Ge=(0,p.default)("div",{target:"eyzz2kj0"})((({theme:e})=>({width:"8px",height:"8px",borderRadius:"8px",background:e.colors.Primary,margin:"auto 4px"})),"label:DivUpdateRedDot;"),Fe={padding:"10px 8px 10px 16px",width:"unset"},He=(0,a.memo)((function({active:e,margin:t=-17,e2eTag:o,onKeyDown:n,onBlur:r}){const{direction:l,colors:s}=(0,_e.u)(),d=(0,P.s)(),[c,u]=(0,a.useState)({isNeedUpdate:!1,isSilentDownload:!1}),[p,h]=(0,a.useState)(!1),[g,m]=(0,a.useState)(!1);(0,a.useEffect)((()=>{v().app.getClientUpdateInfo().then((e=>{var t;const{isNeedUpdate:o=!1,isSilentUpdate:n=!1}=null!==(t=null==e?void 0:e.data)&&void 0!==t?t:{};u({isNeedUpdate:o,isSilentDownload:n})}))}),[]),(0,a.useEffect)((()=>{const{isNeedUpdate:e=!1,isSilentDownload:t=!1}=null!=c?c:{};h(e&&(!t||g))}),[c,g]),(0,a.useEffect)((()=>{v().app.getIsUpdatePackageReady().then((e=>{var t;m(null!==(t=e.data)&&void 0!==t&&t)}))}),[]);const b=(0,i.Db)(),x=(0,a.useCallback)((()=>{var e,t,o;y.f.sendEvent("open_general_settings"),v().app.showAbout({data:{pageList:null===(e=b.pageList)||void 0===e?void 0:e.children,programList:null===(t=b.programList)||void 0===t?void 0:t.children,legalList:null===(o=b.legalList)||void 0===o?void 0:o.children}})}),[b]),w=(0,a.useCallback)((()=>{p?(y.f.sendEvent("open_update_app_modal"),v().app.showUpdateModal()):(We.F.destroy(),We.F.open({content:d("desktop_app_upToDate_toast"),duration:3}))}),[p,d]),_="ltr"===l?"bottomRight":"bottomLeft",k=(0,a.useCallback)((e=>{if(9===e.keyCode){if(!e.target)return;setTimeout((()=>{var e;try{const t=document.querySelector(`#${ve.u3}`);(null===(e=Array.from(null==t?void 0:t.querySelectorAll("*")))||void 0===e?void 0:e.includes(document.activeElement))||null==r||r()}catch(e){console.error(e)}}),0)}null==n||n(e)}),[r,n]);return(0,f.jsx)(Ae.z,{backgroundColor:s.BGSecondary,placement:_,active:e,arrowMargin:15,margin:t,id:ve.u3,onKeyDown:k,ariaLabelledBy:"",children:(0,f.jsxs)(Ue.Dp,{"data-e2e":o,id:ve.u3,role:"listbox",children:[(0,f.jsx)(Oe.K,{text:"desktop_app_tab_settings",onClick:x,href:null,e2eTag:"general-settings-entrance",style:Fe}),(0,f.jsx)(Oe.K,{text:"desktop_app_tab_updateTikTok",onClick:w,href:null,e2eTag:"update-entrance",style:Fe,containerStyle:{justifyContent:"flex-start"},children:p&&(0,f.jsx)(Ge,{})})]})})}));var Ye=o(42617),Ze=o(17784),Ke=o(91532),Ve=o(30699),qe=o(88344),Qe=o(67616),Je=o(6191),$e=o(72642),Xe=o(81230),et=o(16851),tt=o(92925),ot=o(88479),nt=o(14496),it=o(62334);const at=(0,p.default)("div",{target:"e1xroc440"})((({theme:{direction:e}})=>(0,L.mp)({direction:e,marginStart:"16px"})),{position:"relative",WebkitAppRegion:"no-drag"},"label:DivHeaderInboxContainer;");at.defaultProps=Object.assign(Object.assign({},at.defaultProps),{"data-e2e":"inbox-icon"});const rt={cursor:"pointer",display:"block"},lt=(0,p.default)(ot.A,{target:"e1xroc441"})(rt,"label:StyledInboxIcon;"),st=(0,p.default)(nt.A,{target:"e1xroc442"})(rt,"label:StyledInboxIconActive;"),dt=(0,p.default)("sup",{target:"e1xroc443"})((({long:e,theme:t})=>[(0,L.zy)({theme:t,fontFamily:"TikTokFont",typography:"P3",fontWeight:"semiBold",color:"ConstTextInverse"}),(0,L.mp)({direction:t.direction,start:"16px"}),{background:t.colors.Primary,minWidth:"20px",height:"20px",display:"flex",justifyContent:"center",borderRadius:"10px",position:"absolute",top:"-20%"},e?{padding:"0 6px"}:{}]),"label:SupBadge;"),ct=(0,p.default)("div",{target:"e1xroc444"})((({theme:e})=>(0,L.zy)({theme:e,typography:"P4",color:"ConstTextInverse",fontWeight:"semiBold"})),{display:"flex",padding:"12px",fontSize:"12px"},"label:DivTipWrapper;"),ut=(0,p.default)("span",{target:"e1xroc447"})({display:"flex",alignItems:"center",justifyContent:"center","& + &":{marginLeft:"16px"},b:{marginLeft:"2px",fontWeight:600}},"label:SpanTipItem;"),pt=(0,p.default)(it.A,{target:"e1xroc448"})({position:"absolute",top:"-8px"},(({theme:{direction:e}})=>(0,L.mp)({direction:e,end:"70px"})),"label:StyledArrow;"),ht=(0,p.default)("div",{target:"e1xroc449"})((({theme:{colors:e,direction:t},state:o,duration:n})=>[{display:o===Ze.kp?"none":"block",position:"absolute",width:"376px",height:"640px",top:"45px",background:e.BGSecondary,borderRadius:"8px",boxShadow:"0 -4px 32px rgba(0, 0, 0, 0.12)",transition:`all ${n}ms linear`,zIndex:3e3,opacity:Number(o===Ze._K)},(0,L.mp)({direction:t,end:"-66px"})]),"label:DivHeaderInboxWrapper;");var gt=o(39505),mt=o(73580),ft=o(81125),bt=o(82535);const xt={width:16,height:16},vt={2:(0,f.jsx)(Ke.A,Object.assign({},xt)),3:(0,f.jsx)(Ve.A,Object.assign({},xt)),505:(0,f.jsx)(Ve.A,Object.assign({},xt)),6:(0,f.jsx)(qe.A,Object.assign({},xt)),7:(0,f.jsx)(Qe.A,Object.assign({},xt)),[$e.Tu]:(0,f.jsx)(Je.A,Object.assign({},xt))},yt=(0,a.memo)((function(){const e=(0,P.s)(),t=(0,_e.u)(),{pathname:o}=(0,_.useLocation)(),n=(0,j.P)(Xe.s),[{noticeList:i,isFooterRequest:r,reportInboxNoticeCount:l},s]=(0,F.S)($e.kK,{selector:e=>({noticeList:e.noticeCount,reportInboxNoticeCount:e.reportInbox.count,isFooterRequest:e.isFooterRequest}),dependencies:[]}),{tooltipPriority:d,handlePopoverEnd:c,handlePopoverInitial:u}=(0,gt.N)(5),[p,h]=(0,et.P4)((e=>e.inboxTabShowing)),{totalText:g,totalLong:m,countList:b,isShowTotal:x,totalUnreadCount:v}=(0,a.useMemo)((()=>{const e=i.reduce(((e,{count:t})=>e+t),0),t=e+l;return{isShowTotal:e>0,totalText:(0,ae.lH)(t),totalLong:t>10,countList:i.filter((e=>e.count>0)),totalUnreadCount:t}}),[i,l]),w=function(){const[e,t]=(0,a.useState)(!1);return(0,a.useEffect)((()=>(t(!0),()=>{t(!1)})),[]),e}(),[k,C]=(0,a.useState)(!1),A=(0,a.useRef)(0);(0,a.useEffect)((()=>(r&&(x?5===d&&(u(),C(!0),clearTimeout(A.current),A.current=window.setTimeout((()=>{C(!1),c()}),5e3)):c()),()=>{clearTimeout(A.current)})),[r,d,x]);const I=(0,a.useRef)(null),{handleEnter:S}=function({showTip:e}){const t=(0,a.useRef)(0),o=(0,mt.Nj)(ft.b),{total:n,countList:i}=(0,j.P)($e.kK,{dependencies:[],selector:e=>{const t=e.noticeCount;return{total:t.reduce(((e,{count:t})=>e+t),0),countList:t.filter((e=>e.count>=0))}}});(0,a.useEffect)((()=>{t.current=Date.now()}),[]);const r=(0,a.useCallback)((()=>{const e=Date.now()-t.current;y.f.sendEvent("notification_panel_show",{enter_method:"click_inbox_button"}),bt.q.handleEnterMessage({show_cnt:n,enter_within_30s:e<3e4?1:0})}),[n]);return(0,a.useEffect)((()=>{if(e){const e=i.reduce(((e,{group:t,count:o})=>{switch(t){case 2:e.comment_cnt=o;break;case 3:e.like_cnt=o;break;case 6:e.mention_cnt=o;break;case 7:e.follower_cnt=o}return e}),{like_cnt:0,comment_cnt:0,mention_cnt:0,follower_cnt:0});o.handlePopShow(e)}}),[o,e]),{handleEnter:r}}({showTip:k}),T=(0,a.useCallback)((()=>{h.setInboxTabShowing(!p),s.setNoticeCount([]),s.setReportInboxNoticeCount(0),p||S()}),[s,S,p]),M=(0,a.useCallback)((e=>{e&&(e.preventDefault(),e.stopPropagation()),T()}),[T]),E=(0,a.useCallback)((e=>{13===e.keyCode||32===e.keyCode?(e.stopPropagation(),e.target===I.current&&(T(),32===e.keyCode&&e.preventDefault())):27===e.keyCode?p&&h.setInboxTabShowing(!1):9===e.keyCode&&(e.shiftKey&&e.target===I.current&&p&&h.setInboxTabShowing(!1),setTimeout((()=>{var e,t;!(null===(t=Array.from(null===(e=I.current)||void 0===e?void 0:e.querySelectorAll("*")))||void 0===t?void 0:t.includes(document.activeElement))&&p&&h.setInboxTabShowing(!1)}),0))}),[T,p]);(0,a.useEffect)((()=>{-1!==location.search.indexOf("open_inbox=1")&&M()}),[]);const L=(0,a.useMemo)((()=>p?st:lt),[p]),{hideModal:z}=(0,D.g9)(),N=(0,a.useCallback)((e=>{e.preventDefault(),e.stopPropagation()}),[]),R=(0,a.useCallback)((e=>{32!==e.keyCode&&38!==e.keyCode&&40!==e.keyCode||(e.stopPropagation(),e.preventDefault())}),[]),{region:B,language:W}=(0,Q.L$)((0,J.W)((()=>["region","language"]),[]));(0,a.useEffect)((()=>{s.fetchNoticeCount(),s.fetchReportInbox({region:B,language:W})}),[s,B,W]);const O=(0,a.useRef)(null),U=(0,a.useRef)(!1),G=(0,a.useCallback)((()=>{U.current=!0}),[]),H=(0,a.useCallback)((()=>{U.current=!1}),[]);(0,a.useEffect)((()=>{const e=()=>{U.current||h.setInboxTabShowing(!1)};return window.addEventListener("click",e),()=>{window.removeEventListener("click",e)}}),[]),(0,a.useEffect)((()=>{p&&h.setInboxTabShowing(!1)}),[o]);const Y=(0,a.useRef)(!1);(0,a.useEffect)((()=>{p&&!Y.current&&(h.fetchNoticeData(),Y.current=!0)}),[h,p]);const Z=(0,a.useCallback)((()=>(z(),!0)),[z]),K=(0,a.useCallback)((()=>{h.setInboxTabShowing(!1)}),[]),V=(0,a.useMemo)((()=>e("accessibilityLabels_forYou_btn_inbox",{number:v})),[e,v]),q=(0,a.useCallback)((()=>{setTimeout((()=>{var e;null===(e=I.current)||void 0===e||e.focus()}),0)}),[]);return(0,f.jsxs)(at,{tabIndex:0,onClick:M,onKeyDown:E,ref:I,role:"button","aria-expanded":p,"aria-label":V,children:[(0,f.jsx)(_.Prompt,{when:p,message:Z}),p?(0,f.jsx)(L,{width:32,height:32}):(0,f.jsx)(ne.m,{placement:"bottom",overlay:e("Inbox"),children:(0,f.jsx)("span",{children:(0,f.jsx)(L,{width:32,height:32})})}),(x||l>0)&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(Ae.z,{active:k,placement:"bottom",backgroundColor:t.colors.Primary,children:(0,f.jsx)(ct,{children:b.map((({group:e,count:t})=>(0,f.jsxs)(ut,{children:[vt[e],(0,f.jsx)("b",{children:(0,Q.D1)(t)})]},e)))})}),!k&&(0,f.jsx)(dt,{long:m,children:g})]}),w&&(0,f.jsx)(Ze.Ay,{timeout:200,in:p,nodeRef:O,children:o=>(0,f.jsx)(Ye.Ay,{autoFocus:!1,disabled:!p||n.visible,onDeactivation:q,children:(0,f.jsxs)(ht,{ref:O,state:o,duration:200,onClick:N,onKeyDown:R,onMouseEnter:G,onMouseLeave:H,role:"dialog","aria-label":e("Inbox_Notifications"),children:[(0,f.jsx)(pt,{width:24,height:8,fill:t.colors.BGSecondary}),(0,f.jsx)(tt.b,{closeInbox:K})]})})})]})}));var wt=o(12628),_t=o(82548);const kt=({children:e})=>{const{tooltipPriority:t,handlePopoverEnd:o,handlePopoverInitial:n}=(0,gt.N)(9),[i,r]=(0,a.useState)(!1),l=(0,mt.Nj)(wt.Ku),{direction:s}=(0,_e.u)(),c=(0,a.useMemo)((()=>({offset:"ltr"===s?[30,20]:[-30,20]})),[s]),u=(0,a.useMemo)((()=>"ltr"===s?"bottomRight":"bottomLeft"),[s]),p=(0,ke.U)((()=>["liveAnchorEntrance"]),[]),h=(0,a.useMemo)((()=>{var e;return null===(e=null==p?void 0:p.liveAnchorEntrance)||void 0===e?void 0:e.creatorHub}),[p]),g=(0,a.useRef)(0),m=(0,a.useMemo)((()=>({width:180,padding:12,fontSize:14})),[]),b=(0,P.s)(),{removeLivePop:x}=(0,d.gR)();(0,a.useEffect)((()=>{l.getLiveCreatorHubPopup()&&h&&!x?9===t?(r(!0),n(),clearTimeout(g.current),_t.U.handlePopupShow({enter_method:"live_popup"}),g.current=window.setTimeout((()=>{r(!1),o(),l.setLiveCreatorHubPopup(!0)}),5e3)):r(!1):(r(!1),o())}),[o,n,h,l,t,x]);const v=(0,a.useCallback)((e=>{e||(r(!1),o(),l.setLiveCreatorHubPopup(!0))}),[o,l]);return(0,f.jsx)(ne.m,{visible:i,trigger:"click",tooltipTheme:"blue",placement:u,align:c,overlay:b("live_creator_hub_home_desc",{},"Explore the endless possibilities of TikTok LIVE. It's the place to be for real-time fun, expression, creativity, and connection."),overlayInnerStyle:m,onVisibleChange:v,children:e})};var Ct=o(81211),At=o(72688),It=o(54129);const jt=(0,p.default)("div",{target:"eha49cm0"})({padding:"16px",width:"264px",wordBreak:"break-word"},"label:DivTipWrapper;"),St=(0,p.default)("h3",{target:"eha49cm1"})((({theme:e})=>(0,L.zy)({theme:e,typography:"P2",color:"ConstTextInverse",fontWeight:"semiBold"})),{marginBottom:"4px"},"label:H3TipTitle;"),Tt=(0,p.default)("p",{target:"eha49cm2"})((({theme:e})=>(0,L.zy)({theme:e,typography:"P3",color:"ConstTextInverse"})),"label:PTipDesc;"),Dt=(0,p.default)("div",{target:"eha49cm3"})({display:"flex",justifyContent:"flex-end"},"label:DivButtonWrapper;"),Pt=(0,p.default)(_.Link,{target:"eha49cm4"})((({theme:e})=>(0,L.zy)({theme:e,typography:"P2",color:"ConstTextInverse",fontWeight:"semiBold"})),(({theme:e})=>(0,L.mp)({direction:e.direction,marginStart:"16px"})),{color:"#ffffff!important",cursor:"pointer","&:hover":{textDecoration:"none"}},"label:StyledLink;"),Mt=(0,p.default)("button",{target:"eha49cm5"})(L.WA,(({theme:e})=>(0,L.zy)({theme:e,typography:"P2",color:"ConstTextInverse",fontWeight:"semiBold"})),{cursor:"pointer"},"label:ButtonCancel;"),Et=(0,a.memo)((({uniqueId:e,secUid:t,userPopupActive:o})=>{const{colors:n,direction:i}=(0,_e.u)(),r=(0,P.s)(),{pathname:l}=(0,_.useLocation)(),s=(0,c.sn)(l),u="fyp"===s?"homepage_hot_tooltip":`${s}_tooltip`,[p,h]=(0,a.useState)(!1),{tooltipPriority:g,handlePopoverEnd:m,handlePopoverInitial:b}=(0,gt.N)(8),x=(0,c.cj)(l)&&l.replace("/@","")===e,v=(0,a.useRef)(!1);(0,a.useEffect)((()=>{let e;return p&&(e=window.setTimeout((()=>{v.current=!0,It.s.handleCloseProfileTooltip({enter_from:u,close_method:"auto_cancel"}),m(),h(!1)}),5e3)),()=>clearTimeout(e)}),[p]),(0,a.useEffect)((()=>()=>{p&&!v.current&&It.s.handleCloseProfileTooltip({enter_from:u,close_method:"other"})}),[p]);const{removeEditProfilePop:y}=(0,d.gR)();(0,a.useEffect)((()=>{(0,te._S)(oe.vt)||x||y?(h(!1),m()):8===g?(h(!0),b(),It.s.handleShowProfileTooltip({enter_from:u}),_t.U.handlePopupShow({enter_method:"edit_profile_popup"}),(0,te.AP)(oe.vt,"1")):h(!1)}),[g,y]),(0,a.useEffect)((()=>{o&&p&&(v.current=!0,It.s.handleCloseProfileTooltip({enter_from:u,close_method:"other"}),m(),h(!1))}),[o,u,p]);const w=(0,a.useCallback)((()=>{It.s.handleCloseProfileTooltip({enter_from:u,close_method:"edit_profile"}),It.s.handleClickEditProfile({enter_from:u}),(0,te.J2)(oe.Iw,u),v.current=!0,h(!1),m()}),[u]),k=(0,a.useCallback)((()=>{v.current=!0,h(!1),m(),It.s.handleCloseProfileTooltip({enter_from:u,close_method:"cancel"})}),[u]),C=(0,Ct.U)({pathname:(0,At.fJR)({uniqueId:e,secUid:t}),search:{}}),A=(0,a.useMemo)((()=>({pathname:C})),[C]),I="ltr"===i?"bottomRight":"bottomLeft";return(0,f.jsx)(Ae.z,{active:p,backgroundColor:n.ConstSecondary2,placement:I,arrowMargin:"16px",margin:"-12px",children:(0,f.jsxs)(jt,{children:[(0,f.jsx)(St,{children:r("editprofile_feedtooltip_title")}),(0,f.jsx)(Tt,{children:r("editprofile_feedtooltip_subtitle")}),(0,f.jsxs)(Dt,{children:[(0,f.jsx)(Mt,{onClick:k,children:r("editprofile_close")}),(0,f.jsx)(Pt,{to:A,onClick:w,children:r("editprofile_editprofile")})]})]})})}));var Lt=o(466),zt=o(61886),Nt=o(87260),Rt=o(84643);const Bt=(0,p.default)("div",{target:"eulelxm0"})((({theme:{direction:e}})=>(0,L.mp)({direction:e,marginStart:"16px"})),{cursor:"pointer",height:"32px",position:"relative",width:"32px",display:"flex",alignItems:"center",justifyContent:"center"},"label:DivRechargeContainer;");Bt.defaultProps=Object.assign(Object.assign({},Bt.defaultProps),{"data-e2e":"recharge-icon"});const Wt=(0,p.default)("span",{target:"eulelxm1"})({width:"24px",height:"24px",display:"block"},"label:SpanLogoContainer;"),Ot=(0,p.default)("span",{target:"eulelxm2"})((({theme:{direction:e}})=>(0,L.mp)({direction:e,marginEnd:"8px"})),{width:"20px",height:"20px",display:"block"},"label:SpanLogoContainerInner;"),Ut=(0,p.default)("div",{target:"eulelxm3"})((({theme:{colors:e,direction:t}})=>[(0,L.mp)({direction:t,marginStart:"16px"}),{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",cursor:"pointer",height:"36px",position:"relative",padding:"7px 16px",borderRadius:"2px",border:`1px solid ${e.LineSecondary}`,boxSizing:"border-box"}]),"label:DivRechargeContainerWithText;");Ut.defaultProps=Object.assign(Object.assign({},Ut.defaultProps),{"data-e2e":"recharge-icon"});const Gt=(0,p.default)("h2",{target:"eulelxm4"})((({theme:{colors:e,direction:t}})=>[(0,L.mp)({direction:t}),{fontFamily:"TikTokFont",height:"24px",position:"relative",fontStyle:"normal",whiteSpace:"nowrap",fontWeight:600,fontSize:"16px",lineHeight:"24px",color:e.TextPrimary}]),"label:H2RechargeTextContainer;"),Ft="HAS_ENTERED_KEY",Ht="HAS_ENTERED_VALUE";var Yt;!function(e){e[e.Showing=0]="Showing",e[e.Clicking=1]="Clicking"}(Yt||(Yt={}));const Zt=()=>(0,f.jsx)(Ot,{children:(0,f.jsx)(Lt.A,{width:20,height:20})}),Kt=()=>{const e=(0,P.s)();return(0,f.jsx)(ne.m,{placement:"bottom",overlay:e("WebApp_coin_recharge_1"),children:(0,f.jsx)(Wt,{children:(0,f.jsx)(Lt.A,{width:22.5,height:22.5})})})},Vt=()=>{const e=(0,P.s)(),t=(0,_.useHistory)(),o=(0,mt.Nj)(zt.y_),[{atomState:n}]=(0,Y.I)(Rt.v),{rechargeEntryPermission:i,isWebRechargedBefore:r,isFetching:l}=n,s=i,d=(0,a.useCallback)((()=>{l||o.handleLiveWebGetCoinShow({show_page:"live_page",is_web_recharged_before:r?"yes":"no",request_page:"webapp",style:"icon_and_text"})}),[r,o,l]);(0,a.useEffect)((()=>{d()}),[d]);const c=(0,a.useCallback)((()=>{o.handleLiveWebGetCoinClick({show_page:"live_page",is_web_recharged_before:r?"yes":"no",request_page:"webapp",style:"icon_and_text"})}),[r,o]),u=(0,a.useCallback)((()=>{t.push(`${Nt.I7.coin}?enter_from=web_live_nav`)}),[t]),p=(0,a.useCallback)((()=>{c(),u()}),[c,u]);return s?(0,f.jsxs)(Ut,{"data-e2e":"LivePage-GetCoin",onClick:p,children:[(0,f.jsx)(Zt,{}),(0,f.jsx)(Gt,{children:e("WebApp_coin_recharge_1")})]}):null},qt=()=>{const[e,t]=(0,a.useState)(!0),[o,n]=(0,a.useState)(!1),i=(0,_.useHistory)(),r=(0,P.s)(),s=(0,mt.Nj)(zt.y_),d=(0,J.W)((()=>["abTestVersion"]),[]),[{atomState:c}]=(0,Y.I)(Rt.v),{rechargeEntryPermission:u,isWebRechargedBefore:p}=c,{isElectronApp:h}=(0,l.B)(),g=u,m=(0,$.qt)(null==d?void 0:d.abTestVersion,"expose_recharge_entry_pc"),b=void 0===m||"v1"===m,x=void 0!==m&&"v2"===m,v=x&&e;(0,a.useEffect)((()=>{e&&x&&(0,te._S)(Ft)===Ht&&t(!1),n(!0)}),[e,x]);const y=(0,a.useCallback)((e=>{const t={show_page:"main_page",is_web_recharged_before:p?"yes":"no",request_page:"webapp",style:v?"icon_and_text":"icon_only"};0===e?s.handleLiveWebGetCoinShow(t):1===e&&s.handleLiveWebGetCoinClick(t)}),[s,p,v]),w=(0,a.useCallback)((()=>{y(0)}),[y]);(0,a.useEffect)((()=>{o&&g&&!b&&w()}),[o,e,g,b,w]);const k=(0,a.useCallback)((()=>{(0,te.AP)(Ft,Ht)}),[]),C=(0,a.useCallback)((()=>{const e=`${Nt.I7.coin}?enter_from=web_main_nav`;h&&window.open(e,"_blank"),i.push(e)}),[i,h]),A=(0,a.useCallback)((()=>{y(1)}),[y]),I=(0,a.useCallback)((()=>{x&&e&&k(),A(),C()}),[x,e,k,C,A]);return!g||b?null:v?(0,f.jsxs)(Ut,{onClick:I,children:[(0,f.jsx)(Zt,{}),(0,f.jsx)(Gt,{children:r("WebApp_coin_recharge_1")})]}):(0,f.jsx)(Bt,{onClick:I,children:(0,f.jsx)(Kt,{})})},Qt=({alwaysShowRechargeIconAndText:e})=>e?(0,f.jsx)(Vt,{}):(0,f.jsx)(qt,{});var Jt=o(16469),$t=o(21620);const Xt=(0,p.default)("div",{target:"e1ngqdcv0"})({padding:"12px",width:"180px",wordBreak:"break-word"},"label:DivTipWrapper;"),eo=(0,p.default)("p",{target:"e1ngqdcv1"})((({theme:e})=>(0,L.zy)({theme:e,typography:"P3",color:"ConstTextInverse"})),"label:PTipDesc;"),to=(0,a.memo)((({userPopupActive:e})=>{const t=(0,P.s)(),{colors:o,direction:n}=(0,_e.u)(),[i,r]=(0,a.useState)(!1),{tooltipPriority:l,handlePopoverEnd:s,handlePopoverInitial:c}=(0,gt.N)(6),u=(0,a.useRef)(0),p="ltr"===n?"bottomRight":"bottomLeft",{removeOtherPop:h}=(0,d.gR)();return(0,a.useEffect)((()=>{Jt.bc.getItem(ye.Ak)||h?s():6===l?(c(),r(!0),$t.I.handleShowCollectionsTooltip(),Jt.bc.setItem(ye.Ak,!0),_t.U.handlePopupShow({enter_method:"series_popup"})):r(!1)}),[s,c,l,h]),(0,a.useEffect)((()=>(i&&(clearTimeout(u.current),u.current=window.setTimeout((()=>{r(!1),s()}),15e3)),()=>clearTimeout(u.current))),[i]),(0,a.useEffect)((()=>{e&&i&&(r(!1),s())}),[i,e]),(0,f.jsx)(Ae.z,{active:i,backgroundColor:o.ConstSecondary2,placement:p,arrowMargin:"16px",margin:"-12px",children:(0,f.jsx)(Xt,{children:(0,f.jsx)(eo,{children:t("tiktok_series_webapp_tooltip_get_started")})})})}));var oo=o(47079),no=o(17189);const io=(0,p.default)("div",{target:"e8m7uf60"})((({needMarginEnd:e=!1})=>({display:"flex",flexDirection:"row",alignItems:"center",position:"relative",marginInlineEnd:e?"70px":"unset"})),"label:DivHeaderRightContainer;"),ao=(0,p.default)(z.y,{target:"e8m7uf61"})((({theme:e,theme:{direction:t}})=>[(0,L.zy)({theme:e,typography:"P2",fontFamily:"TikTokFont",fontWeight:"bold"}),(0,L.mp)({direction:t,marginStart:"16px"}),{minWidth:"100px",WebkitAppRegion:"no-drag"}]),"label:StyledLoginButton;");ao.defaultProps=Object.assign(Object.assign({},ao.defaultProps),{"data-e2e":"top-login-button"});const ro=(0,p.default)("div",{target:"e8m7uf62"})((({theme:{direction:e},isLoggedin:t})=>[(0,L.mp)({direction:e,marginStart:t?"23px":"16px",marginEnd:t?"0":"-10px",paddingStart:"5px"}),{alignItems:"center",width:"32px",height:"32px",paddingTop:"5px",WebkitAppRegion:"no-drag"}]),"label:DivEhIconContainer;");ro.defaultProps=Object.assign(Object.assign({},ro.defaultProps),{"data-e2e":"eh-header-icon"});const lo=(0,p.default)("i",{target:"e8m7uf63"})((({theme:{direction:e}})=>(0,L.mp)({direction:e,marginStart:"16px"})),{position:"relative",cursor:"pointer",fontStyle:"normal",padding:"0 4px",WebkitAppRegion:"no-drag"},"label:IMoreIconWrapper;");lo.defaultProps=Object.assign(Object.assign({},lo.defaultProps),{"data-e2e":"see-more-icon"});const so=(0,p.default)(no.A,{target:"e8m7uf64"})({width:"20px",height:"20px",display:"block"},"label:StyledEllipsisVertical;"),co=(0,p.default)("i",{target:"e8m7uf65"})((({theme:e})=>[(0,L.mp)({direction:e.direction,right:"unset",left:0}),{position:"absolute",width:"8px",height:"8px",borderRadius:"50%",background:e.colors.Primary,border:`1px solid ${e.colors.ConstTextInverse}`,boxSizing:"content-box",right:0,top:"-4px"}]),"label:IStyledRedDot;");co.defaultProps=Object.assign(Object.assign({},co.defaultProps),{"data-e2e":"profile-icon-red"});const uo=(0,p.default)("div",{target:"e8m7uf66"})((({theme:{direction:e,colors:t}})=>({width:"24px",height:"24px",display:"flex",justifyContent:"center",alignItems:"center",marginInlineStart:"26px",cursor:"pointer",position:"relative",WebkitAppRegion:"no-drag",":before":{display:"block",content:'""',position:"absolute",left:"rtl"===e?"unset":"-14px",right:"rtl"===e?"-14px":"unset",width:"1px",height:"24px",background:t.LinePrimary,top:"50%",transform:"translateY(-50%)"}})),"label:DivElectronSettingContainer;"),po=(0,p.default)("div",{target:"e8m7uf67"})({position:"relative",width:"48px",height:"48px",display:"flex",justifyContent:"center",alignItems:"center",marginInlineStart:"12px",cursor:"pointer",WebkitAppRegion:"no-drag"},"label:DivDownloadContainer;"),ho=(0,p.default)("div",{target:"e8m7uf68"})((({theme:e,theme:{direction:t,colors:o}})=>[(0,L.zy)({theme:e,color:"ConstTextInverse"}),{height:"18px",padding:"0 6px",borderRadius:"10px",backgroundColor:o.Primary,fontSize:"12px",lineHeight:"18px",fontWeight:600,position:"absolute",bottom:24,whiteSpace:"nowrap"},(0,L.mp)({direction:t,start:"28px"})]),"label:DivNewLabelContainer;"),go=e=>{y.f.sendEvent("click_upload_entrance",e)};var mo=o(23255),fo=o(84783);const bo=(0,p.default)("div",{target:"e1on1cg30"})((({needMarginLeft:e})=>({marginLeft:e?"16px":"0px",position:"relative",height:"36px",WebkitAppRegion:"no-drag","a:hover":[{textDecoration:"none"}],"@media screen and (max-width: 479px)":{display:"none"}})),"label:DivUploadContainer;");bo.defaultProps=Object.assign(Object.assign({},bo.defaultProps),{"data-e2e":"upload-icon"});const xo=(0,p.default)(re.N_,{target:"e1on1cg31"})((({theme:e})=>(0,L.zy)({theme:e,typography:"P2",fontWeight:"bold",fontFamily:"TikTokFont"})),{display:"block",WebkitAppRegion:"no-drag",":hover":{textDecoration:"none"}},"label:StyledLinkText;");xo.defaultProps=Object.assign(Object.assign({},xo.defaultProps),{"data-e2e":"upload-icon"});const vo=(0,p.default)(re.N_,{target:"e1on1cg32"})({display:"block"},"label:StyledLink;"),yo=(0,p.default)("div",{target:"e1on1cg33"})((({style:e})=>{var t,o;return{padding:null!==(t=null==e?void 0:e.padding)&&void 0!==t?t:"16px",width:null!==(o=null==e?void 0:e.width)&&void 0!==o?o:"282px",wordBreak:"break-word"}}),"label:DivTipWrapper;"),wo=(0,p.default)("div",{target:"e1on1cg34"})((({theme:{colors:e}})=>({minWidth:"110px",padding:"0 16px",height:"36px",border:"1px solid rgba(22, 24, 35, 0.12)",borderRadius:"2px",display:"flex",alignItems:"center",justifyContent:"center",background:e.BGSecondary2,":hover":{backgroundColor:e.BGView},":target":{backgroundColor:"rgba(22, 24, 35, 0.06)"}})),"label:DivUpload;"),_o=(0,p.default)(fo.A,{target:"e1on1cg35"})({height:"20px",width:"20px",marginRight:"8px"},"label:StyledPlusIcon;"),ko=(0,p.default)("span",{target:"e1on1cg36"})({fontStyle:"normal",fontWeight:600,fontSize:"16px",lineHeight:"24px",color:"ConstTextInverse2"},"label:SpanUploadText;"),Co=(0,p.default)("h3",{target:"e1on1cg37"})((({theme:e})=>(0,L.zy)({theme:e,typography:"P2",color:"ConstTextInverse",fontWeight:"semiBold"})),{marginBottom:"4px"},"label:H3TipTitle;"),Ao=(0,p.default)("h3",{target:"e1on1cg38"})((({theme:e})=>(0,L.zy)({theme:e,typography:"P3",color:"ConstTextInverse",fontWeight:"semiBold",textAlign:"center",lineHeight:"22px"})),"label:H3TipSmallTitle;"),Io=(0,p.default)("p",{target:"e1on1cg39"})((({theme:e})=>(0,L.zy)({theme:e,typography:"P3",color:"ConstTextInverse"})),"label:PTipDesc;"),jo=(0,p.default)("div",{target:"e1on1cg310"})({display:"flex",justifyContent:"flex-end"},"label:DivButtonWrapper;"),So=(0,p.default)("button",{target:"e1on1cg311"})(L.WA,(({theme:e})=>(0,L.zy)({theme:e,typography:"P2",color:"ConstTextInverse",fontWeight:"semiBold"})),{cursor:"pointer"},"label:ButtonOk;"),To=(0,p.default)(So,{target:"e1on1cg312"})({width:"100%",height:"36px",borderRadius:"4px",backgroundColor:"rgba(255, 255, 255, .12)",marginTop:"8px"},"label:StyledButtonUpload;");var Do;!function(e){e[e.Schedule=0]="Schedule",e[e.LongVideo=1]="LongVideo",e[e.Podcast=2]="Podcast"}(Do||(Do={}));const Po=function({needMarginLeft:e}){var t,o;const n=(0,P.s)(),{colors:i,direction:r}=(0,_e.u)(),[s,c]=(0,a.useState)(0),[,u]=(0,F.S)(ye.GC),p=(0,J.W)((()=>["user"]),[]),{showScheduleTips:h,showPodcastTooltip:g}=(0,Q.L$)(null==p?void 0:p.user),[m,b]=(0,a.useState)(!1),{tooltipPriority:x,maxPublishVideoDuration:v,handlePopoverEnd:y,handlePopoverInitial:w}=(0,gt.N)(4),{lang:_}=(0,j.P)(S.L,{selector:e=>({lang:e.lang}),dependencies:[]}),{removeUploadPop:k}=(0,d.gR)(),C=v,A=(0,a.useCallback)((()=>{y(),b(!1),u.postScheduleRecord({ack_type:1})}),[u,y]),I=(0,a.useCallback)((()=>{go({enter_method:"navigation_bar"}),mo.t.handleClickNav({target:"upload",order:1})}),[]);(0,a.useEffect)((()=>{u.checkLongVideoTooltipStatus({})}),[u]),(0,a.useEffect)((()=>{4!==x||k?(y(),b(!1)):setTimeout((()=>{w(),h?(c(0),b(!0),_t.U.handlePopupShow({enter_method:"schedule_popup"})):C>0?(c(1),b(!0),_t.U.handlePopupShow({enter_method:"long_video_popup"})):g&&!Jt.bc.getItem(ye.xX)?(c(2),b(!0),_t.U.handlePopupShow({enter_method:"podcast_popup"})):(y(),b(!1))}),1e3)}),[y,w,x,h,C,g,k]),(0,a.useEffect)((()=>{if(m){switch(s){case 1:Jt.bc.setItem(ye.VB,!0);break;case 2:Jt.bc.setItem(ye.xX,!0)}setTimeout((()=>{y(),b(!1)}),15e3)}}),[u,y,m,s]);const T=(0,a.useCallback)((()=>{y(),b(!1),window.location.href=`https://www.tiktok.com/upload?lang=${_}`}),[y,_]),D=(0,f.jsxs)(wo,{children:[(0,f.jsx)(_o,{}),(0,f.jsx)(ko,{children:n("Upload")})]}),M=null===(t=(0,J.W)((()=>["abTestVersion"]),[]))||void 0===t?void 0:t.abTestVersion,E="v1"!==(null!==(o=(0,$.qt)(M,"creator_center_reverse"))&&void 0!==o?o:"v2")?"/tiktokstudio/upload?from=upload":`/upload?lang=${_}`,{isElectronApp:L}=(0,l.B)();let z,N,R;switch(s){case 0:z=(0,f.jsx)(Co,{children:n("scheduler_welcome_tooltip_title")}),N=n("scheduler_welcome_tooltip_des"),R=(0,f.jsx)(jo,{children:(0,f.jsx)(So,{onClick:A,children:n("OK")})});break;case 1:z=(0,f.jsx)(Co,{children:n("tenMinPlusUpload_webPage_introduceToolTip_title",{minute:C}).replace(/%\w/,String(C))}),N=n("tenMinPlusUpload_webPage_introduceToolTip_body",{minute:C}).replace(/%\w/,String(C)),R=(0,f.jsx)(To,{onClick:T,children:n("new_feature_guidance_Upload")});break;case 2:z=(0,f.jsx)(Ao,{children:n("podcasts_linkFullEpisodes_linkPodcastPage_tooltip")})}const B=2===s?"58px":"16px",W="ltr"===r?"bottomRight":"bottomLeft";return(0,f.jsxs)(bo,{needMarginLeft:e,children:[(0,f.jsx)(vo,{forceSSR:!0,to:E,target:L?"_blank":"_self",onClick:I,ariaLabel:n("accessibilityLabels_forYou_nav_upload_btn"),children:D}),(0,f.jsx)(Ae.z,{active:m&&Boolean(z),backgroundColor:i.ConstSecondary2,placement:W,arrowMargin:B,margin:"-12px",children:(0,f.jsxs)(yo,{style:2===s?{width:"max-content",padding:"12px",textAlign:"center"}:void 0,children:[z,(0,f.jsx)(Io,{children:N}),R]})})]})},Mo=function(){const e=(0,P.s)(),t=(0,xe.b1)(),o=(0,a.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),go({enter_method:"navigation_bar"}),t.openModal({query:{enter_method:"click_navigation_bar",redirect_url:"https://www.tiktok.com/upload/"}})}),[t]);return(0,f.jsx)("div",{children:(0,f.jsx)(xo,{forceSSR:!0,to:"/upload",onClick:o,ariaLabel:e("accessibilityLabels_forYou_nav_upload_btn"),children:(0,f.jsxs)(wo,{children:[(0,f.jsx)(_o,{}),(0,f.jsx)(ko,{children:e("Upload")})]})})})},Eo={id:"maximize-e9777099",use:"maximize-e9777099-usage",viewBox:"0 0 20 20",content:''};function Lo(e){const t=(0,a.useContext)(Ie.X);return(0,a.useLayoutEffect)((()=>(t.add(Eo),()=>{t.remove("maximize-e9777099")})),[]),(0,f.jsx)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e,{children:(0,f.jsx)("use",{xlinkHref:"#maximize-e9777099"},void 0)}),void 0)}const zo={id:"maximize-dark-7a16b296",use:"maximize-dark-7a16b296-usage",viewBox:"0 0 20 20",content:''};function No(e){const t=(0,a.useContext)(Ie.X);return(0,a.useLayoutEffect)((()=>(t.add(zo),()=>{t.remove("maximize-dark-7a16b296")})),[]),(0,f.jsx)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e,{children:(0,f.jsx)("use",{xlinkHref:"#maximize-dark-7a16b296"},void 0)}),void 0)}const Ro=(0,p.default)("div",{target:"e9yoi3o0"})({height:"20px",display:"flex",alignItems:"center",WebkitAppRegion:"no-drag"},"label:DivToolbarWrapper;"),Bo=(0,p.default)("div",{target:"e9yoi3o1"})({width:"20px",height:"20px",marginInlineStart:"12px",display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer"},"label:DivToolIconWrapper;"),Wo=(0,p.default)(Lo,{target:"e9yoi3o2"})({width:"20px",height:"20px"},"label:StyledMaximizeIcon;"),Oo=(0,p.default)(No,{target:"e9yoi3o3"})({width:"20px",height:"20px"},"label:StyledMaximizeDarkIcon;"),Uo=(0,p.default)("img",{target:"e9yoi3o4"})({width:"20px",height:"20px"},"label:ImgUnMaximize;");var Go=o(62998),Fo=o(30543);const Ho=o.p+"993b033eb04317ef03e7.png",Yo=o.p+"e32127eb9c7c49723b79.png";const Zo=(0,a.memo)((()=>{const{isMaximized:e}=function(){const[e,t]=(0,a.useState)(!1),o=(0,a.useCallback)((()=>{return e=this,o=void 0,i=function*(){const{data:e}=yield v().app.isFull();t(e)},new((n=void 0)||(n=Promise))((function(t,a){function r(e){try{s(i.next(e))}catch(e){a(e)}}function l(e){try{s(i.throw(e))}catch(e){a(e)}}function s(e){var o;e.done?t(e.value):(o=e.value,o instanceof n?o:new n((function(e){e(o)}))).then(r,l)}s((i=i.apply(e,o||[])).next())}));var e,o,n,i}),[]);return(0,a.useEffect)((()=>{o()}),[o]),(0,a.useEffect)((()=>{const e=v().on("ON_MAXIMIZE_CHANGE",((e,{data:o})=>{t(o)}));return()=>{null==e||e()}}),[]),{isMaximized:e}}(),{isDark:t}=(0,_e.u)();(0,a.useEffect)((()=>{v().app.handlePageReady()}),[]);const o=(0,a.useCallback)((()=>{y.f.sendEvent("click_close_app_button"),v().app.closeWindow()}),[]),n=(0,a.useCallback)((()=>{y.f.sendEvent("click_minimize_button"),v().app.minimize()}),[]),i=(0,a.useCallback)((()=>{return e=void 0,t=void 0,n=function*(){y.f.sendEvent("click_maximize_button"),v().app.maximize()},new((o=void 0)||(o=Promise))((function(i,a){function r(e){try{s(n.next(e))}catch(e){a(e)}}function l(e){try{s(n.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(r,l)}s((n=n.apply(e,t||[])).next())}));var e,t,o,n}),[]),r=t?(0,f.jsx)(Oo,{}):(0,f.jsx)(Wo,{}),l=(0,f.jsx)(Uo,{src:t?Yo:Ho});return(0,f.jsxs)(Ro,{children:[(0,f.jsx)(Bo,{onClick:n,children:(0,f.jsx)(Go.b,{size:20})}),(0,f.jsx)(Bo,{onClick:i,children:e?l:r}),(0,f.jsx)(Bo,{onClick:o,children:(0,f.jsx)(Fo.g,{size:20})})]})}));var Ko=o(82715),Vo=o(8227),qo=o(42712);const Qo=(0,H.Ay)({resolved:{},chunkName:()=>"download-animation",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!o.m[t]},importAsync:()=>Promise.all([o.e(2402),o.e(7598)]).then(o.bind(o,32599)),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 o(t)},resolve:()=>32599}),Jo=function({alwaysShowRechargeIconAndText:e=!1,disableToggleTheme:t=!1,onLoginBtnClick:o,getLogoutTrackingInfo:n}){var r;const c=(0,P.s)(),{isRTL:u}=(0,V.m)(),{user:p}=(0,j.P)(S.L,{selector:e=>{var t;return{user:null===(t=e.appContext)||void 0===t?void 0:t.user}},dependencies:[]}),h=(0,a.useMemo)((()=>new me.S(n)),[n]),g=(0,a.useRef)(!1);g.current=(0,qo.Y)();const[m,b]=(0,a.useState)(!1),[x,v]=(0,a.useState)(!1),{hasNewFeedbackReply:w}=(0,j.P)(q.i),k=(0,xe.b1)(),{showUpload:C}=(0,d.E1)(),{isElectronApp:A,isWinElectronApp:I,isMacElectronApp:T}=(0,l.B)(),{enableMessageRefactor:D,enableUploadRefactor:M}=(0,d.NF)(),L=[Ko.no.messages,Ko.no.setting,Ko.no.settingBlockList,Ko.no.feedback,Ko.no.feedbackReport,Ko.no.feedbackHistory,Ko.no.upload,Nt.I7.coin,Vo.vI.kyc,Vo.vI.kycSubmission,Vo.vI.studioFaq,Vo.vI.studioDownload,Vo.vI.giftCpcFaq],z=(0,_.useRouteMatch)(L),N=(0,i.oY)()||z,R=(0,a.useMemo)((()=>!(A||!p||M&&!N)),[A,M,N,p]),B=(0,a.useMemo)((()=>!(!(null==p?void 0:p.hasIMPermission)||D&&!N)),[null==p?void 0:p.hasIMPermission,D,N]),{abTestVersion:W,region:O}=(0,Q.L$)((0,J.W)((()=>["abTestVersion","region"]),[])),U=null!==(r=(0,$.qt)(W,"search_video"))&&void 0!==r?r:"v1",G=Boolean(p),[H,ne]=(0,F.S)(ye.GC,{selector:e=>-1!==e.redDot.indexOf(1),dependencies:[]}),ie=(0,a.useCallback)(((e=!1)=>()=>{null==o||o();const t=(0,X.Y)()||(0,X.CW)();k.openModal({closeable:!0,isSignup:e,query:{enter_method:"click_top_bar",redirect_url:(0,E.Q2)(),last_group_id:t,type:"general_search"!==y.f.commonParams.page_name&&"search_video"!==y.f.commonParams.page_name&&"search_user"!==y.f.commonParams.page_name||"v3"!==U&&"v4"!==U||G?"":"loginsearchmore"}})}),[k,U,G,o]),{active:ae,handleMouseEnter:re,handleMouseLeave:le}=(0,ee.K)(500),{active:se,handleMouseEnter:de,handleMouseLeave:ce}=(0,ee.K)(500),{active:ue,handleMouseEnter:pe,handleMouseLeave:he,handleEndAutoShow:ke}=(0,i.r7)(500),{isDesktopTestV2:Ce}=(0,s._j)(),Ae=(0,s.K8)(),Ie=!A&&Ce&&!Ae,[,je]=(0,Y.I)(Rt.v);(0,a.useEffect)((()=>{var e;const t=`${null===window||void 0===window?void 0:window.location.host}${null===window||void 0===window?void 0:window.location.pathname}`;je({uid:null!==(e=null==p?void 0:p.uid)&&void 0!==e?e:"",region:O,source:t})}),[p,O]),(0,a.useEffect)((()=>{ae&&(fe.W.handleShowEntrance(),be.d.handleProfileHoveShow(g.current))}),[ae]),(0,a.useEffect)((()=>{const e=(0,te._S)(oe.fm);b(!e)}),[]),(0,a.useEffect)((()=>{Ie&&ue&&(b(!1),(0,te.AP)(oe.fm,"1"),y.f.sendEvent("desktop_app_download_show"))}),[ue,Ie]);const Se=(0,a.useCallback)((()=>{H&&ne.updateRedDot({type:1}),re()}),[H,ne,re]),Te=(0,a.useCallback)((e=>{const t=document.querySelector(`#${ve.dy}`),o=e.target===t;13===e.keyCode||32===e.keyCode?(e.stopPropagation(),o&&(e.preventDefault(),Se())):9===e.keyCode&&e.shiftKey&&ae&&o&&le()}),[ae,Se,le]),De=(0,a.useCallback)((e=>{27===e.keyCode&&(e.preventDefault(),e.stopPropagation(),le())}),[le]),Pe=(0,a.useCallback)((()=>{v(!0),ke()}),[]),Me=(0,a.useCallback)((()=>{v(!1)}),[]),Ee=T&&u,{isDark:Le}=(0,_e.u)();if(!p)return(0,f.jsxs)(io,{needMarginEnd:Ee,children:[C&&!A&&(0,f.jsx)(Mo,{}),(0,f.jsx)(ao,{id:"header-login-button",size:"medium",buttonTheme:"primary",onClick:ie(!1),children:c("log_in")}),Ie&&(0,f.jsxs)(po,{onMouseEnter:pe,onMouseLeave:he,children:[m?(0,f.jsx)(ho,{children:c("Inbox_New")}):null,x?(0,f.jsx)(Qo,{isDark:Le}):(0,f.jsx)(Z._,{size:26}),(0,f.jsx)(Be,{onStartLoading:Pe,onEndLoading:Me,active:ue,margin:-46,e2eTag:"download-popup",onKeyDown:De,onBlur:he})]}),(0,f.jsxs)(lo,{id:ve.dy,tabIndex:0,onMouseEnter:Se,onMouseLeave:le,onKeyDown:Te,role:"button","aria-label":c("accessibilityLabels_forYou_nav_settings_btn"),"aria-expanded":ae,"aria-controls":ae?ve.hA:"",children:[(0,f.jsx)(so,{}),(0,f.jsx)(oo.t,{active:ae,e2eTag:"see-more-popup",margin:-13,onKeyDown:De,onBlur:le,disableToggleTheme:t,logoutTeaReport:h})]}),A&&(0,f.jsxs)(uo,{onMouseEnter:de,onMouseLeave:ce,children:[(0,f.jsx)(K.C,{size:20}),(0,f.jsx)(He,{margin:-12,active:se,e2eTag:"electron-setting-popup",onBlur:ce})]}),I&&(0,f.jsx)(Zo,{})]});const{uniqueId:ze,secUid:Ne}=p;return(0,f.jsxs)(io,{needMarginEnd:Ee,children:[R&&(0,f.jsx)(Po,{}),Ie&&(0,f.jsxs)(po,{onMouseEnter:pe,onMouseLeave:he,children:[m?(0,f.jsx)(ho,{children:c("Inbox_New")}):null,x?(0,f.jsx)(Qo,{isDark:Le}):(0,f.jsx)(Z._,{size:26}),(0,f.jsx)(Be,{onStartLoading:Pe,onEndLoading:Me,active:ue,margin:-46,e2eTag:"download-popup",onKeyDown:De,onBlur:he})]}),B&&(0,f.jsx)(ge,{}),(0,f.jsx)(yt,{}),!A&&(0,f.jsx)(Qt,{alwaysShowRechargeIconAndText:e}),(0,f.jsx)(kt,{children:(0,f.jsxs)(we.W,{id:ve.dy,onMouseEnter:Se,onMouseLeave:le,onKeyDown:Te,role:"button",ariaLabel:c("accessibilityLabels_forYou_nav_settings_btn"),ariaExpanded:ae,children:[(w||H)&&(0,f.jsx)(co,{className:"red-dot"}),(0,f.jsx)(oo.t,{margin:-12,active:ae,e2eTag:"profile-popup",onKeyDown:De,onBlur:le,disableToggleTheme:t,logoutTeaReport:h}),(0,f.jsx)(Et,{uniqueId:ze,secUid:Ne,userPopupActive:ae})]})}),A&&(0,f.jsxs)(uo,{onMouseEnter:de,onMouseLeave:ce,children:[(0,f.jsx)(K.C,{size:20}),(0,f.jsx)(He,{margin:-12,active:se,e2eTag:"electron-setting-popup",onBlur:ce})]}),I&&(0,f.jsx)(Zo,{}),(null==p?void 0:p.hasCollectionsAccess)&&(0,f.jsx)(to,{userPopupActive:ae})]})};var $o=o(72241);const Xo=(0,p.default)("div",{target:"etz70ds0"})({position:"relative",minWidth:"200px",padding:"0 8px",width:"516px","-webkit-app-region":"no-drag"},(0,L.jJ)({max:767,style:{display:"none"}}),"label:DivHeaderCenterContainer;"),en=(0,p.default)("div",{target:"etz70ds1"})((({marginInlineStart:e="unset"})=>({display:"flex",alignItems:"center",minWidth:"300px",marginInlineStart:e})),"label:DivHeaderLeftContainer;"),tn=(0,a.memo)((function(e){const{visible:t=!0,showLogo:o=!0,isWideHeader:n,electronElement:i,pushElement:r,leftContainerStyle:l,onLoginBtnClick:s,getLogoutTrackingInfo:d}=e,{isLoaded:c,isGrayFilter:u}=function(){const{isAppContextLoaded:e}=(0,j.P)(S.L,{selector:({appContext:e})=>({isAppContextLoaded:Boolean(e)}),dependencies:[]}),{isBizContextLoaded:t,isGrayFilter:o}=(0,j.P)(T.$,{selector:({bizContext:e})=>({isBizContextLoaded:Boolean(e),isGrayFilter:null==e?void 0:e.config.isGrayFilter}),dependencies:[]});return{isLoaded:(0,a.useMemo)((()=>e&&t),[e,t]),isGrayFilter:o}}(),p=function(){const[e,t]=(0,a.useState)(0),o=(0,a.useCallback)((({hasModal:e,scrollWidth:o})=>{t(e?o:0)}),[]),{subscribeModalChange:n}=(0,D.g9)();return(0,a.useEffect)((()=>{const e=n(o);return()=>{e()}}),[o,n]),e}(),{value:h}=(0,a.useContext)($o.xm),g=n?O:W;return(0,f.jsxs)(B,{id:"app-header",scrollWidth:p,style:{display:t?"flex":"none"},children:[r,(0,f.jsxs)(g,{children:[(0,f.jsx)(R,{}),(0,f.jsxs)(en,{marginInlineStart:null==l?void 0:l.marginInlineStart,children:[o&&(0,f.jsx)(U.g,{isGrayFilter:u,isDark:h}),i]}),(0,f.jsx)(Xo,{children:(0,f.jsx)(G.v,{})}),c&&(0,f.jsx)(Jo,{onLoginBtnClick:s,getLogoutTrackingInfo:d})]})]})}));var on,nn,an=o(58632),rn=o(64162),ln=o(4126),sn=o(93995),dn=o(23999),cn=o(26324),un=o(95719),pn=o(8536),hn=o(62564),gn=o(20259);!function(e){e.Show="browser_push_notifications_show",e.Granted="browser_push_notifications_allow",e.Denied="browser_push_notifications_block",e.Default="browser_push_notifications_close"}(on||(on={})),function(e){e.Show="guide_permission_popup_show",e.Yes="guide_permission_popup_turn_on",e.No="guide_permission_popup_cancel"}(nn||(nn={}));var mn,fn=o(7672),bn=o(65070),xn=o(68628),vn=o(9796);function yn(){return e=this,t=void 0,i=function*(){const{FCM:e}=yield Promise.resolve().then(o.bind(o,44805));return e},new((n=void 0)||(n=Promise))((function(o,a){function r(e){try{s(i.next(e))}catch(e){a(e)}}function l(e){try{s(i.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,l)}s((i=i.apply(e,t||[])).next())}));var e,t,n,i}!function(e){e.GrantedSuccess="GRANTED_SUCCESS",e.GrantedFailed="GRANTED_FAILED",e.Denied="DENIED",e.Default="DEFAULT",e.Failed="FAILED"}(mn||(mn={}));const wn="web-push-permission";let _n=class{initFCM(e,t,o){o||console.error("Error. Unable to get firebaseApiKey...");const n={firebaseConfig:{apiKey:o,appId:"1:943363548815:web:f9a03b69b49a48fb5c72fa",authDomain:"tiktok-webapp.firebaseapp.com",databaseURL:"https://tiktok-webapp.firebaseio.com",measurementId:"G-WTKRD0C8TF",messagingSenderId:"943363548815",projectId:"tiktok-webapp",storageBucket:"tiktok-webapp.appspot.com"},messagingConfig:{vapidKey:"BAxZo-Q87DGZeDuCG33n7l9hsdXb2Zwf3-Cc9_NPuaNZvqMCHhCtCm-5kivnFwhVef1N06SoKbWlJBpZU0jcfa4",onMessageShow:!0,requestPermission:!1},commonParameter:{aid:1988,sender_id:17,app_region:e,app_language:t,version_code:"1.0.0"}};return(0,bn.p)([yn(),(0,xn.H)(vn.Qf.load())]).pipe((0,pn.Z)((([e])=>{const t=new e(n.firebaseConfig,n.messagingConfig,n.commonParameter);return(0,xn.H)(t.requestPermission().then((e=>{switch(e){case"granted":return t.onTokenRefresh().then((()=>"GRANTED_SUCCESS")).catch((()=>"GRANTED_FAILED"));case"denied":return"DENIED";default:return"DEFAULT"}})))})),(0,gn.W)((()=>(console.warn("fcm init failed"),(0,dn.of)("FAILED")))))}getPushPermissionAllowed(){var e;try{const t=null!==(e=Jt.bc.getItem(wn))&&void 0!==e?e:[],o=Date.now();return 0===t.length?(t.unshift(o),Jt.bc.setItem(wn,t),(0,dn.of)(!0)):o-t[0]<864e5?(0,dn.of)(!1):t.length<3?(t.unshift(o),Jt.bc.setItem(wn,t),(0,dn.of)(!0)):o-t[2]<2592e6?(0,dn.of)(!1):(t.unshift(o),Jt.bc.setItem(wn,t.slice(0,3)),(0,dn.of)(!0))}catch(e){return(0,dn.of)(!1)}}};_n=(0,an.__decorate)([(0,fn._)()],_n);let kn=class extends rn.E{constructor(e){super(),this.service=e,this.defaultState={pushPermissionOn:!1}}setPushPermissionOn(e,t){e.pushPermissionOn=t}initFCM(e){return e.pipe((0,un.M)((({showMethod:e})=>{e&&(e=>{y.f.event("browser_push_notifications_show",{show_method:e})})(e)})),(0,pn.Z)((({region:e,lang:t,showMethod:o,firebaseApiKey:n,callback:i})=>this.service.initFCM(e,t,n).pipe((0,un.M)((e=>{if(null==i||i(e),o)switch(e){case"GRANTED_SUCCESS":case"GRANTED_FAILED":(e=>{y.f.event("browser_push_notifications_allow",{show_method:e})})(o);break;case"DENIED":(e=>{y.f.event("browser_push_notifications_block",{show_method:e})})(o);break;case"DEFAULT":(e=>{y.f.event("browser_push_notifications_close",{show_method:e})})(o)}})),(0,hn.T)((()=>this.noop()))))))}judgeIfPush(e){return e.pipe((0,pn.Z)((({region:e,lang:t,firebaseApiKey:o})=>this.service.getPushPermissionAllowed().pipe((0,hn.T)((n=>n?this.getActions().initFCM({region:e,lang:t,firebaseApiKey:o,showMethod:"direct_ask_notification_permission"}):this.noop())),(0,gn.W)((()=>(0,dn.of)(this.noop())))))))}};(0,an.__decorate)([(0,ln.h5)(),(0,an.__metadata)("design:type",Function),(0,an.__metadata)("design:paramtypes",[Object,Boolean]),(0,an.__metadata)("design:returntype",void 0)],kn.prototype,"setPushPermissionOn",null),(0,an.__decorate)([(0,ln.Mj)(),(0,an.__metadata)("design:type",Function),(0,an.__metadata)("design:paramtypes",[cn.c]),(0,an.__metadata)("design:returntype",void 0)],kn.prototype,"initFCM",null),(0,an.__decorate)([(0,ln.Mj)(),(0,an.__metadata)("design:type",Function),(0,an.__metadata)("design:paramtypes",[cn.c]),(0,an.__metadata)("design:returntype",void 0)],kn.prototype,"judgeIfPush",null),kn=(0,an.__decorate)([(0,sn.n)("Push"),(0,an.__metadata)("design:paramtypes",[_n])],kn);const Cn=(0,p.default)("div",{target:"e1gxxrd20"})((({theme:{colors:e}})=>({position:"absolute",boxSizing:"border-box",width:"400px",padding:"32px",top:"0",left:"50%",transform:"translateX(-50%)",background:e.BGPrimary,boxShadow:"0 2px 12px rgba(0, 0, 0, .12)",borderRadius:"8px",zIndex:2,textAlign:"center"})),"label:DivPushPermissionContainer;"),An=(0,p.default)("div",{target:"e1gxxrd21"})((({theme:e})=>(0,L.zy)({theme:e,typography:"P0",fontWeight:"bold",fontFamily:"TikTokFont"})),"label:DivPushPermissionTitle;"),In=(0,p.default)("div",{target:"e1gxxrd22"})((({theme:e})=>(0,L.zy)({theme:e,typography:"P2",fontFamily:"TikTokFont"})),(({theme:{colors:e}})=>({margin:"8px 0 24px",color:e.TextPrimary})),"label:DivPushPermissionSubtitle;"),jn=(0,p.default)("div",{target:"e1gxxrd23"})({display:"flex","flex-direction":"row","justify-content":"space-between","align-items":"center"},"label:DivPushPermissionButtonContainer;"),Sn=(0,p.default)(z.y,{target:"e1gxxrd24"})({"min-width":"164px"},"label:StyledButton;"),Tn=function({permissionCallback:e}){const t=(0,P.s)();(0,a.useEffect)((()=>{y.f.event("guide_permission_popup_show")}),[]);const o=(0,a.useCallback)((()=>{e("denied"),y.f.event("guide_permission_popup_cancel")}),[e]),i=(0,a.useCallback)((()=>{e("granted"),y.f.event("guide_permission_popup_turn_on")}),[e]);return(0,n.FD)(Cn,{children:[(0,n.Y)(An,{children:t("push_popup_title")}),(0,n.Y)(In,{children:t("push_popup_content")}),(0,n.FD)(jn,{children:[(0,n.Y)(Sn,{buttonTheme:"default",size:"largeNew",onClick:o,children:t("push_popup_btn1")}),(0,n.Y)(Sn,{buttonTheme:"primary",size:"largeNew",onClick:i,children:t("push_popup_btn2")})]})]})};var Dn=o(66994);const Pn=(0,a.memo)((function({visible:e=!0}){const{pathname:t}=(0,r.zy)(),{pushPermissionOn:o,permissionCallback:i}=function(){const[{pushPermissionOn:e},t]=(0,F.S)(kn),{lang:o,region:n,user:i}=(0,j.P)(S.L,{selector:e=>{var t,o,n,i;return{lang:e.lang,region:null!==(o=null===(t=e.appContext)||void 0===t?void 0:t.region)&&void 0!==o?o:"",user:null===(n=e.appContext)||void 0===n?void 0:n.user,abTestVersion:null===(i=e.appContext)||void 0===i?void 0:i.abTestVersion}},dependencies:[]}),{firebaseApiKey:r}=(0,j.P)(T.$,{selector:({bizContext:e})=>{var t;return{firebaseApiKey:(null===(t=null==e?void 0:e.apiKeys)||void 0===t?void 0:t.firebase)||""}},dependencies:[]}),l=(0,a.useCallback)((e=>{t.setPushPermissionOn(!1),"granted"===e&&t.initFCM({region:n,lang:o,firebaseApiKey:r,showMethod:"click_guide_permission_popup_turn_on"})}),[n,o,r,t]),s=(0,a.useCallback)((()=>{yn().then((e=>{if(e.isAvailable()&&("US"!==n||i))switch(Notification.permission){case"denied":return;case"granted":t.initFCM({region:n,lang:o,firebaseApiKey:r});break;default:t.judgeIfPush({region:n,lang:o,firebaseApiKey:r})}})).catch((()=>{console.warn("load fcm failed")}))}),[n,i,t,o]);return(0,a.useEffect)((()=>{s()}),[s]),{pushPermissionOn:e,permissionCallback:l}}(),{isElectronApp:u,isMacElectronApp:p,isWinElectronApp:h}=(0,l.B)(),g=(0,s.W3)(),f=(0,s.Sd)(),b=(0,d.rl)(),x=(0,c.Tc)(t)&&!b||(0,c.hh)(t),v=!p||p&&x,y=h||x?"20px":"80px",_=p&&x?"60px":"unset",k=!g&&!f,C=!f,D=function(){const{isFeedbackPage:e}=(0,Dn.YH)();return!e}(),P=o?(0,n.Y)(Tn,{permissionCallback:i}):null,M=u&&(0,n.FD)(m,{marginInlineStart:y,children:[k&&(0,n.Y)(w,{}),C&&(0,n.Y)(A,{}),(0,n.Y)(I,{})]});return(0,n.Y)(tn,{showLogo:v,visible:e,isWideHeader:D,pushElement:P,electronElement:M,leftContainerStyle:{marginInlineStart:_}})})),Mn=()=>{const e=(0,i.oY)(),{showFullSideNav:t}=(0,d.Oj)();return(0,n.Y)(Pn,{visible:!e&&!t})}},70142:(e,t,o)=>{o.d(t,{ke:()=>i,t3:()=>n});const n=(e,t,o=!0,n=!1)=>{const{keyCode:i,altKey:a,ctrlKey:r,metaKey:l,key:s}=e;if(!t&&[13,32,38,40].includes(i))return 2;if(!t&&n&&27===i)return 13;if(8===i||144===i||1===s.length&&32!==i&&!a&&!r&&!l)return t?10:2;if(t)switch(i){case 38:return a?4:1;case 40:return a?12:0;case 27:return 3;case 13:case 32:return 4;case 33:return 8;case 34:return 7;case 36:return 5;case 35:return 6;case 9:return o?11:4;default:return 12}return 12},i=e=>{try{const t=e.querySelectorAll('a[href], button, input, textarea, details, [tabindex]:not([tabindex="-1"])');return Array.from(t).filter((e=>!e.hasAttribute("disabled")&&!e.getAttribute("aria-hidden")&&e.clientWidth>0))}catch(e){return console.warn("[A11y] no focusable element found: ",e),[]}}},82902:(e,t,o)=>{o.d(t,{k:()=>i});var n=o(58632);const i=e=>(0,n.__awaiter)(void 0,void 0,void 0,(function*(){const{cors:t,downloadAddr:o,fileName:n}=e;try{const e=yield fetch(o,t?{mode:"cors",credentials:"include"}:{}),i=yield e.blob(),a=window.URL.createObjectURL(i),r=document.createElement("a");return r.href=a,n&&(r.download=n),document.body.appendChild(r),r.click(),setTimeout((()=>{document.body.removeChild(r),window.URL.revokeObjectURL(a)}),0),!0}catch(e){return!1}}))},54129:(e,t,o)=>{o.d(t,{s:()=>a});var n,i=o(93608);!function(e){e.SaveProfile="save_profile",e.ClickEditProfile="click_edit_profile",e.EditProfileNotifyShow="edit_profile_notify_show",e.CancelEditProfile="cancel_edit_profile",e.CancelEditProfileShow="cancel_edit_profile_show"}(n||(n={}));const a={handleSaveReport:e=>{i.f.event("save_profile",e)},handleClickEditProfile:e=>{i.f.event("click_edit_profile",e)},handleShowProfileTooltip:e=>{i.f.event("edit_profile_notify_show",e)},handleCancelEditProfile:e=>{i.f.event("cancel_edit_profile",e)},handleCloseProfileTooltip:e=>{i.f.event("cancel_edit_profile_show",e)}}},95197:(e,t,o)=>{o.d(t,{m:()=>x});var n=o(58632),i=o(24643),a=o(67518),r=o(40099),l=o(66283),s=o(77732);const d={white:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzYiIGhlaWdodD0iOCIgdmlld0JveD0iMCAwIDM2IDgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMCA4TDYuNjg2MjkgOEM4LjgwODAyIDggMTAuODQyOSA3LjE1NzE0IDEyLjM0MzEgNS42NTY4NUwxNy4yOTI5IDAuNzA3MTA2QzE3LjY4MzQgMC4zMTY1ODIgMTguMzE2NiAwLjMxNjU4MiAxOC43MDcxIDAuNzA3MTA3TDIzLjY1NjkgNS42NTY4NkMyNS4xNTcxIDcuMTU3MTUgMjcuMTkyIDggMjkuMzEzNyA4TDM2IDhMMCA4WiIgZmlsbD0id2hpdGUiLz4KPC9zdmc+",black:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzYiIGhlaWdodD0iOCIgdmlld0JveD0iMCAwIDM2IDgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0wIDhoNi42ODZhOCA4IDAgMCAwIDUuNjU3LTIuMzQzbDQuOTUtNC45NWExIDEgMCAwIDEgMS40MTQgMGw0Ljk1IDQuOTVBOCA4IDAgMCAwIDI5LjMxNCA4SDM2IDB6IiBmaWxsPSIjNTQ1NDU0IiBmaWxsLW9wYWNpdHk9Ii45MiIvPjwvc3ZnPg==",blue:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzYiIGhlaWdodD0iOCIgdmlld0JveD0iMCAwIDM2IDgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0wIDhoNi42ODZhOCA4IDAgMCAwIDUuNjU3LTIuMzQzbDQuOTUtNC45NWExIDEgMCAwIDEgMS40MTQgMGw0Ljk1IDQuOTVBOCA4IDAgMCAwIDI5LjMxNCA4SDM2IDB6IiBmaWxsPSIjMTBBMkM1Ii8+PC9zdmc+",border:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAAAQCAYAAAC1MDndAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAADOSURBVHgB7deLDYIwGATgvxswQkdgAxnBERyBETpKncARcAPdoCPIBuc11pgYNaBF2sKXXICEAL1QHkq+AKDiQodsmU1YT0nP7Jkzc/TbSqle5sLSGsZifh3TSKp4cZo54P+6pIt5xottmQum58/RSo5wu5scpuP8OSRnHEDFnBCfP2YlpUDcB7iVEkUqyUqp8Pt0K2tavRJKchjPFV/OHca/3fy+WpaEA64x/DupliXiwHcDysnzIzAWFmA+lGNk9bYkI6uHMN0cEvu3ugKLPi0ttJ0IVQAAAABJRU5ErkJggg=="},c={white:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzYiIGhlaWdodD0iOCIgdmlld0JveD0iMCAwIDM2IDgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMCA4TDYuNjg2MjkgOEM4LjgwODAyIDggMTAuODQyOSA3LjE1NzE0IDEyLjM0MzEgNS42NTY4NUwxNy4yOTI5IDAuNzA3MTA2QzE3LjY4MzQgMC4zMTY1ODIgMTguMzE2NiAwLjMxNjU4MiAxOC43MDcxIDAuNzA3MTA3TDIzLjY1NjkgNS42NTY4NkMyNS4xNTcxIDcuMTU3MTUgMjcuMTkyIDggMjkuMzEzNyA4TDM2IDhMMCA4WiIgZmlsbD0id2hpdGUiLz4KPC9zdmc+",black:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzYiIGhlaWdodD0iOCIgdmlld0JveD0iMCAwIDM2IDgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMCA4TDYuNjg2MjkgOEM4LjgwODAyIDggMTAuODQyOSA3LjE1NzE0IDEyLjM0MzEgNS42NTY4NUwxNy4yOTI5IDAuNzA3MTA2QzE3LjY4MzQgMC4zMTY1ODIgMTguMzE2NiAwLjMxNjU4MiAxOC43MDcxIDAuNzA3MTA3TDIzLjY1NjkgNS42NTY4NkMyNS4xNTcxIDcuMTU3MTUgMjcuMTkyIDggMjkuMzEzNyA4TDM2IDhMMCA4WiIgZmlsbD0iIzI1MjUyNSIvPgo8L3N2Zz4K",blue:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzYiIGhlaWdodD0iOCIgdmlld0JveD0iMCAwIDM2IDgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0wIDhoNi42ODZhOCA4IDAgMCAwIDUuNjU3LTIuMzQzbDQuOTUtNC45NWExIDEgMCAwIDEgMS40MTQgMGw0Ljk1IDQuOTVBOCA4IDAgMCAwIDI5LjMxNCA4SDM2IDB6IiBmaWxsPSIjMTBBMkM1Ii8+PC9zdmc+",border:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAAAQCAYAAAC1MDndAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAADOSURBVHgB7deLDYIwGATgvxswQkdgAxnBERyBETpKncARcAPdoCPIBuc11pgYNaBF2sKXXICEAL1QHkq+AKDiQodsmU1YT0nP7Jkzc/TbSqle5sLSGsZifh3TSKp4cZo54P+6pIt5xottmQum58/RSo5wu5scpuP8OSRnHEDFnBCfP2YlpUDcB7iVEkUqyUqp8Pt0K2tavRJKchjPFV/OHca/3fy+WpaEA64x/DupliXiwHcDysnzIzAWFmA+lGNk9bYkI6uHMN0cEvu3ugKLPi0ttJ0IVQAAAABJRU5ErkJggg=="},u="rotate(180deg)",p="rotate(90deg)",h="rotate(-90deg)",g={bottom:{top:"-8px",left:"50%",marginLeft:"-18px"},bottomLeft:{top:"-8px",left:"25%",marginLeft:"-18px"},bottomRight:{top:"-8px",right:"25%",marginRight:"-18px"},left:{transform:p,right:"-22px",top:"50%",marginTop:"-5px"},leftBottom:{transform:p,right:"-22px",bottom:"25%",marginTop:"5px"},leftTop:{transform:p,right:"-22px",top:"25%"},right:{transform:h,left:"-22px",top:"50%",marginTop:"-5px"},rightBottom:{transform:h,left:"-22px",bottom:"25%",marginTop:"5px"},rightTop:{transform:h,left:"-22px",top:"25%"},top:{transform:u,bottom:"-8px",left:"50%",marginLeft:"-18px"},topLeft:{transform:u,bottom:"-8px",left:"25%",marginLeft:"-18px"},topRight:{transform:u,bottom:"-8px",right:"25%",marginRight:"-18px"}};function m({tooltipTheme:e,themeCtx:{colors:t,isDark:o}}){return"black"===e?{padding:"7.5px 12px",backgroundColor:t.ToastDefault,color:t.ConstTextInverse}:"white"===e?{backgroundColor:o?t.ToastDefault:t.BGPrimary,color:t.TextPrimary,padding:0}:"blue"===e?{backgroundColor:t.ConstSecondary2,color:t.ConstTextInverse,padding:0}:null}const f=({themeCtx:e,themeCtx:{fontFamilies:t},tooltipTheme:o="black",withPadding:n=!0,arrow:i=!0,rtl:a=!1,placement:r="top",arrowStyle:s={}})=>(0,l.AH)({fontFamily:t.TikTokFont,boxSizing:"border-box",margin:"0",padding:"0",color:"rgba(0, 0, 0, 0.65)",fontSize:"14px",listStyle:"none",fontFeatureSettings:'"tnum"',position:"absolute",zIndex:3060,display:"block",maxWidth:"300px",visibility:"visible","&-hidden":{display:"none"}},function({themeCtx:e,tooltipTheme:t,withPadding:o}){const{fontWeights:n,typography:i}=e;return{"&-inner":(0,l.AH)({textAlign:"left",textDecoration:"none",borderRadius:"8px",fontWeight:n.semiBold},i.P2,m({themeCtx:e,tooltipTheme:t}),o&&{padding:"8px"})}}({themeCtx:e,tooltipTheme:o,withPadding:n}),function({arrow:e,tooltipTheme:t,placement:o,themeCtx:n,arrowStyle:i}){return{"&-arrow":(0,l.AH)({display:e?"block":"none",position:"absolute",width:"36px",height:"8px",backgroundImage:n.isDark?`url(${c[t]})`:`url(${d[t]})`},g[o],i)}}({themeCtx:e,tooltipTheme:o,placement:r,arrow:i,arrowStyle:s}),a&&{direction:"rtl","& *":{direction:"rtl"}}),b=e=>{var{className:t,themeCtx:o,tooltipTheme:a,withPadding:r,rtl:d,arrow:c,prefixCls:u,placement:p,arrowStyle:h}=e,g=(0,n.__rest)(e,["className","themeCtx","tooltipTheme","withPadding","rtl","arrow","prefixCls","placement","arrowStyle"]);return(0,i.jsx)(s.A,Object.assign({prefixCls:(0,l.cx)(t,f({themeCtx:o,tooltipTheme:a,withPadding:r,rtl:d,arrow:c,placement:p,arrowStyle:h})),placement:p},g))},x=(0,r.memo)((function(e){var{children:t,fullscreenAdjust:o=!1,placement:l="top",align:s={},overlay:d}=e,c=(0,n.__rest)(e,["children","fullscreenAdjust","placement","align","overlay"]);const u=(0,a.u)(),p=((e,t={})=>(0,r.useMemo)((()=>{let o;switch(e){case"top":case"topLeft":case"topRight":o=[0,-10];break;case"bottom":case"bottomLeft":case"bottomRight":o=[0,10];break;case"leftTop":case"left":case"leftBottom":o=[-10,0];break;default:o=[10,0]}return Object.assign({offset:o},t)}),[t,e]))(l,s),h=Object.keys(c).reduce(((e,t)=>(void 0!==c[t]&&(e[t]=c[t]),e)),{});return o?(0,i.jsx)(b,Object.assign({},h,{getTooltipContainer:"undefined"==typeof document?void 0:()=>{var e,t,o,n;return null!==(n=null!==(o=null!==(t=null!==(e=document.fullscreenElement)&&void 0!==e?e:null===document||void 0===document?void 0:document.webkitCurrentFullScreenElement)&&void 0!==t?t:null===document||void 0===document?void 0:document.mozFullScreenElement)&&void 0!==o?o:null===document||void 0===document?void 0:document.msFullscreenElement)&&void 0!==n?n:document.body},destroyTooltipOnHide:{keepParent:!1},themeCtx:u,placement:l,align:p,overlay:d},{children:t})):(0,i.jsx)(b,Object.assign({},h,{themeCtx:u,placement:l,align:p,overlay:d},{children:t}))}))}}]);