"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[6751],{53174:(e,t,o)=>{o.d(t,{e:()=>r});var n=o(56070),i=o(43723),l=o(31209),a=function(e,t,o,n){return new(o||(o=Promise))((function(i,l){function a(e){try{r(n.next(e))}catch(e){l(e)}}function s(e){try{r(n.throw(e))}catch(e){l(e)}}function r(e){var t;e.done?i(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(a,s)}r((n=n.apply(e,t||[])).next())}))};const s=(0,i.p)("aboutThisAdAtom@tiktok/webapp-atoms",{videoId:"",isModalShowing:!1,ready:!1,bannerAdsItem:{}}),r=(0,l.i)(s,((e,t)=>({setVideoId:(o,n)=>{const i=e(s),l=Object.assign(Object.assign({},i),{ready:o===i.videoId,videoId:o,bannerAdsItem:n});t(s,l)},setModalShowing:o=>{const n=e(s),i=Object.assign(Object.assign({},n),{isModalShowing:o});t(s,i)},setStateReady:o=>{const n=e(s),i=Object.assign(Object.assign({},n),{ready:o});t(s,i)},getAdsATAInfo:o=>a(void 0,void 0,void 0,(function*(){const i=yield(l=o,a(void 0,void 0,void 0,(function*(){try{const{adv_id:e,country_code:t="",geo_name_id:o=""}=l;return yield n.h.post(`https://www.tiktok.com/tiktok/v1/csp/ata/info?adv_id=${e}&geo_name_id=${o}&country_code=${t}`)}catch(e){return console.error("toggle ads pa setting error",e),{status_code:-1}}})));var l;const r=e(s),d=Object.assign(Object.assign({},r),{geo:i.geo,country:i.country,ready:!0});t(s,d)}))})))},47162:(e,t,o)=>{o.d(t,{H:()=>a,v:()=>l});var n=o(62186),i=o(72153);const l=(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,i.mp)({direction:e,end:"66px"})),"label:DivAutoScrollButtonContainer;"),a=(0,n.default)("div",{target:"etnnns71"})({marginInlineStart:"14px",display:"flex"},"label:DivSwitchContainer;")},86751:(e,t,o)=>{o.d(t,{_:()=>V});var n=o(24643),i=o(67518),l=o(40099),a=o(4103),s=o(45347),r=o(67974),d=o(25616),c=o(89311),u=o(79395),p=o(97706),h=o(53438),g=o(45266),x=o(88920),m=o(62186),b=o(97118),y=o(87852),f=o(87588),v=o(72153),_=o(39965),w=o(33822),k=o(58542);const S=(0,m.default)("ul",{target:"ebh6by60"})({padding:"8px 0px",margin:0,minWidth:"200px",listStyle:"none",boxSizing:"border-box",borderRadius:"8px",userSelect:"none"},"label:UlPopupContainer;"),C=(0,m.default)("li",{target:"ebh6by61"})((({theme:{colors:e},isBrowserMode:t})=>[{display:"flex",alignItems:"center",position:"relative",borderBottom:"",padding:"8px 16px",boxSizing:"border-box",":hover":{background:t?e.ConstBGContainer2:e.BGView},":after":{content:'""',display:"block",width:"calc(100% - 32px)",height:"0.5px",position:"absolute",bottom:0,left:"16px",background:e.ConstLineInverse2},":last-child":{":after":{display:"none"}}}]),"label:LiItemWrapper;"),I=(0,m.default)("div",{target:"ebh6by62"})((({theme:e,isBrowserMode:t})=>({width:"24px",height:"24px",display:"flex",justifyContent:"center",alignItems:"center",color:e.colors.TextPrimary,svg:{fill:t?e.colors.ConstTextInverse:e.colors.TextPrimary}})),"label:DivIconWrapper;"),j=(0,m.default)("span",{target:"ebh6by63"})((({theme:e,isBrowserMode:t,isSecondaryText:o,alignRight:n})=>[(0,v.zy)({theme:e,typography:"P3",fontWeight:"semiBold",fontFamily:"TikTokFont",color:t?"ConstTextInverse":"TextPrimary"}),{display:"inline-block",height:"24px",lineHeight:"24px",marginInline:"8px",whiteSpace:"nowrap",alignItems:o?"end":"normal"},(0,v.mp)(Object.assign({direction:e.direction},n&&{marginStart:"auto",marginEnd:"0px"}))]),"label:SpanItemText;"),A=(0,m.default)(b.A,{target:"ebh6by64"})({width:"20px",height:"20px"},"label:StyledReport;"),B=(0,m.default)(y.A,{target:"ebh6by65"})({width:"20px",height:"20px"},"label:StyledHeartBroken;"),M=(0,m.default)(f.A,{target:"ebh6by66"})({width:"20px",height:"20px"},"label:StyledAboutThisAdIcon;"),T=(0,m.default)(_.A,{target:"ebh6by67"})({width:"20px",height:"20px"},"label:StyledAutoScrollIcon;"),L=(0,m.default)(w.A,{target:"ebh6by68"})({width:"20px",height:"20px"},"label:StyledHDIcon;"),R=(0,m.default)(k.IuZ,{target:"ebh6by69"})((({theme:{direction:e,colors:t},isBrowserMode:o})=>[(0,v.mp)({direction:e,marginStart:"auto",marginEnd:"0px"}),{width:"20px",height:"20px",fill:o?t.ConstTextInverse:t.TextPrimary}]),"label:StyledCheckMark;");var P=o(47162),D=o(90341),O=o(56066),E=o(87905);const Y=(0,l.memo)((function(e){const{videoId:t,playMode:o}=e,i=(0,D.eu)(),a=(0,D.J3)(),s=(0,l.useCallback)((()=>{O.p.handleClickAutoScroll({play_mode:o,group_id:t},!i),a.toggleAutoScroll()}),[o,t,i,a]);return(0,n.jsx)(P.H,{children:(0,n.jsx)(E.d,{checked:i,onChange:s})})}));var X,H=o(53174),F=o(99282),N=o(43097),G=o(66458),U=o(93341);!function(e){e.Main="main",e.Resolution="resolution"}(X||(X={}));const V=(0,l.memo)((function({active:e,margin:t=0,e2eTag:o,onDismissPanel:m,onClickReport:b,onClickNotInterested:y,onSelectResolution:f,itemId:v,bannerAdsItem:_,authorId:w,playModeForTea:P,isBrowserMode:D=!1,isVideoDetailBannerAds:O=!1,isShowTop:E=!1,newPopupPosition:X=!1,actionItemPosition:V=!1,showNotInterested:W=!0,extraItems:q,index:z}){var $;const K=(0,d.s)(),{colors:Z}=(0,i.u)(),{isRTL:J}=(0,c.m)();let Q,ee;D?Q=J?"bottomLeft":"bottomRight":E?(Q=J?"topRight":"topLeft",ee={transform:"translateY(-7px) "+(J?"translateX(13px)":"translateX(-13px)")}):V?(Q=J?"bottomRight":"bottomLeft",ee={transform:`translateY(24px) ${J?"translateX(-57px)":"translateX(57px)"} translateY(-100%)`}):X?(Q=J?"bottomRight":"bottomLeft",ee={transform:"translateY(-24px) "+(J?"translateX(-57px)":"translateX(57px)")}):O?(Q=J?"topLeft":"topRight",ee={transform:"translateY(165px) translateX(4px)"}):(Q=J?"bottomRight":"bottomLeft",ee={transform:"translateY(-58px) "+(J?"translateX(-57px)":"translateX(57px)")});const te=(0,l.useMemo)((()=>({group_id:v,author_id:w,play_mode:P})),[v,w,P]),oe=(0,l.useCallback)((e=>t=>{null==e||e(t),null==m||m()}),[m]),ne=H.e.useServiceDispatchers();let ie=(0,u.k)(v);const le=(0,h.mx)(ie);O&&(ie=_);const ae=!!(null==ie?void 0:ie.ad_info),{showAboutThisAd:se}=(0,g.s)(),re=(0,U.gu)(null!=z?z:0),{actualResolution:de}=(0,N.qW)(),ce=(0,U.fD)();let ue=void 0!==z?re:de;ue||(ue="540P");const[pe,he]=(0,l.useState)("main"),{allowSelectResolution:ge}=(0,x.lZ)(),xe=[...new Set(null!==($=null==ie?void 0:ie.resolutionList)&&void 0!==$?$:[])].filter((e=>!["360P","480P"].includes(e))).map((e=>({key:e,onClick:()=>null==f?void 0:f({resolution:e})}))),me=(0,l.useCallback)((()=>{var e,t;a.Y.resolutionButtonClick(te,null!=ue?ue:"",ce?"1":"0"),(null===(e=null==ie?void 0:ie.resolutionList)||void 0===e?void 0:e.length)&&(null===(t=null==ie?void 0:ie.resolutionList)||void 0===t?void 0:t.length)>1&&he("resolution")}),[null==ie?void 0:ie.resolutionList]),be=[{icon:(0,n.jsx)(A,{}),key:"pc_web_report_btn",onClick:b}];W&&y&&be.unshift({icon:(0,n.jsx)(B,{}),key:"webapp_forYoufeed_notInterested_btn",onClick:y}),ae&&se&&be.push({icon:(0,n.jsx)(M,{}),key:"about_this_ad_title",onClick:()=>{ne.setVideoId(v,O?ie:null),ne.setModalShowing(!0)}});const{isAutoScrollReposition:ye}=(0,x.sF)(),fe=(0,x.eu)();(ye&&!D&&!O||fe&&D)&&be.unshift({icon:(0,n.jsx)(T,{"data-e2e":"auto-scroll"}),key:"pcWeb_autoScroll",onClick:()=>{},extra:(0,n.jsx)(Y,{videoId:v,playMode:D?"browser_mode":"one_column"})});const{isEntranceInMoreMenu:ve}=(0,F.vN)(),_e=(0,G.K)(),we=ve&&!ae&&!(null==ie?void 0:ie.scheduleTime)&&!le,ke=(0,l.useCallback)((()=>{_e.setIsCaptionModalOn(!0),s.lN.handleCaptionButtonClick(te)}),[_e,te]);we&&be.unshift({icon:(0,n.jsx)(k.qY7,{style:{width:"20px",height:"20px"}}),key:"claSeeTranslation_fyp_longPressPanel_captionsLabelV2",onClick:ke});const Se="resolutionUpgrade_player_qualityMenuItem_label",Ce=!le&&!ae&&!(null==ie?void 0:ie.scheduleTime)&≥return Ce&&be.unshift({icon:(0,n.jsx)(L,{}),key:Se,onClick:me,extra:(0,n.jsx)(j,{isBrowserMode:D,isSecondaryText:!0,alignRight:!0,children:ce?K("resolutionUpgrade_player_qualityMenuItem_selection1"):ue})}),(0,l.useEffect)((()=>{e&&he("main")}),[e]),(0,l.useEffect)((()=>{e&&(r.V.handleDislikeShow(te),ve&&s.lN.handleCaptionButtonShow(te),Ce&&a.Y.resolutionButtonShow(te))}),[te,e,ve,Ce]),(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(p.z,{style:ee,backgroundColor:D?Z.BGCreation2:Z.BGSecondary,placement:Q,active:e,margin:t,hideArrow:!0,children:"main"===pe?(0,n.jsxs)(S,{"data-e2e":o,children:[be.map((({icon:e,key:t,onClick:o,extra:i=null})=>(0,n.jsx)(C,{onClick:t===Se?o:oe(o),isBrowserMode:D,children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(I,{isBrowserMode:D,children:e}),(0,n.jsx)(j,{isBrowserMode:D,children:K(t)}),i]})},t))),q]}):(0,n.jsxs)(S,{"data-e2e":o,children:[xe.map((({key:e,onClick:t})=>(0,n.jsx)(C,{onClick:oe(t),isBrowserMode:D,children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(j,{isBrowserMode:D,children:K("auto"===e?"resolutionUpgrade_player_qualityMenuItem_selection1":e)}),ce?"auto"===e&&(0,n.jsx)(R,{isBrowserMode:D}):ue===e&&(0,n.jsx)(R,{isBrowserMode:D})]})},e))),q]})})})}))},56066:(e,t,o)=>{o.d(t,{p:()=>i});var n=o(93608);const i={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)}}}}]);