"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[5229],{81500:(e,t,i)=>{i.d(t,{m:()=>b});var n=i(33063),o=i(88920),a=i(141),l=i(96689),r=i(49057),s=i(58305),d=i(40099),c=i(82715),u=i(75792),p=i(11060),m=i(93341),h=i(16680),g=i(32125),_=i(80241);const f=["/live","/download",c.OZ.video];function b(e,t){var i;const{getPriorityPopup:b,setIsPopupPriorityReady:v}=(0,n._y)(),{popupPriority:x,isReady:w}=(0,n.lz)((e=>({popupPriority:e.priority,isReady:e.isReadyList[3]}))),{handlePopoverInitial:y,handlePopoverEnd:k,handlePopoverAdd:C}=(0,d.useMemo)((()=>b(3)),[b]),S=null!==(i=(0,m.MY)((e=>e.globalVvCount),g.bN))&&void 0!==i?i:0,{pathname:P}=(0,p.zy)(),{showOnHot:j,showOnRest:T}=(0,o.tY)(),O=(0,p.B6)(P,{path:[c.OZ.explore,...a.qk],exact:!0}),{showGuestModeInterestSelector:M}=(0,o.aO)(),I=M?u.tH.signupInterestSelector:u.tH.loginGuestMode;(O&&j||!O&&T||M)&&(e=Object.assign(Object.assign({},e),{loginPath:I}));const D=(0,d.useCallback)((()=>{var t;null===(t=null==e?void 0:e.closeCallback)||void 0===t||t.call(e),k()}),[k,e]),{vvLimit:E}=(0,o.Eq)(),B=E?`vv_limit_${E}`:"guest_mode",L=(0,l.K)(Object.assign(Object.assign({query:{enter_method:B}},e),{closeCallback:D,isGuestMode:!0})),R=(0,r.W)((()=>["user"]),[]),[z,W]=(0,d.useState)(!1),A=(0,h.b1)(),[H,F]=(0,d.useState)(!1),N=(0,d.useMemo)((()=>!f.some((e=>(0,p.B6)(P,{path:e,exact:!0})))),[P])||t,V=(0,d.useMemo)((()=>{var e;return null!==(e=(0,s._S)("guest-mode-flag","0"))&&void 0!==e?e:"0"}),[]);(0,d.useEffect)((()=>{(!w||t&&!H)&&((null==R?void 0:R.user)||"0"!==V||!N||z||C(),v(3),F(!0))}),[V,C,z,H,w,t,v,N,null==R?void 0:R.user]),(0,d.useEffect)((()=>{const e=(0,p.B6)(P,{path:c.OZ.video,exact:!0}),i=S>=E;if(!(null==R?void 0:R.user)&&"0"===V&&N&&!z&&3===x&&i)try{A.setCheckGuestModeLogin({showLoginOnLoad:!0}),W(!0),y(),L(),_.o.handleSelectorShow({})}catch(e){}else(e&&t||!e)&&A.setCheckGuestModeLogin({showLoginOnLoad:!1})}),[L,y,z,A,t,P,x,null==R?void 0:R.user,S,E,V,N])}},12743:(e,t,i)=>{i.r(t),i.d(t,{default:()=>qi});var n=i(2787),o=i(11060),a=i(50970),l=i(536),r=i(60484),s=i(71777),d=i(40099),c=i(93341),u=i(47172),p=i(141),m=i(84506),h=i(46682),g=i(41271),_=i(40812),f=i(68310),b=i(37434),v=i(49057),x=i(71281),w=i(82189),y=i(86515);var k=i(7859),C=i(99374),S=i(2408),P=i(58632),j=i(71111),T=i(31209),O=i(56070);const M={isPPFInitialized:!1,isNonPersonalized:!1},I=(0,j.atom)(M);I.debugLabel="ppfAtom";const{useAtomService:D,useServiceState:E,useServiceDispatchers:B}=(0,T.i)(I,((e,t)=>({setPPFState(e){t(I,(t=>Object.assign(Object.assign({},t),e)))},setIsNonPersonalization(e){t(I,(t=>Object.assign(Object.assign({},t),{isNonPersonalized:e})))},setIsPPFInitialized(e){t(I,(t=>Object.assign(Object.assign({},t),{isPPFInitialized:e})))}})));var L=i(58305);i(4408);const R="webapp_popup_ppf_personalization_toast",z=()=>{const e=(0,r.L$)((0,v.W)((()=>["user","abTestVersion"]),[])),t=(0,S.Qi)(),[{isNonPersonalized:i,isPPFInitialized:n}]=(()=>{const e=E(),t=B(),i=(0,r.L$)((0,v.W)((()=>["user","abTestVersion"]),[])),{user:{uid:n=""}={}}=i;return(0,d.useEffect)((()=>{n&&!e.isPPFInitialized&&(0,P.__awaiter)(void 0,void 0,void 0,(function*(){const e=yield((e,t)=>(0,P.__awaiter)(void 0,void 0,void 0,(function*(){const i=yield(e=>(0,P.__awaiter)(void 0,void 0,void 0,(function*(){return O.h.post("/tiktok/ppf/api/eligibility/v1",{body:JSON.stringify({uid:e}),baseUrlType:2,headers:{}})})))(e),n=0===i.status_code&&"object"==typeof i.eligibility_list&&i.eligibility_list.length>0&&i.eligibility_list.some((e=>"ca_no_personalized_go_rule"===e.id_value&&e.is_eligible));return Object.assign(Object.assign({},t),{isNonPersonalized:n})})))(n,M);t.setPPFState(Object.assign(Object.assign({},e),{isPPFInitialized:!0}))}))}),[n,e.isPPFInitialized,t]),[e]})(),{abTestVersion:o,user:{uid:a=""}={}}=e,l=(0,k.Vq)(!0),s=(0,k.Vq)(),c=(0,k.Vq)(void 0,!0),u=(e,i=!0)=>{const n=!e;i&&(l(n),s(n),c(n)),t.setIsSearchPersonalized(n),t.setIsFeedPersonalized(n)},p=((e,t)=>{const i=(0,k.o0)(!t);return(0,d.useEffect)((()=>{e&&(0,L.Hd)(R,void 0)&&((0,L.X)(R),i())}),[e,i]),()=>{e&&(0,L.J2)(R,"1")}})(Boolean(a&&n),i);(0,d.useEffect)((()=>{if(!a||!n)return;const e=(0,C.Sw)(a),t=(0,C.mx)(o,a);i!==e?(u(i),setTimeout((()=>{p(),window.location.reload()}),100)):e&&t&&u(t,!1)}),[a,o,i,n])};var W=i(24643),A=i(18499),H=i(79983),F=i(79395),N=i(25616),V=i(22248),U=i(36792),$=i(48180),q=i(88920),G=i(53438),K=i(62186),Y=i(72153);const Z=(0,K.default)("div",{target:"ermk86y1"})({height:"100vh",width:"100vw",position:"absolute",top:0,left:0,pointerEvents:"none","> *":{pointerEvents:"auto"},"@media (max-width: 239px), (max-height: 429px)":{display:"none"}},"label:DivButtonContainer;"),J=(0,K.default)("div",{target:"ermk86y2"})((({showButtonOnlyOnHover:e,forceShowButton:t})=>[{height:"100vh",width:"100vw",position:"absolute",background:"black",overflow:"hidden"},t?{[`${Z}`]:{transition:"opacity .5s",opacity:1}}:e?{[`${Z}`]:{transition:"opacity .5s",opacity:0},[`:hover ${Z}`]:{opacity:1}}:{}]),"label:DivPlayerContainer;"),X=(0,K.default)("div",{target:"ermk86y3"})((({theme:e})=>[{position:"absolute",top:0,margin:"8px"},(0,Y.mp)({direction:e.direction,end:"0px"})]),"label:DivCloseButton;"),Q=(0,K.default)("div",{target:"ermk86y4"})((({theme:e,showCloseButton:t})=>[{position:"absolute",top:0,margin:"8px",display:"flex",flexDirection:"row",gap:"13px"},(0,Y.mp)({direction:e.direction,end:t?"45px":"0px"})]),"label:DivTopRight;"),ee=(0,K.default)("div",{target:"ermk86y5"})((({theme:e})=>[{position:"absolute",bottom:"298px",display:"flex",flexDirection:"column",gap:"16px"},(0,Y.mp)({direction:e.direction,end:"8px"})]),"label:DivCenterRight;"),te=(0,K.default)("div",{target:"ermk86y6"})((({theme:e})=>[{position:"absolute",left:"12px",bottom:"27px",display:"flex",flexDirection:"column",alignItems:"flex-start",gap:"8px",maxWidth:"464px",width:"calc(100% - 68px)"},(0,Y.mp)({direction:e.direction,start:"12px"})]),"label:DivBottomLeft;"),ie=(0,K.default)("div",{target:"ermk86y7"})((({theme:e})=>[{position:"absolute",width:"46px",overflow:"hidden",bottom:"27px",display:"flex",flexDirection:"column",alignItems:"center",gap:"12px"},(0,Y.mp)({direction:e.direction,end:"0px"})]),"label:DivBottomRight;"),ne=(0,K.default)("div",{target:"ermk86y8"})({position:"absolute",left:0,bottom:0,width:"calc(100% - 30px)",margin:"12px"},"label:DivBottom;"),oe=(0,K.default)("div",{target:"ermk86y9"})({width:"100%",height:"100%",fontSize:"14px",fontWeight:"500",lineHeight:"18.2px",color:"white",padding:"0px 60px",display:"flex",justifyContent:"center",alignItems:"center",textAlign:"center"},"label:DivFallback;");var ae=i(19434);const le=(0,K.default)(ae.A,{target:"e1uv33kd0"})({position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none"},"label:StyledPlayIcon;"),re=(0,K.default)("div",{target:"e1uv33kd1"})({position:"absolute",left:0,top:0,height:"100%",width:"100%",cursor:"pointer"},"label:ControlMask;");var se=i(40650);const de=(0,d.memo)((()=>(0,W.jsx)(le,{width:70,height:70,fill:"#fff"}))),ce=(0,d.memo)((({pause:e,togglePlay:t,onDoubleClick:i=()=>{}})=>{const n=(0,se.R)((()=>({onClick:t,onDoubleClick:i})),[t,i]);return(0,W.jsxs)(W.Fragment,{children:[e&&(0,W.jsx)(de,{}),(0,W.jsx)(re,{onClick:n})]})})),ue=24,pe=16,me="#fff",he=(0,K.default)("button",{target:"e1fy2pze0"})((({theme:{colors:e}})=>({display:"flex",justifyContent:"center",alignItems:"center",background:e.ConstLineInverse,borderRadius:"50%",cursor:"pointer",border:"none",outline:"none",fontsize:0,"&:focus-visible":{outline:`2px solid ${e.Negative}`},width:"32px",height:"32px",":hover":{opacity:.7},":active":{opacity:.5}})),(({theme:e})=>(0,Y.oO)({theme:e,isUiOptimise:!0})),"label:TransparentButtonContainer;");var ge=i(54622);const _e=(0,d.memo)((e=>{const{handleClose:t}=e;return(0,W.jsx)(he,{onClick:t,children:(0,W.jsx)(ge.A,{width:12,height:12,fill:me})})})),fe=(0,K.default)("div",{target:"e1944tko0"})({height:"4px",width:"100%",backgroundColor:"rgba(255, 255, 255, 0.2)",position:"absolute",left:"0",bottom:"0",cursor:"pointer",borderRadius:"15px"},"label:DivSeekBarProgress;"),be=(0,K.default)("div",{target:"e1944tko1"})((({theme:{direction:e}})=>({height:"4px",width:"100%",backgroundColor:"#F8F7F6",position:"absolute",bottom:"0",cursor:"pointer",transformOrigin:"rtl"===e?"right":"left",borderRadius:"15px"})),"label:DivSeekBar;"),ve=(0,K.default)("div",{target:"e1944tko2"})((({theme:{direction:e}})=>(0,Y.mp)({direction:e})),(({theme:{direction:e,colors:t}})=>({display:"none",width:"12px",height:"12px",backgroundColor:"#ffffff",borderRadius:"12px",position:"absolute",zIndex:10,bottom:"0",transform:`translate(${"rtl"===e?"50%":"-50%"}, 3px)`,cursor:"pointer",boxShadow:`0px 0px 3px ${t.TextPrimary}`})),"label:DivSeekBarCircle;"),xe=(0,K.default)("div",{target:"e1944tko3"})({width:"100%",position:"absolute",bottom:"0",[`:hover ${ve}`]:{display:"block"},"> *::after":{content:'""',position:"absolute",top:"-8px",bottom:"-8px",width:"100%"}},"label:DivSeekBarContainer;");var we=i(83162),ye=i(67518);const ke=(0,d.memo)((({videoId:e,playerRef:t})=>{const i=(0,d.useRef)(null),n=(0,d.useRef)(null),o=(0,d.useRef)(null),{direction:a}=(0,ye.u)(),{pipWindow:l}=(0,s.mE)(),r=(0,d.useCallback)((e=>{var i,n;null===(n=null===(i=t.current)||void 0===i?void 0:i.seek)||void 0===n||n.call(i,e)}),[t]),{bindDrag:c,seek:u,videoPercent:p}=(0,we.u)({direction:a,progressRef:i,videoId:e,circleRef:n,barRef:o,initialPercent:0,draggingPercentCb:r,documentObjProps:null==l?void 0:l.document}),m="ltr"===a?{left:`calc(${100*p}%)`}:{right:`calc(${100*p}%)`};return(0,W.jsxs)(xe,{children:[(0,W.jsx)(fe,{ref:i,onClick:u,onMouseDown:c}),(0,W.jsx)(ve,{ref:n,style:m,onMouseDown:c}),(0,W.jsx)(be,{ref:o,style:{transform:`scaleX(${p})`},onClick:u,onMouseDown:c})]})}));var Ce=i(65491);const Se=(0,K.default)(he,{target:"eq556nr0"})((({isPrev:e})=>({transform:e?"rotate(-90deg)":"rotate(90deg)",top:e?"calc(50% - 48px)":"calc(50% + 8px)",":disabled":{opacity:0}})),(({theme:{direction:e}})=>(0,Y.mp)({direction:e,end:"20px"})),"label:StyledVideoSwitch;"),Pe=(0,d.memo)((({hasPrev:e,hasNext:t,handlePrev:i,handleNext:n})=>(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(Se,{disabled:!e,isPrev:!0,onClick:()=>i({enter_method:"click"}),children:(0,W.jsx)(Ce.A,{width:pe,height:pe,fill:me})}),(0,W.jsx)(Se,{disabled:!t,isPrev:!1,onClick:()=>n({enter_method:"click"}),children:(0,W.jsx)(Ce.A,{width:pe,height:pe,fill:me})})]})));var je=i(93959);const Te=(0,d.memo)((e=>{const{item:t,playModeForTea:i}=e,{id:n}=t;return n?(0,W.jsx)(he,{children:(0,W.jsx)(je.Z,{videoId:n,playMode:i,hideTooltip:!0,iconSize:pe})}):null}));var Oe=i(92067),Me=i(16537);const Ie={width:pe,height:pe,fill:me},De=(0,d.memo)((({mute:e,toggleMute:t})=>(0,W.jsx)("div",{onClick:t,children:(0,W.jsx)(he,{children:e?(0,W.jsx)(Oe.A,Object.assign({},Ie)):(0,W.jsx)(Me.A,Object.assign({},Ie))})}))),Ee=(0,K.default)("div",{target:"e4mw150"})({fontSize:"13px",fontStyle:"normal",fontWeight:500,lineHeight:"130%",color:"#FFF"},"label:DivNickname;"),Be=(0,d.memo)((e=>{const{videoId:t}=e,{nickname:i=""}=(0,F.$)(t,(e=>({nickname:null==e?void 0:e.nickname})));return i?(0,W.jsxs)(Ee,{children:[" ",i," "]}):null}));var Le=i(8513);const Re=(0,K.default)("div",{target:"e1mtud3p0"})({pointerEvents:"auto",textOverflow:"ellipsis",overflow:"hidden",wordBreak:"break-all"},"label:DivDescriptionContainer;"),ze=(0,K.default)("div",{target:"e1mtud3p1"})({fontSize:"12px",fontStyle:"normal",fontWeight:400,lineHeight:"130%",color:"rgba(255, 255, 255, 0.90)",letterSpacing:"0.093px"},"label:DivDescription;"),We={color:"#fff",fontSize:"12px",lineHeight:"18px"},Ae=(0,d.memo)((e=>{const{item:t}=e,{id:i,desc:n}=t;return n?(0,W.jsx)(Re,{children:(0,W.jsx)(Le.k,{onlyKey:i,lineClamp:2,lineHeight:15,btnStyle:We,overflowLineNum:12,isMobile:!0,forceRightSide:!0,children:(0,W.jsxs)(ze,{children:[" ",n," "]})})}):null}));var He=i(38401),Fe=i(39430);const Ne=(0,K.default)("div",{target:"e12541b10"})({display:"flex",columnGap:"6px",rowGap:"2px",flexWrap:"wrap",pointerEvents:"none"},"label:DivTagWrapper;"),Ve=(0,d.memo)((({item:e,playMode:t})=>{const i=(0,W.jsx)(He.P,{item:e,playMode:t,isMiniPlayer:!0}),n=(0,W.jsx)(Fe.$,{item:e,playMode:t,isMiniPlayer:!0});return i||n?(0,W.jsxs)(Ne,{children:[i,n]}):null})),Ue=(0,K.default)("div",{target:"e1y6un900"})((({theme:{direction:e}})=>[(0,Y.mp)({direction:e}),{display:"flex",alignItems:"start",color:"rgba(255, 255, 255, 0.75)",fontSize:"12px",fontWeight:"semiBold",lineHeight:"130%",letterSpacing:"0.127px",gap:"4px"}]),"label:DivWarnInfo;"),$e=(0,K.default)("div",{target:"e1y6un901"})({height:"17px",display:"flex",alignItems:"center"},"label:DivIconContainer;"),qe=(0,K.default)("div",{target:"e1y6un902"})({flex:"0 1 auto",wordBreak:"break-word",verticalAlign:"text-top"},"label:DivWarnInfoContent;");var Ge=i(36970);const Ke=(0,d.memo)((({item:e})=>{const{warnInfo:t}=e,{text:i=""}=(0,r.L$)(null==t?void 0:t[0]);return i?(0,W.jsxs)(Ue,{children:[(0,W.jsx)($e,{children:(0,W.jsx)(Ge.A,{})}),(0,W.jsxs)(qe,{children:[" ",i," "]})]}):null}));var Ye=i(85041),Ze=i(4538),Je=i(40935),Xe=i(51664),Qe=i(11983),et=i(15605);const tt=()=>{var e;const{user:t}=null!==(e=(0,v.W)((()=>["user"]),[]))&&void 0!==e?e:{};return Boolean(t)},it=()=>{const{pipWindow:e}=(0,s.mE)();return(0,d.useCallback)((t=>{const i=null==e?void 0:e.document.body;i&&(Qe.F.destroy(),Qe.F.open(Object.assign(Object.assign({widthType:"half",getContainerPosition:"fixed"},t),{getContainer:()=>i})))}),[e])},nt=()=>{const{pipWindow:e}=(0,s.mE)();return(0,d.useMemo)((()=>(0,et.A)({key:"pip",container:e?e.document.head:void 0})),[e])},ot=(0,d.memo)((e=>{var t,i;const{item:n,teaBasicParams:o}=e,a=null!==(t=null==n?void 0:n.author)&&void 0!==t?t:"",l=(0,Je.yS)(a),r=(0,Xe.r$)(l),s=it(),c=(0,N.s)(),u=(0,d.useCallback)((()=>{s({content:c("pcWeb_miniPlayer_linkOpened_toast",{},"Link opened in browser"),duration:3})}),[s,c]);return l?(0,W.jsx)(Ye.E,{uniqueId:l.uniqueId,secUid:l.secUid,teaParams:Object.assign(Object.assign({},o),{to_user_id:null!==(i=n.authorId)&&void 0!==i?i:"",enter_method:"click"}),target:"_blank",onClick:u,children:(0,W.jsx)(Ze.i,Object.assign({needAnimation:!0,liveTheme:2,size:34},r))}):null}));var at=i(38017),lt=i(30699);const rt=(0,K.default)("button",{target:"eu97dd0"})((({theme:{colors:e,direction:t},isHorizontal:i=!1})=>[Y.WA,(0,Y.mp)({direction:t,marginEnd:i?"16px":"0px"}),{position:"relative",display:"flex",alignItems:"center",cursor:"pointer",flexDirection:i?"row":"column",":disabled":{cursor:"default",color:e.TextPrimary}}]),"label:ButtonActionItem;"),st=(0,K.default)("span",{target:"eu97dd1"})((({theme:e,isHorizontal:t=!1})=>[(0,Y.mp)({direction:e.direction,marginEnd:t?"9px":"0px"}),{display:"flex",justifyContent:"center",alignItems:"center",width:"32px",height:"32px",fontSize:"0px",borderRadius:"50%",transition:"all ease-in-out 200ms",opacity:t?"0.9":1,color:"#fff"}]),"label:SpanIconWrapper;"),dt=(0,K.default)("strong",{target:"eu97dd2"})((({theme:e,isHorizontal:t=!1,normalText:i=!1})=>[(0,Y.zy)({theme:e,typography:"P3",fontWeight:t||i?"normal":"bold"}),{fontSize:"12px",lineHeight:"130%",textAlign:"center",color:t?"#161823":"#fff",textShadow:t?"none":"0px 1px 1px rgba(22, 24, 35, 0.2)"}]),"label:StrongText;"),ct=(0,d.memo)((e=>{const{text:t,disabled:i,children:n,e2eTag:o,style:a,iconStyle:l,isHorizontal:r=!1,normalText:s=!1}=e;return(0,W.jsxs)(rt,{isHorizontal:r,type:"button",onClick:e.onClick,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,disabled:i,style:a,children:[(0,W.jsx)(st,{style:l,isHorizontal:r,"data-e2e":`${o}-icon`,children:n}),t&&(0,W.jsx)(dt,{normalText:s,isHorizontal:r,"data-e2e":`${o}-count`,children:t})]})}));var ut=i(52333),pt=i(2584),mt=i(60492);const ht=(e,t)=>{const{id:i}=null!=e?e:{},n=(0,h.w)(ut.k),o=tt(),a=(0,N.s)(),l=it();return(0,d.useCallback)((e=>{i&&(pt.O.handleGeneralClick("like",Object.assign(Object.assign({},t),{enter_method:e})),o?n.postLikeVideo(Object.assign(Object.assign({},t),{id:i,enter_method:e})):l({content:a("pcWeb_miniPlayer_backToLogIn_toast",{},"Go back to the same tab to log in"),duration:3}))}),[o,i,t,a,n,l])},gt=(0,d.memo)((({item:e,teaBasicParams:t})=>{const{digged:i,stats:n}=e,o=ht(e,t),a=(0,d.useCallback)((()=>{o("click")}),[o]);return(0,W.jsx)(ct,{text:(0,r.D1)(null==n?void 0:n.diggCount),onClick:a,children:i?(0,W.jsx)(at.A,{width:ue,height:ue,fill:me}):(0,W.jsx)(lt.A,{width:ue,height:ue,fill:me})})}));var _t=i(84987);const ft={id:"collected-f29ef602",use:"collected-f29ef602-usage",viewBox:"0 0 24 24",content:''};function bt(e){const t=(0,d.useContext)(_t.X);return(0,d.useLayoutEffect)((()=>(t.add(ft),()=>{t.remove("collected-f29ef602")})),[]),(0,W.jsx)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e,{children:(0,W.jsx)("use",{xlinkHref:"#collected-f29ef602"},void 0)}),void 0)}const vt={id:"uncollected-7652bb5c",use:"uncollected-7652bb5c-usage",viewBox:"0 0 24 24",content:''};function xt(e){const t=(0,d.useContext)(_t.X);return(0,d.useLayoutEffect)((()=>(t.add(vt),()=>{t.remove("uncollected-7652bb5c")})),[]),(0,W.jsx)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e,{children:(0,W.jsx)("use",{xlinkHref:"#uncollected-7652bb5c"},void 0)}),void 0)}const wt=(0,d.memo)((({item:e,teaBasicParams:t})=>{var i,n;const{id:o,collected:a}=e,l=(0,h.w)(ut.k),s=(0,h.w)(H.O),c=tt(),u=(0,N.s)(),p=it(),m=(0,d.useCallback)((()=>{pt.O.handleGeneralClick("favorite",Object.assign(Object.assign({},t),{enter_method:"click"})),c?(a&&s.removeItemListById({key:"favorites",groupId:o}),l.postCollectVideo({itemId:o})):p({content:u("pcWeb_miniPlayer_backToLogIn_toast",{},"Go back to the same tab to log in"),duration:3})}),[c,o,t,u,s,p]);return e?(0,W.jsx)(ct,{text:(0,r.D1)(Number(null!==(n=null===(i=null==e?void 0:e.stats)||void 0===i?void 0:i.collectCount)&&void 0!==n?n:0)),onClick:m,children:a?(0,W.jsx)(bt,{width:ue,height:ue,fill:me}):(0,W.jsx)(xt,{width:ue,height:ue,fill:me})}):null}));var yt=i(17566),kt=i(33758),Ct=i(73580),St=i(56546),Pt=i(32125),jt=i(84908);const Tt=(0,d.memo)((e=>{var t,i,n;const{item:o,teaBasicParams:a}=e,l=(0,N.s)(),c=(0,Ct.Nj)(St.A),u=(0,yt.Nw)(o),{wid:p=""}=null!==(t=(0,v.W)((()=>["wid"]),[]))&&void 0!==t?t:{},m=`https://www.tiktok.com${u}?is_from_webapp=1&sender_device=pc&web_id=${p}`,h=(0,jt.nW)((e=>{var t;return e.users[null!==(t=null==o?void 0:o.author)&&void 0!==t?t:""]}),Pt.bN),{pipWindow:g}=(0,s.mE)(),_=it(),f=(0,d.useCallback)((()=>{g&&(c.handleShare(Object.assign(Object.assign({},a),{platform:"copy",share_click_from:"short"})),g.navigator.clipboard.writeText(m).then((()=>{_({content:l("pcWeb_miniPlayer_linkCopied_toast",{},"Link Copied"),duration:1.2})})).catch((e=>{console.error("MiniPlayer Failed to copy URL",e)})))}),[c,o,c,h,a,g]);return(0,W.jsx)(ct,{onClick:f,text:(null===(i=o.stats)||void 0===i?void 0:i.shareCount)?(0,r.D1)(null===(n=o.stats)||void 0===n?void 0:n.shareCount):l("Share"),children:(0,W.jsx)(kt.A,{width:ue,height:ue,fill:me})})}));var Ot=i(34131),Mt=i(72688);const It={id:"album-7228d8e2",use:"album-7228d8e2-usage",viewBox:"0 0 49 49",content:''};function Dt(e){const t=(0,d.useContext)(_t.X);return(0,d.useLayoutEffect)((()=>(t.add(It),()=>{t.remove("album-7228d8e2")})),[]),(0,W.jsx)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e,{children:(0,W.jsx)("use",{xlinkHref:"#album-7228d8e2"},void 0)}),void 0)}const Et=(0,K.default)("div",{target:"e10thmhi0"})({width:"30px",height:"30px",overflow:"hidden"},"label:DivMusicButtonContainer;"),Bt=(0,K.default)("div",{target:"e10thmhi1"})((({pause:e})=>({display:"flex",justifyContent:"center",alignItems:"center",width:"30px",height:"30px",animation:e?"":"rotate 8s linear infinite","@keyframes rotate":{"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}})),"label:DivMusicAnimation;"),Lt=(0,K.default)(Dt,{target:"e10thmhi2"})({position:"absolute",width:"30px",height:"30px"},"label:StyledIconAlbum;"),Rt=(0,K.default)("div",{target:"e10thmhi3"})((({backgroundImageURL:e})=>({borderRadius:"50%",width:"70%",height:"70%",zIndex:1,backgroundSize:"cover",backgroundImage:`url(${e})`})),"label:DivMusicCover;"),zt=K.default.a``,Wt=(0,i(77976).w)(zt),At=(0,d.memo)((e=>{const{item:t,teaBasicParams:i,pause:n}=e,{music:{id:o="",title:a="",coverThumb:l=""}={}}=t,r=(0,u.useLocation)(),s=(0,Ot.FR)({to:{pathname:(0,Mt.pHc)({musicName:a,musicId:o})},location:r}),c=it(),p=(0,N.s)(),m=(0,d.useCallback)((()=>{pt.O.handleGeneralClick("music",Object.assign(Object.assign({},i),{enter_method:"click"})),c({content:p("pcWeb_miniPlayer_linkOpened_toast",{},"Link opened in browser"),duration:3})}),[pt.O,t,i,c,p]);return o?(0,W.jsx)(Wt,{href:s,onClick:m,target:"_blank",rel:"noopener noreferrer",etClick:{etName:"enter_music_detail",etParams:Object.assign(Object.assign({},i),{enter_method:"click"})},children:(0,W.jsx)(Et,{children:(0,W.jsxs)(Bt,{pause:n,children:[(0,W.jsx)(Lt,{}),l&&(0,W.jsx)(Rt,{backgroundImageURL:l})]})})}):null}));var Ht=i(80131),Ft=i(90341),Nt=i(29909),Vt=i(96563),Ut=i(68783),$t=i(38771),qt=i(44926),Gt=i(19442),Kt=i(60445),Yt=i(67169),Zt=i(62047),Jt=i(89311),Xt=i(69617),Qt=i(65852),ei=i(90159),ti=i(93608);const ii=(0,d.memo)((function({}){var e,t;const[{currentIndex:i,itemListKey:n,pipWindow:o,isMiniPlayerShowing:a},l]=(0,s.Sp)((e=>({currentIndex:e.currentIndex,itemListKey:e.itemListKey,pipWindow:e.pipWindow,isMiniPlayerShowing:e.isMiniPlayerShowing}))),u=(0,d.useRef)(null),p=(0,d.useRef)(null),m=(0,N.s)(),_=(0,q.uT)();(0,d.useEffect)((()=>{_?l.setMiniPlayerRef(p):l.setMiniPlayerRef(u)}),[u,p,_,l]);const f=(0,g.P)(H.O),{list:b=[]}=null!==(e=f[null!=n?n:""])&&void 0!==e?e:{},v=null!==(t=(0,Nt.Lu)((e=>null==e?void 0:e.list),Pt.bN))&&void 0!==t?t:[],x=(0,Vt.mY)((e=>e.list),Pt.bN),{browserList:w,creatorBrowserList:y}=(0,qt.d8)(),{showingBrowserMode:k,isCreatorBrowserMode:C}=(0,Gt.JD)();let S;S=k&&!C?w:C?y:"foryou"===n?v:"video"===n?x:b;const P=S[i],j=i>0&&i<=S.length-1,T=i{var a,l,r;const[{pipWindow:c,miniPlayerRef:u},p]=(0,s.Sp)((e=>({pipWindow:e.pipWindow,miniPlayerRef:e.miniPlayerRef}))),{isRTL:m}=(0,Jt.m)(),g=null!==(l=null===(a=null==n?void 0:n.video)||void 0===a?void 0:a.id)&&void 0!==l?l:"",_=(0,d.useRef)(-1),f=(0,h.w)(Kt.aL),b=(0,d.useCallback)(((e,t="click")=>{var i;if(!(null===(i=null==u?void 0:u.current)||void 0===i?void 0:i.seekTime)||!c)return;const n=e>0?"forward":"backward";c.clearTimeout(_.current),f.setSeekType(n),_.current=c.setTimeout((()=>{f.setSeekType("none")}),2e3),u.current.seekTime(u.current.currentTime+e),Xt.V.handleVideoControlChange(Object.assign(Object.assign({},o),{enter_method:t,click_section:"click"===t?"pc_web_keyboard_btn":void 0,change_params:e>0?"video_forward":"video_backward"}))}),[o,c]),v=(0,d.useCallback)((({enter_method:i})=>{if(t){const t=Date.now();p.handleNextVideo(),e(!1),Qt.L.handleVideoChange(Object.assign(Object.assign({},o),{enter_method:i}),"next"),ti.f.sendEvent("latency",{starting_event:i,ending_event:"switch_video",play_mode:"mini_player",duration:Date.now()-t})}}),[t,o,e]),x=(0,d.useCallback)((({enter_method:t})=>{if(i){const i=Date.now();p.handlePrevVideo(),e(!1),Qt.L.handleVideoChange(Object.assign(Object.assign({},o),{enter_method:t}),"prev"),ti.f.sendEvent("latency",{starting_event:t,ending_event:"switch_video",play_mode:"mini_player",duration:Date.now()-i})}}),[i,o,e]),w=ht(n,o),y=(0,d.useCallback)((e=>{p.closeMiniPlayer({enter_method:e})}),[p]),k=null!==(r=null==n?void 0:n.itemMute)&&void 0!==r&&r,{mute:C,setMute:S}=(0,Yt.ah)({playMode:8,itemMute:k}),P=(0,d.useCallback)((e=>{S(!C,e)}),[C,S]),j=(0,d.useCallback)((e=>{const t=new Map([[40,()=>{v({enter_method:"keydown"})}],[38,()=>{x({enter_method:"keydown"})}],[39,()=>{b(m?Zt.a:Zt.S,"keydown")}],[37,()=>{b(m?Zt.S:Zt.a,"keydown")}],[76,()=>{w("keydown")}],[27,()=>{y("keydown")}],[77,()=>{P("keydown")}]]),{keyCode:i}=e;t.has(i)&&(e.preventDefault(),t.get(i)())}),[v,x,b,w,y,P,m]),T=(0,d.useRef)(""),O=(0,d.useRef)(-1),M=(0,d.useRef)(0),I=(0,d.useRef)((new Date).getTime()),D=(0,ei._g)((e=>{if(T.current===g||Math.abs(e.deltaY)<=1)return;e.stopPropagation(),O.current&&clearTimeout(O.current),O.current=window.setTimeout((()=>{M.current=0}),50);const n=(new Date).getTime(),o=n-I.current;if(I.current=n,M.current=M.current+1,o>50&&1===M.current){const n=e.deltaY;n>0&&t?(T.current=g,v({enter_method:"scroll"})):n<0&&i&&(T.current=g,x({enter_method:"scroll"}))}}),[g,v,x,t,i],20);return(0,d.useEffect)((()=>{if(c)return c.document.addEventListener("keydown",j),()=>{c.document.removeEventListener("keydown",j)}}),[c,j]),{handleNext:v,handlePrev:x,handleMuteToggle:P,handleWheel:D,mute:C}})({hasNext:T,hasPrev:j,item:O,teaBasicParams:ae,setPause:e=>{de(e)}}),{hasAutoScrollButton:fe}=(0,q.iz)(),be=(0,Ft.eu)(),ve=(0,c.Ul)(),xe=(0,d.useCallback)((()=>{be&&ue({enter_method:"auto_next"})}),[be,ue]),we=(0,d.useCallback)((()=>{var e,t,i,n,o,a,l,r;se?_?null===(t=null===(e=p.current)||void 0===e?void 0:e.play)||void 0===t||t.call(e,!0):null===(n=null===(i=u.current)||void 0===i?void 0:i.play)||void 0===n||n.call(i,!0):_?null===(a=null===(o=p.current)||void 0===o?void 0:o.pause)||void 0===a||a.call(o):null===(r=null===(l=u.current)||void 0===l?void 0:l.pause)||void 0===r||r.call(l),de(!se)}),[se,_,p,u]),ye=(0,d.useCallback)((()=>{de(!0)}),[]),Ce=(0,d.useCallback)((()=>{de(!1)}),[]),Se=(0,$t.hy)(),je=(0,d.useCallback)((e=>{var t,i,n,o,a,l;Se.setVideoInfo({itemId:R,videoPercent:e,duration:_?null===(t=p.current)||void 0===t?void 0:t.duration:null===(i=u.current)||void 0===i?void 0:i.duration,currentTime:_?null!==(o=null===(n=p.current)||void 0===n?void 0:n.currentTime)&&void 0!==o?o:0:null!==(l=null===(a=u.current)||void 0===a?void 0:a.currentTime)&&void 0!==l?l:0})}),[R,Se,u,p,_]),Oe=(0,d.useCallback)((()=>{l.closeMiniPlayer({enter_method:"click_icon"})}),[l]),Me=((e,t,i=document)=>{const{id:n}=null!=e?e:{},o=(0,h.w)(ut.k),a=tt(),l=(0,N.s)(),r=it(),s=nt();return(0,d.useCallback)((e=>{if(n)if(pt.O.handleGeneralClick("like",Object.assign(Object.assign({},t),{enter_method:"double_tap"})),a){const{clientX:a,clientY:l}=e;new mt.m(a,l,i,s).emit(),o.postLikeVideo(Object.assign(Object.assign({id:n,enter_method:"double_tap"},t),{forceLike:!0}))}else r({content:l("pcWeb_miniPlayer_backToLogIn_toast",{},"Go back to the same tab to log in"),duration:3})}),[a,n,t,l,o,r,i])})(O,ae,null==o?void 0:o.document);(0,d.useEffect)((()=>{if(!E&&o&&8===(null==ve?void 0:ve.mode)){Qe.F.open({content:m("pcWeb_videoSkipped",{num:2}),duration:1.5,widthType:"half",getContainerPosition:"fixed",getContainer:()=>o.document.body});const e=setTimeout((()=>{ue({enter_method:"auto_next"})}),2e3);return()=>{clearTimeout(e),Qe.F.destroy()}}}),[E,o,Qe.F,ue,null==ve?void 0:ve.mode]);const{seekingTips:Ie}=(0,Ht.r)(),Ee=(e=>{const[t,i]=(0,d.useState)(!1),n=(0,d.useRef)(-1);return(0,d.useEffect)((()=>{if(!e)return()=>{clearTimeout(n.current)};const t=()=>{clearTimeout(n.current),n.current=window.setTimeout((()=>{i(!1)}),1e3),i(!0)};return e.addEventListener("resize",t),()=>{e.removeEventListener("resize",t),clearTimeout(n.current)}}),[e]),t})(o),[Le]=(0,d.useState)((0,L.UP)()),Re=(0,d.useMemo)((()=>{var e;return{videoCover:{cover:B.originCover,quality:"720"},desc:null!==(e=null==O?void 0:O.desc)&&void 0!==e?e:""}}),[B,O]),ze=(0,d.useMemo)((()=>({})),[]),We=(0,d.useMemo)((()=>({vqscore:re?Number(re):0})),[re]);return(0,d.useEffect)((()=>{var e,t;a&&(null===(t=null===(e=u.current)||void 0===e?void 0:e.play)||void 0===t||t.call(e))}),[a]),(null==O?void 0:O.video)?(0,W.jsxs)(J,{id:P,showButtonOnlyOnHover:!1,forceShowButton:Ee,onWheel:he,children:[!E&&(0,W.jsx)(oe,{children:m("pcWeb_NotSupportedFloating")}),E&&(0,W.jsxs)(W.Fragment,{children:[_?(0,W.jsx)($.o,{ref:p,id:P,url:le,horizontal:!0,mode:8,index:i,muted:z,onVideoEnded:xe,onVideoPause:ye,onVideoPlay:Ce,onTimeUpdate:je,posterConfig:Re,teaConfig:ze,videoQualityConfig:We}):(0,W.jsx)(U.K,{playUrl:le,desc:O.desc,horizontal:!0,mode:8,id:P,index:i,itemMute:z,teaParams:ae,onVideoEnded:xe,onVideoPause:ye,onVideoPlay:Ce,onTimeUpdate:je,videoCover:{cover:B.originCover,quality:"720"},ref:u},P),(0,W.jsx)(ce,{pause:se,togglePlay:we,onDoubleClick:Me}),Le&&(0,W.jsx)(X,{children:(0,W.jsx)(_e,{handleClose:Oe})}),(0,W.jsxs)(ne,{children:[(0,W.jsx)(ke,{videoId:R,playerRef:_?p:u}),Ie]})]}),(0,W.jsxs)(Z,{children:[(0,W.jsx)(ee,{children:(0,W.jsx)(Pe,{hasPrev:j,hasNext:T,handlePrev:pe,handleNext:ue})}),E&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(Q,{showCloseButton:Le,children:[fe&&(0,W.jsx)(Te,{item:O,playModeForTea:"mini_player"}),(0,W.jsx)(De,{mute:ge,toggleMute:()=>me("click")})]}),(0,W.jsxs)(te,{children:[(0,W.jsx)(Be,{videoId:P}),(0,W.jsx)(Ae,{item:O}),(0,W.jsx)(Ve,{item:O,playMode:8}),(0,W.jsx)(Ke,{item:O})]}),(0,W.jsxs)(ie,{children:[(0,W.jsx)(ot,{item:O,teaBasicParams:ae}),(0,W.jsx)(gt,{item:O,teaBasicParams:ae}),(0,W.jsx)(wt,{item:O,teaBasicParams:ae}),(0,W.jsx)(Tt,{item:O,teaBasicParams:ae}),(0,W.jsx)(At,{item:O,teaBasicParams:ae,pause:se})]})]})]})]}):(0,V.d)(["item.video"])}));var ni=i(43201),oi=i(2387),ai=i.n(oi);function li({pipWindow:e,children:t}){return(0,A.createPortal)(t,e.document.body)}const ri=({})=>{const{pipWindow:e}=(0,s.mE)((e=>({pipWindow:e.pipWindow}))),t=nt();return(()=>{const[{pipWindow:e,windowHeight:t,windowWidth:i},n]=(0,s.Sp)((e=>({pipWindow:e.pipWindow,windowHeight:e.windowHeight,windowWidth:e.windowWidth}))),o=(0,d.useCallback)(ai()((()=>{!e||t===e.innerHeight&&i===e.innerWidth||((0,ni.T)({windowObj:e,playMode:8,width_before:i,height_before:t}),n.updateMiniPlayerSize())}),1e3),[e,t,i]);(0,d.useEffect)((()=>{if(e)return e.addEventListener("resize",o),()=>{e.removeEventListener("resize",o)}}),[e,o])})(),e?(0,W.jsx)(li,{id:"pipWindow",pipWindow:e,children:(0,W.jsx)(ye.C,{value:t,children:(0,W.jsx)(ii,{})})}):null};var si=i(11732);const di=(0,K.default)("div",{target:"eiz8q0n0"})({fontSize:"14px",fontWeight:"bold",textDecoration:"underline",cursor:"pointer"},"label:DivButton;"),ci=(0,K.default)("div",{target:"eiz8q0n1"})({fontSize:"14px",fontWeight:"bold",color:"red",cursor:"pointer",marginLeft:"10px"},"label:DivCloseButton;"),ui=(0,K.default)("span",{target:"eiz8q0n2"})({color:"red"},"label:SpanOverride;"),pi=(0,K.default)("div",{target:"eiz8q0n3"})({display:"flex"},"label:DivABTestItem;"),mi=(0,K.default)("div",{target:"eiz8q0n4"})({maxHeight:"calc(100vh - 320px)",overflow:"auto",marginBottom:"13px",marginLeft:"6px"},"label:DivABTestSection;"),hi=(0,K.default)("div",{target:"eiz8q0n5"})({maxHeight:"130px",overflow:"auto",marginBottom:"15px",marginLeft:"6px"},"label:DivFeatureGate;"),gi=(0,K.default)("div",{target:"eiz8q0n6"})({fontSize:"14px",fontWeight:"bold",marginLeft:"6px"},"label:DivTitle;"),_i=(0,K.default)("div",{target:"eiz8q0n7"})((({isMobile:e})=>({position:"fixed",left:"20px",bottom:e?"60px":"20px",zIndex:1e3,background:"#bae0ff",opacity:"0.8",color:"black",fontSize:"14px",padding:"5px 10px",borderRadius:"3px",marginLeft:"4rem"})),"label:DivWrapper;"),fi=(0,K.default)("div",{target:"eiz8q0n8"})({display:"flex"},"label:ButtonWrapper;"),bi=(0,d.memo)((function({name:e}){var t;const{abTestVersion:i}=null!==(t=(0,v.W)((()=>["abTestVersion"]),[]))&&void 0!==t?t:{},n=(0,x.qt)(i,e),o=(0,x.V7)(i,e);return(0,W.jsx)(ui,{children:o!==n&&`, OverRide Value:${n}`})})),vi=(0,d.memo)((function({name:e}){const t=(0,x.TQ)(e);return(0,W.jsx)("div",{children:`${e}: ${t?"On":"Off"}`})})),xi=(0,d.memo)((function({isMobile:e}){var t;const[i,n]=(0,d.useState)(!0),[o,a]=(0,d.useState)(!1),{isDebugPanelEnable:l}=(0,x._F)(),{abTestVersion:r}=null!==(t=(0,v.W)((()=>["abTestVersion"]),[]))&&void 0!==t?t:{},s=(0,d.useCallback)((()=>{a(!o)}),[o]);return l&&i?(0,W.jsxs)(_i,{isMobile:e,children:[o&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(gi,{children:"AB Test"}),(0,W.jsx)(mi,{children:r&&Object.keys(r.parameters).map(((e,t)=>{const i=r.parameters[e],n=[];return Object.keys(i).forEach((e=>{n.push(`${e}: ${i[e]}`)})),(0,W.jsxs)(pi,{children:[(0,W.jsx)("div",{children:`${e}: ${n.join(", ")}`}),(0,W.jsx)(bi,{name:e})]},t)}))}),(0,W.jsx)(gi,{children:"Feature Gates"}),(0,W.jsx)(hi,{children:si.$v.map(((e,t)=>(0,W.jsx)(vi,{name:e},t)))})]}),(0,W.jsxs)(fi,{children:[(0,W.jsx)(di,{type:"button",onClick:s,children:o?"Hide Debug":"Show Debug"}),(0,W.jsx)(ci,{type:"button",onClick:()=>{n(!1)},children:"x"})]})]}):null}));var wi=i(45297),yi=i(43668),ki=i(16229),Ci=i(95185),Si=i(44613),Pi=i(56421),ji=i(82715),Ti=i(49568),Oi=i(23237),Mi=i(58542);const Ii=()=>{const{toastList:e}=(0,Oi.n)("top"),{toastList:t}=(0,Oi.n)("bottom");return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(Mi.otH,{position:"top",state:{list:e},render:({content:e,hasToastComponent:t})=>t?(0,W.jsx)(Mi.Mzi,{content:e}):e}),(0,W.jsx)(Mi.otH,{position:"bottom",state:{list:t},render:({content:e,hasToastComponent:t})=>t?(0,W.jsx)(Mi.qaZ,{content:e}):e})]})},Di=()=>{const[e,t]=(0,Ti.ku)(),i=(0,N.s)(),{showToast:n}=(0,Oi.n)("top"),{showToast:o}=(0,Oi.n)("bottom");return(0,d.useEffect)((()=>{const a=[];Object.entries(e).forEach((([e,t])=>{t.toastMessageType===Ti.PU.CTA?o(i(t.messageKey)):n(i(t.messageKey)),a.push(e)})),t.removeToast(...a)}),[o,n,i,t,e]),(0,W.jsx)(Ii,{})};var Ei=i(7132),Bi=i(81500),Li=i(8585),Ri=i(33063),zi=i(16680),Wi=i(96689);const Ai=["/live","/download"];var Hi=i(81659),Fi=i(63950),Ni=i(81054),Vi=i(6990);const Ui=(0,Ni.Ay)({resolved:{},chunkName:()=>"modalSideEffect.island",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(9443),i.e(1799),i.e(8564),i.e(8873),i.e(8785),i.e(5934),i.e(9127),i.e(4434),i.e(3895),i.e(8345),i.e(9280),i.e(5080),i.e(7912),i.e(9835),i.e(5890),i.e(7284),i.e(2287),i.e(9502),i.e(9757),i.e(5853),i.e(6851),i.e(6735),i.e(9889),i.e(8041)]).then(i.bind(i,10350)),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:()=>10350},Object.assign({},Vi.KE)),$i=[ji.OZ.feedback,ji.OZ.feedbackReport,ji.OZ.feedbackHistory],qi=()=>{const{appContext:e}=(0,g.P)(a.L,{selector:e=>({appContext:e.appContext,isSideNavActive:e.sideNavActive}),dependencies:[]}),{enableMiniPlayer:t}=(0,l.D)(),{user:i,appId:k,env:C,clusterRegion:S}=(0,r.L$)(e),{isMiniPlayerShowing:P,pipWindow:j,isDocumentPipSupporting:T}=(0,s.mE)(),O=(0,o.W5)($i),M=(0,Li.y)(),I="TTP"===S;return(0,Hi.YB)(),((e=!0,t={})=>{const{language:i}=(0,r.L$)((0,v.W)((()=>["language"]),[])),n=(0,h.w)(ki.b),o=(0,d.useCallback)((()=>{var e;n.setCookieBannerShowing(!0),null===(e=t.onShow)||void 0===e||e.call(t)}),[n]),a=(0,d.useCallback)((()=>{n.setCookieBannerShowing(!1)}),[n]);(0,d.useEffect)((()=>{e&&yi.default.loadCookieBanner(Object.assign(Object.assign({},t),{locale:i,onShow:o,onHide:a}))}),[i,e,o,a])})(!0,{onConsentGet:e=>{M(e.bing)}}),(0,Ci.FO)(i),function(e,t,i){(0,d.useEffect)((()=>{e&&new Si.N({aid:1459,service:"www.tiktok.com",host:1180===t?"https://ttwid-sg.tiktok.com":"https://ttwid-va.tiktok.com",ttwidExtraParams:{needFid:!1}}).init()}),[t,null==i?void 0:i.type,e])}(i,k,C),(0,Ci.NE)(),function(){const e=(0,c.nr)(),t=(0,d.useCallback)((()=>{window.ttWebappFocusTime||(window.ttWebappFocusTime=Date.now(),window.ttWebappBlurTime=null)}),[]),i=(0,d.useCallback)((()=>{const t=Date.now();e.updateVideoFocusTime({blurTime:t}),window.ttWebappFocusTime=null,window.ttWebappBlurTime=t}),[e]);(0,d.useEffect)((()=>{window.ttWebappFocusTime=Date.now()}),[]),(0,d.useEffect)((()=>(window.addEventListener("blur",i),window.addEventListener("focus",t),()=>{window.removeEventListener("blur",t),window.removeEventListener("focus",i)})),[i,t])}(),function(e=!1){const{pathname:t}=(0,u.useLocation)();(0,d.useEffect)((()=>{e&&p.qk.includes(t)||window.scrollTo(0,0)}),[e,t])}(!0),(0,Ci.XV)(),(0,Ci.Wg)(),(0,m.gG)(),function(){var e,t,i,n;const[o,l]=(0,h.S)(w.z),r=(0,b.Us)(),{abTestVersion:s}=null!==(e=(0,v.W)((()=>["abTestVersion"]),[]))&&void 0!==e?e:{},c=null!==(t=(0,x.qt)(s,"digital_wellbeing_web"))&&void 0!==t?t:"v0",u=null!==(i=(0,x.qt)(s,"scheduled_breaks_teens"))&&void 0!==i?i:"v0",{user:p}=(0,g.P)(a.L,{selector:e=>{var t;return{user:null===(t=e.appContext)||void 0===t?void 0:t.user}},dependencies:[]}),m=Boolean(p);(0,d.useEffect)((()=>{if("v0"===c||!m)return;const e=new Date,t=(0,y.BX)(e),i=e.getTime(),n=(0,y.$n)(i),a=(0,y.zk)(e);l.uploadAppOpentimes({reqPayload:{upload_timestamp:t,upload_type:1,app_open_times:[{upload_date:a,day_open_times:n?0:1,night_open_times:n?1:0}]}}),l.init();const r=(0,_.R)(document,"visibilitychange").subscribe((()=>{"hidden"===document.visibilityState?(l.setPageHidden(),(0,y.nN)("updateActiveTimeUsage",{value:{activeTimeUsage:o.activeTimeUsage,timeStamp:(new Date).getTime()}},f.LH)):"visible"===document.visibilityState&&l.setPageVisible()})),s=(0,_.R)(window,"storage").subscribe((e=>{const t=e;if(t.key!==f.o4&&t.key!==f.LH)return;const i=JSON.parse(t.newValue||"");switch(i.event){case"upload":const e=Number(i.value);e&&l.setLastUploadTime(new Date(e));break;case"updateDailySTM":i&&l.syncDailySTMUpdateHandler(i.value);break;case"updateSleepTime":i&&l.syncSleepSettingHandler(i.value);break;case"updateTimeBreak":i&&l.syncSessionDurationHandler(i.value)}}));return()=>{l.stopTimer$(),r&&r.unsubscribe(),s&&s.unsubscribe()}}),[]),(0,d.useEffect)((()=>{"v0"!==c&&m&&o.isPageHidden&&o.isOpenDailySTM&&l.uploadScreenTime()}),[o.isPageHidden]),(0,d.useEffect)((()=>{"v0"!==c&&m&&o.isOpenDailySTM&&!o.isPageHidden&&(l.startMonitorDayChange(),l.startMonitorTimeLimit(),l.startUploadSTMEveryTenMinutes(),l.startAccumulateActiveTime())}),[o.isOpenDailySTM,o.isPageHidden]),(0,d.useEffect)((()=>{if(!o.isOpenDailySTM||o.isPageHidden)return;const e=o.userSTMLimit;o.timeUsageToday>=60*e?l.checkDailySTMPopupShow({date:(0,y.zk)(o.lastUploadTime),screen_time_limit_type:o.STMInterventionType}):l.setDefaultDailySTMPopup(!1)}),[o.isOpenDailySTM,o.userSTMLimit,o.isPageHidden,o.timeUsageToday]),function(e,t,i={immediate:!1}){const{immediate:n}=i,o=(0,d.useRef)(),a=(0,d.useRef)(!1);(0,d.useEffect)((()=>{const i=()=>t(o.current);a.current?i():(a.current=!0,n&&i()),o.current=e}),[e])}(null===(n=r.appContext)||void 0===n?void 0:n.user,(e=>{var t,i;"v0"!==c&&m&&(!e&&Boolean(null===(t=r.appContext)||void 0===t?void 0:t.user)?(l.init(),l.setLogin()):e&&!Boolean(null===(i=r.appContext)||void 0===i?void 0:i.user)&&(l.uploadScreenTime(),l.setNotLogin()))})),(0,d.useEffect)((()=>{"v0"!==c&&m&&(l.uploadScreenTimeWhenDayChange(),l.init())}),[o.dayChange]),(0,d.useEffect)((()=>{"v0"!==c&&m&&o.tenMinutesInterval&&l.uploadScreenTime()}),[o.tenMinutesInterval]),(0,d.useEffect)((()=>{"v0"!==c&&m&&o.defaultDailySTMPopup&&(l.setIsDisplayOtherPopupWhenTimeBreak(!0),l.uploadScreenTime({uploadType:5}))}),[o.defaultDailySTMPopup]),(0,d.useEffect)((()=>{"v0"!==c&&m&&(2===o.userIdentity||4===o.userIdentity&&o.isFpTeenOpenDailySTM)&&l.getParentInfo({})}),[o.userIdentity,o.isFpTeenOpenDailySTM]),(0,d.useEffect)((()=>{"v0"!==c&&m&&(o.isOpenSleepReminder&&!1===o.isPageHidden?(l.stopSleepReminder$(),l.openSleepReminder()):l.stopSleepReminder$())}),[o.isOpenSleepReminder,o.isPageHidden]),(0,d.useEffect)((()=>{"v0"!==c&&m&&o.sleepReminderPopup&&!o.isPageHidden&&l.setIsDisplayOtherPopupWhenTimeBreak(!0)}),[o.sleepReminderPopup,o.isPageHidden]),(0,d.useEffect)((()=>{"v0"!==c&&m&&o.durationReminder&&!o.isPageHidden&&(l.stopTimeBreak$(),l.processTimeBreak())}),[o.durationReminder,o.isPageHidden]),(0,d.useEffect)((()=>{"v0"!==c&&m&&localStorage.setItem(f.o4,JSON.stringify({event:"upload",value:o.lastUploadTime}))}),[o.lastUploadTime]),(0,d.useEffect)((()=>{"v0"===u&&o.shouldShowScheduledBreak&&l.disableScheduledBreak()}),[u,o.shouldShowScheduledBreak]),(0,d.useEffect)((()=>{"v0"!==c&&m&&"v0"!==u&&!o.isPageHidden&&o.scheduledBreakEnabled&&(l.scheduledBreakProcess(),l.stopScheduleBreak$(),l.startScheduledBreakTimer())}),[o.scheduledBreakEnabled,o.isPageHidden])}(),z(),function(e){var t;const{showPopupWhenInitiallyLand:i}=(0,q.LK)(),{getPriorityPopup:n,setIsPopupPriorityReady:a}=(0,Ri._y)(),{popupPriority:l,isReady:r}=(0,Ri.lz)((e=>({popupPriority:e.priority,isReady:e.isReadyList[2]}))),{handlePopoverInitial:s,handlePopoverEnd:c,handlePopoverAdd:u}=(0,d.useMemo)((()=>n(2)),[n]),{pathname:p}=(0,o.zy)(),[m,h]=(0,zi.MR)((e=>e),Pt.bN),g=(0,Wi.K)(Object.assign(Object.assign({query:{enter_method:"login_redesign"}},e),{closeCallback:()=>{var t;null===(t=void 0)||void 0===t||t.call(e),c()},isGuestMode:!1})),{user:_}=null!==(t=(0,v.W)((()=>["user"]),[]))&&void 0!==t?t:{},[f,b]=(0,d.useState)(!1),x=(0,d.useMemo)((()=>!Ai.some((e=>(0,o.B6)(p,{path:e,exact:!0})))),[p])&&i;(0,d.useEffect)((()=>{r||(_||!x||f||u(),a(2))}),[r,_,x,f,u,a]),(0,d.useEffect)((()=>{if(!_&&x&&2===l&&!f)try{h.closeModal({enter_method:"click_x"}),h.setLoginModalShow(!1),b(!0),s(),g()}catch(e){}}),[g,n,p,l,_,f,i,r,a,h,x,s])}(),(0,Bi.m)(),(0,Hi.nI)(),(0,Hi.G4)(),(0,n.FD)(n.FK,{children:[(0,n.Y)(Ui,{}),O&&(0,n.Y)(Pi.w,{}),T&&t&&P&&j&&(0,n.Y)(ri,{}),(0,n.Y)(xi,{}),(0,n.Y)(Fi.K6,{children:(0,n.Y)(Ei.VD,{})}),(0,n.Y)(Di,{}),(0,n.Y)("script",{src:wi.se[I?"TTP":"ROW"].serviceWorker})]})}},96141:(e,t,i)=>{i.d(t,{nO:()=>d,ur:()=>c,vn:()=>u});var n=i(42230),o=i(14374),a=i(31209),l=i(43723);const r=(0,o._)((0,l.p)("appPromotionAtom@tiktok/webapp-atoms",{isPwaInstallable:!1,isModalShow:!1,isExpand:!1}),{rehydrationKey:"webapp.appPromotion"});let s;const{useAtomService:d,useServiceDispatchers:c,useServiceState:u,getStaticApi:p}=(0,a.i)(r,((e,t)=>({storeDeferredPrompt(e){s=e},setIsPwaInstallable(e){t(r,(t=>Object.assign(Object.assign({},t),{isPwaInstallable:e})))},setIsModalShow(e){t(r,(t=>Object.assign(Object.assign({},t),{isModalShow:e})))},setIsExpand(e){t(r,(t=>Object.assign(Object.assign({},t),{isExpand:e})))},handleShowSnack(e){n.R.handleShowSnack(e)},handleClickDownload(){n.R.handleClickDownload()},handleInstallationClick(){return e=this,t=void 0,o=function*(){if(n.R.handleGetForPC(),!s)return;s.prompt();const e=yield s.userChoice;return"accepted"===e.outcome?n.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(n,a){function l(e){try{s(o.next(e))}catch(e){a(e)}}function r(e){try{s(o.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(l,r)}s((o=o.apply(e,t||[])).next())}));var e,t,i,o}})))},5545:(e,t,i)=>{i.d(t,{P:()=>c});var n=i(35626),o=i.n(n);const a="object"==typeof HTMLElement?function(e){return e instanceof HTMLElement}:function(e){return e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName},l=[],r=[];let s;function d(e,t){var i;let n;const{defaultView:o}=e.ownerDocument;let a=t;return(null==o?void 0:o.getComputedStyle)?(a=t.replace(/([A-Z])/g,"-$1").toLowerCase(),o.getComputedStyle(e,null).getPropertyValue(a)):e.currentStyle?(a=t.replace(/-(\w)/g,(function(e,t){return t.toUpperCase()})),n=null===(i=e.currentStyle)||void 0===i?void 0:i[a],n):""}const c={bind:function(e,t){if(a(e))if("undefined"!=typeof ResizeObserver){const i=new ResizeObserver(t);i.observe(e),r.push({el:e,observer:i})}else{const i={el:e,callback:t,style:{width:d(e,"width"),height:d(e,"height")}};l.push(i),s||(s&&clearInterval(s),s=setInterval((function(){var e;for(const t of l){const i=t.el,n={width:d(i,"width"),height:d(i,"height")};o()(n,t.style)||(t.style={width:n.width,height:n.height},null===(e=t.callback)||void 0===e||e.call(t))}}),200))}},remove:function(e,t){if("undefined"==typeof ResizeObserver){for(let i=0;i{i.d(t,{Hi:()=>a,oe:()=>n});const n="ecom_email";var o;!function(e){e.OrderDetails="ecom_email_redesign_order_details_page",e.LogisticsDetails="ecom_email_redesign_logistics_page",e.OrderRating="ecom_email_redesign_write_review_page",e.RefundDetails="ecom_email_redesign_refund_detail_page",e.RequestRefund="ecom_email_redesign_request_refund",e.Orders="ecom_email_redesign_orders",e.Vouchers="ecom_email_redesign_vouchers",e.ShoppingCart="ecom_email_redesign_shopping_cart",e.CustomerMsg="ecom_email_customer_inbox_chat_detail",e.CustomerMute="ecom_email_customer_inbox_chat_mute",e.CustomerMuteAll="ecom_email_customer_inbox_chat_mute_all",e.ShopTabHomepage="ecom_email_shopping_mall_home_page",e.HalfScreenPDP="ecom_email_shopping_mall_home_pdp",e.HalfScreenDealPage="ecom_email_shopping_mall_channel",e.PDP="ecom_email_product_detail_page",e.CouponAddOnPage="ecom_email_redesign_vouchers_detail",e.PromotionProductList="ecom_email_promotion_products_list",e.SnsDetailPage="ecom_email_subscription_and_save"}(o||(o={}));const a={title:{ecom_email_redesign_order_details_page:"email_redesign_webapp_order_details_page_title",ecom_email_redesign_logistics_page:"email_redesign_webapp_logistics_page_title",ecom_email_redesign_write_review_page:"email_redesign_webapp_write_review_page_title",ecom_email_redesign_refund_detail_page:"email_redesign_webapp_refund_detail_page_title",ecom_email_redesign_request_refund:"email_redesign_webapp_request_refund_title",ecom_email_redesign_orders:"email_redesign_webapp_orders_title",ecom_email_redesign_vouchers:"email_redesign_webapp_vouchers_title",ecom_email_redesign_shopping_cart:"email_redesign_webapp_shopping_cart_title",ecom_email_customer_inbox_chat_detail:"seller_messages_email_webapp_reply_title",ecom_email_customer_inbox_chat_mute:"seller_messages_email_webapp_mute_title",ecom_email_customer_inbox_chat_mute_all:"seller_messages_email_webapp_setting_title",ecom_email_shopping_mall_home_page:"Ecom_email_pc_shoptab_homepage_title",ecom_email_shopping_mall_home_pdp:"Ecom_email_pc_pdp_shoptab_homepage_title",ecom_email_shopping_mall_channel:"Ecom_email_pc_deal_page_shoptab_homepage_title",ecom_email_product_detail_page:"Ecom_email_pc_pdp_title",ecom_email_redesign_vouchers_detail:"Ecom_email_pc_coupon_add_on_title",ecom_email_promotion_products_list:"Ecom_email_pc_free_shipping_add_on_page_title",ecom_email_subscription_and_save:"SNS_QR_code_instructions1"},desc:{ecom_email_redesign_order_details_page:"email_redesign_webapp_order_details_page_context",ecom_email_redesign_logistics_page:"email_redesign_webapp_logistics_page_context",ecom_email_redesign_write_review_page:"email_redesign_webapp_write_review_page_context",ecom_email_redesign_refund_detail_page:"email_redesign_webapp_refund_detail_page_context",ecom_email_redesign_request_refund:"email_redesign_webapp_request_refund_context",ecom_email_redesign_orders:"email_redesign_webapp_orders_context",ecom_email_redesign_vouchers:"email_redesign_webapp_vouchers_context",ecom_email_redesign_shopping_cart:"email_redesign_webapp_shopping_cart_context",ecom_email_customer_inbox_chat_detail:"seller_messages_email_webapp_reply_desc",ecom_email_customer_inbox_chat_mute:"seller_messages_email_webapp_mute_desc",ecom_email_customer_inbox_chat_mute_all:"seller_messages_email_webapp_setting_desc",ecom_email_shopping_mall_home_page:"Ecom_email_pc_shoptab_homepage_description",ecom_email_shopping_mall_home_pdp:"Ecom_email_pc_pdp_shoptab_homepage_description",ecom_email_shopping_mall_channel:"Ecom_email_pc_deal_page_shoptab_homepage_description",ecom_email_product_detail_page:"Ecom_email_pc_pdp_description",ecom_email_redesign_vouchers_detail:"Ecom_email_pc_coupon_add_on_description",ecom_email_promotion_products_list:"Ecom_email_pc_free_shipping_add_on_page_description",ecom_email_subscription_and_save:"SNS_QR_code_instructions2"}}},83162:(e,t,i)=>{i.d(t,{M:()=>s,u:()=>r});var n=i(58632),o=i(40099),a=i(38771);function l(e,t,i){const{direction:n="ltr",progressRef:a,circleRef:l,barRef:r,seekCallback:s,draggingPercentCb:d,draggingStateCb:c,progressReportCallback:u,documentObjProps:p}=e,m=p||("undefined"!=typeof document?document:void 0),h=(0,o.useRef)(0),g=(0,o.useRef)(null),_=(0,o.useCallback)(((e,t="original")=>{if("number"!=typeof e)return;const n=Math.min(1,Math.max(0,e));i(n),("dragging"!==t&&"stop"!==t||n!==g.current)&&(null==d||d(n),g.current=n)}),[d,i]),f=(0,o.useCallback)(((e,t="original")=>{if(!l.current||!a.current||!r.current)return;let i;e.preventDefault(),e.stopPropagation(),null==s||s();const o="vertical"===n?a.current.getBoundingClientRect().height:a.current.getBoundingClientRect().width,{x:d,y:c,width:p,height:m}=a.current.getBoundingClientRect();switch(n){case"vertical":i=c+m-e.clientY;break;case"rtl":i=d+p-e.clientX;break;default:i=e.clientX-d}if("start"===t)switch(n){case"vertical":{const e=r.current.getBoundingClientRect().height;h.current=Math.min(1,Math.max(0,e/o));break}default:{const e=r.current.getBoundingClientRect().width;h.current=Math.min(1,Math.max(0,e/o));break}}else{if("stop"===t){const e=Math.min(1,Math.max(0,i/o)),t=h.current;null==u||u(t,e)}_(i/o,t)}}),[l,a,r,s,n,_,u]),b=(0,o.useCallback)(((e,i=!1,n=null)=>{var o;const a=null!==n?n:null!==(o=g.current)&&void 0!==o?o:t,l=a+e;let r;r=l>1||l<0?i?l>1?l-1:l+1:Math.min(1,Math.max(0,a+e)):l,null==u||u(a,r),_(r,"original")}),[t,_,u]),v=(0,o.useCallback)((e=>{null==c||c(!0),e.preventDefault(),f(e,"dragging")}),[c,f]),x=(0,o.useCallback)((e=>{null==m||m.removeEventListener("mouseup",x),null==m||m.removeEventListener("mousemove",v),f(e,"stop"),null==c||c(!1)}),[c,v,f,m]);return{bindDrag:(0,o.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),f(e,"start"),null==m||m.addEventListener("mouseup",x),null==m||m.addEventListener("mousemove",v)}),[f,x,v,m]),seek:f,seekByDelta:b}}function r(e){const{videoId:t}=e,i=(0,n.__rest)(e,["videoId"]),{duration:r,videoPercent:s,currentTime:d}=(0,a.uI)(t),{setVideoInfo:c}=(0,a.hy)(),u=l(i,s,(0,o.useCallback)((e=>c({itemId:t,videoPercent:e,currentTime:r*e,duration:r})),[r,c,t]));return Object.assign(Object.assign({},u),{duration:r,videoPercent:s,currentTime:d,setVideoInfo:c})}function s(e){const{initialPercent:t=0}=e,i=(0,n.__rest)(e,["initialPercent"]),[a,r]=(0,o.useState)(t),s=l(i,a,r);return Object.assign(Object.assign({},s),{percent:a,update:r})}},39430:(e,t,i)=>{i.d(t,{$:()=>k});var n,o,a=i(24643),l=i(40099),r=i(93608);!function(e){e.None="0",e.Manual="1",e.Auto="2"}(n||(n={})),function(e){e.WebFyp="web_fyp",e.BrowserMode="browser",e.VideoDetail="video_detail",e.WebMobileFyp="web_mobile_fyp",e.MiniPlayer="mini_player"}(o||(o={}));var s=i(25616),d=i(88920),c=i(33805),u=i(62186),p=i(72153);const m=(0,u.default)("a",{target:"evbdqjo0"})({textWrap:"nowrap",textDecoration:"none",":hover":{textDecoration:"none"}},"label:AigcLink;"),h=(0,u.default)("p",{target:"evbdqjo1"})((({theme:e,theme:{colors:t}})=>[(0,p.zy)({theme:e,fontFamily:"TikTokFont",typography:"P3",color:"ConstTextInverse"}),{display:"inline-block",alignSelf:"flex-start",marginTop:"-4px",marginBottom:"8px",fontSize:"12px",fontWeight:500},{padding:"1px 3px",background:t.ConstBGMat,borderRadius:"2px",fontWeight:600,textShadow:"0 0 16px rgba(0, 0, 0, .34)"}]),"label:AigcTagMobile;"),g=(0,u.default)("p",{target:"evbdqjo2"})((({theme:e})=>[(0,p.zy)({theme:e,fontFamily:"TikTokFont",typography:"P3",color:"ConstTextInverse"}),{color:"#FFF",display:"inline-block",alignSelf:"flex-start",fontSize:"10px",fontWeight:500,padding:"1.5px 4px",background:"rgba(255, 255, 255, 0.34)",borderRadius:"4px",textShadow:"0 0 16px rgba(0, 0, 0, .34)"}]),"label:AigcTagMiniPlayer;");var _=i(48615),f=i(49057),b=i(75282);const v=0,x=1,w=2,y={[x]:{teaLabelType:"1",i18nKey:"syntheticMedia_feed_bottomBanner_AIGCLabel"},[w]:{teaLabelType:"2",i18nKey:"AIGC_FYP_descSection_label"},[v]:{teaLabelType:"0",i18nKey:""}},k=(0,l.memo)((function({item:e,playMode:t,isMiniPlayer:i=!1}){var n,o,u;const p=(0,s.s)(),v=Number(null!==(n=e.aigcLabelType)&&void 0!==n?n:0),x=y[v].i18nKey,w=y[v].teaLabelType,k=(0,d.q)(),C=0!==v&&k,{language:S="",region:P=""}=null!==(o=(0,f.W)((()=>["language","region"]),[]))&&void 0!==o?o:{},{isMobile:j}=null!==(u=(0,_.U)((()=>["isMobile"]),[]))&&void 0!==u?u:{},T=(0,l.useMemo)((()=>j?"web_mobile_fyp":i?"mini_player":2===t?"browser":4===t?"video_detail":"web_fyp"),[t,j]),O=(0,l.useMemo)((()=>({aigc_label_type:w,enter_from:T,country_code:P})),[T,w,P]),M=(0,c.sN)(T,S),I=(0,l.useCallback)((()=>{var e;e=O,r.f.sendEvent("click_creator_label_aigc",e)}),[O]),D=(0,l.useCallback)((e=>j?(0,a.jsx)(h,{children:e}):i?(0,a.jsxs)(g,{children:[" ",e]}):(0,a.jsx)(b.ZN,{shouldOptProfile:!0,playMode:t,isTag:!0,children:e})),[j,i,t]);return(0,l.useEffect)((()=>{var e;C&&(e=O,r.f.sendEvent("view_creator_label_aigc",e))}),[C,O]),C?(0,a.jsx)(m,{target:"_blank",href:M,onClick:I,children:D(p(x))}):null}))},75282:(e,t,i)=>{i.d(t,{M8:()=>c,OT:()=>d,VD:()=>u,ZN:()=>m,mz:()=>s,nt:()=>p});var n=i(62186),o=i(72153);const a={0:"4px",2:"8px",4:"12px"},l={0:"0px",2:"-2px",4:"-6px"},r={0:"2px",2:"8px",4:"8px"},s=(0,n.default)("div",{target:"e1sksq2r0"})({display:"flex",columnGap:"6px",rowGap:"2px",flexWrap:"wrap",marginLeft:"-2px"},"label:DivAnchorTagWrapper;"),d=(0,n.default)("div",{target:"e1sksq2r1"})((({theme:{colors:e}})=>({height:"41px",display:"flex",alignItems:"center",":hover":{background:e.BGView}})),"label:DivToolTipWrapper;"),c=(0,n.default)("span",{target:"e1sksq2r2"})((({theme:{colors:e}})=>({borderLeft:"0.5px solid green",height:"12px",marginLeft:"4px",marginRight:"4px",alignSelf:"center",borderColor:e.LineSecondary})),"label:SpanDivider;"),u=(0,n.default)("span",{target:"e1sksq2r3"})({width:"19px",display:"flex",alignItems:"center"},"label:SpanNum;"),p=(0,n.default)("p",{target:"e1sksq2r4"})((({isInTooltip:e,theme:{direction:t}})=>[{fontSize:"13px",fontWeight:400,"&:hover":{textDecoration:"underline"}},o.PR,e&&{fontSize:"14px",whiteSpace:"normal"},(0,o.mp)({direction:t,marginStart:"8px"})]),"label:PAnchorTagName;"),m=(0,n.default)("div",{target:"e1sksq2r5"})((({isTag:e,isInTooltip:t,shouldOptProfile:i,playMode:n=0,theme:{colors:o}})=>[{height:"24px",marginTop:a[n],marginBottom:l[n],minWidth:0},i&&[{height:"22px",padding:"1px 6px 1px 4px",background:t?"":o.BGView,display:"inline-flex",borderRadius:"4px",alignItems:"center",color:o.TextPrimary,marginTop:r[n]},t&&{marginTop:0,marginBottom:0},e&&{color:o.TextTertiaryAlt}]]),"label:DivAnchorTag;")},93959:(e,t,i)=>{i.d(t,{Z:()=>h});var n=i(24643),o=i(67518),a=i(95197),l=i(40099),r=i(47162),s=i(58305),d=i(90341),c=i(46095),u=i(13580),p=i(25616),m=i(56066);const h=(0,l.memo)((function(e){const{useLargeToggle:t=!1,tooltipOffset:i=-11,videoId:h,playMode:g,isVideoEnded:_,handleNextVideo:f,hideTooltip:b,iconSize:v}=e,{colors:x}=(0,o.u)(),w=(0,p.s)(),y=(0,d.eu)(),k=(0,d.J3)(),C="rgba(255, 255, 255, 1)",S=(0,l.useMemo)((()=>({background:t?x.ConstBGInverse3:x.ConstBGInverse1,paddingInlineStart:"12px",paddingInlineEnd:"12px",fontWeight:500,fontSize:"14px",lineHeight:"18px",display:b?"none":""})),[t,x.ConstBGInverse3,x.ConstBGInverse1]),P=(0,l.useCallback)((()=>{m.p.handleClickAutoScroll({play_mode:g,group_id:h},!y),k.toggleAutoScroll(),_&&f&&f()}),[g,h,y,k,f]),j=(0,l.useCallback)((()=>{m.p.handleHoverAutoScroll({play_mode:g,group_id:h},null!=y&&y)}),[g,h,y]);return(0,n.jsx)(a.m,{fullscreenAdjust:!0,overlay:w(y?"pcWeb_autoScroll_on":"pcWeb_autoScroll_off"),overlayInnerStyle:S,arrow:!1,align:{offset:[0,i]},children:(0,n.jsx)(r.v,{onClick:P,onMouseDown:s.dG,onMouseEnter:j,useLargeToggle:t,children:y?(0,n.jsx)(c.A,{fontSize:null!=v?v:t?20:21,style:{fill:C}}):(0,n.jsx)(u.A,{fontSize:null!=v?v:t?20:21,style:{fill:C}})})})}))},47162:(e,t,i)=>{i.d(t,{H:()=>l,v:()=>a});var n=i(62186),o=i(72153);const a=(0,n.default)("div",{target:"etnnns70"})((({theme:{colors:e},useLargeToggle:t})=>({width:t?"40px":"24px",height:t?"40px":"24px",background:t?e.ConstBGInverse4:"transparent",borderRadius:t?"50%":"unset",":hover":{background:t?e.ConstBGInverse3:"transparent"},display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"})),(({theme:{direction:e}})=>(0,o.mp)({direction:e,end:"66px"})),"label:DivAutoScrollButtonContainer;"),l=(0,n.default)("div",{target:"etnnns71"})({marginInlineStart:"14px",display:"flex"},"label:DivSwitchContainer;")},85041:(e,t,i)=>{i.d(t,{E:()=>x});var n=i(58632),o=i(24643),a=i(40099),l=i(25342),r=i(82535),s=i(97071),d=i(8046),c=i(72688),u=i(58305),p=i(34012),m=i(4712),h=i(4725),g=i(81211),_=i(67963),f=i(40935),b=i(52333),v=i(46682);const x=(0,a.memo)((0,a.forwardRef)((function(e,t){var{uniqueId:i,secUid:x,extraQuery:w={},children:y,replace:k=!1,isInBrowserMode:C=!1,teaParams:S,shouldStopPropagation:P=!0,reportTea:j=!0,onClick:T,onLinkClick:O,adInfo:M,style:I}=e,D=(0,n.__rest)(e,["uniqueId","secUid","extraQuery","children","replace","isInBrowserMode","teaParams","shouldStopPropagation","reportTea","onClick","onLinkClick","adInfo","style"]);const E=(0,g.U)({pathname:(0,c.fJR)({uniqueId:i,secUid:x}),search:w}),B=(0,f.yS)(i),L=(0,p.Ig)(),R=(0,a.useRef)(null),z=(0,v.w)(b.k),{playMode:W,ttamRefer:A=l.Hq.Photo}=S,H=null==M?void 0:M.is_normal,F=(0,a.useCallback)((e=>{if(M&&!H&&M.web_url)return(0,u.Gu)(e),void(0,m.Zy)({adInfo:M,refer:A,tag:W&&l.EM[W]||l.xY.OneColumn});if(L)return(0,u.Gu)(e),void(0,h.Hz)("user-select",{uid:null==B?void 0:B.id,uniqueId:i,from:"user-link"});if(P&&e.stopPropagation(),j&&r.q.handleEnterUser(S),null==M?void 0:M.is_normal){const e=(0,s.n5)({ad_info:M,play_mode:null!=W?W:"one_column"});d.pg.handleOtherclick(Object.assign(Object.assign({},e),{refer:A}))}(S.group_id||S.from_group_id)&&z.addMlModelTrainData({id:S.group_id||S.from_group_id,action:"head"}),null==T||T(e),null==O||O(e,E,"user")}),[z,M,L,P,j,S,T,O,E,null==B?void 0:B.id,i,W,A]),N=(0,a.useCallback)((e=>{var t;13===e.keyCode&&(e.preventDefault(),e.stopPropagation(),null===(t=R.current)||void 0===t||t.click())}),[]);return(0,a.useImperativeHandle)(t,(()=>({linkClick:()=>{var e;null===(e=R.current)||void 0===e||e.click()}}))),M&&!H&&M.web_url?(0,o.jsx)("a",Object.assign({href:M.web_url},D,{ref:R,onClick:F,onKeyDown:N,style:I,target:"_blank",rel:"noreferrer",children:y})):(0,o.jsx)(_.N_,Object.assign({to:E},D,{replace:k||C,ref:R,onClick:F,onKeyDown:N,style:I,children:y}))})))},8513:(e,t,i)=>{i.d(t,{k:()=>b});var n=i(24643),o=i(40099),a=i(25616),l=i(58305),r=i(5545),s=i(88920),d=i(45297),c=i(62186),u=i(72153);const p=(0,c.default)("div",{target:"e1mzilcj0"})((({paddingBottom:e})=>({display:"flex",width:"100%",overflow:"hidden",position:"relative",paddingBottom:e})),"label:DivWrapper;"),m=(0,c.default)("div",{target:"e1mzilcj1"})((({shouldShow3Dot:e,shouldDesOnlyShow2Lines:t,isUnfold:i,lineClamp:n,lineHeight:o,marginTop:a,theme:{colors:l}})=>[{width:"100%",overflow:"hidden",textOverflow:"ellipsis",display:e?"-webkit-box":"box",WebkitLineClamp:n,WebkitBoxOrient:"vertical",span:{display:"inline"},"*":{fill:l.Primary2},":before":{content:'""',height:`calc(100% - ${o}px)`,float:"right",width:0,marginTop:`${a}px`}},!i&&t&&{br:{display:"none"}}]),"label:DivText;"),h=(0,c.default)("button",{target:"e1mzilcj2"})((({theme:e})=>[(0,u.zy)({theme:e,typography:"P2",fontWeight:"semiBold",color:"TextPrimary"}),{border:"none",outline:"none",background:"none",cursor:"pointer"}]),"label:ButtonExpand;"),g=(0,c.default)(h,{target:"e1mzilcj3"})((({bottomBtnLeftOffset:e,isRightSide:t,theme:{direction:i},shouldAdjustLeftBtn:n})=>[(0,u.mp)({direction:i,end:t?e:"",start:t?"":e}),{position:"absolute",bottom:n?16:0}]),"label:StyledButtonBottom;"),_=(0,c.default)("div",{target:"e1mzilcj4"})((({moreBtnBottom:e,isMobileUiOptimize:t,btnShow:i,lineHeight:n,theme:{direction:o}})=>[{float:"rtl"===o?"left":"right",clear:"both",cursor:"pointer",display:i?"flex":"none",alignItems:"center",lineHeight:`${n}px`},t&&{position:"relative",bottom:e}]),"label:DivBtnWrapper;"),f=(0,c.default)("div",{target:"e1mzilcj5"})((({isUnfold:e,maxHeight:t})=>e?{overflowY:"auto",maxHeight:t,scrollbarWidth:"none","::-webkit-scrollbar":{width:4}}:{}),"label:DivOverflowContainer;"),b=(0,o.memo)((({children:e,lineClamp:t=2,overflowLineNum:i=0,onlyKey:c="",maxLine:u=999,btnOnClick:b,lineHeight:v=21,fontSize:x,showExpandButton:w=!0,btnStyle:y,expandBtnText:k,isMobile:C=!1,forceRightSide:S=!1,isCtaClick:P=!1,ctaTrigger:j,showTranslation:T,hasDefaultMaxHeight:O=!1})=>{const{isMobileUiOptimize:M}=(0,s.Eo)(),I=(0,a.s)(),D=(0,o.useRef)(null),E=(0,o.useRef)(null),[B,L]=(0,o.useState)(!1),[R,z]=(0,o.useState)(!1),[W,A]=(0,o.useState)(!1),[H,F]=(0,o.useState)(t),[N,V]=(0,o.useState)(O?t*v+2+"px":"unset"),[U,$]=(0,o.useState)(!1),q=(0,o.useMemo)((()=>x?(v-x)/2:0),[x,v]),G=I(R?"pc_web_less_btn":"pc_web_more_btn");let K=v*i+"px";M&&(K="42vh");const Y=null!=k?k:G,Z={shouldShow3Dot:!C&&W};let J=C?"26px":"55px";R||(J="unset");const X=C?"0":"-4px";let Q="3px";C||(Q=Z.shouldShow3Dot?"1px":"6px");const ee=(0,o.useCallback)((()=>{setTimeout((()=>{var e,i,n,o,a,l,r;if(null==D?void 0:D.current)if(R)V("unset"),(null!==(a=null===(o=E.current)||void 0===o?void 0:o.scrollHeight)&&void 0!==a?a:0)>(null!==(r=null===(l=E.current)||void 0===l?void 0:l.clientHeight)&&void 0!==r?r:0)&&$(!0);else{const o=null!==(e=D.current.scrollHeight)&&void 0!==e?e:0,a=null!==(i=D.current.clientHeight)&&void 0!==i?i:0,l=null!==(n=D.current.offsetHeight)&&void 0!==n?n:0;$(!1);const r=o-a>15||o>=v*t+15||l>=v*t+15;L(r),r&&V(t*v+2+"px")}}),0)}),[R,v,t]),te=(0,o.useCallback)((e=>{P&&j&&(e.stopPropagation(),e.preventDefault(),j())}),[P,j]),ie=(0,o.useCallback)((e=>{(0,l.Gu)(e),F((e=>e===t?u:t)),P||z((e=>!e)),b&&b(R)}),[b,R,t,u,P]);return(0,o.useEffect)((()=>(D.current&&r.P.bind(D.current,ee),()=>{D.current&&r.P.remove(D.current,ee)})),[ee]),(0,o.useEffect)((()=>{ee()}),[T,ee]),(0,o.useEffect)((()=>{z(!1),F(t),L(!1),ee()}),[c]),(0,o.useEffect)((()=>{(0,l.nr)()||A(!0)}),[]),(0,n.jsxs)(p,{paddingBottom:J,children:[(0,n.jsxs)(m,Object.assign({isUnfold:R,ref:D,lineClamp:H,lineHeight:v,marginTop:q,style:{maxHeight:N}},Z,{shouldDesOnlyShow2Lines:!C,children:[(0,n.jsx)(_,{btnShow:B,lineHeight:v,isMobileUiOptimize:M,moreBtnBottom:Q,children:w&&!R&&(0,n.jsx)(h,{style:y,type:"button",onClick:ie,children:Y})}),i>0?(0,n.jsx)(f,{lineClamp:t,ref:E,isUnfold:R,maxHeight:K,isMobileUiOptimize:M,className:R&&M&&U?d.dj:"",onClick:te,children:e}):e]})),R&&(0,n.jsx)(g,{style:y,type:"button",onClick:ie,isRightSide:C&&M||S,shouldAdjustLeftBtn:!C,bottomBtnLeftOffset:X,children:Y})]})}))},38401:(e,t,i)=>{i.d(t,{P:()=>b});var n=i(24643),o=i(40099),a=i(47172),l=i(45956),r=i(82535),s=i(25616),d=i(72688),c=i(49057),u=i(34131),p=i(67963),m=i(48615),h=i(75282),g=i(62186),_=i(72153);const f=(0,g.default)("p",{target:"ejymp3n0"})((({theme:e,theme:{colors:t},isMobile:i,isMiniPlayer:n})=>i?[(0,_.zy)({theme:e,fontFamily:"TikTokFont",typography:"P3"}),{display:"inline-block",alignSelf:"flex-start",marginTop:"-4px",marginBottom:"8px",fontSize:"15px",fontWeight:400},{padding:"1px 5px",background:"rgba(255, 255, 255, 0.34)",borderRadius:"2px",fontWeight:600,textShadow:"0 0 16px rgba(0, 0, 0, .34)"}]:n?[(0,_.zy)({theme:e,fontFamily:"TikTokFont",typography:"P3"}),{color:"#FFF",display:"inline-block",alignSelf:"flex-start",fontSize:"10px",fontWeight:500,padding:"1.5px 4px",background:"rgba(255, 255, 255, 0.34)",borderRadius:"4px",textShadow:"0 0 16px rgba(0, 0, 0, .34)"}]:[(0,_.zy)({theme:e,fontFamily:"TikTokFont",typography:"P2"}),{display:"inline-block",alignSelf:"flex-start",marginTop:"8px",marginBottom:"unset",fontSize:"16px",padding:"1px 4px",background:t.BGPlaceholderDefault,borderRadius:"2px",color:t.TextTertiaryAlt,fontWeight:600}]),"label:PPaidPartnership;"),b=(0,o.memo)((function({item:e,style:t,target:i="_self",isSharing:g=!1,playMode:_,isMiniPlayer:b=!1}){var v,x,w;const y=(0,s.s)(),{region:k=""}=null!==(v=(0,c.W)((()=>["region"]),[]))&&void 0!==v?v:{},{id:C,authorId:S,BAInfo:P,adLabelVersion:j,brandOrganicType:T=0,isECVideo:O}=e,M=P&&!g,I=2===j,D=Number(T)>0,{isMobile:E}=null!==(x=(0,m.U)((()=>["isMobile"]),[]))&&void 0!==x?x:{},B=(0,o.useCallback)((()=>{l.P.handleClickPartnershipTag({group_id:null!=C?C:"",author_id:null!=S?S:"",partnership_tag:null!=P?P:""}),r.q.handleEnterUser({to_user_name:null!=P?P:"",enter_method:"click_partnership_tag"})}),[C,S,P]),L=!E&&!b,R=(0,a.useLocation)(),z=(0,u.FR)({to:{pathname:(0,d.fJR)({uniqueId:null!==(w=null==e?void 0:e.BAInfo)&&void 0!==w?w:""})},location:R}),W=(0,o.useMemo)((()=>{if(I&&O){if("US"===k)return"bc_disclosure_tag_ecommerce_us";if("GB"===k)return"bc_disclosure_tag_ecommerce_uk"}return I?"bc_new_disclosure":"tcm_closedLoop_commercialContent_brandOrganic_videoTag"}),[I,O,k]),A=(0,o.useCallback)((e=>L?(0,n.jsx)(h.ZN,{shouldOptProfile:L,playMode:_,isTag:!0,children:e}):(0,n.jsx)(f,{isMobile:E,isMiniPlayer:b,style:t,children:e})),[E,b,_,L,t]);if(I&&O&&"US"!==k&&"GB"!==k)return null;if(I&&M){const e=`${y(W)} @${P}`;return(0,n.jsx)(p.N_,{target:i,rel:"opener",to:z,onClick:B,style:{textDecoration:"none",color:"inherit"},children:A(e)})}return I&&!M||D?A(y(W)):null}))},16229:(e,t,i)=>{i.d(t,{b:()=>s});var n=i(58632),o=i(64162),a=i(4126),l=i(93995),r=i(26324);let s=class extends o.E{constructor(){super(),this.defaultState={isCookieBannerShowing:!1}}setCookieBannerShowing(e,t){e.isCookieBannerShowing=t}};(0,n.__decorate)([(0,a.uk)(),(0,n.__metadata)("design:type",r.c)],s.prototype,"dispose$",void 0),(0,n.__decorate)([(0,a.h5)(),(0,n.__metadata)("design:type",Function),(0,n.__metadata)("design:paramtypes",[Object,Boolean]),(0,n.__metadata)("design:returntype",void 0)],s.prototype,"setCookieBannerShowing",null),s=(0,n.__decorate)([(0,l.n)("FixBottomModule"),(0,n.__metadata)("design:paramtypes",[])],s)},4725:(e,t,i)=>{i.d(t,{Hz:()=>o,L9:()=>l,Ri:()=>a});var n=i(58305);const o=(e,t)=>{try{if("business"!==new URLSearchParams(window.location.search).get("scene"))return;window.parent.postMessage({type:e,params:t},window.location.origin)}catch(e){console.error("postMessage error",e)}},a=e=>{var t;const i=`; ${document.cookie}`.split(`; ${e}=`);return i.length>0?null===(t=i.pop())||void 0===t?void 0:t.split(";").shift():null},l=(e,t,i)=>{const o=JSON.parse((0,n._S)(e));o[t]=i,(0,n.AP)(e,JSON.stringify(o))}},95185:(e,t,i)=>{i.d(t,{$q:()=>v,FO:()=>b,NE:()=>f,Wg:()=>y,XV:()=>x,vy:()=>w});var n=i(46682),o=i(41271),a=i(40099),l=i(47172),r=(i(69970),i(58305)),s=i(45297),d=i(86389),c=i(59952),u=i(95810),p=i(82715),m=i(49677),h=i(96141),g=i(7089),_=i(32125);function f(){const[e,t]=(0,h.nO)((e=>({isModalShow:e.isModalShow,isExpand:e.isExpand})),_.bN);(0,a.useEffect)((()=>{const i=i=>{if(e.isModalShow)return;i.preventDefault();const n=e.isExpand||!(0,r._S)(s.v1);n&&t.handleShowSnack(!0),t.storeDeferredPrompt(i),t.setIsPwaInstallable(!0),t.setIsExpand(n)};return window.addEventListener("beforeinstallprompt",i),()=>{window.removeEventListener("beforeinstallprompt",i)}}),[t,e.isExpand,e.isModalShow])}function b(e){const t=(0,n.w)(d.i);(0,a.useEffect)((()=>{e&&!e.ftcUser&&t.getNewestReply()}),[e,t])}const v=()=>{const e=(0,a.useRef)(""),t=[p.OZ.searchHome,p.OZ.searchUser,p.OZ.searchVideo],{pathname:i}=(0,l.useLocation)(),n=t.includes(i)&&!t.includes(e.current)||!t.includes(i),o=(0,a.useCallback)((t=>e.current=t),[]);return{needRefresh:n,setPathname:o,pathname:i}};function x(){const{photoSensitiveVideosSetting:e}=(0,o.P)(c.w);(0,a.useEffect)((()=>{m._.handleRemovePhotosensitiveStatus(1===e?"on":"off")}),[])}function w(){const{search:e}=(0,l.useLocation)();return(0,a.useMemo)((()=>{const t=new URLSearchParams(e),i=t.get("scene"),n=t.get("redirect_url");return 0===(null==i?void 0:i.indexOf(u.oe))&&n&&(0===n.indexOf("aweme")||0===n.indexOf("sslocal"))&&n.length<=2953?{isShow:!0,url:n}:{isShow:!1}}),[])}function y(){const e=(0,g.kV)();(0,a.useEffect)((()=>{e.getBusinessPermissionList()}),[e])}},42230:(e,t,i)=>{i.d(t,{R:()=>a});var n,o=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"}(n||(n={}));const a={handleShowSnack:e=>{const t=e?"show_snackbar_auto":"show_snackbar";o.f.event(t)},handleClickDownload:()=>{o.f.event("click_download_bar")},handleGetForPC:()=>{o.f.event("click_get_for_pc")},handleInstallApp:()=>{o.f.event("install_web_app")},handleClickGetApp:({enter_method:e})=>{o.f.event("click_get_app_for_pc",{enter_method:e})}}},80241:(e,t,i)=>{i.d(t,{o:()=>a});var n,o=i(93608);!function(e){e.InterestSelectorShow="interest_selector_show",e.InterestSubmit="interest_submit",e.InterestSelectorSkip="interest_selector_skip"}(n||(n={}));const a={handleSelectorShow:e=>{o.f.event("interest_selector_show",e)},handleInterestSubmit:(e,t)=>{t.forEach((t=>{o.f.event("interest_submit",Object.assign(Object.assign({},e),{enter_method:t}))}))},handleSelectorSkip:e=>{o.f.event("interest_selector_skip",e)}}},56066:(e,t,i)=>{i.d(t,{p:()=>o});var n=i(93608);const o={handleClickAutoScroll:(e,t)=>{t?n.f.sendEvent("autoscroll_on",e):n.f.sendEvent("autoscroll_off",e)},handleHoverAutoScroll:(e,t)=>{t?n.f.sendEvent("autoscroll_on_show",e):n.f.sendEvent("autoscroll_off_show",e)}}},45956:(e,t,i)=>{i.d(t,{P:()=>o});var n=i(93608);const o={handleClickPartnershipTag:e=>{n.f.sendEvent("click_partnership_tag",e)}}},77976:(e,t,i)=>{i.d(t,{w:()=>s});var n=i(58632),o=i(24643),a=i(40099),l=i(93608);const r=a.memo;function s(e){return r((function(t){const{etClick:i,etImpression:r}=t,s=(0,n.__rest)(t,["etClick","etImpression"]);let d=(0,a.useRef)(null),c=!1;"ref"in t&&(c=!0,d=t.ref);const u=(0,a.useRef)();if((0,a.useEffect)((()=>{if(!r)return;const{etName:e,etParams:t,etValidate:i=!0,threshold:n,unobserveAfterIntersect:o,skip:a}=r;if(a)return;const s=n=>{var a;n[0].isIntersecting&&(l.f.sendEvent(e,t,!0,i),o&&(null===(a=u.current)||void 0===a||a.unobserve(n[0].target)))};try{const e={rootMargin:"0px",threshold:n};u.current=new IntersectionObserver(s,e),d.current&&u.current&&u.current.observe(d.current)}catch(e){console.error(e)}return()=>{var e;null===(e=u.current)||void 0===e||e.disconnect()}}),[r]),!i)return(0,o.jsx)(e,Object.assign({ref:c||r?d:void 0},t));const p=s,{etName:m,etParams:h,etValidate:g=!0}=i,_=()=>l.f.sendEvent(m,h,!0,g);if(delete p.etClick,"onClick"in s){const e=s.onClick;p.onClick=t=>(0,n.__awaiter)(this,void 0,void 0,(function*(){e(t),yield _()}))}else p.onClick=()=>(0,n.__awaiter)(this,void 0,void 0,(function*(){return yield _()}));return(0,o.jsx)(e,Object.assign({ref:c||r?d:void 0},p))}))}},87905:(e,t,i)=>{i.d(t,{d:()=>c});var n=i(58632),o=i(24643),a=i(40099),l=i(62186);const r=(0,l.default)("div",{target:"eoeunh00"})((({checked:e,backgroundColor:t,width:i,height:n,theme:{colors:o}})=>({position:"relative",width:null!=i?i:"44px",height:null!=n?n:"24px",left:"0",top:"0",background:null!=t?t:e?"#0be09b":o.LineSecondary,borderRadius:"100px",transition:"all 0.4s cubic-bezier(0.075, 0.82, 0.165, 1)",":hover":{background:null!=t?t:e?"linear-gradient(0deg, rgba(0, 0, 0, .08), rgba(0, 0, 0, .08)), #0be09b":"rgba(22, 24, 35, 0.16)"}})),"label:DivSwitchWrapper;"),s=(0,l.default)("span",{target:"eoeunh01"})((({checked:e,height:t,width:i,backgroundColor:n,left:o})=>({position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",width:null!=i?i:"20px",height:null!=t?t:"20px",left:o,top:"50%",transform:e?"translate(-100%, -50%);":"translateY(-50%)",borderRadius:"100px",background:null!=n?n:"#fff",boxShadow:"0 1px 2px rgba(0, 0, 0, 0.15)",transition:"all 0.4s cubic-bezier(0.075, 0.82, 0.165, 1)"})),"label:SpanSwitchIcon;"),d=(0,l.default)("button",{target:"eoeunh02"})((({theme:{colors:e,typography:t,fontFamilies:i}})=>[t.P2,{border:"none",background:"none",outline:"none",padding:0,position:"relative",overflow:"visible",display:"inline-flex",alignItems:"center",color:e.TextPrimary,fontFamily:i.TikTokFont,cursor:"pointer",":disabled":{cursor:"not-allowed",opacity:.34}}]),"label:ButtonSwitchContainer;"),c=function(e){var{className:t,style:i={},size:l="medium",width:c=44,height:u=24,padding:p=2,indicatorSize:m=20,indicatorColor:h,indicatorCheckedColor:g,indicatorUnCheckedColor:_,indicatorIcon:f,indicatorCheckedIcon:b,indicatorUnCheckedIcon:v,backgroundColor:x,backgroundCheckedColor:w,backgroundUnCheckedColor:y,content:k="",disabled:C=!1,checked:S,defaultChecked:P=!1,e2eData:j,ariaLabel:T,ariaLabelledby:O,ariaDescribedby:M,onChange:I}=e,D=(0,n.__rest)(e,["className","style","size","width","height","padding","indicatorSize","indicatorColor","indicatorCheckedColor","indicatorUnCheckedColor","indicatorIcon","indicatorCheckedIcon","indicatorUnCheckedIcon","backgroundColor","backgroundCheckedColor","backgroundUnCheckedColor","content","disabled","checked","defaultChecked","e2eData","ariaLabel","ariaLabelledby","ariaDescribedby","onChange"]);const[E,B]=(0,a.useState)(null!=S?S:P),L=null!=S?S:E,R=(0,a.useCallback)((e=>{null==e||e.stopPropagation(),null==I||I(!L,e),B(!L)}),[I,L]);return(0,a.useEffect)((()=>{B(null!=S?S:P)}),[P,S]),(0,o.jsx)(d,Object.assign({"data-e2e":j,type:"button",role:"switch",disabled:C,onClick:R,style:i,"aria-checked":L,"aria-label":T,"aria-labelledby":O,"aria-describedby":M,className:t},D,{children:(0,o.jsx)(r,Object.assign({checked:L,backgroundColor:L?null!=w?w:x:null!=y?y:x,width:`${c}px`,height:`${u}px`},{children:(0,o.jsx)(s,Object.assign({checked:L,backgroundColor:L?null!=g?g:h:null!=_?_:h,width:`${m}px`,height:`${m}px`,left:L?`calc(100% - ${p}px)`:`${p}px`},{children:L?null!=b?b:f:null!=v?v:f}))}))}))}}}]);